diff --git a/hive/services/hiveui/frontend/dist/assets/_.js b/hive/services/hiveui/frontend/dist/assets/_.js index 43492b397..f4bac90a2 100644 --- a/hive/services/hiveui/frontend/dist/assets/_.js +++ b/hive/services/hiveui/frontend/dist/assets/_.js @@ -1 +1 @@ -import{c as k,aI as v,aJ as $,aF as B,j as s,aE as K,aK as P,aL as y,L as C}from"./index.js";import{u as F}from"./useSuspenseQuery.js";import{B as L}from"./back-link.js";import{F as S,O as E,U as I}from"./upload-button.js";import"./alert-dialog.js";import"./s3.js";import"./useMutation.js";import"./download.js";import"./trash-2.js";function z(){const e=k.c(20),{bucket:n,_splat:b}=v.useParams(),a=$(b||""),{data:o}=F(B(n,a));let c;e[0]!==o.Contents?(c=o.Contents||[],e[0]=o.Contents,e[1]=c):c=e[1];const r=c;let h;e[2]!==o.CommonPrefixes?(h=o.CommonPrefixes||[],e[2]=o.CommonPrefixes,e[3]=h):h=e[3];const i=h,x=a.split("/").filter(Boolean),N=[{name:n,path:`/s3/ls/${n}`},...x.map((t,l)=>{const m=`${x.slice(0,l+1).join("/")}/`;return{name:t,path:`/s3/ls/${n}/${m}`}})],g=x.length>1?`/s3/ls/${n}/${x.slice(0,-1).join("/")}/`:`/s3/ls/${n}`;let d;e[4]!==g?(d=s.jsx(L,{to:g,children:"Back"}),e[4]=g,e[5]=d):d=e[5];let f;e[6]!==n||e[7]!==a?(f=s.jsx(I,{bucket:n,prefix:a}),e[6]=n,e[7]=a,e[8]=f):f=e[8];let p;e[9]!==n||e[10]!==i||e[11]!==a?(p=i.length>0&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Folders"}),s.jsx("div",{className:"space-y-2",children:i.map(t=>{if(!t.Prefix)return null;const l=K(P(t.Prefix,a)),m=y(t.Prefix,a);return s.jsx(S,{bucketName:n,folderName:l,fullPrefix:m},t.Prefix)})})]}),e[9]=n,e[10]=i,e[11]=a,e[12]=p):p=e[12];let u;e[13]!==n||e[14]!==r||e[15]!==a?(u=r.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Objects"}),r.map(t=>{if(!t.Key)return null;const l=P(t.Key,a),m=y(t.Key,a);return s.jsx(E,{bucketName:n,displayName:l,fullKey:m,object:t},t.Key)})]}),e[13]=n,e[14]=r,e[15]=a,e[16]=u):u=e[16];let j;return e[17]!==i.length||e[18]!==r.length?(j=r.length===0&&i.length===0&&s.jsx("p",{className:"text-muted-foreground",children:"No objects found in this folder."}),e[17]=i.length,e[18]=r.length,e[19]=j):j=e[19],s.jsxs(s.Fragment,{children:[d,s.jsx("div",{className:"mb-6",children:s.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground text-sm",children:N.map((t,l)=>s.jsxs("div",{className:"flex items-center gap-2",children:[l>0&&s.jsx("span",{children:"/"}),l===N.length-1?s.jsx("span",{className:"text-foreground",children:t.name}):s.jsx(C,{className:"hover:text-foreground",to:t.path,children:t.name})]},t.path))}),f]})}),p,u,j]})}export{z as component}; +import{c as B,aH as $,aI as K,aE as C,j as s,aD as F,aJ as b,aK as k,L as E}from"./index.js";import{u as L}from"./useSuspenseQuery.js";import{B as O}from"./back-link.js";import{E as S}from"./error-banner.js";import{a as U}from"./s3.js";import{U as A,F as I,O as R}from"./upload-button.js";import"./alert-dialog.js";import"./download.js";import"./trash-2.js";function G(){const e=B.c(24),{bucket:n,_splat:v}=$.useParams(),a=K(v||""),{data:m}=L(C(n,a)),r=U();let d;e[0]!==m.Contents?(d=m.Contents||[],e[0]=m.Contents,e[1]=d):d=e[1];const o=d;let p;e[2]!==m.CommonPrefixes?(p=m.CommonPrefixes||[],e[2]=m.CommonPrefixes,e[3]=p):p=e[3];const i=p,u=a.split("/").filter(Boolean),y=[{name:n,path:`/s3/ls/${n}`},...u.map((t,l)=>{const c=`${u.slice(0,l+1).join("/")}/`;return{name:t,path:`/s3/ls/${n}/${c}`}})],P=u.length>1?`/s3/ls/${n}/${u.slice(0,-1).join("/")}/`:`/s3/ls/${n}`;let f;e[4]!==P?(f=s.jsx(O,{to:P,children:"Back"}),e[4]=P,e[5]=f):f=e[5];let x;e[6]!==n||e[7]!==a||e[8]!==r.isPending||e[9]!==r.mutateAsync?(x=s.jsx(A,{bucket:n,isPending:r.isPending,onUpload:r.mutateAsync,prefix:a}),e[6]=n,e[7]=a,e[8]=r.isPending,e[9]=r.mutateAsync,e[10]=x):x=e[10];let h;e[11]!==r.error?(h=r.error&&s.jsx(S,{error:r.error,msg:"Failed to upload object"}),e[11]=r.error,e[12]=h):h=e[12];let g;e[13]!==n||e[14]!==i||e[15]!==a?(g=i.length>0&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Folders"}),s.jsx("div",{className:"space-y-2",children:i.map(t=>{if(!t.Prefix)return null;const l=F(b(t.Prefix,a)),c=k(t.Prefix,a);return s.jsx(I,{bucketName:n,folderName:l,fullPrefix:c},t.Prefix)})})]}),e[13]=n,e[14]=i,e[15]=a,e[16]=g):g=e[16];let j;e[17]!==n||e[18]!==o||e[19]!==a?(j=o.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Objects"}),o.map(t=>{if(!t.Key)return null;const l=b(t.Key,a),c=k(t.Key,a);return s.jsx(R,{bucketName:n,displayName:l,fullKey:c,object:t},t.Key)})]}),e[17]=n,e[18]=o,e[19]=a,e[20]=j):j=e[20];let N;return e[21]!==i.length||e[22]!==o.length?(N=o.length===0&&i.length===0&&s.jsx("p",{className:"text-muted-foreground",children:"No objects found in this folder."}),e[21]=i.length,e[22]=o.length,e[23]=N):N=e[23],s.jsxs(s.Fragment,{children:[f,s.jsx("div",{className:"mb-6",children:s.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground text-sm",children:y.map((t,l)=>s.jsxs("div",{className:"flex items-center gap-2",children:[l>0&&s.jsx("span",{children:"/"}),l===y.length-1?s.jsx("span",{className:"text-foreground",children:t.name}):s.jsx(E,{className:"hover:text-foreground",to:t.path,children:t.name})]},t.path))}),x]})}),h,g,j,N]})}export{G as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/_id.js b/hive/services/hiveui/frontend/dist/assets/_id.js index 9ddbc607c..f9a961820 100644 --- a/hive/services/hiveui/frontend/dist/assets/_id.js +++ b/hive/services/hiveui/frontend/dist/assets/_id.js @@ -1 +1 @@ -import{c as O,bq as T,u as D,br as J,j as s,bs as K,B as Q}from"./index.js";import{a as U,u as W,I as X,F as Y,b as Z,c as ee}from"./field.js";import{u as se}from"./useSuspenseQuery.js";import{B as q}from"./back-link.js";import{E as te}from"./error-banner.js";import{P as ie}from"./page-heading.js";import{d as re}from"./ec2.js";import"./useMutation.js";function fe(){const e=O.c(58),{id:R}=T.useParams(),o=D();let S;e[0]!==R?(S=K(R),e[0]=R,e[1]=S):S=e[1];const{data:H}=se(S),A=H.Volumes?.[0],t=A?.VolumeId,r=re(),i=A?.Size??1;let a;e[2]!==i?(a=U(J.refine(l=>l.size>i,{message:`New size must be greater than current size (${i} GiB)`,path:["size"]})),e[2]=i,e[3]=a):a=e[3];let n;e[4]!==i?(n={size:i},e[4]=i,e[5]=n):n=e[5];let B;e[6]!==a||e[7]!==n?(B={resolver:a,defaultValues:n},e[6]=a,e[7]=n,e[8]=B):B=e[8];const{handleSubmit:k,register:E,formState:L}=W(B),{errors:V,isSubmitting:$}=L;if(!t){let l;return e[9]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(s.Fragment,{children:[s.jsx(q,{to:"/ec2/describe-volumes",children:"Back to volumes"}),s.jsx("p",{className:"text-muted-foreground",children:"Volume not found."})]}),e[9]=l):l=e[9],l}let F;e[10]!==r||e[11]!==o||e[12]!==t?(F=async l=>{await r.mutateAsync({...l,volumeId:t}),o({to:"/ec2/describe-volumes/$id",params:{id:t}})},e[10]=r,e[11]=o,e[12]=t,e[13]=F):F=e[13];const w=F;let m,c;e[14]!==t?(m=s.jsx(q,{params:{id:t},to:"/ec2/describe-volumes/$id",children:"Back to volume"}),c=s.jsx(ie,{subtitle:t,title:"Resize Volume"}),e[14]=t,e[15]=m,e[16]=c):(m=e[15],c=e[16]);let u;e[17]!==r.error?(u=r.error&&s.jsx(te,{error:r.error,msg:"Failed to resize volume"}),e[17]=r.error,e[18]=u):u=e[18];let d;e[19]!==k||e[20]!==w?(d=k(w),e[19]=k,e[20]=w,e[21]=d):d=e[21];let f;e[22]!==i?(f=s.jsx("div",{className:"space-y-2",children:s.jsxs("p",{className:"text-muted-foreground text-sm",children:["Current size: ",i," GiB"]})}),e[22]=i,e[23]=f):f=e[23];let N;e[24]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Z,{children:s.jsx("label",{htmlFor:"size",children:"New size (GiB)"})}),e[24]=N):N=e[24];const I=!!V.size,_=i+1;let p;e[25]!==E?(p=E("size",{valueAsNumber:!0}),e[25]=E,e[26]=p):p=e[26];let x;e[27]!==I||e[28]!==_||e[29]!==p?(x=s.jsx(X,{"aria-invalid":I,id:"size",min:_,type:"number",...p}),e[27]=I,e[28]=_,e[29]=p,e[30]=x):x=e[30];let b;e[31]!==V.size?(b=s.jsx(Y,{errors:[V.size]}),e[31]=V.size,e[32]=b):b=e[32];let h;e[33]!==x||e[34]!==b?(h=s.jsxs(ee,{children:[N,x,b]}),e[33]=x,e[34]=b,e[35]=h):h=e[35];const C=$||r.isPending;let j;e[36]!==o||e[37]!==t?(j=()=>o({to:"/ec2/describe-volumes/$id",params:{id:t}}),e[36]=o,e[37]=t,e[38]=j):j=e[38];let z;e[39]!==C||e[40]!==j?(z=s.jsx(Q,{disabled:C,onClick:j,type:"button",variant:"outline",children:"Cancel"}),e[39]=C,e[40]=j,e[41]=z):z=e[41];const G=$||r.isPending,M=$||r.isPending?"Resizing…":"Resize Volume";let g;e[42]!==G||e[43]!==M?(g=s.jsx(Q,{disabled:G,type:"submit",children:M}),e[42]=G,e[43]=M,e[44]=g):g=e[44];let v;e[45]!==z||e[46]!==g?(v=s.jsxs("div",{className:"flex gap-2",children:[z,g]}),e[45]=z,e[46]=g,e[47]=v):v=e[47];let y;e[48]!==f||e[49]!==h||e[50]!==v||e[51]!==d?(y=s.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:d,children:[f,h,v]}),e[48]=f,e[49]=h,e[50]=v,e[51]=d,e[52]=y):y=e[52];let P;return e[53]!==y||e[54]!==m||e[55]!==c||e[56]!==u?(P=s.jsxs(s.Fragment,{children:[m,c,u,y]}),e[53]=y,e[54]=m,e[55]=c,e[56]=u,e[57]=P):P=e[57],P}export{fe as component}; +import{c as O,bp as T,u as D,bq as J,j as s,br as K,B as Q}from"./index.js";import{a as U,u as W,I as X,F as Y,b as Z,c as ee}from"./field.js";import{u as se}from"./useSuspenseQuery.js";import{B as q}from"./back-link.js";import{E as te}from"./error-banner.js";import{P as ie}from"./page-heading.js";import{d as le}from"./ec2.js";function de(){const e=O.c(58),{id:R}=T.useParams(),o=D();let S;e[0]!==R?(S=K(R),e[0]=R,e[1]=S):S=e[1];const{data:H}=se(S),A=H.Volumes?.[0],t=A?.VolumeId,l=le(),i=A?.Size??1;let a;e[2]!==i?(a=U(J.refine(r=>r.size>i,{message:`New size must be greater than current size (${i} GiB)`,path:["size"]})),e[2]=i,e[3]=a):a=e[3];let n;e[4]!==i?(n={size:i},e[4]=i,e[5]=n):n=e[5];let B;e[6]!==a||e[7]!==n?(B={resolver:a,defaultValues:n},e[6]=a,e[7]=n,e[8]=B):B=e[8];const{handleSubmit:k,register:E,formState:L}=W(B),{errors:V,isSubmitting:$}=L;if(!t){let r;return e[9]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(s.Fragment,{children:[s.jsx(q,{to:"/ec2/describe-volumes",children:"Back to volumes"}),s.jsx("p",{className:"text-muted-foreground",children:"Volume not found."})]}),e[9]=r):r=e[9],r}let F;e[10]!==l||e[11]!==o||e[12]!==t?(F=async r=>{await l.mutateAsync({...r,volumeId:t}),o({to:"/ec2/describe-volumes/$id",params:{id:t}})},e[10]=l,e[11]=o,e[12]=t,e[13]=F):F=e[13];const w=F;let m,c;e[14]!==t?(m=s.jsx(q,{params:{id:t},to:"/ec2/describe-volumes/$id",children:"Back to volume"}),c=s.jsx(ie,{subtitle:t,title:"Resize Volume"}),e[14]=t,e[15]=m,e[16]=c):(m=e[15],c=e[16]);let u;e[17]!==l.error?(u=l.error&&s.jsx(te,{error:l.error,msg:"Failed to resize volume"}),e[17]=l.error,e[18]=u):u=e[18];let d;e[19]!==k||e[20]!==w?(d=k(w),e[19]=k,e[20]=w,e[21]=d):d=e[21];let f;e[22]!==i?(f=s.jsx("div",{className:"space-y-2",children:s.jsxs("p",{className:"text-muted-foreground text-sm",children:["Current size: ",i," GiB"]})}),e[22]=i,e[23]=f):f=e[23];let N;e[24]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Z,{children:s.jsx("label",{htmlFor:"size",children:"New size (GiB)"})}),e[24]=N):N=e[24];const I=!!V.size,_=i+1;let p;e[25]!==E?(p=E("size",{valueAsNumber:!0}),e[25]=E,e[26]=p):p=e[26];let x;e[27]!==I||e[28]!==_||e[29]!==p?(x=s.jsx(X,{"aria-invalid":I,id:"size",min:_,type:"number",...p}),e[27]=I,e[28]=_,e[29]=p,e[30]=x):x=e[30];let b;e[31]!==V.size?(b=s.jsx(Y,{errors:[V.size]}),e[31]=V.size,e[32]=b):b=e[32];let h;e[33]!==x||e[34]!==b?(h=s.jsxs(ee,{children:[N,x,b]}),e[33]=x,e[34]=b,e[35]=h):h=e[35];const C=$||l.isPending;let j;e[36]!==o||e[37]!==t?(j=()=>o({to:"/ec2/describe-volumes/$id",params:{id:t}}),e[36]=o,e[37]=t,e[38]=j):j=e[38];let z;e[39]!==C||e[40]!==j?(z=s.jsx(Q,{disabled:C,onClick:j,type:"button",variant:"outline",children:"Cancel"}),e[39]=C,e[40]=j,e[41]=z):z=e[41];const G=$||l.isPending,M=$||l.isPending?"Resizing…":"Resize Volume";let g;e[42]!==G||e[43]!==M?(g=s.jsx(Q,{disabled:G,type:"submit",children:M}),e[42]=G,e[43]=M,e[44]=g):g=e[44];let v;e[45]!==z||e[46]!==g?(v=s.jsxs("div",{className:"flex gap-2",children:[z,g]}),e[45]=z,e[46]=g,e[47]=v):v=e[47];let y;e[48]!==f||e[49]!==h||e[50]!==v||e[51]!==d?(y=s.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:d,children:[f,h,v]}),e[48]=f,e[49]=h,e[50]=v,e[51]=d,e[52]=y):y=e[52];let P;return e[53]!==y||e[54]!==m||e[55]!==c||e[56]!==u?(P=s.jsxs(s.Fragment,{children:[m,c,u,y]}),e[53]=y,e[54]=m,e[55]=c,e[56]=u,e[57]=P):P=e[57],P}export{de as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/_id2.js b/hive/services/hiveui/frontend/dist/assets/_id2.js index b39e30816..b74250dd7 100644 --- a/hive/services/hiveui/frontend/dist/assets/_id2.js +++ b/hive/services/hiveui/frontend/dist/assets/_id2.js @@ -1 +1 @@ -import{c as W,bB as X,u as ee,r as te,bC as q,j as l,L as le,bD as se,B as Y,bs as ae}from"./index.js";import{u as ie}from"./useSuspenseQuery.js";import{B as G}from"./back-link.js";import{D as I,a as s}from"./detail-row.js";import{P as oe}from"./page-heading.js";import{b as ne,c as re,d as me,h as ce,a as ue,e as de,f as fe,g as he}from"./alert-dialog.js";import{B as xe}from"./badge.js";import{e as je}from"./ec2.js";import{T as be}from"./trash-2.js";import"./useMutation.js";function _e(){const e=W.c(75),{id:i}=X.useParams(),w=ee();let T;e[0]!==i?(T=ae(i),e[0]=i,e[1]=T):T=e[1];const{data:J}=ie(T),t=J.Volumes?.[0],a=je(),[H,Q]=te.useState(!1),U=t?.State==="available"&&(!t.Attachments||t.Attachments.length===0);let C;e[2]!==a||e[3]!==i||e[4]!==w?(C=async()=>{await a.mutateAsync(i),w({to:"/ec2/describe-volumes"})},e[2]=a,e[3]=i,e[4]=w,e[5]=C):C=e[5];const Z=C;if(!t?.VolumeId){let R;return e[6]===Symbol.for("react.memo_cache_sentinel")?(R=l.jsxs(l.Fragment,{children:[l.jsx(G,{to:"/ec2/describe-volumes",children:"Back to volumes"}),l.jsx("p",{className:"text-muted-foreground",children:"Volume not found."})]}),e[6]=R):R=e[6],R}let _;e[7]!==t.CreateTime?(_=q(t.CreateTime),e[7]=t.CreateTime,e[8]=_):_=e[8];const F=_;let B;e[9]===Symbol.for("react.memo_cache_sentinel")?(B=l.jsx(G,{to:"/ec2/describe-volumes",children:"Back to volumes"}),e[9]=B):B=e[9];const L=!U;let K;e[10]===Symbol.for("react.memo_cache_sentinel")?(K=()=>Q(!0),e[10]=K):K=e[10];let N;e[11]===Symbol.for("react.memo_cache_sentinel")?(N=l.jsx(be,{className:"size-4"}),e[11]=N):N=e[11];let o;e[12]!==L?(o=l.jsxs(Y,{disabled:L,onClick:K,size:"sm",variant:"destructive",children:[N,"Delete"]}),e[12]=L,e[13]=o):o=e[13];let n;e[14]!==t.State||e[15]!==t.VolumeId?(n=t.State==="available"?l.jsx(le,{className:se({variant:"outline"}),params:{id:t.VolumeId},to:"/ec2/modify-volume/$id",children:"Resize Volume"}):l.jsx(Y,{disabled:!0,variant:"outline",children:"Resize Volume"}),e[14]=t.State,e[15]=t.VolumeId,e[16]=n):n=e[16];let r;e[17]!==t.State?(r=t.State&&l.jsx(xe,{variant:t.State==="available"?"default":"outline",children:t.State}),e[17]=t.State,e[18]=r):r=e[18];let m;e[19]!==o||e[20]!==n||e[21]!==r?(m=l.jsxs("div",{className:"flex items-center gap-2",children:[o,n,r]}),e[19]=o,e[20]=n,e[21]=r,e[22]=m):m=e[22];let c;e[23]!==m||e[24]!==t.VolumeId?(c=l.jsx(oe,{actions:m,subtitle:"EC2 Volume Details",title:t.VolumeId}),e[23]=m,e[24]=t.VolumeId,e[25]=c):c=e[25];let k;e[26]===Symbol.for("react.memo_cache_sentinel")?(k=l.jsx(I.Header,{children:"Volume Information"}),e[26]=k):k=e[26];let u;e[27]!==t.VolumeId?(u=l.jsx(s,{label:"Volume ID",value:t.VolumeId}),e[27]=t.VolumeId,e[28]=u):u=e[28];const O=`${t.Size} GiB`;let d;e[29]!==O?(d=l.jsx(s,{label:"Size",value:O}),e[29]=O,e[30]=d):d=e[30];let f;e[31]!==t.VolumeType?(f=l.jsx(s,{label:"Volume Type",value:t.VolumeType}),e[31]=t.VolumeType,e[32]=f):f=e[32];let h;e[33]!==t.State?(h=l.jsx(s,{label:"State",value:t.State}),e[33]=t.State,e[34]=h):h=e[34];let x;e[35]!==t.AvailabilityZone?(x=l.jsx(s,{label:"Availability Zone",value:t.AvailabilityZone}),e[35]=t.AvailabilityZone,e[36]=x):x=e[36];let j;e[37]!==F?(j=l.jsx(s,{label:"Create Time",value:F}),e[37]=F,e[38]=j):j=e[38];const $=t.Encrypted?"Yes":"No";let b;e[39]!==$?(b=l.jsx(s,{label:"Encrypted",value:$}),e[39]=$,e[40]=b):b=e[40];let v;e[41]!==t.KmsKeyId?(v=l.jsx(s,{label:"KMS Key ID",value:t.KmsKeyId}),e[41]=t.KmsKeyId,e[42]=v):v=e[42];let D;e[43]!==u||e[44]!==d||e[45]!==f||e[46]!==h||e[47]!==x||e[48]!==j||e[49]!==b||e[50]!==v?(D=l.jsxs(I,{children:[k,l.jsxs(I.Content,{children:[u,d,f,h,x,j,b,v]})]}),e[43]=u,e[44]=d,e[45]=f,e[46]=h,e[47]=x,e[48]=j,e[49]=b,e[50]=v,e[51]=D):D=e[51];let p;e[52]!==t.Attachments?(p=t.Attachments&&t.Attachments.length>0&&l.jsxs(I,{children:[l.jsx(I.Header,{children:"Attachments"}),t.Attachments.map(ve)]}),e[52]=t.Attachments,e[53]=p):p=e[53];let y;e[54]!==c||e[55]!==D||e[56]!==p?(y=l.jsxs("div",{className:"space-y-6",children:[c,D,p]}),e[54]=c,e[55]=D,e[56]=p,e[57]=y):y=e[57];let P;e[58]===Symbol.for("react.memo_cache_sentinel")?(P=l.jsx(ue,{children:"Delete Volume"}),e[58]=P):P=e[58];let V;e[59]!==t.VolumeId?(V=l.jsxs(ne,{children:[P,l.jsxs(re,{children:['Are you sure you want to delete the volume "',t.VolumeId,'"? This action cannot be undone.']})]}),e[59]=t.VolumeId,e[60]=V):V=e[60];let z;e[61]===Symbol.for("react.memo_cache_sentinel")?(z=l.jsx(de,{children:"Cancel"}),e[61]=z):z=e[61];const M=a.isPending?"Deleting…":"Delete";let g;e[62]!==a.isPending||e[63]!==Z||e[64]!==M?(g=l.jsxs(me,{children:[z,l.jsx(ce,{disabled:a.isPending,onClick:Z,children:M})]}),e[62]=a.isPending,e[63]=Z,e[64]=M,e[65]=g):g=e[65];let S;e[66]!==V||e[67]!==g?(S=l.jsxs(fe,{children:[V,g]}),e[66]=V,e[67]=g,e[68]=S):S=e[68];let A;e[69]!==H||e[70]!==S?(A=l.jsx(he,{onOpenChange:Q,open:H,children:S}),e[69]=H,e[70]=S,e[71]=A):A=e[71];let E;return e[72]!==y||e[73]!==A?(E=l.jsxs(l.Fragment,{children:[B,y,A]}),e[72]=y,e[73]=A,e[74]=E):E=e[74],E}function ve(e){return l.jsxs(I.Content,{children:[l.jsx(s,{label:"Instance ID",value:e.InstanceId}),l.jsx(s,{label:"Device",value:e.Device}),l.jsx(s,{label:"Status",value:e.State}),l.jsx(s,{label:"Attach Time",value:q(e.AttachTime)}),l.jsx(s,{label:"Delete on Termination",value:e.DeleteOnTermination?"Yes":"No"})]},e.InstanceId)}export{_e as component}; +import{c as X,bA as ee,u as te,r as le,bB as J,j as l,L as se,bC as ae,B as G,br as ie}from"./index.js";import{u as oe}from"./useSuspenseQuery.js";import{B as q}from"./back-link.js";import{D as T,a as s}from"./detail-row.js";import{E as ne}from"./error-banner.js";import{P as re}from"./page-heading.js";import{b as me,c as ce,d as ue,h as de,a as fe,e as xe,f as he,g as je}from"./alert-dialog.js";import{B as be}from"./badge.js";import{e as ve}from"./ec2.js";import{T as pe}from"./trash-2.js";function Ee(){const e=X.c(78),{id:i}=ee.useParams(),F=te();let C;e[0]!==i?(C=ie(i),e[0]=i,e[1]=C):C=e[1];const{data:U}=oe(C),t=U.Volumes?.[0],a=ve(),[H,Y]=le.useState(!1),W=t?.State==="available"&&(!t.Attachments||t.Attachments.length===0);let _;e[2]!==a||e[3]!==i||e[4]!==F?(_=async()=>{await a.mutateAsync(i),F({to:"/ec2/describe-volumes"})},e[2]=a,e[3]=i,e[4]=F,e[5]=_):_=e[5];const Z=_;if(!t?.VolumeId){let w;return e[6]===Symbol.for("react.memo_cache_sentinel")?(w=l.jsxs(l.Fragment,{children:[l.jsx(q,{to:"/ec2/describe-volumes",children:"Back to volumes"}),l.jsx("p",{className:"text-muted-foreground",children:"Volume not found."})]}),e[6]=w):w=e[6],w}let B;e[7]!==t.CreateTime?(B=J(t.CreateTime),e[7]=t.CreateTime,e[8]=B):B=e[8];const L=B;let E;e[9]===Symbol.for("react.memo_cache_sentinel")?(E=l.jsx(q,{to:"/ec2/describe-volumes",children:"Back to volumes"}),e[9]=E):E=e[9];let o;e[10]!==a.error?(o=a.error&&l.jsx(ne,{error:a.error,msg:"Failed to delete volume"}),e[10]=a.error,e[11]=o):o=e[11];const O=!W;let K;e[12]===Symbol.for("react.memo_cache_sentinel")?(K=()=>Y(!0),e[12]=K):K=e[12];let N;e[13]===Symbol.for("react.memo_cache_sentinel")?(N=l.jsx(pe,{className:"size-4"}),e[13]=N):N=e[13];let n;e[14]!==O?(n=l.jsxs(G,{disabled:O,onClick:K,size:"sm",variant:"destructive",children:[N,"Delete"]}),e[14]=O,e[15]=n):n=e[15];let r;e[16]!==t.State||e[17]!==t.VolumeId?(r=t.State==="available"?l.jsx(se,{className:ae({variant:"outline"}),params:{id:t.VolumeId},to:"/ec2/modify-volume/$id",children:"Resize Volume"}):l.jsx(G,{disabled:!0,variant:"outline",children:"Resize Volume"}),e[16]=t.State,e[17]=t.VolumeId,e[18]=r):r=e[18];let m;e[19]!==t.State?(m=t.State&&l.jsx(be,{variant:t.State==="available"?"default":"outline",children:t.State}),e[19]=t.State,e[20]=m):m=e[20];let c;e[21]!==m||e[22]!==n||e[23]!==r?(c=l.jsxs("div",{className:"flex items-center gap-2",children:[n,r,m]}),e[21]=m,e[22]=n,e[23]=r,e[24]=c):c=e[24];let u;e[25]!==c||e[26]!==t.VolumeId?(u=l.jsx(re,{actions:c,subtitle:"EC2 Volume Details",title:t.VolumeId}),e[25]=c,e[26]=t.VolumeId,e[27]=u):u=e[27];let k;e[28]===Symbol.for("react.memo_cache_sentinel")?(k=l.jsx(T.Header,{children:"Volume Information"}),e[28]=k):k=e[28];let d;e[29]!==t.VolumeId?(d=l.jsx(s,{label:"Volume ID",value:t.VolumeId}),e[29]=t.VolumeId,e[30]=d):d=e[30];const $=`${t.Size} GiB`;let f;e[31]!==$?(f=l.jsx(s,{label:"Size",value:$}),e[31]=$,e[32]=f):f=e[32];let x;e[33]!==t.VolumeType?(x=l.jsx(s,{label:"Volume Type",value:t.VolumeType}),e[33]=t.VolumeType,e[34]=x):x=e[34];let h;e[35]!==t.State?(h=l.jsx(s,{label:"State",value:t.State}),e[35]=t.State,e[36]=h):h=e[36];let j;e[37]!==t.AvailabilityZone?(j=l.jsx(s,{label:"Availability Zone",value:t.AvailabilityZone}),e[37]=t.AvailabilityZone,e[38]=j):j=e[38];let b;e[39]!==L?(b=l.jsx(s,{label:"Create Time",value:L}),e[39]=L,e[40]=b):b=e[40];const M=t.Encrypted?"Yes":"No";let v;e[41]!==M?(v=l.jsx(s,{label:"Encrypted",value:M}),e[41]=M,e[42]=v):v=e[42];let p;e[43]!==t.KmsKeyId?(p=l.jsx(s,{label:"KMS Key ID",value:t.KmsKeyId}),e[43]=t.KmsKeyId,e[44]=p):p=e[44];let D;e[45]!==d||e[46]!==f||e[47]!==x||e[48]!==h||e[49]!==j||e[50]!==b||e[51]!==v||e[52]!==p?(D=l.jsxs(T,{children:[k,l.jsxs(T.Content,{children:[d,f,x,h,j,b,v,p]})]}),e[45]=d,e[46]=f,e[47]=x,e[48]=h,e[49]=j,e[50]=b,e[51]=v,e[52]=p,e[53]=D):D=e[53];let g;e[54]!==t.Attachments?(g=t.Attachments&&t.Attachments.length>0&&l.jsxs(T,{children:[l.jsx(T.Header,{children:"Attachments"}),t.Attachments.map(De)]}),e[54]=t.Attachments,e[55]=g):g=e[55];let y;e[56]!==u||e[57]!==D||e[58]!==g?(y=l.jsxs("div",{className:"space-y-6",children:[u,D,g]}),e[56]=u,e[57]=D,e[58]=g,e[59]=y):y=e[59];let P;e[60]===Symbol.for("react.memo_cache_sentinel")?(P=l.jsx(fe,{children:"Delete Volume"}),e[60]=P):P=e[60];let V;e[61]!==t.VolumeId?(V=l.jsxs(me,{children:[P,l.jsxs(ce,{children:['Are you sure you want to delete the volume "',t.VolumeId,'"? This action cannot be undone.']})]}),e[61]=t.VolumeId,e[62]=V):V=e[62];let z;e[63]===Symbol.for("react.memo_cache_sentinel")?(z=l.jsx(xe,{children:"Cancel"}),e[63]=z):z=e[63];const Q=a.isPending?"Deleting…":"Delete";let S;e[64]!==a.isPending||e[65]!==Z||e[66]!==Q?(S=l.jsxs(ue,{children:[z,l.jsx(de,{disabled:a.isPending,onClick:Z,children:Q})]}),e[64]=a.isPending,e[65]=Z,e[66]=Q,e[67]=S):S=e[67];let A;e[68]!==V||e[69]!==S?(A=l.jsxs(he,{children:[V,S]}),e[68]=V,e[69]=S,e[70]=A):A=e[70];let I;e[71]!==H||e[72]!==A?(I=l.jsx(je,{onOpenChange:Y,open:H,children:A}),e[71]=H,e[72]=A,e[73]=I):I=e[73];let R;return e[74]!==y||e[75]!==I||e[76]!==o?(R=l.jsxs(l.Fragment,{children:[E,o,y,I]}),e[74]=y,e[75]=I,e[76]=o,e[77]=R):R=e[77],R}function De(e){return l.jsxs(T.Content,{children:[l.jsx(s,{label:"Instance ID",value:e.InstanceId}),l.jsx(s,{label:"Device",value:e.Device}),l.jsx(s,{label:"Status",value:e.State}),l.jsx(s,{label:"Attach Time",value:J(e.AttachTime)}),l.jsx(s,{label:"Delete on Termination",value:e.DeleteOnTermination?"Yes":"No"})]},e.InstanceId)}export{Ee as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/_id3.js b/hive/services/hiveui/frontend/dist/assets/_id3.js index dfec94c33..db773ebbf 100644 --- a/hive/services/hiveui/frontend/dist/assets/_id3.js +++ b/hive/services/hiveui/frontend/dist/assets/_id3.js @@ -1 +1 @@ -import{c as O,bE as Q,u as L,r as M,bC as V,j as t,bF as $,B as q}from"./index.js";import{u as G}from"./useSuspenseQuery.js";import{B as R}from"./back-link.js";import{D as x,a as j}from"./detail-row.js";import{P as J}from"./page-heading.js";import{b as U,c as W,d as X,h as Y,a as Z,e as ee,f as te,g as se}from"./alert-dialog.js";import{f as ie}from"./ec2.js";import{T as ae}from"./trash-2.js";import"./useMutation.js";function he(){const e=O.c(54),{id:a}=Q.useParams(),S=L();let K;e[0]!==a?(K=$(a),e[0]=a,e[1]=K):K=e[1];const{data:z}=G(K),s=z.KeyPairs?.[0],i=ie(),[F,H]=M.useState(!1);let D;e[2]!==i||e[3]!==a||e[4]!==S?(D=async()=>{await i.mutateAsync(a),S({to:"/ec2/describe-key-pairs"})},e[2]=i,e[3]=a,e[4]=S,e[5]=D):D=e[5];const w=D;if(!s?.KeyPairId){let v;return e[6]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsxs(t.Fragment,{children:[t.jsx(R,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),t.jsx("p",{className:"text-muted-foreground",children:"Key pair not found."})]}),e[6]=v):v=e[6],v}let b;e[7]!==s.CreateTime?(b=V(s.CreateTime),e[7]=s.CreateTime,e[8]=b):b=e[8];const B=b;let P;e[9]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(R,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),e[9]=P):P=e[9];let T;e[10]===Symbol.for("react.memo_cache_sentinel")?(T=()=>H(!0),e[10]=T):T=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs(q,{onClick:T,size:"sm",variant:"destructive",children:[t.jsx(ae,{className:"size-4"}),"Delete"]}),e[11]=C):C=e[11];const I=s.KeyName??"";let l;e[12]!==I?(l=t.jsx(J,{actions:C,subtitle:"EC2 Key Pair Details",title:I}),e[12]=I,e[13]=l):l=e[13];let _;e[14]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(x.Header,{children:"Key Pair Information"}),e[14]=_):_=e[14];let r;e[15]!==s.KeyName?(r=t.jsx(j,{label:"Key Name",value:s.KeyName}),e[15]=s.KeyName,e[16]=r):r=e[16];let n;e[17]!==s.KeyPairId?(n=t.jsx(j,{label:"Key Pair ID",value:s.KeyPairId}),e[17]=s.KeyPairId,e[18]=n):n=e[18];let o;e[19]!==s.KeyType?(o=t.jsx(j,{label:"Key Type",value:s.KeyType}),e[19]=s.KeyType,e[20]=o):o=e[20];let c;e[21]!==s.KeyFingerprint?(c=t.jsx(j,{label:"Key Fingerprint",value:s.KeyFingerprint}),e[21]=s.KeyFingerprint,e[22]=c):c=e[22];let m;e[23]!==B?(m=t.jsx(j,{label:"Creation Date",value:B}),e[23]=B,e[24]=m):m=e[24];let y;e[25]!==n||e[26]!==o||e[27]!==c||e[28]!==m||e[29]!==r?(y=t.jsxs(x,{children:[_,t.jsxs(x.Content,{children:[r,n,o,c,m]})]}),e[25]=n,e[26]=o,e[27]=c,e[28]=m,e[29]=r,e[30]=y):y=e[30];let d;e[31]!==s.Tags?(d=s.Tags&&s.Tags.length>0&&t.jsxs(x,{children:[t.jsx(x.Header,{children:"Tags"}),t.jsx(x.Content,{children:s.Tags.map(le)})]}),e[31]=s.Tags,e[32]=d):d=e[32];let f;e[33]!==y||e[34]!==d||e[35]!==l?(f=t.jsxs("div",{className:"space-y-6",children:[l,y,d]}),e[33]=y,e[34]=d,e[35]=l,e[36]=f):f=e[36];let k;e[37]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Z,{children:"Delete Key Pair"}),e[37]=k):k=e[37];let p;e[38]!==s.KeyName?(p=t.jsxs(U,{children:[k,t.jsxs(W,{children:['Are you sure you want to delete the key pair "',s.KeyName,'"? This action cannot be undone. Any instances using this key pair will no longer be able to be accessed with it.']})]}),e[38]=s.KeyName,e[39]=p):p=e[39];let A;e[40]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ee,{children:"Cancel"}),e[40]=A):A=e[40];const E=i.isPending?"Deleting…":"Delete";let h;e[41]!==i.isPending||e[42]!==w||e[43]!==E?(h=t.jsxs(X,{children:[A,t.jsx(Y,{disabled:i.isPending,onClick:w,children:E})]}),e[41]=i.isPending,e[42]=w,e[43]=E,e[44]=h):h=e[44];let u;e[45]!==p||e[46]!==h?(u=t.jsxs(te,{children:[p,h]}),e[45]=p,e[46]=h,e[47]=u):u=e[47];let g;e[48]!==F||e[49]!==u?(g=t.jsx(se,{onOpenChange:H,open:F,children:u}),e[48]=F,e[49]=u,e[50]=g):g=e[50];let N;return e[51]!==f||e[52]!==g?(N=t.jsxs(t.Fragment,{children:[P,f,g]}),e[51]=f,e[52]=g,e[53]=N):N=e[53],N}function le(e){return t.jsx(j,{label:e.Key||"",value:e.Value},e.Key)}export{he as component}; +import{c as Q,bD as L,u as M,r as V,bB as $,j as t,bE as q,B as G}from"./index.js";import{u as J}from"./useSuspenseQuery.js";import{B as z}from"./back-link.js";import{D as j,a as K}from"./detail-row.js";import{E as U}from"./error-banner.js";import{P as W}from"./page-heading.js";import{b as X,c as Y,d as Z,h as ee,a as te,e as se,f as ae,g as ie}from"./alert-dialog.js";import{f as le}from"./ec2.js";import{T as re}from"./trash-2.js";function ge(){const e=Q.c(57),{id:i}=L.useParams(),B=M();let D;e[0]!==i?(D=q(i),e[0]=i,e[1]=D):D=e[1];const{data:O}=J(D),s=O.KeyPairs?.[0],a=le(),[F,R]=V.useState(!1);let b;e[2]!==a||e[3]!==i||e[4]!==B?(b=async()=>{await a.mutateAsync(i),B({to:"/ec2/describe-key-pairs"})},e[2]=a,e[3]=i,e[4]=B,e[5]=b):b=e[5];const w=b;if(!s?.KeyPairId){let S;return e[6]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsxs(t.Fragment,{children:[t.jsx(z,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),t.jsx("p",{className:"text-muted-foreground",children:"Key pair not found."})]}),e[6]=S):S=e[6],S}let P;e[7]!==s.CreateTime?(P=$(s.CreateTime),e[7]=s.CreateTime,e[8]=P):P=e[8];const E=P;let T;e[9]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(z,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),e[9]=T):T=e[9];let l;e[10]!==a.error?(l=a.error&&t.jsx(U,{error:a.error,msg:"Failed to delete key pair"}),e[10]=a.error,e[11]=l):l=e[11];let k;e[12]===Symbol.for("react.memo_cache_sentinel")?(k=()=>R(!0),e[12]=k):k=e[12];let _;e[13]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsxs(G,{onClick:k,size:"sm",variant:"destructive",children:[t.jsx(re,{className:"size-4"}),"Delete"]}),e[13]=_):_=e[13];const I=s.KeyName??"";let r;e[14]!==I?(r=t.jsx(W,{actions:_,subtitle:"EC2 Key Pair Details",title:I}),e[14]=I,e[15]=r):r=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(j.Header,{children:"Key Pair Information"}),e[16]=C):C=e[16];let n;e[17]!==s.KeyName?(n=t.jsx(K,{label:"Key Name",value:s.KeyName}),e[17]=s.KeyName,e[18]=n):n=e[18];let o;e[19]!==s.KeyPairId?(o=t.jsx(K,{label:"Key Pair ID",value:s.KeyPairId}),e[19]=s.KeyPairId,e[20]=o):o=e[20];let c;e[21]!==s.KeyType?(c=t.jsx(K,{label:"Key Type",value:s.KeyType}),e[21]=s.KeyType,e[22]=c):c=e[22];let m;e[23]!==s.KeyFingerprint?(m=t.jsx(K,{label:"Key Fingerprint",value:s.KeyFingerprint}),e[23]=s.KeyFingerprint,e[24]=m):m=e[24];let y;e[25]!==E?(y=t.jsx(K,{label:"Creation Date",value:E}),e[25]=E,e[26]=y):y=e[26];let d;e[27]!==n||e[28]!==o||e[29]!==c||e[30]!==m||e[31]!==y?(d=t.jsxs(j,{children:[C,t.jsxs(j.Content,{children:[n,o,c,m,y]})]}),e[27]=n,e[28]=o,e[29]=c,e[30]=m,e[31]=y,e[32]=d):d=e[32];let f;e[33]!==s.Tags?(f=s.Tags&&s.Tags.length>0&&t.jsxs(j,{children:[t.jsx(j.Header,{children:"Tags"}),t.jsx(j.Content,{children:s.Tags.map(ne)})]}),e[33]=s.Tags,e[34]=f):f=e[34];let p;e[35]!==d||e[36]!==f||e[37]!==r?(p=t.jsxs("div",{className:"space-y-6",children:[r,d,f]}),e[35]=d,e[36]=f,e[37]=r,e[38]=p):p=e[38];let A;e[39]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(te,{children:"Delete Key Pair"}),e[39]=A):A=e[39];let h;e[40]!==s.KeyName?(h=t.jsxs(X,{children:[A,t.jsxs(Y,{children:['Are you sure you want to delete the key pair "',s.KeyName,'"? This action cannot be undone. Any instances using this key pair will no longer be able to be accessed with it.']})]}),e[40]=s.KeyName,e[41]=h):h=e[41];let N;e[42]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(se,{children:"Cancel"}),e[42]=N):N=e[42];const H=a.isPending?"Deleting…":"Delete";let u;e[43]!==a.isPending||e[44]!==w||e[45]!==H?(u=t.jsxs(Z,{children:[N,t.jsx(ee,{disabled:a.isPending,onClick:w,children:H})]}),e[43]=a.isPending,e[44]=w,e[45]=H,e[46]=u):u=e[46];let g;e[47]!==h||e[48]!==u?(g=t.jsxs(ae,{children:[h,u]}),e[47]=h,e[48]=u,e[49]=g):g=e[49];let x;e[50]!==F||e[51]!==g?(x=t.jsx(ie,{onOpenChange:R,open:F,children:g}),e[50]=F,e[51]=g,e[52]=x):x=e[52];let v;return e[53]!==p||e[54]!==x||e[55]!==l?(v=t.jsxs(t.Fragment,{children:[T,l,p,x]}),e[53]=p,e[54]=x,e[55]=l,e[56]=v):v=e[56],v}function ne(e){return t.jsx(K,{label:e.Key||"",value:e.Value},e.Key)}export{ge as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/_id4.js b/hive/services/hiveui/frontend/dist/assets/_id4.js index 71112c53d..cd4b04eed 100644 --- a/hive/services/hiveui/frontend/dist/assets/_id4.js +++ b/hive/services/hiveui/frontend/dist/assets/_id4.js @@ -1 +1 @@ -import{h as z,c as Q,j as s,B as P,bQ as $,bC as E,bR as F,bS as H}from"./index.js";import{u as L}from"./useSuspenseQuery.js";import{B as O}from"./back-link.js";import{D,a as r}from"./detail-row.js";import{P as V}from"./page-heading.js";import{S as Z}from"./state-badge.js";import{A as q}from"./ami-details.js";import{g as G,h as Y,i as J,j as K}from"./ec2.js";import{T as U}from"./trash-2.js";import"./useMutation.js";const W=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],X=z("pause",W);const ee=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],te=z("play",ee);const se=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],ne=z("rotate-cw",se),ae=["pending","stopping","shutting-down","terminated"];function ie(e){const t=Q.c(21),{instanceId:l,state:a}=e,n=G(),p=Y(),d=J(),f=K();if(ae.includes(a||"")&&a!=="terminated"){let i;return t[0]!==a?(i=s.jsx("div",{className:"rounded-lg border bg-muted/50 p-4",children:s.jsxs("p",{className:"text-center text-muted-foreground text-sm",children:["Instance is ",a,". Actions will be available once the operation completes."]})}),t[0]=a,t[1]=i):i=t[1],i}if(a==="terminated"){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"rounded-lg border bg-muted/50 p-4",children:s.jsx("p",{className:"text-center text-muted-foreground text-sm",children:"This instance has been terminated and cannot be managed."})}),t[2]=i):i=t[2],i}let x;t[3]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("h2",{className:"mb-4 font-semibold",children:"Instance Actions"}),t[3]=x):x=t[3];let m;t[4]!==l||t[5]!==n||t[6]!==a?(m=a==="stopped"&&s.jsxs(P,{disabled:n.isPending,onClick:()=>n.mutate(l),size:"sm",variant:"default",children:[s.jsx(te,{className:"size-4"}),n.isPending?"Starting":"Start"]}),t[4]=l,t[5]=n,t[6]=a,t[7]=m):m=t[7];let c;t[8]!==l||t[9]!==d||t[10]!==a||t[11]!==p?(c=a==="running"&&s.jsxs(s.Fragment,{children:[s.jsxs(P,{disabled:p.isPending,onClick:()=>p.mutate(l),size:"sm",variant:"outline",children:[s.jsx(X,{className:"size-4"}),p.isPending?"Stopping":"Stop"]}),s.jsxs(P,{disabled:d.isPending,onClick:()=>d.mutate(l),size:"sm",variant:"outline",children:[s.jsx(ne,{className:"size-4"}),d.isPending?"Rebooting":"Reboot"]})]}),t[8]=l,t[9]=d,t[10]=a,t[11]=p,t[12]=c):c=t[12];let u;t[13]!==l||t[14]!==a||t[15]!==f?(u=(a==="stopped"||a==="running")&&s.jsxs(P,{disabled:f.isPending,onClick:()=>f.mutate(l),size:"sm",variant:"destructive",children:[s.jsx(U,{className:"size-4"}),f.isPending?"Terminating":"Terminate"]}),t[13]=l,t[14]=a,t[15]=f,t[16]=u):u=t[16];let o;return t[17]!==m||t[18]!==c||t[19]!==u?(o=s.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[x,s.jsxs("div",{className:"flex flex-wrap gap-2",children:[m,c,u]})]}),t[17]=m,t[18]=c,t[19]=u,t[20]=o):o=t[20],o}function ge(){const e=Q.c(48),{id:t}=$.useParams();let l;e[0]!==t?(l=F(t),e[0]=t,e[1]=l):l=e[1];const{data:a}=L(l),n=a.Reservations?.[0]?.Instances?.[0],p=n?.ImageId;let d;e[2]!==p?(d=H(p),e[2]=p,e[3]=d):d=e[3];const{data:f}=L(d),B=f?.Images?.[0];if(!n?.InstanceId){let C;return e[4]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsxs(s.Fragment,{children:[s.jsx(O,{to:"/ec2/describe-instances",children:"Back to instances"}),s.jsx("p",{className:"text-muted-foreground",children:"Instance not found."})]}),e[4]=C):C=e[4],C}let x;e[5]!==n.LaunchTime?(x=E(n.LaunchTime),e[5]=n.LaunchTime,e[6]=x):x=e[6];const m=x;let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(O,{to:"/ec2/describe-instances",children:"Back to instances"}),e[7]=c):c=e[7];const u=n.State?.Name;let o;e[8]!==u?(o=s.jsx(Z,{state:u}),e[8]=u,e[9]=o):o=e[9];let i;e[10]!==n.InstanceId||e[11]!==o?(i=s.jsx(V,{actions:o,subtitle:"EC2 Instance Details",title:n.InstanceId}),e[10]=n.InstanceId,e[11]=o,e[12]=i):i=e[12];const A=n.State?.Name;let g;e[13]!==n.InstanceId||e[14]!==A?(g=s.jsx(ie,{instanceId:n.InstanceId,state:A}),e[13]=n.InstanceId,e[14]=A,e[15]=g):g=e[15];let M;e[16]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(D.Header,{children:"Instance Information"}),e[16]=M):M=e[16];let h;e[17]!==n.InstanceId?(h=s.jsx(r,{label:"Instance ID",value:n.InstanceId}),e[17]=n.InstanceId,e[18]=h):h=e[18];let I;e[19]!==n.InstanceType?(I=s.jsx(r,{label:"Instance Type",value:n.InstanceType}),e[19]=n.InstanceType,e[20]=I):I=e[20];const R=n.State?.Name;let b;e[21]!==R?(b=s.jsx(r,{label:"Instance State",value:R}),e[21]=R,e[22]=b):b=e[22];let j;e[23]!==n.State?.Code?(j=n.State?.Code?.toString(),e[23]=n.State?.Code,e[24]=j):j=e[24];let v;e[25]!==j?(v=s.jsx(r,{label:"State Code",value:j}),e[25]=j,e[26]=v):v=e[26];let S;e[27]!==m?(S=s.jsx(r,{label:"Launch Time",value:m}),e[27]=m,e[28]=S):S=e[28];const w=n.Placement?.AvailabilityZone;let T;e[29]!==w?(T=s.jsx(r,{label:"Availability Zone",value:w}),e[29]=w,e[30]=T):T=e[30];let k;e[31]!==h||e[32]!==I||e[33]!==b||e[34]!==v||e[35]!==S||e[36]!==T?(k=s.jsxs(D,{children:[M,s.jsxs(D.Content,{children:[h,I,b,v,S,T]})]}),e[31]=h,e[32]=I,e[33]=b,e[34]=v,e[35]=S,e[36]=T,e[37]=k):k=e[37];let N;e[38]!==n.BlockDeviceMappings?(N=n.BlockDeviceMappings&&n.BlockDeviceMappings.length>0&&s.jsxs(D,{children:[s.jsx(D.Header,{children:"Block Device Mappings"}),s.jsxs(D.Content,{children:[s.jsx(r,{label:"Device Name",value:n.BlockDeviceMappings[0]?.DeviceName}),s.jsx(r,{label:"Volume ID",value:n.BlockDeviceMappings[0]?.Ebs?.VolumeId}),s.jsx(r,{label:"Status",value:n.BlockDeviceMappings[0]?.Ebs?.Status}),s.jsx(r,{label:"Attach Time",value:E(n.BlockDeviceMappings[0]?.Ebs?.AttachTime)}),s.jsx(r,{label:"Delete on Termination",value:n.BlockDeviceMappings[0]?.Ebs?.DeleteOnTermination?"Yes":"No"})]})]}),e[38]=n.BlockDeviceMappings,e[39]=N):N=e[39];let y;e[40]!==B?(y=B&&s.jsx(q,{image:B}),e[40]=B,e[41]=y):y=e[41];let _;return e[42]!==k||e[43]!==N||e[44]!==y||e[45]!==i||e[46]!==g?(_=s.jsxs(s.Fragment,{children:[c,s.jsxs("div",{className:"space-y-6",children:[i,g,k,N,y]})]}),e[42]=k,e[43]=N,e[44]=y,e[45]=i,e[46]=g,e[47]=_):_=e[47],_}export{ge as component}; +import{h as z,c as Q,j as s,B as A,bP as $,bB as F,bQ as H,bR as V}from"./index.js";import{u as L}from"./useSuspenseQuery.js";import{B as O}from"./back-link.js";import{D as M,a as g}from"./detail-row.js";import{P as Z}from"./page-heading.js";import{S as q}from"./state-badge.js";import{A as G}from"./ami-details.js";import{E as R}from"./error-banner.js";import{g as Y,h as J,i as K,j as U}from"./ec2.js";import{T as W}from"./trash-2.js";const X=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],ee=z("pause",X);const te=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],se=z("play",te);const ne=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],ae=z("rotate-cw",ne),ie=["pending","stopping","shutting-down","terminated"];function le(e){const t=Q.c(35),{instanceId:l,state:a}=e,n=Y(),o=J(),r=K(),u=U();if(ie.includes(a||"")&&a!=="terminated"){let i;return t[0]!==a?(i=s.jsx("div",{className:"rounded-lg border bg-muted/50 p-4",children:s.jsxs("p",{className:"text-center text-muted-foreground text-sm",children:["Instance is ",a,". Actions will be available once the operation completes."]})}),t[0]=a,t[1]=i):i=t[1],i}if(a==="terminated"){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"rounded-lg border bg-muted/50 p-4",children:s.jsx("p",{className:"text-center text-muted-foreground text-sm",children:"This instance has been terminated and cannot be managed."})}),t[2]=i):i=t[2],i}let j;t[3]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("h2",{className:"mb-4 font-semibold",children:"Instance Actions"}),t[3]=j):j=t[3];let h;t[4]!==n.error?(h=n.error&&s.jsx(R,{error:n.error,msg:"Failed to start instance"}),t[4]=n.error,t[5]=h):h=t[5];let p;t[6]!==o.error?(p=o.error&&s.jsx(R,{error:o.error,msg:"Failed to stop instance"}),t[6]=o.error,t[7]=p):p=t[7];let I;t[8]!==r.error?(I=r.error&&s.jsx(R,{error:r.error,msg:"Failed to reboot instance"}),t[8]=r.error,t[9]=I):I=t[9];let c;t[10]!==u.error?(c=u.error&&s.jsx(R,{error:u.error,msg:"Failed to terminate instance"}),t[10]=u.error,t[11]=c):c=t[11];let d;t[12]!==l||t[13]!==n||t[14]!==a?(d=a==="stopped"&&s.jsxs(A,{disabled:n.isPending,onClick:()=>n.mutate(l),size:"sm",variant:"default",children:[s.jsx(se,{className:"size-4"}),n.isPending?"Starting":"Start"]}),t[12]=l,t[13]=n,t[14]=a,t[15]=d):d=t[15];let b;t[16]!==l||t[17]!==r||t[18]!==a||t[19]!==o?(b=a==="running"&&s.jsxs(s.Fragment,{children:[s.jsxs(A,{disabled:o.isPending,onClick:()=>o.mutate(l),size:"sm",variant:"outline",children:[s.jsx(ee,{className:"size-4"}),o.isPending?"Stopping":"Stop"]}),s.jsxs(A,{disabled:r.isPending,onClick:()=>r.mutate(l),size:"sm",variant:"outline",children:[s.jsx(ae,{className:"size-4"}),r.isPending?"Rebooting":"Reboot"]})]}),t[16]=l,t[17]=r,t[18]=a,t[19]=o,t[20]=b):b=t[20];let m;t[21]!==l||t[22]!==a||t[23]!==u?(m=(a==="stopped"||a==="running")&&s.jsxs(A,{disabled:u.isPending,onClick:()=>u.mutate(l),size:"sm",variant:"destructive",children:[s.jsx(W,{className:"size-4"}),u.isPending?"Terminating":"Terminate"]}),t[21]=l,t[22]=a,t[23]=u,t[24]=m):m=t[24];let f;t[25]!==d||t[26]!==b||t[27]!==m?(f=s.jsxs("div",{className:"flex flex-wrap gap-2",children:[d,b,m]}),t[25]=d,t[26]=b,t[27]=m,t[28]=f):f=t[28];let x;return t[29]!==h||t[30]!==p||t[31]!==I||t[32]!==c||t[33]!==f?(x=s.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[j,h,p,I,c,f]}),t[29]=h,t[30]=p,t[31]=I,t[32]=c,t[33]=f,t[34]=x):x=t[34],x}function he(){const e=Q.c(48),{id:t}=$.useParams();let l;e[0]!==t?(l=H(t),e[0]=t,e[1]=l):l=e[1];const{data:a}=L(l),n=a.Reservations?.[0]?.Instances?.[0],o=n?.ImageId;let r;e[2]!==o?(r=V(o),e[2]=o,e[3]=r):r=e[3];const{data:u}=L(r),_=u?.Images?.[0];if(!n?.InstanceId){let C;return e[4]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsxs(s.Fragment,{children:[s.jsx(O,{to:"/ec2/describe-instances",children:"Back to instances"}),s.jsx("p",{className:"text-muted-foreground",children:"Instance not found."})]}),e[4]=C):C=e[4],C}let j;e[5]!==n.LaunchTime?(j=F(n.LaunchTime),e[5]=n.LaunchTime,e[6]=j):j=e[6];const h=j;let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(O,{to:"/ec2/describe-instances",children:"Back to instances"}),e[7]=p):p=e[7];const I=n.State?.Name;let c;e[8]!==I?(c=s.jsx(q,{state:I}),e[8]=I,e[9]=c):c=e[9];let d;e[10]!==n.InstanceId||e[11]!==c?(d=s.jsx(Z,{actions:c,subtitle:"EC2 Instance Details",title:n.InstanceId}),e[10]=n.InstanceId,e[11]=c,e[12]=d):d=e[12];const b=n.State?.Name;let m;e[13]!==n.InstanceId||e[14]!==b?(m=s.jsx(le,{instanceId:n.InstanceId,state:b}),e[13]=n.InstanceId,e[14]=b,e[15]=m):m=e[15];let f;e[16]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(M.Header,{children:"Instance Information"}),e[16]=f):f=e[16];let x;e[17]!==n.InstanceId?(x=s.jsx(g,{label:"Instance ID",value:n.InstanceId}),e[17]=n.InstanceId,e[18]=x):x=e[18];let i;e[19]!==n.InstanceType?(i=s.jsx(g,{label:"Instance Type",value:n.InstanceType}),e[19]=n.InstanceType,e[20]=i):i=e[20];const w=n.State?.Name;let v;e[21]!==w?(v=s.jsx(g,{label:"Instance State",value:w}),e[21]=w,e[22]=v):v=e[22];let S;e[23]!==n.State?.Code?(S=n.State?.Code?.toString(),e[23]=n.State?.Code,e[24]=S):S=e[24];let T;e[25]!==S?(T=s.jsx(g,{label:"State Code",value:S}),e[25]=S,e[26]=T):T=e[26];let k;e[27]!==h?(k=s.jsx(g,{label:"Launch Time",value:h}),e[27]=h,e[28]=k):k=e[28];const E=n.Placement?.AvailabilityZone;let N;e[29]!==E?(N=s.jsx(g,{label:"Availability Zone",value:E}),e[29]=E,e[30]=N):N=e[30];let y;e[31]!==x||e[32]!==i||e[33]!==v||e[34]!==T||e[35]!==k||e[36]!==N?(y=s.jsxs(M,{children:[f,s.jsxs(M.Content,{children:[x,i,v,T,k,N]})]}),e[31]=x,e[32]=i,e[33]=v,e[34]=T,e[35]=k,e[36]=N,e[37]=y):y=e[37];let D;e[38]!==n.BlockDeviceMappings?(D=n.BlockDeviceMappings&&n.BlockDeviceMappings.length>0&&s.jsxs(M,{children:[s.jsx(M.Header,{children:"Block Device Mappings"}),s.jsxs(M.Content,{children:[s.jsx(g,{label:"Device Name",value:n.BlockDeviceMappings[0]?.DeviceName}),s.jsx(g,{label:"Volume ID",value:n.BlockDeviceMappings[0]?.Ebs?.VolumeId}),s.jsx(g,{label:"Status",value:n.BlockDeviceMappings[0]?.Ebs?.Status}),s.jsx(g,{label:"Attach Time",value:F(n.BlockDeviceMappings[0]?.Ebs?.AttachTime)}),s.jsx(g,{label:"Delete on Termination",value:n.BlockDeviceMappings[0]?.Ebs?.DeleteOnTermination?"Yes":"No"})]})]}),e[38]=n.BlockDeviceMappings,e[39]=D):D=e[39];let B;e[40]!==_?(B=_&&s.jsx(G,{image:_}),e[40]=_,e[41]=B):B=e[41];let P;return e[42]!==y||e[43]!==D||e[44]!==B||e[45]!==d||e[46]!==m?(P=s.jsxs(s.Fragment,{children:[p,s.jsxs("div",{className:"space-y-6",children:[d,m,y,D,B]})]}),e[42]=y,e[43]=D,e[44]=B,e[45]=d,e[46]=m,e[47]=P):P=e[47],P}export{he as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/_id5.js b/hive/services/hiveui/frontend/dist/assets/_id5.js index 83faa70e0..def5a5afb 100644 --- a/hive/services/hiveui/frontend/dist/assets/_id5.js +++ b/hive/services/hiveui/frontend/dist/assets/_id5.js @@ -1 +1 @@ -import{c as g,cb as u,j as s,bS as p}from"./index.js";import{u as x}from"./useSuspenseQuery.js";import{B as d}from"./back-link.js";import{P as I}from"./page-heading.js";import{B as j}from"./badge.js";import{A as h}from"./ami-details.js";import"./detail-row.js";function E(){const e=g.c(14),{id:c}=u.useParams();let o;e[0]!==c?(o=p(c),e[0]=c,e[1]=o):o=e[1];const{data:f}=x(o),t=f?.Images?.[0];if(!t?.ImageId){let n;return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs(s.Fragment,{children:[s.jsx(d,{to:"/ec2/describe-images",children:"Back to images"}),s.jsx("p",{className:"text-muted-foreground",children:"Image not found."})]}),e[2]=n):n=e[2],n}let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(d,{to:"/ec2/describe-images",children:"Back to images"}),e[3]=r):r=e[3];let a;e[4]!==t.State?(a=t.State?s.jsx(j,{variant:t.State==="available"?"default":"outline",children:t.State}):void 0,e[4]=t.State,e[5]=a):a=e[5];let i;e[6]!==t.ImageId||e[7]!==a?(i=s.jsx(I,{actions:a,subtitle:"EC2 Image Details",title:t.ImageId}),e[6]=t.ImageId,e[7]=a,e[8]=i):i=e[8];let m;e[9]!==t?(m=s.jsx(h,{image:t,showExtendedDetails:!0}),e[9]=t,e[10]=m):m=e[10];let l;return e[11]!==i||e[12]!==m?(l=s.jsxs(s.Fragment,{children:[r,s.jsxs("div",{className:"space-y-6",children:[i,m]})]}),e[11]=i,e[12]=m,e[13]=l):l=e[13],l}export{E as component}; +import{c as g,ca as u,j as a,bR as p}from"./index.js";import{u as x}from"./useSuspenseQuery.js";import{B as d}from"./back-link.js";import{P as I}from"./page-heading.js";import{B as j}from"./badge.js";import{A as h}from"./ami-details.js";import"./detail-row.js";function E(){const e=g.c(14),{id:c}=u.useParams();let o;e[0]!==c?(o=p(c),e[0]=c,e[1]=o):o=e[1];const{data:f}=x(o),t=f?.Images?.[0];if(!t?.ImageId){let n;return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsxs(a.Fragment,{children:[a.jsx(d,{to:"/ec2/describe-images",children:"Back to images"}),a.jsx("p",{className:"text-muted-foreground",children:"Image not found."})]}),e[2]=n):n=e[2],n}let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(d,{to:"/ec2/describe-images",children:"Back to images"}),e[3]=r):r=e[3];let s;e[4]!==t.State?(s=t.State?a.jsx(j,{variant:t.State==="available"?"default":"outline",children:t.State}):void 0,e[4]=t.State,e[5]=s):s=e[5];let i;e[6]!==t.ImageId||e[7]!==s?(i=a.jsx(I,{actions:s,subtitle:"EC2 Image Details",title:t.ImageId}),e[6]=t.ImageId,e[7]=s,e[8]=i):i=e[8];let m;e[9]!==t?(m=a.jsx(h,{image:t,showExtendedDetails:!0}),e[9]=t,e[10]=m):m=e[10];let l;return e[11]!==i||e[12]!==m?(l=a.jsxs(a.Fragment,{children:[r,a.jsxs("div",{className:"space-y-6",children:[i,m]})]}),e[11]=i,e[12]=m,e[13]=l):l=e[13],l}export{E as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/alert-dialog.js b/hive/services/hiveui/frontend/dist/assets/alert-dialog.js index 91cf3a6b6..3664300f1 100644 --- a/hive/services/hiveui/frontend/dist/assets/alert-dialog.js +++ b/hive/services/hiveui/frontend/dist/assets/alert-dialog.js @@ -1 +1 @@ -import{bG as z,a0 as j,bH as C,bI as N,r as h,j as r,bJ as v,c as d,a as f,bK as A,B as x,bL as y,bM as P,bN as $,bO as w,bP as R}from"./index.js";function I(s){const{children:e,open:t,defaultOpen:a=!1,onOpenChange:l,onOpenChangeComplete:o,actionsRef:c,handle:n,triggerId:i,defaultTriggerId:u=null}=s,p=z(),m=!!p,g=j(()=>n?.store??new C({open:t??a,activeTriggerId:i!==void 0?i:u,modal:!0,disablePointerDismissal:!0,nested:m,role:"alertdialog"})).current;g.useControlledProp("open",t,a),g.useControlledProp("activeTriggerId",i,u),g.useSyncedValue("nested",m),g.useContextCallback("onOpenChange",l),g.useContextCallback("onOpenChangeComplete",o);const D=g.useState("payload");N({store:g,actionsRef:c,parentContext:p?.store.context});const b=h.useMemo(()=>({store:g}),[g]);return r.jsx(v.Provider,{value:b,children:typeof e=="function"?e({payload:D}):e})}function _(s){const e=d.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(I,{"data-slot":"alert-dialog",...t}),e[2]=t,e[3]=a):a=e[3],a}function k(s){const e=d.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(w,{"data-slot":"alert-dialog-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function O(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 isolate z-50 bg-black/80 duration-100 data-closed:animate-out data-open:animate-in supports-backdrop-filter:backdrop-blur-xs",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx(R,{className:l,"data-slot":"alert-dialog-overlay",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function B(s){const e=d.c(11);let t,a,l;e[0]!==s?({className:t,size:l,...a}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=l):(t=e[1],a=e[2],l=e[3]);const o=l===void 0?"default":l;let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(O,{}),e[4]=c):c=e[4];let n;e[5]!==t?(n=f("data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-3 rounded-xl bg-background p-4 outline-none ring-1 ring-foreground/10 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-64 data-closed:animate-out data-open:animate-in data-[size=default]:sm:max-w-sm",t),e[5]=t,e[6]=n):n=e[6];let i;return e[7]!==a||e[8]!==o||e[9]!==n?(i=r.jsxs(k,{children:[c,r.jsx($,{className:n,"data-size":o,"data-slot":"alert-dialog-content",...a})]}),e[7]=a,e[8]=o,e[9]=n,e[10]=i):i=e[10],i}function S(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("grid grid-rows-[auto_1fr] place-items-center gap-1 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx("div",{className:l,"data-slot":"alert-dialog-header",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function E(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx("div",{className:l,"data-slot":"alert-dialog-footer",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function M(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("mb-2 inline-flex size-8 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx("div",{className:l,"data-slot":"alert-dialog-media",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function H(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("font-medium text-sm sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx(y,{className:l,"data-slot":"alert-dialog-title",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function V(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("text-balance text-muted-foreground text-xs/relaxed md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx(A,{className:l,"data-slot":"alert-dialog-description",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function F(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f(t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx(x,{className:l,"data-slot":"alert-dialog-action",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function G(s){const e=d.c(14);let t,a,l,o;e[0]!==s?({className:t,variant:l,size:o,...a}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=l,e[4]=o):(t=e[1],a=e[2],l=e[3],o=e[4]);const c=l===void 0?"outline":l,n=o===void 0?"default":o;let i;e[5]!==t?(i=f(t),e[5]=t,e[6]=i):i=e[6];let u;e[7]!==n||e[8]!==c?(u=r.jsx(x,{size:n,variant:c}),e[7]=n,e[8]=c,e[9]=u):u=e[9];let p;return e[10]!==a||e[11]!==i||e[12]!==u?(p=r.jsx(P,{className:i,"data-slot":"alert-dialog-cancel",render:u,...a}),e[10]=a,e[11]=i,e[12]=u,e[13]=p):p=e[13],p}export{M as A,H as a,S as b,V as c,E as d,G as e,B as f,_ as g,F as h}; +import{bF as z,$ as j,bG as C,bH as N,r as h,j as r,bI as v,c as d,a as f,bJ as A,B as x,bK as $,bL as y,bM as w,bN as P,bO as R}from"./index.js";function I(s){const{children:e,open:t,defaultOpen:a=!1,onOpenChange:l,onOpenChangeComplete:o,actionsRef:c,handle:n,triggerId:i,defaultTriggerId:u=null}=s,p=z(),m=!!p,g=j(()=>n?.store??new C({open:t??a,activeTriggerId:i!==void 0?i:u,modal:!0,disablePointerDismissal:!0,nested:m,role:"alertdialog"})).current;g.useControlledProp("open",t,a),g.useControlledProp("activeTriggerId",i,u),g.useSyncedValue("nested",m),g.useContextCallback("onOpenChange",l),g.useContextCallback("onOpenChangeComplete",o);const D=g.useState("payload");N({store:g,actionsRef:c,parentContext:p?.store.context});const b=h.useMemo(()=>({store:g}),[g]);return r.jsx(v.Provider,{value:b,children:typeof e=="function"?e({payload:D}):e})}function _(s){const e=d.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(I,{"data-slot":"alert-dialog",...t}),e[2]=t,e[3]=a):a=e[3],a}function k(s){const e=d.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(P,{"data-slot":"alert-dialog-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function O(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 isolate z-50 bg-black/80 duration-100 data-closed:animate-out data-open:animate-in supports-backdrop-filter:backdrop-blur-xs",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx(R,{className:l,"data-slot":"alert-dialog-overlay",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function B(s){const e=d.c(11);let t,a,l;e[0]!==s?({className:t,size:l,...a}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=l):(t=e[1],a=e[2],l=e[3]);const o=l===void 0?"default":l;let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(O,{}),e[4]=c):c=e[4];let n;e[5]!==t?(n=f("data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-3 rounded-xl bg-background p-4 outline-none ring-1 ring-foreground/10 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-64 data-closed:animate-out data-open:animate-in data-[size=default]:sm:max-w-sm",t),e[5]=t,e[6]=n):n=e[6];let i;return e[7]!==a||e[8]!==o||e[9]!==n?(i=r.jsxs(k,{children:[c,r.jsx(w,{className:n,"data-size":o,"data-slot":"alert-dialog-content",...a})]}),e[7]=a,e[8]=o,e[9]=n,e[10]=i):i=e[10],i}function S(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("grid grid-rows-[auto_1fr] place-items-center gap-1 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx("div",{className:l,"data-slot":"alert-dialog-header",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function E(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx("div",{className:l,"data-slot":"alert-dialog-footer",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function M(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("mb-2 inline-flex size-8 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx("div",{className:l,"data-slot":"alert-dialog-media",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function F(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("font-medium text-sm sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx($,{className:l,"data-slot":"alert-dialog-title",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function H(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f("text-balance text-muted-foreground text-xs/relaxed md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx(A,{className:l,"data-slot":"alert-dialog-description",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function V(s){const e=d.c(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=f(t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=r.jsx(x,{className:l,"data-slot":"alert-dialog-action",...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function G(s){const e=d.c(14);let t,a,l,o;e[0]!==s?({className:t,variant:l,size:o,...a}=s,e[0]=s,e[1]=t,e[2]=a,e[3]=l,e[4]=o):(t=e[1],a=e[2],l=e[3],o=e[4]);const c=l===void 0?"outline":l,n=o===void 0?"default":o;let i;e[5]!==t?(i=f(t),e[5]=t,e[6]=i):i=e[6];let u;e[7]!==n||e[8]!==c?(u=r.jsx(x,{size:n,variant:c}),e[7]=n,e[8]=c,e[9]=u):u=e[9];let p;return e[10]!==a||e[11]!==i||e[12]!==u?(p=r.jsx(y,{className:i,"data-slot":"alert-dialog-cancel",render:u,...a}),e[10]=a,e[11]=i,e[12]=u,e[13]=p):p=e[13],p}export{M as A,F as a,S as b,H as c,E as d,G as e,B as f,_ as g,V as h}; diff --git a/hive/services/hiveui/frontend/dist/assets/ami-details.js b/hive/services/hiveui/frontend/dist/assets/ami-details.js index 6fbbd8044..e7f9267fd 100644 --- a/hive/services/hiveui/frontend/dist/assets/ami-details.js +++ b/hive/services/hiveui/frontend/dist/assets/ami-details.js @@ -1 +1 @@ -import{c as S,bC as M,j as t}from"./index.js";import{D as T,a}from"./detail-row.js";function B(i){const e=S.c(55),{image:l,showExtendedDetails:P}=i,s=P===void 0?!1:P;let y;e[0]!==l.CreationDate?(y=M(l.CreationDate),e[0]=l.CreationDate,e[1]=y):y=e[1];const V=y,R=s?"AMI Information":"AMI Details";let o;e[2]!==R?(o=t.jsx(T.Header,{children:R}),e[2]=R,e[3]=o):o=e[3];let r;e[4]!==l.ImageId?(r=t.jsx(a,{label:"AMI ID",value:l.ImageId}),e[4]=l.ImageId,e[5]=r):r=e[5];let c;e[6]!==l.Name?(c=t.jsx(a,{label:"AMI Name",value:l.Name}),e[6]=l.Name,e[7]=c):c=e[7];let n;e[8]!==l.Description?(n=t.jsx(a,{label:"Description",value:l.Description}),e[8]=l.Description,e[9]=n):n=e[9];let u;e[10]!==l.Architecture?(u=t.jsx(a,{label:"Architecture",value:l.Architecture}),e[10]=l.Architecture,e[11]=u):u=e[11];let D;e[12]!==l.VirtualizationType?(D=t.jsx(a,{label:"Virtualization Type",value:l.VirtualizationType}),e[12]=l.VirtualizationType,e[13]=D):D=e[13];const A=l.Platform||"Linux";let v;e[14]!==A?(v=t.jsx(a,{label:"Platform",value:A}),e[14]=A,e[15]=v):v=e[15];let m;e[16]!==l.PlatformDetails?(m=t.jsx(a,{label:"Platform Details",value:l.PlatformDetails}),e[16]=l.PlatformDetails,e[17]=m):m=e[17];let x;e[18]!==l.ImageType?(x=t.jsx(a,{label:"Image Type",value:l.ImageType}),e[18]=l.ImageType,e[19]=x):x=e[19];let b;e[20]!==l.RootDeviceType?(b=t.jsx(a,{label:"Root Device Type",value:l.RootDeviceType}),e[20]=l.RootDeviceType,e[21]=b):b=e[21];let f;e[22]!==l.RootDeviceName?(f=t.jsx(a,{label:"Root Device Name",value:l.RootDeviceName}),e[22]=l.RootDeviceName,e[23]=f):f=e[23];let j;e[24]!==l.OwnerId?(j=t.jsx(a,{label:"Owner",value:l.OwnerId}),e[24]=l.OwnerId,e[25]=j):j=e[25];let d;e[26]!==l.State?(d=t.jsx(a,{label:"State",value:l.State}),e[26]=l.State,e[27]=d):d=e[27];let I;e[28]!==V||e[29]!==l.Public||e[30]!==s?(I=s&&t.jsxs(t.Fragment,{children:[t.jsx(a,{label:"Creation Date",value:V}),t.jsx(a,{label:"Public",value:l.Public?"Yes":"No"})]}),e[28]=V,e[29]=l.Public,e[30]=s,e[31]=I):I=e[31];let h;e[32]!==v||e[33]!==m||e[34]!==x||e[35]!==b||e[36]!==f||e[37]!==j||e[38]!==d||e[39]!==I||e[40]!==r||e[41]!==c||e[42]!==n||e[43]!==u||e[44]!==D?(h=t.jsxs(T.Content,{children:[r,c,n,u,D,v,m,x,b,f,j,d,I]}),e[32]=v,e[33]=m,e[34]=x,e[35]=b,e[36]=f,e[37]=j,e[38]=d,e[39]=I,e[40]=r,e[41]=c,e[42]=n,e[43]=u,e[44]=D,e[45]=h):h=e[45];let N;e[46]!==h||e[47]!==o?(N=t.jsxs(T,{children:[o,h]}),e[46]=h,e[47]=o,e[48]=N):N=e[48];let p;e[49]!==l.BlockDeviceMappings||e[50]!==s?(p=s&&l.BlockDeviceMappings&&l.BlockDeviceMappings.length>0&&l.BlockDeviceMappings.map(C),e[49]=l.BlockDeviceMappings,e[50]=s,e[51]=p):p=e[51];let E;return e[52]!==N||e[53]!==p?(E=t.jsxs(t.Fragment,{children:[N,p]}),e[52]=N,e[53]=p,e[54]=E):E=e[54],E}function C(i){return t.jsxs(T,{children:[t.jsxs(T.Header,{children:["Block Device: ",i.DeviceName]}),t.jsxs(T.Content,{children:[t.jsx(a,{label:"Device Name",value:i.DeviceName}),i.Ebs&&t.jsxs(t.Fragment,{children:[t.jsx(a,{label:"Volume Size",value:i.Ebs.VolumeSize?`${i.Ebs.VolumeSize} GB`:void 0}),t.jsx(a,{label:"Volume Type",value:i.Ebs.VolumeType}),t.jsx(a,{label:"Delete On Termination",value:i.Ebs.DeleteOnTermination?"Yes":"No"}),t.jsx(a,{label:"Encrypted",value:i.Ebs.Encrypted?"Yes":"No"}),i.Ebs.SnapshotId&&t.jsx(a,{label:"Snapshot ID",value:i.Ebs.SnapshotId})]}),i.VirtualName&&t.jsx(a,{label:"Virtual Name",value:i.VirtualName})]})]},i.DeviceName)}export{B as A}; +import{c as S,bB as M,j as t}from"./index.js";import{D as T,a}from"./detail-row.js";function C(i){const e=S.c(55),{image:l,showExtendedDetails:P}=i,s=P===void 0?!1:P;let y;e[0]!==l.CreationDate?(y=M(l.CreationDate),e[0]=l.CreationDate,e[1]=y):y=e[1];const V=y,R=s?"AMI Information":"AMI Details";let o;e[2]!==R?(o=t.jsx(T.Header,{children:R}),e[2]=R,e[3]=o):o=e[3];let r;e[4]!==l.ImageId?(r=t.jsx(a,{label:"AMI ID",value:l.ImageId}),e[4]=l.ImageId,e[5]=r):r=e[5];let c;e[6]!==l.Name?(c=t.jsx(a,{label:"AMI Name",value:l.Name}),e[6]=l.Name,e[7]=c):c=e[7];let n;e[8]!==l.Description?(n=t.jsx(a,{label:"Description",value:l.Description}),e[8]=l.Description,e[9]=n):n=e[9];let u;e[10]!==l.Architecture?(u=t.jsx(a,{label:"Architecture",value:l.Architecture}),e[10]=l.Architecture,e[11]=u):u=e[11];let D;e[12]!==l.VirtualizationType?(D=t.jsx(a,{label:"Virtualization Type",value:l.VirtualizationType}),e[12]=l.VirtualizationType,e[13]=D):D=e[13];const A=l.Platform||"Linux";let v;e[14]!==A?(v=t.jsx(a,{label:"Platform",value:A}),e[14]=A,e[15]=v):v=e[15];let m;e[16]!==l.PlatformDetails?(m=t.jsx(a,{label:"Platform Details",value:l.PlatformDetails}),e[16]=l.PlatformDetails,e[17]=m):m=e[17];let x;e[18]!==l.ImageType?(x=t.jsx(a,{label:"Image Type",value:l.ImageType}),e[18]=l.ImageType,e[19]=x):x=e[19];let b;e[20]!==l.RootDeviceType?(b=t.jsx(a,{label:"Root Device Type",value:l.RootDeviceType}),e[20]=l.RootDeviceType,e[21]=b):b=e[21];let f;e[22]!==l.RootDeviceName?(f=t.jsx(a,{label:"Root Device Name",value:l.RootDeviceName}),e[22]=l.RootDeviceName,e[23]=f):f=e[23];let j;e[24]!==l.OwnerId?(j=t.jsx(a,{label:"Owner",value:l.OwnerId}),e[24]=l.OwnerId,e[25]=j):j=e[25];let d;e[26]!==l.State?(d=t.jsx(a,{label:"State",value:l.State}),e[26]=l.State,e[27]=d):d=e[27];let I;e[28]!==V||e[29]!==l.Public||e[30]!==s?(I=s&&t.jsxs(t.Fragment,{children:[t.jsx(a,{label:"Creation Date",value:V}),t.jsx(a,{label:"Public",value:l.Public?"Yes":"No"})]}),e[28]=V,e[29]=l.Public,e[30]=s,e[31]=I):I=e[31];let h;e[32]!==v||e[33]!==m||e[34]!==x||e[35]!==b||e[36]!==f||e[37]!==j||e[38]!==d||e[39]!==I||e[40]!==r||e[41]!==c||e[42]!==n||e[43]!==u||e[44]!==D?(h=t.jsxs(T.Content,{children:[r,c,n,u,D,v,m,x,b,f,j,d,I]}),e[32]=v,e[33]=m,e[34]=x,e[35]=b,e[36]=f,e[37]=j,e[38]=d,e[39]=I,e[40]=r,e[41]=c,e[42]=n,e[43]=u,e[44]=D,e[45]=h):h=e[45];let N;e[46]!==h||e[47]!==o?(N=t.jsxs(T,{children:[o,h]}),e[46]=h,e[47]=o,e[48]=N):N=e[48];let p;e[49]!==l.BlockDeviceMappings||e[50]!==s?(p=s&&l.BlockDeviceMappings&&l.BlockDeviceMappings.length>0&&l.BlockDeviceMappings.map(B),e[49]=l.BlockDeviceMappings,e[50]=s,e[51]=p):p=e[51];let E;return e[52]!==N||e[53]!==p?(E=t.jsxs(t.Fragment,{children:[N,p]}),e[52]=N,e[53]=p,e[54]=E):E=e[54],E}function B(i){return t.jsxs(T,{children:[t.jsxs(T.Header,{children:["Block Device: ",i.DeviceName]}),t.jsxs(T.Content,{children:[t.jsx(a,{label:"Device Name",value:i.DeviceName}),i.Ebs&&t.jsxs(t.Fragment,{children:[t.jsx(a,{label:"Volume Size",value:i.Ebs.VolumeSize?`${i.Ebs.VolumeSize} GB`:void 0}),t.jsx(a,{label:"Volume Type",value:i.Ebs.VolumeType}),t.jsx(a,{label:"Delete On Termination",value:i.Ebs.DeleteOnTermination?"Yes":"No"}),t.jsx(a,{label:"Encrypted",value:i.Ebs.Encrypted?"Yes":"No"}),i.Ebs.SnapshotId&&t.jsx(a,{label:"Snapshot ID",value:i.Ebs.SnapshotId})]}),i.VirtualName&&t.jsx(a,{label:"Virtual Name",value:i.VirtualName})]})]},i.DeviceName)}export{C as A}; diff --git a/hive/services/hiveui/frontend/dist/assets/badge.js b/hive/services/hiveui/frontend/dist/assets/badge.js index 27ef408de..b252d76ea 100644 --- a/hive/services/hiveui/frontend/dist/assets/badge.js +++ b/hive/services/hiveui/frontend/dist/assets/badge.js @@ -1 +1 @@ -import{c as g,a8 as f,a as b,bA as p,cc as m}from"./index.js";const h=p("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-full border border-transparent px-2 py-0.5 font-medium text-[0.625rem] transition-all transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function y(d){const e=g.c(13);let t,i,a,s,r;if(e[0]!==d){const{className:l,variant:u,render:c,...v}=d;t=c,r=u===void 0?"default":u,s=m,i="span",a=f({className:b(h({className:l,variant:r}))},v),e[0]=d,e[1]=t,e[2]=i,e[3]=a,e[4]=s,e[5]=r}else t=e[1],i=e[2],a=e[3],s=e[4],r=e[5];let n;e[6]!==r?(n={slot:"badge",variant:r},e[6]=r,e[7]=n):n=e[7];let o;return e[8]!==t||e[9]!==i||e[10]!==a||e[11]!==n?(o={defaultTagName:i,props:a,render:t,state:n},e[8]=t,e[9]=i,e[10]=a,e[11]=n,e[12]=o):o=e[12],s(o)}export{y as B}; +import{c as g,a7 as b,a as f,bz as p,cb as m}from"./index.js";const h=p("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-full border border-transparent px-2 py-0.5 font-medium text-[0.625rem] transition-all transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function y(d){const e=g.c(13);let t,i,a,s,r;if(e[0]!==d){const{className:l,variant:u,render:v,...c}=d;t=v,r=u===void 0?"default":u,s=m,i="span",a=b({className:f(h({className:l,variant:r}))},c),e[0]=d,e[1]=t,e[2]=i,e[3]=a,e[4]=s,e[5]=r}else t=e[1],i=e[2],a=e[3],s=e[4],r=e[5];let n;e[6]!==r?(n={slot:"badge",variant:r},e[6]=r,e[7]=n):n=e[7];let o;return e[8]!==t||e[9]!==i||e[10]!==a||e[11]!==n?(o={defaultTagName:i,props:a,render:t,state:n},e[8]=t,e[9]=i,e[10]=a,e[11]=n,e[12]=o):o=e[12],s(o)}export{y as B}; diff --git a/hive/services/hiveui/frontend/dist/assets/create-bucket.js b/hive/services/hiveui/frontend/dist/assets/create-bucket.js index 52986c46a..040874b5b 100644 --- a/hive/services/hiveui/frontend/dist/assets/create-bucket.js +++ b/hive/services/hiveui/frontend/dist/assets/create-bucket.js @@ -1 +1 @@ -import{o as M,f as $,c as I,u as R,j as t,B as E}from"./index.js";import{a as A,u as H,I as L,F as O,b as T,c as V}from"./field.js";import{B as q}from"./back-link.js";import{E as D}from"./error-banner.js";import{P as G}from"./page-heading.js";import{u as J}from"./s3.js";import"./useMutation.js";const K=M({bucketName:$().min(3,"Bucket name must be at least 3 characters").max(63,"Bucket name must be at most 63 characters").regex(/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/,"Must start and end with a lowercase letter or number").regex(/^[a-z0-9.-]+$/,"Only lowercase letters, numbers, hyphens, and periods allowed").refine(e=>!e.includes(".."),"Must not contain consecutive periods").refine(e=>!(e.includes(".-")||e.includes("-.")),"Must not contain adjacent period and hyphen")});function te(){const e=I.c(40),a=R(),s=J();let k;e[0]===Symbol.for("react.memo_cache_sentinel")?(k={resolver:A(K),defaultValues:{bucketName:""}},e[0]=k):k=e[0];const{handleSubmit:y,register:N,formState:P}=H(k),{errors:p,isSubmitting:S}=P;let x;e[1]!==s||e[2]!==a?(x=async z=>{await s.mutateAsync(z),a({to:"/s3/ls"})},e[1]=s,e[2]=a,e[3]=x):x=e[3];const F=x;let h,j;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(q,{to:"/s3/ls",children:"Back to buckets"}),j=t.jsx(G,{title:"Create Bucket"}),e[4]=h,e[5]=j):(h=e[4],j=e[5]);let r;e[6]!==s.error?(r=s.error&&t.jsx(D,{error:s.error,msg:"Failed to create bucket"}),e[6]=s.error,e[7]=r):r=e[7];let i;e[8]!==y||e[9]!==F?(i=y(F),e[8]=y,e[9]=F,e[10]=i):i=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(T,{children:t.jsx("label",{htmlFor:"bucketName",children:"Bucket Name"})}),e[11]=g):g=e[11];const v=!!p.bucketName;let l;e[12]!==N?(l=N("bucketName"),e[12]=N,e[13]=l):l=e[13];let n;e[14]!==v||e[15]!==l?(n=t.jsx(L,{"aria-invalid":v,id:"bucketName",placeholder:"my-bucket",type:"text",...l}),e[14]=v,e[15]=l,e[16]=n):n=e[16];let c;e[17]!==p.bucketName?(c=t.jsx(O,{errors:[p.bucketName]}),e[17]=p.bucketName,e[18]=c):c=e[18];let o;e[19]!==n||e[20]!==c?(o=t.jsxs(V,{children:[g,n,c]}),e[19]=n,e[20]=c,e[21]=o):o=e[21];const C=S||s.isPending;let m;e[22]!==a?(m=()=>a({to:"/s3/ls"}),e[22]=a,e[23]=m):m=e[23];let u;e[24]!==C||e[25]!==m?(u=t.jsx(E,{disabled:C,onClick:m,type:"button",variant:"outline",children:"Cancel"}),e[24]=C,e[25]=m,e[26]=u):u=e[26];const w=S||s.isPending,_=S||s.isPending?"Creating…":"Create Bucket";let d;e[27]!==w||e[28]!==_?(d=t.jsx(E,{disabled:w,type:"submit",children:_}),e[27]=w,e[28]=_,e[29]=d):d=e[29];let f;e[30]!==u||e[31]!==d?(f=t.jsxs("div",{className:"flex gap-2",children:[u,d]}),e[30]=u,e[31]=d,e[32]=f):f=e[32];let b;e[33]!==o||e[34]!==f||e[35]!==i?(b=t.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:i,children:[o,f]}),e[33]=o,e[34]=f,e[35]=i,e[36]=b):b=e[36];let B;return e[37]!==b||e[38]!==r?(B=t.jsxs(t.Fragment,{children:[h,j,r,b]}),e[37]=b,e[38]=r,e[39]=B):B=e[39],B}export{te as component}; +import{c as R,u as A,j as t,f as H,B as P}from"./index.js";import{a as L,u as M,I as T,F as $,b as q,c as z}from"./field.js";import{B as D}from"./back-link.js";import{E as G}from"./error-banner.js";import{P as J}from"./page-heading.js";import{u as K}from"./s3.js";function Y(){const e=R.c(40),r=A(),s=K();let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x={resolver:L(H)},e[0]=x):x=e[0];const{handleSubmit:N,register:y,formState:w}=M(x),{errors:k,isSubmitting:S}=w;let p;e[1]!==s||e[2]!==r?(p=async I=>{await s.mutateAsync(I),r({to:"/s3/ls"})},e[1]=s,e[2]=r,e[3]=p):p=e[3];const F=p;let h,j;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(D,{to:"/s3/ls",children:"Back to buckets"}),j=t.jsx(J,{title:"Create Bucket"}),e[4]=h,e[5]=j):(h=e[4],j=e[5]);let i;e[6]!==s.error?(i=s.error&&t.jsx(G,{error:s.error,msg:"Failed to create bucket"}),e[6]=s.error,e[7]=i):i=e[7];let l;e[8]!==N||e[9]!==F?(l=N(F),e[8]=N,e[9]=F,e[10]=l):l=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(q,{children:t.jsx("label",{htmlFor:"bucketName",children:"Bucket Name"})}),e[11]=g):g=e[11];const C=!!k.bucketName;let a;e[12]!==y?(a=y("bucketName"),e[12]=y,e[13]=a):a=e[13];let o;e[14]!==C||e[15]!==a?(o=t.jsx(T,{"aria-invalid":C,id:"bucketName",placeholder:"my-bucket",type:"text",...a}),e[14]=C,e[15]=a,e[16]=o):o=e[16];let c;e[17]!==k.bucketName?(c=t.jsx($,{errors:[k.bucketName]}),e[17]=k.bucketName,e[18]=c):c=e[18];let n;e[19]!==o||e[20]!==c?(n=t.jsxs(z,{children:[g,o,c]}),e[19]=o,e[20]=c,e[21]=n):n=e[21];const v=S||s.isPending;let m;e[22]!==r?(m=()=>r({to:"/s3/ls"}),e[22]=r,e[23]=m):m=e[23];let u;e[24]!==v||e[25]!==m?(u=t.jsx(P,{disabled:v,onClick:m,type:"button",variant:"outline",children:"Cancel"}),e[24]=v,e[25]=m,e[26]=u):u=e[26];const _=S||s.isPending,E=S||s.isPending?"Creating…":"Create Bucket";let f;e[27]!==_||e[28]!==E?(f=t.jsx(P,{disabled:_,type:"submit",children:E}),e[27]=_,e[28]=E,e[29]=f):f=e[29];let d;e[30]!==u||e[31]!==f?(d=t.jsxs("div",{className:"flex gap-2",children:[u,f]}),e[30]=u,e[31]=f,e[32]=d):d=e[32];let b;e[33]!==n||e[34]!==d||e[35]!==l?(b=t.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:l,children:[n,d]}),e[33]=n,e[34]=d,e[35]=l,e[36]=b):b=e[36];let B;return e[37]!==b||e[38]!==i?(B=t.jsxs(t.Fragment,{children:[h,j,i,b]}),e[37]=b,e[38]=i,e[39]=B):B=e[39],B}export{Y as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/create-key-pair.js b/hive/services/hiveui/frontend/dist/assets/create-key-pair.js index 16b87357a..fc4bb0262 100644 --- a/hive/services/hiveui/frontend/dist/assets/create-key-pair.js +++ b/hive/services/hiveui/frontend/dist/assets/create-key-pair.js @@ -1 +1 @@ -import{h as U,c as R,u as L,r as O,j as a,B as E,k as I}from"./index.js";import{a as z,u as Y,I as $,F as H,b as q,c as G}from"./field.js";import{B as J}from"./back-link.js";import{E as Q}from"./error-banner.js";import{P as V}from"./page-heading.js";import{b as W}from"./ec2.js";import{A as X,a as Z,b as ee,c as te,d as ae,e as se,f as le,g as ie}from"./alert-dialog.js";import{T as re}from"./textarea.js";import{C as oe}from"./check.js";import{D as ne}from"./download.js";import"./useMutation.js";const ce=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],me=U("triangle-alert",ce),de=2e3;function fe(e){const t=R.c(36),{open:s,keyName:l,keyMaterial:d}=e,b=L(),[P,S]=O.useState(!1);let _;t[0]!==d?(_=async()=>{await navigator.clipboard.writeText(d),S(!0),setTimeout(()=>S(!1),de)},t[0]=d,t[1]=_):_=t[1];const g=_;let N;t[2]!==d||t[3]!==l?(N=()=>{const K=new Blob([d],{type:"text/plain"}),k=URL.createObjectURL(K),u=document.createElement("a");u.href=k,u.download=`${l}.pem`,u.click(),URL.revokeObjectURL(k)},t[2]=d,t[3]=l,t[4]=N):N=t[4];const C=N;let v;t[5]!==b?(v=()=>{b({to:"/ec2/describe-key-pairs"})},t[5]=b,t[6]=v):v=t[6];const w=v;let j,f;t[7]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx(X,{children:a.jsx(me,{className:"text-destructive"})}),f=a.jsx(Z,{children:"Save Your Private Key"}),t[7]=j,t[8]=f):(j=t[7],f=t[8]);let i;t[9]!==l?(i=a.jsxs(ee,{children:[j,f,a.jsxs(te,{children:["This is your only chance to save the private key file for"," ",a.jsx("strong",{children:l}),". Please download or copy it now. You won't be able to retrieve it again."]})]}),t[9]=l,t[10]=i):i=t[10];let y;t[11]!==d?(y=a.jsx(re,{className:"font-mono text-xs",readOnly:!0,rows:12,value:d}),t[11]=d,t[12]=y):y=t[12];let x;t[13]!==P?(x=P?a.jsxs(a.Fragment,{children:[a.jsx(oe,{className:"mr-2 size-4"}),"Copied!"]}):"Copy to Clipboard",t[13]=P,t[14]=x):x=t[14];let r;t[15]!==g||t[16]!==x?(r=a.jsx(E,{className:"flex-1",onClick:g,type:"button",variant:"outline",children:x}),t[15]=g,t[16]=x,t[17]=r):r=t[17];let p;t[18]===Symbol.for("react.memo_cache_sentinel")?(p=a.jsx(ne,{className:"mr-2 size-4"}),t[18]=p):p=t[18];let o;t[19]!==C?(o=a.jsxs(E,{className:"flex-1",onClick:C,type:"button",variant:"outline",children:[p,"Download .pem File"]}),t[19]=C,t[20]=o):o=t[20];let n;t[21]!==o||t[22]!==r?(n=a.jsxs("div",{className:"flex gap-2",children:[r,o]}),t[21]=o,t[22]=r,t[23]=n):n=t[23];let h;t[24]!==n||t[25]!==y?(h=a.jsxs("div",{className:"space-y-3",children:[y,n]}),t[24]=n,t[25]=y,t[26]=h):h=t[26];let c;t[27]!==w?(c=a.jsx(ae,{children:a.jsx(se,{onClick:w,children:"Close and Continue"})}),t[27]=w,t[28]=c):c=t[28];let m;t[29]!==h||t[30]!==c||t[31]!==i?(m=a.jsxs(le,{className:"max-w-2xl",children:[i,h,c]}),t[29]=h,t[30]=c,t[31]=i,t[32]=m):m=t[32];let D;return t[33]!==s||t[34]!==m?(D=a.jsx(ie,{open:s,children:m}),t[33]=s,t[34]=m,t[35]=D):D=t[35],D}function ve(){const e=R.c(42),t=L(),s=W(),[l,d]=O.useState(null);let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={resolver:z(I)},e[0]=b):b=e[0];const{handleSubmit:P,register:S,formState:_}=Y(b),{errors:g,isSubmitting:N}=_;let C;e[1]!==s?(C=async T=>{const B=await s.mutateAsync(T);B.KeyMaterial&&d({keyName:T.keyName,material:B.KeyMaterial})},e[1]=s,e[2]=C):C=e[2];const v=C;let w,j;e[3]===Symbol.for("react.memo_cache_sentinel")?(w=a.jsx(J,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),j=a.jsx(V,{title:"Create Key Pair"}),e[3]=w,e[4]=j):(w=e[3],j=e[4]);let f;e[5]!==s.error?(f=s.error&&a.jsx(Q,{error:s.error,msg:"Failed to create key pair"}),e[5]=s.error,e[6]=f):f=e[6];let i;e[7]!==P||e[8]!==v?(i=P(v),e[7]=P,e[8]=v,e[9]=i):i=e[9];let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(q,{children:a.jsx("label",{htmlFor:"keyName",children:"Key Pair Name"})}),e[10]=y):y=e[10];const x=!!g.keyName;let r;e[11]!==S?(r=S("keyName"),e[11]=S,e[12]=r):r=e[12];let p;e[13]!==x||e[14]!==r?(p=a.jsx($,{"aria-invalid":x,id:"keyName",placeholder:"my-key-pair…",...r}),e[13]=x,e[14]=r,e[15]=p):p=e[15];let o;e[16]!==g.keyName?(o=a.jsx(H,{errors:[g.keyName]}),e[16]=g.keyName,e[17]=o):o=e[17];let n;e[18]!==p||e[19]!==o?(n=a.jsxs(G,{children:[y,p,o]}),e[18]=p,e[19]=o,e[20]=n):n=e[20];const h=N||s.isPending;let c;e[21]!==t?(c=()=>t({to:"/ec2/describe-key-pairs"}),e[21]=t,e[22]=c):c=e[22];let m;e[23]!==h||e[24]!==c?(m=a.jsx(E,{disabled:h,onClick:c,type:"button",variant:"outline",children:"Cancel"}),e[23]=h,e[24]=c,e[25]=m):m=e[25];const D=N||s.isPending,K=N||s.isPending?"Creating…":"Create Key Pair";let k;e[26]!==D||e[27]!==K?(k=a.jsx(E,{disabled:D,type:"submit",children:K}),e[26]=D,e[27]=K,e[28]=k):k=e[28];let u;e[29]!==m||e[30]!==k?(u=a.jsxs("div",{className:"flex gap-2",children:[m,k]}),e[29]=m,e[30]=k,e[31]=u):u=e[31];let A;e[32]!==n||e[33]!==u||e[34]!==i?(A=a.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:i,children:[n,u]}),e[32]=n,e[33]=u,e[34]=i,e[35]=A):A=e[35];let F;e[36]!==l?(F=l&&a.jsx(fe,{keyMaterial:l.material,keyName:l.keyName,open:!!l}),e[36]=l,e[37]=F):F=e[37];let M;return e[38]!==A||e[39]!==F||e[40]!==f?(M=a.jsxs(a.Fragment,{children:[w,j,f,A,F]}),e[38]=A,e[39]=F,e[40]=f,e[41]=M):M=e[41],M}export{ve as component}; +import{h as U,c as R,u as L,r as O,j as a,B as E,k as I}from"./index.js";import{a as z,u as Y,I as $,F as H,b as q,c as G}from"./field.js";import{B as J}from"./back-link.js";import{E as Q}from"./error-banner.js";import{P as V}from"./page-heading.js";import{b as W}from"./ec2.js";import{A as X,a as Z,b as ee,c as te,d as ae,e as se,f as le,g as ie}from"./alert-dialog.js";import{T as re}from"./textarea.js";import{C as oe}from"./check.js";import{D as ne}from"./download.js";const ce=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],me=U("triangle-alert",ce),de=2e3;function fe(e){const t=R.c(36),{open:s,keyName:l,keyMaterial:d}=e,b=L(),[P,S]=O.useState(!1);let _;t[0]!==d?(_=async()=>{await navigator.clipboard.writeText(d),S(!0),setTimeout(()=>S(!1),de)},t[0]=d,t[1]=_):_=t[1];const g=_;let N;t[2]!==d||t[3]!==l?(N=()=>{const K=new Blob([d],{type:"text/plain"}),k=URL.createObjectURL(K),u=document.createElement("a");u.href=k,u.download=`${l}.pem`,u.click(),URL.revokeObjectURL(k)},t[2]=d,t[3]=l,t[4]=N):N=t[4];const C=N;let v;t[5]!==b?(v=()=>{b({to:"/ec2/describe-key-pairs"})},t[5]=b,t[6]=v):v=t[6];const w=v;let j,f;t[7]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx(X,{children:a.jsx(me,{className:"text-destructive"})}),f=a.jsx(Z,{children:"Save Your Private Key"}),t[7]=j,t[8]=f):(j=t[7],f=t[8]);let i;t[9]!==l?(i=a.jsxs(ee,{children:[j,f,a.jsxs(te,{children:["This is your only chance to save the private key file for"," ",a.jsx("strong",{children:l}),". Please download or copy it now. You won't be able to retrieve it again."]})]}),t[9]=l,t[10]=i):i=t[10];let y;t[11]!==d?(y=a.jsx(re,{className:"font-mono text-xs",readOnly:!0,rows:12,value:d}),t[11]=d,t[12]=y):y=t[12];let x;t[13]!==P?(x=P?a.jsxs(a.Fragment,{children:[a.jsx(oe,{className:"mr-2 size-4"}),"Copied!"]}):"Copy to Clipboard",t[13]=P,t[14]=x):x=t[14];let r;t[15]!==g||t[16]!==x?(r=a.jsx(E,{className:"flex-1",onClick:g,type:"button",variant:"outline",children:x}),t[15]=g,t[16]=x,t[17]=r):r=t[17];let p;t[18]===Symbol.for("react.memo_cache_sentinel")?(p=a.jsx(ne,{className:"mr-2 size-4"}),t[18]=p):p=t[18];let o;t[19]!==C?(o=a.jsxs(E,{className:"flex-1",onClick:C,type:"button",variant:"outline",children:[p,"Download .pem File"]}),t[19]=C,t[20]=o):o=t[20];let n;t[21]!==o||t[22]!==r?(n=a.jsxs("div",{className:"flex gap-2",children:[r,o]}),t[21]=o,t[22]=r,t[23]=n):n=t[23];let h;t[24]!==n||t[25]!==y?(h=a.jsxs("div",{className:"space-y-3",children:[y,n]}),t[24]=n,t[25]=y,t[26]=h):h=t[26];let c;t[27]!==w?(c=a.jsx(ae,{children:a.jsx(se,{onClick:w,children:"Close and Continue"})}),t[27]=w,t[28]=c):c=t[28];let m;t[29]!==h||t[30]!==c||t[31]!==i?(m=a.jsxs(le,{className:"max-w-2xl",children:[i,h,c]}),t[29]=h,t[30]=c,t[31]=i,t[32]=m):m=t[32];let D;return t[33]!==s||t[34]!==m?(D=a.jsx(ie,{open:s,children:m}),t[33]=s,t[34]=m,t[35]=D):D=t[35],D}function Ce(){const e=R.c(42),t=L(),s=W(),[l,d]=O.useState(null);let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={resolver:z(I)},e[0]=b):b=e[0];const{handleSubmit:P,register:S,formState:_}=Y(b),{errors:g,isSubmitting:N}=_;let C;e[1]!==s?(C=async T=>{const B=await s.mutateAsync(T);B.KeyMaterial&&d({keyName:T.keyName,material:B.KeyMaterial})},e[1]=s,e[2]=C):C=e[2];const v=C;let w,j;e[3]===Symbol.for("react.memo_cache_sentinel")?(w=a.jsx(J,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),j=a.jsx(V,{title:"Create Key Pair"}),e[3]=w,e[4]=j):(w=e[3],j=e[4]);let f;e[5]!==s.error?(f=s.error&&a.jsx(Q,{error:s.error,msg:"Failed to create key pair"}),e[5]=s.error,e[6]=f):f=e[6];let i;e[7]!==P||e[8]!==v?(i=P(v),e[7]=P,e[8]=v,e[9]=i):i=e[9];let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(q,{children:a.jsx("label",{htmlFor:"keyName",children:"Key Pair Name"})}),e[10]=y):y=e[10];const x=!!g.keyName;let r;e[11]!==S?(r=S("keyName"),e[11]=S,e[12]=r):r=e[12];let p;e[13]!==x||e[14]!==r?(p=a.jsx($,{"aria-invalid":x,id:"keyName",placeholder:"my-key-pair…",...r}),e[13]=x,e[14]=r,e[15]=p):p=e[15];let o;e[16]!==g.keyName?(o=a.jsx(H,{errors:[g.keyName]}),e[16]=g.keyName,e[17]=o):o=e[17];let n;e[18]!==p||e[19]!==o?(n=a.jsxs(G,{children:[y,p,o]}),e[18]=p,e[19]=o,e[20]=n):n=e[20];const h=N||s.isPending;let c;e[21]!==t?(c=()=>t({to:"/ec2/describe-key-pairs"}),e[21]=t,e[22]=c):c=e[22];let m;e[23]!==h||e[24]!==c?(m=a.jsx(E,{disabled:h,onClick:c,type:"button",variant:"outline",children:"Cancel"}),e[23]=h,e[24]=c,e[25]=m):m=e[25];const D=N||s.isPending,K=N||s.isPending?"Creating…":"Create Key Pair";let k;e[26]!==D||e[27]!==K?(k=a.jsx(E,{disabled:D,type:"submit",children:K}),e[26]=D,e[27]=K,e[28]=k):k=e[28];let u;e[29]!==m||e[30]!==k?(u=a.jsxs("div",{className:"flex gap-2",children:[m,k]}),e[29]=m,e[30]=k,e[31]=u):u=e[31];let A;e[32]!==n||e[33]!==u||e[34]!==i?(A=a.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:i,children:[n,u]}),e[32]=n,e[33]=u,e[34]=i,e[35]=A):A=e[35];let F;e[36]!==l?(F=l&&a.jsx(fe,{keyMaterial:l.material,keyName:l.keyName,open:!!l}),e[36]=l,e[37]=F):F=e[37];let M;return e[38]!==A||e[39]!==F||e[40]!==f?(M=a.jsxs(a.Fragment,{children:[w,j,f,A,F]}),e[38]=A,e[39]=F,e[40]=f,e[41]=M):M=e[41],M}export{Ce as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/create-volume.js b/hive/services/hiveui/frontend/dist/assets/create-volume.js index b10d5b960..5b6794d91 100644 --- a/hive/services/hiveui/frontend/dist/assets/create-volume.js +++ b/hive/services/hiveui/frontend/dist/assets/create-volume.js @@ -1 +1 @@ -import{c as $,u as q,g as D,j as t,B as I}from"./index.js";import{a as J,u as K,I as R,F as G,b as H,c as L}from"./field.js";import{B as O}from"./back-link.js";import{E as Q}from"./error-banner.js";import{P as U}from"./page-heading.js";import{u as W}from"./ec2.js";import"./useMutation.js";function ae(){const e=$.c(52),s=q(),i=W();let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={resolver:J(D),defaultValues:{size:1,availabilityZone:""}},e[0]=g):g=e[0];const{handleSubmit:C,register:a,formState:M}=K(g),{errors:l,isSubmitting:V}=M;let S;e[1]!==i||e[2]!==s?(S=async T=>{await i.mutateAsync(T),s({to:"/ec2/describe-volumes"})},e[1]=i,e[2]=s,e[3]=S):S=e[3];const E=S;let z,F;e[4]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(O,{to:"/ec2/describe-volumes",children:"Back to volumes"}),F=t.jsx(U,{title:"Create Volume"}),e[4]=z,e[5]=F):(z=e[4],F=e[5]);let r;e[6]!==i.error?(r=i.error&&t.jsx(Q,{error:i.error,msg:"Failed to create volume"}),e[6]=i.error,e[7]=r):r=e[7];let o;e[8]!==C||e[9]!==E?(o=C(E),e[8]=C,e[9]=E,e[10]=o):o=e[10];let Z;e[11]===Symbol.for("react.memo_cache_sentinel")?(Z=t.jsx(H,{children:t.jsx("label",{htmlFor:"size",children:"Size (GiB)"})}),e[11]=Z):Z=e[11];const P=!!l.size;let n;e[12]!==a?(n=a("size",{valueAsNumber:!0}),e[12]=a,e[13]=n):n=e[13];let c;e[14]!==P||e[15]!==n?(c=t.jsx(R,{"aria-invalid":P,id:"size",max:16384,min:1,type:"number",...n}),e[14]=P,e[15]=n,e[16]=c):c=e[16];let m;e[17]!==l.size?(m=t.jsx(G,{errors:[l.size]}),e[17]=l.size,e[18]=m):m=e[18];let u;e[19]!==c||e[20]!==m?(u=t.jsxs(L,{children:[Z,c,m]}),e[19]=c,e[20]=m,e[21]=u):u=e[21];let _;e[22]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(H,{children:t.jsx("label",{htmlFor:"availabilityZone",children:"Availability Zone"})}),e[22]=_):_=e[22];const k=!!l.availabilityZone;let f;e[23]!==a?(f=a("availabilityZone"),e[23]=a,e[24]=f):f=e[24];let d;e[25]!==k||e[26]!==f?(d=t.jsx(R,{"aria-invalid":k,id:"availabilityZone",placeholder:"ap-southeast-2a",type:"text",...f}),e[25]=k,e[26]=f,e[27]=d):d=e[27];let b;e[28]!==l.availabilityZone?(b=t.jsx(G,{errors:[l.availabilityZone]}),e[28]=l.availabilityZone,e[29]=b):b=e[29];let x;e[30]!==d||e[31]!==b?(x=t.jsxs(L,{children:[_,d,b]}),e[30]=d,e[31]=b,e[32]=x):x=e[32];const N=V||i.isPending;let h;e[33]!==s?(h=()=>s({to:"/ec2/describe-volumes"}),e[33]=s,e[34]=h):h=e[34];let v;e[35]!==N||e[36]!==h?(v=t.jsx(I,{disabled:N,onClick:h,type:"button",variant:"outline",children:"Cancel"}),e[35]=N,e[36]=h,e[37]=v):v=e[37];const A=V||i.isPending,w=V||i.isPending?"Creating…":"Create Volume";let p;e[38]!==A||e[39]!==w?(p=t.jsx(I,{disabled:A,type:"submit",children:w}),e[38]=A,e[39]=w,e[40]=p):p=e[40];let j;e[41]!==v||e[42]!==p?(j=t.jsxs("div",{className:"flex gap-2",children:[v,p]}),e[41]=v,e[42]=p,e[43]=j):j=e[43];let y;e[44]!==u||e[45]!==x||e[46]!==j||e[47]!==o?(y=t.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:o,children:[u,x,j]}),e[44]=u,e[45]=x,e[46]=j,e[47]=o,e[48]=y):y=e[48];let B;return e[49]!==y||e[50]!==r?(B=t.jsxs(t.Fragment,{children:[z,F,r,y]}),e[49]=y,e[50]=r,e[51]=B):B=e[51],B}export{ae as component}; +import{c as $,u as q,g as D,j as t,B as I}from"./index.js";import{a as J,u as K,I as R,F as G,b as H,c as L}from"./field.js";import{B as O}from"./back-link.js";import{E as Q}from"./error-banner.js";import{P as U}from"./page-heading.js";import{u as W}from"./ec2.js";function se(){const e=$.c(52),s=q(),i=W();let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={resolver:J(D),defaultValues:{size:1,availabilityZone:""}},e[0]=g):g=e[0];const{handleSubmit:C,register:a,formState:M}=K(g),{errors:l,isSubmitting:V}=M;let S;e[1]!==i||e[2]!==s?(S=async T=>{await i.mutateAsync(T),s({to:"/ec2/describe-volumes"})},e[1]=i,e[2]=s,e[3]=S):S=e[3];const E=S;let z,F;e[4]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(O,{to:"/ec2/describe-volumes",children:"Back to volumes"}),F=t.jsx(U,{title:"Create Volume"}),e[4]=z,e[5]=F):(z=e[4],F=e[5]);let r;e[6]!==i.error?(r=i.error&&t.jsx(Q,{error:i.error,msg:"Failed to create volume"}),e[6]=i.error,e[7]=r):r=e[7];let o;e[8]!==C||e[9]!==E?(o=C(E),e[8]=C,e[9]=E,e[10]=o):o=e[10];let Z;e[11]===Symbol.for("react.memo_cache_sentinel")?(Z=t.jsx(H,{children:t.jsx("label",{htmlFor:"size",children:"Size (GiB)"})}),e[11]=Z):Z=e[11];const P=!!l.size;let n;e[12]!==a?(n=a("size",{valueAsNumber:!0}),e[12]=a,e[13]=n):n=e[13];let c;e[14]!==P||e[15]!==n?(c=t.jsx(R,{"aria-invalid":P,id:"size",max:16384,min:1,type:"number",...n}),e[14]=P,e[15]=n,e[16]=c):c=e[16];let m;e[17]!==l.size?(m=t.jsx(G,{errors:[l.size]}),e[17]=l.size,e[18]=m):m=e[18];let u;e[19]!==c||e[20]!==m?(u=t.jsxs(L,{children:[Z,c,m]}),e[19]=c,e[20]=m,e[21]=u):u=e[21];let _;e[22]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(H,{children:t.jsx("label",{htmlFor:"availabilityZone",children:"Availability Zone"})}),e[22]=_):_=e[22];const k=!!l.availabilityZone;let f;e[23]!==a?(f=a("availabilityZone"),e[23]=a,e[24]=f):f=e[24];let d;e[25]!==k||e[26]!==f?(d=t.jsx(R,{"aria-invalid":k,id:"availabilityZone",placeholder:"ap-southeast-2a",type:"text",...f}),e[25]=k,e[26]=f,e[27]=d):d=e[27];let b;e[28]!==l.availabilityZone?(b=t.jsx(G,{errors:[l.availabilityZone]}),e[28]=l.availabilityZone,e[29]=b):b=e[29];let x;e[30]!==d||e[31]!==b?(x=t.jsxs(L,{children:[_,d,b]}),e[30]=d,e[31]=b,e[32]=x):x=e[32];const N=V||i.isPending;let h;e[33]!==s?(h=()=>s({to:"/ec2/describe-volumes"}),e[33]=s,e[34]=h):h=e[34];let v;e[35]!==N||e[36]!==h?(v=t.jsx(I,{disabled:N,onClick:h,type:"button",variant:"outline",children:"Cancel"}),e[35]=N,e[36]=h,e[37]=v):v=e[37];const A=V||i.isPending,w=V||i.isPending?"Creating…":"Create Volume";let j;e[38]!==A||e[39]!==w?(j=t.jsx(I,{disabled:A,type:"submit",children:w}),e[38]=A,e[39]=w,e[40]=j):j=e[40];let p;e[41]!==v||e[42]!==j?(p=t.jsxs("div",{className:"flex gap-2",children:[v,j]}),e[41]=v,e[42]=j,e[43]=p):p=e[43];let y;e[44]!==u||e[45]!==x||e[46]!==p||e[47]!==o?(y=t.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:o,children:[u,x,p]}),e[44]=u,e[45]=x,e[46]=p,e[47]=o,e[48]=y):y=e[48];let B;return e[49]!==y||e[50]!==r?(B=t.jsxs(t.Fragment,{children:[z,F,r,y]}),e[49]=y,e[50]=r,e[51]=B):B=e[51],B}export{se as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/ec2.js b/hive/services/hiveui/frontend/dist/assets/ec2.js index bf7fb697a..a77a6f695 100644 --- a/hive/services/hiveui/frontend/dist/assets/ec2.js +++ b/hive/services/hiveui/frontend/dist/assets/ec2.js @@ -1 +1 @@ -import{aO as c,bT as o,aQ as i,bU as I,bV as p,bW as f,bX as E,bY as K,bZ as P,b_ as b,b$ as w,c0 as S,c1 as q,c2 as v,c as u,bp as r,c3 as m,aH as d,aA as y}from"./index.js";import{u as l}from"./useMutation.js";class $ extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","CreateKeyPair",{}).n("EC2Client","CreateKeyPairCommand").sc(I).build(){}class g extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","CreateVolume",{}).n("EC2Client","CreateVolumeCommand").sc(p).build(){}class V extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","DeleteKeyPair",{}).n("EC2Client","DeleteKeyPairCommand").sc(f).build(){}class Q extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","DeleteVolume",{}).n("EC2Client","DeleteVolumeCommand").sc(E).build(){}class R extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","ImportKeyPair",{}).n("EC2Client","ImportKeyPairCommand").sc(K).build(){}class x extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","ModifyVolume",{}).n("EC2Client","ModifyVolumeCommand").sc(P).build(){}class z extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RebootInstances",{}).n("EC2Client","RebootInstancesCommand").sc(b).build(){}class A extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RunInstances",{}).n("EC2Client","RunInstancesCommand").sc(w).build(){}class D extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StartInstances",{}).n("EC2Client","StartInstancesCommand").sc(S).build(){}class _ extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StopInstances",{}).n("EC2Client","StopInstancesCommand").sc(q).build(){}class T extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","TerminateInstances",{}).n("EC2Client","TerminateInstancesCommand").sc(v).build(){}const B=/\s+/;function Y(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:F,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function F(e){const n=new D({InstanceIds:[e]});return await m().send(n)}function J(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:M,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function M(e){const n=new _({InstanceIds:[e]});return await m().send(n)}function L(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:N,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function N(e){const n=new T({InstanceIds:[e]});return await m().send(n)}function ee(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:k,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function k(e){const n=new z({InstanceIds:[e]});return await m().send(n)}function ne(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:O,onSuccess:async s=>{await n.cancelQueries(d);const a=n.getQueryData(d.queryKey);if(a&&s.Instances){const C={Instances:s.Instances,OwnerId:s.OwnerId,RequesterId:s.RequesterId,ReservationId:s.ReservationId,Groups:[]};n.setQueryData(d.queryKey,{...a,Reservations:[...a.Reservations||[],C]})}n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function O(e){const n=new A({ImageId:e.imageId,InstanceType:e.instanceType,KeyName:e.keyName,MinCount:e.count,MaxCount:e.count,SecurityGroupIds:e.securityGroupIds,SubnetId:e.subnetId});return await m().send(n)}function te(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:G,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],l(t)}async function G(e){const n=new $({KeyName:e.keyName,KeyType:"rsa"});return await m().send(n)}function se(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:Z,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],l(t)}async function Z(e){const t=e.publicKeyMaterial.trim().split(B).slice(0,2).join(" "),s=new R({KeyName:e.keyName,PublicKeyMaterial:new TextEncoder().encode(t)});return await m().send(s)}function ae(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:j,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],l(t)}async function j(e){const n=new V({KeyPairId:e});return await m().send(n)}function ce(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:H,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","volumes"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function H(e){const n=new g({Size:e.size,AvailabilityZone:e.availabilityZone,VolumeType:"gp3"});return await m().send(n)}function oe(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:W,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","volumes"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function W(e){const n=new x({VolumeId:e.volumeId,Size:e.size});return await m().send(n)}function ie(){const e=u.c(2),n=r();let t;return e[0]!==n?(t={mutationFn:X,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","volumes"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function X(e){const n=new Q({VolumeId:e});return await m().send(n)}export{se as a,te as b,ne as c,oe as d,ie as e,ae as f,Y as g,J as h,ee as i,L as j,ce as u}; +import{aN as o,bS as c,aP as r,bT as I,bU as p,bV as f,bW as E,bX as w,bY as b,bZ as P,b_ as K,b$ as S,c0 as v,c1 as h,c as i,bo as u,c2 as m,aG as d,az as y}from"./index.js";import{u as l}from"./error-banner.js";class q extends o.classBuilder().ep(c).m(function(n,t,s,a){return[r(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","CreateKeyPair",{}).n("EC2Client","CreateKeyPairCommand").sc(I).build(){}class $ extends o.classBuilder().ep(c).m(function(n,t,s,a){return[r(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","CreateVolume",{}).n("EC2Client","CreateVolumeCommand").sc(p).build(){}class F extends o.classBuilder().ep(c).m(function(n,t,s,a){return[r(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","DeleteKeyPair",{}).n("EC2Client","DeleteKeyPairCommand").sc(f).build(){}class g extends o.classBuilder().ep(c).m(function(n,t,s,a){return[r(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","DeleteVolume",{}).n("EC2Client","DeleteVolumeCommand").sc(E).build(){}class V extends o.classBuilder().ep(c).m(function(n,t,s,a){return[r(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","ImportKeyPair",{}).n("EC2Client","ImportKeyPairCommand").sc(w).build(){}class R extends o.classBuilder().ep(c).m(function(n,t,s,a){return[r(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","ModifyVolume",{}).n("EC2Client","ModifyVolumeCommand").sc(b).build(){}class Q extends o.classBuilder().ep(c).m(function(n,t,s,a){return[r(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RebootInstances",{}).n("EC2Client","RebootInstancesCommand").sc(P).build(){}class z extends o.classBuilder().ep(c).m(function(n,t,s,a){return[r(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RunInstances",{}).n("EC2Client","RunInstancesCommand").sc(K).build(){}class x extends o.classBuilder().ep(c).m(function(n,t,s,a){return[r(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StartInstances",{}).n("EC2Client","StartInstancesCommand").sc(S).build(){}class A extends o.classBuilder().ep(c).m(function(n,t,s,a){return[r(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StopInstances",{}).n("EC2Client","StopInstancesCommand").sc(v).build(){}class D extends o.classBuilder().ep(c).m(function(n,t,s,a){return[r(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","TerminateInstances",{}).n("EC2Client","TerminateInstancesCommand").sc(h).build(){}const _=/\s+/;function Y(){const e=i.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:T,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function T(e){try{const n=new x({InstanceIds:[e]});return await m().send(n)}catch{throw new Error("Failed to start instance")}}function J(){const e=i.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:B,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function B(e){try{const n=new A({InstanceIds:[e]});return await m().send(n)}catch{throw new Error("Failed to stop instance")}}function L(){const e=i.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:M,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function M(e){try{const n=new D({InstanceIds:[e]});return await m().send(n)}catch{throw new Error("Failed to terminate instance")}}function ee(){const e=i.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:k,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function k(e){try{const n=new Q({InstanceIds:[e]});return await m().send(n)}catch{throw new Error("Failed to reboot instance")}}function ne(){const e=i.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:N,onSuccess:async s=>{await n.cancelQueries(d);const a=n.getQueryData(d.queryKey);if(a&&s.Instances){const C={Instances:s.Instances,OwnerId:s.OwnerId,RequesterId:s.RequesterId,ReservationId:s.ReservationId,Groups:[]};n.setQueryData(d.queryKey,{...a,Reservations:[...a.Reservations||[],C]})}n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function N(e){try{const n=new z({ImageId:e.imageId,InstanceType:e.instanceType,KeyName:e.keyName,MinCount:e.count,MaxCount:e.count,SecurityGroupIds:e.securityGroupIds,SubnetId:e.subnetId});return await m().send(n)}catch{throw new Error("Failed to create instance")}}function te(){const e=i.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:G,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],l(t)}async function G(e){try{const n=new q({KeyName:e.keyName,KeyType:"rsa"});return await m().send(n)}catch{throw new Error("Failed to create key pair")}}function se(){const e=i.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:O,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],l(t)}async function O(e){try{const t=e.publicKeyMaterial.trim().split(_).slice(0,2).join(" "),s=new V({KeyName:e.keyName,PublicKeyMaterial:new TextEncoder().encode(t)});return await m().send(s)}catch{throw new Error("Failed to import key pair")}}function ae(){const e=i.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:Z,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],l(t)}async function Z(e){try{const n=new F({KeyPairId:e});return await m().send(n)}catch{throw new Error("Failed to delete key pair")}}function oe(){const e=i.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:j,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","volumes"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function j(e){try{const n=new $({Size:e.size,AvailabilityZone:e.availabilityZone,VolumeType:"gp3"});return await m().send(n)}catch{throw new Error("Failed to create volume")}}function ce(){const e=i.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:W,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","volumes"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function W(e){try{const n=new R({VolumeId:e.volumeId,Size:e.size});return await m().send(n)}catch{throw new Error("Failed to modify volume")}}function re(){const e=i.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:X,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","volumes"]})}},e[0]=n,e[1]=t):t=e[1],l(t)}async function X(e){try{const n=new g({VolumeId:e});return await m().send(n)}catch{throw new Error("Failed to delete volume")}}export{se as a,te as b,ne as c,ce as d,re as e,ae as f,Y as g,J as h,ee as i,L as j,oe as u}; diff --git a/hive/services/hiveui/frontend/dist/assets/error-banner.js b/hive/services/hiveui/frontend/dist/assets/error-banner.js index f13b3a9b1..d2e604c76 100644 --- a/hive/services/hiveui/frontend/dist/assets/error-banner.js +++ b/hive/services/hiveui/frontend/dist/assets/error-banner.js @@ -1 +1 @@ -import{c as o,j as m}from"./index.js";function n(l){const e=o.c(7),{msg:r,error:c}=l;let t;e[0]!==r?(t=r&&m.jsx("h2",{className:"text-destructive text-sm",children:r}),e[0]=r,e[1]=t):t=e[1];let s;e[2]!==c?(s=c&&m.jsx("p",{className:"text-destructive text-sm",children:c.message}),e[2]=c,e[3]=s):s=e[3];let i;return e[4]!==t||e[5]!==s?(i=m.jsxs("div",{className:"mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4",children:[t,s]}),e[4]=t,e[5]=s,e[6]=i):i=e[6],i}export{n as E}; +import{c3 as d,c4 as m,c5 as u,c6 as p,c7 as c,bo as b,r as a,c8 as v,c9 as f,c as y,j as h}from"./index.js";var x=class extends d{#s;#i=void 0;#t;#e;constructor(s,t){super(),this.#s=s,this.setOptions(t),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(s){const t=this.options;this.options=this.#s.defaultMutationOptions(s),m(this.options,t)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),t?.mutationKey&&this.options.mutationKey&&u(t.mutationKey)!==u(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(s){this.#r(),this.#o(s)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(s,t){return this.#e=t,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(s)}#r(){const s=this.#t?.state??p();this.#i={...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset}}#o(s){c.batch(()=>{if(this.#e&&this.hasListeners()){const t=this.#i.variables,r=this.#i.context,i={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};if(s?.type==="success"){try{this.#e.onSuccess?.(s.data,t,r,i)}catch(e){Promise.reject(e)}try{this.#e.onSettled?.(s.data,null,t,r,i)}catch(e){Promise.reject(e)}}else if(s?.type==="error"){try{this.#e.onError?.(s.error,t,r,i)}catch(e){Promise.reject(e)}try{this.#e.onSettled?.(void 0,s.error,t,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(t=>{t(this.#i)})})}};function g(s,t){const r=b(),[i]=a.useState(()=>new x(r,s));a.useEffect(()=>{i.setOptions(s)},[i,s]);const e=a.useSyncExternalStore(a.useCallback(n=>i.subscribe(c.batchCalls(n)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),o=a.useCallback((n,l)=>{i.mutate(n,l).catch(v)},[i]);if(e.error&&f(i.options.throwOnError,[e.error]))throw e.error;return{...e,mutate:o,mutateAsync:e.mutate}}function E(s){const t=y.c(7),{msg:r,error:i}=s;let e;t[0]!==r?(e=r&&h.jsx("h2",{className:"text-destructive text-sm",children:r}),t[0]=r,t[1]=e):e=t[1];let o;t[2]!==i?(o=i&&h.jsx("p",{className:"text-destructive text-sm",children:i.message}),t[2]=i,t[3]=o):o=t[3];let n;return t[4]!==e||t[5]!==o?(n=h.jsxs("div",{className:"mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4",children:[e,o]}),t[4]=e,t[5]=o,t[6]=n):n=t[6],n}export{E,g as u}; diff --git a/hive/services/hiveui/frontend/dist/assets/field.js b/hive/services/hiveui/frontend/dist/assets/field.js index 3f8d4cb80..0567df86f 100644 --- a/hive/services/hiveui/frontend/dist/assets/field.js +++ b/hive/services/hiveui/frontend/dist/assets/field.js @@ -1 +1 @@ -import{r as ee,bt as re,Y as Wt,E as st,bu as Ht,I as he,bv as $t,K as _t,as as zt,ae as Kt,y as Yt,ac as Gt,j as le,c as _e,a as xe,bw as _,bx as Zt,by as Jt,bz as Qt,bA as Xt}from"./index.js";let it=(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})({});const er={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},tr={valid(e){return e===null?null:e?{[it.valid]:""}:{[it.invalid]:""}}},rr=ee.createContext({invalid:void 0,name:void 0,validityData:{state:er,errors:[],error:"",value:"",initialValue:null},setValidityData:re,disabled:void 0,touched:!1,setTouched:re,dirty:!1,setDirty:re,filled:!1,setFilled:re,focused:!1,setFocused:re,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=st)=>e,getInputValidationProps:(e=st)=>e,inputRef:{current:null},commit:async()=>{}}});function Ie(e=!0){const r=ee.useContext(rr);if(r.setValidityData===re&&!e)throw new Error(Wt(28));return r}const sr=ee.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:re,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function ir(){return ee.useContext(sr)}const ar=ee.createContext({controlId:void 0,setControlId:re,labelId:void 0,setLabelId:re,messageIds:[],setMessageIds:re,getDescriptionProps:e=>e});function xt(){return ee.useContext(ar)}function nr(e,r){return{...e,state:{...e.state,valid:!r&&e.state.valid}}}function lr({controlled:e,default:r,name:t,state:s="value"}){const{current:n}=ee.useRef(e!==void 0),[a,o]=ee.useState(r),d=n?e:a,b=ee.useCallback(x=>{n||o(x)},[]);return[d,b]}function or(e={}){const{id:r,implicit:t=!1,controlRef:s}=e,{controlId:n,setControlId:a}=xt(),o=Ht(r);return he(()=>{if(!(!t&&!r||a===re)){if(t){const d=s?.current;$t(d)&&d.closest("label")!=null?a(r??null):a(n??o)}else r&&a(r);return()=>{r&&a(void 0)}}},[r,s,n,a,t,o]),n??o}function ur(e){const{enabled:r=!0,value:t,id:s,name:n,controlRef:a,commit:o}=e,{formRef:d}=ir(),{invalid:b,markedDirtyRef:x,validityData:A,setValidityData:m}=Ie(),V=_t(e.getValue);he(()=>{if(!r)return;let h=t;h===void 0&&(h=V()),A.initialValue===null&&h!==null&&m(O=>({...O,initialValue:h}))},[r,m,t,A.initialValue,V]),he(()=>{!r||!s||d.current.fields.set(s,{getValue:V,name:n,controlRef:a,validityData:nr(A,b),validate(h=!0){let O=t;O===void 0&&(O=V()),x.current=!0,h?zt.flushSync(()=>o(O)):o(O)}})},[o,a,r,d,V,s,b,x,n,A,t]),he(()=>{const h=d.current.fields;return()=>{s&&h.delete(s)}},[d,s])}const dr=ee.forwardRef(function(r,t){const{render:s,className:n,id:a,name:o,value:d,disabled:b=!1,onValueChange:x,defaultValue:A,...m}=r,{state:V,name:h,disabled:O}=Ie(),T=O||b,U=h??o,M=ee.useMemo(()=>({...V,disabled:T}),[V,T]),{setTouched:p,setDirty:H,validityData:F,setFocused:E,setFilled:q,validationMode:te,validation:W}=Ie(),{labelId:X}=xt(),z=or({id:a});he(()=>{const R=d!=null;W.inputRef.current?.value||R&&d!==""?q(!0):R&&d===""&&q(!1)},[W.inputRef,q,d]);const[oe,w]=lr({controlled:d,default:A,name:"FieldControl",state:"value"}),k=d!==void 0,N=_t((R,L)=>{x?.(R,L),!L.isCanceled&&w(R)});return ur({id:z,name:U,commit:W.commit,value:oe,getValue:()=>W.inputRef.current?.value,controlRef:W.inputRef}),Kt("input",r,{ref:t,state:M,props:[{id:z,disabled:T,name:U,ref:W.inputRef,"aria-labelledby":X,...k?{value:oe}:{defaultValue:A},onChange(R){const L=R.currentTarget.value;N(L,Yt(Gt,R.nativeEvent)),H(L!==F.initialValue),q(L!=="")},onFocus(){E(!0)},onBlur(R){p(!0),E(!1),te==="onBlur"&&W.commit(R.currentTarget.value)},onKeyDown(R){R.currentTarget.tagName==="INPUT"&&R.key==="Enter"&&(p(!0),W.commit(R.currentTarget.value))}},W.getInputValidationProps(),m],stateAttributesMapping:tr})}),fr=ee.forwardRef(function(r,t){return le.jsx(dr,{ref:t,...r})});function Br(e){const r=_e.c(10);let t,s,n;r[0]!==e?({className:t,type:n,...s}=e,r[0]=e,r[1]=t,r[2]=s,r[3]=n):(t=r[1],s=r[2],n=r[3]);let a;r[4]!==t?(a=xe("h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm outline-none transition-colors file:inline-flex file:h-6 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-xs/relaxed placeholder:text-muted-foreground 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",t),r[4]=t,r[5]=a):a=r[5];let o;return r[6]!==s||r[7]!==a||r[8]!==n?(o=le.jsx(fr,{className:a,"data-slot":"input",type:n,...s}),r[6]=s,r[7]=a,r[8]=n,r[9]=o):o=r[9],o}var pe=e=>e.type==="checkbox",de=e=>e instanceof Date,Z=e=>e==null;const pt=e=>typeof e=="object";var j=e=>!Z(e)&&!Array.isArray(e)&&pt(e)&&!de(e),Ft=e=>j(e)&&e.target?pe(e.target)?e.target.checked:e.target.value:e,cr=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,wt=(e,r)=>e.has(cr(r)),yr=e=>{const r=e.constructor&&e.constructor.prototype;return j(r)&&r.hasOwnProperty("isPrototypeOf")},Le=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function P(e){if(e instanceof Date)return new Date(e);const r=typeof FileList<"u"&&e instanceof FileList;if(Le&&(e instanceof Blob||r))return e;const t=Array.isArray(e);if(!t&&!(j(e)&&yr(e)))return e;const s=t?[]:Object.create(Object.getPrototypeOf(e));for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(s[n]=P(e[n]));return s}var ke=e=>/^\w*$/.test(e),I=e=>e===void 0,Pe=e=>Array.isArray(e)?e.filter(Boolean):[],Be=e=>Pe(e.replace(/["|']|\]/g,"").split(/\.|\[/)),y=(e,r,t)=>{if(!r||!j(e))return t;const s=(ke(r)?[r]:Be(r)).reduce((n,a)=>Z(n)?n:n[a],e);return I(s)||s===e?I(e[r])?t:e[r]:s},J=e=>typeof e=="boolean",G=e=>typeof e=="function",S=(e,r,t)=>{let s=-1;const n=ke(r)?[r]:Be(r),a=n.length,o=a-1;for(;++s_.useContext(Et);var kt=(e,r,t,s=!0)=>{const n={defaultValues:r._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const o=a;return r._proxyFormState[o]!==se.all&&(r._proxyFormState[o]=!s||se.all),t&&(t[o]=!0),e[o]}});return n};const qe=typeof window<"u"?_.useLayoutEffect:_.useEffect;function gr(e){const r=je(),{control:t=r,disabled:s,name:n,exact:a}=e||{},[o,d]=_.useState(t._formState),b=_.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return qe(()=>t._subscribe({name:n,formState:b.current,exact:a,callback:x=>{!s&&d({...t._formState,...x})}}),[n,s,a]),_.useEffect(()=>{b.current.isValid&&t._setValid(!0)},[t]),_.useMemo(()=>kt(o,t,b.current,!1),[o,t])}var Q=e=>typeof e=="string",Te=(e,r,t,s,n)=>Q(e)?(s&&r.watch.add(e),y(t,e,n)):Array.isArray(e)?e.map(a=>(s&&r.watch.add(a),y(t,a))):(s&&(r.watchAll=!0),t),Me=e=>Z(e)||!pt(e);function ie(e,r,t=new WeakSet){if(Me(e)||Me(r))return Object.is(e,r);if(de(e)&&de(r))return Object.is(e.getTime(),r.getTime());const s=Object.keys(e),n=Object.keys(r);if(s.length!==n.length)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);for(const a of s){const o=e[a];if(!n.includes(a))return!1;if(a!=="ref"){const d=r[a];if(de(o)&&de(d)||j(o)&&j(d)||Array.isArray(o)&&Array.isArray(d)?!ie(o,d,t):!Object.is(o,d))return!1}}return!0}function mr(e){const r=je(),{control:t=r,name:s,defaultValue:n,disabled:a,exact:o,compute:d}=e||{},b=_.useRef(n),x=_.useRef(d),A=_.useRef(void 0),m=_.useRef(t),V=_.useRef(s);x.current=d;const[h,O]=_.useState(()=>{const F=t._getWatch(s,b.current);return x.current?x.current(F):F}),T=_.useCallback(F=>{const E=Te(s,t._names,F||t._formValues,!1,b.current);return x.current?x.current(E):E},[t._formValues,t._names,s]),U=_.useCallback(F=>{if(!a){const E=Te(s,t._names,F||t._formValues,!1,b.current);if(x.current){const q=x.current(E);ie(q,A.current)||(O(q),A.current=q)}else O(E)}},[t._formValues,t._names,a,s]);qe(()=>((m.current!==t||!ie(V.current,s))&&(m.current=t,V.current=s,U()),t._subscribe({name:s,formState:{values:!0},exact:o,callback:F=>{U(F.values)}})),[t,o,s,U]),_.useEffect(()=>t._removeUnmounted());const M=m.current!==t,p=V.current,H=_.useMemo(()=>{if(a)return null;const F=!M&&!ie(p,s);return M||F?T():null},[a,M,s,p,T]);return H!==null?H:h}function vr(e){const r=je(),{name:t,disabled:s,control:n=r,shouldUnregister:a,defaultValue:o,exact:d=!0}=e,b=wt(n._names.array,t),x=_.useMemo(()=>y(n._formValues,t,y(n._defaultValues,t,o)),[n,t,o]),A=mr({control:n,name:t,defaultValue:x,exact:d}),m=gr({control:n,name:t,exact:d}),V=_.useRef(e),h=_.useRef(void 0),O=_.useRef(n.register(t,{...e.rules,value:A,...J(e.disabled)?{disabled:e.disabled}:{}}));V.current=e;const T=_.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!y(m.errors,t)},isDirty:{enumerable:!0,get:()=>!!y(m.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!y(m.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!y(m.validatingFields,t)},error:{enumerable:!0,get:()=>y(m.errors,t)}}),[m,t]),U=_.useCallback(F=>O.current.onChange({target:{value:Ft(F),name:t},type:Fe.CHANGE}),[t]),M=_.useCallback(()=>O.current.onBlur({target:{value:y(n._formValues,t),name:t},type:Fe.BLUR}),[t,n._formValues]),p=_.useCallback(F=>{const E=y(n._fields,t);E&&E._f&&F&&(E._f.ref={focus:()=>G(F.focus)&&F.focus(),select:()=>G(F.select)&&F.select(),setCustomValidity:q=>G(F.setCustomValidity)&&F.setCustomValidity(q),reportValidity:()=>G(F.reportValidity)&&F.reportValidity()})},[n._fields,t]),H=_.useMemo(()=>({name:t,value:A,...J(s)||m.disabled?{disabled:m.disabled||s}:{},onChange:U,onBlur:M,ref:p}),[t,s,m.disabled,U,M,p,A]);return _.useEffect(()=>{const F=n._options.shouldUnregister||a,E=h.current;E&&E!==t&&!b&&n.unregister(E),n.register(t,{...V.current.rules,...J(V.current.disabled)?{disabled:V.current.disabled}:{}});const q=(te,W)=>{const X=y(n._fields,te);X&&X._f&&(X._f.mount=W)};if(q(t,!0),F){const te=P(y(n._options.defaultValues,t,V.current.defaultValue));S(n._defaultValues,t,te),I(y(n._formValues,t))&&S(n._formValues,t,te)}return!b&&n.register(t),h.current=t,()=>{(b?F&&!n._state.action:F)?n.unregister(t):q(t,!1)}},[t,n,b,a]),_.useEffect(()=>{n._setDisabledField({disabled:s,name:t})},[s,t,n]),_.useMemo(()=>({field:H,formState:m,fieldState:T}),[H,m,T])}const jr=e=>e.render(vr(e)),hr=_.createContext(null);hr.displayName="HookFormContext";var We=(e,r,t,s,n)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:n||!0}}:{},be=e=>Array.isArray(e)?e:[e],at=()=>{let e=[];return{get observers(){return e},next:n=>{for(const a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(a=>a!==n)}}),unsubscribe:()=>{e=[]}}};function At(e,r){const t={};for(const s in e)if(e.hasOwnProperty(s)){const n=e[s],a=r[s];if(n&&j(n)&&a){const o=At(n,a);j(o)&&(t[s]=o)}else e[s]&&(t[s]=a)}return t}var Y=e=>j(e)&&!Object.keys(e).length,He=e=>e.type==="file",we=e=>{if(!Le)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},Ct=e=>e.type==="select-multiple",$e=e=>e.type==="radio",br=e=>$e(e)||pe(e),Oe=e=>we(e)&&e.isConnected;function Vr(e,r){const t=r.slice(0,-1).length;let s=0;for(;s{for(const r in e)if(G(e[r]))return!0;return!1};function Dt(e){return Array.isArray(e)||j(e)&&!xr(e)}function Ne(e,r={}){for(const t in e){const s=e[t];Dt(s)?(r[t]=Array.isArray(s)?[]:{},Ne(s,r[t])):I(s)||(r[t]=!0)}return r}function ce(e,r,t){t||(t=Ne(r));for(const s in e){const n=e[s];if(Dt(n))I(r)||Me(t[s])?t[s]=Ne(n,Array.isArray(n)?[]:{}):ce(n,Z(r)?{}:r[s],t[s]);else{const a=r[s];t[s]=!ie(n,a)}}return t}const nt={value:!1,isValid:!1},lt={value:!0,isValid:!0};var St=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!I(e[0].attributes.value)?I(e[0].value)||e[0].value===""?lt:{value:e[0].value,isValid:!0}:lt:nt}return nt},Rt=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>I(e)?e:r?e===""?NaN:e&&+e:t&&Q(e)?new Date(e):s?s(e):e;const ot={isValid:!1,value:null};var Ot=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,ot):ot;function ut(e){const r=e.ref;return He(r)?r.files:$e(r)?Ot(e.refs).value:Ct(r)?[...r.selectedOptions].map(({value:t})=>t):pe(r)?St(e.refs).value:Rt(I(r.value)?e.ref.value:r.value,e)}var pr=(e,r,t,s)=>{const n={};for(const a of e){const o=y(r,a);o&&S(n,a,o._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:s}},Ee=e=>e instanceof RegExp,ve=e=>I(e)?e:Ee(e)?e.source:j(e)?Ee(e.value)?e.value.source:e.value:e,dt=e=>({isOnSubmit:!e||e===se.onSubmit,isOnBlur:e===se.onBlur,isOnChange:e===se.onChange,isOnAll:e===se.all,isOnTouch:e===se.onTouched});const ft="AsyncFunction";var Fr=e=>!!e&&!!e.validate&&!!(G(e.validate)&&e.validate.constructor.name===ft||j(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===ft)),wr=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ct=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const Ve=(e,r,t,s)=>{for(const n of t||Object.keys(e)){const a=y(e,n);if(a){const{_f:o,...d}=a;if(o){if(o.refs&&o.refs[0]&&r(o.refs[0],n)&&!s)return!0;if(o.ref&&r(o.ref,o.name)&&!s)return!0;if(Ve(d,r))break}else if(j(d)&&Ve(d,r))break}}};function yt(e,r,t){const s=y(e,t);if(s||ke(t))return{error:s,name:t};const n=t.split(".");for(;n.length;){const a=n.join("."),o=y(r,a),d=y(e,a);if(o&&!Array.isArray(o)&&t!==a)return{name:t};if(d&&d.type)return{name:a,error:d};if(d&&d.root&&d.root.type)return{name:`${a}.root`,error:d.root};n.pop()}return{name:t}}var Er=(e,r,t,s)=>{t(e);const{name:n,...a}=e;return Y(a)||Object.keys(a).length>=Object.keys(r).length||Object.keys(a).find(o=>r[o]===(!s||se.all))},kr=(e,r,t)=>!e||!r||e===r||be(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s))),Ar=(e,r,t,s,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(r||e):(t?s.isOnBlur:n.isOnBlur)?!e:(t?s.isOnChange:n.isOnChange)?e:!0,Cr=(e,r)=>!Pe(y(e,r)).length&&B(e,r),Dr=(e,r,t)=>{const s=be(y(e,t));return S(s,"root",r[t]),S(e,t,s),e};function gt(e,r,t="validate"){if(Q(e)||Array.isArray(e)&&e.every(Q)||J(e)&&!e)return{type:t,message:Q(e)?e:"",ref:r}}var fe=e=>j(e)&&!Ee(e)?e:{value:e,message:""},mt=async(e,r,t,s,n,a)=>{const{ref:o,refs:d,required:b,maxLength:x,minLength:A,min:m,max:V,pattern:h,validate:O,name:T,valueAsNumber:U,mount:M}=e._f,p=y(t,T);if(!M||r.has(T))return{};const H=d?d[0]:o,F=w=>{n&&H.reportValidity&&(H.setCustomValidity(J(w)?"":w||""),H.reportValidity())},E={},q=$e(o),te=pe(o),W=q||te,X=(U||He(o))&&I(o.value)&&I(p)||we(o)&&o.value===""||p===""||Array.isArray(p)&&!p.length,z=We.bind(null,T,s,E),oe=(w,k,N,$=ae.maxLength,R=ae.minLength)=>{const L=w?k:N;E[T]={type:w?$:R,message:L,ref:o,...z(w?$:R,L)}};if(a?!Array.isArray(p)||!p.length:b&&(!W&&(X||Z(p))||J(p)&&!p||te&&!St(d).isValid||q&&!Ot(d).isValid)){const{value:w,message:k}=Q(b)?{value:!!b,message:b}:fe(b);if(w&&(E[T]={type:ae.required,message:k,ref:H,...z(ae.required,k)},!s))return F(k),E}if(!X&&(!Z(m)||!Z(V))){let w,k;const N=fe(V),$=fe(m);if(!Z(p)&&!isNaN(p)){const R=o.valueAsNumber||p&&+p;Z(N.value)||(w=R>N.value),Z($.value)||(k=R<$.value)}else{const R=o.valueAsDate||new Date(p),L=me=>new Date(new Date().toDateString()+" "+me),ye=o.type=="time",ge=o.type=="week";Q(N.value)&&p&&(w=ye?L(p)>L(N.value):ge?p>N.value:R>new Date(N.value)),Q($.value)&&p&&(k=ye?L(p)+w.value,$=!Z(k.value)&&p.length<+k.value;if((N||$)&&(oe(N,w.message,k.message),!s))return F(E[T].message),E}if(h&&!X&&Q(p)){const{value:w,message:k}=fe(h);if(Ee(w)&&!p.match(w)&&(E[T]={type:ae.pattern,message:k,ref:o,...z(ae.pattern,k)},!s))return F(k),E}if(O){if(G(O)){const w=await O(p,t),k=gt(w,H);if(k&&(E[T]={...k,...z(ae.validate,k.message)},!s))return F(k.message),E}else if(j(O)){let w={};for(const k in O){if(!Y(w)&&!s)break;const N=gt(await O[k](p,t),H,k);N&&(w={...N,...z(k,N.message)},F(N.message),s&&(E[T]=w))}if(!Y(w)&&(E[T]={ref:H,...w},!s))return E}}return F(!0),E};const Sr={mode:se.onSubmit,reValidateMode:se.onChange,shouldFocusError:!0};function Rr(e={}){let r={...Sr,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:G(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},n=j(r.defaultValues)||j(r.values)?P(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:P(n),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},b,x=0;const A={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},m={...A};let V={...m};const h={array:at(),state:at()},O=r.criteriaMode===se.all,T=i=>l=>{clearTimeout(x),x=setTimeout(i,l)},U=async i=>{if(!o.keepIsValid&&!r.disabled&&(m.isValid||V.isValid||i)){let l;r.resolver?(l=Y((await W()).errors),M()):l=await z(s,!0),l!==t.isValid&&h.state.next({isValid:l})}},M=(i,l)=>{!r.disabled&&(m.isValidating||m.validatingFields||V.isValidating||V.validatingFields)&&((i||Array.from(d.mount)).forEach(u=>{u&&(l?S(t.validatingFields,u,l):B(t.validatingFields,u))}),h.state.next({validatingFields:t.validatingFields,isValidating:!Y(t.validatingFields)}))},p=(i,l=[],u,g,c=!0,f=!0)=>{if(g&&u&&!r.disabled){if(o.action=!0,f&&Array.isArray(y(s,i))){const v=u(y(s,i),g.argA,g.argB);c&&S(s,i,v)}if(f&&Array.isArray(y(t.errors,i))){const v=u(y(t.errors,i),g.argA,g.argB);c&&S(t.errors,i,v),Cr(t.errors,i)}if((m.touchedFields||V.touchedFields)&&f&&Array.isArray(y(t.touchedFields,i))){const v=u(y(t.touchedFields,i),g.argA,g.argB);c&&S(t.touchedFields,i,v)}(m.dirtyFields||V.dirtyFields)&&(t.dirtyFields=ce(n,a)),h.state.next({name:i,isDirty:w(i,l),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else S(a,i,l)},H=(i,l)=>{S(t.errors,i,l),h.state.next({errors:t.errors})},F=i=>{t.errors=i,h.state.next({errors:t.errors,isValid:!1})},E=(i,l,u,g)=>{const c=y(s,i);if(c){const f=y(a,i,I(u)?y(n,i):u);I(f)||g&&g.defaultChecked||l?S(a,i,l?f:ut(c._f)):$(i,f),o.mount&&!o.action&&U()}},q=(i,l,u,g,c)=>{let f=!1,v=!1;const C={name:i};if(!r.disabled){if(!u||g){(m.isDirty||V.isDirty)&&(v=t.isDirty,t.isDirty=C.isDirty=w(),f=v!==C.isDirty);const D=ie(y(n,i),l);v=!!y(t.dirtyFields,i),D?B(t.dirtyFields,i):S(t.dirtyFields,i,!0),C.dirtyFields=t.dirtyFields,f=f||(m.dirtyFields||V.dirtyFields)&&v!==!D}if(u){const D=y(t.touchedFields,i);D||(S(t.touchedFields,i,u),C.touchedFields=t.touchedFields,f=f||(m.touchedFields||V.touchedFields)&&D!==u)}f&&c&&h.state.next(C)}return f?C:{}},te=(i,l,u,g)=>{const c=y(t.errors,i),f=(m.isValid||V.isValid)&&J(l)&&t.isValid!==l;if(r.delayError&&u?(b=T(()=>H(i,u)),b(r.delayError)):(clearTimeout(x),b=null,u?S(t.errors,i,u):B(t.errors,i)),(u?!ie(c,u):c)||!Y(g)||f){const v={...g,...f&&J(l)?{isValid:l}:{},errors:t.errors,name:i};t={...t,...v},h.state.next(v)}},W=async i=>(M(i,!0),await r.resolver(a,r.context,pr(i||d.mount,s,r.criteriaMode,r.shouldUseNativeValidation))),X=async i=>{const{errors:l}=await W(i);if(M(i),i)for(const u of i){const g=y(l,u);g?S(t.errors,u,g):B(t.errors,u)}else t.errors=l;return l},z=async(i,l,u={valid:!0})=>{for(const g in i){const c=i[g];if(c){const{_f:f,...v}=c;if(f){const C=d.array.has(f.name),D=c._f&&Fr(c._f);D&&m.validatingFields&&M([f.name],!0);const K=await mt(c,d.disabled,a,O,r.shouldUseNativeValidation&&!l,C);if(D&&m.validatingFields&&M([f.name]),K[f.name]&&(u.valid=!1,l||e.shouldUseNativeValidation))break;!l&&(y(K,f.name)?C?Dr(t.errors,K,f.name):S(t.errors,f.name,K[f.name]):B(t.errors,f.name))}!Y(v)&&await z(v,l,u)}}return u.valid},oe=()=>{for(const i of d.unMount){const l=y(s,i);l&&(l._f.refs?l._f.refs.every(u=>!Oe(u)):!Oe(l._f.ref))&&Ae(i)}d.unMount=new Set},w=(i,l)=>!r.disabled&&(i&&l&&S(a,i,l),!ie(ze(),n)),k=(i,l,u)=>Te(i,d,{...o.mount?a:I(l)?n:Q(i)?{[i]:l}:l},u,l),N=i=>Pe(y(o.mount?a:n,i,r.shouldUnregister?y(n,i,[]):[])),$=(i,l,u={})=>{const g=y(s,i);let c=l;if(g){const f=g._f;f&&(!f.disabled&&S(a,i,Rt(l,f)),c=we(f.ref)&&Z(l)?"":l,Ct(f.ref)?[...f.ref.options].forEach(v=>v.selected=c.includes(v.value)):f.refs?pe(f.ref)?f.refs.forEach(v=>{(!v.defaultChecked||!v.disabled)&&(Array.isArray(c)?v.checked=!!c.find(C=>C===v.value):v.checked=c===v.value||!!c)}):f.refs.forEach(v=>v.checked=v.value===c):He(f.ref)?f.ref.value="":(f.ref.value=c,f.ref.type||h.state.next({name:i,values:P(a)})))}(u.shouldDirty||u.shouldTouch)&&q(i,c,u.shouldTouch,u.shouldDirty,!0),u.shouldValidate&&me(i)},R=(i,l,u)=>{for(const g in l){if(!l.hasOwnProperty(g))return;const c=l[g],f=i+"."+g,v=y(s,f);(d.array.has(i)||j(c)||v&&!v._f)&&!de(c)?R(f,c,u):$(f,c,u)}},L=(i,l,u={})=>{const g=y(s,i),c=d.array.has(i),f=P(l);S(a,i,f),c?(h.array.next({name:i,values:P(a)}),(m.isDirty||m.dirtyFields||V.isDirty||V.dirtyFields)&&u.shouldDirty&&h.state.next({name:i,dirtyFields:ce(n,a),isDirty:w(i,f)})):g&&!g._f&&!Z(f)?R(i,f,u):$(i,f,u),ct(i,d)?h.state.next({...t,name:i,values:P(a)}):h.state.next({name:o.mount?i:void 0,values:P(a)})},ye=async i=>{o.mount=!0;const l=i.target;let u=l.name,g=!0;const c=y(s,u),f=D=>{g=Number.isNaN(D)||de(D)&&isNaN(D.getTime())||ie(D,y(a,u,D))},v=dt(r.mode),C=dt(r.reValidateMode);if(c){let D,K;const ue=l.type?ut(c._f):Ft(i),ne=i.type===Fe.BLUR||i.type===Fe.FOCUS_OUT,Bt=!wr(c._f)&&!r.resolver&&!y(t.errors,u)&&!c._f.deps||Ar(ne,y(t.touchedFields,u),t.isSubmitted,C,v),Se=ct(u,d,ne);S(a,u,ue),ne?(!l||!l.readOnly)&&(c._f.onBlur&&c._f.onBlur(i),b&&b(0)):c._f.onChange&&c._f.onChange(i);const Re=q(u,ue,ne),jt=!Y(Re)||Se;if(!ne&&h.state.next({name:u,type:i.type,values:P(a)}),Bt)return(m.isValid||V.isValid)&&(r.mode==="onBlur"?ne&&U():ne||U()),jt&&h.state.next({name:u,...Se?{}:Re});if(!ne&&Se&&h.state.next({...t}),r.resolver){const{errors:tt}=await W([u]);if(M([u]),f(ue),g){const qt=yt(t.errors,s,u),rt=yt(tt,s,qt.name||u);D=rt.error,u=rt.name,K=Y(tt)}}else M([u],!0),D=(await mt(c,d.disabled,a,O,r.shouldUseNativeValidation))[u],M([u]),f(ue),g&&(D?K=!1:(m.isValid||V.isValid)&&(K=await z(s,!0)));g&&(c._f.deps&&(!Array.isArray(c._f.deps)||c._f.deps.length>0)&&me(c._f.deps),te(u,K,D,Re))}},ge=(i,l)=>{if(y(t.errors,l)&&i.focus)return i.focus(),1},me=async(i,l={})=>{let u,g;const c=be(i);if(r.resolver){const f=await X(I(i)?i:c);u=Y(f),g=i?!c.some(v=>y(f,v)):u}else i?(g=(await Promise.all(c.map(async f=>{const v=y(s,f);return await z(v&&v._f?{[f]:v}:v)}))).every(Boolean),!(!g&&!t.isValid)&&U()):g=u=await z(s);return h.state.next({...!Q(i)||(m.isValid||V.isValid)&&u!==t.isValid?{}:{name:i},...r.resolver||!i?{isValid:u}:{},errors:t.errors}),l.shouldFocus&&!g&&Ve(s,ge,i?c:d.mount),g},ze=(i,l)=>{let u={...o.mount?a:n};return l&&(u=At(l.dirtyFields?t.dirtyFields:t.touchedFields,u)),I(i)?u:Q(i)?y(u,i):i.map(g=>y(u,g))},Ke=(i,l)=>({invalid:!!y((l||t).errors,i),isDirty:!!y((l||t).dirtyFields,i),error:y((l||t).errors,i),isValidating:!!y(t.validatingFields,i),isTouched:!!y((l||t).touchedFields,i)}),It=i=>{i&&be(i).forEach(l=>B(t.errors,l)),h.state.next({errors:i?t.errors:{}})},Ye=(i,l,u)=>{const g=(y(s,i,{_f:{}})._f||{}).ref,c=y(t.errors,i)||{},{ref:f,message:v,type:C,...D}=c;S(t.errors,i,{...D,...l,ref:g}),h.state.next({name:i,errors:t.errors,isValid:!1}),u&&u.shouldFocus&&g&&g.focus&&g.focus()},Tt=(i,l)=>G(i)?h.state.subscribe({next:u=>"values"in u&&i(k(void 0,l),u)}):k(i,l,!0),Ge=i=>h.state.subscribe({next:l=>{kr(i.name,l.name,i.exact)&&Er(l,i.formState||m,Pt,i.reRenderRoot)&&i.callback({values:{...a},...t,...l,defaultValues:n})}}).unsubscribe,Mt=i=>(o.mount=!0,V={...V,...i.formState},Ge({...i,formState:{...A,...i.formState}})),Ae=(i,l={})=>{for(const u of i?be(i):d.mount)d.mount.delete(u),d.array.delete(u),l.keepValue||(B(s,u),B(a,u)),!l.keepError&&B(t.errors,u),!l.keepDirty&&B(t.dirtyFields,u),!l.keepTouched&&B(t.touchedFields,u),!l.keepIsValidating&&B(t.validatingFields,u),!r.shouldUnregister&&!l.keepDefaultValue&&B(n,u);h.state.next({values:P(a)}),h.state.next({...t,...l.keepDirty?{isDirty:w()}:{}}),!l.keepIsValid&&U()},Ze=({disabled:i,name:l})=>{if(J(i)&&o.mount||i||d.disabled.has(l)){const c=d.disabled.has(l)!==!!i;i?d.disabled.add(l):d.disabled.delete(l),c&&o.mount&&!o.action&&U()}},Ce=(i,l={})=>{let u=y(s,i);const g=J(l.disabled)||J(r.disabled);return S(s,i,{...u||{},_f:{...u&&u._f?u._f:{ref:{name:i}},name:i,mount:!0,...l}}),d.mount.add(i),u?Ze({disabled:J(l.disabled)?l.disabled:r.disabled,name:i}):E(i,!0,l.value),{...g?{disabled:l.disabled||r.disabled}:{},...r.progressive?{required:!!l.required,min:ve(l.min),max:ve(l.max),minLength:ve(l.minLength),maxLength:ve(l.maxLength),pattern:ve(l.pattern)}:{},name:i,onChange:ye,onBlur:ye,ref:c=>{if(c){Ce(i,l),u=y(s,i);const f=I(c.value)&&c.querySelectorAll&&c.querySelectorAll("input,select,textarea")[0]||c,v=br(f),C=u._f.refs||[];if(v?C.find(D=>D===f):f===u._f.ref)return;S(s,i,{_f:{...u._f,...v?{refs:[...C.filter(Oe),f,...Array.isArray(y(n,i))?[{}]:[]],ref:{type:f.type,name:i}}:{ref:f}}}),E(i,!1,void 0,f)}else u=y(s,i,{}),u._f&&(u._f.mount=!1),(r.shouldUnregister||l.shouldUnregister)&&!(wt(d.array,i)&&o.action)&&d.unMount.add(i)}}},De=()=>r.shouldFocusError&&Ve(s,ge,d.mount),Nt=i=>{J(i)&&(h.state.next({disabled:i}),Ve(s,(l,u)=>{const g=y(s,u);g&&(l.disabled=g._f.disabled||i,Array.isArray(g._f.refs)&&g._f.refs.forEach(c=>{c.disabled=g._f.disabled||i}))},0,!1))},Je=(i,l)=>async u=>{let g;u&&(u.preventDefault&&u.preventDefault(),u.persist&&u.persist());let c=P(a);if(h.state.next({isSubmitting:!0}),r.resolver){const{errors:f,values:v}=await W();M(),t.errors=f,c=P(v)}else await z(s);if(d.disabled.size)for(const f of d.disabled)B(c,f);if(B(t.errors,"root"),Y(t.errors)){h.state.next({errors:{}});try{await i(c,u)}catch(f){g=f}}else l&&await l({...t.errors},u),De(),setTimeout(De);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Y(t.errors)&&!g,submitCount:t.submitCount+1,errors:t.errors}),g)throw g},Ut=(i,l={})=>{y(s,i)&&(I(l.defaultValue)?L(i,P(y(n,i))):(L(i,l.defaultValue),S(n,i,P(l.defaultValue))),l.keepTouched||B(t.touchedFields,i),l.keepDirty||(B(t.dirtyFields,i),t.isDirty=l.defaultValue?w(i,P(y(n,i))):w()),l.keepError||(B(t.errors,i),m.isValid&&U()),h.state.next({...t}))},Qe=(i,l={})=>{const u=i?P(i):n,g=P(u),c=Y(i),f=c?n:g;if(l.keepDefaultValues||(n=u),!l.keepValues){if(l.keepDirtyValues){const v=new Set([...d.mount,...Object.keys(ce(n,a))]);for(const C of Array.from(v)){const D=y(t.dirtyFields,C),K=y(a,C),ue=y(f,C);D&&!I(K)?S(f,C,K):!D&&!I(ue)&&L(C,ue)}}else{if(Le&&I(i))for(const v of d.mount){const C=y(s,v);if(C&&C._f){const D=Array.isArray(C._f.refs)?C._f.refs[0]:C._f.ref;if(we(D)){const K=D.closest("form");if(K){K.reset();break}}}}if(l.keepFieldsRef)for(const v of d.mount)L(v,y(f,v));else s={}}a=r.shouldUnregister?l.keepDefaultValues?P(n):{}:P(f),h.array.next({values:{...f}}),h.state.next({values:{...f}})}d={mount:l.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!m.isValid||!!l.keepIsValid||!!l.keepDirtyValues||!r.shouldUnregister&&!Y(f),o.watch=!!r.shouldUnregister,o.keepIsValid=!!l.keepIsValid,o.action=!1,l.keepErrors||(t.errors={}),h.state.next({submitCount:l.keepSubmitCount?t.submitCount:0,isDirty:c?!1:l.keepDirty?t.isDirty:!!(l.keepDefaultValues&&!ie(i,n)),isSubmitted:l.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:c?{}:l.keepDirtyValues?l.keepDefaultValues&&a?ce(n,a):t.dirtyFields:l.keepDefaultValues&&i?ce(n,i):l.keepDirty?t.dirtyFields:{},touchedFields:l.keepTouched?t.touchedFields:{},errors:l.keepErrors?t.errors:{},isSubmitSuccessful:l.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:n})},Xe=(i,l)=>Qe(G(i)?i(a):i,{...r.resetOptions,...l}),Lt=(i,l={})=>{const u=y(s,i),g=u&&u._f;if(g){const c=g.refs?g.refs[0]:g.ref;c.focus&&setTimeout(()=>{c.focus(),l.shouldSelect&&G(c.select)&&c.select()})}},Pt=i=>{t={...t,...i}},et={control:{register:Ce,unregister:Ae,getFieldState:Ke,handleSubmit:Je,setError:Ye,_subscribe:Ge,_runSchema:W,_updateIsValidating:M,_focusError:De,_getWatch:k,_getDirty:w,_setValid:U,_setFieldArray:p,_setDisabledField:Ze,_setErrors:F,_getFieldArray:N,_reset:Qe,_resetDefaultValues:()=>G(r.defaultValues)&&r.defaultValues().then(i=>{Xe(i,r.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:oe,_disableForm:Nt,_subjects:h,_proxyFormState:m,get _fields(){return s},get _formValues(){return a},get _state(){return o},set _state(i){o=i},get _defaultValues(){return n},get _names(){return d},set _names(i){d=i},get _formState(){return t},get _options(){return r},set _options(i){r={...r,...i}}},subscribe:Mt,trigger:me,register:Ce,handleSubmit:Je,watch:Tt,setValue:L,getValues:ze,reset:Xe,resetField:Ut,clearErrors:It,unregister:Ae,setError:Ye,setFocus:Lt,getFieldState:Ke};return{...et,formControl:et}}function qr(e={}){const r=_.useRef(void 0),t=_.useRef(void 0),[s,n]=_.useState({isDirty:!1,isValidating:!1,isLoading:G(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:G(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:s},e.defaultValues&&!G(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...d}=Rr(e);r.current={...d,formState:s}}const a=r.current.control;return a._options=e,qe(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>n({...a._formState}),reRenderRoot:!0});return n(d=>({...d,isReady:!0})),a._formState.isReady=!0,o},[a]),_.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),_.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),_.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),_.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),_.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==s.isDirty&&a._subjects.state.next({isDirty:o})}},[a,s.isDirty]),_.useEffect(()=>{var o;e.values&&!ie(e.values,t.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),t.current=e.values,n(d=>({...d}))):a._resetDefaultValues()},[a,e.values]),_.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),r.current.formState=_.useMemo(()=>kt(s,a),[a,s]),r.current}const vt=(e,r,t)=>{if(e&&"reportValidity"in e){const s=y(t,r);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},Ue=(e,r)=>{for(const t in r.fields){const s=r.fields[t];s&&s.ref&&"reportValidity"in s.ref?vt(s.ref,t,e):s&&s.refs&&s.refs.forEach(n=>vt(n,t,e))}},ht=(e,r)=>{r.shouldUseNativeValidation&&Ue(e,r);const t={};for(const s in e){const n=y(r.fields,s),a=Object.assign(e[s]||{},{ref:n&&n.ref});if(Or(r.names||Object.keys(e),s)){const o=Object.assign({},y(t,s));S(o,"root",a),S(t,s,o)}else S(t,s,a)}return t},Or=(e,r)=>{const t=bt(r);return e.some(s=>bt(s).match(`^${t}\\.\\d+`))};function bt(e){return e.replace(/\]|\[/g,"")}function Vt(e,r){try{var t=e()}catch(s){return r(s)}return t&&t.then?t.then(void 0,r):t}function Ir(e,r){for(var t={};e.length;){var s=e[0],n=s.code,a=s.message,o=s.path.join(".");if(!t[o])if("unionErrors"in s){var d=s.unionErrors[0].errors[0];t[o]={message:d.message,type:d.code}}else t[o]={message:a,type:n};if("unionErrors"in s&&s.unionErrors.forEach(function(A){return A.errors.forEach(function(m){return e.push(m)})}),r){var b=t[o].types,x=b&&b[s.code];t[o]=We(o,r,t,n,x?[].concat(x,s.message):s.message)}e.shift()}return t}function Tr(e,r){for(var t={};e.length;){var s=e[0],n=s.code,a=s.message,o=s.path.join(".");if(!t[o])if(s.code==="invalid_union"&&s.errors.length>0){var d=s.errors[0][0];t[o]={message:d.message,type:d.code}}else t[o]={message:a,type:n};if(s.code==="invalid_union"&&s.errors.forEach(function(A){return A.forEach(function(m){return e.push(m)})}),r){var b=t[o].types,x=b&&b[s.code];t[o]=We(o,r,t,n,x?[].concat(x,s.message):s.message)}e.shift()}return t}function Wr(e,r,t){if(t===void 0&&(t={}),(function(s){return"_def"in s&&typeof s._def=="object"&&"typeName"in s._def})(e))return function(s,n,a){try{return Promise.resolve(Vt(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](s,r)).then(function(o){return a.shouldUseNativeValidation&&Ue({},a),{errors:{},values:t.raw?Object.assign({},s):o}})},function(o){if((function(d){return Array.isArray(d?.issues)})(o))return{values:{},errors:ht(Ir(o.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};if((function(s){return"_zod"in s&&typeof s._zod=="object"})(e))return function(s,n,a){try{return Promise.resolve(Vt(function(){return Promise.resolve((t.mode==="sync"?Zt:Jt)(e,s,r)).then(function(o){return a.shouldUseNativeValidation&&Ue({},a),{errors:{},values:t.raw?Object.assign({},s):o}})},function(o){if((function(d){return d instanceof Qt})(o))return{values:{},errors:ht(Tr(o.issues,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};throw new Error("Invalid input: not a Zod schema")}function Hr(e){const r=_e.c(8);let t,s;r[0]!==e?({className:t,...s}=e,r[0]=e,r[1]=t,r[2]=s):(t=r[1],s=r[2]);let n;r[3]!==t?(n=xe("group/field-group @container/field-group flex w-full flex-col gap-4 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",t),r[3]=t,r[4]=n):n=r[4];let a;return r[5]!==s||r[6]!==n?(a=le.jsx("div",{className:n,"data-slot":"field-group",...s}),r[5]=s,r[6]=n,r[7]=a):a=r[7],a}const Mr=Xt("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col [&>*]:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"@md/field-group:flex-row flex-col @md/field-group:items-center @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:[&>*]:w-auto [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function $r(e){const r=_e.c(11);let t,s,n;r[0]!==e?({className:t,orientation:n,...s}=e,r[0]=e,r[1]=t,r[2]=s,r[3]=n):(t=r[1],s=r[2],n=r[3]);const a=n===void 0?"vertical":n;let o;r[4]!==t||r[5]!==a?(o=xe(Mr({orientation:a}),t),r[4]=t,r[5]=a,r[6]=o):o=r[6];let d;return r[7]!==a||r[8]!==s||r[9]!==o?(d=le.jsx("div",{className:o,"data-orientation":a,"data-slot":"field",role:"group",...s}),r[7]=a,r[8]=s,r[9]=o,r[10]=d):d=r[10],d}function zr(e){const r=_e.c(8);let t,s;r[0]!==e?({className:t,...s}=e,r[0]=e,r[1]=t,r[2]=s):(t=r[1],s=r[2]);let n;r[3]!==t?(n=xe("flex w-fit items-center gap-2 font-medium text-xs/relaxed leading-snug group-data-[disabled=true]/field:opacity-50",t),r[3]=t,r[4]=n):n=r[4];let a;return r[5]!==s||r[6]!==n?(a=le.jsx("div",{className:n,"data-slot":"field-label",...s}),r[5]=s,r[6]=n,r[7]=a):a=r[7],a}function Kr(e){const r=_e.c(15);let t,s,n,a;r[0]!==e?({className:s,children:t,errors:n,...a}=e,r[0]=e,r[1]=t,r[2]=s,r[3]=n,r[4]=a):(t=r[1],s=r[2],n=r[3],a=r[4]);let o;e:{if(t){o=t;break e}if(!n?.length){o=null;break e}let A;r[5]!==n?(A=[...new Map(n.map(Ur)).values()],r[5]=n,r[6]=A):A=r[6];const m=A;if(m?.length===1){o=m[0]?.message;break e}let V;r[7]!==m?(V=le.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:m.map(Nr)}),r[7]=m,r[8]=V):V=r[8],o=V}const d=o;if(!d)return null;let b;r[9]!==s?(b=xe("font-normal text-destructive text-xs/relaxed",s),r[9]=s,r[10]=b):b=r[10];let x;return r[11]!==d||r[12]!==a||r[13]!==b?(x=le.jsx("div",{className:b,"data-slot":"field-error",role:"alert",...a,children:d}),r[11]=d,r[12]=a,r[13]=b,r[14]=x):x=r[14],x}function Nr(e){return e?.message&&le.jsx("li",{children:e.message},e.message)}function Ur(e){return[e?.message,e]}export{jr as C,Kr as F,Br as I,Wr as a,zr as b,$r as c,Hr as d,ir as e,Ie as f,or as g,lr as h,ur as i,xt as j,tr as k,qr as u}; +import{r as ee,bs as re,X as Ht,E as st,bt as Wt,H as he,bu as $t,J as _t,ar as zt,ad as Kt,x as Yt,ab as Gt,j as le,c as _e,a as xe,bv as _,bw as Jt,bx as Zt,by as Xt,bz as Qt}from"./index.js";let it=(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})({});const er={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},tr={valid(e){return e===null?null:e?{[it.valid]:""}:{[it.invalid]:""}}},rr=ee.createContext({invalid:void 0,name:void 0,validityData:{state:er,errors:[],error:"",value:"",initialValue:null},setValidityData:re,disabled:void 0,touched:!1,setTouched:re,dirty:!1,setDirty:re,filled:!1,setFilled:re,focused:!1,setFocused:re,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=st)=>e,getInputValidationProps:(e=st)=>e,inputRef:{current:null},commit:async()=>{}}});function Te(e=!0){const r=ee.useContext(rr);if(r.setValidityData===re&&!e)throw new Error(Ht(28));return r}const sr=ee.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:re,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function ir(){return ee.useContext(sr)}const ar=ee.createContext({controlId:void 0,setControlId:re,labelId:void 0,setLabelId:re,messageIds:[],setMessageIds:re,getDescriptionProps:e=>e});function xt(){return ee.useContext(ar)}function nr(e,r){return{...e,state:{...e.state,valid:!r&&e.state.valid}}}function lr({controlled:e,default:r,name:t,state:s="value"}){const{current:n}=ee.useRef(e!==void 0),[a,o]=ee.useState(r),d=n?e:a,b=ee.useCallback(x=>{n||o(x)},[]);return[d,b]}function or(e={}){const{id:r,implicit:t=!1,controlRef:s}=e,{controlId:n,setControlId:a}=xt(),o=Wt(r);return he(()=>{if(!(!t&&!r||a===re)){if(t){const d=s?.current;$t(d)&&d.closest("label")!=null?a(r??null):a(n??o)}else r&&a(r);return()=>{r&&a(void 0)}}},[r,s,n,a,t,o]),n??o}function ur(e){const{enabled:r=!0,value:t,id:s,name:n,controlRef:a,commit:o}=e,{formRef:d}=ir(),{invalid:b,markedDirtyRef:x,validityData:C,setValidityData:m}=Te(),V=_t(e.getValue);he(()=>{if(!r)return;let h=t;h===void 0&&(h=V()),C.initialValue===null&&h!==null&&m(O=>({...O,initialValue:h}))},[r,m,t,C.initialValue,V]),he(()=>{!r||!s||d.current.fields.set(s,{getValue:V,name:n,controlRef:a,validityData:nr(C,b),validate(h=!0){let O=t;O===void 0&&(O=V()),x.current=!0,h?zt.flushSync(()=>o(O)):o(O)}})},[o,a,r,d,V,s,b,x,n,C,t]),he(()=>{const h=d.current.fields;return()=>{s&&h.delete(s)}},[d,s])}const dr=ee.forwardRef(function(r,t){const{render:s,className:n,id:a,name:o,value:d,disabled:b=!1,onValueChange:x,defaultValue:C,...m}=r,{state:V,name:h,disabled:O}=Te(),I=O||b,U=h??o,M=ee.useMemo(()=>({...V,disabled:I}),[V,I]),{setTouched:p,setDirty:W,validityData:F,setFocused:E,setFilled:q,validationMode:te,validation:H}=Te(),{labelId:Q}=xt(),z=or({id:a});he(()=>{const R=d!=null;H.inputRef.current?.value||R&&d!==""?q(!0):R&&d===""&&q(!1)},[H.inputRef,q,d]);const[oe,w]=lr({controlled:d,default:C,name:"FieldControl",state:"value"}),k=d!==void 0,N=_t((R,L)=>{x?.(R,L),!L.isCanceled&&w(R)});return ur({id:z,name:U,commit:H.commit,value:oe,getValue:()=>H.inputRef.current?.value,controlRef:H.inputRef}),Kt("input",r,{ref:t,state:M,props:[{id:z,disabled:I,name:U,ref:H.inputRef,"aria-labelledby":Q,...k?{value:oe}:{defaultValue:C},onChange(R){const L=R.currentTarget.value;N(L,Yt(Gt,R.nativeEvent)),W(L!==F.initialValue),q(L!=="")},onFocus(){E(!0)},onBlur(R){p(!0),E(!1),te==="onBlur"&&H.commit(R.currentTarget.value)},onKeyDown(R){R.currentTarget.tagName==="INPUT"&&R.key==="Enter"&&(p(!0),H.commit(R.currentTarget.value))}},H.getInputValidationProps(),m],stateAttributesMapping:tr})}),fr=ee.forwardRef(function(r,t){return le.jsx(dr,{ref:t,...r})});function Br(e){const r=_e.c(10);let t,s,n;r[0]!==e?({className:t,type:n,...s}=e,r[0]=e,r[1]=t,r[2]=s,r[3]=n):(t=r[1],s=r[2],n=r[3]);let a;r[4]!==t?(a=xe("h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm outline-none transition-colors file:inline-flex file:h-6 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-xs/relaxed placeholder:text-muted-foreground 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",t),r[4]=t,r[5]=a):a=r[5];let o;return r[6]!==s||r[7]!==a||r[8]!==n?(o=le.jsx(fr,{className:a,"data-slot":"input",type:n,...s}),r[6]=s,r[7]=a,r[8]=n,r[9]=o):o=r[9],o}var pe=e=>e.type==="checkbox",de=e=>e instanceof Date,J=e=>e==null;const pt=e=>typeof e=="object";var j=e=>!J(e)&&!Array.isArray(e)&&pt(e)&&!de(e),Ft=e=>j(e)&&e.target?pe(e.target)?e.target.checked:e.target.value:e,cr=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,wt=(e,r)=>e.has(cr(r)),yr=e=>{const r=e.constructor&&e.constructor.prototype;return j(r)&&r.hasOwnProperty("isPrototypeOf")},Le=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function P(e){if(e instanceof Date)return new Date(e);const r=typeof FileList<"u"&&e instanceof FileList;if(Le&&(e instanceof Blob||r))return e;const t=Array.isArray(e);if(!t&&!(j(e)&&yr(e)))return e;const s=t?[]:Object.create(Object.getPrototypeOf(e));for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(s[n]=P(e[n]));return s}var ke=e=>/^\w*$/.test(e),T=e=>e===void 0,Pe=e=>Array.isArray(e)?e.filter(Boolean):[],Be=e=>Pe(e.replace(/["|']|\]/g,"").split(/\.|\[/)),y=(e,r,t)=>{if(!r||!j(e))return t;const s=(ke(r)?[r]:Be(r)).reduce((n,a)=>J(n)?n:n[a],e);return T(s)||s===e?T(e[r])?t:e[r]:s},Z=e=>typeof e=="boolean",G=e=>typeof e=="function",S=(e,r,t)=>{let s=-1;const n=ke(r)?[r]:Be(r),a=n.length,o=a-1;for(;++s_.useContext(Et);var kt=(e,r,t,s=!0)=>{const n={defaultValues:r._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const o=a;return r._proxyFormState[o]!==se.all&&(r._proxyFormState[o]=!s||se.all),t&&(t[o]=!0),e[o]}});return n};const qe=typeof window<"u"?_.useLayoutEffect:_.useEffect;function gr(e){const r=je(),{control:t=r,disabled:s,name:n,exact:a}=e||{},[o,d]=_.useState(t._formState),b=_.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return qe(()=>t._subscribe({name:n,formState:b.current,exact:a,callback:x=>{!s&&d({...t._formState,...x})}}),[n,s,a]),_.useEffect(()=>{b.current.isValid&&t._setValid(!0)},[t]),_.useMemo(()=>kt(o,t,b.current,!1),[o,t])}var X=e=>typeof e=="string",Ie=(e,r,t,s,n)=>X(e)?(s&&r.watch.add(e),y(t,e,n)):Array.isArray(e)?e.map(a=>(s&&r.watch.add(a),y(t,a))):(s&&(r.watchAll=!0),t),Me=e=>J(e)||!pt(e);function ie(e,r,t=new WeakSet){if(Me(e)||Me(r))return Object.is(e,r);if(de(e)&&de(r))return Object.is(e.getTime(),r.getTime());const s=Object.keys(e),n=Object.keys(r);if(s.length!==n.length)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);for(const a of s){const o=e[a];if(!n.includes(a))return!1;if(a!=="ref"){const d=r[a];if(de(o)&&de(d)||j(o)&&j(d)||Array.isArray(o)&&Array.isArray(d)?!ie(o,d,t):!Object.is(o,d))return!1}}return!0}function mr(e){const r=je(),{control:t=r,name:s,defaultValue:n,disabled:a,exact:o,compute:d}=e||{},b=_.useRef(n),x=_.useRef(d),C=_.useRef(void 0),m=_.useRef(t),V=_.useRef(s);x.current=d;const[h,O]=_.useState(()=>{const F=t._getWatch(s,b.current);return x.current?x.current(F):F}),I=_.useCallback(F=>{const E=Ie(s,t._names,F||t._formValues,!1,b.current);return x.current?x.current(E):E},[t._formValues,t._names,s]),U=_.useCallback(F=>{if(!a){const E=Ie(s,t._names,F||t._formValues,!1,b.current);if(x.current){const q=x.current(E);ie(q,C.current)||(O(q),C.current=q)}else O(E)}},[t._formValues,t._names,a,s]);qe(()=>((m.current!==t||!ie(V.current,s))&&(m.current=t,V.current=s,U()),t._subscribe({name:s,formState:{values:!0},exact:o,callback:F=>{U(F.values)}})),[t,o,s,U]),_.useEffect(()=>t._removeUnmounted());const M=m.current!==t,p=V.current,W=_.useMemo(()=>{if(a)return null;const F=!M&&!ie(p,s);return M||F?I():null},[a,M,s,p,I]);return W!==null?W:h}function vr(e){const r=je(),{name:t,disabled:s,control:n=r,shouldUnregister:a,defaultValue:o,exact:d=!0}=e,b=wt(n._names.array,t),x=_.useMemo(()=>y(n._formValues,t,y(n._defaultValues,t,o)),[n,t,o]),C=mr({control:n,name:t,defaultValue:x,exact:d}),m=gr({control:n,name:t,exact:d}),V=_.useRef(e),h=_.useRef(void 0),O=_.useRef(n.register(t,{...e.rules,value:C,...Z(e.disabled)?{disabled:e.disabled}:{}}));V.current=e;const I=_.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!y(m.errors,t)},isDirty:{enumerable:!0,get:()=>!!y(m.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!y(m.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!y(m.validatingFields,t)},error:{enumerable:!0,get:()=>y(m.errors,t)}}),[m,t]),U=_.useCallback(F=>O.current.onChange({target:{value:Ft(F),name:t},type:Fe.CHANGE}),[t]),M=_.useCallback(()=>O.current.onBlur({target:{value:y(n._formValues,t),name:t},type:Fe.BLUR}),[t,n._formValues]),p=_.useCallback(F=>{const E=y(n._fields,t);E&&E._f&&F&&(E._f.ref={focus:()=>G(F.focus)&&F.focus(),select:()=>G(F.select)&&F.select(),setCustomValidity:q=>G(F.setCustomValidity)&&F.setCustomValidity(q),reportValidity:()=>G(F.reportValidity)&&F.reportValidity()})},[n._fields,t]),W=_.useMemo(()=>({name:t,value:C,...Z(s)||m.disabled?{disabled:m.disabled||s}:{},onChange:U,onBlur:M,ref:p}),[t,s,m.disabled,U,M,p,C]);return _.useEffect(()=>{const F=n._options.shouldUnregister||a,E=h.current;E&&E!==t&&!b&&n.unregister(E),n.register(t,{...V.current.rules,...Z(V.current.disabled)?{disabled:V.current.disabled}:{}});const q=(te,H)=>{const Q=y(n._fields,te);Q&&Q._f&&(Q._f.mount=H)};if(q(t,!0),F){const te=P(y(n._options.defaultValues,t,V.current.defaultValue));S(n._defaultValues,t,te),T(y(n._formValues,t))&&S(n._formValues,t,te)}return!b&&n.register(t),h.current=t,()=>{(b?F&&!n._state.action:F)?n.unregister(t):q(t,!1)}},[t,n,b,a]),_.useEffect(()=>{n._setDisabledField({disabled:s,name:t})},[s,t,n]),_.useMemo(()=>({field:W,formState:m,fieldState:I}),[W,m,I])}const jr=e=>e.render(vr(e)),hr=_.createContext(null);hr.displayName="HookFormContext";var He=(e,r,t,s,n)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:n||!0}}:{},be=e=>Array.isArray(e)?e:[e],at=()=>{let e=[];return{get observers(){return e},next:n=>{for(const a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(a=>a!==n)}}),unsubscribe:()=>{e=[]}}};function Ct(e,r){const t={};for(const s in e)if(e.hasOwnProperty(s)){const n=e[s],a=r[s];if(n&&j(n)&&a){const o=Ct(n,a);j(o)&&(t[s]=o)}else e[s]&&(t[s]=a)}return t}var Y=e=>j(e)&&!Object.keys(e).length,We=e=>e.type==="file",we=e=>{if(!Le)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},At=e=>e.type==="select-multiple",$e=e=>e.type==="radio",br=e=>$e(e)||pe(e),Oe=e=>we(e)&&e.isConnected;function Vr(e,r){const t=r.slice(0,-1).length;let s=0;for(;s{for(const r in e)if(G(e[r]))return!0;return!1};function Dt(e){return Array.isArray(e)||j(e)&&!xr(e)}function Ne(e,r={}){for(const t in e){const s=e[t];Dt(s)?(r[t]=Array.isArray(s)?[]:{},Ne(s,r[t])):T(s)||(r[t]=!0)}return r}function ce(e,r,t){t||(t=Ne(r));for(const s in e){const n=e[s];if(Dt(n))T(r)||Me(t[s])?t[s]=Ne(n,Array.isArray(n)?[]:{}):ce(n,J(r)?{}:r[s],t[s]);else{const a=r[s];t[s]=!ie(n,a)}}return t}const nt={value:!1,isValid:!1},lt={value:!0,isValid:!0};var St=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!T(e[0].attributes.value)?T(e[0].value)||e[0].value===""?lt:{value:e[0].value,isValid:!0}:lt:nt}return nt},Rt=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>T(e)?e:r?e===""?NaN:e&&+e:t&&X(e)?new Date(e):s?s(e):e;const ot={isValid:!1,value:null};var Ot=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,ot):ot;function ut(e){const r=e.ref;return We(r)?r.files:$e(r)?Ot(e.refs).value:At(r)?[...r.selectedOptions].map(({value:t})=>t):pe(r)?St(e.refs).value:Rt(T(r.value)?e.ref.value:r.value,e)}var pr=(e,r,t,s)=>{const n={};for(const a of e){const o=y(r,a);o&&S(n,a,o._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:s}},Ee=e=>e instanceof RegExp,ve=e=>T(e)?e:Ee(e)?e.source:j(e)?Ee(e.value)?e.value.source:e.value:e,dt=e=>({isOnSubmit:!e||e===se.onSubmit,isOnBlur:e===se.onBlur,isOnChange:e===se.onChange,isOnAll:e===se.all,isOnTouch:e===se.onTouched});const ft="AsyncFunction";var Fr=e=>!!e&&!!e.validate&&!!(G(e.validate)&&e.validate.constructor.name===ft||j(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===ft)),wr=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ct=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const Ve=(e,r,t,s)=>{for(const n of t||Object.keys(e)){const a=y(e,n);if(a){const{_f:o,...d}=a;if(o){if(o.refs&&o.refs[0]&&r(o.refs[0],n)&&!s)return!0;if(o.ref&&r(o.ref,o.name)&&!s)return!0;if(Ve(d,r))break}else if(j(d)&&Ve(d,r))break}}};function yt(e,r,t){const s=y(e,t);if(s||ke(t))return{error:s,name:t};const n=t.split(".");for(;n.length;){const a=n.join("."),o=y(r,a),d=y(e,a);if(o&&!Array.isArray(o)&&t!==a)return{name:t};if(d&&d.type)return{name:a,error:d};if(d&&d.root&&d.root.type)return{name:`${a}.root`,error:d.root};n.pop()}return{name:t}}var Er=(e,r,t,s)=>{t(e);const{name:n,...a}=e;return Y(a)||Object.keys(a).length>=Object.keys(r).length||Object.keys(a).find(o=>r[o]===(!s||se.all))},kr=(e,r,t)=>!e||!r||e===r||be(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s))),Cr=(e,r,t,s,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(r||e):(t?s.isOnBlur:n.isOnBlur)?!e:(t?s.isOnChange:n.isOnChange)?e:!0,Ar=(e,r)=>!Pe(y(e,r)).length&&B(e,r),Dr=(e,r,t)=>{const s=be(y(e,t));return S(s,"root",r[t]),S(e,t,s),e};function gt(e,r,t="validate"){if(X(e)||Array.isArray(e)&&e.every(X)||Z(e)&&!e)return{type:t,message:X(e)?e:"",ref:r}}var fe=e=>j(e)&&!Ee(e)?e:{value:e,message:""},mt=async(e,r,t,s,n,a)=>{const{ref:o,refs:d,required:b,maxLength:x,minLength:C,min:m,max:V,pattern:h,validate:O,name:I,valueAsNumber:U,mount:M}=e._f,p=y(t,I);if(!M||r.has(I))return{};const W=d?d[0]:o,F=w=>{n&&W.reportValidity&&(W.setCustomValidity(Z(w)?"":w||""),W.reportValidity())},E={},q=$e(o),te=pe(o),H=q||te,Q=(U||We(o))&&T(o.value)&&T(p)||we(o)&&o.value===""||p===""||Array.isArray(p)&&!p.length,z=He.bind(null,I,s,E),oe=(w,k,N,$=ae.maxLength,R=ae.minLength)=>{const L=w?k:N;E[I]={type:w?$:R,message:L,ref:o,...z(w?$:R,L)}};if(a?!Array.isArray(p)||!p.length:b&&(!H&&(Q||J(p))||Z(p)&&!p||te&&!St(d).isValid||q&&!Ot(d).isValid)){const{value:w,message:k}=X(b)?{value:!!b,message:b}:fe(b);if(w&&(E[I]={type:ae.required,message:k,ref:W,...z(ae.required,k)},!s))return F(k),E}if(!Q&&(!J(m)||!J(V))){let w,k;const N=fe(V),$=fe(m);if(!J(p)&&!isNaN(p)){const R=o.valueAsNumber||p&&+p;J(N.value)||(w=R>N.value),J($.value)||(k=R<$.value)}else{const R=o.valueAsDate||new Date(p),L=me=>new Date(new Date().toDateString()+" "+me),ye=o.type=="time",ge=o.type=="week";X(N.value)&&p&&(w=ye?L(p)>L(N.value):ge?p>N.value:R>new Date(N.value)),X($.value)&&p&&(k=ye?L(p)+w.value,$=!J(k.value)&&p.length<+k.value;if((N||$)&&(oe(N,w.message,k.message),!s))return F(E[I].message),E}if(h&&!Q&&X(p)){const{value:w,message:k}=fe(h);if(Ee(w)&&!p.match(w)&&(E[I]={type:ae.pattern,message:k,ref:o,...z(ae.pattern,k)},!s))return F(k),E}if(O){if(G(O)){const w=await O(p,t),k=gt(w,W);if(k&&(E[I]={...k,...z(ae.validate,k.message)},!s))return F(k.message),E}else if(j(O)){let w={};for(const k in O){if(!Y(w)&&!s)break;const N=gt(await O[k](p,t),W,k);N&&(w={...N,...z(k,N.message)},F(N.message),s&&(E[I]=w))}if(!Y(w)&&(E[I]={ref:W,...w},!s))return E}}return F(!0),E};const Sr={mode:se.onSubmit,reValidateMode:se.onChange,shouldFocusError:!0};function Rr(e={}){let r={...Sr,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:G(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},n=j(r.defaultValues)||j(r.values)?P(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:P(n),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},b,x=0;const C={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},m={...C};let V={...m};const h={array:at(),state:at()},O=r.criteriaMode===se.all,I=i=>l=>{clearTimeout(x),x=setTimeout(i,l)},U=async i=>{if(!o.keepIsValid&&!r.disabled&&(m.isValid||V.isValid||i)){let l;r.resolver?(l=Y((await H()).errors),M()):l=await z(s,!0),l!==t.isValid&&h.state.next({isValid:l})}},M=(i,l)=>{!r.disabled&&(m.isValidating||m.validatingFields||V.isValidating||V.validatingFields)&&((i||Array.from(d.mount)).forEach(u=>{u&&(l?S(t.validatingFields,u,l):B(t.validatingFields,u))}),h.state.next({validatingFields:t.validatingFields,isValidating:!Y(t.validatingFields)}))},p=(i,l=[],u,g,c=!0,f=!0)=>{if(g&&u&&!r.disabled){if(o.action=!0,f&&Array.isArray(y(s,i))){const v=u(y(s,i),g.argA,g.argB);c&&S(s,i,v)}if(f&&Array.isArray(y(t.errors,i))){const v=u(y(t.errors,i),g.argA,g.argB);c&&S(t.errors,i,v),Ar(t.errors,i)}if((m.touchedFields||V.touchedFields)&&f&&Array.isArray(y(t.touchedFields,i))){const v=u(y(t.touchedFields,i),g.argA,g.argB);c&&S(t.touchedFields,i,v)}(m.dirtyFields||V.dirtyFields)&&(t.dirtyFields=ce(n,a)),h.state.next({name:i,isDirty:w(i,l),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else S(a,i,l)},W=(i,l)=>{S(t.errors,i,l),h.state.next({errors:t.errors})},F=i=>{t.errors=i,h.state.next({errors:t.errors,isValid:!1})},E=(i,l,u,g)=>{const c=y(s,i);if(c){const f=y(a,i,T(u)?y(n,i):u);T(f)||g&&g.defaultChecked||l?S(a,i,l?f:ut(c._f)):$(i,f),o.mount&&!o.action&&U()}},q=(i,l,u,g,c)=>{let f=!1,v=!1;const A={name:i};if(!r.disabled){if(!u||g){(m.isDirty||V.isDirty)&&(v=t.isDirty,t.isDirty=A.isDirty=w(),f=v!==A.isDirty);const D=ie(y(n,i),l);v=!!y(t.dirtyFields,i),D?B(t.dirtyFields,i):S(t.dirtyFields,i,!0),A.dirtyFields=t.dirtyFields,f=f||(m.dirtyFields||V.dirtyFields)&&v!==!D}if(u){const D=y(t.touchedFields,i);D||(S(t.touchedFields,i,u),A.touchedFields=t.touchedFields,f=f||(m.touchedFields||V.touchedFields)&&D!==u)}f&&c&&h.state.next(A)}return f?A:{}},te=(i,l,u,g)=>{const c=y(t.errors,i),f=(m.isValid||V.isValid)&&Z(l)&&t.isValid!==l;if(r.delayError&&u?(b=I(()=>W(i,u)),b(r.delayError)):(clearTimeout(x),b=null,u?S(t.errors,i,u):B(t.errors,i)),(u?!ie(c,u):c)||!Y(g)||f){const v={...g,...f&&Z(l)?{isValid:l}:{},errors:t.errors,name:i};t={...t,...v},h.state.next(v)}},H=async i=>(M(i,!0),await r.resolver(a,r.context,pr(i||d.mount,s,r.criteriaMode,r.shouldUseNativeValidation))),Q=async i=>{const{errors:l}=await H(i);if(M(i),i)for(const u of i){const g=y(l,u);g?S(t.errors,u,g):B(t.errors,u)}else t.errors=l;return l},z=async(i,l,u={valid:!0})=>{for(const g in i){const c=i[g];if(c){const{_f:f,...v}=c;if(f){const A=d.array.has(f.name),D=c._f&&Fr(c._f);D&&m.validatingFields&&M([f.name],!0);const K=await mt(c,d.disabled,a,O,r.shouldUseNativeValidation&&!l,A);if(D&&m.validatingFields&&M([f.name]),K[f.name]&&(u.valid=!1,l||e.shouldUseNativeValidation))break;!l&&(y(K,f.name)?A?Dr(t.errors,K,f.name):S(t.errors,f.name,K[f.name]):B(t.errors,f.name))}!Y(v)&&await z(v,l,u)}}return u.valid},oe=()=>{for(const i of d.unMount){const l=y(s,i);l&&(l._f.refs?l._f.refs.every(u=>!Oe(u)):!Oe(l._f.ref))&&Ce(i)}d.unMount=new Set},w=(i,l)=>!r.disabled&&(i&&l&&S(a,i,l),!ie(ze(),n)),k=(i,l,u)=>Ie(i,d,{...o.mount?a:T(l)?n:X(i)?{[i]:l}:l},u,l),N=i=>Pe(y(o.mount?a:n,i,r.shouldUnregister?y(n,i,[]):[])),$=(i,l,u={})=>{const g=y(s,i);let c=l;if(g){const f=g._f;f&&(!f.disabled&&S(a,i,Rt(l,f)),c=we(f.ref)&&J(l)?"":l,At(f.ref)?[...f.ref.options].forEach(v=>v.selected=c.includes(v.value)):f.refs?pe(f.ref)?f.refs.forEach(v=>{(!v.defaultChecked||!v.disabled)&&(Array.isArray(c)?v.checked=!!c.find(A=>A===v.value):v.checked=c===v.value||!!c)}):f.refs.forEach(v=>v.checked=v.value===c):We(f.ref)?f.ref.value="":(f.ref.value=c,f.ref.type||h.state.next({name:i,values:P(a)})))}(u.shouldDirty||u.shouldTouch)&&q(i,c,u.shouldTouch,u.shouldDirty,!0),u.shouldValidate&&me(i)},R=(i,l,u)=>{for(const g in l){if(!l.hasOwnProperty(g))return;const c=l[g],f=i+"."+g,v=y(s,f);(d.array.has(i)||j(c)||v&&!v._f)&&!de(c)?R(f,c,u):$(f,c,u)}},L=(i,l,u={})=>{const g=y(s,i),c=d.array.has(i),f=P(l);S(a,i,f),c?(h.array.next({name:i,values:P(a)}),(m.isDirty||m.dirtyFields||V.isDirty||V.dirtyFields)&&u.shouldDirty&&h.state.next({name:i,dirtyFields:ce(n,a),isDirty:w(i,f)})):g&&!g._f&&!J(f)?R(i,f,u):$(i,f,u),ct(i,d)?h.state.next({...t,name:i,values:P(a)}):h.state.next({name:o.mount?i:void 0,values:P(a)})},ye=async i=>{o.mount=!0;const l=i.target;let u=l.name,g=!0;const c=y(s,u),f=D=>{g=Number.isNaN(D)||de(D)&&isNaN(D.getTime())||ie(D,y(a,u,D))},v=dt(r.mode),A=dt(r.reValidateMode);if(c){let D,K;const ue=l.type?ut(c._f):Ft(i),ne=i.type===Fe.BLUR||i.type===Fe.FOCUS_OUT,Bt=!wr(c._f)&&!r.resolver&&!y(t.errors,u)&&!c._f.deps||Cr(ne,y(t.touchedFields,u),t.isSubmitted,A,v),Se=ct(u,d,ne);S(a,u,ue),ne?(!l||!l.readOnly)&&(c._f.onBlur&&c._f.onBlur(i),b&&b(0)):c._f.onChange&&c._f.onChange(i);const Re=q(u,ue,ne),jt=!Y(Re)||Se;if(!ne&&h.state.next({name:u,type:i.type,values:P(a)}),Bt)return(m.isValid||V.isValid)&&(r.mode==="onBlur"?ne&&U():ne||U()),jt&&h.state.next({name:u,...Se?{}:Re});if(!ne&&Se&&h.state.next({...t}),r.resolver){const{errors:tt}=await H([u]);if(M([u]),f(ue),g){const qt=yt(t.errors,s,u),rt=yt(tt,s,qt.name||u);D=rt.error,u=rt.name,K=Y(tt)}}else M([u],!0),D=(await mt(c,d.disabled,a,O,r.shouldUseNativeValidation))[u],M([u]),f(ue),g&&(D?K=!1:(m.isValid||V.isValid)&&(K=await z(s,!0)));g&&(c._f.deps&&(!Array.isArray(c._f.deps)||c._f.deps.length>0)&&me(c._f.deps),te(u,K,D,Re))}},ge=(i,l)=>{if(y(t.errors,l)&&i.focus)return i.focus(),1},me=async(i,l={})=>{let u,g;const c=be(i);if(r.resolver){const f=await Q(T(i)?i:c);u=Y(f),g=i?!c.some(v=>y(f,v)):u}else i?(g=(await Promise.all(c.map(async f=>{const v=y(s,f);return await z(v&&v._f?{[f]:v}:v)}))).every(Boolean),!(!g&&!t.isValid)&&U()):g=u=await z(s);return h.state.next({...!X(i)||(m.isValid||V.isValid)&&u!==t.isValid?{}:{name:i},...r.resolver||!i?{isValid:u}:{},errors:t.errors}),l.shouldFocus&&!g&&Ve(s,ge,i?c:d.mount),g},ze=(i,l)=>{let u={...o.mount?a:n};return l&&(u=Ct(l.dirtyFields?t.dirtyFields:t.touchedFields,u)),T(i)?u:X(i)?y(u,i):i.map(g=>y(u,g))},Ke=(i,l)=>({invalid:!!y((l||t).errors,i),isDirty:!!y((l||t).dirtyFields,i),error:y((l||t).errors,i),isValidating:!!y(t.validatingFields,i),isTouched:!!y((l||t).touchedFields,i)}),Tt=i=>{i&&be(i).forEach(l=>B(t.errors,l)),h.state.next({errors:i?t.errors:{}})},Ye=(i,l,u)=>{const g=(y(s,i,{_f:{}})._f||{}).ref,c=y(t.errors,i)||{},{ref:f,message:v,type:A,...D}=c;S(t.errors,i,{...D,...l,ref:g}),h.state.next({name:i,errors:t.errors,isValid:!1}),u&&u.shouldFocus&&g&&g.focus&&g.focus()},It=(i,l)=>G(i)?h.state.subscribe({next:u=>"values"in u&&i(k(void 0,l),u)}):k(i,l,!0),Ge=i=>h.state.subscribe({next:l=>{kr(i.name,l.name,i.exact)&&Er(l,i.formState||m,Pt,i.reRenderRoot)&&i.callback({values:{...a},...t,...l,defaultValues:n})}}).unsubscribe,Mt=i=>(o.mount=!0,V={...V,...i.formState},Ge({...i,formState:{...C,...i.formState}})),Ce=(i,l={})=>{for(const u of i?be(i):d.mount)d.mount.delete(u),d.array.delete(u),l.keepValue||(B(s,u),B(a,u)),!l.keepError&&B(t.errors,u),!l.keepDirty&&B(t.dirtyFields,u),!l.keepTouched&&B(t.touchedFields,u),!l.keepIsValidating&&B(t.validatingFields,u),!r.shouldUnregister&&!l.keepDefaultValue&&B(n,u);h.state.next({values:P(a)}),h.state.next({...t,...l.keepDirty?{isDirty:w()}:{}}),!l.keepIsValid&&U()},Je=({disabled:i,name:l})=>{if(Z(i)&&o.mount||i||d.disabled.has(l)){const c=d.disabled.has(l)!==!!i;i?d.disabled.add(l):d.disabled.delete(l),c&&o.mount&&!o.action&&U()}},Ae=(i,l={})=>{let u=y(s,i);const g=Z(l.disabled)||Z(r.disabled);return S(s,i,{...u||{},_f:{...u&&u._f?u._f:{ref:{name:i}},name:i,mount:!0,...l}}),d.mount.add(i),u?Je({disabled:Z(l.disabled)?l.disabled:r.disabled,name:i}):E(i,!0,l.value),{...g?{disabled:l.disabled||r.disabled}:{},...r.progressive?{required:!!l.required,min:ve(l.min),max:ve(l.max),minLength:ve(l.minLength),maxLength:ve(l.maxLength),pattern:ve(l.pattern)}:{},name:i,onChange:ye,onBlur:ye,ref:c=>{if(c){Ae(i,l),u=y(s,i);const f=T(c.value)&&c.querySelectorAll&&c.querySelectorAll("input,select,textarea")[0]||c,v=br(f),A=u._f.refs||[];if(v?A.find(D=>D===f):f===u._f.ref)return;S(s,i,{_f:{...u._f,...v?{refs:[...A.filter(Oe),f,...Array.isArray(y(n,i))?[{}]:[]],ref:{type:f.type,name:i}}:{ref:f}}}),E(i,!1,void 0,f)}else u=y(s,i,{}),u._f&&(u._f.mount=!1),(r.shouldUnregister||l.shouldUnregister)&&!(wt(d.array,i)&&o.action)&&d.unMount.add(i)}}},De=()=>r.shouldFocusError&&Ve(s,ge,d.mount),Nt=i=>{Z(i)&&(h.state.next({disabled:i}),Ve(s,(l,u)=>{const g=y(s,u);g&&(l.disabled=g._f.disabled||i,Array.isArray(g._f.refs)&&g._f.refs.forEach(c=>{c.disabled=g._f.disabled||i}))},0,!1))},Ze=(i,l)=>async u=>{let g;u&&(u.preventDefault&&u.preventDefault(),u.persist&&u.persist());let c=P(a);if(h.state.next({isSubmitting:!0}),r.resolver){const{errors:f,values:v}=await H();M(),t.errors=f,c=P(v)}else await z(s);if(d.disabled.size)for(const f of d.disabled)B(c,f);if(B(t.errors,"root"),Y(t.errors)){h.state.next({errors:{}});try{await i(c,u)}catch(f){g=f}}else l&&await l({...t.errors},u),De(),setTimeout(De);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Y(t.errors)&&!g,submitCount:t.submitCount+1,errors:t.errors}),g)throw g},Ut=(i,l={})=>{y(s,i)&&(T(l.defaultValue)?L(i,P(y(n,i))):(L(i,l.defaultValue),S(n,i,P(l.defaultValue))),l.keepTouched||B(t.touchedFields,i),l.keepDirty||(B(t.dirtyFields,i),t.isDirty=l.defaultValue?w(i,P(y(n,i))):w()),l.keepError||(B(t.errors,i),m.isValid&&U()),h.state.next({...t}))},Xe=(i,l={})=>{const u=i?P(i):n,g=P(u),c=Y(i),f=c?n:g;if(l.keepDefaultValues||(n=u),!l.keepValues){if(l.keepDirtyValues){const v=new Set([...d.mount,...Object.keys(ce(n,a))]);for(const A of Array.from(v)){const D=y(t.dirtyFields,A),K=y(a,A),ue=y(f,A);D&&!T(K)?S(f,A,K):!D&&!T(ue)&&L(A,ue)}}else{if(Le&&T(i))for(const v of d.mount){const A=y(s,v);if(A&&A._f){const D=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(we(D)){const K=D.closest("form");if(K){K.reset();break}}}}if(l.keepFieldsRef)for(const v of d.mount)L(v,y(f,v));else s={}}a=r.shouldUnregister?l.keepDefaultValues?P(n):{}:P(f),h.array.next({values:{...f}}),h.state.next({values:{...f}})}d={mount:l.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!m.isValid||!!l.keepIsValid||!!l.keepDirtyValues||!r.shouldUnregister&&!Y(f),o.watch=!!r.shouldUnregister,o.keepIsValid=!!l.keepIsValid,o.action=!1,l.keepErrors||(t.errors={}),h.state.next({submitCount:l.keepSubmitCount?t.submitCount:0,isDirty:c?!1:l.keepDirty?t.isDirty:!!(l.keepDefaultValues&&!ie(i,n)),isSubmitted:l.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:c?{}:l.keepDirtyValues?l.keepDefaultValues&&a?ce(n,a):t.dirtyFields:l.keepDefaultValues&&i?ce(n,i):l.keepDirty?t.dirtyFields:{},touchedFields:l.keepTouched?t.touchedFields:{},errors:l.keepErrors?t.errors:{},isSubmitSuccessful:l.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:n})},Qe=(i,l)=>Xe(G(i)?i(a):i,{...r.resetOptions,...l}),Lt=(i,l={})=>{const u=y(s,i),g=u&&u._f;if(g){const c=g.refs?g.refs[0]:g.ref;c.focus&&setTimeout(()=>{c.focus(),l.shouldSelect&&G(c.select)&&c.select()})}},Pt=i=>{t={...t,...i}},et={control:{register:Ae,unregister:Ce,getFieldState:Ke,handleSubmit:Ze,setError:Ye,_subscribe:Ge,_runSchema:H,_updateIsValidating:M,_focusError:De,_getWatch:k,_getDirty:w,_setValid:U,_setFieldArray:p,_setDisabledField:Je,_setErrors:F,_getFieldArray:N,_reset:Xe,_resetDefaultValues:()=>G(r.defaultValues)&&r.defaultValues().then(i=>{Qe(i,r.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:oe,_disableForm:Nt,_subjects:h,_proxyFormState:m,get _fields(){return s},get _formValues(){return a},get _state(){return o},set _state(i){o=i},get _defaultValues(){return n},get _names(){return d},set _names(i){d=i},get _formState(){return t},get _options(){return r},set _options(i){r={...r,...i}}},subscribe:Mt,trigger:me,register:Ae,handleSubmit:Ze,watch:It,setValue:L,getValues:ze,reset:Qe,resetField:Ut,clearErrors:Tt,unregister:Ce,setError:Ye,setFocus:Lt,getFieldState:Ke};return{...et,formControl:et}}function qr(e={}){const r=_.useRef(void 0),t=_.useRef(void 0),[s,n]=_.useState({isDirty:!1,isValidating:!1,isLoading:G(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:G(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:s},e.defaultValues&&!G(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...d}=Rr(e);r.current={...d,formState:s}}const a=r.current.control;return a._options=e,qe(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>n({...a._formState}),reRenderRoot:!0});return n(d=>({...d,isReady:!0})),a._formState.isReady=!0,o},[a]),_.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),_.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),_.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),_.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),_.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==s.isDirty&&a._subjects.state.next({isDirty:o})}},[a,s.isDirty]),_.useEffect(()=>{var o;e.values&&!ie(e.values,t.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((o=a._options.resetOptions)===null||o===void 0)&&o.keepIsValid||a._setValid(),t.current=e.values,n(d=>({...d}))):a._resetDefaultValues()},[a,e.values]),_.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),r.current.formState=_.useMemo(()=>kt(s,a),[a,s]),r.current}const vt=(e,r,t)=>{if(e&&"reportValidity"in e){const s=y(t,r);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},Ue=(e,r)=>{for(const t in r.fields){const s=r.fields[t];s&&s.ref&&"reportValidity"in s.ref?vt(s.ref,t,e):s&&s.refs&&s.refs.forEach(n=>vt(n,t,e))}},ht=(e,r)=>{r.shouldUseNativeValidation&&Ue(e,r);const t={};for(const s in e){const n=y(r.fields,s),a=Object.assign(e[s]||{},{ref:n&&n.ref});if(Or(r.names||Object.keys(e),s)){const o=Object.assign({},y(t,s));S(o,"root",a),S(t,s,o)}else S(t,s,a)}return t},Or=(e,r)=>{const t=bt(r);return e.some(s=>bt(s).match(`^${t}\\.\\d+`))};function bt(e){return e.replace(/\]|\[/g,"")}function Vt(e,r){try{var t=e()}catch(s){return r(s)}return t&&t.then?t.then(void 0,r):t}function Tr(e,r){for(var t={};e.length;){var s=e[0],n=s.code,a=s.message,o=s.path.join(".");if(!t[o])if("unionErrors"in s){var d=s.unionErrors[0].errors[0];t[o]={message:d.message,type:d.code}}else t[o]={message:a,type:n};if("unionErrors"in s&&s.unionErrors.forEach(function(C){return C.errors.forEach(function(m){return e.push(m)})}),r){var b=t[o].types,x=b&&b[s.code];t[o]=He(o,r,t,n,x?[].concat(x,s.message):s.message)}e.shift()}return t}function Ir(e,r){for(var t={};e.length;){var s=e[0],n=s.code,a=s.message,o=s.path.join(".");if(!t[o])if(s.code==="invalid_union"&&s.errors.length>0){var d=s.errors[0][0];t[o]={message:d.message,type:d.code}}else t[o]={message:a,type:n};if(s.code==="invalid_union"&&s.errors.forEach(function(C){return C.forEach(function(m){return e.push(m)})}),r){var b=t[o].types,x=b&&b[s.code];t[o]=He(o,r,t,n,x?[].concat(x,s.message):s.message)}e.shift()}return t}function Hr(e,r,t){if(t===void 0&&(t={}),(function(s){return"_def"in s&&typeof s._def=="object"&&"typeName"in s._def})(e))return function(s,n,a){try{return Promise.resolve(Vt(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](s,r)).then(function(o){return a.shouldUseNativeValidation&&Ue({},a),{errors:{},values:t.raw?Object.assign({},s):o}})},function(o){if((function(d){return Array.isArray(d?.issues)})(o))return{values:{},errors:ht(Tr(o.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};if((function(s){return"_zod"in s&&typeof s._zod=="object"})(e))return function(s,n,a){try{return Promise.resolve(Vt(function(){return Promise.resolve((t.mode==="sync"?Jt:Zt)(e,s,r)).then(function(o){return a.shouldUseNativeValidation&&Ue({},a),{errors:{},values:t.raw?Object.assign({},s):o}})},function(o){if((function(d){return d instanceof Xt})(o))return{values:{},errors:ht(Ir(o.issues,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};throw new Error("Invalid input: not a Zod schema")}function Wr(e){const r=_e.c(8);let t,s;r[0]!==e?({className:t,...s}=e,r[0]=e,r[1]=t,r[2]=s):(t=r[1],s=r[2]);let n;r[3]!==t?(n=xe("group/field-group @container/field-group flex w-full flex-col gap-4 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",t),r[3]=t,r[4]=n):n=r[4];let a;return r[5]!==s||r[6]!==n?(a=le.jsx("div",{className:n,"data-slot":"field-group",...s}),r[5]=s,r[6]=n,r[7]=a):a=r[7],a}const Mr=Qt("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col [&>*]:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"@md/field-group:flex-row flex-col @md/field-group:items-center @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:[&>*]:w-auto [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function $r(e){const r=_e.c(11);let t,s,n;r[0]!==e?({className:t,orientation:n,...s}=e,r[0]=e,r[1]=t,r[2]=s,r[3]=n):(t=r[1],s=r[2],n=r[3]);const a=n===void 0?"vertical":n;let o;r[4]!==t||r[5]!==a?(o=xe(Mr({orientation:a}),t),r[4]=t,r[5]=a,r[6]=o):o=r[6];let d;return r[7]!==a||r[8]!==s||r[9]!==o?(d=le.jsx("div",{className:o,"data-orientation":a,"data-slot":"field",role:"group",...s}),r[7]=a,r[8]=s,r[9]=o,r[10]=d):d=r[10],d}function zr(e){const r=_e.c(8);let t,s;r[0]!==e?({className:t,...s}=e,r[0]=e,r[1]=t,r[2]=s):(t=r[1],s=r[2]);let n;r[3]!==t?(n=xe("flex w-fit items-center gap-2 font-medium text-xs/relaxed leading-snug group-data-[disabled=true]/field:opacity-50",t),r[3]=t,r[4]=n):n=r[4];let a;return r[5]!==s||r[6]!==n?(a=le.jsx("div",{className:n,"data-slot":"field-label",...s}),r[5]=s,r[6]=n,r[7]=a):a=r[7],a}function Kr(e){const r=_e.c(15);let t,s,n,a;r[0]!==e?({className:s,children:t,errors:n,...a}=e,r[0]=e,r[1]=t,r[2]=s,r[3]=n,r[4]=a):(t=r[1],s=r[2],n=r[3],a=r[4]);let o;e:{if(t){o=t;break e}if(!n?.length){o=null;break e}let C;r[5]!==n?(C=[...new Map(n.map(Ur)).values()],r[5]=n,r[6]=C):C=r[6];const m=C;if(m?.length===1){o=m[0]?.message;break e}let V;r[7]!==m?(V=le.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:m.map(Nr)}),r[7]=m,r[8]=V):V=r[8],o=V}const d=o;if(!d)return null;let b;r[9]!==s?(b=xe("font-normal text-destructive text-xs/relaxed",s),r[9]=s,r[10]=b):b=r[10];let x;return r[11]!==d||r[12]!==a||r[13]!==b?(x=le.jsx("div",{className:b,"data-slot":"field-error",role:"alert",...a,children:d}),r[11]=d,r[12]=a,r[13]=b,r[14]=x):x=r[14],x}function Nr(e){return e?.message&&le.jsx("li",{children:e.message},e.message)}function Ur(e){return[e?.message,e]}export{jr as C,Kr as F,Br as I,Hr as a,zr as b,$r as c,Wr as d,ir as e,Te as f,or as g,lr as h,ur as i,xt as j,tr as k,qr as u}; diff --git a/hive/services/hiveui/frontend/dist/assets/import-key-pair.js b/hive/services/hiveui/frontend/dist/assets/import-key-pair.js index 2ed54348b..292afa941 100644 --- a/hive/services/hiveui/frontend/dist/assets/import-key-pair.js +++ b/hive/services/hiveui/frontend/dist/assets/import-key-pair.js @@ -1 +1 @@ -import{c as O,u as $,i as q,j as t,B as H}from"./index.js";import{a as G,u as J,I as U,F as Q,b as R,c as z}from"./field.js";import{B as V}from"./back-link.js";import{E as W}from"./error-banner.js";import{P as X}from"./page-heading.js";import{T as Y}from"./textarea.js";import{a as Z}from"./ec2.js";import"./useMutation.js";function ce(){const e=O.c(53),s=$(),i=Z();let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={resolver:G(q)},e[0]=g):g=e[0];const{handleSubmit:_,register:l,formState:D}=J(g),{errors:r,isSubmitting:M}=D;let A;e[1]!==i||e[2]!==s?(A=async L=>{await i.mutateAsync(L),s({to:"/ec2/describe-key-pairs"})},e[1]=i,e[2]=s,e[3]=A):A=e[3];const v=A;let K,N;e[4]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(V,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),N=t.jsx(X,{title:"Import Key Pair"}),e[4]=K,e[5]=N):(K=e[4],N=e[5]);let a;e[6]!==i.error?(a=i.error&&t.jsx(W,{error:i.error,msg:"Failed to import key pair"}),e[6]=i.error,e[7]=a):a=e[7];let o;e[8]!==_||e[9]!==v?(o=_(v),e[8]=_,e[9]=v,e[10]=o):o=e[10];let P;e[11]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(R,{children:t.jsx("label",{htmlFor:"keyName",children:"Key Pair Name"})}),e[11]=P):P=e[11];const I=!!r.keyName;let c;e[12]!==l?(c=l("keyName"),e[12]=l,e[13]=c):c=e[13];let n;e[14]!==I||e[15]!==c?(n=t.jsx(U,{"aria-invalid":I,id:"keyName",placeholder:"my-key-pair…",...c}),e[14]=I,e[15]=c,e[16]=n):n=e[16];let m;e[17]!==r.keyName?(m=t.jsx(Q,{errors:[r.keyName]}),e[17]=r.keyName,e[18]=m):m=e[18];let p;e[19]!==n||e[20]!==m?(p=t.jsxs(z,{children:[P,n,m]}),e[19]=n,e[20]=m,e[21]=p):p=e[21];let S,B;e[22]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(R,{children:t.jsx("label",{htmlFor:"publicKeyMaterial",children:"Public Key"})}),B=t.jsx("p",{className:"text-muted-foreground text-xs",id:"publicKey-description",children:"Paste your OpenSSH public key (e.g. the contents of id_rsa.pub)"}),e[22]=S,e[23]=B):(S=e[22],B=e[23]);const E=!!r.publicKeyMaterial;let d;e[24]!==l?(d=l("publicKeyMaterial"),e[24]=l,e[25]=d):d=e[25];let y;e[26]!==E||e[27]!==d?(y=t.jsx(Y,{"aria-invalid":E,id:"publicKeyMaterial",placeholder:"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…",rows:8,...d}),e[26]=E,e[27]=d,e[28]=y):y=e[28];let f;e[29]!==r.publicKeyMaterial?(f=t.jsx(Q,{errors:[r.publicKeyMaterial]}),e[29]=r.publicKeyMaterial,e[30]=f):f=e[30];let u;e[31]!==y||e[32]!==f?(u=t.jsxs(z,{children:[S,B,y,f]}),e[31]=y,e[32]=f,e[33]=u):u=e[33];const C=M||i.isPending;let x;e[34]!==s?(x=()=>s({to:"/ec2/describe-key-pairs"}),e[34]=s,e[35]=x):x=e[35];let b;e[36]!==C||e[37]!==x?(b=t.jsx(H,{disabled:C,onClick:x,type:"button",variant:"outline",children:"Cancel"}),e[36]=C,e[37]=x,e[38]=b):b=e[38];const w=M||i.isPending,T=M||i.isPending?"Importing…":"Import Key Pair";let h;e[39]!==w||e[40]!==T?(h=t.jsx(H,{disabled:w,type:"submit",children:T}),e[39]=w,e[40]=T,e[41]=h):h=e[41];let j;e[42]!==b||e[43]!==h?(j=t.jsxs("div",{className:"flex gap-2",children:[b,h]}),e[42]=b,e[43]=h,e[44]=j):j=e[44];let k;e[45]!==p||e[46]!==u||e[47]!==j||e[48]!==o?(k=t.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:o,children:[p,u,j]}),e[45]=p,e[46]=u,e[47]=j,e[48]=o,e[49]=k):k=e[49];let F;return e[50]!==k||e[51]!==a?(F=t.jsxs(t.Fragment,{children:[K,N,a,k]}),e[50]=k,e[51]=a,e[52]=F):F=e[52],F}export{ce as component}; +import{c as O,u as $,i as q,j as t,B as H}from"./index.js";import{a as G,u as J,I as U,F as Q,b as R,c as z}from"./field.js";import{B as V}from"./back-link.js";import{E as W}from"./error-banner.js";import{P as X}from"./page-heading.js";import{T as Y}from"./textarea.js";import{a as Z}from"./ec2.js";function oe(){const e=O.c(53),s=$(),i=Z();let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={resolver:G(q)},e[0]=g):g=e[0];const{handleSubmit:_,register:l,formState:D}=J(g),{errors:r,isSubmitting:M}=D;let A;e[1]!==i||e[2]!==s?(A=async L=>{await i.mutateAsync(L),s({to:"/ec2/describe-key-pairs"})},e[1]=i,e[2]=s,e[3]=A):A=e[3];const v=A;let K,N;e[4]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(V,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),N=t.jsx(X,{title:"Import Key Pair"}),e[4]=K,e[5]=N):(K=e[4],N=e[5]);let a;e[6]!==i.error?(a=i.error&&t.jsx(W,{error:i.error,msg:"Failed to import key pair"}),e[6]=i.error,e[7]=a):a=e[7];let o;e[8]!==_||e[9]!==v?(o=_(v),e[8]=_,e[9]=v,e[10]=o):o=e[10];let P;e[11]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(R,{children:t.jsx("label",{htmlFor:"keyName",children:"Key Pair Name"})}),e[11]=P):P=e[11];const I=!!r.keyName;let c;e[12]!==l?(c=l("keyName"),e[12]=l,e[13]=c):c=e[13];let n;e[14]!==I||e[15]!==c?(n=t.jsx(U,{"aria-invalid":I,id:"keyName",placeholder:"my-key-pair…",...c}),e[14]=I,e[15]=c,e[16]=n):n=e[16];let m;e[17]!==r.keyName?(m=t.jsx(Q,{errors:[r.keyName]}),e[17]=r.keyName,e[18]=m):m=e[18];let p;e[19]!==n||e[20]!==m?(p=t.jsxs(z,{children:[P,n,m]}),e[19]=n,e[20]=m,e[21]=p):p=e[21];let S,B;e[22]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(R,{children:t.jsx("label",{htmlFor:"publicKeyMaterial",children:"Public Key"})}),B=t.jsx("p",{className:"text-muted-foreground text-xs",id:"publicKey-description",children:"Paste your OpenSSH public key (e.g. the contents of id_rsa.pub)"}),e[22]=S,e[23]=B):(S=e[22],B=e[23]);const E=!!r.publicKeyMaterial;let d;e[24]!==l?(d=l("publicKeyMaterial"),e[24]=l,e[25]=d):d=e[25];let y;e[26]!==E||e[27]!==d?(y=t.jsx(Y,{"aria-invalid":E,id:"publicKeyMaterial",placeholder:"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…",rows:8,...d}),e[26]=E,e[27]=d,e[28]=y):y=e[28];let f;e[29]!==r.publicKeyMaterial?(f=t.jsx(Q,{errors:[r.publicKeyMaterial]}),e[29]=r.publicKeyMaterial,e[30]=f):f=e[30];let u;e[31]!==y||e[32]!==f?(u=t.jsxs(z,{children:[S,B,y,f]}),e[31]=y,e[32]=f,e[33]=u):u=e[33];const C=M||i.isPending;let x;e[34]!==s?(x=()=>s({to:"/ec2/describe-key-pairs"}),e[34]=s,e[35]=x):x=e[35];let b;e[36]!==C||e[37]!==x?(b=t.jsx(H,{disabled:C,onClick:x,type:"button",variant:"outline",children:"Cancel"}),e[36]=C,e[37]=x,e[38]=b):b=e[38];const w=M||i.isPending,T=M||i.isPending?"Importing…":"Import Key Pair";let h;e[39]!==w||e[40]!==T?(h=t.jsx(H,{disabled:w,type:"submit",children:T}),e[39]=w,e[40]=T,e[41]=h):h=e[41];let j;e[42]!==b||e[43]!==h?(j=t.jsxs("div",{className:"flex gap-2",children:[b,h]}),e[42]=b,e[43]=h,e[44]=j):j=e[44];let k;e[45]!==p||e[46]!==u||e[47]!==j||e[48]!==o?(k=t.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:o,children:[p,u,j]}),e[45]=p,e[46]=u,e[47]=j,e[48]=o,e[49]=k):k=e[49];let F;return e[50]!==k||e[51]!==a?(F=t.jsxs(t.Fragment,{children:[K,N,a,k]}),e[50]=k,e[51]=a,e[52]=F):F=e[52],F}export{oe as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/index.js b/hive/services/hiveui/frontend/dist/assets/index.js index 3f3d29101..4a4c60740 100644 --- a/hive/services/hiveui/frontend/dist/assets/index.js +++ b/hive/services/hiveui/frontend/dist/assets/index.js @@ -1,13 +1,13 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login.js","assets/field.js","assets/index3.js","assets/useSuspenseQuery.js","assets/page-heading.js","assets/index4.js","assets/list-card.js","assets/create-bucket.js","assets/back-link.js","assets/error-banner.js","assets/s3.js","assets/useMutation.js","assets/create-volume.js","assets/ec2.js","assets/import-key-pair.js","assets/textarea.js","assets/create-key-pair.js","assets/alert-dialog.js","assets/check.js","assets/download.js","assets/run-instances.js","assets/index5.js","assets/upload-button.js","assets/trash-2.js","assets/index6.js","assets/badge.js","assets/index7.js","assets/index8.js","assets/state-badge.js","assets/index9.js","assets/_.js","assets/_id.js","assets/_id2.js","assets/detail-row.js","assets/_id3.js","assets/_id4.js","assets/ami-details.js","assets/_id5.js"])))=>i.map(i=>d[i]); -function yL(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const c of i)if(c.type==="childList")for(const l of c.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const c={};return i.integrity&&(c.integrity=i.integrity),i.referrerPolicy&&(c.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?c.credentials="include":i.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(i){if(i.ep)return;i.ep=!0;const c=n(i);fetch(i.href,c)}})();var H0e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hI(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function F0e(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var i=!1;try{i=this instanceof r}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var zy={exports:{}},Au={};var nR;function vL(){if(nR)return Au;nR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,c){var l=null;if(c!==void 0&&(l=""+c),i.key!==void 0&&(l=""+i.key),"key"in i){c={};for(var f in i)f!=="key"&&(c[f]=i[f])}else c=i;return i=c.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:c}}return Au.Fragment=t,Au.jsx=n,Au.jsxs=n,Au}var sR;function bL(){return sR||(sR=1,zy.exports=vL()),zy.exports}var U=bL(),Cp=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(){}},SL={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},_L=class{#e=SL;#n=!1;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)}},ov=new _L;function wL(e){setTimeout(e,0)}var Tp=typeof window>"u"||"Deno"in globalThis;function Sr(){}function EL(e,t){return typeof e=="function"?e(t):e}function xL(e){return typeof e=="number"&&e>=0&&e!==1/0}function RL(e,t){return Math.max(e+(t||0)-Date.now(),0)}function iv(e,t){return typeof e=="function"?e(t):e}function CL(e,t){return typeof e=="function"?e(t):e}function rR(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:c,queryKey:l,stale:f}=e;if(l){if(r){if(t.queryHash!==qv(l,t.options))return!1}else if(!nf(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||i&&i!==t.state.fetchStatus||c&&!c(t))}function oR(e,t){const{exact:n,status:r,predicate:i,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(n){if(tf(t.options.mutationKey)!==tf(c))return!1}else if(!nf(t.options.mutationKey,c))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function qv(e,t){return(t?.queryKeyHashFn||tf)(e)}function tf(e){return JSON.stringify(e,(t,n)=>av(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function nf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>nf(e[n],t[n])):!1}var TL=Object.prototype.hasOwnProperty;function pI(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=iR(e)&&iR(t);if(!r&&!(av(e)&&av(t)))return t;const c=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),f=l.length,d=r?new Array(f):{};let h=0;for(let y=0;y{ov.setTimeout(t,e)})}function IL(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?pI(e,t):t}function OL(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function ML(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Gv=Symbol();function mI(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Gv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function q0e(e,t){return typeof e=="function"?e(...t):!!e}function DL(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var kL=class extends Cp{#e;#n;#t;constructor(){super(),this.#t=e=>{if(!Tp&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},gI=new kL;function PL(){let e,t;const n=new Promise((i,c)=>{e=i,t=c});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var NL=wL;function zL(){let e=[],t=0,n=f=>{f()},r=f=>{f()},i=NL;const c=f=>{t?e.push(f):i(()=>{n(f)})},l=()=>{const f=e;e=[],f.length&&i(()=>{r(()=>{f.forEach(d=>{n(d)})})})};return{batch:f=>{let d;t++;try{d=f()}finally{t--,t||l()}return d},batchCalls:f=>(...d)=>{c(()=>{f(...d)})},schedule:c,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{r=f},setScheduler:f=>{i=f}}}var os=zL(),LL=class extends Cp{#e=!0;#n;#t;constructor(){super(),this.#t=e=>{if(!Tp&&window.addEventListener){const 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.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},jh=new LL;function BL(e){return Math.min(1e3*2**e,3e4)}function yI(e){return(e??"online")==="online"?jh.isOnline():!0}var cv=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function vI(e){let t=!1,n=0,r;const i=PL(),c=()=>i.status!=="pending",l=x=>{if(!c()){const R=new cv(x);v(R),e.onCancel?.(R)}},f=()=>{t=!0},d=()=>{t=!1},h=()=>gI.isFocused()&&(e.networkMode==="always"||jh.isOnline())&&e.canRun(),y=()=>yI(e.networkMode)&&e.canRun(),g=x=>{c()||(r?.(),i.resolve(x))},v=x=>{c()||(r?.(),i.reject(x))},b=()=>new Promise(x=>{r=R=>{(c()||h())&&x(R)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let x;const R=n===0?e.initialPromise:void 0;try{x=R??e.fn()}catch(C){x=Promise.reject(C)}Promise.resolve(x).then(g).catch(C=>{if(c())return;const A=e.retry??(Tp?0:3),O=e.retryDelay??BL,D=typeof O=="function"?O(n,C):O,N=A===!0||typeof A=="number"&&nh()?void 0:b()).then(()=>{t?v(C):_()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r?.(),i),cancelRetry:f,continueRetry:d,canStart:y,start:()=>(y()?_():b().then(_),i)}}var bI=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xL(this.gcTime)&&(this.#e=ov.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Tp?1/0:300*1e3))}clearGcTimeout(){this.#e&&(ov.clearTimeout(this.#e),this.#e=void 0)}},$L=class extends bI{#e;#n;#t;#r;#s;#i;#a;constructor(e){super(),this.#a=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#t=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=lR(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#s?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=lR(this.options);t.data!==void 0&&(this.setState(cR(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,t){const n=IL(this.state.data,e,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#s?.promise;return this.#s?.cancel(e),t?t.then(Sr).catch(Sr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>CL(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Gv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>iv(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:!RL(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#t.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.#s&&(this.#a?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(d=>d.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,r=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},i=()=>{const f=mI(this.options,t),h=(()=>{const y={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(y),y})();return this.#a=!1,this.options.persister?this.options.persister(f,h,this):f(h)},l=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(f),f})();this.options.behavior?.onFetch(l,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#o({type:"fetch",meta:l.fetchOptions?.meta}),this.#s=vI({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:f=>{f instanceof cv&&f.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(f,d)=>{this.#o({type:"failed",failureCount:f,error:d})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const f=await this.#s.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#t.config.onSuccess?.(f,this),this.#t.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof cv){if(f.silent)return this.#s.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#o({type:"error",error:f}),this.#t.config.onError?.(f,this),this.#t.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#o(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...UL(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...cR(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?r:void 0,r;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),os.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function UL(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:yI(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function cR(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function lR(e){const 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"}}function uR(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,c=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},d=0;const h=async()=>{let y=!1;const g=_=>{DL(_,()=>t.signal,()=>y=!0)},v=mI(t.options,t.fetchOptions),b=async(_,x,R)=>{if(y)return Promise.reject();if(x==null&&_.pages.length)return Promise.resolve(_);const A=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:x,direction:R?"backward":"forward",meta:t.options.meta};return g(j),j})(),O=await v(A),{maxPages:D}=t.options,N=R?ML:OL;return{pages:N(_.pages,O,D),pageParams:N(_.pageParams,x,D)}};if(i&&c.length){const _=i==="backward",x=_?jL:fR,R={pages:c,pageParams:l},C=x(r,R);f=await b(R,C,_)}else{const _=e??c.length;do{const x=d===0?l[0]??r.initialPageParam:fR(r,f);if(d>0&&x==null)break;f=await b(f,x),d++}while(d<_)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function fR(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function jL(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var HL=class extends bI{#e;#n;#t;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#n=[],this.state=e.state||FL(),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.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#s({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=vI({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(c,l)=>{this.#s({type:"failed",failureCount:c,error:l})},onPause:()=>{this.#s({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const r=this.state.status==="pending",i=!this.#r.canStart();try{if(r)t();else{this.#s({type:"pending",variables:e,isPaused:i}),this.#t.config.onMutate&&await this.#t.config.onMutate(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#s({type:"pending",context:l,variables:e,isPaused:i})}const c=await this.#r.start();return await this.#t.config.onSuccess?.(c,e,this.state.context,this,n),await this.options.onSuccess?.(c,e,this.state.context,n),await this.#t.config.onSettled?.(c,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(c,null,e,this.state.context,n),this.#s({type:"success",data:c}),c}catch(c){try{await this.#t.config.onError?.(c,e,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(c,e,this.state.context,n)}catch(l){Promise.reject(l)}try{await this.#t.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,c,e,this.state.context,n)}catch(l){Promise.reject(l)}throw this.#s({type:"error",error:c}),c}finally{this.#t.runNext(this)}}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),os.batch(()=>{this.#n.forEach(n=>{n.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function FL(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var VL=class extends Cp{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(e,t,n){const r=new HL({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=ah(e);if(typeof t=="string"){const n=this.#n.get(t);n?n.push(e):this.#n.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=ah(e);if(typeof t=="string"){const n=this.#n.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#n.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=ah(e);if(typeof t=="string"){const r=this.#n.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=ah(e);return typeof t=="string"?this.#n.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){os.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>oR(t,n))}findAll(e={}){return this.getAll().filter(t=>oR(e,t))}notify(e){os.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return os.batch(()=>Promise.all(e.map(t=>t.continue().catch(Sr))))}};function ah(e){return e.options.scope?.id}var qL=class extends Cp{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??qv(r,t);let c=this.get(i);return c||(c=new $L({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(c)),c}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){os.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>rR(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>rR(e,n)):t}notify(e){os.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){os.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){os.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},GL=class{#e;#n;#t;#r;#s;#i;#a;#o;constructor(e={}){this.#e=e.queryCache||new qL,this.#n=e.mutationCache||new VL,this.#t=e.defaultOptions||{},this.#r=new Map,this.#s=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=gI.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=jh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const 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(iv(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),c=this.#e.get(r.queryHash)?.state.data,l=EL(t,c);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return os.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;os.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return os.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=os.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Sr).catch(Sr)}invalidateQueries(e,t={}){return os.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=os.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let c=i.fetch(void 0,n);return n.throwOnError||(c=c.catch(Sr)),i.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(Sr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(iv(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Sr).catch(Sr)}fetchInfiniteQuery(e){return e.behavior=uR(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Sr).catch(Sr)}ensureInfiniteQueryData(e){return e.behavior=uR(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return jh.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(e){this.#t=e}setQueryDefaults(e,t){this.#r.set(tf(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{nf(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#s.set(tf(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(r=>{nf(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=qv(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===Gv&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#t.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},Ly={exports:{}},Ge={};var dR;function KL(){if(dR)return Ge;dR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),l=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function b(P){return P===null||typeof P!="object"?null:(P=v&&P[v]||P["@@iterator"],typeof P=="function"?P:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,R={};function C(P,ne,ie){this.props=P,this.context=ne,this.refs=R,this.updater=ie||_}C.prototype.isReactComponent={},C.prototype.setState=function(P,ne){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,ne,"setState")},C.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function A(){}A.prototype=C.prototype;function O(P,ne,ie){this.props=P,this.context=ne,this.refs=R,this.updater=ie||_}var D=O.prototype=new A;D.constructor=O,x(D,C.prototype),D.isPureReactComponent=!0;var N=Array.isArray;function j(){}var $={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function Z(P,ne,ie){var de=ie.ref;return{$$typeof:e,type:P,key:ne,ref:de!==void 0?de:null,props:ie}}function se(P,ne){return Z(P.type,ne,P.props)}function le(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function K(P){var ne={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(ie){return ne[ie]})}var Q=/\/+/g;function ye(P,ne){return typeof P=="object"&&P!==null&&P.key!=null?K(""+P.key):ne.toString(36)}function fe(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(j,j):(P.status="pending",P.then(function(ne){P.status==="pending"&&(P.status="fulfilled",P.value=ne)},function(ne){P.status==="pending"&&(P.status="rejected",P.reason=ne)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function q(P,ne,ie,de,Ce){var _e=typeof P;(_e==="undefined"||_e==="boolean")&&(P=null);var be=!1;if(P===null)be=!0;else switch(_e){case"bigint":case"string":case"number":be=!0;break;case"object":switch(P.$$typeof){case e:case t:be=!0;break;case y:return be=P._init,q(be(P._payload),ne,ie,de,Ce)}}if(be)return Ce=Ce(P),be=de===""?"."+ye(P,0):de,N(Ce)?(ie="",be!=null&&(ie=be.replace(Q,"$&/")+"/"),q(Ce,ne,ie,"",function(ht){return ht})):Ce!=null&&(le(Ce)&&(Ce=se(Ce,ie+(Ce.key==null||P&&P.key===Ce.key?"":(""+Ce.key).replace(Q,"$&/")+"/")+be)),ne.push(Ce)),1;be=0;var Ye=de===""?".":de+":";if(N(P))for(var He=0;He{const t=I.useContext(SI);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ZL=({client:e,children:t})=>(I.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),U.jsx(SI.Provider,{value:e,children:t}));const lv=new WeakMap,QL=new WeakMap,Hh={current:[]};let By=!1,Fu=0;const $u=new Set,ch=new Map;function wI(e){for(const t of e){if(Hh.current.includes(t))continue;Hh.current.push(t),t.recompute();const n=QL.get(t);if(n)for(const r of n){const i=lv.get(r);i?.length&&wI(i)}}}function YL(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function XL(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function EI(e){if(Fu>0&&!ch.has(e)&&ch.set(e,e.prevState),$u.add(e),!(Fu>0)&&!By)try{for(By=!0;$u.size>0;){const t=Array.from($u);$u.clear();for(const n of t){const r=ch.get(n)??n.prevState;n.prevState=r,YL(n)}for(const n of t){const r=lv.get(n);r&&(Hh.current.push(n),wI(r))}for(const n of t){const r=lv.get(n);if(r)for(const i of r)XL(i)}}}finally{By=!1,Hh.current=[],ch.clear()}}function Vu(e){Fu++;try{e()}finally{if(Fu--,Fu===0){const t=$u.values().next().value;t&&EI(t)}}}function WL(e){return typeof e=="function"}let JL=class{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var i,c;this.listeners.add(r);const l=(c=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:c.call(i,r,this);return()=>{this.listeners.delete(r),l?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,i;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):WL(t)?this.state=t(this.prevState):this.state=t,(i=(r=this.options)==null?void 0:r.onUpdate)==null||i.call(r),EI(this)}};const Ci="__TSR_index",pR="popstate",mR="beforeunload";function eB(e){let t=e.getLocation();const n=new Set,r=l=>{t=e.getLocation(),n.forEach(f=>f({location:t,action:l}))},i=l=>{e.notifyOnIndexChange??!0?r(l):t=e.getLocation()},c=async({task:l,navigateOpts:f,...d})=>{if(f?.ignoreBlocker??!1){l();return}const y=e.getBlockers?.()??[],g=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&y.length&&g)for(const v of y){const b=Fh(d.path,d.state);if(await v.blockerFn({currentLocation:t,nextLocation:b,action:d.type})){e.onBlocked?.();return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:l=>(n.add(l),()=>{n.delete(l)}),push:(l,f,d)=>{const h=t.state[Ci];f=gR(h+1,f),c({task:()=>{e.pushState(l,f),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:l,state:f})},replace:(l,f,d)=>{const h=t.state[Ci];f=gR(h,f),c({task:()=>{e.replaceState(l,f),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:l,state:f})},go:(l,f)=>{c({task:()=>{e.go(l),i({type:"GO",index:l})},navigateOpts:f,type:"GO"})},back:l=>{c({task:()=>{e.back(l?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{c({task:()=>{e.forward(l?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[Ci]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const f=e.getBlockers?.()??[];return e.setBlockers([...f,l]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(h=>h!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function gR(e,t){t||(t={});const n=Zv();return{...t,key:n,__TSR_key:n,[Ci]:e}}function tB(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const c=()=>i,l=k=>i=k,f=(k=>k),d=(()=>Fh(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const k=Zv();t.history.replaceState({[Ci]:0,key:k,__TSR_key:k},"")}let h=d(),y,g=!1,v=!1,b=!1,_=!1;const x=()=>h;let R,C;const A=()=>{R&&($._ignoreSubscribers=!0,(R.isPush?t.history.pushState:t.history.replaceState)(R.state,"",R.href),$._ignoreSubscribers=!1,R=void 0,C=void 0,y=void 0)},O=(k,Z,se)=>{const le=f(Z);C||(y=h),h=Fh(Z,se),R={href:le,state:se,isPush:R?.isPush||k==="push"},C||(C=Promise.resolve().then(()=>A()))},D=k=>{h=d(),$.notify({type:k})},N=async()=>{if(v){v=!1;return}const k=d(),Z=k.state[Ci]-h.state[Ci],se=Z===1,le=Z===-1,K=!se&&!le||g;g=!1;const Q=K?"GO":le?"BACK":"FORWARD",ye=K?{type:"GO",index:Z}:{type:le?"BACK":"FORWARD"};if(b)b=!1;else{const fe=c();if(typeof document<"u"&&fe.length){for(const q of fe)if(await q.blockerFn({currentLocation:h,nextLocation:k,action:Q})){v=!0,t.history.go(1),$.notify(ye);return}}}h=d(),$.notify(ye)},j=k=>{if(_){_=!1;return}let Z=!1;const se=c();if(typeof document<"u"&&se.length)for(const le of se){const K=le.enableBeforeUnload??!0;if(K===!0){Z=!0;break}if(typeof K=="function"&&K()===!0){Z=!0;break}}if(Z)return k.preventDefault(),k.returnValue=""},$=eB({getLocation:x,getLength:()=>t.history.length,pushState:(k,Z)=>O("push",k,Z),replaceState:(k,Z)=>O("replace",k,Z),back:k=>(k&&(b=!0),_=!0,t.history.back()),forward:k=>{k&&(b=!0),_=!0,t.history.forward()},go:k=>{g=!0,t.history.go(k)},createHref:k=>f(k),flush:A,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(mR,j,{capture:!0}),t.removeEventListener(pR,N)},onBlocked:()=>{y&&h!==y&&(h=y)},getBlockers:c,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(mR,j,{capture:!0}),t.addEventListener(pR,N),t.history.pushState=function(...k){const Z=n.apply(t.history,k);return $._ignoreSubscribers||D("PUSH"),Z},t.history.replaceState=function(...k){const Z=r.apply(t.history,k);return $._ignoreSubscribers||D("REPLACE"),Z},$}function nB(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Fh(e,t){const n=nB(e),r=n.indexOf("#"),i=n.indexOf("?"),c=Zv();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||{[Ci]:0,key:c,__TSR_key:c}}}function Zv(){return(Math.random()+1).toString(36).substring(7)}const sB=!1;function sf(e){return e[e.length-1]}function rB(e){return typeof e=="function"}function _i(e,t){return rB(e)?e(t):e}const oB=Object.prototype.hasOwnProperty,yR=Object.prototype.propertyIsEnumerable;function er(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=t,i=SR(e)&&SR(r);if(!i&&!(Vh(e)&&Vh(r)))return r;const c=i?e:vR(e);if(!c)return r;const l=i?r:vR(r);if(!l)return r;const f=c.length,d=l.length,h=i?new Array(d):{};let y=0;for(let g=0;g"u")return!0;const n=t.prototype;return!(!bR(n)||!n.hasOwnProperty("isPrototypeOf"))}function bR(e){return Object.prototype.toString.call(e)==="[object Object]"}function SR(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function xa(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;ri||!xa(e[l],t[l],n)))return!1;return i===c}return!1}function Wc(e){let t,n;const r=new Promise((i,c)=>{t=i,n=c});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,t(i),e?.(i)},r.reject=i=>{r.status="rejected",n(i)},r}function iB(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function Fc(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function aB(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function _R(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return aB(t)}const xI=["http:","https:","mailto:","tel:"];function qh(e){if(!e)return!1;try{const t=new URL(e);return!xI.includes(t.protocol)}catch{return!1}}const cB={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},lB=/[&><\u2028\u2029]/g;function uB(e){return e.replace(lB,t=>cB[t])}function $y(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,i="",c;for(;(c=n.exec(e))!==null;)i+=_R(e.slice(r,c.index))+c[0],r=n.lastIndex;return i=i+_R(r?e.slice(r):e),i.startsWith("//")&&(i="/"+i.replace(/^\/+/,"")),i}function fB(e){return/[^\u0000-\u007F]/.test(e)?e.replace(/[^\u0000-\u007F]/gu,encodeURIComponent):e}var dB="Invariant failed";function yo(e,t){if(!e)throw new Error(dB)}function Gh(e){const t=new Map;let n,r;const i=c=>{c.next&&(c.prev?(c.prev.next=c.next,c.next.prev=c.prev,c.next=void 0,r&&(r.next=c,c.prev=r)):(c.next.prev=void 0,n=c.next,c.next=void 0,r&&(c.prev=r,r.next=c)),r=c)};return{get(c){const l=t.get(c);if(l)return i(l),l.value},set(c,l){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===r&&(r=void 0)}const f=t.get(c);if(f)f.value=l,i(f);else{const d={key:c,value:l,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(c,d)}},clear(){t.clear(),n=void 0,r=void 0}}}const Jc=0,Ia=1,Oa=2,rf=3,Sa=4,RI=5;function hB(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function Qv(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),i=r===-1?e.length:r,c=e.substring(t,i);if(!c||!c.includes("$"))return n[0]=Jc,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(c==="$"){const f=e.length;return n[0]=Oa,n[1]=t,n[2]=t,n[3]=f,n[4]=f,n[5]=f,n}if(c.charCodeAt(0)===36)return n[0]=Ia,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const l=hB(c);if(l){const[f,d]=l,h=c.charCodeAt(f+1);if(h===45){if(f+2!k.skipOnParamError&&k.caseSensitive===D&&k.prefix===N&&k.suffix===j);if($)_=$;else{const k=jy(Ia,n.fullPath??n.from,D,N,j);_=k,k.depth=c,k.parent=i,i.dynamic??=[],i.dynamic.push(k)}break}case rf:{const A=d.substring(x,b[1]),O=d.substring(b[4],R),D=y&&!!(A||O),N=A?D?A:A.toLowerCase():void 0,j=O?D?O:O.toLowerCase():void 0,$=!g&&i.optional?.find(k=>!k.skipOnParamError&&k.caseSensitive===D&&k.prefix===N&&k.suffix===j);if($)_=$;else{const k=jy(rf,n.fullPath??n.from,D,N,j);_=k,k.parent=i,k.depth=c,i.optional??=[],i.optional.push(k)}break}case Oa:{const A=d.substring(x,b[1]),O=d.substring(b[4],R),D=y&&!!(A||O),N=A?D?A:A.toLowerCase():void 0,j=O?D?O:O.toLowerCase():void 0,$=jy(Oa,n.fullPath??n.from,D,N,j);_=$,$.parent=i,$.depth=c,i.wildcard??=[],i.wildcard.push($)}}i=_}if(g&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const b=_a(n.fullPath??n.from);b.kind=RI,b.parent=i,c++,b.depth=c,i.pathless??=[],i.pathless.push(b),i=b}const v=(n.path||!n.children)&&!n.isRoot;if(v&&d.endsWith("/")){const b=_a(n.fullPath??n.from);b.kind=Sa,b.parent=i,c++,b.depth=c,i.index=b,i=b}i.parse=n.options?.params?.parse??null,i.skipOnParamError=g,i.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,v&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const d of n.children)Ap(e,t,d,f,i,c,l)}function Uy(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function bi(e){if(e.pathless)for(const t of e.pathless)bi(t);if(e.static)for(const t of e.static.values())bi(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())bi(t);if(e.dynamic?.length){e.dynamic.sort(Uy);for(const t of e.dynamic)bi(t)}if(e.optional?.length){e.optional.sort(Uy);for(const t of e.optional)bi(t)}if(e.wildcard?.length){e.wildcard.sort(Uy);for(const t of e.wildcard)bi(t)}}function _a(e){return{kind:Jc,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function jy(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:i}}function pB(e,t){const n=_a("/"),r=new Uint16Array(6);for(const i of e)Ap(!1,r,i,1,n,0);bi(n),t.masksTree=n,t.flatCache=Gh(1e3)}function mB(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=Yv(e,t.masksTree);return t.flatCache.set(e,r),r}function gB(e,t,n,r,i){e||="/",r||="/";const c=t?`case\0${e}`:e;let l=i.singleCache.get(c);if(!l){l=_a("/");const f=new Uint16Array(6);Ap(t,f,{from:e},1,l,0),i.singleCache.set(c,l)}return Yv(r,l,n)}function yB(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||="/";let c;try{c=Yv(e,t.segmentTree,n)}catch(l){if(l instanceof URIError)c=null;else throw l}return c&&(c.branch=SB(c.route)),t.matchCache.set(r,c),c}function vB(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function bB(e,t=!1,n){const r=_a(e.fullPath),i=new Uint16Array(6),c={},l={};let f=0;return Ap(t,i,e,1,r,0,h=>{if(n?.(h,f),yo(!(h.id in c),`Duplicate routes found with id: ${String(h.id)}`),c[h.id]=h,f!==0&&h.path){const y=vB(h.fullPath);(!l[y]||h.fullPath.endsWith("/"))&&(l[y]=h)}f++}),bi(r),{processedTree:{segmentTree:r,singleCache:Gh(1e3),matchCache:Gh(1e3),flatCache:null,masksTree:null},routesById:c,routesByPath:l}}function Yv(e,t,n=!1){const r=e.split("/"),i=wB(e,r,t,n);if(!i)return null;const[c]=CI(e,r,i);return{route:i.node.route,rawParams:c,parsedParams:i.parsedParams}}function CI(e,t,n){const r=_B(n.node);let i=null;const c={};let l=n.extract?.part??0,f=n.extract?.node??0,d=n.extract?.path??0,h=n.extract?.segment??0;for(;f=0;le--){const K=v.optional[le];f.push({node:K,index:b,skipped:Z,depth:se,statics:R,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(!j)for(let le=v.optional.length-1;le>=0;le--){const K=v.optional[le],{prefix:Q,suffix:ye}=K;if(Q||ye){const fe=K.caseSensitive?$:k??=$.toLowerCase();if(Q&&!fe.startsWith(Q)||ye&&!fe.endsWith(ye))continue}f.push({node:K,index:b+1,skipped:_,depth:se,statics:R,dynamics:C,optionals:A+1,extract:O,rawParams:D,parsedParams:N})}}if(!j&&v.dynamic&&$)for(let Z=v.dynamic.length-1;Z>=0;Z--){const se=v.dynamic[Z],{prefix:le,suffix:K}=se;if(le||K){const Q=se.caseSensitive?$:k??=$.toLowerCase();if(le&&!Q.startsWith(le)||K&&!Q.endsWith(K))continue}f.push({node:se,index:b+1,skipped:_,depth:x+1,statics:R,dynamics:C+1,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(!j&&v.staticInsensitive){const Z=v.staticInsensitive.get(k??=$.toLowerCase());Z&&f.push({node:Z,index:b+1,skipped:_,depth:x+1,statics:R+1,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(!j&&v.static){const Z=v.static.get($);Z&&f.push({node:Z,index:b+1,skipped:_,depth:x+1,statics:R+1,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(v.pathless){const Z=x+1;for(let se=v.pathless.length-1;se>=0;se--){const le=v.pathless[se];f.push({node:le,index:b,skipped:_,depth:Z,statics:R,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}}}if(y&&d)return Iu(d,y)?y:d;if(y)return y;if(d)return d;if(r&&h){let g=h.index;for(let b=0;be.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Sa)>(e.node.kind===Sa)||t.node.kind===Sa==(e.node.kind===Sa)&&t.depth>e.depth))):!0}function Oh(e){return Xv(e.filter(t=>t!==void 0).join("/"))}function Xv(e){return e.replace(/\/{2,}/g,"/")}function TI(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ho(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function AI(e){return ho(TI(e))}function Kh(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function EB(e,t,n){return Kh(e,n)===Kh(t,n)}function xB({base:e,to:t,trailingSlash:n="never",cache:r}){const i=t.startsWith("/"),c=!i&&t===".";let l;if(r){l=i?t:c?e:e+"\0"+t;const g=r.get(l);if(g)return g}let f;if(c)f=e.split("/");else if(i)f=t.split("/");else{for(f=e.split("/");f.length>1&&sf(f)==="";)f.pop();const g=t.split("/");for(let v=0,b=g.length;v1&&(sf(f)===""?n==="never"&&f.pop():n==="always"&&f.push(""));let d,h="";for(let g=0;g0&&(h+="/");const v=f[g];if(!v)continue;d=Qv(v,0,d);const b=d[0];if(b===Jc){h+=v;continue}const _=d[5],x=v.substring(0,d[1]),R=v.substring(d[4],_),C=v.substring(d[2],d[3]);b===Ia?h+=x||R?`${x}{$${C}}${R}`:`$${C}`:b===Oa?h+=x||R?`${x}{$}${R}`:"$":h+=`${x}{-$${C}}${R}`}h=Xv(h);const y=h||"/";return l&&r&&r.set(l,y),y}function RB(e){const t=new Map(e.map(i=>[encodeURIComponent(i),i])),n=Array.from(t.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return i=>i.replace(r,c=>t.get(c)??c)}function Fy(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):CB(r,n)}function Vy({path:e,params:t,decoder:n}){let r=!1;const i={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:r};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:r};const c=e.length;let l=0,f,d="";for(;l{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function IB(){const e=TB();if(!e)return null;const t=e.getItem(uv);let n=t?JSON.parse(t):{};return{state:n,set:r=>{n=_i(r,n)||n;try{e.setItem(uv,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const lh=IB(),OB=e=>e.state.__TSR_key||e.href;function MB(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let Zh=!1;function DB({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:i,location:c}){let l;try{l=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const f=t||window.history.state?.__TSR_key,d=l[f];Zh=!0;e:{if(r&&d&&Object.keys(d).length>0){for(const g in d){const v=d[g];if(g==="window")window.scrollTo({top:v.scrollY,left:v.scrollX,behavior:n});else if(g){const b=document.querySelector(g);b&&(b.scrollLeft=v.scrollX,b.scrollTop=v.scrollY)}}break e}const h=(c??window.location).hash.split("#",2)[1];if(h){const g=window.history.state?.__hashScrollIntoViewOptions??!0;if(g){const v=document.getElementById(h);v&&v.scrollIntoView(g)}break e}const y={top:0,left:0,behavior:n};if(window.scrollTo(y),i)for(const g of i){if(g==="window")continue;const v=typeof g=="function"?g():document.querySelector(g);v&&v.scrollTo(y)}}Zh=!1}function kB(e,t){if(!lh||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!lh))return;e.isScrollRestorationSetup=!0,Zh=!1;const r=e.options.getScrollRestorationKey||OB;window.history.scrollRestoration="manual";const i=c=>{if(Zh||!e.isScrollRestoring)return;let l="";if(c.target===document||c.target===window)l="window";else{const d=c.target.getAttribute("data-scroll-restoration-id");d?l=`[data-scroll-restoration-id="${d}"]`:l=MB(c.target)}const f=r(e.state.location);lh.set(d=>{const h=d[f]||={},y=h[l]||={};if(l==="window")y.scrollX=window.scrollX||0,y.scrollY=window.scrollY||0;else if(l){const g=document.querySelector(l);g&&(y.scrollX=g.scrollLeft||0,y.scrollY=g.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",AB(i,100),!0),e.subscribe("onRendered",c=>{const l=r(c.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(DB({storageKey:uv,key:l,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&lh.set(f=>(f[l]||={},f)))})}function PB(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function NB(e,t=String){const n=new URLSearchParams;for(const r in e){const i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function qy(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function zB(e){const t=new URLSearchParams(e),n={};for(const[r,i]of t.entries()){const c=n[r];c==null?n[r]=qy(i):Array.isArray(c)?c.push(qy(i)):n[r]=[c,qy(i)]}return n}const LB=$B(JSON.parse),BB=UB(JSON.stringify,JSON.parse);function $B(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=zB(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function UB(e,t){const n=typeof t=="function";function r(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(n&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const c=NB(i,r);return c?`?${c}`:""}}const sr="__root__";function Wv(e){if(e.statusCode=e.statusCode||e.code||307,typeof e.href=="string"&&qh(e.href))throw new Error(`Redirect blocked: unsafe protocol in href "${e.href}". Only ${xI.join(", ")} protocols are allowed.`);if(!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function ir(e){return e instanceof Response&&!!e.options}const Mh=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Ip=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),Vc=(e,t,n=!0)=>{const r={...e.router.options.context??{}},i=n?t:t-1;for(let c=0;c<=i;c++){const l=e.matches[c];if(!l)continue;const f=e.router.getMatch(l.id);f&&Object.assign(r,f.__routeContext,f.__beforeLoadContext)}return r},II=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),yo(n.options.notFoundComponent);const r=e.matches.find(i=>i.routeId===n.id);yo(r,"Could not find match for route: "+n.id),e.updateMatch(r.id,i=>({...i,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,II(e,t))},wi=(e,t,n)=>{if(!(!ir(n)&&!Ps(n))){if(ir(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const r=ir(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,i=>({...i,status:r,context:Vc(e,t.index),isFetching:!1,error:n})),Ps(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw ir(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(II(e,n),n)}},OI=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,Ou=(e,t,n,r)=>{const{id:i,routeId:c}=e.matches[t],l=e.router.looseRoutesById[c];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,wi(e,e.router.getMatch(i),n);try{l.options.onError?.(n)}catch(f){n=f,wi(e,e.router.getMatch(i),n)}e.updateMatch(i,f=>(f._nonReactive.beforeLoadPromise?.resolve(),f._nonReactive.beforeLoadPromise=void 0,f._nonReactive.loadPromise?.resolve(),{...f,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},MI=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!Ip(e,t)&&(n.options.loader||n.options.beforeLoad||PI(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const l=setTimeout(()=>{Mh(e)},i);r._nonReactive.pendingTimeout=l}},jB=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;MI(e,t,n,r);const i=()=>{const c=e.router.getMatch(t);c.preload&&(c.status==="redirected"||c.status==="notFound")&&wi(e,c,c.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},HB=(e,t,n,r)=>{const i=e.router.getMatch(t),c=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Wc(()=>{c?.resolve()});const{paramsError:l,searchError:f}=i;l&&Ou(e,n,l,"PARSE_PARAMS"),f&&Ou(e,n,f,"VALIDATE_SEARCH"),MI(e,t,r,i);const d=new AbortController,h=e.matches[n-1]?.id;(h?e.router.getMatch(h):void 0)?.context??e.router.options.context;let g=!1;const v=()=>{g||(g=!0,e.updateMatch(t,j=>({...j,isFetching:"beforeLoad",fetchCount:j.fetchCount+1,abortController:d})))},b=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,j=>({...j,isFetching:!1}))};if(!r.options.beforeLoad){Vu(()=>{v(),b()});return}i._nonReactive.beforeLoadPromise=Wc();const _={...Vc(e,n,!1),...i.__routeContext},{search:x,params:R,cause:C}=i,A=Ip(e,t),O={search:x,abortController:d,params:R,preload:A,context:_,location:e.location,navigate:j=>e.router.navigate({...j,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:A?"preload":C,matches:e.matches,...e.router.options.additionalContext},D=j=>{if(j===void 0){Vu(()=>{v(),b()});return}(ir(j)||Ps(j))&&(v(),Ou(e,n,j,"BEFORE_LOAD")),Vu(()=>{v(),e.updateMatch(t,$=>({...$,__beforeLoadContext:j})),b()})};let N;try{if(N=r.options.beforeLoad(O),Fc(N))return v(),N.catch(j=>{Ou(e,n,j,"BEFORE_LOAD")}).then(D)}catch(j){v(),Ou(e,n,j,"BEFORE_LOAD")}D(N)},FB=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],c=()=>f(),l=()=>HB(e,n,t,i),f=()=>{if(OI(e,n))return;const d=jB(e,n,i);return Fc(d)?d.then(l):l()};return c()},VB=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const 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(([c,l,f])=>{const d=c?.meta,h=c?.links,y=c?.scripts,g=c?.styles;return{meta:d,links:h,headScripts:y,headers:f,scripts:l,styles:g}})},DI=(e,t,n,r)=>{const i=e.matchPromises[n-1],{params:c,loaderDeps:l,abortController:f,cause:d}=e.router.getMatch(t),h=Vc(e,n),y=Ip(e,t);return{params:c,deps:l,preload:!!y,parentMatchPromise:i,abortController:f,context:h,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:y?"preload":d,route:r,...e.router.options.additionalContext}},wR=async(e,t,n,r)=>{try{const i=e.router.getMatch(t);try{(!(sB??e.router.isServer)||i.ssr===!0)&&kI(r);const c=r.options.loader?.(DI(e,t,n,r)),l=r.options.loader&&Fc(c);if((l||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),r.options.loader){const h=l?await c:c;wi(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,y=>({...y,loaderData:h}))}r._lazyPromise&&await r._lazyPromise;const d=i._nonReactive.minPendingPromise;d&&await d,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,context:Vc(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let l=c;if(l?.name==="AbortError"){e.updateMatch(t,d=>({...d,status:d.status==="pending"?"success":d.status,isFetching:!1,context:Vc(e,n)}));return}const f=i._nonReactive.minPendingPromise;f&&await f,Ps(c)&&await r.options.notFoundComponent?.preload?.(),wi(e,e.router.getMatch(t),c);try{r.options.onError?.(c)}catch(d){l=d,wi(e,e.router.getMatch(t),d)}e.updateMatch(t,d=>({...d,error:l,context:Vc(e,n),status:"error",isFetching:!1}))}}catch(i){const c=e.router.getMatch(t);c&&(c._nonReactive.loaderPromise=void 0),wi(e,c,i)}},qB=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let i=!1,c=!1;const l=e.router.looseRoutesById[r];if(!OI(e,n)){const h=e.router.getMatch(n);if(h._nonReactive.loaderPromise){if(h.status==="success"&&!e.sync&&!h.preload)return h;await h._nonReactive.loaderPromise;const y=e.router.getMatch(n),g=y._nonReactive.error||y.error;g&&wi(e,y,g)}else{const y=Date.now()-h.updatedAt,g=Ip(e,n),v=g?l.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:l.options.staleTime??e.router.options.defaultStaleTime??0,b=l.options.shouldReload,_=typeof b=="function"?b(DI(e,n,t,l)):b,x=!!g&&!e.router.state.matches.some(O=>O.id===n),R=e.router.getMatch(n);R._nonReactive.loaderPromise=Wc(),x!==R.preload&&e.updateMatch(n,O=>({...O,preload:x}));const{status:C,invalid:A}=R;i=C==="success"&&(A||(_??y>v)),g&&l.options.preload===!1||(i&&!e.sync?(c=!0,(async()=>{try{await wR(e,n,t,l);const O=e.router.getMatch(n);O._nonReactive.loaderPromise?.resolve(),O._nonReactive.loadPromise?.resolve(),O._nonReactive.loaderPromise=void 0}catch(O){ir(O)&&await e.router.navigate(O.options)}})()):(C!=="success"||i&&e.sync)&&await wR(e,n,t,l))}}const f=e.router.getMatch(n);c||(f._nonReactive.loaderPromise?.resolve(),f._nonReactive.loadPromise?.resolve()),clearTimeout(f._nonReactive.pendingTimeout),f._nonReactive.pendingTimeout=void 0,c||(f._nonReactive.loaderPromise=void 0),f._nonReactive.dehydrated=void 0;const d=c?f.isFetching:!1;return d!==f.isFetching||f.invalid!==!1?(e.updateMatch(n,h=>({...h,isFetching:d,invalid:!1})),e.router.getMatch(n)):f};async function ER(e){const t=Object.assign(e,{matchPromises:[]});t.router.state.matches.some(n=>n._forcePending)&&Mh(t);try{for(let f=0;ff.status==="rejected").map(f=>f.reason);let c;for(const f of i){if(ir(f))throw f;!c&&Ps(f)&&(c=f)}for(const f of t.matches){const{id:d,routeId:h}=f,y=t.router.looseRoutesById[h];try{const g=VB(t,d,y);if(g){const v=await g;t.updateMatch(d,b=>({...b,...v}))}}catch(g){console.error(`Error executing head for route ${h}:`,g)}}if(c)throw c;const l=Mh(t);Fc(l)&&await l}catch(n){if(Ps(n)&&!t.preload){const r=Mh(t);throw Fc(r)&&await r,n}if(ir(n))throw n}return t.matches}async function kI(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const r of NI){const i=e.options[r]?.preload;i&&n.push(i())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function PI(e){for(const t of NI)if(e.options[t]?.preload)return!0;return!1}const NI=["component","errorComponent","pendingComponent","notFoundComponent"];function GB(e){return{input:({url:t})=>{for(const n of e)t=fv(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=zI(e[n],t);return t}}}function KB(e){const t=AI(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),c=e.caseSensitive?r:r.toLowerCase();return{input:({url:l})=>{const f=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return f===i?l.pathname="/":f.startsWith(c)&&(l.pathname=l.pathname.slice(n.length)),l},output:({url:l})=>(l.pathname=Oh(["/",t,l.pathname]),l)}}function fv(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function zI(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Ra(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,i=t?.href!==n.href,c=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:i,hashChanged:c}}class ZB{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options,i=this.basepath??r?.basepath??"/",c=this.basepath===void 0,l=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=RB(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=tB()),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 v;this.resolvePathCache=Gh(1e3),v=this.buildRouteTree(),this.setRoutes(v)}!this.__store&&this.latestLocation&&(this.__store=new JL(YB(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(v=>!["redirected"].includes(v.status))}}}),kB(this));let f=!1;const d=this.options.basepath??"/",h=this.options.rewrite;if(c||i!==d||l!==h){this.basepath=d;const v=[],b=AI(d);b&&b!=="/"&&v.push(KB({basepath:d})),h&&v.push(h),this.rewrite=v.length===0?void 0:v.length===1?v[0]:GB(v),this.history&&this.updateLatestLocation(),f=!0}f&&this.__store&&(this.__store.state={...this.state,location: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=()=>{const n=bB(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&pB(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const i=({href:d,state:h})=>{const y=new URL(d,this.origin),g=fv(this.rewrite,y),v=this.options.parseSearch(g.search),b=this.options.stringifySearch(v);return g.search=b,{href:g.href.replace(g.origin,""),publicHref:d,pathname:$y(g.pathname),external:!!this.rewrite&&g.origin!==this.origin,searchStr:b,search:er(r?.search,v),hash:$y(g.hash.split("#").reverse()[0]??""),state:er(r?.state,h)}},c=i(n),{__tempLocation:l,__tempKey:f}=c.state;if(l&&(!f||f===this.tempLocationKey)){const d=i(l);return d.state.key=c.state.key,d.state.__TSR_key=c.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:c}}return c},this.resolvePathWithBase=(n,r)=>xB({base:n,to:Xv(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},i):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>XB({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(c=>c.status==="pending"),r=this.state.matches.filter(c=>c.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(c=>{this.cancelMatch(c.id)})},this.buildLocation=n=>{const r=(c={})=>{const l=c._fromLocation||this.pendingBuiltLocation||this.latestLocation,f=this.matchRoutesLightweight(l);c.from;const d=c.unsafeRelative==="path"?l.pathname:c.from??f.fullPath,h=this.resolvePathWithBase(d,"."),y=f.search,g={...f.params},v=c.to?this.resolvePathWithBase(h,`${c.to}`):this.resolvePathWithBase(h,"."),b=c.params===!1||c.params===null?{}:(c.params??!0)===!0?g:Object.assign(g,_i(c.params,g)),_=Vy({path:v,params:b}).interpolatedPath,x=this.getMatchedRoutes(_);let R=x.matchedRoutes;if((x.foundRoute?x.foundRoute.path!=="/"&&x.routeParams["**"]:ho(_))&&(this.options.notFoundRoute?R=[...R,this.options.notFoundRoute]:xR(this.options.notFoundMode,R)),Object.keys(b).length>0)for(const K of R){const Q=K.options.params?.stringify??K.options.stringifyParams;Q&&Object.assign(b,Q(b))}const A=n.leaveParams?v:$y(Vy({path:v,params:b,decoder:this.pathParamsDecoder}).interpolatedPath);let O=y;if(n._includeValidateSearch&&this.options.search?.strict){const K={};R.forEach(Q=>{if(Q.options.validateSearch)try{Object.assign(K,Dh(Q.options.validateSearch,{...K,...O}))}catch{}}),O=K}O=WB({search:O,dest:c,destRoutes:R,_includeValidateSearch:n._includeValidateSearch}),O=er(y,O);const D=this.options.stringifySearch(O),N=c.hash===!0?l.hash:c.hash?_i(c.hash,l.hash):void 0,j=N?`#${N}`:"";let $=c.state===!0?l.state:c.state?_i(c.state,l.state):{};$=er(l.state,$);const k=`${A}${D}${j}`;let Z,se,le=!1;if(this.rewrite){const K=new URL(k,this.origin),Q=zI(this.rewrite,K);Z=K.href.replace(K.origin,""),Q.origin!==this.origin?(se=Q.href,le=!0):se=Q.pathname+Q.search+Q.hash}else Z=fB(k),se=Z;return{publicHref:se,href:Z,pathname:A,search:O,searchStr:D,state:$,hash:N??"",external:le,unmaskOnReload:c.unmaskOnReload}},i=(c={},l)=>{const f=r(c);let d=l?r(l):void 0;if(!d){const h={};if(this.options.routeMasks){const y=mB(f.pathname,this.processedTree);if(y){Object.assign(h,y.rawParams);const{from:g,params:v,...b}=y.route,_=v===!1||v===null?{}:(v??!0)===!0?h:Object.assign(h,_i(v,h));l={from:n.from,...b,params:_},d=r(l)}}}return d&&(f.maskedLocation=d),f};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...i})=>{const c=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(y=>{i.state[y]=this.latestLocation.state[y]});const h=xa(i.state,this.latestLocation.state);return d.forEach(y=>{delete i.state[y]}),h},l=ho(this.latestLocation.href)===ho(i.href),f=this.commitLocationPromise;if(this.commitLocationPromise=Wc(()=>{f?.resolve()}),l&&c())this.load();else{let{maskedLocation:d,hashScrollIntoView:h,...y}=i;d&&(y={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...y,search:y.searchStr,state:{...y.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(y.unmaskOnReload??this.options.unmaskOnReload??!1)&&(y.state.__tempKey=this.tempLocationKey)),y.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](y.publicHref,y.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:c,ignoreBlocker:l,href:f,...d}={})=>{if(f){const g=this.history.location.state.__TSR_index,v=Fh(f,{__TSR_index:n?g:g+1}),b=new URL(v.pathname,this.origin),_=fv(this.rewrite,b);d.to=_.pathname,d.search=this.options.parseSearch(v.search),d.hash=v.hash.slice(1)}const h=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const y=this.commitLocation({...h,viewTransition:c,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:c,...l})=>{let f=!1;if(i)try{new URL(`${i}`),f=!0}catch{}if(f&&!r&&(r=!0),r){if(n!==void 0||!i){const h=this.buildLocation({to:n,...l});i=i??h.publicHref,c=c??h.publicHref}const d=!f&&c?c:i;if(qh(d))return Promise.resolve();if(!l.ignoreBlocker){const y=this.history.getBlockers?.()??[];for(const g of y)if(g?.blockerFn&&await g.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return l.replace?window.location.replace(d):window.location.href=d,Promise.resolve()}return this.buildAndCommitLocation({...l,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(i=>!n.some(c=>c.id===i.id))}))},this.load=async n=>{let r,i,c;for(c=new Promise(f=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,h=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Ra({resolvedLocation:h,location:d})}),this.emit({type:"onBeforeLoad",...Ra({resolvedLocation:h,location:d})}),await ER({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let y=[],g=[],v=[];Vu(()=>{this.__store.setState(b=>{const _=b.matches,x=b.pendingMatches||b.matches;return y=_.filter(R=>!x.some(C=>C.id===R.id)),g=x.filter(R=>!_.some(C=>C.id===R.id)),v=x.filter(R=>_.some(C=>C.id===R.id)),{...b,isLoading:!1,loadedAt:Date.now(),matches:x,pendingMatches:void 0,cachedMatches:[...b.cachedMatches,...y.filter(R=>R.status!=="error"&&R.status!=="notFound")]}}),this.clearExpiredCache()}),[[y,"onLeave"],[g,"onEnter"],[v,"onStay"]].forEach(([b,_])=>{b.forEach(x=>{this.looseRoutesById[x.routeId].options[_]?.(x)})})})})}})}catch(d){ir(d)?(r=d,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Ps(d)&&(i=d),this.__store.setState(h=>({...h,statusCode:r?r.status:i?404:h.matches.some(y=>y.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===c&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=c,await c;this.latestLoadPromise&&c!==this.latestLoadPromise;)await this.latestLoadPromise;let l;this.hasNotFoundMatch()?l=404:this.__store.state.matches.some(f=>f.status==="error")&&(l=500),l!==void 0&&this.__store.setState(f=>({...f,statusCode:l}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const c=this.latestLocation,l=this.state.resolvedLocation,f=typeof r.types=="function"?r.types(Ra({resolvedLocation:l,location:c})):r.types;if(f===!1){n();return}i={update:n,types:f}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const i=this.state.pendingMatches?.some(c=>c.id===n)?"pendingMatches":this.state.matches.some(c=>c.id===n)?"matches":this.state.cachedMatches.some(c=>c.id===n)?"cachedMatches":"";i&&this.__store.setState(c=>({...c,[i]:c[i]?.map(l=>l.id===n?r(l):l)}))})},this.getMatch=n=>{const r=i=>i.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=i=>n?.filter?.(i)??!0?{...i,invalid:!0,...n?.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i;return this.__store.setState(i=>({...i,matches:i.matches.map(r),cachedMatches:i.cachedMatches.map(r),pendingMatches:i.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(n.options.href){if(r)try{const i=new URL(r);if(this.origin&&i.origin===this.origin){const c=i.pathname+i.search+i.hash;n.options.href=c,n.headers.set("Location",c)}}catch{}}else{const i=this.buildLocation(n.options),c=this.getParsedLocationHref(i);n.options.href=c,n.headers.set("Location",c)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(i=>({...i,cachedMatches:i.cachedMatches.filter(c=>!r(c))})):this.__store.setState(i=>({...i,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const i=this.looseRoutesById[r.routeId];if(!i.options.loader)return!0;const c=(r.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=c};this.clearCache({filter:n})},this.loadRouteChunk=kI,this.preloadRoute=async n=>{const r=this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const c=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(f=>f.id)),l=new Set([...c,...this.state.cachedMatches.map(f=>f.id)]);Vu(()=>{i.forEach(f=>{l.has(f.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,f]}))})});try{return i=await ER({router:this,matches:i,location:r,preload:!0,updateMatch:(f,d)=>{c.has(f)?i=i.map(h=>h.id===f?d(h):h):this.updateMatch(f,d)}}),i}catch(f){if(ir(f))return f.options.reloadDocument?void 0:await this.preloadRoute({...f.options,_fromLocation:r});Ps(f)||console.error(f);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},c=this.buildLocation(i);if(r?.pending&&this.state.status!=="pending")return!1;const f=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=gB(c.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,f.pathname,this.processedTree);return!d||n.params&&!xa(d.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?xa(f.search,c.search,{partial:!0})?d.rawParams:!1:d.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??BB,parseSearch:t.parseSearch??LB}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:t,routesByPath:n,processedTree:r}){this.routesById=t,this.routesByPath=n,this.processedTree=r;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:i,routeParams:c,parsedParams:l}=r;let{matchedRoutes:f}=r,d=!1;(i?i.path!=="/"&&c["**"]:ho(t.pathname))&&(this.options.notFoundRoute?f=[...f,this.options.notFoundRoute]:d=!0);const h=d?xR(this.options.notFoundMode,f):void 0,y=[],g=v=>v?.id?v.context??this.options.context??void 0:this.options.context??void 0;return f.forEach((v,b)=>{const _=y[b-1],[x,R,C]=(()=>{const ye=_?.search??t.search,fe=_?._strictSearch??void 0;try{const q=Dh(v.options.validateSearch,{...ye})??void 0;return[{...ye,...q},{...fe,...q},void 0]}catch(q){let W=q;if(q instanceof Qh||(W=new Qh(q.message,{cause:q})),n?.throwOnError)throw W;return[ye,{},W]}})(),A=v.options.loaderDeps?.({search:x})??"",O=A?JSON.stringify(A):"",{interpolatedPath:D,usedParams:N}=Vy({path:v.fullPath,params:c,decoder:this.pathParamsDecoder}),j=v.id+D+O,$=this.getMatch(j),k=this.state.matches.find(ye=>ye.routeId===v.id),Z=$?._strictParams??N;let se;if(!$)try{RR(v,N,l,Z)}catch(ye){if(Ps(ye)||ir(ye)?se=ye:se=new QB(ye.message,{cause:ye}),n?.throwOnError)throw se}Object.assign(c,Z);const le=k?"stay":"enter";let K;if($)K={...$,cause:le,params:k?er(k.params,c):c,_strictParams:Z,search:er(k?k.search:$.search,x),_strictSearch:R};else{const ye=v.options.loader||v.options.beforeLoad||v.lazyFn||PI(v)?"pending":"success";K={id:j,ssr:v.options.ssr,index:b,routeId:v.id,params:k?er(k.params,c):c,_strictParams:Z,pathname:D,updatedAt:Date.now(),search:k?er(k.search,x):x,_strictSearch:R,searchError:void 0,status:ye,isFetching:!1,error:void 0,paramsError:se,__routeContext:void 0,_nonReactive:{loadPromise:Wc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:le,loaderDeps:k?er(k.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:v.options.staticData||{},fullPath:v.fullPath}}n?.preload||(K.globalNotFound=h===v.id),K.searchError=C;const Q=g(_);K.context={...Q,...K.__routeContext,...K.__beforeLoadContext},y.push(K)}),y.forEach((v,b)=>{const _=this.looseRoutesById[v.routeId];if(!this.getMatch(v.id)){const R=y[b-1],C=g(R);if(_.options.context){const A={deps:v.loaderDeps,params:v.params,context:C??{},location:t,navigate:O=>this.navigate({...O,_fromLocation:t}),buildLocation:this.buildLocation,cause:v.cause,abortController:v.abortController,preload:!!v.preload,matches:y};v.__routeContext=_.options.context(A)??void 0}v.context={...C,...v.__routeContext,...v.__beforeLoadContext}}}),y}matchRoutesLightweight(t){const{matchedRoutes:n,routeParams:r,parsedParams:i}=this.getMatchedRoutes(t.pathname),c=sf(n),l={...t.search};for(const y of n)try{Object.assign(l,Dh(y.options.validateSearch,l))}catch{}const f=sf(this.state.matches),d=f&&f.routeId===c.id&&t.pathname===this.state.location.pathname;let h;if(d)h=f.params;else{const y={...r};for(const g of n)try{RR(g,r,i??{},y)}catch{}h=y}return{matchedRoutes:n,fullPath:c.fullPath,search:l,params:h}}}class Qh extends Error{}class QB extends Error{}function YB(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Dh(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Qh("Async validation not supported");if(n.issues)throw new Qh(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 XB({pathname:e,routesById:t,processedTree:n}){const r={},i=ho(e);let c,l;const f=yB(i,n,!0);return f&&(c=f.route,Object.assign(r,f.rawParams),l=Object.assign({},f.parsedParams)),{matchedRoutes:f?.branch||[t[sr]],routeParams:r,foundRoute:c,parsedParams:l}}function WB({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return JB(n)(e,t,r??!1)}function JB(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const i of e){if("search"in i.options)i.options.search?.middlewares&&t.middlewares.push(...i.options.search.middlewares);else if(i.options.preSearchFilters||i.options.postSearchFilters){const c=({search:l,next:f})=>{let d=l;"preSearchFilters"in i.options&&i.options.preSearchFilters&&(d=i.options.preSearchFilters.reduce((y,g)=>g(y),l));const h=f(d);return"postSearchFilters"in i.options&&i.options.postSearchFilters?i.options.postSearchFilters.reduce((y,g)=>g(y),h):h};t.middlewares.push(c)}if(i.options.validateSearch){const c=({search:l,next:f})=>{const d=f(l);if(!t._includeValidateSearch)return d;try{return{...d,...Dh(i.options.validateSearch,d)??void 0}}catch{return d}};t.middlewares.push(c)}}const n=({search:i})=>{const c=t.dest;return c.search?c.search===!0?i:_i(c.search,i):{}};t.middlewares.push(n);const r=(i,c,l)=>{if(i>=l.length)return c;const f=l[i];return f({search:c,next:h=>r(i+1,h,l)})};return function(c,l,f){return t.dest=l,t._includeValidateSearch=f,r(0,c,t.middlewares)}}function xR(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return sr}function RR(e,t,n,r){const i=e.options.params?.parse??e.options.parseParams;if(i)if(e.options.skipRouteOnParseError)for(const c in t)c in n&&(r[c]=n[c]);else{const c=i(r);Object.assign(r,c)}}const e6="Error preloading route! ☝️";class LI{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,i=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=sr:this.parentRoute||yo(!1);let c=i?sr:r?.path;c&&c!=="/"&&(c=TI(c));const l=r?.id||c;let f=i?sr:Oh([this.parentRoute.id===sr?"":this.parentRoute.id,l]);c===sr&&(c="/"),f!==sr&&(f=Oh(["/",f]));const d=f===sr?"/":Oh([this.parentRoute.fullPath,c]);this._path=c,this._id=f,this._fullPath=d,this._to=ho(d)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>Wv({from:this.fullPath,...n}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class t6 extends LI{constructor(t){super(t)}}const n6="use",CR=Kv[n6],uh=typeof window<"u"?I.useLayoutEffect:I.useEffect;function Gy(e){const t=I.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function s6(e,t,n={},r={}){I.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([c])=>{t(c)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function r6(e){const t=I.useRef(null);return I.useImperativeHandle(e,()=>t.current,[]),t}function Jv(e){const t=e.errorComponent??eb;return U.jsx(o6,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?I.createElement(t,{error:n,reset:r}):e.children})}class o6 extends I.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function eb({error:e}){const[t,n]=I.useState(!1);return U.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[U.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[U.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),U.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),U.jsx("div",{style:{height:".25rem"}}),t?U.jsx("div",{children:U.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?U.jsx("code",{children:e.message}):null})}):null]})}function i6({children:e,fallback:t=null}){return BI()?U.jsx(Xc.Fragment,{children:e}):U.jsx(Xc.Fragment,{children:t})}function BI(){return Xc.useSyncExternalStore(a6,()=>!0,()=>!1)}function a6(){return()=>{}}var Ky={exports:{}},Zy={},Qy={exports:{}},Yy={};var TR;function c6(){if(TR)return Yy;TR=1;var e=al();function t(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,c=e.useLayoutEffect,l=e.useDebugValue;function f(g,v){var b=v(),_=r({inst:{value:b,getSnapshot:v}}),x=_[0].inst,R=_[1];return c(function(){x.value=b,x.getSnapshot=v,d(x)&&R({inst:x})},[g,b,v]),i(function(){return d(x)&&R({inst:x}),g(function(){d(x)&&R({inst:x})})},[g]),l(b),b}function d(g){var v=g.getSnapshot;g=g.value;try{var b=v();return!n(g,b)}catch{return!0}}function h(g,v){return v()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return Yy.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Yy}var AR;function $I(){return AR||(AR=1,Qy.exports=c6()),Qy.exports}var IR;function l6(){if(IR)return Zy;IR=1;var e=al(),t=$I();function n(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,c=e.useRef,l=e.useEffect,f=e.useMemo,d=e.useDebugValue;return Zy.useSyncExternalStoreWithSelector=function(h,y,g,v,b){var _=c(null);if(_.current===null){var x={hasValue:!1,value:null};_.current=x}else x=_.current;_=f(function(){function C(j){if(!A){if(A=!0,O=j,j=v(j),b!==void 0&&x.hasValue){var $=x.value;if(b($,j))return D=$}return D=j}if($=D,r(O,j))return $;var k=v(j);return b!==void 0&&b($,k)?(O=j,$):(O=j,D=k)}var A=!1,O,D,N=g===void 0?null:g;return[function(){return C(y())},N===null?void 0:function(){return C(N())}]},[y,g,v,b]);var R=i(h,_[0],_[1]);return l(function(){x.hasValue=!0,x.value=R},[R]),d(R),R},Zy}var OR;function u6(){return OR||(OR=1,Ky.exports=l6()),Ky.exports}var UI=u6();function f6(e,t=r=>r,n={}){const r=n.equal??d6;return UI.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function d6(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!t.has(r)||!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=MR(e);if(n.length!==MR(t).length)return!1;for(let r=0;r"u"?Xy:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Xy,Xy)}function es(e){const t=I.useContext(jI());return e?.warn,t}function hn(e){const t=es({warn:e?.router===void 0}),n=e?.router||t,r=I.useRef(void 0);return f6(n.__store,i=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const c=er(r.current,e.select(i));return r.current=c,c}return e.select(i)}return i})}const Op=I.createContext(void 0),h6=I.createContext(void 0);function Nr(e){const t=I.useContext(e.from?h6:Op);return hn({select:r=>{const i=r.matches.find(c=>e.from?e.from===c.routeId:c.id===t);if(yo(!((e.shouldThrow??!0)&&!i),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),i!==void 0)return e.select?e.select(i):i},structuralSharing:e.structuralSharing})}function tb(e){return Nr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function nb(e){const{select:t,...n}=e;return Nr({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function sb(e){return Nr({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function rb(e){return Nr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Mp(e){const t=es();return I.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var Wy={exports:{}},Zn={};var DR;function p6(){if(DR)return Zn;DR=1;var e=al();function t(d){var h="https://react.dev/errors/"+d;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Wy.exports=p6(),Wy.exports}var ki=HI();function m6(e,t){const n=es(),r=r6(t),{activeProps:i,inactiveProps:c,activeOptions:l,to:f,preload:d,preloadDelay:h,hashScrollIntoView:y,replace:g,startTransition:v,resetScroll:b,viewTransition:_,children:x,target:R,disabled:C,style:A,className:O,onClick:D,onFocus:N,onMouseEnter:j,onMouseLeave:$,onTouchStart:k,ignoreBlocker:Z,params:se,search:le,hash:K,state:Q,mask:ye,reloadDocument:fe,unsafeRelative:q,from:W,_fromLocation:F,...ve}=e,Te=BI(),P=hn({select:gt=>gt.location.search,structuralSharing:!0}),ne=e.from,ie=I.useMemo(()=>({...e,from:ne}),[n,P,ne,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),de=I.useMemo(()=>n.buildLocation({...ie}),[n,ie]),Ce=de.maskedLocation?de.maskedLocation.publicHref:de.publicHref,_e=de.maskedLocation?de.maskedLocation.external:de.external,be=I.useMemo(()=>_6(Ce,_e,n.history,C),[C,_e,Ce,n.history]),Ye=I.useMemo(()=>{if(be?.external)return qh(be.href)?void 0:be.href;if(!w6(f)&&!(typeof f!="string"||f.indexOf(":")===-1))try{return new URL(f),qh(f)?void 0:f}catch{}},[f,be]),He=hn({select:gt=>{if(Ye)return!1;if(l?.exact){if(!EB(gt.location.pathname,de.pathname,n.basepath))return!1}else{const $t=Kh(gt.location.pathname,n.basepath),Ut=Kh(de.pathname,n.basepath);if(!($t.startsWith(Ut)&&($t.length===Ut.length||$t[Ut.length]==="/")))return!1}return(l?.includeSearch??!0)&&!xa(gt.location.search,de.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?Te&>.location.hash===de.hash:!0}}),ht=He?_i(i,{})??g6:Jy,Ft=He?Jy:_i(c,{})??Jy,oe=[O,ht.className,Ft.className].filter(Boolean).join(" "),Fe=(A||ht.style||Ft.style)&&{...A,...ht.style,...Ft.style},[Ie,Pt]=I.useState(!1),we=I.useRef(!1),Ne=e.reloadDocument||Ye?!1:d??n.options.defaultPreload,qe=h??n.options.defaultPreloadDelay??0,Qe=I.useCallback(()=>{n.preloadRoute({...ie}).catch(gt=>{console.warn(gt),console.warn(e6)})},[n,ie]),ut=I.useCallback(gt=>{gt?.isIntersecting&&Qe()},[Qe]);s6(r,ut,S6,{disabled:!!C||Ne!=="viewport"}),I.useEffect(()=>{we.current||!C&&Ne==="render"&&(Qe(),we.current=!0)},[C,Qe,Ne]);const Be=gt=>{const $t=gt.currentTarget.getAttribute("target"),Ut=R!==void 0?R:$t;if(!C&&!E6(gt)&&!gt.defaultPrevented&&(!Ut||Ut==="_self")&>.button===0){gt.preventDefault(),ki.flushSync(()=>{Pt(!0)});const an=n.subscribe("onResolved",()=>{an(),Pt(!1)});n.navigate({...ie,replace:g,resetScroll:b,hashScrollIntoView:y,startTransition:v,viewTransition:_,ignoreBlocker:Z})}};if(Ye)return{...ve,ref:r,href:Ye,...x&&{children:x},...R&&{target:R},...C&&{disabled:C},...A&&{style:A},...O&&{className:O},...D&&{onClick:D},...N&&{onFocus:N},...j&&{onMouseEnter:j},...$&&{onMouseLeave:$},...k&&{onTouchStart:k}};const Le=gt=>{C||Ne&&Qe()},on=Le,it=gt=>{if(!(C||!Ne))if(!qe)Qe();else{const $t=gt.target;if(Mu.has($t))return;const Ut=setTimeout(()=>{Mu.delete($t),Qe()},qe);Mu.set($t,Ut)}},_s=gt=>{if(C||!Ne||!qe)return;const $t=gt.target,Ut=Mu.get($t);Ut&&(clearTimeout(Ut),Mu.delete($t))};return{...ve,...ht,...Ft,href:be?.href,ref:r,onClick:Du([D,Be]),onFocus:Du([N,Le]),onMouseEnter:Du([j,it]),onMouseLeave:Du([$,_s]),onTouchStart:Du([k,on]),disabled:!!C,target:R,...Fe&&{style:Fe},...oe&&{className:oe},...C&&y6,...He&&v6,...Te&&Ie&&b6}}const Jy={},g6={className:"active"},y6={role:"link","aria-disabled":!0},v6={"data-status":"active","aria-current":"page"},b6={"data-transitioning":"transitioning"},Mu=new WeakMap,S6={rootMargin:"100px"},Du=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function _6(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function w6(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const Or=I.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...c}=m6(r,t),l=typeof r.children=="function"?r.children({isActive:c["data-status"]==="active"}):r.children;if(!n){const{disabled:f,...d}=c;return I.createElement("a",d,l)}return I.createElement(n,c,l)});function E6(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let x6=class extends LI{constructor(t){super(t),this.useMatch=n=>Nr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Nr({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>rb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>sb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>nb({...n,from:this.id}),this.useLoaderData=n=>tb({...n,from:this.id}),this.useNavigate=()=>Mp({from:this.fullPath}),this.Link=Xc.forwardRef((n,r)=>U.jsx(Or,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function R6(e){return new x6(e)}function C6(){return e=>A6(e)}class T6 extends t6{constructor(t){super(t),this.useMatch=n=>Nr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Nr({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>rb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>sb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>nb({...n,from:this.id}),this.useLoaderData=n=>tb({...n,from:this.id}),this.useNavigate=()=>Mp({from:this.fullPath}),this.Link=Xc.forwardRef((n,r)=>U.jsx(Or,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function A6(e){return new T6(e)}function Kt(e){return typeof e=="object"?new PR(e,{silent:!0}).createRoute(e):new PR(e,{silent:!0}).createRoute}class PR{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const i=R6(r);return i.isRoot=!1,i},this.silent=n?.silent}}class NR{constructor(t){this.useMatch=n=>Nr({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Nr({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>rb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>sb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>nb({...n,from:this.options.id}),this.useLoaderData=n=>tb({...n,from:this.options.id}),this.useNavigate=()=>{const n=es();return Mp({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function zR(e){return typeof e=="object"?new NR(e):t=>new NR({id:e,...t})}function rn(e,t){let n,r,i,c;const l=()=>(n||(n=e().then(d=>{n=void 0,r=d[t]}).catch(d=>{if(i=d,iB(i)&&i instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const h=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(h)||(sessionStorage.setItem(h,"1"),c=!0)}})),n),f=function(h){if(c)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)if(CR)CR(l());else throw l();return I.createElement(r,h)};return f.preload=l,f}function I6(){const e=es(),t=I.useRef({router:e,mounted:!1}),[n,r]=I.useState(!1),{hasPendingMatches:i,isLoading:c}=hn({select:g=>({isLoading:g.isLoading,hasPendingMatches:g.matches.some(v=>v.status==="pending")}),structuralSharing:!0}),l=Gy(c),f=c||n||i,d=Gy(f),h=c||i,y=Gy(h);return e.startTransition=g=>{r(!0),I.startTransition(()=>{g(),r(!1)})},I.useEffect(()=>{const g=e.history.subscribe(e.load),v=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ho(e.latestLocation.publicHref)!==ho(v.publicHref)&&e.commitLocation({...v,replace:!0}),()=>{g()}},[e,e.history]),uh(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(v){console.error(v)}})()},[e]),uh(()=>{l&&!c&&e.emit({type:"onLoad",...Ra(e.state)})},[l,e,c]),uh(()=>{y&&!h&&e.emit({type:"onBeforeRouteMount",...Ra(e.state)})},[h,y,e]),uh(()=>{if(d&&!f){const g=Ra(e.state);e.emit({type:"onResolved",...g}),e.__store.setState(v=>({...v,status:"idle",resolvedLocation:v.location})),g.hrefChanged&&PB(e)}},[f,d,e]),null}function O6(e){const t=hn({select:n=>`not-found-${n.location.pathname}-${n.status}`});return U.jsx(Jv,{getResetKey:()=>t,onCatch:(n,r)=>{if(Ps(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(Ps(n))return e.fallback?.(n);throw n},children:e.children})}function M6(){return U.jsx("p",{children:"Not Found"})}function Uc(e){return U.jsx(U.Fragment,{children:e.children})}function FI(e,t,n){return t.options.notFoundComponent?U.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?U.jsx(e.options.defaultNotFoundComponent,{...n}):U.jsx(M6,{})}function D6(){return es().isScrollRestoring,null}const VI=I.memo(function({matchId:t}){const n=es(),r=hn({select:C=>{const A=C.matches.find(O=>O.id===t);return yo(A),{routeId:A.routeId,ssr:A.ssr,_displayPending:A._displayPending}},structuralSharing:!0}),i=n.routesById[r.routeId],c=i.options.pendingComponent??n.options.defaultPendingComponent,l=c?U.jsx(c,{}):null,f=i.options.errorComponent??n.options.defaultErrorComponent,d=i.options.onCatch??n.options.defaultOnCatch,h=i.isRoot?i.options.notFoundComponent??n.options.notFoundRoute?.options.component:i.options.notFoundComponent,y=r.ssr===!1||r.ssr==="data-only",g=(!i.isRoot||i.options.wrapInSuspense||y)&&(i.options.wrapInSuspense??c??(i.options.errorComponent?.preload||y))?I.Suspense:Uc,v=f?Jv:Uc,b=h?O6:Uc,_=hn({select:C=>C.loadedAt}),x=hn({select:C=>{const A=C.matches.findIndex(O=>O.id===t);return C.matches[A-1]?.routeId}}),R=i.isRoot?i.options.shellComponent??Uc:Uc;return U.jsxs(R,{children:[U.jsx(Op.Provider,{value:t,children:U.jsx(g,{fallback:l,children:U.jsx(v,{getResetKey:()=>_,errorComponent:f||eb,onCatch:(C,A)=>{if(Ps(C))throw C;d?.(C,A)},children:U.jsx(b,{fallback:C=>{if(!h||C.routeId&&C.routeId!==r.routeId||!C.routeId&&!i.isRoot)throw C;return I.createElement(h,C)},children:y||r._displayPending?U.jsx(i6,{fallback:l,children:U.jsx(LR,{matchId:t})}):U.jsx(LR,{matchId:t})})})})}),x===sr&&n.options.scrollRestoration?U.jsxs(U.Fragment,{children:[U.jsx(k6,{}),U.jsx(D6,{})]}):null]})});function k6(){const e=es(),t=I.useRef(void 0);return U.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Ra(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const LR=I.memo(function({matchId:t}){const n=es(),{match:r,key:i,routeId:c}=hn({select:d=>{const h=d.matches.find(_=>_.id===t),y=h.routeId,v=(n.routesById[y].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:y,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:v?JSON.stringify(v):void 0,routeId:y,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),l=n.routesById[c],f=I.useMemo(()=>{const d=l.options.component??n.options.defaultComponent;return d?U.jsx(d,{},i):U.jsx(qI,{})},[i,l.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const d=l.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const h=n.getMatch(r.id);if(h&&!h._nonReactive.minPendingPromise){const y=Wc();h._nonReactive.minPendingPromise=y,setTimeout(()=>{y.resolve(),h._nonReactive.minPendingPromise=void 0},d)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return yo(Ps(r.error)),FI(n,l,r.error);if(r.status==="redirected")throw yo(ir(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error")throw r.error;return f}),qI=I.memo(function(){const t=es(),n=I.useContext(Op),r=hn({select:h=>h.matches.find(y=>y.id===n)?.routeId}),i=t.routesById[r],c=hn({select:h=>{const g=h.matches.find(v=>v.id===n);return yo(g),g.globalNotFound}}),l=hn({select:h=>{const y=h.matches,g=y.findIndex(v=>v.id===n);return y[g+1]?.id}}),f=t.options.defaultPendingComponent?U.jsx(t.options.defaultPendingComponent,{}):null;if(c)return FI(t,i,void 0);if(!l)return null;const d=U.jsx(VI,{matchId:l});return r===sr?U.jsx(I.Suspense,{fallback:f,children:d}):d});function P6(){const e=es(),n=e.routesById[sr].options.pendingComponent??e.options.defaultPendingComponent,r=n?U.jsx(n,{}):null,i=typeof document<"u"&&e.ssr?Uc:I.Suspense,c=U.jsxs(i,{fallback:r,children:[U.jsx(I6,{}),U.jsx(N6,{})]});return e.options.InnerWrap?U.jsx(e.options.InnerWrap,{children:c}):c}function N6(){const e=es(),t=hn({select:i=>i.matches[0]?.id}),n=hn({select:i=>i.loadedAt}),r=t?U.jsx(VI,{matchId:t}):null;return U.jsx(Op.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:U.jsx(Jv,{getResetKey:()=>n,errorComponent:eb,onCatch:i=>{i.message||i.toString()},children:r})})}const z6=e=>new L6(e);class L6 extends ZB{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Kt,globalThis.createLazyFileRoute=zR):typeof window<"u"&&(window.createFileRoute=Kt,window.createLazyFileRoute=zR);function B6({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=jI(),i=U.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?U.jsx(e.options.Wrap,{children:i}):i}function $6({router:e,...t}){return U.jsx(B6,{router:e,...t,children:U.jsx(P6,{})})}function U6(e){return hn({select:t=>e?.select?e.select(t.location):t.location})}function j6({tag:e,attrs:t,children:n,nonce:r}){switch(e){case"title":return U.jsx("title",{...t,suppressHydrationWarning:!0,children:n});case"meta":return U.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return U.jsx("link",{...t,nonce:r,suppressHydrationWarning:!0});case"style":return U.jsx("style",{...t,dangerouslySetInnerHTML:{__html:n},nonce:r});case"script":return U.jsx(H6,{attrs:t,children:n});default:return null}}function H6({attrs:e,children:t}){es(),I.useEffect(()=>{if(e?.src){const n=(()=>{try{const c=document.baseURI||window.location.href;return new URL(e.src,c).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(c=>c.src===n))return;const i=document.createElement("script");for(const[c,l]of Object.entries(e))c!=="suppressHydrationWarning"&&l!==void 0&&l!==!1&&i.setAttribute(c,typeof l=="boolean"?"":String(l));return document.head.appendChild(i),()=>{i.parentNode&&i.parentNode.removeChild(i)}}if(typeof t=="string"){const n=typeof e?.type=="string"?e.type:"text/javascript",r=typeof e?.nonce=="string"?e.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(l=>{if(!(l instanceof HTMLScriptElement))return!1;const f=l.getAttribute("type")??"text/javascript",d=l.getAttribute("nonce")??void 0;return l.textContent===t&&f===n&&d===r}))return;const c=document.createElement("script");if(c.textContent=t,e)for(const[l,f]of Object.entries(e))l!=="suppressHydrationWarning"&&f!==void 0&&f!==!1&&c.setAttribute(l,typeof f=="boolean"?"":String(f));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}},[e,t]);{const{src:n,...r}=e||{};return U.jsx("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:""},...r})}}const F6=()=>{const e=es(),t=e.options.ssr?.nonce,n=hn({select:d=>d.matches.map(h=>h.meta).filter(Boolean)}),r=I.useMemo(()=>{const d=[],h={};let y;for(let g=n.length-1;g>=0;g--){const v=n[g];for(let b=v.length-1;b>=0;b--){const _=v[b];if(_)if(_.title)y||(y={tag:"title",children:_.title});else if("script:ld+json"in _)try{const x=JSON.stringify(_["script:ld+json"]);d.push({tag:"script",attrs:{type:"application/ld+json"},children:uB(x)})}catch{}else{const x=_.name??_.property;if(x){if(h[x])continue;h[x]=!0}d.push({tag:"meta",attrs:{..._,nonce:t}})}}}return y&&d.push(y),t&&d.push({tag:"meta",attrs:{property:"csp-nonce",content:t}}),d.reverse(),d},[n,t]),i=hn({select:d=>{const h=d.matches.map(v=>v.links).filter(Boolean).flat(1).map(v=>({tag:"link",attrs:{...v,nonce:t}})),y=e.ssr?.manifest,g=d.matches.map(v=>y?.routes[v.routeId]?.assets??[]).filter(Boolean).flat(1).filter(v=>v.tag==="link").map(v=>({tag:"link",attrs:{...v.attrs,suppressHydrationWarning:!0,nonce:t}}));return[...h,...g]},structuralSharing:!0}),c=hn({select:d=>{const h=[];return d.matches.map(y=>e.looseRoutesById[y.routeId]).forEach(y=>e.ssr?.manifest?.routes[y.id]?.preloads?.filter(Boolean).forEach(g=>{h.push({tag:"link",attrs:{rel:"modulepreload",href:g,nonce:t}})})),h},structuralSharing:!0}),l=hn({select:d=>d.matches.map(h=>h.styles).flat(1).filter(Boolean).map(({children:h,...y})=>({tag:"style",attrs:{...y,nonce:t},children:h})),structuralSharing:!0}),f=hn({select:d=>d.matches.map(h=>h.headScripts).flat(1).filter(Boolean).map(({children:h,...y})=>({tag:"script",attrs:{...y,nonce:t},children:h})),structuralSharing:!0});return V6([...r,...c,...i,...l,...f],d=>JSON.stringify(d))};function V6(e,t){const n=new Set;return e.filter(r=>{const i=t(r);return n.has(i)?!1:(n.add(i),!0)})}function q6(){const e=F6(),n=es().options.ssr?.nonce;return U.jsx(U.Fragment,{children:e.map(r=>I.createElement(j6,{...r,key:`tsr-meta-${JSON.stringify(r)}`,nonce:n}))})}var e0={exports:{}},ku={},t0={exports:{}},n0={};var BR;function G6(){return BR||(BR=1,(function(e){function t(q,W){var F=q.length;q.push(W);e:for(;0>>1,Te=q[ve];if(0>>1;vei(ie,F))dei(Ce,ie)?(q[ve]=Ce,q[de]=F,ve=de):(q[ve]=ie,q[ne]=F,ve=ne);else if(dei(Ce,F))q[ve]=Ce,q[de]=F,ve=de;else break e}}return W}function i(q,W){var F=q.sortIndex-W.sortIndex;return F!==0?F:q.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var l=Date,f=l.now();e.unstable_now=function(){return l.now()-f}}var d=[],h=[],y=1,g=null,v=3,b=!1,_=!1,x=!1,R=!1,C=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function D(q){for(var W=n(h);W!==null;){if(W.callback===null)r(h);else if(W.startTime<=q)r(h),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(h)}}function N(q){if(x=!1,D(q),!_)if(n(d)!==null)_=!0,j||(j=!0,K());else{var W=n(h);W!==null&&fe(N,W.startTime-q)}}var j=!1,$=-1,k=5,Z=-1;function se(){return R?!0:!(e.unstable_now()-Zq&&se());){var ve=g.callback;if(typeof ve=="function"){g.callback=null,v=g.priorityLevel;var Te=ve(g.expirationTime<=q);if(q=e.unstable_now(),typeof Te=="function"){g.callback=Te,D(q),W=!0;break t}g===n(d)&&r(d),D(q)}else r(d);g=n(d)}if(g!==null)W=!0;else{var P=n(h);P!==null&&fe(N,P.startTime-q),W=!1}}break e}finally{g=null,v=F,b=!1}W=void 0}}finally{W?K():j=!1}}}var K;if(typeof O=="function")K=function(){O(le)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,ye=Q.port2;Q.port1.onmessage=le,K=function(){ye.postMessage(null)}}else K=function(){C(le,0)};function fe(q,W){$=C(function(){q(e.unstable_now())},W)}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(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125ve?(q.sortIndex=F,t(h,q),n(d)===null&&q===n(h)&&(x?(A($),$=-1):x=!0,fe(N,F-ve))):(q.sortIndex=Te,t(d,q),_||b||(_=!0,j||(j=!0,K()))),q},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(q){var W=v;return function(){var F=v;v=W;try{return q.apply(this,arguments)}finally{v=F}}}})(n0)),n0}var $R;function K6(){return $R||($R=1,t0.exports=G6()),t0.exports}var UR;function Z6(){if(UR)return ku;UR=1;var e=K6(),t=al(),n=HI();function r(s){var o="https://react.dev/errors/"+s;if(1Te||(s.current=ve[Te],ve[Te]=null,Te--)}function ie(s,o){Te++,ve[Te]=s.current,s.current=o}var de=P(null),Ce=P(null),_e=P(null),be=P(null);function Ye(s,o){switch(ie(_e,o),ie(Ce,s),ie(de,null),o.nodeType){case 9:case 11:s=(s=o.documentElement)&&(s=s.namespaceURI)?R1(s):0;break;default:if(s=o.tagName,o=o.namespaceURI)o=R1(o),s=C1(o,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}ne(de),ie(de,s)}function He(){ne(de),ne(Ce),ne(_e)}function ht(s){s.memoizedState!==null&&ie(be,s);var o=de.current,a=C1(o,s.type);o!==a&&(ie(Ce,s),ie(de,a))}function Ft(s){Ce.current===s&&(ne(de),ne(Ce)),be.current===s&&(ne(be),xu._currentValue=F)}var oe,Fe;function Ie(s){if(oe===void 0)try{throw Error()}catch(a){var o=a.stack.trim().match(/\n( *(at )?)/);oe=o&&o[1]||"",Fe=-1i.map(i=>d[i]); +function yL(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const c of i)if(c.type==="childList")for(const l of c.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const c={};return i.integrity&&(c.integrity=i.integrity),i.referrerPolicy&&(c.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?c.credentials="include":i.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(i){if(i.ep)return;i.ep=!0;const c=n(i);fetch(i.href,c)}})();var H0e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hI(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function F0e(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var i=!1;try{i=this instanceof r}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var zy={exports:{}},Au={};var nR;function bL(){if(nR)return Au;nR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,c){var l=null;if(c!==void 0&&(l=""+c),i.key!==void 0&&(l=""+i.key),"key"in i){c={};for(var f in i)f!=="key"&&(c[f]=i[f])}else c=i;return i=c.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:c}}return Au.Fragment=t,Au.jsx=n,Au.jsxs=n,Au}var sR;function vL(){return sR||(sR=1,zy.exports=bL()),zy.exports}var U=vL(),Cp=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(){}},SL={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},_L=class{#e=SL;#n=!1;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)}},ob=new _L;function wL(e){setTimeout(e,0)}var Tp=typeof window>"u"||"Deno"in globalThis;function Sr(){}function EL(e,t){return typeof e=="function"?e(t):e}function xL(e){return typeof e=="number"&&e>=0&&e!==1/0}function RL(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ib(e,t){return typeof e=="function"?e(t):e}function CL(e,t){return typeof e=="function"?e(t):e}function rR(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:c,queryKey:l,stale:f}=e;if(l){if(r){if(t.queryHash!==qb(l,t.options))return!1}else if(!nf(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||i&&i!==t.state.fetchStatus||c&&!c(t))}function oR(e,t){const{exact:n,status:r,predicate:i,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(n){if(tf(t.options.mutationKey)!==tf(c))return!1}else if(!nf(t.options.mutationKey,c))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function qb(e,t){return(t?.queryKeyHashFn||tf)(e)}function tf(e){return JSON.stringify(e,(t,n)=>ab(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function nf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>nf(e[n],t[n])):!1}var TL=Object.prototype.hasOwnProperty;function pI(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=iR(e)&&iR(t);if(!r&&!(ab(e)&&ab(t)))return t;const c=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),f=l.length,d=r?new Array(f):{};let h=0;for(let y=0;y{ob.setTimeout(t,e)})}function IL(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?pI(e,t):t}function OL(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function ML(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Gb=Symbol();function mI(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Gb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function q0e(e,t){return typeof e=="function"?e(...t):!!e}function DL(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var kL=class extends Cp{#e;#n;#t;constructor(){super(),this.#t=e=>{if(!Tp&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},gI=new kL;function PL(){let e,t;const n=new Promise((i,c)=>{e=i,t=c});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var NL=wL;function zL(){let e=[],t=0,n=f=>{f()},r=f=>{f()},i=NL;const c=f=>{t?e.push(f):i(()=>{n(f)})},l=()=>{const f=e;e=[],f.length&&i(()=>{r(()=>{f.forEach(d=>{n(d)})})})};return{batch:f=>{let d;t++;try{d=f()}finally{t--,t||l()}return d},batchCalls:f=>(...d)=>{c(()=>{f(...d)})},schedule:c,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{r=f},setScheduler:f=>{i=f}}}var os=zL(),LL=class extends Cp{#e=!0;#n;#t;constructor(){super(),this.#t=e=>{if(!Tp&&window.addEventListener){const 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.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},jh=new LL;function BL(e){return Math.min(1e3*2**e,3e4)}function yI(e){return(e??"online")==="online"?jh.isOnline():!0}var cb=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function bI(e){let t=!1,n=0,r;const i=PL(),c=()=>i.status!=="pending",l=x=>{if(!c()){const R=new cb(x);b(R),e.onCancel?.(R)}},f=()=>{t=!0},d=()=>{t=!1},h=()=>gI.isFocused()&&(e.networkMode==="always"||jh.isOnline())&&e.canRun(),y=()=>yI(e.networkMode)&&e.canRun(),g=x=>{c()||(r?.(),i.resolve(x))},b=x=>{c()||(r?.(),i.reject(x))},v=()=>new Promise(x=>{r=R=>{(c()||h())&&x(R)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let x;const R=n===0?e.initialPromise:void 0;try{x=R??e.fn()}catch(C){x=Promise.reject(C)}Promise.resolve(x).then(g).catch(C=>{if(c())return;const A=e.retry??(Tp?0:3),O=e.retryDelay??BL,D=typeof O=="function"?O(n,C):O,N=A===!0||typeof A=="number"&&nh()?void 0:v()).then(()=>{t?b(C):_()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r?.(),i),cancelRetry:f,continueRetry:d,canStart:y,start:()=>(y()?_():v().then(_),i)}}var vI=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xL(this.gcTime)&&(this.#e=ob.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Tp?1/0:300*1e3))}clearGcTimeout(){this.#e&&(ob.clearTimeout(this.#e),this.#e=void 0)}},$L=class extends vI{#e;#n;#t;#r;#s;#i;#a;constructor(e){super(),this.#a=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#t=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=lR(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#s?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=lR(this.options);t.data!==void 0&&(this.setState(cR(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,t){const n=IL(this.state.data,e,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#s?.promise;return this.#s?.cancel(e),t?t.then(Sr).catch(Sr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>CL(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Gb||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ib(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:!RL(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#t.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.#s&&(this.#a?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(d=>d.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,r=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},i=()=>{const f=mI(this.options,t),h=(()=>{const y={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(y),y})();return this.#a=!1,this.options.persister?this.options.persister(f,h,this):f(h)},l=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(f),f})();this.options.behavior?.onFetch(l,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#o({type:"fetch",meta:l.fetchOptions?.meta}),this.#s=bI({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:f=>{f instanceof cb&&f.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(f,d)=>{this.#o({type:"failed",failureCount:f,error:d})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const f=await this.#s.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#t.config.onSuccess?.(f,this),this.#t.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof cb){if(f.silent)return this.#s.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#o({type:"error",error:f}),this.#t.config.onError?.(f,this),this.#t.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#o(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...UL(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...cR(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?r:void 0,r;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),os.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function UL(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:yI(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function cR(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function lR(e){const 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"}}function uR(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,c=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},d=0;const h=async()=>{let y=!1;const g=_=>{DL(_,()=>t.signal,()=>y=!0)},b=mI(t.options,t.fetchOptions),v=async(_,x,R)=>{if(y)return Promise.reject();if(x==null&&_.pages.length)return Promise.resolve(_);const A=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:x,direction:R?"backward":"forward",meta:t.options.meta};return g(j),j})(),O=await b(A),{maxPages:D}=t.options,N=R?ML:OL;return{pages:N(_.pages,O,D),pageParams:N(_.pageParams,x,D)}};if(i&&c.length){const _=i==="backward",x=_?jL:fR,R={pages:c,pageParams:l},C=x(r,R);f=await v(R,C,_)}else{const _=e??c.length;do{const x=d===0?l[0]??r.initialPageParam:fR(r,f);if(d>0&&x==null)break;f=await v(f,x),d++}while(d<_)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function fR(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function jL(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var HL=class extends vI{#e;#n;#t;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#n=[],this.state=e.state||FL(),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.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#s({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=bI({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(c,l)=>{this.#s({type:"failed",failureCount:c,error:l})},onPause:()=>{this.#s({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const r=this.state.status==="pending",i=!this.#r.canStart();try{if(r)t();else{this.#s({type:"pending",variables:e,isPaused:i}),this.#t.config.onMutate&&await this.#t.config.onMutate(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#s({type:"pending",context:l,variables:e,isPaused:i})}const c=await this.#r.start();return await this.#t.config.onSuccess?.(c,e,this.state.context,this,n),await this.options.onSuccess?.(c,e,this.state.context,n),await this.#t.config.onSettled?.(c,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(c,null,e,this.state.context,n),this.#s({type:"success",data:c}),c}catch(c){try{await this.#t.config.onError?.(c,e,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(c,e,this.state.context,n)}catch(l){Promise.reject(l)}try{await this.#t.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,c,e,this.state.context,n)}catch(l){Promise.reject(l)}throw this.#s({type:"error",error:c}),c}finally{this.#t.runNext(this)}}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),os.batch(()=>{this.#n.forEach(n=>{n.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function FL(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var VL=class extends Cp{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(e,t,n){const r=new HL({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=ah(e);if(typeof t=="string"){const n=this.#n.get(t);n?n.push(e):this.#n.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=ah(e);if(typeof t=="string"){const n=this.#n.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#n.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=ah(e);if(typeof t=="string"){const r=this.#n.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=ah(e);return typeof t=="string"?this.#n.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){os.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>oR(t,n))}findAll(e={}){return this.getAll().filter(t=>oR(e,t))}notify(e){os.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return os.batch(()=>Promise.all(e.map(t=>t.continue().catch(Sr))))}};function ah(e){return e.options.scope?.id}var qL=class extends Cp{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??qb(r,t);let c=this.get(i);return c||(c=new $L({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(c)),c}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){os.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>rR(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>rR(e,n)):t}notify(e){os.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){os.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){os.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},GL=class{#e;#n;#t;#r;#s;#i;#a;#o;constructor(e={}){this.#e=e.queryCache||new qL,this.#n=e.mutationCache||new VL,this.#t=e.defaultOptions||{},this.#r=new Map,this.#s=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=gI.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=jh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const 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(ib(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),c=this.#e.get(r.queryHash)?.state.data,l=EL(t,c);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return os.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;os.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return os.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=os.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Sr).catch(Sr)}invalidateQueries(e,t={}){return os.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=os.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let c=i.fetch(void 0,n);return n.throwOnError||(c=c.catch(Sr)),i.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(Sr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(ib(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Sr).catch(Sr)}fetchInfiniteQuery(e){return e.behavior=uR(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Sr).catch(Sr)}ensureInfiniteQueryData(e){return e.behavior=uR(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return jh.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(e){this.#t=e}setQueryDefaults(e,t){this.#r.set(tf(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{nf(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#s.set(tf(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(r=>{nf(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=qb(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===Gb&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#t.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},Ly={exports:{}},Ge={};var dR;function KL(){if(dR)return Ge;dR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),l=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function v(P){return P===null||typeof P!="object"?null:(P=b&&P[b]||P["@@iterator"],typeof P=="function"?P:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,R={};function C(P,ne,ie){this.props=P,this.context=ne,this.refs=R,this.updater=ie||_}C.prototype.isReactComponent={},C.prototype.setState=function(P,ne){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,ne,"setState")},C.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function A(){}A.prototype=C.prototype;function O(P,ne,ie){this.props=P,this.context=ne,this.refs=R,this.updater=ie||_}var D=O.prototype=new A;D.constructor=O,x(D,C.prototype),D.isPureReactComponent=!0;var N=Array.isArray;function j(){}var $={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function Z(P,ne,ie){var de=ie.ref;return{$$typeof:e,type:P,key:ne,ref:de!==void 0?de:null,props:ie}}function se(P,ne){return Z(P.type,ne,P.props)}function le(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function K(P){var ne={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(ie){return ne[ie]})}var Q=/\/+/g;function ye(P,ne){return typeof P=="object"&&P!==null&&P.key!=null?K(""+P.key):ne.toString(36)}function fe(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(j,j):(P.status="pending",P.then(function(ne){P.status==="pending"&&(P.status="fulfilled",P.value=ne)},function(ne){P.status==="pending"&&(P.status="rejected",P.reason=ne)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function q(P,ne,ie,de,Ce){var _e=typeof P;(_e==="undefined"||_e==="boolean")&&(P=null);var ve=!1;if(P===null)ve=!0;else switch(_e){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(P.$$typeof){case e:case t:ve=!0;break;case y:return ve=P._init,q(ve(P._payload),ne,ie,de,Ce)}}if(ve)return Ce=Ce(P),ve=de===""?"."+ye(P,0):de,N(Ce)?(ie="",ve!=null&&(ie=ve.replace(Q,"$&/")+"/"),q(Ce,ne,ie,"",function(ht){return ht})):Ce!=null&&(le(Ce)&&(Ce=se(Ce,ie+(Ce.key==null||P&&P.key===Ce.key?"":(""+Ce.key).replace(Q,"$&/")+"/")+ve)),ne.push(Ce)),1;ve=0;var Ye=de===""?".":de+":";if(N(P))for(var He=0;He{const t=I.useContext(SI);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ZL=({client:e,children:t})=>(I.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),U.jsx(SI.Provider,{value:e,children:t}));const lb=new WeakMap,QL=new WeakMap,Hh={current:[]};let By=!1,Fu=0;const $u=new Set,ch=new Map;function wI(e){for(const t of e){if(Hh.current.includes(t))continue;Hh.current.push(t),t.recompute();const n=QL.get(t);if(n)for(const r of n){const i=lb.get(r);i?.length&&wI(i)}}}function YL(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function XL(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function EI(e){if(Fu>0&&!ch.has(e)&&ch.set(e,e.prevState),$u.add(e),!(Fu>0)&&!By)try{for(By=!0;$u.size>0;){const t=Array.from($u);$u.clear();for(const n of t){const r=ch.get(n)??n.prevState;n.prevState=r,YL(n)}for(const n of t){const r=lb.get(n);r&&(Hh.current.push(n),wI(r))}for(const n of t){const r=lb.get(n);if(r)for(const i of r)XL(i)}}}finally{By=!1,Hh.current=[],ch.clear()}}function Vu(e){Fu++;try{e()}finally{if(Fu--,Fu===0){const t=$u.values().next().value;t&&EI(t)}}}function WL(e){return typeof e=="function"}let JL=class{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var i,c;this.listeners.add(r);const l=(c=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:c.call(i,r,this);return()=>{this.listeners.delete(r),l?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,i;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):WL(t)?this.state=t(this.prevState):this.state=t,(i=(r=this.options)==null?void 0:r.onUpdate)==null||i.call(r),EI(this)}};const Ci="__TSR_index",pR="popstate",mR="beforeunload";function eB(e){let t=e.getLocation();const n=new Set,r=l=>{t=e.getLocation(),n.forEach(f=>f({location:t,action:l}))},i=l=>{e.notifyOnIndexChange??!0?r(l):t=e.getLocation()},c=async({task:l,navigateOpts:f,...d})=>{if(f?.ignoreBlocker??!1){l();return}const y=e.getBlockers?.()??[],g=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&y.length&&g)for(const b of y){const v=Fh(d.path,d.state);if(await b.blockerFn({currentLocation:t,nextLocation:v,action:d.type})){e.onBlocked?.();return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:l=>(n.add(l),()=>{n.delete(l)}),push:(l,f,d)=>{const h=t.state[Ci];f=gR(h+1,f),c({task:()=>{e.pushState(l,f),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:l,state:f})},replace:(l,f,d)=>{const h=t.state[Ci];f=gR(h,f),c({task:()=>{e.replaceState(l,f),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:l,state:f})},go:(l,f)=>{c({task:()=>{e.go(l),i({type:"GO",index:l})},navigateOpts:f,type:"GO"})},back:l=>{c({task:()=>{e.back(l?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{c({task:()=>{e.forward(l?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[Ci]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const f=e.getBlockers?.()??[];return e.setBlockers([...f,l]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(h=>h!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function gR(e,t){t||(t={});const n=Zb();return{...t,key:n,__TSR_key:n,[Ci]:e}}function tB(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const c=()=>i,l=k=>i=k,f=(k=>k),d=(()=>Fh(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const k=Zb();t.history.replaceState({[Ci]:0,key:k,__TSR_key:k},"")}let h=d(),y,g=!1,b=!1,v=!1,_=!1;const x=()=>h;let R,C;const A=()=>{R&&($._ignoreSubscribers=!0,(R.isPush?t.history.pushState:t.history.replaceState)(R.state,"",R.href),$._ignoreSubscribers=!1,R=void 0,C=void 0,y=void 0)},O=(k,Z,se)=>{const le=f(Z);C||(y=h),h=Fh(Z,se),R={href:le,state:se,isPush:R?.isPush||k==="push"},C||(C=Promise.resolve().then(()=>A()))},D=k=>{h=d(),$.notify({type:k})},N=async()=>{if(b){b=!1;return}const k=d(),Z=k.state[Ci]-h.state[Ci],se=Z===1,le=Z===-1,K=!se&&!le||g;g=!1;const Q=K?"GO":le?"BACK":"FORWARD",ye=K?{type:"GO",index:Z}:{type:le?"BACK":"FORWARD"};if(v)v=!1;else{const fe=c();if(typeof document<"u"&&fe.length){for(const q of fe)if(await q.blockerFn({currentLocation:h,nextLocation:k,action:Q})){b=!0,t.history.go(1),$.notify(ye);return}}}h=d(),$.notify(ye)},j=k=>{if(_){_=!1;return}let Z=!1;const se=c();if(typeof document<"u"&&se.length)for(const le of se){const K=le.enableBeforeUnload??!0;if(K===!0){Z=!0;break}if(typeof K=="function"&&K()===!0){Z=!0;break}}if(Z)return k.preventDefault(),k.returnValue=""},$=eB({getLocation:x,getLength:()=>t.history.length,pushState:(k,Z)=>O("push",k,Z),replaceState:(k,Z)=>O("replace",k,Z),back:k=>(k&&(v=!0),_=!0,t.history.back()),forward:k=>{k&&(v=!0),_=!0,t.history.forward()},go:k=>{g=!0,t.history.go(k)},createHref:k=>f(k),flush:A,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(mR,j,{capture:!0}),t.removeEventListener(pR,N)},onBlocked:()=>{y&&h!==y&&(h=y)},getBlockers:c,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(mR,j,{capture:!0}),t.addEventListener(pR,N),t.history.pushState=function(...k){const Z=n.apply(t.history,k);return $._ignoreSubscribers||D("PUSH"),Z},t.history.replaceState=function(...k){const Z=r.apply(t.history,k);return $._ignoreSubscribers||D("REPLACE"),Z},$}function nB(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Fh(e,t){const n=nB(e),r=n.indexOf("#"),i=n.indexOf("?"),c=Zb();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||{[Ci]:0,key:c,__TSR_key:c}}}function Zb(){return(Math.random()+1).toString(36).substring(7)}const sB=!1;function sf(e){return e[e.length-1]}function rB(e){return typeof e=="function"}function _i(e,t){return rB(e)?e(t):e}const oB=Object.prototype.hasOwnProperty,yR=Object.prototype.propertyIsEnumerable;function er(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=t,i=SR(e)&&SR(r);if(!i&&!(Vh(e)&&Vh(r)))return r;const c=i?e:bR(e);if(!c)return r;const l=i?r:bR(r);if(!l)return r;const f=c.length,d=l.length,h=i?new Array(d):{};let y=0;for(let g=0;g"u")return!0;const n=t.prototype;return!(!vR(n)||!n.hasOwnProperty("isPrototypeOf"))}function vR(e){return Object.prototype.toString.call(e)==="[object Object]"}function SR(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function xa(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;ri||!xa(e[l],t[l],n)))return!1;return i===c}return!1}function Jc(e){let t,n;const r=new Promise((i,c)=>{t=i,n=c});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,t(i),e?.(i)},r.reject=i=>{r.status="rejected",n(i)},r}function iB(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function Vc(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function aB(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function _R(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return aB(t)}const xI=["http:","https:","mailto:","tel:"];function qh(e){if(!e)return!1;try{const t=new URL(e);return!xI.includes(t.protocol)}catch{return!1}}const cB={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},lB=/[&><\u2028\u2029]/g;function uB(e){return e.replace(lB,t=>cB[t])}function $y(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,i="",c;for(;(c=n.exec(e))!==null;)i+=_R(e.slice(r,c.index))+c[0],r=n.lastIndex;return i=i+_R(r?e.slice(r):e),i.startsWith("//")&&(i="/"+i.replace(/^\/+/,"")),i}function fB(e){return/[^\u0000-\u007F]/.test(e)?e.replace(/[^\u0000-\u007F]/gu,encodeURIComponent):e}var dB="Invariant failed";function yo(e,t){if(!e)throw new Error(dB)}function Gh(e){const t=new Map;let n,r;const i=c=>{c.next&&(c.prev?(c.prev.next=c.next,c.next.prev=c.prev,c.next=void 0,r&&(r.next=c,c.prev=r)):(c.next.prev=void 0,n=c.next,c.next=void 0,r&&(c.prev=r,r.next=c)),r=c)};return{get(c){const l=t.get(c);if(l)return i(l),l.value},set(c,l){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===r&&(r=void 0)}const f=t.get(c);if(f)f.value=l,i(f);else{const d={key:c,value:l,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(c,d)}},clear(){t.clear(),n=void 0,r=void 0}}}const el=0,Ia=1,Oa=2,rf=3,Sa=4,RI=5;function hB(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function Qb(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),i=r===-1?e.length:r,c=e.substring(t,i);if(!c||!c.includes("$"))return n[0]=el,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(c==="$"){const f=e.length;return n[0]=Oa,n[1]=t,n[2]=t,n[3]=f,n[4]=f,n[5]=f,n}if(c.charCodeAt(0)===36)return n[0]=Ia,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const l=hB(c);if(l){const[f,d]=l,h=c.charCodeAt(f+1);if(h===45){if(f+2!k.skipOnParamError&&k.caseSensitive===D&&k.prefix===N&&k.suffix===j);if($)_=$;else{const k=jy(Ia,n.fullPath??n.from,D,N,j);_=k,k.depth=c,k.parent=i,i.dynamic??=[],i.dynamic.push(k)}break}case rf:{const A=d.substring(x,v[1]),O=d.substring(v[4],R),D=y&&!!(A||O),N=A?D?A:A.toLowerCase():void 0,j=O?D?O:O.toLowerCase():void 0,$=!g&&i.optional?.find(k=>!k.skipOnParamError&&k.caseSensitive===D&&k.prefix===N&&k.suffix===j);if($)_=$;else{const k=jy(rf,n.fullPath??n.from,D,N,j);_=k,k.parent=i,k.depth=c,i.optional??=[],i.optional.push(k)}break}case Oa:{const A=d.substring(x,v[1]),O=d.substring(v[4],R),D=y&&!!(A||O),N=A?D?A:A.toLowerCase():void 0,j=O?D?O:O.toLowerCase():void 0,$=jy(Oa,n.fullPath??n.from,D,N,j);_=$,$.parent=i,$.depth=c,i.wildcard??=[],i.wildcard.push($)}}i=_}if(g&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const v=_a(n.fullPath??n.from);v.kind=RI,v.parent=i,c++,v.depth=c,i.pathless??=[],i.pathless.push(v),i=v}const b=(n.path||!n.children)&&!n.isRoot;if(b&&d.endsWith("/")){const v=_a(n.fullPath??n.from);v.kind=Sa,v.parent=i,c++,v.depth=c,i.index=v,i=v}i.parse=n.options?.params?.parse??null,i.skipOnParamError=g,i.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,b&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const d of n.children)Ap(e,t,d,f,i,c,l)}function Uy(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function vi(e){if(e.pathless)for(const t of e.pathless)vi(t);if(e.static)for(const t of e.static.values())vi(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())vi(t);if(e.dynamic?.length){e.dynamic.sort(Uy);for(const t of e.dynamic)vi(t)}if(e.optional?.length){e.optional.sort(Uy);for(const t of e.optional)vi(t)}if(e.wildcard?.length){e.wildcard.sort(Uy);for(const t of e.wildcard)vi(t)}}function _a(e){return{kind:el,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function jy(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:i}}function pB(e,t){const n=_a("/"),r=new Uint16Array(6);for(const i of e)Ap(!1,r,i,1,n,0);vi(n),t.masksTree=n,t.flatCache=Gh(1e3)}function mB(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=Yb(e,t.masksTree);return t.flatCache.set(e,r),r}function gB(e,t,n,r,i){e||="/",r||="/";const c=t?`case\0${e}`:e;let l=i.singleCache.get(c);if(!l){l=_a("/");const f=new Uint16Array(6);Ap(t,f,{from:e},1,l,0),i.singleCache.set(c,l)}return Yb(r,l,n)}function yB(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||="/";let c;try{c=Yb(e,t.segmentTree,n)}catch(l){if(l instanceof URIError)c=null;else throw l}return c&&(c.branch=SB(c.route)),t.matchCache.set(r,c),c}function bB(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function vB(e,t=!1,n){const r=_a(e.fullPath),i=new Uint16Array(6),c={},l={};let f=0;return Ap(t,i,e,1,r,0,h=>{if(n?.(h,f),yo(!(h.id in c),`Duplicate routes found with id: ${String(h.id)}`),c[h.id]=h,f!==0&&h.path){const y=bB(h.fullPath);(!l[y]||h.fullPath.endsWith("/"))&&(l[y]=h)}f++}),vi(r),{processedTree:{segmentTree:r,singleCache:Gh(1e3),matchCache:Gh(1e3),flatCache:null,masksTree:null},routesById:c,routesByPath:l}}function Yb(e,t,n=!1){const r=e.split("/"),i=wB(e,r,t,n);if(!i)return null;const[c]=CI(e,r,i);return{route:i.node.route,rawParams:c,parsedParams:i.parsedParams}}function CI(e,t,n){const r=_B(n.node);let i=null;const c={};let l=n.extract?.part??0,f=n.extract?.node??0,d=n.extract?.path??0,h=n.extract?.segment??0;for(;f=0;le--){const K=b.optional[le];f.push({node:K,index:v,skipped:Z,depth:se,statics:R,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(!j)for(let le=b.optional.length-1;le>=0;le--){const K=b.optional[le],{prefix:Q,suffix:ye}=K;if(Q||ye){const fe=K.caseSensitive?$:k??=$.toLowerCase();if(Q&&!fe.startsWith(Q)||ye&&!fe.endsWith(ye))continue}f.push({node:K,index:v+1,skipped:_,depth:se,statics:R,dynamics:C,optionals:A+1,extract:O,rawParams:D,parsedParams:N})}}if(!j&&b.dynamic&&$)for(let Z=b.dynamic.length-1;Z>=0;Z--){const se=b.dynamic[Z],{prefix:le,suffix:K}=se;if(le||K){const Q=se.caseSensitive?$:k??=$.toLowerCase();if(le&&!Q.startsWith(le)||K&&!Q.endsWith(K))continue}f.push({node:se,index:v+1,skipped:_,depth:x+1,statics:R,dynamics:C+1,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(!j&&b.staticInsensitive){const Z=b.staticInsensitive.get(k??=$.toLowerCase());Z&&f.push({node:Z,index:v+1,skipped:_,depth:x+1,statics:R+1,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(!j&&b.static){const Z=b.static.get($);Z&&f.push({node:Z,index:v+1,skipped:_,depth:x+1,statics:R+1,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}if(b.pathless){const Z=x+1;for(let se=b.pathless.length-1;se>=0;se--){const le=b.pathless[se];f.push({node:le,index:v,skipped:_,depth:Z,statics:R,dynamics:C,optionals:A,extract:O,rawParams:D,parsedParams:N})}}}if(y&&d)return Iu(d,y)?y:d;if(y)return y;if(d)return d;if(r&&h){let g=h.index;for(let v=0;ve.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Sa)>(e.node.kind===Sa)||t.node.kind===Sa==(e.node.kind===Sa)&&t.depth>e.depth))):!0}function Oh(e){return Xb(e.filter(t=>t!==void 0).join("/"))}function Xb(e){return e.replace(/\/{2,}/g,"/")}function TI(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function po(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function AI(e){return po(TI(e))}function Kh(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function EB(e,t,n){return Kh(e,n)===Kh(t,n)}function xB({base:e,to:t,trailingSlash:n="never",cache:r}){const i=t.startsWith("/"),c=!i&&t===".";let l;if(r){l=i?t:c?e:e+"\0"+t;const g=r.get(l);if(g)return g}let f;if(c)f=e.split("/");else if(i)f=t.split("/");else{for(f=e.split("/");f.length>1&&sf(f)==="";)f.pop();const g=t.split("/");for(let b=0,v=g.length;b1&&(sf(f)===""?n==="never"&&f.pop():n==="always"&&f.push(""));let d,h="";for(let g=0;g0&&(h+="/");const b=f[g];if(!b)continue;d=Qb(b,0,d);const v=d[0];if(v===el){h+=b;continue}const _=d[5],x=b.substring(0,d[1]),R=b.substring(d[4],_),C=b.substring(d[2],d[3]);v===Ia?h+=x||R?`${x}{$${C}}${R}`:`$${C}`:v===Oa?h+=x||R?`${x}{$}${R}`:"$":h+=`${x}{-$${C}}${R}`}h=Xb(h);const y=h||"/";return l&&r&&r.set(l,y),y}function RB(e){const t=new Map(e.map(i=>[encodeURIComponent(i),i])),n=Array.from(t.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return i=>i.replace(r,c=>t.get(c)??c)}function Fy(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):CB(r,n)}function Vy({path:e,params:t,decoder:n}){let r=!1;const i={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:r};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:r};const c=e.length;let l=0,f,d="";for(;l{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function IB(){const e=TB();if(!e)return null;const t=e.getItem(ub);let n=t?JSON.parse(t):{};return{state:n,set:r=>{n=_i(r,n)||n;try{e.setItem(ub,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const lh=IB(),OB=e=>e.state.__TSR_key||e.href;function MB(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let Zh=!1;function DB({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:i,location:c}){let l;try{l=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const f=t||window.history.state?.__TSR_key,d=l[f];Zh=!0;e:{if(r&&d&&Object.keys(d).length>0){for(const g in d){const b=d[g];if(g==="window")window.scrollTo({top:b.scrollY,left:b.scrollX,behavior:n});else if(g){const v=document.querySelector(g);v&&(v.scrollLeft=b.scrollX,v.scrollTop=b.scrollY)}}break e}const h=(c??window.location).hash.split("#",2)[1];if(h){const g=window.history.state?.__hashScrollIntoViewOptions??!0;if(g){const b=document.getElementById(h);b&&b.scrollIntoView(g)}break e}const y={top:0,left:0,behavior:n};if(window.scrollTo(y),i)for(const g of i){if(g==="window")continue;const b=typeof g=="function"?g():document.querySelector(g);b&&b.scrollTo(y)}}Zh=!1}function kB(e,t){if(!lh||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!lh))return;e.isScrollRestorationSetup=!0,Zh=!1;const r=e.options.getScrollRestorationKey||OB;window.history.scrollRestoration="manual";const i=c=>{if(Zh||!e.isScrollRestoring)return;let l="";if(c.target===document||c.target===window)l="window";else{const d=c.target.getAttribute("data-scroll-restoration-id");d?l=`[data-scroll-restoration-id="${d}"]`:l=MB(c.target)}const f=r(e.state.location);lh.set(d=>{const h=d[f]||={},y=h[l]||={};if(l==="window")y.scrollX=window.scrollX||0,y.scrollY=window.scrollY||0;else if(l){const g=document.querySelector(l);g&&(y.scrollX=g.scrollLeft||0,y.scrollY=g.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",AB(i,100),!0),e.subscribe("onRendered",c=>{const l=r(c.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(DB({storageKey:ub,key:l,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&lh.set(f=>(f[l]||={},f)))})}function PB(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function NB(e,t=String){const n=new URLSearchParams;for(const r in e){const i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function qy(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function zB(e){const t=new URLSearchParams(e),n={};for(const[r,i]of t.entries()){const c=n[r];c==null?n[r]=qy(i):Array.isArray(c)?c.push(qy(i)):n[r]=[c,qy(i)]}return n}const LB=$B(JSON.parse),BB=UB(JSON.stringify,JSON.parse);function $B(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=zB(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function UB(e,t){const n=typeof t=="function";function r(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(n&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const c=NB(i,r);return c?`?${c}`:""}}const sr="__root__";function Wb(e){if(e.statusCode=e.statusCode||e.code||307,typeof e.href=="string"&&qh(e.href))throw new Error(`Redirect blocked: unsafe protocol in href "${e.href}". Only ${xI.join(", ")} protocols are allowed.`);if(!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function ir(e){return e instanceof Response&&!!e.options}const Mh=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Ip=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),qc=(e,t,n=!0)=>{const r={...e.router.options.context??{}},i=n?t:t-1;for(let c=0;c<=i;c++){const l=e.matches[c];if(!l)continue;const f=e.router.getMatch(l.id);f&&Object.assign(r,f.__routeContext,f.__beforeLoadContext)}return r},II=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),yo(n.options.notFoundComponent);const r=e.matches.find(i=>i.routeId===n.id);yo(r,"Could not find match for route: "+n.id),e.updateMatch(r.id,i=>({...i,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,II(e,t))},wi=(e,t,n)=>{if(!(!ir(n)&&!Ps(n))){if(ir(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const r=ir(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,i=>({...i,status:r,context:qc(e,t.index),isFetching:!1,error:n})),Ps(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw ir(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(II(e,n),n)}},OI=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,Ou=(e,t,n,r)=>{const{id:i,routeId:c}=e.matches[t],l=e.router.looseRoutesById[c];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,wi(e,e.router.getMatch(i),n);try{l.options.onError?.(n)}catch(f){n=f,wi(e,e.router.getMatch(i),n)}e.updateMatch(i,f=>(f._nonReactive.beforeLoadPromise?.resolve(),f._nonReactive.beforeLoadPromise=void 0,f._nonReactive.loadPromise?.resolve(),{...f,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},MI=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!Ip(e,t)&&(n.options.loader||n.options.beforeLoad||PI(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const l=setTimeout(()=>{Mh(e)},i);r._nonReactive.pendingTimeout=l}},jB=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;MI(e,t,n,r);const i=()=>{const c=e.router.getMatch(t);c.preload&&(c.status==="redirected"||c.status==="notFound")&&wi(e,c,c.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},HB=(e,t,n,r)=>{const i=e.router.getMatch(t),c=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Jc(()=>{c?.resolve()});const{paramsError:l,searchError:f}=i;l&&Ou(e,n,l,"PARSE_PARAMS"),f&&Ou(e,n,f,"VALIDATE_SEARCH"),MI(e,t,r,i);const d=new AbortController,h=e.matches[n-1]?.id;(h?e.router.getMatch(h):void 0)?.context??e.router.options.context;let g=!1;const b=()=>{g||(g=!0,e.updateMatch(t,j=>({...j,isFetching:"beforeLoad",fetchCount:j.fetchCount+1,abortController:d})))},v=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,j=>({...j,isFetching:!1}))};if(!r.options.beforeLoad){Vu(()=>{b(),v()});return}i._nonReactive.beforeLoadPromise=Jc();const _={...qc(e,n,!1),...i.__routeContext},{search:x,params:R,cause:C}=i,A=Ip(e,t),O={search:x,abortController:d,params:R,preload:A,context:_,location:e.location,navigate:j=>e.router.navigate({...j,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:A?"preload":C,matches:e.matches,...e.router.options.additionalContext},D=j=>{if(j===void 0){Vu(()=>{b(),v()});return}(ir(j)||Ps(j))&&(b(),Ou(e,n,j,"BEFORE_LOAD")),Vu(()=>{b(),e.updateMatch(t,$=>({...$,__beforeLoadContext:j})),v()})};let N;try{if(N=r.options.beforeLoad(O),Vc(N))return b(),N.catch(j=>{Ou(e,n,j,"BEFORE_LOAD")}).then(D)}catch(j){b(),Ou(e,n,j,"BEFORE_LOAD")}D(N)},FB=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],c=()=>f(),l=()=>HB(e,n,t,i),f=()=>{if(OI(e,n))return;const d=jB(e,n,i);return Vc(d)?d.then(l):l()};return c()},VB=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const 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(([c,l,f])=>{const d=c?.meta,h=c?.links,y=c?.scripts,g=c?.styles;return{meta:d,links:h,headScripts:y,headers:f,scripts:l,styles:g}})},DI=(e,t,n,r)=>{const i=e.matchPromises[n-1],{params:c,loaderDeps:l,abortController:f,cause:d}=e.router.getMatch(t),h=qc(e,n),y=Ip(e,t);return{params:c,deps:l,preload:!!y,parentMatchPromise:i,abortController:f,context:h,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:y?"preload":d,route:r,...e.router.options.additionalContext}},wR=async(e,t,n,r)=>{try{const i=e.router.getMatch(t);try{(!(sB??e.router.isServer)||i.ssr===!0)&&kI(r);const c=r.options.loader?.(DI(e,t,n,r)),l=r.options.loader&&Vc(c);if((l||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),r.options.loader){const h=l?await c:c;wi(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,y=>({...y,loaderData:h}))}r._lazyPromise&&await r._lazyPromise;const d=i._nonReactive.minPendingPromise;d&&await d,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,context:qc(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let l=c;if(l?.name==="AbortError"){e.updateMatch(t,d=>({...d,status:d.status==="pending"?"success":d.status,isFetching:!1,context:qc(e,n)}));return}const f=i._nonReactive.minPendingPromise;f&&await f,Ps(c)&&await r.options.notFoundComponent?.preload?.(),wi(e,e.router.getMatch(t),c);try{r.options.onError?.(c)}catch(d){l=d,wi(e,e.router.getMatch(t),d)}e.updateMatch(t,d=>({...d,error:l,context:qc(e,n),status:"error",isFetching:!1}))}}catch(i){const c=e.router.getMatch(t);c&&(c._nonReactive.loaderPromise=void 0),wi(e,c,i)}},qB=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let i=!1,c=!1;const l=e.router.looseRoutesById[r];if(!OI(e,n)){const h=e.router.getMatch(n);if(h._nonReactive.loaderPromise){if(h.status==="success"&&!e.sync&&!h.preload)return h;await h._nonReactive.loaderPromise;const y=e.router.getMatch(n),g=y._nonReactive.error||y.error;g&&wi(e,y,g)}else{const y=Date.now()-h.updatedAt,g=Ip(e,n),b=g?l.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:l.options.staleTime??e.router.options.defaultStaleTime??0,v=l.options.shouldReload,_=typeof v=="function"?v(DI(e,n,t,l)):v,x=!!g&&!e.router.state.matches.some(O=>O.id===n),R=e.router.getMatch(n);R._nonReactive.loaderPromise=Jc(),x!==R.preload&&e.updateMatch(n,O=>({...O,preload:x}));const{status:C,invalid:A}=R;i=C==="success"&&(A||(_??y>b)),g&&l.options.preload===!1||(i&&!e.sync?(c=!0,(async()=>{try{await wR(e,n,t,l);const O=e.router.getMatch(n);O._nonReactive.loaderPromise?.resolve(),O._nonReactive.loadPromise?.resolve(),O._nonReactive.loaderPromise=void 0}catch(O){ir(O)&&await e.router.navigate(O.options)}})()):(C!=="success"||i&&e.sync)&&await wR(e,n,t,l))}}const f=e.router.getMatch(n);c||(f._nonReactive.loaderPromise?.resolve(),f._nonReactive.loadPromise?.resolve()),clearTimeout(f._nonReactive.pendingTimeout),f._nonReactive.pendingTimeout=void 0,c||(f._nonReactive.loaderPromise=void 0),f._nonReactive.dehydrated=void 0;const d=c?f.isFetching:!1;return d!==f.isFetching||f.invalid!==!1?(e.updateMatch(n,h=>({...h,isFetching:d,invalid:!1})),e.router.getMatch(n)):f};async function ER(e){const t=Object.assign(e,{matchPromises:[]});t.router.state.matches.some(n=>n._forcePending)&&Mh(t);try{for(let f=0;ff.status==="rejected").map(f=>f.reason);let c;for(const f of i){if(ir(f))throw f;!c&&Ps(f)&&(c=f)}for(const f of t.matches){const{id:d,routeId:h}=f,y=t.router.looseRoutesById[h];try{const g=VB(t,d,y);if(g){const b=await g;t.updateMatch(d,v=>({...v,...b}))}}catch(g){console.error(`Error executing head for route ${h}:`,g)}}if(c)throw c;const l=Mh(t);Vc(l)&&await l}catch(n){if(Ps(n)&&!t.preload){const r=Mh(t);throw Vc(r)&&await r,n}if(ir(n))throw n}return t.matches}async function kI(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const r of NI){const i=e.options[r]?.preload;i&&n.push(i())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function PI(e){for(const t of NI)if(e.options[t]?.preload)return!0;return!1}const NI=["component","errorComponent","pendingComponent","notFoundComponent"];function GB(e){return{input:({url:t})=>{for(const n of e)t=fb(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=zI(e[n],t);return t}}}function KB(e){const t=AI(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),c=e.caseSensitive?r:r.toLowerCase();return{input:({url:l})=>{const f=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return f===i?l.pathname="/":f.startsWith(c)&&(l.pathname=l.pathname.slice(n.length)),l},output:({url:l})=>(l.pathname=Oh(["/",t,l.pathname]),l)}}function fb(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function zI(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Ra(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,i=t?.href!==n.href,c=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:i,hashChanged:c}}class ZB{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options,i=this.basepath??r?.basepath??"/",c=this.basepath===void 0,l=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=RB(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=tB()),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 b;this.resolvePathCache=Gh(1e3),b=this.buildRouteTree(),this.setRoutes(b)}!this.__store&&this.latestLocation&&(this.__store=new JL(YB(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(b=>!["redirected"].includes(b.status))}}}),kB(this));let f=!1;const d=this.options.basepath??"/",h=this.options.rewrite;if(c||i!==d||l!==h){this.basepath=d;const b=[],v=AI(d);v&&v!=="/"&&b.push(KB({basepath:d})),h&&b.push(h),this.rewrite=b.length===0?void 0:b.length===1?b[0]:GB(b),this.history&&this.updateLatestLocation(),f=!0}f&&this.__store&&(this.__store.state={...this.state,location: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=()=>{const n=vB(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&pB(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const i=({href:d,state:h})=>{const y=new URL(d,this.origin),g=fb(this.rewrite,y),b=this.options.parseSearch(g.search),v=this.options.stringifySearch(b);return g.search=v,{href:g.href.replace(g.origin,""),publicHref:d,pathname:$y(g.pathname),external:!!this.rewrite&&g.origin!==this.origin,searchStr:v,search:er(r?.search,b),hash:$y(g.hash.split("#").reverse()[0]??""),state:er(r?.state,h)}},c=i(n),{__tempLocation:l,__tempKey:f}=c.state;if(l&&(!f||f===this.tempLocationKey)){const d=i(l);return d.state.key=c.state.key,d.state.__TSR_key=c.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:c}}return c},this.resolvePathWithBase=(n,r)=>xB({base:n,to:Xb(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},i):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>XB({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(c=>c.status==="pending"),r=this.state.matches.filter(c=>c.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(c=>{this.cancelMatch(c.id)})},this.buildLocation=n=>{const r=(c={})=>{const l=c._fromLocation||this.pendingBuiltLocation||this.latestLocation,f=this.matchRoutesLightweight(l);c.from;const d=c.unsafeRelative==="path"?l.pathname:c.from??f.fullPath,h=this.resolvePathWithBase(d,"."),y=f.search,g={...f.params},b=c.to?this.resolvePathWithBase(h,`${c.to}`):this.resolvePathWithBase(h,"."),v=c.params===!1||c.params===null?{}:(c.params??!0)===!0?g:Object.assign(g,_i(c.params,g)),_=Vy({path:b,params:v}).interpolatedPath,x=this.getMatchedRoutes(_);let R=x.matchedRoutes;if((x.foundRoute?x.foundRoute.path!=="/"&&x.routeParams["**"]:po(_))&&(this.options.notFoundRoute?R=[...R,this.options.notFoundRoute]:xR(this.options.notFoundMode,R)),Object.keys(v).length>0)for(const K of R){const Q=K.options.params?.stringify??K.options.stringifyParams;Q&&Object.assign(v,Q(v))}const A=n.leaveParams?b:$y(Vy({path:b,params:v,decoder:this.pathParamsDecoder}).interpolatedPath);let O=y;if(n._includeValidateSearch&&this.options.search?.strict){const K={};R.forEach(Q=>{if(Q.options.validateSearch)try{Object.assign(K,Dh(Q.options.validateSearch,{...K,...O}))}catch{}}),O=K}O=WB({search:O,dest:c,destRoutes:R,_includeValidateSearch:n._includeValidateSearch}),O=er(y,O);const D=this.options.stringifySearch(O),N=c.hash===!0?l.hash:c.hash?_i(c.hash,l.hash):void 0,j=N?`#${N}`:"";let $=c.state===!0?l.state:c.state?_i(c.state,l.state):{};$=er(l.state,$);const k=`${A}${D}${j}`;let Z,se,le=!1;if(this.rewrite){const K=new URL(k,this.origin),Q=zI(this.rewrite,K);Z=K.href.replace(K.origin,""),Q.origin!==this.origin?(se=Q.href,le=!0):se=Q.pathname+Q.search+Q.hash}else Z=fB(k),se=Z;return{publicHref:se,href:Z,pathname:A,search:O,searchStr:D,state:$,hash:N??"",external:le,unmaskOnReload:c.unmaskOnReload}},i=(c={},l)=>{const f=r(c);let d=l?r(l):void 0;if(!d){const h={};if(this.options.routeMasks){const y=mB(f.pathname,this.processedTree);if(y){Object.assign(h,y.rawParams);const{from:g,params:b,...v}=y.route,_=b===!1||b===null?{}:(b??!0)===!0?h:Object.assign(h,_i(b,h));l={from:n.from,...v,params:_},d=r(l)}}}return d&&(f.maskedLocation=d),f};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...i})=>{const c=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(y=>{i.state[y]=this.latestLocation.state[y]});const h=xa(i.state,this.latestLocation.state);return d.forEach(y=>{delete i.state[y]}),h},l=po(this.latestLocation.href)===po(i.href),f=this.commitLocationPromise;if(this.commitLocationPromise=Jc(()=>{f?.resolve()}),l&&c())this.load();else{let{maskedLocation:d,hashScrollIntoView:h,...y}=i;d&&(y={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...y,search:y.searchStr,state:{...y.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(y.unmaskOnReload??this.options.unmaskOnReload??!1)&&(y.state.__tempKey=this.tempLocationKey)),y.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](y.publicHref,y.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:c,ignoreBlocker:l,href:f,...d}={})=>{if(f){const g=this.history.location.state.__TSR_index,b=Fh(f,{__TSR_index:n?g:g+1}),v=new URL(b.pathname,this.origin),_=fb(this.rewrite,v);d.to=_.pathname,d.search=this.options.parseSearch(b.search),d.hash=b.hash.slice(1)}const h=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const y=this.commitLocation({...h,viewTransition:c,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:c,...l})=>{let f=!1;if(i)try{new URL(`${i}`),f=!0}catch{}if(f&&!r&&(r=!0),r){if(n!==void 0||!i){const h=this.buildLocation({to:n,...l});i=i??h.publicHref,c=c??h.publicHref}const d=!f&&c?c:i;if(qh(d))return Promise.resolve();if(!l.ignoreBlocker){const y=this.history.getBlockers?.()??[];for(const g of y)if(g?.blockerFn&&await g.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return l.replace?window.location.replace(d):window.location.href=d,Promise.resolve()}return this.buildAndCommitLocation({...l,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(i=>!n.some(c=>c.id===i.id))}))},this.load=async n=>{let r,i,c;for(c=new Promise(f=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,h=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Ra({resolvedLocation:h,location:d})}),this.emit({type:"onBeforeLoad",...Ra({resolvedLocation:h,location:d})}),await ER({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let y=[],g=[],b=[];Vu(()=>{this.__store.setState(v=>{const _=v.matches,x=v.pendingMatches||v.matches;return y=_.filter(R=>!x.some(C=>C.id===R.id)),g=x.filter(R=>!_.some(C=>C.id===R.id)),b=x.filter(R=>_.some(C=>C.id===R.id)),{...v,isLoading:!1,loadedAt:Date.now(),matches:x,pendingMatches:void 0,cachedMatches:[...v.cachedMatches,...y.filter(R=>R.status!=="error"&&R.status!=="notFound")]}}),this.clearExpiredCache()}),[[y,"onLeave"],[g,"onEnter"],[b,"onStay"]].forEach(([v,_])=>{v.forEach(x=>{this.looseRoutesById[x.routeId].options[_]?.(x)})})})})}})}catch(d){ir(d)?(r=d,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Ps(d)&&(i=d),this.__store.setState(h=>({...h,statusCode:r?r.status:i?404:h.matches.some(y=>y.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===c&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=c,await c;this.latestLoadPromise&&c!==this.latestLoadPromise;)await this.latestLoadPromise;let l;this.hasNotFoundMatch()?l=404:this.__store.state.matches.some(f=>f.status==="error")&&(l=500),l!==void 0&&this.__store.setState(f=>({...f,statusCode:l}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const c=this.latestLocation,l=this.state.resolvedLocation,f=typeof r.types=="function"?r.types(Ra({resolvedLocation:l,location:c})):r.types;if(f===!1){n();return}i={update:n,types:f}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const i=this.state.pendingMatches?.some(c=>c.id===n)?"pendingMatches":this.state.matches.some(c=>c.id===n)?"matches":this.state.cachedMatches.some(c=>c.id===n)?"cachedMatches":"";i&&this.__store.setState(c=>({...c,[i]:c[i]?.map(l=>l.id===n?r(l):l)}))})},this.getMatch=n=>{const r=i=>i.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=i=>n?.filter?.(i)??!0?{...i,invalid:!0,...n?.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i;return this.__store.setState(i=>({...i,matches:i.matches.map(r),cachedMatches:i.cachedMatches.map(r),pendingMatches:i.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(n.options.href){if(r)try{const i=new URL(r);if(this.origin&&i.origin===this.origin){const c=i.pathname+i.search+i.hash;n.options.href=c,n.headers.set("Location",c)}}catch{}}else{const i=this.buildLocation(n.options),c=this.getParsedLocationHref(i);n.options.href=c,n.headers.set("Location",c)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(i=>({...i,cachedMatches:i.cachedMatches.filter(c=>!r(c))})):this.__store.setState(i=>({...i,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const i=this.looseRoutesById[r.routeId];if(!i.options.loader)return!0;const c=(r.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=c};this.clearCache({filter:n})},this.loadRouteChunk=kI,this.preloadRoute=async n=>{const r=this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const c=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(f=>f.id)),l=new Set([...c,...this.state.cachedMatches.map(f=>f.id)]);Vu(()=>{i.forEach(f=>{l.has(f.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,f]}))})});try{return i=await ER({router:this,matches:i,location:r,preload:!0,updateMatch:(f,d)=>{c.has(f)?i=i.map(h=>h.id===f?d(h):h):this.updateMatch(f,d)}}),i}catch(f){if(ir(f))return f.options.reloadDocument?void 0:await this.preloadRoute({...f.options,_fromLocation:r});Ps(f)||console.error(f);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},c=this.buildLocation(i);if(r?.pending&&this.state.status!=="pending")return!1;const f=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=gB(c.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,f.pathname,this.processedTree);return!d||n.params&&!xa(d.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?xa(f.search,c.search,{partial:!0})?d.rawParams:!1:d.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??BB,parseSearch:t.parseSearch??LB}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:t,routesByPath:n,processedTree:r}){this.routesById=t,this.routesByPath=n,this.processedTree=r;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:i,routeParams:c,parsedParams:l}=r;let{matchedRoutes:f}=r,d=!1;(i?i.path!=="/"&&c["**"]:po(t.pathname))&&(this.options.notFoundRoute?f=[...f,this.options.notFoundRoute]:d=!0);const h=d?xR(this.options.notFoundMode,f):void 0,y=[],g=b=>b?.id?b.context??this.options.context??void 0:this.options.context??void 0;return f.forEach((b,v)=>{const _=y[v-1],[x,R,C]=(()=>{const ye=_?.search??t.search,fe=_?._strictSearch??void 0;try{const q=Dh(b.options.validateSearch,{...ye})??void 0;return[{...ye,...q},{...fe,...q},void 0]}catch(q){let W=q;if(q instanceof Qh||(W=new Qh(q.message,{cause:q})),n?.throwOnError)throw W;return[ye,{},W]}})(),A=b.options.loaderDeps?.({search:x})??"",O=A?JSON.stringify(A):"",{interpolatedPath:D,usedParams:N}=Vy({path:b.fullPath,params:c,decoder:this.pathParamsDecoder}),j=b.id+D+O,$=this.getMatch(j),k=this.state.matches.find(ye=>ye.routeId===b.id),Z=$?._strictParams??N;let se;if(!$)try{RR(b,N,l,Z)}catch(ye){if(Ps(ye)||ir(ye)?se=ye:se=new QB(ye.message,{cause:ye}),n?.throwOnError)throw se}Object.assign(c,Z);const le=k?"stay":"enter";let K;if($)K={...$,cause:le,params:k?er(k.params,c):c,_strictParams:Z,search:er(k?k.search:$.search,x),_strictSearch:R};else{const ye=b.options.loader||b.options.beforeLoad||b.lazyFn||PI(b)?"pending":"success";K={id:j,ssr:b.options.ssr,index:v,routeId:b.id,params:k?er(k.params,c):c,_strictParams:Z,pathname:D,updatedAt:Date.now(),search:k?er(k.search,x):x,_strictSearch:R,searchError:void 0,status:ye,isFetching:!1,error:void 0,paramsError:se,__routeContext:void 0,_nonReactive:{loadPromise:Jc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:le,loaderDeps:k?er(k.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}n?.preload||(K.globalNotFound=h===b.id),K.searchError=C;const Q=g(_);K.context={...Q,...K.__routeContext,...K.__beforeLoadContext},y.push(K)}),y.forEach((b,v)=>{const _=this.looseRoutesById[b.routeId];if(!this.getMatch(b.id)){const R=y[v-1],C=g(R);if(_.options.context){const A={deps:b.loaderDeps,params:b.params,context:C??{},location:t,navigate:O=>this.navigate({...O,_fromLocation:t}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:y};b.__routeContext=_.options.context(A)??void 0}b.context={...C,...b.__routeContext,...b.__beforeLoadContext}}}),y}matchRoutesLightweight(t){const{matchedRoutes:n,routeParams:r,parsedParams:i}=this.getMatchedRoutes(t.pathname),c=sf(n),l={...t.search};for(const y of n)try{Object.assign(l,Dh(y.options.validateSearch,l))}catch{}const f=sf(this.state.matches),d=f&&f.routeId===c.id&&t.pathname===this.state.location.pathname;let h;if(d)h=f.params;else{const y={...r};for(const g of n)try{RR(g,r,i??{},y)}catch{}h=y}return{matchedRoutes:n,fullPath:c.fullPath,search:l,params:h}}}class Qh extends Error{}class QB extends Error{}function YB(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Dh(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Qh("Async validation not supported");if(n.issues)throw new Qh(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 XB({pathname:e,routesById:t,processedTree:n}){const r={},i=po(e);let c,l;const f=yB(i,n,!0);return f&&(c=f.route,Object.assign(r,f.rawParams),l=Object.assign({},f.parsedParams)),{matchedRoutes:f?.branch||[t[sr]],routeParams:r,foundRoute:c,parsedParams:l}}function WB({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return JB(n)(e,t,r??!1)}function JB(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const i of e){if("search"in i.options)i.options.search?.middlewares&&t.middlewares.push(...i.options.search.middlewares);else if(i.options.preSearchFilters||i.options.postSearchFilters){const c=({search:l,next:f})=>{let d=l;"preSearchFilters"in i.options&&i.options.preSearchFilters&&(d=i.options.preSearchFilters.reduce((y,g)=>g(y),l));const h=f(d);return"postSearchFilters"in i.options&&i.options.postSearchFilters?i.options.postSearchFilters.reduce((y,g)=>g(y),h):h};t.middlewares.push(c)}if(i.options.validateSearch){const c=({search:l,next:f})=>{const d=f(l);if(!t._includeValidateSearch)return d;try{return{...d,...Dh(i.options.validateSearch,d)??void 0}}catch{return d}};t.middlewares.push(c)}}const n=({search:i})=>{const c=t.dest;return c.search?c.search===!0?i:_i(c.search,i):{}};t.middlewares.push(n);const r=(i,c,l)=>{if(i>=l.length)return c;const f=l[i];return f({search:c,next:h=>r(i+1,h,l)})};return function(c,l,f){return t.dest=l,t._includeValidateSearch=f,r(0,c,t.middlewares)}}function xR(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return sr}function RR(e,t,n,r){const i=e.options.params?.parse??e.options.parseParams;if(i)if(e.options.skipRouteOnParseError)for(const c in t)c in n&&(r[c]=n[c]);else{const c=i(r);Object.assign(r,c)}}const e6="Error preloading route! ☝️";class LI{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,i=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=sr:this.parentRoute||yo(!1);let c=i?sr:r?.path;c&&c!=="/"&&(c=TI(c));const l=r?.id||c;let f=i?sr:Oh([this.parentRoute.id===sr?"":this.parentRoute.id,l]);c===sr&&(c="/"),f!==sr&&(f=Oh(["/",f]));const d=f===sr?"/":Oh([this.parentRoute.fullPath,c]);this._path=c,this._id=f,this._fullPath=d,this._to=po(d)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>Wb({from:this.fullPath,...n}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class t6 extends LI{constructor(t){super(t)}}const n6="use",CR=Kb[n6],uh=typeof window<"u"?I.useLayoutEffect:I.useEffect;function Gy(e){const t=I.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function s6(e,t,n={},r={}){I.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([c])=>{t(c)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function r6(e){const t=I.useRef(null);return I.useImperativeHandle(e,()=>t.current,[]),t}function Jb(e){const t=e.errorComponent??ev;return U.jsx(o6,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?I.createElement(t,{error:n,reset:r}):e.children})}class o6 extends I.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function ev({error:e}){const[t,n]=I.useState(!1);return U.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[U.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[U.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),U.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),U.jsx("div",{style:{height:".25rem"}}),t?U.jsx("div",{children:U.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?U.jsx("code",{children:e.message}):null})}):null]})}function i6({children:e,fallback:t=null}){return BI()?U.jsx(Wc.Fragment,{children:e}):U.jsx(Wc.Fragment,{children:t})}function BI(){return Wc.useSyncExternalStore(a6,()=>!0,()=>!1)}function a6(){return()=>{}}var Ky={exports:{}},Zy={},Qy={exports:{}},Yy={};var TR;function c6(){if(TR)return Yy;TR=1;var e=cl();function t(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,c=e.useLayoutEffect,l=e.useDebugValue;function f(g,b){var v=b(),_=r({inst:{value:v,getSnapshot:b}}),x=_[0].inst,R=_[1];return c(function(){x.value=v,x.getSnapshot=b,d(x)&&R({inst:x})},[g,v,b]),i(function(){return d(x)&&R({inst:x}),g(function(){d(x)&&R({inst:x})})},[g]),l(v),v}function d(g){var b=g.getSnapshot;g=g.value;try{var v=b();return!n(g,v)}catch{return!0}}function h(g,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return Yy.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Yy}var AR;function $I(){return AR||(AR=1,Qy.exports=c6()),Qy.exports}var IR;function l6(){if(IR)return Zy;IR=1;var e=cl(),t=$I();function n(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,c=e.useRef,l=e.useEffect,f=e.useMemo,d=e.useDebugValue;return Zy.useSyncExternalStoreWithSelector=function(h,y,g,b,v){var _=c(null);if(_.current===null){var x={hasValue:!1,value:null};_.current=x}else x=_.current;_=f(function(){function C(j){if(!A){if(A=!0,O=j,j=b(j),v!==void 0&&x.hasValue){var $=x.value;if(v($,j))return D=$}return D=j}if($=D,r(O,j))return $;var k=b(j);return v!==void 0&&v($,k)?(O=j,$):(O=j,D=k)}var A=!1,O,D,N=g===void 0?null:g;return[function(){return C(y())},N===null?void 0:function(){return C(N())}]},[y,g,b,v]);var R=i(h,_[0],_[1]);return l(function(){x.hasValue=!0,x.value=R},[R]),d(R),R},Zy}var OR;function u6(){return OR||(OR=1,Ky.exports=l6()),Ky.exports}var UI=u6();function f6(e,t=r=>r,n={}){const r=n.equal??d6;return UI.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function d6(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!t.has(r)||!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=MR(e);if(n.length!==MR(t).length)return!1;for(let r=0;r"u"?Xy:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Xy,Xy)}function es(e){const t=I.useContext(jI());return e?.warn,t}function hn(e){const t=es({warn:e?.router===void 0}),n=e?.router||t,r=I.useRef(void 0);return f6(n.__store,i=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const c=er(r.current,e.select(i));return r.current=c,c}return e.select(i)}return i})}const Op=I.createContext(void 0),h6=I.createContext(void 0);function zr(e){const t=I.useContext(e.from?h6:Op);return hn({select:r=>{const i=r.matches.find(c=>e.from?e.from===c.routeId:c.id===t);if(yo(!((e.shouldThrow??!0)&&!i),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),i!==void 0)return e.select?e.select(i):i},structuralSharing:e.structuralSharing})}function tv(e){return zr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function nv(e){const{select:t,...n}=e;return zr({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function sv(e){return zr({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function rv(e){return zr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Mp(e){const t=es();return I.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var Wy={exports:{}},Zn={};var DR;function p6(){if(DR)return Zn;DR=1;var e=cl();function t(d){var h="https://react.dev/errors/"+d;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Wy.exports=p6(),Wy.exports}var ki=HI();function m6(e,t){const n=es(),r=r6(t),{activeProps:i,inactiveProps:c,activeOptions:l,to:f,preload:d,preloadDelay:h,hashScrollIntoView:y,replace:g,startTransition:b,resetScroll:v,viewTransition:_,children:x,target:R,disabled:C,style:A,className:O,onClick:D,onFocus:N,onMouseEnter:j,onMouseLeave:$,onTouchStart:k,ignoreBlocker:Z,params:se,search:le,hash:K,state:Q,mask:ye,reloadDocument:fe,unsafeRelative:q,from:W,_fromLocation:F,...be}=e,Te=BI(),P=hn({select:gt=>gt.location.search,structuralSharing:!0}),ne=e.from,ie=I.useMemo(()=>({...e,from:ne}),[n,P,ne,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),de=I.useMemo(()=>n.buildLocation({...ie}),[n,ie]),Ce=de.maskedLocation?de.maskedLocation.publicHref:de.publicHref,_e=de.maskedLocation?de.maskedLocation.external:de.external,ve=I.useMemo(()=>_6(Ce,_e,n.history,C),[C,_e,Ce,n.history]),Ye=I.useMemo(()=>{if(ve?.external)return qh(ve.href)?void 0:ve.href;if(!w6(f)&&!(typeof f!="string"||f.indexOf(":")===-1))try{return new URL(f),qh(f)?void 0:f}catch{}},[f,ve]),He=hn({select:gt=>{if(Ye)return!1;if(l?.exact){if(!EB(gt.location.pathname,de.pathname,n.basepath))return!1}else{const $t=Kh(gt.location.pathname,n.basepath),Ut=Kh(de.pathname,n.basepath);if(!($t.startsWith(Ut)&&($t.length===Ut.length||$t[Ut.length]==="/")))return!1}return(l?.includeSearch??!0)&&!xa(gt.location.search,de.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?Te&>.location.hash===de.hash:!0}}),ht=He?_i(i,{})??g6:Jy,Ft=He?Jy:_i(c,{})??Jy,oe=[O,ht.className,Ft.className].filter(Boolean).join(" "),Fe=(A||ht.style||Ft.style)&&{...A,...ht.style,...Ft.style},[Ie,Pt]=I.useState(!1),we=I.useRef(!1),Ne=e.reloadDocument||Ye?!1:d??n.options.defaultPreload,qe=h??n.options.defaultPreloadDelay??0,Qe=I.useCallback(()=>{n.preloadRoute({...ie}).catch(gt=>{console.warn(gt),console.warn(e6)})},[n,ie]),ut=I.useCallback(gt=>{gt?.isIntersecting&&Qe()},[Qe]);s6(r,ut,S6,{disabled:!!C||Ne!=="viewport"}),I.useEffect(()=>{we.current||!C&&Ne==="render"&&(Qe(),we.current=!0)},[C,Qe,Ne]);const Be=gt=>{const $t=gt.currentTarget.getAttribute("target"),Ut=R!==void 0?R:$t;if(!C&&!E6(gt)&&!gt.defaultPrevented&&(!Ut||Ut==="_self")&>.button===0){gt.preventDefault(),ki.flushSync(()=>{Pt(!0)});const an=n.subscribe("onResolved",()=>{an(),Pt(!1)});n.navigate({...ie,replace:g,resetScroll:v,hashScrollIntoView:y,startTransition:b,viewTransition:_,ignoreBlocker:Z})}};if(Ye)return{...be,ref:r,href:Ye,...x&&{children:x},...R&&{target:R},...C&&{disabled:C},...A&&{style:A},...O&&{className:O},...D&&{onClick:D},...N&&{onFocus:N},...j&&{onMouseEnter:j},...$&&{onMouseLeave:$},...k&&{onTouchStart:k}};const Le=gt=>{C||Ne&&Qe()},on=Le,it=gt=>{if(!(C||!Ne))if(!qe)Qe();else{const $t=gt.target;if(Mu.has($t))return;const Ut=setTimeout(()=>{Mu.delete($t),Qe()},qe);Mu.set($t,Ut)}},_s=gt=>{if(C||!Ne||!qe)return;const $t=gt.target,Ut=Mu.get($t);Ut&&(clearTimeout(Ut),Mu.delete($t))};return{...be,...ht,...Ft,href:ve?.href,ref:r,onClick:Du([D,Be]),onFocus:Du([N,Le]),onMouseEnter:Du([j,it]),onMouseLeave:Du([$,_s]),onTouchStart:Du([k,on]),disabled:!!C,target:R,...Fe&&{style:Fe},...oe&&{className:oe},...C&&y6,...He&&b6,...Te&&Ie&&v6}}const Jy={},g6={className:"active"},y6={role:"link","aria-disabled":!0},b6={"data-status":"active","aria-current":"page"},v6={"data-transitioning":"transitioning"},Mu=new WeakMap,S6={rootMargin:"100px"},Du=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function _6(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function w6(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const Or=I.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...c}=m6(r,t),l=typeof r.children=="function"?r.children({isActive:c["data-status"]==="active"}):r.children;if(!n){const{disabled:f,...d}=c;return I.createElement("a",d,l)}return I.createElement(n,c,l)});function E6(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let x6=class extends LI{constructor(t){super(t),this.useMatch=n=>zr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>zr({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>rv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>sv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>nv({...n,from:this.id}),this.useLoaderData=n=>tv({...n,from:this.id}),this.useNavigate=()=>Mp({from:this.fullPath}),this.Link=Wc.forwardRef((n,r)=>U.jsx(Or,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function R6(e){return new x6(e)}function C6(){return e=>A6(e)}class T6 extends t6{constructor(t){super(t),this.useMatch=n=>zr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>zr({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>rv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>sv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>nv({...n,from:this.id}),this.useLoaderData=n=>tv({...n,from:this.id}),this.useNavigate=()=>Mp({from:this.fullPath}),this.Link=Wc.forwardRef((n,r)=>U.jsx(Or,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function A6(e){return new T6(e)}function Kt(e){return typeof e=="object"?new PR(e,{silent:!0}).createRoute(e):new PR(e,{silent:!0}).createRoute}class PR{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const i=R6(r);return i.isRoot=!1,i},this.silent=n?.silent}}class NR{constructor(t){this.useMatch=n=>zr({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>zr({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>rv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>sv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>nv({...n,from:this.options.id}),this.useLoaderData=n=>tv({...n,from:this.options.id}),this.useNavigate=()=>{const n=es();return Mp({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function zR(e){return typeof e=="object"?new NR(e):t=>new NR({id:e,...t})}function rn(e,t){let n,r,i,c;const l=()=>(n||(n=e().then(d=>{n=void 0,r=d[t]}).catch(d=>{if(i=d,iB(i)&&i instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const h=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(h)||(sessionStorage.setItem(h,"1"),c=!0)}})),n),f=function(h){if(c)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)if(CR)CR(l());else throw l();return I.createElement(r,h)};return f.preload=l,f}function I6(){const e=es(),t=I.useRef({router:e,mounted:!1}),[n,r]=I.useState(!1),{hasPendingMatches:i,isLoading:c}=hn({select:g=>({isLoading:g.isLoading,hasPendingMatches:g.matches.some(b=>b.status==="pending")}),structuralSharing:!0}),l=Gy(c),f=c||n||i,d=Gy(f),h=c||i,y=Gy(h);return e.startTransition=g=>{r(!0),I.startTransition(()=>{g(),r(!1)})},I.useEffect(()=>{const g=e.history.subscribe(e.load),b=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return po(e.latestLocation.publicHref)!==po(b.publicHref)&&e.commitLocation({...b,replace:!0}),()=>{g()}},[e,e.history]),uh(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(b){console.error(b)}})()},[e]),uh(()=>{l&&!c&&e.emit({type:"onLoad",...Ra(e.state)})},[l,e,c]),uh(()=>{y&&!h&&e.emit({type:"onBeforeRouteMount",...Ra(e.state)})},[h,y,e]),uh(()=>{if(d&&!f){const g=Ra(e.state);e.emit({type:"onResolved",...g}),e.__store.setState(b=>({...b,status:"idle",resolvedLocation:b.location})),g.hrefChanged&&PB(e)}},[f,d,e]),null}function O6(e){const t=hn({select:n=>`not-found-${n.location.pathname}-${n.status}`});return U.jsx(Jb,{getResetKey:()=>t,onCatch:(n,r)=>{if(Ps(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(Ps(n))return e.fallback?.(n);throw n},children:e.children})}function M6(){return U.jsx("p",{children:"Not Found"})}function jc(e){return U.jsx(U.Fragment,{children:e.children})}function FI(e,t,n){return t.options.notFoundComponent?U.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?U.jsx(e.options.defaultNotFoundComponent,{...n}):U.jsx(M6,{})}function D6(){return es().isScrollRestoring,null}const VI=I.memo(function({matchId:t}){const n=es(),r=hn({select:C=>{const A=C.matches.find(O=>O.id===t);return yo(A),{routeId:A.routeId,ssr:A.ssr,_displayPending:A._displayPending}},structuralSharing:!0}),i=n.routesById[r.routeId],c=i.options.pendingComponent??n.options.defaultPendingComponent,l=c?U.jsx(c,{}):null,f=i.options.errorComponent??n.options.defaultErrorComponent,d=i.options.onCatch??n.options.defaultOnCatch,h=i.isRoot?i.options.notFoundComponent??n.options.notFoundRoute?.options.component:i.options.notFoundComponent,y=r.ssr===!1||r.ssr==="data-only",g=(!i.isRoot||i.options.wrapInSuspense||y)&&(i.options.wrapInSuspense??c??(i.options.errorComponent?.preload||y))?I.Suspense:jc,b=f?Jb:jc,v=h?O6:jc,_=hn({select:C=>C.loadedAt}),x=hn({select:C=>{const A=C.matches.findIndex(O=>O.id===t);return C.matches[A-1]?.routeId}}),R=i.isRoot?i.options.shellComponent??jc:jc;return U.jsxs(R,{children:[U.jsx(Op.Provider,{value:t,children:U.jsx(g,{fallback:l,children:U.jsx(b,{getResetKey:()=>_,errorComponent:f||ev,onCatch:(C,A)=>{if(Ps(C))throw C;d?.(C,A)},children:U.jsx(v,{fallback:C=>{if(!h||C.routeId&&C.routeId!==r.routeId||!C.routeId&&!i.isRoot)throw C;return I.createElement(h,C)},children:y||r._displayPending?U.jsx(i6,{fallback:l,children:U.jsx(LR,{matchId:t})}):U.jsx(LR,{matchId:t})})})})}),x===sr&&n.options.scrollRestoration?U.jsxs(U.Fragment,{children:[U.jsx(k6,{}),U.jsx(D6,{})]}):null]})});function k6(){const e=es(),t=I.useRef(void 0);return U.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Ra(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const LR=I.memo(function({matchId:t}){const n=es(),{match:r,key:i,routeId:c}=hn({select:d=>{const h=d.matches.find(_=>_.id===t),y=h.routeId,b=(n.routesById[y].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:y,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:b?JSON.stringify(b):void 0,routeId:y,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),l=n.routesById[c],f=I.useMemo(()=>{const d=l.options.component??n.options.defaultComponent;return d?U.jsx(d,{},i):U.jsx(qI,{})},[i,l.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const d=l.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const h=n.getMatch(r.id);if(h&&!h._nonReactive.minPendingPromise){const y=Jc();h._nonReactive.minPendingPromise=y,setTimeout(()=>{y.resolve(),h._nonReactive.minPendingPromise=void 0},d)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return yo(Ps(r.error)),FI(n,l,r.error);if(r.status==="redirected")throw yo(ir(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error")throw r.error;return f}),qI=I.memo(function(){const t=es(),n=I.useContext(Op),r=hn({select:h=>h.matches.find(y=>y.id===n)?.routeId}),i=t.routesById[r],c=hn({select:h=>{const g=h.matches.find(b=>b.id===n);return yo(g),g.globalNotFound}}),l=hn({select:h=>{const y=h.matches,g=y.findIndex(b=>b.id===n);return y[g+1]?.id}}),f=t.options.defaultPendingComponent?U.jsx(t.options.defaultPendingComponent,{}):null;if(c)return FI(t,i,void 0);if(!l)return null;const d=U.jsx(VI,{matchId:l});return r===sr?U.jsx(I.Suspense,{fallback:f,children:d}):d});function P6(){const e=es(),n=e.routesById[sr].options.pendingComponent??e.options.defaultPendingComponent,r=n?U.jsx(n,{}):null,i=typeof document<"u"&&e.ssr?jc:I.Suspense,c=U.jsxs(i,{fallback:r,children:[U.jsx(I6,{}),U.jsx(N6,{})]});return e.options.InnerWrap?U.jsx(e.options.InnerWrap,{children:c}):c}function N6(){const e=es(),t=hn({select:i=>i.matches[0]?.id}),n=hn({select:i=>i.loadedAt}),r=t?U.jsx(VI,{matchId:t}):null;return U.jsx(Op.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:U.jsx(Jb,{getResetKey:()=>n,errorComponent:ev,onCatch:i=>{i.message||i.toString()},children:r})})}const z6=e=>new L6(e);class L6 extends ZB{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Kt,globalThis.createLazyFileRoute=zR):typeof window<"u"&&(window.createFileRoute=Kt,window.createLazyFileRoute=zR);function B6({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=jI(),i=U.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?U.jsx(e.options.Wrap,{children:i}):i}function $6({router:e,...t}){return U.jsx(B6,{router:e,...t,children:U.jsx(P6,{})})}function U6(e){return hn({select:t=>e?.select?e.select(t.location):t.location})}function j6({tag:e,attrs:t,children:n,nonce:r}){switch(e){case"title":return U.jsx("title",{...t,suppressHydrationWarning:!0,children:n});case"meta":return U.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return U.jsx("link",{...t,nonce:r,suppressHydrationWarning:!0});case"style":return U.jsx("style",{...t,dangerouslySetInnerHTML:{__html:n},nonce:r});case"script":return U.jsx(H6,{attrs:t,children:n});default:return null}}function H6({attrs:e,children:t}){es(),I.useEffect(()=>{if(e?.src){const n=(()=>{try{const c=document.baseURI||window.location.href;return new URL(e.src,c).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(c=>c.src===n))return;const i=document.createElement("script");for(const[c,l]of Object.entries(e))c!=="suppressHydrationWarning"&&l!==void 0&&l!==!1&&i.setAttribute(c,typeof l=="boolean"?"":String(l));return document.head.appendChild(i),()=>{i.parentNode&&i.parentNode.removeChild(i)}}if(typeof t=="string"){const n=typeof e?.type=="string"?e.type:"text/javascript",r=typeof e?.nonce=="string"?e.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(l=>{if(!(l instanceof HTMLScriptElement))return!1;const f=l.getAttribute("type")??"text/javascript",d=l.getAttribute("nonce")??void 0;return l.textContent===t&&f===n&&d===r}))return;const c=document.createElement("script");if(c.textContent=t,e)for(const[l,f]of Object.entries(e))l!=="suppressHydrationWarning"&&f!==void 0&&f!==!1&&c.setAttribute(l,typeof f=="boolean"?"":String(f));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}},[e,t]);{const{src:n,...r}=e||{};return U.jsx("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:""},...r})}}const F6=()=>{const e=es(),t=e.options.ssr?.nonce,n=hn({select:d=>d.matches.map(h=>h.meta).filter(Boolean)}),r=I.useMemo(()=>{const d=[],h={};let y;for(let g=n.length-1;g>=0;g--){const b=n[g];for(let v=b.length-1;v>=0;v--){const _=b[v];if(_)if(_.title)y||(y={tag:"title",children:_.title});else if("script:ld+json"in _)try{const x=JSON.stringify(_["script:ld+json"]);d.push({tag:"script",attrs:{type:"application/ld+json"},children:uB(x)})}catch{}else{const x=_.name??_.property;if(x){if(h[x])continue;h[x]=!0}d.push({tag:"meta",attrs:{..._,nonce:t}})}}}return y&&d.push(y),t&&d.push({tag:"meta",attrs:{property:"csp-nonce",content:t}}),d.reverse(),d},[n,t]),i=hn({select:d=>{const h=d.matches.map(b=>b.links).filter(Boolean).flat(1).map(b=>({tag:"link",attrs:{...b,nonce:t}})),y=e.ssr?.manifest,g=d.matches.map(b=>y?.routes[b.routeId]?.assets??[]).filter(Boolean).flat(1).filter(b=>b.tag==="link").map(b=>({tag:"link",attrs:{...b.attrs,suppressHydrationWarning:!0,nonce:t}}));return[...h,...g]},structuralSharing:!0}),c=hn({select:d=>{const h=[];return d.matches.map(y=>e.looseRoutesById[y.routeId]).forEach(y=>e.ssr?.manifest?.routes[y.id]?.preloads?.filter(Boolean).forEach(g=>{h.push({tag:"link",attrs:{rel:"modulepreload",href:g,nonce:t}})})),h},structuralSharing:!0}),l=hn({select:d=>d.matches.map(h=>h.styles).flat(1).filter(Boolean).map(({children:h,...y})=>({tag:"style",attrs:{...y,nonce:t},children:h})),structuralSharing:!0}),f=hn({select:d=>d.matches.map(h=>h.headScripts).flat(1).filter(Boolean).map(({children:h,...y})=>({tag:"script",attrs:{...y,nonce:t},children:h})),structuralSharing:!0});return V6([...r,...c,...i,...l,...f],d=>JSON.stringify(d))};function V6(e,t){const n=new Set;return e.filter(r=>{const i=t(r);return n.has(i)?!1:(n.add(i),!0)})}function q6(){const e=F6(),n=es().options.ssr?.nonce;return U.jsx(U.Fragment,{children:e.map(r=>I.createElement(j6,{...r,key:`tsr-meta-${JSON.stringify(r)}`,nonce:n}))})}var e0={exports:{}},ku={},t0={exports:{}},n0={};var BR;function G6(){return BR||(BR=1,(function(e){function t(q,W){var F=q.length;q.push(W);e:for(;0>>1,Te=q[be];if(0>>1;bei(ie,F))dei(Ce,ie)?(q[be]=Ce,q[de]=F,be=de):(q[be]=ie,q[ne]=F,be=ne);else if(dei(Ce,F))q[be]=Ce,q[de]=F,be=de;else break e}}return W}function i(q,W){var F=q.sortIndex-W.sortIndex;return F!==0?F:q.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var l=Date,f=l.now();e.unstable_now=function(){return l.now()-f}}var d=[],h=[],y=1,g=null,b=3,v=!1,_=!1,x=!1,R=!1,C=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function D(q){for(var W=n(h);W!==null;){if(W.callback===null)r(h);else if(W.startTime<=q)r(h),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(h)}}function N(q){if(x=!1,D(q),!_)if(n(d)!==null)_=!0,j||(j=!0,K());else{var W=n(h);W!==null&&fe(N,W.startTime-q)}}var j=!1,$=-1,k=5,Z=-1;function se(){return R?!0:!(e.unstable_now()-Zq&&se());){var be=g.callback;if(typeof be=="function"){g.callback=null,b=g.priorityLevel;var Te=be(g.expirationTime<=q);if(q=e.unstable_now(),typeof Te=="function"){g.callback=Te,D(q),W=!0;break t}g===n(d)&&r(d),D(q)}else r(d);g=n(d)}if(g!==null)W=!0;else{var P=n(h);P!==null&&fe(N,P.startTime-q),W=!1}}break e}finally{g=null,b=F,v=!1}W=void 0}}finally{W?K():j=!1}}}var K;if(typeof O=="function")K=function(){O(le)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,ye=Q.port2;Q.port1.onmessage=le,K=function(){ye.postMessage(null)}}else K=function(){C(le,0)};function fe(q,W){$=C(function(){q(e.unstable_now())},W)}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(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125be?(q.sortIndex=F,t(h,q),n(d)===null&&q===n(h)&&(x?(A($),$=-1):x=!0,fe(N,F-be))):(q.sortIndex=Te,t(d,q),_||v||(_=!0,j||(j=!0,K()))),q},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(q){var W=b;return function(){var F=b;b=W;try{return q.apply(this,arguments)}finally{b=F}}}})(n0)),n0}var $R;function K6(){return $R||($R=1,t0.exports=G6()),t0.exports}var UR;function Z6(){if(UR)return ku;UR=1;var e=K6(),t=cl(),n=HI();function r(s){var o="https://react.dev/errors/"+s;if(1Te||(s.current=be[Te],be[Te]=null,Te--)}function ie(s,o){Te++,be[Te]=s.current,s.current=o}var de=P(null),Ce=P(null),_e=P(null),ve=P(null);function Ye(s,o){switch(ie(_e,o),ie(Ce,s),ie(de,null),o.nodeType){case 9:case 11:s=(s=o.documentElement)&&(s=s.namespaceURI)?R1(s):0;break;default:if(s=o.tagName,o=o.namespaceURI)o=R1(o),s=C1(o,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}ne(de),ie(de,s)}function He(){ne(de),ne(Ce),ne(_e)}function ht(s){s.memoizedState!==null&&ie(ve,s);var o=de.current,a=C1(o,s.type);o!==a&&(ie(Ce,s),ie(de,a))}function Ft(s){Ce.current===s&&(ne(de),ne(Ce)),ve.current===s&&(ne(ve),xu._currentValue=F)}var oe,Fe;function Ie(s){if(oe===void 0)try{throw Error()}catch(a){var o=a.stack.trim().match(/\n( *(at )?)/);oe=o&&o[1]||"",Fe=-1)":-1p||L[u]!==X[p]){var ae=` `+L[u].replace(" at new "," at ");return s.displayName&&ae.includes("")&&(ae=ae.replace("",s.displayName)),ae}while(1<=u&&0<=p);break}}}finally{Pt=!1,Error.prepareStackTrace=a}return(a=s?s.displayName||s.name:"")?Ie(a):""}function Ne(s,o){switch(s.tag){case 26:case 27:case 5:return Ie(s.type);case 16:return Ie("Lazy");case 13:return s.child!==o&&o!==null?Ie("Suspense Fallback"):Ie("Suspense");case 19:return Ie("SuspenseList");case 0:case 15:return we(s.type,!1);case 11:return we(s.type.render,!1);case 1:return we(s.type,!0);case 31:return Ie("Activity");default:return""}}function qe(s){try{var o="",a=null;do o+=Ne(s,a),a=s,s=s.return;while(s);return o}catch(u){return` Error generating stack: `+u.message+` -`+u.stack}}var Qe=Object.prototype.hasOwnProperty,ut=e.unstable_scheduleCallback,Be=e.unstable_cancelCallback,Le=e.unstable_shouldYield,on=e.unstable_requestPaint,it=e.unstable_now,_s=e.unstable_getCurrentPriorityLevel,gt=e.unstable_ImmediatePriority,$t=e.unstable_UserBlockingPriority,Ut=e.unstable_NormalPriority,an=e.unstable_LowPriority,ws=e.unstable_IdlePriority,$s=e.log,Ff=e.unstable_setDisableYieldValue,jo=null,qn=null;function dr(s){if(typeof $s=="function"&&Ff(s),qn&&typeof qn.setStrictMode=="function")try{qn.setStrictMode(jo,s)}catch{}}var Gn=Math.clz32?Math.clz32:Us,Qt=Math.log,Kn=Math.LN2;function Us(s){return s>>>=0,s===0?32:31-(Qt(s)/Kn|0)|0}var kn=256,hr=262144,pr=4194304;function js(s){var o=s&42;if(o!==0)return o;switch(s&-s){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 s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function Ho(s,o,a){var u=s.pendingLanes;if(u===0)return 0;var p=0,m=s.suspendedLanes,w=s.pingedLanes;s=s.warmLanes;var T=u&134217727;return T!==0?(u=T&~m,u!==0?p=js(u):(w&=T,w!==0?p=js(w):a||(a=T&~s,a!==0&&(p=js(a))))):(T=u&~m,T!==0?p=js(T):w!==0?p=js(w):a||(a=u&~s,a!==0&&(p=js(a)))),p===0?0:o!==0&&o!==p&&(o&m)===0&&(m=p&-p,a=o&-o,m>=a||m===32&&(a&4194048)!==0)?o:p}function Fo(s,o){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&o)===0}function Cm(s,o){switch(s){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 Vf(){var s=pr;return pr<<=1,(pr&62914560)===0&&(pr=4194304),s}function Nl(s){for(var o=[],a=0;31>a;a++)o.push(s);return o}function Xi(s,o){s.pendingLanes|=o,o!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function zl(s,o,a,u,p,m){var w=s.pendingLanes;s.pendingLanes=a,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=a,s.entangledLanes&=a,s.errorRecoveryDisabledLanes&=a,s.shellSuspendCounter=0;var T=s.entanglements,L=s.expirationTimes,X=s.hiddenUpdates;for(a=w&~a;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var fz=/[\n"\\]/g;function Fs(s){return s.replace(fz,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Om(s,o,a,u,p,m,w,T){s.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?s.type=w:s.removeAttribute("type"),o!=null?w==="number"?(o===0&&s.value===""||s.value!=o)&&(s.value=""+Hs(o)):s.value!==""+Hs(o)&&(s.value=""+Hs(o)):w!=="submit"&&w!=="reset"||s.removeAttribute("value"),o!=null?Mm(s,w,Hs(o)):a!=null?Mm(s,w,Hs(a)):u!=null&&s.removeAttribute("value"),p==null&&m!=null&&(s.defaultChecked=!!m),p!=null&&(s.checked=p&&typeof p!="function"&&typeof p!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?s.name=""+Hs(T):s.removeAttribute("name")}function bw(s,o,a,u,p,m,w,T){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(s.type=m),o!=null||a!=null){if(!(m!=="submit"&&m!=="reset"||o!=null)){Im(s);return}a=a!=null?""+Hs(a):"",o=o!=null?""+Hs(o):a,T||o===s.value||(s.value=o),s.defaultValue=o}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,s.checked=T?s.checked:!!u,s.defaultChecked=!!u,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(s.name=w),Im(s)}function Mm(s,o,a){o==="number"&&Xf(s.ownerDocument)===s||s.defaultValue===""+a||(s.defaultValue=""+a)}function tc(s,o,a,u){if(s=s.options,o){o={};for(var p=0;p"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zm=!1;if(qr)try{var Hl={};Object.defineProperty(Hl,"passive",{get:function(){zm=!0}}),window.addEventListener("test",Hl,Hl),window.removeEventListener("test",Hl,Hl)}catch{zm=!1}var qo=null,Lm=null,Jf=null;function Cw(){if(Jf)return Jf;var s,o=Lm,a=o.length,u,p="value"in qo?qo.value:qo.textContent,m=p.length;for(s=0;s=ql),Dw=" ",kw=!1;function Pw(s,o){switch(s){case"keyup":return $z.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nw(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var oc=!1;function jz(s,o){switch(s){case"compositionend":return Nw(o);case"keypress":return o.which!==32?null:(kw=!0,Dw);case"textInput":return s=o.data,s===Dw&&kw?null:s;default:return null}}function Hz(s,o){if(oc)return s==="compositionend"||!Hm&&Pw(s,o)?(s=Cw(),Jf=Lm=qo=null,oc=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1=o)return{node:a,offset:o-s};s=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Fw(a)}}function qw(s,o){return s&&o?s===o?!0:s&&s.nodeType===3?!1:o&&o.nodeType===3?qw(s,o.parentNode):"contains"in s?s.contains(o):s.compareDocumentPosition?!!(s.compareDocumentPosition(o)&16):!1:!1}function Gw(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var o=Xf(s.document);o instanceof s.HTMLIFrameElement;){try{var a=typeof o.contentWindow.location.href=="string"}catch{a=!1}if(a)s=o.contentWindow;else break;o=Xf(s.document)}return o}function qm(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o&&(o==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||o==="textarea"||s.contentEditable==="true")}var Yz=qr&&"documentMode"in document&&11>=document.documentMode,ic=null,Gm=null,Ql=null,Km=!1;function Kw(s,o,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Km||ic==null||ic!==Xf(u)||(u=ic,"selectionStart"in u&&qm(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Ql&&Zl(Ql,u)||(Ql=u,u=Gd(Gm,"onSelect"),0>=w,p-=w,Er=1<<32-Gn(o)+p|a<Je?(ct=Pe,Pe=null):ct=Pe.sibling;var vt=J(G,Pe,Y[Je],he);if(vt===null){Pe===null&&(Pe=ct);break}s&&Pe&&vt.alternate===null&&o(G,Pe),V=m(vt,V,Je),yt===null?ze=vt:yt.sibling=vt,yt=vt,Pe=ct}if(Je===Y.length)return a(G,Pe),ft&&Kr(G,Je),ze;if(Pe===null){for(;JeJe?(ct=Pe,Pe=null):ct=Pe.sibling;var hi=J(G,Pe,vt.value,he);if(hi===null){Pe===null&&(Pe=ct);break}s&&Pe&&hi.alternate===null&&o(G,Pe),V=m(hi,V,Je),yt===null?ze=hi:yt.sibling=hi,yt=hi,Pe=ct}if(vt.done)return a(G,Pe),ft&&Kr(G,Je),ze;if(Pe===null){for(;!vt.done;Je++,vt=Y.next())vt=pe(G,vt.value,he),vt!==null&&(V=m(vt,V,Je),yt===null?ze=vt:yt.sibling=vt,yt=vt);return ft&&Kr(G,Je),ze}for(Pe=u(Pe);!vt.done;Je++,vt=Y.next())vt=re(Pe,G,Je,vt.value,he),vt!==null&&(s&&vt.alternate!==null&&Pe.delete(vt.key===null?Je:vt.key),V=m(vt,V,Je),yt===null?ze=vt:yt.sibling=vt,yt=vt);return s&&Pe.forEach(function(gL){return o(G,gL)}),ft&&Kr(G,Je),ze}function It(G,V,Y,he){if(typeof Y=="object"&&Y!==null&&Y.type===x&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case b:e:{for(var ze=Y.key;V!==null;){if(V.key===ze){if(ze=Y.type,ze===x){if(V.tag===7){a(G,V.sibling),he=p(V,Y.props.children),he.return=G,G=he;break e}}else if(V.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===k&&ca(ze)===V.type){a(G,V.sibling),he=p(V,Y.props),tu(he,Y),he.return=G,G=he;break e}a(G,V);break}else o(G,V);V=V.sibling}Y.type===x?(he=sa(Y.props.children,G.mode,he,Y.key),he.return=G,G=he):(he=ld(Y.type,Y.key,Y.props,null,G.mode,he),tu(he,Y),he.return=G,G=he)}return w(G);case _:e:{for(ze=Y.key;V!==null;){if(V.key===ze)if(V.tag===4&&V.stateNode.containerInfo===Y.containerInfo&&V.stateNode.implementation===Y.implementation){a(G,V.sibling),he=p(V,Y.children||[]),he.return=G,G=he;break e}else{a(G,V);break}else o(G,V);V=V.sibling}he=eg(Y,G.mode,he),he.return=G,G=he}return w(G);case k:return Y=ca(Y),It(G,V,Y,he)}if(fe(Y))return Oe(G,V,Y,he);if(K(Y)){if(ze=K(Y),typeof ze!="function")throw Error(r(150));return Y=ze.call(Y),Ue(G,V,Y,he)}if(typeof Y.then=="function")return It(G,V,gd(Y),he);if(Y.$$typeof===O)return It(G,V,dd(G,Y),he);yd(G,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,V!==null&&V.tag===6?(a(G,V.sibling),he=p(V,Y),he.return=G,G=he):(a(G,V),he=Jm(Y,G.mode,he),he.return=G,G=he),w(G)):a(G,V)}return function(G,V,Y,he){try{eu=0;var ze=It(G,V,Y,he);return yc=null,ze}catch(Pe){if(Pe===gc||Pe===pd)throw Pe;var yt=xs(29,Pe,null,G.mode);return yt.lanes=he,yt.return=G,yt}}}var ua=gE(!0),yE=gE(!1),Yo=!1;function dg(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function hg(s,o){s=s.updateQueue,o.updateQueue===s&&(o.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Xo(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Wo(s,o,a){var u=s.updateQueue;if(u===null)return null;if(u=u.shared,(St&2)!==0){var p=u.pending;return p===null?o.next=o:(o.next=p.next,p.next=o),u.pending=o,o=cd(s),eE(s,null,a),o}return ad(s,u,o,a),cd(s)}function nu(s,o,a){if(o=o.updateQueue,o!==null&&(o=o.shared,(a&4194048)!==0)){var u=o.lanes;u&=s.pendingLanes,a|=u,o.lanes=a,qf(s,a)}}function pg(s,o){var a=s.updateQueue,u=s.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var p=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var w={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};m===null?p=m=w:m=m.next=w,a=a.next}while(a!==null);m===null?p=m=o:m=m.next=o}else p=m=o;a={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:m,shared:u.shared,callbacks:u.callbacks},s.updateQueue=a;return}s=a.lastBaseUpdate,s===null?a.firstBaseUpdate=o:s.next=o,a.lastBaseUpdate=o}var mg=!1;function su(){if(mg){var s=mc;if(s!==null)throw s}}function ru(s,o,a,u){mg=!1;var p=s.updateQueue;Yo=!1;var m=p.firstBaseUpdate,w=p.lastBaseUpdate,T=p.shared.pending;if(T!==null){p.shared.pending=null;var L=T,X=L.next;L.next=null,w===null?m=X:w.next=X,w=L;var ae=s.alternate;ae!==null&&(ae=ae.updateQueue,T=ae.lastBaseUpdate,T!==w&&(T===null?ae.firstBaseUpdate=X:T.next=X,ae.lastBaseUpdate=L))}if(m!==null){var pe=p.baseState;w=0,ae=X=L=null,T=m;do{var J=T.lane&-536870913,re=J!==T.lane;if(re?(at&J)===J:(u&J)===J){J!==0&&J===pc&&(mg=!0),ae!==null&&(ae=ae.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var Oe=s,Ue=T;J=o;var It=a;switch(Ue.tag){case 1:if(Oe=Ue.payload,typeof Oe=="function"){pe=Oe.call(It,pe,J);break e}pe=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=Ue.payload,J=typeof Oe=="function"?Oe.call(It,pe,J):Oe,J==null)break e;pe=g({},pe,J);break e;case 2:Yo=!0}}J=T.callback,J!==null&&(s.flags|=64,re&&(s.flags|=8192),re=p.callbacks,re===null?p.callbacks=[J]:re.push(J))}else re={lane:J,tag:T.tag,payload:T.payload,callback:T.callback,next:null},ae===null?(X=ae=re,L=pe):ae=ae.next=re,w|=J;if(T=T.next,T===null){if(T=p.shared.pending,T===null)break;re=T,T=re.next,re.next=null,p.lastBaseUpdate=re,p.shared.pending=null}}while(!0);ae===null&&(L=pe),p.baseState=L,p.firstBaseUpdate=X,p.lastBaseUpdate=ae,m===null&&(p.shared.lanes=0),si|=w,s.lanes=w,s.memoizedState=pe}}function vE(s,o){if(typeof s!="function")throw Error(r(191,s));s.call(o)}function bE(s,o){var a=s.callbacks;if(a!==null)for(s.callbacks=null,s=0;sm?m:8;var w=q.T,T={};q.T=T,Pg(s,!1,o,a);try{var L=p(),X=q.S;if(X!==null&&X(T,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var ae=o4(L,u);au(s,o,ae,Is(s))}else au(s,o,u,Is(s))}catch(pe){au(s,o,{then:function(){},status:"rejected",reason:pe},Is())}finally{W.p=m,w!==null&&T.types!==null&&(w.types=T.types),q.T=w}}function f4(){}function Dg(s,o,a,u){if(s.tag!==5)throw Error(r(476));var p=XE(s).queue;YE(s,p,o,F,a===null?f4:function(){return WE(s),a(u)})}function XE(s){var o=s.memoizedState;if(o!==null)return o;o={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xr,lastRenderedState:F},next:null};var a={};return o.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xr,lastRenderedState:a},next:null},s.memoizedState=o,s=s.alternate,s!==null&&(s.memoizedState=o),o}function WE(s){var o=XE(s);o.next===null&&(o=s.alternate.memoizedState),au(s,o.next.queue,{},Is())}function kg(){return zn(xu)}function JE(){return en().memoizedState}function ex(){return en().memoizedState}function d4(s){for(var o=s.return;o!==null;){switch(o.tag){case 24:case 3:var a=Is();s=Xo(a);var u=Wo(o,s,a);u!==null&&(ps(u,o,a),nu(u,o,a)),o={cache:cg()},s.payload=o;return}o=o.return}}function h4(s,o,a){var u=Is();a={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Td(s)?nx(o,a):(a=Xm(s,o,a,u),a!==null&&(ps(a,s,u),sx(a,o,u)))}function tx(s,o,a){var u=Is();au(s,o,a,u)}function au(s,o,a,u){var p={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Td(s))nx(o,p);else{var m=s.alternate;if(s.lanes===0&&(m===null||m.lanes===0)&&(m=o.lastRenderedReducer,m!==null))try{var w=o.lastRenderedState,T=m(w,a);if(p.hasEagerState=!0,p.eagerState=T,Es(T,w))return ad(s,o,p,0),Dt===null&&id(),!1}catch{}if(a=Xm(s,o,p,u),a!==null)return ps(a,s,u),sx(a,o,u),!0}return!1}function Pg(s,o,a,u){if(u={lane:2,revertLane:dy(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Td(s)){if(o)throw Error(r(479))}else o=Xm(s,a,u,2),o!==null&&ps(o,s,2)}function Td(s){var o=s.alternate;return s===Xe||o!==null&&o===Xe}function nx(s,o){bc=Sd=!0;var a=s.pending;a===null?o.next=o:(o.next=a.next,a.next=o),s.pending=o}function sx(s,o,a){if((a&4194048)!==0){var u=o.lanes;u&=s.pendingLanes,a|=u,o.lanes=a,qf(s,a)}}var cu={readContext:zn,use:Ed,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useLayoutEffect:Yt,useInsertionEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useSyncExternalStore:Yt,useId:Yt,useHostTransitionStatus:Yt,useFormState:Yt,useActionState:Yt,useOptimistic:Yt,useMemoCache:Yt,useCacheRefresh:Yt};cu.useEffectEvent=Yt;var rx={readContext:zn,use:Ed,useCallback:function(s,o){return ts().memoizedState=[s,o===void 0?null:o],s},useContext:zn,useEffect:jE,useImperativeHandle:function(s,o,a){a=a!=null?a.concat([s]):null,Rd(4194308,4,qE.bind(null,o,s),a)},useLayoutEffect:function(s,o){return Rd(4194308,4,s,o)},useInsertionEffect:function(s,o){Rd(4,2,s,o)},useMemo:function(s,o){var a=ts();o=o===void 0?null:o;var u=s();if(fa){dr(!0);try{s()}finally{dr(!1)}}return a.memoizedState=[u,o],u},useReducer:function(s,o,a){var u=ts();if(a!==void 0){var p=a(o);if(fa){dr(!0);try{a(o)}finally{dr(!1)}}}else p=o;return u.memoizedState=u.baseState=p,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:p},u.queue=s,s=s.dispatch=h4.bind(null,Xe,s),[u.memoizedState,s]},useRef:function(s){var o=ts();return s={current:s},o.memoizedState=s},useState:function(s){s=Tg(s);var o=s.queue,a=tx.bind(null,Xe,o);return o.dispatch=a,[s.memoizedState,a]},useDebugValue:Og,useDeferredValue:function(s,o){var a=ts();return Mg(a,s,o)},useTransition:function(){var s=Tg(!1);return s=YE.bind(null,Xe,s.queue,!0,!1),ts().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,o,a){var u=Xe,p=ts();if(ft){if(a===void 0)throw Error(r(407));a=a()}else{if(a=o(),Dt===null)throw Error(r(349));(at&127)!==0||RE(u,o,a)}p.memoizedState=a;var m={value:a,getSnapshot:o};return p.queue=m,jE(TE.bind(null,u,m,s),[s]),u.flags|=2048,_c(9,{destroy:void 0},CE.bind(null,u,m,a,o),null),a},useId:function(){var s=ts(),o=Dt.identifierPrefix;if(ft){var a=xr,u=Er;a=(u&~(1<<32-Gn(u)-1)).toString(32)+a,o="_"+o+"R_"+a,a=_d++,0<\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof u.is=="string"?w.createElement("select",{is:u.is}):w.createElement("select"),u.multiple?m.multiple=!0:u.size&&(m.size=u.size);break;default:m=typeof u.is=="string"?w.createElement(p,{is:u.is}):w.createElement(p)}}m[Pn]=o,m[cs]=u;e:for(w=o.child;w!==null;){if(w.tag===5||w.tag===6)m.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===o)break e;for(;w.sibling===null;){if(w.return===null||w.return===o)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}o.stateNode=m;e:switch(Bn(m,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Jr(o)}}return Lt(o),Zg(o,o.type,s===null?null:s.memoizedProps,o.pendingProps,a),null;case 6:if(s&&o.stateNode!=null)s.memoizedProps!==u&&Jr(o);else{if(typeof u!="string"&&o.stateNode===null)throw Error(r(166));if(s=_e.current,dc(o)){if(s=o.stateNode,a=o.memoizedProps,u=null,p=Nn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}s[Pn]=o,s=!!(s.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||E1(s.nodeValue,a)),s||Zo(o,!0)}else s=Kd(s).createTextNode(u),s[Pn]=o,o.stateNode=s}return Lt(o),null;case 31:if(a=o.memoizedState,s===null||s.memoizedState!==null){if(u=dc(o),a!==null){if(s===null){if(!u)throw Error(r(318));if(s=o.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[Pn]=o}else ra(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Lt(o),s=!1}else a=rg(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=a),s=!0;if(!s)return o.flags&256?(Cs(o),o):(Cs(o),null);if((o.flags&128)!==0)throw Error(r(558))}return Lt(o),null;case 13:if(u=o.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(p=dc(o),u!==null&&u.dehydrated!==null){if(s===null){if(!p)throw Error(r(318));if(p=o.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[Pn]=o}else ra(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Lt(o),p=!1}else p=rg(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=p),p=!0;if(!p)return o.flags&256?(Cs(o),o):(Cs(o),null)}return Cs(o),(o.flags&128)!==0?(o.lanes=a,o):(a=u!==null,s=s!==null&&s.memoizedState!==null,a&&(u=o.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==p&&(u.flags|=2048)),a!==s&&a&&(o.child.flags|=8192),Dd(o,o.updateQueue),Lt(o),null);case 4:return He(),s===null&&gy(o.stateNode.containerInfo),Lt(o),null;case 10:return Qr(o.type),Lt(o),null;case 19:if(ne(Jt),u=o.memoizedState,u===null)return Lt(o),null;if(p=(o.flags&128)!==0,m=u.rendering,m===null)if(p)uu(u,!1);else{if(Xt!==0||s!==null&&(s.flags&128)!==0)for(s=o.child;s!==null;){if(m=bd(s),m!==null){for(o.flags|=128,uu(u,!1),s=m.updateQueue,o.updateQueue=s,Dd(o,s),o.subtreeFlags=0,s=a,a=o.child;a!==null;)tE(a,s),a=a.sibling;return ie(Jt,Jt.current&1|2),ft&&Kr(o,u.treeForkCount),o.child}s=s.sibling}u.tail!==null&&it()>Ld&&(o.flags|=128,p=!0,uu(u,!1),o.lanes=4194304)}else{if(!p)if(s=bd(m),s!==null){if(o.flags|=128,p=!0,s=s.updateQueue,o.updateQueue=s,Dd(o,s),uu(u,!0),u.tail===null&&u.tailMode==="hidden"&&!m.alternate&&!ft)return Lt(o),null}else 2*it()-u.renderingStartTime>Ld&&a!==536870912&&(o.flags|=128,p=!0,uu(u,!1),o.lanes=4194304);u.isBackwards?(m.sibling=o.child,o.child=m):(s=u.last,s!==null?s.sibling=m:o.child=m,u.last=m)}return u.tail!==null?(s=u.tail,u.rendering=s,u.tail=s.sibling,u.renderingStartTime=it(),s.sibling=null,a=Jt.current,ie(Jt,p?a&1|2:a&1),ft&&Kr(o,u.treeForkCount),s):(Lt(o),null);case 22:case 23:return Cs(o),yg(),u=o.memoizedState!==null,s!==null?s.memoizedState!==null!==u&&(o.flags|=8192):u&&(o.flags|=8192),u?(a&536870912)!==0&&(o.flags&128)===0&&(Lt(o),o.subtreeFlags&6&&(o.flags|=8192)):Lt(o),a=o.updateQueue,a!==null&&Dd(o,a.retryQueue),a=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),u=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(u=o.memoizedState.cachePool.pool),u!==a&&(o.flags|=2048),s!==null&&ne(aa),null;case 24:return a=null,s!==null&&(a=s.memoizedState.cache),o.memoizedState.cache!==a&&(o.flags|=2048),Qr(cn),Lt(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function v4(s,o){switch(ng(o),o.tag){case 1:return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 3:return Qr(cn),He(),s=o.flags,(s&65536)!==0&&(s&128)===0?(o.flags=s&-65537|128,o):null;case 26:case 27:case 5:return Ft(o),null;case 31:if(o.memoizedState!==null){if(Cs(o),o.alternate===null)throw Error(r(340));ra()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 13:if(Cs(o),s=o.memoizedState,s!==null&&s.dehydrated!==null){if(o.alternate===null)throw Error(r(340));ra()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 19:return ne(Jt),null;case 4:return He(),null;case 10:return Qr(o.type),null;case 22:case 23:return Cs(o),yg(),s!==null&&ne(aa),s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 24:return Qr(cn),null;case 25:return null;default:return null}}function Ax(s,o){switch(ng(o),o.tag){case 3:Qr(cn),He();break;case 26:case 27:case 5:Ft(o);break;case 4:He();break;case 31:o.memoizedState!==null&&Cs(o);break;case 13:Cs(o);break;case 19:ne(Jt);break;case 10:Qr(o.type);break;case 22:case 23:Cs(o),yg(),s!==null&&ne(aa);break;case 24:Qr(cn)}}function fu(s,o){try{var a=o.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var p=u.next;a=p;do{if((a.tag&s)===s){u=void 0;var m=a.create,w=a.inst;u=m(),w.destroy=u}a=a.next}while(a!==p)}}catch(T){xt(o,o.return,T)}}function ti(s,o,a){try{var u=o.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var m=p.next;u=m;do{if((u.tag&s)===s){var w=u.inst,T=w.destroy;if(T!==void 0){w.destroy=void 0,p=o;var L=a,X=T;try{X()}catch(ae){xt(p,L,ae)}}}u=u.next}while(u!==m)}}catch(ae){xt(o,o.return,ae)}}function Ix(s){var o=s.updateQueue;if(o!==null){var a=s.stateNode;try{bE(o,a)}catch(u){xt(s,s.return,u)}}}function Ox(s,o,a){a.props=da(s.type,s.memoizedProps),a.state=s.memoizedState;try{a.componentWillUnmount()}catch(u){xt(s,o,u)}}function du(s,o){try{var a=s.ref;if(a!==null){switch(s.tag){case 26:case 27:case 5:var u=s.stateNode;break;case 30:u=s.stateNode;break;default:u=s.stateNode}typeof a=="function"?s.refCleanup=a(u):a.current=u}}catch(p){xt(s,o,p)}}function Rr(s,o){var a=s.ref,u=s.refCleanup;if(a!==null)if(typeof u=="function")try{u()}catch(p){xt(s,o,p)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(p){xt(s,o,p)}else a.current=null}function Mx(s){var o=s.type,a=s.memoizedProps,u=s.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":a.autoFocus&&u.focus();break e;case"img":a.src?u.src=a.src:a.srcSet&&(u.srcset=a.srcSet)}}catch(p){xt(s,s.return,p)}}function Qg(s,o,a){try{var u=s.stateNode;U4(u,s.type,a,o),u[cs]=o}catch(p){xt(s,s.return,p)}}function Dx(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&ci(s.type)||s.tag===4}function Yg(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Dx(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&ci(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Xg(s,o,a){var u=s.tag;if(u===5||u===6)s=s.stateNode,o?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(s,o):(o=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,o.appendChild(s),a=a._reactRootContainer,a!=null||o.onclick!==null||(o.onclick=Vr));else if(u!==4&&(u===27&&ci(s.type)&&(a=s.stateNode,o=null),s=s.child,s!==null))for(Xg(s,o,a),s=s.sibling;s!==null;)Xg(s,o,a),s=s.sibling}function kd(s,o,a){var u=s.tag;if(u===5||u===6)s=s.stateNode,o?a.insertBefore(s,o):a.appendChild(s);else if(u!==4&&(u===27&&ci(s.type)&&(a=s.stateNode),s=s.child,s!==null))for(kd(s,o,a),s=s.sibling;s!==null;)kd(s,o,a),s=s.sibling}function kx(s){var o=s.stateNode,a=s.memoizedProps;try{for(var u=s.type,p=o.attributes;p.length;)o.removeAttributeNode(p[0]);Bn(o,u,a),o[Pn]=s,o[cs]=a}catch(m){xt(s,s.return,m)}}var eo=!1,fn=!1,Wg=!1,Px=typeof WeakSet=="function"?WeakSet:Set,Cn=null;function b4(s,o){if(s=s.containerInfo,by=eh,s=Gw(s),qm(s)){if("selectionStart"in s)var a={start:s.selectionStart,end:s.selectionEnd};else e:{a=(a=s.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var p=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var w=0,T=-1,L=-1,X=0,ae=0,pe=s,J=null;t:for(;;){for(var re;pe!==a||p!==0&&pe.nodeType!==3||(T=w+p),pe!==m||u!==0&&pe.nodeType!==3||(L=w+u),pe.nodeType===3&&(w+=pe.nodeValue.length),(re=pe.firstChild)!==null;)J=pe,pe=re;for(;;){if(pe===s)break t;if(J===a&&++X===p&&(T=w),J===m&&++ae===u&&(L=w),(re=pe.nextSibling)!==null)break;pe=J,J=pe.parentNode}pe=re}a=T===-1||L===-1?null:{start:T,end:L}}else a=null}a=a||{start:0,end:0}}else a=null;for(Sy={focusedElem:s,selectionRange:a},eh=!1,Cn=o;Cn!==null;)if(o=Cn,s=o.child,(o.subtreeFlags&1028)!==0&&s!==null)s.return=o,Cn=s;else for(;Cn!==null;){switch(o=Cn,m=o.alternate,s=o.flags,o.tag){case 0:if((s&4)!==0&&(s=o.updateQueue,s=s!==null?s.events:null,s!==null))for(a=0;a title"))),Bn(m,u,a),m[Pn]=s,Rn(m),u=m;break e;case"link":var w=U1("link","href",p).get(u+(a.href||""));if(w){for(var T=0;TIt&&(w=It,It=Ue,Ue=w);var G=Vw(T,Ue),V=Vw(T,It);if(G&&V&&(re.rangeCount!==1||re.anchorNode!==G.node||re.anchorOffset!==G.offset||re.focusNode!==V.node||re.focusOffset!==V.offset)){var Y=pe.createRange();Y.setStart(G.node,G.offset),re.removeAllRanges(),Ue>It?(re.addRange(Y),re.extend(V.node,V.offset)):(Y.setEnd(V.node,V.offset),re.addRange(Y))}}}}for(pe=[],re=T;re=re.parentNode;)re.nodeType===1&&pe.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;Ta?32:a,q.T=null,a=oy,oy=null;var m=oi,w=oo;if(Sn=0,Cc=oi=null,oo=0,(St&6)!==0)throw Error(r(331));var T=St;if(St|=4,qx(m.current),Hx(m,m.current,w,a),St=T,vu(0,!1),qn&&typeof qn.onPostCommitFiberRoot=="function")try{qn.onPostCommitFiberRoot(jo,m)}catch{}return!0}finally{W.p=p,q.T=u,l1(s,o)}}function f1(s,o,a){o=qs(a,o),o=Bg(s.stateNode,o,2),s=Wo(s,o,2),s!==null&&(Xi(s,2),Cr(s))}function xt(s,o,a){if(s.tag===3)f1(s,s,a);else for(;o!==null;){if(o.tag===3){f1(o,s,a);break}else if(o.tag===1){var u=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ri===null||!ri.has(u))){s=qs(a,s),a=dx(2),u=Wo(o,a,2),u!==null&&(hx(a,u,o,s),Xi(u,2),Cr(u));break}}o=o.return}}function ly(s,o,a){var u=s.pingCache;if(u===null){u=s.pingCache=new w4;var p=new Set;u.set(o,p)}else p=u.get(o),p===void 0&&(p=new Set,u.set(o,p));p.has(a)||(ty=!0,p.add(a),s=T4.bind(null,s,o,a),o.then(s,s))}function T4(s,o,a){var u=s.pingCache;u!==null&&u.delete(o),s.pingedLanes|=s.suspendedLanes&a,s.warmLanes&=~a,Dt===s&&(at&a)===a&&(Xt===4||Xt===3&&(at&62914560)===at&&300>it()-zd?(St&2)===0&&Tc(s,0):ny|=a,Rc===at&&(Rc=0)),Cr(s)}function d1(s,o){o===0&&(o=Vf()),s=na(s,o),s!==null&&(Xi(s,o),Cr(s))}function A4(s){var o=s.memoizedState,a=0;o!==null&&(a=o.retryLane),d1(s,a)}function I4(s,o){var a=0;switch(s.tag){case 31:case 13:var u=s.stateNode,p=s.memoizedState;p!==null&&(a=p.retryLane);break;case 19:u=s.stateNode;break;case 22:u=s.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(o),d1(s,a)}function O4(s,o){return ut(s,o)}var Fd=null,Ic=null,uy=!1,Vd=!1,fy=!1,ai=0;function Cr(s){s!==Ic&&s.next===null&&(Ic===null?Fd=Ic=s:Ic=Ic.next=s),Vd=!0,uy||(uy=!0,D4())}function vu(s,o){if(!fy&&Vd){fy=!0;do for(var a=!1,u=Fd;u!==null;){if(s!==0){var p=u.pendingLanes;if(p===0)var m=0;else{var w=u.suspendedLanes,T=u.pingedLanes;m=(1<<31-Gn(42|s)+1)-1,m&=p&~(w&~T),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(a=!0,g1(u,m))}else m=at,m=Ho(u,u===Dt?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(m&3)===0||Fo(u,m)||(a=!0,g1(u,m));u=u.next}while(a);fy=!1}}function M4(){h1()}function h1(){Vd=uy=!1;var s=0;ai!==0&&H4()&&(s=ai);for(var o=it(),a=null,u=Fd;u!==null;){var p=u.next,m=p1(u,o);m===0?(u.next=null,a===null?Fd=p:a.next=p,p===null&&(Ic=a)):(a=u,(s!==0||(m&3)!==0)&&(Vd=!0)),u=p}Sn!==0&&Sn!==5||vu(s),ai!==0&&(ai=0)}function p1(s,o){for(var a=s.suspendedLanes,u=s.pingedLanes,p=s.expirationTimes,m=s.pendingLanes&-62914561;0T)break;var ae=L.transferSize,pe=L.initiatorType;ae&&x1(pe)&&(L=L.responseEnd,w+=ae*(L"u"?null:document;function z1(s,o,a){var u=Oc;if(u&&typeof o=="string"&&o){var p=Fs(o);p='link[rel="'+s+'"][href="'+p+'"]',typeof a=="string"&&(p+='[crossorigin="'+a+'"]'),N1.has(p)||(N1.add(p),s={rel:s,crossOrigin:a,href:o},u.querySelector(p)===null&&(o=u.createElement("link"),Bn(o,"link",s),Rn(o),u.head.appendChild(o)))}}function X4(s){io.D(s),z1("dns-prefetch",s,null)}function W4(s,o){io.C(s,o),z1("preconnect",s,o)}function J4(s,o,a){io.L(s,o,a);var u=Oc;if(u&&s&&o){var p='link[rel="preload"][as="'+Fs(o)+'"]';o==="image"&&a&&a.imageSrcSet?(p+='[imagesrcset="'+Fs(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(p+='[imagesizes="'+Fs(a.imageSizes)+'"]')):p+='[href="'+Fs(s)+'"]';var m=p;switch(o){case"style":m=Mc(s);break;case"script":m=Dc(s)}Xs.has(m)||(s=g({rel:"preload",href:o==="image"&&a&&a.imageSrcSet?void 0:s,as:o},a),Xs.set(m,s),u.querySelector(p)!==null||o==="style"&&u.querySelector(wu(m))||o==="script"&&u.querySelector(Eu(m))||(o=u.createElement("link"),Bn(o,"link",s),Rn(o),u.head.appendChild(o)))}}function eL(s,o){io.m(s,o);var a=Oc;if(a&&s){var u=o&&typeof o.as=="string"?o.as:"script",p='link[rel="modulepreload"][as="'+Fs(u)+'"][href="'+Fs(s)+'"]',m=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Dc(s)}if(!Xs.has(m)&&(s=g({rel:"modulepreload",href:s},o),Xs.set(m,s),a.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Eu(m)))return}u=a.createElement("link"),Bn(u,"link",s),Rn(u),a.head.appendChild(u)}}}function tL(s,o,a){io.S(s,o,a);var u=Oc;if(u&&s){var p=Ja(u).hoistableStyles,m=Mc(s);o=o||"default";var w=p.get(m);if(!w){var T={loading:0,preload:null};if(w=u.querySelector(wu(m)))T.loading=5;else{s=g({rel:"stylesheet",href:s,"data-precedence":o},a),(a=Xs.get(m))&&Ty(s,a);var L=w=u.createElement("link");Rn(L),Bn(L,"link",s),L._p=new Promise(function(X,ae){L.onload=X,L.onerror=ae}),L.addEventListener("load",function(){T.loading|=1}),L.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Qd(w,o,u)}w={type:"stylesheet",instance:w,count:1,state:T},p.set(m,w)}}}function nL(s,o){io.X(s,o);var a=Oc;if(a&&s){var u=Ja(a).hoistableScripts,p=Dc(s),m=u.get(p);m||(m=a.querySelector(Eu(p)),m||(s=g({src:s,async:!0},o),(o=Xs.get(p))&&Ay(s,o),m=a.createElement("script"),Rn(m),Bn(m,"link",s),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function sL(s,o){io.M(s,o);var a=Oc;if(a&&s){var u=Ja(a).hoistableScripts,p=Dc(s),m=u.get(p);m||(m=a.querySelector(Eu(p)),m||(s=g({src:s,async:!0,type:"module"},o),(o=Xs.get(p))&&Ay(s,o),m=a.createElement("script"),Rn(m),Bn(m,"link",s),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function L1(s,o,a,u){var p=(p=_e.current)?Zd(p):null;if(!p)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(o=Mc(a.href),a=Ja(p).hoistableStyles,u=a.get(o),u||(u={type:"style",instance:null,count:0,state:null},a.set(o,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){s=Mc(a.href);var m=Ja(p).hoistableStyles,w=m.get(s);if(w||(p=p.ownerDocument||p,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(s,w),(m=p.querySelector(wu(s)))&&!m._p&&(w.instance=m,w.state.loading=5),Xs.has(s)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Xs.set(s,a),m||rL(p,s,a,w.state))),o&&u===null)throw Error(r(528,""));return w}if(o&&u!==null)throw Error(r(529,""));return null;case"script":return o=a.async,a=a.src,typeof a=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Dc(a),a=Ja(p).hoistableScripts,u=a.get(o),u||(u={type:"script",instance:null,count:0,state:null},a.set(o,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function Mc(s){return'href="'+Fs(s)+'"'}function wu(s){return'link[rel="stylesheet"]['+s+"]"}function B1(s){return g({},s,{"data-precedence":s.precedence,precedence:null})}function rL(s,o,a,u){s.querySelector('link[rel="preload"][as="style"]['+o+"]")?u.loading=1:(o=s.createElement("link"),u.preload=o,o.addEventListener("load",function(){return u.loading|=1}),o.addEventListener("error",function(){return u.loading|=2}),Bn(o,"link",a),Rn(o),s.head.appendChild(o))}function Dc(s){return'[src="'+Fs(s)+'"]'}function Eu(s){return"script[async]"+s}function $1(s,o,a){if(o.count++,o.instance===null)switch(o.type){case"style":var u=s.querySelector('style[data-href~="'+Fs(a.href)+'"]');if(u)return o.instance=u,Rn(u),u;var p=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(s.ownerDocument||s).createElement("style"),Rn(u),Bn(u,"style",p),Qd(u,a.precedence,s),o.instance=u;case"stylesheet":p=Mc(a.href);var m=s.querySelector(wu(p));if(m)return o.state.loading|=4,o.instance=m,Rn(m),m;u=B1(a),(p=Xs.get(p))&&Ty(u,p),m=(s.ownerDocument||s).createElement("link"),Rn(m);var w=m;return w._p=new Promise(function(T,L){w.onload=T,w.onerror=L}),Bn(m,"link",u),o.state.loading|=4,Qd(m,a.precedence,s),o.instance=m;case"script":return m=Dc(a.src),(p=s.querySelector(Eu(m)))?(o.instance=p,Rn(p),p):(u=a,(p=Xs.get(m))&&(u=g({},a),Ay(u,p)),s=s.ownerDocument||s,p=s.createElement("script"),Rn(p),Bn(p,"link",u),s.head.appendChild(p),o.instance=p);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(u=o.instance,o.state.loading|=4,Qd(u,a.precedence,s));return o.instance}function Qd(s,o,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,m=p,w=0;w title"):null)}function oL(s,o,a){if(a===1||o.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(s=o.disabled,typeof o.precedence=="string"&&s==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function H1(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function iL(s,o,a,u){if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var p=Mc(u.href),m=o.querySelector(wu(p));if(m){o=m._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(s.count++,s=Xd.bind(s),o.then(s,s)),a.state.loading|=4,a.instance=m,Rn(m);return}m=o.ownerDocument||o,u=B1(u),(p=Xs.get(p))&&Ty(u,p),m=m.createElement("link"),Rn(m);var w=m;w._p=new Promise(function(T,L){w.onload=T,w.onerror=L}),Bn(m,"link",u),a.instance=m}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(a,o),(o=a.state.preload)&&(a.state.loading&3)===0&&(s.count++,a=Xd.bind(s),o.addEventListener("load",a),o.addEventListener("error",a))}}var Iy=0;function aL(s,o){return s.stylesheets&&s.count===0&&Jd(s,s.stylesheets),0Iy?50:800)+o);return s.unsuspend=a,function(){s.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Xd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Jd(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Wd=null;function Jd(s,o){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Wd=new Map,o.forEach(cL,s),Wd=null,Xd.call(s))}function cL(s,o){if(!(o.state.loading&4)){var a=Wd.get(s);if(a)var u=a.get(null);else{a=new Map,Wd.set(s,a);for(var p=s.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),e0.exports=Z6(),e0.exports}var Y6=Q6();const X6=hI(Y6);var s0={exports:{}},r0={};var HR;function W6(){if(HR)return r0;HR=1;var e=al().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return r0.c=function(t){return e.H.useMemoCache(t)},r0}var FR;function J6(){return FR||(FR=1,s0.exports=W6()),s0.exports}var Ct=J6();const GI=I.createContext(void 0);function e$(e,t){try{const n=localStorage.getItem(e);if(n==="light"||n==="dark"||n==="system")return n}catch{}return t}function t$(e){const t=Ct.c(14),{children:n,defaultTheme:r,storageKey:i}=e,c=r===void 0?"system":r,l=i===void 0?"ui-theme":i;let f;t[0]!==c||t[1]!==l?(f=()=>e$(l,c),t[0]=c,t[1]=l,t[2]=f):f=t[2];const[d,h]=I.useState(f);let y,g;t[3]!==d?(y=()=>{const R=window.document.documentElement;if(R.classList.remove("light","dark"),d==="system"){const C=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";R.classList.add(C);return}R.classList.add(d)},g=[d],t[3]=d,t[4]=y,t[5]=g):(y=t[4],g=t[5]),I.useEffect(y,g);let v;t[6]!==l?(v=R=>{try{localStorage.setItem(l,R)}catch{}h(R)},t[6]=l,t[7]=v):v=t[7];let b;t[8]!==v||t[9]!==d?(b={theme:d,setTheme:v},t[8]=v,t[9]=d,t[10]=b):b=t[10];const _=b;let x;return t[11]!==n||t[12]!==_?(x=U.jsx(GI.Provider,{value:_,children:n}),t[11]=n,t[12]=_,t[13]=x):x=t[13],x}function n$(){const e=I.useContext(GI);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}function dv(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const qu={};function Dp(e,t,n,r,i){let c={...hv(e,qu)};return t&&(c=Uu(c,t)),n&&(c=Uu(c,n)),r&&(c=Uu(c,r)),i&&(c=Uu(c,i)),c}function s$(e){if(e.length===0)return qu;if(e.length===1)return hv(e[0],qu);let t={...hv(e[0],qu)};for(let n=1;n=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function KI(e){return typeof e=="function"}function hv(e,t){return KI(e)?e(t):e??qu}function i$(e,t){return t?e?n=>{if(a$(n)){const i=n;pv(i);const c=t(i);return i.baseUIHandlerPrevented||e?.(i),c}const r=t(n);return e?.(n),r}:t:e}function pv(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function ZI(e,t){return t?e?t+" "+e:t:e}function a$(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function wo(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const VR={};function zr(e,t){const n=I.useRef(VR);return n.current===VR&&(n.current=e(t)),n}function Yh(e,t,n,r){const i=zr(QI).current;return l$(i,e,t,n,r)&&YI(i,[e,t,n,r]),i.callback}function c$(e){const t=zr(QI).current;return u$(t,e)&&YI(t,e),t.callback}function QI(){return{callback:null,cleanup:null,refs:[]}}function l$(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function u$(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function YI(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i{for(let i=0;i=e}function qR(e){if(!I.isValidElement(e))return null;const t=e,n=t.props;return(ob(19)?n?.ref:t.ref)??null}function d$(e,t){const n={};for(const r in e){const i=e[r];if(t?.hasOwnProperty(r)){const c=t[r](i);c!=null&&Object.assign(n,c);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function h$(e,t){return typeof e=="function"?e(t):e}function p$(e,t){return typeof e=="function"?e(t):e}function XI(){}const Z0e=Object.freeze([]),Ds=Object.freeze({}),m$={style:{transition:"none"}},g$="data-base-ui-click-trigger",Q0e={fallbackAxisSide:"none"},y$={fallbackAxisSide:"end"},v$={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function cr(e,t,n={}){const r=t.render,i=b$(t,n);if(n.enabled===!1)return null;const c=n.state??Ds;return S$(e,r,i,c)}function b$(e,t={}){const{className:n,style:r,render:i}=e,{state:c=Ds,ref:l,props:f,stateAttributesMapping:d,enabled:h=!0}=t,y=h?h$(n,c):void 0,g=h?p$(r,c):void 0,v=h?d$(c,d):Ds,b=h?dv(v,Array.isArray(f)?s$(f):f)??Ds:Ds;return typeof document<"u"&&(h?Array.isArray(l)?b.ref=c$([b.ref,qR(i),...l]):b.ref=Yh(b.ref,qR(i),l):Yh(null,null)),h?(y!==void 0&&(b.className=ZI(b.className,y)),g!==void 0&&(b.style=dv(b.style,g)),b):Ds}function S$(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=Dp(n,t.props);return i.ref=n.ref,I.cloneElement(t,i)}if(e&&typeof e=="string")return _$(e,n);throw new Error(wo(8))}function _$(e,t){return e==="button"?I.createElement("button",{type:"button",...t,key:t.key}):e==="img"?I.createElement("img",{alt:"",...t,key:t.key}):I.createElement(e,t)}function WI(e){return cr(e.defaultTagName??"div",e,e)}function JI(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,KR=e2,t2=(e,t)=>n=>{var r;if(t?.variants==null)return KR(e,n?.class,n?.className);const{variants:i,defaultVariants:c}=t,l=Object.keys(i).map(h=>{const y=n?.[h],g=c?.[h];if(y===null)return null;const v=GR(y)||GR(g);return i[h][v]}),f=n&&Object.entries(n).reduce((h,y)=>{let[g,v]=y;return v===void 0||(h[g]=v),h},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,y)=>{let{class:g,className:v,...b}=y;return Object.entries(b).every(_=>{let[x,R]=_;return Array.isArray(R)?R.includes({...c,...f}[x]):{...c,...f}[x]===R})?[...h,g,v]:h},[]);return KR(e,l,d,n?.class,n?.className)};const n2=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const w$=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const E$=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const ZR=e=>{const t=E$(e);return t.charAt(0).toUpperCase()+t.slice(1)};var x$={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"};const R$=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const C$=I.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:c,iconNode:l,...f},d)=>I.createElement("svg",{ref:d,...x$,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:n2("lucide",i),...!c&&!R$(f)&&{"aria-hidden":"true"},...f},[...l.map(([h,y])=>I.createElement(h,y)),...Array.isArray(c)?c:[c]]));const wr=(e,t)=>{const n=I.forwardRef(({className:r,...i},c)=>I.createElement(C$,{ref:c,iconNode:t,className:n2(`lucide-${w$(ZR(e))}`,`lucide-${e}`,r),...i}));return n.displayName=ZR(e),n};const T$=[["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"}]],A$=wr("circle-alert",T$);const I$=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],O$=wr("hard-drive",I$);const M$=[["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"}]],D$=wr("house",M$);const k$=[["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"}]],P$=wr("image",k$);const N$=[["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"}]],z$=wr("key",N$);const L$=[["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"}]],B$=wr("log-out",L$);const $$=[["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"}]],U$=wr("moon",$$);const j$=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],H$=wr("panel-left",j$);const F$=[["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"}]],QR=wr("server",F$);const V$=[["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"}]],q$=wr("sun",V$);const G$=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],K$=wr("x",G$);function kp(){return typeof window<"u"}function Pi(e){return ib(e)?(e.nodeName||"").toLowerCase():"#document"}function gn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lr(e){var t;return(t=(ib(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ib(e){return kp()?e instanceof Node||e instanceof gn(e).Node:!1}function _t(e){return kp()?e instanceof Element||e instanceof gn(e).Element:!1}function xn(e){return kp()?e instanceof HTMLElement||e instanceof gn(e).HTMLElement:!1}function mv(e){return!kp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gn(e).ShadowRoot}const Z$=new Set(["inline","contents"]);function La(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=zs(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Z$.has(i)}const Q$=new Set(["table","td","th"]);function Y$(e){return Q$.has(Pi(e))}const X$=[":popover-open",":modal"];function Pp(e){return X$.some(t=>{try{return e.matches(t)}catch{return!1}})}const W$=["transform","translate","scale","rotate","perspective"],J$=["transform","translate","scale","rotate","perspective","filter"],eU=["paint","layout","strict","content"];function ab(e){const t=Np(),n=_t(e)?zs(e):e;return W$.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||J$.some(r=>(n.willChange||"").includes(r))||eU.some(r=>(n.contain||"").includes(r))}function tU(e){let t=vo(e);for(;xn(t)&&!mo(t);){if(ab(t))return t;if(Pp(t))return null;t=vo(t)}return null}function Np(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const nU=new Set(["html","body","#document"]);function mo(e){return nU.has(Pi(e))}function zs(e){return gn(e).getComputedStyle(e)}function zp(e){return _t(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function vo(e){if(Pi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mv(e)&&e.host||Lr(e);return mv(t)?t.host:t}function s2(e){const t=vo(e);return mo(t)?e.ownerDocument?e.ownerDocument.body:e.body:xn(t)&&La(t)?t:s2(t)}function Ti(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=s2(e),c=i===((r=e.ownerDocument)==null?void 0:r.body),l=gn(i);if(c){const f=gv(l);return t.concat(l,l.visualViewport||[],La(i)?i:[],f&&n?Ti(f):[])}return t.concat(i,Ti(i,[],n))}function gv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const o0=Kv[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],sU=o0&&o0!==I.useLayoutEffect?o0:e=>e();function Ze(e){const t=zr(rU).current;return t.next=e,sU(t.effect),t.trampoline}function rU(){const e={next:void 0,callback:oU,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function oU(){}const iU=()=>{},mt=typeof document<"u"?I.useLayoutEffect:iU,aU=I.createContext(void 0);function cU(e=!1){const t=I.useContext(aU);if(t===void 0&&!e)throw new Error(wo(16));return t}function lU(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:c}=e,l=r&&t!==!1,f=r&&t===!1;return{props:I.useMemo(()=>{const h={onKeyDown(y){n&&t&&y.key!=="Tab"&&y.preventDefault()}};return r||(h.tabIndex=i,!c&&n&&(h.tabIndex=t?i:-1)),(c&&(t||l)||!c&&n)&&(h["aria-disabled"]=n),c&&(!t||f)&&(h.disabled=n),h},[r,n,t,l,f,c,i])}}function r2(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,c=I.useRef(null),l=cU(!0)!==void 0,f=Ze(()=>{const v=c.current;return!!(v?.tagName==="A"&&v?.href)}),{props:d}=lU({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:i}),h=I.useCallback(()=>{const v=c.current;uU(v)&&l&&t&&d.disabled===void 0&&v.disabled&&(v.disabled=!1)},[t,d.disabled,l]);mt(h,[h]);const y=I.useCallback((v={})=>{const{onClick:b,onMouseDown:_,onKeyUp:x,onKeyDown:R,onPointerDown:C,...A}=v;return Dp({type:i?"button":void 0,onClick(D){if(t){D.preventDefault();return}b?.(D)},onMouseDown(D){t||_?.(D)},onKeyDown(D){if(t||(pv(D),R?.(D)),D.baseUIHandlerPrevented)return;const N=D.target===D.currentTarget&&!i&&!f()&&!t,j=D.key==="Enter",$=D.key===" ";N&&(($||j)&&D.preventDefault(),j&&b?.(D))},onKeyUp(D){t||(pv(D),x?.(D)),!D.baseUIHandlerPrevented&&D.target===D.currentTarget&&!i&&!t&&D.key===" "&&b?.(D)},onPointerDown(D){if(t){D.preventDefault();return}C?.(D)}},i?void 0:{role:"button"},d,A)},[t,d,i,f]),g=Ze(v=>{c.current=v,h()});return{getButtonProps:y,buttonRef:g}}function uU(e){return xn(e)&&e.tagName==="BUTTON"}const fU=I.forwardRef(function(t,n){const{render:r,className:i,disabled:c=!1,focusableWhenDisabled:l=!1,nativeButton:f=!0,...d}=t,{getButtonProps:h,buttonRef:y}=r2({disabled:c,focusableWhenDisabled:l,native:f}),g=I.useMemo(()=>({disabled:c}),[c]);return cr("button",t,{state:g,ref:[n,y],props:[d,h]})}),dU=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r({classGroupId:e,validator:t}),o2=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Xh="-",YR=[],pU="arbitrary..",mU=e=>{const t=yU(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return gU(l);const f=l.split(Xh),d=f[0]===""&&f.length>1?1:0;return i2(f,d,t)},getConflictingClassGroupIds:(l,f)=>{if(f){const d=r[l],h=n[l];return d?h?dU(h,d):d:h||YR}return n[l]||YR}}},i2=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],c=n.nextPart.get(i);if(c){const h=i2(e,t+1,c);if(h)return h}const l=n.validators;if(l===null)return;const f=t===0?e.join(Xh):e.slice(t).join(Xh),d=l.length;for(let h=0;he.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?pU+r:void 0})(),yU=e=>{const{theme:t,classGroups:n}=e;return vU(n,t)},vU=(e,t)=>{const n=o2();for(const r in e){const i=e[r];cb(i,n,r,t)}return n},cb=(e,t,n,r)=>{const i=e.length;for(let c=0;c{if(typeof e=="string"){SU(e,t,n);return}if(typeof e=="function"){_U(e,t,n,r);return}wU(e,t,n,r)},SU=(e,t,n)=>{const r=e===""?t:a2(t,e);r.classGroupId=n},_U=(e,t,n,r)=>{if(EU(e)){cb(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(hU(n,e))},wU=(e,t,n,r)=>{const i=Object.entries(e),c=i.length;for(let l=0;l{let n=e;const r=t.split(Xh),i=r.length;for(let c=0;c"isThemeGetter"in e&&e.isThemeGetter===!0,xU=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(c,l)=>{n[c]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(c){let l=n[c];if(l!==void 0)return l;if((l=r[c])!==void 0)return i(c,l),l},set(c,l){c in n?n[c]=l:i(c,l)}}},yv="!",XR=":",RU=[],WR=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),CU=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const c=[];let l=0,f=0,d=0,h;const y=i.length;for(let x=0;xd?h-d:void 0;return WR(c,b,v,_)};if(t){const i=t+XR,c=r;r=l=>l.startsWith(i)?c(l.slice(i.length)):WR(RU,!1,l,void 0,!0)}if(n){const i=r;r=c=>n({className:c,parseClassName:i})}return r},TU=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let c=0;c0&&(i.sort(),r.push(...i),i=[]),r.push(l)):i.push(l)}return i.length>0&&(i.sort(),r.push(...i)),r}},AU=e=>({cache:xU(e.cacheSize),parseClassName:CU(e),sortModifiers:TU(e),...mU(e)}),IU=/\s+/,OU=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:c}=t,l=[],f=e.trim().split(IU);let d="";for(let h=f.length-1;h>=0;h-=1){const y=f[h],{isExternal:g,modifiers:v,hasImportantModifier:b,baseClassName:_,maybePostfixModifierPosition:x}=n(y);if(g){d=y+(d.length>0?" "+d:d);continue}let R=!!x,C=r(R?_.substring(0,x):_);if(!C){if(!R){d=y+(d.length>0?" "+d:d);continue}if(C=r(_),!C){d=y+(d.length>0?" "+d:d);continue}R=!1}const A=v.length===0?"":v.length===1?v[0]:c(v).join(":"),O=b?A+yv:A,D=O+C;if(l.indexOf(D)>-1)continue;l.push(D);const N=i(C,R);for(let j=0;j0?" "+d:d)}return d},MU=(...e)=>{let t=0,n,r,i="";for(;t{if(typeof e=="string")return e;let t,n="";for(let r=0;r{let n,r,i,c;const l=d=>{const h=t.reduce((y,g)=>g(y),e());return n=AU(h),r=n.cache.get,i=n.cache.set,c=f,f(d)},f=d=>{const h=r(d);if(h)return h;const y=OU(d,n);return i(d,y),y};return c=l,(...d)=>c(MU(...d))},kU=[],_n=e=>{const t=n=>n[e]||kU;return t.isThemeGetter=!0,t},l2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,u2=/^\((?:(\w[\w-]*):)?(.+)\)$/i,PU=/^\d+\/\d+$/,NU=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zU=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,LU=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,BU=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$U=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pc=e=>PU.test(e),tt=e=>!!e&&!Number.isNaN(Number(e)),pi=e=>!!e&&Number.isInteger(Number(e)),i0=e=>e.endsWith("%")&&tt(e.slice(0,-1)),ao=e=>NU.test(e),UU=()=>!0,jU=e=>zU.test(e)&&!LU.test(e),f2=()=>!1,HU=e=>BU.test(e),FU=e=>$U.test(e),VU=e=>!Me(e)&&!De(e),qU=e=>cl(e,p2,f2),Me=e=>l2.test(e),ma=e=>cl(e,m2,jU),a0=e=>cl(e,YU,tt),JR=e=>cl(e,d2,f2),GU=e=>cl(e,h2,FU),fh=e=>cl(e,g2,HU),De=e=>u2.test(e),Pu=e=>ll(e,m2),KU=e=>ll(e,XU),eC=e=>ll(e,d2),ZU=e=>ll(e,p2),QU=e=>ll(e,h2),dh=e=>ll(e,g2,!0),cl=(e,t,n)=>{const r=l2.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ll=(e,t,n=!1)=>{const r=u2.exec(e);return r?r[1]?t(r[1]):n:!1},d2=e=>e==="position"||e==="percentage",h2=e=>e==="image"||e==="url",p2=e=>e==="length"||e==="size"||e==="bg-size",m2=e=>e==="length",YU=e=>e==="number",XU=e=>e==="family-name",g2=e=>e==="shadow",WU=()=>{const e=_n("color"),t=_n("font"),n=_n("text"),r=_n("font-weight"),i=_n("tracking"),c=_n("leading"),l=_n("breakpoint"),f=_n("container"),d=_n("spacing"),h=_n("radius"),y=_n("shadow"),g=_n("inset-shadow"),v=_n("text-shadow"),b=_n("drop-shadow"),_=_n("blur"),x=_n("perspective"),R=_n("aspect"),C=_n("ease"),A=_n("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...D(),De,Me],j=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],k=()=>[De,Me,d],Z=()=>[Pc,"full","auto",...k()],se=()=>[pi,"none","subgrid",De,Me],le=()=>["auto",{span:["full",pi,De,Me]},pi,De,Me],K=()=>[pi,"auto",De,Me],Q=()=>["auto","min","max","fr",De,Me],ye=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],fe=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...k()],W=()=>[Pc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],F=()=>[e,De,Me],ve=()=>[...D(),eC,JR,{position:[De,Me]}],Te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",ZU,qU,{size:[De,Me]}],ne=()=>[i0,Pu,ma],ie=()=>["","none","full",h,De,Me],de=()=>["",tt,Pu,ma],Ce=()=>["solid","dashed","dotted","double"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],be=()=>[tt,i0,eC,JR],Ye=()=>["","none",_,De,Me],He=()=>["none",tt,De,Me],ht=()=>["none",tt,De,Me],Ft=()=>[tt,De,Me],oe=()=>[Pc,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ao],breakpoint:[ao],color:[UU],container:[ao],"drop-shadow":[ao],ease:["in","out","in-out"],font:[VU],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ao],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ao],shadow:[ao],spacing:["px",tt],text:[ao],"text-shadow":[ao],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pc,Me,De,R]}],container:["container"],columns:[{columns:[tt,Me,De,f]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{start:Z()}],end:[{end:Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[pi,"auto",De,Me]}],basis:[{basis:[Pc,"full","auto",f,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[tt,Pc,"auto","initial","none",Me]}],grow:[{grow:["",tt,De,Me]}],shrink:[{shrink:["",tt,De,Me]}],order:[{order:[pi,"first","last","none",De,Me]}],"grid-cols":[{"grid-cols":se()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":se()}],"row-start-end":[{row:le()}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...ye(),"normal"]}],"justify-items":[{"justify-items":[...fe(),"normal"]}],"justify-self":[{"justify-self":["auto",...fe()]}],"align-content":[{content:["normal",...ye()]}],"align-items":[{items:[...fe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...fe(),{baseline:["","last"]}]}],"place-content":[{"place-content":ye()}],"place-items":[{"place-items":[...fe(),"baseline"]}],"place-self":[{"place-self":["auto",...fe()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[f,"screen",...W()]}],"min-w":[{"min-w":[f,"screen","none",...W()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[l]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",n,Pu,ma]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,De,a0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",i0,Me]}],"font-family":[{font:[KU,Me,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,De,Me]}],"line-clamp":[{"line-clamp":[tt,"none",De,a0]}],leading:[{leading:[c,...k()]}],"list-image":[{"list-image":["none",De,Me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",De,Me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[tt,"from-font","auto",De,ma]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[tt,"auto",De,Me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",De,Me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",De,Me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ve()}],"bg-repeat":[{bg:Te()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pi,De,Me],radial:["",De,Me],conic:[pi,De,Me]},QU,GU]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ce(),"hidden","none"]}],"divide-style":[{divide:[...Ce(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...Ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[tt,De,Me]}],"outline-w":[{outline:["",tt,Pu,ma]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",y,dh,fh]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",g,dh,fh]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[tt,ma]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",v,dh,fh]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[tt,De,Me]}],"mix-blend":[{"mix-blend":[..._e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_e()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[tt]}],"mask-image-linear-from-pos":[{"mask-linear-from":be()}],"mask-image-linear-to-pos":[{"mask-linear-to":be()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":be()}],"mask-image-t-to-pos":[{"mask-t-to":be()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":be()}],"mask-image-r-to-pos":[{"mask-r-to":be()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":be()}],"mask-image-b-to-pos":[{"mask-b-to":be()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":be()}],"mask-image-l-to-pos":[{"mask-l-to":be()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":be()}],"mask-image-x-to-pos":[{"mask-x-to":be()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":be()}],"mask-image-y-to-pos":[{"mask-y-to":be()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[De,Me]}],"mask-image-radial-from-pos":[{"mask-radial-from":be()}],"mask-image-radial-to-pos":[{"mask-radial-to":be()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[tt]}],"mask-image-conic-from-pos":[{"mask-conic-from":be()}],"mask-image-conic-to-pos":[{"mask-conic-to":be()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ve()}],"mask-repeat":[{mask:Te()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",De,Me]}],filter:[{filter:["","none",De,Me]}],blur:[{blur:Ye()}],brightness:[{brightness:[tt,De,Me]}],contrast:[{contrast:[tt,De,Me]}],"drop-shadow":[{"drop-shadow":["","none",b,dh,fh]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",tt,De,Me]}],"hue-rotate":[{"hue-rotate":[tt,De,Me]}],invert:[{invert:["",tt,De,Me]}],saturate:[{saturate:[tt,De,Me]}],sepia:[{sepia:["",tt,De,Me]}],"backdrop-filter":[{"backdrop-filter":["","none",De,Me]}],"backdrop-blur":[{"backdrop-blur":Ye()}],"backdrop-brightness":[{"backdrop-brightness":[tt,De,Me]}],"backdrop-contrast":[{"backdrop-contrast":[tt,De,Me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",tt,De,Me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[tt,De,Me]}],"backdrop-invert":[{"backdrop-invert":["",tt,De,Me]}],"backdrop-opacity":[{"backdrop-opacity":[tt,De,Me]}],"backdrop-saturate":[{"backdrop-saturate":[tt,De,Me]}],"backdrop-sepia":[{"backdrop-sepia":["",tt,De,Me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",De,Me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[tt,"initial",De,Me]}],ease:[{ease:["linear","initial",C,De,Me]}],delay:[{delay:[tt,De,Me]}],animate:[{animate:["none",A,De,Me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,De,Me]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:He()}],"rotate-x":[{"rotate-x":He()}],"rotate-y":[{"rotate-y":He()}],"rotate-z":[{"rotate-z":He()}],scale:[{scale:ht()}],"scale-x":[{"scale-x":ht()}],"scale-y":[{"scale-y":ht()}],"scale-z":[{"scale-z":ht()}],"scale-3d":["scale-3d"],skew:[{skew:Ft()}],"skew-x":[{"skew-x":Ft()}],"skew-y":[{"skew-y":Ft()}],transform:[{transform:[De,Me,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:oe()}],"translate-x":[{"translate-x":oe()}],"translate-y":[{"translate-y":oe()}],"translate-z":[{"translate-z":oe()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",De,Me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",De,Me]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[tt,Pu,ma,a0]}],stroke:[{stroke:["none",...F()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},JU=DU(WU);function nn(...e){return JU(e2(e))}function Y0e(e){return e?new Date(e).toLocaleString(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Unknown"}function X0e(e){if(e===0)return"0 B";const t=["B","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(1024));return`${(e/1024**n).toFixed(2)} ${t[n]}`}const e5=/\/$/;function W0e(e){return e.replace(e5,"")}function t5(e){return e&&(e.endsWith("/")?e:`${e}/`)}function n5(e,t){return e.startsWith(t)?e:`${t}${e}`}function J0e(e,t){return e.startsWith(t)?e.slice(t.length):e}const s5=t2("group/button inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap rounded-md border border-transparent bg-clip-padding font-medium text-xs/relaxed outline-none transition-all focus-visible:border-ring focus-visible:ring-[2px] focus-visible:ring-ring/30 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-input/30",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",sm:"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",icon:"size-7 [&_svg:not([class*='size-'])]:size-3.5","icon-xs":"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5","icon-sm":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-lg":"size-8 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default"}});function el(e){const t=Ct.c(12);let n,r,i,c;t[0]!==e?({className:n,variant:i,size:c,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c):(n=t[1],r=t[2],i=t[3],c=t[4]);const l=i===void 0?"default":i,f=c===void 0?"default":c;let d;t[5]!==n||t[6]!==f||t[7]!==l?(d=nn(s5({variant:l,size:f,className:n})),t[5]=n,t[6]=f,t[7]=l,t[8]=d):d=t[8];let h;return t[9]!==r||t[10]!==d?(h=U.jsx(fU,{className:d,"data-slot":"button",...r}),t[9]=r,t[10]=d,t[11]=h):h=t[11],h}const r5={...Kv};let tC=0;function o5(e,t="mui"){const[n,r]=I.useState(e),i=e||n;return I.useEffect(()=>{n==null&&(tC+=1,r(`${t}-${tC}`))},[n,t]),i}const nC=r5.useId;function _f(e,t){if(nC!==void 0){const n=nC();return e??(t?`${t}-${n}`:n)}return o5(e,t)}function lb(e){return _f(e,"base-ui")}const i5=[];function y2(e){I.useEffect(e,i5)}const Nu=0;class Ii{static create(){return new Ii}currentId=Nu;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Nu,n()},t)}isStarted(){return this.currentId!==Nu}clear=()=>{this.currentId!==Nu&&(clearTimeout(this.currentId),this.currentId=Nu)};disposeEffect=()=>this.clear}function Oi(){const e=zr(Ii.create).current;return y2(e.disposeEffect),e}function Ba(e){return e?.ownerDocument||document}const ul=typeof navigator<"u",c0=l5(),v2=f5(),b2=u5(),a5=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),S2=c0.platform==="MacIntel"&&c0.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(c0.platform),_2=ul&&/apple/i.test(navigator.vendor),vv=ul&&/android/i.test(v2)||/android/i.test(b2),c5=ul&&v2.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,w2=b2.includes("jsdom/");function l5(){if(!ul)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function u5(){if(!ul)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function f5(){if(!ul)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const bv="data-base-ui-focusable",E2="active",x2="selected",R2="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",eve="ArrowLeft",tve="ArrowRight",nve="ArrowUp",sve="ArrowDown";function Si(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function bt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&mv(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function is(e){return"composedPath"in e?e.composedPath()[0]:e.target}function vr(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function d5(e){return e.matches("html,body")}function En(e){return e?.ownerDocument||document}function C2(e){return xn(e)&&e.matches(R2)}function sC(e){return e?e.getAttribute("role")==="combobox"&&C2(e):!1}function h5(e){if(!e||w2)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Sv(e){return e?e.hasAttribute(bv)?e:e.querySelector(`[${bv}]`)||e:null}function Ca(e,t,n=!0){return e.filter(i=>i.parentId===t&&(!n||i.context?.open)).flatMap(i=>[i,...Ca(e,i.id,n)])}function rC(e,t){let n=[],r=e.find(i=>i.id===t)?.parentId;for(;r;){const i=e.find(c=>c.id===r);r=i?.parentId,i&&(n=n.concat(i))}return n}function p5(e){e.preventDefault(),e.stopPropagation()}function m5(e){return"nativeEvent"in e}function g5(e){return e.mozInputSource===0&&e.isTrusted?!0:vv&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function y5(e){return w2?!1:!vv&&e.width===0&&e.height===0||vv&&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 of(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function v5(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const b5=["top","right","bottom","left"],tl=Math.min,Ms=Math.max,Wh=Math.round,hh=Math.floor,kr=e=>({x:e,y:e}),S5={left:"right",right:"left",bottom:"top",top:"bottom"},_5={start:"end",end:"start"};function _v(e,t,n){return Ms(e,tl(t,n))}function bo(e,t){return typeof e=="function"?e(t):e}function ys(e){return e.split("-")[0]}function Ni(e){return e.split("-")[1]}function ub(e){return e==="x"?"y":"x"}function fb(e){return e==="y"?"height":"width"}const w5=new Set(["top","bottom"]);function ar(e){return w5.has(ys(e))?"y":"x"}function db(e){return ub(ar(e))}function E5(e,t,n){n===void 0&&(n=!1);const r=Ni(e),i=db(e),c=fb(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(l=Jh(l)),[l,Jh(l)]}function x5(e){const t=Jh(e);return[wv(e),t,wv(t)]}function wv(e){return e.replace(/start|end/g,t=>_5[t])}const oC=["left","right"],iC=["right","left"],R5=["top","bottom"],C5=["bottom","top"];function T5(e,t,n){switch(e){case"top":case"bottom":return n?t?iC:oC:t?oC:iC;case"left":case"right":return t?R5:C5;default:return[]}}function A5(e,t,n,r){const i=Ni(e);let c=T5(ys(e),n==="start",r);return i&&(c=c.map(l=>l+"-"+i),t&&(c=c.concat(c.map(wv)))),c}function Jh(e){return e.replace(/left|right|bottom|top/g,t=>S5[t])}function I5(e){return{top:0,right:0,bottom:0,left:0,...e}}function T2(e){return typeof e!="number"?I5(e):{top:e,right:e,bottom:e,left:e}}function ep(e){const{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}}var O5=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],tp=O5.join(","),A2=typeof Element>"u",nl=A2?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,np=!A2&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},sp=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),c=i===""||i==="true",l=c||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):sp(t.parentNode));return l},M5=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},I2=function(t,n,r){if(sp(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(tp));return n&&nl.call(t,tp)&&i.unshift(t),i=i.filter(r),i},rp=function(t,n,r){for(var i=[],c=Array.from(t);c.length;){var l=c.shift();if(!sp(l,!1))if(l.tagName==="SLOT"){var f=l.assignedElements(),d=f.length?f:l.children,h=rp(d,!0,r);r.flatten?i.push.apply(i,h):i.push({scopeParent:l,candidates:h})}else{var y=nl.call(l,tp);y&&r.filter(l)&&(n||!t.includes(l))&&i.push(l);var g=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),v=!sp(g,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(g&&v){var b=rp(g===!0?l.children:g.children,!0,r);r.flatten?i.push.apply(i,b):i.push({scopeParent:l,candidates:b})}else c.unshift.apply(c,l.children)}}return i},O2=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},M2=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||M5(t))&&!O2(t)?0:t.tabIndex},D5=function(t,n){var r=M2(t);return r<0&&n&&!O2(t)?0:r},k5=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},D2=function(t){return t.tagName==="INPUT"},P5=function(t){return D2(t)&&t.type==="hidden"},N5=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},z5=function(t,n){for(var r=0;rsummary:first-of-type"),f=l?t.parentElement:t;if(nl.call(f,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var d=t;t;){var h=t.parentElement,y=np(t);if(h&&!h.shadowRoot&&i(h)===!0)return aC(t);t.assignedSlot?t=t.assignedSlot:!h&&y!==t.ownerDocument?t=y.host:t=h}t=d}if(U5(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return aC(t);return!1},H5=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r=0)},k2=function(t){var n=[],r=[];return t.forEach(function(i,c){var l=!!i.scopeParent,f=l?i.scopeParent:i,d=D5(f,l),h=l?k2(i.candidates):f;d===0?l?n.push.apply(n,h):n.push(f):r.push({documentOrder:c,tabIndex:d,item:i,isScope:l,content:h})}),r.sort(k5).reduce(function(i,c){return c.isScope?i.push.apply(i,c.content):i.push(c.content),i},[]).concat(n)},Lp=function(t,n){n=n||{};var r;return n.getShadowRoot?r=rp([t],n.includeContainer,{filter:xv.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:F5}):r=I2(t,n.includeContainer,xv.bind(null,n)),k2(r)},V5=function(t,n){n=n||{};var r;return n.getShadowRoot?r=rp([t],n.includeContainer,{filter:Ev.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=I2(t,n.includeContainer,Ev.bind(null,n)),r},P2=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return nl.call(t,tp)===!1?!1:xv(n,t)};const wf=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function N2(e,t){const n=Lp(e,wf()),r=n.length;if(r===0)return;const i=Si(En(e)),c=n.indexOf(i),l=c===-1?t===1?0:r-1:c+t;return n[l]}function z2(e){return N2(En(e).body,1)||e}function L2(e){return N2(En(e).body,-1)||e}function Gu(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!bt(n,r)}function q5(e){Lp(e,wf()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function cC(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const hb="none",op="trigger-press",_r="trigger-hover",kh="trigger-focus",B2="outside-press",rve="item-press",G5="close-press",$2="focus-out",pb="escape-key",ove="list-navigation",ive="cancel-open",K5="disabled",U2="imperative-action",ave="window-resize";function qt(e,t,n,r){let i=!1,c=!1;const l=Ds;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){c=!0},get isCanceled(){return i},get isPropagationAllowed(){return c},trigger:n,...l}}const j2=I.createContext(void 0);function $a(e){const t=I.useContext(j2);if(e===!1&&t===void 0)throw new Error(wo(27));return t}let af=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Z5={[af.startingStyle]:""},Q5={[af.endingStyle]:""},mb={transitionStatus(e){return e==="starting"?Z5:e==="ending"?Q5:null}};let wa=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=af.startingStyle]="startingStyle",e[e.endingStyle=af.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),Rv=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Y5={[Rv.popupOpen]:""},X5={[Rv.popupOpen]:"",[Rv.pressed]:""},W5={[wa.open]:""},J5={[wa.closed]:""},e8={[wa.anchorHidden]:""},t8={open(e){return e?Y5:null}},cve={open(e){return e?X5:null}},Ef={open(e){return e?W5:J5},anchorHidden(e){return e?e8:null}},n8={...Ef,...mb},s8=I.forwardRef(function(t,n){const{render:r,className:i,forceRender:c=!1,...l}=t,{store:f}=$a(),d=f.useState("open"),h=f.useState("nested"),y=f.useState("mounted"),g=f.useState("transitionStatus"),v=I.useMemo(()=>({open:d,transitionStatus:g}),[d,g]);return cr("div",t,{state:v,ref:[f.context.backdropRef,n],stateAttributesMapping:n8,props:[{role:"presentation",hidden:!y,style:{userSelect:"none",WebkitUserSelect:"none"}},l],enabled:c||!h})}),r8=I.forwardRef(function(t,n){const{render:r,className:i,disabled:c=!1,nativeButton:l=!0,...f}=t,{store:d}=$a(),h=d.useState("open");function y(_){h&&d.setOpen(!1,qt(G5,_.nativeEvent))}const{getButtonProps:g,buttonRef:v}=r2({disabled:c,native:l}),b=I.useMemo(()=>({disabled:c}),[c]);return cr("button",t,{state:b,ref:[n,v],props:[{onClick:y},f,g]})}),o8=I.forwardRef(function(t,n){const{render:r,className:i,id:c,...l}=t,{store:f}=$a(),d=lb(c);return f.useSyncedValueWithCleanup("descriptionElementId",d),cr("p",t,{ref:n,props:[{id:d},l]})});function Dr(e){const t=zr(i8,e).current;return t.next=e,mt(t.effect),t}function i8(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function a8(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(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)}}}const c8=I.createContext(null),l8=I.createContext(null),Bp=()=>I.useContext(c8)?.id||null,xf=e=>{const t=I.useContext(l8);return e??t};function sl(e){return`data-base-ui-${e}`}function Ph(e,t,n){if(n&&!of(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}const H2=I.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ii,currentIdRef:{current:null},currentContextRef:{current:null}});function u8(e){const{children:t,delay:n,timeoutMs:r=0}=e,i=I.useRef(n),c=I.useRef(n),l=I.useRef(null),f=I.useRef(null),d=Oi();return U.jsx(H2.Provider,{value:I.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:c,currentIdRef:l,timeoutMs:r,currentContextRef:f,timeout:d}),[r,d]),children:t})}function f8(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{enabled:i=!0,open:c}=t,l=I.useContext(H2),{currentIdRef:f,delayRef:d,timeoutMs:h,initialDelayRef:y,currentContextRef:g,hasProvider:v,timeout:b}=l,[_,x]=I.useState(!1);return mt(()=>{function R(){x(!1),g.current?.setIsInstantPhase(!1),f.current=null,g.current=null,d.current=y.current}if(i&&f.current&&!c&&f.current===r){if(x(!1),h){const C=r;return b.start(h,()=>{n.select("open")||f.current&&f.current!==C||R()}),()=>{b.clear()}}R()}},[i,c,r,f,d,h,y,g,b,n]),mt(()=>{if(!i||!c)return;const R=g.current,C=f.current;b.clear(),g.current={onOpenChange:n.setOpen,setIsInstantPhase:x},f.current=r,d.current={open:0,close:Ph(y.current,"close")},C!==null&&C!==r?(x(!0),R?.setIsInstantPhase(!0),R?.onOpenChange(!1,qt(hb))):(x(!1),R?.setIsInstantPhase(!1))},[i,c,r,n,f,d,h,y,g,b]),mt(()=>()=>{g.current=null},[g]),I.useMemo(()=>({hasProvider:v,delayRef:d,isInstantPhase:_}),[v,d,_])}const F2={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},V2={...F2,position:"fixed",top:0,left:0},lve={...F2,position:"absolute"},ph=null;class d8{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let i=0;i=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const mh=new d8;class Mr{static create(){return new Mr}static request(t){return mh.request(t)}static cancel(t){return mh.cancel(t)}currentId=ph;request(t){this.cancel(),this.currentId=mh.request(()=>{this.currentId=ph,t()})}cancel=()=>{this.currentId!==ph&&(mh.cancel(this.currentId),this.currentId=ph)};disposeEffect=()=>this.cancel}function q2(){const e=zr(Mr.create).current;return y2(e.disposeEffect),e}const ip=I.forwardRef(function(t,n){const[r,i]=I.useState();mt(()=>{_2&&i("button")},[]);const c={tabIndex:0,role:r};return U.jsx("span",{...t,ref:n,style:V2,"aria-hidden":r?void 0:!0,...c,"data-base-ui-focus-guard":""})});let lC=0;function l0(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(lC);const c=()=>e?.focus({preventScroll:n});i?c():lC=requestAnimationFrame(c)}const qc={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function uC(e){return e==="inert"?qc.inert:e==="aria-hidden"?qc["aria-hidden"]:qc.none}let gh=new WeakSet,yh={},u0=0;const G2=e=>e&&(e.host||G2(e.parentNode)),h8=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=G2(n);return e.contains(r)?r:null}).filter(n=>n!=null);function p8(e,t,n,r){const i="data-base-ui-inert",c=r?"inert":n?"aria-hidden":null,l=h8(t,e),f=new Set,d=new Set(l),h=[];yh[i]||(yh[i]=new WeakMap);const y=yh[i];l.forEach(g),v(t),f.clear();function g(b){!b||f.has(b)||(f.add(b),b.parentNode&&g(b.parentNode))}function v(b){!b||d.has(b)||[].forEach.call(b.children,_=>{if(Pi(_)!=="script")if(f.has(_))v(_);else{const x=c?_.getAttribute(c):null,R=x!==null&&x!=="false",C=uC(c),A=(C.get(_)||0)+1,O=(y.get(_)||0)+1;C.set(_,A),y.set(_,O),h.push(_),A===1&&R&&gh.add(_),O===1&&_.setAttribute(i,""),!R&&c&&_.setAttribute(c,c==="inert"?"":"true")}})}return u0+=1,()=>{h.forEach(b=>{const _=uC(c),R=(_.get(b)||0)-1,C=(y.get(b)||0)-1;_.set(b,R),y.set(b,C),R||(!gh.has(b)&&c&&b.removeAttribute(c),gh.delete(b)),C||b.removeAttribute(i)}),u0-=1,u0||(qc.inert=new WeakMap,qc["aria-hidden"]=new WeakMap,qc.none=new WeakMap,gh=new WeakSet,yh={})}}function m8(e,t=!1,n=!1){const r=En(e[0]).body;return p8(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const K2=I.createContext(null),Z2=()=>I.useContext(K2),g8=sl("portal");function Q2(e={}){const{ref:t,container:n,componentProps:r=Ds,elementProps:i,elementState:c}=e,l=_f(),d=Z2()?.portalNode,[h,y]=I.useState(null),[g,v]=I.useState(null),b=Ze(C=>{C!==null&&v(C)}),_=I.useRef(null);mt(()=>{if(n===null){_.current&&(_.current=null,v(null),y(null));return}if(l==null)return;const C=(n&&(ib(n)?n:n.current))??d??document.body;if(C==null){_.current&&(_.current=null,v(null),y(null));return}_.current!==C&&(_.current=C,v(null),y(C))},[n,d,l]);const x=cr("div",r,{ref:[t,b],state:c,props:[{id:l,[g8]:""},i]});return{portalNode:g,portalSubtree:h&&x?ki.createPortal(x,h):null}}const y8=I.forwardRef(function(t,n){const{children:r,container:i,className:c,render:l,renderGuards:f,...d}=t,{portalNode:h,portalSubtree:y}=Q2({container:i,ref:n,componentProps:t,elementProps:d}),g=I.useRef(null),v=I.useRef(null),b=I.useRef(null),_=I.useRef(null),[x,R]=I.useState(null),C=x?.modal,A=x?.open,O=typeof f=="boolean"?f:!!x&&!x.modal&&x.open&&!!h;I.useEffect(()=>{if(!h||C)return;function N(j){h&&j.relatedTarget&&Gu(j)&&(j.type==="focusin"?cC:q5)(h)}return h.addEventListener("focusin",N,!0),h.addEventListener("focusout",N,!0),()=>{h.removeEventListener("focusin",N,!0),h.removeEventListener("focusout",N,!0)}},[h,C]),I.useEffect(()=>{!h||A||cC(h)},[A,h]);const D=I.useMemo(()=>({beforeOutsideRef:g,afterOutsideRef:v,beforeInsideRef:b,afterInsideRef:_,portalNode:h,setFocusManagerState:R}),[h]);return U.jsxs(I.Fragment,{children:[y,U.jsxs(K2.Provider,{value:D,children:[O&&h&&U.jsx(ip,{"data-type":"outside",ref:g,onFocus:N=>{if(Gu(N,h))b.current?.focus();else{const j=x?x.domReference:null;L2(j)?.focus()}}}),O&&h&&U.jsx("span",{"aria-owns":h.id,style:v$}),h&&ki.createPortal(r,h),O&&h&&U.jsx(ip,{"data-type":"outside",ref:v,onFocus:N=>{if(Gu(N,h))_.current?.focus();else{const j=x?x.domReference:null;z2(j)?.focus(),x?.closeOnFocusOut&&x?.onOpenChange(!1,qt($2,N.nativeEvent))}}})]})]})});function lo(e){return e==null?e:"current"in e?e.current:e}function v8(e,t){const n=gn(e.target);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"):""}const fC=20;let Ei=[];function gb(){Ei=Ei.filter(e=>e.isConnected)}function b8(e){gb(),e&&Pi(e)!=="body"&&(Ei.push(e),Ei.length>fC&&(Ei=Ei.slice(-fC)))}function f0(){return gb(),Ei[Ei.length-1]}function S8(e){if(!e)return null;const t=wf();return P2(e,t)?e:Lp(e,t)[0]||e}function _8(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():zs(e).display!=="none"}function dC(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=wf(),i=V5(e,n).filter(l=>{const f=l.getAttribute("data-tabindex")||"";return P2(l,n)||l.hasAttribute("data-tabindex")&&!f.startsWith("-")}),c=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?c!=="0"&&e.setAttribute("tabindex","0"):(c!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function w8(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],initialFocus:c=!0,returnFocus:l=!0,restoreFocus:f=!1,modal:d=!0,closeOnFocusOut:h=!0,openInteractionType:y="",getInsideElements:g=()=>[],nextFocusableElement:v,previousFocusableElement:b,beforeContentFocusGuardRef:_,externalTree:x}=e,R="rootStore"in t?t.rootStore:t,C=R.useState("open"),A=R.useState("domReferenceElement"),O=R.useState("floatingElement"),{events:D,dataRef:N}=R.context,j=Ze(()=>N.current.floatingContext?.nodeId),$=Ze(g),k=c===!1,Z=sC(A)&&k,se=Dr(i),le=Dr(c),K=Dr(l),Q=Dr(y),ye=xf(x),fe=Z2(),q=I.useRef(null),W=I.useRef(null),F=I.useRef(!1),ve=I.useRef(!1),Te=I.useRef(!1),P=I.useRef(-1),ne=I.useRef(""),ie=I.useRef(""),de=I.useRef(null),Ce=I.useRef(null),_e=Yh(de,_,fe?.beforeInsideRef),be=Yh(Ce,fe?.afterInsideRef),Ye=Oi(),He=Oi(),ht=q2(),Ft=fe!=null,oe=Sv(O),Fe=Ze((we=oe)=>we?Lp(we,wf()):[]),Ie=Ze(we=>{const Ne=Fe(we);return se.current.map(()=>Ne).filter(Boolean).flat()});I.useEffect(()=>{if(r||!d)return;function we(qe){qe.key==="Tab"&&bt(oe,Si(En(oe)))&&Fe().length===0&&!Z&&p5(qe)}const Ne=En(oe);return Ne.addEventListener("keydown",we),()=>{Ne.removeEventListener("keydown",we)}},[r,A,oe,d,se,Z,Fe,Ie]),I.useEffect(()=>{if(r||!O)return;function we(Ne){const qe=is(Ne),ut=Fe().indexOf(qe);ut!==-1&&(P.current=ut)}return O.addEventListener("focusin",we),()=>{O.removeEventListener("focusin",we)}},[r,O,Fe]),I.useEffect(()=>{if(r||!C)return;const we=En(oe);function Ne(){Te.current=!1}function qe(ut){const Be=is(ut),Le=bt(O,Be)||bt(A,Be)||bt(fe?.portalNode,Be);Te.current=!Le,ie.current=ut.pointerType||"keyboard"}function Qe(){ie.current="keyboard"}return we.addEventListener("pointerdown",qe,!0),we.addEventListener("pointerup",Ne,!0),we.addEventListener("pointercancel",Ne,!0),we.addEventListener("keydown",Qe,!0),()=>{we.removeEventListener("pointerdown",qe,!0),we.removeEventListener("pointerup",Ne,!0),we.removeEventListener("pointercancel",Ne,!0),we.removeEventListener("keydown",Qe,!0)}},[r,O,A,oe,C,fe]),I.useEffect(()=>{if(r||!h)return;function we(){ve.current=!0,He.start(0,()=>{ve.current=!1})}function Ne(Be){const Le=Be.relatedTarget,on=Be.currentTarget,it=is(Be);queueMicrotask(()=>{const _s=j(),gt=R.context.triggerElements,$t=Le?.hasAttribute(sl("focus-guard"))&&[de.current,Ce.current,fe?.beforeInsideRef.current,fe?.afterInsideRef.current,fe?.beforeOutsideRef.current,fe?.afterOutsideRef.current,lo(b),lo(v)].includes(Le),Ut=!(bt(A,Le)||bt(O,Le)||bt(Le,O)||bt(fe?.portalNode,Le)||Le!=null&>.hasElement(Le)||gt.hasMatchingElement(an=>bt(an,Le))||$t||ye&&(Ca(ye.nodesRef.current,_s).find(an=>bt(an.context?.elements.floating,Le)||bt(an.context?.elements.domReference,Le))||rC(ye.nodesRef.current,_s).find(an=>[an.context?.elements.floating,Sv(an.context?.elements.floating)].includes(Le)||an.context?.elements.domReference===Le)));if(on===A&&oe&&dC(oe,se),f&&on!==A&&!_8(it)&&Si(En(oe))===En(oe).body){if(xn(oe)&&(oe.focus(),f==="popup")){ht.request(()=>{oe.focus()});return}const an=P.current,ws=Fe(),$s=ws[an]||ws[ws.length-1]||oe;xn($s)&&$s.focus()}if(N.current.insideReactTree){N.current.insideReactTree=!1;return}(Z||!d)&&Le&&Ut&&!ve.current&&(Z||Le!==f0())&&(F.current=!0,R.setOpen(!1,qt($2,Be)))})}function qe(){Te.current||(N.current.insideReactTree=!0,Ye.start(0,()=>{N.current.insideReactTree=!1}))}const Qe=xn(A)?A:null,ut=[];if(!(!O&&!Qe))return Qe&&(Qe.addEventListener("focusout",Ne),Qe.addEventListener("pointerdown",we),ut.push(()=>{Qe.removeEventListener("focusout",Ne),Qe.removeEventListener("pointerdown",we)})),O&&(O.addEventListener("focusout",Ne),fe&&(O.addEventListener("focusout",qe,!0),ut.push(()=>{O.removeEventListener("focusout",qe,!0)})),ut.push(()=>{O.removeEventListener("focusout",Ne)})),()=>{ut.forEach(Be=>{Be()})}},[r,A,O,oe,d,ye,fe,R,h,f,Fe,Z,j,se,N,Ye,He,ht,v,b]),I.useEffect(()=>{if(r||!O||!C)return;const we=Array.from(fe?.portalNode?.querySelectorAll(`[${sl("portal")}]`)||[]),qe=(ye?rC(ye.nodesRef.current,j()):[]).find(Be=>sC(Be.context?.elements.domReference||null))?.context?.elements.domReference,Qe=[O,qe,...we,...$(),q.current,W.current,de.current,Ce.current,fe?.beforeOutsideRef.current,fe?.afterOutsideRef.current,lo(b),lo(v),Z?A:null].filter(Be=>Be!=null),ut=m8(Qe,d||Z);return()=>{ut()}},[C,r,A,O,d,se,fe,Z,ye,j,$,v,b]),mt(()=>{if(!C||r||!xn(oe))return;const we=En(oe),Ne=Si(we);queueMicrotask(()=>{const qe=Ie(oe),Qe=le.current,ut=typeof Qe=="function"?Qe(Q.current||""):Qe;if(ut===void 0||ut===!1)return;let Be;ut===!0||ut===null?Be=qe[0]||oe:Be=lo(ut),Be=Be||qe[0]||oe,!bt(oe,Ne)&&l0(Be,{preventScroll:Be===oe})})},[r,C,oe,k,Ie,le,Q]),mt(()=>{if(r||!oe)return;const we=En(oe),Ne=Si(we);b8(Ne);function qe(Be){if(Be.open||(ne.current=v8(Be.nativeEvent,ie.current)),Be.reason===_r&&Be.nativeEvent.type==="mouseleave"&&(F.current=!0),Be.reason===B2)if(Be.nested)F.current=!1;else if(g5(Be.nativeEvent)||y5(Be.nativeEvent))F.current=!1;else{let Le=!1;document.createElement("div").focus({get preventScroll(){return Le=!0,!1}}),Le?F.current=!1:F.current=!0}}D.on("openchange",qe);const Qe=we.createElement("span");Qe.setAttribute("tabindex","-1"),Qe.setAttribute("aria-hidden","true"),Object.assign(Qe.style,V2),Ft&&A&&A.insertAdjacentElement("afterend",Qe);function ut(){const Be=K.current;let Le=typeof Be=="function"?Be(ne.current):Be;if(Le===void 0||Le===!1)return null;if(Le===null&&(Le=!0),typeof Le=="boolean"){const it=A||f0();return it&&it.isConnected?it:Qe}const on=A||f0()||Qe;return lo(Le)||on}return()=>{D.off("openchange",qe);const Be=Si(we),Le=bt(O,Be)||ye&&Ca(ye.nodesRef.current,j(),!1).some(it=>bt(it.context?.elements.floating,Be)),on=ut();queueMicrotask(()=>{const it=S8(on),_s=typeof K.current!="boolean";K.current&&!F.current&&xn(it)&&(!(!_s&&it!==Be&&Be!==we.body)||Le)&&it.focus({preventScroll:!0}),Qe.remove()})}},[r,O,oe,K,N,D,ye,Ft,A,j]),I.useEffect(()=>{queueMicrotask(()=>{F.current=!1})},[r]),I.useEffect(()=>{if(r||!C)return;function we(qe){is(qe)?.closest(`[${g$}]`)&&(ve.current=!0)}const Ne=En(oe);return Ne.addEventListener("pointerdown",we,!0),()=>{Ne.removeEventListener("pointerdown",we,!0)}},[r,C,oe]),mt(()=>{if(!r&&fe)return fe.setFocusManagerState({modal:d,closeOnFocusOut:h,open:C,onOpenChange:R.setOpen,domReference:A}),()=>{fe.setFocusManagerState(null)}},[r,fe,d,C,R,h,A]),mt(()=>{if(!(r||!oe))return dC(oe,se),()=>{queueMicrotask(gb)}},[r,oe,se]);const Pt=!r&&(d?!Z:!0)&&(Ft||d);return U.jsxs(I.Fragment,{children:[Pt&&U.jsx(ip,{"data-type":"inside",ref:_e,onFocus:we=>{if(d){const Ne=Ie();l0(Ne[Ne.length-1])}else fe?.portalNode&&(F.current=!1,Gu(we,fe.portalNode)?z2(A)?.focus():lo(b??fe.beforeOutsideRef)?.focus())}}),n,Pt&&U.jsx(ip,{"data-type":"inside",ref:be,onFocus:we=>{d?l0(Ie()[0]):fe?.portalNode&&(h&&(F.current=!0),Gu(we,fe.portalNode)?L2(A)?.focus():lo(v??fe.afterOutsideRef)?.focus())}})]})}function E8(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){const c=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},l=t.axis==="x"||t.axis==="both",f=t.axis==="y"||t.axis==="both",d=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let h=c.width,y=c.height,g=c.x,v=c.y;return n==null&&t.x&&l&&(n=c.x-t.x),r==null&&t.y&&f&&(r=c.y-t.y),g-=n||0,v-=r||0,h=0,y=0,!i||d?(h=t.axis==="y"?c.width:0,y=t.axis==="x"?c.height:0,g=l&&t.x!=null?t.x:g,v=f&&t.y!=null?t.y:v):i&&!d&&(y=t.axis==="x"?c.height:y,h=t.axis==="y"?c.width:h),i=!0,{width:h,height:y,x:g,y:v,top:v,right:g+h,bottom:v+y,left:g}}}}function hC(e){return e!=null&&e.clientX!=null}function x8(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),c=n.useState("domReferenceElement"),l=n.context.dataRef,{enabled:f=!0,axis:d="both",x:h=null,y=null}=t,g=I.useRef(!1),v=I.useRef(null),[b,_]=I.useState(),[x,R]=I.useState([]),C=Ze((j,$,k)=>{g.current||l.current.openEvent&&!hC(l.current.openEvent)||n.set("positionReference",E8(k??c,{x:j,y:$,axis:d,dataRef:l,pointerType:b}))}),A=Ze(j=>{h!=null||y!=null||(r?v.current||R([]):C(j.clientX,j.clientY,j.currentTarget))}),O=of(b)?i:r,D=I.useCallback(()=>{if(!O||!f||h!=null||y!=null)return;const j=gn(i);function $(k){const Z=is(k);bt(i,Z)?(j.removeEventListener("mousemove",$),v.current=null):C(k.clientX,k.clientY)}if(!l.current.openEvent||hC(l.current.openEvent)){j.addEventListener("mousemove",$);const k=()=>{j.removeEventListener("mousemove",$),v.current=null};return v.current=k,k}n.set("positionReference",c)},[O,f,h,y,i,l,c,n,C]);I.useEffect(()=>D(),[D,x]),I.useEffect(()=>{f&&!i&&(g.current=!1)},[f,i]),I.useEffect(()=>{!f&&r&&(g.current=!0)},[f,r]),mt(()=>{f&&(h!=null||y!=null)&&(g.current=!1,C(h,y))},[f,h,y,C]);const N=I.useMemo(()=>{function j($){_($.pointerType)}return{onPointerDown:j,onPointerEnter:j,onMouseMove:A,onMouseEnter:A}},[A]);return I.useMemo(()=>f?{reference:N,trigger:N}:{},[f,N])}function pC(e,t,n){let{reference:r,floating:i}=e;const c=ar(t),l=db(t),f=fb(l),d=ys(t),h=c==="y",y=r.x+r.width/2-i.width/2,g=r.y+r.height/2-i.height/2,v=r[f]/2-i[f]/2;let b;switch(d){case"top":b={x:y,y:r.y-i.height};break;case"bottom":b={x:y,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:g};break;case"left":b={x:r.x-i.width,y:g};break;default:b={x:r.x,y:r.y}}switch(Ni(t)){case"start":b[l]-=v*(n&&h?-1:1);break;case"end":b[l]+=v*(n&&h?-1:1);break}return b}const R8=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:c=[],platform:l}=n,f=c.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:y,y:g}=pC(h,r,d),v=r,b={},_=0;for(let x=0;xye<=0)){var le,K;const ye=(((le=c.flip)==null?void 0:le.index)||0)+1,fe=$[ye];if(fe&&(!(g==="alignment"?A!==ar(fe):!1)||se.every(F=>ar(F.placement)===A?F.overflows[0]>0:!0)))return{data:{index:ye,overflows:se},reset:{placement:fe}};let q=(K=se.filter(W=>W.overflows[0]<=0).sort((W,F)=>W.overflows[1]-F.overflows[1])[0])==null?void 0:K.placement;if(!q)switch(b){case"bestFit":{var Q;const W=(Q=se.filter(F=>{if(j){const ve=ar(F.placement);return ve===A||ve==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(ve=>ve>0).reduce((ve,Te)=>ve+Te,0)]).sort((F,ve)=>F[1]-ve[1])[0])==null?void 0:Q[0];W&&(q=W);break}case"initialPlacement":q=f;break}if(i!==q)return{reset:{placement:q}}}return{}}}};function mC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gC(e){return b5.some(t=>e[t]>=0)}const T8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=bo(e,t);switch(r){case"referenceHidden":{const c=await cf(t,{...i,elementContext:"reference"}),l=mC(c,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:gC(l)}}}case"escaped":{const c=await cf(t,{...i,altBoundary:!0}),l=mC(c,n.floating);return{data:{escapedOffsets:l,escaped:gC(l)}}}default:return{}}}}},Y2=new Set(["left","top"]);async function A8(e,t){const{placement:n,platform:r,elements:i}=e,c=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=ys(n),f=Ni(n),d=ar(n)==="y",h=Y2.has(l)?-1:1,y=c&&d?-1:1,g=bo(t,e);let{mainAxis:v,crossAxis:b,alignmentAxis:_}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof _=="number"&&(b=f==="end"?_*-1:_),d?{x:b*y,y:v*h}:{x:v*h,y:b*y}}const I8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:c,placement:l,middlewareData:f}=t,d=await A8(t,e);return l===((n=f.offset)==null?void 0:n.placement)&&(r=f.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:c+d.y,data:{...d,placement:l}}}}},O8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:c=!0,crossAxis:l=!1,limiter:f={fn:R=>{let{x:C,y:A}=R;return{x:C,y:A}}},...d}=bo(e,t),h={x:n,y:r},y=await cf(t,d),g=ar(ys(i)),v=ub(g);let b=h[v],_=h[g];if(c){const R=v==="y"?"top":"left",C=v==="y"?"bottom":"right",A=b+y[R],O=b-y[C];b=_v(A,b,O)}if(l){const R=g==="y"?"top":"left",C=g==="y"?"bottom":"right",A=_+y[R],O=_-y[C];_=_v(A,_,O)}const x=f.fn({...t,[v]:b,[g]:_});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[v]:c,[g]:l}}}}}},M8=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:c,middlewareData:l}=t,{offset:f=0,mainAxis:d=!0,crossAxis:h=!0}=bo(e,t),y={x:n,y:r},g=ar(i),v=ub(g);let b=y[v],_=y[g];const x=bo(f,t),R=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(d){const O=v==="y"?"height":"width",D=c.reference[v]-c.floating[O]+R.mainAxis,N=c.reference[v]+c.reference[O]-R.mainAxis;bN&&(b=N)}if(h){var C,A;const O=v==="y"?"width":"height",D=Y2.has(ys(i)),N=c.reference[g]-c.floating[O]+(D&&((C=l.offset)==null?void 0:C[g])||0)+(D?0:R.crossAxis),j=c.reference[g]+c.reference[O]+(D?0:((A=l.offset)==null?void 0:A[g])||0)-(D?R.crossAxis:0);_j&&(_=j)}return{[v]:b,[g]:_}}}},D8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:c,platform:l,elements:f}=t,{apply:d=()=>{},...h}=bo(e,t),y=await cf(t,h),g=ys(i),v=Ni(i),b=ar(i)==="y",{width:_,height:x}=c.floating;let R,C;g==="top"||g==="bottom"?(R=g,C=v===(await(l.isRTL==null?void 0:l.isRTL(f.floating))?"start":"end")?"left":"right"):(C=g,R=v==="end"?"top":"bottom");const A=x-y.top-y.bottom,O=_-y.left-y.right,D=tl(x-y[R],A),N=tl(_-y[C],O),j=!t.middlewareData.shift;let $=D,k=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=O),(r=t.middlewareData.shift)!=null&&r.enabled.y&&($=A),j&&!v){const se=Ms(y.left,0),le=Ms(y.right,0),K=Ms(y.top,0),Q=Ms(y.bottom,0);b?k=_-2*(se!==0||le!==0?se+le:Ms(y.left,y.right)):$=x-2*(K!==0||Q!==0?K+Q:Ms(y.top,y.bottom))}await d({...t,availableWidth:k,availableHeight:$});const Z=await l.getDimensions(f.floating);return _!==Z.width||x!==Z.height?{reset:{rects:!0}}:{}}}};function X2(e){const t=zs(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=xn(e),c=i?e.offsetWidth:n,l=i?e.offsetHeight:r,f=Wh(n)!==c||Wh(r)!==l;return f&&(n=c,r=l),{width:n,height:r,$:f}}function yb(e){return _t(e)?e:e.contextElement}function Gc(e){const t=yb(e);if(!xn(t))return kr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:c}=X2(t);let l=(c?Wh(n.width):n.width)/r,f=(c?Wh(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!f||!Number.isFinite(f))&&(f=1),{x:l,y:f}}const k8=kr(0);function W2(e){const t=gn(e);return!Np()||!t.visualViewport?k8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function P8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==gn(e)?!1:t}function Ma(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),c=yb(e);let l=kr(1);t&&(r?_t(r)&&(l=Gc(r)):l=Gc(e));const f=P8(c,n,r)?W2(c):kr(0);let d=(i.left+f.x)/l.x,h=(i.top+f.y)/l.y,y=i.width/l.x,g=i.height/l.y;if(c){const v=gn(c),b=r&&_t(r)?gn(r):r;let _=v,x=gv(_);for(;x&&r&&b!==_;){const R=Gc(x),C=x.getBoundingClientRect(),A=zs(x),O=C.left+(x.clientLeft+parseFloat(A.paddingLeft))*R.x,D=C.top+(x.clientTop+parseFloat(A.paddingTop))*R.y;d*=R.x,h*=R.y,y*=R.x,g*=R.y,d+=O,h+=D,_=gn(x),x=gv(_)}}return ep({width:y,height:g,x:d,y:h})}function $p(e,t){const n=zp(e).scrollLeft;return t?t.left+n:Ma(Lr(e)).left+n}function J2(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-$p(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function N8(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const c=i==="fixed",l=Lr(r),f=t?Pp(t.floating):!1;if(r===l||f&&c)return n;let d={scrollLeft:0,scrollTop:0},h=kr(1);const y=kr(0),g=xn(r);if((g||!g&&!c)&&((Pi(r)!=="body"||La(l))&&(d=zp(r)),xn(r))){const b=Ma(r);h=Gc(r),y.x=b.x+r.clientLeft,y.y=b.y+r.clientTop}const v=l&&!g&&!c?J2(l,d):kr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+y.x+v.x,y:n.y*h.y-d.scrollTop*h.y+y.y+v.y}}function z8(e){return Array.from(e.getClientRects())}function L8(e){const t=Lr(e),n=zp(e),r=e.ownerDocument.body,i=Ms(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),c=Ms(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+$p(e);const f=-n.scrollTop;return zs(r).direction==="rtl"&&(l+=Ms(t.clientWidth,r.clientWidth)-i),{width:i,height:c,x:l,y:f}}const yC=25;function B8(e,t){const n=gn(e),r=Lr(e),i=n.visualViewport;let c=r.clientWidth,l=r.clientHeight,f=0,d=0;if(i){c=i.width,l=i.height;const y=Np();(!y||y&&t==="fixed")&&(f=i.offsetLeft,d=i.offsetTop)}const h=$p(r);if(h<=0){const y=r.ownerDocument,g=y.body,v=getComputedStyle(g),b=y.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,_=Math.abs(r.clientWidth-g.clientWidth-b);_<=yC&&(c-=_)}else h<=yC&&(c+=h);return{width:c,height:l,x:f,y:d}}const $8=new Set(["absolute","fixed"]);function U8(e,t){const n=Ma(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,c=xn(e)?Gc(e):kr(1),l=e.clientWidth*c.x,f=e.clientHeight*c.y,d=i*c.x,h=r*c.y;return{width:l,height:f,x:d,y:h}}function vC(e,t,n){let r;if(t==="viewport")r=B8(e,n);else if(t==="document")r=L8(Lr(e));else if(_t(t))r=U8(t,n);else{const i=W2(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ep(r)}function eO(e,t){const n=vo(e);return n===t||!_t(n)||mo(n)?!1:zs(n).position==="fixed"||eO(n,t)}function j8(e,t){const n=t.get(e);if(n)return n;let r=Ti(e,[],!1).filter(f=>_t(f)&&Pi(f)!=="body"),i=null;const c=zs(e).position==="fixed";let l=c?vo(e):e;for(;_t(l)&&!mo(l);){const f=zs(l),d=ab(l);!d&&f.position==="fixed"&&(i=null),(c?!d&&!i:!d&&f.position==="static"&&!!i&&$8.has(i.position)||La(l)&&!d&&eO(e,l))?r=r.filter(y=>y!==l):i=f,l=vo(l)}return t.set(e,r),r}function H8(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?Pp(t)?[]:j8(t,this._c):[].concat(n),r],f=l[0],d=l.reduce((h,y)=>{const g=vC(t,y,i);return h.top=Ms(g.top,h.top),h.right=tl(g.right,h.right),h.bottom=tl(g.bottom,h.bottom),h.left=Ms(g.left,h.left),h},vC(t,f,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function F8(e){const{width:t,height:n}=X2(e);return{width:t,height:n}}function V8(e,t,n){const r=xn(t),i=Lr(t),c=n==="fixed",l=Ma(e,!0,c,t);let f={scrollLeft:0,scrollTop:0};const d=kr(0);function h(){d.x=$p(i)}if(r||!r&&!c)if((Pi(t)!=="body"||La(i))&&(f=zp(t)),r){const b=Ma(t,!0,c,t);d.x=b.x+t.clientLeft,d.y=b.y+t.clientTop}else i&&h();c&&!r&&i&&h();const y=i&&!r&&!c?J2(i,f):kr(0),g=l.left+f.scrollLeft-d.x-y.x,v=l.top+f.scrollTop-d.y-y.y;return{x:g,y:v,width:l.width,height:l.height}}function d0(e){return zs(e).position==="static"}function bC(e,t){if(!xn(e)||zs(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Lr(e)===n&&(n=n.ownerDocument.body),n}function tO(e,t){const n=gn(e);if(Pp(e))return n;if(!xn(e)){let i=vo(e);for(;i&&!mo(i);){if(_t(i)&&!d0(i))return i;i=vo(i)}return n}let r=bC(e,t);for(;r&&Y$(r)&&d0(r);)r=bC(r,t);return r&&mo(r)&&d0(r)&&!ab(r)?n:r||tU(e)||n}const q8=async function(e){const t=this.getOffsetParent||tO,n=this.getDimensions,r=await n(e.floating);return{reference:V8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function G8(e){return zs(e).direction==="rtl"}const K8={convertOffsetParentRelativeRectToViewportRelativeRect:N8,getDocumentElement:Lr,getClippingRect:H8,getOffsetParent:tO,getElementRects:q8,getClientRects:z8,getDimensions:F8,getScale:Gc,isElement:_t,isRTL:G8};function nO(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Z8(e,t){let n=null,r;const i=Lr(e);function c(){var f;clearTimeout(r),(f=n)==null||f.disconnect(),n=null}function l(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),c();const h=e.getBoundingClientRect(),{left:y,top:g,width:v,height:b}=h;if(f||t(),!v||!b)return;const _=hh(g),x=hh(i.clientWidth-(y+v)),R=hh(i.clientHeight-(g+b)),C=hh(y),O={rootMargin:-_+"px "+-x+"px "+-R+"px "+-C+"px",threshold:Ms(0,tl(1,d))||1};let D=!0;function N(j){const $=j[0].intersectionRatio;if($!==d){if(!D)return l();$?l(!1,$):r=setTimeout(()=>{l(!1,1e-7)},1e3)}$===1&&!nO(h,e.getBoundingClientRect())&&l(),D=!1}try{n=new IntersectionObserver(N,{...O,root:i.ownerDocument})}catch{n=new IntersectionObserver(N,O)}n.observe(e)}return l(!0),c}function SC(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:c=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=yb(e),y=i||c?[...h?Ti(h):[],...Ti(t)]:[];y.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),c&&C.addEventListener("resize",n)});const g=h&&f?Z8(h,n):null;let v=-1,b=null;l&&(b=new ResizeObserver(C=>{let[A]=C;A&&A.target===h&&b&&(b.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var O;(O=b)==null||O.observe(t)})),n()}),h&&!d&&b.observe(h),b.observe(t));let _,x=d?Ma(e):null;d&&R();function R(){const C=Ma(e);x&&!nO(x,C)&&n(),x=C,_=requestAnimationFrame(R)}return n(),()=>{var C;y.forEach(A=>{i&&A.removeEventListener("scroll",n),c&&A.removeEventListener("resize",n)}),g?.(),(C=b)==null||C.disconnect(),b=null,d&&cancelAnimationFrame(_)}}const Q8=I8,Y8=O8,X8=C8,W8=D8,J8=T8,ej=M8,tj=(e,t,n)=>{const r=new Map,i={platform:K8,...n},c={...i.platform,_c:r};return R8(e,t,{...i,platform:c})};var nj=typeof document<"u",sj=function(){},Nh=nj?I.useLayoutEffect:sj;function ap(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(!ap(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;){const c=i[r];if(!(c==="_owner"&&e.$$typeof)&&!ap(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function sO(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _C(e,t){const n=sO(e);return Math.round(t*n)/n}function h0(e){const t=I.useRef(e);return Nh(()=>{t.current=e}),t}function rj(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:c,floating:l}={},transform:f=!0,whileElementsMounted:d,open:h}=e,[y,g]=I.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,b]=I.useState(r);ap(v,r)||b(r);const[_,x]=I.useState(null),[R,C]=I.useState(null),A=I.useCallback(F=>{F!==j.current&&(j.current=F,x(F))},[]),O=I.useCallback(F=>{F!==$.current&&($.current=F,C(F))},[]),D=c||_,N=l||R,j=I.useRef(null),$=I.useRef(null),k=I.useRef(y),Z=d!=null,se=h0(d),le=h0(i),K=h0(h),Q=I.useCallback(()=>{if(!j.current||!$.current)return;const F={placement:t,strategy:n,middleware:v};le.current&&(F.platform=le.current),tj(j.current,$.current,F).then(ve=>{const Te={...ve,isPositioned:K.current!==!1};ye.current&&!ap(k.current,Te)&&(k.current=Te,ki.flushSync(()=>{g(Te)}))})},[v,t,n,le,K]);Nh(()=>{h===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,g(F=>({...F,isPositioned:!1})))},[h]);const ye=I.useRef(!1);Nh(()=>(ye.current=!0,()=>{ye.current=!1}),[]),Nh(()=>{if(D&&(j.current=D),N&&($.current=N),D&&N){if(se.current)return se.current(D,N,Q);Q()}},[D,N,Q,se,Z]);const fe=I.useMemo(()=>({reference:j,floating:$,setReference:A,setFloating:O}),[A,O]),q=I.useMemo(()=>({reference:D,floating:N}),[D,N]),W=I.useMemo(()=>{const F={position:n,left:0,top:0};if(!q.floating)return F;const ve=_C(q.floating,y.x),Te=_C(q.floating,y.y);return f?{...F,transform:"translate("+ve+"px, "+Te+"px)",...sO(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ve,top:Te}},[n,f,q.floating,y.x,y.y]);return I.useMemo(()=>({...y,update:Q,refs:fe,elements:q,floatingStyles:W}),[y,Q,fe,q,W])}const oj=(e,t)=>({...Q8(e),options:[e,t]}),ij=(e,t)=>({...Y8(e),options:[e,t]}),aj=(e,t)=>({...ej(e),options:[e,t]}),cj=(e,t)=>({...X8(e),options:[e,t]}),lj=(e,t)=>({...W8(e),options:[e,t]}),uj=(e,t)=>({...J8(e),options:[e,t]}),fj={intentional:"onClick",sloppy:"onPointerDown"};function dj(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function rO(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),c=n.useState("referenceElement"),l=n.useState("domReferenceElement"),{onOpenChange:f,dataRef:d}=n.context,{enabled:h=!0,escapeKey:y=!0,outsidePress:g=!0,outsidePressEvent:v="sloppy",referencePress:b=!1,referencePressEvent:_="sloppy",ancestorScroll:x=!1,bubbles:R,externalTree:C}=t,A=xf(C),O=Ze(typeof g=="function"?g:()=>!1),D=typeof g=="function"?O:g,N=I.useRef(!1),{escapeKey:j,outsidePress:$}=dj(R),k=I.useRef(null),Z=Oi(),se=Oi(),le=Ze(()=>{se.clear(),d.current.insideReactTree=!1}),K=I.useRef(!1),Q=I.useRef(""),ye=Ze(oe=>{Q.current=oe.pointerType}),fe=Ze(()=>{const oe=Q.current,Fe=oe==="pen"||!oe?"mouse":oe,Ie=typeof v=="function"?v():v;return typeof Ie=="string"?Ie:Ie[Fe]}),q=Ze(oe=>{if(!r||!h||!y||oe.key!=="Escape"||K.current)return;const Fe=d.current.floatingContext?.nodeId,Ie=A?Ca(A.nodesRef.current,Fe):[];if(!j&&Ie.length>0){let Ne=!0;if(Ie.forEach(qe=>{qe.context?.open&&!qe.context.dataRef.current.__escapeKeyBubbles&&(Ne=!1)}),!Ne)return}const Pt=m5(oe)?oe.nativeEvent:oe,we=qt(pb,Pt);n.setOpen(!1,we),!j&&!we.isPropagationAllowed&&oe.stopPropagation()}),W=Ze(oe=>{const Fe=fe();return Fe==="intentional"&&oe.type!=="click"||Fe==="sloppy"&&oe.type==="click"}),F=Ze(()=>{d.current.insideReactTree=!0,se.start(0,le)}),ve=Ze((oe,Fe=!1)=>{if(W(oe)){le();return}if(d.current.insideReactTree){le();return}if(fe()==="intentional"&&Fe||typeof D=="function"&&!D(oe))return;const Ie=is(oe),Pt=`[${sl("inert")}]`,we=En(n.select("floatingElement")).querySelectorAll(Pt),Ne=n.context.triggerElements;if(Ie&&(Ne.hasElement(Ie)||Ne.hasMatchingElement(Le=>bt(Le,Ie))))return;let qe=_t(Ie)?Ie:null;for(;qe&&!mo(qe);){const Le=vo(qe);if(mo(Le)||!_t(Le))break;qe=Le}if(we.length&&_t(Ie)&&!d5(Ie)&&!bt(Ie,n.select("floatingElement"))&&Array.from(we).every(Le=>!bt(qe,Le)))return;if(xn(Ie)&&!("touches"in oe)){const Le=mo(Ie),on=zs(Ie),it=/auto|scroll/,_s=Le||it.test(on.overflowX),gt=Le||it.test(on.overflowY),$t=_s&&Ie.clientWidth>0&&Ie.scrollWidth>Ie.clientWidth,Ut=gt&&Ie.clientHeight>0&&Ie.scrollHeight>Ie.clientHeight,an=on.direction==="rtl",ws=Ut&&(an?oe.offsetX<=Ie.offsetWidth-Ie.clientWidth:oe.offsetX>Ie.clientWidth),$s=$t&&oe.offsetY>Ie.clientHeight;if(ws||$s)return}const Qe=d.current.floatingContext?.nodeId,ut=A&&Ca(A.nodesRef.current,Qe).some(Le=>vr(oe,Le.context?.elements.floating));if(vr(oe,n.select("floatingElement"))||vr(oe,n.select("domReferenceElement"))||ut)return;const Be=A?Ca(A.nodesRef.current,Qe):[];if(Be.length>0){let Le=!0;if(Be.forEach(on=>{on.context?.open&&!on.context.dataRef.current.__outsidePressBubbles&&(Le=!1)}),!Le)return}n.setOpen(!1,qt(B2,oe)),le()}),Te=Ze(oe=>{fe()!=="sloppy"||oe.pointerType==="touch"||!n.select("open")||!h||vr(oe,n.select("floatingElement"))||vr(oe,n.select("domReferenceElement"))||ve(oe)}),P=Ze(oe=>{if(fe()!=="sloppy"||!n.select("open")||!h||vr(oe,n.select("floatingElement"))||vr(oe,n.select("domReferenceElement")))return;const Fe=oe.touches[0];Fe&&(k.current={startTime:Date.now(),startX:Fe.clientX,startY:Fe.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},Z.start(1e3,()=>{k.current&&(k.current.dismissOnTouchEnd=!1,k.current.dismissOnMouseDown=!1)}))}),ne=Ze(oe=>{const Fe=is(oe);function Ie(){P(oe),Fe?.removeEventListener(oe.type,Ie)}Fe?.addEventListener(oe.type,Ie)}),ie=Ze(oe=>{const Fe=N.current;if(N.current=!1,Z.clear(),oe.type==="mousedown"&&k.current&&!k.current.dismissOnMouseDown)return;const Ie=is(oe);function Pt(){oe.type==="pointerdown"?Te(oe):ve(oe,Fe),Ie?.removeEventListener(oe.type,Pt)}Ie?.addEventListener(oe.type,Pt)}),de=Ze(oe=>{if(fe()!=="sloppy"||!k.current||vr(oe,n.select("floatingElement"))||vr(oe,n.select("domReferenceElement")))return;const Fe=oe.touches[0];if(!Fe)return;const Ie=Math.abs(Fe.clientX-k.current.startX),Pt=Math.abs(Fe.clientY-k.current.startY),we=Math.sqrt(Ie*Ie+Pt*Pt);we>5&&(k.current.dismissOnTouchEnd=!0),we>10&&(ve(oe),Z.clear(),k.current=null)}),Ce=Ze(oe=>{const Fe=is(oe);function Ie(){de(oe),Fe?.removeEventListener(oe.type,Ie)}Fe?.addEventListener(oe.type,Ie)}),_e=Ze(oe=>{fe()!=="sloppy"||!k.current||vr(oe,n.select("floatingElement"))||vr(oe,n.select("domReferenceElement"))||(k.current.dismissOnTouchEnd&&ve(oe),Z.clear(),k.current=null)}),be=Ze(oe=>{const Fe=is(oe);function Ie(){_e(oe),Fe?.removeEventListener(oe.type,Ie)}Fe?.addEventListener(oe.type,Ie)});I.useEffect(()=>{if(!r||!h)return;d.current.__escapeKeyBubbles=j,d.current.__outsidePressBubbles=$;const oe=new Ii;function Fe(qe){n.setOpen(!1,qt(hb,qe))}function Ie(){oe.clear(),K.current=!0}function Pt(){oe.start(Np()?5:0,()=>{K.current=!1})}const we=En(i);we.addEventListener("pointerdown",ye,!0),y&&(we.addEventListener("keydown",q),we.addEventListener("compositionstart",Ie),we.addEventListener("compositionend",Pt)),D&&(we.addEventListener("click",ie,!0),we.addEventListener("pointerdown",ie,!0),we.addEventListener("touchstart",ne,!0),we.addEventListener("touchmove",Ce,!0),we.addEventListener("touchend",be,!0),we.addEventListener("mousedown",ie,!0));let Ne=[];return x&&(_t(l)&&(Ne=Ti(l)),_t(i)&&(Ne=Ne.concat(Ti(i))),!_t(c)&&c&&c.contextElement&&(Ne=Ne.concat(Ti(c.contextElement)))),Ne=Ne.filter(qe=>qe!==we.defaultView?.visualViewport),Ne.forEach(qe=>{qe.addEventListener("scroll",Fe,{passive:!0})}),()=>{we.removeEventListener("pointerdown",ye,!0),y&&(we.removeEventListener("keydown",q),we.removeEventListener("compositionstart",Ie),we.removeEventListener("compositionend",Pt)),D&&(we.removeEventListener("click",ie,!0),we.removeEventListener("pointerdown",ie,!0),we.removeEventListener("touchstart",ne,!0),we.removeEventListener("touchmove",Ce,!0),we.removeEventListener("touchend",be,!0),we.removeEventListener("mousedown",ie,!0)),Ne.forEach(qe=>{qe.removeEventListener("scroll",Fe)}),oe.clear(),N.current=!1}},[d,i,c,l,y,D,r,f,x,h,j,$,q,ve,ie,Te,ne,Ce,be,ye,n]),I.useEffect(le,[D,le]);const Ye=I.useMemo(()=>({onKeyDown:q,...b&&{[fj[_]]:oe=>{n.setOpen(!1,qt(op,oe.nativeEvent))},..._!=="intentional"&&{onClick(oe){n.setOpen(!1,qt(op,oe.nativeEvent))}}}}),[q,n,b,_]),He=Ze(oe=>{const Fe=is(oe.nativeEvent);!bt(n.select("floatingElement"),Fe)||oe.button!==0||(N.current=!0)}),ht=Ze(oe=>{!r||!h||oe.button!==0||(N.current=!0)}),Ft=I.useMemo(()=>({onKeyDown:q,onPointerDown:He,onMouseDown:He,onMouseUp:He,onClickCapture:F,onMouseDownCapture(oe){F(),ht(oe)},onPointerDownCapture(oe){F(),ht(oe)},onMouseUpCapture:F,onTouchEndCapture:F,onTouchMoveCapture:F}),[q,He,F,ht]);return I.useMemo(()=>h?{reference:Ye,floating:Ft,trigger:Ye}:{},[h,Ye,Ft])}var cp=Symbol("NOT_FOUND");function hj(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function pj(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function mj(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var wC=e=>Array.isArray(e)?e:[e];function gj(e){const t=Array.isArray(e[0])?e[0]:e;return mj(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function yj(e,t){const n=[],{length:r}=e;for(let i=0;it(f,h.key));if(d>-1){const h=n[d];return d>0&&(n.splice(d,1),n.unshift(h)),h.value}return cp}function i(f,d){r(f)===cp&&(n.unshift({key:f,value:d}),n.length>e&&n.pop())}function c(){return n}function l(){n=[]}return{get:r,put:i,getEntries:c,clear:l}}var Sj=(e,t)=>e===t;function _j(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let c=0;cc(b.value,y));v&&(y=v.value,f!==0&&f--)}d.put(arguments,y)}return y}return h.clearCache=()=>{d.clear(),h.resetResultsCount()},h.resultsCount=()=>f,h.resetResultsCount=()=>{f=0},h}var Ej=class{constructor(e){this.value=e}deref(){return this.value}},xj=typeof WeakRef<"u"?WeakRef:Ej,Rj=0,EC=1;function vh(){return{s:Rj,v:void 0,o:null,p:null}}function oO(e,t={}){let n=vh();const{resultEqualityCheck:r}=t;let i,c=0;function l(){let f=n;const{length:d}=arguments;for(let g=0,v=d;g{n=vh(),l.resetResultsCount()},l.resultsCount=()=>c,l.resetResultsCount=()=>{c=0},l}function iO(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let c=0,l=0,f,d={},h=i.pop();typeof h=="object"&&(d=h,h=i.pop()),hj(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const y={...n,...d},{memoize:g,memoizeOptions:v=[],argsMemoize:b=oO,argsMemoizeOptions:_=[]}=y,x=wC(v),R=wC(_),C=gj(i),A=g(function(){return c++,h.apply(null,arguments)},...x),O=b(function(){l++;const N=yj(C,arguments);return f=A.apply(null,N),f},...R);return Object.assign(O,{resultFunc:h,memoizedResultFunc:A,dependencies:C,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>f,recomputations:()=>c,resetRecomputations:()=>{c=0},memoize:g,argsMemoize:b})};return Object.assign(r,{withTypes:()=>r}),r}var Cj=iO(oO),Tj=Object.assign((e,t=Cj)=>{pj(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(c=>e[c]);return t(r,(...c)=>c.reduce((l,f,d)=>(l[n[d]]=f,l),{}))},{withTypes:()=>Tj});iO({memoize:wj,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const ot=(e,t,n,r,i,c,...l)=>{if(l.length>0)throw new Error(wo(1));let f;if(e)f=e;else throw new Error("Missing arguments");return f};var Aj=$I();const Ij=ob(19),Oj=Ij?Dj:kj;function Mj(e,t,n,r,i){return Oj(e,t,n,r,i)}function Dj(e,t,n,r,i){const c=I.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return Aj.useSyncExternalStore(e.subscribe,c,c)}function kj(e,t,n,r,i){return UI.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,c=>t(c,n,r,i))}class Ku{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){Ku.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||Ku.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};Ku.prototype.setState.call(this,t)}}class vb extends Ku{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}controlledValues=new Map;useSyncedValue(t,n){I.useDebugValue(t),mt(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;mt(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);mt(()=>{n.update(t)},[n,...r])}useControlledProp(t,n,r){I.useDebugValue(t);const i=this,c=n!==void 0;this.controlledValues.has(t)||(this.controlledValues.set(t,c),!c&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})),mt(()=>{c&&!Object.is(i.state[t],n)&&super.setState({...i.state,[t]:n})},[i,t,n,r,c])}set(t,n){this.controlledValues.get(t)!==!0&&super.set(t,n)}update(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.update(n)}setState(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.setState({...this.state,...n})}select=(t,n,r,i)=>{const c=this.selectors[t];return c(this.state,n,r,i)};useState=(t,n,r,i)=>{I.useDebugValue(t);const c=this.selectors[t];return Mj(this,c,n,r,i)};useContextCallback(t,n){I.useDebugValue(t);const r=Ze(n??XI);this.context[t]=r}useStateSetter(t){const n=I.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let i=r(this.state);return n(i,i,this),this.subscribe(c=>{const l=r(c);if(!Object.is(i,l)){const f=i;i=l,n(l,f,this)}})}}const Pj={open:ot(e=>e.open),domReferenceElement:ot(e=>e.domReferenceElement),referenceElement:ot(e=>e.positionReference??e.referenceElement),floatingElement:ot(e=>e.floatingElement),floatingId:ot(e=>e.floatingId)};class bb extends vb{constructor(t){const{nested:n,noEmit:r,onOpenChange:i,triggerElements:c,...l}=t;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:i,dataRef:{current:{}},events:a8(),nested:n,noEmit:r,triggerElements:c},Pj)}setOpen=(t,n)=>{if((!t||!this.state.open||v5(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}function Nj(e,t=!1,n=!1){const[r,i]=I.useState(e&&t?"idle":void 0),[c,l]=I.useState(e);return e&&!c&&(l(!0),i("starting")),!e&&c&&r!=="ending"&&!n&&i("ending"),!e&&!c&&r==="ending"&&i(void 0),mt(()=>{if(!e&&c&&r!=="ending"&&n){const f=Mr.request(()=>{i("ending")});return()=>{Mr.cancel(f)}}},[e,c,r,n]),mt(()=>{if(!e||t)return;const f=Mr.request(()=>{i(void 0)});return()=>{Mr.cancel(f)}},[t,e]),mt(()=>{if(!e||!t)return;e&&c&&r!=="idle"&&i("starting");const f=Mr.request(()=>{i("idle")});return()=>{Mr.cancel(f)}},[t,e,c,i,r]),I.useMemo(()=>({mounted:c,setMounted:l,transitionStatus:r}),[c,r])}function zj(e,t=!1,n=!0){const r=q2();return Ze((i,c=null)=>{r.cancel();function l(){ki.flushSync(i)}const f=lo(e);if(f==null)return;const d=f;if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let h=function(){const g=af.startingStyle;if(!d.hasAttribute(g)){r.request(y);return}const v=new MutationObserver(()=>{d.hasAttribute(g)||(v.disconnect(),y())});v.observe(d,{attributes:!0,attributeFilter:[g]}),c?.addEventListener("abort",()=>v.disconnect(),{once:!0})},y=function(){Promise.all(d.getAnimations().map(g=>g.finished)).then(()=>{c?.aborted||l()}).catch(()=>{const g=d.getAnimations();if(n){if(c?.aborted)return;l()}else g.length>0&&g.some(v=>v.pending||v.playState!=="finished")&&y()})};if(t){h();return}r.request(y)}})}function Sb(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,c=Ze(i),l=zj(r,n,!1);I.useEffect(()=>{if(!t)return;const f=new AbortController;return l(c,f.signal),()=>{f.abort()}},[t,n,c,l])}function Lj(e,t){const n=I.useRef(null),r=I.useRef(null);return I.useCallback(i=>{if(e!==void 0){if(n.current!==null){const c=n.current,l=r.current,f=t.context.triggerElements.getById(c);l&&f===l&&t.context.triggerElements.delete(c),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function Bj(e,t,n,r){const i=n.useState("isMountedByTrigger",e),c=Lj(e,n),l=Ze(f=>{if(c(f),!f||!n.select("open"))return;const d=n.select("activeTriggerId");if(d===e){n.update({activeTriggerElement:f,...r});return}d==null&&n.update({activeTriggerId:e,activeTriggerElement:f,...r})});return mt(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:i}}function aO(e){const t=e.useState("open");mt(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,i]=n.value;e.update({activeTriggerId:r,activeTriggerElement:i})}}},[t,e])}function cO(e,t,n){const{mounted:r,setMounted:i,transitionStatus:c}=Nj(e);t.useSyncedValues({mounted:r,transitionStatus:c});const l=Ze(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),f=t.useState("preventUnmountingOnClose");return Sb({enabled:!f,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:c}}class Up{constructor(){this.elements=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elements.delete(r),this.elements.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elements.delete(n),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const n of this.elements)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function $j(){return new bb({open:!1,floatingElement:null,referenceElement:null,triggerElements:new Up,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function lO(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:$j(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:Ds,inactiveTriggerProps:Ds,popupProps:Ds}}const uO={open:ot(e=>e.open),mounted:ot(e=>e.mounted),transitionStatus:ot(e=>e.transitionStatus),floatingRootContext:ot(e=>e.floatingRootContext),preventUnmountingOnClose:ot(e=>e.preventUnmountingOnClose),payload:ot(e=>e.payload),activeTriggerId:ot(e=>e.activeTriggerId),activeTriggerElement:ot(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:ot((e,t)=>t!==void 0&&e.activeTriggerId===t),isOpenedByTrigger:ot((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.open),isMountedByTrigger:ot((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.mounted),triggerProps:ot((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:ot(e=>e.popupProps),popupElement:ot(e=>e.popupElement),positionerElement:ot(e=>e.positionerElement)};function Uj(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=_f(),c=Bp()!=null,l=zr(()=>new bb({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:r.triggers??new Up,floatingId:i,nested:c,noEmit:e.noEmit||!1})).current;return mt(()=>{const f={open:t,floatingId:i};r.reference!==void 0&&(f.referenceElement=r.reference,f.domReferenceElement=_t(r.reference)?r.reference:null),r.floating!==void 0&&(f.floatingElement=r.floating),l.update(f)},[t,i,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=c,l.context.noEmit=e.noEmit||!1,l}function jj(e={}){const{nodeId:t,externalTree:n}=e,r=Uj(e),i=e.rootContext||r,c={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[l,f]=I.useState(null),d=I.useRef(null),h=xf(n);mt(()=>{c.domReference&&(d.current=c.domReference)},[c.domReference]);const y=rj({...e,elements:{...c,...l&&{reference:l}}}),g=I.useCallback($=>{const k=_t($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),getClientRects:()=>$.getClientRects(),contextElement:$}:$;f(k),y.refs.setReference(k)},[y.refs]),[v,b]=I.useState(null),[_,x]=I.useState(null);i.useSyncedValue("referenceElement",v),i.useSyncedValue("domReferenceElement",_t(v)?v:null),i.useSyncedValue("floatingElement",_);const R=I.useCallback($=>{(_t($)||$===null)&&(d.current=$,b($)),(_t(y.refs.reference.current)||y.refs.reference.current===null||$!==null&&!_t($))&&y.refs.setReference($)},[y.refs,b]),C=I.useCallback($=>{x($),y.refs.setFloating($)},[y.refs]),A=I.useMemo(()=>({...y.refs,setReference:R,setFloating:C,setPositionReference:g,domReference:d}),[y.refs,R,C,g]),O=I.useMemo(()=>({...y.elements,domReference:c.domReference}),[y.elements,c.domReference]),D=i.useState("open"),N=i.useState("floatingId"),j=I.useMemo(()=>({...y,dataRef:i.context.dataRef,open:D,onOpenChange:i.setOpen,events:i.context.events,floatingId:N,refs:A,elements:O,nodeId:t,rootStore:i}),[y,A,O,t,i,D,N]);return mt(()=>{i.context.dataRef.current.floatingContext=j;const $=h?.nodesRef.current.find(k=>k.id===t);$&&($.context=j)}),I.useMemo(()=>({...y,context:j,refs:A,elements:O,rootStore:i}),[y,A,O,j,i])}function fO(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,c=_f(),l=Bp()!=null,f=t.useState("open"),d=t.useState("activeTriggerElement"),h=t.useState(r?"popupElement":"positionerElement"),y=t.context.triggerElements,g=zr(()=>new bb({open:f,referenceElement:d,floatingElement:h,triggerElements:y,onOpenChange:i,floatingId:c,nested:l,noEmit:n})).current;return mt(()=>{const v={open:f,floatingId:c,referenceElement:d,floatingElement:h};_t(d)&&(v.domReferenceElement=d),g.state.positionReference===g.state.referenceElement&&(v.positionReference=d),g.update(v)},[f,c,d,h,g]),g.context.onOpenChange=i,g.context.nested=l,g.context.noEmit=n,g}const p0=c5&&_2;function Hj(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:c=!0,visibleOnly:l=!0,delay:f}=t,d=I.useRef(!1),h=I.useRef(null),y=Oi(),g=I.useRef(!0);I.useEffect(()=>{const b=n.select("domReferenceElement");if(!c)return;const _=gn(b);function x(){const A=n.select("domReferenceElement");!n.select("open")&&xn(A)&&A===Si(En(A))&&(d.current=!0)}function R(){g.current=!0}function C(){g.current=!1}return _.addEventListener("blur",x),p0&&(_.addEventListener("keydown",R,!0),_.addEventListener("pointerdown",C,!0)),()=>{_.removeEventListener("blur",x),p0&&(_.removeEventListener("keydown",R,!0),_.removeEventListener("pointerdown",C,!0))}},[n,c]),I.useEffect(()=>{if(!c)return;function b(_){if(_.reason===op||_.reason===pb){const x=n.select("domReferenceElement");_t(x)&&(h.current=x,d.current=!0)}}return r.on("openchange",b),()=>{r.off("openchange",b)}},[r,c,n]);const v=I.useMemo(()=>({onMouseLeave(){d.current=!1,h.current=null},onFocus(b){const _=b.currentTarget;if(d.current){if(h.current===_)return;d.current=!1,h.current=null}const x=is(b.nativeEvent);if(l&&_t(x)){if(p0&&!b.relatedTarget){if(!g.current&&!C2(x))return}else if(!h5(x))return}const R=b.relatedTarget&&n.context.triggerElements.hasElement(b.relatedTarget),{nativeEvent:C,currentTarget:A}=b,O=typeof f=="function"?f():f;if(n.select("open")&&R||O===0||O===void 0){n.setOpen(!0,qt(kh,C,A));return}y.start(O,()=>{d.current||n.setOpen(!0,qt(kh,C,A))})},onBlur(b){d.current=!1,h.current=null;const _=b.relatedTarget,x=b.nativeEvent,R=_t(_)&&_.hasAttribute(sl("focus-guard"))&&_.getAttribute("data-type")==="outside";y.start(0,()=>{const C=n.select("domReferenceElement"),A=Si(C?C.ownerDocument:document);if(!_&&A===C||bt(i.current.floatingContext?.refs.floating.current,A)||bt(C,A)||R)return;const O=_??A;if(_t(O)){const D=n.context.triggerElements;if(D.hasElement(O)||D.hasMatchingElement(N=>bt(N,O)))return}n.setOpen(!1,qt(kh,x))})}}),[i,n,l,y,f]);return I.useMemo(()=>c?{reference:v,trigger:v}:{},[c,v])}const Cv=sl("safe-polygon"),Fj=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${R2}`;function Vj(e){return e?!!e.closest(Fj):!1}function dO(e){const t=I.useRef(void 0),n=I.useRef(!1),r=I.useRef(void 0),i=I.useRef(!0),c=I.useRef(!1),l=I.useRef(()=>{}),f=I.useRef(!1),d=Oi(),h=Oi(),y=I.useRef(void 0);return I.useMemo(()=>{const g=e.context.dataRef.current;return g.hoverInteractionState||(g.hoverInteractionState={pointerTypeRef:t,interactedInsideRef:n,handlerRef:r,blockMouseMoveRef:i,performedPointerEventsMutationRef:c,unbindMouseMoveRef:l,restTimeoutPendingRef:f,openChangeTimeout:d,restTimeout:h,handleCloseOptionsRef:y}),g.hoverInteractionState},[e,t,n,r,i,c,l,f,d,h,y])}const qj=new Set(["click","mousedown"]);function Gj(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),c=n.useState("domReferenceElement"),{dataRef:l}=n.context,{enabled:f=!0,closeDelay:d=0,externalTree:h}=t,{pointerTypeRef:y,interactedInsideRef:g,handlerRef:v,performedPointerEventsMutationRef:b,unbindMouseMoveRef:_,restTimeoutPendingRef:x,openChangeTimeout:R,handleCloseOptionsRef:C}=dO(n),A=xf(h),O=Bp(),D=Ze(()=>g.current?!0:l.current.openEvent?qj.has(l.current.openEvent.type):!1),N=Ze(()=>{const se=l.current.openEvent?.type;return se?.includes("mouse")&&se!=="mousedown"}),j=I.useCallback((se,le=!0)=>{const K=Kj(d,y.current);K&&!v.current?R.start(K,()=>n.setOpen(!1,qt(_r,se))):le&&(R.clear(),n.setOpen(!1,qt(_r,se)))},[d,v,n,y,R]),$=Ze(()=>{_.current(),v.current=void 0}),k=Ze(()=>{if(b.current){const se=En(i).body;se.style.pointerEvents="",se.removeAttribute(Cv),b.current=!1}}),Z=Ze(se=>{const le=is(se);if(!Vj(le)){g.current=!1;return}g.current=!0});mt(()=>{r||(y.current=void 0,x.current=!1,g.current=!1,$(),k())},[r,y,x,g,$,k]),I.useEffect(()=>()=>{$()},[$]),I.useEffect(()=>k,[k]),mt(()=>{if(f&&r&&C.current?.blockPointerEvents&&N()&&_t(c)&&i){b.current=!0;const se=En(i).body;se.setAttribute(Cv,"");const le=c,K=i,Q=A?.nodesRef.current.find(ye=>ye.id===O)?.context?.elements.floating;return Q&&(Q.style.pointerEvents=""),se.style.pointerEvents="none",le.style.pointerEvents="auto",K.style.pointerEvents="auto",()=>{se.style.pointerEvents="",le.style.pointerEvents="",K.style.pointerEvents=""}}},[f,r,c,i,C,N,A,O,b]),I.useEffect(()=>{if(!f)return;function se(ye){if(D()||!l.current.floatingContext||!n.select("open"))return;const fe=n.context.triggerElements;ye.relatedTarget&&fe.hasElement(ye.relatedTarget)||(k(),$(),D()||j(ye))}function le(ye){R.clear(),k(),v.current?.(ye),$()}function K(ye){D()||j(ye,!1)}const Q=i;return Q&&(Q.addEventListener("mouseleave",se),Q.addEventListener("mouseenter",le),Q.addEventListener("mouseleave",K),Q.addEventListener("pointerdown",Z,!0)),()=>{Q&&(Q.removeEventListener("mouseleave",se),Q.removeEventListener("mouseenter",le),Q.removeEventListener("mouseleave",K),Q.removeEventListener("pointerdown",Z,!0))}})}function Kj(e,t){return t&&!of(t)?0:typeof e=="function"?e():e}function m0(e){return typeof e=="function"?e():e}const Zj={current:null};function Qj(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:c=!0,delay:l=0,handleClose:f=null,mouseOnly:d=!1,restMs:h=0,move:y=!0,triggerElementRef:g=Zj,externalTree:v,isActiveTrigger:b=!0}=t,_=xf(v),{pointerTypeRef:x,interactedInsideRef:R,handlerRef:C,blockMouseMoveRef:A,performedPointerEventsMutationRef:O,unbindMouseMoveRef:D,restTimeoutPendingRef:N,openChangeTimeout:j,restTimeout:$,handleCloseOptionsRef:k}=dO(n),Z=Dr(f),se=Dr(l),le=Dr(h);b&&(k.current=Z.current?.__options);const K=Ze(()=>R.current?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),Q=I.useCallback((W,F=!0)=>{const ve=Ph(se.current,"close",x.current);ve&&!C.current?j.start(ve,()=>n.setOpen(!1,qt(_r,W))):F&&(j.clear(),n.setOpen(!1,qt(_r,W)))},[se,C,n,x,j]),ye=Ze(()=>{D.current(),C.current=void 0}),fe=Ze(()=>{if(O.current){const W=En(n.select("domReferenceElement")).body;W.style.pointerEvents="",W.removeAttribute(Cv),O.current=!1}});I.useEffect(()=>{if(!c)return;function W(F){F.open||(j.clear(),$.clear(),A.current=!0,N.current=!1)}return i.on("openchange",W),()=>{i.off("openchange",W)}},[c,i,j,$,A,N]);const q=Ze(W=>{if(K()||!r.current.floatingContext)return;const F=n.context.triggerElements;if(W.relatedTarget&&F.hasElement(W.relatedTarget))return;const ve=g.current;Z.current?.({...r.current.floatingContext,tree:_,x:W.clientX,y:W.clientY,onClose(){fe(),ye(),!K()&&ve===n.select("domReferenceElement")&&Q(W)}})(W)});return I.useEffect(()=>{if(!c)return;const W=g.current??(b?n.select("domReferenceElement"):null);if(!_t(W))return;function F(P){if(j.clear(),A.current=!1,d&&!of(x.current)||m0(le.current)>0&&!Ph(se.current,"open"))return;const ne=Ph(se.current,"open",x.current),ie=n.select("domReferenceElement"),de=n.context.triggerElements,Ce=(de.hasElement(P.target)||de.hasMatchingElement(He=>bt(He,P.target)))&&(!ie||!bt(ie,P.target)),_e=P.currentTarget??null,be=n.select("open"),Ye=!be||Ce;Ce&&be?n.setOpen(!0,qt(_r,P,_e)):ne?j.start(ne,()=>{Ye&&n.setOpen(!0,qt(_r,P,_e))}):Ye&&n.setOpen(!0,qt(_r,P,_e))}function ve(P){if(K()){fe();return}D.current();const ne=n.select("domReferenceElement"),ie=En(ne);$.clear(),N.current=!1;const de=n.context.triggerElements;if(P.relatedTarget&&de.hasElement(P.relatedTarget))return;if(Z.current&&r.current.floatingContext){n.select("open")||j.clear();const _e=g.current;C.current=Z.current({...r.current.floatingContext,tree:_,x:P.clientX,y:P.clientY,onClose(){fe(),ye(),!K()&&_e===n.select("domReferenceElement")&&Q(P,!0)}});const be=C.current;be(P),ie.addEventListener("mousemove",be),D.current=()=>{ie.removeEventListener("mousemove",be)};return}(x.current!=="touch"||!bt(n.select("floatingElement"),P.relatedTarget))&&Q(P)}function Te(P){q(P)}return n.select("open")&&W.addEventListener("mouseleave",Te),y&&W.addEventListener("mousemove",F,{once:!0}),W.addEventListener("mouseenter",F),W.addEventListener("mouseleave",ve),()=>{W.removeEventListener("mouseleave",Te),y&&W.removeEventListener("mousemove",F),W.removeEventListener("mouseenter",F),W.removeEventListener("mouseleave",ve)}},[ye,fe,A,r,se,Q,n,c,Z,q,b,K,d,y,x,le,$,N,j,g,_,D,C]),I.useMemo(()=>{function W(F){x.current=F.pointerType}return{onPointerDown:W,onPointerEnter:W,onMouseMove(F){const{nativeEvent:ve}=F,Te=F.currentTarget,P=n.select("domReferenceElement"),ne=n.context.triggerElements,ie=n.select("open"),de=(ne.hasElement(F.target)||ne.hasMatchingElement(_e=>bt(_e,F.target)))&&(!P||!bt(P,F.target));if(d&&!of(x.current)||ie&&!de||m0(le.current)===0||!de&&N.current&&F.movementX**2+F.movementY**2<2)return;$.clear();function Ce(){if(N.current=!1,K())return;const _e=n.select("open");!A.current&&(!_e||de)&&n.setOpen(!0,qt(_r,ve,Te))}x.current==="touch"?ki.flushSync(()=>{Ce()}):de&&ie?Ce():(N.current=!0,$.start(m0(le.current),Ce))}}},[A,K,d,n,x,le,$,N])}function hO(e=[]){const t=e.map(h=>h?.reference),n=e.map(h=>h?.floating),r=e.map(h=>h?.item),i=e.map(h=>h?.trigger),c=I.useCallback(h=>bh(h,e,"reference"),t),l=I.useCallback(h=>bh(h,e,"floating"),n),f=I.useCallback(h=>bh(h,e,"item"),r),d=I.useCallback(h=>bh(h,e,"trigger"),i);return I.useMemo(()=>({getReferenceProps:c,getFloatingProps:l,getItemProps:f,getTriggerProps:d}),[c,l,f,d])}function bh(e,t,n){const r=new Map,i=n==="item",c={};n==="floating"&&(c.tabIndex=-1,c[bv]="");for(const l in e)i&&e&&(l===E2||l===x2)||(c[l]=e[l]);for(let l=0;lr.get(i)?.map(f=>f(...l)).find(f=>f!==void 0))):e[i]=c)}}const Yj=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Xj(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingId"),c=n.useState("domReferenceElement"),l=n.useState("floatingElement"),{enabled:f=!0,role:d="dialog"}=t,h=_f(),y=c?.id||h,g=I.useMemo(()=>Sv(l)?.id||i,[l,i]),v=Yj.get(d)??d,_=Bp()!=null,x=I.useMemo(()=>v==="tooltip"||d==="label"?Ds:{"aria-haspopup":v==="alertdialog"?"dialog":v,"aria-expanded":"false",...v==="listbox"&&{role:"combobox"},...v==="menu"&&_&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[v,_,d]),R=I.useMemo(()=>v==="tooltip"||d==="label"?{[`aria-${d==="label"?"labelledby":"describedby"}`]:r?g:void 0}:{...x,"aria-expanded":r?"true":"false","aria-controls":r?g:void 0,...v==="menu"&&{id:y}},[v,g,r,y,d,x]),C=I.useMemo(()=>{const O={id:g,...v&&{role:v}};return v==="tooltip"||d==="label"?O:{...O,...v==="menu"&&{"aria-labelledby":y}}},[v,g,y,d]),A=I.useCallback(({active:O,selected:D})=>{const N={role:"option",...O&&{id:`${g}-fui-option`}};switch(d){case"select":case"combobox":return{...N,"aria-selected":D}}return{}},[g,d]);return I.useMemo(()=>f?{reference:R,floating:C,item:A,trigger:x}:{},[f,R,C,x,A])}function RC(e,t){const[n,r]=e;let i=!1;const c=t.length;for(let l=0,f=c-1;l=r!=g>=r&&n<=(y-d)*(r-h)/(g-h)+d&&(i=!i)}return i}function Wj(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Jj(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i=new Ii;let c=!1,l=null,f=null,d=typeof performance<"u"?performance.now():0;function h(g,v){const b=performance.now(),_=b-d;if(l===null||f===null||_===0)return l=g,f=v,d=b,null;const x=g-l,R=v-f,A=Math.sqrt(x*x+R*R)/_;return l=g,f=v,d=b,A}const y=({x:g,y:v,placement:b,elements:_,onClose:x,nodeId:R,tree:C})=>function(O){function D(){i.clear(),x()}if(i.clear(),!_.domReference||!_.floating||b==null||g==null||v==null)return;const{clientX:N,clientY:j}=O,$=[N,j],k=is(O),Z=O.type==="mouseleave",se=bt(_.floating,k),le=bt(_.domReference,k),K=_.domReference.getBoundingClientRect(),Q=_.floating.getBoundingClientRect(),ye=b.split("-")[0],fe=g>Q.right-Q.width/2,q=v>Q.bottom-Q.height/2,W=Wj($,K),F=Q.width>K.width,ve=Q.height>K.height,Te=(F?K:Q).left,P=(F?K:Q).right,ne=(ve?K:Q).top,ie=(ve?K:Q).bottom;if(se&&(c=!0,!Z))return;if(le&&(c=!1),le&&!Z){c=!0;return}if(Z&&_t(O.relatedTarget)&&bt(_.floating,O.relatedTarget)||C&&Ca(C.nodesRef.current,R).some(({context:_e})=>_e?.open))return;if(ye==="top"&&v>=K.bottom-1||ye==="bottom"&&v<=K.top+1||ye==="left"&&g>=K.right-1||ye==="right"&&g<=K.left+1)return D();let de=[];switch(ye){case"top":de=[[Te,K.top+1],[Te,Q.bottom-1],[P,Q.bottom-1],[P,K.top+1]];break;case"bottom":de=[[Te,Q.top+1],[Te,K.bottom-1],[P,K.bottom-1],[P,Q.top+1]];break;case"left":de=[[Q.right-1,ie],[Q.right-1,ne],[K.left+1,ne],[K.left+1,ie]];break;case"right":de=[[K.right-1,ie],[K.right-1,ne],[Q.left+1,ne],[Q.left+1,ie]];break}function Ce([_e,be]){switch(ye){case"top":{const Ye=[F?_e+t/2:fe?_e+t*4:_e-t*4,be+t+1],He=[F?_e-t/2:fe?_e+t*4:_e-t*4,be+t+1],ht=[[Q.left,fe||F?Q.bottom-t:Q.top],[Q.right,fe?F?Q.bottom-t:Q.top:Q.bottom-t]];return[Ye,He,...ht]}case"bottom":{const Ye=[F?_e+t/2:fe?_e+t*4:_e-t*4,be-t],He=[F?_e-t/2:fe?_e+t*4:_e-t*4,be-t],ht=[[Q.left,fe||F?Q.top+t:Q.bottom],[Q.right,fe?F?Q.top+t:Q.bottom:Q.top+t]];return[Ye,He,...ht]}case"left":{const Ye=[_e+t+1,ve?be+t/2:q?be+t*4:be-t*4],He=[_e+t+1,ve?be-t/2:q?be+t*4:be-t*4];return[...[[q||ve?Q.right-t:Q.left,Q.top],[q?ve?Q.right-t:Q.left:Q.right-t,Q.bottom]],Ye,He]}case"right":{const Ye=[_e-t,ve?be+t/2:q?be+t*4:be-t*4],He=[_e-t,ve?be-t/2:q?be+t*4:be-t*4],ht=[[q||ve?Q.left+t:Q.right,Q.top],[q?ve?Q.left+t:Q.right:Q.left+t,Q.bottom]];return[Ye,He,...ht]}default:return[]}}if(!RC([N,j],de)){if(c&&!W)return D();if(!Z&&r){const _e=h(O.clientX,O.clientY);if(_e!==null&&_e<.1)return D()}RC([N,j],Ce([g,v]))?!c&&r&&i.start(40,D):D()}};return y.__options={blockPointerEvents:n},y}let e9=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),t9=(function(e){return e[e.open=wa.open]="open",e[e.closed=wa.closed]="closed",e[e.startingStyle=wa.startingStyle]="startingStyle",e[e.endingStyle=wa.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const pO=I.createContext(void 0);function n9(){const e=I.useContext(pO);if(e===void 0)throw new Error(wo(26));return e}const mO="ArrowUp",gO="ArrowDown",yO="ArrowLeft",vO="ArrowRight",bO="Home",SO="End",s9=new Set([yO,vO]),r9=new Set([mO,gO]),o9=new Set([...s9,...r9]);[...o9];const i9=new Set([mO,gO,yO,vO,bO,SO]),a9={...Ef,...mb,nestedDialogOpen(e){return e?{[t9.nestedDialogOpen]:""}:null}},c9=I.forwardRef(function(t,n){const{className:r,finalFocus:i,initialFocus:c,render:l,...f}=t,{store:d}=$a(),h=d.useState("descriptionElementId"),y=d.useState("disablePointerDismissal"),g=d.useState("floatingRootContext"),v=d.useState("popupProps"),b=d.useState("modal"),_=d.useState("mounted"),x=d.useState("nested"),R=d.useState("nestedOpenDialogCount"),C=d.useState("open"),A=d.useState("openMethod"),O=d.useState("titleElementId"),D=d.useState("transitionStatus"),N=d.useState("role");n9(),Sb({open:C,ref:d.context.popupRef,onComplete(){C&&d.context.onOpenChangeComplete?.(!0)}});function j(le){return le==="touch"?d.context.popupRef.current:!0}const $=c===void 0?j:c,k=R>0,Z=I.useMemo(()=>({open:C,nested:x,transitionStatus:D,nestedDialogOpen:k}),[C,x,D,k]),se=cr("div",t,{state:Z,props:[v,{"aria-labelledby":O??void 0,"aria-describedby":h??void 0,role:N,tabIndex:-1,hidden:!_,onKeyDown(le){i9.has(le.key)&&le.stopPropagation()},style:{[e9.nestedDialogs]:R}},f],ref:[n,d.context.popupRef,d.useStateSetter("popupElement")],stateAttributesMapping:a9});return U.jsx(w8,{context:g,openInteractionType:A,disabled:!_,closeOnFocusOut:!y,initialFocus:$,returnFocus:i,modal:b!==!1,restoreFocus:"popup",children:se})});function l9(e){return ob(19)?e:e?"true":void 0}const u9=I.forwardRef(function(t,n){const{cutout:r,...i}=t;let c;if(r){const l=r?.getBoundingClientRect();c=`polygon( +`+u.stack}}var Qe=Object.prototype.hasOwnProperty,ut=e.unstable_scheduleCallback,Be=e.unstable_cancelCallback,Le=e.unstable_shouldYield,on=e.unstable_requestPaint,it=e.unstable_now,_s=e.unstable_getCurrentPriorityLevel,gt=e.unstable_ImmediatePriority,$t=e.unstable_UserBlockingPriority,Ut=e.unstable_NormalPriority,an=e.unstable_LowPriority,ws=e.unstable_IdlePriority,$s=e.log,Ff=e.unstable_setDisableYieldValue,jo=null,qn=null;function dr(s){if(typeof $s=="function"&&Ff(s),qn&&typeof qn.setStrictMode=="function")try{qn.setStrictMode(jo,s)}catch{}}var Gn=Math.clz32?Math.clz32:Us,Qt=Math.log,Kn=Math.LN2;function Us(s){return s>>>=0,s===0?32:31-(Qt(s)/Kn|0)|0}var kn=256,hr=262144,pr=4194304;function js(s){var o=s&42;if(o!==0)return o;switch(s&-s){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 s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function Ho(s,o,a){var u=s.pendingLanes;if(u===0)return 0;var p=0,m=s.suspendedLanes,w=s.pingedLanes;s=s.warmLanes;var T=u&134217727;return T!==0?(u=T&~m,u!==0?p=js(u):(w&=T,w!==0?p=js(w):a||(a=T&~s,a!==0&&(p=js(a))))):(T=u&~m,T!==0?p=js(T):w!==0?p=js(w):a||(a=u&~s,a!==0&&(p=js(a)))),p===0?0:o!==0&&o!==p&&(o&m)===0&&(m=p&-p,a=o&-o,m>=a||m===32&&(a&4194048)!==0)?o:p}function Fo(s,o){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&o)===0}function Cm(s,o){switch(s){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 Vf(){var s=pr;return pr<<=1,(pr&62914560)===0&&(pr=4194304),s}function Nl(s){for(var o=[],a=0;31>a;a++)o.push(s);return o}function Xi(s,o){s.pendingLanes|=o,o!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function zl(s,o,a,u,p,m){var w=s.pendingLanes;s.pendingLanes=a,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=a,s.entangledLanes&=a,s.errorRecoveryDisabledLanes&=a,s.shellSuspendCounter=0;var T=s.entanglements,L=s.expirationTimes,X=s.hiddenUpdates;for(a=w&~a;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var fz=/[\n"\\]/g;function Fs(s){return s.replace(fz,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Om(s,o,a,u,p,m,w,T){s.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?s.type=w:s.removeAttribute("type"),o!=null?w==="number"?(o===0&&s.value===""||s.value!=o)&&(s.value=""+Hs(o)):s.value!==""+Hs(o)&&(s.value=""+Hs(o)):w!=="submit"&&w!=="reset"||s.removeAttribute("value"),o!=null?Mm(s,w,Hs(o)):a!=null?Mm(s,w,Hs(a)):u!=null&&s.removeAttribute("value"),p==null&&m!=null&&(s.defaultChecked=!!m),p!=null&&(s.checked=p&&typeof p!="function"&&typeof p!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?s.name=""+Hs(T):s.removeAttribute("name")}function vw(s,o,a,u,p,m,w,T){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(s.type=m),o!=null||a!=null){if(!(m!=="submit"&&m!=="reset"||o!=null)){Im(s);return}a=a!=null?""+Hs(a):"",o=o!=null?""+Hs(o):a,T||o===s.value||(s.value=o),s.defaultValue=o}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,s.checked=T?s.checked:!!u,s.defaultChecked=!!u,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(s.name=w),Im(s)}function Mm(s,o,a){o==="number"&&Xf(s.ownerDocument)===s||s.defaultValue===""+a||(s.defaultValue=""+a)}function nc(s,o,a,u){if(s=s.options,o){o={};for(var p=0;p"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zm=!1;if(Gr)try{var Hl={};Object.defineProperty(Hl,"passive",{get:function(){zm=!0}}),window.addEventListener("test",Hl,Hl),window.removeEventListener("test",Hl,Hl)}catch{zm=!1}var qo=null,Lm=null,Jf=null;function Cw(){if(Jf)return Jf;var s,o=Lm,a=o.length,u,p="value"in qo?qo.value:qo.textContent,m=p.length;for(s=0;s=ql),Dw=" ",kw=!1;function Pw(s,o){switch(s){case"keyup":return $z.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nw(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var ic=!1;function jz(s,o){switch(s){case"compositionend":return Nw(o);case"keypress":return o.which!==32?null:(kw=!0,Dw);case"textInput":return s=o.data,s===Dw&&kw?null:s;default:return null}}function Hz(s,o){if(ic)return s==="compositionend"||!Hm&&Pw(s,o)?(s=Cw(),Jf=Lm=qo=null,ic=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1=o)return{node:a,offset:o-s};s=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Fw(a)}}function qw(s,o){return s&&o?s===o?!0:s&&s.nodeType===3?!1:o&&o.nodeType===3?qw(s,o.parentNode):"contains"in s?s.contains(o):s.compareDocumentPosition?!!(s.compareDocumentPosition(o)&16):!1:!1}function Gw(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var o=Xf(s.document);o instanceof s.HTMLIFrameElement;){try{var a=typeof o.contentWindow.location.href=="string"}catch{a=!1}if(a)s=o.contentWindow;else break;o=Xf(s.document)}return o}function qm(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o&&(o==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||o==="textarea"||s.contentEditable==="true")}var Yz=Gr&&"documentMode"in document&&11>=document.documentMode,ac=null,Gm=null,Ql=null,Km=!1;function Kw(s,o,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Km||ac==null||ac!==Xf(u)||(u=ac,"selectionStart"in u&&qm(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Ql&&Zl(Ql,u)||(Ql=u,u=Gd(Gm,"onSelect"),0>=w,p-=w,Er=1<<32-Gn(o)+p|a<Je?(ct=Pe,Pe=null):ct=Pe.sibling;var bt=J(G,Pe,Y[Je],he);if(bt===null){Pe===null&&(Pe=ct);break}s&&Pe&&bt.alternate===null&&o(G,Pe),V=m(bt,V,Je),yt===null?ze=bt:yt.sibling=bt,yt=bt,Pe=ct}if(Je===Y.length)return a(G,Pe),ft&&Zr(G,Je),ze;if(Pe===null){for(;JeJe?(ct=Pe,Pe=null):ct=Pe.sibling;var hi=J(G,Pe,bt.value,he);if(hi===null){Pe===null&&(Pe=ct);break}s&&Pe&&hi.alternate===null&&o(G,Pe),V=m(hi,V,Je),yt===null?ze=hi:yt.sibling=hi,yt=hi,Pe=ct}if(bt.done)return a(G,Pe),ft&&Zr(G,Je),ze;if(Pe===null){for(;!bt.done;Je++,bt=Y.next())bt=pe(G,bt.value,he),bt!==null&&(V=m(bt,V,Je),yt===null?ze=bt:yt.sibling=bt,yt=bt);return ft&&Zr(G,Je),ze}for(Pe=u(Pe);!bt.done;Je++,bt=Y.next())bt=re(Pe,G,Je,bt.value,he),bt!==null&&(s&&bt.alternate!==null&&Pe.delete(bt.key===null?Je:bt.key),V=m(bt,V,Je),yt===null?ze=bt:yt.sibling=bt,yt=bt);return s&&Pe.forEach(function(gL){return o(G,gL)}),ft&&Zr(G,Je),ze}function It(G,V,Y,he){if(typeof Y=="object"&&Y!==null&&Y.type===x&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case v:e:{for(var ze=Y.key;V!==null;){if(V.key===ze){if(ze=Y.type,ze===x){if(V.tag===7){a(G,V.sibling),he=p(V,Y.props.children),he.return=G,G=he;break e}}else if(V.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===k&&ca(ze)===V.type){a(G,V.sibling),he=p(V,Y.props),tu(he,Y),he.return=G,G=he;break e}a(G,V);break}else o(G,V);V=V.sibling}Y.type===x?(he=sa(Y.props.children,G.mode,he,Y.key),he.return=G,G=he):(he=ld(Y.type,Y.key,Y.props,null,G.mode,he),tu(he,Y),he.return=G,G=he)}return w(G);case _:e:{for(ze=Y.key;V!==null;){if(V.key===ze)if(V.tag===4&&V.stateNode.containerInfo===Y.containerInfo&&V.stateNode.implementation===Y.implementation){a(G,V.sibling),he=p(V,Y.children||[]),he.return=G,G=he;break e}else{a(G,V);break}else o(G,V);V=V.sibling}he=eg(Y,G.mode,he),he.return=G,G=he}return w(G);case k:return Y=ca(Y),It(G,V,Y,he)}if(fe(Y))return Oe(G,V,Y,he);if(K(Y)){if(ze=K(Y),typeof ze!="function")throw Error(r(150));return Y=ze.call(Y),Ue(G,V,Y,he)}if(typeof Y.then=="function")return It(G,V,gd(Y),he);if(Y.$$typeof===O)return It(G,V,dd(G,Y),he);yd(G,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,V!==null&&V.tag===6?(a(G,V.sibling),he=p(V,Y),he.return=G,G=he):(a(G,V),he=Jm(Y,G.mode,he),he.return=G,G=he),w(G)):a(G,V)}return function(G,V,Y,he){try{eu=0;var ze=It(G,V,Y,he);return bc=null,ze}catch(Pe){if(Pe===yc||Pe===pd)throw Pe;var yt=xs(29,Pe,null,G.mode);return yt.lanes=he,yt.return=G,yt}}}var ua=gE(!0),yE=gE(!1),Yo=!1;function dg(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function hg(s,o){s=s.updateQueue,o.updateQueue===s&&(o.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Xo(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Wo(s,o,a){var u=s.updateQueue;if(u===null)return null;if(u=u.shared,(St&2)!==0){var p=u.pending;return p===null?o.next=o:(o.next=p.next,p.next=o),u.pending=o,o=cd(s),eE(s,null,a),o}return ad(s,u,o,a),cd(s)}function nu(s,o,a){if(o=o.updateQueue,o!==null&&(o=o.shared,(a&4194048)!==0)){var u=o.lanes;u&=s.pendingLanes,a|=u,o.lanes=a,qf(s,a)}}function pg(s,o){var a=s.updateQueue,u=s.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var p=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var w={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};m===null?p=m=w:m=m.next=w,a=a.next}while(a!==null);m===null?p=m=o:m=m.next=o}else p=m=o;a={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:m,shared:u.shared,callbacks:u.callbacks},s.updateQueue=a;return}s=a.lastBaseUpdate,s===null?a.firstBaseUpdate=o:s.next=o,a.lastBaseUpdate=o}var mg=!1;function su(){if(mg){var s=gc;if(s!==null)throw s}}function ru(s,o,a,u){mg=!1;var p=s.updateQueue;Yo=!1;var m=p.firstBaseUpdate,w=p.lastBaseUpdate,T=p.shared.pending;if(T!==null){p.shared.pending=null;var L=T,X=L.next;L.next=null,w===null?m=X:w.next=X,w=L;var ae=s.alternate;ae!==null&&(ae=ae.updateQueue,T=ae.lastBaseUpdate,T!==w&&(T===null?ae.firstBaseUpdate=X:T.next=X,ae.lastBaseUpdate=L))}if(m!==null){var pe=p.baseState;w=0,ae=X=L=null,T=m;do{var J=T.lane&-536870913,re=J!==T.lane;if(re?(at&J)===J:(u&J)===J){J!==0&&J===mc&&(mg=!0),ae!==null&&(ae=ae.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var Oe=s,Ue=T;J=o;var It=a;switch(Ue.tag){case 1:if(Oe=Ue.payload,typeof Oe=="function"){pe=Oe.call(It,pe,J);break e}pe=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=Ue.payload,J=typeof Oe=="function"?Oe.call(It,pe,J):Oe,J==null)break e;pe=g({},pe,J);break e;case 2:Yo=!0}}J=T.callback,J!==null&&(s.flags|=64,re&&(s.flags|=8192),re=p.callbacks,re===null?p.callbacks=[J]:re.push(J))}else re={lane:J,tag:T.tag,payload:T.payload,callback:T.callback,next:null},ae===null?(X=ae=re,L=pe):ae=ae.next=re,w|=J;if(T=T.next,T===null){if(T=p.shared.pending,T===null)break;re=T,T=re.next,re.next=null,p.lastBaseUpdate=re,p.shared.pending=null}}while(!0);ae===null&&(L=pe),p.baseState=L,p.firstBaseUpdate=X,p.lastBaseUpdate=ae,m===null&&(p.shared.lanes=0),si|=w,s.lanes=w,s.memoizedState=pe}}function bE(s,o){if(typeof s!="function")throw Error(r(191,s));s.call(o)}function vE(s,o){var a=s.callbacks;if(a!==null)for(s.callbacks=null,s=0;sm?m:8;var w=q.T,T={};q.T=T,Pg(s,!1,o,a);try{var L=p(),X=q.S;if(X!==null&&X(T,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var ae=o4(L,u);au(s,o,ae,Is(s))}else au(s,o,u,Is(s))}catch(pe){au(s,o,{then:function(){},status:"rejected",reason:pe},Is())}finally{W.p=m,w!==null&&T.types!==null&&(w.types=T.types),q.T=w}}function f4(){}function Dg(s,o,a,u){if(s.tag!==5)throw Error(r(476));var p=XE(s).queue;YE(s,p,o,F,a===null?f4:function(){return WE(s),a(u)})}function XE(s){var o=s.memoizedState;if(o!==null)return o;o={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wr,lastRenderedState:F},next:null};var a={};return o.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wr,lastRenderedState:a},next:null},s.memoizedState=o,s=s.alternate,s!==null&&(s.memoizedState=o),o}function WE(s){var o=XE(s);o.next===null&&(o=s.alternate.memoizedState),au(s,o.next.queue,{},Is())}function kg(){return zn(xu)}function JE(){return en().memoizedState}function ex(){return en().memoizedState}function d4(s){for(var o=s.return;o!==null;){switch(o.tag){case 24:case 3:var a=Is();s=Xo(a);var u=Wo(o,s,a);u!==null&&(ps(u,o,a),nu(u,o,a)),o={cache:cg()},s.payload=o;return}o=o.return}}function h4(s,o,a){var u=Is();a={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Td(s)?nx(o,a):(a=Xm(s,o,a,u),a!==null&&(ps(a,s,u),sx(a,o,u)))}function tx(s,o,a){var u=Is();au(s,o,a,u)}function au(s,o,a,u){var p={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Td(s))nx(o,p);else{var m=s.alternate;if(s.lanes===0&&(m===null||m.lanes===0)&&(m=o.lastRenderedReducer,m!==null))try{var w=o.lastRenderedState,T=m(w,a);if(p.hasEagerState=!0,p.eagerState=T,Es(T,w))return ad(s,o,p,0),Dt===null&&id(),!1}catch{}if(a=Xm(s,o,p,u),a!==null)return ps(a,s,u),sx(a,o,u),!0}return!1}function Pg(s,o,a,u){if(u={lane:2,revertLane:dy(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Td(s)){if(o)throw Error(r(479))}else o=Xm(s,a,u,2),o!==null&&ps(o,s,2)}function Td(s){var o=s.alternate;return s===Xe||o!==null&&o===Xe}function nx(s,o){Sc=Sd=!0;var a=s.pending;a===null?o.next=o:(o.next=a.next,a.next=o),s.pending=o}function sx(s,o,a){if((a&4194048)!==0){var u=o.lanes;u&=s.pendingLanes,a|=u,o.lanes=a,qf(s,a)}}var cu={readContext:zn,use:Ed,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useLayoutEffect:Yt,useInsertionEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useSyncExternalStore:Yt,useId:Yt,useHostTransitionStatus:Yt,useFormState:Yt,useActionState:Yt,useOptimistic:Yt,useMemoCache:Yt,useCacheRefresh:Yt};cu.useEffectEvent=Yt;var rx={readContext:zn,use:Ed,useCallback:function(s,o){return ts().memoizedState=[s,o===void 0?null:o],s},useContext:zn,useEffect:jE,useImperativeHandle:function(s,o,a){a=a!=null?a.concat([s]):null,Rd(4194308,4,qE.bind(null,o,s),a)},useLayoutEffect:function(s,o){return Rd(4194308,4,s,o)},useInsertionEffect:function(s,o){Rd(4,2,s,o)},useMemo:function(s,o){var a=ts();o=o===void 0?null:o;var u=s();if(fa){dr(!0);try{s()}finally{dr(!1)}}return a.memoizedState=[u,o],u},useReducer:function(s,o,a){var u=ts();if(a!==void 0){var p=a(o);if(fa){dr(!0);try{a(o)}finally{dr(!1)}}}else p=o;return u.memoizedState=u.baseState=p,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:p},u.queue=s,s=s.dispatch=h4.bind(null,Xe,s),[u.memoizedState,s]},useRef:function(s){var o=ts();return s={current:s},o.memoizedState=s},useState:function(s){s=Tg(s);var o=s.queue,a=tx.bind(null,Xe,o);return o.dispatch=a,[s.memoizedState,a]},useDebugValue:Og,useDeferredValue:function(s,o){var a=ts();return Mg(a,s,o)},useTransition:function(){var s=Tg(!1);return s=YE.bind(null,Xe,s.queue,!0,!1),ts().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,o,a){var u=Xe,p=ts();if(ft){if(a===void 0)throw Error(r(407));a=a()}else{if(a=o(),Dt===null)throw Error(r(349));(at&127)!==0||RE(u,o,a)}p.memoizedState=a;var m={value:a,getSnapshot:o};return p.queue=m,jE(TE.bind(null,u,m,s),[s]),u.flags|=2048,wc(9,{destroy:void 0},CE.bind(null,u,m,a,o),null),a},useId:function(){var s=ts(),o=Dt.identifierPrefix;if(ft){var a=xr,u=Er;a=(u&~(1<<32-Gn(u)-1)).toString(32)+a,o="_"+o+"R_"+a,a=_d++,0<\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof u.is=="string"?w.createElement("select",{is:u.is}):w.createElement("select"),u.multiple?m.multiple=!0:u.size&&(m.size=u.size);break;default:m=typeof u.is=="string"?w.createElement(p,{is:u.is}):w.createElement(p)}}m[Pn]=o,m[cs]=u;e:for(w=o.child;w!==null;){if(w.tag===5||w.tag===6)m.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===o)break e;for(;w.sibling===null;){if(w.return===null||w.return===o)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}o.stateNode=m;e:switch(Bn(m,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&eo(o)}}return Lt(o),Zg(o,o.type,s===null?null:s.memoizedProps,o.pendingProps,a),null;case 6:if(s&&o.stateNode!=null)s.memoizedProps!==u&&eo(o);else{if(typeof u!="string"&&o.stateNode===null)throw Error(r(166));if(s=_e.current,hc(o)){if(s=o.stateNode,a=o.memoizedProps,u=null,p=Nn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}s[Pn]=o,s=!!(s.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||E1(s.nodeValue,a)),s||Zo(o,!0)}else s=Kd(s).createTextNode(u),s[Pn]=o,o.stateNode=s}return Lt(o),null;case 31:if(a=o.memoizedState,s===null||s.memoizedState!==null){if(u=hc(o),a!==null){if(s===null){if(!u)throw Error(r(318));if(s=o.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[Pn]=o}else ra(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Lt(o),s=!1}else a=rg(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=a),s=!0;if(!s)return o.flags&256?(Cs(o),o):(Cs(o),null);if((o.flags&128)!==0)throw Error(r(558))}return Lt(o),null;case 13:if(u=o.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(p=hc(o),u!==null&&u.dehydrated!==null){if(s===null){if(!p)throw Error(r(318));if(p=o.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[Pn]=o}else ra(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Lt(o),p=!1}else p=rg(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=p),p=!0;if(!p)return o.flags&256?(Cs(o),o):(Cs(o),null)}return Cs(o),(o.flags&128)!==0?(o.lanes=a,o):(a=u!==null,s=s!==null&&s.memoizedState!==null,a&&(u=o.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==p&&(u.flags|=2048)),a!==s&&a&&(o.child.flags|=8192),Dd(o,o.updateQueue),Lt(o),null);case 4:return He(),s===null&&gy(o.stateNode.containerInfo),Lt(o),null;case 10:return Yr(o.type),Lt(o),null;case 19:if(ne(Jt),u=o.memoizedState,u===null)return Lt(o),null;if(p=(o.flags&128)!==0,m=u.rendering,m===null)if(p)uu(u,!1);else{if(Xt!==0||s!==null&&(s.flags&128)!==0)for(s=o.child;s!==null;){if(m=vd(s),m!==null){for(o.flags|=128,uu(u,!1),s=m.updateQueue,o.updateQueue=s,Dd(o,s),o.subtreeFlags=0,s=a,a=o.child;a!==null;)tE(a,s),a=a.sibling;return ie(Jt,Jt.current&1|2),ft&&Zr(o,u.treeForkCount),o.child}s=s.sibling}u.tail!==null&&it()>Ld&&(o.flags|=128,p=!0,uu(u,!1),o.lanes=4194304)}else{if(!p)if(s=vd(m),s!==null){if(o.flags|=128,p=!0,s=s.updateQueue,o.updateQueue=s,Dd(o,s),uu(u,!0),u.tail===null&&u.tailMode==="hidden"&&!m.alternate&&!ft)return Lt(o),null}else 2*it()-u.renderingStartTime>Ld&&a!==536870912&&(o.flags|=128,p=!0,uu(u,!1),o.lanes=4194304);u.isBackwards?(m.sibling=o.child,o.child=m):(s=u.last,s!==null?s.sibling=m:o.child=m,u.last=m)}return u.tail!==null?(s=u.tail,u.rendering=s,u.tail=s.sibling,u.renderingStartTime=it(),s.sibling=null,a=Jt.current,ie(Jt,p?a&1|2:a&1),ft&&Zr(o,u.treeForkCount),s):(Lt(o),null);case 22:case 23:return Cs(o),yg(),u=o.memoizedState!==null,s!==null?s.memoizedState!==null!==u&&(o.flags|=8192):u&&(o.flags|=8192),u?(a&536870912)!==0&&(o.flags&128)===0&&(Lt(o),o.subtreeFlags&6&&(o.flags|=8192)):Lt(o),a=o.updateQueue,a!==null&&Dd(o,a.retryQueue),a=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),u=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(u=o.memoizedState.cachePool.pool),u!==a&&(o.flags|=2048),s!==null&&ne(aa),null;case 24:return a=null,s!==null&&(a=s.memoizedState.cache),o.memoizedState.cache!==a&&(o.flags|=2048),Yr(cn),Lt(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function b4(s,o){switch(ng(o),o.tag){case 1:return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 3:return Yr(cn),He(),s=o.flags,(s&65536)!==0&&(s&128)===0?(o.flags=s&-65537|128,o):null;case 26:case 27:case 5:return Ft(o),null;case 31:if(o.memoizedState!==null){if(Cs(o),o.alternate===null)throw Error(r(340));ra()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 13:if(Cs(o),s=o.memoizedState,s!==null&&s.dehydrated!==null){if(o.alternate===null)throw Error(r(340));ra()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 19:return ne(Jt),null;case 4:return He(),null;case 10:return Yr(o.type),null;case 22:case 23:return Cs(o),yg(),s!==null&&ne(aa),s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 24:return Yr(cn),null;case 25:return null;default:return null}}function Ax(s,o){switch(ng(o),o.tag){case 3:Yr(cn),He();break;case 26:case 27:case 5:Ft(o);break;case 4:He();break;case 31:o.memoizedState!==null&&Cs(o);break;case 13:Cs(o);break;case 19:ne(Jt);break;case 10:Yr(o.type);break;case 22:case 23:Cs(o),yg(),s!==null&&ne(aa);break;case 24:Yr(cn)}}function fu(s,o){try{var a=o.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var p=u.next;a=p;do{if((a.tag&s)===s){u=void 0;var m=a.create,w=a.inst;u=m(),w.destroy=u}a=a.next}while(a!==p)}}catch(T){xt(o,o.return,T)}}function ti(s,o,a){try{var u=o.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var m=p.next;u=m;do{if((u.tag&s)===s){var w=u.inst,T=w.destroy;if(T!==void 0){w.destroy=void 0,p=o;var L=a,X=T;try{X()}catch(ae){xt(p,L,ae)}}}u=u.next}while(u!==m)}}catch(ae){xt(o,o.return,ae)}}function Ix(s){var o=s.updateQueue;if(o!==null){var a=s.stateNode;try{vE(o,a)}catch(u){xt(s,s.return,u)}}}function Ox(s,o,a){a.props=da(s.type,s.memoizedProps),a.state=s.memoizedState;try{a.componentWillUnmount()}catch(u){xt(s,o,u)}}function du(s,o){try{var a=s.ref;if(a!==null){switch(s.tag){case 26:case 27:case 5:var u=s.stateNode;break;case 30:u=s.stateNode;break;default:u=s.stateNode}typeof a=="function"?s.refCleanup=a(u):a.current=u}}catch(p){xt(s,o,p)}}function Rr(s,o){var a=s.ref,u=s.refCleanup;if(a!==null)if(typeof u=="function")try{u()}catch(p){xt(s,o,p)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(p){xt(s,o,p)}else a.current=null}function Mx(s){var o=s.type,a=s.memoizedProps,u=s.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":a.autoFocus&&u.focus();break e;case"img":a.src?u.src=a.src:a.srcSet&&(u.srcset=a.srcSet)}}catch(p){xt(s,s.return,p)}}function Qg(s,o,a){try{var u=s.stateNode;U4(u,s.type,a,o),u[cs]=o}catch(p){xt(s,s.return,p)}}function Dx(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&ci(s.type)||s.tag===4}function Yg(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Dx(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&ci(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Xg(s,o,a){var u=s.tag;if(u===5||u===6)s=s.stateNode,o?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(s,o):(o=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,o.appendChild(s),a=a._reactRootContainer,a!=null||o.onclick!==null||(o.onclick=qr));else if(u!==4&&(u===27&&ci(s.type)&&(a=s.stateNode,o=null),s=s.child,s!==null))for(Xg(s,o,a),s=s.sibling;s!==null;)Xg(s,o,a),s=s.sibling}function kd(s,o,a){var u=s.tag;if(u===5||u===6)s=s.stateNode,o?a.insertBefore(s,o):a.appendChild(s);else if(u!==4&&(u===27&&ci(s.type)&&(a=s.stateNode),s=s.child,s!==null))for(kd(s,o,a),s=s.sibling;s!==null;)kd(s,o,a),s=s.sibling}function kx(s){var o=s.stateNode,a=s.memoizedProps;try{for(var u=s.type,p=o.attributes;p.length;)o.removeAttributeNode(p[0]);Bn(o,u,a),o[Pn]=s,o[cs]=a}catch(m){xt(s,s.return,m)}}var to=!1,fn=!1,Wg=!1,Px=typeof WeakSet=="function"?WeakSet:Set,Cn=null;function v4(s,o){if(s=s.containerInfo,vy=eh,s=Gw(s),qm(s)){if("selectionStart"in s)var a={start:s.selectionStart,end:s.selectionEnd};else e:{a=(a=s.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var p=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var w=0,T=-1,L=-1,X=0,ae=0,pe=s,J=null;t:for(;;){for(var re;pe!==a||p!==0&&pe.nodeType!==3||(T=w+p),pe!==m||u!==0&&pe.nodeType!==3||(L=w+u),pe.nodeType===3&&(w+=pe.nodeValue.length),(re=pe.firstChild)!==null;)J=pe,pe=re;for(;;){if(pe===s)break t;if(J===a&&++X===p&&(T=w),J===m&&++ae===u&&(L=w),(re=pe.nextSibling)!==null)break;pe=J,J=pe.parentNode}pe=re}a=T===-1||L===-1?null:{start:T,end:L}}else a=null}a=a||{start:0,end:0}}else a=null;for(Sy={focusedElem:s,selectionRange:a},eh=!1,Cn=o;Cn!==null;)if(o=Cn,s=o.child,(o.subtreeFlags&1028)!==0&&s!==null)s.return=o,Cn=s;else for(;Cn!==null;){switch(o=Cn,m=o.alternate,s=o.flags,o.tag){case 0:if((s&4)!==0&&(s=o.updateQueue,s=s!==null?s.events:null,s!==null))for(a=0;a title"))),Bn(m,u,a),m[Pn]=s,Rn(m),u=m;break e;case"link":var w=U1("link","href",p).get(u+(a.href||""));if(w){for(var T=0;TIt&&(w=It,It=Ue,Ue=w);var G=Vw(T,Ue),V=Vw(T,It);if(G&&V&&(re.rangeCount!==1||re.anchorNode!==G.node||re.anchorOffset!==G.offset||re.focusNode!==V.node||re.focusOffset!==V.offset)){var Y=pe.createRange();Y.setStart(G.node,G.offset),re.removeAllRanges(),Ue>It?(re.addRange(Y),re.extend(V.node,V.offset)):(Y.setEnd(V.node,V.offset),re.addRange(Y))}}}}for(pe=[],re=T;re=re.parentNode;)re.nodeType===1&&pe.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;Ta?32:a,q.T=null,a=oy,oy=null;var m=oi,w=io;if(Sn=0,Tc=oi=null,io=0,(St&6)!==0)throw Error(r(331));var T=St;if(St|=4,qx(m.current),Hx(m,m.current,w,a),St=T,bu(0,!1),qn&&typeof qn.onPostCommitFiberRoot=="function")try{qn.onPostCommitFiberRoot(jo,m)}catch{}return!0}finally{W.p=p,q.T=u,l1(s,o)}}function f1(s,o,a){o=qs(a,o),o=Bg(s.stateNode,o,2),s=Wo(s,o,2),s!==null&&(Xi(s,2),Cr(s))}function xt(s,o,a){if(s.tag===3)f1(s,s,a);else for(;o!==null;){if(o.tag===3){f1(o,s,a);break}else if(o.tag===1){var u=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ri===null||!ri.has(u))){s=qs(a,s),a=dx(2),u=Wo(o,a,2),u!==null&&(hx(a,u,o,s),Xi(u,2),Cr(u));break}}o=o.return}}function ly(s,o,a){var u=s.pingCache;if(u===null){u=s.pingCache=new w4;var p=new Set;u.set(o,p)}else p=u.get(o),p===void 0&&(p=new Set,u.set(o,p));p.has(a)||(ty=!0,p.add(a),s=T4.bind(null,s,o,a),o.then(s,s))}function T4(s,o,a){var u=s.pingCache;u!==null&&u.delete(o),s.pingedLanes|=s.suspendedLanes&a,s.warmLanes&=~a,Dt===s&&(at&a)===a&&(Xt===4||Xt===3&&(at&62914560)===at&&300>it()-zd?(St&2)===0&&Ac(s,0):ny|=a,Cc===at&&(Cc=0)),Cr(s)}function d1(s,o){o===0&&(o=Vf()),s=na(s,o),s!==null&&(Xi(s,o),Cr(s))}function A4(s){var o=s.memoizedState,a=0;o!==null&&(a=o.retryLane),d1(s,a)}function I4(s,o){var a=0;switch(s.tag){case 31:case 13:var u=s.stateNode,p=s.memoizedState;p!==null&&(a=p.retryLane);break;case 19:u=s.stateNode;break;case 22:u=s.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(o),d1(s,a)}function O4(s,o){return ut(s,o)}var Fd=null,Oc=null,uy=!1,Vd=!1,fy=!1,ai=0;function Cr(s){s!==Oc&&s.next===null&&(Oc===null?Fd=Oc=s:Oc=Oc.next=s),Vd=!0,uy||(uy=!0,D4())}function bu(s,o){if(!fy&&Vd){fy=!0;do for(var a=!1,u=Fd;u!==null;){if(s!==0){var p=u.pendingLanes;if(p===0)var m=0;else{var w=u.suspendedLanes,T=u.pingedLanes;m=(1<<31-Gn(42|s)+1)-1,m&=p&~(w&~T),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(a=!0,g1(u,m))}else m=at,m=Ho(u,u===Dt?m:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(m&3)===0||Fo(u,m)||(a=!0,g1(u,m));u=u.next}while(a);fy=!1}}function M4(){h1()}function h1(){Vd=uy=!1;var s=0;ai!==0&&H4()&&(s=ai);for(var o=it(),a=null,u=Fd;u!==null;){var p=u.next,m=p1(u,o);m===0?(u.next=null,a===null?Fd=p:a.next=p,p===null&&(Oc=a)):(a=u,(s!==0||(m&3)!==0)&&(Vd=!0)),u=p}Sn!==0&&Sn!==5||bu(s),ai!==0&&(ai=0)}function p1(s,o){for(var a=s.suspendedLanes,u=s.pingedLanes,p=s.expirationTimes,m=s.pendingLanes&-62914561;0T)break;var ae=L.transferSize,pe=L.initiatorType;ae&&x1(pe)&&(L=L.responseEnd,w+=ae*(L"u"?null:document;function z1(s,o,a){var u=Mc;if(u&&typeof o=="string"&&o){var p=Fs(o);p='link[rel="'+s+'"][href="'+p+'"]',typeof a=="string"&&(p+='[crossorigin="'+a+'"]'),N1.has(p)||(N1.add(p),s={rel:s,crossOrigin:a,href:o},u.querySelector(p)===null&&(o=u.createElement("link"),Bn(o,"link",s),Rn(o),u.head.appendChild(o)))}}function X4(s){ao.D(s),z1("dns-prefetch",s,null)}function W4(s,o){ao.C(s,o),z1("preconnect",s,o)}function J4(s,o,a){ao.L(s,o,a);var u=Mc;if(u&&s&&o){var p='link[rel="preload"][as="'+Fs(o)+'"]';o==="image"&&a&&a.imageSrcSet?(p+='[imagesrcset="'+Fs(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(p+='[imagesizes="'+Fs(a.imageSizes)+'"]')):p+='[href="'+Fs(s)+'"]';var m=p;switch(o){case"style":m=Dc(s);break;case"script":m=kc(s)}Xs.has(m)||(s=g({rel:"preload",href:o==="image"&&a&&a.imageSrcSet?void 0:s,as:o},a),Xs.set(m,s),u.querySelector(p)!==null||o==="style"&&u.querySelector(wu(m))||o==="script"&&u.querySelector(Eu(m))||(o=u.createElement("link"),Bn(o,"link",s),Rn(o),u.head.appendChild(o)))}}function eL(s,o){ao.m(s,o);var a=Mc;if(a&&s){var u=o&&typeof o.as=="string"?o.as:"script",p='link[rel="modulepreload"][as="'+Fs(u)+'"][href="'+Fs(s)+'"]',m=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=kc(s)}if(!Xs.has(m)&&(s=g({rel:"modulepreload",href:s},o),Xs.set(m,s),a.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Eu(m)))return}u=a.createElement("link"),Bn(u,"link",s),Rn(u),a.head.appendChild(u)}}}function tL(s,o,a){ao.S(s,o,a);var u=Mc;if(u&&s){var p=ec(u).hoistableStyles,m=Dc(s);o=o||"default";var w=p.get(m);if(!w){var T={loading:0,preload:null};if(w=u.querySelector(wu(m)))T.loading=5;else{s=g({rel:"stylesheet",href:s,"data-precedence":o},a),(a=Xs.get(m))&&Ty(s,a);var L=w=u.createElement("link");Rn(L),Bn(L,"link",s),L._p=new Promise(function(X,ae){L.onload=X,L.onerror=ae}),L.addEventListener("load",function(){T.loading|=1}),L.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Qd(w,o,u)}w={type:"stylesheet",instance:w,count:1,state:T},p.set(m,w)}}}function nL(s,o){ao.X(s,o);var a=Mc;if(a&&s){var u=ec(a).hoistableScripts,p=kc(s),m=u.get(p);m||(m=a.querySelector(Eu(p)),m||(s=g({src:s,async:!0},o),(o=Xs.get(p))&&Ay(s,o),m=a.createElement("script"),Rn(m),Bn(m,"link",s),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function sL(s,o){ao.M(s,o);var a=Mc;if(a&&s){var u=ec(a).hoistableScripts,p=kc(s),m=u.get(p);m||(m=a.querySelector(Eu(p)),m||(s=g({src:s,async:!0,type:"module"},o),(o=Xs.get(p))&&Ay(s,o),m=a.createElement("script"),Rn(m),Bn(m,"link",s),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},u.set(p,m))}}function L1(s,o,a,u){var p=(p=_e.current)?Zd(p):null;if(!p)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(o=Dc(a.href),a=ec(p).hoistableStyles,u=a.get(o),u||(u={type:"style",instance:null,count:0,state:null},a.set(o,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){s=Dc(a.href);var m=ec(p).hoistableStyles,w=m.get(s);if(w||(p=p.ownerDocument||p,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(s,w),(m=p.querySelector(wu(s)))&&!m._p&&(w.instance=m,w.state.loading=5),Xs.has(s)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Xs.set(s,a),m||rL(p,s,a,w.state))),o&&u===null)throw Error(r(528,""));return w}if(o&&u!==null)throw Error(r(529,""));return null;case"script":return o=a.async,a=a.src,typeof a=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=kc(a),a=ec(p).hoistableScripts,u=a.get(o),u||(u={type:"script",instance:null,count:0,state:null},a.set(o,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function Dc(s){return'href="'+Fs(s)+'"'}function wu(s){return'link[rel="stylesheet"]['+s+"]"}function B1(s){return g({},s,{"data-precedence":s.precedence,precedence:null})}function rL(s,o,a,u){s.querySelector('link[rel="preload"][as="style"]['+o+"]")?u.loading=1:(o=s.createElement("link"),u.preload=o,o.addEventListener("load",function(){return u.loading|=1}),o.addEventListener("error",function(){return u.loading|=2}),Bn(o,"link",a),Rn(o),s.head.appendChild(o))}function kc(s){return'[src="'+Fs(s)+'"]'}function Eu(s){return"script[async]"+s}function $1(s,o,a){if(o.count++,o.instance===null)switch(o.type){case"style":var u=s.querySelector('style[data-href~="'+Fs(a.href)+'"]');if(u)return o.instance=u,Rn(u),u;var p=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(s.ownerDocument||s).createElement("style"),Rn(u),Bn(u,"style",p),Qd(u,a.precedence,s),o.instance=u;case"stylesheet":p=Dc(a.href);var m=s.querySelector(wu(p));if(m)return o.state.loading|=4,o.instance=m,Rn(m),m;u=B1(a),(p=Xs.get(p))&&Ty(u,p),m=(s.ownerDocument||s).createElement("link"),Rn(m);var w=m;return w._p=new Promise(function(T,L){w.onload=T,w.onerror=L}),Bn(m,"link",u),o.state.loading|=4,Qd(m,a.precedence,s),o.instance=m;case"script":return m=kc(a.src),(p=s.querySelector(Eu(m)))?(o.instance=p,Rn(p),p):(u=a,(p=Xs.get(m))&&(u=g({},a),Ay(u,p)),s=s.ownerDocument||s,p=s.createElement("script"),Rn(p),Bn(p,"link",u),s.head.appendChild(p),o.instance=p);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(u=o.instance,o.state.loading|=4,Qd(u,a.precedence,s));return o.instance}function Qd(s,o,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,m=p,w=0;w title"):null)}function oL(s,o,a){if(a===1||o.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(s=o.disabled,typeof o.precedence=="string"&&s==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function H1(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function iL(s,o,a,u){if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var p=Dc(u.href),m=o.querySelector(wu(p));if(m){o=m._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(s.count++,s=Xd.bind(s),o.then(s,s)),a.state.loading|=4,a.instance=m,Rn(m);return}m=o.ownerDocument||o,u=B1(u),(p=Xs.get(p))&&Ty(u,p),m=m.createElement("link"),Rn(m);var w=m;w._p=new Promise(function(T,L){w.onload=T,w.onerror=L}),Bn(m,"link",u),a.instance=m}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(a,o),(o=a.state.preload)&&(a.state.loading&3)===0&&(s.count++,a=Xd.bind(s),o.addEventListener("load",a),o.addEventListener("error",a))}}var Iy=0;function aL(s,o){return s.stylesheets&&s.count===0&&Jd(s,s.stylesheets),0Iy?50:800)+o);return s.unsuspend=a,function(){s.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Xd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Jd(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Wd=null;function Jd(s,o){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Wd=new Map,o.forEach(cL,s),Wd=null,Xd.call(s))}function cL(s,o){if(!(o.state.loading&4)){var a=Wd.get(s);if(a)var u=a.get(null);else{a=new Map,Wd.set(s,a);for(var p=s.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),e0.exports=Z6(),e0.exports}var Y6=Q6();const X6=hI(Y6);var s0={exports:{}},r0={};var HR;function W6(){if(HR)return r0;HR=1;var e=cl().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return r0.c=function(t){return e.H.useMemoCache(t)},r0}var FR;function J6(){return FR||(FR=1,s0.exports=W6()),s0.exports}var Ct=J6();const GI=I.createContext(void 0);function e$(e,t){try{const n=localStorage.getItem(e);if(n==="light"||n==="dark"||n==="system")return n}catch{}return t}function t$(e){const t=Ct.c(14),{children:n,defaultTheme:r,storageKey:i}=e,c=r===void 0?"system":r,l=i===void 0?"ui-theme":i;let f;t[0]!==c||t[1]!==l?(f=()=>e$(l,c),t[0]=c,t[1]=l,t[2]=f):f=t[2];const[d,h]=I.useState(f);let y,g;t[3]!==d?(y=()=>{const R=window.document.documentElement;if(R.classList.remove("light","dark"),d==="system"){const C=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";R.classList.add(C);return}R.classList.add(d)},g=[d],t[3]=d,t[4]=y,t[5]=g):(y=t[4],g=t[5]),I.useEffect(y,g);let b;t[6]!==l?(b=R=>{try{localStorage.setItem(l,R)}catch{}h(R)},t[6]=l,t[7]=b):b=t[7];let v;t[8]!==b||t[9]!==d?(v={theme:d,setTheme:b},t[8]=b,t[9]=d,t[10]=v):v=t[10];const _=v;let x;return t[11]!==n||t[12]!==_?(x=U.jsx(GI.Provider,{value:_,children:n}),t[11]=n,t[12]=_,t[13]=x):x=t[13],x}function n$(){const e=I.useContext(GI);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}function db(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const qu={};function Dp(e,t,n,r,i){let c={...hb(e,qu)};return t&&(c=Uu(c,t)),n&&(c=Uu(c,n)),r&&(c=Uu(c,r)),i&&(c=Uu(c,i)),c}function s$(e){if(e.length===0)return qu;if(e.length===1)return hb(e[0],qu);let t={...hb(e[0],qu)};for(let n=1;n=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function KI(e){return typeof e=="function"}function hb(e,t){return KI(e)?e(t):e??qu}function i$(e,t){return t?e?n=>{if(a$(n)){const i=n;pb(i);const c=t(i);return i.baseUIHandlerPrevented||e?.(i),c}const r=t(n);return e?.(n),r}:t:e}function pb(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function ZI(e,t){return t?e?t+" "+e:t:e}function a$(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function wo(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const VR={};function Lr(e,t){const n=I.useRef(VR);return n.current===VR&&(n.current=e(t)),n}function Yh(e,t,n,r){const i=Lr(QI).current;return l$(i,e,t,n,r)&&YI(i,[e,t,n,r]),i.callback}function c$(e){const t=Lr(QI).current;return u$(t,e)&&YI(t,e),t.callback}function QI(){return{callback:null,cleanup:null,refs:[]}}function l$(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function u$(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function YI(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i{for(let i=0;i=e}function qR(e){if(!I.isValidElement(e))return null;const t=e,n=t.props;return(ov(19)?n?.ref:t.ref)??null}function d$(e,t){const n={};for(const r in e){const i=e[r];if(t?.hasOwnProperty(r)){const c=t[r](i);c!=null&&Object.assign(n,c);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function h$(e,t){return typeof e=="function"?e(t):e}function p$(e,t){return typeof e=="function"?e(t):e}function XI(){}const Z0e=Object.freeze([]),Ds=Object.freeze({}),m$={style:{transition:"none"}},g$="data-base-ui-click-trigger",Q0e={fallbackAxisSide:"none"},y$={fallbackAxisSide:"end"},b$={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function cr(e,t,n={}){const r=t.render,i=v$(t,n);if(n.enabled===!1)return null;const c=n.state??Ds;return S$(e,r,i,c)}function v$(e,t={}){const{className:n,style:r,render:i}=e,{state:c=Ds,ref:l,props:f,stateAttributesMapping:d,enabled:h=!0}=t,y=h?h$(n,c):void 0,g=h?p$(r,c):void 0,b=h?d$(c,d):Ds,v=h?db(b,Array.isArray(f)?s$(f):f)??Ds:Ds;return typeof document<"u"&&(h?Array.isArray(l)?v.ref=c$([v.ref,qR(i),...l]):v.ref=Yh(v.ref,qR(i),l):Yh(null,null)),h?(y!==void 0&&(v.className=ZI(v.className,y)),g!==void 0&&(v.style=db(v.style,g)),v):Ds}function S$(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=Dp(n,t.props);return i.ref=n.ref,I.cloneElement(t,i)}if(e&&typeof e=="string")return _$(e,n);throw new Error(wo(8))}function _$(e,t){return e==="button"?I.createElement("button",{type:"button",...t,key:t.key}):e==="img"?I.createElement("img",{alt:"",...t,key:t.key}):I.createElement(e,t)}function WI(e){return cr(e.defaultTagName??"div",e,e)}function JI(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,KR=e2,t2=(e,t)=>n=>{var r;if(t?.variants==null)return KR(e,n?.class,n?.className);const{variants:i,defaultVariants:c}=t,l=Object.keys(i).map(h=>{const y=n?.[h],g=c?.[h];if(y===null)return null;const b=GR(y)||GR(g);return i[h][b]}),f=n&&Object.entries(n).reduce((h,y)=>{let[g,b]=y;return b===void 0||(h[g]=b),h},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,y)=>{let{class:g,className:b,...v}=y;return Object.entries(v).every(_=>{let[x,R]=_;return Array.isArray(R)?R.includes({...c,...f}[x]):{...c,...f}[x]===R})?[...h,g,b]:h},[]);return KR(e,l,d,n?.class,n?.className)};const n2=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const w$=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const E$=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const ZR=e=>{const t=E$(e);return t.charAt(0).toUpperCase()+t.slice(1)};var x$={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"};const R$=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const C$=I.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:c,iconNode:l,...f},d)=>I.createElement("svg",{ref:d,...x$,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:n2("lucide",i),...!c&&!R$(f)&&{"aria-hidden":"true"},...f},[...l.map(([h,y])=>I.createElement(h,y)),...Array.isArray(c)?c:[c]]));const wr=(e,t)=>{const n=I.forwardRef(({className:r,...i},c)=>I.createElement(C$,{ref:c,iconNode:t,className:n2(`lucide-${w$(ZR(e))}`,`lucide-${e}`,r),...i}));return n.displayName=ZR(e),n};const T$=[["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"}]],A$=wr("circle-alert",T$);const I$=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],O$=wr("hard-drive",I$);const M$=[["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"}]],D$=wr("house",M$);const k$=[["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"}]],P$=wr("image",k$);const N$=[["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"}]],z$=wr("key",N$);const L$=[["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"}]],B$=wr("log-out",L$);const $$=[["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"}]],U$=wr("moon",$$);const j$=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],H$=wr("panel-left",j$);const F$=[["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"}]],QR=wr("server",F$);const V$=[["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"}]],q$=wr("sun",V$);const G$=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],K$=wr("x",G$);function kp(){return typeof window<"u"}function Pi(e){return iv(e)?(e.nodeName||"").toLowerCase():"#document"}function gn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Br(e){var t;return(t=(iv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function iv(e){return kp()?e instanceof Node||e instanceof gn(e).Node:!1}function _t(e){return kp()?e instanceof Element||e instanceof gn(e).Element:!1}function xn(e){return kp()?e instanceof HTMLElement||e instanceof gn(e).HTMLElement:!1}function mb(e){return!kp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gn(e).ShadowRoot}const Z$=new Set(["inline","contents"]);function La(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=zs(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Z$.has(i)}const Q$=new Set(["table","td","th"]);function Y$(e){return Q$.has(Pi(e))}const X$=[":popover-open",":modal"];function Pp(e){return X$.some(t=>{try{return e.matches(t)}catch{return!1}})}const W$=["transform","translate","scale","rotate","perspective"],J$=["transform","translate","scale","rotate","perspective","filter"],eU=["paint","layout","strict","content"];function av(e){const t=Np(),n=_t(e)?zs(e):e;return W$.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||J$.some(r=>(n.willChange||"").includes(r))||eU.some(r=>(n.contain||"").includes(r))}function tU(e){let t=bo(e);for(;xn(t)&&!go(t);){if(av(t))return t;if(Pp(t))return null;t=bo(t)}return null}function Np(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const nU=new Set(["html","body","#document"]);function go(e){return nU.has(Pi(e))}function zs(e){return gn(e).getComputedStyle(e)}function zp(e){return _t(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bo(e){if(Pi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mb(e)&&e.host||Br(e);return mb(t)?t.host:t}function s2(e){const t=bo(e);return go(t)?e.ownerDocument?e.ownerDocument.body:e.body:xn(t)&&La(t)?t:s2(t)}function Ti(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=s2(e),c=i===((r=e.ownerDocument)==null?void 0:r.body),l=gn(i);if(c){const f=gb(l);return t.concat(l,l.visualViewport||[],La(i)?i:[],f&&n?Ti(f):[])}return t.concat(i,Ti(i,[],n))}function gb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const o0=Kb[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],sU=o0&&o0!==I.useLayoutEffect?o0:e=>e();function Ze(e){const t=Lr(rU).current;return t.next=e,sU(t.effect),t.trampoline}function rU(){const e={next:void 0,callback:oU,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function oU(){}const iU=()=>{},mt=typeof document<"u"?I.useLayoutEffect:iU,aU=I.createContext(void 0);function cU(e=!1){const t=I.useContext(aU);if(t===void 0&&!e)throw new Error(wo(16));return t}function lU(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:c}=e,l=r&&t!==!1,f=r&&t===!1;return{props:I.useMemo(()=>{const h={onKeyDown(y){n&&t&&y.key!=="Tab"&&y.preventDefault()}};return r||(h.tabIndex=i,!c&&n&&(h.tabIndex=t?i:-1)),(c&&(t||l)||!c&&n)&&(h["aria-disabled"]=n),c&&(!t||f)&&(h.disabled=n),h},[r,n,t,l,f,c,i])}}function r2(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,c=I.useRef(null),l=cU(!0)!==void 0,f=Ze(()=>{const b=c.current;return!!(b?.tagName==="A"&&b?.href)}),{props:d}=lU({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:i}),h=I.useCallback(()=>{const b=c.current;uU(b)&&l&&t&&d.disabled===void 0&&b.disabled&&(b.disabled=!1)},[t,d.disabled,l]);mt(h,[h]);const y=I.useCallback((b={})=>{const{onClick:v,onMouseDown:_,onKeyUp:x,onKeyDown:R,onPointerDown:C,...A}=b;return Dp({type:i?"button":void 0,onClick(D){if(t){D.preventDefault();return}v?.(D)},onMouseDown(D){t||_?.(D)},onKeyDown(D){if(t||(pb(D),R?.(D)),D.baseUIHandlerPrevented)return;const N=D.target===D.currentTarget&&!i&&!f()&&!t,j=D.key==="Enter",$=D.key===" ";N&&(($||j)&&D.preventDefault(),j&&v?.(D))},onKeyUp(D){t||(pb(D),x?.(D)),!D.baseUIHandlerPrevented&&D.target===D.currentTarget&&!i&&!t&&D.key===" "&&v?.(D)},onPointerDown(D){if(t){D.preventDefault();return}C?.(D)}},i?void 0:{role:"button"},d,A)},[t,d,i,f]),g=Ze(b=>{c.current=b,h()});return{getButtonProps:y,buttonRef:g}}function uU(e){return xn(e)&&e.tagName==="BUTTON"}const fU=I.forwardRef(function(t,n){const{render:r,className:i,disabled:c=!1,focusableWhenDisabled:l=!1,nativeButton:f=!0,...d}=t,{getButtonProps:h,buttonRef:y}=r2({disabled:c,focusableWhenDisabled:l,native:f}),g=I.useMemo(()=>({disabled:c}),[c]);return cr("button",t,{state:g,ref:[n,y],props:[d,h]})}),dU=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r({classGroupId:e,validator:t}),o2=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Xh="-",YR=[],pU="arbitrary..",mU=e=>{const t=yU(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return gU(l);const f=l.split(Xh),d=f[0]===""&&f.length>1?1:0;return i2(f,d,t)},getConflictingClassGroupIds:(l,f)=>{if(f){const d=r[l],h=n[l];return d?h?dU(h,d):d:h||YR}return n[l]||YR}}},i2=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],c=n.nextPart.get(i);if(c){const h=i2(e,t+1,c);if(h)return h}const l=n.validators;if(l===null)return;const f=t===0?e.join(Xh):e.slice(t).join(Xh),d=l.length;for(let h=0;he.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?pU+r:void 0})(),yU=e=>{const{theme:t,classGroups:n}=e;return bU(n,t)},bU=(e,t)=>{const n=o2();for(const r in e){const i=e[r];cv(i,n,r,t)}return n},cv=(e,t,n,r)=>{const i=e.length;for(let c=0;c{if(typeof e=="string"){SU(e,t,n);return}if(typeof e=="function"){_U(e,t,n,r);return}wU(e,t,n,r)},SU=(e,t,n)=>{const r=e===""?t:a2(t,e);r.classGroupId=n},_U=(e,t,n,r)=>{if(EU(e)){cv(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(hU(n,e))},wU=(e,t,n,r)=>{const i=Object.entries(e),c=i.length;for(let l=0;l{let n=e;const r=t.split(Xh),i=r.length;for(let c=0;c"isThemeGetter"in e&&e.isThemeGetter===!0,xU=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(c,l)=>{n[c]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(c){let l=n[c];if(l!==void 0)return l;if((l=r[c])!==void 0)return i(c,l),l},set(c,l){c in n?n[c]=l:i(c,l)}}},yb="!",XR=":",RU=[],WR=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),CU=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const c=[];let l=0,f=0,d=0,h;const y=i.length;for(let x=0;xd?h-d:void 0;return WR(c,v,b,_)};if(t){const i=t+XR,c=r;r=l=>l.startsWith(i)?c(l.slice(i.length)):WR(RU,!1,l,void 0,!0)}if(n){const i=r;r=c=>n({className:c,parseClassName:i})}return r},TU=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let c=0;c0&&(i.sort(),r.push(...i),i=[]),r.push(l)):i.push(l)}return i.length>0&&(i.sort(),r.push(...i)),r}},AU=e=>({cache:xU(e.cacheSize),parseClassName:CU(e),sortModifiers:TU(e),...mU(e)}),IU=/\s+/,OU=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:c}=t,l=[],f=e.trim().split(IU);let d="";for(let h=f.length-1;h>=0;h-=1){const y=f[h],{isExternal:g,modifiers:b,hasImportantModifier:v,baseClassName:_,maybePostfixModifierPosition:x}=n(y);if(g){d=y+(d.length>0?" "+d:d);continue}let R=!!x,C=r(R?_.substring(0,x):_);if(!C){if(!R){d=y+(d.length>0?" "+d:d);continue}if(C=r(_),!C){d=y+(d.length>0?" "+d:d);continue}R=!1}const A=b.length===0?"":b.length===1?b[0]:c(b).join(":"),O=v?A+yb:A,D=O+C;if(l.indexOf(D)>-1)continue;l.push(D);const N=i(C,R);for(let j=0;j0?" "+d:d)}return d},MU=(...e)=>{let t=0,n,r,i="";for(;t{if(typeof e=="string")return e;let t,n="";for(let r=0;r{let n,r,i,c;const l=d=>{const h=t.reduce((y,g)=>g(y),e());return n=AU(h),r=n.cache.get,i=n.cache.set,c=f,f(d)},f=d=>{const h=r(d);if(h)return h;const y=OU(d,n);return i(d,y),y};return c=l,(...d)=>c(MU(...d))},kU=[],_n=e=>{const t=n=>n[e]||kU;return t.isThemeGetter=!0,t},l2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,u2=/^\((?:(\w[\w-]*):)?(.+)\)$/i,PU=/^\d+\/\d+$/,NU=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zU=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,LU=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,BU=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$U=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Nc=e=>PU.test(e),tt=e=>!!e&&!Number.isNaN(Number(e)),pi=e=>!!e&&Number.isInteger(Number(e)),i0=e=>e.endsWith("%")&&tt(e.slice(0,-1)),co=e=>NU.test(e),UU=()=>!0,jU=e=>zU.test(e)&&!LU.test(e),f2=()=>!1,HU=e=>BU.test(e),FU=e=>$U.test(e),VU=e=>!Me(e)&&!De(e),qU=e=>ll(e,p2,f2),Me=e=>l2.test(e),ma=e=>ll(e,m2,jU),a0=e=>ll(e,YU,tt),JR=e=>ll(e,d2,f2),GU=e=>ll(e,h2,FU),fh=e=>ll(e,g2,HU),De=e=>u2.test(e),Pu=e=>ul(e,m2),KU=e=>ul(e,XU),eC=e=>ul(e,d2),ZU=e=>ul(e,p2),QU=e=>ul(e,h2),dh=e=>ul(e,g2,!0),ll=(e,t,n)=>{const r=l2.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ul=(e,t,n=!1)=>{const r=u2.exec(e);return r?r[1]?t(r[1]):n:!1},d2=e=>e==="position"||e==="percentage",h2=e=>e==="image"||e==="url",p2=e=>e==="length"||e==="size"||e==="bg-size",m2=e=>e==="length",YU=e=>e==="number",XU=e=>e==="family-name",g2=e=>e==="shadow",WU=()=>{const e=_n("color"),t=_n("font"),n=_n("text"),r=_n("font-weight"),i=_n("tracking"),c=_n("leading"),l=_n("breakpoint"),f=_n("container"),d=_n("spacing"),h=_n("radius"),y=_n("shadow"),g=_n("inset-shadow"),b=_n("text-shadow"),v=_n("drop-shadow"),_=_n("blur"),x=_n("perspective"),R=_n("aspect"),C=_n("ease"),A=_n("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...D(),De,Me],j=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],k=()=>[De,Me,d],Z=()=>[Nc,"full","auto",...k()],se=()=>[pi,"none","subgrid",De,Me],le=()=>["auto",{span:["full",pi,De,Me]},pi,De,Me],K=()=>[pi,"auto",De,Me],Q=()=>["auto","min","max","fr",De,Me],ye=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],fe=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...k()],W=()=>[Nc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],F=()=>[e,De,Me],be=()=>[...D(),eC,JR,{position:[De,Me]}],Te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",ZU,qU,{size:[De,Me]}],ne=()=>[i0,Pu,ma],ie=()=>["","none","full",h,De,Me],de=()=>["",tt,Pu,ma],Ce=()=>["solid","dashed","dotted","double"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ve=()=>[tt,i0,eC,JR],Ye=()=>["","none",_,De,Me],He=()=>["none",tt,De,Me],ht=()=>["none",tt,De,Me],Ft=()=>[tt,De,Me],oe=()=>[Nc,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[co],breakpoint:[co],color:[UU],container:[co],"drop-shadow":[co],ease:["in","out","in-out"],font:[VU],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[co],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[co],shadow:[co],spacing:["px",tt],text:[co],"text-shadow":[co],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Nc,Me,De,R]}],container:["container"],columns:[{columns:[tt,Me,De,f]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{start:Z()}],end:[{end:Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[pi,"auto",De,Me]}],basis:[{basis:[Nc,"full","auto",f,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[tt,Nc,"auto","initial","none",Me]}],grow:[{grow:["",tt,De,Me]}],shrink:[{shrink:["",tt,De,Me]}],order:[{order:[pi,"first","last","none",De,Me]}],"grid-cols":[{"grid-cols":se()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":se()}],"row-start-end":[{row:le()}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...ye(),"normal"]}],"justify-items":[{"justify-items":[...fe(),"normal"]}],"justify-self":[{"justify-self":["auto",...fe()]}],"align-content":[{content:["normal",...ye()]}],"align-items":[{items:[...fe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...fe(),{baseline:["","last"]}]}],"place-content":[{"place-content":ye()}],"place-items":[{"place-items":[...fe(),"baseline"]}],"place-self":[{"place-self":["auto",...fe()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[f,"screen",...W()]}],"min-w":[{"min-w":[f,"screen","none",...W()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[l]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",n,Pu,ma]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,De,a0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",i0,Me]}],"font-family":[{font:[KU,Me,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,De,Me]}],"line-clamp":[{"line-clamp":[tt,"none",De,a0]}],leading:[{leading:[c,...k()]}],"list-image":[{"list-image":["none",De,Me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",De,Me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[tt,"from-font","auto",De,ma]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[tt,"auto",De,Me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",De,Me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",De,Me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:be()}],"bg-repeat":[{bg:Te()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pi,De,Me],radial:["",De,Me],conic:[pi,De,Me]},QU,GU]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ce(),"hidden","none"]}],"divide-style":[{divide:[...Ce(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...Ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[tt,De,Me]}],"outline-w":[{outline:["",tt,Pu,ma]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",y,dh,fh]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",g,dh,fh]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[tt,ma]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",b,dh,fh]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[tt,De,Me]}],"mix-blend":[{"mix-blend":[..._e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_e()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[tt]}],"mask-image-linear-from-pos":[{"mask-linear-from":ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":ve()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":ve()}],"mask-image-t-to-pos":[{"mask-t-to":ve()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":ve()}],"mask-image-r-to-pos":[{"mask-r-to":ve()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":ve()}],"mask-image-b-to-pos":[{"mask-b-to":ve()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":ve()}],"mask-image-l-to-pos":[{"mask-l-to":ve()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":ve()}],"mask-image-x-to-pos":[{"mask-x-to":ve()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":ve()}],"mask-image-y-to-pos":[{"mask-y-to":ve()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[De,Me]}],"mask-image-radial-from-pos":[{"mask-radial-from":ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":ve()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[tt]}],"mask-image-conic-from-pos":[{"mask-conic-from":ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":ve()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:be()}],"mask-repeat":[{mask:Te()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",De,Me]}],filter:[{filter:["","none",De,Me]}],blur:[{blur:Ye()}],brightness:[{brightness:[tt,De,Me]}],contrast:[{contrast:[tt,De,Me]}],"drop-shadow":[{"drop-shadow":["","none",v,dh,fh]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",tt,De,Me]}],"hue-rotate":[{"hue-rotate":[tt,De,Me]}],invert:[{invert:["",tt,De,Me]}],saturate:[{saturate:[tt,De,Me]}],sepia:[{sepia:["",tt,De,Me]}],"backdrop-filter":[{"backdrop-filter":["","none",De,Me]}],"backdrop-blur":[{"backdrop-blur":Ye()}],"backdrop-brightness":[{"backdrop-brightness":[tt,De,Me]}],"backdrop-contrast":[{"backdrop-contrast":[tt,De,Me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",tt,De,Me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[tt,De,Me]}],"backdrop-invert":[{"backdrop-invert":["",tt,De,Me]}],"backdrop-opacity":[{"backdrop-opacity":[tt,De,Me]}],"backdrop-saturate":[{"backdrop-saturate":[tt,De,Me]}],"backdrop-sepia":[{"backdrop-sepia":["",tt,De,Me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",De,Me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[tt,"initial",De,Me]}],ease:[{ease:["linear","initial",C,De,Me]}],delay:[{delay:[tt,De,Me]}],animate:[{animate:["none",A,De,Me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,De,Me]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:He()}],"rotate-x":[{"rotate-x":He()}],"rotate-y":[{"rotate-y":He()}],"rotate-z":[{"rotate-z":He()}],scale:[{scale:ht()}],"scale-x":[{"scale-x":ht()}],"scale-y":[{"scale-y":ht()}],"scale-z":[{"scale-z":ht()}],"scale-3d":["scale-3d"],skew:[{skew:Ft()}],"skew-x":[{"skew-x":Ft()}],"skew-y":[{"skew-y":Ft()}],transform:[{transform:[De,Me,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:oe()}],"translate-x":[{"translate-x":oe()}],"translate-y":[{"translate-y":oe()}],"translate-z":[{"translate-z":oe()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",De,Me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",De,Me]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[tt,Pu,ma,a0]}],stroke:[{stroke:["none",...F()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},JU=DU(WU);function nn(...e){return JU(e2(e))}function Y0e(e){return e?new Date(e).toLocaleString(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"Unknown"}function X0e(e){if(e===0)return"0 B";const t=["B","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(1024));return`${(e/1024**n).toFixed(2)} ${t[n]}`}const e5=/\/$/;function W0e(e){return e.replace(e5,"")}function t5(e){return e&&(e.endsWith("/")?e:`${e}/`)}function n5(e,t){return e.startsWith(t)?e:`${t}${e}`}function J0e(e,t){return e.startsWith(t)?e.slice(t.length):e}const s5=t2("group/button inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap rounded-md border border-transparent bg-clip-padding font-medium text-xs/relaxed outline-none transition-all focus-visible:border-ring focus-visible:ring-[2px] focus-visible:ring-ring/30 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-input/30",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",sm:"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",icon:"size-7 [&_svg:not([class*='size-'])]:size-3.5","icon-xs":"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5","icon-sm":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-lg":"size-8 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default"}});function tl(e){const t=Ct.c(12);let n,r,i,c;t[0]!==e?({className:n,variant:i,size:c,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c):(n=t[1],r=t[2],i=t[3],c=t[4]);const l=i===void 0?"default":i,f=c===void 0?"default":c;let d;t[5]!==n||t[6]!==f||t[7]!==l?(d=nn(s5({variant:l,size:f,className:n})),t[5]=n,t[6]=f,t[7]=l,t[8]=d):d=t[8];let h;return t[9]!==r||t[10]!==d?(h=U.jsx(fU,{className:d,"data-slot":"button",...r}),t[9]=r,t[10]=d,t[11]=h):h=t[11],h}const r5={...Kb};let tC=0;function o5(e,t="mui"){const[n,r]=I.useState(e),i=e||n;return I.useEffect(()=>{n==null&&(tC+=1,r(`${t}-${tC}`))},[n,t]),i}const nC=r5.useId;function _f(e,t){if(nC!==void 0){const n=nC();return e??(t?`${t}-${n}`:n)}return o5(e,t)}function lv(e){return _f(e,"base-ui")}const i5=[];function y2(e){I.useEffect(e,i5)}const Nu=0;class Ii{static create(){return new Ii}currentId=Nu;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Nu,n()},t)}isStarted(){return this.currentId!==Nu}clear=()=>{this.currentId!==Nu&&(clearTimeout(this.currentId),this.currentId=Nu)};disposeEffect=()=>this.clear}function Oi(){const e=Lr(Ii.create).current;return y2(e.disposeEffect),e}function Ba(e){return e?.ownerDocument||document}const fl=typeof navigator<"u",c0=l5(),b2=f5(),v2=u5(),a5=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),S2=c0.platform==="MacIntel"&&c0.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(c0.platform),_2=fl&&/apple/i.test(navigator.vendor),bb=fl&&/android/i.test(b2)||/android/i.test(v2),c5=fl&&b2.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,w2=v2.includes("jsdom/");function l5(){if(!fl)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function u5(){if(!fl)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function f5(){if(!fl)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const vb="data-base-ui-focusable",E2="active",x2="selected",R2="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",ebe="ArrowLeft",tbe="ArrowRight",nbe="ArrowUp",sbe="ArrowDown";function Si(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function vt(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&mb(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function is(e){return"composedPath"in e?e.composedPath()[0]:e.target}function br(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function d5(e){return e.matches("html,body")}function En(e){return e?.ownerDocument||document}function C2(e){return xn(e)&&e.matches(R2)}function sC(e){return e?e.getAttribute("role")==="combobox"&&C2(e):!1}function h5(e){if(!e||w2)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Sb(e){return e?e.hasAttribute(vb)?e:e.querySelector(`[${vb}]`)||e:null}function Ca(e,t,n=!0){return e.filter(i=>i.parentId===t&&(!n||i.context?.open)).flatMap(i=>[i,...Ca(e,i.id,n)])}function rC(e,t){let n=[],r=e.find(i=>i.id===t)?.parentId;for(;r;){const i=e.find(c=>c.id===r);r=i?.parentId,i&&(n=n.concat(i))}return n}function p5(e){e.preventDefault(),e.stopPropagation()}function m5(e){return"nativeEvent"in e}function g5(e){return e.mozInputSource===0&&e.isTrusted?!0:bb&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function y5(e){return w2?!1:!bb&&e.width===0&&e.height===0||bb&&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 of(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function b5(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const v5=["top","right","bottom","left"],nl=Math.min,Ms=Math.max,Wh=Math.round,hh=Math.floor,kr=e=>({x:e,y:e}),S5={left:"right",right:"left",bottom:"top",top:"bottom"},_5={start:"end",end:"start"};function _b(e,t,n){return Ms(e,nl(t,n))}function vo(e,t){return typeof e=="function"?e(t):e}function ys(e){return e.split("-")[0]}function Ni(e){return e.split("-")[1]}function uv(e){return e==="x"?"y":"x"}function fv(e){return e==="y"?"height":"width"}const w5=new Set(["top","bottom"]);function ar(e){return w5.has(ys(e))?"y":"x"}function dv(e){return uv(ar(e))}function E5(e,t,n){n===void 0&&(n=!1);const r=Ni(e),i=dv(e),c=fv(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(l=Jh(l)),[l,Jh(l)]}function x5(e){const t=Jh(e);return[wb(e),t,wb(t)]}function wb(e){return e.replace(/start|end/g,t=>_5[t])}const oC=["left","right"],iC=["right","left"],R5=["top","bottom"],C5=["bottom","top"];function T5(e,t,n){switch(e){case"top":case"bottom":return n?t?iC:oC:t?oC:iC;case"left":case"right":return t?R5:C5;default:return[]}}function A5(e,t,n,r){const i=Ni(e);let c=T5(ys(e),n==="start",r);return i&&(c=c.map(l=>l+"-"+i),t&&(c=c.concat(c.map(wb)))),c}function Jh(e){return e.replace(/left|right|bottom|top/g,t=>S5[t])}function I5(e){return{top:0,right:0,bottom:0,left:0,...e}}function T2(e){return typeof e!="number"?I5(e):{top:e,right:e,bottom:e,left:e}}function ep(e){const{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}}var O5=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],tp=O5.join(","),A2=typeof Element>"u",sl=A2?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,np=!A2&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},sp=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),c=i===""||i==="true",l=c||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):sp(t.parentNode));return l},M5=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},I2=function(t,n,r){if(sp(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(tp));return n&&sl.call(t,tp)&&i.unshift(t),i=i.filter(r),i},rp=function(t,n,r){for(var i=[],c=Array.from(t);c.length;){var l=c.shift();if(!sp(l,!1))if(l.tagName==="SLOT"){var f=l.assignedElements(),d=f.length?f:l.children,h=rp(d,!0,r);r.flatten?i.push.apply(i,h):i.push({scopeParent:l,candidates:h})}else{var y=sl.call(l,tp);y&&r.filter(l)&&(n||!t.includes(l))&&i.push(l);var g=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),b=!sp(g,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(g&&b){var v=rp(g===!0?l.children:g.children,!0,r);r.flatten?i.push.apply(i,v):i.push({scopeParent:l,candidates:v})}else c.unshift.apply(c,l.children)}}return i},O2=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},M2=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||M5(t))&&!O2(t)?0:t.tabIndex},D5=function(t,n){var r=M2(t);return r<0&&n&&!O2(t)?0:r},k5=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},D2=function(t){return t.tagName==="INPUT"},P5=function(t){return D2(t)&&t.type==="hidden"},N5=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},z5=function(t,n){for(var r=0;rsummary:first-of-type"),f=l?t.parentElement:t;if(sl.call(f,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var d=t;t;){var h=t.parentElement,y=np(t);if(h&&!h.shadowRoot&&i(h)===!0)return aC(t);t.assignedSlot?t=t.assignedSlot:!h&&y!==t.ownerDocument?t=y.host:t=h}t=d}if(U5(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return aC(t);return!1},H5=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r=0)},k2=function(t){var n=[],r=[];return t.forEach(function(i,c){var l=!!i.scopeParent,f=l?i.scopeParent:i,d=D5(f,l),h=l?k2(i.candidates):f;d===0?l?n.push.apply(n,h):n.push(f):r.push({documentOrder:c,tabIndex:d,item:i,isScope:l,content:h})}),r.sort(k5).reduce(function(i,c){return c.isScope?i.push.apply(i,c.content):i.push(c.content),i},[]).concat(n)},Lp=function(t,n){n=n||{};var r;return n.getShadowRoot?r=rp([t],n.includeContainer,{filter:xb.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:F5}):r=I2(t,n.includeContainer,xb.bind(null,n)),k2(r)},V5=function(t,n){n=n||{};var r;return n.getShadowRoot?r=rp([t],n.includeContainer,{filter:Eb.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=I2(t,n.includeContainer,Eb.bind(null,n)),r},P2=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return sl.call(t,tp)===!1?!1:xb(n,t)};const wf=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function N2(e,t){const n=Lp(e,wf()),r=n.length;if(r===0)return;const i=Si(En(e)),c=n.indexOf(i),l=c===-1?t===1?0:r-1:c+t;return n[l]}function z2(e){return N2(En(e).body,1)||e}function L2(e){return N2(En(e).body,-1)||e}function Gu(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!vt(n,r)}function q5(e){Lp(e,wf()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function cC(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const hv="none",op="trigger-press",_r="trigger-hover",kh="trigger-focus",B2="outside-press",rbe="item-press",G5="close-press",$2="focus-out",pv="escape-key",obe="list-navigation",ibe="cancel-open",K5="disabled",U2="imperative-action",abe="window-resize";function qt(e,t,n,r){let i=!1,c=!1;const l=Ds;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){c=!0},get isCanceled(){return i},get isPropagationAllowed(){return c},trigger:n,...l}}const j2=I.createContext(void 0);function $a(e){const t=I.useContext(j2);if(e===!1&&t===void 0)throw new Error(wo(27));return t}let af=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Z5={[af.startingStyle]:""},Q5={[af.endingStyle]:""},mv={transitionStatus(e){return e==="starting"?Z5:e==="ending"?Q5:null}};let wa=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=af.startingStyle]="startingStyle",e[e.endingStyle=af.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),Rb=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Y5={[Rb.popupOpen]:""},X5={[Rb.popupOpen]:"",[Rb.pressed]:""},W5={[wa.open]:""},J5={[wa.closed]:""},e8={[wa.anchorHidden]:""},t8={open(e){return e?Y5:null}},cbe={open(e){return e?X5:null}},Ef={open(e){return e?W5:J5},anchorHidden(e){return e?e8:null}},n8={...Ef,...mv},s8=I.forwardRef(function(t,n){const{render:r,className:i,forceRender:c=!1,...l}=t,{store:f}=$a(),d=f.useState("open"),h=f.useState("nested"),y=f.useState("mounted"),g=f.useState("transitionStatus"),b=I.useMemo(()=>({open:d,transitionStatus:g}),[d,g]);return cr("div",t,{state:b,ref:[f.context.backdropRef,n],stateAttributesMapping:n8,props:[{role:"presentation",hidden:!y,style:{userSelect:"none",WebkitUserSelect:"none"}},l],enabled:c||!h})}),r8=I.forwardRef(function(t,n){const{render:r,className:i,disabled:c=!1,nativeButton:l=!0,...f}=t,{store:d}=$a(),h=d.useState("open");function y(_){h&&d.setOpen(!1,qt(G5,_.nativeEvent))}const{getButtonProps:g,buttonRef:b}=r2({disabled:c,native:l}),v=I.useMemo(()=>({disabled:c}),[c]);return cr("button",t,{state:v,ref:[n,b],props:[{onClick:y},f,g]})}),o8=I.forwardRef(function(t,n){const{render:r,className:i,id:c,...l}=t,{store:f}=$a(),d=lv(c);return f.useSyncedValueWithCleanup("descriptionElementId",d),cr("p",t,{ref:n,props:[{id:d},l]})});function Dr(e){const t=Lr(i8,e).current;return t.next=e,mt(t.effect),t}function i8(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function a8(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(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)}}}const c8=I.createContext(null),l8=I.createContext(null),Bp=()=>I.useContext(c8)?.id||null,xf=e=>{const t=I.useContext(l8);return e??t};function rl(e){return`data-base-ui-${e}`}function Ph(e,t,n){if(n&&!of(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}const H2=I.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ii,currentIdRef:{current:null},currentContextRef:{current:null}});function u8(e){const{children:t,delay:n,timeoutMs:r=0}=e,i=I.useRef(n),c=I.useRef(n),l=I.useRef(null),f=I.useRef(null),d=Oi();return U.jsx(H2.Provider,{value:I.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:c,currentIdRef:l,timeoutMs:r,currentContextRef:f,timeout:d}),[r,d]),children:t})}function f8(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{enabled:i=!0,open:c}=t,l=I.useContext(H2),{currentIdRef:f,delayRef:d,timeoutMs:h,initialDelayRef:y,currentContextRef:g,hasProvider:b,timeout:v}=l,[_,x]=I.useState(!1);return mt(()=>{function R(){x(!1),g.current?.setIsInstantPhase(!1),f.current=null,g.current=null,d.current=y.current}if(i&&f.current&&!c&&f.current===r){if(x(!1),h){const C=r;return v.start(h,()=>{n.select("open")||f.current&&f.current!==C||R()}),()=>{v.clear()}}R()}},[i,c,r,f,d,h,y,g,v,n]),mt(()=>{if(!i||!c)return;const R=g.current,C=f.current;v.clear(),g.current={onOpenChange:n.setOpen,setIsInstantPhase:x},f.current=r,d.current={open:0,close:Ph(y.current,"close")},C!==null&&C!==r?(x(!0),R?.setIsInstantPhase(!0),R?.onOpenChange(!1,qt(hv))):(x(!1),R?.setIsInstantPhase(!1))},[i,c,r,n,f,d,h,y,g,v]),mt(()=>()=>{g.current=null},[g]),I.useMemo(()=>({hasProvider:b,delayRef:d,isInstantPhase:_}),[b,d,_])}const F2={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},V2={...F2,position:"fixed",top:0,left:0},lbe={...F2,position:"absolute"},ph=null;class d8{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let i=0;i=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const mh=new d8;class Mr{static create(){return new Mr}static request(t){return mh.request(t)}static cancel(t){return mh.cancel(t)}currentId=ph;request(t){this.cancel(),this.currentId=mh.request(()=>{this.currentId=ph,t()})}cancel=()=>{this.currentId!==ph&&(mh.cancel(this.currentId),this.currentId=ph)};disposeEffect=()=>this.cancel}function q2(){const e=Lr(Mr.create).current;return y2(e.disposeEffect),e}const ip=I.forwardRef(function(t,n){const[r,i]=I.useState();mt(()=>{_2&&i("button")},[]);const c={tabIndex:0,role:r};return U.jsx("span",{...t,ref:n,style:V2,"aria-hidden":r?void 0:!0,...c,"data-base-ui-focus-guard":""})});let lC=0;function l0(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(lC);const c=()=>e?.focus({preventScroll:n});i?c():lC=requestAnimationFrame(c)}const Gc={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function uC(e){return e==="inert"?Gc.inert:e==="aria-hidden"?Gc["aria-hidden"]:Gc.none}let gh=new WeakSet,yh={},u0=0;const G2=e=>e&&(e.host||G2(e.parentNode)),h8=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=G2(n);return e.contains(r)?r:null}).filter(n=>n!=null);function p8(e,t,n,r){const i="data-base-ui-inert",c=r?"inert":n?"aria-hidden":null,l=h8(t,e),f=new Set,d=new Set(l),h=[];yh[i]||(yh[i]=new WeakMap);const y=yh[i];l.forEach(g),b(t),f.clear();function g(v){!v||f.has(v)||(f.add(v),v.parentNode&&g(v.parentNode))}function b(v){!v||d.has(v)||[].forEach.call(v.children,_=>{if(Pi(_)!=="script")if(f.has(_))b(_);else{const x=c?_.getAttribute(c):null,R=x!==null&&x!=="false",C=uC(c),A=(C.get(_)||0)+1,O=(y.get(_)||0)+1;C.set(_,A),y.set(_,O),h.push(_),A===1&&R&&gh.add(_),O===1&&_.setAttribute(i,""),!R&&c&&_.setAttribute(c,c==="inert"?"":"true")}})}return u0+=1,()=>{h.forEach(v=>{const _=uC(c),R=(_.get(v)||0)-1,C=(y.get(v)||0)-1;_.set(v,R),y.set(v,C),R||(!gh.has(v)&&c&&v.removeAttribute(c),gh.delete(v)),C||v.removeAttribute(i)}),u0-=1,u0||(Gc.inert=new WeakMap,Gc["aria-hidden"]=new WeakMap,Gc.none=new WeakMap,gh=new WeakSet,yh={})}}function m8(e,t=!1,n=!1){const r=En(e[0]).body;return p8(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const K2=I.createContext(null),Z2=()=>I.useContext(K2),g8=rl("portal");function Q2(e={}){const{ref:t,container:n,componentProps:r=Ds,elementProps:i,elementState:c}=e,l=_f(),d=Z2()?.portalNode,[h,y]=I.useState(null),[g,b]=I.useState(null),v=Ze(C=>{C!==null&&b(C)}),_=I.useRef(null);mt(()=>{if(n===null){_.current&&(_.current=null,b(null),y(null));return}if(l==null)return;const C=(n&&(iv(n)?n:n.current))??d??document.body;if(C==null){_.current&&(_.current=null,b(null),y(null));return}_.current!==C&&(_.current=C,b(null),y(C))},[n,d,l]);const x=cr("div",r,{ref:[t,v],state:c,props:[{id:l,[g8]:""},i]});return{portalNode:g,portalSubtree:h&&x?ki.createPortal(x,h):null}}const y8=I.forwardRef(function(t,n){const{children:r,container:i,className:c,render:l,renderGuards:f,...d}=t,{portalNode:h,portalSubtree:y}=Q2({container:i,ref:n,componentProps:t,elementProps:d}),g=I.useRef(null),b=I.useRef(null),v=I.useRef(null),_=I.useRef(null),[x,R]=I.useState(null),C=x?.modal,A=x?.open,O=typeof f=="boolean"?f:!!x&&!x.modal&&x.open&&!!h;I.useEffect(()=>{if(!h||C)return;function N(j){h&&j.relatedTarget&&Gu(j)&&(j.type==="focusin"?cC:q5)(h)}return h.addEventListener("focusin",N,!0),h.addEventListener("focusout",N,!0),()=>{h.removeEventListener("focusin",N,!0),h.removeEventListener("focusout",N,!0)}},[h,C]),I.useEffect(()=>{!h||A||cC(h)},[A,h]);const D=I.useMemo(()=>({beforeOutsideRef:g,afterOutsideRef:b,beforeInsideRef:v,afterInsideRef:_,portalNode:h,setFocusManagerState:R}),[h]);return U.jsxs(I.Fragment,{children:[y,U.jsxs(K2.Provider,{value:D,children:[O&&h&&U.jsx(ip,{"data-type":"outside",ref:g,onFocus:N=>{if(Gu(N,h))v.current?.focus();else{const j=x?x.domReference:null;L2(j)?.focus()}}}),O&&h&&U.jsx("span",{"aria-owns":h.id,style:b$}),h&&ki.createPortal(r,h),O&&h&&U.jsx(ip,{"data-type":"outside",ref:b,onFocus:N=>{if(Gu(N,h))_.current?.focus();else{const j=x?x.domReference:null;z2(j)?.focus(),x?.closeOnFocusOut&&x?.onOpenChange(!1,qt($2,N.nativeEvent))}}})]})]})});function uo(e){return e==null?e:"current"in e?e.current:e}function b8(e,t){const n=gn(e.target);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"):""}const fC=20;let Ei=[];function gv(){Ei=Ei.filter(e=>e.isConnected)}function v8(e){gv(),e&&Pi(e)!=="body"&&(Ei.push(e),Ei.length>fC&&(Ei=Ei.slice(-fC)))}function f0(){return gv(),Ei[Ei.length-1]}function S8(e){if(!e)return null;const t=wf();return P2(e,t)?e:Lp(e,t)[0]||e}function _8(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():zs(e).display!=="none"}function dC(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=wf(),i=V5(e,n).filter(l=>{const f=l.getAttribute("data-tabindex")||"";return P2(l,n)||l.hasAttribute("data-tabindex")&&!f.startsWith("-")}),c=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?c!=="0"&&e.setAttribute("tabindex","0"):(c!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function w8(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],initialFocus:c=!0,returnFocus:l=!0,restoreFocus:f=!1,modal:d=!0,closeOnFocusOut:h=!0,openInteractionType:y="",getInsideElements:g=()=>[],nextFocusableElement:b,previousFocusableElement:v,beforeContentFocusGuardRef:_,externalTree:x}=e,R="rootStore"in t?t.rootStore:t,C=R.useState("open"),A=R.useState("domReferenceElement"),O=R.useState("floatingElement"),{events:D,dataRef:N}=R.context,j=Ze(()=>N.current.floatingContext?.nodeId),$=Ze(g),k=c===!1,Z=sC(A)&&k,se=Dr(i),le=Dr(c),K=Dr(l),Q=Dr(y),ye=xf(x),fe=Z2(),q=I.useRef(null),W=I.useRef(null),F=I.useRef(!1),be=I.useRef(!1),Te=I.useRef(!1),P=I.useRef(-1),ne=I.useRef(""),ie=I.useRef(""),de=I.useRef(null),Ce=I.useRef(null),_e=Yh(de,_,fe?.beforeInsideRef),ve=Yh(Ce,fe?.afterInsideRef),Ye=Oi(),He=Oi(),ht=q2(),Ft=fe!=null,oe=Sb(O),Fe=Ze((we=oe)=>we?Lp(we,wf()):[]),Ie=Ze(we=>{const Ne=Fe(we);return se.current.map(()=>Ne).filter(Boolean).flat()});I.useEffect(()=>{if(r||!d)return;function we(qe){qe.key==="Tab"&&vt(oe,Si(En(oe)))&&Fe().length===0&&!Z&&p5(qe)}const Ne=En(oe);return Ne.addEventListener("keydown",we),()=>{Ne.removeEventListener("keydown",we)}},[r,A,oe,d,se,Z,Fe,Ie]),I.useEffect(()=>{if(r||!O)return;function we(Ne){const qe=is(Ne),ut=Fe().indexOf(qe);ut!==-1&&(P.current=ut)}return O.addEventListener("focusin",we),()=>{O.removeEventListener("focusin",we)}},[r,O,Fe]),I.useEffect(()=>{if(r||!C)return;const we=En(oe);function Ne(){Te.current=!1}function qe(ut){const Be=is(ut),Le=vt(O,Be)||vt(A,Be)||vt(fe?.portalNode,Be);Te.current=!Le,ie.current=ut.pointerType||"keyboard"}function Qe(){ie.current="keyboard"}return we.addEventListener("pointerdown",qe,!0),we.addEventListener("pointerup",Ne,!0),we.addEventListener("pointercancel",Ne,!0),we.addEventListener("keydown",Qe,!0),()=>{we.removeEventListener("pointerdown",qe,!0),we.removeEventListener("pointerup",Ne,!0),we.removeEventListener("pointercancel",Ne,!0),we.removeEventListener("keydown",Qe,!0)}},[r,O,A,oe,C,fe]),I.useEffect(()=>{if(r||!h)return;function we(){be.current=!0,He.start(0,()=>{be.current=!1})}function Ne(Be){const Le=Be.relatedTarget,on=Be.currentTarget,it=is(Be);queueMicrotask(()=>{const _s=j(),gt=R.context.triggerElements,$t=Le?.hasAttribute(rl("focus-guard"))&&[de.current,Ce.current,fe?.beforeInsideRef.current,fe?.afterInsideRef.current,fe?.beforeOutsideRef.current,fe?.afterOutsideRef.current,uo(v),uo(b)].includes(Le),Ut=!(vt(A,Le)||vt(O,Le)||vt(Le,O)||vt(fe?.portalNode,Le)||Le!=null&>.hasElement(Le)||gt.hasMatchingElement(an=>vt(an,Le))||$t||ye&&(Ca(ye.nodesRef.current,_s).find(an=>vt(an.context?.elements.floating,Le)||vt(an.context?.elements.domReference,Le))||rC(ye.nodesRef.current,_s).find(an=>[an.context?.elements.floating,Sb(an.context?.elements.floating)].includes(Le)||an.context?.elements.domReference===Le)));if(on===A&&oe&&dC(oe,se),f&&on!==A&&!_8(it)&&Si(En(oe))===En(oe).body){if(xn(oe)&&(oe.focus(),f==="popup")){ht.request(()=>{oe.focus()});return}const an=P.current,ws=Fe(),$s=ws[an]||ws[ws.length-1]||oe;xn($s)&&$s.focus()}if(N.current.insideReactTree){N.current.insideReactTree=!1;return}(Z||!d)&&Le&&Ut&&!be.current&&(Z||Le!==f0())&&(F.current=!0,R.setOpen(!1,qt($2,Be)))})}function qe(){Te.current||(N.current.insideReactTree=!0,Ye.start(0,()=>{N.current.insideReactTree=!1}))}const Qe=xn(A)?A:null,ut=[];if(!(!O&&!Qe))return Qe&&(Qe.addEventListener("focusout",Ne),Qe.addEventListener("pointerdown",we),ut.push(()=>{Qe.removeEventListener("focusout",Ne),Qe.removeEventListener("pointerdown",we)})),O&&(O.addEventListener("focusout",Ne),fe&&(O.addEventListener("focusout",qe,!0),ut.push(()=>{O.removeEventListener("focusout",qe,!0)})),ut.push(()=>{O.removeEventListener("focusout",Ne)})),()=>{ut.forEach(Be=>{Be()})}},[r,A,O,oe,d,ye,fe,R,h,f,Fe,Z,j,se,N,Ye,He,ht,b,v]),I.useEffect(()=>{if(r||!O||!C)return;const we=Array.from(fe?.portalNode?.querySelectorAll(`[${rl("portal")}]`)||[]),qe=(ye?rC(ye.nodesRef.current,j()):[]).find(Be=>sC(Be.context?.elements.domReference||null))?.context?.elements.domReference,Qe=[O,qe,...we,...$(),q.current,W.current,de.current,Ce.current,fe?.beforeOutsideRef.current,fe?.afterOutsideRef.current,uo(v),uo(b),Z?A:null].filter(Be=>Be!=null),ut=m8(Qe,d||Z);return()=>{ut()}},[C,r,A,O,d,se,fe,Z,ye,j,$,b,v]),mt(()=>{if(!C||r||!xn(oe))return;const we=En(oe),Ne=Si(we);queueMicrotask(()=>{const qe=Ie(oe),Qe=le.current,ut=typeof Qe=="function"?Qe(Q.current||""):Qe;if(ut===void 0||ut===!1)return;let Be;ut===!0||ut===null?Be=qe[0]||oe:Be=uo(ut),Be=Be||qe[0]||oe,!vt(oe,Ne)&&l0(Be,{preventScroll:Be===oe})})},[r,C,oe,k,Ie,le,Q]),mt(()=>{if(r||!oe)return;const we=En(oe),Ne=Si(we);v8(Ne);function qe(Be){if(Be.open||(ne.current=b8(Be.nativeEvent,ie.current)),Be.reason===_r&&Be.nativeEvent.type==="mouseleave"&&(F.current=!0),Be.reason===B2)if(Be.nested)F.current=!1;else if(g5(Be.nativeEvent)||y5(Be.nativeEvent))F.current=!1;else{let Le=!1;document.createElement("div").focus({get preventScroll(){return Le=!0,!1}}),Le?F.current=!1:F.current=!0}}D.on("openchange",qe);const Qe=we.createElement("span");Qe.setAttribute("tabindex","-1"),Qe.setAttribute("aria-hidden","true"),Object.assign(Qe.style,V2),Ft&&A&&A.insertAdjacentElement("afterend",Qe);function ut(){const Be=K.current;let Le=typeof Be=="function"?Be(ne.current):Be;if(Le===void 0||Le===!1)return null;if(Le===null&&(Le=!0),typeof Le=="boolean"){const it=A||f0();return it&&it.isConnected?it:Qe}const on=A||f0()||Qe;return uo(Le)||on}return()=>{D.off("openchange",qe);const Be=Si(we),Le=vt(O,Be)||ye&&Ca(ye.nodesRef.current,j(),!1).some(it=>vt(it.context?.elements.floating,Be)),on=ut();queueMicrotask(()=>{const it=S8(on),_s=typeof K.current!="boolean";K.current&&!F.current&&xn(it)&&(!(!_s&&it!==Be&&Be!==we.body)||Le)&&it.focus({preventScroll:!0}),Qe.remove()})}},[r,O,oe,K,N,D,ye,Ft,A,j]),I.useEffect(()=>{queueMicrotask(()=>{F.current=!1})},[r]),I.useEffect(()=>{if(r||!C)return;function we(qe){is(qe)?.closest(`[${g$}]`)&&(be.current=!0)}const Ne=En(oe);return Ne.addEventListener("pointerdown",we,!0),()=>{Ne.removeEventListener("pointerdown",we,!0)}},[r,C,oe]),mt(()=>{if(!r&&fe)return fe.setFocusManagerState({modal:d,closeOnFocusOut:h,open:C,onOpenChange:R.setOpen,domReference:A}),()=>{fe.setFocusManagerState(null)}},[r,fe,d,C,R,h,A]),mt(()=>{if(!(r||!oe))return dC(oe,se),()=>{queueMicrotask(gv)}},[r,oe,se]);const Pt=!r&&(d?!Z:!0)&&(Ft||d);return U.jsxs(I.Fragment,{children:[Pt&&U.jsx(ip,{"data-type":"inside",ref:_e,onFocus:we=>{if(d){const Ne=Ie();l0(Ne[Ne.length-1])}else fe?.portalNode&&(F.current=!1,Gu(we,fe.portalNode)?z2(A)?.focus():uo(v??fe.beforeOutsideRef)?.focus())}}),n,Pt&&U.jsx(ip,{"data-type":"inside",ref:ve,onFocus:we=>{d?l0(Ie()[0]):fe?.portalNode&&(h&&(F.current=!0),Gu(we,fe.portalNode)?L2(A)?.focus():uo(b??fe.afterOutsideRef)?.focus())}})]})}function E8(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){const c=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},l=t.axis==="x"||t.axis==="both",f=t.axis==="y"||t.axis==="both",d=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let h=c.width,y=c.height,g=c.x,b=c.y;return n==null&&t.x&&l&&(n=c.x-t.x),r==null&&t.y&&f&&(r=c.y-t.y),g-=n||0,b-=r||0,h=0,y=0,!i||d?(h=t.axis==="y"?c.width:0,y=t.axis==="x"?c.height:0,g=l&&t.x!=null?t.x:g,b=f&&t.y!=null?t.y:b):i&&!d&&(y=t.axis==="x"?c.height:y,h=t.axis==="y"?c.width:h),i=!0,{width:h,height:y,x:g,y:b,top:b,right:g+h,bottom:b+y,left:g}}}}function hC(e){return e!=null&&e.clientX!=null}function x8(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),c=n.useState("domReferenceElement"),l=n.context.dataRef,{enabled:f=!0,axis:d="both",x:h=null,y=null}=t,g=I.useRef(!1),b=I.useRef(null),[v,_]=I.useState(),[x,R]=I.useState([]),C=Ze((j,$,k)=>{g.current||l.current.openEvent&&!hC(l.current.openEvent)||n.set("positionReference",E8(k??c,{x:j,y:$,axis:d,dataRef:l,pointerType:v}))}),A=Ze(j=>{h!=null||y!=null||(r?b.current||R([]):C(j.clientX,j.clientY,j.currentTarget))}),O=of(v)?i:r,D=I.useCallback(()=>{if(!O||!f||h!=null||y!=null)return;const j=gn(i);function $(k){const Z=is(k);vt(i,Z)?(j.removeEventListener("mousemove",$),b.current=null):C(k.clientX,k.clientY)}if(!l.current.openEvent||hC(l.current.openEvent)){j.addEventListener("mousemove",$);const k=()=>{j.removeEventListener("mousemove",$),b.current=null};return b.current=k,k}n.set("positionReference",c)},[O,f,h,y,i,l,c,n,C]);I.useEffect(()=>D(),[D,x]),I.useEffect(()=>{f&&!i&&(g.current=!1)},[f,i]),I.useEffect(()=>{!f&&r&&(g.current=!0)},[f,r]),mt(()=>{f&&(h!=null||y!=null)&&(g.current=!1,C(h,y))},[f,h,y,C]);const N=I.useMemo(()=>{function j($){_($.pointerType)}return{onPointerDown:j,onPointerEnter:j,onMouseMove:A,onMouseEnter:A}},[A]);return I.useMemo(()=>f?{reference:N,trigger:N}:{},[f,N])}function pC(e,t,n){let{reference:r,floating:i}=e;const c=ar(t),l=dv(t),f=fv(l),d=ys(t),h=c==="y",y=r.x+r.width/2-i.width/2,g=r.y+r.height/2-i.height/2,b=r[f]/2-i[f]/2;let v;switch(d){case"top":v={x:y,y:r.y-i.height};break;case"bottom":v={x:y,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:g};break;case"left":v={x:r.x-i.width,y:g};break;default:v={x:r.x,y:r.y}}switch(Ni(t)){case"start":v[l]-=b*(n&&h?-1:1);break;case"end":v[l]+=b*(n&&h?-1:1);break}return v}const R8=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:c=[],platform:l}=n,f=c.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:y,y:g}=pC(h,r,d),b=r,v={},_=0;for(let x=0;xye<=0)){var le,K;const ye=(((le=c.flip)==null?void 0:le.index)||0)+1,fe=$[ye];if(fe&&(!(g==="alignment"?A!==ar(fe):!1)||se.every(F=>ar(F.placement)===A?F.overflows[0]>0:!0)))return{data:{index:ye,overflows:se},reset:{placement:fe}};let q=(K=se.filter(W=>W.overflows[0]<=0).sort((W,F)=>W.overflows[1]-F.overflows[1])[0])==null?void 0:K.placement;if(!q)switch(v){case"bestFit":{var Q;const W=(Q=se.filter(F=>{if(j){const be=ar(F.placement);return be===A||be==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(be=>be>0).reduce((be,Te)=>be+Te,0)]).sort((F,be)=>F[1]-be[1])[0])==null?void 0:Q[0];W&&(q=W);break}case"initialPlacement":q=f;break}if(i!==q)return{reset:{placement:q}}}return{}}}};function mC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gC(e){return v5.some(t=>e[t]>=0)}const T8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=vo(e,t);switch(r){case"referenceHidden":{const c=await cf(t,{...i,elementContext:"reference"}),l=mC(c,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:gC(l)}}}case"escaped":{const c=await cf(t,{...i,altBoundary:!0}),l=mC(c,n.floating);return{data:{escapedOffsets:l,escaped:gC(l)}}}default:return{}}}}},Y2=new Set(["left","top"]);async function A8(e,t){const{placement:n,platform:r,elements:i}=e,c=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=ys(n),f=Ni(n),d=ar(n)==="y",h=Y2.has(l)?-1:1,y=c&&d?-1:1,g=vo(t,e);let{mainAxis:b,crossAxis:v,alignmentAxis:_}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof _=="number"&&(v=f==="end"?_*-1:_),d?{x:v*y,y:b*h}:{x:b*h,y:v*y}}const I8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:c,placement:l,middlewareData:f}=t,d=await A8(t,e);return l===((n=f.offset)==null?void 0:n.placement)&&(r=f.arrow)!=null&&r.alignmentOffset?{}:{x:i+d.x,y:c+d.y,data:{...d,placement:l}}}}},O8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:c=!0,crossAxis:l=!1,limiter:f={fn:R=>{let{x:C,y:A}=R;return{x:C,y:A}}},...d}=vo(e,t),h={x:n,y:r},y=await cf(t,d),g=ar(ys(i)),b=uv(g);let v=h[b],_=h[g];if(c){const R=b==="y"?"top":"left",C=b==="y"?"bottom":"right",A=v+y[R],O=v-y[C];v=_b(A,v,O)}if(l){const R=g==="y"?"top":"left",C=g==="y"?"bottom":"right",A=_+y[R],O=_-y[C];_=_b(A,_,O)}const x=f.fn({...t,[b]:v,[g]:_});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[b]:c,[g]:l}}}}}},M8=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:c,middlewareData:l}=t,{offset:f=0,mainAxis:d=!0,crossAxis:h=!0}=vo(e,t),y={x:n,y:r},g=ar(i),b=uv(g);let v=y[b],_=y[g];const x=vo(f,t),R=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(d){const O=b==="y"?"height":"width",D=c.reference[b]-c.floating[O]+R.mainAxis,N=c.reference[b]+c.reference[O]-R.mainAxis;vN&&(v=N)}if(h){var C,A;const O=b==="y"?"width":"height",D=Y2.has(ys(i)),N=c.reference[g]-c.floating[O]+(D&&((C=l.offset)==null?void 0:C[g])||0)+(D?0:R.crossAxis),j=c.reference[g]+c.reference[O]+(D?0:((A=l.offset)==null?void 0:A[g])||0)-(D?R.crossAxis:0);_j&&(_=j)}return{[b]:v,[g]:_}}}},D8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:c,platform:l,elements:f}=t,{apply:d=()=>{},...h}=vo(e,t),y=await cf(t,h),g=ys(i),b=Ni(i),v=ar(i)==="y",{width:_,height:x}=c.floating;let R,C;g==="top"||g==="bottom"?(R=g,C=b===(await(l.isRTL==null?void 0:l.isRTL(f.floating))?"start":"end")?"left":"right"):(C=g,R=b==="end"?"top":"bottom");const A=x-y.top-y.bottom,O=_-y.left-y.right,D=nl(x-y[R],A),N=nl(_-y[C],O),j=!t.middlewareData.shift;let $=D,k=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=O),(r=t.middlewareData.shift)!=null&&r.enabled.y&&($=A),j&&!b){const se=Ms(y.left,0),le=Ms(y.right,0),K=Ms(y.top,0),Q=Ms(y.bottom,0);v?k=_-2*(se!==0||le!==0?se+le:Ms(y.left,y.right)):$=x-2*(K!==0||Q!==0?K+Q:Ms(y.top,y.bottom))}await d({...t,availableWidth:k,availableHeight:$});const Z=await l.getDimensions(f.floating);return _!==Z.width||x!==Z.height?{reset:{rects:!0}}:{}}}};function X2(e){const t=zs(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=xn(e),c=i?e.offsetWidth:n,l=i?e.offsetHeight:r,f=Wh(n)!==c||Wh(r)!==l;return f&&(n=c,r=l),{width:n,height:r,$:f}}function yv(e){return _t(e)?e:e.contextElement}function Kc(e){const t=yv(e);if(!xn(t))return kr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:c}=X2(t);let l=(c?Wh(n.width):n.width)/r,f=(c?Wh(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!f||!Number.isFinite(f))&&(f=1),{x:l,y:f}}const k8=kr(0);function W2(e){const t=gn(e);return!Np()||!t.visualViewport?k8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function P8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==gn(e)?!1:t}function Ma(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),c=yv(e);let l=kr(1);t&&(r?_t(r)&&(l=Kc(r)):l=Kc(e));const f=P8(c,n,r)?W2(c):kr(0);let d=(i.left+f.x)/l.x,h=(i.top+f.y)/l.y,y=i.width/l.x,g=i.height/l.y;if(c){const b=gn(c),v=r&&_t(r)?gn(r):r;let _=b,x=gb(_);for(;x&&r&&v!==_;){const R=Kc(x),C=x.getBoundingClientRect(),A=zs(x),O=C.left+(x.clientLeft+parseFloat(A.paddingLeft))*R.x,D=C.top+(x.clientTop+parseFloat(A.paddingTop))*R.y;d*=R.x,h*=R.y,y*=R.x,g*=R.y,d+=O,h+=D,_=gn(x),x=gb(_)}}return ep({width:y,height:g,x:d,y:h})}function $p(e,t){const n=zp(e).scrollLeft;return t?t.left+n:Ma(Br(e)).left+n}function J2(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-$p(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function N8(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const c=i==="fixed",l=Br(r),f=t?Pp(t.floating):!1;if(r===l||f&&c)return n;let d={scrollLeft:0,scrollTop:0},h=kr(1);const y=kr(0),g=xn(r);if((g||!g&&!c)&&((Pi(r)!=="body"||La(l))&&(d=zp(r)),xn(r))){const v=Ma(r);h=Kc(r),y.x=v.x+r.clientLeft,y.y=v.y+r.clientTop}const b=l&&!g&&!c?J2(l,d):kr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+y.x+b.x,y:n.y*h.y-d.scrollTop*h.y+y.y+b.y}}function z8(e){return Array.from(e.getClientRects())}function L8(e){const t=Br(e),n=zp(e),r=e.ownerDocument.body,i=Ms(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),c=Ms(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+$p(e);const f=-n.scrollTop;return zs(r).direction==="rtl"&&(l+=Ms(t.clientWidth,r.clientWidth)-i),{width:i,height:c,x:l,y:f}}const yC=25;function B8(e,t){const n=gn(e),r=Br(e),i=n.visualViewport;let c=r.clientWidth,l=r.clientHeight,f=0,d=0;if(i){c=i.width,l=i.height;const y=Np();(!y||y&&t==="fixed")&&(f=i.offsetLeft,d=i.offsetTop)}const h=$p(r);if(h<=0){const y=r.ownerDocument,g=y.body,b=getComputedStyle(g),v=y.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,_=Math.abs(r.clientWidth-g.clientWidth-v);_<=yC&&(c-=_)}else h<=yC&&(c+=h);return{width:c,height:l,x:f,y:d}}const $8=new Set(["absolute","fixed"]);function U8(e,t){const n=Ma(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,c=xn(e)?Kc(e):kr(1),l=e.clientWidth*c.x,f=e.clientHeight*c.y,d=i*c.x,h=r*c.y;return{width:l,height:f,x:d,y:h}}function bC(e,t,n){let r;if(t==="viewport")r=B8(e,n);else if(t==="document")r=L8(Br(e));else if(_t(t))r=U8(t,n);else{const i=W2(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ep(r)}function eO(e,t){const n=bo(e);return n===t||!_t(n)||go(n)?!1:zs(n).position==="fixed"||eO(n,t)}function j8(e,t){const n=t.get(e);if(n)return n;let r=Ti(e,[],!1).filter(f=>_t(f)&&Pi(f)!=="body"),i=null;const c=zs(e).position==="fixed";let l=c?bo(e):e;for(;_t(l)&&!go(l);){const f=zs(l),d=av(l);!d&&f.position==="fixed"&&(i=null),(c?!d&&!i:!d&&f.position==="static"&&!!i&&$8.has(i.position)||La(l)&&!d&&eO(e,l))?r=r.filter(y=>y!==l):i=f,l=bo(l)}return t.set(e,r),r}function H8(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?Pp(t)?[]:j8(t,this._c):[].concat(n),r],f=l[0],d=l.reduce((h,y)=>{const g=bC(t,y,i);return h.top=Ms(g.top,h.top),h.right=nl(g.right,h.right),h.bottom=nl(g.bottom,h.bottom),h.left=Ms(g.left,h.left),h},bC(t,f,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function F8(e){const{width:t,height:n}=X2(e);return{width:t,height:n}}function V8(e,t,n){const r=xn(t),i=Br(t),c=n==="fixed",l=Ma(e,!0,c,t);let f={scrollLeft:0,scrollTop:0};const d=kr(0);function h(){d.x=$p(i)}if(r||!r&&!c)if((Pi(t)!=="body"||La(i))&&(f=zp(t)),r){const v=Ma(t,!0,c,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else i&&h();c&&!r&&i&&h();const y=i&&!r&&!c?J2(i,f):kr(0),g=l.left+f.scrollLeft-d.x-y.x,b=l.top+f.scrollTop-d.y-y.y;return{x:g,y:b,width:l.width,height:l.height}}function d0(e){return zs(e).position==="static"}function vC(e,t){if(!xn(e)||zs(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Br(e)===n&&(n=n.ownerDocument.body),n}function tO(e,t){const n=gn(e);if(Pp(e))return n;if(!xn(e)){let i=bo(e);for(;i&&!go(i);){if(_t(i)&&!d0(i))return i;i=bo(i)}return n}let r=vC(e,t);for(;r&&Y$(r)&&d0(r);)r=vC(r,t);return r&&go(r)&&d0(r)&&!av(r)?n:r||tU(e)||n}const q8=async function(e){const t=this.getOffsetParent||tO,n=this.getDimensions,r=await n(e.floating);return{reference:V8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function G8(e){return zs(e).direction==="rtl"}const K8={convertOffsetParentRelativeRectToViewportRelativeRect:N8,getDocumentElement:Br,getClippingRect:H8,getOffsetParent:tO,getElementRects:q8,getClientRects:z8,getDimensions:F8,getScale:Kc,isElement:_t,isRTL:G8};function nO(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Z8(e,t){let n=null,r;const i=Br(e);function c(){var f;clearTimeout(r),(f=n)==null||f.disconnect(),n=null}function l(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),c();const h=e.getBoundingClientRect(),{left:y,top:g,width:b,height:v}=h;if(f||t(),!b||!v)return;const _=hh(g),x=hh(i.clientWidth-(y+b)),R=hh(i.clientHeight-(g+v)),C=hh(y),O={rootMargin:-_+"px "+-x+"px "+-R+"px "+-C+"px",threshold:Ms(0,nl(1,d))||1};let D=!0;function N(j){const $=j[0].intersectionRatio;if($!==d){if(!D)return l();$?l(!1,$):r=setTimeout(()=>{l(!1,1e-7)},1e3)}$===1&&!nO(h,e.getBoundingClientRect())&&l(),D=!1}try{n=new IntersectionObserver(N,{...O,root:i.ownerDocument})}catch{n=new IntersectionObserver(N,O)}n.observe(e)}return l(!0),c}function SC(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:c=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=yv(e),y=i||c?[...h?Ti(h):[],...Ti(t)]:[];y.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),c&&C.addEventListener("resize",n)});const g=h&&f?Z8(h,n):null;let b=-1,v=null;l&&(v=new ResizeObserver(C=>{let[A]=C;A&&A.target===h&&v&&(v.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var O;(O=v)==null||O.observe(t)})),n()}),h&&!d&&v.observe(h),v.observe(t));let _,x=d?Ma(e):null;d&&R();function R(){const C=Ma(e);x&&!nO(x,C)&&n(),x=C,_=requestAnimationFrame(R)}return n(),()=>{var C;y.forEach(A=>{i&&A.removeEventListener("scroll",n),c&&A.removeEventListener("resize",n)}),g?.(),(C=v)==null||C.disconnect(),v=null,d&&cancelAnimationFrame(_)}}const Q8=I8,Y8=O8,X8=C8,W8=D8,J8=T8,ej=M8,tj=(e,t,n)=>{const r=new Map,i={platform:K8,...n},c={...i.platform,_c:r};return R8(e,t,{...i,platform:c})};var nj=typeof document<"u",sj=function(){},Nh=nj?I.useLayoutEffect:sj;function ap(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(!ap(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;){const c=i[r];if(!(c==="_owner"&&e.$$typeof)&&!ap(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function sO(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _C(e,t){const n=sO(e);return Math.round(t*n)/n}function h0(e){const t=I.useRef(e);return Nh(()=>{t.current=e}),t}function rj(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:c,floating:l}={},transform:f=!0,whileElementsMounted:d,open:h}=e,[y,g]=I.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,v]=I.useState(r);ap(b,r)||v(r);const[_,x]=I.useState(null),[R,C]=I.useState(null),A=I.useCallback(F=>{F!==j.current&&(j.current=F,x(F))},[]),O=I.useCallback(F=>{F!==$.current&&($.current=F,C(F))},[]),D=c||_,N=l||R,j=I.useRef(null),$=I.useRef(null),k=I.useRef(y),Z=d!=null,se=h0(d),le=h0(i),K=h0(h),Q=I.useCallback(()=>{if(!j.current||!$.current)return;const F={placement:t,strategy:n,middleware:b};le.current&&(F.platform=le.current),tj(j.current,$.current,F).then(be=>{const Te={...be,isPositioned:K.current!==!1};ye.current&&!ap(k.current,Te)&&(k.current=Te,ki.flushSync(()=>{g(Te)}))})},[b,t,n,le,K]);Nh(()=>{h===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,g(F=>({...F,isPositioned:!1})))},[h]);const ye=I.useRef(!1);Nh(()=>(ye.current=!0,()=>{ye.current=!1}),[]),Nh(()=>{if(D&&(j.current=D),N&&($.current=N),D&&N){if(se.current)return se.current(D,N,Q);Q()}},[D,N,Q,se,Z]);const fe=I.useMemo(()=>({reference:j,floating:$,setReference:A,setFloating:O}),[A,O]),q=I.useMemo(()=>({reference:D,floating:N}),[D,N]),W=I.useMemo(()=>{const F={position:n,left:0,top:0};if(!q.floating)return F;const be=_C(q.floating,y.x),Te=_C(q.floating,y.y);return f?{...F,transform:"translate("+be+"px, "+Te+"px)",...sO(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:be,top:Te}},[n,f,q.floating,y.x,y.y]);return I.useMemo(()=>({...y,update:Q,refs:fe,elements:q,floatingStyles:W}),[y,Q,fe,q,W])}const oj=(e,t)=>({...Q8(e),options:[e,t]}),ij=(e,t)=>({...Y8(e),options:[e,t]}),aj=(e,t)=>({...ej(e),options:[e,t]}),cj=(e,t)=>({...X8(e),options:[e,t]}),lj=(e,t)=>({...W8(e),options:[e,t]}),uj=(e,t)=>({...J8(e),options:[e,t]}),fj={intentional:"onClick",sloppy:"onPointerDown"};function dj(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function rO(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),c=n.useState("referenceElement"),l=n.useState("domReferenceElement"),{onOpenChange:f,dataRef:d}=n.context,{enabled:h=!0,escapeKey:y=!0,outsidePress:g=!0,outsidePressEvent:b="sloppy",referencePress:v=!1,referencePressEvent:_="sloppy",ancestorScroll:x=!1,bubbles:R,externalTree:C}=t,A=xf(C),O=Ze(typeof g=="function"?g:()=>!1),D=typeof g=="function"?O:g,N=I.useRef(!1),{escapeKey:j,outsidePress:$}=dj(R),k=I.useRef(null),Z=Oi(),se=Oi(),le=Ze(()=>{se.clear(),d.current.insideReactTree=!1}),K=I.useRef(!1),Q=I.useRef(""),ye=Ze(oe=>{Q.current=oe.pointerType}),fe=Ze(()=>{const oe=Q.current,Fe=oe==="pen"||!oe?"mouse":oe,Ie=typeof b=="function"?b():b;return typeof Ie=="string"?Ie:Ie[Fe]}),q=Ze(oe=>{if(!r||!h||!y||oe.key!=="Escape"||K.current)return;const Fe=d.current.floatingContext?.nodeId,Ie=A?Ca(A.nodesRef.current,Fe):[];if(!j&&Ie.length>0){let Ne=!0;if(Ie.forEach(qe=>{qe.context?.open&&!qe.context.dataRef.current.__escapeKeyBubbles&&(Ne=!1)}),!Ne)return}const Pt=m5(oe)?oe.nativeEvent:oe,we=qt(pv,Pt);n.setOpen(!1,we),!j&&!we.isPropagationAllowed&&oe.stopPropagation()}),W=Ze(oe=>{const Fe=fe();return Fe==="intentional"&&oe.type!=="click"||Fe==="sloppy"&&oe.type==="click"}),F=Ze(()=>{d.current.insideReactTree=!0,se.start(0,le)}),be=Ze((oe,Fe=!1)=>{if(W(oe)){le();return}if(d.current.insideReactTree){le();return}if(fe()==="intentional"&&Fe||typeof D=="function"&&!D(oe))return;const Ie=is(oe),Pt=`[${rl("inert")}]`,we=En(n.select("floatingElement")).querySelectorAll(Pt),Ne=n.context.triggerElements;if(Ie&&(Ne.hasElement(Ie)||Ne.hasMatchingElement(Le=>vt(Le,Ie))))return;let qe=_t(Ie)?Ie:null;for(;qe&&!go(qe);){const Le=bo(qe);if(go(Le)||!_t(Le))break;qe=Le}if(we.length&&_t(Ie)&&!d5(Ie)&&!vt(Ie,n.select("floatingElement"))&&Array.from(we).every(Le=>!vt(qe,Le)))return;if(xn(Ie)&&!("touches"in oe)){const Le=go(Ie),on=zs(Ie),it=/auto|scroll/,_s=Le||it.test(on.overflowX),gt=Le||it.test(on.overflowY),$t=_s&&Ie.clientWidth>0&&Ie.scrollWidth>Ie.clientWidth,Ut=gt&&Ie.clientHeight>0&&Ie.scrollHeight>Ie.clientHeight,an=on.direction==="rtl",ws=Ut&&(an?oe.offsetX<=Ie.offsetWidth-Ie.clientWidth:oe.offsetX>Ie.clientWidth),$s=$t&&oe.offsetY>Ie.clientHeight;if(ws||$s)return}const Qe=d.current.floatingContext?.nodeId,ut=A&&Ca(A.nodesRef.current,Qe).some(Le=>br(oe,Le.context?.elements.floating));if(br(oe,n.select("floatingElement"))||br(oe,n.select("domReferenceElement"))||ut)return;const Be=A?Ca(A.nodesRef.current,Qe):[];if(Be.length>0){let Le=!0;if(Be.forEach(on=>{on.context?.open&&!on.context.dataRef.current.__outsidePressBubbles&&(Le=!1)}),!Le)return}n.setOpen(!1,qt(B2,oe)),le()}),Te=Ze(oe=>{fe()!=="sloppy"||oe.pointerType==="touch"||!n.select("open")||!h||br(oe,n.select("floatingElement"))||br(oe,n.select("domReferenceElement"))||be(oe)}),P=Ze(oe=>{if(fe()!=="sloppy"||!n.select("open")||!h||br(oe,n.select("floatingElement"))||br(oe,n.select("domReferenceElement")))return;const Fe=oe.touches[0];Fe&&(k.current={startTime:Date.now(),startX:Fe.clientX,startY:Fe.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},Z.start(1e3,()=>{k.current&&(k.current.dismissOnTouchEnd=!1,k.current.dismissOnMouseDown=!1)}))}),ne=Ze(oe=>{const Fe=is(oe);function Ie(){P(oe),Fe?.removeEventListener(oe.type,Ie)}Fe?.addEventListener(oe.type,Ie)}),ie=Ze(oe=>{const Fe=N.current;if(N.current=!1,Z.clear(),oe.type==="mousedown"&&k.current&&!k.current.dismissOnMouseDown)return;const Ie=is(oe);function Pt(){oe.type==="pointerdown"?Te(oe):be(oe,Fe),Ie?.removeEventListener(oe.type,Pt)}Ie?.addEventListener(oe.type,Pt)}),de=Ze(oe=>{if(fe()!=="sloppy"||!k.current||br(oe,n.select("floatingElement"))||br(oe,n.select("domReferenceElement")))return;const Fe=oe.touches[0];if(!Fe)return;const Ie=Math.abs(Fe.clientX-k.current.startX),Pt=Math.abs(Fe.clientY-k.current.startY),we=Math.sqrt(Ie*Ie+Pt*Pt);we>5&&(k.current.dismissOnTouchEnd=!0),we>10&&(be(oe),Z.clear(),k.current=null)}),Ce=Ze(oe=>{const Fe=is(oe);function Ie(){de(oe),Fe?.removeEventListener(oe.type,Ie)}Fe?.addEventListener(oe.type,Ie)}),_e=Ze(oe=>{fe()!=="sloppy"||!k.current||br(oe,n.select("floatingElement"))||br(oe,n.select("domReferenceElement"))||(k.current.dismissOnTouchEnd&&be(oe),Z.clear(),k.current=null)}),ve=Ze(oe=>{const Fe=is(oe);function Ie(){_e(oe),Fe?.removeEventListener(oe.type,Ie)}Fe?.addEventListener(oe.type,Ie)});I.useEffect(()=>{if(!r||!h)return;d.current.__escapeKeyBubbles=j,d.current.__outsidePressBubbles=$;const oe=new Ii;function Fe(qe){n.setOpen(!1,qt(hv,qe))}function Ie(){oe.clear(),K.current=!0}function Pt(){oe.start(Np()?5:0,()=>{K.current=!1})}const we=En(i);we.addEventListener("pointerdown",ye,!0),y&&(we.addEventListener("keydown",q),we.addEventListener("compositionstart",Ie),we.addEventListener("compositionend",Pt)),D&&(we.addEventListener("click",ie,!0),we.addEventListener("pointerdown",ie,!0),we.addEventListener("touchstart",ne,!0),we.addEventListener("touchmove",Ce,!0),we.addEventListener("touchend",ve,!0),we.addEventListener("mousedown",ie,!0));let Ne=[];return x&&(_t(l)&&(Ne=Ti(l)),_t(i)&&(Ne=Ne.concat(Ti(i))),!_t(c)&&c&&c.contextElement&&(Ne=Ne.concat(Ti(c.contextElement)))),Ne=Ne.filter(qe=>qe!==we.defaultView?.visualViewport),Ne.forEach(qe=>{qe.addEventListener("scroll",Fe,{passive:!0})}),()=>{we.removeEventListener("pointerdown",ye,!0),y&&(we.removeEventListener("keydown",q),we.removeEventListener("compositionstart",Ie),we.removeEventListener("compositionend",Pt)),D&&(we.removeEventListener("click",ie,!0),we.removeEventListener("pointerdown",ie,!0),we.removeEventListener("touchstart",ne,!0),we.removeEventListener("touchmove",Ce,!0),we.removeEventListener("touchend",ve,!0),we.removeEventListener("mousedown",ie,!0)),Ne.forEach(qe=>{qe.removeEventListener("scroll",Fe)}),oe.clear(),N.current=!1}},[d,i,c,l,y,D,r,f,x,h,j,$,q,be,ie,Te,ne,Ce,ve,ye,n]),I.useEffect(le,[D,le]);const Ye=I.useMemo(()=>({onKeyDown:q,...v&&{[fj[_]]:oe=>{n.setOpen(!1,qt(op,oe.nativeEvent))},..._!=="intentional"&&{onClick(oe){n.setOpen(!1,qt(op,oe.nativeEvent))}}}}),[q,n,v,_]),He=Ze(oe=>{const Fe=is(oe.nativeEvent);!vt(n.select("floatingElement"),Fe)||oe.button!==0||(N.current=!0)}),ht=Ze(oe=>{!r||!h||oe.button!==0||(N.current=!0)}),Ft=I.useMemo(()=>({onKeyDown:q,onPointerDown:He,onMouseDown:He,onMouseUp:He,onClickCapture:F,onMouseDownCapture(oe){F(),ht(oe)},onPointerDownCapture(oe){F(),ht(oe)},onMouseUpCapture:F,onTouchEndCapture:F,onTouchMoveCapture:F}),[q,He,F,ht]);return I.useMemo(()=>h?{reference:Ye,floating:Ft,trigger:Ye}:{},[h,Ye,Ft])}var cp=Symbol("NOT_FOUND");function hj(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function pj(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function mj(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var wC=e=>Array.isArray(e)?e:[e];function gj(e){const t=Array.isArray(e[0])?e[0]:e;return mj(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function yj(e,t){const n=[],{length:r}=e;for(let i=0;it(f,h.key));if(d>-1){const h=n[d];return d>0&&(n.splice(d,1),n.unshift(h)),h.value}return cp}function i(f,d){r(f)===cp&&(n.unshift({key:f,value:d}),n.length>e&&n.pop())}function c(){return n}function l(){n=[]}return{get:r,put:i,getEntries:c,clear:l}}var Sj=(e,t)=>e===t;function _j(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let c=0;cc(v.value,y));b&&(y=b.value,f!==0&&f--)}d.put(arguments,y)}return y}return h.clearCache=()=>{d.clear(),h.resetResultsCount()},h.resultsCount=()=>f,h.resetResultsCount=()=>{f=0},h}var Ej=class{constructor(e){this.value=e}deref(){return this.value}},xj=typeof WeakRef<"u"?WeakRef:Ej,Rj=0,EC=1;function bh(){return{s:Rj,v:void 0,o:null,p:null}}function oO(e,t={}){let n=bh();const{resultEqualityCheck:r}=t;let i,c=0;function l(){let f=n;const{length:d}=arguments;for(let g=0,b=d;g{n=bh(),l.resetResultsCount()},l.resultsCount=()=>c,l.resetResultsCount=()=>{c=0},l}function iO(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let c=0,l=0,f,d={},h=i.pop();typeof h=="object"&&(d=h,h=i.pop()),hj(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const y={...n,...d},{memoize:g,memoizeOptions:b=[],argsMemoize:v=oO,argsMemoizeOptions:_=[]}=y,x=wC(b),R=wC(_),C=gj(i),A=g(function(){return c++,h.apply(null,arguments)},...x),O=v(function(){l++;const N=yj(C,arguments);return f=A.apply(null,N),f},...R);return Object.assign(O,{resultFunc:h,memoizedResultFunc:A,dependencies:C,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>f,recomputations:()=>c,resetRecomputations:()=>{c=0},memoize:g,argsMemoize:v})};return Object.assign(r,{withTypes:()=>r}),r}var Cj=iO(oO),Tj=Object.assign((e,t=Cj)=>{pj(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(c=>e[c]);return t(r,(...c)=>c.reduce((l,f,d)=>(l[n[d]]=f,l),{}))},{withTypes:()=>Tj});iO({memoize:wj,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const ot=(e,t,n,r,i,c,...l)=>{if(l.length>0)throw new Error(wo(1));let f;if(e)f=e;else throw new Error("Missing arguments");return f};var Aj=$I();const Ij=ov(19),Oj=Ij?Dj:kj;function Mj(e,t,n,r,i){return Oj(e,t,n,r,i)}function Dj(e,t,n,r,i){const c=I.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return Aj.useSyncExternalStore(e.subscribe,c,c)}function kj(e,t,n,r,i){return UI.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,c=>t(c,n,r,i))}class Ku{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){Ku.prototype.setState.call(this,{...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||Ku.prototype.setState.call(this,{...this.state,[t]:n})}notifyAll(){const t={...this.state};Ku.prototype.setState.call(this,t)}}class bv extends Ku{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}controlledValues=new Map;useSyncedValue(t,n){I.useDebugValue(t),mt(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;mt(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);mt(()=>{n.update(t)},[n,...r])}useControlledProp(t,n,r){I.useDebugValue(t);const i=this,c=n!==void 0;this.controlledValues.has(t)||(this.controlledValues.set(t,c),!c&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})),mt(()=>{c&&!Object.is(i.state[t],n)&&super.setState({...i.state,[t]:n})},[i,t,n,r,c])}set(t,n){this.controlledValues.get(t)!==!0&&super.set(t,n)}update(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.update(n)}setState(t){const n={...t};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.setState({...this.state,...n})}select=(t,n,r,i)=>{const c=this.selectors[t];return c(this.state,n,r,i)};useState=(t,n,r,i)=>{I.useDebugValue(t);const c=this.selectors[t];return Mj(this,c,n,r,i)};useContextCallback(t,n){I.useDebugValue(t);const r=Ze(n??XI);this.context[t]=r}useStateSetter(t){const n=I.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let i=r(this.state);return n(i,i,this),this.subscribe(c=>{const l=r(c);if(!Object.is(i,l)){const f=i;i=l,n(l,f,this)}})}}const Pj={open:ot(e=>e.open),domReferenceElement:ot(e=>e.domReferenceElement),referenceElement:ot(e=>e.positionReference??e.referenceElement),floatingElement:ot(e=>e.floatingElement),floatingId:ot(e=>e.floatingId)};class vv extends bv{constructor(t){const{nested:n,noEmit:r,onOpenChange:i,triggerElements:c,...l}=t;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:i,dataRef:{current:{}},events:a8(),nested:n,noEmit:r,triggerElements:c},Pj)}setOpen=(t,n)=>{if((!t||!this.state.open||b5(n.event))&&(this.context.dataRef.current.openEvent=t?n.event:void 0),!this.context.noEmit){const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(t,n)}}function Nj(e,t=!1,n=!1){const[r,i]=I.useState(e&&t?"idle":void 0),[c,l]=I.useState(e);return e&&!c&&(l(!0),i("starting")),!e&&c&&r!=="ending"&&!n&&i("ending"),!e&&!c&&r==="ending"&&i(void 0),mt(()=>{if(!e&&c&&r!=="ending"&&n){const f=Mr.request(()=>{i("ending")});return()=>{Mr.cancel(f)}}},[e,c,r,n]),mt(()=>{if(!e||t)return;const f=Mr.request(()=>{i(void 0)});return()=>{Mr.cancel(f)}},[t,e]),mt(()=>{if(!e||!t)return;e&&c&&r!=="idle"&&i("starting");const f=Mr.request(()=>{i("idle")});return()=>{Mr.cancel(f)}},[t,e,c,i,r]),I.useMemo(()=>({mounted:c,setMounted:l,transitionStatus:r}),[c,r])}function zj(e,t=!1,n=!0){const r=q2();return Ze((i,c=null)=>{r.cancel();function l(){ki.flushSync(i)}const f=uo(e);if(f==null)return;const d=f;if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let h=function(){const g=af.startingStyle;if(!d.hasAttribute(g)){r.request(y);return}const b=new MutationObserver(()=>{d.hasAttribute(g)||(b.disconnect(),y())});b.observe(d,{attributes:!0,attributeFilter:[g]}),c?.addEventListener("abort",()=>b.disconnect(),{once:!0})},y=function(){Promise.all(d.getAnimations().map(g=>g.finished)).then(()=>{c?.aborted||l()}).catch(()=>{const g=d.getAnimations();if(n){if(c?.aborted)return;l()}else g.length>0&&g.some(b=>b.pending||b.playState!=="finished")&&y()})};if(t){h();return}r.request(y)}})}function Sv(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,c=Ze(i),l=zj(r,n,!1);I.useEffect(()=>{if(!t)return;const f=new AbortController;return l(c,f.signal),()=>{f.abort()}},[t,n,c,l])}function Lj(e,t){const n=I.useRef(null),r=I.useRef(null);return I.useCallback(i=>{if(e!==void 0){if(n.current!==null){const c=n.current,l=r.current,f=t.context.triggerElements.getById(c);l&&f===l&&t.context.triggerElements.delete(c),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function Bj(e,t,n,r){const i=n.useState("isMountedByTrigger",e),c=Lj(e,n),l=Ze(f=>{if(c(f),!f||!n.select("open"))return;const d=n.select("activeTriggerId");if(d===e){n.update({activeTriggerElement:f,...r});return}d==null&&n.update({activeTriggerId:e,activeTriggerElement:f,...r})});return mt(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:i}}function aO(e){const t=e.useState("open");mt(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,i]=n.value;e.update({activeTriggerId:r,activeTriggerElement:i})}}},[t,e])}function cO(e,t,n){const{mounted:r,setMounted:i,transitionStatus:c}=Nj(e);t.useSyncedValues({mounted:r,transitionStatus:c});const l=Ze(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),f=t.useState("preventUnmountingOnClose");return Sv({enabled:!f,open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:c}}class Up{constructor(){this.elements=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elements.delete(r),this.elements.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elements.delete(n),this.idMap.delete(t))}hasElement(t){return this.elements.has(t)}hasMatchingElement(t){for(const n of this.elements)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function $j(){return new vv({open:!1,floatingElement:null,referenceElement:null,triggerElements:new Up,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function lO(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:$j(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:Ds,inactiveTriggerProps:Ds,popupProps:Ds}}const uO={open:ot(e=>e.open),mounted:ot(e=>e.mounted),transitionStatus:ot(e=>e.transitionStatus),floatingRootContext:ot(e=>e.floatingRootContext),preventUnmountingOnClose:ot(e=>e.preventUnmountingOnClose),payload:ot(e=>e.payload),activeTriggerId:ot(e=>e.activeTriggerId),activeTriggerElement:ot(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:ot((e,t)=>t!==void 0&&e.activeTriggerId===t),isOpenedByTrigger:ot((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.open),isMountedByTrigger:ot((e,t)=>t!==void 0&&e.activeTriggerId===t&&e.mounted),triggerProps:ot((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:ot(e=>e.popupProps),popupElement:ot(e=>e.popupElement),positionerElement:ot(e=>e.positionerElement)};function Uj(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=_f(),c=Bp()!=null,l=Lr(()=>new vv({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:r.triggers??new Up,floatingId:i,nested:c,noEmit:e.noEmit||!1})).current;return mt(()=>{const f={open:t,floatingId:i};r.reference!==void 0&&(f.referenceElement=r.reference,f.domReferenceElement=_t(r.reference)?r.reference:null),r.floating!==void 0&&(f.floatingElement=r.floating),l.update(f)},[t,i,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=c,l.context.noEmit=e.noEmit||!1,l}function jj(e={}){const{nodeId:t,externalTree:n}=e,r=Uj(e),i=e.rootContext||r,c={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[l,f]=I.useState(null),d=I.useRef(null),h=xf(n);mt(()=>{c.domReference&&(d.current=c.domReference)},[c.domReference]);const y=rj({...e,elements:{...c,...l&&{reference:l}}}),g=I.useCallback($=>{const k=_t($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),getClientRects:()=>$.getClientRects(),contextElement:$}:$;f(k),y.refs.setReference(k)},[y.refs]),[b,v]=I.useState(null),[_,x]=I.useState(null);i.useSyncedValue("referenceElement",b),i.useSyncedValue("domReferenceElement",_t(b)?b:null),i.useSyncedValue("floatingElement",_);const R=I.useCallback($=>{(_t($)||$===null)&&(d.current=$,v($)),(_t(y.refs.reference.current)||y.refs.reference.current===null||$!==null&&!_t($))&&y.refs.setReference($)},[y.refs,v]),C=I.useCallback($=>{x($),y.refs.setFloating($)},[y.refs]),A=I.useMemo(()=>({...y.refs,setReference:R,setFloating:C,setPositionReference:g,domReference:d}),[y.refs,R,C,g]),O=I.useMemo(()=>({...y.elements,domReference:c.domReference}),[y.elements,c.domReference]),D=i.useState("open"),N=i.useState("floatingId"),j=I.useMemo(()=>({...y,dataRef:i.context.dataRef,open:D,onOpenChange:i.setOpen,events:i.context.events,floatingId:N,refs:A,elements:O,nodeId:t,rootStore:i}),[y,A,O,t,i,D,N]);return mt(()=>{i.context.dataRef.current.floatingContext=j;const $=h?.nodesRef.current.find(k=>k.id===t);$&&($.context=j)}),I.useMemo(()=>({...y,context:j,refs:A,elements:O,rootStore:i}),[y,A,O,j,i])}function fO(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,c=_f(),l=Bp()!=null,f=t.useState("open"),d=t.useState("activeTriggerElement"),h=t.useState(r?"popupElement":"positionerElement"),y=t.context.triggerElements,g=Lr(()=>new vv({open:f,referenceElement:d,floatingElement:h,triggerElements:y,onOpenChange:i,floatingId:c,nested:l,noEmit:n})).current;return mt(()=>{const b={open:f,floatingId:c,referenceElement:d,floatingElement:h};_t(d)&&(b.domReferenceElement=d),g.state.positionReference===g.state.referenceElement&&(b.positionReference=d),g.update(b)},[f,c,d,h,g]),g.context.onOpenChange=i,g.context.nested=l,g.context.noEmit=n,g}const p0=c5&&_2;function Hj(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:c=!0,visibleOnly:l=!0,delay:f}=t,d=I.useRef(!1),h=I.useRef(null),y=Oi(),g=I.useRef(!0);I.useEffect(()=>{const v=n.select("domReferenceElement");if(!c)return;const _=gn(v);function x(){const A=n.select("domReferenceElement");!n.select("open")&&xn(A)&&A===Si(En(A))&&(d.current=!0)}function R(){g.current=!0}function C(){g.current=!1}return _.addEventListener("blur",x),p0&&(_.addEventListener("keydown",R,!0),_.addEventListener("pointerdown",C,!0)),()=>{_.removeEventListener("blur",x),p0&&(_.removeEventListener("keydown",R,!0),_.removeEventListener("pointerdown",C,!0))}},[n,c]),I.useEffect(()=>{if(!c)return;function v(_){if(_.reason===op||_.reason===pv){const x=n.select("domReferenceElement");_t(x)&&(h.current=x,d.current=!0)}}return r.on("openchange",v),()=>{r.off("openchange",v)}},[r,c,n]);const b=I.useMemo(()=>({onMouseLeave(){d.current=!1,h.current=null},onFocus(v){const _=v.currentTarget;if(d.current){if(h.current===_)return;d.current=!1,h.current=null}const x=is(v.nativeEvent);if(l&&_t(x)){if(p0&&!v.relatedTarget){if(!g.current&&!C2(x))return}else if(!h5(x))return}const R=v.relatedTarget&&n.context.triggerElements.hasElement(v.relatedTarget),{nativeEvent:C,currentTarget:A}=v,O=typeof f=="function"?f():f;if(n.select("open")&&R||O===0||O===void 0){n.setOpen(!0,qt(kh,C,A));return}y.start(O,()=>{d.current||n.setOpen(!0,qt(kh,C,A))})},onBlur(v){d.current=!1,h.current=null;const _=v.relatedTarget,x=v.nativeEvent,R=_t(_)&&_.hasAttribute(rl("focus-guard"))&&_.getAttribute("data-type")==="outside";y.start(0,()=>{const C=n.select("domReferenceElement"),A=Si(C?C.ownerDocument:document);if(!_&&A===C||vt(i.current.floatingContext?.refs.floating.current,A)||vt(C,A)||R)return;const O=_??A;if(_t(O)){const D=n.context.triggerElements;if(D.hasElement(O)||D.hasMatchingElement(N=>vt(N,O)))return}n.setOpen(!1,qt(kh,x))})}}),[i,n,l,y,f]);return I.useMemo(()=>c?{reference:b,trigger:b}:{},[c,b])}const Cb=rl("safe-polygon"),Fj=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${R2}`;function Vj(e){return e?!!e.closest(Fj):!1}function dO(e){const t=I.useRef(void 0),n=I.useRef(!1),r=I.useRef(void 0),i=I.useRef(!0),c=I.useRef(!1),l=I.useRef(()=>{}),f=I.useRef(!1),d=Oi(),h=Oi(),y=I.useRef(void 0);return I.useMemo(()=>{const g=e.context.dataRef.current;return g.hoverInteractionState||(g.hoverInteractionState={pointerTypeRef:t,interactedInsideRef:n,handlerRef:r,blockMouseMoveRef:i,performedPointerEventsMutationRef:c,unbindMouseMoveRef:l,restTimeoutPendingRef:f,openChangeTimeout:d,restTimeout:h,handleCloseOptionsRef:y}),g.hoverInteractionState},[e,t,n,r,i,c,l,f,d,h,y])}const qj=new Set(["click","mousedown"]);function Gj(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),c=n.useState("domReferenceElement"),{dataRef:l}=n.context,{enabled:f=!0,closeDelay:d=0,externalTree:h}=t,{pointerTypeRef:y,interactedInsideRef:g,handlerRef:b,performedPointerEventsMutationRef:v,unbindMouseMoveRef:_,restTimeoutPendingRef:x,openChangeTimeout:R,handleCloseOptionsRef:C}=dO(n),A=xf(h),O=Bp(),D=Ze(()=>g.current?!0:l.current.openEvent?qj.has(l.current.openEvent.type):!1),N=Ze(()=>{const se=l.current.openEvent?.type;return se?.includes("mouse")&&se!=="mousedown"}),j=I.useCallback((se,le=!0)=>{const K=Kj(d,y.current);K&&!b.current?R.start(K,()=>n.setOpen(!1,qt(_r,se))):le&&(R.clear(),n.setOpen(!1,qt(_r,se)))},[d,b,n,y,R]),$=Ze(()=>{_.current(),b.current=void 0}),k=Ze(()=>{if(v.current){const se=En(i).body;se.style.pointerEvents="",se.removeAttribute(Cb),v.current=!1}}),Z=Ze(se=>{const le=is(se);if(!Vj(le)){g.current=!1;return}g.current=!0});mt(()=>{r||(y.current=void 0,x.current=!1,g.current=!1,$(),k())},[r,y,x,g,$,k]),I.useEffect(()=>()=>{$()},[$]),I.useEffect(()=>k,[k]),mt(()=>{if(f&&r&&C.current?.blockPointerEvents&&N()&&_t(c)&&i){v.current=!0;const se=En(i).body;se.setAttribute(Cb,"");const le=c,K=i,Q=A?.nodesRef.current.find(ye=>ye.id===O)?.context?.elements.floating;return Q&&(Q.style.pointerEvents=""),se.style.pointerEvents="none",le.style.pointerEvents="auto",K.style.pointerEvents="auto",()=>{se.style.pointerEvents="",le.style.pointerEvents="",K.style.pointerEvents=""}}},[f,r,c,i,C,N,A,O,v]),I.useEffect(()=>{if(!f)return;function se(ye){if(D()||!l.current.floatingContext||!n.select("open"))return;const fe=n.context.triggerElements;ye.relatedTarget&&fe.hasElement(ye.relatedTarget)||(k(),$(),D()||j(ye))}function le(ye){R.clear(),k(),b.current?.(ye),$()}function K(ye){D()||j(ye,!1)}const Q=i;return Q&&(Q.addEventListener("mouseleave",se),Q.addEventListener("mouseenter",le),Q.addEventListener("mouseleave",K),Q.addEventListener("pointerdown",Z,!0)),()=>{Q&&(Q.removeEventListener("mouseleave",se),Q.removeEventListener("mouseenter",le),Q.removeEventListener("mouseleave",K),Q.removeEventListener("pointerdown",Z,!0))}})}function Kj(e,t){return t&&!of(t)?0:typeof e=="function"?e():e}function m0(e){return typeof e=="function"?e():e}const Zj={current:null};function Qj(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:c=!0,delay:l=0,handleClose:f=null,mouseOnly:d=!1,restMs:h=0,move:y=!0,triggerElementRef:g=Zj,externalTree:b,isActiveTrigger:v=!0}=t,_=xf(b),{pointerTypeRef:x,interactedInsideRef:R,handlerRef:C,blockMouseMoveRef:A,performedPointerEventsMutationRef:O,unbindMouseMoveRef:D,restTimeoutPendingRef:N,openChangeTimeout:j,restTimeout:$,handleCloseOptionsRef:k}=dO(n),Z=Dr(f),se=Dr(l),le=Dr(h);v&&(k.current=Z.current?.__options);const K=Ze(()=>R.current?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),Q=I.useCallback((W,F=!0)=>{const be=Ph(se.current,"close",x.current);be&&!C.current?j.start(be,()=>n.setOpen(!1,qt(_r,W))):F&&(j.clear(),n.setOpen(!1,qt(_r,W)))},[se,C,n,x,j]),ye=Ze(()=>{D.current(),C.current=void 0}),fe=Ze(()=>{if(O.current){const W=En(n.select("domReferenceElement")).body;W.style.pointerEvents="",W.removeAttribute(Cb),O.current=!1}});I.useEffect(()=>{if(!c)return;function W(F){F.open||(j.clear(),$.clear(),A.current=!0,N.current=!1)}return i.on("openchange",W),()=>{i.off("openchange",W)}},[c,i,j,$,A,N]);const q=Ze(W=>{if(K()||!r.current.floatingContext)return;const F=n.context.triggerElements;if(W.relatedTarget&&F.hasElement(W.relatedTarget))return;const be=g.current;Z.current?.({...r.current.floatingContext,tree:_,x:W.clientX,y:W.clientY,onClose(){fe(),ye(),!K()&&be===n.select("domReferenceElement")&&Q(W)}})(W)});return I.useEffect(()=>{if(!c)return;const W=g.current??(v?n.select("domReferenceElement"):null);if(!_t(W))return;function F(P){if(j.clear(),A.current=!1,d&&!of(x.current)||m0(le.current)>0&&!Ph(se.current,"open"))return;const ne=Ph(se.current,"open",x.current),ie=n.select("domReferenceElement"),de=n.context.triggerElements,Ce=(de.hasElement(P.target)||de.hasMatchingElement(He=>vt(He,P.target)))&&(!ie||!vt(ie,P.target)),_e=P.currentTarget??null,ve=n.select("open"),Ye=!ve||Ce;Ce&&ve?n.setOpen(!0,qt(_r,P,_e)):ne?j.start(ne,()=>{Ye&&n.setOpen(!0,qt(_r,P,_e))}):Ye&&n.setOpen(!0,qt(_r,P,_e))}function be(P){if(K()){fe();return}D.current();const ne=n.select("domReferenceElement"),ie=En(ne);$.clear(),N.current=!1;const de=n.context.triggerElements;if(P.relatedTarget&&de.hasElement(P.relatedTarget))return;if(Z.current&&r.current.floatingContext){n.select("open")||j.clear();const _e=g.current;C.current=Z.current({...r.current.floatingContext,tree:_,x:P.clientX,y:P.clientY,onClose(){fe(),ye(),!K()&&_e===n.select("domReferenceElement")&&Q(P,!0)}});const ve=C.current;ve(P),ie.addEventListener("mousemove",ve),D.current=()=>{ie.removeEventListener("mousemove",ve)};return}(x.current!=="touch"||!vt(n.select("floatingElement"),P.relatedTarget))&&Q(P)}function Te(P){q(P)}return n.select("open")&&W.addEventListener("mouseleave",Te),y&&W.addEventListener("mousemove",F,{once:!0}),W.addEventListener("mouseenter",F),W.addEventListener("mouseleave",be),()=>{W.removeEventListener("mouseleave",Te),y&&W.removeEventListener("mousemove",F),W.removeEventListener("mouseenter",F),W.removeEventListener("mouseleave",be)}},[ye,fe,A,r,se,Q,n,c,Z,q,v,K,d,y,x,le,$,N,j,g,_,D,C]),I.useMemo(()=>{function W(F){x.current=F.pointerType}return{onPointerDown:W,onPointerEnter:W,onMouseMove(F){const{nativeEvent:be}=F,Te=F.currentTarget,P=n.select("domReferenceElement"),ne=n.context.triggerElements,ie=n.select("open"),de=(ne.hasElement(F.target)||ne.hasMatchingElement(_e=>vt(_e,F.target)))&&(!P||!vt(P,F.target));if(d&&!of(x.current)||ie&&!de||m0(le.current)===0||!de&&N.current&&F.movementX**2+F.movementY**2<2)return;$.clear();function Ce(){if(N.current=!1,K())return;const _e=n.select("open");!A.current&&(!_e||de)&&n.setOpen(!0,qt(_r,be,Te))}x.current==="touch"?ki.flushSync(()=>{Ce()}):de&&ie?Ce():(N.current=!0,$.start(m0(le.current),Ce))}}},[A,K,d,n,x,le,$,N])}function hO(e=[]){const t=e.map(h=>h?.reference),n=e.map(h=>h?.floating),r=e.map(h=>h?.item),i=e.map(h=>h?.trigger),c=I.useCallback(h=>vh(h,e,"reference"),t),l=I.useCallback(h=>vh(h,e,"floating"),n),f=I.useCallback(h=>vh(h,e,"item"),r),d=I.useCallback(h=>vh(h,e,"trigger"),i);return I.useMemo(()=>({getReferenceProps:c,getFloatingProps:l,getItemProps:f,getTriggerProps:d}),[c,l,f,d])}function vh(e,t,n){const r=new Map,i=n==="item",c={};n==="floating"&&(c.tabIndex=-1,c[vb]="");for(const l in e)i&&e&&(l===E2||l===x2)||(c[l]=e[l]);for(let l=0;lr.get(i)?.map(f=>f(...l)).find(f=>f!==void 0))):e[i]=c)}}const Yj=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Xj(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingId"),c=n.useState("domReferenceElement"),l=n.useState("floatingElement"),{enabled:f=!0,role:d="dialog"}=t,h=_f(),y=c?.id||h,g=I.useMemo(()=>Sb(l)?.id||i,[l,i]),b=Yj.get(d)??d,_=Bp()!=null,x=I.useMemo(()=>b==="tooltip"||d==="label"?Ds:{"aria-haspopup":b==="alertdialog"?"dialog":b,"aria-expanded":"false",...b==="listbox"&&{role:"combobox"},...b==="menu"&&_&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[b,_,d]),R=I.useMemo(()=>b==="tooltip"||d==="label"?{[`aria-${d==="label"?"labelledby":"describedby"}`]:r?g:void 0}:{...x,"aria-expanded":r?"true":"false","aria-controls":r?g:void 0,...b==="menu"&&{id:y}},[b,g,r,y,d,x]),C=I.useMemo(()=>{const O={id:g,...b&&{role:b}};return b==="tooltip"||d==="label"?O:{...O,...b==="menu"&&{"aria-labelledby":y}}},[b,g,y,d]),A=I.useCallback(({active:O,selected:D})=>{const N={role:"option",...O&&{id:`${g}-fui-option`}};switch(d){case"select":case"combobox":return{...N,"aria-selected":D}}return{}},[g,d]);return I.useMemo(()=>f?{reference:R,floating:C,item:A,trigger:x}:{},[f,R,C,x,A])}function RC(e,t){const[n,r]=e;let i=!1;const c=t.length;for(let l=0,f=c-1;l=r!=g>=r&&n<=(y-d)*(r-h)/(g-h)+d&&(i=!i)}return i}function Wj(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Jj(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i=new Ii;let c=!1,l=null,f=null,d=typeof performance<"u"?performance.now():0;function h(g,b){const v=performance.now(),_=v-d;if(l===null||f===null||_===0)return l=g,f=b,d=v,null;const x=g-l,R=b-f,A=Math.sqrt(x*x+R*R)/_;return l=g,f=b,d=v,A}const y=({x:g,y:b,placement:v,elements:_,onClose:x,nodeId:R,tree:C})=>function(O){function D(){i.clear(),x()}if(i.clear(),!_.domReference||!_.floating||v==null||g==null||b==null)return;const{clientX:N,clientY:j}=O,$=[N,j],k=is(O),Z=O.type==="mouseleave",se=vt(_.floating,k),le=vt(_.domReference,k),K=_.domReference.getBoundingClientRect(),Q=_.floating.getBoundingClientRect(),ye=v.split("-")[0],fe=g>Q.right-Q.width/2,q=b>Q.bottom-Q.height/2,W=Wj($,K),F=Q.width>K.width,be=Q.height>K.height,Te=(F?K:Q).left,P=(F?K:Q).right,ne=(be?K:Q).top,ie=(be?K:Q).bottom;if(se&&(c=!0,!Z))return;if(le&&(c=!1),le&&!Z){c=!0;return}if(Z&&_t(O.relatedTarget)&&vt(_.floating,O.relatedTarget)||C&&Ca(C.nodesRef.current,R).some(({context:_e})=>_e?.open))return;if(ye==="top"&&b>=K.bottom-1||ye==="bottom"&&b<=K.top+1||ye==="left"&&g>=K.right-1||ye==="right"&&g<=K.left+1)return D();let de=[];switch(ye){case"top":de=[[Te,K.top+1],[Te,Q.bottom-1],[P,Q.bottom-1],[P,K.top+1]];break;case"bottom":de=[[Te,Q.top+1],[Te,K.bottom-1],[P,K.bottom-1],[P,Q.top+1]];break;case"left":de=[[Q.right-1,ie],[Q.right-1,ne],[K.left+1,ne],[K.left+1,ie]];break;case"right":de=[[K.right-1,ie],[K.right-1,ne],[Q.left+1,ne],[Q.left+1,ie]];break}function Ce([_e,ve]){switch(ye){case"top":{const Ye=[F?_e+t/2:fe?_e+t*4:_e-t*4,ve+t+1],He=[F?_e-t/2:fe?_e+t*4:_e-t*4,ve+t+1],ht=[[Q.left,fe||F?Q.bottom-t:Q.top],[Q.right,fe?F?Q.bottom-t:Q.top:Q.bottom-t]];return[Ye,He,...ht]}case"bottom":{const Ye=[F?_e+t/2:fe?_e+t*4:_e-t*4,ve-t],He=[F?_e-t/2:fe?_e+t*4:_e-t*4,ve-t],ht=[[Q.left,fe||F?Q.top+t:Q.bottom],[Q.right,fe?F?Q.top+t:Q.bottom:Q.top+t]];return[Ye,He,...ht]}case"left":{const Ye=[_e+t+1,be?ve+t/2:q?ve+t*4:ve-t*4],He=[_e+t+1,be?ve-t/2:q?ve+t*4:ve-t*4];return[...[[q||be?Q.right-t:Q.left,Q.top],[q?be?Q.right-t:Q.left:Q.right-t,Q.bottom]],Ye,He]}case"right":{const Ye=[_e-t,be?ve+t/2:q?ve+t*4:ve-t*4],He=[_e-t,be?ve-t/2:q?ve+t*4:ve-t*4],ht=[[q||be?Q.left+t:Q.right,Q.top],[q?be?Q.left+t:Q.right:Q.left+t,Q.bottom]];return[Ye,He,...ht]}default:return[]}}if(!RC([N,j],de)){if(c&&!W)return D();if(!Z&&r){const _e=h(O.clientX,O.clientY);if(_e!==null&&_e<.1)return D()}RC([N,j],Ce([g,b]))?!c&&r&&i.start(40,D):D()}};return y.__options={blockPointerEvents:n},y}let e9=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),t9=(function(e){return e[e.open=wa.open]="open",e[e.closed=wa.closed]="closed",e[e.startingStyle=wa.startingStyle]="startingStyle",e[e.endingStyle=wa.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const pO=I.createContext(void 0);function n9(){const e=I.useContext(pO);if(e===void 0)throw new Error(wo(26));return e}const mO="ArrowUp",gO="ArrowDown",yO="ArrowLeft",bO="ArrowRight",vO="Home",SO="End",s9=new Set([yO,bO]),r9=new Set([mO,gO]),o9=new Set([...s9,...r9]);[...o9];const i9=new Set([mO,gO,yO,bO,vO,SO]),a9={...Ef,...mv,nestedDialogOpen(e){return e?{[t9.nestedDialogOpen]:""}:null}},c9=I.forwardRef(function(t,n){const{className:r,finalFocus:i,initialFocus:c,render:l,...f}=t,{store:d}=$a(),h=d.useState("descriptionElementId"),y=d.useState("disablePointerDismissal"),g=d.useState("floatingRootContext"),b=d.useState("popupProps"),v=d.useState("modal"),_=d.useState("mounted"),x=d.useState("nested"),R=d.useState("nestedOpenDialogCount"),C=d.useState("open"),A=d.useState("openMethod"),O=d.useState("titleElementId"),D=d.useState("transitionStatus"),N=d.useState("role");n9(),Sv({open:C,ref:d.context.popupRef,onComplete(){C&&d.context.onOpenChangeComplete?.(!0)}});function j(le){return le==="touch"?d.context.popupRef.current:!0}const $=c===void 0?j:c,k=R>0,Z=I.useMemo(()=>({open:C,nested:x,transitionStatus:D,nestedDialogOpen:k}),[C,x,D,k]),se=cr("div",t,{state:Z,props:[b,{"aria-labelledby":O??void 0,"aria-describedby":h??void 0,role:N,tabIndex:-1,hidden:!_,onKeyDown(le){i9.has(le.key)&&le.stopPropagation()},style:{[e9.nestedDialogs]:R}},f],ref:[n,d.context.popupRef,d.useStateSetter("popupElement")],stateAttributesMapping:a9});return U.jsx(w8,{context:g,openInteractionType:A,disabled:!_,closeOnFocusOut:!y,initialFocus:$,returnFocus:i,modal:v!==!1,restoreFocus:"popup",children:se})});function l9(e){return ov(19)?e:e?"true":void 0}const u9=I.forwardRef(function(t,n){const{cutout:r,...i}=t;let c;if(r){const l=r?.getBoundingClientRect();c=`polygon( 0% 0%, 100% 0%, 100% 100%, @@ -18,9 +18,9 @@ Error generating stack: `+u.message+` ${l.right}px ${l.bottom}px, ${l.right}px ${l.top}px, ${l.left}px ${l.top}px - )`}return U.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:c}})}),f9=I.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:c}=$a(),l=c.useState("mounted"),f=c.useState("modal"),d=c.useState("open");return l||r?U.jsx(pO.Provider,{value:r,children:U.jsxs(y8,{ref:n,...i,children:[l&&f===!0&&U.jsx(u9,{ref:c.context.internalBackdropRef,inert:l9(!d)}),t.children]})}):null});let CC={},TC={},AC="";function d9(e){if(typeof document>"u")return!1;const t=Ba(e);return gn(t).innerWidth-t.documentElement.clientWidth>0}function h9(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const r=Ba(e).documentElement,i={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY};r.style.scrollbarGutter="stable",r.style.overflowY="scroll";const c=r.offsetWidth;r.style.overflowY="hidden";const l=r.offsetWidth;return Object.assign(r.style,i),c===l}function p9(e){const t=Ba(e),n=t.documentElement,r=t.body,i=La(n)?n:r,c=i.style.overflow;return i.style.overflow="hidden",()=>{i.style.overflow=c}}function m9(e){const t=Ba(e),n=t.documentElement,r=t.body,i=gn(n);let c=0,l=0,f=!1;const d=Mr.create();if(a5&&(i.visualViewport?.scale??1)!==1)return()=>{};function h(){const v=i.getComputedStyle(n),b=i.getComputedStyle(r),R=(v.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";c=n.scrollTop,l=n.scrollLeft,CC={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},AC=n.style.scrollBehavior,TC={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};const C=n.scrollHeight>n.clientHeight,A=n.scrollWidth>n.clientWidth,O=v.overflowY==="scroll"||b.overflowY==="scroll",D=v.overflowX==="scroll"||b.overflowX==="scroll",N=Math.max(0,i.innerWidth-r.clientWidth),j=Math.max(0,i.innerHeight-r.clientHeight),$=parseFloat(b.marginTop)+parseFloat(b.marginBottom),k=parseFloat(b.marginLeft)+parseFloat(b.marginRight),Z=La(n)?n:r;if(f=h9(e),f){n.style.scrollbarGutter=R,Z.style.overflowY="hidden",Z.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:R,overflowY:"hidden",overflowX:"hidden"}),(C||O)&&(n.style.overflowY="scroll"),(A||D)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:$||j?`calc(100dvh - ${$+j}px)`:"100dvh",width:k||N?`calc(100vw - ${k+N}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=c,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function y(){Object.assign(n.style,CC),Object.assign(r.style,TC),f||(n.scrollTop=c,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=AC)}function g(){y(),d.request(h)}return h(),i.addEventListener("resize",g),()=>{d.cancel(),y(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",g)}}class g9{lockCount=0;restore=null;timeoutLock=Ii.create();timeoutUnlock=Ii.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Ba(t).documentElement,i=gn(r).getComputedStyle(r).overflowY;if(i==="hidden"||i==="clip"){this.restore=XI;return}const c=S2||!d9(t);this.restore=c?p9(t):m9(t)}}const y9=new g9;function v9(e=!0,t=null){mt(()=>{if(e)return y9.acquire(t)},[e,t])}function b9(e){const t=I.useRef(""),n=I.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:I.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i&&e(i,i.pointerType),e(i,t.current),t.current=""},[e]),onPointerDown:n}}function S9(e){const[t,n]=I.useState(null),r=Ze((f,d)=>{e||n(d||(S2?"touch":""))}),i=I.useCallback(()=>{n(null)},[]),{onClick:c,onPointerDown:l}=b9(r);return I.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:c,onPointerDown:l}}),[t,i,c,l])}function _9(e){const{store:t,parentContext:n,actionsRef:r}=e,i=t.useState("open"),c=t.useState("disablePointerDismissal"),l=t.useState("modal"),f=t.useState("popupElement"),{openMethod:d,triggerProps:h,reset:y}=S9(i);aO(t);const{forceUnmount:g}=cO(i,t,()=>{y()}),v=Ze(se=>{const le=qt(se);return le.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},le}),b=I.useCallback(()=>{t.setOpen(!1,v(U2))},[t,v]);I.useImperativeHandle(r,()=>({unmount:g,close:b}),[g,b]);const _=fO({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[x,R]=I.useState(0),C=x===0,A=Xj(_),O=rO(_,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:l==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(se){if("button"in se&&se.button!==0||"touches"in se&&se.touches.length!==1)return!1;const le=is(se);if(C&&!c){const K=le;return l&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===K||t.context.backdropRef.current===K||bt(K,f)&&!K?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:C});v9(i&&l===!0,f);const{getReferenceProps:D,getFloatingProps:N,getTriggerProps:j}=hO([A,O]);t.useContextCallback("onNestedDialogOpen",se=>{R(se+1)}),t.useContextCallback("onNestedDialogClose",()=>{R(0)}),I.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(x),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,x]);const $=I.useMemo(()=>D(h),[D,h]),k=I.useMemo(()=>j(h),[j,h]),Z=I.useMemo(()=>N(),[N]);t.useSyncedValues({openMethod:d,activeTriggerProps:$,inactiveTriggerProps:k,popupProps:Z,floatingRootContext:_,nestedOpenDialogCount:x})}const w9={...uO,modal:ot(e=>e.modal),nested:ot(e=>e.nested),nestedOpenDialogCount:ot(e=>e.nestedOpenDialogCount),disablePointerDismissal:ot(e=>e.disablePointerDismissal),openMethod:ot(e=>e.openMethod),descriptionElementId:ot(e=>e.descriptionElementId),titleElementId:ot(e=>e.titleElementId),viewportElement:ot(e=>e.viewportElement),role:ot(e=>e.role)};class E9 extends vb{constructor(t){super(x9(t),{popupRef:I.createRef(),backdropRef:I.createRef(),internalBackdropRef:I.createRef(),triggerElements:new Up,onOpenChange:void 0,onOpenChangeComplete:void 0},w9)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;const r={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",r);const i={open:t},c=n.trigger?.id??null;(c||t)&&(i.activeTriggerId=c,i.activeTriggerElement=n.trigger??null),this.update(i)}}function x9(e={}){return{...lO(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function R9(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:c,disablePointerDismissal:l=!1,modal:f=!0,actionsRef:d,handle:h,triggerId:y,defaultTriggerId:g=null}=e,v=$a(!0),b=!!v,_=zr(()=>h?.store??new E9({open:n??r,activeTriggerId:y!==void 0?y:g,modal:f,disablePointerDismissal:l,nested:b})).current;_.useControlledProp("open",n,r),_.useControlledProp("activeTriggerId",y,g),_.useSyncedValues({disablePointerDismissal:l,nested:b,modal:f}),_.useContextCallback("onOpenChange",i),_.useContextCallback("onOpenChangeComplete",c);const x=_.useState("payload");_9({store:_,actionsRef:d,parentContext:v?.store.context});const R=I.useMemo(()=>({store:_}),[_]);return U.jsx(j2.Provider,{value:R,children:typeof t=="function"?t({payload:x}):t})}const C9=I.forwardRef(function(t,n){const{render:r,className:i,id:c,...l}=t,{store:f}=$a(),d=lb(c);return f.useSyncedValueWithCleanup("titleElementId",d),cr("h2",t,{ref:n,props:[{id:d},l]})});function T9(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=U.jsx(R9,{"data-slot":"sheet",...n}),t[2]=n,t[3]=r):r=t[3],r}function A9(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=U.jsx(f9,{"data-slot":"sheet-portal",...n}),t[2]=n,t[3]=r):r=t[3],r}function I9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=nn("data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 z-50 bg-black/80 duration-100 data-closed:animate-out data-open:animate-in data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=U.jsx(s8,{className:i,"data-slot":"sheet-overlay",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function O9(e){const t=Ct.c(17);let n,r,i,c,l;t[0]!==e?({className:r,children:n,side:c,showCloseButton:l,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5]);const f=c===void 0?"right":c,d=l===void 0?!0:l;let h;t[6]===Symbol.for("react.memo_cache_sentinel")?(h=U.jsx(I9,{}),t[6]=h):h=t[6];let y;t[7]!==r?(y=nn("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 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=top]:inset-x-0 data-[side=left]:inset-y-0 data-[side=right]:inset-y-0 data-[side=top]:top-0 data-[side=right]:right-0 data-[side=bottom]:bottom-0 data-[side=left]:left-0 data-[side=bottom]:h-auto data-[side=left]:h-full data-[side=right]:h-full data-[side=top]:h-auto data-[side=left]:w-3/4 data-[side=right]:w-3/4 data-closed:animate-out data-open:animate-in data-[side=bottom]:border-t data-[side=left]:border-r data-[side=top]:border-b data-[side=right]:border-l data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",r),t[7]=r,t[8]=y):y=t[8];let g;t[9]!==d?(g=d&&U.jsxs(r8,{"data-slot":"sheet-close",render:U.jsx(el,{className:"absolute top-4 right-4",size:"icon-sm",variant:"ghost"}),children:[U.jsx(K$,{}),U.jsx("span",{className:"sr-only",children:"Close"})]}),t[9]=d,t[10]=g):g=t[10];let v;return t[11]!==n||t[12]!==i||t[13]!==f||t[14]!==y||t[15]!==g?(v=U.jsxs(A9,{children:[h,U.jsxs(c9,{className:y,"data-side":f,"data-slot":"sheet-content",...i,children:[n,g]})]}),t[11]=n,t[12]=i,t[13]=f,t[14]=y,t[15]=g,t[16]=v):v=t[16],v}function M9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=nn("flex flex-col gap-1.5 p-6",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=U.jsx("div",{className:i,"data-slot":"sheet-header",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function D9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=nn("font-medium text-foreground text-sm",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=U.jsx(C9,{className:i,"data-slot":"sheet-title",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function k9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=nn("text-muted-foreground text-xs/relaxed",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=U.jsx(o8,{className:i,"data-slot":"sheet-description",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}const _O=I.createContext(void 0);function Rf(e){const t=I.useContext(_O);if(t===void 0&&!e)throw new Error(wo(72));return t}const P9={...uO,disabled:ot(e=>e.disabled),instantType:ot(e=>e.instantType),isInstantPhase:ot(e=>e.isInstantPhase),trackCursorAxis:ot(e=>e.trackCursorAxis),disableHoverablePopup:ot(e=>e.disableHoverablePopup),lastOpenChangeReason:ot(e=>e.openChangeReason),closeDelay:ot(e=>e.closeDelay),hasViewport:ot(e=>e.hasViewport)};class _b extends vb{constructor(t){super({...N9(),...t},{popupRef:I.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Up},P9)}setOpen=(t,n)=>{const r=n.reason,i=r===_r,c=t&&r===kh,l=!t&&(r===op||r===pb);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;const f=()=>{const d={open:t,openChangeReason:r};c?d.instantType="focus":l?d.instantType="dismiss":r===_r&&(d.instantType=void 0);const h=n.trigger?.id??null;(h||t)&&(d.activeTriggerId=h,d.activeTriggerElement=n.trigger??null),this.update(d)};i?ki.flushSync(f):f()};static useStore(t,n){const r=zr(()=>new _b(n)).current,i=t??r,c=fO({popupStore:i,onOpenChange:i.setOpen});return i.state.floatingRootContext=c,i}}function N9(){return{...lO(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0,hasViewport:!1}}function z9(e){const{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:c="none",actionsRef:l,onOpenChange:f,onOpenChangeComplete:d,handle:h,triggerId:y,defaultTriggerId:g=null,children:v}=e,b=_b.useStore(h?.store,{open:r??n,activeTriggerId:y!==void 0?y:g});b.useControlledProp("open",r,n),b.useControlledProp("activeTriggerId",y,g),b.useContextCallback("onOpenChange",f),b.useContextCallback("onOpenChangeComplete",d);const _=b.useState("open"),x=!t&&_,R=b.useState("activeTriggerId"),C=b.useState("payload");b.useSyncedValues({trackCursorAxis:c,disableHoverablePopup:i}),mt(()=>{_&&t&&b.setOpen(!1,qt(K5))},[_,t,b]),b.useSyncedValue("disabled",t),aO(b);const{forceUnmount:A,transitionStatus:O}=cO(x,b),D=b.useState("isInstantPhase"),N=b.useState("instantType"),j=b.useState("lastOpenChangeReason"),$=I.useRef(null);mt(()=>{O==="ending"&&j===hb||O!=="ending"&&D?(N!=="delay"&&($.current=N),b.set("instantType","delay")):$.current!==null&&(b.set("instantType",$.current),$.current=null)},[O,D,j,N,b]),mt(()=>{x&&R==null&&b.set("payload",void 0)},[b,R,x]);const k=I.useCallback(()=>{b.setOpen(!1,L9(b,U2))},[b]);I.useImperativeHandle(l,()=>({unmount:A,close:k}),[A,k]);const Z=b.useState("floatingRootContext"),se=Hj(Z,{enabled:!t}),le=rO(Z,{enabled:!t,referencePress:!0}),K=x8(Z,{enabled:!t&&c!=="none",axis:c==="none"?void 0:c}),{getReferenceProps:Q,getFloatingProps:ye,getTriggerProps:fe}=hO([se,le,K]),q=I.useMemo(()=>Q(),[Q]),W=I.useMemo(()=>fe(),[fe]),F=I.useMemo(()=>ye(),[ye]);return b.useSyncedValues({activeTriggerProps:q,inactiveTriggerProps:W,popupProps:F}),U.jsx(_O.Provider,{value:b,children:typeof v=="function"?v({payload:C}):v})}function L9(e,t){const n=qt(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}const wO=I.createContext(void 0);function B9(){return I.useContext(wO)}const $9=600,U9=I.forwardRef(function(t,n){const{className:r,render:i,handle:c,payload:l,disabled:f,delay:d,closeDelay:h,id:y,...g}=t,v=Rf(!0),b=c?.store??v;if(!b)throw new Error(wo(82));const _=lb(y),x=b.useState("isTriggerActive",_),R=b.useState("isOpenedByTrigger",_),C=b.useState("floatingRootContext"),A=I.useRef(null),O=d??$9,D=h??0,{registerTrigger:N,isMountedByThisTrigger:j}=Bj(_,A,b,{payload:l,closeDelay:D}),$=B9(),{delayRef:k,isInstantPhase:Z,hasProvider:se}=f8(C,{open:R});b.useSyncedValue("isInstantPhase",Z);const le=b.useState("disabled"),K=f??le,Q=b.useState("trackCursorAxis"),ye=b.useState("disableHoverablePopup"),fe=Qj(C,{enabled:!K,mouseOnly:!0,move:!1,handleClose:!ye&&Q!=="both"?Jj():null,restMs(){const ve=$?.delay,Te=typeof k.current=="object"?k.current.open:void 0;let P=O;return se&&(Te!==0?P=d??ve??O:P=0),P},delay(){const ve=typeof k.current=="object"?k.current.close:void 0;let Te=D;return h==null&&se&&(Te=ve),{close:Te}},triggerElementRef:A,isActiveTrigger:x}),q=I.useMemo(()=>({open:R}),[R]),W=b.useState("triggerProps",j);return cr("button",t,{state:q,ref:[n,N,A],props:[fe,W,{id:_},g],stateAttributesMapping:t8})}),EO=I.createContext(void 0);function j9(){const e=I.useContext(EO);if(e===void 0)throw new Error(wo(70));return e}const H9=I.forwardRef(function(t,n){const{children:r,container:i,className:c,render:l,...f}=t,{portalNode:d,portalSubtree:h}=Q2({container:i,ref:n,componentProps:t,elementProps:f});return!h&&!d?null:U.jsxs(I.Fragment,{children:[h,d&&ki.createPortal(r,d)]})}),F9=I.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t;return Rf().useState("mounted")||r?U.jsx(EO.Provider,{value:r,children:U.jsx(H9,{ref:n,...i})}):null}),xO=I.createContext(void 0);function RO(){const e=I.useContext(xO);if(e===void 0)throw new Error(wo(71));return e}const V9=I.createContext(void 0);function q9(){return I.useContext(V9)?.direction??"ltr"}const G9=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:c,platform:l,elements:f,middlewareData:d}=t,{element:h,padding:y=0,offsetParent:g="real"}=bo(e,t)||{};if(h==null)return{};const v=T2(y),b={x:n,y:r},_=db(i),x=fb(_),R=await l.getDimensions(h),C=_==="y",A=C?"top":"left",O=C?"bottom":"right",D=C?"clientHeight":"clientWidth",N=c.reference[x]+c.reference[_]-b[_]-c.floating[x],j=b[_]-c.reference[_],$=g==="real"?await l.getOffsetParent?.(h):f.floating;let k=f.floating[D]||c.floating[x];(!k||!await l.isElement?.($))&&(k=f.floating[D]||c.floating[x]);const Z=N/2-j/2,se=k/2-R[x]/2-1,le=Math.min(v[A],se),K=Math.min(v[O],se),Q=le,ye=k-R[x]-K,fe=k/2-R[x]/2+Z,q=_v(Q,fe,ye),W=!d.arrow&&Ni(i)!=null&&fe!==q&&c.reference[x]/2-(fe({...G9(e),options:[e,t]}),Z9={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,c=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await uj().fn(e)).data?.referenceHidden||c}}}},zh={sideX:"left",sideY:"top"},Q9={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:c,strategy:l,placement:f}=e,d=gn(i),h=d.getComputedStyle(i);if(!(h.transitionDuration!=="0s"&&h.transitionDuration!==""))return{x:t,y:n,data:zh};const g=await c.getOffsetParent?.(i);let v={width:0,height:0};if(l==="fixed"&&d?.visualViewport)v={width:d.visualViewport.width,height:d.visualViewport.height};else if(g===d){const A=Ba(i);v={width:A.documentElement.clientWidth,height:A.documentElement.clientHeight}}else await c.isElement?.(g)&&(v=await c.getDimensions(g));const b=ys(f);let _=t,x=n;b==="left"&&(_=v.width-(t+r.width)),b==="top"&&(x=v.height-(n+r.height));const R=b==="left"?"right":zh.sideX,C=b==="top"?"bottom":zh.sideY;return{x:_,y:x,data:{sideX:R,sideY:C}}}};function CO(e,t,n){const 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 IC(e,t,n){const{rects:r,placement:i}=e;return{side:CO(t,ys(i),n),align:Ni(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Y9(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:c="center",alignOffset:l=0,collisionBoundary:f,collisionPadding:d=5,sticky:h=!1,arrowPadding:y=5,disableAnchorTracking:g=!1,keepMounted:v=!1,floatingRootContext:b,mounted:_,collisionAvoidance:x,shiftCrossAxis:R=!1,nodeId:C,adaptiveOrigin:A,lazyFlip:O=!1,externalTree:D}=e,[N,j]=I.useState(null);!_&&N!==null&&j(null);const $=x.side||"flip",k=x.align||"flip",Z=x.fallbackAxisSide||"end",se=typeof t=="function"?t:void 0,le=Ze(se),K=se?le:t,Q=Dr(t),fe=q9()==="rtl",q=N||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":fe?"left":"right","inline-start":fe?"right":"left"}[r],W=c==="center"?q:`${q}-${c}`;let F=d;const ve=1,Te=r==="bottom"?ve:0,P=r==="top"?ve:0,ne=r==="right"?ve:0,ie=r==="left"?ve:0;typeof F=="number"?F={top:F+Te,right:F+ie,bottom:F+P,left:F+ne}:F&&(F={top:(F.top||0)+Te,right:(F.right||0)+ie,bottom:(F.bottom||0)+P,left:(F.left||0)+ne});const de={boundary:f==="clipping-ancestors"?"clippingAncestors":f,padding:F},Ce=I.useRef(null),_e=Dr(i),be=Dr(l),ht=[oj(Qt=>{const Kn=IC(Qt,r,fe),Us=typeof _e.current=="function"?_e.current(Kn):_e.current,kn=typeof be.current=="function"?be.current(Kn):be.current;return{mainAxis:Us,crossAxis:kn,alignmentAxis:kn}},[typeof i!="function"?i:0,typeof l!="function"?l:0,fe,r])],Ft=k==="none"&&$!=="shift",oe=!Ft&&(h||R||$==="shift"),Fe=$==="none"?null:cj({...de,padding:{top:F.top+ve,right:F.right+ve,bottom:F.bottom+ve,left:F.left+ve},mainAxis:!R&&$==="flip",crossAxis:k==="flip"?"alignment":!1,fallbackAxisSideDirection:Z}),Ie=Ft?null:ij(Qt=>{const Kn=Ba(Qt.elements.floating).documentElement;return{...de,rootBoundary:R?{x:0,y:0,width:Kn.clientWidth,height:Kn.clientHeight}:void 0,mainAxis:k!=="none",crossAxis:oe,limiter:h||R?void 0:aj(Us=>{if(!Ce.current)return{};const{width:kn,height:hr}=Ce.current.getBoundingClientRect(),pr=ar(ys(Us.placement)),js=pr==="y"?kn:hr,Ho=pr==="y"?F.left+F.right:F.top+F.bottom;return{offset:js/2+Ho/2}})}},[de,h,R,F,k]);$==="shift"||k==="shift"||c==="center"?ht.push(Ie,Fe):ht.push(Fe,Ie),ht.push(lj({...de,apply({elements:{floating:Qt},rects:{reference:Kn},availableWidth:Us,availableHeight:kn}){Object.entries({"--available-width":`${Us}px`,"--available-height":`${kn}px`,"--anchor-width":`${Kn.width}px`,"--anchor-height":`${Kn.height}px`}).forEach(([hr,pr])=>{Qt.style.setProperty(hr,pr)})}}),K9(()=>({element:Ce.current||document.createElement("div"),padding:y,offsetParent:"floating"}),[y]),{name:"transformOrigin",fn(Qt){const{elements:Kn,middlewareData:Us,placement:kn,rects:hr,y:pr}=Qt,js=ys(kn),Ho=ar(js),Fo=Ce.current,Cm=Us.arrow?.x||0,Vf=Us.arrow?.y||0,Nl=Fo?.clientWidth||0,Xi=Fo?.clientHeight||0,zl=Cm+Nl/2,Ll=Vf+Xi/2,qf=Math.abs(Us.shift?.y||0),Gf=hr.reference.height/2,Hr=typeof i=="function"?i(IC(Qt,r,fe)):i,Bl=qf>Hr,Kf={top:`${zl}px calc(100% + ${Hr}px)`,bottom:`${zl}px ${-Hr}px`,left:`calc(100% + ${Hr}px) ${Ll}px`,right:`${-Hr}px ${Ll}px`}[js],Zf=`${zl}px ${hr.reference.y+Gf-pr}px`;return Kn.floating.style.setProperty("--transform-origin",oe&&Ho==="y"&&Bl?Zf:Kf),{}}},Z9,A),mt(()=>{!_&&b&&b.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[_,b]);const Pt=I.useMemo(()=>({elementResize:!g&&typeof ResizeObserver<"u",layoutShift:!g&&typeof IntersectionObserver<"u"}),[g]),{refs:we,elements:Ne,x:qe,y:Qe,middlewareData:ut,update:Be,placement:Le,context:on,isPositioned:it,floatingStyles:_s}=jj({rootContext:b,placement:W,middleware:ht,strategy:n,whileElementsMounted:v?void 0:(...Qt)=>SC(...Qt,Pt),nodeId:C,externalTree:D}),{sideX:gt,sideY:$t}=ut.adaptiveOrigin||zh,Ut=it?n:"fixed",an=I.useMemo(()=>A?{position:Ut,[gt]:qe,[$t]:Qe}:{position:Ut,..._s},[A,Ut,gt,qe,$t,Qe,_s]),ws=I.useRef(null);mt(()=>{if(!_)return;const Qt=Q.current,Kn=typeof Qt=="function"?Qt():Qt,kn=(OC(Kn)?Kn.current:Kn)||null||null;kn!==ws.current&&(we.setPositionReference(kn),ws.current=kn)},[_,we,K,Q]),I.useEffect(()=>{if(!_)return;const Qt=Q.current;typeof Qt!="function"&&OC(Qt)&&Qt.current!==ws.current&&(we.setPositionReference(Qt.current),ws.current=Qt.current)},[_,we,K,Q]),I.useEffect(()=>{if(v&&_&&Ne.domReference&&Ne.floating)return SC(Ne.domReference,Ne.floating,Be,Pt)},[v,_,Ne,Be,Pt]);const $s=ys(Le),Ff=CO(r,$s,fe),jo=Ni(Le)||"center",qn=!!ut.hide?.referenceHidden;mt(()=>{O&&_&&it&&j($s)},[O,_,it,$s]);const dr=I.useMemo(()=>({position:"absolute",top:ut.arrow?.y,left:ut.arrow?.x}),[ut.arrow]),Gn=ut.arrow?.centerOffset!==0;return I.useMemo(()=>({positionerStyles:an,arrowStyles:dr,arrowRef:Ce,arrowUncentered:Gn,side:Ff,align:jo,physicalSide:$s,anchorHidden:qn,refs:we,context:on,isPositioned:it,update:Be}),[an,dr,Ce,Gn,Ff,jo,$s,qn,we,on,it,Be])}function OC(e){return e!=null&&"current"in e}function TO(e){return e==="starting"?m$:Ds}const X9=I.forwardRef(function(t,n){const{render:r,className:i,anchor:c,positionMethod:l="absolute",side:f="top",align:d="center",sideOffset:h=0,alignOffset:y=0,collisionBoundary:g="clipping-ancestors",collisionPadding:v=5,arrowPadding:b=5,sticky:_=!1,disableAnchorTracking:x=!1,collisionAvoidance:R=y$,...C}=t,A=Rf(),O=j9(),D=A.useState("open"),N=A.useState("mounted"),j=A.useState("trackCursorAxis"),$=A.useState("disableHoverablePopup"),k=A.useState("floatingRootContext"),Z=A.useState("instantType"),se=A.useState("transitionStatus"),le=A.useState("hasViewport"),K=Y9({anchor:c,positionMethod:l,floatingRootContext:k,mounted:N,side:f,sideOffset:h,align:d,alignOffset:y,collisionBoundary:g,collisionPadding:v,sticky:_,arrowPadding:b,disableAnchorTracking:x,keepMounted:O,collisionAvoidance:R,adaptiveOrigin:le?Q9:void 0}),Q=I.useMemo(()=>{const W={};return(!D||j==="both"||$)&&(W.pointerEvents="none"),{role:"presentation",hidden:!N,style:{...K.positionerStyles,...W}}},[D,j,$,N,K.positionerStyles]),ye=I.useMemo(()=>({open:D,side:K.side,align:K.align,anchorHidden:K.anchorHidden,instant:j!=="none"?"tracking-cursor":Z}),[D,K.side,K.align,K.anchorHidden,j,Z]),fe=I.useMemo(()=>({...ye,arrowRef:K.arrowRef,arrowStyles:K.arrowStyles,arrowUncentered:K.arrowUncentered}),[ye,K.arrowRef,K.arrowStyles,K.arrowUncentered]),q=cr("div",t,{state:ye,props:[Q,TO(se),C],ref:[n,A.useStateSetter("positionerElement")],stateAttributesMapping:Ef});return U.jsx(xO.Provider,{value:fe,children:q})}),W9={...Ef,...mb},J9=I.forwardRef(function(t,n){const{className:r,render:i,...c}=t,l=Rf(),{side:f,align:d}=RO(),h=l.useState("open"),y=l.useState("instantType"),g=l.useState("transitionStatus"),v=l.useState("popupProps"),b=l.useState("floatingRootContext");Sb({open:h,ref:l.context.popupRef,onComplete(){h&&l.context.onOpenChangeComplete?.(!0)}});const _=l.useState("disabled"),x=l.useState("closeDelay");Gj(b,{enabled:!_,closeDelay:x});const R=I.useMemo(()=>({open:h,side:f,align:d,instant:y,transitionStatus:g}),[h,f,d,y,g]);return cr("div",t,{state:R,ref:[n,l.context.popupRef,l.useStateSetter("popupElement")],props:[v,TO(g),c],stateAttributesMapping:W9})}),eH=I.forwardRef(function(t,n){const{className:r,render:i,...c}=t,f=Rf().useState("instantType"),{open:d,arrowRef:h,side:y,align:g,arrowUncentered:v,arrowStyles:b}=RO(),_=I.useMemo(()=>({open:d,side:y,align:g,uncentered:v,instant:f}),[d,y,g,v,f]);return cr("div",t,{state:_,ref:[n,h],props:[{style:b,"aria-hidden":!0},c],stateAttributesMapping:Ef})}),tH=function(t){const{delay:n,closeDelay:r,timeout:i=400}=t,c=I.useMemo(()=>({delay:n,closeDelay:r}),[n,r]),l=I.useMemo(()=>({open:n,close:r}),[n,r]);return U.jsx(wO.Provider,{value:c,children:U.jsx(u8,{delay:l,timeoutMs:i,children:t.children})})};function nH(e){const t=Ct.c(6);let n,r;t[0]!==e?({delay:r,...n}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);const i=r===void 0?0:r;let c;return t[3]!==i||t[4]!==n?(c=U.jsx(tH,{"data-slot":"tooltip-provider",delay:i,...n}),t[3]=i,t[4]=n,t[5]=c):c=t[5],c}function sH(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=U.jsx(nH,{children:U.jsx(z9,{"data-slot":"tooltip",...n})}),t[2]=n,t[3]=r):r=t[3],r}function rH(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=U.jsx(U9,{"data-slot":"tooltip-trigger",...n}),t[2]=n,t[3]=r):r=t[3],r}function oH(e){const t=Ct.c(21);let n,r,i,c,l,f,d;t[0]!==e?({className:r,side:c,sideOffset:l,align:f,alignOffset:d,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l,t[6]=f,t[7]=d):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5],f=t[6],d=t[7]);const h=c===void 0?"top":c,y=l===void 0?4:l,g=f===void 0?"center":f,v=d===void 0?0:d;let b;t[8]!==r?(b=nn("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 z-50 w-fit max-w-xs origin-(--transform-origin) rounded-md bg-foreground px-3 py-1.5 text-background text-xs data-[state=delayed-open]:animate-in data-closed:animate-out data-open:animate-in **:data-[slot=kbd]:rounded-md",r),t[8]=r,t[9]=b):b=t[9];let _;t[10]===Symbol.for("react.memo_cache_sentinel")?(_=U.jsx(eH,{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=right]:top-1/2! data-[side=left]:-right-1 data-[side=top]:-bottom-2.5 data-[side=right]:-left-1 data-[side=left]:-translate-y-1/2 data-[side=right]:-translate-y-1/2"}),t[10]=_):_=t[10];let x;t[11]!==n||t[12]!==i||t[13]!==b?(x=U.jsxs(J9,{className:b,"data-slot":"tooltip-content",...i,children:[n,_]}),t[11]=n,t[12]=i,t[13]=b,t[14]=x):x=t[14];let R;return t[15]!==g||t[16]!==v||t[17]!==h||t[18]!==y||t[19]!==x?(R=U.jsx(F9,{children:U.jsx(X9,{align:g,alignOffset:v,className:"isolate z-50",side:h,sideOffset:y,children:x})}),t[15]=g,t[16]=v,t[17]=h,t[18]=y,t[19]=x,t[20]=R):R=t[20],R}const iH=768,AO=`(max-width: ${iH-1}px)`;function aH(e){const t=window.matchMedia(AO);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function cH(){return window.matchMedia(AO).matches}function lH(){return I.useSyncExternalStore(aH,cH)}const uH="sidebar_state",fH=3600*24*7,dH="12rem",hH="16rem",pH="3rem",mH="b",IO=I.createContext(null);function jp(){const e=I.useContext(IO);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function gH(e){const t=Ct.c(36);let n,r,i,c,l,f,d;t[0]!==e?({defaultOpen:d,open:i,onOpenChange:l,className:r,style:f,children:n,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l,t[6]=f,t[7]=d):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5],f=t[6],d=t[7]);const h=d===void 0?!0:d,y=lH(),[g,v]=I.useState(!1),[b,_]=I.useState(h),x=i??b;let R;t[8]!==x||t[9]!==l?(R=ye=>{const fe=typeof ye=="function"?ye(x):ye;l?l(fe):_(fe),document.cookie=`${uH}=${fe}; path=/; max-age=${fH}`},t[8]=x,t[9]=l,t[10]=R):R=t[10];const C=R;let A;t[11]!==y||t[12]!==C?(A=()=>y?v(vH):C(yH),t[11]=y,t[12]=C,t[13]=A):A=t[13];const O=A;let D,N;t[14]!==O?(D=()=>{const ye=fe=>{fe.key===mH&&(fe.metaKey||fe.ctrlKey)&&(fe.preventDefault(),O())};return window.addEventListener("keydown",ye),()=>window.removeEventListener("keydown",ye)},N=[O],t[14]=O,t[15]=D,t[16]=N):(D=t[15],N=t[16]),I.useEffect(D,N);const j=x?"expanded":"collapsed";let $;t[17]!==y||t[18]!==x||t[19]!==g||t[20]!==C||t[21]!==j||t[22]!==O?($={state:j,open:x,setOpen:C,isMobile:y,openMobile:g,setOpenMobile:v,toggleSidebar:O},t[17]=y,t[18]=x,t[19]=g,t[20]=C,t[21]=j,t[22]=O,t[23]=$):$=t[23];const k=$;let Z;t[24]!==r?(Z=nn("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),t[24]=r,t[25]=Z):Z=t[25];let se;t[26]!==f?(se={"--sidebar-width":dH,"--sidebar-width-icon":pH,...f},t[26]=f,t[27]=se):se=t[27];const le=se;let K;t[28]!==n||t[29]!==c||t[30]!==Z||t[31]!==le?(K=U.jsx("div",{className:Z,"data-slot":"sidebar-wrapper",style:le,...c,children:n}),t[28]=n,t[29]=c,t[30]=Z,t[31]=le,t[32]=K):K=t[32];let Q;return t[33]!==k||t[34]!==K?(Q=U.jsx(IO.Provider,{value:k,children:K}),t[33]=k,t[34]=K,t[35]=Q):Q=t[35],Q}function yH(e){return!e}function vH(e){return!e}function bH(e){const t=Ct.c(46);let n,r,i,c,l,f;t[0]!==e?({side:c,variant:l,collapsible:f,className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l,t[6]=f):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5],f=t[6]);const d=c===void 0?"left":c,h=l===void 0?"sidebar":l,y=f===void 0?"offExamples":f,{isMobile:g,state:v,openMobile:b,setOpenMobile:_}=jp();if(y==="none"){let Z;t[7]!==r?(Z=nn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),t[7]=r,t[8]=Z):Z=t[8];let se;return t[9]!==n||t[10]!==i||t[11]!==Z?(se=U.jsx("div",{className:Z,"data-slot":"sidebar",...i,children:n}),t[9]=n,t[10]=i,t[11]=Z,t[12]=se):se=t[12],se}if(g){let Z;t[13]===Symbol.for("react.memo_cache_sentinel")?(Z={"--sidebar-width":hH},t[13]=Z):Z=t[13];let se;t[14]===Symbol.for("react.memo_cache_sentinel")?(se=U.jsxs(M9,{className:"sr-only",children:[U.jsx(D9,{children:"Sidebar"}),U.jsx(k9,{children:"Displays the mobile sidebar."})]}),t[14]=se):se=t[14];let le;t[15]!==n?(le=U.jsx("div",{className:"flex h-full w-full flex-col",children:n}),t[15]=n,t[16]=le):le=t[16];let K;t[17]!==d||t[18]!==le?(K=U.jsxs(O9,{className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden","data-mobile":"true","data-sidebar":"sidebar","data-slot":"sidebar",side:d,style:Z,children:[se,le]}),t[17]=d,t[18]=le,t[19]=K):K=t[19];let Q;return t[20]!==b||t[21]!==i||t[22]!==_||t[23]!==K?(Q=U.jsx(T9,{onOpenChange:_,open:b,...i,children:K}),t[20]=b,t[21]=i,t[22]=_,t[23]=K,t[24]=Q):Q=t[24],Q}const x=v==="collapsed"?y:"",R=h==="floating"||h==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let C;t[25]!==R?(C=nn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offExamples]:w-0","group-data-[side=right]:rotate-180",R),t[25]=R,t[26]=C):C=t[26];let A;t[27]!==C?(A=U.jsx("div",{className:C,"data-slot":"sidebar-gap"}),t[27]=C,t[28]=A):A=t[28];const O=d==="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)]",D=h==="floating"||h==="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";let N;t[29]!==r||t[30]!==O||t[31]!==D?(N=nn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",O,D,r),t[29]=r,t[30]=O,t[31]=D,t[32]=N):N=t[32];let j;t[33]!==n?(j=U.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]=j):j=t[34];let $;t[35]!==i||t[36]!==N||t[37]!==j?($=U.jsx("div",{className:N,"data-slot":"sidebar-container",...i,children:j}),t[35]=i,t[36]=N,t[37]=j,t[38]=$):$=t[38];let k;return t[39]!==d||t[40]!==v||t[41]!==$||t[42]!==x||t[43]!==A||t[44]!==h?(k=U.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-collapsible":x,"data-side":d,"data-slot":"sidebar","data-state":v,"data-variant":h,children:[A,$]}),t[39]=d,t[40]=v,t[41]=$,t[42]=x,t[43]=A,t[44]=h,t[45]=k):k=t[45],k}function SH(e){const t=Ct.c(15);let n,r,i;t[0]!==e?({className:n,onClick:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i):(n=t[1],r=t[2],i=t[3]);const{toggleSidebar:c}=jp();let l;t[4]!==n?(l=nn(n),t[4]=n,t[5]=l):l=t[5];let f;t[6]!==r||t[7]!==c?(f=g=>{r?.(g),c()},t[6]=r,t[7]=c,t[8]=f):f=t[8];let d,h;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=U.jsx(H$,{}),h=U.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),t[9]=d,t[10]=h):(d=t[9],h=t[10]);let y;return t[11]!==i||t[12]!==l||t[13]!==f?(y=U.jsxs(el,{className:l,"data-sidebar":"trigger","data-slot":"sidebar-trigger",onClick:f,size:"icon-lg",variant:"ghost",...i,children:[d,h]}),t[11]=i,t[12]=l,t[13]=f,t[14]=y):y=t[14],y}function _H(e){const t=Ct.c(9);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);const{toggleSidebar:i}=jp();let c;t[3]!==n?(c=nn("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 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 hover:group-data-[collapsible=offExamples]:bg-sidebar group-data-[collapsible=offExamples]:after:left-full","[[data-side=left][data-collapsible=offExamples]_&]:-right-2","[[data-side=right][data-collapsible=offExamples]_&]:-left-2",n),t[3]=n,t[4]=c):c=t[4];let l;return t[5]!==r||t[6]!==c||t[7]!==i?(l=U.jsx("button",{"aria-label":"Toggle Sidebar",className:c,"data-sidebar":"rail","data-slot":"sidebar-rail",onClick:i,tabIndex:-1,title:"Toggle Sidebar",...r}),t[5]=r,t[6]=c,t[7]=i,t[8]=l):l=t[8],l}function wH(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=nn("flex flex-col gap-2 p-2",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=U.jsx("div",{className:i,"data-sidebar":"footer","data-slot":"sidebar-footer",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function EH(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=nn("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):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=U.jsx("div",{className:i,"data-sidebar":"content","data-slot":"sidebar-content",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function g0(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=nn("relative flex w-full min-w-0 flex-col px-2 py-1",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=U.jsx("div",{className:i,"data-sidebar":"group","data-slot":"sidebar-group",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function y0(e){const t=Ct.c(10);let n,r,i,c;if(t[0]!==e){const{className:d,render:h,...y}=e;n=h,c=WI,r="div",i=Dp({className:nn("flex h-8 shrink-0 items-center rounded-md px-2 text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 [&>svg]:size-4 [&>svg]:shrink-0",d)},y),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c}else n=t[1],r=t[2],i=t[3],c=t[4];let l;t[5]===Symbol.for("react.memo_cache_sentinel")?(l={slot:"sidebar-group-label",sidebar:"group-label"},t[5]=l):l=t[5];let f;return t[6]!==n||t[7]!==r||t[8]!==i?(f={defaultTagName:r,props:i,render:n,state:l},t[6]=n,t[7]=r,t[8]=i,t[9]=f):f=t[9],c(f)}function Sh(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=nn("flex w-full min-w-0 flex-col gap-px",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=U.jsx("ul",{className:i,"data-sidebar":"menu","data-slot":"sidebar-menu",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function ga(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=nn("group/menu-item relative",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=U.jsx("li",{className:i,"data-sidebar":"menu-item","data-slot":"sidebar-menu-item",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}const xH=t2("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 outline-hidden ring-sidebar-ring transition-[width,height,padding] 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 group-has-data-[sidebar=menu-action]/menu-item:pr-8 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 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0",{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 ya(e){const t=Ct.c(15);let{render:n,isActive:r,variant:i,size:c,tooltip:l,className:f,...d}=e;const h=r===void 0?!1:r,y=i===void 0?"default":i,g=c===void 0?"default":c,{isMobile:v,state:b}=jp(),_="button",x=Dp({className:nn(xH({variant:y,size:g}),f)},d),R=l?rH:n;let C;t[0]!==h||t[1]!==g?(C={slot:"sidebar-menu-button",sidebar:"menu-button",size:g,active:h},t[0]=h,t[1]=g,t[2]=C):C=t[2];let A;t[3]!==x||t[4]!==R||t[5]!==C?(A={defaultTagName:_,props:x,render:R,state:C},t[3]=x,t[4]=R,t[5]=C,t[6]=A):A=t[6];const O=WI(A);if(!l)return O;if(typeof l=="string"){let $;t[7]!==l?($={children:l},t[7]=l,t[8]=$):$=t[8],l=$}const D=b!=="collapsed"||v;let N;t[9]!==D||t[10]!==l?(N=U.jsx(oH,{align:"center",hidden:D,side:"right",...l}),t[9]=D,t[10]=l,t[11]=N):N=t[11];let j;return t[12]!==O||t[13]!==N?(j=U.jsxs(sH,{children:[O,N]}),t[12]=O,t[13]=N,t[14]=j):j=t[14],j}function RH(){const e=Ct.c(8),{theme:t,setTheme:n}=n$();let 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];const i=r;let c,l,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=U.jsx(q$,{className:"size-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l=U.jsx(U$,{className:"absolute size-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),f=U.jsx("span",{className:"sr-only",children:"Toggle theme"}),e[3]=c,e[4]=l,e[5]=f):(c=e[3],l=e[4],f=e[5]);let d;return e[6]!==i?(d=U.jsxs(el,{className:"rounded-full",onClick:i,size:"icon-sm",variant:"ghost",children:[c,l,f]}),e[6]=i,e[7]=d):d=e[7],d}function OO(){const e=Ct.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=nn("z-50 flex h-10 shrink-0 items-center gap-2 border-sidebar-border border-b bg-sidebar px-4 text-sidebar-foreground","sticky top-0"),n=U.jsx(SH,{className:"-ml-1"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=U.jsxs("header",{className:t,children:[n,U.jsx("div",{className:"flex w-full justify-end",children:U.jsx(RH,{})})]}),e[2]=r):r=e[2],r}function CH(){const e=Ct.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=U.jsx("h1",{className:"font-bold text-4xl",children:"404"}),n=U.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=U.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-4",children:[t,n,U.jsx(Or,{to:"/",children:U.jsx(el,{variant:"outline",children:"Go back home"})})]}),e[2]=r):r=e[2],r}function ge(e,t,n){function r(f,d){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,d);const h=l.prototype,y=Object.keys(h);for(let g=0;gn?.Parent&&f instanceof n.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class Kc extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class MO extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const DO={};function Da(e){return DO}function kO(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function Tv(e,t){return typeof t=="bigint"?t.toString():t}function wb(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Eb(e){return e==null}function xb(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function TH(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d?.[1]&&(i=Number.parseInt(d[1]))}const c=n>i?n:i,l=Number.parseInt(e.toFixed(c).replace(".","")),f=Number.parseInt(t.toFixed(c).replace(".",""));return l%f/10**c}const MC=Symbol("evaluating");function Rt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==MC)return r===void 0&&(r=MC,r=n()),r},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Ua(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function zi(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function DC(e){return JSON.stringify(e)}function AH(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const PO="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function lp(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const IH=wb(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function lf(e){if(lp(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(lp(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function NO(e){return lf(e)?{...e}:Array.isArray(e)?[...e]:e}const OH=new Set(["string","number","symbol"]);function Hp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Li(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function $e(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function MH(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const DH={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function kH(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c=zi(e._zod.def,{get shape(){const l={};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(l[f]=n.shape[f])}return Ua(this,"shape",l),l},checks:[]});return Li(e,c)}function PH(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=zi(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete l[f]}return Ua(this,"shape",l),l},checks:[]});return Li(e,c)}function NH(e,t){if(!lf(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const c=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(c,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=zi(e._zod.def,{get shape(){const c={...e._zod.def.shape,...t};return Ua(this,"shape",c),c}});return Li(e,i)}function zH(e,t){if(!lf(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=zi(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Ua(this,"shape",r),r}});return Li(e,n)}function LH(e,t){const n=zi(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Ua(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Li(e,n)}function BH(e,t,n){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=zi(t._zod.def,{get shape(){const f=t._zod.def.shape,d={...f};if(n)for(const h in n){if(!(h in f))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(d[h]=e?new e({type:"optional",innerType:f[h]}):f[h])}else for(const h in f)d[h]=e?new e({type:"optional",innerType:f[h]}):f[h];return Ua(this,"shape",d),d},checks:[]});return Li(t,l)}function $H(e,t,n){const r=zi(t._zod.def,{get shape(){const i=t._zod.def.shape,c={...i};if(n)for(const l in n){if(!(l in c))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(c[l]=new e({type:"nonoptional",innerType:i[l]}))}else for(const l in i)c[l]=new e({type:"nonoptional",innerType:i[l]});return Ua(this,"shape",c),c}});return Li(t,r)}function jc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function _h(e){return typeof e=="string"?e:e?.message}function ka(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const i=_h(e.inst?._zod.def?.error?.(e))??_h(t?.error?.(e))??_h(n.customError?.(e))??_h(n.localeError?.(e))??"Invalid input";r.message=i}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Rb(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function uf(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const LO=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Tv,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},BO=ge("$ZodError",LO),Fp=ge("$ZodError",LO,{Parent:Error});function UH(e,t=n=>n.message){const n={},r=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function jH(e,t=n=>n.message){const n={_errors:[]},r=i=>{for(const c of i.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>r({issues:l}));else if(c.code==="invalid_key")r({issues:c.issues});else if(c.code==="invalid_element")r({issues:c.issues});else if(c.path.length===0)n._errors.push(t(c));else{let l=n,f=0;for(;f(t,n,r,i)=>{const c=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},c);if(l instanceof Promise)throw new Kc;if(l.issues.length){const f=new(i?.Err??e)(l.issues.map(d=>ka(d,c,Da())));throw PO(f,i?.callee),f}return l.value},uve=Vp(Fp),qp=e=>async(t,n,r,i)=>{const c=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},c);if(l instanceof Promise&&(l=await l),l.issues.length){const f=new(i?.Err??e)(l.issues.map(d=>ka(d,c,Da())));throw PO(f,i?.callee),f}return l.value},fve=qp(Fp),Gp=e=>(t,n,r)=>{const i=r?{...r,async:!1}:{async:!1},c=t._zod.run({value:n,issues:[]},i);if(c instanceof Promise)throw new Kc;return c.issues.length?{success:!1,error:new(e??BO)(c.issues.map(l=>ka(l,i,Da())))}:{success:!0,data:c.value}},HH=Gp(Fp),Kp=e=>async(t,n,r)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let c=t._zod.run({value:n,issues:[]},i);return c instanceof Promise&&(c=await c),c.issues.length?{success:!1,error:new e(c.issues.map(l=>ka(l,i,Da())))}:{success:!0,data:c.value}},FH=Kp(Fp),VH=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Vp(e)(t,n,i)},qH=e=>(t,n,r)=>Vp(e)(t,n,r),GH=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return qp(e)(t,n,i)},KH=e=>async(t,n,r)=>qp(e)(t,n,r),ZH=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Gp(e)(t,n,i)},QH=e=>(t,n,r)=>Gp(e)(t,n,r),YH=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Kp(e)(t,n,i)},XH=e=>async(t,n,r)=>Kp(e)(t,n,r),WH=/^[cC][^\s-]{8,}$/,JH=/^[0-9a-z]+$/,e7=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,t7=/^[0-9a-vA-V]{20}$/,n7=/^[A-Za-z0-9]{27}$/,s7=/^[a-zA-Z0-9_-]{21}$/,r7=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,o7=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,kC=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,i7=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,a7="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function c7(){return new RegExp(a7,"u")}const l7=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,u7=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,f7=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,d7=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,h7=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$O=/^[A-Za-z0-9_-]*$/,p7=/^\+[1-9]\d{6,14}$/,UO="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",m7=new RegExp(`^${UO}$`);function jO(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function g7(e){return new RegExp(`^${jO(e)}$`)}function y7(e){const t=jO({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${UO}T(?:${r})$`)}const v7=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},b7=/^-?\d+$/,S7=/^-?\d+(?:\.\d+)?$/,_7=/^[^A-Z]*$/,w7=/^[^a-z]*$/,vs=ge("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),HO={number:"number",bigint:"bigint",object:"date"},FO=ge("$ZodCheckLessThan",(e,t)=>{vs.init(e,t);const n=HO[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,c=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value{(t.inclusive?r.value<=t.value:r.value{vs.init(e,t);const n=HO[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,c=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>c&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),E7=ge("$ZodCheckMultipleOf",(e,t)=>{vs.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):TH(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),x7=ge("$ZodCheckNumberFormat",(e,t)=>{vs.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[i,c]=DH[t.format];e._zod.onattach.push(l=>{const f=l._zod.bag;f.format=t.format,f.minimum=i,f.maximum=c,n&&(f.pattern=b7)}),e._zod.check=l=>{const f=l.value;if(n){if(!Number.isInteger(f)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:f,inst:e});return}if(!Number.isSafeInteger(f)){f>0?l.issues.push({input:f,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):l.issues.push({input:f,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}fc&&l.issues.push({origin:"number",input:f,code:"too_big",maximum:c,inclusive:!0,inst:e,continue:!t.abort})}}),R7=ge("$ZodCheckMaxLength",(e,t)=>{var n;vs.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Eb(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const i=r.value;if(i.length<=t.maximum)return;const l=Rb(i);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),C7=ge("$ZodCheckMinLength",(e,t)=>{var n;vs.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Eb(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const l=Rb(i);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),T7=ge("$ZodCheckLengthEquals",(e,t)=>{var n;vs.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Eb(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=r=>{const i=r.value,c=i.length;if(c===t.length)return;const l=Rb(i),f=c>t.length;r.issues.push({origin:l,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Zp=ge("$ZodCheckStringFormat",(e,t)=>{var n,r;vs.init(e,t),e._zod.onattach.push(i=>{const c=i._zod.bag;c.format=t.format,t.pattern&&(c.patterns??(c.patterns=new Set),c.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),A7=ge("$ZodCheckRegex",(e,t)=>{Zp.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),I7=ge("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=_7),Zp.init(e,t)}),O7=ge("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=w7),Zp.init(e,t)}),M7=ge("$ZodCheckIncludes",(e,t)=>{vs.init(e,t);const n=Hp(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(i=>{const c=i._zod.bag;c.patterns??(c.patterns=new Set),c.patterns.add(r)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),D7=ge("$ZodCheckStartsWith",(e,t)=>{vs.init(e,t);const n=new RegExp(`^${Hp(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),k7=ge("$ZodCheckEndsWith",(e,t)=>{vs.init(e,t);const n=new RegExp(`.*${Hp(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),P7=ge("$ZodCheckOverwrite",(e,t)=>{vs.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class N7{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(` + )`}return U.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:c}})}),f9=I.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:c}=$a(),l=c.useState("mounted"),f=c.useState("modal"),d=c.useState("open");return l||r?U.jsx(pO.Provider,{value:r,children:U.jsxs(y8,{ref:n,...i,children:[l&&f===!0&&U.jsx(u9,{ref:c.context.internalBackdropRef,inert:l9(!d)}),t.children]})}):null});let CC={},TC={},AC="";function d9(e){if(typeof document>"u")return!1;const t=Ba(e);return gn(t).innerWidth-t.documentElement.clientWidth>0}function h9(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const r=Ba(e).documentElement,i={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY};r.style.scrollbarGutter="stable",r.style.overflowY="scroll";const c=r.offsetWidth;r.style.overflowY="hidden";const l=r.offsetWidth;return Object.assign(r.style,i),c===l}function p9(e){const t=Ba(e),n=t.documentElement,r=t.body,i=La(n)?n:r,c=i.style.overflow;return i.style.overflow="hidden",()=>{i.style.overflow=c}}function m9(e){const t=Ba(e),n=t.documentElement,r=t.body,i=gn(n);let c=0,l=0,f=!1;const d=Mr.create();if(a5&&(i.visualViewport?.scale??1)!==1)return()=>{};function h(){const b=i.getComputedStyle(n),v=i.getComputedStyle(r),R=(b.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";c=n.scrollTop,l=n.scrollLeft,CC={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},AC=n.style.scrollBehavior,TC={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};const C=n.scrollHeight>n.clientHeight,A=n.scrollWidth>n.clientWidth,O=b.overflowY==="scroll"||v.overflowY==="scroll",D=b.overflowX==="scroll"||v.overflowX==="scroll",N=Math.max(0,i.innerWidth-r.clientWidth),j=Math.max(0,i.innerHeight-r.clientHeight),$=parseFloat(v.marginTop)+parseFloat(v.marginBottom),k=parseFloat(v.marginLeft)+parseFloat(v.marginRight),Z=La(n)?n:r;if(f=h9(e),f){n.style.scrollbarGutter=R,Z.style.overflowY="hidden",Z.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:R,overflowY:"hidden",overflowX:"hidden"}),(C||O)&&(n.style.overflowY="scroll"),(A||D)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:$||j?`calc(100dvh - ${$+j}px)`:"100dvh",width:k||N?`calc(100vw - ${k+N}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=c,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function y(){Object.assign(n.style,CC),Object.assign(r.style,TC),f||(n.scrollTop=c,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=AC)}function g(){y(),d.request(h)}return h(),i.addEventListener("resize",g),()=>{d.cancel(),y(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",g)}}class g9{lockCount=0;restore=null;timeoutLock=Ii.create();timeoutUnlock=Ii.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Ba(t).documentElement,i=gn(r).getComputedStyle(r).overflowY;if(i==="hidden"||i==="clip"){this.restore=XI;return}const c=S2||!d9(t);this.restore=c?p9(t):m9(t)}}const y9=new g9;function b9(e=!0,t=null){mt(()=>{if(e)return y9.acquire(t)},[e,t])}function v9(e){const t=I.useRef(""),n=I.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:I.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i&&e(i,i.pointerType),e(i,t.current),t.current=""},[e]),onPointerDown:n}}function S9(e){const[t,n]=I.useState(null),r=Ze((f,d)=>{e||n(d||(S2?"touch":""))}),i=I.useCallback(()=>{n(null)},[]),{onClick:c,onPointerDown:l}=v9(r);return I.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:c,onPointerDown:l}}),[t,i,c,l])}function _9(e){const{store:t,parentContext:n,actionsRef:r}=e,i=t.useState("open"),c=t.useState("disablePointerDismissal"),l=t.useState("modal"),f=t.useState("popupElement"),{openMethod:d,triggerProps:h,reset:y}=S9(i);aO(t);const{forceUnmount:g}=cO(i,t,()=>{y()}),b=Ze(se=>{const le=qt(se);return le.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},le}),v=I.useCallback(()=>{t.setOpen(!1,b(U2))},[t,b]);I.useImperativeHandle(r,()=>({unmount:g,close:v}),[g,v]);const _=fO({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[x,R]=I.useState(0),C=x===0,A=Xj(_),O=rO(_,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:l==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(se){if("button"in se&&se.button!==0||"touches"in se&&se.touches.length!==1)return!1;const le=is(se);if(C&&!c){const K=le;return l&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===K||t.context.backdropRef.current===K||vt(K,f)&&!K?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:C});b9(i&&l===!0,f);const{getReferenceProps:D,getFloatingProps:N,getTriggerProps:j}=hO([A,O]);t.useContextCallback("onNestedDialogOpen",se=>{R(se+1)}),t.useContextCallback("onNestedDialogClose",()=>{R(0)}),I.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(x),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,x]);const $=I.useMemo(()=>D(h),[D,h]),k=I.useMemo(()=>j(h),[j,h]),Z=I.useMemo(()=>N(),[N]);t.useSyncedValues({openMethod:d,activeTriggerProps:$,inactiveTriggerProps:k,popupProps:Z,floatingRootContext:_,nestedOpenDialogCount:x})}const w9={...uO,modal:ot(e=>e.modal),nested:ot(e=>e.nested),nestedOpenDialogCount:ot(e=>e.nestedOpenDialogCount),disablePointerDismissal:ot(e=>e.disablePointerDismissal),openMethod:ot(e=>e.openMethod),descriptionElementId:ot(e=>e.descriptionElementId),titleElementId:ot(e=>e.titleElementId),viewportElement:ot(e=>e.viewportElement),role:ot(e=>e.role)};class E9 extends bv{constructor(t){super(x9(t),{popupRef:I.createRef(),backdropRef:I.createRef(),internalBackdropRef:I.createRef(),triggerElements:new Up,onOpenChange:void 0,onOpenChangeComplete:void 0},w9)}setOpen=(t,n)=>{if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),n.isCanceled)return;const r={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",r);const i={open:t},c=n.trigger?.id??null;(c||t)&&(i.activeTriggerId=c,i.activeTriggerElement=n.trigger??null),this.update(i)}}function x9(e={}){return{...lO(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function R9(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:c,disablePointerDismissal:l=!1,modal:f=!0,actionsRef:d,handle:h,triggerId:y,defaultTriggerId:g=null}=e,b=$a(!0),v=!!b,_=Lr(()=>h?.store??new E9({open:n??r,activeTriggerId:y!==void 0?y:g,modal:f,disablePointerDismissal:l,nested:v})).current;_.useControlledProp("open",n,r),_.useControlledProp("activeTriggerId",y,g),_.useSyncedValues({disablePointerDismissal:l,nested:v,modal:f}),_.useContextCallback("onOpenChange",i),_.useContextCallback("onOpenChangeComplete",c);const x=_.useState("payload");_9({store:_,actionsRef:d,parentContext:b?.store.context});const R=I.useMemo(()=>({store:_}),[_]);return U.jsx(j2.Provider,{value:R,children:typeof t=="function"?t({payload:x}):t})}const C9=I.forwardRef(function(t,n){const{render:r,className:i,id:c,...l}=t,{store:f}=$a(),d=lv(c);return f.useSyncedValueWithCleanup("titleElementId",d),cr("h2",t,{ref:n,props:[{id:d},l]})});function T9(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=U.jsx(R9,{"data-slot":"sheet",...n}),t[2]=n,t[3]=r):r=t[3],r}function A9(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=U.jsx(f9,{"data-slot":"sheet-portal",...n}),t[2]=n,t[3]=r):r=t[3],r}function I9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=nn("data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 z-50 bg-black/80 duration-100 data-closed:animate-out data-open:animate-in data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=U.jsx(s8,{className:i,"data-slot":"sheet-overlay",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function O9(e){const t=Ct.c(17);let n,r,i,c,l;t[0]!==e?({className:r,children:n,side:c,showCloseButton:l,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5]);const f=c===void 0?"right":c,d=l===void 0?!0:l;let h;t[6]===Symbol.for("react.memo_cache_sentinel")?(h=U.jsx(I9,{}),t[6]=h):h=t[6];let y;t[7]!==r?(y=nn("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 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=top]:inset-x-0 data-[side=left]:inset-y-0 data-[side=right]:inset-y-0 data-[side=top]:top-0 data-[side=right]:right-0 data-[side=bottom]:bottom-0 data-[side=left]:left-0 data-[side=bottom]:h-auto data-[side=left]:h-full data-[side=right]:h-full data-[side=top]:h-auto data-[side=left]:w-3/4 data-[side=right]:w-3/4 data-closed:animate-out data-open:animate-in data-[side=bottom]:border-t data-[side=left]:border-r data-[side=top]:border-b data-[side=right]:border-l data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",r),t[7]=r,t[8]=y):y=t[8];let g;t[9]!==d?(g=d&&U.jsxs(r8,{"data-slot":"sheet-close",render:U.jsx(tl,{className:"absolute top-4 right-4",size:"icon-sm",variant:"ghost"}),children:[U.jsx(K$,{}),U.jsx("span",{className:"sr-only",children:"Close"})]}),t[9]=d,t[10]=g):g=t[10];let b;return t[11]!==n||t[12]!==i||t[13]!==f||t[14]!==y||t[15]!==g?(b=U.jsxs(A9,{children:[h,U.jsxs(c9,{className:y,"data-side":f,"data-slot":"sheet-content",...i,children:[n,g]})]}),t[11]=n,t[12]=i,t[13]=f,t[14]=y,t[15]=g,t[16]=b):b=t[16],b}function M9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=nn("flex flex-col gap-1.5 p-6",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=U.jsx("div",{className:i,"data-slot":"sheet-header",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function D9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=nn("font-medium text-foreground text-sm",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=U.jsx(C9,{className:i,"data-slot":"sheet-title",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function k9(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=nn("text-muted-foreground text-xs/relaxed",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=U.jsx(o8,{className:i,"data-slot":"sheet-description",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}const _O=I.createContext(void 0);function Rf(e){const t=I.useContext(_O);if(t===void 0&&!e)throw new Error(wo(72));return t}const P9={...uO,disabled:ot(e=>e.disabled),instantType:ot(e=>e.instantType),isInstantPhase:ot(e=>e.isInstantPhase),trackCursorAxis:ot(e=>e.trackCursorAxis),disableHoverablePopup:ot(e=>e.disableHoverablePopup),lastOpenChangeReason:ot(e=>e.openChangeReason),closeDelay:ot(e=>e.closeDelay),hasViewport:ot(e=>e.hasViewport)};class _v extends bv{constructor(t){super({...N9(),...t},{popupRef:I.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Up},P9)}setOpen=(t,n)=>{const r=n.reason,i=r===_r,c=t&&r===kh,l=!t&&(r===op||r===pv);if(n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,n),n.isCanceled)return;const f=()=>{const d={open:t,openChangeReason:r};c?d.instantType="focus":l?d.instantType="dismiss":r===_r&&(d.instantType=void 0);const h=n.trigger?.id??null;(h||t)&&(d.activeTriggerId=h,d.activeTriggerElement=n.trigger??null),this.update(d)};i?ki.flushSync(f):f()};static useStore(t,n){const r=Lr(()=>new _v(n)).current,i=t??r,c=fO({popupStore:i,onOpenChange:i.setOpen});return i.state.floatingRootContext=c,i}}function N9(){return{...lO(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0,hasViewport:!1}}function z9(e){const{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:c="none",actionsRef:l,onOpenChange:f,onOpenChangeComplete:d,handle:h,triggerId:y,defaultTriggerId:g=null,children:b}=e,v=_v.useStore(h?.store,{open:r??n,activeTriggerId:y!==void 0?y:g});v.useControlledProp("open",r,n),v.useControlledProp("activeTriggerId",y,g),v.useContextCallback("onOpenChange",f),v.useContextCallback("onOpenChangeComplete",d);const _=v.useState("open"),x=!t&&_,R=v.useState("activeTriggerId"),C=v.useState("payload");v.useSyncedValues({trackCursorAxis:c,disableHoverablePopup:i}),mt(()=>{_&&t&&v.setOpen(!1,qt(K5))},[_,t,v]),v.useSyncedValue("disabled",t),aO(v);const{forceUnmount:A,transitionStatus:O}=cO(x,v),D=v.useState("isInstantPhase"),N=v.useState("instantType"),j=v.useState("lastOpenChangeReason"),$=I.useRef(null);mt(()=>{O==="ending"&&j===hv||O!=="ending"&&D?(N!=="delay"&&($.current=N),v.set("instantType","delay")):$.current!==null&&(v.set("instantType",$.current),$.current=null)},[O,D,j,N,v]),mt(()=>{x&&R==null&&v.set("payload",void 0)},[v,R,x]);const k=I.useCallback(()=>{v.setOpen(!1,L9(v,U2))},[v]);I.useImperativeHandle(l,()=>({unmount:A,close:k}),[A,k]);const Z=v.useState("floatingRootContext"),se=Hj(Z,{enabled:!t}),le=rO(Z,{enabled:!t,referencePress:!0}),K=x8(Z,{enabled:!t&&c!=="none",axis:c==="none"?void 0:c}),{getReferenceProps:Q,getFloatingProps:ye,getTriggerProps:fe}=hO([se,le,K]),q=I.useMemo(()=>Q(),[Q]),W=I.useMemo(()=>fe(),[fe]),F=I.useMemo(()=>ye(),[ye]);return v.useSyncedValues({activeTriggerProps:q,inactiveTriggerProps:W,popupProps:F}),U.jsx(_O.Provider,{value:v,children:typeof b=="function"?b({payload:C}):b})}function L9(e,t){const n=qt(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}const wO=I.createContext(void 0);function B9(){return I.useContext(wO)}const $9=600,U9=I.forwardRef(function(t,n){const{className:r,render:i,handle:c,payload:l,disabled:f,delay:d,closeDelay:h,id:y,...g}=t,b=Rf(!0),v=c?.store??b;if(!v)throw new Error(wo(82));const _=lv(y),x=v.useState("isTriggerActive",_),R=v.useState("isOpenedByTrigger",_),C=v.useState("floatingRootContext"),A=I.useRef(null),O=d??$9,D=h??0,{registerTrigger:N,isMountedByThisTrigger:j}=Bj(_,A,v,{payload:l,closeDelay:D}),$=B9(),{delayRef:k,isInstantPhase:Z,hasProvider:se}=f8(C,{open:R});v.useSyncedValue("isInstantPhase",Z);const le=v.useState("disabled"),K=f??le,Q=v.useState("trackCursorAxis"),ye=v.useState("disableHoverablePopup"),fe=Qj(C,{enabled:!K,mouseOnly:!0,move:!1,handleClose:!ye&&Q!=="both"?Jj():null,restMs(){const be=$?.delay,Te=typeof k.current=="object"?k.current.open:void 0;let P=O;return se&&(Te!==0?P=d??be??O:P=0),P},delay(){const be=typeof k.current=="object"?k.current.close:void 0;let Te=D;return h==null&&se&&(Te=be),{close:Te}},triggerElementRef:A,isActiveTrigger:x}),q=I.useMemo(()=>({open:R}),[R]),W=v.useState("triggerProps",j);return cr("button",t,{state:q,ref:[n,N,A],props:[fe,W,{id:_},g],stateAttributesMapping:t8})}),EO=I.createContext(void 0);function j9(){const e=I.useContext(EO);if(e===void 0)throw new Error(wo(70));return e}const H9=I.forwardRef(function(t,n){const{children:r,container:i,className:c,render:l,...f}=t,{portalNode:d,portalSubtree:h}=Q2({container:i,ref:n,componentProps:t,elementProps:f});return!h&&!d?null:U.jsxs(I.Fragment,{children:[h,d&&ki.createPortal(r,d)]})}),F9=I.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t;return Rf().useState("mounted")||r?U.jsx(EO.Provider,{value:r,children:U.jsx(H9,{ref:n,...i})}):null}),xO=I.createContext(void 0);function RO(){const e=I.useContext(xO);if(e===void 0)throw new Error(wo(71));return e}const V9=I.createContext(void 0);function q9(){return I.useContext(V9)?.direction??"ltr"}const G9=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:c,platform:l,elements:f,middlewareData:d}=t,{element:h,padding:y=0,offsetParent:g="real"}=vo(e,t)||{};if(h==null)return{};const b=T2(y),v={x:n,y:r},_=dv(i),x=fv(_),R=await l.getDimensions(h),C=_==="y",A=C?"top":"left",O=C?"bottom":"right",D=C?"clientHeight":"clientWidth",N=c.reference[x]+c.reference[_]-v[_]-c.floating[x],j=v[_]-c.reference[_],$=g==="real"?await l.getOffsetParent?.(h):f.floating;let k=f.floating[D]||c.floating[x];(!k||!await l.isElement?.($))&&(k=f.floating[D]||c.floating[x]);const Z=N/2-j/2,se=k/2-R[x]/2-1,le=Math.min(b[A],se),K=Math.min(b[O],se),Q=le,ye=k-R[x]-K,fe=k/2-R[x]/2+Z,q=_b(Q,fe,ye),W=!d.arrow&&Ni(i)!=null&&fe!==q&&c.reference[x]/2-(fe({...G9(e),options:[e,t]}),Z9={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,c=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await uj().fn(e)).data?.referenceHidden||c}}}},zh={sideX:"left",sideY:"top"},Q9={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:c,strategy:l,placement:f}=e,d=gn(i),h=d.getComputedStyle(i);if(!(h.transitionDuration!=="0s"&&h.transitionDuration!==""))return{x:t,y:n,data:zh};const g=await c.getOffsetParent?.(i);let b={width:0,height:0};if(l==="fixed"&&d?.visualViewport)b={width:d.visualViewport.width,height:d.visualViewport.height};else if(g===d){const A=Ba(i);b={width:A.documentElement.clientWidth,height:A.documentElement.clientHeight}}else await c.isElement?.(g)&&(b=await c.getDimensions(g));const v=ys(f);let _=t,x=n;v==="left"&&(_=b.width-(t+r.width)),v==="top"&&(x=b.height-(n+r.height));const R=v==="left"?"right":zh.sideX,C=v==="top"?"bottom":zh.sideY;return{x:_,y:x,data:{sideX:R,sideY:C}}}};function CO(e,t,n){const 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 IC(e,t,n){const{rects:r,placement:i}=e;return{side:CO(t,ys(i),n),align:Ni(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Y9(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:c="center",alignOffset:l=0,collisionBoundary:f,collisionPadding:d=5,sticky:h=!1,arrowPadding:y=5,disableAnchorTracking:g=!1,keepMounted:b=!1,floatingRootContext:v,mounted:_,collisionAvoidance:x,shiftCrossAxis:R=!1,nodeId:C,adaptiveOrigin:A,lazyFlip:O=!1,externalTree:D}=e,[N,j]=I.useState(null);!_&&N!==null&&j(null);const $=x.side||"flip",k=x.align||"flip",Z=x.fallbackAxisSide||"end",se=typeof t=="function"?t:void 0,le=Ze(se),K=se?le:t,Q=Dr(t),fe=q9()==="rtl",q=N||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":fe?"left":"right","inline-start":fe?"right":"left"}[r],W=c==="center"?q:`${q}-${c}`;let F=d;const be=1,Te=r==="bottom"?be:0,P=r==="top"?be:0,ne=r==="right"?be:0,ie=r==="left"?be:0;typeof F=="number"?F={top:F+Te,right:F+ie,bottom:F+P,left:F+ne}:F&&(F={top:(F.top||0)+Te,right:(F.right||0)+ie,bottom:(F.bottom||0)+P,left:(F.left||0)+ne});const de={boundary:f==="clipping-ancestors"?"clippingAncestors":f,padding:F},Ce=I.useRef(null),_e=Dr(i),ve=Dr(l),ht=[oj(Qt=>{const Kn=IC(Qt,r,fe),Us=typeof _e.current=="function"?_e.current(Kn):_e.current,kn=typeof ve.current=="function"?ve.current(Kn):ve.current;return{mainAxis:Us,crossAxis:kn,alignmentAxis:kn}},[typeof i!="function"?i:0,typeof l!="function"?l:0,fe,r])],Ft=k==="none"&&$!=="shift",oe=!Ft&&(h||R||$==="shift"),Fe=$==="none"?null:cj({...de,padding:{top:F.top+be,right:F.right+be,bottom:F.bottom+be,left:F.left+be},mainAxis:!R&&$==="flip",crossAxis:k==="flip"?"alignment":!1,fallbackAxisSideDirection:Z}),Ie=Ft?null:ij(Qt=>{const Kn=Ba(Qt.elements.floating).documentElement;return{...de,rootBoundary:R?{x:0,y:0,width:Kn.clientWidth,height:Kn.clientHeight}:void 0,mainAxis:k!=="none",crossAxis:oe,limiter:h||R?void 0:aj(Us=>{if(!Ce.current)return{};const{width:kn,height:hr}=Ce.current.getBoundingClientRect(),pr=ar(ys(Us.placement)),js=pr==="y"?kn:hr,Ho=pr==="y"?F.left+F.right:F.top+F.bottom;return{offset:js/2+Ho/2}})}},[de,h,R,F,k]);$==="shift"||k==="shift"||c==="center"?ht.push(Ie,Fe):ht.push(Fe,Ie),ht.push(lj({...de,apply({elements:{floating:Qt},rects:{reference:Kn},availableWidth:Us,availableHeight:kn}){Object.entries({"--available-width":`${Us}px`,"--available-height":`${kn}px`,"--anchor-width":`${Kn.width}px`,"--anchor-height":`${Kn.height}px`}).forEach(([hr,pr])=>{Qt.style.setProperty(hr,pr)})}}),K9(()=>({element:Ce.current||document.createElement("div"),padding:y,offsetParent:"floating"}),[y]),{name:"transformOrigin",fn(Qt){const{elements:Kn,middlewareData:Us,placement:kn,rects:hr,y:pr}=Qt,js=ys(kn),Ho=ar(js),Fo=Ce.current,Cm=Us.arrow?.x||0,Vf=Us.arrow?.y||0,Nl=Fo?.clientWidth||0,Xi=Fo?.clientHeight||0,zl=Cm+Nl/2,Ll=Vf+Xi/2,qf=Math.abs(Us.shift?.y||0),Gf=hr.reference.height/2,Fr=typeof i=="function"?i(IC(Qt,r,fe)):i,Bl=qf>Fr,Kf={top:`${zl}px calc(100% + ${Fr}px)`,bottom:`${zl}px ${-Fr}px`,left:`calc(100% + ${Fr}px) ${Ll}px`,right:`${-Fr}px ${Ll}px`}[js],Zf=`${zl}px ${hr.reference.y+Gf-pr}px`;return Kn.floating.style.setProperty("--transform-origin",oe&&Ho==="y"&&Bl?Zf:Kf),{}}},Z9,A),mt(()=>{!_&&v&&v.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[_,v]);const Pt=I.useMemo(()=>({elementResize:!g&&typeof ResizeObserver<"u",layoutShift:!g&&typeof IntersectionObserver<"u"}),[g]),{refs:we,elements:Ne,x:qe,y:Qe,middlewareData:ut,update:Be,placement:Le,context:on,isPositioned:it,floatingStyles:_s}=jj({rootContext:v,placement:W,middleware:ht,strategy:n,whileElementsMounted:b?void 0:(...Qt)=>SC(...Qt,Pt),nodeId:C,externalTree:D}),{sideX:gt,sideY:$t}=ut.adaptiveOrigin||zh,Ut=it?n:"fixed",an=I.useMemo(()=>A?{position:Ut,[gt]:qe,[$t]:Qe}:{position:Ut,..._s},[A,Ut,gt,qe,$t,Qe,_s]),ws=I.useRef(null);mt(()=>{if(!_)return;const Qt=Q.current,Kn=typeof Qt=="function"?Qt():Qt,kn=(OC(Kn)?Kn.current:Kn)||null||null;kn!==ws.current&&(we.setPositionReference(kn),ws.current=kn)},[_,we,K,Q]),I.useEffect(()=>{if(!_)return;const Qt=Q.current;typeof Qt!="function"&&OC(Qt)&&Qt.current!==ws.current&&(we.setPositionReference(Qt.current),ws.current=Qt.current)},[_,we,K,Q]),I.useEffect(()=>{if(b&&_&&Ne.domReference&&Ne.floating)return SC(Ne.domReference,Ne.floating,Be,Pt)},[b,_,Ne,Be,Pt]);const $s=ys(Le),Ff=CO(r,$s,fe),jo=Ni(Le)||"center",qn=!!ut.hide?.referenceHidden;mt(()=>{O&&_&&it&&j($s)},[O,_,it,$s]);const dr=I.useMemo(()=>({position:"absolute",top:ut.arrow?.y,left:ut.arrow?.x}),[ut.arrow]),Gn=ut.arrow?.centerOffset!==0;return I.useMemo(()=>({positionerStyles:an,arrowStyles:dr,arrowRef:Ce,arrowUncentered:Gn,side:Ff,align:jo,physicalSide:$s,anchorHidden:qn,refs:we,context:on,isPositioned:it,update:Be}),[an,dr,Ce,Gn,Ff,jo,$s,qn,we,on,it,Be])}function OC(e){return e!=null&&"current"in e}function TO(e){return e==="starting"?m$:Ds}const X9=I.forwardRef(function(t,n){const{render:r,className:i,anchor:c,positionMethod:l="absolute",side:f="top",align:d="center",sideOffset:h=0,alignOffset:y=0,collisionBoundary:g="clipping-ancestors",collisionPadding:b=5,arrowPadding:v=5,sticky:_=!1,disableAnchorTracking:x=!1,collisionAvoidance:R=y$,...C}=t,A=Rf(),O=j9(),D=A.useState("open"),N=A.useState("mounted"),j=A.useState("trackCursorAxis"),$=A.useState("disableHoverablePopup"),k=A.useState("floatingRootContext"),Z=A.useState("instantType"),se=A.useState("transitionStatus"),le=A.useState("hasViewport"),K=Y9({anchor:c,positionMethod:l,floatingRootContext:k,mounted:N,side:f,sideOffset:h,align:d,alignOffset:y,collisionBoundary:g,collisionPadding:b,sticky:_,arrowPadding:v,disableAnchorTracking:x,keepMounted:O,collisionAvoidance:R,adaptiveOrigin:le?Q9:void 0}),Q=I.useMemo(()=>{const W={};return(!D||j==="both"||$)&&(W.pointerEvents="none"),{role:"presentation",hidden:!N,style:{...K.positionerStyles,...W}}},[D,j,$,N,K.positionerStyles]),ye=I.useMemo(()=>({open:D,side:K.side,align:K.align,anchorHidden:K.anchorHidden,instant:j!=="none"?"tracking-cursor":Z}),[D,K.side,K.align,K.anchorHidden,j,Z]),fe=I.useMemo(()=>({...ye,arrowRef:K.arrowRef,arrowStyles:K.arrowStyles,arrowUncentered:K.arrowUncentered}),[ye,K.arrowRef,K.arrowStyles,K.arrowUncentered]),q=cr("div",t,{state:ye,props:[Q,TO(se),C],ref:[n,A.useStateSetter("positionerElement")],stateAttributesMapping:Ef});return U.jsx(xO.Provider,{value:fe,children:q})}),W9={...Ef,...mv},J9=I.forwardRef(function(t,n){const{className:r,render:i,...c}=t,l=Rf(),{side:f,align:d}=RO(),h=l.useState("open"),y=l.useState("instantType"),g=l.useState("transitionStatus"),b=l.useState("popupProps"),v=l.useState("floatingRootContext");Sv({open:h,ref:l.context.popupRef,onComplete(){h&&l.context.onOpenChangeComplete?.(!0)}});const _=l.useState("disabled"),x=l.useState("closeDelay");Gj(v,{enabled:!_,closeDelay:x});const R=I.useMemo(()=>({open:h,side:f,align:d,instant:y,transitionStatus:g}),[h,f,d,y,g]);return cr("div",t,{state:R,ref:[n,l.context.popupRef,l.useStateSetter("popupElement")],props:[b,TO(g),c],stateAttributesMapping:W9})}),eH=I.forwardRef(function(t,n){const{className:r,render:i,...c}=t,f=Rf().useState("instantType"),{open:d,arrowRef:h,side:y,align:g,arrowUncentered:b,arrowStyles:v}=RO(),_=I.useMemo(()=>({open:d,side:y,align:g,uncentered:b,instant:f}),[d,y,g,b,f]);return cr("div",t,{state:_,ref:[n,h],props:[{style:v,"aria-hidden":!0},c],stateAttributesMapping:Ef})}),tH=function(t){const{delay:n,closeDelay:r,timeout:i=400}=t,c=I.useMemo(()=>({delay:n,closeDelay:r}),[n,r]),l=I.useMemo(()=>({open:n,close:r}),[n,r]);return U.jsx(wO.Provider,{value:c,children:U.jsx(u8,{delay:l,timeoutMs:i,children:t.children})})};function nH(e){const t=Ct.c(6);let n,r;t[0]!==e?({delay:r,...n}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);const i=r===void 0?0:r;let c;return t[3]!==i||t[4]!==n?(c=U.jsx(tH,{"data-slot":"tooltip-provider",delay:i,...n}),t[3]=i,t[4]=n,t[5]=c):c=t[5],c}function sH(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=U.jsx(nH,{children:U.jsx(z9,{"data-slot":"tooltip",...n})}),t[2]=n,t[3]=r):r=t[3],r}function rH(e){const t=Ct.c(4);let n;t[0]!==e?({...n}=e,t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=U.jsx(U9,{"data-slot":"tooltip-trigger",...n}),t[2]=n,t[3]=r):r=t[3],r}function oH(e){const t=Ct.c(21);let n,r,i,c,l,f,d;t[0]!==e?({className:r,side:c,sideOffset:l,align:f,alignOffset:d,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l,t[6]=f,t[7]=d):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5],f=t[6],d=t[7]);const h=c===void 0?"top":c,y=l===void 0?4:l,g=f===void 0?"center":f,b=d===void 0?0:d;let v;t[8]!==r?(v=nn("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 z-50 w-fit max-w-xs origin-(--transform-origin) rounded-md bg-foreground px-3 py-1.5 text-background text-xs data-[state=delayed-open]:animate-in data-closed:animate-out data-open:animate-in **:data-[slot=kbd]:rounded-md",r),t[8]=r,t[9]=v):v=t[9];let _;t[10]===Symbol.for("react.memo_cache_sentinel")?(_=U.jsx(eH,{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=right]:top-1/2! data-[side=left]:-right-1 data-[side=top]:-bottom-2.5 data-[side=right]:-left-1 data-[side=left]:-translate-y-1/2 data-[side=right]:-translate-y-1/2"}),t[10]=_):_=t[10];let x;t[11]!==n||t[12]!==i||t[13]!==v?(x=U.jsxs(J9,{className:v,"data-slot":"tooltip-content",...i,children:[n,_]}),t[11]=n,t[12]=i,t[13]=v,t[14]=x):x=t[14];let R;return t[15]!==g||t[16]!==b||t[17]!==h||t[18]!==y||t[19]!==x?(R=U.jsx(F9,{children:U.jsx(X9,{align:g,alignOffset:b,className:"isolate z-50",side:h,sideOffset:y,children:x})}),t[15]=g,t[16]=b,t[17]=h,t[18]=y,t[19]=x,t[20]=R):R=t[20],R}const iH=768,AO=`(max-width: ${iH-1}px)`;function aH(e){const t=window.matchMedia(AO);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function cH(){return window.matchMedia(AO).matches}function lH(){return I.useSyncExternalStore(aH,cH)}const uH="sidebar_state",fH=3600*24*7,dH="12rem",hH="16rem",pH="3rem",mH="b",IO=I.createContext(null);function jp(){const e=I.useContext(IO);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function gH(e){const t=Ct.c(36);let n,r,i,c,l,f,d;t[0]!==e?({defaultOpen:d,open:i,onOpenChange:l,className:r,style:f,children:n,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l,t[6]=f,t[7]=d):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5],f=t[6],d=t[7]);const h=d===void 0?!0:d,y=lH(),[g,b]=I.useState(!1),[v,_]=I.useState(h),x=i??v;let R;t[8]!==x||t[9]!==l?(R=ye=>{const fe=typeof ye=="function"?ye(x):ye;l?l(fe):_(fe),document.cookie=`${uH}=${fe}; path=/; max-age=${fH}`},t[8]=x,t[9]=l,t[10]=R):R=t[10];const C=R;let A;t[11]!==y||t[12]!==C?(A=()=>y?b(bH):C(yH),t[11]=y,t[12]=C,t[13]=A):A=t[13];const O=A;let D,N;t[14]!==O?(D=()=>{const ye=fe=>{fe.key===mH&&(fe.metaKey||fe.ctrlKey)&&(fe.preventDefault(),O())};return window.addEventListener("keydown",ye),()=>window.removeEventListener("keydown",ye)},N=[O],t[14]=O,t[15]=D,t[16]=N):(D=t[15],N=t[16]),I.useEffect(D,N);const j=x?"expanded":"collapsed";let $;t[17]!==y||t[18]!==x||t[19]!==g||t[20]!==C||t[21]!==j||t[22]!==O?($={state:j,open:x,setOpen:C,isMobile:y,openMobile:g,setOpenMobile:b,toggleSidebar:O},t[17]=y,t[18]=x,t[19]=g,t[20]=C,t[21]=j,t[22]=O,t[23]=$):$=t[23];const k=$;let Z;t[24]!==r?(Z=nn("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),t[24]=r,t[25]=Z):Z=t[25];let se;t[26]!==f?(se={"--sidebar-width":dH,"--sidebar-width-icon":pH,...f},t[26]=f,t[27]=se):se=t[27];const le=se;let K;t[28]!==n||t[29]!==c||t[30]!==Z||t[31]!==le?(K=U.jsx("div",{className:Z,"data-slot":"sidebar-wrapper",style:le,...c,children:n}),t[28]=n,t[29]=c,t[30]=Z,t[31]=le,t[32]=K):K=t[32];let Q;return t[33]!==k||t[34]!==K?(Q=U.jsx(IO.Provider,{value:k,children:K}),t[33]=k,t[34]=K,t[35]=Q):Q=t[35],Q}function yH(e){return!e}function bH(e){return!e}function vH(e){const t=Ct.c(46);let n,r,i,c,l,f;t[0]!==e?({side:c,variant:l,collapsible:f,className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c,t[5]=l,t[6]=f):(n=t[1],r=t[2],i=t[3],c=t[4],l=t[5],f=t[6]);const d=c===void 0?"left":c,h=l===void 0?"sidebar":l,y=f===void 0?"offExamples":f,{isMobile:g,state:b,openMobile:v,setOpenMobile:_}=jp();if(y==="none"){let Z;t[7]!==r?(Z=nn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),t[7]=r,t[8]=Z):Z=t[8];let se;return t[9]!==n||t[10]!==i||t[11]!==Z?(se=U.jsx("div",{className:Z,"data-slot":"sidebar",...i,children:n}),t[9]=n,t[10]=i,t[11]=Z,t[12]=se):se=t[12],se}if(g){let Z;t[13]===Symbol.for("react.memo_cache_sentinel")?(Z={"--sidebar-width":hH},t[13]=Z):Z=t[13];let se;t[14]===Symbol.for("react.memo_cache_sentinel")?(se=U.jsxs(M9,{className:"sr-only",children:[U.jsx(D9,{children:"Sidebar"}),U.jsx(k9,{children:"Displays the mobile sidebar."})]}),t[14]=se):se=t[14];let le;t[15]!==n?(le=U.jsx("div",{className:"flex h-full w-full flex-col",children:n}),t[15]=n,t[16]=le):le=t[16];let K;t[17]!==d||t[18]!==le?(K=U.jsxs(O9,{className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden","data-mobile":"true","data-sidebar":"sidebar","data-slot":"sidebar",side:d,style:Z,children:[se,le]}),t[17]=d,t[18]=le,t[19]=K):K=t[19];let Q;return t[20]!==v||t[21]!==i||t[22]!==_||t[23]!==K?(Q=U.jsx(T9,{onOpenChange:_,open:v,...i,children:K}),t[20]=v,t[21]=i,t[22]=_,t[23]=K,t[24]=Q):Q=t[24],Q}const x=b==="collapsed"?y:"",R=h==="floating"||h==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let C;t[25]!==R?(C=nn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offExamples]:w-0","group-data-[side=right]:rotate-180",R),t[25]=R,t[26]=C):C=t[26];let A;t[27]!==C?(A=U.jsx("div",{className:C,"data-slot":"sidebar-gap"}),t[27]=C,t[28]=A):A=t[28];const O=d==="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)]",D=h==="floating"||h==="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";let N;t[29]!==r||t[30]!==O||t[31]!==D?(N=nn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",O,D,r),t[29]=r,t[30]=O,t[31]=D,t[32]=N):N=t[32];let j;t[33]!==n?(j=U.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]=j):j=t[34];let $;t[35]!==i||t[36]!==N||t[37]!==j?($=U.jsx("div",{className:N,"data-slot":"sidebar-container",...i,children:j}),t[35]=i,t[36]=N,t[37]=j,t[38]=$):$=t[38];let k;return t[39]!==d||t[40]!==b||t[41]!==$||t[42]!==x||t[43]!==A||t[44]!==h?(k=U.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-collapsible":x,"data-side":d,"data-slot":"sidebar","data-state":b,"data-variant":h,children:[A,$]}),t[39]=d,t[40]=b,t[41]=$,t[42]=x,t[43]=A,t[44]=h,t[45]=k):k=t[45],k}function SH(e){const t=Ct.c(15);let n,r,i;t[0]!==e?({className:n,onClick:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i):(n=t[1],r=t[2],i=t[3]);const{toggleSidebar:c}=jp();let l;t[4]!==n?(l=nn(n),t[4]=n,t[5]=l):l=t[5];let f;t[6]!==r||t[7]!==c?(f=g=>{r?.(g),c()},t[6]=r,t[7]=c,t[8]=f):f=t[8];let d,h;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=U.jsx(H$,{}),h=U.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),t[9]=d,t[10]=h):(d=t[9],h=t[10]);let y;return t[11]!==i||t[12]!==l||t[13]!==f?(y=U.jsxs(tl,{className:l,"data-sidebar":"trigger","data-slot":"sidebar-trigger",onClick:f,size:"icon-lg",variant:"ghost",...i,children:[d,h]}),t[11]=i,t[12]=l,t[13]=f,t[14]=y):y=t[14],y}function _H(e){const t=Ct.c(9);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);const{toggleSidebar:i}=jp();let c;t[3]!==n?(c=nn("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 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 hover:group-data-[collapsible=offExamples]:bg-sidebar group-data-[collapsible=offExamples]:after:left-full","[[data-side=left][data-collapsible=offExamples]_&]:-right-2","[[data-side=right][data-collapsible=offExamples]_&]:-left-2",n),t[3]=n,t[4]=c):c=t[4];let l;return t[5]!==r||t[6]!==c||t[7]!==i?(l=U.jsx("button",{"aria-label":"Toggle Sidebar",className:c,"data-sidebar":"rail","data-slot":"sidebar-rail",onClick:i,tabIndex:-1,title:"Toggle Sidebar",...r}),t[5]=r,t[6]=c,t[7]=i,t[8]=l):l=t[8],l}function wH(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=nn("flex flex-col gap-2 p-2",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=U.jsx("div",{className:i,"data-sidebar":"footer","data-slot":"sidebar-footer",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function EH(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=nn("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):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=U.jsx("div",{className:i,"data-sidebar":"content","data-slot":"sidebar-content",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function g0(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=nn("relative flex w-full min-w-0 flex-col px-2 py-1",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=U.jsx("div",{className:i,"data-sidebar":"group","data-slot":"sidebar-group",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function y0(e){const t=Ct.c(10);let n,r,i,c;if(t[0]!==e){const{className:d,render:h,...y}=e;n=h,c=WI,r="div",i=Dp({className:nn("flex h-8 shrink-0 items-center rounded-md px-2 text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 [&>svg]:size-4 [&>svg]:shrink-0",d)},y),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=c}else n=t[1],r=t[2],i=t[3],c=t[4];let l;t[5]===Symbol.for("react.memo_cache_sentinel")?(l={slot:"sidebar-group-label",sidebar:"group-label"},t[5]=l):l=t[5];let f;return t[6]!==n||t[7]!==r||t[8]!==i?(f={defaultTagName:r,props:i,render:n,state:l},t[6]=n,t[7]=r,t[8]=i,t[9]=f):f=t[9],c(f)}function Sh(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=nn("flex w-full min-w-0 flex-col gap-px",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=U.jsx("ul",{className:i,"data-sidebar":"menu","data-slot":"sidebar-menu",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}function ga(e){const t=Ct.c(8);let n,r;t[0]!==e?({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let i;t[3]!==n?(i=nn("group/menu-item relative",n),t[3]=n,t[4]=i):i=t[4];let c;return t[5]!==r||t[6]!==i?(c=U.jsx("li",{className:i,"data-sidebar":"menu-item","data-slot":"sidebar-menu-item",...r}),t[5]=r,t[6]=i,t[7]=c):c=t[7],c}const xH=t2("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 outline-hidden ring-sidebar-ring transition-[width,height,padding] 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 group-has-data-[sidebar=menu-action]/menu-item:pr-8 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 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0",{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 ya(e){const t=Ct.c(15);let{render:n,isActive:r,variant:i,size:c,tooltip:l,className:f,...d}=e;const h=r===void 0?!1:r,y=i===void 0?"default":i,g=c===void 0?"default":c,{isMobile:b,state:v}=jp(),_="button",x=Dp({className:nn(xH({variant:y,size:g}),f)},d),R=l?rH:n;let C;t[0]!==h||t[1]!==g?(C={slot:"sidebar-menu-button",sidebar:"menu-button",size:g,active:h},t[0]=h,t[1]=g,t[2]=C):C=t[2];let A;t[3]!==x||t[4]!==R||t[5]!==C?(A={defaultTagName:_,props:x,render:R,state:C},t[3]=x,t[4]=R,t[5]=C,t[6]=A):A=t[6];const O=WI(A);if(!l)return O;if(typeof l=="string"){let $;t[7]!==l?($={children:l},t[7]=l,t[8]=$):$=t[8],l=$}const D=v!=="collapsed"||b;let N;t[9]!==D||t[10]!==l?(N=U.jsx(oH,{align:"center",hidden:D,side:"right",...l}),t[9]=D,t[10]=l,t[11]=N):N=t[11];let j;return t[12]!==O||t[13]!==N?(j=U.jsxs(sH,{children:[O,N]}),t[12]=O,t[13]=N,t[14]=j):j=t[14],j}function RH(){const e=Ct.c(8),{theme:t,setTheme:n}=n$();let 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];const i=r;let c,l,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=U.jsx(q$,{className:"size-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l=U.jsx(U$,{className:"absolute size-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),f=U.jsx("span",{className:"sr-only",children:"Toggle theme"}),e[3]=c,e[4]=l,e[5]=f):(c=e[3],l=e[4],f=e[5]);let d;return e[6]!==i?(d=U.jsxs(tl,{className:"rounded-full",onClick:i,size:"icon-sm",variant:"ghost",children:[c,l,f]}),e[6]=i,e[7]=d):d=e[7],d}function OO(){const e=Ct.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=nn("z-50 flex h-10 shrink-0 items-center gap-2 border-sidebar-border border-b bg-sidebar px-4 text-sidebar-foreground","sticky top-0"),n=U.jsx(SH,{className:"-ml-1"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=U.jsxs("header",{className:t,children:[n,U.jsx("div",{className:"flex w-full justify-end",children:U.jsx(RH,{})})]}),e[2]=r):r=e[2],r}function CH(){const e=Ct.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=U.jsx("h1",{className:"font-bold text-4xl",children:"404"}),n=U.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=U.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-4",children:[t,n,U.jsx(Or,{to:"/",children:U.jsx(tl,{variant:"outline",children:"Go back home"})})]}),e[2]=r):r=e[2],r}function ge(e,t,n){function r(f,d){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,d);const h=l.prototype,y=Object.keys(h);for(let g=0;gn?.Parent&&f instanceof n.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class Zc extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class MO extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const DO={};function Da(e){return DO}function kO(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function Tb(e,t){return typeof t=="bigint"?t.toString():t}function wv(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Ev(e){return e==null}function xv(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function TH(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d?.[1]&&(i=Number.parseInt(d[1]))}const c=n>i?n:i,l=Number.parseInt(e.toFixed(c).replace(".","")),f=Number.parseInt(t.toFixed(c).replace(".",""));return l%f/10**c}const MC=Symbol("evaluating");function Rt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==MC)return r===void 0&&(r=MC,r=n()),r},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Ua(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function zi(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function DC(e){return JSON.stringify(e)}function AH(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const PO="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function lp(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const IH=wv(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function lf(e){if(lp(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(lp(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function NO(e){return lf(e)?{...e}:Array.isArray(e)?[...e]:e}const OH=new Set(["string","number","symbol"]);function Hp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Li(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function $e(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function MH(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const DH={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function kH(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c=zi(e._zod.def,{get shape(){const l={};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(l[f]=n.shape[f])}return Ua(this,"shape",l),l},checks:[]});return Li(e,c)}function PH(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=zi(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete l[f]}return Ua(this,"shape",l),l},checks:[]});return Li(e,c)}function NH(e,t){if(!lf(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const c=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(c,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=zi(e._zod.def,{get shape(){const c={...e._zod.def.shape,...t};return Ua(this,"shape",c),c}});return Li(e,i)}function zH(e,t){if(!lf(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=zi(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Ua(this,"shape",r),r}});return Li(e,n)}function LH(e,t){const n=zi(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Ua(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Li(e,n)}function BH(e,t,n){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=zi(t._zod.def,{get shape(){const f=t._zod.def.shape,d={...f};if(n)for(const h in n){if(!(h in f))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(d[h]=e?new e({type:"optional",innerType:f[h]}):f[h])}else for(const h in f)d[h]=e?new e({type:"optional",innerType:f[h]}):f[h];return Ua(this,"shape",d),d},checks:[]});return Li(t,l)}function $H(e,t,n){const r=zi(t._zod.def,{get shape(){const i=t._zod.def.shape,c={...i};if(n)for(const l in n){if(!(l in c))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(c[l]=new e({type:"nonoptional",innerType:i[l]}))}else for(const l in i)c[l]=new e({type:"nonoptional",innerType:i[l]});return Ua(this,"shape",c),c}});return Li(t,r)}function Hc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function _h(e){return typeof e=="string"?e:e?.message}function ka(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const i=_h(e.inst?._zod.def?.error?.(e))??_h(t?.error?.(e))??_h(n.customError?.(e))??_h(n.localeError?.(e))??"Invalid input";r.message=i}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Rv(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function uf(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const LO=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Tb,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},BO=ge("$ZodError",LO),Fp=ge("$ZodError",LO,{Parent:Error});function UH(e,t=n=>n.message){const n={},r=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function jH(e,t=n=>n.message){const n={_errors:[]},r=i=>{for(const c of i.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>r({issues:l}));else if(c.code==="invalid_key")r({issues:c.issues});else if(c.code==="invalid_element")r({issues:c.issues});else if(c.path.length===0)n._errors.push(t(c));else{let l=n,f=0;for(;f(t,n,r,i)=>{const c=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},c);if(l instanceof Promise)throw new Zc;if(l.issues.length){const f=new(i?.Err??e)(l.issues.map(d=>ka(d,c,Da())));throw PO(f,i?.callee),f}return l.value},ube=Vp(Fp),qp=e=>async(t,n,r,i)=>{const c=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},c);if(l instanceof Promise&&(l=await l),l.issues.length){const f=new(i?.Err??e)(l.issues.map(d=>ka(d,c,Da())));throw PO(f,i?.callee),f}return l.value},fbe=qp(Fp),Gp=e=>(t,n,r)=>{const i=r?{...r,async:!1}:{async:!1},c=t._zod.run({value:n,issues:[]},i);if(c instanceof Promise)throw new Zc;return c.issues.length?{success:!1,error:new(e??BO)(c.issues.map(l=>ka(l,i,Da())))}:{success:!0,data:c.value}},HH=Gp(Fp),Kp=e=>async(t,n,r)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let c=t._zod.run({value:n,issues:[]},i);return c instanceof Promise&&(c=await c),c.issues.length?{success:!1,error:new e(c.issues.map(l=>ka(l,i,Da())))}:{success:!0,data:c.value}},FH=Kp(Fp),VH=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Vp(e)(t,n,i)},qH=e=>(t,n,r)=>Vp(e)(t,n,r),GH=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return qp(e)(t,n,i)},KH=e=>async(t,n,r)=>qp(e)(t,n,r),ZH=e=>(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Gp(e)(t,n,i)},QH=e=>(t,n,r)=>Gp(e)(t,n,r),YH=e=>async(t,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Kp(e)(t,n,i)},XH=e=>async(t,n,r)=>Kp(e)(t,n,r),WH=/^[cC][^\s-]{8,}$/,JH=/^[0-9a-z]+$/,e7=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,t7=/^[0-9a-vA-V]{20}$/,n7=/^[A-Za-z0-9]{27}$/,s7=/^[a-zA-Z0-9_-]{21}$/,r7=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,o7=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,kC=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,i7=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,a7="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function c7(){return new RegExp(a7,"u")}const l7=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,u7=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,f7=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,d7=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,h7=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$O=/^[A-Za-z0-9_-]*$/,p7=/^\+[1-9]\d{6,14}$/,UO="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",m7=new RegExp(`^${UO}$`);function jO(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function g7(e){return new RegExp(`^${jO(e)}$`)}function y7(e){const t=jO({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${UO}T(?:${r})$`)}const b7=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},v7=/^-?\d+$/,S7=/^-?\d+(?:\.\d+)?$/,_7=/^[^A-Z]*$/,w7=/^[^a-z]*$/,bs=ge("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),HO={number:"number",bigint:"bigint",object:"date"},FO=ge("$ZodCheckLessThan",(e,t)=>{bs.init(e,t);const n=HO[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,c=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value{(t.inclusive?r.value<=t.value:r.value{bs.init(e,t);const n=HO[typeof t.value];e._zod.onattach.push(r=>{const i=r._zod.bag,c=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>c&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),E7=ge("$ZodCheckMultipleOf",(e,t)=>{bs.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):TH(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),x7=ge("$ZodCheckNumberFormat",(e,t)=>{bs.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[i,c]=DH[t.format];e._zod.onattach.push(l=>{const f=l._zod.bag;f.format=t.format,f.minimum=i,f.maximum=c,n&&(f.pattern=v7)}),e._zod.check=l=>{const f=l.value;if(n){if(!Number.isInteger(f)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:f,inst:e});return}if(!Number.isSafeInteger(f)){f>0?l.issues.push({input:f,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):l.issues.push({input:f,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}fc&&l.issues.push({origin:"number",input:f,code:"too_big",maximum:c,inclusive:!0,inst:e,continue:!t.abort})}}),R7=ge("$ZodCheckMaxLength",(e,t)=>{var n;bs.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Ev(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum{const i=r.value;if(i.length<=t.maximum)return;const l=Rv(i);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),C7=ge("$ZodCheckMinLength",(e,t)=>{var n;bs.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Ev(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const l=Rv(i);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),T7=ge("$ZodCheckLengthEquals",(e,t)=>{var n;bs.init(e,t),(n=e._zod.def).when??(n.when=r=>{const i=r.value;return!Ev(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=r=>{const i=r.value,c=i.length;if(c===t.length)return;const l=Rv(i),f=c>t.length;r.issues.push({origin:l,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Zp=ge("$ZodCheckStringFormat",(e,t)=>{var n,r;bs.init(e,t),e._zod.onattach.push(i=>{const c=i._zod.bag;c.format=t.format,t.pattern&&(c.patterns??(c.patterns=new Set),c.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),A7=ge("$ZodCheckRegex",(e,t)=>{Zp.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),I7=ge("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=_7),Zp.init(e,t)}),O7=ge("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=w7),Zp.init(e,t)}),M7=ge("$ZodCheckIncludes",(e,t)=>{bs.init(e,t);const n=Hp(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(i=>{const c=i._zod.bag;c.patterns??(c.patterns=new Set),c.patterns.add(r)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),D7=ge("$ZodCheckStartsWith",(e,t)=>{bs.init(e,t);const n=new RegExp(`^${Hp(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),k7=ge("$ZodCheckEndsWith",(e,t)=>{bs.init(e,t);const n=new RegExp(`.*${Hp(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),P7=ge("$ZodCheckOverwrite",(e,t)=>{bs.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class N7{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(` `).filter(l=>l),i=Math.min(...r.map(l=>l.length-l.trimStart().length)),c=r.map(l=>l.slice(i)).map(l=>" ".repeat(this.indent*2)+l);for(const l of c)this.content.push(l)}compile(){const t=Function,n=this?.args,i=[...(this?.content??[""]).map(c=>` ${c}`)];return new t(...n,i.join(` -`))}}const z7={major:4,minor:3,patch:6},vn=ge("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=z7;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const i of r)for(const c of i._zod.onattach)c(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(l,f,d)=>{let h=jc(l),y;for(const g of f){if(g._zod.def.when){if(!g._zod.def.when(l))continue}else if(h)continue;const v=l.issues.length,b=g._zod.check(l);if(b instanceof Promise&&d?.async===!1)throw new Kc;if(y||b instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await b,l.issues.length!==v&&(h||(h=jc(l,v)))});else{if(l.issues.length===v)continue;h||(h=jc(l,v))}}return y?y.then(()=>l):l},c=(l,f,d)=>{if(jc(l))return l.aborted=!0,l;const h=i(f,r,d);if(h instanceof Promise){if(d.async===!1)throw new Kc;return h.then(y=>e._zod.parse(y,d))}return e._zod.parse(h,d)};e._zod.run=(l,f)=>{if(f.skipChecks)return e._zod.parse(l,f);if(f.direction==="backward"){const h=e._zod.parse({value:l.value,issues:[]},{...f,skipChecks:!0});return h instanceof Promise?h.then(y=>c(y,l,f)):c(h,l,f)}const d=e._zod.parse(l,f);if(d instanceof Promise){if(f.async===!1)throw new Kc;return d.then(h=>i(h,r,f))}return i(d,r,f)}}Rt(e,"~standard",()=>({validate:i=>{try{const c=HH(e,i);return c.success?{value:c.data}:{issues:c.error?.issues}}catch{return FH(e,i).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Cb=ge("$ZodString",(e,t)=>{vn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??v7(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Ht=ge("$ZodStringFormat",(e,t)=>{Zp.init(e,t),Cb.init(e,t)}),L7=ge("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=o7),Ht.init(e,t)}),B7=ge("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=kC(r))}else t.pattern??(t.pattern=kC());Ht.init(e,t)}),$7=ge("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=i7),Ht.init(e,t)}),U7=ge("$ZodURL",(e,t)=>{Ht.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),j7=ge("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=c7()),Ht.init(e,t)}),H7=ge("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=s7),Ht.init(e,t)}),F7=ge("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=WH),Ht.init(e,t)}),V7=ge("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=JH),Ht.init(e,t)}),q7=ge("$ZodULID",(e,t)=>{t.pattern??(t.pattern=e7),Ht.init(e,t)}),G7=ge("$ZodXID",(e,t)=>{t.pattern??(t.pattern=t7),Ht.init(e,t)}),K7=ge("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=n7),Ht.init(e,t)}),Z7=ge("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=y7(t)),Ht.init(e,t)}),Q7=ge("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=m7),Ht.init(e,t)}),Y7=ge("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=g7(t)),Ht.init(e,t)}),X7=ge("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=r7),Ht.init(e,t)}),W7=ge("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=l7),Ht.init(e,t),e._zod.bag.format="ipv4"}),J7=ge("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=u7),Ht.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),eF=ge("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=f7),Ht.init(e,t)}),tF=ge("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=d7),Ht.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[i,c]=r;if(!c)throw new Error;const l=Number(c);if(`${l}`!==c)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function qO(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const nF=ge("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=h7),Ht.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{qO(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function sF(e){if(!$O.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return qO(n)}const rF=ge("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=$O),Ht.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{sF(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),oF=ge("$ZodE164",(e,t)=>{t.pattern??(t.pattern=p7),Ht.init(e,t)});function iF(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const aF=ge("$ZodJWT",(e,t)=>{Ht.init(e,t),e._zod.check=n=>{iF(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),GO=ge("$ZodNumber",(e,t)=>{vn.init(e,t),e._zod.pattern=e._zod.bag.pattern??S7,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const c=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...c?{received:c}:{}}),n}}),cF=ge("$ZodNumberFormat",(e,t)=>{x7.init(e,t),GO.init(e,t)}),lF=ge("$ZodUnknown",(e,t)=>{vn.init(e,t),e._zod.parse=n=>n}),uF=ge("$ZodNever",(e,t)=>{vn.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function PC(e,t,n){e.issues.length&&t.issues.push(...zO(n,e.issues)),t.value[n]=e.value}const fF=ge("$ZodArray",(e,t)=>{vn.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);const c=[];for(let l=0;lPC(h,n,l))):PC(d,n,l)}return c.length?Promise.all(c).then(()=>n):n}});function up(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...zO(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function KO(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=MH(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function ZO(e,t,n,r,i,c){const l=[],f=i.keySet,d=i.catchall._zod,h=d.def.type,y=d.optout==="optional";for(const g in t){if(f.has(g))continue;if(h==="never"){l.push(g);continue}const v=d.run({value:t[g],issues:[]},r);v instanceof Promise?e.push(v.then(b=>up(b,n,g,t,y))):up(v,n,g,t,y)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:c}),e.length?Promise.all(e).then(()=>n):n}const dF=ge("$ZodObject",(e,t)=>{if(vn.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const f=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...f};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=wb(()=>KO(t));Rt(e._zod,"propValues",()=>{const f=t.shape,d={};for(const h in f){const y=f[h]._zod;if(y.values){d[h]??(d[h]=new Set);for(const g of y.values)d[h].add(g)}}return d});const i=lp,c=t.catchall;let l;e._zod.parse=(f,d)=>{l??(l=r.value);const h=f.value;if(!i(h))return f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f;f.value={};const y=[],g=l.shape;for(const v of l.keys){const b=g[v],_=b._zod.optout==="optional",x=b._zod.run({value:h[v],issues:[]},d);x instanceof Promise?y.push(x.then(R=>up(R,f,v,h,_))):up(x,f,v,h,_)}return c?ZO(y,h,f,d,r.value,e):y.length?Promise.all(y).then(()=>f):f}}),hF=ge("$ZodObjectJIT",(e,t)=>{dF.init(e,t);const n=e._zod.parse,r=wb(()=>KO(t)),i=v=>{const b=new N7(["shape","payload","ctx"]),_=r.value,x=O=>{const D=DC(O);return`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`};b.write("const input = payload.value;");const R=Object.create(null);let C=0;for(const O of _.keys)R[O]=`key_${C++}`;b.write("const newResult = {};");for(const O of _.keys){const D=R[O],N=DC(O),$=v[O]?._zod?.optout==="optional";b.write(`const ${D} = ${x(O)};`),$?b.write(` +`))}}const z7={major:4,minor:3,patch:6},bn=ge("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=z7;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const i of r)for(const c of i._zod.onattach)c(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(l,f,d)=>{let h=Hc(l),y;for(const g of f){if(g._zod.def.when){if(!g._zod.def.when(l))continue}else if(h)continue;const b=l.issues.length,v=g._zod.check(l);if(v instanceof Promise&&d?.async===!1)throw new Zc;if(y||v instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await v,l.issues.length!==b&&(h||(h=Hc(l,b)))});else{if(l.issues.length===b)continue;h||(h=Hc(l,b))}}return y?y.then(()=>l):l},c=(l,f,d)=>{if(Hc(l))return l.aborted=!0,l;const h=i(f,r,d);if(h instanceof Promise){if(d.async===!1)throw new Zc;return h.then(y=>e._zod.parse(y,d))}return e._zod.parse(h,d)};e._zod.run=(l,f)=>{if(f.skipChecks)return e._zod.parse(l,f);if(f.direction==="backward"){const h=e._zod.parse({value:l.value,issues:[]},{...f,skipChecks:!0});return h instanceof Promise?h.then(y=>c(y,l,f)):c(h,l,f)}const d=e._zod.parse(l,f);if(d instanceof Promise){if(f.async===!1)throw new Zc;return d.then(h=>i(h,r,f))}return i(d,r,f)}}Rt(e,"~standard",()=>({validate:i=>{try{const c=HH(e,i);return c.success?{value:c.data}:{issues:c.error?.issues}}catch{return FH(e,i).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Cv=ge("$ZodString",(e,t)=>{bn.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??b7(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Ht=ge("$ZodStringFormat",(e,t)=>{Zp.init(e,t),Cv.init(e,t)}),L7=ge("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=o7),Ht.init(e,t)}),B7=ge("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=kC(r))}else t.pattern??(t.pattern=kC());Ht.init(e,t)}),$7=ge("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=i7),Ht.init(e,t)}),U7=ge("$ZodURL",(e,t)=>{Ht.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),j7=ge("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=c7()),Ht.init(e,t)}),H7=ge("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=s7),Ht.init(e,t)}),F7=ge("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=WH),Ht.init(e,t)}),V7=ge("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=JH),Ht.init(e,t)}),q7=ge("$ZodULID",(e,t)=>{t.pattern??(t.pattern=e7),Ht.init(e,t)}),G7=ge("$ZodXID",(e,t)=>{t.pattern??(t.pattern=t7),Ht.init(e,t)}),K7=ge("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=n7),Ht.init(e,t)}),Z7=ge("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=y7(t)),Ht.init(e,t)}),Q7=ge("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=m7),Ht.init(e,t)}),Y7=ge("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=g7(t)),Ht.init(e,t)}),X7=ge("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=r7),Ht.init(e,t)}),W7=ge("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=l7),Ht.init(e,t),e._zod.bag.format="ipv4"}),J7=ge("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=u7),Ht.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),eF=ge("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=f7),Ht.init(e,t)}),tF=ge("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=d7),Ht.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[i,c]=r;if(!c)throw new Error;const l=Number(c);if(`${l}`!==c)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function qO(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const nF=ge("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=h7),Ht.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{qO(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function sF(e){if(!$O.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return qO(n)}const rF=ge("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=$O),Ht.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{sF(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),oF=ge("$ZodE164",(e,t)=>{t.pattern??(t.pattern=p7),Ht.init(e,t)});function iF(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const aF=ge("$ZodJWT",(e,t)=>{Ht.init(e,t),e._zod.check=n=>{iF(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),GO=ge("$ZodNumber",(e,t)=>{bn.init(e,t),e._zod.pattern=e._zod.bag.pattern??S7,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const c=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...c?{received:c}:{}}),n}}),cF=ge("$ZodNumberFormat",(e,t)=>{x7.init(e,t),GO.init(e,t)}),lF=ge("$ZodUnknown",(e,t)=>{bn.init(e,t),e._zod.parse=n=>n}),uF=ge("$ZodNever",(e,t)=>{bn.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function PC(e,t,n){e.issues.length&&t.issues.push(...zO(n,e.issues)),t.value[n]=e.value}const fF=ge("$ZodArray",(e,t)=>{bn.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);const c=[];for(let l=0;lPC(h,n,l))):PC(d,n,l)}return c.length?Promise.all(c).then(()=>n):n}});function up(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...zO(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function KO(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=MH(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function ZO(e,t,n,r,i,c){const l=[],f=i.keySet,d=i.catchall._zod,h=d.def.type,y=d.optout==="optional";for(const g in t){if(f.has(g))continue;if(h==="never"){l.push(g);continue}const b=d.run({value:t[g],issues:[]},r);b instanceof Promise?e.push(b.then(v=>up(v,n,g,t,y))):up(b,n,g,t,y)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:c}),e.length?Promise.all(e).then(()=>n):n}const dF=ge("$ZodObject",(e,t)=>{if(bn.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const f=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...f};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=wv(()=>KO(t));Rt(e._zod,"propValues",()=>{const f=t.shape,d={};for(const h in f){const y=f[h]._zod;if(y.values){d[h]??(d[h]=new Set);for(const g of y.values)d[h].add(g)}}return d});const i=lp,c=t.catchall;let l;e._zod.parse=(f,d)=>{l??(l=r.value);const h=f.value;if(!i(h))return f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f;f.value={};const y=[],g=l.shape;for(const b of l.keys){const v=g[b],_=v._zod.optout==="optional",x=v._zod.run({value:h[b],issues:[]},d);x instanceof Promise?y.push(x.then(R=>up(R,f,b,h,_))):up(x,f,b,h,_)}return c?ZO(y,h,f,d,r.value,e):y.length?Promise.all(y).then(()=>f):f}}),hF=ge("$ZodObjectJIT",(e,t)=>{dF.init(e,t);const n=e._zod.parse,r=wv(()=>KO(t)),i=b=>{const v=new N7(["shape","payload","ctx"]),_=r.value,x=O=>{const D=DC(O);return`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`};v.write("const input = payload.value;");const R=Object.create(null);let C=0;for(const O of _.keys)R[O]=`key_${C++}`;v.write("const newResult = {};");for(const O of _.keys){const D=R[O],N=DC(O),$=b[O]?._zod?.optout==="optional";v.write(`const ${D} = ${x(O)};`),$?v.write(` if (${D}.issues.length) { if (${N} in input) { payload.issues = payload.issues.concat(${D}.issues.map(iss => ({ @@ -38,7 +38,7 @@ Error generating stack: `+u.message+` newResult[${N}] = ${D}.value; } - `):b.write(` + `):v.write(` if (${D}.issues.length) { payload.issues = payload.issues.concat(${D}.issues.map(iss => ({ ...iss, @@ -54,19 +54,19 @@ Error generating stack: `+u.message+` newResult[${N}] = ${D}.value; } - `)}b.write("payload.value = newResult;"),b.write("return payload;");const A=b.compile();return(O,D)=>A(v,O,D)};let c;const l=lp,f=!DO.jitless,h=f&&IH.value,y=t.catchall;let g;e._zod.parse=(v,b)=>{g??(g=r.value);const _=v.value;return l(_)?f&&h&&b?.async===!1&&b.jitless!==!0?(c||(c=i(t.shape)),v=c(v,b),y?ZO([],_,v,b,g,e):v):n(v,b):(v.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),v)}});function NC(e,t,n,r){for(const c of e)if(c.issues.length===0)return t.value=c.value,t;const i=e.filter(c=>!jc(c));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(c=>c.issues.map(l=>ka(l,r,Da())))}),t)}const pF=ge("$ZodUnion",(e,t)=>{vn.init(e,t),Rt(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Rt(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Rt(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Rt(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(c=>c._zod.pattern);return new RegExp(`^(${i.map(c=>xb(c.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,c)=>{if(n)return r(i,c);let l=!1;const f=[];for(const d of t.options){const h=d._zod.run({value:i.value,issues:[]},c);if(h instanceof Promise)f.push(h),l=!0;else{if(h.issues.length===0)return h;f.push(h)}}return l?Promise.all(f).then(d=>NC(d,i,e,c)):NC(f,i,e,c)}}),mF=ge("$ZodIntersection",(e,t)=>{vn.init(e,t),e._zod.parse=(n,r)=>{const i=n.value,c=t.left._zod.run({value:i,issues:[]},r),l=t.right._zod.run({value:i,issues:[]},r);return c instanceof Promise||l instanceof Promise?Promise.all([c,l]).then(([d,h])=>zC(n,d,h)):zC(n,c,l)}});function Av(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(lf(e)&&lf(t)){const n=Object.keys(t),r=Object.keys(e).filter(c=>n.indexOf(c)!==-1),i={...e,...t};for(const c of r){const l=Av(e[c],t[c]);if(!l.valid)return{valid:!1,mergeErrorPath:[c,...l.mergeErrorPath]};i[c]=l.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;rf.l&&f.r).map(([f])=>f);if(c.length&&i&&e.issues.push({...i,keys:c}),jc(e))return e;const l=Av(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const gF=ge("$ZodEnum",(e,t)=>{vn.init(e,t);const n=kO(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(i=>OH.has(typeof i)).map(i=>typeof i=="string"?Hp(i):i.toString()).join("|")})$`),e._zod.parse=(i,c)=>{const l=i.value;return r.has(l)||i.issues.push({code:"invalid_value",values:n,input:l,inst:e}),i}}),yF=ge("$ZodTransform",(e,t)=>{vn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new MO(e.constructor.name);const i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(l=>(n.value=l,n));if(i instanceof Promise)throw new Kc;return n.value=i,n}});function LC(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const QO=ge("$ZodOptional",(e,t)=>{vn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Rt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Rt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${xb(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>LC(c,n.value)):LC(i,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),vF=ge("$ZodExactOptional",(e,t)=>{QO.init(e,t),Rt(e._zod,"values",()=>t.innerType._zod.values),Rt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),bF=ge("$ZodNullable",(e,t)=>{vn.init(e,t),Rt(e._zod,"optin",()=>t.innerType._zod.optin),Rt(e._zod,"optout",()=>t.innerType._zod.optout),Rt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${xb(n.source)}|null)$`):void 0}),Rt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),SF=ge("$ZodDefault",(e,t)=>{vn.init(e,t),e._zod.optin="optional",Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>BC(c,t)):BC(i,t)}});function BC(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const _F=ge("$ZodPrefault",(e,t)=>{vn.init(e,t),e._zod.optin="optional",Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),wF=ge("$ZodNonOptional",(e,t)=>{vn.init(e,t),Rt(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>$C(c,e)):$C(i,e)}});function $C(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const EF=ge("$ZodCatch",(e,t)=>{vn.init(e,t),Rt(e._zod,"optin",()=>t.innerType._zod.optin),Rt(e._zod,"optout",()=>t.innerType._zod.optout),Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>(n.value=c.value,c.issues.length&&(n.value=t.catchValue({...n,error:{issues:c.issues.map(l=>ka(l,r,Da()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(c=>ka(c,r,Da()))},input:n.value}),n.issues=[]),n)}}),xF=ge("$ZodPipe",(e,t)=>{vn.init(e,t),Rt(e._zod,"values",()=>t.in._zod.values),Rt(e._zod,"optin",()=>t.in._zod.optin),Rt(e._zod,"optout",()=>t.out._zod.optout),Rt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const c=t.out._zod.run(n,r);return c instanceof Promise?c.then(l=>wh(l,t.in,r)):wh(c,t.in,r)}const i=t.in._zod.run(n,r);return i instanceof Promise?i.then(c=>wh(c,t.out,r)):wh(i,t.out,r)}});function wh(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const RF=ge("$ZodReadonly",(e,t)=>{vn.init(e,t),Rt(e._zod,"propValues",()=>t.innerType._zod.propValues),Rt(e._zod,"values",()=>t.innerType._zod.values),Rt(e._zod,"optin",()=>t.innerType?._zod?.optin),Rt(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(UC):UC(i)}});function UC(e){return e.value=Object.freeze(e.value),e}const CF=ge("$ZodCustom",(e,t)=>{vs.init(e,t),vn.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(c=>jC(c,n,r,e));jC(i,n,r,e)}});function jC(e,t,n,r){if(!e){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(uf(i))}}var HC;class TF{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const i={...r,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function AF(){return new TF}(HC=globalThis).__zod_globalRegistry??(HC.__zod_globalRegistry=AF());const ju=globalThis.__zod_globalRegistry;function IF(e,t){return new e({type:"string",...$e(t)})}function OF(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...$e(t)})}function FC(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...$e(t)})}function MF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...$e(t)})}function DF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...$e(t)})}function kF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...$e(t)})}function PF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...$e(t)})}function NF(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...$e(t)})}function zF(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...$e(t)})}function LF(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...$e(t)})}function BF(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...$e(t)})}function $F(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...$e(t)})}function UF(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...$e(t)})}function jF(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...$e(t)})}function HF(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...$e(t)})}function FF(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...$e(t)})}function VF(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...$e(t)})}function qF(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...$e(t)})}function GF(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...$e(t)})}function KF(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...$e(t)})}function ZF(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...$e(t)})}function QF(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...$e(t)})}function YF(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...$e(t)})}function XF(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...$e(t)})}function WF(e,t){return new e({type:"string",format:"date",check:"string_format",...$e(t)})}function JF(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...$e(t)})}function eV(e,t){return new e({type:"string",format:"duration",check:"string_format",...$e(t)})}function tV(e,t){return new e({type:"number",checks:[],...$e(t)})}function nV(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...$e(t)})}function sV(e){return new e({type:"unknown"})}function rV(e,t){return new e({type:"never",...$e(t)})}function VC(e,t){return new FO({check:"less_than",...$e(t),value:e,inclusive:!1})}function v0(e,t){return new FO({check:"less_than",...$e(t),value:e,inclusive:!0})}function qC(e,t){return new VO({check:"greater_than",...$e(t),value:e,inclusive:!1})}function b0(e,t){return new VO({check:"greater_than",...$e(t),value:e,inclusive:!0})}function GC(e,t){return new E7({check:"multiple_of",...$e(t),value:e})}function YO(e,t){return new R7({check:"max_length",...$e(t),maximum:e})}function fp(e,t){return new C7({check:"min_length",...$e(t),minimum:e})}function XO(e,t){return new T7({check:"length_equals",...$e(t),length:e})}function oV(e,t){return new A7({check:"string_format",format:"regex",...$e(t),pattern:e})}function iV(e){return new I7({check:"string_format",format:"lowercase",...$e(e)})}function aV(e){return new O7({check:"string_format",format:"uppercase",...$e(e)})}function cV(e,t){return new M7({check:"string_format",format:"includes",...$e(t),includes:e})}function lV(e,t){return new D7({check:"string_format",format:"starts_with",...$e(t),prefix:e})}function uV(e,t){return new k7({check:"string_format",format:"ends_with",...$e(t),suffix:e})}function fl(e){return new P7({check:"overwrite",tx:e})}function fV(e){return fl(t=>t.normalize(e))}function dV(){return fl(e=>e.trim())}function hV(){return fl(e=>e.toLowerCase())}function pV(){return fl(e=>e.toUpperCase())}function mV(){return fl(e=>AH(e))}function gV(e,t,n){return new e({type:"array",element:t,...$e(n)})}function yV(e,t,n){return new e({type:"custom",check:"custom",fn:t,...$e(n)})}function vV(e){const t=bV(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(uf(r,n.value,t._zod.def));else{const i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(uf(i))}},e(n.value,n)));return t}function bV(e,t){const n=new vs({check:"custom",...$e(t)});return n._zod.check=e,n}function WO(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ju,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function jn(e,t,n={path:[],schemaPath:[]}){var r;const i=e._zod.def,c=t.seen.get(e);if(c)return c.count++,n.schemaPath.includes(e)&&(c.cycle=n.path),c.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const f=e._zod.toJSONSchema?.();if(f)l.schema=f;else{const y={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,y);else{const v=l.schema,b=t.processors[i.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);b(e,t,v,y)}const g=e._zod.parent;g&&(l.ref||(l.ref=g),jn(g,t,y),t.seen.get(g).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&ns(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function JO(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const l of e.seen.entries()){const f=e.metadataRegistry.get(l[0])?.id;if(f){const d=r.get(f);if(d&&d!==l[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(f,l[0])}}const i=l=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(l[0])?.id,v=e.external.uri??(_=>_);if(g)return{ref:v(g)};const b=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=b,{defId:b,ref:`${v("__shared")}#/${f}/${b}`}}if(l[1]===n)return{ref:"#"};const h=`#/${f}/`,y=l[1].schema.id??`__schema${e.counter++}`;return{defId:y,ref:h+y}},c=l=>{if(l[1].schema.$ref)return;const f=l[1],{ref:d,defId:h}=i(l);f.def={...f.schema},h&&(f.defId=h);const y=f.schema;for(const g in y)delete y[g];y.$ref=d};if(e.cycles==="throw")for(const l of e.seen.entries()){const f=l[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/ + `)}v.write("payload.value = newResult;"),v.write("return payload;");const A=v.compile();return(O,D)=>A(b,O,D)};let c;const l=lp,f=!DO.jitless,h=f&&IH.value,y=t.catchall;let g;e._zod.parse=(b,v)=>{g??(g=r.value);const _=b.value;return l(_)?f&&h&&v?.async===!1&&v.jitless!==!0?(c||(c=i(t.shape)),b=c(b,v),y?ZO([],_,b,v,g,e):b):n(b,v):(b.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),b)}});function NC(e,t,n,r){for(const c of e)if(c.issues.length===0)return t.value=c.value,t;const i=e.filter(c=>!Hc(c));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(c=>c.issues.map(l=>ka(l,r,Da())))}),t)}const pF=ge("$ZodUnion",(e,t)=>{bn.init(e,t),Rt(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Rt(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Rt(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Rt(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(c=>c._zod.pattern);return new RegExp(`^(${i.map(c=>xv(c.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,c)=>{if(n)return r(i,c);let l=!1;const f=[];for(const d of t.options){const h=d._zod.run({value:i.value,issues:[]},c);if(h instanceof Promise)f.push(h),l=!0;else{if(h.issues.length===0)return h;f.push(h)}}return l?Promise.all(f).then(d=>NC(d,i,e,c)):NC(f,i,e,c)}}),mF=ge("$ZodIntersection",(e,t)=>{bn.init(e,t),e._zod.parse=(n,r)=>{const i=n.value,c=t.left._zod.run({value:i,issues:[]},r),l=t.right._zod.run({value:i,issues:[]},r);return c instanceof Promise||l instanceof Promise?Promise.all([c,l]).then(([d,h])=>zC(n,d,h)):zC(n,c,l)}});function Ab(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(lf(e)&&lf(t)){const n=Object.keys(t),r=Object.keys(e).filter(c=>n.indexOf(c)!==-1),i={...e,...t};for(const c of r){const l=Ab(e[c],t[c]);if(!l.valid)return{valid:!1,mergeErrorPath:[c,...l.mergeErrorPath]};i[c]=l.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;rf.l&&f.r).map(([f])=>f);if(c.length&&i&&e.issues.push({...i,keys:c}),Hc(e))return e;const l=Ab(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const gF=ge("$ZodEnum",(e,t)=>{bn.init(e,t);const n=kO(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(i=>OH.has(typeof i)).map(i=>typeof i=="string"?Hp(i):i.toString()).join("|")})$`),e._zod.parse=(i,c)=>{const l=i.value;return r.has(l)||i.issues.push({code:"invalid_value",values:n,input:l,inst:e}),i}}),yF=ge("$ZodTransform",(e,t)=>{bn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new MO(e.constructor.name);const i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(l=>(n.value=l,n));if(i instanceof Promise)throw new Zc;return n.value=i,n}});function LC(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const QO=ge("$ZodOptional",(e,t)=>{bn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Rt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Rt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${xv(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>LC(c,n.value)):LC(i,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),bF=ge("$ZodExactOptional",(e,t)=>{QO.init(e,t),Rt(e._zod,"values",()=>t.innerType._zod.values),Rt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),vF=ge("$ZodNullable",(e,t)=>{bn.init(e,t),Rt(e._zod,"optin",()=>t.innerType._zod.optin),Rt(e._zod,"optout",()=>t.innerType._zod.optout),Rt(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${xv(n.source)}|null)$`):void 0}),Rt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),SF=ge("$ZodDefault",(e,t)=>{bn.init(e,t),e._zod.optin="optional",Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>BC(c,t)):BC(i,t)}});function BC(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const _F=ge("$ZodPrefault",(e,t)=>{bn.init(e,t),e._zod.optin="optional",Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),wF=ge("$ZodNonOptional",(e,t)=>{bn.init(e,t),Rt(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>$C(c,e)):$C(i,e)}});function $C(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const EF=ge("$ZodCatch",(e,t)=>{bn.init(e,t),Rt(e._zod,"optin",()=>t.innerType._zod.optin),Rt(e._zod,"optout",()=>t.innerType._zod.optout),Rt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(c=>(n.value=c.value,c.issues.length&&(n.value=t.catchValue({...n,error:{issues:c.issues.map(l=>ka(l,r,Da()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(c=>ka(c,r,Da()))},input:n.value}),n.issues=[]),n)}}),xF=ge("$ZodPipe",(e,t)=>{bn.init(e,t),Rt(e._zod,"values",()=>t.in._zod.values),Rt(e._zod,"optin",()=>t.in._zod.optin),Rt(e._zod,"optout",()=>t.out._zod.optout),Rt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const c=t.out._zod.run(n,r);return c instanceof Promise?c.then(l=>wh(l,t.in,r)):wh(c,t.in,r)}const i=t.in._zod.run(n,r);return i instanceof Promise?i.then(c=>wh(c,t.out,r)):wh(i,t.out,r)}});function wh(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const RF=ge("$ZodReadonly",(e,t)=>{bn.init(e,t),Rt(e._zod,"propValues",()=>t.innerType._zod.propValues),Rt(e._zod,"values",()=>t.innerType._zod.values),Rt(e._zod,"optin",()=>t.innerType?._zod?.optin),Rt(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(UC):UC(i)}});function UC(e){return e.value=Object.freeze(e.value),e}const CF=ge("$ZodCustom",(e,t)=>{bs.init(e,t),bn.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(c=>jC(c,n,r,e));jC(i,n,r,e)}});function jC(e,t,n,r){if(!e){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(uf(i))}}var HC;class TF{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const i={...r,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function AF(){return new TF}(HC=globalThis).__zod_globalRegistry??(HC.__zod_globalRegistry=AF());const ju=globalThis.__zod_globalRegistry;function IF(e,t){return new e({type:"string",...$e(t)})}function OF(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...$e(t)})}function FC(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...$e(t)})}function MF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...$e(t)})}function DF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...$e(t)})}function kF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...$e(t)})}function PF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...$e(t)})}function NF(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...$e(t)})}function zF(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...$e(t)})}function LF(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...$e(t)})}function BF(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...$e(t)})}function $F(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...$e(t)})}function UF(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...$e(t)})}function jF(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...$e(t)})}function HF(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...$e(t)})}function FF(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...$e(t)})}function VF(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...$e(t)})}function qF(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...$e(t)})}function GF(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...$e(t)})}function KF(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...$e(t)})}function ZF(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...$e(t)})}function QF(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...$e(t)})}function YF(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...$e(t)})}function XF(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...$e(t)})}function WF(e,t){return new e({type:"string",format:"date",check:"string_format",...$e(t)})}function JF(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...$e(t)})}function eV(e,t){return new e({type:"string",format:"duration",check:"string_format",...$e(t)})}function tV(e,t){return new e({type:"number",checks:[],...$e(t)})}function nV(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...$e(t)})}function sV(e){return new e({type:"unknown"})}function rV(e,t){return new e({type:"never",...$e(t)})}function VC(e,t){return new FO({check:"less_than",...$e(t),value:e,inclusive:!1})}function b0(e,t){return new FO({check:"less_than",...$e(t),value:e,inclusive:!0})}function qC(e,t){return new VO({check:"greater_than",...$e(t),value:e,inclusive:!1})}function v0(e,t){return new VO({check:"greater_than",...$e(t),value:e,inclusive:!0})}function GC(e,t){return new E7({check:"multiple_of",...$e(t),value:e})}function YO(e,t){return new R7({check:"max_length",...$e(t),maximum:e})}function fp(e,t){return new C7({check:"min_length",...$e(t),minimum:e})}function XO(e,t){return new T7({check:"length_equals",...$e(t),length:e})}function oV(e,t){return new A7({check:"string_format",format:"regex",...$e(t),pattern:e})}function iV(e){return new I7({check:"string_format",format:"lowercase",...$e(e)})}function aV(e){return new O7({check:"string_format",format:"uppercase",...$e(e)})}function cV(e,t){return new M7({check:"string_format",format:"includes",...$e(t),includes:e})}function lV(e,t){return new D7({check:"string_format",format:"starts_with",...$e(t),prefix:e})}function uV(e,t){return new k7({check:"string_format",format:"ends_with",...$e(t),suffix:e})}function dl(e){return new P7({check:"overwrite",tx:e})}function fV(e){return dl(t=>t.normalize(e))}function dV(){return dl(e=>e.trim())}function hV(){return dl(e=>e.toLowerCase())}function pV(){return dl(e=>e.toUpperCase())}function mV(){return dl(e=>AH(e))}function gV(e,t,n){return new e({type:"array",element:t,...$e(n)})}function yV(e,t,n){return new e({type:"custom",check:"custom",fn:t,...$e(n)})}function bV(e){const t=vV(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(uf(r,n.value,t._zod.def));else{const i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(uf(i))}},e(n.value,n)));return t}function vV(e,t){const n=new bs({check:"custom",...$e(t)});return n._zod.check=e,n}function WO(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ju,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function jn(e,t,n={path:[],schemaPath:[]}){var r;const i=e._zod.def,c=t.seen.get(e);if(c)return c.count++,n.schemaPath.includes(e)&&(c.cycle=n.path),c.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const f=e._zod.toJSONSchema?.();if(f)l.schema=f;else{const y={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,y);else{const b=l.schema,v=t.processors[i.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);v(e,t,b,y)}const g=e._zod.parent;g&&(l.ref||(l.ref=g),jn(g,t,y),t.seen.get(g).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&ns(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function JO(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const l of e.seen.entries()){const f=e.metadataRegistry.get(l[0])?.id;if(f){const d=r.get(f);if(d&&d!==l[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(f,l[0])}}const i=l=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(l[0])?.id,b=e.external.uri??(_=>_);if(g)return{ref:b(g)};const v=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=v,{defId:v,ref:`${b("__shared")}#/${f}/${v}`}}if(l[1]===n)return{ref:"#"};const h=`#/${f}/`,y=l[1].schema.id??`__schema${e.counter++}`;return{defId:y,ref:h+y}},c=l=>{if(l[1].schema.$ref)return;const f=l[1],{ref:d,defId:h}=i(l);f.def={...f.schema},h&&(f.defId=h);const y=f.schema;for(const g in y)delete y[g];y.$ref=d};if(e.cycles==="throw")for(const l of e.seen.entries()){const f=l[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const f=l[1];if(t===l[0]){c(l);continue}if(e.external){const h=e.external.registry.get(l[0])?.id;if(t!==l[0]&&h){c(l);continue}}if(e.metadataRegistry.get(l[0])?.id){c(l);continue}if(f.cycle){c(l);continue}if(f.count>1&&e.reused==="ref"){c(l);continue}}}function eM(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=l=>{const f=e.seen.get(l);if(f.ref===null)return;const d=f.def??f.schema,h={...d},y=f.ref;if(f.ref=null,y){r(y);const v=e.seen.get(y),b=v.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(b)):Object.assign(d,b),Object.assign(d,h),l._zod.parent===y)for(const x in d)x==="$ref"||x==="allOf"||x in h||delete d[x];if(b.$ref&&v.def)for(const x in d)x==="$ref"||x==="allOf"||x in v.def&&JSON.stringify(d[x])===JSON.stringify(v.def[x])&&delete d[x]}const g=l._zod.parent;if(g&&g!==y){r(g);const v=e.seen.get(g);if(v?.schema.$ref&&(d.$ref=v.schema.$ref,v.def))for(const b in d)b==="$ref"||b==="allOf"||b in v.def&&JSON.stringify(d[b])===JSON.stringify(v.def[b])&&delete d[b]}e.override({zodSchema:l,jsonSchema:d,path:f.path??[]})};for(const l of[...e.seen.entries()].reverse())r(l[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(l)}Object.assign(i,n.def??n.schema);const c=e.external?.defs??{};for(const l of e.seen.entries()){const f=l[1];f.def&&f.defId&&(c[f.defId]=f.def)}e.external||Object.keys(c).length>0&&(e.target==="draft-2020-12"?i.$defs=c:i.definitions=c);try{const l=JSON.parse(JSON.stringify(i));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:dp(t,"input",e.processors),output:dp(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function ns(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return ns(r.element,n);if(r.type==="set")return ns(r.valueType,n);if(r.type==="lazy")return ns(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return ns(r.innerType,n);if(r.type==="intersection")return ns(r.left,n)||ns(r.right,n);if(r.type==="record"||r.type==="map")return ns(r.keyType,n)||ns(r.valueType,n);if(r.type==="pipe")return ns(r.in,n)||ns(r.out,n);if(r.type==="object"){for(const i in r.shape)if(ns(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(const i of r.options)if(ns(i,n))return!0;return!1}if(r.type==="tuple"){for(const i of r.items)if(ns(i,n))return!0;return!!(r.rest&&ns(r.rest,n))}return!1}const SV=(e,t={})=>n=>{const r=WO({...n,processors:t});return jn(e,r),JO(r,e),eM(r,e)},dp=(e,t,n={})=>r=>{const{libraryOptions:i,target:c}=r??{},l=WO({...i??{},target:c,io:t,processors:n});return jn(e,l),JO(l,e),eM(l,e)},_V={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},wV=(e,t,n,r)=>{const i=n;i.type="string";const{minimum:c,maximum:l,format:f,patterns:d,contentEncoding:h}=e._zod.bag;if(typeof c=="number"&&(i.minLength=c),typeof l=="number"&&(i.maxLength=l),f&&(i.format=_V[f]??f,i.format===""&&delete i.format,f==="time"&&delete i.format),h&&(i.contentEncoding=h),d&&d.size>0){const y=[...d];y.length===1?i.pattern=y[0].source:y.length>1&&(i.allOf=[...y.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},EV=(e,t,n,r)=>{const i=n,{minimum:c,maximum:l,format:f,multipleOf:d,exclusiveMaximum:h,exclusiveMinimum:y}=e._zod.bag;typeof f=="string"&&f.includes("int")?i.type="integer":i.type="number",typeof y=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=y,i.exclusiveMinimum=!0):i.exclusiveMinimum=y),typeof c=="number"&&(i.minimum=c,typeof y=="number"&&t.target!=="draft-04"&&(y>=c?delete i.minimum:delete i.exclusiveMinimum)),typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=h,i.exclusiveMaximum=!0):i.exclusiveMaximum=h),typeof l=="number"&&(i.maximum=l,typeof h=="number"&&t.target!=="draft-04"&&(h<=l?delete i.maximum:delete i.exclusiveMaximum)),typeof d=="number"&&(i.multipleOf=d)},xV=(e,t,n,r)=>{n.not={}},RV=(e,t,n,r)=>{},CV=(e,t,n,r)=>{const i=e._zod.def,c=kO(i.entries);c.every(l=>typeof l=="number")&&(n.type="number"),c.every(l=>typeof l=="string")&&(n.type="string"),n.enum=c},TV=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},AV=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},IV=(e,t,n,r)=>{const i=n,c=e._zod.def,{minimum:l,maximum:f}=e._zod.bag;typeof l=="number"&&(i.minItems=l),typeof f=="number"&&(i.maxItems=f),i.type="array",i.items=jn(c.element,t,{...r,path:[...r.path,"items"]})},OV=(e,t,n,r)=>{const i=n,c=e._zod.def;i.type="object",i.properties={};const l=c.shape;for(const h in l)i.properties[h]=jn(l[h],t,{...r,path:[...r.path,"properties",h]});const f=new Set(Object.keys(l)),d=new Set([...f].filter(h=>{const y=c.shape[h]._zod;return t.io==="input"?y.optin===void 0:y.optout===void 0}));d.size>0&&(i.required=Array.from(d)),c.catchall?._zod.def.type==="never"?i.additionalProperties=!1:c.catchall?c.catchall&&(i.additionalProperties=jn(c.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},MV=(e,t,n,r)=>{const i=e._zod.def,c=i.inclusive===!1,l=i.options.map((f,d)=>jn(f,t,{...r,path:[...r.path,c?"oneOf":"anyOf",d]}));c?n.oneOf=l:n.anyOf=l},DV=(e,t,n,r)=>{const i=e._zod.def,c=jn(i.left,t,{...r,path:[...r.path,"allOf",0]}),l=jn(i.right,t,{...r,path:[...r.path,"allOf",1]}),f=h=>"allOf"in h&&Object.keys(h).length===1,d=[...f(c)?c.allOf:[c],...f(l)?l.allOf:[l]];n.allOf=d},kV=(e,t,n,r)=>{const i=e._zod.def,c=jn(i.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=i.innerType,n.nullable=!0):n.anyOf=[c,{type:"null"}]},PV=(e,t,n,r)=>{const i=e._zod.def;jn(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType},NV=(e,t,n,r)=>{const i=e._zod.def;jn(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},zV=(e,t,n,r)=>{const i=e._zod.def;jn(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},LV=(e,t,n,r)=>{const i=e._zod.def;jn(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType;let l;try{l=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},BV=(e,t,n,r)=>{const i=e._zod.def,c=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;jn(c,t,r);const l=t.seen.get(e);l.ref=c},$V=(e,t,n,r)=>{const i=e._zod.def;jn(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType,n.readOnly=!0},tM=(e,t,n,r)=>{const i=e._zod.def;jn(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType},UV=ge("ZodISODateTime",(e,t)=>{Z7.init(e,t),Zt.init(e,t)});function jV(e){return XF(UV,e)}const HV=ge("ZodISODate",(e,t)=>{Q7.init(e,t),Zt.init(e,t)});function FV(e){return WF(HV,e)}const VV=ge("ZodISOTime",(e,t)=>{Y7.init(e,t),Zt.init(e,t)});function qV(e){return JF(VV,e)}const GV=ge("ZodISODuration",(e,t)=>{X7.init(e,t),Zt.init(e,t)});function KV(e){return eV(GV,e)}const ZV=(e,t)=>{BO.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>jH(e,n)},flatten:{value:n=>UH(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Tv,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Tv,2)}},isEmpty:{get(){return e.issues.length===0}}})},lr=ge("ZodError",ZV,{Parent:Error}),QV=Vp(lr),YV=qp(lr),XV=Gp(lr),WV=Kp(lr),JV=VH(lr),eq=qH(lr),tq=GH(lr),nq=KH(lr),sq=ZH(lr),rq=QH(lr),oq=YH(lr),iq=XH(lr),bn=ge("ZodType",(e,t)=>(vn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:dp(e,"input"),output:dp(e,"output")}}),e.toJSONSchema=SV(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(zi(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>Li(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>QV(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>XV(e,n,r),e.parseAsync=async(n,r)=>YV(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>WV(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>JV(e,n,r),e.decode=(n,r)=>eq(e,n,r),e.encodeAsync=async(n,r)=>tq(e,n,r),e.decodeAsync=async(n,r)=>nq(e,n,r),e.safeEncode=(n,r)=>sq(e,n,r),e.safeDecode=(n,r)=>rq(e,n,r),e.safeEncodeAsync=async(n,r)=>oq(e,n,r),e.safeDecodeAsync=async(n,r)=>iq(e,n,r),e.refine=(n,r)=>e.check(Jq(n,r)),e.superRefine=n=>e.check(eG(n)),e.overwrite=n=>e.check(fl(n)),e.optional=()=>QC(e),e.exactOptional=()=>Uq(e),e.nullable=()=>YC(e),e.nullish=()=>QC(YC(e)),e.nonoptional=n=>Gq(e,n),e.array=()=>Oq(e),e.or=n=>kq([e,n]),e.and=n=>Nq(e,n),e.transform=n=>XC(e,Bq(n)),e.default=n=>Fq(e,n),e.prefault=n=>qq(e,n),e.catch=n=>Zq(e,n),e.pipe=n=>XC(e,n),e.readonly=()=>Xq(e),e.describe=n=>{const r=e.clone();return ju.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return ju.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return ju.get(e);const r=e.clone();return ju.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),nM=ge("_ZodString",(e,t)=>{Cb.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(r,i,c)=>wV(e,r,i);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(oV(...r)),e.includes=(...r)=>e.check(cV(...r)),e.startsWith=(...r)=>e.check(lV(...r)),e.endsWith=(...r)=>e.check(uV(...r)),e.min=(...r)=>e.check(fp(...r)),e.max=(...r)=>e.check(YO(...r)),e.length=(...r)=>e.check(XO(...r)),e.nonempty=(...r)=>e.check(fp(1,...r)),e.lowercase=r=>e.check(iV(r)),e.uppercase=r=>e.check(aV(r)),e.trim=()=>e.check(dV()),e.normalize=(...r)=>e.check(fV(...r)),e.toLowerCase=()=>e.check(hV()),e.toUpperCase=()=>e.check(pV()),e.slugify=()=>e.check(mV())}),aq=ge("ZodString",(e,t)=>{Cb.init(e,t),nM.init(e,t),e.email=n=>e.check(OF(cq,n)),e.url=n=>e.check(NF(lq,n)),e.jwt=n=>e.check(YF(xq,n)),e.emoji=n=>e.check(zF(uq,n)),e.guid=n=>e.check(FC(KC,n)),e.uuid=n=>e.check(MF(Eh,n)),e.uuidv4=n=>e.check(DF(Eh,n)),e.uuidv6=n=>e.check(kF(Eh,n)),e.uuidv7=n=>e.check(PF(Eh,n)),e.nanoid=n=>e.check(LF(fq,n)),e.guid=n=>e.check(FC(KC,n)),e.cuid=n=>e.check(BF(dq,n)),e.cuid2=n=>e.check($F(hq,n)),e.ulid=n=>e.check(UF(pq,n)),e.base64=n=>e.check(KF(_q,n)),e.base64url=n=>e.check(ZF(wq,n)),e.xid=n=>e.check(jF(mq,n)),e.ksuid=n=>e.check(HF(gq,n)),e.ipv4=n=>e.check(FF(yq,n)),e.ipv6=n=>e.check(VF(vq,n)),e.cidrv4=n=>e.check(qF(bq,n)),e.cidrv6=n=>e.check(GF(Sq,n)),e.e164=n=>e.check(QF(Eq,n)),e.datetime=n=>e.check(jV(n)),e.date=n=>e.check(FV(n)),e.time=n=>e.check(qV(n)),e.duration=n=>e.check(KV(n))});function go(e){return IF(aq,e)}const Zt=ge("ZodStringFormat",(e,t)=>{Ht.init(e,t),nM.init(e,t)}),cq=ge("ZodEmail",(e,t)=>{$7.init(e,t),Zt.init(e,t)}),KC=ge("ZodGUID",(e,t)=>{L7.init(e,t),Zt.init(e,t)}),Eh=ge("ZodUUID",(e,t)=>{B7.init(e,t),Zt.init(e,t)}),lq=ge("ZodURL",(e,t)=>{U7.init(e,t),Zt.init(e,t)}),uq=ge("ZodEmoji",(e,t)=>{j7.init(e,t),Zt.init(e,t)}),fq=ge("ZodNanoID",(e,t)=>{H7.init(e,t),Zt.init(e,t)}),dq=ge("ZodCUID",(e,t)=>{F7.init(e,t),Zt.init(e,t)}),hq=ge("ZodCUID2",(e,t)=>{V7.init(e,t),Zt.init(e,t)}),pq=ge("ZodULID",(e,t)=>{q7.init(e,t),Zt.init(e,t)}),mq=ge("ZodXID",(e,t)=>{G7.init(e,t),Zt.init(e,t)}),gq=ge("ZodKSUID",(e,t)=>{K7.init(e,t),Zt.init(e,t)}),yq=ge("ZodIPv4",(e,t)=>{W7.init(e,t),Zt.init(e,t)}),vq=ge("ZodIPv6",(e,t)=>{J7.init(e,t),Zt.init(e,t)}),bq=ge("ZodCIDRv4",(e,t)=>{eF.init(e,t),Zt.init(e,t)}),Sq=ge("ZodCIDRv6",(e,t)=>{tF.init(e,t),Zt.init(e,t)}),_q=ge("ZodBase64",(e,t)=>{nF.init(e,t),Zt.init(e,t)}),wq=ge("ZodBase64URL",(e,t)=>{rF.init(e,t),Zt.init(e,t)}),Eq=ge("ZodE164",(e,t)=>{oF.init(e,t),Zt.init(e,t)}),xq=ge("ZodJWT",(e,t)=>{aF.init(e,t),Zt.init(e,t)}),sM=ge("ZodNumber",(e,t)=>{GO.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(r,i,c)=>EV(e,r,i),e.gt=(r,i)=>e.check(qC(r,i)),e.gte=(r,i)=>e.check(b0(r,i)),e.min=(r,i)=>e.check(b0(r,i)),e.lt=(r,i)=>e.check(VC(r,i)),e.lte=(r,i)=>e.check(v0(r,i)),e.max=(r,i)=>e.check(v0(r,i)),e.int=r=>e.check(Iv(r)),e.safe=r=>e.check(Iv(r)),e.positive=r=>e.check(qC(0,r)),e.nonnegative=r=>e.check(b0(0,r)),e.negative=r=>e.check(VC(0,r)),e.nonpositive=r=>e.check(v0(0,r)),e.multipleOf=(r,i)=>e.check(GC(r,i)),e.step=(r,i)=>e.check(GC(r,i)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function rM(e){return tV(sM,e)}const Rq=ge("ZodNumberFormat",(e,t)=>{cF.init(e,t),sM.init(e,t)});function Iv(e){return nV(Rq,e)}const Cq=ge("ZodUnknown",(e,t)=>{lF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>RV()});function ZC(){return sV(Cq)}const Tq=ge("ZodNever",(e,t)=>{uF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>xV(e,n,r)});function Aq(e){return rV(Tq,e)}const Iq=ge("ZodArray",(e,t)=>{fF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>IV(e,n,r,i),e.element=t.element,e.min=(n,r)=>e.check(fp(n,r)),e.nonempty=n=>e.check(fp(1,n)),e.max=(n,r)=>e.check(YO(n,r)),e.length=(n,r)=>e.check(XO(n,r)),e.unwrap=()=>e.element});function Oq(e,t){return gV(Iq,e,t)}const Mq=ge("ZodObject",(e,t)=>{hF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>OV(e,n,r,i),Rt(e,"shape",()=>t.shape),e.keyof=()=>zq(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ZC()}),e.loose=()=>e.clone({...e._zod.def,catchall:ZC()}),e.strict=()=>e.clone({...e._zod.def,catchall:Aq()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>NH(e,n),e.safeExtend=n=>zH(e,n),e.merge=n=>LH(e,n),e.pick=n=>kH(e,n),e.omit=n=>PH(e,n),e.partial=(...n)=>BH(oM,e,n[0]),e.required=(...n)=>$H(iM,e,n[0])});function dl(e,t){const n={type:"object",shape:e??{},...$e(t)};return new Mq(n)}const Dq=ge("ZodUnion",(e,t)=>{pF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>MV(e,n,r,i),e.options=t.options});function kq(e,t){return new Dq({type:"union",options:e,...$e(t)})}const Pq=ge("ZodIntersection",(e,t)=>{mF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>DV(e,n,r,i)});function Nq(e,t){return new Pq({type:"intersection",left:e,right:t})}const Ov=ge("ZodEnum",(e,t)=>{gF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(r,i,c)=>CV(e,r,i),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const c={};for(const l of r)if(n.has(l))c[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new Ov({...t,checks:[],...$e(i),entries:c})},e.exclude=(r,i)=>{const c={...t.entries};for(const l of r)if(n.has(l))delete c[l];else throw new Error(`Key ${l} not found in enum`);return new Ov({...t,checks:[],...$e(i),entries:c})}});function zq(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Ov({type:"enum",entries:n,...$e(t)})}const Lq=ge("ZodTransform",(e,t)=>{yF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>AV(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new MO(e.constructor.name);n.addIssue=c=>{if(typeof c=="string")n.issues.push(uf(c,n.value,t));else{const l=c;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(uf(l))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(c=>(n.value=c,n)):(n.value=i,n)}});function Bq(e){return new Lq({type:"transform",transform:e})}const oM=ge("ZodOptional",(e,t)=>{QO.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>tM(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function QC(e){return new oM({type:"optional",innerType:e})}const $q=ge("ZodExactOptional",(e,t)=>{vF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>tM(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Uq(e){return new $q({type:"optional",innerType:e})}const jq=ge("ZodNullable",(e,t)=>{bF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>kV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function YC(e){return new jq({type:"nullable",innerType:e})}const Hq=ge("ZodDefault",(e,t)=>{SF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>NV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Fq(e,t){return new Hq({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():NO(t)}})}const Vq=ge("ZodPrefault",(e,t)=>{_F.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>zV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function qq(e,t){return new Vq({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():NO(t)}})}const iM=ge("ZodNonOptional",(e,t)=>{wF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>PV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Gq(e,t){return new iM({type:"nonoptional",innerType:e,...$e(t)})}const Kq=ge("ZodCatch",(e,t)=>{EF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>LV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Zq(e,t){return new Kq({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Qq=ge("ZodPipe",(e,t)=>{xF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>BV(e,n,r,i),e.in=t.in,e.out=t.out});function XC(e,t){return new Qq({type:"pipe",in:e,out:t})}const Yq=ge("ZodReadonly",(e,t)=>{RF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>$V(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Xq(e){return new Yq({type:"readonly",innerType:e})}const Wq=ge("ZodCustom",(e,t)=>{CF.init(e,t),bn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>TV(e,n)});function Jq(e,t={}){return yV(Wq,e,t)}function eG(e){return vV(e)}const Tb="hive:v1:aws-credentials",tG=dl({accessKeyId:go().min(16,"Access Key ID must be at least 16 characters"),secretAccessKey:go().min(1,"Secret Access Key is required")});let uo;function Qp(){if(uo!==void 0)return uo;try{const e=localStorage.getItem(Tb);if(!e)return uo=null,null;const t=JSON.parse(e),n=tG.safeParse(t);return uo=n.success?n.data:null,uo}catch{return uo=null,null}}function dve(e){try{localStorage.setItem(Tb,JSON.stringify(e)),uo=e}catch{uo=e}}function nG(){try{localStorage.removeItem(Tb)}catch{}uo=null}const aM=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}),cM=e=>({httpHandler:e.httpHandler()});var ff;(function(e){e.HTTP="http",e.HTTPS="https"})(ff||(ff={}));var hp;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(hp||(hp={}));const Mv="__smithy_context";class Mn{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const n=new Mn({...t,headers:{...t.headers}});return n.query&&(n.query=sG(n.query)),n}static isInstance(t){if(!t)return!1;const n=t;return"method"in n&&"protocol"in n&&"hostname"in n&&"path"in n&&typeof n.query=="object"&&typeof n.headers=="object"}clone(){return Mn.clone(this)}}function sG(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}},{})}class Pa{statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const n=t;return typeof n.statusCode=="number"&&typeof n.headers=="object"}}const rG=e=>t=>async n=>{if(!Mn.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let c=r.hostname;r.port!=null&&(c+=`:${r.port}`),r.headers.host=c}return t(n)},oG={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},lM=e=>({applyToStack:t=>{t.add(rG(e),oG)}}),iG=()=>(e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:c,logger:l,dynamoDbDocumentClientOptions:f={}}=t,{overrideInputFilterSensitiveLog:d,overrideOutputFilterSensitiveLog:h}=f,y=d??t.inputFilterSensitiveLog,g=h??t.outputFilterSensitiveLog,{$metadata:v,...b}=r.output;return l?.info?.({clientName:i,commandName:c,input:y(n.input),output:g(b),metadata:v}),r}catch(r){const{clientName:i,commandName:c,logger:l,dynamoDbDocumentClientOptions:f={}}=t,{overrideInputFilterSensitiveLog:d}=f,h=d??t.inputFilterSensitiveLog;throw l?.error?.({clientName:i,commandName:c,input:h(n.input),error:r,metadata:r.$metadata}),r}},aG={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},uM=e=>({applyToStack:t=>{t.add(iG(),aG)}}),cG={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},lG=()=>e=>async t=>e(t),fM=e=>({applyToStack:t=>{t.add(lG(),cG)}}),Eo=e=>e[Mv]||(e[Mv]={}),Ns=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},uG=(e,t)=>{if(!t||t.length===0)return e;const n=[];for(const r of t)for(const i of e)i.schemeId.split("#")[1]===r&&n.push(i);for(const r of e)n.find(({schemeId:i})=>i===r.schemeId)||n.push(r);return n};function fG(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}const dG=(e,t)=>(n,r)=>async i=>{const c=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),l=e.authSchemePreference?await e.authSchemePreference():[],f=uG(c,l),d=fG(e.httpAuthSchemes),h=Eo(r),y=[];for(const g of f){const v=d.get(g.schemeId);if(!v){y.push(`HttpAuthScheme \`${g.schemeId}\` was not enabled for this service.`);continue}const b=v.identityProvider(await t.identityProviderConfigProvider(e));if(!b){y.push(`HttpAuthScheme \`${g.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:_={},signingProperties:x={}}=g.propertiesExtractor?.(e,r)||{};g.identityProperties=Object.assign(g.identityProperties||{},_),g.signingProperties=Object.assign(g.signingProperties||{},x),h.selectedHttpAuthScheme={httpAuthOption:g,identity:await b(g.identityProperties),signer:v.signer};break}if(!h.selectedHttpAuthScheme)throw new Error(y.join(` -`));return n(i)},hG={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},dM=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(dG(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),hG)}}),pG={name:"serializerMiddleware"},mG=e=>t=>{throw t},gG=(e,t)=>{},yG=e=>(t,n)=>async r=>{if(!Mn.isInstance(r.request))return t(r);const c=Eo(n).selectedHttpAuthScheme;if(!c)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:l={}},identity:f,signer:d}=c,h=await t({...r,request:await d.sign(r.request,f,l)}).catch((d.errorHandler||mG)(l));return(d.successHandler||gG)(h.response,l),h},hM={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},pM=e=>({applyToStack:t=>{t.addRelativeTo(yG(),hM)}}),Zc=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},mM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",WC=Object.entries(mM).reduce((e,[t,n])=>(e[n]=Number(t),e),{}),vG=mM.split(""),Qc=6,Zu=8,bG=63,Na=e=>{let t=e.length/4*3;e.slice(-2)==="=="?t-=2:e.slice(-1)==="="&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let i=0;i>=Qc;const f=i/4*3;c>>=l%Zu;const d=Math.floor(l/Zu);for(let h=0;h>y)}}return new Uint8Array(n)},So=e=>new TextEncoder().encode(e),df=e=>typeof e=="string"?So(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),ja=e=>{if(typeof e=="string")return e;if(typeof e!="object"||typeof e.byteOffset!="number"||typeof e.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function Mi(e){let t;typeof e=="string"?t=So(e):t=e;const n=typeof t=="object"&&typeof t.length=="number",r=typeof t=="object"&&typeof t.byteOffset=="number"&&typeof t.byteLength=="number";if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let c=0;c>y]}i+="==".slice(0,4-d)}return i}class Ta extends Uint8Array{static fromString(t,n="utf-8"){if(typeof t=="string")return n==="base64"?Ta.mutate(Na(t)):Ta.mutate(So(t));throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}static mutate(t){return Object.setPrototypeOf(t,Ta.prototype),t}transformToString(t="utf-8"){return t==="base64"?Mi(this):ja(this)}}const JC=e=>typeof ReadableStream=="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),SG=(e,t)=>{const{base64Encoder:n,bodyLengthChecker:r,checksumAlgorithmFn:i,checksumLocationName:c,streamHasher:l}=t,f=n!==void 0&&r!==void 0&&i!==void 0&&c!==void 0&&l!==void 0,d=f?l(i,e):void 0,h=e.getReader();return new ReadableStream({async pull(y){const{value:g,done:v}=await h.read();if(v){if(y.enqueue(`0\r -`),f){const b=n(await d);y.enqueue(`${c}:${b}\r +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const f=l[1];if(t===l[0]){c(l);continue}if(e.external){const h=e.external.registry.get(l[0])?.id;if(t!==l[0]&&h){c(l);continue}}if(e.metadataRegistry.get(l[0])?.id){c(l);continue}if(f.cycle){c(l);continue}if(f.count>1&&e.reused==="ref"){c(l);continue}}}function eM(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=l=>{const f=e.seen.get(l);if(f.ref===null)return;const d=f.def??f.schema,h={...d},y=f.ref;if(f.ref=null,y){r(y);const b=e.seen.get(y),v=b.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(v)):Object.assign(d,v),Object.assign(d,h),l._zod.parent===y)for(const x in d)x==="$ref"||x==="allOf"||x in h||delete d[x];if(v.$ref&&b.def)for(const x in d)x==="$ref"||x==="allOf"||x in b.def&&JSON.stringify(d[x])===JSON.stringify(b.def[x])&&delete d[x]}const g=l._zod.parent;if(g&&g!==y){r(g);const b=e.seen.get(g);if(b?.schema.$ref&&(d.$ref=b.schema.$ref,b.def))for(const v in d)v==="$ref"||v==="allOf"||v in b.def&&JSON.stringify(d[v])===JSON.stringify(b.def[v])&&delete d[v]}e.override({zodSchema:l,jsonSchema:d,path:f.path??[]})};for(const l of[...e.seen.entries()].reverse())r(l[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(l)}Object.assign(i,n.def??n.schema);const c=e.external?.defs??{};for(const l of e.seen.entries()){const f=l[1];f.def&&f.defId&&(c[f.defId]=f.def)}e.external||Object.keys(c).length>0&&(e.target==="draft-2020-12"?i.$defs=c:i.definitions=c);try{const l=JSON.parse(JSON.stringify(i));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:dp(t,"input",e.processors),output:dp(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function ns(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return ns(r.element,n);if(r.type==="set")return ns(r.valueType,n);if(r.type==="lazy")return ns(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return ns(r.innerType,n);if(r.type==="intersection")return ns(r.left,n)||ns(r.right,n);if(r.type==="record"||r.type==="map")return ns(r.keyType,n)||ns(r.valueType,n);if(r.type==="pipe")return ns(r.in,n)||ns(r.out,n);if(r.type==="object"){for(const i in r.shape)if(ns(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(const i of r.options)if(ns(i,n))return!0;return!1}if(r.type==="tuple"){for(const i of r.items)if(ns(i,n))return!0;return!!(r.rest&&ns(r.rest,n))}return!1}const SV=(e,t={})=>n=>{const r=WO({...n,processors:t});return jn(e,r),JO(r,e),eM(r,e)},dp=(e,t,n={})=>r=>{const{libraryOptions:i,target:c}=r??{},l=WO({...i??{},target:c,io:t,processors:n});return jn(e,l),JO(l,e),eM(l,e)},_V={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},wV=(e,t,n,r)=>{const i=n;i.type="string";const{minimum:c,maximum:l,format:f,patterns:d,contentEncoding:h}=e._zod.bag;if(typeof c=="number"&&(i.minLength=c),typeof l=="number"&&(i.maxLength=l),f&&(i.format=_V[f]??f,i.format===""&&delete i.format,f==="time"&&delete i.format),h&&(i.contentEncoding=h),d&&d.size>0){const y=[...d];y.length===1?i.pattern=y[0].source:y.length>1&&(i.allOf=[...y.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},EV=(e,t,n,r)=>{const i=n,{minimum:c,maximum:l,format:f,multipleOf:d,exclusiveMaximum:h,exclusiveMinimum:y}=e._zod.bag;typeof f=="string"&&f.includes("int")?i.type="integer":i.type="number",typeof y=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=y,i.exclusiveMinimum=!0):i.exclusiveMinimum=y),typeof c=="number"&&(i.minimum=c,typeof y=="number"&&t.target!=="draft-04"&&(y>=c?delete i.minimum:delete i.exclusiveMinimum)),typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=h,i.exclusiveMaximum=!0):i.exclusiveMaximum=h),typeof l=="number"&&(i.maximum=l,typeof h=="number"&&t.target!=="draft-04"&&(h<=l?delete i.maximum:delete i.exclusiveMaximum)),typeof d=="number"&&(i.multipleOf=d)},xV=(e,t,n,r)=>{n.not={}},RV=(e,t,n,r)=>{},CV=(e,t,n,r)=>{const i=e._zod.def,c=kO(i.entries);c.every(l=>typeof l=="number")&&(n.type="number"),c.every(l=>typeof l=="string")&&(n.type="string"),n.enum=c},TV=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},AV=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},IV=(e,t,n,r)=>{const i=n,c=e._zod.def,{minimum:l,maximum:f}=e._zod.bag;typeof l=="number"&&(i.minItems=l),typeof f=="number"&&(i.maxItems=f),i.type="array",i.items=jn(c.element,t,{...r,path:[...r.path,"items"]})},OV=(e,t,n,r)=>{const i=n,c=e._zod.def;i.type="object",i.properties={};const l=c.shape;for(const h in l)i.properties[h]=jn(l[h],t,{...r,path:[...r.path,"properties",h]});const f=new Set(Object.keys(l)),d=new Set([...f].filter(h=>{const y=c.shape[h]._zod;return t.io==="input"?y.optin===void 0:y.optout===void 0}));d.size>0&&(i.required=Array.from(d)),c.catchall?._zod.def.type==="never"?i.additionalProperties=!1:c.catchall?c.catchall&&(i.additionalProperties=jn(c.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},MV=(e,t,n,r)=>{const i=e._zod.def,c=i.inclusive===!1,l=i.options.map((f,d)=>jn(f,t,{...r,path:[...r.path,c?"oneOf":"anyOf",d]}));c?n.oneOf=l:n.anyOf=l},DV=(e,t,n,r)=>{const i=e._zod.def,c=jn(i.left,t,{...r,path:[...r.path,"allOf",0]}),l=jn(i.right,t,{...r,path:[...r.path,"allOf",1]}),f=h=>"allOf"in h&&Object.keys(h).length===1,d=[...f(c)?c.allOf:[c],...f(l)?l.allOf:[l]];n.allOf=d},kV=(e,t,n,r)=>{const i=e._zod.def,c=jn(i.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=i.innerType,n.nullable=!0):n.anyOf=[c,{type:"null"}]},PV=(e,t,n,r)=>{const i=e._zod.def;jn(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType},NV=(e,t,n,r)=>{const i=e._zod.def;jn(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},zV=(e,t,n,r)=>{const i=e._zod.def;jn(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},LV=(e,t,n,r)=>{const i=e._zod.def;jn(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType;let l;try{l=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},BV=(e,t,n,r)=>{const i=e._zod.def,c=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;jn(c,t,r);const l=t.seen.get(e);l.ref=c},$V=(e,t,n,r)=>{const i=e._zod.def;jn(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType,n.readOnly=!0},tM=(e,t,n,r)=>{const i=e._zod.def;jn(i.innerType,t,r);const c=t.seen.get(e);c.ref=i.innerType},UV=ge("ZodISODateTime",(e,t)=>{Z7.init(e,t),Zt.init(e,t)});function jV(e){return XF(UV,e)}const HV=ge("ZodISODate",(e,t)=>{Q7.init(e,t),Zt.init(e,t)});function FV(e){return WF(HV,e)}const VV=ge("ZodISOTime",(e,t)=>{Y7.init(e,t),Zt.init(e,t)});function qV(e){return JF(VV,e)}const GV=ge("ZodISODuration",(e,t)=>{X7.init(e,t),Zt.init(e,t)});function KV(e){return eV(GV,e)}const ZV=(e,t)=>{BO.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>jH(e,n)},flatten:{value:n=>UH(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Tb,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Tb,2)}},isEmpty:{get(){return e.issues.length===0}}})},lr=ge("ZodError",ZV,{Parent:Error}),QV=Vp(lr),YV=qp(lr),XV=Gp(lr),WV=Kp(lr),JV=VH(lr),eq=qH(lr),tq=GH(lr),nq=KH(lr),sq=ZH(lr),rq=QH(lr),oq=YH(lr),iq=XH(lr),vn=ge("ZodType",(e,t)=>(bn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:dp(e,"input"),output:dp(e,"output")}}),e.toJSONSchema=SV(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(zi(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>Li(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>QV(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>XV(e,n,r),e.parseAsync=async(n,r)=>YV(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>WV(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>JV(e,n,r),e.decode=(n,r)=>eq(e,n,r),e.encodeAsync=async(n,r)=>tq(e,n,r),e.decodeAsync=async(n,r)=>nq(e,n,r),e.safeEncode=(n,r)=>sq(e,n,r),e.safeDecode=(n,r)=>rq(e,n,r),e.safeEncodeAsync=async(n,r)=>oq(e,n,r),e.safeDecodeAsync=async(n,r)=>iq(e,n,r),e.refine=(n,r)=>e.check(Jq(n,r)),e.superRefine=n=>e.check(eG(n)),e.overwrite=n=>e.check(dl(n)),e.optional=()=>QC(e),e.exactOptional=()=>Uq(e),e.nullable=()=>YC(e),e.nullish=()=>QC(YC(e)),e.nonoptional=n=>Gq(e,n),e.array=()=>Oq(e),e.or=n=>kq([e,n]),e.and=n=>Nq(e,n),e.transform=n=>XC(e,Bq(n)),e.default=n=>Fq(e,n),e.prefault=n=>qq(e,n),e.catch=n=>Zq(e,n),e.pipe=n=>XC(e,n),e.readonly=()=>Xq(e),e.describe=n=>{const r=e.clone();return ju.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return ju.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return ju.get(e);const r=e.clone();return ju.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),nM=ge("_ZodString",(e,t)=>{Cv.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(r,i,c)=>wV(e,r,i);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(oV(...r)),e.includes=(...r)=>e.check(cV(...r)),e.startsWith=(...r)=>e.check(lV(...r)),e.endsWith=(...r)=>e.check(uV(...r)),e.min=(...r)=>e.check(fp(...r)),e.max=(...r)=>e.check(YO(...r)),e.length=(...r)=>e.check(XO(...r)),e.nonempty=(...r)=>e.check(fp(1,...r)),e.lowercase=r=>e.check(iV(r)),e.uppercase=r=>e.check(aV(r)),e.trim=()=>e.check(dV()),e.normalize=(...r)=>e.check(fV(...r)),e.toLowerCase=()=>e.check(hV()),e.toUpperCase=()=>e.check(pV()),e.slugify=()=>e.check(mV())}),aq=ge("ZodString",(e,t)=>{Cv.init(e,t),nM.init(e,t),e.email=n=>e.check(OF(cq,n)),e.url=n=>e.check(NF(lq,n)),e.jwt=n=>e.check(YF(xq,n)),e.emoji=n=>e.check(zF(uq,n)),e.guid=n=>e.check(FC(KC,n)),e.uuid=n=>e.check(MF(Eh,n)),e.uuidv4=n=>e.check(DF(Eh,n)),e.uuidv6=n=>e.check(kF(Eh,n)),e.uuidv7=n=>e.check(PF(Eh,n)),e.nanoid=n=>e.check(LF(fq,n)),e.guid=n=>e.check(FC(KC,n)),e.cuid=n=>e.check(BF(dq,n)),e.cuid2=n=>e.check($F(hq,n)),e.ulid=n=>e.check(UF(pq,n)),e.base64=n=>e.check(KF(_q,n)),e.base64url=n=>e.check(ZF(wq,n)),e.xid=n=>e.check(jF(mq,n)),e.ksuid=n=>e.check(HF(gq,n)),e.ipv4=n=>e.check(FF(yq,n)),e.ipv6=n=>e.check(VF(bq,n)),e.cidrv4=n=>e.check(qF(vq,n)),e.cidrv6=n=>e.check(GF(Sq,n)),e.e164=n=>e.check(QF(Eq,n)),e.datetime=n=>e.check(jV(n)),e.date=n=>e.check(FV(n)),e.time=n=>e.check(qV(n)),e.duration=n=>e.check(KV(n))});function Pr(e){return IF(aq,e)}const Zt=ge("ZodStringFormat",(e,t)=>{Ht.init(e,t),nM.init(e,t)}),cq=ge("ZodEmail",(e,t)=>{$7.init(e,t),Zt.init(e,t)}),KC=ge("ZodGUID",(e,t)=>{L7.init(e,t),Zt.init(e,t)}),Eh=ge("ZodUUID",(e,t)=>{B7.init(e,t),Zt.init(e,t)}),lq=ge("ZodURL",(e,t)=>{U7.init(e,t),Zt.init(e,t)}),uq=ge("ZodEmoji",(e,t)=>{j7.init(e,t),Zt.init(e,t)}),fq=ge("ZodNanoID",(e,t)=>{H7.init(e,t),Zt.init(e,t)}),dq=ge("ZodCUID",(e,t)=>{F7.init(e,t),Zt.init(e,t)}),hq=ge("ZodCUID2",(e,t)=>{V7.init(e,t),Zt.init(e,t)}),pq=ge("ZodULID",(e,t)=>{q7.init(e,t),Zt.init(e,t)}),mq=ge("ZodXID",(e,t)=>{G7.init(e,t),Zt.init(e,t)}),gq=ge("ZodKSUID",(e,t)=>{K7.init(e,t),Zt.init(e,t)}),yq=ge("ZodIPv4",(e,t)=>{W7.init(e,t),Zt.init(e,t)}),bq=ge("ZodIPv6",(e,t)=>{J7.init(e,t),Zt.init(e,t)}),vq=ge("ZodCIDRv4",(e,t)=>{eF.init(e,t),Zt.init(e,t)}),Sq=ge("ZodCIDRv6",(e,t)=>{tF.init(e,t),Zt.init(e,t)}),_q=ge("ZodBase64",(e,t)=>{nF.init(e,t),Zt.init(e,t)}),wq=ge("ZodBase64URL",(e,t)=>{rF.init(e,t),Zt.init(e,t)}),Eq=ge("ZodE164",(e,t)=>{oF.init(e,t),Zt.init(e,t)}),xq=ge("ZodJWT",(e,t)=>{aF.init(e,t),Zt.init(e,t)}),sM=ge("ZodNumber",(e,t)=>{GO.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(r,i,c)=>EV(e,r,i),e.gt=(r,i)=>e.check(qC(r,i)),e.gte=(r,i)=>e.check(v0(r,i)),e.min=(r,i)=>e.check(v0(r,i)),e.lt=(r,i)=>e.check(VC(r,i)),e.lte=(r,i)=>e.check(b0(r,i)),e.max=(r,i)=>e.check(b0(r,i)),e.int=r=>e.check(Ib(r)),e.safe=r=>e.check(Ib(r)),e.positive=r=>e.check(qC(0,r)),e.nonnegative=r=>e.check(v0(0,r)),e.negative=r=>e.check(VC(0,r)),e.nonpositive=r=>e.check(b0(0,r)),e.multipleOf=(r,i)=>e.check(GC(r,i)),e.step=(r,i)=>e.check(GC(r,i)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function rM(e){return tV(sM,e)}const Rq=ge("ZodNumberFormat",(e,t)=>{cF.init(e,t),sM.init(e,t)});function Ib(e){return nV(Rq,e)}const Cq=ge("ZodUnknown",(e,t)=>{lF.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>RV()});function ZC(){return sV(Cq)}const Tq=ge("ZodNever",(e,t)=>{uF.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>xV(e,n,r)});function Aq(e){return rV(Tq,e)}const Iq=ge("ZodArray",(e,t)=>{fF.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>IV(e,n,r,i),e.element=t.element,e.min=(n,r)=>e.check(fp(n,r)),e.nonempty=n=>e.check(fp(1,n)),e.max=(n,r)=>e.check(YO(n,r)),e.length=(n,r)=>e.check(XO(n,r)),e.unwrap=()=>e.element});function Oq(e,t){return gV(Iq,e,t)}const Mq=ge("ZodObject",(e,t)=>{hF.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>OV(e,n,r,i),Rt(e,"shape",()=>t.shape),e.keyof=()=>zq(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ZC()}),e.loose=()=>e.clone({...e._zod.def,catchall:ZC()}),e.strict=()=>e.clone({...e._zod.def,catchall:Aq()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>NH(e,n),e.safeExtend=n=>zH(e,n),e.merge=n=>LH(e,n),e.pick=n=>kH(e,n),e.omit=n=>PH(e,n),e.partial=(...n)=>BH(oM,e,n[0]),e.required=(...n)=>$H(iM,e,n[0])});function ja(e,t){const n={type:"object",shape:e??{},...$e(t)};return new Mq(n)}const Dq=ge("ZodUnion",(e,t)=>{pF.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>MV(e,n,r,i),e.options=t.options});function kq(e,t){return new Dq({type:"union",options:e,...$e(t)})}const Pq=ge("ZodIntersection",(e,t)=>{mF.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>DV(e,n,r,i)});function Nq(e,t){return new Pq({type:"intersection",left:e,right:t})}const Ob=ge("ZodEnum",(e,t)=>{gF.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(r,i,c)=>CV(e,r,i),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const c={};for(const l of r)if(n.has(l))c[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new Ob({...t,checks:[],...$e(i),entries:c})},e.exclude=(r,i)=>{const c={...t.entries};for(const l of r)if(n.has(l))delete c[l];else throw new Error(`Key ${l} not found in enum`);return new Ob({...t,checks:[],...$e(i),entries:c})}});function zq(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Ob({type:"enum",entries:n,...$e(t)})}const Lq=ge("ZodTransform",(e,t)=>{yF.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>AV(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new MO(e.constructor.name);n.addIssue=c=>{if(typeof c=="string")n.issues.push(uf(c,n.value,t));else{const l=c;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(uf(l))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(c=>(n.value=c,n)):(n.value=i,n)}});function Bq(e){return new Lq({type:"transform",transform:e})}const oM=ge("ZodOptional",(e,t)=>{QO.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>tM(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function QC(e){return new oM({type:"optional",innerType:e})}const $q=ge("ZodExactOptional",(e,t)=>{bF.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>tM(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Uq(e){return new $q({type:"optional",innerType:e})}const jq=ge("ZodNullable",(e,t)=>{vF.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>kV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function YC(e){return new jq({type:"nullable",innerType:e})}const Hq=ge("ZodDefault",(e,t)=>{SF.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>NV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Fq(e,t){return new Hq({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():NO(t)}})}const Vq=ge("ZodPrefault",(e,t)=>{_F.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>zV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function qq(e,t){return new Vq({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():NO(t)}})}const iM=ge("ZodNonOptional",(e,t)=>{wF.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>PV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Gq(e,t){return new iM({type:"nonoptional",innerType:e,...$e(t)})}const Kq=ge("ZodCatch",(e,t)=>{EF.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>LV(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Zq(e,t){return new Kq({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Qq=ge("ZodPipe",(e,t)=>{xF.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>BV(e,n,r,i),e.in=t.in,e.out=t.out});function XC(e,t){return new Qq({type:"pipe",in:e,out:t})}const Yq=ge("ZodReadonly",(e,t)=>{RF.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>$V(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Xq(e){return new Yq({type:"readonly",innerType:e})}const Wq=ge("ZodCustom",(e,t)=>{CF.init(e,t),vn.init(e,t),e._zod.processJSONSchema=(n,r,i)=>TV(e,n)});function Jq(e,t={}){return yV(Wq,e,t)}function eG(e){return bV(e)}const Tv="hive:v1:aws-credentials",tG=ja({accessKeyId:Pr().min(16,"Access Key ID must be at least 16 characters"),secretAccessKey:Pr().min(1,"Secret Access Key is required")});let fo;function Qp(){if(fo!==void 0)return fo;try{const e=localStorage.getItem(Tv);if(!e)return fo=null,null;const t=JSON.parse(e),n=tG.safeParse(t);return fo=n.success?n.data:null,fo}catch{return fo=null,null}}function dbe(e){try{localStorage.setItem(Tv,JSON.stringify(e)),fo=e}catch{fo=e}}function nG(){try{localStorage.removeItem(Tv)}catch{}fo=null}const aM=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}),cM=e=>({httpHandler:e.httpHandler()});var ff;(function(e){e.HTTP="http",e.HTTPS="https"})(ff||(ff={}));var hp;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(hp||(hp={}));const Mb="__smithy_context";class Mn{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const n=new Mn({...t,headers:{...t.headers}});return n.query&&(n.query=sG(n.query)),n}static isInstance(t){if(!t)return!1;const n=t;return"method"in n&&"protocol"in n&&"hostname"in n&&"path"in n&&typeof n.query=="object"&&typeof n.headers=="object"}clone(){return Mn.clone(this)}}function sG(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}},{})}class Pa{statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const n=t;return typeof n.statusCode=="number"&&typeof n.headers=="object"}}const rG=e=>t=>async n=>{if(!Mn.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let c=r.hostname;r.port!=null&&(c+=`:${r.port}`),r.headers.host=c}return t(n)},oG={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},lM=e=>({applyToStack:t=>{t.add(rG(e),oG)}}),iG=()=>(e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:c,logger:l,dynamoDbDocumentClientOptions:f={}}=t,{overrideInputFilterSensitiveLog:d,overrideOutputFilterSensitiveLog:h}=f,y=d??t.inputFilterSensitiveLog,g=h??t.outputFilterSensitiveLog,{$metadata:b,...v}=r.output;return l?.info?.({clientName:i,commandName:c,input:y(n.input),output:g(v),metadata:b}),r}catch(r){const{clientName:i,commandName:c,logger:l,dynamoDbDocumentClientOptions:f={}}=t,{overrideInputFilterSensitiveLog:d}=f,h=d??t.inputFilterSensitiveLog;throw l?.error?.({clientName:i,commandName:c,input:h(n.input),error:r,metadata:r.$metadata}),r}},aG={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},uM=e=>({applyToStack:t=>{t.add(iG(),aG)}}),cG={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},lG=()=>e=>async t=>e(t),fM=e=>({applyToStack:t=>{t.add(lG(),cG)}}),Eo=e=>e[Mb]||(e[Mb]={}),Ns=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},uG=(e,t)=>{if(!t||t.length===0)return e;const n=[];for(const r of t)for(const i of e)i.schemeId.split("#")[1]===r&&n.push(i);for(const r of e)n.find(({schemeId:i})=>i===r.schemeId)||n.push(r);return n};function fG(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}const dG=(e,t)=>(n,r)=>async i=>{const c=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),l=e.authSchemePreference?await e.authSchemePreference():[],f=uG(c,l),d=fG(e.httpAuthSchemes),h=Eo(r),y=[];for(const g of f){const b=d.get(g.schemeId);if(!b){y.push(`HttpAuthScheme \`${g.schemeId}\` was not enabled for this service.`);continue}const v=b.identityProvider(await t.identityProviderConfigProvider(e));if(!v){y.push(`HttpAuthScheme \`${g.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:_={},signingProperties:x={}}=g.propertiesExtractor?.(e,r)||{};g.identityProperties=Object.assign(g.identityProperties||{},_),g.signingProperties=Object.assign(g.signingProperties||{},x),h.selectedHttpAuthScheme={httpAuthOption:g,identity:await v(g.identityProperties),signer:b.signer};break}if(!h.selectedHttpAuthScheme)throw new Error(y.join(` +`));return n(i)},hG={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},dM=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(dG(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),hG)}}),pG={name:"serializerMiddleware"},mG=e=>t=>{throw t},gG=(e,t)=>{},yG=e=>(t,n)=>async r=>{if(!Mn.isInstance(r.request))return t(r);const c=Eo(n).selectedHttpAuthScheme;if(!c)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:l={}},identity:f,signer:d}=c,h=await t({...r,request:await d.sign(r.request,f,l)}).catch((d.errorHandler||mG)(l));return(d.successHandler||gG)(h.response,l),h},hM={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},pM=e=>({applyToStack:t=>{t.addRelativeTo(yG(),hM)}}),Qc=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},mM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",WC=Object.entries(mM).reduce((e,[t,n])=>(e[n]=Number(t),e),{}),bG=mM.split(""),Yc=6,Zu=8,vG=63,Na=e=>{let t=e.length/4*3;e.slice(-2)==="=="?t-=2:e.slice(-1)==="="&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let i=0;i>=Yc;const f=i/4*3;c>>=l%Zu;const d=Math.floor(l/Zu);for(let h=0;h>y)}}return new Uint8Array(n)},So=e=>new TextEncoder().encode(e),df=e=>typeof e=="string"?So(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),Ha=e=>{if(typeof e=="string")return e;if(typeof e!="object"||typeof e.byteOffset!="number"||typeof e.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function Mi(e){let t;typeof e=="string"?t=So(e):t=e;const n=typeof t=="object"&&typeof t.length=="number",r=typeof t=="object"&&typeof t.byteOffset=="number"&&typeof t.byteLength=="number";if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let c=0;c>y]}i+="==".slice(0,4-d)}return i}class Ta extends Uint8Array{static fromString(t,n="utf-8"){if(typeof t=="string")return n==="base64"?Ta.mutate(Na(t)):Ta.mutate(So(t));throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}static mutate(t){return Object.setPrototypeOf(t,Ta.prototype),t}transformToString(t="utf-8"){return t==="base64"?Mi(this):Ha(this)}}const JC=e=>typeof ReadableStream=="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),SG=(e,t)=>{const{base64Encoder:n,bodyLengthChecker:r,checksumAlgorithmFn:i,checksumLocationName:c,streamHasher:l}=t,f=n!==void 0&&r!==void 0&&i!==void 0&&c!==void 0&&l!==void 0,d=f?l(i,e):void 0,h=e.getReader();return new ReadableStream({async pull(y){const{value:g,done:b}=await h.read();if(b){if(y.enqueue(`0\r +`),f){const v=n(await d);y.enqueue(`${c}:${v}\r `),y.enqueue(`\r `)}y.close()}else y.enqueue(`${(r(g)||0).toString(16)}\r ${g}\r -`)}})};async function _G(e,t){let n=0;const r=[],i=e.getReader();let c=!1;for(;!c;){const{done:d,value:h}=await i.read();if(h&&(r.push(h),n+=h?.byteLength??0),n>=t)break;c=d}i.releaseLock();const l=new Uint8Array(Math.min(t,n));let f=0;for(const d of r){if(d.byteLength>l.byteLength-f){l.set(d.subarray(0,l.byteLength-f),f);break}else l.set(d,f);f+=d.length}return l}const Aa=e=>encodeURIComponent(e).replace(/[!'()*]/g,wG),wG=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function EG(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=Aa(n),Array.isArray(r))for(let i=0,c=r.length;i{e&&setTimeout(()=>{const r=new Error(`Request did not complete within ${e} ms`);r.name="TimeoutError",n(r)},e)})}const S0={supported:void 0};class Yp{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new Yp(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(n=>n||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),S0.supported===void 0&&(S0.supported=typeof Request<"u"&&"keepalive"in eT("https://[::1]"))}destroy(){}async handle(t,{abortSignal:n,requestTimeout:r}={}){this.config||(this.config=await this.configProvider);const i=r??this.config.requestTimeout,c=this.config.keepAlive===!0,l=this.config.credentials;if(n?.aborted){const A=new Error("Request aborted");return A.name="AbortError",Promise.reject(A)}let f=t.path;const d=EG(t.query||{});d&&(f+=`?${d}`),t.fragment&&(f+=`#${t.fragment}`);let h="";if(t.username!=null||t.password!=null){const A=t.username??"",O=t.password??"";h=`${A}:${O}@`}const{port:y,method:g}=t,v=`${t.protocol}//${h}${t.hostname}${y?`:${y}`:""}${f}`,b=g==="GET"||g==="HEAD"?void 0:t.body,_={body:b,headers:new Headers(t.headers),method:g,credentials:l};this.config?.cache&&(_.cache=this.config.cache),b&&(_.duplex="half"),typeof AbortController<"u"&&(_.signal=n),S0.supported&&(_.keepalive=c),typeof this.config.requestInit=="function"&&Object.assign(_,this.config.requestInit(t));let x=()=>{};const R=eT(v,_),C=[fetch(R).then(A=>{const O=A.headers,D={};for(const j of O.entries())D[j[0]]=j[1];return A.body!=null?{response:new Pa({headers:D,reason:A.statusText,statusCode:A.status,body:A.body})}:A.blob().then(j=>({response:new Pa({headers:D,reason:A.statusText,statusCode:A.status,body:j})}))}),xG(i)];return n&&C.push(new Promise((A,O)=>{const D=()=>{const N=new Error("Request aborted");N.name="AbortError",O(N)};if(typeof n.addEventListener=="function"){const N=n;N.addEventListener("abort",D,{once:!0}),x=()=>N.removeEventListener("abort",D)}else n.onabort=D})),Promise.race(C).finally(x)}updateHttpClientConfig(t,n){this.config=void 0,this.configProvider=this.configProvider.then(r=>(r[t]=n,r))}httpHandlerConfigs(){return this.config??{}}}const Ab=async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):RG(e):CG(e);async function RG(e){const t=await TG(e),n=Na(t);return new Uint8Array(n)}async function CG(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:f,value:d}=await n.read();d&&(t.push(d),i+=d.length),r=f}const c=new Uint8Array(i);let l=0;for(const f of t)c.set(f,l),l+=f.length;return c}function TG(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(r.readyState!==2)return n(new Error("Reader aborted too early"));const i=r.result??"",c=i.indexOf(","),l=c>-1?c+1:i.length;t(i.substring(l))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}const gM={},Dv={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),gM[e]=t,Dv[t]=e}function yM(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n{if(!nT(e)&&!JC(e)){const i=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${i}`)}let t=!1;const n=async()=>{if(t)throw new Error(tT);return t=!0,await Ab(e)},r=i=>{if(typeof i.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled. -If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return i.stream()};return Object.assign(e,{transformToByteArray:n,transformToString:async i=>{const c=await n();if(i==="base64")return Mi(c);if(i==="hex")return ms(c);if(i===void 0||i==="utf8"||i==="utf-8")return ja(c);if(typeof TextDecoder=="function")return new TextDecoder(i).decode(c);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(tT);if(t=!0,nT(e))return r(e);if(JC(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},nT=e=>typeof Blob=="function"&&e instanceof Blob;async function AG(e){return typeof e.stream=="function"&&(e=e.stream()),e.tee()}const xi=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Ta.mutate(e);if(!e)return Ta.mutate(new Uint8Array);const n=t.streamCollector(e);return Ta.mutate(await n)};function pp(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}const Lh=e=>typeof e=="function"?e():e,bM=(e,t,n,r,i)=>({name:t,namespace:e,traits:n,input:r,output:i}),IG=e=>(t,n)=>async r=>{const{response:i}=await t(r),{operationSchema:c}=Eo(n),[,l,f,d,h,y]=c??[];try{const g=await e.protocol.deserializeResponse(bM(l,f,d,h,y),{...e,...n},i);return{response:i,output:g}}catch(g){if(Object.defineProperty(g,"$response",{value:i,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in g)){const v="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{g.message+=` - `+v}catch{!n.logger||n.logger?.constructor?.name==="NoOpLogger"?console.warn(v):n.logger?.warn?.(v)}typeof g.$responseBodyText<"u"&&g.$response&&(g.$response.body=g.$responseBodyText);try{if(Pa.isInstance(i)){const{headers:b={}}=i,_=Object.entries(b);g.$metadata={httpStatusCode:i.statusCode,requestId:_0(/^x-[\w-]+-request-?id$/,_),extendedRequestId:_0(/^x-[\w-]+-id-2$/,_),cfId:_0(/^x-[\w-]+-cf-id$/,_)}}}catch{}}throw g}},_0=(e,t)=>(t.find(([n])=>n.match(e))||[void 0,void 0])[1],OG=e=>(t,n)=>async r=>{const{operationSchema:i}=Eo(n),[,c,l,f,d,h]=i??[],y=n.endpointV2?.url&&e.urlParser?async()=>e.urlParser(n.endpointV2.url):e.endpoint,g=await e.protocol.serializeRequest(bM(c,l,f,d,h),r.input,{...e,...n,endpoint:y});return t({...r,request:g})},MG={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},DG={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function SM(e){return{applyToStack:t=>{t.add(OG(e),DG),t.add(IG(e),MG),e.protocol.setSerdeContext(e)}}}function Hc(e){if(typeof e=="object")return e;e=e|0;const t={};let n=0;for(const r of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(e>>n++&1)===1&&(t[r]=1);return t}const sT={it:Symbol.for("@smithy/nor-struct-it")};class wt{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=wt.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(t,n){this.ref=t,this.memberName=n;const r=[];let i=t,c=t;for(this._isMemberSchema=!1;w0(i);)r.push(i[1]),i=i[0],c=Lh(i),this._isMemberSchema=!0;if(r.length>0){this.memberTraits={};for(let l=r.length-1;l>=0;--l){const f=r[l];Object.assign(this.memberTraits,Hc(f))}}else this.memberTraits=0;if(c instanceof wt){const l=this.memberTraits;Object.assign(this,c),this.memberTraits=Object.assign({},l,c.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=n??c.memberName;return}if(this.schema=Lh(c),kG(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(c),this.traits=0),this._isMemberSchema&&!n)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](t){const n=this.prototype.isPrototypeOf(t);return!n&&typeof t=="object"&&t!==null?t.symbol===this.symbol:n}static of(t){const n=Lh(t);if(n instanceof wt)return n;if(w0(n)){const[r,i]=n;if(r instanceof wt)return Object.assign(r.getMergedTraits(),Hc(i)),r;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}return new wt(n)}getSchema(){const t=this.schema;return t[0]===0?t[4]:t}getName(t=!1){const{name:n}=this;return!t&&n&&n.includes("#")?n.split("#")[1]:n||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const t=this.getSchema();return typeof t=="number"?t>=64&&t<128:t[0]===1}isMapSchema(){const t=this.getSchema();return typeof t=="number"?t>=128&&t<=255:t[0]===2}isStructSchema(){const n=this.getSchema()[0];return n===3||n===-3||n===4}isUnionSchema(){return this.getSchema()[0]===4}isBlobSchema(){const t=this.getSchema();return t===21||t===42}isTimestampSchema(){const t=this.getSchema();return typeof t=="number"&&t>=4&&t<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:t}=this.getMergedTraits();return!!t||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return Hc(this.memberTraits)}getOwnTraits(){return Hc(this.traits)}getKeySchema(){const[t,n]=[this.isDocumentSchema(),this.isMapSchema()];if(!t&&!n)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const r=this.getSchema(),i=t?15:r[4]??0;return zu([i,0],"key")}getValueSchema(){const t=this.getSchema(),[n,r,i]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],c=typeof t=="number"?63&t:t&&typeof t=="object"&&(r||i)?t[3+t[0]]:n?15:void 0;if(c!=null)return zu([c,0],r?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(t){const n=this.getSchema();if(this.isStructSchema()&&n[4].includes(t)){const r=n[4].indexOf(t),i=n[5][r];return zu(w0(i)?i:[i,0],t)}if(this.isDocumentSchema())return zu([15,0],t);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no no member=${t}.`)}getMemberSchemas(){const t={};try{for(const[n,r]of this.structIterator())t[n]=r}catch{}return t}getEventStreamMember(){if(this.isStructSchema()){for(const[t,n]of this.structIterator())if(n.isStreaming()&&n.isStructSchema())return t}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const t=this.getSchema(),n=t[4].length;let r=t[sT.it];if(r&&n===r.length){yield*r;return}r=Array(n);for(let i=0;iArray.isArray(e)&&e.length===2,kG=e=>Array.isArray(e)&&e.length>=5;class Mt{namespace;schemas;exceptions;static registries=new Map;constructor(t,n=new Map,r=new Map){this.namespace=t,this.schemas=n,this.exceptions=r}static for(t){return Mt.registries.has(t)||Mt.registries.set(t,new Mt(t)),Mt.registries.get(t)}register(t,n){const r=this.normalizeShapeId(t);Mt.for(r.split("#")[0]).schemas.set(r,n)}getSchema(t){const n=this.normalizeShapeId(t);if(!this.schemas.has(n))throw new Error(`@smithy/core/schema - schema not found for ${n}`);return this.schemas.get(n)}registerError(t,n){const r=t,i=Mt.for(r[1]);i.schemas.set(r[1]+"#"+r[2],r),i.exceptions.set(r,n)}getErrorCtor(t){const n=t;return Mt.for(n[1]).exceptions.get(n)}getBaseException(){for(const t of this.exceptions.keys())if(Array.isArray(t)){const[,n,r]=t,i=n+"#"+r;if(i.startsWith("smithy.ts.sdk.synthetic.")&&i.endsWith("ServiceException"))return t}}find(t){return[...this.schemas.values()].find(t)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(t){return t.includes("#")?t:this.namespace+"#"+t}}const PG=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&HG.warn(jG(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},NG=Math.ceil(2**127*(2-2**-23)),rT=e=>{const t=PG(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>NG)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},zG=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},oT=e=>_M(e,16),iT=e=>_M(e,8),_M=(e,t)=>{const n=zG(e);if(n!==void 0&&LG(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},LG=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},BG=e=>rT(typeof e=="string"?Ib(e):e),$G=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Ib=e=>{const t=e.match($G);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},kv=e=>oT(typeof e=="string"?Ib(e):e),UG=e=>iT(typeof e=="string"?Ib(e):e),jG=e=>String(new TypeError(e).stack||e).split(` +`)}})};async function _G(e,t){let n=0;const r=[],i=e.getReader();let c=!1;for(;!c;){const{done:d,value:h}=await i.read();if(h&&(r.push(h),n+=h?.byteLength??0),n>=t)break;c=d}i.releaseLock();const l=new Uint8Array(Math.min(t,n));let f=0;for(const d of r){if(d.byteLength>l.byteLength-f){l.set(d.subarray(0,l.byteLength-f),f);break}else l.set(d,f);f+=d.length}return l}const Aa=e=>encodeURIComponent(e).replace(/[!'()*]/g,wG),wG=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function EG(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=Aa(n),Array.isArray(r))for(let i=0,c=r.length;i{e&&setTimeout(()=>{const r=new Error(`Request did not complete within ${e} ms`);r.name="TimeoutError",n(r)},e)})}const S0={supported:void 0};class Yp{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new Yp(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(n=>n||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),S0.supported===void 0&&(S0.supported=typeof Request<"u"&&"keepalive"in eT("https://[::1]"))}destroy(){}async handle(t,{abortSignal:n,requestTimeout:r}={}){this.config||(this.config=await this.configProvider);const i=r??this.config.requestTimeout,c=this.config.keepAlive===!0,l=this.config.credentials;if(n?.aborted){const A=new Error("Request aborted");return A.name="AbortError",Promise.reject(A)}let f=t.path;const d=EG(t.query||{});d&&(f+=`?${d}`),t.fragment&&(f+=`#${t.fragment}`);let h="";if(t.username!=null||t.password!=null){const A=t.username??"",O=t.password??"";h=`${A}:${O}@`}const{port:y,method:g}=t,b=`${t.protocol}//${h}${t.hostname}${y?`:${y}`:""}${f}`,v=g==="GET"||g==="HEAD"?void 0:t.body,_={body:v,headers:new Headers(t.headers),method:g,credentials:l};this.config?.cache&&(_.cache=this.config.cache),v&&(_.duplex="half"),typeof AbortController<"u"&&(_.signal=n),S0.supported&&(_.keepalive=c),typeof this.config.requestInit=="function"&&Object.assign(_,this.config.requestInit(t));let x=()=>{};const R=eT(b,_),C=[fetch(R).then(A=>{const O=A.headers,D={};for(const j of O.entries())D[j[0]]=j[1];return A.body!=null?{response:new Pa({headers:D,reason:A.statusText,statusCode:A.status,body:A.body})}:A.blob().then(j=>({response:new Pa({headers:D,reason:A.statusText,statusCode:A.status,body:j})}))}),xG(i)];return n&&C.push(new Promise((A,O)=>{const D=()=>{const N=new Error("Request aborted");N.name="AbortError",O(N)};if(typeof n.addEventListener=="function"){const N=n;N.addEventListener("abort",D,{once:!0}),x=()=>N.removeEventListener("abort",D)}else n.onabort=D})),Promise.race(C).finally(x)}updateHttpClientConfig(t,n){this.config=void 0,this.configProvider=this.configProvider.then(r=>(r[t]=n,r))}httpHandlerConfigs(){return this.config??{}}}const Av=async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):RG(e):CG(e);async function RG(e){const t=await TG(e),n=Na(t);return new Uint8Array(n)}async function CG(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:f,value:d}=await n.read();d&&(t.push(d),i+=d.length),r=f}const c=new Uint8Array(i);let l=0;for(const f of t)c.set(f,l),l+=f.length;return c}function TG(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(r.readyState!==2)return n(new Error("Reader aborted too early"));const i=r.result??"",c=i.indexOf(","),l=c>-1?c+1:i.length;t(i.substring(l))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}const gM={},Db={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),gM[e]=t,Db[t]=e}function yM(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n{if(!nT(e)&&!JC(e)){const i=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${i}`)}let t=!1;const n=async()=>{if(t)throw new Error(tT);return t=!0,await Av(e)},r=i=>{if(typeof i.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled. +If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return i.stream()};return Object.assign(e,{transformToByteArray:n,transformToString:async i=>{const c=await n();if(i==="base64")return Mi(c);if(i==="hex")return ms(c);if(i===void 0||i==="utf8"||i==="utf-8")return Ha(c);if(typeof TextDecoder=="function")return new TextDecoder(i).decode(c);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(tT);if(t=!0,nT(e))return r(e);if(JC(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},nT=e=>typeof Blob=="function"&&e instanceof Blob;async function AG(e){return typeof e.stream=="function"&&(e=e.stream()),e.tee()}const xi=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Ta.mutate(e);if(!e)return Ta.mutate(new Uint8Array);const n=t.streamCollector(e);return Ta.mutate(await n)};function pp(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}const Lh=e=>typeof e=="function"?e():e,vM=(e,t,n,r,i)=>({name:t,namespace:e,traits:n,input:r,output:i}),IG=e=>(t,n)=>async r=>{const{response:i}=await t(r),{operationSchema:c}=Eo(n),[,l,f,d,h,y]=c??[];try{const g=await e.protocol.deserializeResponse(vM(l,f,d,h,y),{...e,...n},i);return{response:i,output:g}}catch(g){if(Object.defineProperty(g,"$response",{value:i,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in g)){const b="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{g.message+=` + `+b}catch{!n.logger||n.logger?.constructor?.name==="NoOpLogger"?console.warn(b):n.logger?.warn?.(b)}typeof g.$responseBodyText<"u"&&g.$response&&(g.$response.body=g.$responseBodyText);try{if(Pa.isInstance(i)){const{headers:v={}}=i,_=Object.entries(v);g.$metadata={httpStatusCode:i.statusCode,requestId:_0(/^x-[\w-]+-request-?id$/,_),extendedRequestId:_0(/^x-[\w-]+-id-2$/,_),cfId:_0(/^x-[\w-]+-cf-id$/,_)}}}catch{}}throw g}},_0=(e,t)=>(t.find(([n])=>n.match(e))||[void 0,void 0])[1],OG=e=>(t,n)=>async r=>{const{operationSchema:i}=Eo(n),[,c,l,f,d,h]=i??[],y=n.endpointV2?.url&&e.urlParser?async()=>e.urlParser(n.endpointV2.url):e.endpoint,g=await e.protocol.serializeRequest(vM(c,l,f,d,h),r.input,{...e,...n,endpoint:y});return t({...r,request:g})},MG={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},DG={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function SM(e){return{applyToStack:t=>{t.add(OG(e),DG),t.add(IG(e),MG),e.protocol.setSerdeContext(e)}}}function Fc(e){if(typeof e=="object")return e;e=e|0;const t={};let n=0;for(const r of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(e>>n++&1)===1&&(t[r]=1);return t}const sT={it:Symbol.for("@smithy/nor-struct-it")};class wt{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=wt.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(t,n){this.ref=t,this.memberName=n;const r=[];let i=t,c=t;for(this._isMemberSchema=!1;w0(i);)r.push(i[1]),i=i[0],c=Lh(i),this._isMemberSchema=!0;if(r.length>0){this.memberTraits={};for(let l=r.length-1;l>=0;--l){const f=r[l];Object.assign(this.memberTraits,Fc(f))}}else this.memberTraits=0;if(c instanceof wt){const l=this.memberTraits;Object.assign(this,c),this.memberTraits=Object.assign({},l,c.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=n??c.memberName;return}if(this.schema=Lh(c),kG(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(c),this.traits=0),this._isMemberSchema&&!n)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](t){const n=this.prototype.isPrototypeOf(t);return!n&&typeof t=="object"&&t!==null?t.symbol===this.symbol:n}static of(t){const n=Lh(t);if(n instanceof wt)return n;if(w0(n)){const[r,i]=n;if(r instanceof wt)return Object.assign(r.getMergedTraits(),Fc(i)),r;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}return new wt(n)}getSchema(){const t=this.schema;return t[0]===0?t[4]:t}getName(t=!1){const{name:n}=this;return!t&&n&&n.includes("#")?n.split("#")[1]:n||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const t=this.getSchema();return typeof t=="number"?t>=64&&t<128:t[0]===1}isMapSchema(){const t=this.getSchema();return typeof t=="number"?t>=128&&t<=255:t[0]===2}isStructSchema(){const n=this.getSchema()[0];return n===3||n===-3||n===4}isUnionSchema(){return this.getSchema()[0]===4}isBlobSchema(){const t=this.getSchema();return t===21||t===42}isTimestampSchema(){const t=this.getSchema();return typeof t=="number"&&t>=4&&t<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:t}=this.getMergedTraits();return!!t||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return Fc(this.memberTraits)}getOwnTraits(){return Fc(this.traits)}getKeySchema(){const[t,n]=[this.isDocumentSchema(),this.isMapSchema()];if(!t&&!n)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const r=this.getSchema(),i=t?15:r[4]??0;return zu([i,0],"key")}getValueSchema(){const t=this.getSchema(),[n,r,i]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],c=typeof t=="number"?63&t:t&&typeof t=="object"&&(r||i)?t[3+t[0]]:n?15:void 0;if(c!=null)return zu([c,0],r?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(t){const n=this.getSchema();if(this.isStructSchema()&&n[4].includes(t)){const r=n[4].indexOf(t),i=n[5][r];return zu(w0(i)?i:[i,0],t)}if(this.isDocumentSchema())return zu([15,0],t);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no no member=${t}.`)}getMemberSchemas(){const t={};try{for(const[n,r]of this.structIterator())t[n]=r}catch{}return t}getEventStreamMember(){if(this.isStructSchema()){for(const[t,n]of this.structIterator())if(n.isStreaming()&&n.isStructSchema())return t}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const t=this.getSchema(),n=t[4].length;let r=t[sT.it];if(r&&n===r.length){yield*r;return}r=Array(n);for(let i=0;iArray.isArray(e)&&e.length===2,kG=e=>Array.isArray(e)&&e.length>=5;class Mt{namespace;schemas;exceptions;static registries=new Map;constructor(t,n=new Map,r=new Map){this.namespace=t,this.schemas=n,this.exceptions=r}static for(t){return Mt.registries.has(t)||Mt.registries.set(t,new Mt(t)),Mt.registries.get(t)}register(t,n){const r=this.normalizeShapeId(t);Mt.for(r.split("#")[0]).schemas.set(r,n)}getSchema(t){const n=this.normalizeShapeId(t);if(!this.schemas.has(n))throw new Error(`@smithy/core/schema - schema not found for ${n}`);return this.schemas.get(n)}registerError(t,n){const r=t,i=Mt.for(r[1]);i.schemas.set(r[1]+"#"+r[2],r),i.exceptions.set(r,n)}getErrorCtor(t){const n=t;return Mt.for(n[1]).exceptions.get(n)}getBaseException(){for(const t of this.exceptions.keys())if(Array.isArray(t)){const[,n,r]=t,i=n+"#"+r;if(i.startsWith("smithy.ts.sdk.synthetic.")&&i.endsWith("ServiceException"))return t}}find(t){return[...this.schemas.values()].find(t)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(t){return t.includes("#")?t:this.namespace+"#"+t}}const PG=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&HG.warn(jG(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},NG=Math.ceil(2**127*(2-2**-23)),rT=e=>{const t=PG(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>NG)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},zG=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},oT=e=>_M(e,16),iT=e=>_M(e,8),_M=(e,t)=>{const n=zG(e);if(n!==void 0&&LG(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},LG=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},BG=e=>rT(typeof e=="string"?Iv(e):e),$G=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Iv=e=>{const t=e.match($G);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},kb=e=>oT(typeof e=="string"?Iv(e):e),UG=e=>iT(typeof e=="string"?Iv(e):e),jG=e=>String(new TypeError(e).stack||e).split(` `).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(` -`),HG={warn:console.warn},FG=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Ob=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function mp(e){const t=e.getUTCFullYear(),n=e.getUTCMonth(),r=e.getUTCDay(),i=e.getUTCDate(),c=e.getUTCHours(),l=e.getUTCMinutes(),f=e.getUTCSeconds(),d=i<10?`0${i}`:`${i}`,h=c<10?`0${c}`:`${c}`,y=l<10?`0${l}`:`${l}`,g=f<10?`0${f}`:`${f}`;return`${FG[r]}, ${d} ${Ob[n]} ${t} ${h}:${y}:${g} GMT`}const VG=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),qG=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),GG=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),hve=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=VG.exec(e);if(t){const[n,r,i,c,l,f,d,h]=t;return E0(kv(gp(c)),x0(i),Yc(r,"day",1,31),{hours:l,minutes:f,seconds:d,fractionalMilliseconds:h})}if(t=qG.exec(e),t){const[n,r,i,c,l,f,d,h]=t;return QG(E0(KG(c),x0(i),Yc(r,"day",1,31),{hours:l,minutes:f,seconds:d,fractionalMilliseconds:h}))}if(t=GG.exec(e),t){const[n,r,i,c,l,f,d,h]=t;return E0(kv(gp(h)),x0(r),Yc(i.trimLeft(),"day",1,31),{hours:c,minutes:l,seconds:f,fractionalMilliseconds:d})}throw new TypeError("Invalid RFC-7231 date-time value")},E0=(e,t,n,r)=>{const i=t-1;return XG(e,i,n),new Date(Date.UTC(e,i,n,Yc(r.hours,"hour",0,23),Yc(r.minutes,"minute",0,59),Yc(r.seconds,"seconds",0,60),JG(r.fractionalMilliseconds)))},KG=e=>{const t=new Date().getUTCFullYear(),n=Math.floor(t/100)*100+kv(gp(e));return ne.getTime()-new Date().getTime()>ZG?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,x0=e=>{const t=Ob.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},YG=[31,28,31,30,31,30,31,31,30,31,30,31],XG=(e,t,n)=>{let r=YG[t];if(t===1&&WG(e)&&(r=29),n>r)throw new TypeError(`Invalid day for ${Ob[t]} in ${e}: ${n}`)},WG=e=>e%4===0&&(e%100!==0||e%400===0),Yc=(e,t,n,r)=>{const i=UG(gp(e));if(ir)throw new TypeError(`${t} must be between ${n} and ${r}, inclusive`);return i},JG=e=>e==null?0:BG("0."+e)*1e3,gp=e=>{let t=0;for(;tt.toString(16).padStart(2,"0")),Xp=()=>{if(aT)return aT();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,Qn[e[0]]+Qn[e[1]]+Qn[e[2]]+Qn[e[3]]+"-"+Qn[e[4]]+Qn[e[5]]+"-"+Qn[e[6]]+Qn[e[7]]+"-"+Qn[e[8]]+Qn[e[9]]+"-"+Qn[e[10]]+Qn[e[11]]+Qn[e[12]]+Qn[e[13]]+Qn[e[14]]+Qn[e[15]]},Ri=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};Ri.from=e=>e&&typeof e=="object"&&(e instanceof Ri||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?Ri(String(e)):Ri(JSON.stringify(e));Ri.fromObject=Ri.from;function eK(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}const Mb="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",Db="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",kb="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",wM="(\\d?\\d)",EM="(\\d{4})",tK=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),nK=new RegExp(`^${Mb}, ${wM} ${Db} ${EM} ${kb} GMT$`),sK=new RegExp(`^${Mb}, ${wM}-${Db}-(\\d\\d) ${kb} GMT$`),rK=new RegExp(`^${Mb} ${Db} ( [1-9]|\\d\\d) ${kb} ${EM}$`),oK=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],iK=e=>{if(e==null)return;let t=NaN;if(typeof e=="number")t=e;else if(typeof e=="string"){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else typeof e=="object"&&e.tag===1&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1e3))},aK=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");const t=tK.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,n,r,i,c,l,f,,d,h]=t;fo(r,1,12),fo(i,1,31),fo(c,0,23),fo(l,0,59),fo(f,0,60);const y=new Date(Date.UTC(Number(n),Number(r)-1,Number(i),Number(c),Number(l),Number(f),Number(d)?Math.round(parseFloat(`0.${d}`)*1e3):0));if(y.setUTCFullYear(Number(n)),h.toUpperCase()!="Z"){const[,g,v,b]=/([+-])(\d\d):(\d\d)/.exec(h)||[void 0,"+",0,0],_=g==="-"?1:-1;y.setTime(y.getTime()+_*(Number(v)*60*60*1e3+Number(b)*60*1e3))}return y},cK=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,n,r,i,c,l,f,d;if((d=nK.exec(e))?[,t,n,r,i,c,l,f]=d:(d=sK.exec(e))?([,t,n,r,i,c,l,f]=d,r=(Number(r)+1900).toString()):(d=rK.exec(e))&&([,n,t,i,c,l,f,r]=d),r&&l){const h=Date.UTC(Number(r),oK.indexOf(n),Number(t),Number(i),Number(c),Number(l),f?Math.round(parseFloat(`0.${f}`)*1e3):0);fo(t,1,31),fo(i,0,23),fo(c,0,59),fo(l,0,60);const y=new Date(h);return y.setUTCFullYear(Number(r)),y}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)};function fo(e,t,n){const r=Number(e);if(rn)throw new Error(`Value ${r} out of range [${t}, ${n}]`)}function lK(e,t,n){if(!Number.isInteger(n))throw new Error("Invalid number of delimiters ("+n+") for splitEvery.");const r=e.split(t),i=[];let c="";for(let l=0;l{const t=e.length,n=[];let r=!1,i,c=0;for(let l=0;l{l=l.trim();const f=l.length;return f<2?l:(l[0]==='"'&&l[f-1]==='"'&&(l=l.slice(1,f-1)),l.replace(/\\"/g,'"'))})},cT=/^-?\d*(\.\d+)?$/;class Cf{string;type;constructor(t,n){if(this.string=t,this.type=n,!cT.test(t))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](t){if(!t||typeof t!="object")return!1;const n=t;return Cf.prototype.isPrototypeOf(t)||n.type==="bigDecimal"&&cT.test(n.string)}}const uK="modulepreload",fK=function(e){return"/"+e},lT={},Wt=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let d=function(h){return Promise.all(h.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),f=l?.nonce||l?.getAttribute("nonce");i=d(n.map(h=>{if(h=fK(h),h in lT)return;lT[h]=!0;const y=h.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const v=document.createElement("link");if(v.rel=y?"stylesheet":uK,y||(v.as="script"),v.crossOrigin="",v.href=h,f&&v.setAttribute("nonce",f),document.head.appendChild(v),y)return new Promise((b,_)=>{v.addEventListener("load",b),v.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${h}`)))})}))}function c(l){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=l,window.dispatchEvent(f),!f.defaultPrevented)throw l}return i.then(l=>{for(const f of l||[])f.status==="rejected"&&c(f.reason);return t().catch(c)})};class Wp{serdeContext;setSerdeContext(t){this.serdeContext=t}}class RM extends Wp{options;constructor(t){super(),this.options=t}getRequestType(){return Mn}getResponseType(){return Pa}setSerdeContext(t){this.serdeContext=t,this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(t)}updateServiceEndpoint(t,n){if("url"in n){t.protocol=n.url.protocol,t.hostname=n.url.hostname,t.port=n.url.port?Number(n.url.port):void 0,t.path=n.url.pathname,t.fragment=n.url.hash||void 0,t.username=n.url.username||void 0,t.password=n.url.password||void 0,t.query||(t.query={});for(const[r,i]of n.url.searchParams.entries())t.query[r]=i;return t}else return t.protocol=n.protocol,t.hostname=n.hostname,t.port=n.port?Number(n.port):void 0,t.path=n.path,t.query={...n.query},t}setHostPrefix(t,n,r){if(this.serdeContext?.disableHostPrefix)return;const i=wt.of(n.input),c=Hc(n.traits??{});if(c.endpoint){let l=c.endpoint?.[0];if(typeof l=="string"){const f=[...i.structIterator()].filter(([,d])=>d.getMergedTraits().hostLabel);for(const[d]of f){const h=r[d];if(typeof h!="string")throw new Error(`@smithy/core/schema - ${d} in input must be a string as hostLabel.`);l=l.replace(`{${d}}`,h)}t.hostname=l+t.hostname}}}deserializeMetadata(t){return{httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:t,requestSchema:n,initialRequest:r}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:t,requestSchema:n,initialRequest:r})}async deserializeEventStream({response:t,responseSchema:n,initialResponseContainer:r}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:t,responseSchema:n,initialResponseContainer:r})}async loadEventStreamCapability(){const{EventStreamSerde:t}=await Wt(async()=>{const{EventStreamSerde:n}=await import("./index2.js");return{EventStreamSerde:n}},[]);return new t({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(t,n,r,i,c){return[]}getEventStreamMarshaller(){const t=this.serdeContext;if(!t.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return t.eventStreamMarshaller}}class dK extends RM{async serializeRequest(t,n,r){const i={...n??{}},c=this.serializer,l={},f={},d=await r.endpoint(),h=wt.of(t?.input),y=h.getSchema();let g=!1,v;const b=new Mn({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:l,headers:f,body:void 0});if(d){this.updateServiceEndpoint(b,d),this.setHostPrefix(b,t,i);const _=Hc(t.traits);if(_.http){b.method=_.http[0];const[x,R]=_.http[1].split("?");b.path=="/"?b.path=x:b.path+=x;const C=new URLSearchParams(R??"");Object.assign(l,Object.fromEntries(C))}}for(const[_,x]of h.structIterator()){const R=x.getMergedTraits()??{},C=i[_];if(C==null&&!x.isIdempotencyToken()){if(R.httpLabel&&(b.path.includes(`{${_}+}`)||b.path.includes(`{${_}}`)))throw new Error(`No value provided for input HTTP label: ${_}.`);continue}if(R.httpPayload)x.isStreaming()?x.isStructSchema()?i[_]&&(v=await this.serializeEventStream({eventStream:i[_],requestSchema:h})):v=C:(c.write(x,C),v=c.flush()),delete i[_];else if(R.httpLabel){c.write(x,C);const A=c.flush();b.path.includes(`{${_}+}`)?b.path=b.path.replace(`{${_}+}`,A.split("/").map(pp).join("/")):b.path.includes(`{${_}}`)&&(b.path=b.path.replace(`{${_}}`,pp(A))),delete i[_]}else if(R.httpHeader)c.write(x,C),f[R.httpHeader.toLowerCase()]=String(c.flush()),delete i[_];else if(typeof R.httpPrefixHeaders=="string"){for(const[A,O]of Object.entries(C)){const D=R.httpPrefixHeaders+A;c.write([x.getValueSchema(),{httpHeader:D}],O),f[D.toLowerCase()]=c.flush()}delete i[_]}else R.httpQuery||R.httpQueryParams?(this.serializeQuery(x,C,l),delete i[_]):g=!0}return g&&i&&(c.write(y,i),v=c.flush()),b.headers=f,b.query=l,b.body=v,b}serializeQuery(t,n,r){const i=this.serializer,c=t.getMergedTraits();if(c.httpQueryParams){for(const[l,f]of Object.entries(n))if(!(l in r)){const d=t.getValueSchema();Object.assign(d.getMergedTraits(),{...c,httpQuery:l,httpQueryParams:void 0}),this.serializeQuery(d,f,r)}return}if(t.isListSchema()){const l=!!t.getMergedTraits().sparse,f=[];for(const d of n){i.write([t.getValueSchema(),c],d);const h=i.flush();(l||h!==void 0)&&f.push(h)}r[c.httpQuery]=f}else i.write([t,c],n),r[c.httpQuery]=i.flush()}async deserializeResponse(t,n,r){const i=this.deserializer,c=wt.of(t.output),l={};if(r.statusCode>=300){const d=await xi(r.body,n);throw d.byteLength>0&&Object.assign(l,await i.read(15,d)),await this.handleError(t,n,r,l,this.deserializeMetadata(r)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const d in r.headers){const h=r.headers[d];delete r.headers[d],r.headers[d.toLowerCase()]=h}const f=await this.deserializeHttpMessage(c,n,r,l);if(f.length){const d=await xi(r.body,n);if(d.byteLength>0){const h=await i.read(c,d);for(const y of f)l[y]=h[y]}}else f.discardResponseBody&&await xi(r.body,n);return l.$metadata=this.deserializeMetadata(r),l}async deserializeHttpMessage(t,n,r,i,c){let l;i instanceof Set?l=c:l=i;let f=!0;const d=this.deserializer,h=wt.of(t),y=[];for(const[g,v]of h.structIterator()){const b=v.getMemberTraits();if(b.httpPayload){if(f=!1,v.isStreaming())v.isStructSchema()?l[g]=await this.deserializeEventStream({response:r,responseSchema:h}):l[g]=vM(r.body);else if(r.body){const x=await xi(r.body,n);x.byteLength>0&&(l[g]=await d.read(v,x))}}else if(b.httpHeader){const _=String(b.httpHeader).toLowerCase(),x=r.headers[_];if(x!=null)if(v.isListSchema()){const R=v.getValueSchema();R.getMergedTraits().httpHeader=_;let C;R.isTimestampSchema()&&R.getSchema()===4?C=lK(x,",",2):C=xM(x);const A=[];for(const O of C)A.push(await d.read(R,O.trim()));l[g]=A}else l[g]=await d.read(v,x)}else if(b.httpPrefixHeaders!==void 0){l[g]={};for(const[_,x]of Object.entries(r.headers))if(_.startsWith(b.httpPrefixHeaders)){const R=v.getValueSchema();R.getMergedTraits().httpHeader=_,l[g][_.slice(b.httpPrefixHeaders.length)]=await d.read(R,x)}}else b.httpResponseCode?l[g]=r.statusCode:y.push(g)}return y.discardResponseBody=f,y}}class hK extends RM{async serializeRequest(t,n,r){const i=this.serializer,c={},l={},f=await r.endpoint(),d=wt.of(t?.input),h=d.getSchema();let y;const g=new Mn({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:c,headers:l,body:void 0});f&&(this.updateServiceEndpoint(g,f),this.setHostPrefix(g,t,n));const v={...n};if(n){const b=d.getEventStreamMember();if(b){if(v[b]){const _={};for(const[x,R]of d.structIterator())x!==b&&v[x]&&(i.write(R,v[x]),_[x]=i.flush());y=await this.serializeEventStream({eventStream:v[b],requestSchema:d,initialRequest:_})}}else i.write(h,v),y=i.flush()}return g.headers=l,g.query=c,g.body=y,g.method="POST",g}async deserializeResponse(t,n,r){const i=this.deserializer,c=wt.of(t.output),l={};if(r.statusCode>=300){const d=await xi(r.body,n);throw d.byteLength>0&&Object.assign(l,await i.read(15,d)),await this.handleError(t,n,r,l,this.deserializeMetadata(r)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const d in r.headers){const h=r.headers[d];delete r.headers[d],r.headers[d.toLowerCase()]=h}const f=c.getEventStreamMember();if(f)l[f]=await this.deserializeEventStream({response:r,responseSchema:c,initialResponseContainer:l});else{const d=await xi(r.body,n);d.byteLength>0&&Object.assign(l,await i.read(c,d))}return l.$metadata=this.deserializeMetadata(r),l}}function Jp(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7))return e.getSchema();const{httpLabel:n,httpPrefixHeaders:r,httpHeader:i,httpQuery:c}=e.getMergedTraits();return(t.httpBindings?typeof r=="string"||i?6:c||n?5:void 0:void 0)??t.timestampFormat.default}class CM extends Wp{settings;constructor(t){super(),this.settings=t}read(t,n){const r=wt.of(t);if(r.isListSchema())return xM(n).map(i=>this.read(r.getValueSchema(),i));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??Na)(n);if(r.isTimestampSchema())switch(Jp(r,this.settings)){case 5:return aK(n);case 6:return cK(n);case 7:return iK(n);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",n),new Date(n)}if(r.isStringSchema()){const i=r.getMergedTraits().mediaType;let c=n;if(i)return r.getMergedTraits().httpHeader&&(c=this.base64ToUtf8(c)),(i==="application/json"||i.endsWith("+json"))&&(c=Ri.from(c)),c}return r.isNumericSchema()?Number(n):r.isBigIntegerSchema()?BigInt(n):r.isBigDecimalSchema()?new Cf(n,"bigDecimal"):r.isBooleanSchema()?String(n).toLowerCase()==="true":n}base64ToUtf8(t){return(this.serdeContext?.utf8Encoder??ja)((this.serdeContext?.base64Decoder??Na)(t))}}class pK extends Wp{codecDeserializer;stringDeserializer;constructor(t,n){super(),this.codecDeserializer=t,this.stringDeserializer=new CM(n)}setSerdeContext(t){this.stringDeserializer.setSerdeContext(t),this.codecDeserializer.setSerdeContext(t),this.serdeContext=t}read(t,n){const r=wt.of(t),i=r.getMergedTraits(),c=this.serdeContext?.utf8Encoder??ja;if(i.httpHeader||i.httpResponseCode)return this.stringDeserializer.read(r,c(n));if(i.httpPayload){if(r.isBlobSchema()){const l=this.serdeContext?.utf8Decoder??So;return typeof n=="string"?l(n):n}else if(r.isStringSchema())return"byteLength"in n?c(n):n}return this.codecDeserializer.read(r,n)}}class mK extends Wp{settings;stringBuffer="";constructor(t){super(),this.settings=t}write(t,n){const r=wt.of(t);switch(typeof n){case"object":if(n===null){this.stringBuffer="null";return}if(r.isTimestampSchema()){if(!(n instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${n} when schema expected Date in ${r.getName(!0)}`);switch(Jp(r,this.settings)){case 5:this.stringBuffer=n.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=mp(n);break;case 7:this.stringBuffer=String(n.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",n),this.stringBuffer=String(n.getTime()/1e3)}return}if(r.isBlobSchema()&&"byteLength"in n){this.stringBuffer=(this.serdeContext?.base64Encoder??Mi)(n);return}if(r.isListSchema()&&Array.isArray(n)){let l="";for(const f of n){this.write([r.getValueSchema(),r.getMergedTraits()],f);const d=this.flush(),h=r.getValueSchema().isTimestampSchema()?d:eK(d);l!==""&&(l+=", "),l+=h}this.stringBuffer=l;return}this.stringBuffer=JSON.stringify(n,null,2);break;case"string":const i=r.getMergedTraits().mediaType;let c=n;if(i&&((i==="application/json"||i.endsWith("+json"))&&(c=Ri.from(c)),r.getMergedTraits().httpHeader)){this.stringBuffer=(this.serdeContext?.base64Encoder??Mi)(c.toString());return}this.stringBuffer=n;break;default:r.isIdempotencyToken()?this.stringBuffer=Xp():this.stringBuffer=String(n)}}flush(){const t=this.stringBuffer;return this.stringBuffer="",t}}class gK{codecSerializer;stringSerializer;buffer;constructor(t,n,r=new mK(n)){this.codecSerializer=t,this.stringSerializer=r}setSerdeContext(t){this.codecSerializer.setSerdeContext(t),this.stringSerializer.setSerdeContext(t)}write(t,n){const r=wt.of(t),i=r.getMergedTraits();if(i.httpHeader||i.httpLabel||i.httpQuery){this.stringSerializer.write(r,n),this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(r,n)}flush(){if(this.buffer!==void 0){const t=this.buffer;return this.buffer=void 0,t}return this.codecSerializer.flush()}}function yK(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}class TM{authSchemes=new Map;constructor(t){for(const[n,r]of Object.entries(t))r!==void 0&&this.authSchemes.set(n,r)}getIdentityProvider(t){return this.authSchemes.get(t)}}const vK=e=>function(n){return AM(n)&&n.expiration.getTime()-Date.now()e.expiration!==void 0,_K=(e,t,n)=>{if(e===void 0)return;const r=typeof e!="function"?async()=>Promise.resolve(e):e;let i,c,l,f=!1;const d=async h=>{c||(c=r(h));try{i=await c,l=!0,f=!1}finally{c=void 0}return i};return t===void 0?async h=>((!l||h?.forceRefresh)&&(i=await d(h)),i):async h=>((!l||h?.forceRefresh)&&(i=await d(h)),f?i:n(i)?(t(i)&&await d(h),i):(f=!0,i))},wK=void 0;function EK(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function IM(e){const t=Zc(e.userAgentAppId??wK),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:typeof n=="string"?[[n]]:n,userAgentAppId:async()=>{const r=await t();if(!EK(r)){const i=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof r!="string"?i?.warn("userAgentAppId must be a string or undefined."):r.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}class OM{capacity;data=new Map;parameters=[];constructor({size:t,params:n}){this.capacity=t??50,n&&(this.parameters=n)}get(t,n){const r=this.hash(t);if(r===!1)return n();if(!this.data.has(r)){if(this.data.size>this.capacity+10){const i=this.data.keys();let c=0;for(;;){const{value:l,done:f}=i.next();if(this.data.delete(l),f||++c>10)break}}this.data.set(r,n())}return this.data.get(r)}size(){return this.data.size}hash(t){let n="";const{parameters:r}=this;if(r.length===0)return!1;for(const i of r){const c=String(t[i]??"");if(c.includes("|;"))return!1;n+=c+"|;"}return n}}const xK=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),MM=e=>xK.test(e)||e.startsWith("[")&&e.endsWith("]"),RK=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),em=(e,t=!1)=>{if(!t)return RK.test(e);const n=e.split(".");for(const r of n)if(!em(r))return!1;return!0},hf={},pf="endpoints";function Di(e){return typeof e!="object"||e==null?e:"ref"in e?`$${Di(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Di).join(", ")})`:JSON.stringify(e,null,2)}class Ls extends Error{constructor(t){super(t),this.name="EndpointError"}}const CK=(e,t)=>e===t,TK=e=>{const t=e.split("."),n=[];for(const r of t){const i=r.indexOf("[");if(i!==-1){if(r.indexOf("]")!==r.length-1)throw new Ls(`Path: '${e}' does not end with ']'`);const c=r.slice(i+1,-1);if(Number.isNaN(parseInt(c)))throw new Ls(`Invalid array index: '${c}' in path: '${e}'`);i!==0&&n.push(r.slice(0,i)),n.push(c)}else n.push(r)}return n},DM=(e,t)=>TK(t).reduce((n,r)=>{if(typeof n!="object")throw new Ls(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),AK=e=>e!=null,IK=e=>!e,R0={[ff.HTTP]:80,[ff.HTTPS]:443},OK=e=>{const t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){const{hostname:v,port:b,protocol:_="",path:x="",query:R={}}=e,C=new URL(`${_}//${v}${b?`:${b}`:""}${x}`);return C.search=Object.entries(R).map(([A,O])=>`${A}=${O}`).join("&"),C}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:c,protocol:l,search:f}=t;if(f)return null;const d=l.slice(0,-1);if(!Object.values(ff).includes(d))return null;const h=MM(i),y=n.includes(`${r}:${R0[d]}`)||typeof e=="string"&&e.includes(`${r}:${R0[d]}`),g=`${r}${y?`:${R0[d]}`:""}`;return{scheme:d,authority:g,path:c,normalizedPath:c.endsWith("/")?c:`${c}/`,isIp:h}},MK=(e,t)=>e===t,DK=(e,t,n,r)=>t>=n||e.lengthencodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),PK={booleanEquals:CK,getAttr:DM,isSet:AK,isValidHostLabel:em,not:IK,parseURL:OK,stringEquals:MK,substring:DK,uriEncode:kK},kM=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i({...t.endpointParams,...t.referenceRecord})[e],tm=(e,t,n)=>{if(typeof e=="string")return kM(e,n);if(e.fn)return NM.callFunction(e,n);if(e.ref)return NK(e,n);throw new Ls(`'${t}': ${String(e)} is not a string, function or reference.`)},PM=({fn:e,argv:t},n)=>{const r=t.map(c=>["boolean","number"].includes(typeof c)?c:NM.evaluateExpression(c,"arg",n)),i=e.split(".");return i[0]in hf&&i[1]!=null?hf[i[0]][i[1]](...r):PK[e](...r)},NM={evaluateExpression:tm,callFunction:PM},zK=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new Ls(`'${e}' is already defined in Reference Record.`);const r=PM(t,n);return n.logger?.debug?.(`${pf} evaluateCondition: ${Di(t)} = ${Di(r)}`),{result:r===""?!0:!!r,...e!=null&&{toAssign:{name:e,value:r}}}},Pb=(e=[],t)=>{const n={};for(const r of e){const{result:i,toAssign:c}=zK(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!i)return{result:i};c&&(n[c.name]=c.value,t.logger?.debug?.(`${pf} assign: ${c.name} := ${Di(c.value)}`))}return{result:!0,referenceRecord:n}},LK=(e,t)=>Object.entries(e).reduce((n,[r,i])=>({...n,[r]:i.map(c=>{const l=tm(c,"Header value entry",t);if(typeof l!="string")throw new Ls(`Header '${r}' value '${l}' is not a string`);return l})}),{}),zM=(e,t)=>Object.entries(e).reduce((n,[r,i])=>({...n,[r]:BM.getEndpointProperty(i,t)}),{}),LM=(e,t)=>{if(Array.isArray(e))return e.map(n=>LM(n,t));switch(typeof e){case"string":return kM(e,t);case"object":if(e===null)throw new Ls(`Unexpected endpoint property: ${e}`);return BM.getEndpointProperties(e,t);case"boolean":return e;default:throw new Ls(`Unexpected endpoint property type: ${typeof e}`)}},BM={getEndpointProperty:LM,getEndpointProperties:zM},BK=(e,t)=>{const n=tm(e,"Endpoint URL",t);if(typeof n=="string")try{return new URL(n)}catch(r){throw console.error(`Failed to construct URL with ${n}`,r),r}throw new Ls(`Endpoint URL must be a string, got ${typeof n}`)},$K=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:c}=Pb(n,t);if(!i)return;const l={...t,referenceRecord:{...t.referenceRecord,...c}},{url:f,properties:d,headers:h}=r;return t.logger?.debug?.(`${pf} Resolving endpoint from template: ${Di(r)}`),{...h!=null&&{headers:LK(h,l)},...d!=null&&{properties:zM(d,l)},url:BK(f,l)}},UK=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:c}=Pb(n,t);if(i)throw new Ls(tm(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...c}}))},$M=(e,t)=>{for(const n of e)if(n.type==="endpoint"){const r=$K(n,t);if(r)return r}else if(n.type==="error")UK(n,t);else if(n.type==="tree"){const r=UM.evaluateTreeRule(n,t);if(r)return r}else throw new Ls(`Unknown endpoint rule: ${n}`);throw new Ls("Rules evaluation failed")},jK=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:c}=Pb(n,t);if(i)return UM.evaluateRules(r,{...t,referenceRecord:{...t.referenceRecord,...c}})},UM={evaluateRules:$M,evaluateTreeRule:jK},jM=(e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:c}=e;t.logger?.debug?.(`${pf} Initial EndpointParams: ${Di(n)}`);const l=Object.entries(i).filter(([,h])=>h.default!=null).map(([h,y])=>[h,y.default]);if(l.length>0)for(const[h,y]of l)n[h]=n[h]??y;const f=Object.entries(i).filter(([,h])=>h.required).map(([h])=>h);for(const h of f)if(n[h]==null)throw new Ls(`Missing required parameter: '${h}'`);const d=$M(c,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${pf} Resolved endpoint: ${Di(d)}`),d},HM=(e,t=!1)=>{if(t){for(const n of e.split("."))if(!HM(n))return!1;return!0}return!(!em(e)||e.length<3||e.length>63||e!==e.toLowerCase()||MM(e))},uT=":",HK="/",FK=e=>{const t=e.split(uT);if(t.length<6)return null;const[n,r,i,c,l,...f]=t;if(n!=="arn"||r===""||i===""||f.join(uT)==="")return null;const d=f.map(h=>h.split(HK)).flat();return{partition:r,service:i,region:c,accountId:l,resourceId:d}},VK=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],qK={partitions:VK};let GK=qK;const KK=e=>{const{partitions:t}=GK;for(const r of t){const{regions:i,outputs:c}=r;for(const[l,f]of Object.entries(i))if(l===e)return{...c,...f}}for(const r of t){const{regionRegex:i,outputs:c}=r;if(new RegExp(i).test(e))return{...c}}const n=t.find(r=>r.id==="aws");if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}},Nb={isVirtualHostableS3Bucket:HM,parseArn:FK,partition:KK};hf.aws=Nb;function ZK(e){const t={};if(e=e.replace(/^\?/,""),e)for(const n of e.split("&")){let[r,i=null]=n.split("=");r=decodeURIComponent(r),i&&(i=decodeURIComponent(i)),r in t?Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i}return t}const mf=e=>{if(typeof e=="string")return mf(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:c}=e;let l;return c&&(l=ZK(c)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:l}};function QK(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}function br(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}const fT=e=>Pa.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,zb=e=>new Date(Date.now()+e),YK=(e,t)=>Math.abs(zb(t).getTime()-e)>=3e5,dT=(e,t)=>{const n=Date.parse(e);return YK(n,t)?n-Date.now():t},Qu=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},FM=async e=>{const t=Qu("context",e.context),n=Qu("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],c=await Qu("signer",n.signer)(r),l=e?.signingRegion,f=e?.signingRegionSet,d=e?.signingName;return{config:n,signer:c,signingRegion:l,signingRegionSet:f,signingName:d}};class Lb{async sign(t,n,r){if(!Mn.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await FM(r),{config:c,signer:l}=i;let{signingRegion:f,signingName:d}=i;const h=r.context;if(h?.authSchemes?.length??!1){const[g,v]=h.authSchemes;g?.name==="sigv4a"&&v?.name==="sigv4"&&(f=v?.signingRegion??f,d=v?.signingName??d)}return await l.sign(t,{signingDate:zb(c.systemClockOffset),signingRegion:f,signingService:d})}errorHandler(t){return n=>{const r=n.ServerTime??fT(n.$response);if(r){const i=Qu("config",t.config),c=i.systemClockOffset;i.systemClockOffset=dT(r,i.systemClockOffset),i.systemClockOffset!==c&&n.$metadata&&(n.$metadata.clockSkewCorrected=!0)}throw n}}successHandler(t,n){const r=fT(t);if(r){const i=Qu("config",n.config);i.systemClockOffset=dT(r,i.systemClockOffset)}}}class XK extends Lb{async sign(t,n,r){if(!Mn.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:i,signer:c,signingRegion:l,signingRegionSet:f,signingName:d}=await FM(r),y=(await i.sigv4aSigningRegionSet?.()??f??[l]).join(",");return await c.sign(t,{signingDate:zb(i.systemClockOffset),signingRegion:y,signingService:d})}}const WK=(e,t,n)=>{let r,i,c,l=!1;const f=async()=>{i||(i=e());try{r=await i,c=!0,l=!1}finally{i=void 0}return r};return async d=>((!c||d?.forceRefresh)&&(r=await f()),r)},JK=e=>(e.sigv4aSigningRegionSet=Zc(e.sigv4aSigningRegionSet),e),eZ="X-Amz-Algorithm",tZ="X-Amz-Credential",VM="X-Amz-Date",nZ="X-Amz-SignedHeaders",sZ="X-Amz-Expires",qM="X-Amz-Signature",GM="X-Amz-Security-Token",KM="authorization",ZM=VM.toLowerCase(),rZ="date",oZ=[KM,ZM,rZ],iZ=qM.toLowerCase(),Pv="x-amz-content-sha256",aZ=GM.toLowerCase(),cZ={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},lZ=/^proxy-/,uZ=/^sec-/,C0="AWS4-HMAC-SHA256",fZ="AWS4-HMAC-SHA256-PAYLOAD",dZ="UNSIGNED-PAYLOAD",hZ=50,QM="aws4_request",pZ=3600*24*7,xh={},T0=[],A0=(e,t,n)=>`${e}/${t}/${n}/${QM}`,mZ=async(e,t,n,r,i)=>{const c=await hT(e,t.secretAccessKey,t.accessKeyId),l=`${n}:${r}:${i}:${ms(c)}:${t.sessionToken}`;if(l in xh)return xh[l];for(T0.push(l);T0.length>hZ;)delete xh[T0.shift()];let f=`AWS4${t.secretAccessKey}`;for(const d of[n,r,i,QM])f=await hT(e,f,d);return xh[l]=f},hT=(e,t,n)=>{const r=new e(t);return r.update(df(n)),r.digest()},pT=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(e[i]==null)continue;const c=i.toLowerCase();(c in cZ||t?.has(c)||lZ.test(c)||uZ.test(c))&&(!n||n&&!n.has(c))||(r[c]=e[i].trim().replace(/\s+/g," "))}return r},gZ=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]",I0=async({headers:e,body:t},n)=>{for(const r of Object.keys(e))if(r.toLowerCase()===Pv)return e[r];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||gZ(t)){const r=new n;return r.update(df(t)),ms(await r.digest())}return dZ};class yZ{format(t){const n=[];for(const c of Object.keys(t)){const l=So(c);n.push(Uint8Array.from([l.byteLength]),l,this.formatHeaderValue(t[c]))}const r=new Uint8Array(n.reduce((c,l)=>c+l.byteLength,0));let i=0;for(const c of n)r.set(c,i),i+=c.byteLength;return r}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,3),n.setInt16(1,t.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,t.value,!1),new Uint8Array(r.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const c=new DataView(new ArrayBuffer(3+t.value.byteLength));c.setUint8(0,6),c.setUint16(1,t.value.byteLength,!1);const l=new Uint8Array(c.buffer);return l.set(t.value,3),l;case"string":const f=So(t.value),d=new DataView(new ArrayBuffer(3+f.byteLength));d.setUint8(0,7),d.setUint16(1,f.byteLength,!1);const h=new Uint8Array(d.buffer);return h.set(f,3),h;case"timestamp":const y=new Uint8Array(9);return y[0]=8,y.set(bZ.fromNumber(t.value.valueOf()).bytes,1),y;case"uuid":if(!vZ.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const g=new Uint8Array(17);return g[0]=9,g.set(yM(t.value.replace(/\-/g,"")),1),g}}}var mT;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(mT||(mT={}));const vZ=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let bZ=class YM{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,i=Math.abs(Math.round(t));r>-1&&i>0;r--,i/=256)n[r]=i;return t<0&&gT(n),new YM(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&gT(t),parseInt(ms(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}};function gT(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const SZ=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},_Z=(e,t={})=>{const{headers:n,query:r={}}=Mn.clone(e);for(const i of Object.keys(n)){const c=i.toLowerCase();(c.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(c)||t.hoistableHeaders?.has(c))&&(r[i]=n[i],delete n[i])}return{...e,headers:n,query:r}},yT=e=>{e=Mn.clone(e);for(const t of Object.keys(e.headers))oZ.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},wZ=({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===iZ)continue;const i=Aa(r);t.push(i);const c=e[r];typeof c=="string"?n[i]=`${i}=${Aa(c)}`:Array.isArray(c)&&(n[i]=c.slice(0).reduce((l,f)=>l.concat([`${i}=${Aa(f)}`]),[]).sort().join("&"))}return t.sort().map(r=>n[r]).filter(r=>r).join("&")},EZ=e=>xZ(e).toISOString().replace(/\.\d{3}Z$/,"Z"),xZ=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class RZ{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:n,region:r,service:i,sha256:c,uriEscapePath:l=!0}){this.service=i,this.sha256=c,this.uriEscapePath=l,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=Ns(r),this.credentialProvider=Ns(n)}createCanonicalRequest(t,n,r){const i=Object.keys(n).sort();return`${t.method} +`),HG={warn:console.warn},FG=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Ov=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function mp(e){const t=e.getUTCFullYear(),n=e.getUTCMonth(),r=e.getUTCDay(),i=e.getUTCDate(),c=e.getUTCHours(),l=e.getUTCMinutes(),f=e.getUTCSeconds(),d=i<10?`0${i}`:`${i}`,h=c<10?`0${c}`:`${c}`,y=l<10?`0${l}`:`${l}`,g=f<10?`0${f}`:`${f}`;return`${FG[r]}, ${d} ${Ov[n]} ${t} ${h}:${y}:${g} GMT`}const VG=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),qG=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),GG=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),hbe=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=VG.exec(e);if(t){const[n,r,i,c,l,f,d,h]=t;return E0(kb(gp(c)),x0(i),Xc(r,"day",1,31),{hours:l,minutes:f,seconds:d,fractionalMilliseconds:h})}if(t=qG.exec(e),t){const[n,r,i,c,l,f,d,h]=t;return QG(E0(KG(c),x0(i),Xc(r,"day",1,31),{hours:l,minutes:f,seconds:d,fractionalMilliseconds:h}))}if(t=GG.exec(e),t){const[n,r,i,c,l,f,d,h]=t;return E0(kb(gp(h)),x0(r),Xc(i.trimLeft(),"day",1,31),{hours:c,minutes:l,seconds:f,fractionalMilliseconds:d})}throw new TypeError("Invalid RFC-7231 date-time value")},E0=(e,t,n,r)=>{const i=t-1;return XG(e,i,n),new Date(Date.UTC(e,i,n,Xc(r.hours,"hour",0,23),Xc(r.minutes,"minute",0,59),Xc(r.seconds,"seconds",0,60),JG(r.fractionalMilliseconds)))},KG=e=>{const t=new Date().getUTCFullYear(),n=Math.floor(t/100)*100+kb(gp(e));return ne.getTime()-new Date().getTime()>ZG?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,x0=e=>{const t=Ov.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},YG=[31,28,31,30,31,30,31,31,30,31,30,31],XG=(e,t,n)=>{let r=YG[t];if(t===1&&WG(e)&&(r=29),n>r)throw new TypeError(`Invalid day for ${Ov[t]} in ${e}: ${n}`)},WG=e=>e%4===0&&(e%100!==0||e%400===0),Xc=(e,t,n,r)=>{const i=UG(gp(e));if(ir)throw new TypeError(`${t} must be between ${n} and ${r}, inclusive`);return i},JG=e=>e==null?0:BG("0."+e)*1e3,gp=e=>{let t=0;for(;tt.toString(16).padStart(2,"0")),Xp=()=>{if(aT)return aT();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,Qn[e[0]]+Qn[e[1]]+Qn[e[2]]+Qn[e[3]]+"-"+Qn[e[4]]+Qn[e[5]]+"-"+Qn[e[6]]+Qn[e[7]]+"-"+Qn[e[8]]+Qn[e[9]]+"-"+Qn[e[10]]+Qn[e[11]]+Qn[e[12]]+Qn[e[13]]+Qn[e[14]]+Qn[e[15]]},Ri=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};Ri.from=e=>e&&typeof e=="object"&&(e instanceof Ri||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?Ri(String(e)):Ri(JSON.stringify(e));Ri.fromObject=Ri.from;function eK(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}const Mv="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",Dv="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",kv="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",wM="(\\d?\\d)",EM="(\\d{4})",tK=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),nK=new RegExp(`^${Mv}, ${wM} ${Dv} ${EM} ${kv} GMT$`),sK=new RegExp(`^${Mv}, ${wM}-${Dv}-(\\d\\d) ${kv} GMT$`),rK=new RegExp(`^${Mv} ${Dv} ( [1-9]|\\d\\d) ${kv} ${EM}$`),oK=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],iK=e=>{if(e==null)return;let t=NaN;if(typeof e=="number")t=e;else if(typeof e=="string"){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else typeof e=="object"&&e.tag===1&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1e3))},aK=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");const t=tK.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,n,r,i,c,l,f,,d,h]=t;ho(r,1,12),ho(i,1,31),ho(c,0,23),ho(l,0,59),ho(f,0,60);const y=new Date(Date.UTC(Number(n),Number(r)-1,Number(i),Number(c),Number(l),Number(f),Number(d)?Math.round(parseFloat(`0.${d}`)*1e3):0));if(y.setUTCFullYear(Number(n)),h.toUpperCase()!="Z"){const[,g,b,v]=/([+-])(\d\d):(\d\d)/.exec(h)||[void 0,"+",0,0],_=g==="-"?1:-1;y.setTime(y.getTime()+_*(Number(b)*60*60*1e3+Number(v)*60*1e3))}return y},cK=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,n,r,i,c,l,f,d;if((d=nK.exec(e))?[,t,n,r,i,c,l,f]=d:(d=sK.exec(e))?([,t,n,r,i,c,l,f]=d,r=(Number(r)+1900).toString()):(d=rK.exec(e))&&([,n,t,i,c,l,f,r]=d),r&&l){const h=Date.UTC(Number(r),oK.indexOf(n),Number(t),Number(i),Number(c),Number(l),f?Math.round(parseFloat(`0.${f}`)*1e3):0);ho(t,1,31),ho(i,0,23),ho(c,0,59),ho(l,0,60);const y=new Date(h);return y.setUTCFullYear(Number(r)),y}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)};function ho(e,t,n){const r=Number(e);if(rn)throw new Error(`Value ${r} out of range [${t}, ${n}]`)}function lK(e,t,n){if(!Number.isInteger(n))throw new Error("Invalid number of delimiters ("+n+") for splitEvery.");const r=e.split(t),i=[];let c="";for(let l=0;l{const t=e.length,n=[];let r=!1,i,c=0;for(let l=0;l{l=l.trim();const f=l.length;return f<2?l:(l[0]==='"'&&l[f-1]==='"'&&(l=l.slice(1,f-1)),l.replace(/\\"/g,'"'))})},cT=/^-?\d*(\.\d+)?$/;class Cf{string;type;constructor(t,n){if(this.string=t,this.type=n,!cT.test(t))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](t){if(!t||typeof t!="object")return!1;const n=t;return Cf.prototype.isPrototypeOf(t)||n.type==="bigDecimal"&&cT.test(n.string)}}const uK="modulepreload",fK=function(e){return"/"+e},lT={},Wt=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let d=function(h){return Promise.all(h.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),f=l?.nonce||l?.getAttribute("nonce");i=d(n.map(h=>{if(h=fK(h),h in lT)return;lT[h]=!0;const y=h.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":uK,y||(b.as="script"),b.crossOrigin="",b.href=h,f&&b.setAttribute("nonce",f),document.head.appendChild(b),y)return new Promise((v,_)=>{b.addEventListener("load",v),b.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${h}`)))})}))}function c(l){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=l,window.dispatchEvent(f),!f.defaultPrevented)throw l}return i.then(l=>{for(const f of l||[])f.status==="rejected"&&c(f.reason);return t().catch(c)})};class Wp{serdeContext;setSerdeContext(t){this.serdeContext=t}}class RM extends Wp{options;constructor(t){super(),this.options=t}getRequestType(){return Mn}getResponseType(){return Pa}setSerdeContext(t){this.serdeContext=t,this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(t)}updateServiceEndpoint(t,n){if("url"in n){t.protocol=n.url.protocol,t.hostname=n.url.hostname,t.port=n.url.port?Number(n.url.port):void 0,t.path=n.url.pathname,t.fragment=n.url.hash||void 0,t.username=n.url.username||void 0,t.password=n.url.password||void 0,t.query||(t.query={});for(const[r,i]of n.url.searchParams.entries())t.query[r]=i;return t}else return t.protocol=n.protocol,t.hostname=n.hostname,t.port=n.port?Number(n.port):void 0,t.path=n.path,t.query={...n.query},t}setHostPrefix(t,n,r){if(this.serdeContext?.disableHostPrefix)return;const i=wt.of(n.input),c=Fc(n.traits??{});if(c.endpoint){let l=c.endpoint?.[0];if(typeof l=="string"){const f=[...i.structIterator()].filter(([,d])=>d.getMergedTraits().hostLabel);for(const[d]of f){const h=r[d];if(typeof h!="string")throw new Error(`@smithy/core/schema - ${d} in input must be a string as hostLabel.`);l=l.replace(`{${d}}`,h)}t.hostname=l+t.hostname}}}deserializeMetadata(t){return{httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:t,requestSchema:n,initialRequest:r}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:t,requestSchema:n,initialRequest:r})}async deserializeEventStream({response:t,responseSchema:n,initialResponseContainer:r}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:t,responseSchema:n,initialResponseContainer:r})}async loadEventStreamCapability(){const{EventStreamSerde:t}=await Wt(async()=>{const{EventStreamSerde:n}=await import("./index2.js");return{EventStreamSerde:n}},[]);return new t({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(t,n,r,i,c){return[]}getEventStreamMarshaller(){const t=this.serdeContext;if(!t.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return t.eventStreamMarshaller}}class dK extends RM{async serializeRequest(t,n,r){const i={...n??{}},c=this.serializer,l={},f={},d=await r.endpoint(),h=wt.of(t?.input),y=h.getSchema();let g=!1,b;const v=new Mn({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:l,headers:f,body:void 0});if(d){this.updateServiceEndpoint(v,d),this.setHostPrefix(v,t,i);const _=Fc(t.traits);if(_.http){v.method=_.http[0];const[x,R]=_.http[1].split("?");v.path=="/"?v.path=x:v.path+=x;const C=new URLSearchParams(R??"");Object.assign(l,Object.fromEntries(C))}}for(const[_,x]of h.structIterator()){const R=x.getMergedTraits()??{},C=i[_];if(C==null&&!x.isIdempotencyToken()){if(R.httpLabel&&(v.path.includes(`{${_}+}`)||v.path.includes(`{${_}}`)))throw new Error(`No value provided for input HTTP label: ${_}.`);continue}if(R.httpPayload)x.isStreaming()?x.isStructSchema()?i[_]&&(b=await this.serializeEventStream({eventStream:i[_],requestSchema:h})):b=C:(c.write(x,C),b=c.flush()),delete i[_];else if(R.httpLabel){c.write(x,C);const A=c.flush();v.path.includes(`{${_}+}`)?v.path=v.path.replace(`{${_}+}`,A.split("/").map(pp).join("/")):v.path.includes(`{${_}}`)&&(v.path=v.path.replace(`{${_}}`,pp(A))),delete i[_]}else if(R.httpHeader)c.write(x,C),f[R.httpHeader.toLowerCase()]=String(c.flush()),delete i[_];else if(typeof R.httpPrefixHeaders=="string"){for(const[A,O]of Object.entries(C)){const D=R.httpPrefixHeaders+A;c.write([x.getValueSchema(),{httpHeader:D}],O),f[D.toLowerCase()]=c.flush()}delete i[_]}else R.httpQuery||R.httpQueryParams?(this.serializeQuery(x,C,l),delete i[_]):g=!0}return g&&i&&(c.write(y,i),b=c.flush()),v.headers=f,v.query=l,v.body=b,v}serializeQuery(t,n,r){const i=this.serializer,c=t.getMergedTraits();if(c.httpQueryParams){for(const[l,f]of Object.entries(n))if(!(l in r)){const d=t.getValueSchema();Object.assign(d.getMergedTraits(),{...c,httpQuery:l,httpQueryParams:void 0}),this.serializeQuery(d,f,r)}return}if(t.isListSchema()){const l=!!t.getMergedTraits().sparse,f=[];for(const d of n){i.write([t.getValueSchema(),c],d);const h=i.flush();(l||h!==void 0)&&f.push(h)}r[c.httpQuery]=f}else i.write([t,c],n),r[c.httpQuery]=i.flush()}async deserializeResponse(t,n,r){const i=this.deserializer,c=wt.of(t.output),l={};if(r.statusCode>=300){const d=await xi(r.body,n);throw d.byteLength>0&&Object.assign(l,await i.read(15,d)),await this.handleError(t,n,r,l,this.deserializeMetadata(r)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const d in r.headers){const h=r.headers[d];delete r.headers[d],r.headers[d.toLowerCase()]=h}const f=await this.deserializeHttpMessage(c,n,r,l);if(f.length){const d=await xi(r.body,n);if(d.byteLength>0){const h=await i.read(c,d);for(const y of f)l[y]=h[y]}}else f.discardResponseBody&&await xi(r.body,n);return l.$metadata=this.deserializeMetadata(r),l}async deserializeHttpMessage(t,n,r,i,c){let l;i instanceof Set?l=c:l=i;let f=!0;const d=this.deserializer,h=wt.of(t),y=[];for(const[g,b]of h.structIterator()){const v=b.getMemberTraits();if(v.httpPayload){if(f=!1,b.isStreaming())b.isStructSchema()?l[g]=await this.deserializeEventStream({response:r,responseSchema:h}):l[g]=bM(r.body);else if(r.body){const x=await xi(r.body,n);x.byteLength>0&&(l[g]=await d.read(b,x))}}else if(v.httpHeader){const _=String(v.httpHeader).toLowerCase(),x=r.headers[_];if(x!=null)if(b.isListSchema()){const R=b.getValueSchema();R.getMergedTraits().httpHeader=_;let C;R.isTimestampSchema()&&R.getSchema()===4?C=lK(x,",",2):C=xM(x);const A=[];for(const O of C)A.push(await d.read(R,O.trim()));l[g]=A}else l[g]=await d.read(b,x)}else if(v.httpPrefixHeaders!==void 0){l[g]={};for(const[_,x]of Object.entries(r.headers))if(_.startsWith(v.httpPrefixHeaders)){const R=b.getValueSchema();R.getMergedTraits().httpHeader=_,l[g][_.slice(v.httpPrefixHeaders.length)]=await d.read(R,x)}}else v.httpResponseCode?l[g]=r.statusCode:y.push(g)}return y.discardResponseBody=f,y}}class hK extends RM{async serializeRequest(t,n,r){const i=this.serializer,c={},l={},f=await r.endpoint(),d=wt.of(t?.input),h=d.getSchema();let y;const g=new Mn({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:c,headers:l,body:void 0});f&&(this.updateServiceEndpoint(g,f),this.setHostPrefix(g,t,n));const b={...n};if(n){const v=d.getEventStreamMember();if(v){if(b[v]){const _={};for(const[x,R]of d.structIterator())x!==v&&b[x]&&(i.write(R,b[x]),_[x]=i.flush());y=await this.serializeEventStream({eventStream:b[v],requestSchema:d,initialRequest:_})}}else i.write(h,b),y=i.flush()}return g.headers=l,g.query=c,g.body=y,g.method="POST",g}async deserializeResponse(t,n,r){const i=this.deserializer,c=wt.of(t.output),l={};if(r.statusCode>=300){const d=await xi(r.body,n);throw d.byteLength>0&&Object.assign(l,await i.read(15,d)),await this.handleError(t,n,r,l,this.deserializeMetadata(r)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const d in r.headers){const h=r.headers[d];delete r.headers[d],r.headers[d.toLowerCase()]=h}const f=c.getEventStreamMember();if(f)l[f]=await this.deserializeEventStream({response:r,responseSchema:c,initialResponseContainer:l});else{const d=await xi(r.body,n);d.byteLength>0&&Object.assign(l,await i.read(c,d))}return l.$metadata=this.deserializeMetadata(r),l}}function Jp(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7))return e.getSchema();const{httpLabel:n,httpPrefixHeaders:r,httpHeader:i,httpQuery:c}=e.getMergedTraits();return(t.httpBindings?typeof r=="string"||i?6:c||n?5:void 0:void 0)??t.timestampFormat.default}class CM extends Wp{settings;constructor(t){super(),this.settings=t}read(t,n){const r=wt.of(t);if(r.isListSchema())return xM(n).map(i=>this.read(r.getValueSchema(),i));if(r.isBlobSchema())return(this.serdeContext?.base64Decoder??Na)(n);if(r.isTimestampSchema())switch(Jp(r,this.settings)){case 5:return aK(n);case 6:return cK(n);case 7:return iK(n);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",n),new Date(n)}if(r.isStringSchema()){const i=r.getMergedTraits().mediaType;let c=n;if(i)return r.getMergedTraits().httpHeader&&(c=this.base64ToUtf8(c)),(i==="application/json"||i.endsWith("+json"))&&(c=Ri.from(c)),c}return r.isNumericSchema()?Number(n):r.isBigIntegerSchema()?BigInt(n):r.isBigDecimalSchema()?new Cf(n,"bigDecimal"):r.isBooleanSchema()?String(n).toLowerCase()==="true":n}base64ToUtf8(t){return(this.serdeContext?.utf8Encoder??Ha)((this.serdeContext?.base64Decoder??Na)(t))}}class pK extends Wp{codecDeserializer;stringDeserializer;constructor(t,n){super(),this.codecDeserializer=t,this.stringDeserializer=new CM(n)}setSerdeContext(t){this.stringDeserializer.setSerdeContext(t),this.codecDeserializer.setSerdeContext(t),this.serdeContext=t}read(t,n){const r=wt.of(t),i=r.getMergedTraits(),c=this.serdeContext?.utf8Encoder??Ha;if(i.httpHeader||i.httpResponseCode)return this.stringDeserializer.read(r,c(n));if(i.httpPayload){if(r.isBlobSchema()){const l=this.serdeContext?.utf8Decoder??So;return typeof n=="string"?l(n):n}else if(r.isStringSchema())return"byteLength"in n?c(n):n}return this.codecDeserializer.read(r,n)}}class mK extends Wp{settings;stringBuffer="";constructor(t){super(),this.settings=t}write(t,n){const r=wt.of(t);switch(typeof n){case"object":if(n===null){this.stringBuffer="null";return}if(r.isTimestampSchema()){if(!(n instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${n} when schema expected Date in ${r.getName(!0)}`);switch(Jp(r,this.settings)){case 5:this.stringBuffer=n.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=mp(n);break;case 7:this.stringBuffer=String(n.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",n),this.stringBuffer=String(n.getTime()/1e3)}return}if(r.isBlobSchema()&&"byteLength"in n){this.stringBuffer=(this.serdeContext?.base64Encoder??Mi)(n);return}if(r.isListSchema()&&Array.isArray(n)){let l="";for(const f of n){this.write([r.getValueSchema(),r.getMergedTraits()],f);const d=this.flush(),h=r.getValueSchema().isTimestampSchema()?d:eK(d);l!==""&&(l+=", "),l+=h}this.stringBuffer=l;return}this.stringBuffer=JSON.stringify(n,null,2);break;case"string":const i=r.getMergedTraits().mediaType;let c=n;if(i&&((i==="application/json"||i.endsWith("+json"))&&(c=Ri.from(c)),r.getMergedTraits().httpHeader)){this.stringBuffer=(this.serdeContext?.base64Encoder??Mi)(c.toString());return}this.stringBuffer=n;break;default:r.isIdempotencyToken()?this.stringBuffer=Xp():this.stringBuffer=String(n)}}flush(){const t=this.stringBuffer;return this.stringBuffer="",t}}class gK{codecSerializer;stringSerializer;buffer;constructor(t,n,r=new mK(n)){this.codecSerializer=t,this.stringSerializer=r}setSerdeContext(t){this.codecSerializer.setSerdeContext(t),this.stringSerializer.setSerdeContext(t)}write(t,n){const r=wt.of(t),i=r.getMergedTraits();if(i.httpHeader||i.httpLabel||i.httpQuery){this.stringSerializer.write(r,n),this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(r,n)}flush(){if(this.buffer!==void 0){const t=this.buffer;return this.buffer=void 0,t}return this.codecSerializer.flush()}}function yK(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}class TM{authSchemes=new Map;constructor(t){for(const[n,r]of Object.entries(t))r!==void 0&&this.authSchemes.set(n,r)}getIdentityProvider(t){return this.authSchemes.get(t)}}const bK=e=>function(n){return AM(n)&&n.expiration.getTime()-Date.now()e.expiration!==void 0,_K=(e,t,n)=>{if(e===void 0)return;const r=typeof e!="function"?async()=>Promise.resolve(e):e;let i,c,l,f=!1;const d=async h=>{c||(c=r(h));try{i=await c,l=!0,f=!1}finally{c=void 0}return i};return t===void 0?async h=>((!l||h?.forceRefresh)&&(i=await d(h)),i):async h=>((!l||h?.forceRefresh)&&(i=await d(h)),f?i:n(i)?(t(i)&&await d(h),i):(f=!0,i))},wK=void 0;function EK(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function IM(e){const t=Qc(e.userAgentAppId??wK),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:typeof n=="string"?[[n]]:n,userAgentAppId:async()=>{const r=await t();if(!EK(r)){const i=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof r!="string"?i?.warn("userAgentAppId must be a string or undefined."):r.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}class OM{capacity;data=new Map;parameters=[];constructor({size:t,params:n}){this.capacity=t??50,n&&(this.parameters=n)}get(t,n){const r=this.hash(t);if(r===!1)return n();if(!this.data.has(r)){if(this.data.size>this.capacity+10){const i=this.data.keys();let c=0;for(;;){const{value:l,done:f}=i.next();if(this.data.delete(l),f||++c>10)break}}this.data.set(r,n())}return this.data.get(r)}size(){return this.data.size}hash(t){let n="";const{parameters:r}=this;if(r.length===0)return!1;for(const i of r){const c=String(t[i]??"");if(c.includes("|;"))return!1;n+=c+"|;"}return n}}const xK=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),MM=e=>xK.test(e)||e.startsWith("[")&&e.endsWith("]"),RK=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),em=(e,t=!1)=>{if(!t)return RK.test(e);const n=e.split(".");for(const r of n)if(!em(r))return!1;return!0},hf={},pf="endpoints";function Di(e){return typeof e!="object"||e==null?e:"ref"in e?`$${Di(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Di).join(", ")})`:JSON.stringify(e,null,2)}class Ls extends Error{constructor(t){super(t),this.name="EndpointError"}}const CK=(e,t)=>e===t,TK=e=>{const t=e.split("."),n=[];for(const r of t){const i=r.indexOf("[");if(i!==-1){if(r.indexOf("]")!==r.length-1)throw new Ls(`Path: '${e}' does not end with ']'`);const c=r.slice(i+1,-1);if(Number.isNaN(parseInt(c)))throw new Ls(`Invalid array index: '${c}' in path: '${e}'`);i!==0&&n.push(r.slice(0,i)),n.push(c)}else n.push(r)}return n},DM=(e,t)=>TK(t).reduce((n,r)=>{if(typeof n!="object")throw new Ls(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),AK=e=>e!=null,IK=e=>!e,R0={[ff.HTTP]:80,[ff.HTTPS]:443},OK=e=>{const t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){const{hostname:b,port:v,protocol:_="",path:x="",query:R={}}=e,C=new URL(`${_}//${b}${v?`:${v}`:""}${x}`);return C.search=Object.entries(R).map(([A,O])=>`${A}=${O}`).join("&"),C}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:c,protocol:l,search:f}=t;if(f)return null;const d=l.slice(0,-1);if(!Object.values(ff).includes(d))return null;const h=MM(i),y=n.includes(`${r}:${R0[d]}`)||typeof e=="string"&&e.includes(`${r}:${R0[d]}`),g=`${r}${y?`:${R0[d]}`:""}`;return{scheme:d,authority:g,path:c,normalizedPath:c.endsWith("/")?c:`${c}/`,isIp:h}},MK=(e,t)=>e===t,DK=(e,t,n,r)=>t>=n||e.lengthencodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),PK={booleanEquals:CK,getAttr:DM,isSet:AK,isValidHostLabel:em,not:IK,parseURL:OK,stringEquals:MK,substring:DK,uriEncode:kK},kM=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i({...t.endpointParams,...t.referenceRecord})[e],tm=(e,t,n)=>{if(typeof e=="string")return kM(e,n);if(e.fn)return NM.callFunction(e,n);if(e.ref)return NK(e,n);throw new Ls(`'${t}': ${String(e)} is not a string, function or reference.`)},PM=({fn:e,argv:t},n)=>{const r=t.map(c=>["boolean","number"].includes(typeof c)?c:NM.evaluateExpression(c,"arg",n)),i=e.split(".");return i[0]in hf&&i[1]!=null?hf[i[0]][i[1]](...r):PK[e](...r)},NM={evaluateExpression:tm,callFunction:PM},zK=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new Ls(`'${e}' is already defined in Reference Record.`);const r=PM(t,n);return n.logger?.debug?.(`${pf} evaluateCondition: ${Di(t)} = ${Di(r)}`),{result:r===""?!0:!!r,...e!=null&&{toAssign:{name:e,value:r}}}},Pv=(e=[],t)=>{const n={};for(const r of e){const{result:i,toAssign:c}=zK(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!i)return{result:i};c&&(n[c.name]=c.value,t.logger?.debug?.(`${pf} assign: ${c.name} := ${Di(c.value)}`))}return{result:!0,referenceRecord:n}},LK=(e,t)=>Object.entries(e).reduce((n,[r,i])=>({...n,[r]:i.map(c=>{const l=tm(c,"Header value entry",t);if(typeof l!="string")throw new Ls(`Header '${r}' value '${l}' is not a string`);return l})}),{}),zM=(e,t)=>Object.entries(e).reduce((n,[r,i])=>({...n,[r]:BM.getEndpointProperty(i,t)}),{}),LM=(e,t)=>{if(Array.isArray(e))return e.map(n=>LM(n,t));switch(typeof e){case"string":return kM(e,t);case"object":if(e===null)throw new Ls(`Unexpected endpoint property: ${e}`);return BM.getEndpointProperties(e,t);case"boolean":return e;default:throw new Ls(`Unexpected endpoint property type: ${typeof e}`)}},BM={getEndpointProperty:LM,getEndpointProperties:zM},BK=(e,t)=>{const n=tm(e,"Endpoint URL",t);if(typeof n=="string")try{return new URL(n)}catch(r){throw console.error(`Failed to construct URL with ${n}`,r),r}throw new Ls(`Endpoint URL must be a string, got ${typeof n}`)},$K=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:c}=Pv(n,t);if(!i)return;const l={...t,referenceRecord:{...t.referenceRecord,...c}},{url:f,properties:d,headers:h}=r;return t.logger?.debug?.(`${pf} Resolving endpoint from template: ${Di(r)}`),{...h!=null&&{headers:LK(h,l)},...d!=null&&{properties:zM(d,l)},url:BK(f,l)}},UK=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:c}=Pv(n,t);if(i)throw new Ls(tm(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...c}}))},$M=(e,t)=>{for(const n of e)if(n.type==="endpoint"){const r=$K(n,t);if(r)return r}else if(n.type==="error")UK(n,t);else if(n.type==="tree"){const r=UM.evaluateTreeRule(n,t);if(r)return r}else throw new Ls(`Unknown endpoint rule: ${n}`);throw new Ls("Rules evaluation failed")},jK=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:c}=Pv(n,t);if(i)return UM.evaluateRules(r,{...t,referenceRecord:{...t.referenceRecord,...c}})},UM={evaluateRules:$M,evaluateTreeRule:jK},jM=(e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:c}=e;t.logger?.debug?.(`${pf} Initial EndpointParams: ${Di(n)}`);const l=Object.entries(i).filter(([,h])=>h.default!=null).map(([h,y])=>[h,y.default]);if(l.length>0)for(const[h,y]of l)n[h]=n[h]??y;const f=Object.entries(i).filter(([,h])=>h.required).map(([h])=>h);for(const h of f)if(n[h]==null)throw new Ls(`Missing required parameter: '${h}'`);const d=$M(c,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${pf} Resolved endpoint: ${Di(d)}`),d},HM=(e,t=!1)=>{if(t){for(const n of e.split("."))if(!HM(n))return!1;return!0}return!(!em(e)||e.length<3||e.length>63||e!==e.toLowerCase()||MM(e))},uT=":",HK="/",FK=e=>{const t=e.split(uT);if(t.length<6)return null;const[n,r,i,c,l,...f]=t;if(n!=="arn"||r===""||i===""||f.join(uT)==="")return null;const d=f.map(h=>h.split(HK)).flat();return{partition:r,service:i,region:c,accountId:l,resourceId:d}},VK=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],qK={partitions:VK};let GK=qK;const KK=e=>{const{partitions:t}=GK;for(const r of t){const{regions:i,outputs:c}=r;for(const[l,f]of Object.entries(i))if(l===e)return{...c,...f}}for(const r of t){const{regionRegex:i,outputs:c}=r;if(new RegExp(i).test(e))return{...c}}const n=t.find(r=>r.id==="aws");if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}},Nv={isVirtualHostableS3Bucket:HM,parseArn:FK,partition:KK};hf.aws=Nv;function ZK(e){const t={};if(e=e.replace(/^\?/,""),e)for(const n of e.split("&")){let[r,i=null]=n.split("=");r=decodeURIComponent(r),i&&(i=decodeURIComponent(i)),r in t?Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i}return t}const mf=e=>{if(typeof e=="string")return mf(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:c}=e;let l;return c&&(l=ZK(c)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:l}};function QK(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}function vr(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}const fT=e=>Pa.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,zv=e=>new Date(Date.now()+e),YK=(e,t)=>Math.abs(zv(t).getTime()-e)>=3e5,dT=(e,t)=>{const n=Date.parse(e);return YK(n,t)?n-Date.now():t},Qu=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},FM=async e=>{const t=Qu("context",e.context),n=Qu("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],c=await Qu("signer",n.signer)(r),l=e?.signingRegion,f=e?.signingRegionSet,d=e?.signingName;return{config:n,signer:c,signingRegion:l,signingRegionSet:f,signingName:d}};class Lv{async sign(t,n,r){if(!Mn.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await FM(r),{config:c,signer:l}=i;let{signingRegion:f,signingName:d}=i;const h=r.context;if(h?.authSchemes?.length??!1){const[g,b]=h.authSchemes;g?.name==="sigv4a"&&b?.name==="sigv4"&&(f=b?.signingRegion??f,d=b?.signingName??d)}return await l.sign(t,{signingDate:zv(c.systemClockOffset),signingRegion:f,signingService:d})}errorHandler(t){return n=>{const r=n.ServerTime??fT(n.$response);if(r){const i=Qu("config",t.config),c=i.systemClockOffset;i.systemClockOffset=dT(r,i.systemClockOffset),i.systemClockOffset!==c&&n.$metadata&&(n.$metadata.clockSkewCorrected=!0)}throw n}}successHandler(t,n){const r=fT(t);if(r){const i=Qu("config",n.config);i.systemClockOffset=dT(r,i.systemClockOffset)}}}class XK extends Lv{async sign(t,n,r){if(!Mn.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:i,signer:c,signingRegion:l,signingRegionSet:f,signingName:d}=await FM(r),y=(await i.sigv4aSigningRegionSet?.()??f??[l]).join(",");return await c.sign(t,{signingDate:zv(i.systemClockOffset),signingRegion:y,signingService:d})}}const WK=(e,t,n)=>{let r,i,c,l=!1;const f=async()=>{i||(i=e());try{r=await i,c=!0,l=!1}finally{i=void 0}return r};return async d=>((!c||d?.forceRefresh)&&(r=await f()),r)},JK=e=>(e.sigv4aSigningRegionSet=Qc(e.sigv4aSigningRegionSet),e),eZ="X-Amz-Algorithm",tZ="X-Amz-Credential",VM="X-Amz-Date",nZ="X-Amz-SignedHeaders",sZ="X-Amz-Expires",qM="X-Amz-Signature",GM="X-Amz-Security-Token",KM="authorization",ZM=VM.toLowerCase(),rZ="date",oZ=[KM,ZM,rZ],iZ=qM.toLowerCase(),Pb="x-amz-content-sha256",aZ=GM.toLowerCase(),cZ={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},lZ=/^proxy-/,uZ=/^sec-/,C0="AWS4-HMAC-SHA256",fZ="AWS4-HMAC-SHA256-PAYLOAD",dZ="UNSIGNED-PAYLOAD",hZ=50,QM="aws4_request",pZ=3600*24*7,xh={},T0=[],A0=(e,t,n)=>`${e}/${t}/${n}/${QM}`,mZ=async(e,t,n,r,i)=>{const c=await hT(e,t.secretAccessKey,t.accessKeyId),l=`${n}:${r}:${i}:${ms(c)}:${t.sessionToken}`;if(l in xh)return xh[l];for(T0.push(l);T0.length>hZ;)delete xh[T0.shift()];let f=`AWS4${t.secretAccessKey}`;for(const d of[n,r,i,QM])f=await hT(e,f,d);return xh[l]=f},hT=(e,t,n)=>{const r=new e(t);return r.update(df(n)),r.digest()},pT=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(e[i]==null)continue;const c=i.toLowerCase();(c in cZ||t?.has(c)||lZ.test(c)||uZ.test(c))&&(!n||n&&!n.has(c))||(r[c]=e[i].trim().replace(/\s+/g," "))}return r},gZ=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]",I0=async({headers:e,body:t},n)=>{for(const r of Object.keys(e))if(r.toLowerCase()===Pb)return e[r];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||gZ(t)){const r=new n;return r.update(df(t)),ms(await r.digest())}return dZ};class yZ{format(t){const n=[];for(const c of Object.keys(t)){const l=So(c);n.push(Uint8Array.from([l.byteLength]),l,this.formatHeaderValue(t[c]))}const r=new Uint8Array(n.reduce((c,l)=>c+l.byteLength,0));let i=0;for(const c of n)r.set(c,i),i+=c.byteLength;return r}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,3),n.setInt16(1,t.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,t.value,!1),new Uint8Array(r.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const c=new DataView(new ArrayBuffer(3+t.value.byteLength));c.setUint8(0,6),c.setUint16(1,t.value.byteLength,!1);const l=new Uint8Array(c.buffer);return l.set(t.value,3),l;case"string":const f=So(t.value),d=new DataView(new ArrayBuffer(3+f.byteLength));d.setUint8(0,7),d.setUint16(1,f.byteLength,!1);const h=new Uint8Array(d.buffer);return h.set(f,3),h;case"timestamp":const y=new Uint8Array(9);return y[0]=8,y.set(vZ.fromNumber(t.value.valueOf()).bytes,1),y;case"uuid":if(!bZ.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const g=new Uint8Array(17);return g[0]=9,g.set(yM(t.value.replace(/\-/g,"")),1),g}}}var mT;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(mT||(mT={}));const bZ=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let vZ=class YM{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,i=Math.abs(Math.round(t));r>-1&&i>0;r--,i/=256)n[r]=i;return t<0&&gT(n),new YM(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&gT(t),parseInt(ms(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}};function gT(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const SZ=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},_Z=(e,t={})=>{const{headers:n,query:r={}}=Mn.clone(e);for(const i of Object.keys(n)){const c=i.toLowerCase();(c.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(c)||t.hoistableHeaders?.has(c))&&(r[i]=n[i],delete n[i])}return{...e,headers:n,query:r}},yT=e=>{e=Mn.clone(e);for(const t of Object.keys(e.headers))oZ.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},wZ=({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===iZ)continue;const i=Aa(r);t.push(i);const c=e[r];typeof c=="string"?n[i]=`${i}=${Aa(c)}`:Array.isArray(c)&&(n[i]=c.slice(0).reduce((l,f)=>l.concat([`${i}=${Aa(f)}`]),[]).sort().join("&"))}return t.sort().map(r=>n[r]).filter(r=>r).join("&")},EZ=e=>xZ(e).toISOString().replace(/\.\d{3}Z$/,"Z"),xZ=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class RZ{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:n,region:r,service:i,sha256:c,uriEscapePath:l=!0}){this.service=i,this.sha256=c,this.uriEscapePath=l,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=Ns(r),this.credentialProvider=Ns(n)}createCanonicalRequest(t,n,r){const i=Object.keys(n).sort();return`${t.method} ${this.getCanonicalPath(t)} ${wZ(t)} ${i.map(c=>`${c}:${n[c]}`).join(` @@ -76,6 +76,6 @@ ${i.join(";")} ${r}`}async createStringToSign(t,n,r,i){const c=new this.sha256;c.update(df(r));const l=await c.digest();return`${i} ${t} ${n} -${ms(l)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){const n=[];for(const c of t.split("/"))c?.length!==0&&c!=="."&&(c===".."?n.pop():n.push(c));const r=`${t?.startsWith("/")?"/":""}${n.join("/")}${n.length>0&&t?.endsWith("/")?"/":""}`;return Aa(r).replace(/%2F/g,"/")}return t}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(t){const n=EZ(t).replace(/[\-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}class Nv extends RZ{headerFormatter=new yZ;constructor({applyChecksum:t,credentials:n,region:r,service:i,sha256:c,uriEscapePath:l=!0}){super({applyChecksum:t,credentials:n,region:r,service:i,sha256:c,uriEscapePath:l})}async presign(t,n={}){const{signingDate:r=new Date,expiresIn:i=3600,unsignableHeaders:c,unhoistableHeaders:l,signableHeaders:f,hoistableHeaders:d,signingRegion:h,signingService:y}=n,g=await this.credentialProvider();this.validateResolvedCredentials(g);const v=h??await this.regionProvider(),{longDate:b,shortDate:_}=this.formatDate(r);if(i>pZ)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const x=A0(_,v,y??this.service),R=_Z(yT(t),{unhoistableHeaders:l,hoistableHeaders:d});g.sessionToken&&(R.query[GM]=g.sessionToken),R.query[eZ]=C0,R.query[tZ]=`${g.accessKeyId}/${x}`,R.query[VM]=b,R.query[sZ]=i.toString(10);const C=pT(R,c,f);return R.query[nZ]=this.getCanonicalHeaderList(C),R.query[qM]=await this.getSignature(b,x,this.getSigningKey(g,v,_,y),this.createCanonicalRequest(R,C,await I0(t,this.sha256))),R}async sign(t,n){return typeof t=="string"?this.signString(t,n):t.headers&&t.payload?this.signEvent(t,n):t.message?this.signMessage(t,n):this.signRequest(t,n)}async signEvent({headers:t,payload:n},{signingDate:r=new Date,priorSignature:i,signingRegion:c,signingService:l}){const f=c??await this.regionProvider(),{shortDate:d,longDate:h}=this.formatDate(r),y=A0(d,f,l??this.service),g=await I0({headers:{},body:n},this.sha256),v=new this.sha256;v.update(t);const b=ms(await v.digest()),_=[fZ,h,y,i,b,g].join(` -`);return this.signString(_,{signingDate:r,signingRegion:f,signingService:l})}async signMessage(t,{signingDate:n=new Date,signingRegion:r,signingService:i}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:n,signingRegion:r,signingService:i,priorSignature:t.priorSignature}).then(l=>({message:t.message,signature:l}))}async signString(t,{signingDate:n=new Date,signingRegion:r,signingService:i}={}){const c=await this.credentialProvider();this.validateResolvedCredentials(c);const l=r??await this.regionProvider(),{shortDate:f}=this.formatDate(n),d=new this.sha256(await this.getSigningKey(c,l,f,i));return d.update(df(t)),ms(await d.digest())}async signRequest(t,{signingDate:n=new Date,signableHeaders:r,unsignableHeaders:i,signingRegion:c,signingService:l}={}){const f=await this.credentialProvider();this.validateResolvedCredentials(f);const d=c??await this.regionProvider(),h=yT(t),{longDate:y,shortDate:g}=this.formatDate(n),v=A0(g,d,l??this.service);h.headers[ZM]=y,f.sessionToken&&(h.headers[aZ]=f.sessionToken);const b=await I0(h,this.sha256);!SZ(Pv,h.headers)&&this.applyChecksum&&(h.headers[Pv]=b);const _=pT(h,i,r),x=await this.getSignature(y,v,this.getSigningKey(f,d,g,l),this.createCanonicalRequest(h,_,b));return h.headers[KM]=`${C0} Credential=${f.accessKeyId}/${v}, SignedHeaders=${this.getCanonicalHeaderList(_)}, Signature=${x}`,h}async getSignature(t,n,r,i){const c=await this.createStringToSign(t,n,i,C0),l=new this.sha256(await r);return l.update(df(c)),ms(await l.digest())}getSigningKey(t,n,r,i){return mZ(this.sha256,t,r,n,i||this.service)}}const XM=e=>{let t=e.credentials,n=!!e.credentials,r;Object.defineProperty(e,"credentials",{set(h){h&&h!==t&&h!==r&&(n=!0),t=h;const y=CZ(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),g=TZ(e,y);if(n&&!g.attributed){const v=typeof t=="object"&&t!==null;r=async b=>{const x=await g(b);return v&&(!x.$source||Object.keys(x.$source).length===0)?QK(x,"CREDENTIALS_CODE","e"):x},r.memoized=g.memoized,r.configBound=g.configBound,r.attributed=!0}else r=g},get(){return r},enumerable:!0,configurable:!0}),e.credentials=t;const{signingEscapePath:i=!0,systemClockOffset:c=e.systemClockOffset||0,sha256:l}=e;let f;return e.signer?f=Zc(e.signer):e.regionInfoProvider?f=()=>Zc(e.region)().then(async h=>[await e.regionInfoProvider(h,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},h]).then(([h,y])=>{const{signingRegion:g,signingService:v}=h;e.signingRegion=e.signingRegion||g||y,e.signingName=e.signingName||v||e.serviceId;const b={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:l,uriEscapePath:i},_=e.signerConstructor||Nv;return new _(b)}):f=async h=>{h=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await Zc(e.region)(),properties:{}},h);const y=h.signingRegion,g=h.signingName;e.signingRegion=e.signingRegion||y,e.signingName=e.signingName||g||e.serviceId;const v={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:l,uriEscapePath:i},b=e.signerConstructor||Nv;return new b(v)},Object.assign(e,{systemClockOffset:c,signingEscapePath:i,signer:f})};function CZ(e,{credentials:t,credentialDefaultProvider:n}){let r;return t?t?.memoized?r=t:r=_K(t,SK,AM):n?r=Zc(n(Object.assign({},e,{parentClientConfig:e}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function TZ(e,t){if(t.configBound)return t;const n=async r=>t({...r,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}const vT=typeof TextEncoder=="function"?new TextEncoder:null,WM=e=>{if(typeof e=="string"){if(vT)return vT.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}else{if(typeof e.byteLength=="number")return e.byteLength;if(typeof e.size=="number")return e.size}throw new Error(`Body Length computation failed for ${e}`)},va=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const r of t)n.push(r);return n},mi=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,yp=()=>{let e=[],t=[],n=!1;const r=new Set,i=g=>g.sort((v,b)=>bT[b.step]-bT[v.step]||ST[b.priority||"normal"]-ST[v.priority||"normal"]),c=g=>{let v=!1;const b=_=>{const x=va(_.name,_.aliases);if(x.includes(g)){v=!0;for(const R of x)r.delete(R);return!1}return!0};return e=e.filter(b),t=t.filter(b),v},l=g=>{let v=!1;const b=_=>{if(_.middleware===g){v=!0;for(const x of va(_.name,_.aliases))r.delete(x);return!1}return!0};return e=e.filter(b),t=t.filter(b),v},f=g=>(e.forEach(v=>{g.add(v.middleware,{...v})}),t.forEach(v=>{g.addRelativeTo(v.middleware,{...v})}),g.identifyOnResolve?.(y.identifyOnResolve()),g),d=g=>{const v=[];return g.before.forEach(b=>{b.before.length===0&&b.after.length===0?v.push(b):v.push(...d(b))}),v.push(g),g.after.reverse().forEach(b=>{b.before.length===0&&b.after.length===0?v.push(b):v.push(...d(b))}),v},h=(g=!1)=>{const v=[],b=[],_={};return e.forEach(R=>{const C={...R,before:[],after:[]};for(const A of va(C.name,C.aliases))_[A]=C;v.push(C)}),t.forEach(R=>{const C={...R,before:[],after:[]};for(const A of va(C.name,C.aliases))_[A]=C;b.push(C)}),b.forEach(R=>{if(R.toMiddleware){const C=_[R.toMiddleware];if(C===void 0){if(g)return;throw new Error(`${R.toMiddleware} is not found when adding ${mi(R.name,R.aliases)} middleware ${R.relation} ${R.toMiddleware}`)}R.relation==="after"&&C.after.push(R),R.relation==="before"&&C.before.push(R)}}),i(v).map(d).reduce((R,C)=>(R.push(...C),R),[])},y={add:(g,v={})=>{const{name:b,override:_,aliases:x}=v,R={step:"initialize",priority:"normal",middleware:g,...v},C=va(b,x);if(C.length>0){if(C.some(A=>r.has(A))){if(!_)throw new Error(`Duplicate middleware name '${mi(b,x)}'`);for(const A of C){const O=e.findIndex(N=>N.name===A||N.aliases?.some(j=>j===A));if(O===-1)continue;const D=e[O];if(D.step!==R.step||R.priority!==D.priority)throw new Error(`"${mi(D.name,D.aliases)}" middleware with ${D.priority} priority in ${D.step} step cannot be overridden by "${mi(b,x)}" middleware with ${R.priority} priority in ${R.step} step.`);e.splice(O,1)}}for(const A of C)r.add(A)}e.push(R)},addRelativeTo:(g,v)=>{const{name:b,override:_,aliases:x}=v,R={middleware:g,...v},C=va(b,x);if(C.length>0){if(C.some(A=>r.has(A))){if(!_)throw new Error(`Duplicate middleware name '${mi(b,x)}'`);for(const A of C){const O=t.findIndex(N=>N.name===A||N.aliases?.some(j=>j===A));if(O===-1)continue;const D=t[O];if(D.toMiddleware!==R.toMiddleware||D.relation!==R.relation)throw new Error(`"${mi(D.name,D.aliases)}" middleware ${D.relation} "${D.toMiddleware}" middleware cannot be overridden by "${mi(b,x)}" middleware ${R.relation} "${R.toMiddleware}" middleware.`);t.splice(O,1)}}for(const A of C)r.add(A)}t.push(R)},clone:()=>f(yp()),use:g=>{g.applyToStack(y)},remove:g=>typeof g=="string"?c(g):l(g),removeByTag:g=>{let v=!1;const b=_=>{const{tags:x,name:R,aliases:C}=_;if(x&&x.includes(g)){const A=va(R,C);for(const O of A)r.delete(O);return v=!0,!1}return!0};return e=e.filter(b),t=t.filter(b),v},concat:g=>{const v=f(yp());return v.use(g),v.identifyOnResolve(n||v.identifyOnResolve()||(g.identifyOnResolve?.()??!1)),v},applyToStack:f,identify:()=>h(!0).map(g=>{const v=g.step??g.relation+" "+g.toMiddleware;return mi(g.name,g.aliases)+" - "+v}),identifyOnResolve(g){return typeof g=="boolean"&&(n=g),n},resolve:(g,v)=>{for(const b of h().map(_=>_.middleware).reverse())g=b(g,v);return n&&console.log(y.identify()),g}};return y},bT={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},ST={high:3,normal:2,low:1};class JM{config;middlewareStack=yp();initConfig;handlers;constructor(t){this.config=t;const{protocol:n,protocolSettings:r}=t;r&&typeof n=="function"&&(t.protocol=new n(r))}send(t,n,r){const i=typeof n!="function"?n:void 0,c=typeof n=="function"?n:r,l=i===void 0&&this.config.cacheMiddleware===!0;let f;if(l){this.handlers||(this.handlers=new WeakMap);const d=this.handlers;d.has(t.constructor)?f=d.get(t.constructor):(f=t.resolveMiddleware(this.middlewareStack,this.config,i),d.set(t.constructor,f))}else delete this.handlers,f=t.resolveMiddleware(this.middlewareStack,this.config,i);if(c)f(t).then(d=>c(null,d.output),d=>c(d)).catch(()=>{});else return f(t).then(d=>d.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const O0="***SensitiveInformation***";function zv(e,t){if(t==null)return t;const n=wt.of(e);if(n.getMergedTraits().sensitive)return O0;if(n.isListSchema()){if(!!n.getValueSchema().getMergedTraits().sensitive)return O0}else if(n.isMapSchema()){if(!!n.getKeySchema().getMergedTraits().sensitive||!!n.getValueSchema().getMergedTraits().sensitive)return O0}else if(n.isStructSchema()&&typeof t=="object"){const r=t,i={};for(const[c,l]of n.structIterator())r[c]!=null&&(i[c]=zv(l,r[c]));return i}return t}class Br{middlewareStack=yp();schema;static classBuilder(){return new AZ}resolveMiddlewareWithContext(t,n,r,{middlewareFn:i,clientName:c,commandName:l,inputFilterSensitiveLog:f,outputFilterSensitiveLog:d,smithyContext:h,additionalContext:y,CommandCtor:g}){for(const R of i.bind(this)(g,t,n,r))this.middlewareStack.use(R);const v=t.concat(this.middlewareStack),{logger:b}=n,_={logger:b,clientName:c,commandName:l,inputFilterSensitiveLog:f,outputFilterSensitiveLog:d,[Mv]:{commandInstance:this,...h},...y},{requestHandler:x}=n;return v.resolve(R=>x.handle(R.request,r||{}),_)}}class AZ{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,n,r={}){return this._smithyContext={service:t,operation:n,...r},this}c(t={}){return this._additionalContext=t,this}n(t,n){return this._clientName=t,this._commandName=n,this}f(t=r=>r,n=r=>r){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=n,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}sc(t){return this._operationSchema=t,this._smithyContext.operationSchema=t,this}build(){const t=this;let n;return n=class extends Br{input;static getEndpointParameterInstructions(){return t._ep}constructor(...[r]){super(),this.input=r??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(r,i,c){const l=t._operationSchema,f=l?.[4]??l?.input,d=l?.[5]??l?.output;return this.resolveMiddlewareWithContext(r,i,c,{CommandCtor:n,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(l?zv.bind(null,f):h=>h),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(l?zv.bind(null,d):h=>h),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}}class Ea extends Error{$fault;$response;$retryable;$metadata;constructor(t){super(t.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}static isInstance(t){if(!t)return!1;const n=t;return Ea.prototype.isPrototypeOf(n)||!!n.$fault&&!!n.$metadata&&(n.$fault==="client"||n.$fault==="server")}static[Symbol.hasInstance](t){if(!t)return!1;const n=t;return this===Ea?Ea.isInstance(t):Ea.isInstance(t)?n.name&&this.name?this.prototype.isPrototypeOf(t)||n.name===this.name:this.prototype.isPrototypeOf(t):!1}}const _T=(e,t={})=>{Object.entries(t).filter(([,r])=>r!==void 0).forEach(([r,i])=>{(e[r]==null||e[r]==="")&&(e[r]=i)});const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},eD=e=>{switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},IZ=e=>{const t=[];for(const n in hp){const r=hp[n];e[r]!==void 0&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(n){t.push(n)},checksumAlgorithms(){return t}}},OZ=e=>{const t={};return e.checksumAlgorithms().forEach(n=>{t[n.algorithmId()]=n.checksumConstructor()}),t},MZ=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),DZ=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},tD=e=>Object.assign(IZ(e),MZ(e)),nD=e=>Object.assign(OZ(e),DZ(e)),sD=e=>{const t="#text";for(const n in e)e.hasOwnProperty(n)&&e[n][t]!==void 0?e[n]=e[n][t]:typeof e[n]=="object"&&e[n]!==null&&(e[n]=sD(e[n]));return e};class Bb{trace(){}debug(){}info(){}warn(){}error(){}}class rD{queryCompat;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,n){const r=n.getMemberSchemas(),i=Object.values(r).find(c=>!!c.getMergedTraits().httpPayload);if(i){const c=i.getMergedTraits().mediaType;return c||(i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":t)}else if(!n.isUnitSchema()&&Object.values(r).find(l=>{const{httpQuery:f,httpQueryParams:d,httpHeader:h,httpLabel:y,httpPrefixHeaders:g}=l.getMergedTraits();return!f&&!d&&!h&&!y&&g===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,n,r,i,c,l){let f=n,d=t;t.includes("#")&&([f,d]=t.split("#"));const h={$metadata:c,$fault:r.statusCode<500?"client":"server"},y=Mt.for(f);try{return{errorSchema:l?.(y,d)??y.getSchema(t),errorMetadata:h}}catch{i.message=i.message??i.Message??"UnknownError";const v=Mt.for("smithy.ts.sdk.synthetic."+f),b=v.getBaseException();if(b){const _=v.getErrorCtor(b)??Error;throw this.decorateServiceException(Object.assign(new _({name:d}),h),i)}throw this.decorateServiceException(Object.assign(new Error(d),h),i)}}decorateServiceException(t,n={}){if(this.queryCompat){const r=t.Message??n.Message,i=_T(t,n);r&&(i.message=r),i.Error={...i.Error,Type:i.Error.Type,Code:i.Error.Code,Message:i.Error.message??i.Error.Message??r};const c=i.$metadata.requestId;return c&&(i.RequestId=c),i}return _T(t,n)}setQueryCompatError(t,n){const r=n.headers?.["x-amzn-query-error"];if(t!==void 0&&r!=null){const[i,c]=r.split(";"),l=Object.entries(t),f={Code:i,Type:c};Object.assign(t,f);for(const[d,h]of l)f[d==="message"?"Message":d]=h;delete f.__type,t.Error=f}}queryCompatOutput(t,n){t.Error&&(n.Error=t.Error),t.Type&&(n.Type=t.Type),t.Code&&(n.Code=t.Code)}findQueryCompatibleError(t,n){try{return t.getSchema(n)}catch{return t.find(i=>wt.of(i).getMergedTraits().awsQueryError?.[0]===n)}}}class nm{serdeContext;setSerdeContext(t){this.serdeContext=t}}function*oD(e,t){if(e.isUnitSchema())return;const n=e.getSchema();for(let r=0;rr!=="__type"))}mark(t){this.keys.delete(t)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const t=this.keys.values().next().value,n=this.from[t];this.to.$unknown=[t,n]}}}function PZ(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function NZ(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">").replace(/\r/g," ").replace(/\n/g," ").replace(/\u0085/g,"…").replace(/\u2028/,"
")}class Lv{value;constructor(t){this.value=t}toString(){return NZ(""+this.value)}}class rs{name;children;attributes={};static of(t,n,r){const i=new rs(t);return n!==void 0&&i.addChildNode(new Lv(n)),r!==void 0&&i.withName(r),i}constructor(t,n=[]){this.name=t,this.children=n}withName(t){return this.name=t,this}addAttribute(t,n){return this.attributes[t]=n,this}addChildNode(t){return this.children.push(t),this}removeAttribute(t){return delete this.attributes[t],this}n(t){return this.name=t,this}c(t){return this.children.push(t),this}a(t,n){return n!=null&&(this.attributes[t]=n),this}cc(t,n,r=n){if(t[n]!=null){const i=rs.of(n,t[n]).withName(r);this.c(i)}}l(t,n,r,i){t[n]!=null&&i().map(l=>{l.withName(r),this.c(l)})}lc(t,n,r,i){if(t[n]!=null){const c=i(),l=new rs(r);c.map(f=>{l.c(f)}),this.c(l)}}toString(){const t=!!this.children.length;let n=`<${this.name}`;const r=this.attributes;for(const i of Object.keys(r)){const c=r[i];c!=null&&(n+=` ${i}="${PZ(""+c)}"`)}return n+=t?`>${this.children.map(i=>i.toString()).join("")}`:"/>"}}let M0;function zZ(e){M0||(M0=new DOMParser);const t=M0.parseFromString(e,"application/xml");if(t.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const n=r=>{if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim())return r.textContent;if(r.nodeType===Node.ELEMENT_NODE){const i=r;if(i.attributes.length===0&&i.childNodes.length===0)return"";const c={},l=Array.from(i.attributes);for(const d of l)c[`${d.name}`]=d.value;const f=Array.from(i.childNodes);for(const d of f){const h=n(d);if(h!=null){const y=d.nodeName;if(f.length===1&&l.length===0&&y==="#text")return h;c[y]?Array.isArray(c[y])?c[y].push(h):c[y]=[c[y],h]:c[y]=h}else if(f.length===1&&l.length===0)return i.textContent}return c}return null};return{[t.documentElement.nodeName]:n(t.documentElement)}}class iD extends nm{settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new CM(t)}setSerdeContext(t){this.serdeContext=t,this.stringDeserializer.setSerdeContext(t)}read(t,n,r){const i=wt.of(t),c=i.getMemberSchemas();if(i.isStructSchema()&&i.isMemberSchema()&&!!Object.values(c).find(h=>!!h.getMemberTraits().eventPayload)){const h={},y=Object.keys(c)[0];return c[y].isBlobSchema()?h[y]=n:h[y]=this.read(c[y],n),h}const f=(this.serdeContext?.utf8Encoder??ja)(n),d=this.parseXml(f);return this.readSchema(t,r?d[r]:d)}readSchema(t,n){const r=wt.of(t);if(r.isUnitSchema())return;const i=r.getMergedTraits();if(r.isListSchema()&&!Array.isArray(n))return this.readSchema(r,[n]);if(n==null)return n;if(typeof n=="object"){const c=!!i.sparse,l=!!i.xmlFlattened;if(r.isListSchema()){const d=r.getValueSchema(),h=[],y=d.getMergedTraits().xmlName??"member",g=l?n:(n[0]??n)[y],v=Array.isArray(g)?g:[g];for(const b of v)(b!=null||c)&&h.push(this.readSchema(d,b));return h}const f={};if(r.isMapSchema()){const d=r.getKeySchema(),h=r.getValueSchema();let y;l?y=Array.isArray(n)?n:[n]:y=Array.isArray(n.entry)?n.entry:[n.entry];const g=d.getMergedTraits().xmlName??"key",v=h.getMergedTraits().xmlName??"value";for(const b of y){const _=b[g],x=b[v];(x!=null||c)&&(f[_]=this.readSchema(h,x))}return f}if(r.isStructSchema()){const d=r.isUnionSchema();let h;d&&(h=new kZ(n,f));for(const[y,g]of r.structIterator()){const v=g.getMergedTraits(),b=v.httpPayload?v.xmlName??g.getName():g.getMemberTraits().xmlName??y;d&&h.mark(b),n[b]!=null&&(f[y]=this.readSchema(g,n[b]))}return d&&h.writeUnknown(),f}if(r.isDocumentSchema())return n;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${r.getName(!0)}`)}return r.isListSchema()?[]:r.isMapSchema()||r.isStructSchema()?{}:this.stringDeserializer.read(r,n)}parseXml(t){if(t.length){let n;try{n=zZ(t)}catch(l){throw l&&typeof l=="object"&&Object.defineProperty(l,"$responseBodyText",{value:t}),l}const r="#text",i=Object.keys(n)[0],c=n[i];return c[r]&&(c[i]=c[r],delete c[r]),sD(c)}return{}}}class LZ extends nm{settings;buffer;constructor(t){super(),this.settings=t}write(t,n,r=""){this.buffer===void 0&&(this.buffer="");const i=wt.of(t);if(r&&!r.endsWith(".")&&(r+="."),i.isBlobSchema())(typeof n=="string"||n instanceof Uint8Array)&&(this.writeKey(r),this.writeValue((this.serdeContext?.base64Encoder??Mi)(n)));else if(i.isBooleanSchema()||i.isNumericSchema()||i.isStringSchema())n!=null?(this.writeKey(r),this.writeValue(String(n))):i.isIdempotencyToken()&&(this.writeKey(r),this.writeValue(Xp()));else if(i.isBigIntegerSchema())n!=null&&(this.writeKey(r),this.writeValue(String(n)));else if(i.isBigDecimalSchema())n!=null&&(this.writeKey(r),this.writeValue(n instanceof Cf?n.string:String(n)));else if(i.isTimestampSchema()){if(n instanceof Date)switch(this.writeKey(r),Jp(i,this.settings)){case 5:this.writeValue(n.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(mp(n));break;case 7:this.writeValue(String(n.getTime()/1e3));break}}else if(i.isDocumentSchema())Array.isArray(n)?this.write(79,n,r):n instanceof Date?this.write(4,n,r):n instanceof Uint8Array?this.write(21,n,r):n&&typeof n=="object"?this.write(143,n,r):(this.writeKey(r),this.writeValue(String(n)));else if(i.isListSchema()){if(Array.isArray(n))if(n.length===0)this.settings.serializeEmptyLists&&(this.writeKey(r),this.writeValue(""));else{const c=i.getValueSchema(),l=this.settings.flattenLists||i.getMergedTraits().xmlFlattened;let f=1;for(const d of n){if(d==null)continue;const h=this.getKey("member",c.getMergedTraits().xmlName),y=l?`${r}${f}`:`${r}${h}.${f}`;this.write(c,d,y),++f}}}else if(i.isMapSchema()){if(n&&typeof n=="object"){const c=i.getKeySchema(),l=i.getValueSchema(),f=i.getMergedTraits().xmlFlattened;let d=1;for(const[h,y]of Object.entries(n)){if(y==null)continue;const g=this.getKey("key",c.getMergedTraits().xmlName),v=f?`${r}${d}.${g}`:`${r}entry.${d}.${g}`,b=this.getKey("value",l.getMergedTraits().xmlName),_=f?`${r}${d}.${b}`:`${r}entry.${d}.${b}`;this.write(c,h,v),this.write(l,y,_),++d}}}else if(i.isStructSchema()){if(n&&typeof n=="object"){let c=!1;for(const[l,f]of oD(i,n)){if(n[l]==null&&!f.isIdempotencyToken())continue;const d=this.getKey(l,f.getMergedTraits().xmlName),h=`${r}${d}`;this.write(f,n[l],h),c=!0}if(!c&&i.isUnionSchema()){const{$unknown:l}=n;if(Array.isArray(l)){const[f,d]=l,h=`${r}${f}`;this.write(15,d,h)}}}}else if(!i.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${i.getName(!0)}`)}flush(){if(this.buffer===void 0)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const t=this.buffer;return delete this.buffer,t}getKey(t,n){const r=n??t;return this.settings.capitalizeKeys?r[0].toUpperCase()+r.slice(1):r}writeKey(t){t.endsWith(".")&&(t=t.slice(0,t.length-1)),this.buffer+=`&${pp(t)}=`}writeValue(t){this.buffer+=pp(t)}}class BZ extends hK{options;serializer;deserializer;mixin=new rD;constructor(t){super({defaultNamespace:t.defaultNamespace}),this.options=t;const n={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace,serializeEmptyLists:!0};this.serializer=new LZ(n),this.deserializer=new iD(n)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(t){this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(t,n,r){const i=await super.serializeRequest(t,n,r);i.path.endsWith("/")||(i.path+="/"),Object.assign(i.headers,{"content-type":"application/x-www-form-urlencoded"}),(Lh(t.input)==="unit"||!i.body)&&(i.body="");const c=t.name.split("#")[1]??t.name;return i.body=`Action=${c}&Version=${this.options.version}`+i.body,i.body.endsWith("&")&&(i.body=i.body.slice(-1)),i}async deserializeResponse(t,n,r){const i=this.deserializer,c=wt.of(t.output),l={};if(r.statusCode>=300){const g=await xi(r.body,n);g.byteLength>0&&Object.assign(l,await i.read(15,g)),await this.handleError(t,n,r,l,this.deserializeMetadata(r))}for(const g in r.headers){const v=r.headers[g];delete r.headers[g],r.headers[g.toLowerCase()]=v}const f=t.name.split("#")[1]??t.name,d=c.isStructSchema()&&this.useNestedResult()?f+"Result":void 0,h=await xi(r.body,n);return h.byteLength>0&&Object.assign(l,await i.read(c,h,d)),{$metadata:this.deserializeMetadata(r),...l}}useNestedResult(){return!0}async handleError(t,n,r,i,c){const l=this.loadQueryErrorCode(r,i)??"Unknown",f=this.loadQueryError(i),d=this.loadQueryErrorMessage(i);f.message=d,f.Error={Type:f.Type,Code:f.Code,Message:d};const{errorSchema:h,errorMetadata:y}=await this.mixin.getErrorSchemaOrThrowBaseException(l,this.options.defaultNamespace,r,f,c,this.mixin.findQueryCompatibleError),g=wt.of(h),v=Mt.for(h[1]).getErrorCtor(h)??Error,b=new v(d),_={Type:f.Error.Type,Code:f.Error.Code,Error:f.Error};for(const[x,R]of g.structIterator()){const C=R.getMergedTraits().xmlName??x,A=f[C]??i[C];_[x]=this.deserializer.readSchema(R,A)}throw this.mixin.decorateServiceException(Object.assign(b,y,{$fault:g.getMergedTraits().error,message:d},_),i)}loadQueryErrorCode(t,n){const r=(n.Errors?.[0]?.Error??n.Errors?.Error??n.Error)?.Code;if(r!==void 0)return r;if(t.statusCode==404)return"NotFound"}loadQueryError(t){return t.Errors?.[0]?.Error??t.Errors?.Error??t.Error}loadQueryErrorMessage(t){const n=this.loadQueryError(t);return n?.message??n?.Message??t.message??t.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}class $Z extends BZ{options;constructor(t){super(t),this.options=t;const n={capitalizeKeys:!0,flattenLists:!0,serializeEmptyLists:!1};Object.assign(this.serializer.settings,n)}useNestedResult(){return!1}}const UZ=(e,t)=>{if(t?.Error?.Code!==void 0)return t.Error.Code;if(t?.Code!==void 0)return t.Code;if(e.statusCode==404)return"NotFound"};class jZ extends nm{settings;stringBuffer;byteBuffer;buffer;constructor(t){super(),this.settings=t}write(t,n){const r=wt.of(t);if(r.isStringSchema()&&typeof n=="string")this.stringBuffer=n;else if(r.isBlobSchema())this.byteBuffer="byteLength"in n?n:(this.serdeContext?.base64Decoder??Na)(n);else{this.buffer=this.writeStruct(r,n,void 0);const i=r.getMergedTraits();i.httpPayload&&!i.xmlName&&this.buffer.withName(r.getName())}}flush(){if(this.byteBuffer!==void 0){const n=this.byteBuffer;return delete this.byteBuffer,n}if(this.stringBuffer!==void 0){const n=this.stringBuffer;return delete this.stringBuffer,n}const t=this.buffer;return this.settings.xmlNamespace&&(t?.attributes?.xmlns||t.addAttribute("xmlns",this.settings.xmlNamespace)),delete this.buffer,t.toString()}writeStruct(t,n,r){const i=t.getMergedTraits(),c=t.isMemberSchema()&&!i.httpPayload?t.getMemberTraits().xmlName??t.getMemberName():i.xmlName??t.getName();if(!c||!t.isStructSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${t.getName(!0)}.`);const l=rs.of(c),[f,d]=this.getXmlnsAttribute(t,r);for(const[y,g]of oD(t,n)){const v=n[y];if(v!=null||g.isIdempotencyToken()){if(g.getMergedTraits().xmlAttribute){l.addAttribute(g.getMergedTraits().xmlName??y,this.writeSimple(g,v));continue}if(g.isListSchema())this.writeList(g,v,l,d);else if(g.isMapSchema())this.writeMap(g,v,l,d);else if(g.isStructSchema())l.addChildNode(this.writeStruct(g,v,d));else{const b=rs.of(g.getMergedTraits().xmlName??g.getMemberName());this.writeSimpleInto(g,v,b,d),l.addChildNode(b)}}}const{$unknown:h}=n;if(h&&t.isUnionSchema()&&Array.isArray(h)&&Object.keys(n).length===1){const[y,g]=h,v=rs.of(y);if(typeof g!="string")if(n instanceof rs||n instanceof Lv)l.addChildNode(n);else throw new Error("@aws-sdk - $unknown union member in XML requires value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.");this.writeSimpleInto(0,g,v,d),l.addChildNode(v)}return d&&l.addAttribute(f,d),l}writeList(t,n,r,i){if(!t.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${t.getName(!0)}`);const c=t.getMergedTraits(),l=t.getValueSchema(),f=l.getMergedTraits(),d=!!f.sparse,h=!!c.xmlFlattened,[y,g]=this.getXmlnsAttribute(t,i),v=(b,_)=>{if(l.isListSchema())this.writeList(l,Array.isArray(_)?_:[_],b,g);else if(l.isMapSchema())this.writeMap(l,_,b,g);else if(l.isStructSchema()){const x=this.writeStruct(l,_,g);b.addChildNode(x.withName(h?c.xmlName??t.getMemberName():f.xmlName??"member"))}else{const x=rs.of(h?c.xmlName??t.getMemberName():f.xmlName??"member");this.writeSimpleInto(l,_,x,g),b.addChildNode(x)}};if(h)for(const b of n)(d||b!=null)&&v(r,b);else{const b=rs.of(c.xmlName??t.getMemberName());g&&b.addAttribute(y,g);for(const _ of n)(d||_!=null)&&v(b,_);r.addChildNode(b)}}writeMap(t,n,r,i,c=!1){if(!t.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${t.getName(!0)}`);const l=t.getMergedTraits(),f=t.getKeySchema(),h=f.getMergedTraits().xmlName??"key",y=t.getValueSchema(),g=y.getMergedTraits(),v=g.xmlName??"value",b=!!g.sparse,_=!!l.xmlFlattened,[x,R]=this.getXmlnsAttribute(t,i),C=(A,O,D)=>{const N=rs.of(h,O),[j,$]=this.getXmlnsAttribute(f,R);$&&N.addAttribute(j,$),A.addChildNode(N);let k=rs.of(v);y.isListSchema()?this.writeList(y,D,k,R):y.isMapSchema()?this.writeMap(y,D,k,R,!0):y.isStructSchema()?k=this.writeStruct(y,D,R):this.writeSimpleInto(y,D,k,R),A.addChildNode(k)};if(_){for(const[A,O]of Object.entries(n))if(b||O!=null){const D=rs.of(l.xmlName??t.getMemberName());C(D,A,O),r.addChildNode(D)}}else{let A;c||(A=rs.of(l.xmlName??t.getMemberName()),R&&A.addAttribute(x,R),r.addChildNode(A));for(const[O,D]of Object.entries(n))if(b||D!=null){const N=rs.of("entry");C(N,O,D),(c?r:A).addChildNode(N)}}}writeSimple(t,n){if(n===null)throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.");const r=wt.of(t);let i=null;if(n&&typeof n=="object")if(r.isBlobSchema())i=(this.serdeContext?.base64Encoder??Mi)(n);else if(r.isTimestampSchema()&&n instanceof Date)switch(Jp(r,this.settings)){case 5:i=n.toISOString().replace(".000Z","Z");break;case 6:i=mp(n);break;case 7:i=String(n.getTime()/1e3);break;default:console.warn("Missing timestamp format, using http date",n),i=mp(n);break}else{if(r.isBigDecimalSchema()&&n)return n instanceof Cf?n.string:String(n);throw r.isMapSchema()||r.isListSchema()?new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead."):new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${r.getName(!0)}`)}if((r.isBooleanSchema()||r.isNumericSchema()||r.isBigIntegerSchema()||r.isBigDecimalSchema())&&(i=String(n)),r.isStringSchema()&&(n===void 0&&r.isIdempotencyToken()?i=Xp():i=String(n)),i===null)throw new Error(`Unhandled schema-value pair ${r.getName(!0)}=${n}`);return i}writeSimpleInto(t,n,r,i){const c=this.writeSimple(t,n),l=wt.of(t),f=new Lv(c),[d,h]=this.getXmlnsAttribute(l,i);h&&r.addAttribute(d,h),r.addChildNode(f)}getXmlnsAttribute(t,n){const r=t.getMergedTraits(),[i,c]=r.xmlNamespace??[];return c&&c!==n?[i?`xmlns:${i}`:"xmlns",c]:[void 0,void 0]}}class HZ extends nm{settings;constructor(t){super(),this.settings=t}createSerializer(){const t=new jZ(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){const t=new iD(this.settings);return t.setSerdeContext(this.serdeContext),t}}class FZ extends dK{codec;serializer;deserializer;mixin=new rD;constructor(t){super(t);const n={timestampFormat:{useTrait:!0,default:5},httpBindings:!0,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace};this.codec=new HZ(n),this.serializer=new gK(this.codec.createSerializer(),n),this.deserializer=new pK(this.codec.createDeserializer(),n)}getPayloadCodec(){return this.codec}getShapeId(){return"aws.protocols#restXml"}async serializeRequest(t,n,r){const i=await super.serializeRequest(t,n,r),c=wt.of(t.input);if(!i.headers["content-type"]){const l=this.mixin.resolveRestContentType(this.getDefaultContentType(),c);l&&(i.headers["content-type"]=l)}return typeof i.body=="string"&&i.headers["content-type"]===this.getDefaultContentType()&&!i.body.startsWith("'+i.body),i}async deserializeResponse(t,n,r){return super.deserializeResponse(t,n,r)}async handleError(t,n,r,i,c){const l=UZ(r,i)??"Unknown",{errorSchema:f,errorMetadata:d}=await this.mixin.getErrorSchemaOrThrowBaseException(l,this.options.defaultNamespace,r,i,c),h=wt.of(f),y=i.Error?.message??i.Error?.Message??i.message??i.Message??"Unknown",g=Mt.for(f[1]).getErrorCtor(f)??Error,v=new g(y);await this.deserializeHttpMessage(f,n,r,i);const b={};for(const[_,x]of h.structIterator()){const R=x.getMergedTraits().xmlName??_,C=i.Error?.[R]??i[R];b[_]=this.codec.createDeserializer().readSchema(x,C)}throw this.mixin.decorateServiceException(Object.assign(v,d,{$fault:h.getMergedTraits().error,message:y},b),i)}getDefaultContentType(){return"application/xml"}hasUnstructuredPayloadBinding(t){for(const[,n]of t.structIterator())if(n.getMergedTraits().httpPayload)return!(n.isStructSchema()||n.isMapSchema()||n.isListSchema());return!1}}const VZ=/\d{12}\.ddb/;async function qZ(e,t,n){if(n.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&br(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const c=await t.retryStrategy();typeof c.acquireInitialRetryToken=="function"?c.constructor?.name?.includes("Adaptive")?br(e,"RETRY_MODE_ADAPTIVE","F"):br(e,"RETRY_MODE_STANDARD","E"):br(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){const c=e.endpointV2;switch(String(c?.url?.hostname).match(VZ)&&br(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":br(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":br(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":br(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const c=i;c.accountId&&br(e,"RESOLVED_ACCOUNT_ID","T");for(const[l,f]of Object.entries(c.$source??{}))br(e,l,f)}}const wT="user-agent",D0="x-amz-user-agent",ET=" ",k0="/",GZ=/[^!$%&'*+\-.^_`|~\w]/g,KZ=/[^!$%&'*+\-.^_`|~\w#]/g,xT="-",ZZ=1024;function QZ(e){let t="";for(const n in e){const r=e[n];if(t.length+r.length+1<=ZZ){t.length?t+=","+r:t+=r;continue}break}return t}const YZ=e=>(t,n)=>async r=>{const{request:i}=r;if(!Mn.isInstance(i))return t(r);const{headers:c}=i,l=n?.userAgent?.map(Rh)||[],f=(await e.defaultUserAgentProvider()).map(Rh);await qZ(n,e,r);const d=n;f.push(`m/${QZ(Object.assign({},n.__smithy_context?.features,d.__aws_sdk_context?.features))}`);const h=e?.customUserAgent?.map(Rh)||[],y=await e.userAgentAppId();y&&f.push(Rh(["app",`${y}`]));const g=[].concat([...f,...l,...h]).join(ET),v=[...f.filter(b=>b.startsWith("aws-sdk-")),...h].join(ET);return e.runtime!=="browser"?(v&&(c[D0]=c[D0]?`${c[wT]} ${v}`:v),c[wT]=g):c[D0]=g,t({...r,request:i})},Rh=e=>{const t=e[0].split(k0).map(l=>l.replace(GZ,xT)).join(k0),n=e[1]?.replace(KZ,xT),r=t.indexOf(k0),i=t.substring(0,r);let c=t.substring(r+1);return i==="api"&&(c=c.toLowerCase()),[i,c,n].filter(l=>l&&l.length>0).reduce((l,f,d)=>{switch(d){case 0:return f;case 1:return`${l}/${f}`;default:return`${l}#${f}`}},"")},XZ={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},aD=e=>({applyToStack:t=>{t.add(YZ(e),XZ)}}),cD=!1,lD=!1,RT=new Set,WZ=(e,t=em)=>{if(!RT.has(e)&&!t(e))if(e==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);else RT.add(e)},uD=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),JZ=e=>uD(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,fD=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{const r=typeof t=="function"?await t():t,i=JZ(r);return WZ(i),i},useFipsEndpoint:async()=>{const r=typeof t=="string"?t:await t();return uD(r)?!0:typeof n!="function"?Promise.resolve(!!n):n()}})},CT="content-length";function eQ(e){return t=>async n=>{const r=n.request;if(Mn.isInstance(r)){const{body:i,headers:c}=r;if(i&&Object.keys(c).map(l=>l.toLowerCase()).indexOf(CT)===-1)try{const l=e(i);r.headers={...r.headers,[CT]:String(l)}}catch{}}return t({...n,request:r})}}const tQ={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},dD=e=>({applyToStack:t=>{t.add(eQ(e.bodyLengthChecker),tQ)}}),nQ=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),aQ(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!iQ(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},sQ=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,rQ=/(\d+\.){3}\d+/,oQ=/\.\./,iQ=e=>sQ.test(e)&&!rQ.test(e)&&!oQ.test(e),aQ=e=>{const[t,n,r,,,i]=e.split(":"),c=t==="arn"&&e.split(":").length>=6,l=!!(c&&n&&r&&i);if(c&&!l)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return l},cQ=(e,t,n,r=!1)=>{const i=async()=>{let c;return r?c=n.clientContextParams?.[e]??n[e]??n[t]:c=n[e]??n[t],typeof c=="function"?c():c};return e==="credentialScope"||t==="CredentialScope"?async()=>{const c=typeof n.credentials=="function"?await n.credentials():n.credentials;return c?.credentialScope??c?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{const c=typeof n.credentials=="function"?await n.credentials():n.credentials;return c?.accountId??c?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(n.isCustomEndpoint===!1)return;const c=await i();if(c&&typeof c=="object"){if("url"in c)return c.url.href;if("hostname"in c){const{protocol:l,hostname:f,port:d,path:h}=c;return`${l}//${f}${d?":"+d:""}${h}`}}return c}:i},hD=async e=>{},pD=e=>typeof e=="object"?"url"in e?mf(e.url):e:mf(e),lQ=async(e,t,n,r)=>{if(!n.isCustomEndpoint){let l;n.serviceConfiguredEndpoint?l=await n.serviceConfiguredEndpoint():l=await hD(n.serviceId),l&&(n.endpoint=()=>Promise.resolve(pD(l)),n.isCustomEndpoint=!0)}const i=await mD(e,t,n);if(typeof n.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)},mD=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[c,l]of Object.entries(i))switch(l.type){case"staticContextParams":r[c]=l.value;break;case"contextParams":r[c]=e[l.name];break;case"clientContextParams":case"builtInParams":r[c]=await cQ(l.name,c,n,l.type!=="builtInParams")();break;case"operationContextParams":r[c]=l.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(l))}return Object.keys(i).length===0&&Object.assign(r,n),String(n.serviceId).toLowerCase()==="s3"&&await nQ(r),r},uQ=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&yK(r,"ENDPOINT_OVERRIDE","N");const c=await lQ(i.input,{getEndpointParameterInstructions(){return t}},{...e},r);r.endpointV2=c,r.authSchemes=c.properties?.authSchemes;const l=r.authSchemes?.[0];if(l){r.signing_region=l.signingRegion,r.signing_service=l.signingName;const d=Eo(r)?.selectedHttpAuthScheme?.httpAuthOption;d&&(d.signingProperties=Object.assign(d.signingProperties||{},{signing_region:l.signingRegion,signingRegion:l.signingRegion,signing_service:l.signingName,signingName:l.signingName,signingRegionSet:l.signingRegionSet},l.properties))}return n({...i})},fQ={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:pG.name},xo=(e,t)=>({applyToStack:n=>{n.addRelativeTo(uQ({config:e,instructions:t}),fQ)}}),gD=e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,c=n!=null?async()=>pD(await Ns(n)()):void 0,f=Object.assign(e,{endpoint:c,tls:t,isCustomEndpoint:!!n,useDualstackEndpoint:Ns(r??!1),useFipsEndpoint:Ns(i??!1)});let d;return f.serviceConfiguredEndpoint=async()=>(e.serviceId&&!d&&(d=hD(e.serviceId)),d),f};var rl;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(rl||(rl={}));const gf=3,yD=rl.STANDARD,dQ=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],hQ=["TimeoutError","RequestTimeout","RequestTimeoutException"],pQ=[500,502,503,504],mQ=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],gQ=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],yQ=e=>e?.$retryable!==void 0,vQ=e=>e.$metadata?.clockSkewCorrected,bQ=e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return e&&e instanceof TypeError?t.has(e.message):!1},vD=e=>e.$metadata?.httpStatusCode===429||dQ.includes(e.name)||e.$retryable?.throttling==!0,$b=(e,t=0)=>yQ(e)||vQ(e)||hQ.includes(e.name)||mQ.includes(e?.code||"")||gQ.includes(e?.code||"")||pQ.includes(e.$metadata?.httpStatusCode||0)||bQ(e)||e.cause!==void 0&&t<=10&&$b(e.cause,t+1),SQ=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!$b(e)}return!1};class Ub{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;currentCapacity=0;enabled=!1;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(t){this.beta=t?.beta??.7,this.minCapacity=t?.minCapacity??1,this.minFillRate=t?.minFillRate??.5,this.scaleConstant=t?.scaleConstant??.4,this.smooth=t?.smooth??.8;const n=this.getCurrentTimeInSeconds();this.lastThrottleTime=n,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(t){if(this.enabled){if(this.refillTokenBucket(),t>this.currentCapacity){const n=(t-this.currentCapacity)/this.fillRate*1e3;await new Promise(r=>Ub.setTimeoutFn(r,n))}this.currentCapacity=this.currentCapacity-t}}refillTokenBucket(){const t=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=t;return}const n=(t-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+n),this.lastTimestamp=t}updateClientSendingRate(t){let n;if(this.updateMeasuredRate(),vD(t)){const i=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=i,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),n=this.cubicThrottle(i),this.enableTokenBucket()}else this.calculateTimeWindow(),n=this.cubicSuccess(this.getCurrentTimeInSeconds());const r=Math.min(n,2*this.measuredTxRate);this.updateTokenBucketRate(r)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(t){return this.getPrecise(t*this.beta)}cubicSuccess(t){return this.getPrecise(this.scaleConstant*Math.pow(t-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(t){this.refillTokenBucket(),this.fillRate=Math.max(t,this.minFillRate),this.maxCapacity=Math.max(t,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const t=this.getCurrentTimeInSeconds(),n=Math.floor(t*2)/2;if(this.requestCount++,n>this.lastTxRateBucket){const r=this.requestCount/(n-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(r*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=n}}getPrecise(t){return parseFloat(t.toFixed(8))}}const Bv=100,bD=20*1e3,_Q=500,TT=500,wQ=5,EQ=10,xQ=1,RQ="amz-sdk-invocation-id",CQ="amz-sdk-request",TQ=()=>{let e=Bv;return{computeNextBackoffDelay:r=>Math.floor(Math.min(bD,Math.random()*2**r*e)),setDelayBase:r=>{e=r}}},AT=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(bD,e),getRetryCost:()=>n});class SD{maxAttempts;mode=rl.STANDARD;capacity=TT;retryBackoffStrategy=TQ();maxAttemptsProvider;constructor(t){this.maxAttempts=t,this.maxAttemptsProvider=typeof t=="function"?t:async()=>t}async acquireInitialRetryToken(t){return AT({retryDelay:Bv,retryCount:0})}async refreshRetryTokenForRetry(t,n){const r=await this.getMaxAttempts();if(this.shouldRetry(t,n,r)){const i=n.errorType;this.retryBackoffStrategy.setDelayBase(i==="THROTTLING"?_Q:Bv);const c=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount()),l=n.retryAfterHint?Math.max(n.retryAfterHint.getTime()-Date.now()||0,c):c,f=this.getCapacityCost(i);return this.capacity-=f,AT({retryDelay:l,retryCount:t.getRetryCount()+1,retryCost:f})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.max(TT,this.capacity+(t.getRetryCost()??xQ))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${gf}`),gf}}shouldRetry(t,n,r){return t.getRetryCount()+1=this.getCapacityCost(n.errorType)&&this.isRetryableError(n.errorType)}getCapacityCost(t){return t==="TRANSIENT"?EQ:wQ}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}}class AQ{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=rl.ADAPTIVE;constructor(t,n){this.maxAttemptsProvider=t;const{rateLimiter:r}=n??{};this.rateLimiter=r??new Ub,this.standardRetryStrategy=new SD(t)}async acquireInitialRetryToken(t){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(t)}async refreshRetryTokenForRetry(t,n){return this.rateLimiter.updateClientSendingRate(n),this.standardRetryStrategy.refreshRetryTokenForRetry(t,n)}recordSuccess(t){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(t)}}const IQ=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):typeof e=="string"?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),_D=e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=Ns(r??gf);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await Ns(n)()===rl.ADAPTIVE?new AQ(i):new SD(i))})},OQ=e=>e?.body instanceof ReadableStream,MQ=e=>(t,n)=>async r=>{let i=await e.retryStrategy();const c=await e.maxAttempts();if(DQ(i)){i=i;let l=await i.acquireInitialRetryToken(n.partition_id),f=new Error,d=0,h=0;const{request:y}=r,g=Mn.isInstance(y);for(g&&(y.headers[RQ]=Xp());;)try{g&&(y.headers[CQ]=`attempt=${d+1}; max=${c}`);const{response:v,output:b}=await t(r);return i.recordSuccess(l),b.$metadata.attempts=d+1,b.$metadata.totalRetryDelay=h,{response:v,output:b}}catch(v){const b=kQ(v);if(f=IQ(v),g&&OQ(y))throw(n.logger instanceof Bb?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),f;try{l=await i.refreshRetryTokenForRetry(l,b)}catch{throw f.$metadata||(f.$metadata={}),f.$metadata.attempts=d+1,f.$metadata.totalRetryDelay=h,f}d=l.getRetryCount();const _=l.getRetryDelay();h+=_,await new Promise(x=>setTimeout(x,_))}}else return i=i,i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r)},DQ=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",kQ=e=>{const t={error:e,errorType:PQ(e)},n=zQ(e.$response);return n&&(t.retryAfterHint=n),t},PQ=e=>vD(e)?"THROTTLING":$b(e)?"TRANSIENT":SQ(e)?"SERVER_ERROR":"CLIENT_ERROR",NQ={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},wD=e=>({applyToStack:t=>{t.add(MQ(e),NQ)}}),zQ=e=>{if(!Pa.isInstance(e))return;const t=Object.keys(e.headers).find(c=>c.toLowerCase()==="retry-after");if(!t)return;const n=e.headers[t],r=Number(n);return Number.isNaN(r)?new Date(n):new Date(r*1e3)},LQ=async(e,t,n)=>({operation:Eo(t).operation,region:await Ns(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function BQ(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ec2",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}const $Q=e=>{const t=[];switch(e.operation){default:t.push(BQ(e))}return t},UQ=e=>{const t=XM(e);return Object.assign(t,{authSchemePreference:Ns(e.authSchemePreference??[])})},jQ=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"ec2"}),hl={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},HQ="3.975.0",FQ={version:HQ},ED=e=>new TextEncoder().encode(e);var VQ=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:ED;function za(e){return e instanceof Uint8Array?e:typeof e=="string"?VQ(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function vp(e){return typeof e=="string"?e.length===0:e.byteLength===0}function qQ(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}function GQ(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n0&&c[c.length-1])&&(h[0]===6||h[0]===2)){n=0;continue}if(h[0]===3&&(!c||h[1]>c[0]&&h[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var nr=64,XQ=32,WQ=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),JQ=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],eY=Math.pow(2,53)-1,Bh=(function(){function e(){this.state=Int32Array.from(JQ),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var n=0,r=t.byteLength;if(this.bytesHashed+=r,this.bytesHashed*8>eY)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=t[n++],r--,this.bufferLength===nr&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(n.setUint8(this.bufferLength++,128),r%nr>=nr-8){for(var i=this.bufferLength;i>>24&255,c[i*4+1]=this.state[i]>>>16&255,c[i*4+2]=this.state[i]>>>8&255,c[i*4+3]=this.state[i]>>>0&255;return c},e.prototype.hashBuffer=function(){for(var t=this,n=t.buffer,r=t.state,i=r[0],c=r[1],l=r[2],f=r[3],d=r[4],h=r[5],y=r[6],g=r[7],v=0;v>>17|b<<15)^(b>>>19|b<<13)^b>>>10;b=this.temp[v-15];var x=(b>>>7|b<<25)^(b>>>18|b<<14)^b>>>3;this.temp[v]=(_+this.temp[v-7]|0)+(x+this.temp[v-16]|0)}var R=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&h^~d&y)|0)+(g+(WQ[v]+this.temp[v]|0)|0)|0,C=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&c^i&l^c&l)|0;g=y,y=h,h=d,d=f+R|0,f=l,l=c,c=i,i=R+C|0}r[0]+=i,r[1]+=c,r[2]+=l,r[3]+=f,r[4]+=d,r[5]+=h,r[6]+=y,r[7]+=g},e})(),tY=(function(){function e(t){this.secret=t,this.hash=new Bh,this.reset()}return e.prototype.update=function(t){if(!(vp(t)||this.error))try{this.hash.update(za(t))}catch(n){this.error=n}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return RD(this,void 0,void 0,function(){return CD(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Bh,this.secret){this.outer=new Bh;var t=nY(this.secret),n=new Uint8Array(nr);n.set(t);for(var r=0;rnr){var n=new Bh;n.update(t),t=n.digest()}var r=new Uint8Array(nr);return r.set(t),r}var sY=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function TD(e){if(rY(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return oY(t)}return!1}function rY(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function oY(e){return e&&sY.every(function(t){return typeof e[t]=="function"})}var AD=(function(){function e(t){TD(Ai())?this.hash=new QQ(t):this.hash=new tY(t)}return e.prototype.update=function(t,n){this.hash.update(za(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const ID=({serviceId:e,clientVersion:t})=>async n=>{const r=typeof window<"u"?window.navigator:void 0,i=r?.userAgent??"",c=r?.userAgentData?.platform??OT.os(i)??"other",l=void 0,f=r?.userAgentData?.brands??[],d=f[f.length-1],h=d?.brand??OT.browser(i)??"unknown",y=d?.version??"unknown",g=[["aws-sdk-js",t],["ua","2.1"],[`os/${c}`,l],["lang/js"],["md/browser",`${h}_${y}`]];e&&g.push([`api/${e}`,t]);const v=await n?.userAgentAppId?.();return v&&g.push([`app/${v}`]),g},OT={os(e){if(/iPhone|iPad|iPod/.test(e))return"iOS";if(/Macintosh|Mac OS X/.test(e))return"macOS";if(/Windows NT/.test(e))return"Windows";if(/Android/.test(e))return"Android";if(/Linux/.test(e))return"Linux"},browser(e){if(/EdgiOS|EdgA|Edg\//.test(e))return"Microsoft Edge";if(/Firefox\//.test(e))return"Firefox";if(/Chrome\//.test(e))return"Chrome";if(/Safari\//.test(e))return"Safari"}},OD=e=>()=>Promise.reject(e),iY=["in-region","cross-region","mobile","standard","legacy"],MD=({defaultsMode:e}={})=>WK(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(aY()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${iY.join(", ")}, got ${t}`)}}),aY=()=>{const e=window?.navigator;if(e?.connection){const{effectiveType:t,rtt:n,downlink:r}=e?.connection;if(typeof t=="string"&&t!=="4g"||Number(n)>100||Number(r)<10)return!0}return e?.userAgentData?.mobile||typeof e?.maxTouchPoints=="number"&&e?.maxTouchPoints>1},DD="required",rr="fn",or="argv",pl="ref",MT=!0,DT="isSet",yf="booleanEquals",Nc="error",zc="endpoint",co="tree",jb="PartitionResult",Hb="getAttr",kT={[DD]:!1,type:"string"},PT={[DD]:!0,default:!1,type:"boolean"},NT={[pl]:"Endpoint"},kD={[rr]:yf,[or]:[{[pl]:"UseFIPS"},!0]},PD={[rr]:yf,[or]:[{[pl]:"UseDualStack"},!0]},Ws={},zT={[rr]:Hb,[or]:[{[pl]:jb},"supportsFIPS"]},ND={[pl]:jb},LT={[rr]:yf,[or]:[!0,{[rr]:Hb,[or]:[ND,"supportsDualStack"]}]},BT=[kD],$T=[PD],UT=[{[pl]:"Region"}],cY={parameters:{Region:kT,UseDualStack:PT,UseFIPS:PT,Endpoint:kT},rules:[{conditions:[{[rr]:DT,[or]:[NT]}],rules:[{conditions:BT,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Nc},{conditions:$T,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Nc},{endpoint:{url:NT,properties:Ws,headers:Ws},type:zc}],type:co},{conditions:[{[rr]:DT,[or]:UT}],rules:[{conditions:[{[rr]:"aws.partition",[or]:UT,assign:jb}],rules:[{conditions:[kD,PD],rules:[{conditions:[{[rr]:yf,[or]:[MT,zT]},LT],rules:[{endpoint:{url:"https://ec2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ws,headers:Ws},type:zc}],type:co},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Nc}],type:co},{conditions:BT,rules:[{conditions:[{[rr]:yf,[or]:[zT,MT]}],rules:[{conditions:[{[rr]:"stringEquals",[or]:[{[rr]:Hb,[or]:[ND,"name"]},"aws-us-gov"]}],endpoint:{url:"https://ec2.{Region}.amazonaws.com",properties:Ws,headers:Ws},type:zc},{endpoint:{url:"https://ec2-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ws,headers:Ws},type:zc}],type:co},{error:"FIPS is enabled but this partition does not support FIPS",type:Nc}],type:co},{conditions:$T,rules:[{conditions:[LT],rules:[{endpoint:{url:"https://ec2.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ws,headers:Ws},type:zc}],type:co},{error:"DualStack is enabled but this partition does not support DualStack",type:Nc}],type:co},{endpoint:{url:"https://ec2.{Region}.{PartitionResult#dnsSuffix}",properties:Ws,headers:Ws},type:zc}],type:co}],type:co},{error:"Invalid Configuration: Missing Region",type:Nc}]},lY=cY,uY=new OM({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),fY=(e,t={})=>uY.get(e,()=>jM(lY,{endpointParams:e,logger:t.logger}));hf.aws=Nb;const dY=e=>({apiVersion:"2016-11-15",base64Decoder:e?.base64Decoder??Na,base64Encoder:e?.base64Encoder??Mi,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??fY,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??$Q,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Lb}],logger:e?.logger??new Bb,protocol:e?.protocol??$Z,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ec2",xmlNamespace:"http://ec2.amazonaws.com/doc/2016-11-15",version:"2016-11-15",serviceTarget:"AmazonEC2"},serviceId:e?.serviceId??"EC2",urlParser:e?.urlParser??mf,utf8Decoder:e?.utf8Decoder??So,utf8Encoder:e?.utf8Encoder??ja}),hY=e=>{const t=MD(e),n=()=>t().then(eD),r=dY(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??WM,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ID({serviceId:r.serviceId,clientVersion:FQ.version}),maxAttempts:e?.maxAttempts??gf,region:e?.region??OD("Region is missing"),requestHandler:Yp.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||yD),sha256:e?.sha256??AD,streamCollector:e?.streamCollector??Ab,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(cD)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(lD))}},zD=e=>({setRegion(t){e.region=t},region(){return e.region}}),LD=e=>({region:e.region()}),pY=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(i){const c=t.findIndex(l=>l.schemeId===i.schemeId);c===-1?t.push(i):t.splice(c,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){n=i},httpAuthSchemeProvider(){return n},setCredentials(i){r=i},credentials(){return r}}},mY=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),gY=(e,t)=>{const n=Object.assign(zD(e),tD(e),aM(e),pY(e));return t.forEach(r=>r.configure(n)),Object.assign(e,LD(n),nD(n),cM(n),mY(n))};class yY extends JM{config;constructor(...[t]){const n=hY(t||{});super(n),this.initConfig=n;const r=jQ(n),i=IM(r),c=_D(i),l=fD(c),f=l,d=gD(f),h=UQ(d),y=gY(h,t?.extensions||[]);this.config=y,this.middlewareStack.use(SM(this.config)),this.middlewareStack.use(aD(this.config)),this.middlewareStack.use(wD(this.config)),this.middlewareStack.use(dD(this.config)),this.middlewareStack.use(lM(this.config)),this.middlewareStack.use(uM(this.config)),this.middlewareStack.use(fM(this.config)),this.middlewareStack.use(dM(this.config,{httpAuthSchemeParametersProvider:LQ,identityProviderConfigProvider:async g=>new TM({"aws.auth#sigv4":g.credentials})})),this.middlewareStack.use(pM(this.config))}destroy(){super.destroy()}}class Fb extends Ea{constructor(t){super(t),Object.setPrototypeOf(this,Fb.prototype)}}const vY="AssociateCarrierIpAddress",BD="AdditionalInfo",bY="AttachmentId",SY="AmiLaunchIndex",_Y="AttachmentLimitType",wY="AssociatePublicIpAddress",EY="AutoRecoverySupported",xY="AllRegions",$D="AssociatedResource",UD="AutoRecovery",jD="AmdSevSnp",RY="ArchitectureTypeList",Vb="AttachTime",sm="AvailabilityZone",rm="AvailabilityZoneId",HD="Accelerators",CY="Affinity",FD="Arn",VD="Architecture",qD="Association",TY="Attachment",AY="Attachments",IY="BaselineBandwidthInGbps",GD="BaselineBandwidthInMbps",qb="BlockDeviceMapping",OY="BlockDeviceMappingList",MY="BlockDeviceMappingRequestList",Gb="BlockDeviceMappings",DY="BlockDurationMinutes",KD="BaselineIops",ZD="BootMode",kY="BootModeTypeList",PY="BareMetal",NY="BurstablePerformanceSupported",QD="BaselineThroughputInMBps",YD="BandwidthWeighting",zY="BandwidthWeightingTypeList",LY="BandwidthWeightings",BY="CapacityBlockId",$Y="CoreCountList",XD="CoreCount",UY="CpuCredits",jY="CreationDate",HY="CurrentGeneration",FY="CarrierIp",VY="CurrentInstanceBootMode",qY="CoreInfo",GY="CreateKeyPair",KY="CreateKeyPairRequest",Kb="CpuOptions",ZY="CustomerOwnedIp",QY="CpuOptionsRequest",Zb="CapacityReservationId",WD="CapacityReservationPreference",JD="CapacityReservationResourceGroupArn",YY="CapacityReservationSpecificationResponse",Qb="CapacityReservationSpecification",Yb="CapacityReservationTarget",XY="CapacityReservationTargetResponse",WY="CreditSpecificationRequest",JY="CreditSpecification",eX="CurrentState",Xb="ClientToken",tX="ConnectionTrackingConfiguration",nX="ConnectionTrackingSpecification",sX="ConnectionTrackingSpecificationRequest",rX="ConnectionTrackingSpecificationResponse",ek="CreateTime",oX="CreateVolumeRequest",iX="CreateVolume",tk="Code",nk="Configured",Bi="Count",aX="DisableApiStop",cX="DisableApiTermination",lX="DefaultCores",uX="DefaultEnaQueueCountPerInterface",fX="DedicatedHostsSupported",sk="DeviceIndex",dX="DiskInfoList",hX="DescribeImagesRequest",pX="DescribeImagesResult",mX="DescribeInstancesRequest",gX="DescribeInstancesResult",yX="DescribeInstanceTypesRequest",vX="DescribeInstanceTypesResult",bX="DescribeInstanceTypes",SX="DescribeImages",_X="DescribeInstances",wX="DiskInfo",EX="DeleteKeyPair",xX="DeleteKeyPairRequest",RX="DeleteKeyPairResult",CX="DescribeKeyPairsRequest",TX="DescribeKeyPairsResult",AX="DescribeKeyPairs",rk="DeviceName",IX="DefaultNetworkCardIndex",Tf="DeleteOnTermination",OX="DeregistrationProtection",Fn="DryRun",MX="DescribeRegionsRequest",DX="DescribeRegionsResult",kX="DescribeRegions",PX="DefaultThreadsPerCore",NX="DeprecationTime",zX="DefaultVCpus",LX="DeleteVolumeRequest",BX="DescribeVolumesRequest",$X="DescribeVolumesResult",UX="DeleteVolume",jX="DescribeVolumes",Wb="Description",HX="Device",FX="Disks",VX="EbsBlockDevice",qX="ExecutableByStringList",ok="ExecutableBy",om="EbsCardIndex",GX="EbsCardInfoList",KX="EbsCardInfo",ZX="EbsCards",QX="ElasticGpuAssociation",YX="ElasticGpuAssociationId",XX="ElasticGpuAssociationList",WX="ElasticGpuAssociationState",JX="ElasticGpuAssociationTime",eW="ElasticGpuAssociations",tW="ElasticGpuId",ik="ElasticGpuSpecification",nW="ElasticGpuSpecifications",ak="ElasticInferenceAccelerator",sW="ElasticInferenceAcceleratorAssociation",rW="ElasticInferenceAcceleratorAssociationId",oW="ElasticInferenceAcceleratorAssociationList",iW="ElasticInferenceAcceleratorAssociationState",aW="ElasticInferenceAcceleratorAssociationTime",cW="ElasticInferenceAcceleratorArn",lW="ElasticInferenceAcceleratorAssociations",ck="ElasticInferenceAccelerators",uW="EbsInstanceBlockDevice",fW="EncryptionInTransitSupported",lk="EbsInfo",uk="EfaInfo",fk="EbsOptimized",dk="EbsOptimizedInfo",dW="EnclaveOptionsRequest",hW="EbsOptimizedSupport",Jb="EnclaveOptions",pW="EnablePrimaryIpv6",hk="EnaQueueCount",pk="EnableResourceNameDnsAAAARecord",mk="EnableResourceNameDnsARecord",gk="EnaSrdEnabled",yk="EnaSrdSpecification",mW="EnaSrdSpecificationRequest",gW="EnaSrdSupported",vk="EnaSrdUdpEnabled",bk="EnaSrdUdpSpecification",yW="EnaSrdUdpSpecificationRequest",vW="EfaSupported",Sk="EncryptionSupport",eS="EnaSupport",bW="EndTime",SW="ExecutableUsers",_k="Ebs",tS="Enabled",nS="Encrypted",_W="Endpoint",wk="Force",wW="FpgaDeviceInfo",EW="FpgaDeviceInfoList",xW="FpgaDeviceMemoryInfo",RW="FlexibleEnaQueuesSupport",Ek="FpgaInfo",CW="FilterList",TW="FastRestored",xk="FreeTierEligible",ml="Filters",$i="Filter",AW="Fpgas",sS="Groups",IW="GpuDeviceInfo",OW="GpuDeviceInfoList",MW="GpuDeviceMemoryInfo",DW="GroupIdentifierList",Rk="GpuInfo",Ck="GroupId",kW="GroupIdentifier",Tk="GroupName",PW="GpuPartitionSize",NW="Gpus",Ak="HttpEndpoint",zW="HostId",rS="HibernationOptions",LW="HibernationOptionsRequest",Ik="HttpProtocolIpv6",Ok="HttpPutResponseHopLimit",BW="HostResourceGroupArn",$W="HibernationSupported",Mk="HttpTokens",Dk="HostnameType",UW="Hibernate",oS="Hypervisor",jW="Id",iS="Ipv6Addresses",kk="Ipv6AddressCount",HW="InstanceAttachmentEnaSrdSpecification",FW="InstanceAttachmentEnaSrdUdpSpecification",Pk="InferenceAcceleratorInfo",VW="Ipv4AddressesPerInterface",qW="Ipv6AddressesPerInterface",GW="ImageAllowed",aS="Ipv6Address",KW="InstanceBlockDeviceMapping",ZW="InstanceBlockDeviceMappingList",QW="IncludeDeprecated",YW="InferenceDeviceInfo",XW="InferenceDeviceInfoList",WW="InferenceDeviceMemoryInfo",JW="IncludeDisabled",Ro="InstanceId",eJ="InstanceIpv6Address",tJ="InstanceIpv6AddressList",nJ="InstanceInterruptionBehavior",cS="IamInstanceProfile",sJ="InstanceIpv4PrefixList",rJ="InstanceIpv6PrefixList",oJ="IamInstanceProfileSpecification",iJ="InstanceIpv4Prefix",aJ="InstanceIpv6Prefix",cJ="InstanceInitiatedShutdownBehavior",lJ="ImageIdStringList",uJ="InstanceIdStringList",Af="ImageId",fJ="ImageIds",If="InstanceIds",dJ="ImportKeyPair",hJ="ImportKeyPairRequest",pJ="ImportKeyPairResult",mJ="ImageLocation",gJ="ImageList",yJ="InstanceLifecycle",vJ="InstanceList",bJ="InstanceMaintenanceOptions",SJ="InstanceMaintenanceOptionsRequest",_J="InstanceMarketOptionsRequest",wJ="InstanceMetadataOptionsRequest",EJ="InstanceMetadataOptionsResponse",xJ="InstanceMarketOptions",Nk="InstanceMetadataTags",RJ="InstanceNetworkInterface",CJ="InstanceNetworkInterfaceAssociation",TJ="InstanceNetworkInterfaceAttachment",AJ="InstanceNetworkInterfaceList",IJ="InstanceNetworkInterfaceSpecification",OJ="InstanceNetworkInterfaceSpecificationList",MJ="InstanceNetworkPerformanceOptions",DJ="InstanceNetworkPerformanceOptionsRequest",kJ="ImageOwnerAlias",PJ="IpOwnerId",NJ="InstanceOwningService",zJ="Ipv6PrefixCount",LJ="Ipv4PrefixCount",BJ="InstancePrivateIpAddress",$J="InstancePrivateIpAddressList",UJ="IsPrimaryIpv6",jJ="IncludePublicKey",HJ="Ipv4PrefixList",FJ="Ipv6PrefixList",VJ="Ipv4PrefixSpecificationRequest",qJ="Ipv6PrefixSpecificationRequest",zk="Ipv6Prefixes",lS="Ipv6Prefix",Lk="Ipv4Prefixes",uS="Ipv4Prefix",GJ="InstanceStateChange",KJ="InstanceStateChangeList",Bk="InstanceStorageInfo",ZJ="InstanceStorageSupported",QJ="ImdsSupport",YJ="InstanceState",XJ="Ipv6Supported",im="InstanceType",WJ="InstanceTypeInfoList",JJ="InstanceTypeInfo",eee="ImageType",$k="InstanceTypes",Uk="InterfaceType",tee="Images",nee="Image",see="Instance",ree="Instances",am="Iops",oee="Key",iee="KeyFormat",fS="KeyFingerprint",dS="KernelId",hS="KmsKeyId",aee="KeyMaterial",$r="KeyName",cee="KeyNameStringList",lee="KeyNames",uee="KeyPairs",Ha="KeyPairId",fee="KeyPairIdStringList",dee="KeyPairIds",hee="KeyPairInfo",pee="KeyPairList",mee="KeyPair",jk="KeyType",Hk="LicenseConfigurationArn",gee="LicenseConfigurationRequest",yee="LicenseConfiguration",vee="LogicalGpuCount",bee="LicenseList",See="LastLaunchedTime",_ee="LicenseSpecifications",wee="LicenseSpecificationListRequest",Eee="LicenseSpecification",xee="LaunchTemplate",Ree="LaunchTemplateId",Cee="LaunchTemplateName",Tee="LaunchTemplateSpecification",Aee="LaunchTime",Iee="Licenses",pS="MultiAttachEnabled",Fk="MediaAcceleratorInfo",Oee="MacAddress",Vk="MaximumBandwidthInMbps",Mee="MaxCount",Dee="MinCount",kee="MediaDeviceInfo",Pee="MediaDeviceInfoList",Nee="MediaDeviceMemoryInfo",zee="MaximumEbsAttachments",Lee="MaximumEbsCards",Bee="MaximumEfaInterfaces",$ee="MaximumEnaQueueCount",Uee="MaximumEnaQueueCountPerInterface",qk="MaximumIops",Fa="MemoryInfo",jee="MaximumNetworkCards",Gk="MaximumNetworkInterfaces",Kk="MetadataOptions",Zk="MaintenanceOptions",Hee="MaxPrice",cm="MaxResults",Fee="ModificationState",Vee="MarketType",Qk="MaximumThroughputInMBps",qee="ModifyVolumeRequest",Gee="ModifyVolumeResult",Kee="ModifyVolume",Of="Manufacturer",Zee="Managed",Qee="Message",mS="Monitoring",Co="Name",Yee="NetworkCards",gS="NetworkCardIndex",Xee="NetworkCardInfoList",Wee="NetworkCardInfo",Jee="NoDevice",ete="NeuronDeviceCoreInfo",tte="NeuronDeviceInfo",nte="NeuronDeviceInfoList",ste="NeuronDeviceMemoryInfo",rte="NeuronDevices",ote="NitroEnclavesSupport",Yk="NetworkInterfaceId",Xk="NetworkInterfaces",Wk="NetworkInfo",Jk="NeuronInfo",e3="NetworkPerformanceOptions",t3="NetworkPerformance",n3="NvmeSupport",s3="NitroTpmInfo",ite="NitroTpmSupport",ate="NitroTpmSupportedVersionsList",Ui="NextToken",lm="OutpostArn",yS="OwnerId",cte="OptInStatus",lte="OriginalIops",ute="OriginalMultiAttachEnabled",fte="OperatorRequest",dte="OperatorResponse",hte="OwnerStringList",pte="OriginalSize",mte="OriginalThroughput",gte="OriginalVolumeType",gl="Operator",yte="Owners",r3="Owner",o3="Principal",vte="PeakBandwidthInGbps",bte="ProductCodeId",Ste="ProductCodeList",_te="ProductCodeType",wte="ProductCode",i3="ProductCodes",vS="PrivateDnsName",a3="PrivateDnsNameOptions",Ete="PrivateDnsNameOptionsRequest",xte="PrivateDnsNameOptionsResponse",c3="PublicDnsName",l3="PlatformDetails",u3="PlacementGroupInfo",Rte="PlacementGroupStrategyList",Cte="PublicIp",Tte="PrivateIpAddressSpecification",Ate="PrivateIpAddressSpecificationList",yl="PrivateIpAddress",f3="PrivateIpAddresses",Ite="PublicIpAddress",Ote="PrimaryIpv6",d3="ProcessorInfo",Mte="PublicKey",Dte="PublicKeyMaterial",kte="PartitionNumber",Pte="PhcSupport",Nte="PreviousState",h3="Platform",bS="Placement",p3="Primary",zte="Progress",Lte="Public",Bte="Return",m3="RootDeviceName",g3="RootDeviceType",$te="RootDeviceTypeList",Ute="RunInstancesMonitoringEnabled",jte="RebootInstancesRequest",Hte="RunInstancesRequest",Fte="RunInstancesUserData",SS="RamdiskId",Vte="ReservationId",qte="RebootInstances",Gte="RequesterId",Kte="RunInstances",Zte="RegionList",Qte="ReservationList",Yte="RebootMigrationSupport",Xte="RebootMigration",_S="RegionName",Wte="RegionNameStringList",Jte="RegionNames",ene="ResourceType",tne="Regions",nne="Region",sne="Reservations",rne="Reservation",one="SupportedAdditionalProcessorFeatureList",ine="SupportedArchitectures",ane="SupportedBootModes",cne="SustainedClockSpeedInGhz",y3="SourceDestCheck",lne="SpreadDomain",une="SupportedFeatures",v3="SecurityGroups",wS="SecurityGroupId",fne="SecurityGroupIdStringList",dne="SecurityGroupIds",hne="SecurityGroupStringList",b3="SecurityGroup",pne="SizeInGB",mne="SourceImageId",gne="SourceInstanceId",vl="SizeInMiB",yne="SpotInstanceRequestId",vne="SourceImageRegion",bne="StartInstancesRequest",Sne="StartInstancesResult",_ne="StopInstancesRequest",wne="StopInstancesResult",Ene="SpotInstanceType",ES="SnapshotId",xne="StartingInstances",Rne="StartInstances",Cne="StoppingInstances",Tne="StopInstances",um="SubnetId",Ane="SpotMarketOptions",Ine="StatusMessage",S3="SriovNetSupport",One="SpotOptions",_3="SkipOsShutdown",Mne="SecondaryPrivateIpAddressCount",Dne="SupportedRootDeviceTypes",xS="StateReason",kne="SupportedStrategies",Pne="StartTime",Nne="StateTransitionReason",zne="SseType",Lne="SupportedUsageClasses",Bne="SensitiveUserData",$ne="SourceVolumeId",Une="SupportedVirtualizationTypes",jne="SupportedVersions",RS="Size",bl="State",CS="Status",Va="Tags",w3="TcpEstablishedTimeout",Hne="TotalFpgaMemoryInMiB",Fne="TotalGpuMemoryInMiB",Vne="TerminateInstances",qne="TotalInferenceMemoryInMiB",Gne="TerminateInstancesRequest",Kne="TerminateInstancesResult",Zne="TargetIops",Qne="TerminatingInstances",Yne="TagList",Xne="TargetMultiAttachEnabled",Wne="TotalMediaMemoryInMiB",Jne="TotalNeuronDeviceMemoryInMiB",E3="ThreadsPerCore",ese="ThreadsPerCoreList",fm="TagSpecifications",tse="TotalSizeInGB",nse="TagSpecificationList",Mf="TagSpecification",sse="TargetSize",x3="TpmSupport",rse="TargetThroughput",ose="TargetVolumeType",R3="Tag",ise="Tenancy",dm="Throughput",TS="Type",ase="UsageClassTypeList",cse="UserData",C3="UsageOperation",lse="UsageOperationUpdateTime",T3="UdpStreamTimeout",A3="UdpTimeout",I3="Value",use="VolumeAttachmentList",fse="VolumeAttachment",O3="VCpuInfo",dse="ValidCores",M3="VpcId",AS="VolumeInitializationRate",hse="VolumeIdStringList",ji="VolumeId",pse="VolumeIds",mse="VolumeList",D3="VolumeModification",gse="VirtualName",yse="VolumeOwnerId",vse="ValueStringList",bse="VolumeSize",hm="VolumeType",Sse="VirtualizationTypeList",_se="ValidThreadsPerCore",k3="VirtualizationType",wse="ValidUntil",Ese="Values",P3="Version",xse="Volumes",Rse="Volume",Cse="WorkloadsList",Tse="Workloads",N3="additionalInfo",Ase="attachmentId",Ise="amiLaunchIndex",Ose="attachmentLimitType",Mse="associatePublicIpAddress",Dse="autoRecoverySupported",z3="associatedResource",kse="autoRecovery",Pse="amdSevSnp",Nse="attachmentSet",IS="attachTime",OS="availabilityZone",L3="availabilityZoneId",B3="accelerators",zse="affinity",$3="arn",U3="architecture",j3="association",Lse="attachment",Bse="baselineBandwidthInGbps",H3="baselineBandwidthInMbps",F3="blockDeviceMapping",V3="baselineIops",q3="bootMode",$se="bareMetal",Use="burstablePerformanceSupported",G3="baselineThroughputInMBps",jse="bandwidthWeighting",Hse="bandwidthWeightings",Fse="capacityBlockId",Vse="coreCount",qse="creationDate",Gse="currentGeneration",Kse="carrierIp",Zse="currentInstanceBootMode",Qse="coreInfo",Yse="cpuOptions",Xse="customerOwnedIp",K3="capacityReservationId",Wse="capacityReservationPreference",Jse="capacityReservationResourceGroupArn",ere="capacityReservationSpecification",tre="capacityReservationTarget",nre="currentState",Z3="clientToken",sre="connectionTrackingConfiguration",Q3="createTime",Y3="code",rre="configured",qa="count",ore="disableApiTermination",ire="defaultCores",are="defaultEnaQueueCountPerInterface",cre="dedicatedHostsSupported",X3="deviceIndex",W3="deviceName",lre="defaultNetworkCardIndex",ure="dnsName",Df="deleteOnTermination",fre="deregistrationProtection",as="dryRun",dre="defaultThreadsPerCore",hre="deprecationTime",pre="defaultVCpus",MS="description",mre="device",gre="disks",DS="ebsCardIndex",yre="ebsCardSet",vre="elasticGpuAssociationId",bre="elasticGpuAssociationState",Sre="elasticGpuAssociationSet",_re="elasticGpuAssociationTime",wre="elasticGpuId",Ere="elasticInferenceAcceleratorArn",xre="elasticInferenceAcceleratorAssociationId",Rre="elasticInferenceAcceleratorAssociationState",Cre="elasticInferenceAcceleratorAssociationSet",Tre="elasticInferenceAcceleratorAssociationTime",Are="encryptionInTransitSupported",Ire="ebsInfo",Ore="efaInfo",J3="ebsOptimized",Mre="ebsOptimizedInfo",Dre="ebsOptimizedSupport",kre="enclaveOptions",Pre="enaQueueCount",E="ec2QueryName",Nre="enableResourceNameDnsAAAARecord",zre="enableResourceNameDnsARecord",Lre="enaSrdEnabled",Bre="enaSrdSpecification",$re="enaSrdSupported",Ure="enaSrdUdpEnabled",jre="enaSrdUdpSpecification",Hre="efaSupported",eP="encryptionSupport",kS="enaSupport",Fre="endTime",tP="ebs",nP="enabled",PS="encrypted",Vre="flexibleEnaQueuesSupport",qre="fpgaInfo",Gre="fastRestored",sP="freeTierEligible",Kre="force",Zre="fpgas",Qre="gpuInfo",rP="groupId",oP="groupName",Yre="gpuPartitionSize",NS="groupSet",Xre="gpus",zS="hypervisor",Wre="httpEndpoint",Jre="hostId",eoe="hibernationOptions",toe="httpProtocolIpv6",noe="httpPutResponseHopLimit",soe="hostResourceGroupArn",roe="hibernationSupported",ooe="httpTokens",ioe="hostnameType",aoe="id",coe="ipv6AddressCount",loe="inferenceAcceleratorInfo",uoe="ipv4AddressesPerInterface",foe="ipv6AddressesPerInterface",iP="ipv6AddressesSet",doe="imageAllowed",hoe="ipAddress",aP="ipv6Address",LS="instanceId",cP="iamInstanceProfile",poe="instanceInitiatedShutdownBehavior",lP="imageId",moe="imageLocation",goe="instanceLifecycle",yoe="instanceMetadataTags",voe="imageOwnerAlias",boe="imageOwnerId",Soe="ipOwnerId",_oe="instanceOwningService",woe="isPrimaryIpv6",Eoe="ipv4PrefixSet",xoe="ipv6PrefixSet",Roe="ipv4Prefix",Coe="ipv6Prefix",Toe="isPublic",Aoe="instanceStorageInfo",Ioe="instanceStorageSupported",Ooe="imagesSet",Moe="imageState",Doe="imdsSupport",pm="instancesSet",koe="instanceState",Poe="ipv6Supported",uP="instanceType",Noe="instanceTypeSet",zoe="idempotencyToken",Loe="imageType",Boe="interfaceType",fP="iops",je="item",$oe="key",BS="keyFingerprint",dP="kernelId",hP="kmsKeyId",Uoe="keyMaterial",kf="keyName",mm="keyPairId",joe="keySet",Hoe="keyType",Foe="licenseConfigurationArn",Voe="logicalGpuCount",qoe="lastLaunchedTime",Goe="licenseSet",Koe="launchTime",Zoe="multiAttachEnabled",Qoe="mediaAcceleratorInfo",Yoe="macAddress",pP="maximumBandwidthInMbps",Xoe="maximumEbsAttachments",Woe="maximumEbsCards",Joe="maximumEfaInterfaces",eie="maximumEnaQueueCount",tie="maximumEnaQueueCountPerInterface",mP="maximumIops",Sl="memoryInfo",nie="maximumNetworkCards",gP="maximumNetworkInterfaces",sie="metadataOptions",rie="maintenanceOptions",yP="maxResults",oie="modificationState",vP="maximumThroughputInMBps",Pf="manufacturer",iie="managed",aie="message",cie="monitoring",Hi="name",lie="networkCards",bP="networkCardIndex",uie="noDevice",fie="neuronDevices",die="nitroEnclavesSupport",SP="networkInterfaceId",hie="networkInterfaceSet",pie="networkInterface",mie="networkInfo",gie="neuronInfo",yie="networkPerformanceOptions",_P="networkPerformance",wP="nvmeSupport",vie="nitroTpmInfo",bie="nitroTpmSupport",_l="nextToken",$S="outpostArn",EP="ownerId",Sie="optInStatus",_ie="originalIops",wie="originalMultiAttachEnabled",Eie="originalSize",xie="originalThroughput",Rie="originalVolumeType",gm="operator",Cie="principal",Tie="peakBandwidthInGbps",xP="productCodes",Aie="productCode",Iie="privateDnsNameOptions",US="privateDnsName",Oie="publicDnsName",RP="platformDetails",Mie="placementGroupInfo",Die="publicIp",CP="privateIpAddressesSet",wl="privateIpAddress",kie="processorInfo",Pie="publicKey",Nie="publicKeyMaterial",zie="partitionNumber",Lie="phcSupport",Bie="previousState",TP="platform",$ie="placement",AP="primary",Uie="progress",jie="return",IP="rootDeviceName",OP="rootDeviceType",Hie="regionEndpoint",Fie="reservationId",MP="ramdiskId",Vie="regionInfo",qie="requesterId",Gie="rebootMigrationSupport",Kie="rebootMigration",Zie="regionName",Qie="reservationSet",Yie="resourceType",Xie="reason",Wie="supportedArchitectures",Jie="supportedBootModes",eae="sustainedClockSpeedInGhz",DP="sourceDestCheck",tae="spreadDomain",nae="supportedFeatures",sae="sizeInGB",rae="sourceInstanceId",oae="sourceImageId",El="sizeInMiB",iae="sourceImageRegion",aae="spotInstanceRequestId",kP="snapshotId",jS="subnetId",cae="statusMessage",PP="sriovNetSupport",lae="secondaryPrivateIpAddressCount",uae="supportedRootDeviceTypes",NP="stateReason",fae="supportedStrategies",dae="startTime",hae="sseType",pae="supportedUsageClasses",mae="sourceVolumeId",gae="supportedVirtualizationTypes",yae="supportedVersions",vae="size",zP="smithy.ts.sdk.synthetic.com.amazonaws.ec2",LP="state",Nf="status",bae="tenancy",Sae="tcpEstablishedTimeout",_ae="totalFpgaMemoryInMiB",wae="totalGpuMemoryInMiB",Eae="totalInferenceMemoryInMiB",xae="targetIops",Rae="targetMultiAttachEnabled",Cae="totalMediaMemoryInMiB",Tae="totalNeuronDeviceMemoryInMiB",Aae="threadsPerCore",xl="tagSet",Iae="totalSizeInGB",Oae="targetSize",BP="tpmSupport",Mae="targetThroughput",Dae="targetVolumeType",$P="throughput",UP="type",jP="usageOperation",kae="usageOperationUpdateTime",Pae="udpStreamTimeout",Nae="udpTimeout",zae="value",Lae="vCpuInfo",Bae="validCores",HP="vpcId",$ae="volumeInitializationRate",ym="volumeId",Uae="volumeModification",jae="virtualName",Hae="volumeOwnerId",Fae="volumeSet",Vae="volumeSize",FP="volumeType",qae="validThreadsPerCore",VP="virtualizationType",Gae="version",Kae="workloadSet",S="xmlName",H="com.amazonaws.ec2";var Zae=[0,H,Fte,8,0],Qae=[0,H,Bne,8,0],qP=[3,H,qb,0,[_k,Jee,rk,gse],[[()=>Ece,{[E]:"Ebs",[S]:tP}],[0,{[E]:"NoDevice",[S]:uie}],[0,{[E]:"DeviceName",[S]:W3}],[0,{[E]:"VirtualName",[S]:jae}]]],Yae=[3,H,Qb,0,[WD,Yb],[0,()=>Wae]],Xae=[3,H,YY,0,[WD,Yb],[[0,{[E]:"CapacityReservationPreference",[S]:Wse}],[()=>Jae,{[E]:"CapacityReservationTarget",[S]:tre}]]],Wae=[3,H,Yb,0,[Zb,JD],[0,0]],Jae=[3,H,XY,0,[Zb,JD],[[0,{[E]:"CapacityReservationId",[S]:K3}],[0,{[E]:"CapacityReservationResourceGroupArn",[S]:Jse}]]],ece=[3,H,sX,0,[w3,T3,A3],[1,1,1]],tce=[3,H,rX,0,[w3,T3,A3],[[1,{[E]:"TcpEstablishedTimeout",[S]:Sae}],[1,{[E]:"UdpStreamTimeout",[S]:Pae}],[1,{[E]:"UdpTimeout",[S]:Nae}]]],nce=[3,H,Kb,0,[XD,E3,jD],[[1,{[E]:"CoreCount",[S]:Vse}],[1,{[E]:"ThreadsPerCore",[S]:Aae}],[0,{[E]:"AmdSevSnp",[S]:Pse}]]],sce=[3,H,QY,0,[XD,E3,jD],[1,1,0]],rce=[3,H,KY,0,[$r,jk,fm,iee,Fn],[0,0,[()=>bm,{[S]:Mf}],0,[2,{[E]:"DryRun",[S]:as}]],1],oce=[3,H,oX,0,[sm,rm,nS,am,hS,lm,RS,ES,hm,fm,pS,dm,Xb,AS,gl,Fn],[0,0,[2,{[E]:"Encrypted",[S]:PS}],1,0,0,1,0,0,[()=>bm,{[S]:Mf}],2,1,[0,4],1,()=>KP,[2,{[E]:"DryRun",[S]:as}]]],ice=[3,H,WY,0,[UY],[0],1],ace=[3,H,xX,0,[$r,Ha,Fn],[0,0,[2,{[E]:"DryRun",[S]:as}]]],cce=[3,H,RX,0,[Bte,Ha],[[2,{[E]:"Return",[S]:jie}],[0,{[E]:"KeyPairId",[S]:mm}]]],lce=[3,H,LX,0,[ji,Fn],[0,[2,{[E]:"DryRun",[S]:as}]],1],uce=[3,H,hX,0,[SW,fJ,yte,QW,JW,cm,Ui,Fn,ml],[[()=>xue,{[S]:ok}],[()=>Tue,{[S]:Af}],[()=>Que,{[S]:r3}],2,2,1,0,[2,{[E]:"DryRun",[S]:as}],[()=>Rl,{[S]:$i}]]],fce=[3,H,pX,0,[Ui,tee],[[0,{[E]:"NextToken",[S]:_l}],[()=>Aue,{[E]:"ImagesSet",[S]:Ooe}]]],dce=[3,H,mX,0,[If,Fn,ml,Ui,cm],[[()=>zf,{[S]:Ro}],[2,{[E]:"DryRun",[S]:as}],[()=>Rl,{[S]:$i}],[0,{[E]:"NextToken",[S]:_l}],[1,{[E]:"MaxResults",[S]:yP}]]],hce=[3,H,gX,0,[Ui,sne],[[0,{[E]:"NextToken",[S]:_l}],[()=>efe,{[E]:"ReservationSet",[S]:Qie}]]],pce=[3,H,yX,0,[Fn,$k,ml,cm,Ui],[2,[64,{[S]:im}],[()=>Rl,{[S]:$i}],1,0]],mce=[3,H,vX,0,[$k,Ui],[[()=>Lue,{[E]:"InstanceTypeSet",[S]:Noe}],[0,{[E]:"NextToken",[S]:_l}]]],gce=[3,H,CX,0,[lee,dee,jJ,Fn,ml],[[()=>Uue,{[S]:$r}],[()=>jue,{[S]:Ha}],2,[2,{[E]:"DryRun",[S]:as}],[()=>Rl,{[S]:$i}]]],yce=[3,H,TX,0,[uee],[[()=>Hue,{[E]:"KeySet",[S]:joe}]]],vce=[3,H,MX,0,[Jte,xY,Fn,ml],[[()=>Jue,{[S]:_S}],2,[2,{[E]:"DryRun",[S]:as}],[()=>Rl,{[S]:$i}]]],bce=[3,H,DX,0,[tne],[[()=>Wue,{[E]:"RegionInfo",[S]:Vie}]]],Sce=[3,H,BX,0,[pse,Fn,ml,Ui,cm],[[()=>lfe,{[S]:ji}],[2,{[E]:"DryRun",[S]:as}],[()=>Rl,{[S]:$i}],[0,{[E]:"NextToken",[S]:_l}],[1,{[E]:"MaxResults",[S]:yP}]]],_ce=[3,H,$X,0,[Ui,xse],[[0,{[E]:"NextToken",[S]:_l}],[()=>ufe,{[E]:"VolumeSet",[S]:Fae}]]],wce=[3,H,wX,0,[pne,Bi,TS],[[1,{[E]:"SizeInGB",[S]:sae}],[1,{[E]:"Count",[S]:qa}],[0,{[E]:"Type",[S]:UP}]]],Ece=[3,H,VX,0,[Tf,am,ES,bse,hm,hS,dm,lm,sm,nS,AS,rm,om],[[2,{[E]:"DeleteOnTermination",[S]:Df}],[1,{[E]:"Iops",[S]:fP}],[0,{[E]:"SnapshotId",[S]:kP}],[1,{[E]:"VolumeSize",[S]:Vae}],[0,{[E]:"VolumeType",[S]:FP}],[0,{[E]:"KmsKeyId",[S]:hP}],[1,{[E]:"Throughput",[S]:$P}],[0,{[E]:"OutpostArn",[S]:$S}],[0,{[E]:"AvailabilityZone",[S]:OS}],[2,{[E]:"Encrypted",[S]:PS}],1,0,1]],xce=[3,H,KX,0,[om,GD,QD,KD,Vk,Qk,qk],[[1,{[E]:"EbsCardIndex",[S]:DS}],[1,{[E]:"BaselineBandwidthInMbps",[S]:H3}],[1,{[E]:"BaselineThroughputInMBps",[S]:G3}],[1,{[E]:"BaselineIops",[S]:V3}],[1,{[E]:"MaximumBandwidthInMbps",[S]:pP}],[1,{[E]:"MaximumThroughputInMBps",[S]:vP}],[1,{[E]:"MaximumIops",[S]:mP}]]],Rce=[3,H,lk,0,[hW,Sk,dk,n3,zee,_Y,Lee,ZX],[[0,{[E]:"EbsOptimizedSupport",[S]:Dre}],[0,{[E]:"EncryptionSupport",[S]:eP}],[()=>Tce,{[E]:"EbsOptimizedInfo",[S]:Mre}],[0,{[E]:"NvmeSupport",[S]:wP}],[1,{[E]:"MaximumEbsAttachments",[S]:Xoe}],[0,{[E]:"AttachmentLimitType",[S]:Ose}],[1,{[E]:"MaximumEbsCards",[S]:Woe}],[()=>bue,{[E]:"EbsCardSet",[S]:yre}]]],Cce=[3,H,uW,0,[Vb,Tf,CS,ji,$D,yse,gl,om],[[4,{[E]:"AttachTime",[S]:IS}],[2,{[E]:"DeleteOnTermination",[S]:Df}],[0,{[E]:"Status",[S]:Nf}],[0,{[E]:"VolumeId",[S]:ym}],[0,{[E]:"AssociatedResource",[S]:z3}],[0,{[E]:"VolumeOwnerId",[S]:Hae}],[()=>vm,{[E]:"Operator",[S]:gm}],[1,{[E]:"EbsCardIndex",[S]:DS}]]],Tce=[3,H,dk,0,[GD,QD,KD,Vk,Qk,qk],[[1,{[E]:"BaselineBandwidthInMbps",[S]:H3}],[1,{[E]:"BaselineThroughputInMBps",[S]:G3}],[1,{[E]:"BaselineIops",[S]:V3}],[1,{[E]:"MaximumBandwidthInMbps",[S]:pP}],[1,{[E]:"MaximumThroughputInMBps",[S]:vP}],[1,{[E]:"MaximumIops",[S]:mP}]]],Ace=[3,H,uk,0,[Bee],[[1,{[E]:"MaximumEfaInterfaces",[S]:Joe}]]],Ice=[3,H,QX,0,[tW,YX,WX,JX],[[0,{[E]:"ElasticGpuId",[S]:wre}],[0,{[E]:"ElasticGpuAssociationId",[S]:vre}],[0,{[E]:"ElasticGpuAssociationState",[S]:bre}],[0,{[E]:"ElasticGpuAssociationTime",[S]:_re}]]],Oce=[3,H,ik,0,[TS],[0],1],Mce=[3,H,ak,0,[TS,Bi],[0,1],1],Dce=[3,H,sW,0,[cW,rW,iW,aW],[[0,{[E]:"ElasticInferenceAcceleratorArn",[S]:Ere}],[0,{[E]:"ElasticInferenceAcceleratorAssociationId",[S]:xre}],[0,{[E]:"ElasticInferenceAcceleratorAssociationState",[S]:Rre}],[4,{[E]:"ElasticInferenceAcceleratorAssociationTime",[S]:Tre}]]],kce=[3,H,mW,0,[gk,bk],[2,()=>Pce]],Pce=[3,H,yW,0,[vk],[2]],Nce=[3,H,Jb,0,[tS],[[2,{[E]:"Enabled",[S]:nP}]]],zce=[3,H,dW,0,[tS],[2]],Lce=[3,H,$i,0,[Co,Ese],[0,[()=>ife,{[S]:I3}]]],Bce=[3,H,wW,0,[Co,Of,Bi,Fa],[[0,{[E]:"Name",[S]:Hi}],[0,{[E]:"Manufacturer",[S]:Pf}],[1,{[E]:"Count",[S]:qa}],[()=>$ce,{[E]:"MemoryInfo",[S]:Sl}]]],$ce=[3,H,xW,0,[vl],[[1,{[E]:"SizeInMiB",[S]:El}]]],Uce=[3,H,Ek,0,[AW,Hne],[[()=>Rue,{[E]:"Fpgas",[S]:Zre}],[1,{[E]:"TotalFpgaMemoryInMiB",[S]:_ae}]]],jce=[3,H,IW,0,[Co,Of,Bi,vee,PW,Tse,Fa],[[0,{[E]:"Name",[S]:Hi}],[0,{[E]:"Manufacturer",[S]:Pf}],[1,{[E]:"Count",[S]:qa}],[1,{[E]:"LogicalGpuCount",[S]:Voe}],[1,{[E]:"GpuPartitionSize",[S]:Yre}],[()=>ffe,{[E]:"WorkloadSet",[S]:Kae}],[()=>Hce,{[E]:"MemoryInfo",[S]:Sl}]]],Hce=[3,H,MW,0,[vl],[[1,{[E]:"SizeInMiB",[S]:El}]]],Fce=[3,H,Rk,0,[NW,Fne],[[()=>Cue,{[E]:"Gpus",[S]:Xre}],[1,{[E]:"TotalGpuMemoryInMiB",[S]:wae}]]],Vce=[3,H,kW,0,[Ck,Tk],[[0,{[E]:"GroupId",[S]:rP}],[0,{[E]:"GroupName",[S]:oP}]]],qce=[3,H,rS,0,[nk],[[2,{[E]:"Configured",[S]:rre}]]],Gce=[3,H,LW,0,[nk],[2]],Kce=[3,H,cS,0,[FD,jW],[[0,{[E]:"Arn",[S]:$3}],[0,{[E]:"Id",[S]:aoe}]]],Zce=[3,H,oJ,0,[FD,Co],[[0,{[E]:"Arn",[S]:$3}],[0,{[E]:"Name",[S]:Hi}]]],Qce=[3,H,nee,0,[l3,C3,Gb,Wb,eS,oS,kJ,Co,m3,g3,S3,xS,Va,k3,ZD,x3,NX,QJ,gne,OX,See,GW,mne,vne,xk,Af,mJ,bl,yS,jY,Lte,i3,VD,eee,dS,SS,h3],[[0,{[E]:"PlatformDetails",[S]:RP}],[0,{[E]:"UsageOperation",[S]:jP}],[()=>pue,{[E]:"BlockDeviceMapping",[S]:F3}],[0,{[E]:"Description",[S]:MS}],[2,{[E]:"EnaSupport",[S]:kS}],[0,{[E]:"Hypervisor",[S]:zS}],[0,{[E]:"ImageOwnerAlias",[S]:voe}],[0,{[E]:"Name",[S]:Hi}],[0,{[E]:"RootDeviceName",[S]:IP}],[0,{[E]:"RootDeviceType",[S]:OP}],[0,{[E]:"SriovNetSupport",[S]:PP}],[()=>YP,{[E]:"StateReason",[S]:NP}],[()=>Ga,{[E]:"TagSet",[S]:xl}],[0,{[E]:"VirtualizationType",[S]:VP}],[0,{[E]:"BootMode",[S]:q3}],[0,{[E]:"TpmSupport",[S]:BP}],[0,{[E]:"DeprecationTime",[S]:hre}],[0,{[E]:"ImdsSupport",[S]:Doe}],[0,{[E]:"SourceInstanceId",[S]:rae}],[0,{[E]:"DeregistrationProtection",[S]:fre}],[0,{[E]:"LastLaunchedTime",[S]:qoe}],[2,{[E]:"ImageAllowed",[S]:doe}],[0,{[E]:"SourceImageId",[S]:oae}],[0,{[E]:"SourceImageRegion",[S]:iae}],[2,{[E]:"FreeTierEligible",[S]:sP}],[0,{[E]:"ImageId",[S]:lP}],[0,{[E]:"ImageLocation",[S]:moe}],[0,{[E]:"ImageState",[S]:Moe}],[0,{[E]:"ImageOwnerId",[S]:boe}],[0,{[E]:"CreationDate",[S]:qse}],[2,{[E]:"IsPublic",[S]:Toe}],[()=>JP,{[E]:"ProductCodes",[S]:xP}],[0,{[E]:"Architecture",[S]:U3}],[0,{[E]:"ImageType",[S]:Loe}],[0,{[E]:"KernelId",[S]:dP}],[0,{[E]:"RamdiskId",[S]:MP}],[0,{[E]:"Platform",[S]:TP}]]],Yce=[3,H,hJ,0,[$r,Dte,fm,Fn],[[0,{[E]:"KeyName",[S]:kf}],[21,{[E]:"PublicKeyMaterial",[S]:Nie}],[()=>bm,{[S]:Mf}],[2,{[E]:"DryRun",[S]:as}]],2],Xce=[3,H,pJ,0,[fS,$r,Ha,Va],[[0,{[E]:"KeyFingerprint",[S]:BS}],[0,{[E]:"KeyName",[S]:kf}],[0,{[E]:"KeyPairId",[S]:mm}],[()=>Ga,{[E]:"TagSet",[S]:xl}]]],Wce=[3,H,Pk,0,[HD,qne],[[()=>Iue,{[E]:"Accelerators",[S]:B3}],[1,{[E]:"TotalInferenceMemoryInMiB",[S]:Eae}]]],Jce=[3,H,YW,0,[Bi,Co,Of,Fa],[[1,{[E]:"Count",[S]:qa}],[0,{[E]:"Name",[S]:Hi}],[0,{[E]:"Manufacturer",[S]:Pf}],[()=>ele,{[E]:"MemoryInfo",[S]:Sl}]]],ele=[3,H,WW,0,[vl],[[1,{[E]:"SizeInMiB",[S]:El}]]],tle=[3,H,see,0,[VD,Gb,Xb,fk,eS,oS,cS,yJ,eW,lW,Xk,lm,m3,g3,v3,y3,yne,S3,xS,Va,k3,Kb,BY,Zb,Qb,rS,Iee,Kk,Jb,ZD,l3,C3,lse,a3,aS,x3,Zk,VY,e3,gl,Ro,Af,bl,vS,c3,Nne,$r,SY,i3,im,Aee,bS,dS,SS,h3,mS,um,M3,yl,Ite],[[0,{[E]:"Architecture",[S]:U3}],[()=>Oue,{[E]:"BlockDeviceMapping",[S]:F3}],[0,{[E]:"ClientToken",[S]:Z3}],[2,{[E]:"EbsOptimized",[S]:J3}],[2,{[E]:"EnaSupport",[S]:kS}],[0,{[E]:"Hypervisor",[S]:zS}],[()=>Kce,{[E]:"IamInstanceProfile",[S]:cP}],[0,{[E]:"InstanceLifecycle",[S]:goe}],[()=>Sue,{[E]:"ElasticGpuAssociationSet",[S]:Sre}],[()=>wue,{[E]:"ElasticInferenceAcceleratorAssociationSet",[S]:Cre}],[()=>Pue,{[E]:"NetworkInterfaceSet",[S]:hie}],[0,{[E]:"OutpostArn",[S]:$S}],[0,{[E]:"RootDeviceName",[S]:IP}],[0,{[E]:"RootDeviceType",[S]:OP}],[()=>HS,{[E]:"GroupSet",[S]:NS}],[2,{[E]:"SourceDestCheck",[S]:DP}],[0,{[E]:"SpotInstanceRequestId",[S]:aae}],[0,{[E]:"SriovNetSupport",[S]:PP}],[()=>YP,{[E]:"StateReason",[S]:NP}],[()=>Ga,{[E]:"TagSet",[S]:xl}],[0,{[E]:"VirtualizationType",[S]:VP}],[()=>nce,{[E]:"CpuOptions",[S]:Yse}],[0,{[E]:"CapacityBlockId",[S]:Fse}],[0,{[E]:"CapacityReservationId",[S]:K3}],[()=>Xae,{[E]:"CapacityReservationSpecification",[S]:ere}],[()=>qce,{[E]:"HibernationOptions",[S]:eoe}],[()=>Fue,{[E]:"LicenseSet",[S]:Goe}],[()=>dle,{[E]:"MetadataOptions",[S]:sie}],[()=>Nce,{[E]:"EnclaveOptions",[S]:kre}],[0,{[E]:"BootMode",[S]:q3}],[0,{[E]:"PlatformDetails",[S]:RP}],[0,{[E]:"UsageOperation",[S]:jP}],[4,{[E]:"UsageOperationUpdateTime",[S]:kae}],[()=>qle,{[E]:"PrivateDnsNameOptions",[S]:Iie}],[0,{[E]:"Ipv6Address",[S]:aP}],[0,{[E]:"TpmSupport",[S]:BP}],[()=>cle,{[E]:"MaintenanceOptions",[S]:rie}],[0,{[E]:"CurrentInstanceBootMode",[S]:Zse}],[()=>gle,{[E]:"NetworkPerformanceOptions",[S]:yie}],[()=>vm,{[E]:"Operator",[S]:gm}],[0,{[E]:"InstanceId",[S]:LS}],[0,{[E]:"ImageId",[S]:lP}],[()=>$v,{[E]:"InstanceState",[S]:koe}],[0,{[E]:"PrivateDnsName",[S]:US}],[0,{[E]:"DnsName",[S]:ure}],[0,{[E]:"Reason",[S]:Xie}],[0,{[E]:"KeyName",[S]:kf}],[1,{[E]:"AmiLaunchIndex",[S]:Ise}],[()=>JP,{[E]:"ProductCodes",[S]:xP}],[0,{[E]:"InstanceType",[S]:uP}],[4,{[E]:"LaunchTime",[S]:Koe}],[()=>ZP,{[E]:"Placement",[S]:$ie}],[0,{[E]:"KernelId",[S]:dP}],[0,{[E]:"RamdiskId",[S]:MP}],[0,{[E]:"Platform",[S]:TP}],[()=>Nle,{[E]:"Monitoring",[S]:cie}],[0,{[E]:"SubnetId",[S]:jS}],[0,{[E]:"VpcId",[S]:HP}],[0,{[E]:"PrivateIpAddress",[S]:wl}],[0,{[E]:"IpAddress",[S]:hoe}]]],nle=[3,H,HW,0,[gk,bk],[[2,{[E]:"EnaSrdEnabled",[S]:Lre}],[()=>sle,{[E]:"EnaSrdUdpSpecification",[S]:jre}]]],sle=[3,H,FW,0,[vk],[[2,{[E]:"EnaSrdUdpEnabled",[S]:Ure}]]],rle=[3,H,KW,0,[rk,_k],[[0,{[E]:"DeviceName",[S]:W3}],[()=>Cce,{[E]:"Ebs",[S]:tP}]]],ole=[3,H,iJ,0,[uS],[[0,{[E]:"Ipv4Prefix",[S]:Roe}]]],ile=[3,H,eJ,0,[aS,UJ],[[0,{[E]:"Ipv6Address",[S]:aP}],[2,{[E]:"IsPrimaryIpv6",[S]:woe}]]],ale=[3,H,aJ,0,[lS],[[0,{[E]:"Ipv6Prefix",[S]:Coe}]]],cle=[3,H,bJ,0,[UD,Xte],[[0,{[E]:"AutoRecovery",[S]:kse}],[0,{[E]:"RebootMigration",[S]:Kie}]]],lle=[3,H,SJ,0,[UD],[0]],ule=[3,H,_J,0,[Vee,One],[0,()=>Jle]],fle=[3,H,wJ,0,[Mk,Ok,Ak,Ik,Nk],[0,1,0,0,0]],dle=[3,H,EJ,0,[bl,Mk,Ok,Ak,Ik,Nk],[[0,{[E]:"State",[S]:LP}],[0,{[E]:"HttpTokens",[S]:ooe}],[1,{[E]:"HttpPutResponseHopLimit",[S]:noe}],[0,{[E]:"HttpEndpoint",[S]:Wre}],[0,{[E]:"HttpProtocolIpv6",[S]:toe}],[0,{[E]:"InstanceMetadataTags",[S]:yoe}]]],hle=[3,H,RJ,0,[qD,TY,Wb,sS,iS,Oee,Yk,yS,vS,yl,f3,y3,CS,um,M3,Uk,Lk,zk,tX,gl],[[()=>GP,{[E]:"Association",[S]:j3}],[()=>ple,{[E]:"Attachment",[S]:Lse}],[0,{[E]:"Description",[S]:MS}],[()=>HS,{[E]:"GroupSet",[S]:NS}],[()=>FS,{[E]:"Ipv6AddressesSet",[S]:iP}],[0,{[E]:"MacAddress",[S]:Yoe}],[0,{[E]:"NetworkInterfaceId",[S]:SP}],[0,{[E]:"OwnerId",[S]:EP}],[0,{[E]:"PrivateDnsName",[S]:US}],[0,{[E]:"PrivateIpAddress",[S]:wl}],[()=>zue,{[E]:"PrivateIpAddressesSet",[S]:CP}],[2,{[E]:"SourceDestCheck",[S]:DP}],[0,{[E]:"Status",[S]:Nf}],[0,{[E]:"SubnetId",[S]:jS}],[0,{[E]:"VpcId",[S]:HP}],[0,{[E]:"InterfaceType",[S]:Boe}],[()=>Mue,{[E]:"Ipv4PrefixSet",[S]:Eoe}],[()=>Due,{[E]:"Ipv6PrefixSet",[S]:xoe}],[()=>tce,{[E]:"ConnectionTrackingConfiguration",[S]:sre}],[()=>vm,{[E]:"Operator",[S]:gm}]]],GP=[3,H,CJ,0,[FY,ZY,PJ,c3,Cte],[[0,{[E]:"CarrierIp",[S]:Kse}],[0,{[E]:"CustomerOwnedIp",[S]:Xse}],[0,{[E]:"IpOwnerId",[S]:Soe}],[0,{[E]:"PublicDnsName",[S]:Oie}],[0,{[E]:"PublicIp",[S]:Die}]]],ple=[3,H,TJ,0,[Vb,bY,Tf,sk,CS,gS,yk,hk],[[4,{[E]:"AttachTime",[S]:IS}],[0,{[E]:"AttachmentId",[S]:Ase}],[2,{[E]:"DeleteOnTermination",[S]:Df}],[1,{[E]:"DeviceIndex",[S]:X3}],[0,{[E]:"Status",[S]:Nf}],[1,{[E]:"NetworkCardIndex",[S]:bP}],[()=>nle,{[E]:"EnaSrdSpecification",[S]:Bre}],[1,{[E]:"EnaQueueCount",[S]:Pre}]]],mle=[3,H,IJ,0,[wY,Tf,Wb,sk,sS,kk,iS,Yk,yl,f3,Mne,um,vY,Uk,gS,Lk,LJ,zk,zJ,Ote,yk,nX,hk],[[2,{[E]:"AssociatePublicIpAddress",[S]:Mse}],[2,{[E]:"DeleteOnTermination",[S]:Df}],[0,{[E]:"Description",[S]:MS}],[1,{[E]:"DeviceIndex",[S]:X3}],[()=>eN,{[S]:wS}],[1,{[E]:"Ipv6AddressCount",[S]:coe}],[()=>FS,{[E]:"Ipv6Addresses",[S]:iP}],[0,{[E]:"NetworkInterfaceId",[S]:SP}],[0,{[E]:"PrivateIpAddress",[S]:wl}],[()=>Xue,{[E]:"PrivateIpAddresses",[S]:CP}],[1,{[E]:"SecondaryPrivateIpAddressCount",[S]:lae}],[0,{[E]:"SubnetId",[S]:jS}],2,0,1,[()=>Bue,{[S]:uS}],1,[()=>$ue,{[S]:lS}],1,2,()=>kce,()=>ece,1]],gle=[3,H,MJ,0,[YD],[[0,{[E]:"BandwidthWeighting",[S]:jse}]]],yle=[3,H,DJ,0,[YD],[0]],vle=[3,H,BJ,0,[qD,p3,vS,yl],[[()=>GP,{[E]:"Association",[S]:j3}],[2,{[E]:"Primary",[S]:AP}],[0,{[E]:"PrivateDnsName",[S]:US}],[0,{[E]:"PrivateIpAddress",[S]:wl}]]],$v=[3,H,YJ,0,[tk,Co],[[1,{[E]:"Code",[S]:Y3}],[0,{[E]:"Name",[S]:Hi}]]],ble=[3,H,GJ,0,[Ro,eX,Nte],[[0,{[E]:"InstanceId",[S]:LS}],[()=>$v,{[E]:"CurrentState",[S]:nre}],[()=>$v,{[E]:"PreviousState",[S]:Bie}]]],Sle=[3,H,Bk,0,[tse,FX,n3,Sk],[[1,{[E]:"TotalSizeInGB",[S]:Iae}],[()=>vue,{[E]:"Disks",[S]:gre}],[0,{[E]:"NvmeSupport",[S]:wP}],[0,{[E]:"EncryptionSupport",[S]:eP}]]],_le=[3,H,JJ,0,[im,HY,xk,Lne,Dne,Une,PY,oS,d3,O3,Fa,ZJ,Bk,lk,Wk,Rk,Ek,u3,Pk,$W,NY,fX,EY,ane,ote,ite,s3,Fk,Jk,Pte,Yte],[[0,{[E]:"InstanceType",[S]:uP}],[2,{[E]:"CurrentGeneration",[S]:Gse}],[2,{[E]:"FreeTierEligible",[S]:sP}],[()=>ofe,{[E]:"SupportedUsageClasses",[S]:pae}],[()=>tfe,{[E]:"SupportedRootDeviceTypes",[S]:uae}],[()=>afe,{[E]:"SupportedVirtualizationTypes",[S]:gae}],[2,{[E]:"BareMetal",[S]:$se}],[0,{[E]:"Hypervisor",[S]:zS}],[()=>Kle,{[E]:"ProcessorInfo",[S]:kie}],[()=>cue,{[E]:"VCpuInfo",[S]:Lae}],[()=>Dle,{[E]:"MemoryInfo",[S]:Sl}],[2,{[E]:"InstanceStorageSupported",[S]:Ioe}],[()=>Sle,{[E]:"InstanceStorageInfo",[S]:Aoe}],[()=>Rce,{[E]:"EbsInfo",[S]:Ire}],[()=>Lle,{[E]:"NetworkInfo",[S]:mie}],[()=>Fce,{[E]:"GpuInfo",[S]:Qre}],[()=>Uce,{[E]:"FpgaInfo",[S]:qre}],[()=>Fle,{[E]:"PlacementGroupInfo",[S]:Mie}],[()=>Wce,{[E]:"InferenceAcceleratorInfo",[S]:loe}],[2,{[E]:"HibernationSupported",[S]:roe}],[2,{[E]:"BurstablePerformanceSupported",[S]:Use}],[2,{[E]:"DedicatedHostsSupported",[S]:cre}],[2,{[E]:"AutoRecoverySupported",[S]:Dse}],[()=>gue,{[E]:"SupportedBootModes",[S]:Jie}],[0,{[E]:"NitroEnclavesSupport",[S]:die}],[0,{[E]:"NitroTpmSupport",[S]:bie}],[()=>Hle,{[E]:"NitroTpmInfo",[S]:vie}],[()=>Ile,{[E]:"MediaAcceleratorInfo",[S]:Qoe}],[()=>jle,{[E]:"NeuronInfo",[S]:gie}],[0,{[E]:"PhcSupport",[S]:Lie}],[0,{[E]:"RebootMigrationSupport",[S]:Gie}]]],wle=[3,H,VJ,0,[uS],[0]],Ele=[3,H,qJ,0,[lS],[0]],xle=[3,H,mee,0,[Ha,Va,$r,fS,aee],[[0,{[E]:"KeyPairId",[S]:mm}],[()=>Ga,{[E]:"TagSet",[S]:xl}],[0,{[E]:"KeyName",[S]:kf}],[0,{[E]:"KeyFingerprint",[S]:BS}],[()=>Qae,{[E]:"KeyMaterial",[S]:Uoe}]]],Rle=[3,H,hee,0,[Ha,jk,Va,Mte,ek,$r,fS],[[0,{[E]:"KeyPairId",[S]:mm}],[0,{[E]:"KeyType",[S]:Hoe}],[()=>Ga,{[E]:"TagSet",[S]:xl}],[0,{[E]:"PublicKey",[S]:Pie}],[4,{[E]:"CreateTime",[S]:Q3}],[0,{[E]:"KeyName",[S]:kf}],[0,{[E]:"KeyFingerprint",[S]:BS}]]],Cle=[3,H,Tee,0,[Ree,Cee,P3],[0,0,0]],Tle=[3,H,yee,0,[Hk],[[0,{[E]:"LicenseConfigurationArn",[S]:Foe}]]],Ale=[3,H,gee,0,[Hk],[0]],Ile=[3,H,Fk,0,[HD,Wne],[[()=>que,{[E]:"Accelerators",[S]:B3}],[1,{[E]:"TotalMediaMemoryInMiB",[S]:Cae}]]],Ole=[3,H,kee,0,[Bi,Co,Of,Fa],[[1,{[E]:"Count",[S]:qa}],[0,{[E]:"Name",[S]:Hi}],[0,{[E]:"Manufacturer",[S]:Pf}],[()=>Mle,{[E]:"MemoryInfo",[S]:Sl}]]],Mle=[3,H,Nee,0,[vl],[[1,{[E]:"SizeInMiB",[S]:El}]]],Dle=[3,H,Fa,0,[vl],[[1,{[E]:"SizeInMiB",[S]:El}]]],kle=[3,H,qee,0,[ji,Fn,RS,hm,am,dm,pS],[0,2,1,0,1,1,2],1],Ple=[3,H,Gee,0,[D3],[[()=>uue,{[E]:"VolumeModification",[S]:Uae}]]],Nle=[3,H,mS,0,[bl],[[0,{[E]:"State",[S]:LP}]]],zle=[3,H,Wee,0,[gS,t3,Gk,IY,vte,uX,$ee,Uee],[[1,{[E]:"NetworkCardIndex",[S]:bP}],[0,{[E]:"NetworkPerformance",[S]:_P}],[1,{[E]:"MaximumNetworkInterfaces",[S]:gP}],[1,{[E]:"BaselineBandwidthInGbps",[S]:Bse}],[1,{[E]:"PeakBandwidthInGbps",[S]:Tie}],[1,{[E]:"DefaultEnaQueueCountPerInterface",[S]:are}],[1,{[E]:"MaximumEnaQueueCount",[S]:eie}],[1,{[E]:"MaximumEnaQueueCountPerInterface",[S]:tie}]]],Lle=[3,H,Wk,0,[t3,Gk,jee,IX,Yee,VW,qW,XJ,eS,vW,uk,fW,gW,LY,RW],[[0,{[E]:"NetworkPerformance",[S]:_P}],[1,{[E]:"MaximumNetworkInterfaces",[S]:gP}],[1,{[E]:"MaximumNetworkCards",[S]:nie}],[1,{[E]:"DefaultNetworkCardIndex",[S]:lre}],[()=>Gue,{[E]:"NetworkCards",[S]:lie}],[1,{[E]:"Ipv4AddressesPerInterface",[S]:uoe}],[1,{[E]:"Ipv6AddressesPerInterface",[S]:foe}],[2,{[E]:"Ipv6Supported",[S]:Poe}],[0,{[E]:"EnaSupport",[S]:kS}],[2,{[E]:"EfaSupported",[S]:Hre}],[()=>Ace,{[E]:"EfaInfo",[S]:Ore}],[2,{[E]:"EncryptionInTransitSupported",[S]:Are}],[2,{[E]:"EnaSrdSupported",[S]:$re}],[()=>hue,{[E]:"BandwidthWeightings",[S]:Hse}],[0,{[E]:"FlexibleEnaQueuesSupport",[S]:Vre}]]],Ble=[3,H,ete,0,[Bi,P3],[[1,{[E]:"Count",[S]:qa}],[1,{[E]:"Version",[S]:Gae}]]],$le=[3,H,tte,0,[Bi,Co,qY,Fa],[[1,{[E]:"Count",[S]:qa}],[0,{[E]:"Name",[S]:Hi}],[()=>Ble,{[E]:"CoreInfo",[S]:Qse}],[()=>Ule,{[E]:"MemoryInfo",[S]:Sl}]]],Ule=[3,H,ste,0,[vl],[[1,{[E]:"SizeInMiB",[S]:El}]]],jle=[3,H,Jk,0,[rte,Jne],[[()=>Kue,{[E]:"NeuronDevices",[S]:fie}],[1,{[E]:"TotalNeuronDeviceMemoryInMiB",[S]:Tae}]]],Hle=[3,H,s3,0,[jne],[[()=>Zue,{[E]:"SupportedVersions",[S]:yae}]]],KP=[3,H,fte,0,[o3],[0]],vm=[3,H,dte,0,[Zee,o3],[[2,{[E]:"Managed",[S]:iie}],[0,{[E]:"Principal",[S]:Cie}]]],ZP=[3,H,bS,0,[rm,CY,Tk,kte,zW,ise,lne,BW,Ck,sm],[[0,{[E]:"AvailabilityZoneId",[S]:L3}],[0,{[E]:"Affinity",[S]:zse}],[0,{[E]:"GroupName",[S]:oP}],[1,{[E]:"PartitionNumber",[S]:zie}],[0,{[E]:"HostId",[S]:Jre}],[0,{[E]:"Tenancy",[S]:bae}],[0,{[E]:"SpreadDomain",[S]:tae}],[0,{[E]:"HostResourceGroupArn",[S]:soe}],[0,{[E]:"GroupId",[S]:rP}],[0,{[E]:"AvailabilityZone",[S]:OS}]]],Fle=[3,H,u3,0,[kne],[[()=>Yue,{[E]:"SupportedStrategies",[S]:fae}]]],Vle=[3,H,Ete,0,[Dk,mk,pk],[0,2,2]],qle=[3,H,xte,0,[Dk,mk,pk],[[0,{[E]:"HostnameType",[S]:ioe}],[2,{[E]:"EnableResourceNameDnsARecord",[S]:zre}],[2,{[E]:"EnableResourceNameDnsAAAARecord",[S]:Nre}]]],Gle=[3,H,Tte,0,[p3,yl],[[2,{[E]:"Primary",[S]:AP}],[0,{[E]:"PrivateIpAddress",[S]:wl}]]],Kle=[3,H,d3,0,[ine,cne,une,Of],[[()=>due,{[E]:"SupportedArchitectures",[S]:Wie}],[1,{[E]:"SustainedClockSpeedInGhz",[S]:eae}],[()=>sfe,{[E]:"SupportedFeatures",[S]:nae}],[0,{[E]:"Manufacturer",[S]:Pf}]]],Zle=[3,H,wte,0,[bte,_te],[[0,{[E]:"ProductCode",[S]:Aie}],[0,{[E]:"Type",[S]:UP}]]],Qle=[3,H,jte,0,[If,Fn],[[()=>zf,{[S]:Ro}],[2,{[E]:"DryRun",[S]:as}]],1],Yle=[3,H,nne,0,[cte,_S,_W],[[0,{[E]:"OptInStatus",[S]:Sie}],[0,{[E]:"RegionName",[S]:Zie}],[0,{[E]:"RegionEndpoint",[S]:Hie}]]],QP=[3,H,rne,0,[Vte,yS,Gte,sS,ree],[[0,{[E]:"ReservationId",[S]:Fie}],[0,{[E]:"OwnerId",[S]:EP}],[0,{[E]:"RequesterId",[S]:qie}],[()=>HS,{[E]:"GroupSet",[S]:NS}],[()=>kue,{[E]:"InstancesSet",[S]:pm}]]],Xle=[3,H,Ute,0,[tS],[[2,{[E]:"Enabled",[S]:nP}]],1],Wle=[3,H,Hte,0,[Mee,Dee,Gb,Af,im,kk,iS,dS,$r,mS,bS,SS,dne,v3,um,cse,ik,ck,fm,xee,xJ,JY,Kb,Qb,rS,_ee,Kk,Jb,a3,Zk,aX,pW,e3,gl,Fn,cX,cJ,yl,Xb,BD,Xk,cS,fk],[1,1,[()=>mue,{[S]:qb}],0,0,1,[()=>FS,{[S]:aS}],0,0,[()=>Xle,0],[()=>ZP,0],0,[()=>eN,{[S]:wS}],[()=>nfe,{[S]:b3}],0,[()=>Zae,0],[()=>_ue,0],[()=>Eue,{[S]:ak}],[()=>bm,{[S]:Mf}],()=>Cle,()=>ule,()=>ice,()=>sce,()=>Yae,()=>Gce,[()=>Vue,{[S]:Eee}],()=>fle,()=>zce,()=>Vle,()=>lle,2,2,()=>yle,()=>KP,[2,{[E]:"DryRun",[S]:as}],[2,{[E]:"DisableApiTermination",[S]:ore}],[0,{[E]:"InstanceInitiatedShutdownBehavior",[S]:poe}],[0,{[E]:"PrivateIpAddress",[S]:wl}],[0,{[E]:"ClientToken",[zoe]:1,[S]:Z3}],[0,{[E]:"AdditionalInfo",[S]:N3}],[()=>Nue,{[E]:"NetworkInterface",[S]:pie}],[()=>Zce,{[E]:"IamInstanceProfile",[S]:cP}],[2,{[E]:"EbsOptimized",[S]:J3}]],2],Jle=[3,H,Ane,0,[Hee,Ene,DY,wse,nJ],[0,0,1,4,0]],eue=[3,H,bne,0,[If,BD,Fn],[[()=>zf,{[S]:Ro}],[0,{[E]:"AdditionalInfo",[S]:N3}],[2,{[E]:"DryRun",[S]:as}]],1],tue=[3,H,Sne,0,[xne],[[()=>VS,{[E]:"InstancesSet",[S]:pm}]]],YP=[3,H,xS,0,[tk,Qee],[[0,{[E]:"Code",[S]:Y3}],[0,{[E]:"Message",[S]:aie}]]],nue=[3,H,_ne,0,[If,UW,_3,Fn,wk],[[()=>zf,{[S]:Ro}],2,2,[2,{[E]:"DryRun",[S]:as}],[2,{[E]:"Force",[S]:Kre}]],1],sue=[3,H,wne,0,[Cne],[[()=>VS,{[E]:"InstancesSet",[S]:pm}]]],rue=[3,H,R3,0,[oee,I3],[[0,{[E]:"Key",[S]:$oe}],[0,{[E]:"Value",[S]:zae}]]],oue=[3,H,Mf,0,[ene,Va],[[0,{[E]:"ResourceType",[S]:Yie}],[()=>Ga,{[S]:R3}]]],iue=[3,H,Gne,0,[If,wk,_3,Fn],[[()=>zf,{[S]:Ro}],2,2,[2,{[E]:"DryRun",[S]:as}]],1],aue=[3,H,Kne,0,[Qne],[[()=>VS,{[E]:"InstancesSet",[S]:pm}]]],cue=[3,H,O3,0,[zX,lX,PX,dse,_se],[[1,{[E]:"DefaultVCpus",[S]:pre}],[1,{[E]:"DefaultCores",[S]:ire}],[1,{[E]:"DefaultThreadsPerCore",[S]:dre}],[()=>yue,{[E]:"ValidCores",[S]:Bae}],[()=>rfe,{[E]:"ValidThreadsPerCore",[S]:qae}]]],XP=[3,H,Rse,0,[rm,lm,$ne,am,Va,hm,TW,pS,dm,zne,gl,AS,ji,RS,ES,sm,bl,ek,AY,nS,hS],[[0,{[E]:"AvailabilityZoneId",[S]:L3}],[0,{[E]:"OutpostArn",[S]:$S}],[0,{[E]:"SourceVolumeId",[S]:mae}],[1,{[E]:"Iops",[S]:fP}],[()=>Ga,{[E]:"TagSet",[S]:xl}],[0,{[E]:"VolumeType",[S]:FP}],[2,{[E]:"FastRestored",[S]:Gre}],[2,{[E]:"MultiAttachEnabled",[S]:Zoe}],[1,{[E]:"Throughput",[S]:$P}],[0,{[E]:"SseType",[S]:hae}],[()=>vm,{[E]:"Operator",[S]:gm}],[1,{[E]:"VolumeInitializationRate",[S]:$ae}],[0,{[E]:"VolumeId",[S]:ym}],[1,{[E]:"Size",[S]:vae}],[0,{[E]:"SnapshotId",[S]:kP}],[0,{[E]:"AvailabilityZone",[S]:OS}],[0,{[E]:"Status",[S]:Nf}],[4,{[E]:"CreateTime",[S]:Q3}],[()=>cfe,{[E]:"AttachmentSet",[S]:Nse}],[2,{[E]:"Encrypted",[S]:PS}],[0,{[E]:"KmsKeyId",[S]:hP}]]],lue=[3,H,fse,0,[Tf,$D,NJ,om,ji,Ro,HX,bl,Vb],[[2,{[E]:"DeleteOnTermination",[S]:Df}],[0,{[E]:"AssociatedResource",[S]:z3}],[0,{[E]:"InstanceOwningService",[S]:_oe}],[1,{[E]:"EbsCardIndex",[S]:DS}],[0,{[E]:"VolumeId",[S]:ym}],[0,{[E]:"InstanceId",[S]:LS}],[0,{[E]:"Device",[S]:mre}],[0,{[E]:"Status",[S]:Nf}],[4,{[E]:"AttachTime",[S]:IS}]]],uue=[3,H,D3,0,[ji,Fee,Ine,sse,Zne,ose,rse,Xne,pte,lte,gte,mte,ute,zte,Pne,bW],[[0,{[E]:"VolumeId",[S]:ym}],[0,{[E]:"ModificationState",[S]:oie}],[0,{[E]:"StatusMessage",[S]:cae}],[1,{[E]:"TargetSize",[S]:Oae}],[1,{[E]:"TargetIops",[S]:xae}],[0,{[E]:"TargetVolumeType",[S]:Dae}],[1,{[E]:"TargetThroughput",[S]:Mae}],[2,{[E]:"TargetMultiAttachEnabled",[S]:Rae}],[1,{[E]:"OriginalSize",[S]:Eie}],[1,{[E]:"OriginalIops",[S]:_ie}],[0,{[E]:"OriginalVolumeType",[S]:Rie}],[1,{[E]:"OriginalThroughput",[S]:xie}],[2,{[E]:"OriginalMultiAttachEnabled",[S]:wie}],[1,{[E]:"Progress",[S]:Uie}],[4,{[E]:"StartTime",[S]:dae}],[4,{[E]:"EndTime",[S]:Fre}]]],WP="unit",fue=[-3,zP,"EC2ServiceException",0,[],[]];Mt.for(zP).registerError(fue,Fb);var due=[1,H,RY,0,[0,{[S]:je}]],hue=[1,H,zY,0,[0,{[S]:je}]],pue=[1,H,OY,0,[()=>qP,{[S]:je}]],mue=[1,H,MY,0,[()=>qP,{[S]:qb}]],gue=[1,H,kY,0,[0,{[S]:je}]],yue=[1,H,$Y,0,[1,{[S]:je}]],vue=[1,H,dX,0,[()=>wce,{[S]:je}]],bue=[1,H,GX,0,[()=>xce,{[S]:je}]],Sue=[1,H,XX,0,[()=>Ice,{[S]:je}]],_ue=[1,H,nW,0,[()=>Oce,{[S]:je}]],wue=[1,H,oW,0,[()=>Dce,{[S]:je}]],Eue=[1,H,ck,0,[()=>Mce,{[S]:je}]],xue=[1,H,qX,0,[0,{[S]:ok}]],Rl=[1,H,CW,0,[()=>Lce,{[S]:$i}]],Rue=[1,H,EW,0,[()=>Bce,{[S]:je}]],Cue=[1,H,OW,0,[()=>jce,{[S]:je}]],HS=[1,H,DW,0,[()=>Vce,{[S]:je}]],Tue=[1,H,lJ,0,[0,{[S]:Af}]],Aue=[1,H,gJ,0,[()=>Qce,{[S]:je}]],Iue=[1,H,XW,0,[()=>Jce,0]],Oue=[1,H,ZW,0,[()=>rle,{[S]:je}]],zf=[1,H,uJ,0,[0,{[S]:Ro}]],Mue=[1,H,sJ,0,[()=>ole,{[S]:je}]],FS=[1,H,tJ,0,[()=>ile,{[S]:je}]],Due=[1,H,rJ,0,[()=>ale,{[S]:je}]],kue=[1,H,vJ,0,[()=>tle,{[S]:je}]],Pue=[1,H,AJ,0,[()=>hle,{[S]:je}]],Nue=[1,H,OJ,0,[()=>mle,{[S]:je}]],zue=[1,H,$J,0,[()=>vle,{[S]:je}]],VS=[1,H,KJ,0,[()=>ble,{[S]:je}]],Lue=[1,H,WJ,0,[()=>_le,{[S]:je}]],Bue=[1,H,HJ,0,[()=>wle,{[S]:je}]],$ue=[1,H,FJ,0,[()=>Ele,{[S]:je}]],Uue=[1,H,cee,0,[0,{[S]:$r}]],jue=[1,H,fee,0,[0,{[S]:Ha}]],Hue=[1,H,pee,0,[()=>Rle,{[S]:je}]],Fue=[1,H,bee,0,[()=>Tle,{[S]:je}]],Vue=[1,H,wee,0,[()=>Ale,{[S]:je}]],que=[1,H,Pee,0,[()=>Ole,{[S]:je}]],Gue=[1,H,Xee,0,[()=>zle,{[S]:je}]],Kue=[1,H,nte,0,[()=>$le,{[S]:je}]],Zue=[1,H,ate,0,[0,{[S]:je}]],Que=[1,H,hte,0,[0,{[S]:r3}]],Yue=[1,H,Rte,0,[0,{[S]:je}]],Xue=[1,H,Ate,0,[()=>Gle,{[S]:je}]],JP=[1,H,Ste,0,[()=>Zle,{[S]:je}]],Wue=[1,H,Zte,0,[()=>Yle,{[S]:je}]],Jue=[1,H,Wte,0,[0,{[S]:_S}]],efe=[1,H,Qte,0,[()=>QP,{[S]:je}]],tfe=[1,H,$te,0,[0,{[S]:je}]],eN=[1,H,fne,0,[0,{[S]:wS}]],nfe=[1,H,hne,0,[0,{[S]:b3}]],sfe=[1,H,one,0,[0,{[S]:je}]],Ga=[1,H,Yne,0,[()=>rue,{[S]:je}]],bm=[1,H,nse,0,[()=>oue,{[S]:je}]],rfe=[1,H,ese,0,[1,{[S]:je}]],ofe=[1,H,ase,0,[0,{[S]:je}]],ife=[1,H,vse,0,[0,{[S]:je}]],afe=[1,H,Sse,0,[0,{[S]:je}]],cfe=[1,H,use,0,[()=>lue,{[S]:je}]],lfe=[1,H,hse,0,[0,{[S]:ji}]],ufe=[1,H,mse,0,[()=>XP,{[S]:je}]],ffe=[1,H,Cse,0,[0,{[S]:je}]],pve=[9,H,GY,0,()=>rce,()=>xle],mve=[9,H,iX,0,()=>oce,()=>XP],gve=[9,H,EX,0,()=>ace,()=>cce],yve=[9,H,UX,0,()=>lce,()=>WP],dfe=[9,H,SX,0,()=>uce,()=>fce],hfe=[9,H,_X,0,()=>dce,()=>hce],pfe=[9,H,bX,0,()=>pce,()=>mce],mfe=[9,H,AX,0,()=>gce,()=>yce],gfe=[9,H,kX,0,()=>vce,()=>bce],yfe=[9,H,jX,0,()=>Sce,()=>_ce],vve=[9,H,dJ,0,()=>Yce,()=>Xce],bve=[9,H,Kee,0,()=>kle,()=>Ple],Sve=[9,H,qte,0,()=>Qle,()=>WP],_ve=[9,H,Kte,0,()=>Wle,()=>QP],wve=[9,H,Rne,0,()=>eue,()=>tue],Eve=[9,H,Tne,0,()=>nue,()=>sue],xve=[9,H,Vne,0,()=>iue,()=>aue];class tN extends Br.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeImages",{}).n("EC2Client","DescribeImagesCommand").sc(dfe).build(){}class nN extends Br.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeInstances",{}).n("EC2Client","DescribeInstancesCommand").sc(hfe).build(){}class vfe extends Br.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeInstanceTypes",{}).n("EC2Client","DescribeInstanceTypesCommand").sc(pfe).build(){}class sN extends Br.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeKeyPairs",{}).n("EC2Client","DescribeKeyPairsCommand").sc(mfe).build(){}class bfe extends Br.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeRegions",{}).n("EC2Client","DescribeRegionsCommand").sc(gfe).build(){}class rN extends Br.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeVolumes",{}).n("EC2Client","DescribeVolumesCommand").sc(yfe).build(){}function Sfe(e){return t=>async n=>{const{request:r}=n;if(e.expectContinueHeader!==!1&&Mn.isInstance(r)&&r.body&&e.runtime==="node"&&e.requestHandler?.constructor?.name!=="FetchHttpHandler"){let i=!0;if(typeof e.expectContinueHeader=="number")try{i=(Number(r.headers?.["content-length"])??e.bodyLengthChecker?.(r.body)??1/0)>=e.expectContinueHeader}catch{}else i=!!e.expectContinueHeader;i&&(r.headers.Expect="100-continue")}return t({...n,request:r})}}const _fe={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},wfe=e=>({applyToStack:t=>{t.add(Sfe(e),_fe)}}),oN={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},Efe=oN.WHEN_SUPPORTED,Rve={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},xfe=oN.WHEN_SUPPORTED;var Uv;(function(e){e.MD5="MD5",e.CRC32="CRC32",e.CRC32C="CRC32C",e.CRC64NVME="CRC64NVME",e.SHA1="SHA1",e.SHA256="SHA256"})(Uv||(Uv={}));var jT;(function(e){e.HEADER="header",e.TRAILER="trailer"})(jT||(jT={}));const Cve=Uv.CRC32;var Tve=(function(){function e(){this.crc32=new bp}return e.prototype.update=function(t){vp(t)||this.crc32.update(za(t))},e.prototype.digest=function(){return RD(this,void 0,void 0,function(){return CD(this,function(t){return[2,qQ(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new bp},e})(),bp=(function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var n,r;try{for(var i=YQ(t),c=i.next();!c.done;c=i.next()){var l=c.value;this.checksum=this.checksum>>>8^Cfe[(this.checksum^l)&255]}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e})(),Rfe=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],Cfe=GQ(Rfe);const Tfe=e=>{const{requestChecksumCalculation:t,responseChecksumValidation:n,requestStreamBufferSize:r}=e;return Object.assign(e,{requestChecksumCalculation:Ns(t??Efe),responseChecksumValidation:Ns(n??xfe),requestStreamBufferSize:Number(r??0)})},Afe=e=>(t,n)=>async r=>{const i=await e.region(),c=e.region;let l=()=>{};n.__s3RegionRedirect&&(Object.defineProperty(e,"region",{writable:!1,value:async()=>n.__s3RegionRedirect}),l=()=>Object.defineProperty(e,"region",{writable:!0,value:c}));try{const f=await t(r);if(n.__s3RegionRedirect){l();const d=await e.region();if(i!==d)throw new Error("Region was not restored following S3 region redirect.")}return f}catch(f){throw l(),f}},Ife={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function Ofe(e){return(t,n)=>async r=>{try{return await t(r)}catch(i){if(e.followRegionRedirects){const c=i?.$metadata?.httpStatusCode,l=n.commandName==="HeadBucketCommand",f=i?.$response?.headers?.["x-amz-bucket-region"];if(f&&(c===301||c===400&&(i?.name==="IllegalLocationConstraintException"||l))){try{const d=f;n.logger?.debug(`Redirecting from ${await e.region()} to ${d}`),n.__s3RegionRedirect=d}catch(d){throw new Error("Region redirect failed: "+d)}return t(r)}}throw i}}}const Mfe={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},Dfe=e=>({applyToStack:t=>{t.add(Ofe(e),Mfe),t.addRelativeTo(Afe(e),Ife)}});class qS{data;lastPurgeTime=Date.now();static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=3e4;constructor(t={}){this.data=t}get(t){const n=this.data[t];if(n)return n}set(t,n){return this.data[t]=n,n}delete(t){delete this.data[t]}async purgeExpired(){const t=Date.now();if(!(this.lastPurgeTime+qS.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>t))for(const n in this.data){const r=this.data[n];if(!r.isRefreshing){const i=await r.identity;i.expiration&&i.expiration.getTime()(l.expiration?.getTime()??0){i.set(r,new P0(Promise.resolve(h)))})),l)):i.set(r,new P0(this.getIdentity(r))).identity}async getIdentity(t){await this.cache.purgeExpired().catch(i=>{console.warn(`Error while clearing expired entries in S3ExpressIdentityCache: -`+i)});const n=await this.createSessionFn(t);if(!n.Credentials?.AccessKeyId||!n.Credentials?.SecretAccessKey)throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:n.Credentials.AccessKeyId,secretAccessKey:n.Credentials.SecretAccessKey,sessionToken:n.Credentials.SessionToken,expiration:n.Credentials.Expiration?new Date(n.Credentials.Expiration):void 0}}}const kfe="Directory",Pfe="S3Express",Nfe="sigv4-s3express",zfe="X-Amz-S3session-Token",Lfe=zfe.toLowerCase(),Bfe=e=>(t,n)=>async r=>{if(n.endpointV2){const i=n.endpointV2,c=i.properties?.authSchemes?.[0]?.name===Nfe;if((i.properties?.backend===Pfe||i.properties?.bucketType===kfe)&&(br(n,"S3_EXPRESS_BUCKET","J"),n.isS3ExpressBucket=!0),c){const f=r.input.Bucket;if(f){const d=await e.s3ExpressIdentityProvider.getS3ExpressIdentity(await e.credentials(),{Bucket:f});n.s3ExpressIdentity=d,Mn.isInstance(r.request)&&d.sessionToken&&(r.request.headers[Lfe]=d.sessionToken)}}}return t(r)},$fe={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},Ufe=e=>({applyToStack:t=>{t.add(Bfe(e),$fe)}}),jfe=async(e,t,n,r)=>{const i=await r.signWithCredentials(n,e,{});if(i.headers["X-Amz-Security-Token"]||i.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return i},Hfe=e=>t=>{throw t},Ffe=(e,t)=>{},Vfe=e=>(t,n)=>async r=>{if(!Mn.isInstance(r.request))return t(r);const c=Eo(n).selectedHttpAuthScheme;if(!c)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:l={}},identity:f,signer:d}=c;let h;n.s3ExpressIdentity?h=await jfe(n.s3ExpressIdentity,l,r.request,await e.signer()):h=await d.sign(r.request,f,l);const y=await t({...r,request:h}).catch((d.errorHandler||Hfe)(l));return(d.successHandler||Ffe)(y.response,l),y},qfe=e=>({applyToStack:t=>{t.addRelativeTo(Vfe(e),hM)}}),Gfe=(e,{session:t})=>{const[n,r]=t,{forcePathStyle:i,useAccelerateEndpoint:c,disableMultiregionAccessPoints:l,followRegionRedirects:f,s3ExpressIdentityProvider:d,bucketEndpoint:h,expectContinueHeader:y}=e;return Object.assign(e,{forcePathStyle:i??!1,useAccelerateEndpoint:c??!1,disableMultiregionAccessPoints:l??!1,followRegionRedirects:f??!1,s3ExpressIdentityProvider:d??new GS(async g=>n().send(new r({Bucket:g}))),bucketEndpoint:h??!1,expectContinueHeader:y??2097152})},Kfe={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},Zfe=3e3,Qfe=e=>(t,n)=>async r=>{const i=await t(r),{response:c}=i;if(!Pa.isInstance(c))return i;const{statusCode:l,body:f}=c;if(l<200||l>=300||!(typeof f?.stream=="function"||typeof f?.pipe=="function"||typeof f?.tee=="function"))return i;let h=f,y=f;f&&typeof f=="object"&&!(f instanceof Uint8Array)&&([h,y]=await AG(f)),c.body=y;const g=await Yfe(h,{streamCollector:async b=>_G(b,Zfe)});typeof h?.destroy=="function"&&h.destroy();const v=e.utf8Encoder(g.subarray(g.length-16));if(g.length===0&&Kfe[n.commandName]){const b=new Error("S3 aborted request");throw b.name="InternalError",b}return v&&v.endsWith("")&&(c.statusCode=400),i},Yfe=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),Xfe={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},KS=e=>({applyToStack:t=>{t.addRelativeTo(Qfe(e),Xfe)}}),Wfe=e=>typeof e=="string"&&e.indexOf("arn:")===0&&e.split(":").length>=6;function Jfe(e){return(t,n)=>async r=>{if(e.bucketEndpoint){const i=n.endpointV2;if(i){const c=r.input.Bucket;if(typeof c=="string")try{const l=new URL(c);n.endpointV2={...i,url:l}}catch(l){const f=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${c} could not be parsed as URL.`;throw n.logger?.constructor?.name==="NoOpLogger"?console.warn(f):n.logger?.warn?.(f),l}}}return t(r)}}const ede={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function tde({bucketEndpoint:e}){return t=>async n=>{const{input:{Bucket:r}}=n;if(!e&&typeof r=="string"&&!Wfe(r)&&r.indexOf("/")>=0){const i=new Error(`Bucket name shouldn't contain '/', received '${r}'`);throw i.name="InvalidBucketName",i}return t({...n})}}const nde={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},sde=e=>({applyToStack:t=>{t.add(tde(e),nde),t.addRelativeTo(Jfe(e),ede)}}),rde=e=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),jv="X-Amz-S3session-Token",HT=jv.toLowerCase();class ode extends Nv{async signWithCredentials(t,n,r){const i=FT(n);t.headers[HT]=n.sessionToken;const c=this;return VT(c,i),c.signRequest(t,r??{})}async presignWithCredentials(t,n,r){const i=FT(n);return delete t.headers[HT],t.headers[jv]=n.sessionToken,t.query=t.query??{},t.query[jv]=n.sessionToken,VT(this,i),this.presign(t,r)}}function FT(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function VT(e,t){const n=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),r=e.credentialProvider,i=()=>(clearTimeout(n),e.credentialProvider=r,Promise.resolve(t));e.credentialProvider=i}class iN{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return"none"}constructor(t){this.sigv4Signer=new ode(t),this.signerOptions=t}async sign(t,n={}){return n.signingRegion==="*"?this.getSigv4aSigner().sign(t,n):this.sigv4Signer.sign(t,n)}async signWithCredentials(t,n,r={}){if(r.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.signWithCredentials(t,n,r)}async presign(t,n={}){if(n.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.presign(t,n)}async presignWithCredentials(t,n,r={}){if(r.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(t,n,r)}getSigv4aSigner(){if(!this.sigv4aSigner)throw this.signerOptions.runtime==="node"?new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"):new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");return this.sigv4aSigner}}const ZS="required",M="type",ce="rules",B="conditions",ee="fn",te="argv",ke="ref",We="assign",Ee="url",xe="properties",po="backend",On="authSchemes",pn="disableDoubleEncoding",mn="signingName",$n="signingRegion",Re="headers",QS="signingRegionSet",ide=6,ade=!1,Tr=!0,ks="isSet",sn="booleanEquals",Ae="error",Sp="aws.partition",pt="stringEquals",Vt="getAttr",Gt="name",kt="substring",qT="bucketSuffix",YS="parseURL",me="endpoint",ue="tree",_p="aws.isVirtualHostableS3Bucket",wp="{url#scheme}://{Bucket}.{url#authority}{url#path}",Pr="not",GT="accessPointSuffix",$h="{url#scheme}://{url#authority}{url#path}",aN="hardwareType",cN="regionPrefix",KT="bucketAliasSuffix",Hv="outpostId",Ka="isValidHostLabel",XS="sigv4a",vf="s3-outposts",ol="s3",lN="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",uN="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",ZT="https://{Bucket}.s3.{partitionResult#dnsSuffix}",fN="aws.parseArn",dN="bucketArn",hN="arnType",Ep="",WS="s3-object-lambda",pN="accesspoint",JS="accessPointName",QT="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",YT="mrapPartition",XT="outpostType",WT="arnPrefix",mN="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",JT="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",eA="https://s3.{partitionResult#dnsSuffix}",Lc={[ZS]:!1,[M]:"string"},Bc={[ZS]:!0,default:!1,[M]:"boolean"},Lu={[ZS]:!1,[M]:"boolean"},tr={[ee]:sn,[te]:[{[ke]:"Accelerate"},!0]},Nt={[ee]:sn,[te]:[{[ke]:"UseFIPS"},!0]},Ot={[ee]:sn,[te]:[{[ke]:"UseDualStack"},!0]},tn={[ee]:ks,[te]:[{[ke]:"Endpoint"}]},gN={[ee]:Sp,[te]:[{[ke]:"Region"}],[We]:"partitionResult"},tA={[ee]:pt,[te]:[{[ee]:Vt,[te]:[{[ke]:"partitionResult"},Gt]},"aws-cn"]},Yu={[ee]:ks,[te]:[{[ke]:"Bucket"}]},dt={[ke]:"Bucket"},nA={[B]:[tr],[Ae]:"S3Express does not support S3 Accelerate.",[M]:Ae},sA={[B]:[tn,{[ee]:YS,[te]:[{[ke]:"Endpoint"}],[We]:"url"}],[ce]:[{[B]:[{[ee]:ks,[te]:[{[ke]:"DisableS3ExpressSessionAuth"}]},{[ee]:sn,[te]:[{[ke]:"DisableS3ExpressSessionAuth"},!0]}],[ce]:[{[B]:[{[ee]:sn,[te]:[{[ee]:Vt,[te]:[{[ke]:"url"},"isIp"]},!0]}],[ce]:[{[B]:[{[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"}],[ce]:[{[me]:{[Ee]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[xe]:{[po]:"S3Express",[On]:[{[pn]:!0,[Gt]:"sigv4",[mn]:"s3express",[$n]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue}],[M]:ue},{[B]:[{[ee]:_p,[te]:[dt,!1]}],[ce]:[{[me]:{[Ee]:wp,[xe]:{[po]:"S3Express",[On]:[{[pn]:!0,[Gt]:"sigv4",[mn]:"s3express",[$n]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue},{[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae}],[M]:ue},{[B]:[{[ee]:sn,[te]:[{[ee]:Vt,[te]:[{[ke]:"url"},"isIp"]},!0]}],[ce]:[{[B]:[{[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"}],[ce]:[{[me]:{[Ee]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[xe]:{[po]:"S3Express",[On]:[{[pn]:!0,[Gt]:"sigv4-s3express",[mn]:"s3express",[$n]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue}],[M]:ue},{[B]:[{[ee]:_p,[te]:[dt,!1]}],[ce]:[{[me]:{[Ee]:wp,[xe]:{[po]:"S3Express",[On]:[{[pn]:!0,[Gt]:"sigv4-s3express",[mn]:"s3express",[$n]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue},{[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae}],[M]:ue},ss={[ee]:YS,[te]:[{[ke]:"Endpoint"}],[We]:"url"},N0={[ee]:sn,[te]:[{[ee]:Vt,[te]:[{[ke]:"url"},"isIp"]},!0]},yN={[ke]:"url"},vN={[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"},Os={[po]:"S3Express",[On]:[{[pn]:!0,[Gt]:"sigv4",[mn]:"s3express",[$n]:"{Region}"}]},Ve={},bN={[ee]:_p,[te]:[dt,!1]},rA={[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae},oA={[ee]:ks,[te]:[{[ke]:"UseS3ExpressControlEndpoint"}]},iA={[ee]:sn,[te]:[{[ke]:"UseS3ExpressControlEndpoint"},!0]},Ke={[ee]:Pr,[te]:[tn]},rt={[ee]:sn,[te]:[{[ke]:"UseDualStack"},!1]},et={[ee]:sn,[te]:[{[ke]:"UseFIPS"},!1]},Ch={[Ae]:"Unrecognized S3Express bucket name format.",[M]:Ae},aA={[ee]:Pr,[te]:[Yu]},cA={[ke]:aN},lA={[B]:[Ke],[Ae]:"Expected a endpoint to be specified but no endpoint was found",[M]:Ae},Th={[On]:[{[pn]:!0,[Gt]:XS,[mn]:vf,[QS]:["*"]},{[pn]:!0,[Gt]:"sigv4",[mn]:vf,[$n]:"{Region}"}]},z0={[ee]:sn,[te]:[{[ke]:"ForcePathStyle"},!1]},cde={[ke]:"ForcePathStyle"},dn={[ee]:sn,[te]:[{[ke]:"Accelerate"},!1]},wn={[ee]:pt,[te]:[{[ke]:"Region"},"aws-global"]},Tn={[On]:[{[pn]:!0,[Gt]:"sigv4",[mn]:ol,[$n]:"us-east-1"}]},lt={[ee]:Pr,[te]:[wn]},An={[ee]:sn,[te]:[{[ke]:"UseGlobalEndpoint"},!0]},uA={[Ee]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:{[On]:[{[pn]:!0,[Gt]:"sigv4",[mn]:ol,[$n]:"{Region}"}]},[Re]:{}},yn={[On]:[{[pn]:!0,[Gt]:"sigv4",[mn]:ol,[$n]:"{Region}"}]},In={[ee]:sn,[te]:[{[ke]:"UseGlobalEndpoint"},!1]},fA={[Ee]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:yn,[Re]:{}},dA={[Ee]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[xe]:yn,[Re]:{}},hA={[Ee]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:yn,[Re]:{}},L0={[ee]:sn,[te]:[{[ee]:Vt,[te]:[yN,"isIp"]},!1]},B0={[Ee]:lN,[xe]:yn,[Re]:{}},Fv={[Ee]:wp,[xe]:yn,[Re]:{}},pA={[me]:Fv,[M]:me},$0={[Ee]:uN,[xe]:yn,[Re]:{}},mA={[Ee]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[xe]:yn,[Re]:{}},Ah={[Ae]:"Invalid region: region was not a valid DNS name.",[M]:Ae},gs={[ke]:dN},SN={[ke]:hN},U0={[ee]:Vt,[te]:[gs,"service"]},e_={[ke]:JS},gA={[B]:[Ot],[Ae]:"S3 Object Lambda does not support Dual-stack",[M]:Ae},yA={[B]:[tr],[Ae]:"S3 Object Lambda does not support S3 Accelerate",[M]:Ae},vA={[B]:[{[ee]:ks,[te]:[{[ke]:"DisableAccessPoints"}]},{[ee]:sn,[te]:[{[ke]:"DisableAccessPoints"},!0]}],[Ae]:"Access points are not supported for this operation",[M]:Ae},j0={[B]:[{[ee]:ks,[te]:[{[ke]:"UseArnRegion"}]},{[ee]:sn,[te]:[{[ke]:"UseArnRegion"},!1]},{[ee]:Pr,[te]:[{[ee]:pt,[te]:[{[ee]:Vt,[te]:[gs,"region"]},"{Region}"]}]}],[Ae]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[M]:Ae},_N={[ee]:Vt,[te]:[{[ke]:"bucketPartition"},Gt]},wN={[ee]:Vt,[te]:[gs,"accountId"]},H0={[On]:[{[pn]:!0,[Gt]:"sigv4",[mn]:WS,[$n]:"{bucketArn#region}"}]},bA={[Ae]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[M]:Ae},F0={[Ae]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[M]:Ae},V0={[Ae]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[M]:Ae},q0={[Ae]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[M]:Ae},SA={[Ae]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[M]:Ae},_A={[Ae]:"Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided",[M]:Ae},Bu={[On]:[{[pn]:!0,[Gt]:"sigv4",[mn]:ol,[$n]:"{bucketArn#region}"}]},wA={[On]:[{[pn]:!0,[Gt]:XS,[mn]:vf,[QS]:["*"]},{[pn]:!0,[Gt]:"sigv4",[mn]:vf,[$n]:"{bucketArn#region}"}]},EA={[ee]:fN,[te]:[dt]},xA={[Ee]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:yn,[Re]:{}},RA={[Ee]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:yn,[Re]:{}},CA={[Ee]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:yn,[Re]:{}},G0={[Ee]:mN,[xe]:yn,[Re]:{}},TA={[Ee]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:yn,[Re]:{}},AA={[ke]:"UseObjectLambdaEndpoint"},K0={[On]:[{[pn]:!0,[Gt]:"sigv4",[mn]:WS,[$n]:"{Region}"}]},IA={[Ee]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:yn,[Re]:{}},OA={[Ee]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:yn,[Re]:{}},MA={[Ee]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:yn,[Re]:{}},Z0={[Ee]:$h,[xe]:yn,[Re]:{}},DA={[Ee]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[xe]:yn,[Re]:{}},Q0=[{[ke]:"Region"}],lde=[{[ke]:"Endpoint"}],ude=[dt],Y0=[tr],$c=[tn,ss],kA=[{[ee]:ks,[te]:[{[ke]:"DisableS3ExpressSessionAuth"}]},{[ee]:sn,[te]:[{[ke]:"DisableS3ExpressSessionAuth"},!0]}],fde=[vN],X0=[bN],Js=[gN],W0=[Nt,Ot],Xu=[Nt,rt],Wu=[et,Ot],Ju=[et,rt],PA=[{[ee]:kt,[te]:[dt,6,14,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,14,16,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],Ar=[{[B]:[Nt,Ot],[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:{}},[M]:me},{[B]:Xu,[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:{}},[M]:me},{[B]:Wu,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:{}},[M]:me},{[B]:Ju,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:{}},[M]:me}],NA=[{[ee]:kt,[te]:[dt,6,15,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,15,17,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],zA=[{[ee]:kt,[te]:[dt,6,19,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,19,21,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],LA=[{[ee]:kt,[te]:[dt,6,20,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,20,22,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],BA=[{[ee]:kt,[te]:[dt,6,26,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,26,28,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],Ir=[{[B]:[Nt,Ot],[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[pn]:!0,[Gt]:"sigv4-s3express",[mn]:"s3express",[$n]:"{Region}"}]},[Re]:{}},[M]:me},{[B]:Xu,[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[pn]:!0,[Gt]:"sigv4-s3express",[mn]:"s3express",[$n]:"{Region}"}]},[Re]:{}},[M]:me},{[B]:Wu,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[pn]:!0,[Gt]:"sigv4-s3express",[mn]:"s3express",[$n]:"{Region}"}]},[Re]:{}},[M]:me},{[B]:Ju,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:{[po]:"S3Express",[On]:[{[pn]:!0,[Gt]:"sigv4-s3express",[mn]:"s3express",[$n]:"{Region}"}]},[Re]:{}},[M]:me}],$A=[dt,0,7,!0],UA=[{[ee]:kt,[te]:[dt,7,15,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,15,17,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],jA=[{[ee]:kt,[te]:[dt,7,16,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,16,18,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],HA=[{[ee]:kt,[te]:[dt,7,20,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,20,22,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],FA=[{[ee]:kt,[te]:[dt,7,21,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,21,23,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],VA=[{[ee]:kt,[te]:[dt,7,27,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,27,29,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],dde=[Yu],qA=[{[ee]:Ka,[te]:[{[ke]:Hv},!1]}],GA=[{[ee]:pt,[te]:[{[ke]:cN},"beta"]}],hde=["*"],KA=[{[ee]:Ka,[te]:[{[ke]:"Region"},!1]}],gi=[{[ee]:pt,[te]:[{[ke]:"Region"},"us-east-1"]}],J0=[{[ee]:pt,[te]:[SN,pN]}],ZA=[{[ee]:Vt,[te]:[gs,"resourceId[1]"],[We]:JS},{[ee]:Pr,[te]:[{[ee]:pt,[te]:[e_,Ep]}]}],pde=[gs,"resourceId[1]"],QA=[Ot],ev=[{[ee]:Pr,[te]:[{[ee]:pt,[te]:[{[ee]:Vt,[te]:[gs,"region"]},Ep]}]}],YA=[{[ee]:Pr,[te]:[{[ee]:ks,[te]:[{[ee]:Vt,[te]:[gs,"resourceId[2]"]}]}]}],mde=[gs,"resourceId[2]"],tv=[{[ee]:Sp,[te]:[{[ee]:Vt,[te]:[gs,"region"]}],[We]:"bucketPartition"}],XA=[{[ee]:pt,[te]:[_N,{[ee]:Vt,[te]:[{[ke]:"partitionResult"},Gt]}]}],nv=[{[ee]:Ka,[te]:[{[ee]:Vt,[te]:[gs,"region"]},!0]}],sv=[{[ee]:Ka,[te]:[wN,!1]}],WA=[{[ee]:Ka,[te]:[e_,!1]}],Ih=[Nt],JA=[{[ee]:Ka,[te]:[{[ke]:"Region"},!0]}],gde={parameters:{Bucket:Lc,Region:Lc,UseFIPS:Bc,UseDualStack:Bc,Endpoint:Lc,ForcePathStyle:Bc,Accelerate:Bc,UseGlobalEndpoint:Bc,UseObjectLambdaEndpoint:Lu,Key:Lc,Prefix:Lc,CopySource:Lc,DisableAccessPoints:Lu,DisableMultiRegionAccessPoints:Bc,UseArnRegion:Lu,UseS3ExpressControlEndpoint:Lu,DisableS3ExpressSessionAuth:Lu},[ce]:[{[B]:[{[ee]:ks,[te]:Q0}],[ce]:[{[B]:[tr,Nt],error:"Accelerate cannot be used with FIPS",[M]:Ae},{[B]:[Ot,tn],error:"Cannot set dual-stack in combination with a custom endpoint.",[M]:Ae},{[B]:[tn,Nt],error:"A custom endpoint cannot be combined with FIPS",[M]:Ae},{[B]:[tn,tr],error:"A custom endpoint cannot be combined with S3 Accelerate",[M]:Ae},{[B]:[Nt,gN,tA],error:"Partition does not support FIPS",[M]:Ae},{[B]:[Yu,{[ee]:kt,[te]:[dt,0,ide,Tr],[We]:qT},{[ee]:pt,[te]:[{[ke]:qT},"--x-s3"]}],[ce]:[nA,sA,{[B]:[oA,iA],[ce]:[{[B]:Js,[ce]:[{[B]:[vN,Ke],[ce]:[{[B]:W0,endpoint:{[Ee]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Os,[Re]:Ve},[M]:me},{[B]:Xu,endpoint:{[Ee]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Os,[Re]:Ve},[M]:me},{[B]:Wu,endpoint:{[Ee]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Os,[Re]:Ve},[M]:me},{[B]:Ju,endpoint:{[Ee]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Os,[Re]:Ve},[M]:me}],[M]:ue}],[M]:ue}],[M]:ue},{[B]:X0,[ce]:[{[B]:Js,[ce]:[{[B]:kA,[ce]:[{[B]:PA,[ce]:Ar,[M]:ue},{[B]:NA,[ce]:Ar,[M]:ue},{[B]:zA,[ce]:Ar,[M]:ue},{[B]:LA,[ce]:Ar,[M]:ue},{[B]:BA,[ce]:Ar,[M]:ue},Ch],[M]:ue},{[B]:PA,[ce]:Ir,[M]:ue},{[B]:NA,[ce]:Ir,[M]:ue},{[B]:zA,[ce]:Ir,[M]:ue},{[B]:LA,[ce]:Ir,[M]:ue},{[B]:BA,[ce]:Ir,[M]:ue},Ch],[M]:ue}],[M]:ue},rA],[M]:ue},{[B]:[Yu,{[ee]:kt,[te]:$A,[We]:GT},{[ee]:pt,[te]:[{[ke]:GT},"--xa-s3"]}],[ce]:[nA,sA,{[B]:X0,[ce]:[{[B]:Js,[ce]:[{[B]:kA,[ce]:[{[B]:UA,[ce]:Ar,[M]:ue},{[B]:jA,[ce]:Ar,[M]:ue},{[B]:HA,[ce]:Ar,[M]:ue},{[B]:FA,[ce]:Ar,[M]:ue},{[B]:VA,[ce]:Ar,[M]:ue},Ch],[M]:ue},{[B]:UA,[ce]:Ir,[M]:ue},{[B]:jA,[ce]:Ir,[M]:ue},{[B]:HA,[ce]:Ir,[M]:ue},{[B]:FA,[ce]:Ir,[M]:ue},{[B]:VA,[ce]:Ir,[M]:ue},Ch],[M]:ue}],[M]:ue},rA],[M]:ue},{[B]:[aA,oA,iA],[ce]:[{[B]:Js,[ce]:[{[B]:$c,endpoint:{[Ee]:$h,[xe]:Os,[Re]:Ve},[M]:me},{[B]:W0,endpoint:{[Ee]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:Ve},[M]:me},{[B]:Xu,endpoint:{[Ee]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:Ve},[M]:me},{[B]:Wu,endpoint:{[Ee]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:Ve},[M]:me},{[B]:Ju,endpoint:{[Ee]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:Ve},[M]:me}],[M]:ue}],[M]:ue},{[B]:[Yu,{[ee]:kt,[te]:[dt,49,50,Tr],[We]:aN},{[ee]:kt,[te]:[dt,8,12,Tr],[We]:cN},{[ee]:kt,[te]:$A,[We]:KT},{[ee]:kt,[te]:[dt,32,49,Tr],[We]:Hv},{[ee]:Sp,[te]:Q0,[We]:"regionPartition"},{[ee]:pt,[te]:[{[ke]:KT},"--op-s3"]}],[ce]:[{[B]:qA,[ce]:[{[B]:X0,[ce]:[{[B]:[{[ee]:pt,[te]:[cA,"e"]}],[ce]:[{[B]:GA,[ce]:[lA,{[B]:$c,endpoint:{[Ee]:"https://{Bucket}.ec2.{url#authority}",[xe]:Th,[Re]:Ve},[M]:me}],[M]:ue},{endpoint:{[Ee]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[xe]:Th,[Re]:Ve},[M]:me}],[M]:ue},{[B]:[{[ee]:pt,[te]:[cA,"o"]}],[ce]:[{[B]:GA,[ce]:[lA,{[B]:$c,endpoint:{[Ee]:"https://{Bucket}.op-{outpostId}.{url#authority}",[xe]:Th,[Re]:Ve},[M]:me}],[M]:ue},{endpoint:{[Ee]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[xe]:Th,[Re]:Ve},[M]:me}],[M]:ue},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[M]:Ae}],[M]:ue},{error:"Invalid Outposts Bucket alias - it must be a valid bucket name.",[M]:Ae}],[M]:ue},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[M]:Ae}],[M]:ue},{[B]:dde,[ce]:[{[B]:[tn,{[ee]:Pr,[te]:[{[ee]:ks,[te]:[{[ee]:YS,[te]:lde}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[M]:Ae},{[B]:[z0,bN],[ce]:[{[B]:Js,[ce]:[{[B]:KA,[ce]:[{[B]:[tr,tA],error:"S3 Accelerate cannot be used in this region",[M]:Ae},{[B]:[Ot,Nt,dn,Ke,wn],endpoint:{[Ee]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[Ot,Nt,dn,Ke,lt,An],[ce]:[{endpoint:uA,[M]:me}],[M]:ue},{[B]:[Ot,Nt,dn,Ke,lt,In],endpoint:uA,[M]:me},{[B]:[rt,Nt,dn,Ke,wn],endpoint:{[Ee]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[rt,Nt,dn,Ke,lt,An],[ce]:[{endpoint:fA,[M]:me}],[M]:ue},{[B]:[rt,Nt,dn,Ke,lt,In],endpoint:fA,[M]:me},{[B]:[Ot,et,tr,Ke,wn],endpoint:{[Ee]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[Ot,et,tr,Ke,lt,An],[ce]:[{endpoint:dA,[M]:me}],[M]:ue},{[B]:[Ot,et,tr,Ke,lt,In],endpoint:dA,[M]:me},{[B]:[Ot,et,dn,Ke,wn],endpoint:{[Ee]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[Ot,et,dn,Ke,lt,An],[ce]:[{endpoint:hA,[M]:me}],[M]:ue},{[B]:[Ot,et,dn,Ke,lt,In],endpoint:hA,[M]:me},{[B]:[rt,et,dn,tn,ss,N0,wn],endpoint:{[Ee]:lN,[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[rt,et,dn,tn,ss,L0,wn],endpoint:{[Ee]:wp,[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[rt,et,dn,tn,ss,N0,lt,An],[ce]:[{[B]:gi,endpoint:B0,[M]:me},{endpoint:B0,[M]:me}],[M]:ue},{[B]:[rt,et,dn,tn,ss,L0,lt,An],[ce]:[{[B]:gi,endpoint:Fv,[M]:me},pA],[M]:ue},{[B]:[rt,et,dn,tn,ss,N0,lt,In],endpoint:B0,[M]:me},{[B]:[rt,et,dn,tn,ss,L0,lt,In],endpoint:Fv,[M]:me},{[B]:[rt,et,tr,Ke,wn],endpoint:{[Ee]:uN,[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[rt,et,tr,Ke,lt,An],[ce]:[{[B]:gi,endpoint:$0,[M]:me},{endpoint:$0,[M]:me}],[M]:ue},{[B]:[rt,et,tr,Ke,lt,In],endpoint:$0,[M]:me},{[B]:[rt,et,dn,Ke,wn],endpoint:{[Ee]:ZT,[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[rt,et,dn,Ke,lt,An],[ce]:[{[B]:gi,endpoint:{[Ee]:ZT,[xe]:yn,[Re]:Ve},[M]:me},{endpoint:mA,[M]:me}],[M]:ue},{[B]:[rt,et,dn,Ke,lt,In],endpoint:mA,[M]:me}],[M]:ue},Ah],[M]:ue}],[M]:ue},{[B]:[tn,ss,{[ee]:pt,[te]:[{[ee]:Vt,[te]:[yN,"scheme"]},"http"]},{[ee]:_p,[te]:[dt,Tr]},z0,et,rt,dn],[ce]:[{[B]:Js,[ce]:[{[B]:KA,[ce]:[pA],[M]:ue},Ah],[M]:ue}],[M]:ue},{[B]:[z0,{[ee]:fN,[te]:ude,[We]:dN}],[ce]:[{[B]:[{[ee]:Vt,[te]:[gs,"resourceId[0]"],[We]:hN},{[ee]:Pr,[te]:[{[ee]:pt,[te]:[SN,Ep]}]}],[ce]:[{[B]:[{[ee]:pt,[te]:[U0,WS]}],[ce]:[{[B]:J0,[ce]:[{[B]:ZA,[ce]:[gA,yA,{[B]:ev,[ce]:[vA,{[B]:YA,[ce]:[j0,{[B]:tv,[ce]:[{[B]:Js,[ce]:[{[B]:XA,[ce]:[{[B]:nv,[ce]:[{[B]:[{[ee]:pt,[te]:[wN,Ep]}],error:"Invalid ARN: Missing account id",[M]:Ae},{[B]:sv,[ce]:[{[B]:WA,[ce]:[{[B]:$c,endpoint:{[Ee]:QT,[xe]:H0,[Re]:Ve},[M]:me},{[B]:Ih,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:H0,[Re]:Ve},[M]:me},{endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:H0,[Re]:Ve},[M]:me}],[M]:ue},bA],[M]:ue},F0],[M]:ue},V0],[M]:ue},q0],[M]:ue}],[M]:ue}],[M]:ue},SA],[M]:ue},{error:"Invalid ARN: bucket ARN is missing a region",[M]:Ae}],[M]:ue},_A],[M]:ue},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[M]:Ae}],[M]:ue},{[B]:J0,[ce]:[{[B]:ZA,[ce]:[{[B]:ev,[ce]:[{[B]:J0,[ce]:[{[B]:ev,[ce]:[vA,{[B]:YA,[ce]:[j0,{[B]:tv,[ce]:[{[B]:Js,[ce]:[{[B]:[{[ee]:pt,[te]:[_N,"{partitionResult#name}"]}],[ce]:[{[B]:nv,[ce]:[{[B]:[{[ee]:pt,[te]:[U0,ol]}],[ce]:[{[B]:sv,[ce]:[{[B]:WA,[ce]:[{[B]:Y0,error:"Access Points do not support S3 Accelerate",[M]:Ae},{[B]:W0,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:Bu,[Re]:Ve},[M]:me},{[B]:Xu,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:Bu,[Re]:Ve},[M]:me},{[B]:Wu,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:Bu,[Re]:Ve},[M]:me},{[B]:[et,rt,tn,ss],endpoint:{[Ee]:QT,[xe]:Bu,[Re]:Ve},[M]:me},{[B]:Ju,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:Bu,[Re]:Ve},[M]:me}],[M]:ue},bA],[M]:ue},F0],[M]:ue},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[M]:Ae}],[M]:ue},V0],[M]:ue},q0],[M]:ue}],[M]:ue}],[M]:ue},SA],[M]:ue}],[M]:ue}],[M]:ue},{[B]:[{[ee]:Ka,[te]:[e_,Tr]}],[ce]:[{[B]:QA,error:"S3 MRAP does not support dual-stack",[M]:Ae},{[B]:Ih,error:"S3 MRAP does not support FIPS",[M]:Ae},{[B]:Y0,error:"S3 MRAP does not support S3 Accelerate",[M]:Ae},{[B]:[{[ee]:sn,[te]:[{[ke]:"DisableMultiRegionAccessPoints"},Tr]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[M]:Ae},{[B]:[{[ee]:Sp,[te]:Q0,[We]:YT}],[ce]:[{[B]:[{[ee]:pt,[te]:[{[ee]:Vt,[te]:[{[ke]:YT},Gt]},{[ee]:Vt,[te]:[gs,"partition"]}]}],[ce]:[{endpoint:{[Ee]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[xe]:{[On]:[{[pn]:Tr,name:XS,[mn]:ol,[QS]:hde}]},[Re]:Ve},[M]:me}],[M]:ue},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[M]:Ae}],[M]:ue}],[M]:ue},{error:"Invalid Access Point Name",[M]:Ae}],[M]:ue},_A],[M]:ue},{[B]:[{[ee]:pt,[te]:[U0,vf]}],[ce]:[{[B]:QA,error:"S3 Outposts does not support Dual-stack",[M]:Ae},{[B]:Ih,error:"S3 Outposts does not support FIPS",[M]:Ae},{[B]:Y0,error:"S3 Outposts does not support S3 Accelerate",[M]:Ae},{[B]:[{[ee]:ks,[te]:[{[ee]:Vt,[te]:[gs,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[M]:Ae},{[B]:[{[ee]:Vt,[te]:pde,[We]:Hv}],[ce]:[{[B]:qA,[ce]:[j0,{[B]:tv,[ce]:[{[B]:Js,[ce]:[{[B]:XA,[ce]:[{[B]:nv,[ce]:[{[B]:sv,[ce]:[{[B]:[{[ee]:Vt,[te]:mde,[We]:XT}],[ce]:[{[B]:[{[ee]:Vt,[te]:[gs,"resourceId[3]"],[We]:JS}],[ce]:[{[B]:[{[ee]:pt,[te]:[{[ke]:XT},pN]}],[ce]:[{[B]:$c,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[xe]:wA,[Re]:Ve},[M]:me},{endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:wA,[Re]:Ve},[M]:me}],[M]:ue},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[M]:Ae}],[M]:ue},{error:"Invalid ARN: expected an access point name",[M]:Ae}],[M]:ue},{error:"Invalid ARN: Expected a 4-component resource",[M]:Ae}],[M]:ue},F0],[M]:ue},V0],[M]:ue},q0],[M]:ue}],[M]:ue}],[M]:ue},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[M]:Ae}],[M]:ue},{error:"Invalid ARN: The Outpost Id was not set",[M]:Ae}],[M]:ue},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[M]:Ae}],[M]:ue},{error:"Invalid ARN: No ARN type specified",[M]:Ae}],[M]:ue},{[B]:[{[ee]:kt,[te]:[dt,0,4,ade],[We]:WT},{[ee]:pt,[te]:[{[ke]:WT},"arn:"]},{[ee]:Pr,[te]:[{[ee]:ks,[te]:[EA]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[M]:Ae},{[B]:[{[ee]:sn,[te]:[cde,Tr]},EA],error:"Path-style addressing cannot be used with ARN buckets",[M]:Ae},{[B]:fde,[ce]:[{[B]:Js,[ce]:[{[B]:[dn],[ce]:[{[B]:[Ot,Ke,Nt,wn],endpoint:{[Ee]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[Ot,Ke,Nt,lt,An],[ce]:[{endpoint:xA,[M]:me}],[M]:ue},{[B]:[Ot,Ke,Nt,lt,In],endpoint:xA,[M]:me},{[B]:[rt,Ke,Nt,wn],endpoint:{[Ee]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[rt,Ke,Nt,lt,An],[ce]:[{endpoint:RA,[M]:me}],[M]:ue},{[B]:[rt,Ke,Nt,lt,In],endpoint:RA,[M]:me},{[B]:[Ot,Ke,et,wn],endpoint:{[Ee]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[Ot,Ke,et,lt,An],[ce]:[{endpoint:CA,[M]:me}],[M]:ue},{[B]:[Ot,Ke,et,lt,In],endpoint:CA,[M]:me},{[B]:[rt,tn,ss,et,wn],endpoint:{[Ee]:mN,[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[rt,tn,ss,et,lt,An],[ce]:[{[B]:gi,endpoint:G0,[M]:me},{endpoint:G0,[M]:me}],[M]:ue},{[B]:[rt,tn,ss,et,lt,In],endpoint:G0,[M]:me},{[B]:[rt,Ke,et,wn],endpoint:{[Ee]:JT,[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[rt,Ke,et,lt,An],[ce]:[{[B]:gi,endpoint:{[Ee]:JT,[xe]:yn,[Re]:Ve},[M]:me},{endpoint:TA,[M]:me}],[M]:ue},{[B]:[rt,Ke,et,lt,In],endpoint:TA,[M]:me}],[M]:ue},{error:"Path-style addressing cannot be used with S3 Accelerate",[M]:Ae}],[M]:ue}],[M]:ue}],[M]:ue},{[B]:[{[ee]:ks,[te]:[AA]},{[ee]:sn,[te]:[AA,Tr]}],[ce]:[{[B]:Js,[ce]:[{[B]:JA,[ce]:[gA,yA,{[B]:$c,endpoint:{[Ee]:$h,[xe]:K0,[Re]:Ve},[M]:me},{[B]:Ih,endpoint:{[Ee]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:K0,[Re]:Ve},[M]:me},{endpoint:{[Ee]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[xe]:K0,[Re]:Ve},[M]:me}],[M]:ue},Ah],[M]:ue}],[M]:ue},{[B]:[aA],[ce]:[{[B]:Js,[ce]:[{[B]:JA,[ce]:[{[B]:[Nt,Ot,Ke,wn],endpoint:{[Ee]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[Nt,Ot,Ke,lt,An],[ce]:[{endpoint:IA,[M]:me}],[M]:ue},{[B]:[Nt,Ot,Ke,lt,In],endpoint:IA,[M]:me},{[B]:[Nt,rt,Ke,wn],endpoint:{[Ee]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[Nt,rt,Ke,lt,An],[ce]:[{endpoint:OA,[M]:me}],[M]:ue},{[B]:[Nt,rt,Ke,lt,In],endpoint:OA,[M]:me},{[B]:[et,Ot,Ke,wn],endpoint:{[Ee]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[et,Ot,Ke,lt,An],[ce]:[{endpoint:MA,[M]:me}],[M]:ue},{[B]:[et,Ot,Ke,lt,In],endpoint:MA,[M]:me},{[B]:[et,rt,tn,ss,wn],endpoint:{[Ee]:$h,[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[et,rt,tn,ss,lt,An],[ce]:[{[B]:gi,endpoint:Z0,[M]:me},{endpoint:Z0,[M]:me}],[M]:ue},{[B]:[et,rt,tn,ss,lt,In],endpoint:Z0,[M]:me},{[B]:[et,rt,Ke,wn],endpoint:{[Ee]:eA,[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[et,rt,Ke,lt,An],[ce]:[{[B]:gi,endpoint:{[Ee]:eA,[xe]:yn,[Re]:Ve},[M]:me},{endpoint:DA,[M]:me}],[M]:ue},{[B]:[et,rt,Ke,lt,In],endpoint:DA,[M]:me}],[M]:ue},Ah],[M]:ue}],[M]:ue}],[M]:ue},{error:"A region must be set when sending requests to S3.",[M]:Ae}]},yde=gde,vde=new OM({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),EN=(e,t={})=>vde.get(e,()=>jM(yde,{endpointParams:e,logger:t.logger}));hf.aws=Nb;const bde=e=>async(t,n,r)=>{if(!r)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");const i=await e(t,n,r),c=Eo(n)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!c)throw new Error(`getEndpointParameterInstructions() is not defined on '${n.commandName}'`);const l=await mD(r,{getEndpointParameterInstructions:c},t);return Object.assign(i,l)},Sde=async(e,t,n)=>({operation:Eo(t).operation,region:await Ns(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),_de=bde(Sde);function xN(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function RN(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}const wde=(e,t,n)=>i=>{const l=e(i).properties?.authSchemes;if(!l)return t(i);const f=[];for(const d of l){const{name:h,properties:y={},...g}=d,v=h.toLowerCase();h!==v&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${h}' to '${v}'`);let b;if(v==="sigv4a"){b="aws.auth#sigv4a";const R=l.find(C=>{const A=C.name.toLowerCase();return A!=="sigv4a"&&A.startsWith("sigv4")});if(iN.sigv4aDependency()==="none"&&R)continue}else if(v.startsWith("sigv4"))b="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${v}'`);const _=n[b];if(!_)throw new Error(`Could not find HttpAuthOption create function for '${b}'`);const x=_(i);x.schemeId=b,x.signingProperties={...x.signingProperties||{},...g,...y},f.push(x)}return f},Ede=e=>{const t=[];switch(e.operation){default:t.push(xN(e)),t.push(RN(e))}return t},xde=wde(EN,Ede,{"aws.auth#sigv4":xN,"aws.auth#sigv4a":RN}),Rde=e=>{const t=XM(e),n=JK(t);return Object.assign(n,{authSchemePreference:Ns(e.authSchemePreference??[])})},Cde=e=>Object.assign(e,{useFipsEndpoint:e.useFipsEndpoint??!1,useDualstackEndpoint:e.useDualstackEndpoint??!1,forcePathStyle:e.forcePathStyle??!1,useAccelerateEndpoint:e.useAccelerateEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,disableMultiregionAccessPoints:e.disableMultiregionAccessPoints??!1,defaultSigningName:"s3",clientContextParams:e.clientContextParams??{}}),t_={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},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"}};class Vn extends Ea{constructor(t){super(t),Object.setPrototypeOf(this,Vn.prototype)}}class n_ extends Vn{name="NoSuchUpload";$fault="client";constructor(t){super({name:"NoSuchUpload",$fault:"client",...t}),Object.setPrototypeOf(this,n_.prototype)}}class s_ extends Vn{name="ObjectNotInActiveTierError";$fault="client";constructor(t){super({name:"ObjectNotInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,s_.prototype)}}class r_ extends Vn{name="BucketAlreadyExists";$fault="client";constructor(t){super({name:"BucketAlreadyExists",$fault:"client",...t}),Object.setPrototypeOf(this,r_.prototype)}}class o_ extends Vn{name="BucketAlreadyOwnedByYou";$fault="client";constructor(t){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...t}),Object.setPrototypeOf(this,o_.prototype)}}class i_ extends Vn{name="NoSuchBucket";$fault="client";constructor(t){super({name:"NoSuchBucket",$fault:"client",...t}),Object.setPrototypeOf(this,i_.prototype)}}class a_ extends Vn{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(t){super({name:"InvalidObjectState",$fault:"client",...t}),Object.setPrototypeOf(this,a_.prototype),this.StorageClass=t.StorageClass,this.AccessTier=t.AccessTier}}class c_ extends Vn{name="NoSuchKey";$fault="client";constructor(t){super({name:"NoSuchKey",$fault:"client",...t}),Object.setPrototypeOf(this,c_.prototype)}}class l_ extends Vn{name="NotFound";$fault="client";constructor(t){super({name:"NotFound",$fault:"client",...t}),Object.setPrototypeOf(this,l_.prototype)}}class u_ extends Vn{name="EncryptionTypeMismatch";$fault="client";constructor(t){super({name:"EncryptionTypeMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,u_.prototype)}}class f_ extends Vn{name="InvalidRequest";$fault="client";constructor(t){super({name:"InvalidRequest",$fault:"client",...t}),Object.setPrototypeOf(this,f_.prototype)}}class d_ extends Vn{name="InvalidWriteOffset";$fault="client";constructor(t){super({name:"InvalidWriteOffset",$fault:"client",...t}),Object.setPrototypeOf(this,d_.prototype)}}class h_ extends Vn{name="TooManyParts";$fault="client";constructor(t){super({name:"TooManyParts",$fault:"client",...t}),Object.setPrototypeOf(this,h_.prototype)}}class p_ extends Vn{name="IdempotencyParameterMismatch";$fault="client";constructor(t){super({name:"IdempotencyParameterMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,p_.prototype)}}class m_ extends Vn{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(t){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,m_.prototype)}}const g_="ACL",Tde="AbortDate",eI="AccessKeyId",Ade="AbortMultipartUpload",Ide="AbortMultipartUploadOutput",Ode="AbortMultipartUploadRequest",Mde="AcceptRanges",Dde="AbortRuleId",kde="AccessTier",Hn="Bucket",CN="BucketArn",Pde="BucketAlreadyExists",Nde="BucketAlreadyOwnedByYou",zde="BypassGovernanceRetention",Lde="BucketInfo",To="BucketKeyEnabled",TN="BucketRegion",y_="Body",AN="Buckets",Cl="ChecksumAlgorithm",Bde="CreateBucket",Vv="CreateBucketConfiguration",$de="CreateBucketOutput",Ude="CreateBucketRequest",v_="CacheControl",Fi="ChecksumCRC32",Vi="ChecksumCRC32C",qi="ChecksumCRC64NVME",b_="Cache-Control",jde="CreationDate",S_="Content-Disposition",__="ContentDisposition",w_="Content-Encoding",E_="ContentEncoding",x_="ContentLanguage",R_="Content-Language",C_="Content-Length",T_="ContentLength",A_="Content-MD5",I_="ContentMD5",Hde="CompletedMultipartUpload",Fde="CompleteMultipartUploadOutput",Vde="CreateMultipartUploadOutput",qde="CompleteMultipartUploadResult",Gde="CompleteMultipartUploadRequest",Kde="CreateMultipartUploadRequest",IN="CompleteMultipartUpload",Zde="CreateMultipartUpload",Qde="ChecksumMode",Yde="CommonPrefix",Xde="CommonPrefixList",Wde="CompletedPartList",Jde="CompletedPart",ehe="CommonPrefixes",the="ContentRange",nhe="Content-Range",Gi="ChecksumSHA1",Ki="ChecksumSHA256",she="CreateSessionOutput",rhe="CreateSessionResult",ohe="CreateSessionRequest",ihe="CreateSession",Za="ChecksumType",O_="Content-Type",M_="ContentType",Sm="ContinuationToken",ahe="Contents",tI="Credentials",ON="DeleteMarker",che="DisplayName",lhe="DeleteObjectOutput",uhe="DeleteObjectRequest",fhe="DeleteObject",dhe="DataRedundancy",MN="Delimiter",bf="Expiration",Ao="ExpectedBucketOwner",nI="ExpiresString",hhe="EncryptionTypeMismatch",_o="ETag",DN="EncodingType",il="Expires",phe="FetchOwner",D_="GrantFullControl",mhe="GetObject",ghe="GetObjectOutput",yhe="GetObjectRequest",k_="GrantRead",P_="GrantReadACP",vhe="GrantWrite",N_="GrantWriteACP",bhe="ID",_m="IfMatch",She="IfMatchInitiatedTime",_he="IfMatchLastModifiedTime",whe="IfMatchSize",Ehe="If-Modified-Since",xhe="IfModifiedSince",Rhe="InitiateMultipartUploadResult",wm="If-Match",z_="IfNoneMatch",L_="If-None-Match",Che="InvalidObjectState",The="IdempotencyParameterMismatch",Ahe="InvalidRequest",Ihe="IsRestoreInProgress",Ohe="IsTruncated",Mhe="IfUnmodifiedSince",Dhe="If-Unmodified-Since",khe="InvalidWriteOffset",ur="Key",Phe="KeyCount",xp="Location",Nhe="ListAllMyBucketsResult",zhe="ListBuckets",Lhe="ListBucketsOutput",Bhe="ListBucketsRequest",$he="ListBucketResult",Uhe="LocationConstraint",jhe="LocationInfo",kN="LastModified",Hhe="Last-Modified",Fhe="ListObjectsV2",Vhe="ListObjectsV2Output",qhe="ListObjectsV2Request",B_="Metadata",Ghe="MaxBuckets",Khe="MFA",PN="MaxKeys",Zhe="MissingMeta",Qhe="MpuObjectSize",Yhe="MultipartUpload",$_="Name",Xhe="NextContinuationToken",Whe="NotFound",Jhe="NoSuchBucket",epe="NoSuchKey",tpe="NoSuchUpload",U_="Owner",npe="ObjectAlreadyInActiveTierError",spe="ObjectLockEnabledForBucket",j_="ObjectLockLegalHoldStatus",H_="ObjectLockMode",F_="ObjectLockRetainUntilDate",rpe="ObjectList",ope="ObjectNotInActiveTierError",ipe="ObjectOwnership",ape="OptionalObjectAttributes",cpe="Object",Lf="Prefix",lpe="PartsCount",V_="PartNumber",upe="PutObject",fpe="PutObjectOutput",dpe="PutObjectRequest",hpe="PutObjectTagging",ppe="PutObjectTaggingOutput",mpe="PutObjectTaggingRequest",gpe="Parts",ype="Part",Zi="RequestCharged",vpe="ResponseCacheControl",bpe="ResponseContentDisposition",Spe="ResponseContentEncoding",_pe="ResponseContentLanguage",wpe="ResponseContentType",Epe="ResponseExpires",xpe="RestoreExpiryDate",Io="RequestPayer",Rpe="ReplicationStatus",NN="RestoreStatus",sI="Range",Cpe="Restore",zN="StartAfter",rI="SecretAccessKey",Tpe="StreamingBlob",Bf="StorageClass",Ape="SessionCredentialValue",Ipe="SessionCredentials",Ope="SessionMode",Oo="ServerSideEncryption",Mo="SSECustomerAlgorithm",Tl="SSECustomerKey",Do="SSECustomerKeyMD5",Qa="SSEKMSEncryptionContext",Ur="SSEKMSKeyId",oI="SessionToken",LN="Size",Mpe="Tags",Dpe="TagCount",kpe="TooManyParts",BN="TagSet",$N="Tag",Sf="Tagging",UN="Type",Em="UploadId",Ppe="UploadPart",Npe="UploadPartOutput",zpe="UploadPartRequest",Lpe="Value",Qi="VersionId",Bpe="WriteOffsetBytes",q_="WebsiteRedirectLocation",$pe="accept-ranges",Upe="bucket-region",bs="client",jN="continuation-token",jpe="delimiter",Ss="error",Hpe="encoding-type",Fpe="fetch-owner",fr="http",xm="httpChecksum",Bs="httpError",z="httpHeader",G_="httpPayload",K_="httpPrefixHeaders",Bt="httpQuery",Vpe="max-buckets",qpe="max-keys",HN="prefix",FN="partNumber",Gpe="response-cache-control",Kpe="response-content-disposition",Zpe="response-content-encoding",Qpe="response-content-language",Ype="response-content-type",Xpe="response-expires",Wpe="streaming",Jpe="start-after",VN="smithy.ts.sdk.synthetic.com.amazonaws.s3",Z_="uploadId",Q_="versionId",Rp="xmlFlattened",Un="xmlName",Y_="x-amz-acl",eme="x-amz-abort-date",tme="x-amz-abort-rule-id",nme="x-amz-bucket-arn",sme="x-amz-bypass-governance-retention",rme="x-amz-bucket-object-lock-enabled",qN="x-amz-checksum-algorithm",Al="x-amz-checksum-crc32",Il="x-amz-checksum-crc32c",Ol="x-amz-checksum-crc64nvme",ome="x-amz-checksum-mode",Ml="x-amz-checksum-sha1",Dl="x-amz-checksum-sha256",ime="x-amz-create-session-mode",$f="x-amz-checksum-type",GN="x-amz-delete-marker",X_="x-amz-expiration",ko="x-amz-expected-bucket-owner",W_="x-amz-grant-full-control",J_="x-amz-grant-read",ew="x-amz-grant-read-acp",ame="x-amz-grant-write",tw="x-amz-grant-write-acp",cme="x-amz-if-match-initiated-time",lme="x-amz-if-match-last-modified-time",ume="x-amz-if-match-size",nw="x-amz-meta-",fme="x-amz-mfa",dme="x-amz-missing-meta",hme="x-amz-mp-object-size",pme="x-amz-mp-parts-count",sw="x-amz-object-lock-legal-hold",rw="x-amz-object-lock-mode",ow="x-amz-object-lock-retain-until-date",mme="x-amz-object-ownership",gme="x-amz-optional-object-attributes",yme="x-amz-object-size",vme="x-amz-restore",Yi="x-amz-request-charged",Po="x-amz-request-payer",bme="x-amz-replication-status",iw="x-amz-storage-class",aw="x-amz-sdk-checksum-algorithm",No="x-amz-server-side-encryption",zo="x-amz-server-side-encryption-aws-kms-key-id",Lo="x-amz-server-side-encryption-bucket-key-enabled",kl="x-amz-server-side-encryption-context",Bo="x-amz-server-side-encryption-customer-algorithm",Uf="x-amz-server-side-encryption-customer-key",$o="x-amz-server-side-encryption-customer-key-MD5",KN="x-amz-tagging",Sme="x-amz-tagging-count",jf="x-amz-version-id",_me="x-amz-write-offset-bytes",cw="x-amz-website-redirect-location",Se="com.amazonaws.s3";var iI=[0,Se,Ape,8,0],Hf=[0,Se,Tl,8,0],Pl=[0,Se,Qa,8,0],Uo=[0,Se,Ur,8,0],lw=[0,Se,Tpe,{[Wpe]:1},42],wme=[3,Se,Ide,0,[Zi],[[0,{[z]:Yi}]]],Eme=[3,Se,Ode,0,[Hn,ur,Em,Io,Ao,She],[[0,1],[0,1],[0,{[Bt]:Z_}],[0,{[z]:Po}],[0,{[z]:ko}],[6,{[z]:cme}]],3],xme=[3,Se,Hn,0,[$_,jde,TN,CN],[0,4,0,0]],Rme=[-3,Se,Pde,{[Ss]:bs,[Bs]:409},[],[]];Mt.for(Se).registerError(Rme,r_);var Cme=[-3,Se,Nde,{[Ss]:bs,[Bs]:409},[],[]];Mt.for(Se).registerError(Cme,o_);var Tme=[3,Se,Lde,0,[dhe,UN],[0,0]],Ame=[3,Se,Yde,0,[Lf],[0]],Ime=[3,Se,Hde,0,[gpe],[[()=>_ge,{[Rp]:1,[Un]:ype}]]],Ome=[3,Se,Jde,0,[_o,Fi,Vi,qi,Gi,Ki,V_],[0,0,0,0,0,0,1]],Mme=[3,Se,Fde,{[Un]:qde},[xp,Hn,ur,bf,_o,Fi,Vi,qi,Gi,Ki,Za,Oo,Qi,Ur,To,Zi],[0,0,0,[0,{[z]:X_}],0,0,0,0,0,0,0,[0,{[z]:No}],[0,{[z]:jf}],[()=>Uo,{[z]:zo}],[2,{[z]:Lo}],[0,{[z]:Yi}]]],Dme=[3,Se,Gde,0,[Hn,ur,Em,Yhe,Fi,Vi,qi,Gi,Ki,Za,Qhe,Io,Ao,_m,z_,Mo,Tl,Do],[[0,1],[0,1],[0,{[Bt]:Z_}],[()=>Ime,{[G_]:1,[Un]:IN}],[0,{[z]:Al}],[0,{[z]:Il}],[0,{[z]:Ol}],[0,{[z]:Ml}],[0,{[z]:Dl}],[0,{[z]:$f}],[1,{[z]:hme}],[0,{[z]:Po}],[0,{[z]:ko}],[0,{[z]:wm}],[0,{[z]:L_}],[0,{[z]:Bo}],[()=>Hf,{[z]:Uf}],[0,{[z]:$o}]],3],kme=[3,Se,Vv,0,[Uhe,xp,Hn,Mpe],[0,()=>Jme,()=>Tme,[()=>QN,0]]],Pme=[3,Se,$de,0,[xp,CN],[[0,{[z]:xp}],[0,{[z]:nme}]]],Nme=[3,Se,Ude,0,[Hn,g_,Vv,D_,k_,P_,vhe,N_,spe,ipe],[[0,1],[0,{[z]:Y_}],[()=>kme,{[G_]:1,[Un]:Vv}],[0,{[z]:W_}],[0,{[z]:J_}],[0,{[z]:ew}],[0,{[z]:ame}],[0,{[z]:tw}],[2,{[z]:rme}],[0,{[z]:mme}]],1],zme=[3,Se,Vde,{[Un]:Rhe},[Tde,Dde,Hn,ur,Em,Oo,Mo,Do,Ur,Qa,To,Zi,Cl,Za],[[4,{[z]:eme}],[0,{[z]:tme}],[0,{[Un]:Hn}],0,0,[0,{[z]:No}],[0,{[z]:Bo}],[0,{[z]:$o}],[()=>Uo,{[z]:zo}],[()=>Pl,{[z]:kl}],[2,{[z]:Lo}],[0,{[z]:Yi}],[0,{[z]:qN}],[0,{[z]:$f}]]],Lme=[3,Se,Kde,0,[Hn,ur,g_,v_,__,E_,x_,M_,il,D_,k_,P_,N_,B_,Oo,Bf,q_,Mo,Tl,Do,Ur,Qa,To,Io,Sf,H_,F_,j_,Ao,Cl,Za],[[0,1],[0,1],[0,{[z]:Y_}],[0,{[z]:b_}],[0,{[z]:S_}],[0,{[z]:w_}],[0,{[z]:R_}],[0,{[z]:O_}],[4,{[z]:il}],[0,{[z]:W_}],[0,{[z]:J_}],[0,{[z]:ew}],[0,{[z]:tw}],[128,{[K_]:nw}],[0,{[z]:No}],[0,{[z]:iw}],[0,{[z]:cw}],[0,{[z]:Bo}],[()=>Hf,{[z]:Uf}],[0,{[z]:$o}],[()=>Uo,{[z]:zo}],[()=>Pl,{[z]:kl}],[2,{[z]:Lo}],[0,{[z]:Po}],[0,{[z]:KN}],[0,{[z]:rw}],[5,{[z]:ow}],[0,{[z]:sw}],[0,{[z]:ko}],[0,{[z]:qN}],[0,{[z]:$f}]],2],Bme=[3,Se,she,{[Un]:rhe},[tI,Oo,Ur,Qa,To],[[()=>dge,{[Un]:tI}],[0,{[z]:No}],[()=>Uo,{[z]:zo}],[()=>Pl,{[z]:kl}],[2,{[z]:Lo}]],1],$me=[3,Se,ohe,0,[Hn,Ope,Oo,Ur,Qa,To],[[0,1],[0,{[z]:ime}],[0,{[z]:No}],[()=>Uo,{[z]:zo}],[()=>Pl,{[z]:kl}],[2,{[z]:Lo}]],1],Ume=[3,Se,lhe,0,[ON,Qi,Zi],[[2,{[z]:GN}],[0,{[z]:jf}],[0,{[z]:Yi}]]],jme=[3,Se,uhe,0,[Hn,ur,Khe,Qi,Io,zde,Ao,_m,_he,whe],[[0,1],[0,1],[0,{[z]:fme}],[0,{[Bt]:Q_}],[0,{[z]:Po}],[2,{[z]:sme}],[0,{[z]:ko}],[0,{[z]:wm}],[6,{[z]:lme}],[1,{[z]:ume}]],2],Hme=[-3,Se,hhe,{[Ss]:bs,[Bs]:400},[],[]];Mt.for(Se).registerError(Hme,u_);var Fme=[3,Se,ghe,0,[y_,ON,Mde,bf,Cpe,kN,T_,_o,Fi,Vi,qi,Gi,Ki,Za,Zhe,Qi,v_,__,E_,x_,the,M_,il,nI,q_,Oo,B_,Mo,Do,Ur,To,Bf,Zi,Rpe,lpe,Dpe,H_,F_,j_],[[()=>lw,16],[2,{[z]:GN}],[0,{[z]:$pe}],[0,{[z]:X_}],[0,{[z]:vme}],[4,{[z]:Hhe}],[1,{[z]:C_}],[0,{[z]:_o}],[0,{[z]:Al}],[0,{[z]:Il}],[0,{[z]:Ol}],[0,{[z]:Ml}],[0,{[z]:Dl}],[0,{[z]:$f}],[1,{[z]:dme}],[0,{[z]:jf}],[0,{[z]:b_}],[0,{[z]:S_}],[0,{[z]:w_}],[0,{[z]:R_}],[0,{[z]:nhe}],[0,{[z]:O_}],[4,{[z]:il}],[0,{[z]:nI}],[0,{[z]:cw}],[0,{[z]:No}],[128,{[K_]:nw}],[0,{[z]:Bo}],[0,{[z]:$o}],[()=>Uo,{[z]:zo}],[2,{[z]:Lo}],[0,{[z]:iw}],[0,{[z]:Yi}],[0,{[z]:bme}],[1,{[z]:pme}],[1,{[z]:Sme}],[0,{[z]:rw}],[5,{[z]:ow}],[0,{[z]:sw}]]],Vme=[3,Se,yhe,0,[Hn,ur,_m,xhe,z_,Mhe,sI,vpe,bpe,Spe,_pe,wpe,Epe,Qi,Mo,Tl,Do,Io,V_,Ao,Qde],[[0,1],[0,1],[0,{[z]:wm}],[4,{[z]:Ehe}],[0,{[z]:L_}],[4,{[z]:Dhe}],[0,{[z]:sI}],[0,{[Bt]:Gpe}],[0,{[Bt]:Kpe}],[0,{[Bt]:Zpe}],[0,{[Bt]:Qpe}],[0,{[Bt]:Ype}],[6,{[Bt]:Xpe}],[0,{[Bt]:Q_}],[0,{[z]:Bo}],[()=>Hf,{[z]:Uf}],[0,{[z]:$o}],[0,{[z]:Po}],[1,{[Bt]:FN}],[0,{[z]:ko}],[0,{[z]:ome}]],2],qme=[-3,Se,The,{[Ss]:bs,[Bs]:400},[],[]];Mt.for(Se).registerError(qme,p_);var Gme=[-3,Se,Che,{[Ss]:bs,[Bs]:403},[Bf,kde],[0,0]];Mt.for(Se).registerError(Gme,a_);var Kme=[-3,Se,Ahe,{[Ss]:bs,[Bs]:400},[],[]];Mt.for(Se).registerError(Kme,f_);var Zme=[-3,Se,khe,{[Ss]:bs,[Bs]:400},[],[]];Mt.for(Se).registerError(Zme,d_);var Qme=[3,Se,Lhe,{[Un]:Nhe},[AN,U_,Sm,Lf],[[()=>bge,0],()=>ZN,0,0]],Yme=[3,Se,Bhe,0,[Ghe,Sm,Lf,TN],[[1,{[Bt]:Vpe}],[0,{[Bt]:jN}],[0,{[Bt]:HN}],[0,{[Bt]:Upe}]]],Xme=[3,Se,Vhe,{[Un]:$he},[Ohe,ahe,$_,Lf,MN,PN,ehe,DN,Phe,Sm,Xhe,zN,Zi],[2,[()=>wge,{[Rp]:1}],0,0,0,1,[()=>Sge,{[Rp]:1}],0,1,0,0,0,[0,{[z]:Yi}]]],Wme=[3,Se,qhe,0,[Hn,MN,DN,PN,Lf,Sm,phe,zN,Io,Ao,ape],[[0,1],[0,{[Bt]:jpe}],[0,{[Bt]:Hpe}],[1,{[Bt]:qpe}],[0,{[Bt]:HN}],[0,{[Bt]:jN}],[2,{[Bt]:Fpe}],[0,{[Bt]:Jpe}],[0,{[z]:Po}],[0,{[z]:ko}],[64,{[z]:gme}]],1],Jme=[3,Se,jhe,0,[UN,$_],[0,0]],ege=[-3,Se,Jhe,{[Ss]:bs,[Bs]:404},[],[]];Mt.for(Se).registerError(ege,i_);var tge=[-3,Se,epe,{[Ss]:bs,[Bs]:404},[],[]];Mt.for(Se).registerError(tge,c_);var nge=[-3,Se,tpe,{[Ss]:bs,[Bs]:404},[],[]];Mt.for(Se).registerError(nge,n_);var sge=[-3,Se,Whe,{[Ss]:bs},[],[]];Mt.for(Se).registerError(sge,l_);var rge=[3,Se,cpe,0,[ur,kN,_o,Cl,Za,LN,Bf,U_,NN],[0,4,0,[64,{[Rp]:1}],0,1,0,()=>ZN,()=>fge]],oge=[-3,Se,npe,{[Ss]:bs,[Bs]:403},[],[]];Mt.for(Se).registerError(oge,m_);var ige=[-3,Se,ope,{[Ss]:bs,[Bs]:403},[],[]];Mt.for(Se).registerError(ige,s_);var ZN=[3,Se,U_,0,[che,bhe],[0,0]],age=[3,Se,fpe,0,[bf,_o,Fi,Vi,qi,Gi,Ki,Za,Oo,Qi,Mo,Do,Ur,Qa,To,LN,Zi],[[0,{[z]:X_}],[0,{[z]:_o}],[0,{[z]:Al}],[0,{[z]:Il}],[0,{[z]:Ol}],[0,{[z]:Ml}],[0,{[z]:Dl}],[0,{[z]:$f}],[0,{[z]:No}],[0,{[z]:jf}],[0,{[z]:Bo}],[0,{[z]:$o}],[()=>Uo,{[z]:zo}],[()=>Pl,{[z]:kl}],[2,{[z]:Lo}],[1,{[z]:yme}],[0,{[z]:Yi}]]],cge=[3,Se,dpe,0,[Hn,ur,g_,y_,v_,__,E_,x_,T_,I_,M_,Cl,Fi,Vi,qi,Gi,Ki,il,_m,z_,D_,k_,P_,N_,Bpe,B_,Oo,Bf,q_,Mo,Tl,Do,Ur,Qa,To,Io,Sf,H_,F_,j_,Ao],[[0,1],[0,1],[0,{[z]:Y_}],[()=>lw,16],[0,{[z]:b_}],[0,{[z]:S_}],[0,{[z]:w_}],[0,{[z]:R_}],[1,{[z]:C_}],[0,{[z]:A_}],[0,{[z]:O_}],[0,{[z]:aw}],[0,{[z]:Al}],[0,{[z]:Il}],[0,{[z]:Ol}],[0,{[z]:Ml}],[0,{[z]:Dl}],[4,{[z]:il}],[0,{[z]:wm}],[0,{[z]:L_}],[0,{[z]:W_}],[0,{[z]:J_}],[0,{[z]:ew}],[0,{[z]:tw}],[1,{[z]:_me}],[128,{[K_]:nw}],[0,{[z]:No}],[0,{[z]:iw}],[0,{[z]:cw}],[0,{[z]:Bo}],[()=>Hf,{[z]:Uf}],[0,{[z]:$o}],[()=>Uo,{[z]:zo}],[()=>Pl,{[z]:kl}],[2,{[z]:Lo}],[0,{[z]:Po}],[0,{[z]:KN}],[0,{[z]:rw}],[5,{[z]:ow}],[0,{[z]:sw}],[0,{[z]:ko}]],2],lge=[3,Se,ppe,0,[Qi],[[0,{[z]:jf}]]],uge=[3,Se,mpe,0,[Hn,ur,Sf,Qi,I_,Cl,Ao,Io],[[0,1],[0,1],[()=>pge,{[G_]:1,[Un]:Sf}],[0,{[Bt]:Q_}],[0,{[z]:A_}],[0,{[z]:aw}],[0,{[z]:ko}],[0,{[z]:Po}]],3],fge=[3,Se,NN,0,[Ihe,xpe],[2,4]],dge=[3,Se,Ipe,0,[eI,rI,oI,bf],[[0,{[Un]:eI}],[()=>iI,{[Un]:rI}],[()=>iI,{[Un]:oI}],[4,{[Un]:bf}]],4],hge=[3,Se,$N,0,[ur,Lpe],[0,0],2],pge=[3,Se,Sf,0,[BN],[[()=>QN,0]],1],mge=[-3,Se,kpe,{[Ss]:bs,[Bs]:400},[],[]];Mt.for(Se).registerError(mge,h_);var gge=[3,Se,Npe,0,[Oo,_o,Fi,Vi,qi,Gi,Ki,Mo,Do,Ur,To,Zi],[[0,{[z]:No}],[0,{[z]:_o}],[0,{[z]:Al}],[0,{[z]:Il}],[0,{[z]:Ol}],[0,{[z]:Ml}],[0,{[z]:Dl}],[0,{[z]:Bo}],[0,{[z]:$o}],[()=>Uo,{[z]:zo}],[2,{[z]:Lo}],[0,{[z]:Yi}]]],yge=[3,Se,zpe,0,[Hn,ur,V_,Em,y_,T_,I_,Cl,Fi,Vi,qi,Gi,Ki,Mo,Tl,Do,Io,Ao],[[0,1],[0,1],[1,{[Bt]:FN}],[0,{[Bt]:Z_}],[()=>lw,16],[1,{[z]:C_}],[0,{[z]:A_}],[0,{[z]:aw}],[0,{[z]:Al}],[0,{[z]:Il}],[0,{[z]:Ol}],[0,{[z]:Ml}],[0,{[z]:Dl}],[0,{[z]:Bo}],[()=>Hf,{[z]:Uf}],[0,{[z]:$o}],[0,{[z]:Po}],[0,{[z]:ko}]],4],vge=[-3,VN,"S3ServiceException",0,[],[]];Mt.for(VN).registerError(vge,Vn);var bge=[1,Se,AN,0,[()=>xme,{[Un]:Hn}]],Sge=[1,Se,Xde,0,()=>Ame],_ge=[1,Se,Wde,0,()=>Ome],wge=[1,Se,rpe,0,[()=>rge,0]],QN=[1,Se,BN,0,[()=>hge,{[Un]:$N}]],Ave=[9,Se,Ade,{[fr]:["DELETE","/{Key+}?x-id=AbortMultipartUpload",204]},()=>Eme,()=>wme],Ive=[9,Se,IN,{[fr]:["POST","/{Key+}",200]},()=>Dme,()=>Mme],Ove=[9,Se,Bde,{[fr]:["PUT","/",200]},()=>Nme,()=>Pme],Mve=[9,Se,Zde,{[fr]:["POST","/{Key+}?uploads",200]},()=>Lme,()=>zme],Ege=[9,Se,ihe,{[fr]:["GET","/?session",200]},()=>$me,()=>Bme],Dve=[9,Se,fhe,{[fr]:["DELETE","/{Key+}?x-id=DeleteObject",204]},()=>jme,()=>Ume],kve=[9,Se,mhe,{[xm]:"-",[fr]:["GET","/{Key+}?x-id=GetObject",200]},()=>Vme,()=>Fme],xge=[9,Se,zhe,{[fr]:["GET","/?x-id=ListBuckets",200]},()=>Yme,()=>Qme],Rge=[9,Se,Fhe,{[fr]:["GET","/?list-type=2",200]},()=>Wme,()=>Xme],Pve=[9,Se,upe,{[xm]:"-",[fr]:["PUT","/{Key+}?x-id=PutObject",200]},()=>cge,()=>age],Nve=[9,Se,hpe,{[xm]:"-",[fr]:["PUT","/{Key+}?tagging",200]},()=>uge,()=>lge],zve=[9,Se,Ppe,{[xm]:"-",[fr]:["PUT","/{Key+}?x-id=UploadPart",200]},()=>yge,()=>gge];class Cge extends Br.classBuilder().ep({...t_,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions()),KS(r)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").sc(Ege).build(){}const Tge="3.975.0",Age={version:Tge};function aI(e){return typeof e=="string"?e.length===0:e.byteLength===0}var YN={name:"SHA-1"},cI={name:"HMAC",hash:YN},Ige=new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]),Oge=(function(){function e(t){this.toHash=new Uint8Array(0),t!==void 0&&(this.key=new Promise(function(n,r){Ai().crypto.subtle.importKey("raw",lI(t),cI,!1,["sign"]).then(n,r)}),this.key.catch(function(){}))}return e.prototype.update=function(t){if(!aI(t)){var n=lI(t),r=new Uint8Array(this.toHash.byteLength+n.byteLength);r.set(this.toHash,0),r.set(n,this.toHash.byteLength),this.toHash=r}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(n){return Ai().crypto.subtle.sign(cI,n,t.toHash).then(function(r){return new Uint8Array(r)})}):aI(this.toHash)?Promise.resolve(Ige):Promise.resolve().then(function(){return Ai().crypto.subtle.digest(YN,t.toHash)}).then(function(n){return Promise.resolve(new Uint8Array(n))})},e.prototype.reset=function(){this.toHash=new Uint8Array(0)},e})();function lI(e){return typeof e=="string"?ED(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}var Mge=(function(){function e(t){if(TD(Ai()))this.hash=new Oge(t);else throw new Error("SHA1 not supported")}return e.prototype.update=function(t,n){this.hash.update(za(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();class ef{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,i=Math.abs(Math.round(t));r>-1&&i>0;r--,i/=256)n[r]=i;return t<0&&uI(n),new ef(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&uI(t),parseInt(ms(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function uI(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}class Dge{toUtf8;fromUtf8;constructor(t,n){this.toUtf8=t,this.fromUtf8=n}format(t){const n=[];for(const c of Object.keys(t)){const l=this.fromUtf8(c);n.push(Uint8Array.from([l.byteLength]),l,this.formatHeaderValue(t[c]))}const r=new Uint8Array(n.reduce((c,l)=>c+l.byteLength,0));let i=0;for(const c of n)r.set(c,i),i+=c.byteLength;return r}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,3),n.setInt16(1,t.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,t.value,!1),new Uint8Array(r.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const c=new DataView(new ArrayBuffer(3+t.value.byteLength));c.setUint8(0,6),c.setUint16(1,t.value.byteLength,!1);const l=new Uint8Array(c.buffer);return l.set(t.value,3),l;case"string":const f=this.fromUtf8(t.value),d=new DataView(new ArrayBuffer(3+f.byteLength));d.setUint8(0,7),d.setUint16(1,f.byteLength,!1);const h=new Uint8Array(d.buffer);return h.set(f,3),h;case"timestamp":const y=new Uint8Array(9);return y[0]=8,y.set(ef.fromNumber(t.value.valueOf()).bytes,1),y;case"uuid":if(!jge.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const g=new Uint8Array(17);return g[0]=9,g.set(yM(t.value.replace(/\-/g,"")),1),g}}parse(t){const n={};let r=0;for(;r{if(typeof f!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+f);t=f,n=4,r=new Uint8Array(f),new DataView(r.buffer).setUint32(0,f,!1)},l=async function*(){const f=e[Symbol.asyncIterator]();for(;;){const{value:d,done:h}=await f.next();if(h){if(t)if(t===n)yield r;else throw new Error("Truncated event message received.");else return;return}const y=d.length;let g=0;for(;g({[Symbol.asyncIterator]:async function*(){const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)return;yield r}}finally{t.releaseLock()}}}),Jge=e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(n){const{done:r,value:i}=await t.next();if(r)return n.close();n.enqueue(i)}})};class eye{universalMarshaller;constructor({utf8Encoder:t,utf8Decoder:n}){this.universalMarshaller=new Xge({utf8Decoder:n,utf8Encoder:t})}deserialize(t,n){const r=tye(t)?Wge(t):t;return this.universalMarshaller.deserialize(r,n)}serialize(t,n){const r=this.universalMarshaller.serialize(t,n);return typeof ReadableStream=="function"?Jge(r):r}}const tye=e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,nye=e=>new eye(e);async function sye(e,t,n=1024*1024){const r=e.size;let i=0;for(;i{r.update(i)}),r.digest()},yi=64,oye=16,iye=[1732584193,4023233417,2562383102,271733878];class aye{state;buffer;bufferLength;bytesHashed;finished;constructor(){this.reset()}update(t){if(cye(t))return;if(this.finished)throw new Error("Attempted to update an already finished hash.");const n=lye(t);let r=0,{byteLength:i}=n;for(this.bytesHashed+=i;i>0;)this.buffer.setUint8(this.bufferLength++,n[r++]),i--,this.bufferLength===yi&&(this.hashBuffer(),this.bufferLength=0)}async digest(){if(!this.finished){const{buffer:n,bufferLength:r,bytesHashed:i}=this,c=i*8;if(n.setUint8(this.bufferLength++,128),r%yi>=yi-8){for(let l=this.bufferLength;l>>0,!0),n.setUint32(yi-4,Math.floor(c/4294967296),!0),this.hashBuffer(),this.finished=!0}const t=new DataView(new ArrayBuffer(oye));for(let n=0;n<4;n++)t.setUint32(n*4,this.state[n],!0);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}hashBuffer(){const{buffer:t,state:n}=this;let r=n[0],i=n[1],c=n[2],l=n[3];r=Yn(r,i,c,l,t.getUint32(0,!0),7,3614090360),l=Yn(l,r,i,c,t.getUint32(4,!0),12,3905402710),c=Yn(c,l,r,i,t.getUint32(8,!0),17,606105819),i=Yn(i,c,l,r,t.getUint32(12,!0),22,3250441966),r=Yn(r,i,c,l,t.getUint32(16,!0),7,4118548399),l=Yn(l,r,i,c,t.getUint32(20,!0),12,1200080426),c=Yn(c,l,r,i,t.getUint32(24,!0),17,2821735955),i=Yn(i,c,l,r,t.getUint32(28,!0),22,4249261313),r=Yn(r,i,c,l,t.getUint32(32,!0),7,1770035416),l=Yn(l,r,i,c,t.getUint32(36,!0),12,2336552879),c=Yn(c,l,r,i,t.getUint32(40,!0),17,4294925233),i=Yn(i,c,l,r,t.getUint32(44,!0),22,2304563134),r=Yn(r,i,c,l,t.getUint32(48,!0),7,1804603682),l=Yn(l,r,i,c,t.getUint32(52,!0),12,4254626195),c=Yn(c,l,r,i,t.getUint32(56,!0),17,2792965006),i=Yn(i,c,l,r,t.getUint32(60,!0),22,1236535329),r=Xn(r,i,c,l,t.getUint32(4,!0),5,4129170786),l=Xn(l,r,i,c,t.getUint32(24,!0),9,3225465664),c=Xn(c,l,r,i,t.getUint32(44,!0),14,643717713),i=Xn(i,c,l,r,t.getUint32(0,!0),20,3921069994),r=Xn(r,i,c,l,t.getUint32(20,!0),5,3593408605),l=Xn(l,r,i,c,t.getUint32(40,!0),9,38016083),c=Xn(c,l,r,i,t.getUint32(60,!0),14,3634488961),i=Xn(i,c,l,r,t.getUint32(16,!0),20,3889429448),r=Xn(r,i,c,l,t.getUint32(36,!0),5,568446438),l=Xn(l,r,i,c,t.getUint32(56,!0),9,3275163606),c=Xn(c,l,r,i,t.getUint32(12,!0),14,4107603335),i=Xn(i,c,l,r,t.getUint32(32,!0),20,1163531501),r=Xn(r,i,c,l,t.getUint32(52,!0),5,2850285829),l=Xn(l,r,i,c,t.getUint32(8,!0),9,4243563512),c=Xn(c,l,r,i,t.getUint32(28,!0),14,1735328473),i=Xn(i,c,l,r,t.getUint32(48,!0),20,2368359562),r=Wn(r,i,c,l,t.getUint32(20,!0),4,4294588738),l=Wn(l,r,i,c,t.getUint32(32,!0),11,2272392833),c=Wn(c,l,r,i,t.getUint32(44,!0),16,1839030562),i=Wn(i,c,l,r,t.getUint32(56,!0),23,4259657740),r=Wn(r,i,c,l,t.getUint32(4,!0),4,2763975236),l=Wn(l,r,i,c,t.getUint32(16,!0),11,1272893353),c=Wn(c,l,r,i,t.getUint32(28,!0),16,4139469664),i=Wn(i,c,l,r,t.getUint32(40,!0),23,3200236656),r=Wn(r,i,c,l,t.getUint32(52,!0),4,681279174),l=Wn(l,r,i,c,t.getUint32(0,!0),11,3936430074),c=Wn(c,l,r,i,t.getUint32(12,!0),16,3572445317),i=Wn(i,c,l,r,t.getUint32(24,!0),23,76029189),r=Wn(r,i,c,l,t.getUint32(36,!0),4,3654602809),l=Wn(l,r,i,c,t.getUint32(48,!0),11,3873151461),c=Wn(c,l,r,i,t.getUint32(60,!0),16,530742520),i=Wn(i,c,l,r,t.getUint32(8,!0),23,3299628645),r=Jn(r,i,c,l,t.getUint32(0,!0),6,4096336452),l=Jn(l,r,i,c,t.getUint32(28,!0),10,1126891415),c=Jn(c,l,r,i,t.getUint32(56,!0),15,2878612391),i=Jn(i,c,l,r,t.getUint32(20,!0),21,4237533241),r=Jn(r,i,c,l,t.getUint32(48,!0),6,1700485571),l=Jn(l,r,i,c,t.getUint32(12,!0),10,2399980690),c=Jn(c,l,r,i,t.getUint32(40,!0),15,4293915773),i=Jn(i,c,l,r,t.getUint32(4,!0),21,2240044497),r=Jn(r,i,c,l,t.getUint32(32,!0),6,1873313359),l=Jn(l,r,i,c,t.getUint32(60,!0),10,4264355552),c=Jn(c,l,r,i,t.getUint32(24,!0),15,2734768916),i=Jn(i,c,l,r,t.getUint32(52,!0),21,1309151649),r=Jn(r,i,c,l,t.getUint32(16,!0),6,4149444226),l=Jn(l,r,i,c,t.getUint32(44,!0),10,3174756917),c=Jn(c,l,r,i,t.getUint32(8,!0),15,718787259),i=Jn(i,c,l,r,t.getUint32(36,!0),21,3951481745),n[0]=r+n[0]&4294967295,n[1]=i+n[1]&4294967295,n[2]=c+n[2]&4294967295,n[3]=l+n[3]&4294967295}reset(){this.state=Uint32Array.from(iye),this.buffer=new DataView(new ArrayBuffer(yi)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}}function Rm(e,t,n,r,i,c){return t=(t+e&4294967295)+(r+c&4294967295)&4294967295,(t<>>32-i)+n&4294967295}function Yn(e,t,n,r,i,c,l){return Rm(t&n|~t&r,e,t,i,c,l)}function Xn(e,t,n,r,i,c,l){return Rm(t&r|n&~r,e,t,i,c,l)}function Wn(e,t,n,r,i,c,l){return Rm(t^n^r,e,t,i,c,l)}function Jn(e,t,n,r,i,c,l){return Rm(n^(t|~r),e,t,i,c,l)}function cye(e){return typeof e=="string"?e.length===0:e.byteLength===0}function lye(e){return typeof e=="string"?So(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}const uye=e=>({apiVersion:"2006-03-01",base64Decoder:e?.base64Decoder??Na,base64Encoder:e?.base64Encoder??Mi,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??EN,extensions:e?.extensions??[],getAwsChunkedEncodingStream:e?.getAwsChunkedEncodingStream??SG,httpAuthSchemeProvider:e?.httpAuthSchemeProvider??xde,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Lb},{schemeId:"aws.auth#sigv4a",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new XK}],logger:e?.logger??new Bb,protocol:e?.protocol??FZ,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.s3",xmlNamespace:"http://s3.amazonaws.com/doc/2006-03-01/",version:"2006-03-01",serviceTarget:"AmazonS3"},sdkStreamMixin:e?.sdkStreamMixin??vM,serviceId:e?.serviceId??"S3",signerConstructor:e?.signerConstructor??iN,signingEscapePath:e?.signingEscapePath??!1,urlParser:e?.urlParser??mf,useArnRegion:e?.useArnRegion??void 0,utf8Decoder:e?.utf8Decoder??So,utf8Encoder:e?.utf8Encoder??ja}),fye=e=>{const t=MD(e),n=()=>t().then(eD),r=uye(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??WM,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ID({serviceId:r.serviceId,clientVersion:Age.version}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??nye,maxAttempts:e?.maxAttempts??gf,md5:e?.md5??aye,region:e?.region??OD("Region is missing"),requestHandler:Yp.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||yD),sha1:e?.sha1??Mge,sha256:e?.sha256??AD,streamCollector:e?.streamCollector??Ab,streamHasher:e?.streamHasher??rye,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(cD)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(lD))}},dye=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(i){const c=t.findIndex(l=>l.schemeId===i.schemeId);c===-1?t.push(i):t.splice(c,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){n=i},httpAuthSchemeProvider(){return n},setCredentials(i){r=i},credentials(){return r}}},hye=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),pye=(e,t)=>{const n=Object.assign(zD(e),tD(e),aM(e),dye(e));return t.forEach(r=>r.configure(n)),Object.assign(e,LD(n),nD(n),cM(n),hye(n))};class mye extends JM{config;constructor(...[t]){const n=fye(t||{});super(n),this.initConfig=n;const r=Cde(n),i=IM(r),c=Tfe(i),l=_D(c),f=fD(l),d=f,h=gD(d),y=rde(h),g=Rde(y),v=Gfe(g,{session:[()=>this,Cge]}),b=pye(v,t?.extensions||[]);this.config=b,this.middlewareStack.use(SM(this.config)),this.middlewareStack.use(aD(this.config)),this.middlewareStack.use(wD(this.config)),this.middlewareStack.use(dD(this.config)),this.middlewareStack.use(lM(this.config)),this.middlewareStack.use(uM(this.config)),this.middlewareStack.use(fM(this.config)),this.middlewareStack.use(dM(this.config,{httpAuthSchemeParametersProvider:_de,identityProviderConfigProvider:async _=>new TM({"aws.auth#sigv4":_.credentials,"aws.auth#sigv4a":_.credentials})})),this.middlewareStack.use(pM(this.config)),this.middlewareStack.use(sde(this.config)),this.middlewareStack.use(wfe(this.config)),this.middlewareStack.use(Dfe(this.config)),this.middlewareStack.use(Ufe(this.config)),this.middlewareStack.use(qfe(this.config))}destroy(){super.destroy()}}class gye extends Br.classBuilder().ep(t_).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions()),KS(r)]}).s("AmazonS3","ListBuckets",{}).n("S3Client","ListBucketsCommand").sc(xge).build(){}class yye extends Br.classBuilder().ep({...t_,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions()),KS(r)]}).s("AmazonS3","ListObjectsV2",{}).n("S3Client","ListObjectsV2Command").sc(Rge).build(){}let Uh=null,Hu=null;function jr(){if(!Uh){const e=Qp();if(!e)throw new Error("AWS credentials not configured");Uh=new yY({endpoint:"https://localhost:9999",region:"ap-southeast-2",credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey}})}return Uh}function WN(){if(!Hu){const e=Qp();if(!e)throw new Error("AWS credentials not configured");Hu=new mye({endpoint:"https://localhost:8443",region:"ap-southeast-2",credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey},forcePathStyle:!0}),Hu.middlewareStack.use({applyToStack:t=>{t.add(n=>r=>{const i=r.request;return i?.path?.endsWith("/")&&i.path!=="/"&&(i.path=i.path.slice(0,-1)),n(r)},{step:"build",name:"removeTrailingSlash"})}})}return Hu}function vye(){Uh=null,Hu=null}function JN(){const e=Ct.c(58);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={select:bye},e[0]=t):t=e[0];const n=U6(t),r=Mp(),i=_I();let c;e[1]!==r||e[2]!==i?(c=function(){nG(),vye(),i.clear(),r({to:"/login"})},e[1]=r,e[2]=i,e[3]=c):c=e[3];const l=c;let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=U.jsx(y0,{children:"General"}),e[4]=f):f=e[4];const d=n==="/";let h,y;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=U.jsx(D$,{className:"size-4"}),y=U.jsx("span",{children:"Dashboard"}),e[5]=h,e[6]=y):(h=e[5],y=e[6]);let g;e[7]!==d?(g=U.jsxs(g0,{children:[f,U.jsx(Sh,{children:U.jsx(ga,{children:U.jsx(Or,{to:"/",children:U.jsxs(ya,{isActive:d,tooltip:"Dashboard",children:[h,y]})})})})]}),e[7]=d,e[8]=g):g=e[8];let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=U.jsx(y0,{children:"EC2"}),e[9]=v):v=e[9];let b;e[10]!==n?(b=n.startsWith("/ec2/describe-instances")||n.startsWith("/ec2/run-instances"),e[10]=n,e[11]=b):b=e[11];let _,x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=U.jsx(QR,{className:"size-4"}),_=U.jsx("span",{children:"Instances"}),e[12]=_,e[13]=x):(_=e[12],x=e[13]);let R;e[14]!==b?(R=U.jsx(ga,{children:U.jsx(Or,{to:"/ec2/describe-instances",children:U.jsxs(ya,{isActive:b,tooltip:"EC2 Instances",children:[x,_]})})}),e[14]=b,e[15]=R):R=e[15];let C;e[16]!==n?(C=n.startsWith("/ec2/describe-images"),e[16]=n,e[17]=C):C=e[17];let A,O;e[18]===Symbol.for("react.memo_cache_sentinel")?(A=U.jsx(P$,{className:"size-4"}),O=U.jsx("span",{children:"Images"}),e[18]=A,e[19]=O):(A=e[18],O=e[19]);let D;e[20]!==C?(D=U.jsx(ga,{children:U.jsx(Or,{to:"/ec2/describe-images",children:U.jsxs(ya,{isActive:C,tooltip:"Images",children:[A,O]})})}),e[20]=C,e[21]=D):D=e[21];let N;e[22]!==n?(N=n.startsWith("/ec2/describe-key-pairs"),e[22]=n,e[23]=N):N=e[23];let j,$;e[24]===Symbol.for("react.memo_cache_sentinel")?(j=U.jsx(z$,{className:"size-4"}),$=U.jsx("span",{children:"Key Pairs"}),e[24]=j,e[25]=$):(j=e[24],$=e[25]);let k;e[26]!==N?(k=U.jsx(ga,{children:U.jsx(Or,{to:"/ec2/describe-key-pairs",children:U.jsxs(ya,{isActive:N,tooltip:"Key Pairs",children:[j,$]})})}),e[26]=N,e[27]=k):k=e[27];let Z;e[28]!==n?(Z=n.startsWith("/ec2/describe-volumes"),e[28]=n,e[29]=Z):Z=e[29];let se,le;e[30]===Symbol.for("react.memo_cache_sentinel")?(se=U.jsx(O$,{className:"size-4"}),le=U.jsx("span",{children:"Volumes"}),e[30]=se,e[31]=le):(se=e[30],le=e[31]);let K;e[32]!==Z?(K=U.jsx(ga,{children:U.jsx(Or,{to:"/ec2/describe-volumes",children:U.jsxs(ya,{isActive:Z,tooltip:"Volumes",children:[se,le]})})}),e[32]=Z,e[33]=K):K=e[33];let Q;e[34]!==R||e[35]!==D||e[36]!==k||e[37]!==K?(Q=U.jsxs(g0,{children:[v,U.jsxs(Sh,{children:[R,D,k,K]})]}),e[34]=R,e[35]=D,e[36]=k,e[37]=K,e[38]=Q):Q=e[38];let ye;e[39]===Symbol.for("react.memo_cache_sentinel")?(ye=U.jsx(y0,{children:"S3"}),e[39]=ye):ye=e[39];let fe;e[40]!==n?(fe=n.startsWith("/s3/ls"),e[40]=n,e[41]=fe):fe=e[41];let q,W;e[42]===Symbol.for("react.memo_cache_sentinel")?(q=U.jsx(QR,{className:"size-4"}),W=U.jsx("span",{children:"Buckets"}),e[42]=q,e[43]=W):(q=e[42],W=e[43]);let F;e[44]!==fe?(F=U.jsxs(g0,{children:[ye,U.jsx(Sh,{children:U.jsx(ga,{children:U.jsx(Or,{to:"/s3/ls",children:U.jsxs(ya,{isActive:fe,tooltip:"Buckets",children:[q,W]})})})})]}),e[44]=fe,e[45]=F):F=e[45];let ve;e[46]!==Q||e[47]!==F||e[48]!==g?(ve=U.jsxs(EH,{children:[g,Q,F]}),e[46]=Q,e[47]=F,e[48]=g,e[49]=ve):ve=e[49];let Te,P;e[50]===Symbol.for("react.memo_cache_sentinel")?(Te=U.jsx(B$,{className:"size-4"}),P=U.jsx("span",{children:"Sign out"}),e[50]=Te,e[51]=P):(Te=e[50],P=e[51]);let ne;e[52]!==l?(ne=U.jsx(wH,{children:U.jsx(Sh,{children:U.jsx(ga,{children:U.jsxs(ya,{onClick:l,tooltip:"Sign out",children:[Te,P]})})})}),e[52]=l,e[53]=ne):ne=e[53];let ie;e[54]===Symbol.for("react.memo_cache_sentinel")?(ie=U.jsx(_H,{}),e[54]=ie):ie=e[54];let de;return e[55]!==ve||e[56]!==ne?(de=U.jsxs(bH,{collapsible:"icon",children:[ve,ne,ie]}),e[55]=ve,e[56]=ne,e[57]=de):de=e[57],de}function bye(e){return e.pathname}function Sye(e){const t=Ct.c(18),{error:n,reset:r}=e,i=es(),c=_I();let l;t[0]!==c||t[1]!==r||t[2]!==i?(l=function(){c.invalidateQueries(),r(),i.invalidate()},t[0]=c,t[1]=r,t[2]=i,t[3]=l):l=t[3];const f=l;let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=U.jsx(JN,{}),t[4]=d):d=t[4];let h;t[5]===Symbol.for("react.memo_cache_sentinel")?(h=U.jsx(OO,{}),t[5]=h):h=t[5];let y,g;t[6]===Symbol.for("react.memo_cache_sentinel")?(y=U.jsx("div",{className:"flex justify-center",children:U.jsx(A$,{className:"size-12 text-destructive"})}),g=U.jsx("h1",{className:"font-semibold text-2xl",children:"Something went wrong"}),t[6]=y,t[7]=g):(y=t[6],g=t[7]);const v=n.message||"An unexpected error occurred";let b;t[8]!==v?(b=U.jsx("p",{className:"text-muted-foreground",children:v}),t[8]=v,t[9]=b):b=t[9];let _;t[10]!==f?(_=U.jsx(el,{onClick:f,variant:"default",children:"Try Again"}),t[10]=f,t[11]=_):_=t[11];let x;t[12]===Symbol.for("react.memo_cache_sentinel")?(x=U.jsx(Or,{to:"/",children:U.jsx(el,{variant:"outline",children:"Go Home"})}),t[12]=x):x=t[12];let R;t[13]!==_?(R=U.jsxs("div",{className:"flex justify-center gap-2",children:[_,x]}),t[13]=_,t[14]=R):R=t[14];let C;return t[15]!==R||t[16]!==b?(C=U.jsxs(U.Fragment,{children:[d,U.jsxs("main",{className:"flex flex-1 flex-col",children:[h,U.jsx("div",{className:"flex flex-1 items-center justify-center p-6 pt-0",children:U.jsxs("div",{className:"max-w-md space-y-4 text-center",children:[y,g,b,R]})})]})]}),t[15]=R,t[16]=b,t[17]=C):C=t[17],C}const uw=C6()({head:()=>({meta:[{title:"Mulga"}]}),component:()=>U.jsxs(U.Fragment,{children:[U.jsx(q6,{}),U.jsx(JN,{}),U.jsxs("main",{className:"flex flex-1 flex-col",children:[U.jsx(OO,{}),U.jsx("div",{className:"flex flex-1 flex-col p-8",children:U.jsx(qI,{})})]})]}),errorComponent:Sye,notFoundComponent:CH}),_ye=()=>Wt(()=>import("./login.js"),__vite__mapDeps([0,1])),wye=Kt("/login")({beforeLoad:()=>{if(Qp())throw Wv({to:"/"})},component:rn(_ye,"component")}),Eye=()=>Wt(()=>import("./route.js"),[]),xye=Kt("/_auth")({beforeLoad:()=>{if(!Qp())throw Wv({to:"/login"})},component:rn(Eye,"component")}),Rye={queryKey:["ec2","instances"],queryFn:async()=>{try{const e=new nN({});return await jr().send(e)}catch{throw new Error("Failed to fetch EC2 instances")}},staleTime:5e3},Cye=e=>({queryKey:["ec2","instances",e],queryFn:async()=>{try{const t=new nN({InstanceIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch EC2 instance")}},staleTime:5e3}),Tye={queryKey:["ec2","instances","types"],queryFn:async()=>{try{const e=new vfe({Filters:[{Name:"capacity",Values:["true"]}]});return await jr().send(e)}catch{throw new Error("Failed to fetch EC2 instance types")}},staleTime:5e3},ez={queryKey:["ec2","images"],queryFn:async()=>{try{const e=new tN({});return await jr().send(e)}catch{throw new Error("Failed to fetch EC2 images")}},staleTime:3e5},tz=e=>({queryKey:["ec2","images",e??"none"],queryFn:async()=>{try{if(!e)return{Images:[],$metadata:{}};const t=new tN({ImageIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch EC2 image")}},staleTime:3e5}),nz={queryKey:["ec2","keypairs"],queryFn:async()=>{try{const e=new sN({});return await jr().send(e)}catch{throw new Error("Failed to fetch key pairs")}},staleTime:3e5},Aye=e=>({queryKey:["ec2","keypairs",e],queryFn:async()=>{try{const t=new sN({KeyPairIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch key pair")}},staleTime:3e5}),Iye={queryKey:["ec2","regions"],queryFn:async()=>{try{const e=new bfe({});return await jr().send(e)}catch{throw new Error("Failed to fetch regions")}},staleTime:3e5},Oye={queryKey:["ec2","volumes"],queryFn:async()=>{try{const e=new rN({});return await jr().send(e)}catch{throw new Error("Failed to fetch volumes")}},staleTime:5e3},sz=e=>({queryKey:["ec2","volumes",e],queryFn:async()=>{try{const t=new rN({VolumeIds:[e]});return await jr().send(t)}catch{throw new Error("Failed to fetch volume")}},staleTime:5e3}),Mye=()=>Wt(()=>import("./index3.js"),__vite__mapDeps([2,3,4])),Dye=Kt("/_auth/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Iye)},head:()=>({meta:[{title:"Dashboard | Mulga"}]}),component:rn(Mye,"component")}),kye={queryKey:["s3","buckets"],queryFn:async()=>{try{const e=new gye({});return await WN().send(e)}catch{throw new Error("Failed to fetch S3 buckets")}},staleTime:5e3},rz=(e,t)=>({queryKey:["s3","buckets",e,"objects",t??""],queryFn:async()=>{try{const n=new yye({Bucket:e,Prefix:t,Delimiter:"/"});return await WN().send(n)}catch{throw new Error("Failed to fetch S3 bucket objects")}},staleTime:5e3}),Pye=()=>Wt(()=>import("./index4.js"),__vite__mapDeps([5,3,6,4])),Nye=Kt("/_auth/s3/ls/")({head:()=>({meta:[{title:"Buckets | S3 | Mulga"}]}),loader:async({context:e})=>{await e.queryClient.ensureQueryData(kye)},component:rn(Pye,"component")}),zye=()=>Wt(()=>import("./create-bucket.js"),__vite__mapDeps([7,1,8,9,4,10,11])),Lye=Kt("/_auth/s3/(buckets)/create-bucket")({head:()=>({meta:[{title:"Create Bucket | S3 | Mulga"}]}),component:rn(zye,"component")}),Bye=()=>Wt(()=>import("./create-volume.js"),__vite__mapDeps([12,1,8,9,4,13,11])),$ye=Kt("/_auth/ec2/(volumes)/create-volume")({head:()=>({meta:[{title:"Create Volume | EC2 | Mulga"}]}),component:rn(Bye,"component")}),Bve=dl({imageId:go("Please select an Image"),instanceType:go("Please select an instance type"),keyName:go("Please select a key pair"),count:Iv("Instance count must be a whole number").min(1,"Instance count must be at least 1")}),$ve=dl({keyName:go().min(1,"Key name is required").max(255,"Key name must be 255 characters or less").regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,"Key name contains invalid characters")}),Uve=dl({keyName:go().min(1,"Key name is required").max(255,"Key name must be 255 characters or less").regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,"Key name contains invalid characters"),publicKeyMaterial:go().min(1,"Public key is required").refine(e=>e.trim().length>0,"Public key cannot be empty")}),jve=dl({size:rM().int("Size must be a whole number").min(1,"Size must be at least 1 GiB").max(16384,"Size must be at most 16384 GiB"),availabilityZone:go().min(1,"Availability zone is required")}),Hve=dl({size:rM().int("Size must be a whole number").min(1,"Size must be at least 1 GiB")}),Uye=()=>Wt(()=>import("./import-key-pair.js"),__vite__mapDeps([14,1,8,9,4,15,13,11])),jye=Kt("/_auth/ec2/(key)/import-key-pair")({head:()=>({meta:[{title:"Import Key Pair | EC2 | Mulga"}]}),component:rn(Uye,"component")}),Hye=()=>Wt(()=>import("./create-key-pair.js"),__vite__mapDeps([16,1,8,9,4,13,11,17,15,18,19])),Fye=Kt("/_auth/ec2/(key)/create-key-pair")({head:()=>({meta:[{title:"Create Key Pair | EC2 | Mulga"}]}),component:rn(Hye,"component")}),Vye=()=>Wt(()=>import("./run-instances.js"),__vite__mapDeps([20,1,3,8,9,4,18,13,11])),qye=Kt("/_auth/ec2/(instances)/run-instances")({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(ez),e.queryClient.ensureQueryData(nz),e.queryClient.ensureQueryData(Tye)])},head:()=>({meta:[{title:"Run Instances | EC2 | Mulga"}]}),component:rn(Vye,"component")}),Gye=()=>Wt(()=>import("./route2.js"),[]),Kye=Kt("/_auth/s3/ls/$bucket")({component:rn(Gye,"component")}),Zye=()=>Wt(()=>import("./index5.js"),__vite__mapDeps([21,3,8,4,22,17,10,11,19,23])),Qye=Kt("/_auth/s3/ls/$bucket/")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(rz(t.bucket))},head:({params:e})=>({meta:[{title:`${e.bucket} | S3 | Mulga`}]}),component:rn(Zye,"component")}),Yye=()=>Wt(()=>import("./index6.js"),__vite__mapDeps([24,3,6,4,25])),Xye=Kt("/_auth/ec2/(volumes)/describe-volumes/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Oye)},head:()=>({meta:[{title:"Volumes | EC2 | Mulga"}]}),component:rn(Yye,"component")}),Wye=()=>Wt(()=>import("./index7.js"),__vite__mapDeps([26,3,6,4])),Jye=Kt("/_auth/ec2/(key)/describe-key-pairs/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(nz)},head:()=>({meta:[{title:"Key Pairs | EC2 | Mulga"}]}),component:rn(Wye,"component")}),e0e=()=>Wt(()=>import("./index8.js"),__vite__mapDeps([27,3,6,4,28])),t0e=Kt("/_auth/ec2/(instances)/describe-instances/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Rye)},head:()=>({meta:[{title:"Instances | EC2 | Mulga"}]}),component:rn(e0e,"component")}),n0e=()=>Wt(()=>import("./index9.js"),__vite__mapDeps([29,3,6,4,25])),s0e=Kt("/_auth/ec2/(images)/describe-images/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(ez)},head:()=>({meta:[{title:"Images | EC2 | Mulga"}]}),component:rn(n0e,"component")}),r0e=()=>Wt(()=>import("./_.js"),__vite__mapDeps([30,3,8,22,17,10,11,19,23])),o0e=Kt("/_auth/s3/ls/$bucket/$")({loader:async({context:e,params:t})=>{const n=t5(t._splat||"");await e.queryClient.ensureQueryData(rz(t.bucket,n))},head:({params:e})=>({meta:[{title:`${n5(e._splat||"",`${e.bucket}/`)} | S3 | Mulga`}]}),component:rn(r0e,"component")}),i0e=()=>Wt(()=>import("./_id.js"),__vite__mapDeps([31,1,3,8,9,4,13,11])),a0e=Kt("/_auth/ec2/(volumes)/modify-volume/$id")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(sz(t.id))},head:({params:e})=>({meta:[{title:`Resize ${e.id} | EC2 | Mulga`}]}),component:rn(i0e,"component")}),c0e=()=>Wt(()=>import("./_id2.js"),__vite__mapDeps([32,3,8,33,4,17,25,13,11,23])),l0e=Kt("/_auth/ec2/(volumes)/describe-volumes/$id")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(sz(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:rn(c0e,"component")}),u0e=()=>Wt(()=>import("./_id3.js"),__vite__mapDeps([34,3,8,33,4,17,13,11,23])),f0e=Kt("/_auth/ec2/(key)/describe-key-pairs/$id")({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(Aye(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.KeyPairs?.[0]?.KeyName??"Key Pair"} | EC2 | Mulga`}]}),component:rn(u0e,"component")}),d0e=()=>Wt(()=>import("./_id4.js"),__vite__mapDeps([35,3,8,33,4,28,36,13,11,23])),h0e=Kt("/_auth/ec2/(instances)/describe-instances/$id")({loader:async({context:e,params:t})=>{const n=await e.queryClient.ensureQueryData(Cye(t.id)),r=n.Reservations?.[0]?.Instances?.[0]?.ImageId;return await e.queryClient.ensureQueryData(tz(r)),n},head:({loaderData:e})=>({meta:[{title:`${e?.Reservations?.[0]?.Instances?.[0]?.InstanceId??"Instance"} | EC2 | Mulga`}]}),component:rn(d0e,"component")}),p0e=()=>Wt(()=>import("./_id5.js"),__vite__mapDeps([37,3,8,4,25,36,33])),m0e=Kt("/_auth/ec2/(images)/describe-images/$id")({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(tz(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.Images?.[0]?.Name??"Image"} | EC2 | Mulga`}]}),component:rn(p0e,"component")}),g0e=wye.update({id:"/login",path:"/login",getParentRoute:()=>uw}),Dn=xye.update({id:"/_auth",getParentRoute:()=>uw}),y0e=Dye.update({id:"/",path:"/",getParentRoute:()=>Dn}),v0e=Nye.update({id:"/s3/ls/",path:"/s3/ls/",getParentRoute:()=>Dn}),b0e=Lye.update({id:"/s3/(buckets)/create-bucket",path:"/s3/create-bucket",getParentRoute:()=>Dn}),S0e=$ye.update({id:"/ec2/(volumes)/create-volume",path:"/ec2/create-volume",getParentRoute:()=>Dn}),_0e=jye.update({id:"/ec2/(key)/import-key-pair",path:"/ec2/import-key-pair",getParentRoute:()=>Dn}),w0e=Fye.update({id:"/ec2/(key)/create-key-pair",path:"/ec2/create-key-pair",getParentRoute:()=>Dn}),E0e=qye.update({id:"/ec2/(instances)/run-instances",path:"/ec2/run-instances",getParentRoute:()=>Dn}),fw=Kye.update({id:"/s3/ls/$bucket",path:"/s3/ls/$bucket",getParentRoute:()=>Dn}),x0e=Qye.update({id:"/",path:"/",getParentRoute:()=>fw}),R0e=Xye.update({id:"/ec2/(volumes)/describe-volumes/",path:"/ec2/describe-volumes/",getParentRoute:()=>Dn}),C0e=Jye.update({id:"/ec2/(key)/describe-key-pairs/",path:"/ec2/describe-key-pairs/",getParentRoute:()=>Dn}),T0e=t0e.update({id:"/ec2/(instances)/describe-instances/",path:"/ec2/describe-instances/",getParentRoute:()=>Dn}),A0e=s0e.update({id:"/ec2/(images)/describe-images/",path:"/ec2/describe-images/",getParentRoute:()=>Dn}),I0e=o0e.update({id:"/$",path:"/$",getParentRoute:()=>fw}),O0e=a0e.update({id:"/ec2/(volumes)/modify-volume/$id",path:"/ec2/modify-volume/$id",getParentRoute:()=>Dn}),M0e=l0e.update({id:"/ec2/(volumes)/describe-volumes/$id",path:"/ec2/describe-volumes/$id",getParentRoute:()=>Dn}),D0e=f0e.update({id:"/ec2/(key)/describe-key-pairs/$id",path:"/ec2/describe-key-pairs/$id",getParentRoute:()=>Dn}),k0e=h0e.update({id:"/ec2/(instances)/describe-instances/$id",path:"/ec2/describe-instances/$id",getParentRoute:()=>Dn}),P0e=m0e.update({id:"/ec2/(images)/describe-images/$id",path:"/ec2/describe-images/$id",getParentRoute:()=>Dn}),N0e={AuthS3LsBucketSplatRoute:I0e,AuthS3LsBucketIndexRoute:x0e},z0e=fw._addFileChildren(N0e),L0e={AuthIndexRoute:y0e,AuthS3LsBucketRouteRoute:z0e,AuthEc2instancesRunInstancesRoute:E0e,AuthEc2keyCreateKeyPairRoute:w0e,AuthEc2keyImportKeyPairRoute:_0e,AuthEc2volumesCreateVolumeRoute:S0e,AuthS3bucketsCreateBucketRoute:b0e,AuthS3LsIndexRoute:v0e,AuthEc2imagesDescribeImagesIdRoute:P0e,AuthEc2instancesDescribeInstancesIdRoute:k0e,AuthEc2keyDescribeKeyPairsIdRoute:D0e,AuthEc2volumesDescribeVolumesIdRoute:M0e,AuthEc2volumesModifyVolumeIdRoute:O0e,AuthEc2imagesDescribeImagesIndexRoute:A0e,AuthEc2instancesDescribeInstancesIndexRoute:T0e,AuthEc2keyDescribeKeyPairsIndexRoute:C0e,AuthEc2volumesDescribeVolumesIndexRoute:R0e},B0e=Dn._addFileChildren(L0e),$0e={AuthRouteRoute:B0e,LoginRoute:g0e},U0e=uw._addFileChildren($0e)._addFileTypes(),oz=new GL,j0e=z6({routeTree:U0e,context:{queryClient:oz},defaultPreload:"intent",scrollRestoration:!0,defaultStructuralSharing:!0,defaultPreloadStaleTime:0}),rv=document.getElementById("app");rv&&!rv.innerHTML&&X6.createRoot(rv).render(U.jsx(I.StrictMode,{children:U.jsx(t$,{defaultTheme:"system",storageKey:"hive-ui-theme",children:U.jsx(ZL,{client:oz,children:U.jsx(gH,{children:U.jsx($6,{router:j0e})})})})}));export{S9 as $,nve as A,el as B,C2 as C,Sv as D,Ds as E,Dr as F,Bp as G,xf as H,mt as I,sC as J,Ze as K,Or as L,l0 as M,Si as N,qI as O,En as P,bt as Q,ove as R,xn as S,is as T,$2 as U,g5 as V,y5 as W,Z0e as X,wo as Y,ot as Z,Nj as _,nn as a,za as a$,zr as a0,Ku as a1,Mj as a2,B2 as a3,Sb as a4,Uj as a5,rO as a6,hO as a7,Dp as a8,Yh as a9,nz as aA,Tye as aB,Bve as aC,Qye as aD,W0e as aE,rz as aF,Oye as aG,Rye as aH,o0e as aI,t5 as aJ,J0e as aK,n5 as aL,Pa as aM,hve as aN,Br as aO,t_ as aP,xo as aQ,kve as aR,X0e as aS,WN as aT,JC as aU,Mi as aV,Uv as aW,Cve as aX,oN as aY,gZ as aZ,vp as a_,lve as aa,V2 as ab,hb as ac,r2 as ad,cr as ae,Ba as af,ive as ag,cve as ah,t8 as ai,y8 as aj,Q0e as ak,v9 as al,Y9 as am,u9 as an,l9 as ao,Ef as ap,gn as aq,a5 as ar,ki as as,w8 as at,ave as au,mb as av,TO as aw,i9 as ax,rve as ay,ez as az,tG as b,_ve as b$,RD as b0,CD as b1,qQ as b2,YQ as b3,GQ as b4,Tve as b5,df as b6,Mn as b7,br as b8,Rve as b9,t2 as bA,l0e as bB,Y0e as bC,s5 as bD,f0e as bE,Aye as bF,$a as bG,E9 as bH,_9 as bI,j2 as bJ,o8 as bK,C9 as bL,r8 as bM,c9 as bN,f9 as bO,s8 as bP,h0e as bQ,Cye as bR,tz as bS,hl as bT,pve as bU,mve as bV,gve as bW,yve as bX,vve as bY,bve as bZ,Sve as b_,Bb as ba,KS as bb,Ave as bc,Ive as bd,Ove as be,Mve as bf,Dve as bg,Pve as bh,Nve as bi,zve as bj,F0e as bk,H0e as bl,pD as bm,lQ as bn,pp as bo,_I as bp,a0e as bq,Hve as br,sz as bs,XI as bt,lb as bu,_t as bv,Xc as bw,uve as bx,fve as by,BO as bz,Ct as c,wve as c0,Eve as c1,xve as c2,jr as c3,Cp as c4,V0e as c5,tf as c6,FL as c7,os as c8,Sr as c9,q0e as ca,m0e as cb,WI as cc,PL as cd,CL as ce,iv as cf,Tp as cg,xL as ch,RL as ci,ov as cj,gI as ck,UL as cl,IL as cm,ja as cn,So as co,kye as d,Iye as e,go as f,jve as g,wr as h,Uve as i,U as j,$ve as k,p5 as l,sve as m,eve as n,dl as o,tve as p,hh as q,I as r,dve as s,q2 as t,Mp as u,Oi as v,of as w,v5 as x,qt as y,op as z}; +${ms(l)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){const n=[];for(const c of t.split("/"))c?.length!==0&&c!=="."&&(c===".."?n.pop():n.push(c));const r=`${t?.startsWith("/")?"/":""}${n.join("/")}${n.length>0&&t?.endsWith("/")?"/":""}`;return Aa(r).replace(/%2F/g,"/")}return t}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(t){const n=EZ(t).replace(/[\-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}class Nb extends RZ{headerFormatter=new yZ;constructor({applyChecksum:t,credentials:n,region:r,service:i,sha256:c,uriEscapePath:l=!0}){super({applyChecksum:t,credentials:n,region:r,service:i,sha256:c,uriEscapePath:l})}async presign(t,n={}){const{signingDate:r=new Date,expiresIn:i=3600,unsignableHeaders:c,unhoistableHeaders:l,signableHeaders:f,hoistableHeaders:d,signingRegion:h,signingService:y}=n,g=await this.credentialProvider();this.validateResolvedCredentials(g);const b=h??await this.regionProvider(),{longDate:v,shortDate:_}=this.formatDate(r);if(i>pZ)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const x=A0(_,b,y??this.service),R=_Z(yT(t),{unhoistableHeaders:l,hoistableHeaders:d});g.sessionToken&&(R.query[GM]=g.sessionToken),R.query[eZ]=C0,R.query[tZ]=`${g.accessKeyId}/${x}`,R.query[VM]=v,R.query[sZ]=i.toString(10);const C=pT(R,c,f);return R.query[nZ]=this.getCanonicalHeaderList(C),R.query[qM]=await this.getSignature(v,x,this.getSigningKey(g,b,_,y),this.createCanonicalRequest(R,C,await I0(t,this.sha256))),R}async sign(t,n){return typeof t=="string"?this.signString(t,n):t.headers&&t.payload?this.signEvent(t,n):t.message?this.signMessage(t,n):this.signRequest(t,n)}async signEvent({headers:t,payload:n},{signingDate:r=new Date,priorSignature:i,signingRegion:c,signingService:l}){const f=c??await this.regionProvider(),{shortDate:d,longDate:h}=this.formatDate(r),y=A0(d,f,l??this.service),g=await I0({headers:{},body:n},this.sha256),b=new this.sha256;b.update(t);const v=ms(await b.digest()),_=[fZ,h,y,i,v,g].join(` +`);return this.signString(_,{signingDate:r,signingRegion:f,signingService:l})}async signMessage(t,{signingDate:n=new Date,signingRegion:r,signingService:i}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:n,signingRegion:r,signingService:i,priorSignature:t.priorSignature}).then(l=>({message:t.message,signature:l}))}async signString(t,{signingDate:n=new Date,signingRegion:r,signingService:i}={}){const c=await this.credentialProvider();this.validateResolvedCredentials(c);const l=r??await this.regionProvider(),{shortDate:f}=this.formatDate(n),d=new this.sha256(await this.getSigningKey(c,l,f,i));return d.update(df(t)),ms(await d.digest())}async signRequest(t,{signingDate:n=new Date,signableHeaders:r,unsignableHeaders:i,signingRegion:c,signingService:l}={}){const f=await this.credentialProvider();this.validateResolvedCredentials(f);const d=c??await this.regionProvider(),h=yT(t),{longDate:y,shortDate:g}=this.formatDate(n),b=A0(g,d,l??this.service);h.headers[ZM]=y,f.sessionToken&&(h.headers[aZ]=f.sessionToken);const v=await I0(h,this.sha256);!SZ(Pb,h.headers)&&this.applyChecksum&&(h.headers[Pb]=v);const _=pT(h,i,r),x=await this.getSignature(y,b,this.getSigningKey(f,d,g,l),this.createCanonicalRequest(h,_,v));return h.headers[KM]=`${C0} Credential=${f.accessKeyId}/${b}, SignedHeaders=${this.getCanonicalHeaderList(_)}, Signature=${x}`,h}async getSignature(t,n,r,i){const c=await this.createStringToSign(t,n,i,C0),l=new this.sha256(await r);return l.update(df(c)),ms(await l.digest())}getSigningKey(t,n,r,i){return mZ(this.sha256,t,r,n,i||this.service)}}const XM=e=>{let t=e.credentials,n=!!e.credentials,r;Object.defineProperty(e,"credentials",{set(h){h&&h!==t&&h!==r&&(n=!0),t=h;const y=CZ(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),g=TZ(e,y);if(n&&!g.attributed){const b=typeof t=="object"&&t!==null;r=async v=>{const x=await g(v);return b&&(!x.$source||Object.keys(x.$source).length===0)?QK(x,"CREDENTIALS_CODE","e"):x},r.memoized=g.memoized,r.configBound=g.configBound,r.attributed=!0}else r=g},get(){return r},enumerable:!0,configurable:!0}),e.credentials=t;const{signingEscapePath:i=!0,systemClockOffset:c=e.systemClockOffset||0,sha256:l}=e;let f;return e.signer?f=Qc(e.signer):e.regionInfoProvider?f=()=>Qc(e.region)().then(async h=>[await e.regionInfoProvider(h,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},h]).then(([h,y])=>{const{signingRegion:g,signingService:b}=h;e.signingRegion=e.signingRegion||g||y,e.signingName=e.signingName||b||e.serviceId;const v={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:l,uriEscapePath:i},_=e.signerConstructor||Nb;return new _(v)}):f=async h=>{h=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await Qc(e.region)(),properties:{}},h);const y=h.signingRegion,g=h.signingName;e.signingRegion=e.signingRegion||y,e.signingName=e.signingName||g||e.serviceId;const b={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:l,uriEscapePath:i},v=e.signerConstructor||Nb;return new v(b)},Object.assign(e,{systemClockOffset:c,signingEscapePath:i,signer:f})};function CZ(e,{credentials:t,credentialDefaultProvider:n}){let r;return t?t?.memoized?r=t:r=_K(t,SK,AM):n?r=Qc(n(Object.assign({},e,{parentClientConfig:e}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function TZ(e,t){if(t.configBound)return t;const n=async r=>t({...r,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}const bT=typeof TextEncoder=="function"?new TextEncoder:null,WM=e=>{if(typeof e=="string"){if(bT)return bT.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}else{if(typeof e.byteLength=="number")return e.byteLength;if(typeof e.size=="number")return e.size}throw new Error(`Body Length computation failed for ${e}`)},ba=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const r of t)n.push(r);return n},mi=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,yp=()=>{let e=[],t=[],n=!1;const r=new Set,i=g=>g.sort((b,v)=>vT[v.step]-vT[b.step]||ST[v.priority||"normal"]-ST[b.priority||"normal"]),c=g=>{let b=!1;const v=_=>{const x=ba(_.name,_.aliases);if(x.includes(g)){b=!0;for(const R of x)r.delete(R);return!1}return!0};return e=e.filter(v),t=t.filter(v),b},l=g=>{let b=!1;const v=_=>{if(_.middleware===g){b=!0;for(const x of ba(_.name,_.aliases))r.delete(x);return!1}return!0};return e=e.filter(v),t=t.filter(v),b},f=g=>(e.forEach(b=>{g.add(b.middleware,{...b})}),t.forEach(b=>{g.addRelativeTo(b.middleware,{...b})}),g.identifyOnResolve?.(y.identifyOnResolve()),g),d=g=>{const b=[];return g.before.forEach(v=>{v.before.length===0&&v.after.length===0?b.push(v):b.push(...d(v))}),b.push(g),g.after.reverse().forEach(v=>{v.before.length===0&&v.after.length===0?b.push(v):b.push(...d(v))}),b},h=(g=!1)=>{const b=[],v=[],_={};return e.forEach(R=>{const C={...R,before:[],after:[]};for(const A of ba(C.name,C.aliases))_[A]=C;b.push(C)}),t.forEach(R=>{const C={...R,before:[],after:[]};for(const A of ba(C.name,C.aliases))_[A]=C;v.push(C)}),v.forEach(R=>{if(R.toMiddleware){const C=_[R.toMiddleware];if(C===void 0){if(g)return;throw new Error(`${R.toMiddleware} is not found when adding ${mi(R.name,R.aliases)} middleware ${R.relation} ${R.toMiddleware}`)}R.relation==="after"&&C.after.push(R),R.relation==="before"&&C.before.push(R)}}),i(b).map(d).reduce((R,C)=>(R.push(...C),R),[])},y={add:(g,b={})=>{const{name:v,override:_,aliases:x}=b,R={step:"initialize",priority:"normal",middleware:g,...b},C=ba(v,x);if(C.length>0){if(C.some(A=>r.has(A))){if(!_)throw new Error(`Duplicate middleware name '${mi(v,x)}'`);for(const A of C){const O=e.findIndex(N=>N.name===A||N.aliases?.some(j=>j===A));if(O===-1)continue;const D=e[O];if(D.step!==R.step||R.priority!==D.priority)throw new Error(`"${mi(D.name,D.aliases)}" middleware with ${D.priority} priority in ${D.step} step cannot be overridden by "${mi(v,x)}" middleware with ${R.priority} priority in ${R.step} step.`);e.splice(O,1)}}for(const A of C)r.add(A)}e.push(R)},addRelativeTo:(g,b)=>{const{name:v,override:_,aliases:x}=b,R={middleware:g,...b},C=ba(v,x);if(C.length>0){if(C.some(A=>r.has(A))){if(!_)throw new Error(`Duplicate middleware name '${mi(v,x)}'`);for(const A of C){const O=t.findIndex(N=>N.name===A||N.aliases?.some(j=>j===A));if(O===-1)continue;const D=t[O];if(D.toMiddleware!==R.toMiddleware||D.relation!==R.relation)throw new Error(`"${mi(D.name,D.aliases)}" middleware ${D.relation} "${D.toMiddleware}" middleware cannot be overridden by "${mi(v,x)}" middleware ${R.relation} "${R.toMiddleware}" middleware.`);t.splice(O,1)}}for(const A of C)r.add(A)}t.push(R)},clone:()=>f(yp()),use:g=>{g.applyToStack(y)},remove:g=>typeof g=="string"?c(g):l(g),removeByTag:g=>{let b=!1;const v=_=>{const{tags:x,name:R,aliases:C}=_;if(x&&x.includes(g)){const A=ba(R,C);for(const O of A)r.delete(O);return b=!0,!1}return!0};return e=e.filter(v),t=t.filter(v),b},concat:g=>{const b=f(yp());return b.use(g),b.identifyOnResolve(n||b.identifyOnResolve()||(g.identifyOnResolve?.()??!1)),b},applyToStack:f,identify:()=>h(!0).map(g=>{const b=g.step??g.relation+" "+g.toMiddleware;return mi(g.name,g.aliases)+" - "+b}),identifyOnResolve(g){return typeof g=="boolean"&&(n=g),n},resolve:(g,b)=>{for(const v of h().map(_=>_.middleware).reverse())g=v(g,b);return n&&console.log(y.identify()),g}};return y},vT={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},ST={high:3,normal:2,low:1};class JM{config;middlewareStack=yp();initConfig;handlers;constructor(t){this.config=t;const{protocol:n,protocolSettings:r}=t;r&&typeof n=="function"&&(t.protocol=new n(r))}send(t,n,r){const i=typeof n!="function"?n:void 0,c=typeof n=="function"?n:r,l=i===void 0&&this.config.cacheMiddleware===!0;let f;if(l){this.handlers||(this.handlers=new WeakMap);const d=this.handlers;d.has(t.constructor)?f=d.get(t.constructor):(f=t.resolveMiddleware(this.middlewareStack,this.config,i),d.set(t.constructor,f))}else delete this.handlers,f=t.resolveMiddleware(this.middlewareStack,this.config,i);if(c)f(t).then(d=>c(null,d.output),d=>c(d)).catch(()=>{});else return f(t).then(d=>d.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const O0="***SensitiveInformation***";function zb(e,t){if(t==null)return t;const n=wt.of(e);if(n.getMergedTraits().sensitive)return O0;if(n.isListSchema()){if(!!n.getValueSchema().getMergedTraits().sensitive)return O0}else if(n.isMapSchema()){if(!!n.getKeySchema().getMergedTraits().sensitive||!!n.getValueSchema().getMergedTraits().sensitive)return O0}else if(n.isStructSchema()&&typeof t=="object"){const r=t,i={};for(const[c,l]of n.structIterator())r[c]!=null&&(i[c]=zb(l,r[c]));return i}return t}class $r{middlewareStack=yp();schema;static classBuilder(){return new AZ}resolveMiddlewareWithContext(t,n,r,{middlewareFn:i,clientName:c,commandName:l,inputFilterSensitiveLog:f,outputFilterSensitiveLog:d,smithyContext:h,additionalContext:y,CommandCtor:g}){for(const R of i.bind(this)(g,t,n,r))this.middlewareStack.use(R);const b=t.concat(this.middlewareStack),{logger:v}=n,_={logger:v,clientName:c,commandName:l,inputFilterSensitiveLog:f,outputFilterSensitiveLog:d,[Mb]:{commandInstance:this,...h},...y},{requestHandler:x}=n;return b.resolve(R=>x.handle(R.request,r||{}),_)}}class AZ{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,n,r={}){return this._smithyContext={service:t,operation:n,...r},this}c(t={}){return this._additionalContext=t,this}n(t,n){return this._clientName=t,this._commandName=n,this}f(t=r=>r,n=r=>r){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=n,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}sc(t){return this._operationSchema=t,this._smithyContext.operationSchema=t,this}build(){const t=this;let n;return n=class extends $r{input;static getEndpointParameterInstructions(){return t._ep}constructor(...[r]){super(),this.input=r??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(r,i,c){const l=t._operationSchema,f=l?.[4]??l?.input,d=l?.[5]??l?.output;return this.resolveMiddlewareWithContext(r,i,c,{CommandCtor:n,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(l?zb.bind(null,f):h=>h),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(l?zb.bind(null,d):h=>h),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}}class Ea extends Error{$fault;$response;$retryable;$metadata;constructor(t){super(t.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}static isInstance(t){if(!t)return!1;const n=t;return Ea.prototype.isPrototypeOf(n)||!!n.$fault&&!!n.$metadata&&(n.$fault==="client"||n.$fault==="server")}static[Symbol.hasInstance](t){if(!t)return!1;const n=t;return this===Ea?Ea.isInstance(t):Ea.isInstance(t)?n.name&&this.name?this.prototype.isPrototypeOf(t)||n.name===this.name:this.prototype.isPrototypeOf(t):!1}}const _T=(e,t={})=>{Object.entries(t).filter(([,r])=>r!==void 0).forEach(([r,i])=>{(e[r]==null||e[r]==="")&&(e[r]=i)});const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},eD=e=>{switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},IZ=e=>{const t=[];for(const n in hp){const r=hp[n];e[r]!==void 0&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(n){t.push(n)},checksumAlgorithms(){return t}}},OZ=e=>{const t={};return e.checksumAlgorithms().forEach(n=>{t[n.algorithmId()]=n.checksumConstructor()}),t},MZ=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),DZ=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},tD=e=>Object.assign(IZ(e),MZ(e)),nD=e=>Object.assign(OZ(e),DZ(e)),sD=e=>{const t="#text";for(const n in e)e.hasOwnProperty(n)&&e[n][t]!==void 0?e[n]=e[n][t]:typeof e[n]=="object"&&e[n]!==null&&(e[n]=sD(e[n]));return e};class Bv{trace(){}debug(){}info(){}warn(){}error(){}}class rD{queryCompat;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,n){const r=n.getMemberSchemas(),i=Object.values(r).find(c=>!!c.getMergedTraits().httpPayload);if(i){const c=i.getMergedTraits().mediaType;return c||(i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":t)}else if(!n.isUnitSchema()&&Object.values(r).find(l=>{const{httpQuery:f,httpQueryParams:d,httpHeader:h,httpLabel:y,httpPrefixHeaders:g}=l.getMergedTraits();return!f&&!d&&!h&&!y&&g===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,n,r,i,c,l){let f=n,d=t;t.includes("#")&&([f,d]=t.split("#"));const h={$metadata:c,$fault:r.statusCode<500?"client":"server"},y=Mt.for(f);try{return{errorSchema:l?.(y,d)??y.getSchema(t),errorMetadata:h}}catch{i.message=i.message??i.Message??"UnknownError";const b=Mt.for("smithy.ts.sdk.synthetic."+f),v=b.getBaseException();if(v){const _=b.getErrorCtor(v)??Error;throw this.decorateServiceException(Object.assign(new _({name:d}),h),i)}throw this.decorateServiceException(Object.assign(new Error(d),h),i)}}decorateServiceException(t,n={}){if(this.queryCompat){const r=t.Message??n.Message,i=_T(t,n);r&&(i.message=r),i.Error={...i.Error,Type:i.Error.Type,Code:i.Error.Code,Message:i.Error.message??i.Error.Message??r};const c=i.$metadata.requestId;return c&&(i.RequestId=c),i}return _T(t,n)}setQueryCompatError(t,n){const r=n.headers?.["x-amzn-query-error"];if(t!==void 0&&r!=null){const[i,c]=r.split(";"),l=Object.entries(t),f={Code:i,Type:c};Object.assign(t,f);for(const[d,h]of l)f[d==="message"?"Message":d]=h;delete f.__type,t.Error=f}}queryCompatOutput(t,n){t.Error&&(n.Error=t.Error),t.Type&&(n.Type=t.Type),t.Code&&(n.Code=t.Code)}findQueryCompatibleError(t,n){try{return t.getSchema(n)}catch{return t.find(i=>wt.of(i).getMergedTraits().awsQueryError?.[0]===n)}}}class nm{serdeContext;setSerdeContext(t){this.serdeContext=t}}function*oD(e,t){if(e.isUnitSchema())return;const n=e.getSchema();for(let r=0;rr!=="__type"))}mark(t){this.keys.delete(t)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const t=this.keys.values().next().value,n=this.from[t];this.to.$unknown=[t,n]}}}function PZ(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function NZ(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">").replace(/\r/g," ").replace(/\n/g," ").replace(/\u0085/g,"…").replace(/\u2028/,"
")}class Lb{value;constructor(t){this.value=t}toString(){return NZ(""+this.value)}}class rs{name;children;attributes={};static of(t,n,r){const i=new rs(t);return n!==void 0&&i.addChildNode(new Lb(n)),r!==void 0&&i.withName(r),i}constructor(t,n=[]){this.name=t,this.children=n}withName(t){return this.name=t,this}addAttribute(t,n){return this.attributes[t]=n,this}addChildNode(t){return this.children.push(t),this}removeAttribute(t){return delete this.attributes[t],this}n(t){return this.name=t,this}c(t){return this.children.push(t),this}a(t,n){return n!=null&&(this.attributes[t]=n),this}cc(t,n,r=n){if(t[n]!=null){const i=rs.of(n,t[n]).withName(r);this.c(i)}}l(t,n,r,i){t[n]!=null&&i().map(l=>{l.withName(r),this.c(l)})}lc(t,n,r,i){if(t[n]!=null){const c=i(),l=new rs(r);c.map(f=>{l.c(f)}),this.c(l)}}toString(){const t=!!this.children.length;let n=`<${this.name}`;const r=this.attributes;for(const i of Object.keys(r)){const c=r[i];c!=null&&(n+=` ${i}="${PZ(""+c)}"`)}return n+=t?`>${this.children.map(i=>i.toString()).join("")}`:"/>"}}let M0;function zZ(e){M0||(M0=new DOMParser);const t=M0.parseFromString(e,"application/xml");if(t.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const n=r=>{if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim())return r.textContent;if(r.nodeType===Node.ELEMENT_NODE){const i=r;if(i.attributes.length===0&&i.childNodes.length===0)return"";const c={},l=Array.from(i.attributes);for(const d of l)c[`${d.name}`]=d.value;const f=Array.from(i.childNodes);for(const d of f){const h=n(d);if(h!=null){const y=d.nodeName;if(f.length===1&&l.length===0&&y==="#text")return h;c[y]?Array.isArray(c[y])?c[y].push(h):c[y]=[c[y],h]:c[y]=h}else if(f.length===1&&l.length===0)return i.textContent}return c}return null};return{[t.documentElement.nodeName]:n(t.documentElement)}}class iD extends nm{settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new CM(t)}setSerdeContext(t){this.serdeContext=t,this.stringDeserializer.setSerdeContext(t)}read(t,n,r){const i=wt.of(t),c=i.getMemberSchemas();if(i.isStructSchema()&&i.isMemberSchema()&&!!Object.values(c).find(h=>!!h.getMemberTraits().eventPayload)){const h={},y=Object.keys(c)[0];return c[y].isBlobSchema()?h[y]=n:h[y]=this.read(c[y],n),h}const f=(this.serdeContext?.utf8Encoder??Ha)(n),d=this.parseXml(f);return this.readSchema(t,r?d[r]:d)}readSchema(t,n){const r=wt.of(t);if(r.isUnitSchema())return;const i=r.getMergedTraits();if(r.isListSchema()&&!Array.isArray(n))return this.readSchema(r,[n]);if(n==null)return n;if(typeof n=="object"){const c=!!i.sparse,l=!!i.xmlFlattened;if(r.isListSchema()){const d=r.getValueSchema(),h=[],y=d.getMergedTraits().xmlName??"member",g=l?n:(n[0]??n)[y],b=Array.isArray(g)?g:[g];for(const v of b)(v!=null||c)&&h.push(this.readSchema(d,v));return h}const f={};if(r.isMapSchema()){const d=r.getKeySchema(),h=r.getValueSchema();let y;l?y=Array.isArray(n)?n:[n]:y=Array.isArray(n.entry)?n.entry:[n.entry];const g=d.getMergedTraits().xmlName??"key",b=h.getMergedTraits().xmlName??"value";for(const v of y){const _=v[g],x=v[b];(x!=null||c)&&(f[_]=this.readSchema(h,x))}return f}if(r.isStructSchema()){const d=r.isUnionSchema();let h;d&&(h=new kZ(n,f));for(const[y,g]of r.structIterator()){const b=g.getMergedTraits(),v=b.httpPayload?b.xmlName??g.getName():g.getMemberTraits().xmlName??y;d&&h.mark(v),n[v]!=null&&(f[y]=this.readSchema(g,n[v]))}return d&&h.writeUnknown(),f}if(r.isDocumentSchema())return n;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${r.getName(!0)}`)}return r.isListSchema()?[]:r.isMapSchema()||r.isStructSchema()?{}:this.stringDeserializer.read(r,n)}parseXml(t){if(t.length){let n;try{n=zZ(t)}catch(l){throw l&&typeof l=="object"&&Object.defineProperty(l,"$responseBodyText",{value:t}),l}const r="#text",i=Object.keys(n)[0],c=n[i];return c[r]&&(c[i]=c[r],delete c[r]),sD(c)}return{}}}class LZ extends nm{settings;buffer;constructor(t){super(),this.settings=t}write(t,n,r=""){this.buffer===void 0&&(this.buffer="");const i=wt.of(t);if(r&&!r.endsWith(".")&&(r+="."),i.isBlobSchema())(typeof n=="string"||n instanceof Uint8Array)&&(this.writeKey(r),this.writeValue((this.serdeContext?.base64Encoder??Mi)(n)));else if(i.isBooleanSchema()||i.isNumericSchema()||i.isStringSchema())n!=null?(this.writeKey(r),this.writeValue(String(n))):i.isIdempotencyToken()&&(this.writeKey(r),this.writeValue(Xp()));else if(i.isBigIntegerSchema())n!=null&&(this.writeKey(r),this.writeValue(String(n)));else if(i.isBigDecimalSchema())n!=null&&(this.writeKey(r),this.writeValue(n instanceof Cf?n.string:String(n)));else if(i.isTimestampSchema()){if(n instanceof Date)switch(this.writeKey(r),Jp(i,this.settings)){case 5:this.writeValue(n.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(mp(n));break;case 7:this.writeValue(String(n.getTime()/1e3));break}}else if(i.isDocumentSchema())Array.isArray(n)?this.write(79,n,r):n instanceof Date?this.write(4,n,r):n instanceof Uint8Array?this.write(21,n,r):n&&typeof n=="object"?this.write(143,n,r):(this.writeKey(r),this.writeValue(String(n)));else if(i.isListSchema()){if(Array.isArray(n))if(n.length===0)this.settings.serializeEmptyLists&&(this.writeKey(r),this.writeValue(""));else{const c=i.getValueSchema(),l=this.settings.flattenLists||i.getMergedTraits().xmlFlattened;let f=1;for(const d of n){if(d==null)continue;const h=this.getKey("member",c.getMergedTraits().xmlName),y=l?`${r}${f}`:`${r}${h}.${f}`;this.write(c,d,y),++f}}}else if(i.isMapSchema()){if(n&&typeof n=="object"){const c=i.getKeySchema(),l=i.getValueSchema(),f=i.getMergedTraits().xmlFlattened;let d=1;for(const[h,y]of Object.entries(n)){if(y==null)continue;const g=this.getKey("key",c.getMergedTraits().xmlName),b=f?`${r}${d}.${g}`:`${r}entry.${d}.${g}`,v=this.getKey("value",l.getMergedTraits().xmlName),_=f?`${r}${d}.${v}`:`${r}entry.${d}.${v}`;this.write(c,h,b),this.write(l,y,_),++d}}}else if(i.isStructSchema()){if(n&&typeof n=="object"){let c=!1;for(const[l,f]of oD(i,n)){if(n[l]==null&&!f.isIdempotencyToken())continue;const d=this.getKey(l,f.getMergedTraits().xmlName),h=`${r}${d}`;this.write(f,n[l],h),c=!0}if(!c&&i.isUnionSchema()){const{$unknown:l}=n;if(Array.isArray(l)){const[f,d]=l,h=`${r}${f}`;this.write(15,d,h)}}}}else if(!i.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${i.getName(!0)}`)}flush(){if(this.buffer===void 0)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const t=this.buffer;return delete this.buffer,t}getKey(t,n){const r=n??t;return this.settings.capitalizeKeys?r[0].toUpperCase()+r.slice(1):r}writeKey(t){t.endsWith(".")&&(t=t.slice(0,t.length-1)),this.buffer+=`&${pp(t)}=`}writeValue(t){this.buffer+=pp(t)}}class BZ extends hK{options;serializer;deserializer;mixin=new rD;constructor(t){super({defaultNamespace:t.defaultNamespace}),this.options=t;const n={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace,serializeEmptyLists:!0};this.serializer=new LZ(n),this.deserializer=new iD(n)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(t){this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(t,n,r){const i=await super.serializeRequest(t,n,r);i.path.endsWith("/")||(i.path+="/"),Object.assign(i.headers,{"content-type":"application/x-www-form-urlencoded"}),(Lh(t.input)==="unit"||!i.body)&&(i.body="");const c=t.name.split("#")[1]??t.name;return i.body=`Action=${c}&Version=${this.options.version}`+i.body,i.body.endsWith("&")&&(i.body=i.body.slice(-1)),i}async deserializeResponse(t,n,r){const i=this.deserializer,c=wt.of(t.output),l={};if(r.statusCode>=300){const g=await xi(r.body,n);g.byteLength>0&&Object.assign(l,await i.read(15,g)),await this.handleError(t,n,r,l,this.deserializeMetadata(r))}for(const g in r.headers){const b=r.headers[g];delete r.headers[g],r.headers[g.toLowerCase()]=b}const f=t.name.split("#")[1]??t.name,d=c.isStructSchema()&&this.useNestedResult()?f+"Result":void 0,h=await xi(r.body,n);return h.byteLength>0&&Object.assign(l,await i.read(c,h,d)),{$metadata:this.deserializeMetadata(r),...l}}useNestedResult(){return!0}async handleError(t,n,r,i,c){const l=this.loadQueryErrorCode(r,i)??"Unknown",f=this.loadQueryError(i),d=this.loadQueryErrorMessage(i);f.message=d,f.Error={Type:f.Type,Code:f.Code,Message:d};const{errorSchema:h,errorMetadata:y}=await this.mixin.getErrorSchemaOrThrowBaseException(l,this.options.defaultNamespace,r,f,c,this.mixin.findQueryCompatibleError),g=wt.of(h),b=Mt.for(h[1]).getErrorCtor(h)??Error,v=new b(d),_={Type:f.Error.Type,Code:f.Error.Code,Error:f.Error};for(const[x,R]of g.structIterator()){const C=R.getMergedTraits().xmlName??x,A=f[C]??i[C];_[x]=this.deserializer.readSchema(R,A)}throw this.mixin.decorateServiceException(Object.assign(v,y,{$fault:g.getMergedTraits().error,message:d},_),i)}loadQueryErrorCode(t,n){const r=(n.Errors?.[0]?.Error??n.Errors?.Error??n.Error)?.Code;if(r!==void 0)return r;if(t.statusCode==404)return"NotFound"}loadQueryError(t){return t.Errors?.[0]?.Error??t.Errors?.Error??t.Error}loadQueryErrorMessage(t){const n=this.loadQueryError(t);return n?.message??n?.Message??t.message??t.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}class $Z extends BZ{options;constructor(t){super(t),this.options=t;const n={capitalizeKeys:!0,flattenLists:!0,serializeEmptyLists:!1};Object.assign(this.serializer.settings,n)}useNestedResult(){return!1}}const UZ=(e,t)=>{if(t?.Error?.Code!==void 0)return t.Error.Code;if(t?.Code!==void 0)return t.Code;if(e.statusCode==404)return"NotFound"};class jZ extends nm{settings;stringBuffer;byteBuffer;buffer;constructor(t){super(),this.settings=t}write(t,n){const r=wt.of(t);if(r.isStringSchema()&&typeof n=="string")this.stringBuffer=n;else if(r.isBlobSchema())this.byteBuffer="byteLength"in n?n:(this.serdeContext?.base64Decoder??Na)(n);else{this.buffer=this.writeStruct(r,n,void 0);const i=r.getMergedTraits();i.httpPayload&&!i.xmlName&&this.buffer.withName(r.getName())}}flush(){if(this.byteBuffer!==void 0){const n=this.byteBuffer;return delete this.byteBuffer,n}if(this.stringBuffer!==void 0){const n=this.stringBuffer;return delete this.stringBuffer,n}const t=this.buffer;return this.settings.xmlNamespace&&(t?.attributes?.xmlns||t.addAttribute("xmlns",this.settings.xmlNamespace)),delete this.buffer,t.toString()}writeStruct(t,n,r){const i=t.getMergedTraits(),c=t.isMemberSchema()&&!i.httpPayload?t.getMemberTraits().xmlName??t.getMemberName():i.xmlName??t.getName();if(!c||!t.isStructSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${t.getName(!0)}.`);const l=rs.of(c),[f,d]=this.getXmlnsAttribute(t,r);for(const[y,g]of oD(t,n)){const b=n[y];if(b!=null||g.isIdempotencyToken()){if(g.getMergedTraits().xmlAttribute){l.addAttribute(g.getMergedTraits().xmlName??y,this.writeSimple(g,b));continue}if(g.isListSchema())this.writeList(g,b,l,d);else if(g.isMapSchema())this.writeMap(g,b,l,d);else if(g.isStructSchema())l.addChildNode(this.writeStruct(g,b,d));else{const v=rs.of(g.getMergedTraits().xmlName??g.getMemberName());this.writeSimpleInto(g,b,v,d),l.addChildNode(v)}}}const{$unknown:h}=n;if(h&&t.isUnionSchema()&&Array.isArray(h)&&Object.keys(n).length===1){const[y,g]=h,b=rs.of(y);if(typeof g!="string")if(n instanceof rs||n instanceof Lb)l.addChildNode(n);else throw new Error("@aws-sdk - $unknown union member in XML requires value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.");this.writeSimpleInto(0,g,b,d),l.addChildNode(b)}return d&&l.addAttribute(f,d),l}writeList(t,n,r,i){if(!t.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${t.getName(!0)}`);const c=t.getMergedTraits(),l=t.getValueSchema(),f=l.getMergedTraits(),d=!!f.sparse,h=!!c.xmlFlattened,[y,g]=this.getXmlnsAttribute(t,i),b=(v,_)=>{if(l.isListSchema())this.writeList(l,Array.isArray(_)?_:[_],v,g);else if(l.isMapSchema())this.writeMap(l,_,v,g);else if(l.isStructSchema()){const x=this.writeStruct(l,_,g);v.addChildNode(x.withName(h?c.xmlName??t.getMemberName():f.xmlName??"member"))}else{const x=rs.of(h?c.xmlName??t.getMemberName():f.xmlName??"member");this.writeSimpleInto(l,_,x,g),v.addChildNode(x)}};if(h)for(const v of n)(d||v!=null)&&b(r,v);else{const v=rs.of(c.xmlName??t.getMemberName());g&&v.addAttribute(y,g);for(const _ of n)(d||_!=null)&&b(v,_);r.addChildNode(v)}}writeMap(t,n,r,i,c=!1){if(!t.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${t.getName(!0)}`);const l=t.getMergedTraits(),f=t.getKeySchema(),h=f.getMergedTraits().xmlName??"key",y=t.getValueSchema(),g=y.getMergedTraits(),b=g.xmlName??"value",v=!!g.sparse,_=!!l.xmlFlattened,[x,R]=this.getXmlnsAttribute(t,i),C=(A,O,D)=>{const N=rs.of(h,O),[j,$]=this.getXmlnsAttribute(f,R);$&&N.addAttribute(j,$),A.addChildNode(N);let k=rs.of(b);y.isListSchema()?this.writeList(y,D,k,R):y.isMapSchema()?this.writeMap(y,D,k,R,!0):y.isStructSchema()?k=this.writeStruct(y,D,R):this.writeSimpleInto(y,D,k,R),A.addChildNode(k)};if(_){for(const[A,O]of Object.entries(n))if(v||O!=null){const D=rs.of(l.xmlName??t.getMemberName());C(D,A,O),r.addChildNode(D)}}else{let A;c||(A=rs.of(l.xmlName??t.getMemberName()),R&&A.addAttribute(x,R),r.addChildNode(A));for(const[O,D]of Object.entries(n))if(v||D!=null){const N=rs.of("entry");C(N,O,D),(c?r:A).addChildNode(N)}}}writeSimple(t,n){if(n===null)throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.");const r=wt.of(t);let i=null;if(n&&typeof n=="object")if(r.isBlobSchema())i=(this.serdeContext?.base64Encoder??Mi)(n);else if(r.isTimestampSchema()&&n instanceof Date)switch(Jp(r,this.settings)){case 5:i=n.toISOString().replace(".000Z","Z");break;case 6:i=mp(n);break;case 7:i=String(n.getTime()/1e3);break;default:console.warn("Missing timestamp format, using http date",n),i=mp(n);break}else{if(r.isBigDecimalSchema()&&n)return n instanceof Cf?n.string:String(n);throw r.isMapSchema()||r.isListSchema()?new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead."):new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${r.getName(!0)}`)}if((r.isBooleanSchema()||r.isNumericSchema()||r.isBigIntegerSchema()||r.isBigDecimalSchema())&&(i=String(n)),r.isStringSchema()&&(n===void 0&&r.isIdempotencyToken()?i=Xp():i=String(n)),i===null)throw new Error(`Unhandled schema-value pair ${r.getName(!0)}=${n}`);return i}writeSimpleInto(t,n,r,i){const c=this.writeSimple(t,n),l=wt.of(t),f=new Lb(c),[d,h]=this.getXmlnsAttribute(l,i);h&&r.addAttribute(d,h),r.addChildNode(f)}getXmlnsAttribute(t,n){const r=t.getMergedTraits(),[i,c]=r.xmlNamespace??[];return c&&c!==n?[i?`xmlns:${i}`:"xmlns",c]:[void 0,void 0]}}class HZ extends nm{settings;constructor(t){super(),this.settings=t}createSerializer(){const t=new jZ(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){const t=new iD(this.settings);return t.setSerdeContext(this.serdeContext),t}}class FZ extends dK{codec;serializer;deserializer;mixin=new rD;constructor(t){super(t);const n={timestampFormat:{useTrait:!0,default:5},httpBindings:!0,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace};this.codec=new HZ(n),this.serializer=new gK(this.codec.createSerializer(),n),this.deserializer=new pK(this.codec.createDeserializer(),n)}getPayloadCodec(){return this.codec}getShapeId(){return"aws.protocols#restXml"}async serializeRequest(t,n,r){const i=await super.serializeRequest(t,n,r),c=wt.of(t.input);if(!i.headers["content-type"]){const l=this.mixin.resolveRestContentType(this.getDefaultContentType(),c);l&&(i.headers["content-type"]=l)}return typeof i.body=="string"&&i.headers["content-type"]===this.getDefaultContentType()&&!i.body.startsWith("'+i.body),i}async deserializeResponse(t,n,r){return super.deserializeResponse(t,n,r)}async handleError(t,n,r,i,c){const l=UZ(r,i)??"Unknown",{errorSchema:f,errorMetadata:d}=await this.mixin.getErrorSchemaOrThrowBaseException(l,this.options.defaultNamespace,r,i,c),h=wt.of(f),y=i.Error?.message??i.Error?.Message??i.message??i.Message??"Unknown",g=Mt.for(f[1]).getErrorCtor(f)??Error,b=new g(y);await this.deserializeHttpMessage(f,n,r,i);const v={};for(const[_,x]of h.structIterator()){const R=x.getMergedTraits().xmlName??_,C=i.Error?.[R]??i[R];v[_]=this.codec.createDeserializer().readSchema(x,C)}throw this.mixin.decorateServiceException(Object.assign(b,d,{$fault:h.getMergedTraits().error,message:y},v),i)}getDefaultContentType(){return"application/xml"}hasUnstructuredPayloadBinding(t){for(const[,n]of t.structIterator())if(n.getMergedTraits().httpPayload)return!(n.isStructSchema()||n.isMapSchema()||n.isListSchema());return!1}}const VZ=/\d{12}\.ddb/;async function qZ(e,t,n){if(n.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&vr(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const c=await t.retryStrategy();typeof c.acquireInitialRetryToken=="function"?c.constructor?.name?.includes("Adaptive")?vr(e,"RETRY_MODE_ADAPTIVE","F"):vr(e,"RETRY_MODE_STANDARD","E"):vr(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){const c=e.endpointV2;switch(String(c?.url?.hostname).match(VZ)&&vr(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":vr(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":vr(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":vr(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const c=i;c.accountId&&vr(e,"RESOLVED_ACCOUNT_ID","T");for(const[l,f]of Object.entries(c.$source??{}))vr(e,l,f)}}const wT="user-agent",D0="x-amz-user-agent",ET=" ",k0="/",GZ=/[^!$%&'*+\-.^_`|~\w]/g,KZ=/[^!$%&'*+\-.^_`|~\w#]/g,xT="-",ZZ=1024;function QZ(e){let t="";for(const n in e){const r=e[n];if(t.length+r.length+1<=ZZ){t.length?t+=","+r:t+=r;continue}break}return t}const YZ=e=>(t,n)=>async r=>{const{request:i}=r;if(!Mn.isInstance(i))return t(r);const{headers:c}=i,l=n?.userAgent?.map(Rh)||[],f=(await e.defaultUserAgentProvider()).map(Rh);await qZ(n,e,r);const d=n;f.push(`m/${QZ(Object.assign({},n.__smithy_context?.features,d.__aws_sdk_context?.features))}`);const h=e?.customUserAgent?.map(Rh)||[],y=await e.userAgentAppId();y&&f.push(Rh(["app",`${y}`]));const g=[].concat([...f,...l,...h]).join(ET),b=[...f.filter(v=>v.startsWith("aws-sdk-")),...h].join(ET);return e.runtime!=="browser"?(b&&(c[D0]=c[D0]?`${c[wT]} ${b}`:b),c[wT]=g):c[D0]=g,t({...r,request:i})},Rh=e=>{const t=e[0].split(k0).map(l=>l.replace(GZ,xT)).join(k0),n=e[1]?.replace(KZ,xT),r=t.indexOf(k0),i=t.substring(0,r);let c=t.substring(r+1);return i==="api"&&(c=c.toLowerCase()),[i,c,n].filter(l=>l&&l.length>0).reduce((l,f,d)=>{switch(d){case 0:return f;case 1:return`${l}/${f}`;default:return`${l}#${f}`}},"")},XZ={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},aD=e=>({applyToStack:t=>{t.add(YZ(e),XZ)}}),cD=!1,lD=!1,RT=new Set,WZ=(e,t=em)=>{if(!RT.has(e)&&!t(e))if(e==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);else RT.add(e)},uD=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),JZ=e=>uD(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,fD=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{const r=typeof t=="function"?await t():t,i=JZ(r);return WZ(i),i},useFipsEndpoint:async()=>{const r=typeof t=="string"?t:await t();return uD(r)?!0:typeof n!="function"?Promise.resolve(!!n):n()}})},CT="content-length";function eQ(e){return t=>async n=>{const r=n.request;if(Mn.isInstance(r)){const{body:i,headers:c}=r;if(i&&Object.keys(c).map(l=>l.toLowerCase()).indexOf(CT)===-1)try{const l=e(i);r.headers={...r.headers,[CT]:String(l)}}catch{}}return t({...n,request:r})}}const tQ={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},dD=e=>({applyToStack:t=>{t.add(eQ(e.bodyLengthChecker),tQ)}}),nQ=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),aQ(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!iQ(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},sQ=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,rQ=/(\d+\.){3}\d+/,oQ=/\.\./,iQ=e=>sQ.test(e)&&!rQ.test(e)&&!oQ.test(e),aQ=e=>{const[t,n,r,,,i]=e.split(":"),c=t==="arn"&&e.split(":").length>=6,l=!!(c&&n&&r&&i);if(c&&!l)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return l},cQ=(e,t,n,r=!1)=>{const i=async()=>{let c;return r?c=n.clientContextParams?.[e]??n[e]??n[t]:c=n[e]??n[t],typeof c=="function"?c():c};return e==="credentialScope"||t==="CredentialScope"?async()=>{const c=typeof n.credentials=="function"?await n.credentials():n.credentials;return c?.credentialScope??c?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{const c=typeof n.credentials=="function"?await n.credentials():n.credentials;return c?.accountId??c?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(n.isCustomEndpoint===!1)return;const c=await i();if(c&&typeof c=="object"){if("url"in c)return c.url.href;if("hostname"in c){const{protocol:l,hostname:f,port:d,path:h}=c;return`${l}//${f}${d?":"+d:""}${h}`}}return c}:i},hD=async e=>{},pD=e=>typeof e=="object"?"url"in e?mf(e.url):e:mf(e),lQ=async(e,t,n,r)=>{if(!n.isCustomEndpoint){let l;n.serviceConfiguredEndpoint?l=await n.serviceConfiguredEndpoint():l=await hD(n.serviceId),l&&(n.endpoint=()=>Promise.resolve(pD(l)),n.isCustomEndpoint=!0)}const i=await mD(e,t,n);if(typeof n.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)},mD=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[c,l]of Object.entries(i))switch(l.type){case"staticContextParams":r[c]=l.value;break;case"contextParams":r[c]=e[l.name];break;case"clientContextParams":case"builtInParams":r[c]=await cQ(l.name,c,n,l.type!=="builtInParams")();break;case"operationContextParams":r[c]=l.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(l))}return Object.keys(i).length===0&&Object.assign(r,n),String(n.serviceId).toLowerCase()==="s3"&&await nQ(r),r},uQ=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&yK(r,"ENDPOINT_OVERRIDE","N");const c=await lQ(i.input,{getEndpointParameterInstructions(){return t}},{...e},r);r.endpointV2=c,r.authSchemes=c.properties?.authSchemes;const l=r.authSchemes?.[0];if(l){r.signing_region=l.signingRegion,r.signing_service=l.signingName;const d=Eo(r)?.selectedHttpAuthScheme?.httpAuthOption;d&&(d.signingProperties=Object.assign(d.signingProperties||{},{signing_region:l.signingRegion,signingRegion:l.signingRegion,signing_service:l.signingName,signingName:l.signingName,signingRegionSet:l.signingRegionSet},l.properties))}return n({...i})},fQ={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:pG.name},xo=(e,t)=>({applyToStack:n=>{n.addRelativeTo(uQ({config:e,instructions:t}),fQ)}}),gD=e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,c=n!=null?async()=>pD(await Ns(n)()):void 0,f=Object.assign(e,{endpoint:c,tls:t,isCustomEndpoint:!!n,useDualstackEndpoint:Ns(r??!1),useFipsEndpoint:Ns(i??!1)});let d;return f.serviceConfiguredEndpoint=async()=>(e.serviceId&&!d&&(d=hD(e.serviceId)),d),f};var ol;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(ol||(ol={}));const gf=3,yD=ol.STANDARD,dQ=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],hQ=["TimeoutError","RequestTimeout","RequestTimeoutException"],pQ=[500,502,503,504],mQ=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],gQ=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],yQ=e=>e?.$retryable!==void 0,bQ=e=>e.$metadata?.clockSkewCorrected,vQ=e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return e&&e instanceof TypeError?t.has(e.message):!1},bD=e=>e.$metadata?.httpStatusCode===429||dQ.includes(e.name)||e.$retryable?.throttling==!0,$v=(e,t=0)=>yQ(e)||bQ(e)||hQ.includes(e.name)||mQ.includes(e?.code||"")||gQ.includes(e?.code||"")||pQ.includes(e.$metadata?.httpStatusCode||0)||vQ(e)||e.cause!==void 0&&t<=10&&$v(e.cause,t+1),SQ=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!$v(e)}return!1};class Uv{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;currentCapacity=0;enabled=!1;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(t){this.beta=t?.beta??.7,this.minCapacity=t?.minCapacity??1,this.minFillRate=t?.minFillRate??.5,this.scaleConstant=t?.scaleConstant??.4,this.smooth=t?.smooth??.8;const n=this.getCurrentTimeInSeconds();this.lastThrottleTime=n,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(t){if(this.enabled){if(this.refillTokenBucket(),t>this.currentCapacity){const n=(t-this.currentCapacity)/this.fillRate*1e3;await new Promise(r=>Uv.setTimeoutFn(r,n))}this.currentCapacity=this.currentCapacity-t}}refillTokenBucket(){const t=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=t;return}const n=(t-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+n),this.lastTimestamp=t}updateClientSendingRate(t){let n;if(this.updateMeasuredRate(),bD(t)){const i=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=i,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),n=this.cubicThrottle(i),this.enableTokenBucket()}else this.calculateTimeWindow(),n=this.cubicSuccess(this.getCurrentTimeInSeconds());const r=Math.min(n,2*this.measuredTxRate);this.updateTokenBucketRate(r)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(t){return this.getPrecise(t*this.beta)}cubicSuccess(t){return this.getPrecise(this.scaleConstant*Math.pow(t-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(t){this.refillTokenBucket(),this.fillRate=Math.max(t,this.minFillRate),this.maxCapacity=Math.max(t,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const t=this.getCurrentTimeInSeconds(),n=Math.floor(t*2)/2;if(this.requestCount++,n>this.lastTxRateBucket){const r=this.requestCount/(n-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(r*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=n}}getPrecise(t){return parseFloat(t.toFixed(8))}}const Bb=100,vD=20*1e3,_Q=500,TT=500,wQ=5,EQ=10,xQ=1,RQ="amz-sdk-invocation-id",CQ="amz-sdk-request",TQ=()=>{let e=Bb;return{computeNextBackoffDelay:r=>Math.floor(Math.min(vD,Math.random()*2**r*e)),setDelayBase:r=>{e=r}}},AT=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(vD,e),getRetryCost:()=>n});class SD{maxAttempts;mode=ol.STANDARD;capacity=TT;retryBackoffStrategy=TQ();maxAttemptsProvider;constructor(t){this.maxAttempts=t,this.maxAttemptsProvider=typeof t=="function"?t:async()=>t}async acquireInitialRetryToken(t){return AT({retryDelay:Bb,retryCount:0})}async refreshRetryTokenForRetry(t,n){const r=await this.getMaxAttempts();if(this.shouldRetry(t,n,r)){const i=n.errorType;this.retryBackoffStrategy.setDelayBase(i==="THROTTLING"?_Q:Bb);const c=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount()),l=n.retryAfterHint?Math.max(n.retryAfterHint.getTime()-Date.now()||0,c):c,f=this.getCapacityCost(i);return this.capacity-=f,AT({retryDelay:l,retryCount:t.getRetryCount()+1,retryCost:f})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.max(TT,this.capacity+(t.getRetryCost()??xQ))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${gf}`),gf}}shouldRetry(t,n,r){return t.getRetryCount()+1=this.getCapacityCost(n.errorType)&&this.isRetryableError(n.errorType)}getCapacityCost(t){return t==="TRANSIENT"?EQ:wQ}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}}class AQ{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=ol.ADAPTIVE;constructor(t,n){this.maxAttemptsProvider=t;const{rateLimiter:r}=n??{};this.rateLimiter=r??new Uv,this.standardRetryStrategy=new SD(t)}async acquireInitialRetryToken(t){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(t)}async refreshRetryTokenForRetry(t,n){return this.rateLimiter.updateClientSendingRate(n),this.standardRetryStrategy.refreshRetryTokenForRetry(t,n)}recordSuccess(t){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(t)}}const IQ=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):typeof e=="string"?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),_D=e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=Ns(r??gf);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await Ns(n)()===ol.ADAPTIVE?new AQ(i):new SD(i))})},OQ=e=>e?.body instanceof ReadableStream,MQ=e=>(t,n)=>async r=>{let i=await e.retryStrategy();const c=await e.maxAttempts();if(DQ(i)){i=i;let l=await i.acquireInitialRetryToken(n.partition_id),f=new Error,d=0,h=0;const{request:y}=r,g=Mn.isInstance(y);for(g&&(y.headers[RQ]=Xp());;)try{g&&(y.headers[CQ]=`attempt=${d+1}; max=${c}`);const{response:b,output:v}=await t(r);return i.recordSuccess(l),v.$metadata.attempts=d+1,v.$metadata.totalRetryDelay=h,{response:b,output:v}}catch(b){const v=kQ(b);if(f=IQ(b),g&&OQ(y))throw(n.logger instanceof Bv?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),f;try{l=await i.refreshRetryTokenForRetry(l,v)}catch{throw f.$metadata||(f.$metadata={}),f.$metadata.attempts=d+1,f.$metadata.totalRetryDelay=h,f}d=l.getRetryCount();const _=l.getRetryDelay();h+=_,await new Promise(x=>setTimeout(x,_))}}else return i=i,i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r)},DQ=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",kQ=e=>{const t={error:e,errorType:PQ(e)},n=zQ(e.$response);return n&&(t.retryAfterHint=n),t},PQ=e=>bD(e)?"THROTTLING":$v(e)?"TRANSIENT":SQ(e)?"SERVER_ERROR":"CLIENT_ERROR",NQ={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},wD=e=>({applyToStack:t=>{t.add(MQ(e),NQ)}}),zQ=e=>{if(!Pa.isInstance(e))return;const t=Object.keys(e.headers).find(c=>c.toLowerCase()==="retry-after");if(!t)return;const n=e.headers[t],r=Number(n);return Number.isNaN(r)?new Date(n):new Date(r*1e3)},LQ=async(e,t,n)=>({operation:Eo(t).operation,region:await Ns(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function BQ(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ec2",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}const $Q=e=>{const t=[];switch(e.operation){default:t.push(BQ(e))}return t},UQ=e=>{const t=XM(e);return Object.assign(t,{authSchemePreference:Ns(e.authSchemePreference??[])})},jQ=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"ec2"}),hl={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},HQ="3.975.0",FQ={version:HQ},ED=e=>new TextEncoder().encode(e);var VQ=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:ED;function za(e){return e instanceof Uint8Array?e:typeof e=="string"?VQ(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function bp(e){return typeof e=="string"?e.length===0:e.byteLength===0}function qQ(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}function GQ(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n0&&c[c.length-1])&&(h[0]===6||h[0]===2)){n=0;continue}if(h[0]===3&&(!c||h[1]>c[0]&&h[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var nr=64,XQ=32,WQ=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),JQ=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],eY=Math.pow(2,53)-1,Bh=(function(){function e(){this.state=Int32Array.from(JQ),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var n=0,r=t.byteLength;if(this.bytesHashed+=r,this.bytesHashed*8>eY)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=t[n++],r--,this.bufferLength===nr&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(n.setUint8(this.bufferLength++,128),r%nr>=nr-8){for(var i=this.bufferLength;i>>24&255,c[i*4+1]=this.state[i]>>>16&255,c[i*4+2]=this.state[i]>>>8&255,c[i*4+3]=this.state[i]>>>0&255;return c},e.prototype.hashBuffer=function(){for(var t=this,n=t.buffer,r=t.state,i=r[0],c=r[1],l=r[2],f=r[3],d=r[4],h=r[5],y=r[6],g=r[7],b=0;b>>17|v<<15)^(v>>>19|v<<13)^v>>>10;v=this.temp[b-15];var x=(v>>>7|v<<25)^(v>>>18|v<<14)^v>>>3;this.temp[b]=(_+this.temp[b-7]|0)+(x+this.temp[b-16]|0)}var R=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&h^~d&y)|0)+(g+(WQ[b]+this.temp[b]|0)|0)|0,C=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&c^i&l^c&l)|0;g=y,y=h,h=d,d=f+R|0,f=l,l=c,c=i,i=R+C|0}r[0]+=i,r[1]+=c,r[2]+=l,r[3]+=f,r[4]+=d,r[5]+=h,r[6]+=y,r[7]+=g},e})(),tY=(function(){function e(t){this.secret=t,this.hash=new Bh,this.reset()}return e.prototype.update=function(t){if(!(bp(t)||this.error))try{this.hash.update(za(t))}catch(n){this.error=n}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return RD(this,void 0,void 0,function(){return CD(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Bh,this.secret){this.outer=new Bh;var t=nY(this.secret),n=new Uint8Array(nr);n.set(t);for(var r=0;rnr){var n=new Bh;n.update(t),t=n.digest()}var r=new Uint8Array(nr);return r.set(t),r}var sY=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function TD(e){if(rY(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return oY(t)}return!1}function rY(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function oY(e){return e&&sY.every(function(t){return typeof e[t]=="function"})}var AD=(function(){function e(t){TD(Ai())?this.hash=new QQ(t):this.hash=new tY(t)}return e.prototype.update=function(t,n){this.hash.update(za(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const ID=({serviceId:e,clientVersion:t})=>async n=>{const r=typeof window<"u"?window.navigator:void 0,i=r?.userAgent??"",c=r?.userAgentData?.platform??OT.os(i)??"other",l=void 0,f=r?.userAgentData?.brands??[],d=f[f.length-1],h=d?.brand??OT.browser(i)??"unknown",y=d?.version??"unknown",g=[["aws-sdk-js",t],["ua","2.1"],[`os/${c}`,l],["lang/js"],["md/browser",`${h}_${y}`]];e&&g.push([`api/${e}`,t]);const b=await n?.userAgentAppId?.();return b&&g.push([`app/${b}`]),g},OT={os(e){if(/iPhone|iPad|iPod/.test(e))return"iOS";if(/Macintosh|Mac OS X/.test(e))return"macOS";if(/Windows NT/.test(e))return"Windows";if(/Android/.test(e))return"Android";if(/Linux/.test(e))return"Linux"},browser(e){if(/EdgiOS|EdgA|Edg\//.test(e))return"Microsoft Edge";if(/Firefox\//.test(e))return"Firefox";if(/Chrome\//.test(e))return"Chrome";if(/Safari\//.test(e))return"Safari"}},OD=e=>()=>Promise.reject(e),iY=["in-region","cross-region","mobile","standard","legacy"],MD=({defaultsMode:e}={})=>WK(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(aY()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${iY.join(", ")}, got ${t}`)}}),aY=()=>{const e=window?.navigator;if(e?.connection){const{effectiveType:t,rtt:n,downlink:r}=e?.connection;if(typeof t=="string"&&t!=="4g"||Number(n)>100||Number(r)<10)return!0}return e?.userAgentData?.mobile||typeof e?.maxTouchPoints=="number"&&e?.maxTouchPoints>1},DD="required",rr="fn",or="argv",pl="ref",MT=!0,DT="isSet",yf="booleanEquals",zc="error",Lc="endpoint",lo="tree",jv="PartitionResult",Hv="getAttr",kT={[DD]:!1,type:"string"},PT={[DD]:!0,default:!1,type:"boolean"},NT={[pl]:"Endpoint"},kD={[rr]:yf,[or]:[{[pl]:"UseFIPS"},!0]},PD={[rr]:yf,[or]:[{[pl]:"UseDualStack"},!0]},Ws={},zT={[rr]:Hv,[or]:[{[pl]:jv},"supportsFIPS"]},ND={[pl]:jv},LT={[rr]:yf,[or]:[!0,{[rr]:Hv,[or]:[ND,"supportsDualStack"]}]},BT=[kD],$T=[PD],UT=[{[pl]:"Region"}],cY={parameters:{Region:kT,UseDualStack:PT,UseFIPS:PT,Endpoint:kT},rules:[{conditions:[{[rr]:DT,[or]:[NT]}],rules:[{conditions:BT,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:zc},{conditions:$T,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:zc},{endpoint:{url:NT,properties:Ws,headers:Ws},type:Lc}],type:lo},{conditions:[{[rr]:DT,[or]:UT}],rules:[{conditions:[{[rr]:"aws.partition",[or]:UT,assign:jv}],rules:[{conditions:[kD,PD],rules:[{conditions:[{[rr]:yf,[or]:[MT,zT]},LT],rules:[{endpoint:{url:"https://ec2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ws,headers:Ws},type:Lc}],type:lo},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:zc}],type:lo},{conditions:BT,rules:[{conditions:[{[rr]:yf,[or]:[zT,MT]}],rules:[{conditions:[{[rr]:"stringEquals",[or]:[{[rr]:Hv,[or]:[ND,"name"]},"aws-us-gov"]}],endpoint:{url:"https://ec2.{Region}.amazonaws.com",properties:Ws,headers:Ws},type:Lc},{endpoint:{url:"https://ec2-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ws,headers:Ws},type:Lc}],type:lo},{error:"FIPS is enabled but this partition does not support FIPS",type:zc}],type:lo},{conditions:$T,rules:[{conditions:[LT],rules:[{endpoint:{url:"https://ec2.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ws,headers:Ws},type:Lc}],type:lo},{error:"DualStack is enabled but this partition does not support DualStack",type:zc}],type:lo},{endpoint:{url:"https://ec2.{Region}.{PartitionResult#dnsSuffix}",properties:Ws,headers:Ws},type:Lc}],type:lo}],type:lo},{error:"Invalid Configuration: Missing Region",type:zc}]},lY=cY,uY=new OM({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),fY=(e,t={})=>uY.get(e,()=>jM(lY,{endpointParams:e,logger:t.logger}));hf.aws=Nv;const dY=e=>({apiVersion:"2016-11-15",base64Decoder:e?.base64Decoder??Na,base64Encoder:e?.base64Encoder??Mi,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??fY,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??$Q,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Lv}],logger:e?.logger??new Bv,protocol:e?.protocol??$Z,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ec2",xmlNamespace:"http://ec2.amazonaws.com/doc/2016-11-15",version:"2016-11-15",serviceTarget:"AmazonEC2"},serviceId:e?.serviceId??"EC2",urlParser:e?.urlParser??mf,utf8Decoder:e?.utf8Decoder??So,utf8Encoder:e?.utf8Encoder??Ha}),hY=e=>{const t=MD(e),n=()=>t().then(eD),r=dY(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??WM,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ID({serviceId:r.serviceId,clientVersion:FQ.version}),maxAttempts:e?.maxAttempts??gf,region:e?.region??OD("Region is missing"),requestHandler:Yp.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||yD),sha256:e?.sha256??AD,streamCollector:e?.streamCollector??Av,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(cD)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(lD))}},zD=e=>({setRegion(t){e.region=t},region(){return e.region}}),LD=e=>({region:e.region()}),pY=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(i){const c=t.findIndex(l=>l.schemeId===i.schemeId);c===-1?t.push(i):t.splice(c,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){n=i},httpAuthSchemeProvider(){return n},setCredentials(i){r=i},credentials(){return r}}},mY=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),gY=(e,t)=>{const n=Object.assign(zD(e),tD(e),aM(e),pY(e));return t.forEach(r=>r.configure(n)),Object.assign(e,LD(n),nD(n),cM(n),mY(n))};class yY extends JM{config;constructor(...[t]){const n=hY(t||{});super(n),this.initConfig=n;const r=jQ(n),i=IM(r),c=_D(i),l=fD(c),f=l,d=gD(f),h=UQ(d),y=gY(h,t?.extensions||[]);this.config=y,this.middlewareStack.use(SM(this.config)),this.middlewareStack.use(aD(this.config)),this.middlewareStack.use(wD(this.config)),this.middlewareStack.use(dD(this.config)),this.middlewareStack.use(lM(this.config)),this.middlewareStack.use(uM(this.config)),this.middlewareStack.use(fM(this.config)),this.middlewareStack.use(dM(this.config,{httpAuthSchemeParametersProvider:LQ,identityProviderConfigProvider:async g=>new TM({"aws.auth#sigv4":g.credentials})})),this.middlewareStack.use(pM(this.config))}destroy(){super.destroy()}}class Fv extends Ea{constructor(t){super(t),Object.setPrototypeOf(this,Fv.prototype)}}const bY="AssociateCarrierIpAddress",BD="AdditionalInfo",vY="AttachmentId",SY="AmiLaunchIndex",_Y="AttachmentLimitType",wY="AssociatePublicIpAddress",EY="AutoRecoverySupported",xY="AllRegions",$D="AssociatedResource",UD="AutoRecovery",jD="AmdSevSnp",RY="ArchitectureTypeList",Vv="AttachTime",sm="AvailabilityZone",rm="AvailabilityZoneId",HD="Accelerators",CY="Affinity",FD="Arn",VD="Architecture",qD="Association",TY="Attachment",AY="Attachments",IY="BaselineBandwidthInGbps",GD="BaselineBandwidthInMbps",qv="BlockDeviceMapping",OY="BlockDeviceMappingList",MY="BlockDeviceMappingRequestList",Gv="BlockDeviceMappings",DY="BlockDurationMinutes",KD="BaselineIops",ZD="BootMode",kY="BootModeTypeList",PY="BareMetal",NY="BurstablePerformanceSupported",QD="BaselineThroughputInMBps",YD="BandwidthWeighting",zY="BandwidthWeightingTypeList",LY="BandwidthWeightings",BY="CapacityBlockId",$Y="CoreCountList",XD="CoreCount",UY="CpuCredits",jY="CreationDate",HY="CurrentGeneration",FY="CarrierIp",VY="CurrentInstanceBootMode",qY="CoreInfo",GY="CreateKeyPair",KY="CreateKeyPairRequest",Kv="CpuOptions",ZY="CustomerOwnedIp",QY="CpuOptionsRequest",Zv="CapacityReservationId",WD="CapacityReservationPreference",JD="CapacityReservationResourceGroupArn",YY="CapacityReservationSpecificationResponse",Qv="CapacityReservationSpecification",Yv="CapacityReservationTarget",XY="CapacityReservationTargetResponse",WY="CreditSpecificationRequest",JY="CreditSpecification",eX="CurrentState",Xv="ClientToken",tX="ConnectionTrackingConfiguration",nX="ConnectionTrackingSpecification",sX="ConnectionTrackingSpecificationRequest",rX="ConnectionTrackingSpecificationResponse",ek="CreateTime",oX="CreateVolumeRequest",iX="CreateVolume",tk="Code",nk="Configured",Bi="Count",aX="DisableApiStop",cX="DisableApiTermination",lX="DefaultCores",uX="DefaultEnaQueueCountPerInterface",fX="DedicatedHostsSupported",sk="DeviceIndex",dX="DiskInfoList",hX="DescribeImagesRequest",pX="DescribeImagesResult",mX="DescribeInstancesRequest",gX="DescribeInstancesResult",yX="DescribeInstanceTypesRequest",bX="DescribeInstanceTypesResult",vX="DescribeInstanceTypes",SX="DescribeImages",_X="DescribeInstances",wX="DiskInfo",EX="DeleteKeyPair",xX="DeleteKeyPairRequest",RX="DeleteKeyPairResult",CX="DescribeKeyPairsRequest",TX="DescribeKeyPairsResult",AX="DescribeKeyPairs",rk="DeviceName",IX="DefaultNetworkCardIndex",Tf="DeleteOnTermination",OX="DeregistrationProtection",Fn="DryRun",MX="DescribeRegionsRequest",DX="DescribeRegionsResult",kX="DescribeRegions",PX="DefaultThreadsPerCore",NX="DeprecationTime",zX="DefaultVCpus",LX="DeleteVolumeRequest",BX="DescribeVolumesRequest",$X="DescribeVolumesResult",UX="DeleteVolume",jX="DescribeVolumes",Wv="Description",HX="Device",FX="Disks",VX="EbsBlockDevice",qX="ExecutableByStringList",ok="ExecutableBy",om="EbsCardIndex",GX="EbsCardInfoList",KX="EbsCardInfo",ZX="EbsCards",QX="ElasticGpuAssociation",YX="ElasticGpuAssociationId",XX="ElasticGpuAssociationList",WX="ElasticGpuAssociationState",JX="ElasticGpuAssociationTime",eW="ElasticGpuAssociations",tW="ElasticGpuId",ik="ElasticGpuSpecification",nW="ElasticGpuSpecifications",ak="ElasticInferenceAccelerator",sW="ElasticInferenceAcceleratorAssociation",rW="ElasticInferenceAcceleratorAssociationId",oW="ElasticInferenceAcceleratorAssociationList",iW="ElasticInferenceAcceleratorAssociationState",aW="ElasticInferenceAcceleratorAssociationTime",cW="ElasticInferenceAcceleratorArn",lW="ElasticInferenceAcceleratorAssociations",ck="ElasticInferenceAccelerators",uW="EbsInstanceBlockDevice",fW="EncryptionInTransitSupported",lk="EbsInfo",uk="EfaInfo",fk="EbsOptimized",dk="EbsOptimizedInfo",dW="EnclaveOptionsRequest",hW="EbsOptimizedSupport",Jv="EnclaveOptions",pW="EnablePrimaryIpv6",hk="EnaQueueCount",pk="EnableResourceNameDnsAAAARecord",mk="EnableResourceNameDnsARecord",gk="EnaSrdEnabled",yk="EnaSrdSpecification",mW="EnaSrdSpecificationRequest",gW="EnaSrdSupported",bk="EnaSrdUdpEnabled",vk="EnaSrdUdpSpecification",yW="EnaSrdUdpSpecificationRequest",bW="EfaSupported",Sk="EncryptionSupport",eS="EnaSupport",vW="EndTime",SW="ExecutableUsers",_k="Ebs",tS="Enabled",nS="Encrypted",_W="Endpoint",wk="Force",wW="FpgaDeviceInfo",EW="FpgaDeviceInfoList",xW="FpgaDeviceMemoryInfo",RW="FlexibleEnaQueuesSupport",Ek="FpgaInfo",CW="FilterList",TW="FastRestored",xk="FreeTierEligible",ml="Filters",$i="Filter",AW="Fpgas",sS="Groups",IW="GpuDeviceInfo",OW="GpuDeviceInfoList",MW="GpuDeviceMemoryInfo",DW="GroupIdentifierList",Rk="GpuInfo",Ck="GroupId",kW="GroupIdentifier",Tk="GroupName",PW="GpuPartitionSize",NW="Gpus",Ak="HttpEndpoint",zW="HostId",rS="HibernationOptions",LW="HibernationOptionsRequest",Ik="HttpProtocolIpv6",Ok="HttpPutResponseHopLimit",BW="HostResourceGroupArn",$W="HibernationSupported",Mk="HttpTokens",Dk="HostnameType",UW="Hibernate",oS="Hypervisor",jW="Id",iS="Ipv6Addresses",kk="Ipv6AddressCount",HW="InstanceAttachmentEnaSrdSpecification",FW="InstanceAttachmentEnaSrdUdpSpecification",Pk="InferenceAcceleratorInfo",VW="Ipv4AddressesPerInterface",qW="Ipv6AddressesPerInterface",GW="ImageAllowed",aS="Ipv6Address",KW="InstanceBlockDeviceMapping",ZW="InstanceBlockDeviceMappingList",QW="IncludeDeprecated",YW="InferenceDeviceInfo",XW="InferenceDeviceInfoList",WW="InferenceDeviceMemoryInfo",JW="IncludeDisabled",Ro="InstanceId",eJ="InstanceIpv6Address",tJ="InstanceIpv6AddressList",nJ="InstanceInterruptionBehavior",cS="IamInstanceProfile",sJ="InstanceIpv4PrefixList",rJ="InstanceIpv6PrefixList",oJ="IamInstanceProfileSpecification",iJ="InstanceIpv4Prefix",aJ="InstanceIpv6Prefix",cJ="InstanceInitiatedShutdownBehavior",lJ="ImageIdStringList",uJ="InstanceIdStringList",Af="ImageId",fJ="ImageIds",If="InstanceIds",dJ="ImportKeyPair",hJ="ImportKeyPairRequest",pJ="ImportKeyPairResult",mJ="ImageLocation",gJ="ImageList",yJ="InstanceLifecycle",bJ="InstanceList",vJ="InstanceMaintenanceOptions",SJ="InstanceMaintenanceOptionsRequest",_J="InstanceMarketOptionsRequest",wJ="InstanceMetadataOptionsRequest",EJ="InstanceMetadataOptionsResponse",xJ="InstanceMarketOptions",Nk="InstanceMetadataTags",RJ="InstanceNetworkInterface",CJ="InstanceNetworkInterfaceAssociation",TJ="InstanceNetworkInterfaceAttachment",AJ="InstanceNetworkInterfaceList",IJ="InstanceNetworkInterfaceSpecification",OJ="InstanceNetworkInterfaceSpecificationList",MJ="InstanceNetworkPerformanceOptions",DJ="InstanceNetworkPerformanceOptionsRequest",kJ="ImageOwnerAlias",PJ="IpOwnerId",NJ="InstanceOwningService",zJ="Ipv6PrefixCount",LJ="Ipv4PrefixCount",BJ="InstancePrivateIpAddress",$J="InstancePrivateIpAddressList",UJ="IsPrimaryIpv6",jJ="IncludePublicKey",HJ="Ipv4PrefixList",FJ="Ipv6PrefixList",VJ="Ipv4PrefixSpecificationRequest",qJ="Ipv6PrefixSpecificationRequest",zk="Ipv6Prefixes",lS="Ipv6Prefix",Lk="Ipv4Prefixes",uS="Ipv4Prefix",GJ="InstanceStateChange",KJ="InstanceStateChangeList",Bk="InstanceStorageInfo",ZJ="InstanceStorageSupported",QJ="ImdsSupport",YJ="InstanceState",XJ="Ipv6Supported",im="InstanceType",WJ="InstanceTypeInfoList",JJ="InstanceTypeInfo",eee="ImageType",$k="InstanceTypes",Uk="InterfaceType",tee="Images",nee="Image",see="Instance",ree="Instances",am="Iops",oee="Key",iee="KeyFormat",fS="KeyFingerprint",dS="KernelId",hS="KmsKeyId",aee="KeyMaterial",Ur="KeyName",cee="KeyNameStringList",lee="KeyNames",uee="KeyPairs",Fa="KeyPairId",fee="KeyPairIdStringList",dee="KeyPairIds",hee="KeyPairInfo",pee="KeyPairList",mee="KeyPair",jk="KeyType",Hk="LicenseConfigurationArn",gee="LicenseConfigurationRequest",yee="LicenseConfiguration",bee="LogicalGpuCount",vee="LicenseList",See="LastLaunchedTime",_ee="LicenseSpecifications",wee="LicenseSpecificationListRequest",Eee="LicenseSpecification",xee="LaunchTemplate",Ree="LaunchTemplateId",Cee="LaunchTemplateName",Tee="LaunchTemplateSpecification",Aee="LaunchTime",Iee="Licenses",pS="MultiAttachEnabled",Fk="MediaAcceleratorInfo",Oee="MacAddress",Vk="MaximumBandwidthInMbps",Mee="MaxCount",Dee="MinCount",kee="MediaDeviceInfo",Pee="MediaDeviceInfoList",Nee="MediaDeviceMemoryInfo",zee="MaximumEbsAttachments",Lee="MaximumEbsCards",Bee="MaximumEfaInterfaces",$ee="MaximumEnaQueueCount",Uee="MaximumEnaQueueCountPerInterface",qk="MaximumIops",Va="MemoryInfo",jee="MaximumNetworkCards",Gk="MaximumNetworkInterfaces",Kk="MetadataOptions",Zk="MaintenanceOptions",Hee="MaxPrice",cm="MaxResults",Fee="ModificationState",Vee="MarketType",Qk="MaximumThroughputInMBps",qee="ModifyVolumeRequest",Gee="ModifyVolumeResult",Kee="ModifyVolume",Of="Manufacturer",Zee="Managed",Qee="Message",mS="Monitoring",Co="Name",Yee="NetworkCards",gS="NetworkCardIndex",Xee="NetworkCardInfoList",Wee="NetworkCardInfo",Jee="NoDevice",ete="NeuronDeviceCoreInfo",tte="NeuronDeviceInfo",nte="NeuronDeviceInfoList",ste="NeuronDeviceMemoryInfo",rte="NeuronDevices",ote="NitroEnclavesSupport",Yk="NetworkInterfaceId",Xk="NetworkInterfaces",Wk="NetworkInfo",Jk="NeuronInfo",e3="NetworkPerformanceOptions",t3="NetworkPerformance",n3="NvmeSupport",s3="NitroTpmInfo",ite="NitroTpmSupport",ate="NitroTpmSupportedVersionsList",Ui="NextToken",lm="OutpostArn",yS="OwnerId",cte="OptInStatus",lte="OriginalIops",ute="OriginalMultiAttachEnabled",fte="OperatorRequest",dte="OperatorResponse",hte="OwnerStringList",pte="OriginalSize",mte="OriginalThroughput",gte="OriginalVolumeType",gl="Operator",yte="Owners",r3="Owner",o3="Principal",bte="PeakBandwidthInGbps",vte="ProductCodeId",Ste="ProductCodeList",_te="ProductCodeType",wte="ProductCode",i3="ProductCodes",bS="PrivateDnsName",a3="PrivateDnsNameOptions",Ete="PrivateDnsNameOptionsRequest",xte="PrivateDnsNameOptionsResponse",c3="PublicDnsName",l3="PlatformDetails",u3="PlacementGroupInfo",Rte="PlacementGroupStrategyList",Cte="PublicIp",Tte="PrivateIpAddressSpecification",Ate="PrivateIpAddressSpecificationList",yl="PrivateIpAddress",f3="PrivateIpAddresses",Ite="PublicIpAddress",Ote="PrimaryIpv6",d3="ProcessorInfo",Mte="PublicKey",Dte="PublicKeyMaterial",kte="PartitionNumber",Pte="PhcSupport",Nte="PreviousState",h3="Platform",vS="Placement",p3="Primary",zte="Progress",Lte="Public",Bte="Return",m3="RootDeviceName",g3="RootDeviceType",$te="RootDeviceTypeList",Ute="RunInstancesMonitoringEnabled",jte="RebootInstancesRequest",Hte="RunInstancesRequest",Fte="RunInstancesUserData",SS="RamdiskId",Vte="ReservationId",qte="RebootInstances",Gte="RequesterId",Kte="RunInstances",Zte="RegionList",Qte="ReservationList",Yte="RebootMigrationSupport",Xte="RebootMigration",_S="RegionName",Wte="RegionNameStringList",Jte="RegionNames",ene="ResourceType",tne="Regions",nne="Region",sne="Reservations",rne="Reservation",one="SupportedAdditionalProcessorFeatureList",ine="SupportedArchitectures",ane="SupportedBootModes",cne="SustainedClockSpeedInGhz",y3="SourceDestCheck",lne="SpreadDomain",une="SupportedFeatures",b3="SecurityGroups",wS="SecurityGroupId",fne="SecurityGroupIdStringList",dne="SecurityGroupIds",hne="SecurityGroupStringList",v3="SecurityGroup",pne="SizeInGB",mne="SourceImageId",gne="SourceInstanceId",bl="SizeInMiB",yne="SpotInstanceRequestId",bne="SourceImageRegion",vne="StartInstancesRequest",Sne="StartInstancesResult",_ne="StopInstancesRequest",wne="StopInstancesResult",Ene="SpotInstanceType",ES="SnapshotId",xne="StartingInstances",Rne="StartInstances",Cne="StoppingInstances",Tne="StopInstances",um="SubnetId",Ane="SpotMarketOptions",Ine="StatusMessage",S3="SriovNetSupport",One="SpotOptions",_3="SkipOsShutdown",Mne="SecondaryPrivateIpAddressCount",Dne="SupportedRootDeviceTypes",xS="StateReason",kne="SupportedStrategies",Pne="StartTime",Nne="StateTransitionReason",zne="SseType",Lne="SupportedUsageClasses",Bne="SensitiveUserData",$ne="SourceVolumeId",Une="SupportedVirtualizationTypes",jne="SupportedVersions",RS="Size",vl="State",CS="Status",qa="Tags",w3="TcpEstablishedTimeout",Hne="TotalFpgaMemoryInMiB",Fne="TotalGpuMemoryInMiB",Vne="TerminateInstances",qne="TotalInferenceMemoryInMiB",Gne="TerminateInstancesRequest",Kne="TerminateInstancesResult",Zne="TargetIops",Qne="TerminatingInstances",Yne="TagList",Xne="TargetMultiAttachEnabled",Wne="TotalMediaMemoryInMiB",Jne="TotalNeuronDeviceMemoryInMiB",E3="ThreadsPerCore",ese="ThreadsPerCoreList",fm="TagSpecifications",tse="TotalSizeInGB",nse="TagSpecificationList",Mf="TagSpecification",sse="TargetSize",x3="TpmSupport",rse="TargetThroughput",ose="TargetVolumeType",R3="Tag",ise="Tenancy",dm="Throughput",TS="Type",ase="UsageClassTypeList",cse="UserData",C3="UsageOperation",lse="UsageOperationUpdateTime",T3="UdpStreamTimeout",A3="UdpTimeout",I3="Value",use="VolumeAttachmentList",fse="VolumeAttachment",O3="VCpuInfo",dse="ValidCores",M3="VpcId",AS="VolumeInitializationRate",hse="VolumeIdStringList",ji="VolumeId",pse="VolumeIds",mse="VolumeList",D3="VolumeModification",gse="VirtualName",yse="VolumeOwnerId",bse="ValueStringList",vse="VolumeSize",hm="VolumeType",Sse="VirtualizationTypeList",_se="ValidThreadsPerCore",k3="VirtualizationType",wse="ValidUntil",Ese="Values",P3="Version",xse="Volumes",Rse="Volume",Cse="WorkloadsList",Tse="Workloads",N3="additionalInfo",Ase="attachmentId",Ise="amiLaunchIndex",Ose="attachmentLimitType",Mse="associatePublicIpAddress",Dse="autoRecoverySupported",z3="associatedResource",kse="autoRecovery",Pse="amdSevSnp",Nse="attachmentSet",IS="attachTime",OS="availabilityZone",L3="availabilityZoneId",B3="accelerators",zse="affinity",$3="arn",U3="architecture",j3="association",Lse="attachment",Bse="baselineBandwidthInGbps",H3="baselineBandwidthInMbps",F3="blockDeviceMapping",V3="baselineIops",q3="bootMode",$se="bareMetal",Use="burstablePerformanceSupported",G3="baselineThroughputInMBps",jse="bandwidthWeighting",Hse="bandwidthWeightings",Fse="capacityBlockId",Vse="coreCount",qse="creationDate",Gse="currentGeneration",Kse="carrierIp",Zse="currentInstanceBootMode",Qse="coreInfo",Yse="cpuOptions",Xse="customerOwnedIp",K3="capacityReservationId",Wse="capacityReservationPreference",Jse="capacityReservationResourceGroupArn",ere="capacityReservationSpecification",tre="capacityReservationTarget",nre="currentState",Z3="clientToken",sre="connectionTrackingConfiguration",Q3="createTime",Y3="code",rre="configured",Ga="count",ore="disableApiTermination",ire="defaultCores",are="defaultEnaQueueCountPerInterface",cre="dedicatedHostsSupported",X3="deviceIndex",W3="deviceName",lre="defaultNetworkCardIndex",ure="dnsName",Df="deleteOnTermination",fre="deregistrationProtection",as="dryRun",dre="defaultThreadsPerCore",hre="deprecationTime",pre="defaultVCpus",MS="description",mre="device",gre="disks",DS="ebsCardIndex",yre="ebsCardSet",bre="elasticGpuAssociationId",vre="elasticGpuAssociationState",Sre="elasticGpuAssociationSet",_re="elasticGpuAssociationTime",wre="elasticGpuId",Ere="elasticInferenceAcceleratorArn",xre="elasticInferenceAcceleratorAssociationId",Rre="elasticInferenceAcceleratorAssociationState",Cre="elasticInferenceAcceleratorAssociationSet",Tre="elasticInferenceAcceleratorAssociationTime",Are="encryptionInTransitSupported",Ire="ebsInfo",Ore="efaInfo",J3="ebsOptimized",Mre="ebsOptimizedInfo",Dre="ebsOptimizedSupport",kre="enclaveOptions",Pre="enaQueueCount",E="ec2QueryName",Nre="enableResourceNameDnsAAAARecord",zre="enableResourceNameDnsARecord",Lre="enaSrdEnabled",Bre="enaSrdSpecification",$re="enaSrdSupported",Ure="enaSrdUdpEnabled",jre="enaSrdUdpSpecification",Hre="efaSupported",eP="encryptionSupport",kS="enaSupport",Fre="endTime",tP="ebs",nP="enabled",PS="encrypted",Vre="flexibleEnaQueuesSupport",qre="fpgaInfo",Gre="fastRestored",sP="freeTierEligible",Kre="force",Zre="fpgas",Qre="gpuInfo",rP="groupId",oP="groupName",Yre="gpuPartitionSize",NS="groupSet",Xre="gpus",zS="hypervisor",Wre="httpEndpoint",Jre="hostId",eoe="hibernationOptions",toe="httpProtocolIpv6",noe="httpPutResponseHopLimit",soe="hostResourceGroupArn",roe="hibernationSupported",ooe="httpTokens",ioe="hostnameType",aoe="id",coe="ipv6AddressCount",loe="inferenceAcceleratorInfo",uoe="ipv4AddressesPerInterface",foe="ipv6AddressesPerInterface",iP="ipv6AddressesSet",doe="imageAllowed",hoe="ipAddress",aP="ipv6Address",LS="instanceId",cP="iamInstanceProfile",poe="instanceInitiatedShutdownBehavior",lP="imageId",moe="imageLocation",goe="instanceLifecycle",yoe="instanceMetadataTags",boe="imageOwnerAlias",voe="imageOwnerId",Soe="ipOwnerId",_oe="instanceOwningService",woe="isPrimaryIpv6",Eoe="ipv4PrefixSet",xoe="ipv6PrefixSet",Roe="ipv4Prefix",Coe="ipv6Prefix",Toe="isPublic",Aoe="instanceStorageInfo",Ioe="instanceStorageSupported",Ooe="imagesSet",Moe="imageState",Doe="imdsSupport",pm="instancesSet",koe="instanceState",Poe="ipv6Supported",uP="instanceType",Noe="instanceTypeSet",zoe="idempotencyToken",Loe="imageType",Boe="interfaceType",fP="iops",je="item",$oe="key",BS="keyFingerprint",dP="kernelId",hP="kmsKeyId",Uoe="keyMaterial",kf="keyName",mm="keyPairId",joe="keySet",Hoe="keyType",Foe="licenseConfigurationArn",Voe="logicalGpuCount",qoe="lastLaunchedTime",Goe="licenseSet",Koe="launchTime",Zoe="multiAttachEnabled",Qoe="mediaAcceleratorInfo",Yoe="macAddress",pP="maximumBandwidthInMbps",Xoe="maximumEbsAttachments",Woe="maximumEbsCards",Joe="maximumEfaInterfaces",eie="maximumEnaQueueCount",tie="maximumEnaQueueCountPerInterface",mP="maximumIops",Sl="memoryInfo",nie="maximumNetworkCards",gP="maximumNetworkInterfaces",sie="metadataOptions",rie="maintenanceOptions",yP="maxResults",oie="modificationState",bP="maximumThroughputInMBps",Pf="manufacturer",iie="managed",aie="message",cie="monitoring",Hi="name",lie="networkCards",vP="networkCardIndex",uie="noDevice",fie="neuronDevices",die="nitroEnclavesSupport",SP="networkInterfaceId",hie="networkInterfaceSet",pie="networkInterface",mie="networkInfo",gie="neuronInfo",yie="networkPerformanceOptions",_P="networkPerformance",wP="nvmeSupport",bie="nitroTpmInfo",vie="nitroTpmSupport",_l="nextToken",$S="outpostArn",EP="ownerId",Sie="optInStatus",_ie="originalIops",wie="originalMultiAttachEnabled",Eie="originalSize",xie="originalThroughput",Rie="originalVolumeType",gm="operator",Cie="principal",Tie="peakBandwidthInGbps",xP="productCodes",Aie="productCode",Iie="privateDnsNameOptions",US="privateDnsName",Oie="publicDnsName",RP="platformDetails",Mie="placementGroupInfo",Die="publicIp",CP="privateIpAddressesSet",wl="privateIpAddress",kie="processorInfo",Pie="publicKey",Nie="publicKeyMaterial",zie="partitionNumber",Lie="phcSupport",Bie="previousState",TP="platform",$ie="placement",AP="primary",Uie="progress",jie="return",IP="rootDeviceName",OP="rootDeviceType",Hie="regionEndpoint",Fie="reservationId",MP="ramdiskId",Vie="regionInfo",qie="requesterId",Gie="rebootMigrationSupport",Kie="rebootMigration",Zie="regionName",Qie="reservationSet",Yie="resourceType",Xie="reason",Wie="supportedArchitectures",Jie="supportedBootModes",eae="sustainedClockSpeedInGhz",DP="sourceDestCheck",tae="spreadDomain",nae="supportedFeatures",sae="sizeInGB",rae="sourceInstanceId",oae="sourceImageId",El="sizeInMiB",iae="sourceImageRegion",aae="spotInstanceRequestId",kP="snapshotId",jS="subnetId",cae="statusMessage",PP="sriovNetSupport",lae="secondaryPrivateIpAddressCount",uae="supportedRootDeviceTypes",NP="stateReason",fae="supportedStrategies",dae="startTime",hae="sseType",pae="supportedUsageClasses",mae="sourceVolumeId",gae="supportedVirtualizationTypes",yae="supportedVersions",bae="size",zP="smithy.ts.sdk.synthetic.com.amazonaws.ec2",LP="state",Nf="status",vae="tenancy",Sae="tcpEstablishedTimeout",_ae="totalFpgaMemoryInMiB",wae="totalGpuMemoryInMiB",Eae="totalInferenceMemoryInMiB",xae="targetIops",Rae="targetMultiAttachEnabled",Cae="totalMediaMemoryInMiB",Tae="totalNeuronDeviceMemoryInMiB",Aae="threadsPerCore",xl="tagSet",Iae="totalSizeInGB",Oae="targetSize",BP="tpmSupport",Mae="targetThroughput",Dae="targetVolumeType",$P="throughput",UP="type",jP="usageOperation",kae="usageOperationUpdateTime",Pae="udpStreamTimeout",Nae="udpTimeout",zae="value",Lae="vCpuInfo",Bae="validCores",HP="vpcId",$ae="volumeInitializationRate",ym="volumeId",Uae="volumeModification",jae="virtualName",Hae="volumeOwnerId",Fae="volumeSet",Vae="volumeSize",FP="volumeType",qae="validThreadsPerCore",VP="virtualizationType",Gae="version",Kae="workloadSet",S="xmlName",H="com.amazonaws.ec2";var Zae=[0,H,Fte,8,0],Qae=[0,H,Bne,8,0],qP=[3,H,qv,0,[_k,Jee,rk,gse],[[()=>Ece,{[E]:"Ebs",[S]:tP}],[0,{[E]:"NoDevice",[S]:uie}],[0,{[E]:"DeviceName",[S]:W3}],[0,{[E]:"VirtualName",[S]:jae}]]],Yae=[3,H,Qv,0,[WD,Yv],[0,()=>Wae]],Xae=[3,H,YY,0,[WD,Yv],[[0,{[E]:"CapacityReservationPreference",[S]:Wse}],[()=>Jae,{[E]:"CapacityReservationTarget",[S]:tre}]]],Wae=[3,H,Yv,0,[Zv,JD],[0,0]],Jae=[3,H,XY,0,[Zv,JD],[[0,{[E]:"CapacityReservationId",[S]:K3}],[0,{[E]:"CapacityReservationResourceGroupArn",[S]:Jse}]]],ece=[3,H,sX,0,[w3,T3,A3],[1,1,1]],tce=[3,H,rX,0,[w3,T3,A3],[[1,{[E]:"TcpEstablishedTimeout",[S]:Sae}],[1,{[E]:"UdpStreamTimeout",[S]:Pae}],[1,{[E]:"UdpTimeout",[S]:Nae}]]],nce=[3,H,Kv,0,[XD,E3,jD],[[1,{[E]:"CoreCount",[S]:Vse}],[1,{[E]:"ThreadsPerCore",[S]:Aae}],[0,{[E]:"AmdSevSnp",[S]:Pse}]]],sce=[3,H,QY,0,[XD,E3,jD],[1,1,0]],rce=[3,H,KY,0,[Ur,jk,fm,iee,Fn],[0,0,[()=>vm,{[S]:Mf}],0,[2,{[E]:"DryRun",[S]:as}]],1],oce=[3,H,oX,0,[sm,rm,nS,am,hS,lm,RS,ES,hm,fm,pS,dm,Xv,AS,gl,Fn],[0,0,[2,{[E]:"Encrypted",[S]:PS}],1,0,0,1,0,0,[()=>vm,{[S]:Mf}],2,1,[0,4],1,()=>KP,[2,{[E]:"DryRun",[S]:as}]]],ice=[3,H,WY,0,[UY],[0],1],ace=[3,H,xX,0,[Ur,Fa,Fn],[0,0,[2,{[E]:"DryRun",[S]:as}]]],cce=[3,H,RX,0,[Bte,Fa],[[2,{[E]:"Return",[S]:jie}],[0,{[E]:"KeyPairId",[S]:mm}]]],lce=[3,H,LX,0,[ji,Fn],[0,[2,{[E]:"DryRun",[S]:as}]],1],uce=[3,H,hX,0,[SW,fJ,yte,QW,JW,cm,Ui,Fn,ml],[[()=>xue,{[S]:ok}],[()=>Tue,{[S]:Af}],[()=>Que,{[S]:r3}],2,2,1,0,[2,{[E]:"DryRun",[S]:as}],[()=>Rl,{[S]:$i}]]],fce=[3,H,pX,0,[Ui,tee],[[0,{[E]:"NextToken",[S]:_l}],[()=>Aue,{[E]:"ImagesSet",[S]:Ooe}]]],dce=[3,H,mX,0,[If,Fn,ml,Ui,cm],[[()=>zf,{[S]:Ro}],[2,{[E]:"DryRun",[S]:as}],[()=>Rl,{[S]:$i}],[0,{[E]:"NextToken",[S]:_l}],[1,{[E]:"MaxResults",[S]:yP}]]],hce=[3,H,gX,0,[Ui,sne],[[0,{[E]:"NextToken",[S]:_l}],[()=>efe,{[E]:"ReservationSet",[S]:Qie}]]],pce=[3,H,yX,0,[Fn,$k,ml,cm,Ui],[2,[64,{[S]:im}],[()=>Rl,{[S]:$i}],1,0]],mce=[3,H,bX,0,[$k,Ui],[[()=>Lue,{[E]:"InstanceTypeSet",[S]:Noe}],[0,{[E]:"NextToken",[S]:_l}]]],gce=[3,H,CX,0,[lee,dee,jJ,Fn,ml],[[()=>Uue,{[S]:Ur}],[()=>jue,{[S]:Fa}],2,[2,{[E]:"DryRun",[S]:as}],[()=>Rl,{[S]:$i}]]],yce=[3,H,TX,0,[uee],[[()=>Hue,{[E]:"KeySet",[S]:joe}]]],bce=[3,H,MX,0,[Jte,xY,Fn,ml],[[()=>Jue,{[S]:_S}],2,[2,{[E]:"DryRun",[S]:as}],[()=>Rl,{[S]:$i}]]],vce=[3,H,DX,0,[tne],[[()=>Wue,{[E]:"RegionInfo",[S]:Vie}]]],Sce=[3,H,BX,0,[pse,Fn,ml,Ui,cm],[[()=>lfe,{[S]:ji}],[2,{[E]:"DryRun",[S]:as}],[()=>Rl,{[S]:$i}],[0,{[E]:"NextToken",[S]:_l}],[1,{[E]:"MaxResults",[S]:yP}]]],_ce=[3,H,$X,0,[Ui,xse],[[0,{[E]:"NextToken",[S]:_l}],[()=>ufe,{[E]:"VolumeSet",[S]:Fae}]]],wce=[3,H,wX,0,[pne,Bi,TS],[[1,{[E]:"SizeInGB",[S]:sae}],[1,{[E]:"Count",[S]:Ga}],[0,{[E]:"Type",[S]:UP}]]],Ece=[3,H,VX,0,[Tf,am,ES,vse,hm,hS,dm,lm,sm,nS,AS,rm,om],[[2,{[E]:"DeleteOnTermination",[S]:Df}],[1,{[E]:"Iops",[S]:fP}],[0,{[E]:"SnapshotId",[S]:kP}],[1,{[E]:"VolumeSize",[S]:Vae}],[0,{[E]:"VolumeType",[S]:FP}],[0,{[E]:"KmsKeyId",[S]:hP}],[1,{[E]:"Throughput",[S]:$P}],[0,{[E]:"OutpostArn",[S]:$S}],[0,{[E]:"AvailabilityZone",[S]:OS}],[2,{[E]:"Encrypted",[S]:PS}],1,0,1]],xce=[3,H,KX,0,[om,GD,QD,KD,Vk,Qk,qk],[[1,{[E]:"EbsCardIndex",[S]:DS}],[1,{[E]:"BaselineBandwidthInMbps",[S]:H3}],[1,{[E]:"BaselineThroughputInMBps",[S]:G3}],[1,{[E]:"BaselineIops",[S]:V3}],[1,{[E]:"MaximumBandwidthInMbps",[S]:pP}],[1,{[E]:"MaximumThroughputInMBps",[S]:bP}],[1,{[E]:"MaximumIops",[S]:mP}]]],Rce=[3,H,lk,0,[hW,Sk,dk,n3,zee,_Y,Lee,ZX],[[0,{[E]:"EbsOptimizedSupport",[S]:Dre}],[0,{[E]:"EncryptionSupport",[S]:eP}],[()=>Tce,{[E]:"EbsOptimizedInfo",[S]:Mre}],[0,{[E]:"NvmeSupport",[S]:wP}],[1,{[E]:"MaximumEbsAttachments",[S]:Xoe}],[0,{[E]:"AttachmentLimitType",[S]:Ose}],[1,{[E]:"MaximumEbsCards",[S]:Woe}],[()=>vue,{[E]:"EbsCardSet",[S]:yre}]]],Cce=[3,H,uW,0,[Vv,Tf,CS,ji,$D,yse,gl,om],[[4,{[E]:"AttachTime",[S]:IS}],[2,{[E]:"DeleteOnTermination",[S]:Df}],[0,{[E]:"Status",[S]:Nf}],[0,{[E]:"VolumeId",[S]:ym}],[0,{[E]:"AssociatedResource",[S]:z3}],[0,{[E]:"VolumeOwnerId",[S]:Hae}],[()=>bm,{[E]:"Operator",[S]:gm}],[1,{[E]:"EbsCardIndex",[S]:DS}]]],Tce=[3,H,dk,0,[GD,QD,KD,Vk,Qk,qk],[[1,{[E]:"BaselineBandwidthInMbps",[S]:H3}],[1,{[E]:"BaselineThroughputInMBps",[S]:G3}],[1,{[E]:"BaselineIops",[S]:V3}],[1,{[E]:"MaximumBandwidthInMbps",[S]:pP}],[1,{[E]:"MaximumThroughputInMBps",[S]:bP}],[1,{[E]:"MaximumIops",[S]:mP}]]],Ace=[3,H,uk,0,[Bee],[[1,{[E]:"MaximumEfaInterfaces",[S]:Joe}]]],Ice=[3,H,QX,0,[tW,YX,WX,JX],[[0,{[E]:"ElasticGpuId",[S]:wre}],[0,{[E]:"ElasticGpuAssociationId",[S]:bre}],[0,{[E]:"ElasticGpuAssociationState",[S]:vre}],[0,{[E]:"ElasticGpuAssociationTime",[S]:_re}]]],Oce=[3,H,ik,0,[TS],[0],1],Mce=[3,H,ak,0,[TS,Bi],[0,1],1],Dce=[3,H,sW,0,[cW,rW,iW,aW],[[0,{[E]:"ElasticInferenceAcceleratorArn",[S]:Ere}],[0,{[E]:"ElasticInferenceAcceleratorAssociationId",[S]:xre}],[0,{[E]:"ElasticInferenceAcceleratorAssociationState",[S]:Rre}],[4,{[E]:"ElasticInferenceAcceleratorAssociationTime",[S]:Tre}]]],kce=[3,H,mW,0,[gk,vk],[2,()=>Pce]],Pce=[3,H,yW,0,[bk],[2]],Nce=[3,H,Jv,0,[tS],[[2,{[E]:"Enabled",[S]:nP}]]],zce=[3,H,dW,0,[tS],[2]],Lce=[3,H,$i,0,[Co,Ese],[0,[()=>ife,{[S]:I3}]]],Bce=[3,H,wW,0,[Co,Of,Bi,Va],[[0,{[E]:"Name",[S]:Hi}],[0,{[E]:"Manufacturer",[S]:Pf}],[1,{[E]:"Count",[S]:Ga}],[()=>$ce,{[E]:"MemoryInfo",[S]:Sl}]]],$ce=[3,H,xW,0,[bl],[[1,{[E]:"SizeInMiB",[S]:El}]]],Uce=[3,H,Ek,0,[AW,Hne],[[()=>Rue,{[E]:"Fpgas",[S]:Zre}],[1,{[E]:"TotalFpgaMemoryInMiB",[S]:_ae}]]],jce=[3,H,IW,0,[Co,Of,Bi,bee,PW,Tse,Va],[[0,{[E]:"Name",[S]:Hi}],[0,{[E]:"Manufacturer",[S]:Pf}],[1,{[E]:"Count",[S]:Ga}],[1,{[E]:"LogicalGpuCount",[S]:Voe}],[1,{[E]:"GpuPartitionSize",[S]:Yre}],[()=>ffe,{[E]:"WorkloadSet",[S]:Kae}],[()=>Hce,{[E]:"MemoryInfo",[S]:Sl}]]],Hce=[3,H,MW,0,[bl],[[1,{[E]:"SizeInMiB",[S]:El}]]],Fce=[3,H,Rk,0,[NW,Fne],[[()=>Cue,{[E]:"Gpus",[S]:Xre}],[1,{[E]:"TotalGpuMemoryInMiB",[S]:wae}]]],Vce=[3,H,kW,0,[Ck,Tk],[[0,{[E]:"GroupId",[S]:rP}],[0,{[E]:"GroupName",[S]:oP}]]],qce=[3,H,rS,0,[nk],[[2,{[E]:"Configured",[S]:rre}]]],Gce=[3,H,LW,0,[nk],[2]],Kce=[3,H,cS,0,[FD,jW],[[0,{[E]:"Arn",[S]:$3}],[0,{[E]:"Id",[S]:aoe}]]],Zce=[3,H,oJ,0,[FD,Co],[[0,{[E]:"Arn",[S]:$3}],[0,{[E]:"Name",[S]:Hi}]]],Qce=[3,H,nee,0,[l3,C3,Gv,Wv,eS,oS,kJ,Co,m3,g3,S3,xS,qa,k3,ZD,x3,NX,QJ,gne,OX,See,GW,mne,bne,xk,Af,mJ,vl,yS,jY,Lte,i3,VD,eee,dS,SS,h3],[[0,{[E]:"PlatformDetails",[S]:RP}],[0,{[E]:"UsageOperation",[S]:jP}],[()=>pue,{[E]:"BlockDeviceMapping",[S]:F3}],[0,{[E]:"Description",[S]:MS}],[2,{[E]:"EnaSupport",[S]:kS}],[0,{[E]:"Hypervisor",[S]:zS}],[0,{[E]:"ImageOwnerAlias",[S]:boe}],[0,{[E]:"Name",[S]:Hi}],[0,{[E]:"RootDeviceName",[S]:IP}],[0,{[E]:"RootDeviceType",[S]:OP}],[0,{[E]:"SriovNetSupport",[S]:PP}],[()=>YP,{[E]:"StateReason",[S]:NP}],[()=>Ka,{[E]:"TagSet",[S]:xl}],[0,{[E]:"VirtualizationType",[S]:VP}],[0,{[E]:"BootMode",[S]:q3}],[0,{[E]:"TpmSupport",[S]:BP}],[0,{[E]:"DeprecationTime",[S]:hre}],[0,{[E]:"ImdsSupport",[S]:Doe}],[0,{[E]:"SourceInstanceId",[S]:rae}],[0,{[E]:"DeregistrationProtection",[S]:fre}],[0,{[E]:"LastLaunchedTime",[S]:qoe}],[2,{[E]:"ImageAllowed",[S]:doe}],[0,{[E]:"SourceImageId",[S]:oae}],[0,{[E]:"SourceImageRegion",[S]:iae}],[2,{[E]:"FreeTierEligible",[S]:sP}],[0,{[E]:"ImageId",[S]:lP}],[0,{[E]:"ImageLocation",[S]:moe}],[0,{[E]:"ImageState",[S]:Moe}],[0,{[E]:"ImageOwnerId",[S]:voe}],[0,{[E]:"CreationDate",[S]:qse}],[2,{[E]:"IsPublic",[S]:Toe}],[()=>JP,{[E]:"ProductCodes",[S]:xP}],[0,{[E]:"Architecture",[S]:U3}],[0,{[E]:"ImageType",[S]:Loe}],[0,{[E]:"KernelId",[S]:dP}],[0,{[E]:"RamdiskId",[S]:MP}],[0,{[E]:"Platform",[S]:TP}]]],Yce=[3,H,hJ,0,[Ur,Dte,fm,Fn],[[0,{[E]:"KeyName",[S]:kf}],[21,{[E]:"PublicKeyMaterial",[S]:Nie}],[()=>vm,{[S]:Mf}],[2,{[E]:"DryRun",[S]:as}]],2],Xce=[3,H,pJ,0,[fS,Ur,Fa,qa],[[0,{[E]:"KeyFingerprint",[S]:BS}],[0,{[E]:"KeyName",[S]:kf}],[0,{[E]:"KeyPairId",[S]:mm}],[()=>Ka,{[E]:"TagSet",[S]:xl}]]],Wce=[3,H,Pk,0,[HD,qne],[[()=>Iue,{[E]:"Accelerators",[S]:B3}],[1,{[E]:"TotalInferenceMemoryInMiB",[S]:Eae}]]],Jce=[3,H,YW,0,[Bi,Co,Of,Va],[[1,{[E]:"Count",[S]:Ga}],[0,{[E]:"Name",[S]:Hi}],[0,{[E]:"Manufacturer",[S]:Pf}],[()=>ele,{[E]:"MemoryInfo",[S]:Sl}]]],ele=[3,H,WW,0,[bl],[[1,{[E]:"SizeInMiB",[S]:El}]]],tle=[3,H,see,0,[VD,Gv,Xv,fk,eS,oS,cS,yJ,eW,lW,Xk,lm,m3,g3,b3,y3,yne,S3,xS,qa,k3,Kv,BY,Zv,Qv,rS,Iee,Kk,Jv,ZD,l3,C3,lse,a3,aS,x3,Zk,VY,e3,gl,Ro,Af,vl,bS,c3,Nne,Ur,SY,i3,im,Aee,vS,dS,SS,h3,mS,um,M3,yl,Ite],[[0,{[E]:"Architecture",[S]:U3}],[()=>Oue,{[E]:"BlockDeviceMapping",[S]:F3}],[0,{[E]:"ClientToken",[S]:Z3}],[2,{[E]:"EbsOptimized",[S]:J3}],[2,{[E]:"EnaSupport",[S]:kS}],[0,{[E]:"Hypervisor",[S]:zS}],[()=>Kce,{[E]:"IamInstanceProfile",[S]:cP}],[0,{[E]:"InstanceLifecycle",[S]:goe}],[()=>Sue,{[E]:"ElasticGpuAssociationSet",[S]:Sre}],[()=>wue,{[E]:"ElasticInferenceAcceleratorAssociationSet",[S]:Cre}],[()=>Pue,{[E]:"NetworkInterfaceSet",[S]:hie}],[0,{[E]:"OutpostArn",[S]:$S}],[0,{[E]:"RootDeviceName",[S]:IP}],[0,{[E]:"RootDeviceType",[S]:OP}],[()=>HS,{[E]:"GroupSet",[S]:NS}],[2,{[E]:"SourceDestCheck",[S]:DP}],[0,{[E]:"SpotInstanceRequestId",[S]:aae}],[0,{[E]:"SriovNetSupport",[S]:PP}],[()=>YP,{[E]:"StateReason",[S]:NP}],[()=>Ka,{[E]:"TagSet",[S]:xl}],[0,{[E]:"VirtualizationType",[S]:VP}],[()=>nce,{[E]:"CpuOptions",[S]:Yse}],[0,{[E]:"CapacityBlockId",[S]:Fse}],[0,{[E]:"CapacityReservationId",[S]:K3}],[()=>Xae,{[E]:"CapacityReservationSpecification",[S]:ere}],[()=>qce,{[E]:"HibernationOptions",[S]:eoe}],[()=>Fue,{[E]:"LicenseSet",[S]:Goe}],[()=>dle,{[E]:"MetadataOptions",[S]:sie}],[()=>Nce,{[E]:"EnclaveOptions",[S]:kre}],[0,{[E]:"BootMode",[S]:q3}],[0,{[E]:"PlatformDetails",[S]:RP}],[0,{[E]:"UsageOperation",[S]:jP}],[4,{[E]:"UsageOperationUpdateTime",[S]:kae}],[()=>qle,{[E]:"PrivateDnsNameOptions",[S]:Iie}],[0,{[E]:"Ipv6Address",[S]:aP}],[0,{[E]:"TpmSupport",[S]:BP}],[()=>cle,{[E]:"MaintenanceOptions",[S]:rie}],[0,{[E]:"CurrentInstanceBootMode",[S]:Zse}],[()=>gle,{[E]:"NetworkPerformanceOptions",[S]:yie}],[()=>bm,{[E]:"Operator",[S]:gm}],[0,{[E]:"InstanceId",[S]:LS}],[0,{[E]:"ImageId",[S]:lP}],[()=>$b,{[E]:"InstanceState",[S]:koe}],[0,{[E]:"PrivateDnsName",[S]:US}],[0,{[E]:"DnsName",[S]:ure}],[0,{[E]:"Reason",[S]:Xie}],[0,{[E]:"KeyName",[S]:kf}],[1,{[E]:"AmiLaunchIndex",[S]:Ise}],[()=>JP,{[E]:"ProductCodes",[S]:xP}],[0,{[E]:"InstanceType",[S]:uP}],[4,{[E]:"LaunchTime",[S]:Koe}],[()=>ZP,{[E]:"Placement",[S]:$ie}],[0,{[E]:"KernelId",[S]:dP}],[0,{[E]:"RamdiskId",[S]:MP}],[0,{[E]:"Platform",[S]:TP}],[()=>Nle,{[E]:"Monitoring",[S]:cie}],[0,{[E]:"SubnetId",[S]:jS}],[0,{[E]:"VpcId",[S]:HP}],[0,{[E]:"PrivateIpAddress",[S]:wl}],[0,{[E]:"IpAddress",[S]:hoe}]]],nle=[3,H,HW,0,[gk,vk],[[2,{[E]:"EnaSrdEnabled",[S]:Lre}],[()=>sle,{[E]:"EnaSrdUdpSpecification",[S]:jre}]]],sle=[3,H,FW,0,[bk],[[2,{[E]:"EnaSrdUdpEnabled",[S]:Ure}]]],rle=[3,H,KW,0,[rk,_k],[[0,{[E]:"DeviceName",[S]:W3}],[()=>Cce,{[E]:"Ebs",[S]:tP}]]],ole=[3,H,iJ,0,[uS],[[0,{[E]:"Ipv4Prefix",[S]:Roe}]]],ile=[3,H,eJ,0,[aS,UJ],[[0,{[E]:"Ipv6Address",[S]:aP}],[2,{[E]:"IsPrimaryIpv6",[S]:woe}]]],ale=[3,H,aJ,0,[lS],[[0,{[E]:"Ipv6Prefix",[S]:Coe}]]],cle=[3,H,vJ,0,[UD,Xte],[[0,{[E]:"AutoRecovery",[S]:kse}],[0,{[E]:"RebootMigration",[S]:Kie}]]],lle=[3,H,SJ,0,[UD],[0]],ule=[3,H,_J,0,[Vee,One],[0,()=>Jle]],fle=[3,H,wJ,0,[Mk,Ok,Ak,Ik,Nk],[0,1,0,0,0]],dle=[3,H,EJ,0,[vl,Mk,Ok,Ak,Ik,Nk],[[0,{[E]:"State",[S]:LP}],[0,{[E]:"HttpTokens",[S]:ooe}],[1,{[E]:"HttpPutResponseHopLimit",[S]:noe}],[0,{[E]:"HttpEndpoint",[S]:Wre}],[0,{[E]:"HttpProtocolIpv6",[S]:toe}],[0,{[E]:"InstanceMetadataTags",[S]:yoe}]]],hle=[3,H,RJ,0,[qD,TY,Wv,sS,iS,Oee,Yk,yS,bS,yl,f3,y3,CS,um,M3,Uk,Lk,zk,tX,gl],[[()=>GP,{[E]:"Association",[S]:j3}],[()=>ple,{[E]:"Attachment",[S]:Lse}],[0,{[E]:"Description",[S]:MS}],[()=>HS,{[E]:"GroupSet",[S]:NS}],[()=>FS,{[E]:"Ipv6AddressesSet",[S]:iP}],[0,{[E]:"MacAddress",[S]:Yoe}],[0,{[E]:"NetworkInterfaceId",[S]:SP}],[0,{[E]:"OwnerId",[S]:EP}],[0,{[E]:"PrivateDnsName",[S]:US}],[0,{[E]:"PrivateIpAddress",[S]:wl}],[()=>zue,{[E]:"PrivateIpAddressesSet",[S]:CP}],[2,{[E]:"SourceDestCheck",[S]:DP}],[0,{[E]:"Status",[S]:Nf}],[0,{[E]:"SubnetId",[S]:jS}],[0,{[E]:"VpcId",[S]:HP}],[0,{[E]:"InterfaceType",[S]:Boe}],[()=>Mue,{[E]:"Ipv4PrefixSet",[S]:Eoe}],[()=>Due,{[E]:"Ipv6PrefixSet",[S]:xoe}],[()=>tce,{[E]:"ConnectionTrackingConfiguration",[S]:sre}],[()=>bm,{[E]:"Operator",[S]:gm}]]],GP=[3,H,CJ,0,[FY,ZY,PJ,c3,Cte],[[0,{[E]:"CarrierIp",[S]:Kse}],[0,{[E]:"CustomerOwnedIp",[S]:Xse}],[0,{[E]:"IpOwnerId",[S]:Soe}],[0,{[E]:"PublicDnsName",[S]:Oie}],[0,{[E]:"PublicIp",[S]:Die}]]],ple=[3,H,TJ,0,[Vv,vY,Tf,sk,CS,gS,yk,hk],[[4,{[E]:"AttachTime",[S]:IS}],[0,{[E]:"AttachmentId",[S]:Ase}],[2,{[E]:"DeleteOnTermination",[S]:Df}],[1,{[E]:"DeviceIndex",[S]:X3}],[0,{[E]:"Status",[S]:Nf}],[1,{[E]:"NetworkCardIndex",[S]:vP}],[()=>nle,{[E]:"EnaSrdSpecification",[S]:Bre}],[1,{[E]:"EnaQueueCount",[S]:Pre}]]],mle=[3,H,IJ,0,[wY,Tf,Wv,sk,sS,kk,iS,Yk,yl,f3,Mne,um,bY,Uk,gS,Lk,LJ,zk,zJ,Ote,yk,nX,hk],[[2,{[E]:"AssociatePublicIpAddress",[S]:Mse}],[2,{[E]:"DeleteOnTermination",[S]:Df}],[0,{[E]:"Description",[S]:MS}],[1,{[E]:"DeviceIndex",[S]:X3}],[()=>eN,{[S]:wS}],[1,{[E]:"Ipv6AddressCount",[S]:coe}],[()=>FS,{[E]:"Ipv6Addresses",[S]:iP}],[0,{[E]:"NetworkInterfaceId",[S]:SP}],[0,{[E]:"PrivateIpAddress",[S]:wl}],[()=>Xue,{[E]:"PrivateIpAddresses",[S]:CP}],[1,{[E]:"SecondaryPrivateIpAddressCount",[S]:lae}],[0,{[E]:"SubnetId",[S]:jS}],2,0,1,[()=>Bue,{[S]:uS}],1,[()=>$ue,{[S]:lS}],1,2,()=>kce,()=>ece,1]],gle=[3,H,MJ,0,[YD],[[0,{[E]:"BandwidthWeighting",[S]:jse}]]],yle=[3,H,DJ,0,[YD],[0]],ble=[3,H,BJ,0,[qD,p3,bS,yl],[[()=>GP,{[E]:"Association",[S]:j3}],[2,{[E]:"Primary",[S]:AP}],[0,{[E]:"PrivateDnsName",[S]:US}],[0,{[E]:"PrivateIpAddress",[S]:wl}]]],$b=[3,H,YJ,0,[tk,Co],[[1,{[E]:"Code",[S]:Y3}],[0,{[E]:"Name",[S]:Hi}]]],vle=[3,H,GJ,0,[Ro,eX,Nte],[[0,{[E]:"InstanceId",[S]:LS}],[()=>$b,{[E]:"CurrentState",[S]:nre}],[()=>$b,{[E]:"PreviousState",[S]:Bie}]]],Sle=[3,H,Bk,0,[tse,FX,n3,Sk],[[1,{[E]:"TotalSizeInGB",[S]:Iae}],[()=>bue,{[E]:"Disks",[S]:gre}],[0,{[E]:"NvmeSupport",[S]:wP}],[0,{[E]:"EncryptionSupport",[S]:eP}]]],_le=[3,H,JJ,0,[im,HY,xk,Lne,Dne,Une,PY,oS,d3,O3,Va,ZJ,Bk,lk,Wk,Rk,Ek,u3,Pk,$W,NY,fX,EY,ane,ote,ite,s3,Fk,Jk,Pte,Yte],[[0,{[E]:"InstanceType",[S]:uP}],[2,{[E]:"CurrentGeneration",[S]:Gse}],[2,{[E]:"FreeTierEligible",[S]:sP}],[()=>ofe,{[E]:"SupportedUsageClasses",[S]:pae}],[()=>tfe,{[E]:"SupportedRootDeviceTypes",[S]:uae}],[()=>afe,{[E]:"SupportedVirtualizationTypes",[S]:gae}],[2,{[E]:"BareMetal",[S]:$se}],[0,{[E]:"Hypervisor",[S]:zS}],[()=>Kle,{[E]:"ProcessorInfo",[S]:kie}],[()=>cue,{[E]:"VCpuInfo",[S]:Lae}],[()=>Dle,{[E]:"MemoryInfo",[S]:Sl}],[2,{[E]:"InstanceStorageSupported",[S]:Ioe}],[()=>Sle,{[E]:"InstanceStorageInfo",[S]:Aoe}],[()=>Rce,{[E]:"EbsInfo",[S]:Ire}],[()=>Lle,{[E]:"NetworkInfo",[S]:mie}],[()=>Fce,{[E]:"GpuInfo",[S]:Qre}],[()=>Uce,{[E]:"FpgaInfo",[S]:qre}],[()=>Fle,{[E]:"PlacementGroupInfo",[S]:Mie}],[()=>Wce,{[E]:"InferenceAcceleratorInfo",[S]:loe}],[2,{[E]:"HibernationSupported",[S]:roe}],[2,{[E]:"BurstablePerformanceSupported",[S]:Use}],[2,{[E]:"DedicatedHostsSupported",[S]:cre}],[2,{[E]:"AutoRecoverySupported",[S]:Dse}],[()=>gue,{[E]:"SupportedBootModes",[S]:Jie}],[0,{[E]:"NitroEnclavesSupport",[S]:die}],[0,{[E]:"NitroTpmSupport",[S]:vie}],[()=>Hle,{[E]:"NitroTpmInfo",[S]:bie}],[()=>Ile,{[E]:"MediaAcceleratorInfo",[S]:Qoe}],[()=>jle,{[E]:"NeuronInfo",[S]:gie}],[0,{[E]:"PhcSupport",[S]:Lie}],[0,{[E]:"RebootMigrationSupport",[S]:Gie}]]],wle=[3,H,VJ,0,[uS],[0]],Ele=[3,H,qJ,0,[lS],[0]],xle=[3,H,mee,0,[Fa,qa,Ur,fS,aee],[[0,{[E]:"KeyPairId",[S]:mm}],[()=>Ka,{[E]:"TagSet",[S]:xl}],[0,{[E]:"KeyName",[S]:kf}],[0,{[E]:"KeyFingerprint",[S]:BS}],[()=>Qae,{[E]:"KeyMaterial",[S]:Uoe}]]],Rle=[3,H,hee,0,[Fa,jk,qa,Mte,ek,Ur,fS],[[0,{[E]:"KeyPairId",[S]:mm}],[0,{[E]:"KeyType",[S]:Hoe}],[()=>Ka,{[E]:"TagSet",[S]:xl}],[0,{[E]:"PublicKey",[S]:Pie}],[4,{[E]:"CreateTime",[S]:Q3}],[0,{[E]:"KeyName",[S]:kf}],[0,{[E]:"KeyFingerprint",[S]:BS}]]],Cle=[3,H,Tee,0,[Ree,Cee,P3],[0,0,0]],Tle=[3,H,yee,0,[Hk],[[0,{[E]:"LicenseConfigurationArn",[S]:Foe}]]],Ale=[3,H,gee,0,[Hk],[0]],Ile=[3,H,Fk,0,[HD,Wne],[[()=>que,{[E]:"Accelerators",[S]:B3}],[1,{[E]:"TotalMediaMemoryInMiB",[S]:Cae}]]],Ole=[3,H,kee,0,[Bi,Co,Of,Va],[[1,{[E]:"Count",[S]:Ga}],[0,{[E]:"Name",[S]:Hi}],[0,{[E]:"Manufacturer",[S]:Pf}],[()=>Mle,{[E]:"MemoryInfo",[S]:Sl}]]],Mle=[3,H,Nee,0,[bl],[[1,{[E]:"SizeInMiB",[S]:El}]]],Dle=[3,H,Va,0,[bl],[[1,{[E]:"SizeInMiB",[S]:El}]]],kle=[3,H,qee,0,[ji,Fn,RS,hm,am,dm,pS],[0,2,1,0,1,1,2],1],Ple=[3,H,Gee,0,[D3],[[()=>uue,{[E]:"VolumeModification",[S]:Uae}]]],Nle=[3,H,mS,0,[vl],[[0,{[E]:"State",[S]:LP}]]],zle=[3,H,Wee,0,[gS,t3,Gk,IY,bte,uX,$ee,Uee],[[1,{[E]:"NetworkCardIndex",[S]:vP}],[0,{[E]:"NetworkPerformance",[S]:_P}],[1,{[E]:"MaximumNetworkInterfaces",[S]:gP}],[1,{[E]:"BaselineBandwidthInGbps",[S]:Bse}],[1,{[E]:"PeakBandwidthInGbps",[S]:Tie}],[1,{[E]:"DefaultEnaQueueCountPerInterface",[S]:are}],[1,{[E]:"MaximumEnaQueueCount",[S]:eie}],[1,{[E]:"MaximumEnaQueueCountPerInterface",[S]:tie}]]],Lle=[3,H,Wk,0,[t3,Gk,jee,IX,Yee,VW,qW,XJ,eS,bW,uk,fW,gW,LY,RW],[[0,{[E]:"NetworkPerformance",[S]:_P}],[1,{[E]:"MaximumNetworkInterfaces",[S]:gP}],[1,{[E]:"MaximumNetworkCards",[S]:nie}],[1,{[E]:"DefaultNetworkCardIndex",[S]:lre}],[()=>Gue,{[E]:"NetworkCards",[S]:lie}],[1,{[E]:"Ipv4AddressesPerInterface",[S]:uoe}],[1,{[E]:"Ipv6AddressesPerInterface",[S]:foe}],[2,{[E]:"Ipv6Supported",[S]:Poe}],[0,{[E]:"EnaSupport",[S]:kS}],[2,{[E]:"EfaSupported",[S]:Hre}],[()=>Ace,{[E]:"EfaInfo",[S]:Ore}],[2,{[E]:"EncryptionInTransitSupported",[S]:Are}],[2,{[E]:"EnaSrdSupported",[S]:$re}],[()=>hue,{[E]:"BandwidthWeightings",[S]:Hse}],[0,{[E]:"FlexibleEnaQueuesSupport",[S]:Vre}]]],Ble=[3,H,ete,0,[Bi,P3],[[1,{[E]:"Count",[S]:Ga}],[1,{[E]:"Version",[S]:Gae}]]],$le=[3,H,tte,0,[Bi,Co,qY,Va],[[1,{[E]:"Count",[S]:Ga}],[0,{[E]:"Name",[S]:Hi}],[()=>Ble,{[E]:"CoreInfo",[S]:Qse}],[()=>Ule,{[E]:"MemoryInfo",[S]:Sl}]]],Ule=[3,H,ste,0,[bl],[[1,{[E]:"SizeInMiB",[S]:El}]]],jle=[3,H,Jk,0,[rte,Jne],[[()=>Kue,{[E]:"NeuronDevices",[S]:fie}],[1,{[E]:"TotalNeuronDeviceMemoryInMiB",[S]:Tae}]]],Hle=[3,H,s3,0,[jne],[[()=>Zue,{[E]:"SupportedVersions",[S]:yae}]]],KP=[3,H,fte,0,[o3],[0]],bm=[3,H,dte,0,[Zee,o3],[[2,{[E]:"Managed",[S]:iie}],[0,{[E]:"Principal",[S]:Cie}]]],ZP=[3,H,vS,0,[rm,CY,Tk,kte,zW,ise,lne,BW,Ck,sm],[[0,{[E]:"AvailabilityZoneId",[S]:L3}],[0,{[E]:"Affinity",[S]:zse}],[0,{[E]:"GroupName",[S]:oP}],[1,{[E]:"PartitionNumber",[S]:zie}],[0,{[E]:"HostId",[S]:Jre}],[0,{[E]:"Tenancy",[S]:vae}],[0,{[E]:"SpreadDomain",[S]:tae}],[0,{[E]:"HostResourceGroupArn",[S]:soe}],[0,{[E]:"GroupId",[S]:rP}],[0,{[E]:"AvailabilityZone",[S]:OS}]]],Fle=[3,H,u3,0,[kne],[[()=>Yue,{[E]:"SupportedStrategies",[S]:fae}]]],Vle=[3,H,Ete,0,[Dk,mk,pk],[0,2,2]],qle=[3,H,xte,0,[Dk,mk,pk],[[0,{[E]:"HostnameType",[S]:ioe}],[2,{[E]:"EnableResourceNameDnsARecord",[S]:zre}],[2,{[E]:"EnableResourceNameDnsAAAARecord",[S]:Nre}]]],Gle=[3,H,Tte,0,[p3,yl],[[2,{[E]:"Primary",[S]:AP}],[0,{[E]:"PrivateIpAddress",[S]:wl}]]],Kle=[3,H,d3,0,[ine,cne,une,Of],[[()=>due,{[E]:"SupportedArchitectures",[S]:Wie}],[1,{[E]:"SustainedClockSpeedInGhz",[S]:eae}],[()=>sfe,{[E]:"SupportedFeatures",[S]:nae}],[0,{[E]:"Manufacturer",[S]:Pf}]]],Zle=[3,H,wte,0,[vte,_te],[[0,{[E]:"ProductCode",[S]:Aie}],[0,{[E]:"Type",[S]:UP}]]],Qle=[3,H,jte,0,[If,Fn],[[()=>zf,{[S]:Ro}],[2,{[E]:"DryRun",[S]:as}]],1],Yle=[3,H,nne,0,[cte,_S,_W],[[0,{[E]:"OptInStatus",[S]:Sie}],[0,{[E]:"RegionName",[S]:Zie}],[0,{[E]:"RegionEndpoint",[S]:Hie}]]],QP=[3,H,rne,0,[Vte,yS,Gte,sS,ree],[[0,{[E]:"ReservationId",[S]:Fie}],[0,{[E]:"OwnerId",[S]:EP}],[0,{[E]:"RequesterId",[S]:qie}],[()=>HS,{[E]:"GroupSet",[S]:NS}],[()=>kue,{[E]:"InstancesSet",[S]:pm}]]],Xle=[3,H,Ute,0,[tS],[[2,{[E]:"Enabled",[S]:nP}]],1],Wle=[3,H,Hte,0,[Mee,Dee,Gv,Af,im,kk,iS,dS,Ur,mS,vS,SS,dne,b3,um,cse,ik,ck,fm,xee,xJ,JY,Kv,Qv,rS,_ee,Kk,Jv,a3,Zk,aX,pW,e3,gl,Fn,cX,cJ,yl,Xv,BD,Xk,cS,fk],[1,1,[()=>mue,{[S]:qv}],0,0,1,[()=>FS,{[S]:aS}],0,0,[()=>Xle,0],[()=>ZP,0],0,[()=>eN,{[S]:wS}],[()=>nfe,{[S]:v3}],0,[()=>Zae,0],[()=>_ue,0],[()=>Eue,{[S]:ak}],[()=>vm,{[S]:Mf}],()=>Cle,()=>ule,()=>ice,()=>sce,()=>Yae,()=>Gce,[()=>Vue,{[S]:Eee}],()=>fle,()=>zce,()=>Vle,()=>lle,2,2,()=>yle,()=>KP,[2,{[E]:"DryRun",[S]:as}],[2,{[E]:"DisableApiTermination",[S]:ore}],[0,{[E]:"InstanceInitiatedShutdownBehavior",[S]:poe}],[0,{[E]:"PrivateIpAddress",[S]:wl}],[0,{[E]:"ClientToken",[zoe]:1,[S]:Z3}],[0,{[E]:"AdditionalInfo",[S]:N3}],[()=>Nue,{[E]:"NetworkInterface",[S]:pie}],[()=>Zce,{[E]:"IamInstanceProfile",[S]:cP}],[2,{[E]:"EbsOptimized",[S]:J3}]],2],Jle=[3,H,Ane,0,[Hee,Ene,DY,wse,nJ],[0,0,1,4,0]],eue=[3,H,vne,0,[If,BD,Fn],[[()=>zf,{[S]:Ro}],[0,{[E]:"AdditionalInfo",[S]:N3}],[2,{[E]:"DryRun",[S]:as}]],1],tue=[3,H,Sne,0,[xne],[[()=>VS,{[E]:"InstancesSet",[S]:pm}]]],YP=[3,H,xS,0,[tk,Qee],[[0,{[E]:"Code",[S]:Y3}],[0,{[E]:"Message",[S]:aie}]]],nue=[3,H,_ne,0,[If,UW,_3,Fn,wk],[[()=>zf,{[S]:Ro}],2,2,[2,{[E]:"DryRun",[S]:as}],[2,{[E]:"Force",[S]:Kre}]],1],sue=[3,H,wne,0,[Cne],[[()=>VS,{[E]:"InstancesSet",[S]:pm}]]],rue=[3,H,R3,0,[oee,I3],[[0,{[E]:"Key",[S]:$oe}],[0,{[E]:"Value",[S]:zae}]]],oue=[3,H,Mf,0,[ene,qa],[[0,{[E]:"ResourceType",[S]:Yie}],[()=>Ka,{[S]:R3}]]],iue=[3,H,Gne,0,[If,wk,_3,Fn],[[()=>zf,{[S]:Ro}],2,2,[2,{[E]:"DryRun",[S]:as}]],1],aue=[3,H,Kne,0,[Qne],[[()=>VS,{[E]:"InstancesSet",[S]:pm}]]],cue=[3,H,O3,0,[zX,lX,PX,dse,_se],[[1,{[E]:"DefaultVCpus",[S]:pre}],[1,{[E]:"DefaultCores",[S]:ire}],[1,{[E]:"DefaultThreadsPerCore",[S]:dre}],[()=>yue,{[E]:"ValidCores",[S]:Bae}],[()=>rfe,{[E]:"ValidThreadsPerCore",[S]:qae}]]],XP=[3,H,Rse,0,[rm,lm,$ne,am,qa,hm,TW,pS,dm,zne,gl,AS,ji,RS,ES,sm,vl,ek,AY,nS,hS],[[0,{[E]:"AvailabilityZoneId",[S]:L3}],[0,{[E]:"OutpostArn",[S]:$S}],[0,{[E]:"SourceVolumeId",[S]:mae}],[1,{[E]:"Iops",[S]:fP}],[()=>Ka,{[E]:"TagSet",[S]:xl}],[0,{[E]:"VolumeType",[S]:FP}],[2,{[E]:"FastRestored",[S]:Gre}],[2,{[E]:"MultiAttachEnabled",[S]:Zoe}],[1,{[E]:"Throughput",[S]:$P}],[0,{[E]:"SseType",[S]:hae}],[()=>bm,{[E]:"Operator",[S]:gm}],[1,{[E]:"VolumeInitializationRate",[S]:$ae}],[0,{[E]:"VolumeId",[S]:ym}],[1,{[E]:"Size",[S]:bae}],[0,{[E]:"SnapshotId",[S]:kP}],[0,{[E]:"AvailabilityZone",[S]:OS}],[0,{[E]:"Status",[S]:Nf}],[4,{[E]:"CreateTime",[S]:Q3}],[()=>cfe,{[E]:"AttachmentSet",[S]:Nse}],[2,{[E]:"Encrypted",[S]:PS}],[0,{[E]:"KmsKeyId",[S]:hP}]]],lue=[3,H,fse,0,[Tf,$D,NJ,om,ji,Ro,HX,vl,Vv],[[2,{[E]:"DeleteOnTermination",[S]:Df}],[0,{[E]:"AssociatedResource",[S]:z3}],[0,{[E]:"InstanceOwningService",[S]:_oe}],[1,{[E]:"EbsCardIndex",[S]:DS}],[0,{[E]:"VolumeId",[S]:ym}],[0,{[E]:"InstanceId",[S]:LS}],[0,{[E]:"Device",[S]:mre}],[0,{[E]:"Status",[S]:Nf}],[4,{[E]:"AttachTime",[S]:IS}]]],uue=[3,H,D3,0,[ji,Fee,Ine,sse,Zne,ose,rse,Xne,pte,lte,gte,mte,ute,zte,Pne,vW],[[0,{[E]:"VolumeId",[S]:ym}],[0,{[E]:"ModificationState",[S]:oie}],[0,{[E]:"StatusMessage",[S]:cae}],[1,{[E]:"TargetSize",[S]:Oae}],[1,{[E]:"TargetIops",[S]:xae}],[0,{[E]:"TargetVolumeType",[S]:Dae}],[1,{[E]:"TargetThroughput",[S]:Mae}],[2,{[E]:"TargetMultiAttachEnabled",[S]:Rae}],[1,{[E]:"OriginalSize",[S]:Eie}],[1,{[E]:"OriginalIops",[S]:_ie}],[0,{[E]:"OriginalVolumeType",[S]:Rie}],[1,{[E]:"OriginalThroughput",[S]:xie}],[2,{[E]:"OriginalMultiAttachEnabled",[S]:wie}],[1,{[E]:"Progress",[S]:Uie}],[4,{[E]:"StartTime",[S]:dae}],[4,{[E]:"EndTime",[S]:Fre}]]],WP="unit",fue=[-3,zP,"EC2ServiceException",0,[],[]];Mt.for(zP).registerError(fue,Fv);var due=[1,H,RY,0,[0,{[S]:je}]],hue=[1,H,zY,0,[0,{[S]:je}]],pue=[1,H,OY,0,[()=>qP,{[S]:je}]],mue=[1,H,MY,0,[()=>qP,{[S]:qv}]],gue=[1,H,kY,0,[0,{[S]:je}]],yue=[1,H,$Y,0,[1,{[S]:je}]],bue=[1,H,dX,0,[()=>wce,{[S]:je}]],vue=[1,H,GX,0,[()=>xce,{[S]:je}]],Sue=[1,H,XX,0,[()=>Ice,{[S]:je}]],_ue=[1,H,nW,0,[()=>Oce,{[S]:je}]],wue=[1,H,oW,0,[()=>Dce,{[S]:je}]],Eue=[1,H,ck,0,[()=>Mce,{[S]:je}]],xue=[1,H,qX,0,[0,{[S]:ok}]],Rl=[1,H,CW,0,[()=>Lce,{[S]:$i}]],Rue=[1,H,EW,0,[()=>Bce,{[S]:je}]],Cue=[1,H,OW,0,[()=>jce,{[S]:je}]],HS=[1,H,DW,0,[()=>Vce,{[S]:je}]],Tue=[1,H,lJ,0,[0,{[S]:Af}]],Aue=[1,H,gJ,0,[()=>Qce,{[S]:je}]],Iue=[1,H,XW,0,[()=>Jce,0]],Oue=[1,H,ZW,0,[()=>rle,{[S]:je}]],zf=[1,H,uJ,0,[0,{[S]:Ro}]],Mue=[1,H,sJ,0,[()=>ole,{[S]:je}]],FS=[1,H,tJ,0,[()=>ile,{[S]:je}]],Due=[1,H,rJ,0,[()=>ale,{[S]:je}]],kue=[1,H,bJ,0,[()=>tle,{[S]:je}]],Pue=[1,H,AJ,0,[()=>hle,{[S]:je}]],Nue=[1,H,OJ,0,[()=>mle,{[S]:je}]],zue=[1,H,$J,0,[()=>ble,{[S]:je}]],VS=[1,H,KJ,0,[()=>vle,{[S]:je}]],Lue=[1,H,WJ,0,[()=>_le,{[S]:je}]],Bue=[1,H,HJ,0,[()=>wle,{[S]:je}]],$ue=[1,H,FJ,0,[()=>Ele,{[S]:je}]],Uue=[1,H,cee,0,[0,{[S]:Ur}]],jue=[1,H,fee,0,[0,{[S]:Fa}]],Hue=[1,H,pee,0,[()=>Rle,{[S]:je}]],Fue=[1,H,vee,0,[()=>Tle,{[S]:je}]],Vue=[1,H,wee,0,[()=>Ale,{[S]:je}]],que=[1,H,Pee,0,[()=>Ole,{[S]:je}]],Gue=[1,H,Xee,0,[()=>zle,{[S]:je}]],Kue=[1,H,nte,0,[()=>$le,{[S]:je}]],Zue=[1,H,ate,0,[0,{[S]:je}]],Que=[1,H,hte,0,[0,{[S]:r3}]],Yue=[1,H,Rte,0,[0,{[S]:je}]],Xue=[1,H,Ate,0,[()=>Gle,{[S]:je}]],JP=[1,H,Ste,0,[()=>Zle,{[S]:je}]],Wue=[1,H,Zte,0,[()=>Yle,{[S]:je}]],Jue=[1,H,Wte,0,[0,{[S]:_S}]],efe=[1,H,Qte,0,[()=>QP,{[S]:je}]],tfe=[1,H,$te,0,[0,{[S]:je}]],eN=[1,H,fne,0,[0,{[S]:wS}]],nfe=[1,H,hne,0,[0,{[S]:v3}]],sfe=[1,H,one,0,[0,{[S]:je}]],Ka=[1,H,Yne,0,[()=>rue,{[S]:je}]],vm=[1,H,nse,0,[()=>oue,{[S]:je}]],rfe=[1,H,ese,0,[1,{[S]:je}]],ofe=[1,H,ase,0,[0,{[S]:je}]],ife=[1,H,bse,0,[0,{[S]:je}]],afe=[1,H,Sse,0,[0,{[S]:je}]],cfe=[1,H,use,0,[()=>lue,{[S]:je}]],lfe=[1,H,hse,0,[0,{[S]:ji}]],ufe=[1,H,mse,0,[()=>XP,{[S]:je}]],ffe=[1,H,Cse,0,[0,{[S]:je}]],pbe=[9,H,GY,0,()=>rce,()=>xle],mbe=[9,H,iX,0,()=>oce,()=>XP],gbe=[9,H,EX,0,()=>ace,()=>cce],ybe=[9,H,UX,0,()=>lce,()=>WP],dfe=[9,H,SX,0,()=>uce,()=>fce],hfe=[9,H,_X,0,()=>dce,()=>hce],pfe=[9,H,vX,0,()=>pce,()=>mce],mfe=[9,H,AX,0,()=>gce,()=>yce],gfe=[9,H,kX,0,()=>bce,()=>vce],yfe=[9,H,jX,0,()=>Sce,()=>_ce],bbe=[9,H,dJ,0,()=>Yce,()=>Xce],vbe=[9,H,Kee,0,()=>kle,()=>Ple],Sbe=[9,H,qte,0,()=>Qle,()=>WP],_be=[9,H,Kte,0,()=>Wle,()=>QP],wbe=[9,H,Rne,0,()=>eue,()=>tue],Ebe=[9,H,Tne,0,()=>nue,()=>sue],xbe=[9,H,Vne,0,()=>iue,()=>aue];class tN extends $r.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeImages",{}).n("EC2Client","DescribeImagesCommand").sc(dfe).build(){}class nN extends $r.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeInstances",{}).n("EC2Client","DescribeInstancesCommand").sc(hfe).build(){}class bfe extends $r.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeInstanceTypes",{}).n("EC2Client","DescribeInstanceTypesCommand").sc(pfe).build(){}class sN extends $r.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeKeyPairs",{}).n("EC2Client","DescribeKeyPairsCommand").sc(mfe).build(){}class vfe extends $r.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeRegions",{}).n("EC2Client","DescribeRegionsCommand").sc(gfe).build(){}class rN extends $r.classBuilder().ep(hl).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions())]}).s("AmazonEC2","DescribeVolumes",{}).n("EC2Client","DescribeVolumesCommand").sc(yfe).build(){}function Sfe(e){return t=>async n=>{const{request:r}=n;if(e.expectContinueHeader!==!1&&Mn.isInstance(r)&&r.body&&e.runtime==="node"&&e.requestHandler?.constructor?.name!=="FetchHttpHandler"){let i=!0;if(typeof e.expectContinueHeader=="number")try{i=(Number(r.headers?.["content-length"])??e.bodyLengthChecker?.(r.body)??1/0)>=e.expectContinueHeader}catch{}else i=!!e.expectContinueHeader;i&&(r.headers.Expect="100-continue")}return t({...n,request:r})}}const _fe={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},wfe=e=>({applyToStack:t=>{t.add(Sfe(e),_fe)}}),oN={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},Efe=oN.WHEN_SUPPORTED,Rbe={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},xfe=oN.WHEN_SUPPORTED;var Ub;(function(e){e.MD5="MD5",e.CRC32="CRC32",e.CRC32C="CRC32C",e.CRC64NVME="CRC64NVME",e.SHA1="SHA1",e.SHA256="SHA256"})(Ub||(Ub={}));var jT;(function(e){e.HEADER="header",e.TRAILER="trailer"})(jT||(jT={}));const Cbe=Ub.CRC32;var Tbe=(function(){function e(){this.crc32=new vp}return e.prototype.update=function(t){bp(t)||this.crc32.update(za(t))},e.prototype.digest=function(){return RD(this,void 0,void 0,function(){return CD(this,function(t){return[2,qQ(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new vp},e})(),vp=(function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var n,r;try{for(var i=YQ(t),c=i.next();!c.done;c=i.next()){var l=c.value;this.checksum=this.checksum>>>8^Cfe[(this.checksum^l)&255]}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e})(),Rfe=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],Cfe=GQ(Rfe);const Tfe=e=>{const{requestChecksumCalculation:t,responseChecksumValidation:n,requestStreamBufferSize:r}=e;return Object.assign(e,{requestChecksumCalculation:Ns(t??Efe),responseChecksumValidation:Ns(n??xfe),requestStreamBufferSize:Number(r??0)})},Afe=e=>(t,n)=>async r=>{const i=await e.region(),c=e.region;let l=()=>{};n.__s3RegionRedirect&&(Object.defineProperty(e,"region",{writable:!1,value:async()=>n.__s3RegionRedirect}),l=()=>Object.defineProperty(e,"region",{writable:!0,value:c}));try{const f=await t(r);if(n.__s3RegionRedirect){l();const d=await e.region();if(i!==d)throw new Error("Region was not restored following S3 region redirect.")}return f}catch(f){throw l(),f}},Ife={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function Ofe(e){return(t,n)=>async r=>{try{return await t(r)}catch(i){if(e.followRegionRedirects){const c=i?.$metadata?.httpStatusCode,l=n.commandName==="HeadBucketCommand",f=i?.$response?.headers?.["x-amz-bucket-region"];if(f&&(c===301||c===400&&(i?.name==="IllegalLocationConstraintException"||l))){try{const d=f;n.logger?.debug(`Redirecting from ${await e.region()} to ${d}`),n.__s3RegionRedirect=d}catch(d){throw new Error("Region redirect failed: "+d)}return t(r)}}throw i}}}const Mfe={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},Dfe=e=>({applyToStack:t=>{t.add(Ofe(e),Mfe),t.addRelativeTo(Afe(e),Ife)}});class qS{data;lastPurgeTime=Date.now();static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=3e4;constructor(t={}){this.data=t}get(t){const n=this.data[t];if(n)return n}set(t,n){return this.data[t]=n,n}delete(t){delete this.data[t]}async purgeExpired(){const t=Date.now();if(!(this.lastPurgeTime+qS.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>t))for(const n in this.data){const r=this.data[n];if(!r.isRefreshing){const i=await r.identity;i.expiration&&i.expiration.getTime()(l.expiration?.getTime()??0){i.set(r,new P0(Promise.resolve(h)))})),l)):i.set(r,new P0(this.getIdentity(r))).identity}async getIdentity(t){await this.cache.purgeExpired().catch(i=>{console.warn(`Error while clearing expired entries in S3ExpressIdentityCache: +`+i)});const n=await this.createSessionFn(t);if(!n.Credentials?.AccessKeyId||!n.Credentials?.SecretAccessKey)throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:n.Credentials.AccessKeyId,secretAccessKey:n.Credentials.SecretAccessKey,sessionToken:n.Credentials.SessionToken,expiration:n.Credentials.Expiration?new Date(n.Credentials.Expiration):void 0}}}const kfe="Directory",Pfe="S3Express",Nfe="sigv4-s3express",zfe="X-Amz-S3session-Token",Lfe=zfe.toLowerCase(),Bfe=e=>(t,n)=>async r=>{if(n.endpointV2){const i=n.endpointV2,c=i.properties?.authSchemes?.[0]?.name===Nfe;if((i.properties?.backend===Pfe||i.properties?.bucketType===kfe)&&(vr(n,"S3_EXPRESS_BUCKET","J"),n.isS3ExpressBucket=!0),c){const f=r.input.Bucket;if(f){const d=await e.s3ExpressIdentityProvider.getS3ExpressIdentity(await e.credentials(),{Bucket:f});n.s3ExpressIdentity=d,Mn.isInstance(r.request)&&d.sessionToken&&(r.request.headers[Lfe]=d.sessionToken)}}}return t(r)},$fe={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},Ufe=e=>({applyToStack:t=>{t.add(Bfe(e),$fe)}}),jfe=async(e,t,n,r)=>{const i=await r.signWithCredentials(n,e,{});if(i.headers["X-Amz-Security-Token"]||i.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return i},Hfe=e=>t=>{throw t},Ffe=(e,t)=>{},Vfe=e=>(t,n)=>async r=>{if(!Mn.isInstance(r.request))return t(r);const c=Eo(n).selectedHttpAuthScheme;if(!c)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:l={}},identity:f,signer:d}=c;let h;n.s3ExpressIdentity?h=await jfe(n.s3ExpressIdentity,l,r.request,await e.signer()):h=await d.sign(r.request,f,l);const y=await t({...r,request:h}).catch((d.errorHandler||Hfe)(l));return(d.successHandler||Ffe)(y.response,l),y},qfe=e=>({applyToStack:t=>{t.addRelativeTo(Vfe(e),hM)}}),Gfe=(e,{session:t})=>{const[n,r]=t,{forcePathStyle:i,useAccelerateEndpoint:c,disableMultiregionAccessPoints:l,followRegionRedirects:f,s3ExpressIdentityProvider:d,bucketEndpoint:h,expectContinueHeader:y}=e;return Object.assign(e,{forcePathStyle:i??!1,useAccelerateEndpoint:c??!1,disableMultiregionAccessPoints:l??!1,followRegionRedirects:f??!1,s3ExpressIdentityProvider:d??new GS(async g=>n().send(new r({Bucket:g}))),bucketEndpoint:h??!1,expectContinueHeader:y??2097152})},Kfe={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},Zfe=3e3,Qfe=e=>(t,n)=>async r=>{const i=await t(r),{response:c}=i;if(!Pa.isInstance(c))return i;const{statusCode:l,body:f}=c;if(l<200||l>=300||!(typeof f?.stream=="function"||typeof f?.pipe=="function"||typeof f?.tee=="function"))return i;let h=f,y=f;f&&typeof f=="object"&&!(f instanceof Uint8Array)&&([h,y]=await AG(f)),c.body=y;const g=await Yfe(h,{streamCollector:async v=>_G(v,Zfe)});typeof h?.destroy=="function"&&h.destroy();const b=e.utf8Encoder(g.subarray(g.length-16));if(g.length===0&&Kfe[n.commandName]){const v=new Error("S3 aborted request");throw v.name="InternalError",v}return b&&b.endsWith("")&&(c.statusCode=400),i},Yfe=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),Xfe={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},KS=e=>({applyToStack:t=>{t.addRelativeTo(Qfe(e),Xfe)}}),Wfe=e=>typeof e=="string"&&e.indexOf("arn:")===0&&e.split(":").length>=6;function Jfe(e){return(t,n)=>async r=>{if(e.bucketEndpoint){const i=n.endpointV2;if(i){const c=r.input.Bucket;if(typeof c=="string")try{const l=new URL(c);n.endpointV2={...i,url:l}}catch(l){const f=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${c} could not be parsed as URL.`;throw n.logger?.constructor?.name==="NoOpLogger"?console.warn(f):n.logger?.warn?.(f),l}}}return t(r)}}const ede={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function tde({bucketEndpoint:e}){return t=>async n=>{const{input:{Bucket:r}}=n;if(!e&&typeof r=="string"&&!Wfe(r)&&r.indexOf("/")>=0){const i=new Error(`Bucket name shouldn't contain '/', received '${r}'`);throw i.name="InvalidBucketName",i}return t({...n})}}const nde={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},sde=e=>({applyToStack:t=>{t.add(tde(e),nde),t.addRelativeTo(Jfe(e),ede)}}),rde=e=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),jb="X-Amz-S3session-Token",HT=jb.toLowerCase();class ode extends Nb{async signWithCredentials(t,n,r){const i=FT(n);t.headers[HT]=n.sessionToken;const c=this;return VT(c,i),c.signRequest(t,r??{})}async presignWithCredentials(t,n,r){const i=FT(n);return delete t.headers[HT],t.headers[jb]=n.sessionToken,t.query=t.query??{},t.query[jb]=n.sessionToken,VT(this,i),this.presign(t,r)}}function FT(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function VT(e,t){const n=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),r=e.credentialProvider,i=()=>(clearTimeout(n),e.credentialProvider=r,Promise.resolve(t));e.credentialProvider=i}class iN{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return"none"}constructor(t){this.sigv4Signer=new ode(t),this.signerOptions=t}async sign(t,n={}){return n.signingRegion==="*"?this.getSigv4aSigner().sign(t,n):this.sigv4Signer.sign(t,n)}async signWithCredentials(t,n,r={}){if(r.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.signWithCredentials(t,n,r)}async presign(t,n={}){if(n.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.presign(t,n)}async presignWithCredentials(t,n,r={}){if(r.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(t,n,r)}getSigv4aSigner(){if(!this.sigv4aSigner)throw this.signerOptions.runtime==="node"?new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"):new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");return this.sigv4aSigner}}const ZS="required",M="type",ce="rules",B="conditions",ee="fn",te="argv",ke="ref",We="assign",Ee="url",xe="properties",mo="backend",On="authSchemes",pn="disableDoubleEncoding",mn="signingName",$n="signingRegion",Re="headers",QS="signingRegionSet",ide=6,ade=!1,Tr=!0,ks="isSet",sn="booleanEquals",Ae="error",Sp="aws.partition",pt="stringEquals",Vt="getAttr",Gt="name",kt="substring",qT="bucketSuffix",YS="parseURL",me="endpoint",ue="tree",_p="aws.isVirtualHostableS3Bucket",wp="{url#scheme}://{Bucket}.{url#authority}{url#path}",Nr="not",GT="accessPointSuffix",$h="{url#scheme}://{url#authority}{url#path}",aN="hardwareType",cN="regionPrefix",KT="bucketAliasSuffix",Hb="outpostId",Za="isValidHostLabel",XS="sigv4a",bf="s3-outposts",il="s3",lN="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",uN="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",ZT="https://{Bucket}.s3.{partitionResult#dnsSuffix}",fN="aws.parseArn",dN="bucketArn",hN="arnType",Ep="",WS="s3-object-lambda",pN="accesspoint",JS="accessPointName",QT="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",YT="mrapPartition",XT="outpostType",WT="arnPrefix",mN="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",JT="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",eA="https://s3.{partitionResult#dnsSuffix}",Bc={[ZS]:!1,[M]:"string"},$c={[ZS]:!0,default:!1,[M]:"boolean"},Lu={[ZS]:!1,[M]:"boolean"},tr={[ee]:sn,[te]:[{[ke]:"Accelerate"},!0]},Nt={[ee]:sn,[te]:[{[ke]:"UseFIPS"},!0]},Ot={[ee]:sn,[te]:[{[ke]:"UseDualStack"},!0]},tn={[ee]:ks,[te]:[{[ke]:"Endpoint"}]},gN={[ee]:Sp,[te]:[{[ke]:"Region"}],[We]:"partitionResult"},tA={[ee]:pt,[te]:[{[ee]:Vt,[te]:[{[ke]:"partitionResult"},Gt]},"aws-cn"]},Yu={[ee]:ks,[te]:[{[ke]:"Bucket"}]},dt={[ke]:"Bucket"},nA={[B]:[tr],[Ae]:"S3Express does not support S3 Accelerate.",[M]:Ae},sA={[B]:[tn,{[ee]:YS,[te]:[{[ke]:"Endpoint"}],[We]:"url"}],[ce]:[{[B]:[{[ee]:ks,[te]:[{[ke]:"DisableS3ExpressSessionAuth"}]},{[ee]:sn,[te]:[{[ke]:"DisableS3ExpressSessionAuth"},!0]}],[ce]:[{[B]:[{[ee]:sn,[te]:[{[ee]:Vt,[te]:[{[ke]:"url"},"isIp"]},!0]}],[ce]:[{[B]:[{[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"}],[ce]:[{[me]:{[Ee]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[xe]:{[mo]:"S3Express",[On]:[{[pn]:!0,[Gt]:"sigv4",[mn]:"s3express",[$n]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue}],[M]:ue},{[B]:[{[ee]:_p,[te]:[dt,!1]}],[ce]:[{[me]:{[Ee]:wp,[xe]:{[mo]:"S3Express",[On]:[{[pn]:!0,[Gt]:"sigv4",[mn]:"s3express",[$n]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue},{[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae}],[M]:ue},{[B]:[{[ee]:sn,[te]:[{[ee]:Vt,[te]:[{[ke]:"url"},"isIp"]},!0]}],[ce]:[{[B]:[{[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"}],[ce]:[{[me]:{[Ee]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[xe]:{[mo]:"S3Express",[On]:[{[pn]:!0,[Gt]:"sigv4-s3express",[mn]:"s3express",[$n]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue}],[M]:ue},{[B]:[{[ee]:_p,[te]:[dt,!1]}],[ce]:[{[me]:{[Ee]:wp,[xe]:{[mo]:"S3Express",[On]:[{[pn]:!0,[Gt]:"sigv4-s3express",[mn]:"s3express",[$n]:"{Region}"}]},[Re]:{}},[M]:me}],[M]:ue},{[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae}],[M]:ue},ss={[ee]:YS,[te]:[{[ke]:"Endpoint"}],[We]:"url"},N0={[ee]:sn,[te]:[{[ee]:Vt,[te]:[{[ke]:"url"},"isIp"]},!0]},yN={[ke]:"url"},bN={[ee]:"uriEncode",[te]:[dt],[We]:"uri_encoded_bucket"},Os={[mo]:"S3Express",[On]:[{[pn]:!0,[Gt]:"sigv4",[mn]:"s3express",[$n]:"{Region}"}]},Ve={},vN={[ee]:_p,[te]:[dt,!1]},rA={[Ae]:"S3Express bucket name is not a valid virtual hostable name.",[M]:Ae},oA={[ee]:ks,[te]:[{[ke]:"UseS3ExpressControlEndpoint"}]},iA={[ee]:sn,[te]:[{[ke]:"UseS3ExpressControlEndpoint"},!0]},Ke={[ee]:Nr,[te]:[tn]},rt={[ee]:sn,[te]:[{[ke]:"UseDualStack"},!1]},et={[ee]:sn,[te]:[{[ke]:"UseFIPS"},!1]},Ch={[Ae]:"Unrecognized S3Express bucket name format.",[M]:Ae},aA={[ee]:Nr,[te]:[Yu]},cA={[ke]:aN},lA={[B]:[Ke],[Ae]:"Expected a endpoint to be specified but no endpoint was found",[M]:Ae},Th={[On]:[{[pn]:!0,[Gt]:XS,[mn]:bf,[QS]:["*"]},{[pn]:!0,[Gt]:"sigv4",[mn]:bf,[$n]:"{Region}"}]},z0={[ee]:sn,[te]:[{[ke]:"ForcePathStyle"},!1]},cde={[ke]:"ForcePathStyle"},dn={[ee]:sn,[te]:[{[ke]:"Accelerate"},!1]},wn={[ee]:pt,[te]:[{[ke]:"Region"},"aws-global"]},Tn={[On]:[{[pn]:!0,[Gt]:"sigv4",[mn]:il,[$n]:"us-east-1"}]},lt={[ee]:Nr,[te]:[wn]},An={[ee]:sn,[te]:[{[ke]:"UseGlobalEndpoint"},!0]},uA={[Ee]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:{[On]:[{[pn]:!0,[Gt]:"sigv4",[mn]:il,[$n]:"{Region}"}]},[Re]:{}},yn={[On]:[{[pn]:!0,[Gt]:"sigv4",[mn]:il,[$n]:"{Region}"}]},In={[ee]:sn,[te]:[{[ke]:"UseGlobalEndpoint"},!1]},fA={[Ee]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:yn,[Re]:{}},dA={[Ee]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[xe]:yn,[Re]:{}},hA={[Ee]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:yn,[Re]:{}},L0={[ee]:sn,[te]:[{[ee]:Vt,[te]:[yN,"isIp"]},!1]},B0={[Ee]:lN,[xe]:yn,[Re]:{}},Fb={[Ee]:wp,[xe]:yn,[Re]:{}},pA={[me]:Fb,[M]:me},$0={[Ee]:uN,[xe]:yn,[Re]:{}},mA={[Ee]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[xe]:yn,[Re]:{}},Ah={[Ae]:"Invalid region: region was not a valid DNS name.",[M]:Ae},gs={[ke]:dN},SN={[ke]:hN},U0={[ee]:Vt,[te]:[gs,"service"]},e_={[ke]:JS},gA={[B]:[Ot],[Ae]:"S3 Object Lambda does not support Dual-stack",[M]:Ae},yA={[B]:[tr],[Ae]:"S3 Object Lambda does not support S3 Accelerate",[M]:Ae},bA={[B]:[{[ee]:ks,[te]:[{[ke]:"DisableAccessPoints"}]},{[ee]:sn,[te]:[{[ke]:"DisableAccessPoints"},!0]}],[Ae]:"Access points are not supported for this operation",[M]:Ae},j0={[B]:[{[ee]:ks,[te]:[{[ke]:"UseArnRegion"}]},{[ee]:sn,[te]:[{[ke]:"UseArnRegion"},!1]},{[ee]:Nr,[te]:[{[ee]:pt,[te]:[{[ee]:Vt,[te]:[gs,"region"]},"{Region}"]}]}],[Ae]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[M]:Ae},_N={[ee]:Vt,[te]:[{[ke]:"bucketPartition"},Gt]},wN={[ee]:Vt,[te]:[gs,"accountId"]},H0={[On]:[{[pn]:!0,[Gt]:"sigv4",[mn]:WS,[$n]:"{bucketArn#region}"}]},vA={[Ae]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[M]:Ae},F0={[Ae]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[M]:Ae},V0={[Ae]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[M]:Ae},q0={[Ae]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[M]:Ae},SA={[Ae]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[M]:Ae},_A={[Ae]:"Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided",[M]:Ae},Bu={[On]:[{[pn]:!0,[Gt]:"sigv4",[mn]:il,[$n]:"{bucketArn#region}"}]},wA={[On]:[{[pn]:!0,[Gt]:XS,[mn]:bf,[QS]:["*"]},{[pn]:!0,[Gt]:"sigv4",[mn]:bf,[$n]:"{bucketArn#region}"}]},EA={[ee]:fN,[te]:[dt]},xA={[Ee]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:yn,[Re]:{}},RA={[Ee]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:yn,[Re]:{}},CA={[Ee]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:yn,[Re]:{}},G0={[Ee]:mN,[xe]:yn,[Re]:{}},TA={[Ee]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:yn,[Re]:{}},AA={[ke]:"UseObjectLambdaEndpoint"},K0={[On]:[{[pn]:!0,[Gt]:"sigv4",[mn]:WS,[$n]:"{Region}"}]},IA={[Ee]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:yn,[Re]:{}},OA={[Ee]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:yn,[Re]:{}},MA={[Ee]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:yn,[Re]:{}},Z0={[Ee]:$h,[xe]:yn,[Re]:{}},DA={[Ee]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[xe]:yn,[Re]:{}},Q0=[{[ke]:"Region"}],lde=[{[ke]:"Endpoint"}],ude=[dt],Y0=[tr],Uc=[tn,ss],kA=[{[ee]:ks,[te]:[{[ke]:"DisableS3ExpressSessionAuth"}]},{[ee]:sn,[te]:[{[ke]:"DisableS3ExpressSessionAuth"},!0]}],fde=[bN],X0=[vN],Js=[gN],W0=[Nt,Ot],Xu=[Nt,rt],Wu=[et,Ot],Ju=[et,rt],PA=[{[ee]:kt,[te]:[dt,6,14,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,14,16,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],Ar=[{[B]:[Nt,Ot],[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:{}},[M]:me},{[B]:Xu,[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:{}},[M]:me},{[B]:Wu,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:{}},[M]:me},{[B]:Ju,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:{}},[M]:me}],NA=[{[ee]:kt,[te]:[dt,6,15,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,15,17,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],zA=[{[ee]:kt,[te]:[dt,6,19,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,19,21,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],LA=[{[ee]:kt,[te]:[dt,6,20,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,20,22,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],BA=[{[ee]:kt,[te]:[dt,6,26,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,26,28,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],Ir=[{[B]:[Nt,Ot],[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:{[mo]:"S3Express",[On]:[{[pn]:!0,[Gt]:"sigv4-s3express",[mn]:"s3express",[$n]:"{Region}"}]},[Re]:{}},[M]:me},{[B]:Xu,[me]:{[Ee]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:{[mo]:"S3Express",[On]:[{[pn]:!0,[Gt]:"sigv4-s3express",[mn]:"s3express",[$n]:"{Region}"}]},[Re]:{}},[M]:me},{[B]:Wu,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:{[mo]:"S3Express",[On]:[{[pn]:!0,[Gt]:"sigv4-s3express",[mn]:"s3express",[$n]:"{Region}"}]},[Re]:{}},[M]:me},{[B]:Ju,[me]:{[Ee]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[xe]:{[mo]:"S3Express",[On]:[{[pn]:!0,[Gt]:"sigv4-s3express",[mn]:"s3express",[$n]:"{Region}"}]},[Re]:{}},[M]:me}],$A=[dt,0,7,!0],UA=[{[ee]:kt,[te]:[dt,7,15,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,15,17,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],jA=[{[ee]:kt,[te]:[dt,7,16,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,16,18,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],HA=[{[ee]:kt,[te]:[dt,7,20,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,20,22,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],FA=[{[ee]:kt,[te]:[dt,7,21,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,21,23,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],VA=[{[ee]:kt,[te]:[dt,7,27,!0],[We]:"s3expressAvailabilityZoneId"},{[ee]:kt,[te]:[dt,27,29,!0],[We]:"s3expressAvailabilityZoneDelim"},{[ee]:pt,[te]:[{[ke]:"s3expressAvailabilityZoneDelim"},"--"]}],dde=[Yu],qA=[{[ee]:Za,[te]:[{[ke]:Hb},!1]}],GA=[{[ee]:pt,[te]:[{[ke]:cN},"beta"]}],hde=["*"],KA=[{[ee]:Za,[te]:[{[ke]:"Region"},!1]}],gi=[{[ee]:pt,[te]:[{[ke]:"Region"},"us-east-1"]}],J0=[{[ee]:pt,[te]:[SN,pN]}],ZA=[{[ee]:Vt,[te]:[gs,"resourceId[1]"],[We]:JS},{[ee]:Nr,[te]:[{[ee]:pt,[te]:[e_,Ep]}]}],pde=[gs,"resourceId[1]"],QA=[Ot],eb=[{[ee]:Nr,[te]:[{[ee]:pt,[te]:[{[ee]:Vt,[te]:[gs,"region"]},Ep]}]}],YA=[{[ee]:Nr,[te]:[{[ee]:ks,[te]:[{[ee]:Vt,[te]:[gs,"resourceId[2]"]}]}]}],mde=[gs,"resourceId[2]"],tb=[{[ee]:Sp,[te]:[{[ee]:Vt,[te]:[gs,"region"]}],[We]:"bucketPartition"}],XA=[{[ee]:pt,[te]:[_N,{[ee]:Vt,[te]:[{[ke]:"partitionResult"},Gt]}]}],nb=[{[ee]:Za,[te]:[{[ee]:Vt,[te]:[gs,"region"]},!0]}],sb=[{[ee]:Za,[te]:[wN,!1]}],WA=[{[ee]:Za,[te]:[e_,!1]}],Ih=[Nt],JA=[{[ee]:Za,[te]:[{[ke]:"Region"},!0]}],gde={parameters:{Bucket:Bc,Region:Bc,UseFIPS:$c,UseDualStack:$c,Endpoint:Bc,ForcePathStyle:$c,Accelerate:$c,UseGlobalEndpoint:$c,UseObjectLambdaEndpoint:Lu,Key:Bc,Prefix:Bc,CopySource:Bc,DisableAccessPoints:Lu,DisableMultiRegionAccessPoints:$c,UseArnRegion:Lu,UseS3ExpressControlEndpoint:Lu,DisableS3ExpressSessionAuth:Lu},[ce]:[{[B]:[{[ee]:ks,[te]:Q0}],[ce]:[{[B]:[tr,Nt],error:"Accelerate cannot be used with FIPS",[M]:Ae},{[B]:[Ot,tn],error:"Cannot set dual-stack in combination with a custom endpoint.",[M]:Ae},{[B]:[tn,Nt],error:"A custom endpoint cannot be combined with FIPS",[M]:Ae},{[B]:[tn,tr],error:"A custom endpoint cannot be combined with S3 Accelerate",[M]:Ae},{[B]:[Nt,gN,tA],error:"Partition does not support FIPS",[M]:Ae},{[B]:[Yu,{[ee]:kt,[te]:[dt,0,ide,Tr],[We]:qT},{[ee]:pt,[te]:[{[ke]:qT},"--x-s3"]}],[ce]:[nA,sA,{[B]:[oA,iA],[ce]:[{[B]:Js,[ce]:[{[B]:[bN,Ke],[ce]:[{[B]:W0,endpoint:{[Ee]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Os,[Re]:Ve},[M]:me},{[B]:Xu,endpoint:{[Ee]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Os,[Re]:Ve},[M]:me},{[B]:Wu,endpoint:{[Ee]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Os,[Re]:Ve},[M]:me},{[B]:Ju,endpoint:{[Ee]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Os,[Re]:Ve},[M]:me}],[M]:ue}],[M]:ue}],[M]:ue},{[B]:X0,[ce]:[{[B]:Js,[ce]:[{[B]:kA,[ce]:[{[B]:PA,[ce]:Ar,[M]:ue},{[B]:NA,[ce]:Ar,[M]:ue},{[B]:zA,[ce]:Ar,[M]:ue},{[B]:LA,[ce]:Ar,[M]:ue},{[B]:BA,[ce]:Ar,[M]:ue},Ch],[M]:ue},{[B]:PA,[ce]:Ir,[M]:ue},{[B]:NA,[ce]:Ir,[M]:ue},{[B]:zA,[ce]:Ir,[M]:ue},{[B]:LA,[ce]:Ir,[M]:ue},{[B]:BA,[ce]:Ir,[M]:ue},Ch],[M]:ue}],[M]:ue},rA],[M]:ue},{[B]:[Yu,{[ee]:kt,[te]:$A,[We]:GT},{[ee]:pt,[te]:[{[ke]:GT},"--xa-s3"]}],[ce]:[nA,sA,{[B]:X0,[ce]:[{[B]:Js,[ce]:[{[B]:kA,[ce]:[{[B]:UA,[ce]:Ar,[M]:ue},{[B]:jA,[ce]:Ar,[M]:ue},{[B]:HA,[ce]:Ar,[M]:ue},{[B]:FA,[ce]:Ar,[M]:ue},{[B]:VA,[ce]:Ar,[M]:ue},Ch],[M]:ue},{[B]:UA,[ce]:Ir,[M]:ue},{[B]:jA,[ce]:Ir,[M]:ue},{[B]:HA,[ce]:Ir,[M]:ue},{[B]:FA,[ce]:Ir,[M]:ue},{[B]:VA,[ce]:Ir,[M]:ue},Ch],[M]:ue}],[M]:ue},rA],[M]:ue},{[B]:[aA,oA,iA],[ce]:[{[B]:Js,[ce]:[{[B]:Uc,endpoint:{[Ee]:$h,[xe]:Os,[Re]:Ve},[M]:me},{[B]:W0,endpoint:{[Ee]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:Ve},[M]:me},{[B]:Xu,endpoint:{[Ee]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:Ve},[M]:me},{[B]:Wu,endpoint:{[Ee]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:Ve},[M]:me},{[B]:Ju,endpoint:{[Ee]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",[xe]:Os,[Re]:Ve},[M]:me}],[M]:ue}],[M]:ue},{[B]:[Yu,{[ee]:kt,[te]:[dt,49,50,Tr],[We]:aN},{[ee]:kt,[te]:[dt,8,12,Tr],[We]:cN},{[ee]:kt,[te]:$A,[We]:KT},{[ee]:kt,[te]:[dt,32,49,Tr],[We]:Hb},{[ee]:Sp,[te]:Q0,[We]:"regionPartition"},{[ee]:pt,[te]:[{[ke]:KT},"--op-s3"]}],[ce]:[{[B]:qA,[ce]:[{[B]:X0,[ce]:[{[B]:[{[ee]:pt,[te]:[cA,"e"]}],[ce]:[{[B]:GA,[ce]:[lA,{[B]:Uc,endpoint:{[Ee]:"https://{Bucket}.ec2.{url#authority}",[xe]:Th,[Re]:Ve},[M]:me}],[M]:ue},{endpoint:{[Ee]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[xe]:Th,[Re]:Ve},[M]:me}],[M]:ue},{[B]:[{[ee]:pt,[te]:[cA,"o"]}],[ce]:[{[B]:GA,[ce]:[lA,{[B]:Uc,endpoint:{[Ee]:"https://{Bucket}.op-{outpostId}.{url#authority}",[xe]:Th,[Re]:Ve},[M]:me}],[M]:ue},{endpoint:{[Ee]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[xe]:Th,[Re]:Ve},[M]:me}],[M]:ue},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[M]:Ae}],[M]:ue},{error:"Invalid Outposts Bucket alias - it must be a valid bucket name.",[M]:Ae}],[M]:ue},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[M]:Ae}],[M]:ue},{[B]:dde,[ce]:[{[B]:[tn,{[ee]:Nr,[te]:[{[ee]:ks,[te]:[{[ee]:YS,[te]:lde}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[M]:Ae},{[B]:[z0,vN],[ce]:[{[B]:Js,[ce]:[{[B]:KA,[ce]:[{[B]:[tr,tA],error:"S3 Accelerate cannot be used in this region",[M]:Ae},{[B]:[Ot,Nt,dn,Ke,wn],endpoint:{[Ee]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[Ot,Nt,dn,Ke,lt,An],[ce]:[{endpoint:uA,[M]:me}],[M]:ue},{[B]:[Ot,Nt,dn,Ke,lt,In],endpoint:uA,[M]:me},{[B]:[rt,Nt,dn,Ke,wn],endpoint:{[Ee]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[rt,Nt,dn,Ke,lt,An],[ce]:[{endpoint:fA,[M]:me}],[M]:ue},{[B]:[rt,Nt,dn,Ke,lt,In],endpoint:fA,[M]:me},{[B]:[Ot,et,tr,Ke,wn],endpoint:{[Ee]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[Ot,et,tr,Ke,lt,An],[ce]:[{endpoint:dA,[M]:me}],[M]:ue},{[B]:[Ot,et,tr,Ke,lt,In],endpoint:dA,[M]:me},{[B]:[Ot,et,dn,Ke,wn],endpoint:{[Ee]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[Ot,et,dn,Ke,lt,An],[ce]:[{endpoint:hA,[M]:me}],[M]:ue},{[B]:[Ot,et,dn,Ke,lt,In],endpoint:hA,[M]:me},{[B]:[rt,et,dn,tn,ss,N0,wn],endpoint:{[Ee]:lN,[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[rt,et,dn,tn,ss,L0,wn],endpoint:{[Ee]:wp,[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[rt,et,dn,tn,ss,N0,lt,An],[ce]:[{[B]:gi,endpoint:B0,[M]:me},{endpoint:B0,[M]:me}],[M]:ue},{[B]:[rt,et,dn,tn,ss,L0,lt,An],[ce]:[{[B]:gi,endpoint:Fb,[M]:me},pA],[M]:ue},{[B]:[rt,et,dn,tn,ss,N0,lt,In],endpoint:B0,[M]:me},{[B]:[rt,et,dn,tn,ss,L0,lt,In],endpoint:Fb,[M]:me},{[B]:[rt,et,tr,Ke,wn],endpoint:{[Ee]:uN,[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[rt,et,tr,Ke,lt,An],[ce]:[{[B]:gi,endpoint:$0,[M]:me},{endpoint:$0,[M]:me}],[M]:ue},{[B]:[rt,et,tr,Ke,lt,In],endpoint:$0,[M]:me},{[B]:[rt,et,dn,Ke,wn],endpoint:{[Ee]:ZT,[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[rt,et,dn,Ke,lt,An],[ce]:[{[B]:gi,endpoint:{[Ee]:ZT,[xe]:yn,[Re]:Ve},[M]:me},{endpoint:mA,[M]:me}],[M]:ue},{[B]:[rt,et,dn,Ke,lt,In],endpoint:mA,[M]:me}],[M]:ue},Ah],[M]:ue}],[M]:ue},{[B]:[tn,ss,{[ee]:pt,[te]:[{[ee]:Vt,[te]:[yN,"scheme"]},"http"]},{[ee]:_p,[te]:[dt,Tr]},z0,et,rt,dn],[ce]:[{[B]:Js,[ce]:[{[B]:KA,[ce]:[pA],[M]:ue},Ah],[M]:ue}],[M]:ue},{[B]:[z0,{[ee]:fN,[te]:ude,[We]:dN}],[ce]:[{[B]:[{[ee]:Vt,[te]:[gs,"resourceId[0]"],[We]:hN},{[ee]:Nr,[te]:[{[ee]:pt,[te]:[SN,Ep]}]}],[ce]:[{[B]:[{[ee]:pt,[te]:[U0,WS]}],[ce]:[{[B]:J0,[ce]:[{[B]:ZA,[ce]:[gA,yA,{[B]:eb,[ce]:[bA,{[B]:YA,[ce]:[j0,{[B]:tb,[ce]:[{[B]:Js,[ce]:[{[B]:XA,[ce]:[{[B]:nb,[ce]:[{[B]:[{[ee]:pt,[te]:[wN,Ep]}],error:"Invalid ARN: Missing account id",[M]:Ae},{[B]:sb,[ce]:[{[B]:WA,[ce]:[{[B]:Uc,endpoint:{[Ee]:QT,[xe]:H0,[Re]:Ve},[M]:me},{[B]:Ih,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:H0,[Re]:Ve},[M]:me},{endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:H0,[Re]:Ve},[M]:me}],[M]:ue},vA],[M]:ue},F0],[M]:ue},V0],[M]:ue},q0],[M]:ue}],[M]:ue}],[M]:ue},SA],[M]:ue},{error:"Invalid ARN: bucket ARN is missing a region",[M]:Ae}],[M]:ue},_A],[M]:ue},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[M]:Ae}],[M]:ue},{[B]:J0,[ce]:[{[B]:ZA,[ce]:[{[B]:eb,[ce]:[{[B]:J0,[ce]:[{[B]:eb,[ce]:[bA,{[B]:YA,[ce]:[j0,{[B]:tb,[ce]:[{[B]:Js,[ce]:[{[B]:[{[ee]:pt,[te]:[_N,"{partitionResult#name}"]}],[ce]:[{[B]:nb,[ce]:[{[B]:[{[ee]:pt,[te]:[U0,il]}],[ce]:[{[B]:sb,[ce]:[{[B]:WA,[ce]:[{[B]:Y0,error:"Access Points do not support S3 Accelerate",[M]:Ae},{[B]:W0,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:Bu,[Re]:Ve},[M]:me},{[B]:Xu,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:Bu,[Re]:Ve},[M]:me},{[B]:Wu,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:Bu,[Re]:Ve},[M]:me},{[B]:[et,rt,tn,ss],endpoint:{[Ee]:QT,[xe]:Bu,[Re]:Ve},[M]:me},{[B]:Ju,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:Bu,[Re]:Ve},[M]:me}],[M]:ue},vA],[M]:ue},F0],[M]:ue},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[M]:Ae}],[M]:ue},V0],[M]:ue},q0],[M]:ue}],[M]:ue}],[M]:ue},SA],[M]:ue}],[M]:ue}],[M]:ue},{[B]:[{[ee]:Za,[te]:[e_,Tr]}],[ce]:[{[B]:QA,error:"S3 MRAP does not support dual-stack",[M]:Ae},{[B]:Ih,error:"S3 MRAP does not support FIPS",[M]:Ae},{[B]:Y0,error:"S3 MRAP does not support S3 Accelerate",[M]:Ae},{[B]:[{[ee]:sn,[te]:[{[ke]:"DisableMultiRegionAccessPoints"},Tr]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[M]:Ae},{[B]:[{[ee]:Sp,[te]:Q0,[We]:YT}],[ce]:[{[B]:[{[ee]:pt,[te]:[{[ee]:Vt,[te]:[{[ke]:YT},Gt]},{[ee]:Vt,[te]:[gs,"partition"]}]}],[ce]:[{endpoint:{[Ee]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[xe]:{[On]:[{[pn]:Tr,name:XS,[mn]:il,[QS]:hde}]},[Re]:Ve},[M]:me}],[M]:ue},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[M]:Ae}],[M]:ue}],[M]:ue},{error:"Invalid Access Point Name",[M]:Ae}],[M]:ue},_A],[M]:ue},{[B]:[{[ee]:pt,[te]:[U0,bf]}],[ce]:[{[B]:QA,error:"S3 Outposts does not support Dual-stack",[M]:Ae},{[B]:Ih,error:"S3 Outposts does not support FIPS",[M]:Ae},{[B]:Y0,error:"S3 Outposts does not support S3 Accelerate",[M]:Ae},{[B]:[{[ee]:ks,[te]:[{[ee]:Vt,[te]:[gs,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[M]:Ae},{[B]:[{[ee]:Vt,[te]:pde,[We]:Hb}],[ce]:[{[B]:qA,[ce]:[j0,{[B]:tb,[ce]:[{[B]:Js,[ce]:[{[B]:XA,[ce]:[{[B]:nb,[ce]:[{[B]:sb,[ce]:[{[B]:[{[ee]:Vt,[te]:mde,[We]:XT}],[ce]:[{[B]:[{[ee]:Vt,[te]:[gs,"resourceId[3]"],[We]:JS}],[ce]:[{[B]:[{[ee]:pt,[te]:[{[ke]:XT},pN]}],[ce]:[{[B]:Uc,endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[xe]:wA,[Re]:Ve},[M]:me},{endpoint:{[Ee]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[xe]:wA,[Re]:Ve},[M]:me}],[M]:ue},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[M]:Ae}],[M]:ue},{error:"Invalid ARN: expected an access point name",[M]:Ae}],[M]:ue},{error:"Invalid ARN: Expected a 4-component resource",[M]:Ae}],[M]:ue},F0],[M]:ue},V0],[M]:ue},q0],[M]:ue}],[M]:ue}],[M]:ue},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[M]:Ae}],[M]:ue},{error:"Invalid ARN: The Outpost Id was not set",[M]:Ae}],[M]:ue},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[M]:Ae}],[M]:ue},{error:"Invalid ARN: No ARN type specified",[M]:Ae}],[M]:ue},{[B]:[{[ee]:kt,[te]:[dt,0,4,ade],[We]:WT},{[ee]:pt,[te]:[{[ke]:WT},"arn:"]},{[ee]:Nr,[te]:[{[ee]:ks,[te]:[EA]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[M]:Ae},{[B]:[{[ee]:sn,[te]:[cde,Tr]},EA],error:"Path-style addressing cannot be used with ARN buckets",[M]:Ae},{[B]:fde,[ce]:[{[B]:Js,[ce]:[{[B]:[dn],[ce]:[{[B]:[Ot,Ke,Nt,wn],endpoint:{[Ee]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[Ot,Ke,Nt,lt,An],[ce]:[{endpoint:xA,[M]:me}],[M]:ue},{[B]:[Ot,Ke,Nt,lt,In],endpoint:xA,[M]:me},{[B]:[rt,Ke,Nt,wn],endpoint:{[Ee]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[rt,Ke,Nt,lt,An],[ce]:[{endpoint:RA,[M]:me}],[M]:ue},{[B]:[rt,Ke,Nt,lt,In],endpoint:RA,[M]:me},{[B]:[Ot,Ke,et,wn],endpoint:{[Ee]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[Ot,Ke,et,lt,An],[ce]:[{endpoint:CA,[M]:me}],[M]:ue},{[B]:[Ot,Ke,et,lt,In],endpoint:CA,[M]:me},{[B]:[rt,tn,ss,et,wn],endpoint:{[Ee]:mN,[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[rt,tn,ss,et,lt,An],[ce]:[{[B]:gi,endpoint:G0,[M]:me},{endpoint:G0,[M]:me}],[M]:ue},{[B]:[rt,tn,ss,et,lt,In],endpoint:G0,[M]:me},{[B]:[rt,Ke,et,wn],endpoint:{[Ee]:JT,[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[rt,Ke,et,lt,An],[ce]:[{[B]:gi,endpoint:{[Ee]:JT,[xe]:yn,[Re]:Ve},[M]:me},{endpoint:TA,[M]:me}],[M]:ue},{[B]:[rt,Ke,et,lt,In],endpoint:TA,[M]:me}],[M]:ue},{error:"Path-style addressing cannot be used with S3 Accelerate",[M]:Ae}],[M]:ue}],[M]:ue}],[M]:ue},{[B]:[{[ee]:ks,[te]:[AA]},{[ee]:sn,[te]:[AA,Tr]}],[ce]:[{[B]:Js,[ce]:[{[B]:JA,[ce]:[gA,yA,{[B]:Uc,endpoint:{[Ee]:$h,[xe]:K0,[Re]:Ve},[M]:me},{[B]:Ih,endpoint:{[Ee]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[xe]:K0,[Re]:Ve},[M]:me},{endpoint:{[Ee]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[xe]:K0,[Re]:Ve},[M]:me}],[M]:ue},Ah],[M]:ue}],[M]:ue},{[B]:[aA],[ce]:[{[B]:Js,[ce]:[{[B]:JA,[ce]:[{[B]:[Nt,Ot,Ke,wn],endpoint:{[Ee]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[Nt,Ot,Ke,lt,An],[ce]:[{endpoint:IA,[M]:me}],[M]:ue},{[B]:[Nt,Ot,Ke,lt,In],endpoint:IA,[M]:me},{[B]:[Nt,rt,Ke,wn],endpoint:{[Ee]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[Nt,rt,Ke,lt,An],[ce]:[{endpoint:OA,[M]:me}],[M]:ue},{[B]:[Nt,rt,Ke,lt,In],endpoint:OA,[M]:me},{[B]:[et,Ot,Ke,wn],endpoint:{[Ee]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[et,Ot,Ke,lt,An],[ce]:[{endpoint:MA,[M]:me}],[M]:ue},{[B]:[et,Ot,Ke,lt,In],endpoint:MA,[M]:me},{[B]:[et,rt,tn,ss,wn],endpoint:{[Ee]:$h,[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[et,rt,tn,ss,lt,An],[ce]:[{[B]:gi,endpoint:Z0,[M]:me},{endpoint:Z0,[M]:me}],[M]:ue},{[B]:[et,rt,tn,ss,lt,In],endpoint:Z0,[M]:me},{[B]:[et,rt,Ke,wn],endpoint:{[Ee]:eA,[xe]:Tn,[Re]:Ve},[M]:me},{[B]:[et,rt,Ke,lt,An],[ce]:[{[B]:gi,endpoint:{[Ee]:eA,[xe]:yn,[Re]:Ve},[M]:me},{endpoint:DA,[M]:me}],[M]:ue},{[B]:[et,rt,Ke,lt,In],endpoint:DA,[M]:me}],[M]:ue},Ah],[M]:ue}],[M]:ue}],[M]:ue},{error:"A region must be set when sending requests to S3.",[M]:Ae}]},yde=gde,bde=new OM({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),EN=(e,t={})=>bde.get(e,()=>jM(yde,{endpointParams:e,logger:t.logger}));hf.aws=Nv;const vde=e=>async(t,n,r)=>{if(!r)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");const i=await e(t,n,r),c=Eo(n)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!c)throw new Error(`getEndpointParameterInstructions() is not defined on '${n.commandName}'`);const l=await mD(r,{getEndpointParameterInstructions:c},t);return Object.assign(i,l)},Sde=async(e,t,n)=>({operation:Eo(t).operation,region:await Ns(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),_de=vde(Sde);function xN(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function RN(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}const wde=(e,t,n)=>i=>{const l=e(i).properties?.authSchemes;if(!l)return t(i);const f=[];for(const d of l){const{name:h,properties:y={},...g}=d,b=h.toLowerCase();h!==b&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${h}' to '${b}'`);let v;if(b==="sigv4a"){v="aws.auth#sigv4a";const R=l.find(C=>{const A=C.name.toLowerCase();return A!=="sigv4a"&&A.startsWith("sigv4")});if(iN.sigv4aDependency()==="none"&&R)continue}else if(b.startsWith("sigv4"))v="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${b}'`);const _=n[v];if(!_)throw new Error(`Could not find HttpAuthOption create function for '${v}'`);const x=_(i);x.schemeId=v,x.signingProperties={...x.signingProperties||{},...g,...y},f.push(x)}return f},Ede=e=>{const t=[];switch(e.operation){default:t.push(xN(e)),t.push(RN(e))}return t},xde=wde(EN,Ede,{"aws.auth#sigv4":xN,"aws.auth#sigv4a":RN}),Rde=e=>{const t=XM(e),n=JK(t);return Object.assign(n,{authSchemePreference:Ns(e.authSchemePreference??[])})},Cde=e=>Object.assign(e,{useFipsEndpoint:e.useFipsEndpoint??!1,useDualstackEndpoint:e.useDualstackEndpoint??!1,forcePathStyle:e.forcePathStyle??!1,useAccelerateEndpoint:e.useAccelerateEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,disableMultiregionAccessPoints:e.disableMultiregionAccessPoints??!1,defaultSigningName:"s3",clientContextParams:e.clientContextParams??{}}),t_={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},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"}};class Vn extends Ea{constructor(t){super(t),Object.setPrototypeOf(this,Vn.prototype)}}class n_ extends Vn{name="NoSuchUpload";$fault="client";constructor(t){super({name:"NoSuchUpload",$fault:"client",...t}),Object.setPrototypeOf(this,n_.prototype)}}class s_ extends Vn{name="ObjectNotInActiveTierError";$fault="client";constructor(t){super({name:"ObjectNotInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,s_.prototype)}}class r_ extends Vn{name="BucketAlreadyExists";$fault="client";constructor(t){super({name:"BucketAlreadyExists",$fault:"client",...t}),Object.setPrototypeOf(this,r_.prototype)}}class o_ extends Vn{name="BucketAlreadyOwnedByYou";$fault="client";constructor(t){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...t}),Object.setPrototypeOf(this,o_.prototype)}}class i_ extends Vn{name="NoSuchBucket";$fault="client";constructor(t){super({name:"NoSuchBucket",$fault:"client",...t}),Object.setPrototypeOf(this,i_.prototype)}}class a_ extends Vn{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(t){super({name:"InvalidObjectState",$fault:"client",...t}),Object.setPrototypeOf(this,a_.prototype),this.StorageClass=t.StorageClass,this.AccessTier=t.AccessTier}}class c_ extends Vn{name="NoSuchKey";$fault="client";constructor(t){super({name:"NoSuchKey",$fault:"client",...t}),Object.setPrototypeOf(this,c_.prototype)}}class l_ extends Vn{name="NotFound";$fault="client";constructor(t){super({name:"NotFound",$fault:"client",...t}),Object.setPrototypeOf(this,l_.prototype)}}class u_ extends Vn{name="EncryptionTypeMismatch";$fault="client";constructor(t){super({name:"EncryptionTypeMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,u_.prototype)}}class f_ extends Vn{name="InvalidRequest";$fault="client";constructor(t){super({name:"InvalidRequest",$fault:"client",...t}),Object.setPrototypeOf(this,f_.prototype)}}class d_ extends Vn{name="InvalidWriteOffset";$fault="client";constructor(t){super({name:"InvalidWriteOffset",$fault:"client",...t}),Object.setPrototypeOf(this,d_.prototype)}}class h_ extends Vn{name="TooManyParts";$fault="client";constructor(t){super({name:"TooManyParts",$fault:"client",...t}),Object.setPrototypeOf(this,h_.prototype)}}class p_ extends Vn{name="IdempotencyParameterMismatch";$fault="client";constructor(t){super({name:"IdempotencyParameterMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,p_.prototype)}}class m_ extends Vn{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(t){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,m_.prototype)}}const g_="ACL",Tde="AbortDate",eI="AccessKeyId",Ade="AbortMultipartUpload",Ide="AbortMultipartUploadOutput",Ode="AbortMultipartUploadRequest",Mde="AcceptRanges",Dde="AbortRuleId",kde="AccessTier",Hn="Bucket",CN="BucketArn",Pde="BucketAlreadyExists",Nde="BucketAlreadyOwnedByYou",zde="BypassGovernanceRetention",Lde="BucketInfo",To="BucketKeyEnabled",TN="BucketRegion",y_="Body",AN="Buckets",Cl="ChecksumAlgorithm",Bde="CreateBucket",Vb="CreateBucketConfiguration",$de="CreateBucketOutput",Ude="CreateBucketRequest",b_="CacheControl",Fi="ChecksumCRC32",Vi="ChecksumCRC32C",qi="ChecksumCRC64NVME",v_="Cache-Control",jde="CreationDate",S_="Content-Disposition",__="ContentDisposition",w_="Content-Encoding",E_="ContentEncoding",x_="ContentLanguage",R_="Content-Language",C_="Content-Length",T_="ContentLength",A_="Content-MD5",I_="ContentMD5",Hde="CompletedMultipartUpload",Fde="CompleteMultipartUploadOutput",Vde="CreateMultipartUploadOutput",qde="CompleteMultipartUploadResult",Gde="CompleteMultipartUploadRequest",Kde="CreateMultipartUploadRequest",IN="CompleteMultipartUpload",Zde="CreateMultipartUpload",Qde="ChecksumMode",Yde="CommonPrefix",Xde="CommonPrefixList",Wde="CompletedPartList",Jde="CompletedPart",ehe="CommonPrefixes",the="ContentRange",nhe="Content-Range",Gi="ChecksumSHA1",Ki="ChecksumSHA256",she="CreateSessionOutput",rhe="CreateSessionResult",ohe="CreateSessionRequest",ihe="CreateSession",Qa="ChecksumType",O_="Content-Type",M_="ContentType",Sm="ContinuationToken",ahe="Contents",tI="Credentials",ON="DeleteMarker",che="DisplayName",lhe="DeleteObjectOutput",uhe="DeleteObjectRequest",fhe="DeleteObject",dhe="DataRedundancy",MN="Delimiter",vf="Expiration",Ao="ExpectedBucketOwner",nI="ExpiresString",hhe="EncryptionTypeMismatch",_o="ETag",DN="EncodingType",al="Expires",phe="FetchOwner",D_="GrantFullControl",mhe="GetObject",ghe="GetObjectOutput",yhe="GetObjectRequest",k_="GrantRead",P_="GrantReadACP",bhe="GrantWrite",N_="GrantWriteACP",vhe="ID",_m="IfMatch",She="IfMatchInitiatedTime",_he="IfMatchLastModifiedTime",whe="IfMatchSize",Ehe="If-Modified-Since",xhe="IfModifiedSince",Rhe="InitiateMultipartUploadResult",wm="If-Match",z_="IfNoneMatch",L_="If-None-Match",Che="InvalidObjectState",The="IdempotencyParameterMismatch",Ahe="InvalidRequest",Ihe="IsRestoreInProgress",Ohe="IsTruncated",Mhe="IfUnmodifiedSince",Dhe="If-Unmodified-Since",khe="InvalidWriteOffset",ur="Key",Phe="KeyCount",xp="Location",Nhe="ListAllMyBucketsResult",zhe="ListBuckets",Lhe="ListBucketsOutput",Bhe="ListBucketsRequest",$he="ListBucketResult",Uhe="LocationConstraint",jhe="LocationInfo",kN="LastModified",Hhe="Last-Modified",Fhe="ListObjectsV2",Vhe="ListObjectsV2Output",qhe="ListObjectsV2Request",B_="Metadata",Ghe="MaxBuckets",Khe="MFA",PN="MaxKeys",Zhe="MissingMeta",Qhe="MpuObjectSize",Yhe="MultipartUpload",$_="Name",Xhe="NextContinuationToken",Whe="NotFound",Jhe="NoSuchBucket",epe="NoSuchKey",tpe="NoSuchUpload",U_="Owner",npe="ObjectAlreadyInActiveTierError",spe="ObjectLockEnabledForBucket",j_="ObjectLockLegalHoldStatus",H_="ObjectLockMode",F_="ObjectLockRetainUntilDate",rpe="ObjectList",ope="ObjectNotInActiveTierError",ipe="ObjectOwnership",ape="OptionalObjectAttributes",cpe="Object",Lf="Prefix",lpe="PartsCount",V_="PartNumber",upe="PutObject",fpe="PutObjectOutput",dpe="PutObjectRequest",hpe="PutObjectTagging",ppe="PutObjectTaggingOutput",mpe="PutObjectTaggingRequest",gpe="Parts",ype="Part",Zi="RequestCharged",bpe="ResponseCacheControl",vpe="ResponseContentDisposition",Spe="ResponseContentEncoding",_pe="ResponseContentLanguage",wpe="ResponseContentType",Epe="ResponseExpires",xpe="RestoreExpiryDate",Io="RequestPayer",Rpe="ReplicationStatus",NN="RestoreStatus",sI="Range",Cpe="Restore",zN="StartAfter",rI="SecretAccessKey",Tpe="StreamingBlob",Bf="StorageClass",Ape="SessionCredentialValue",Ipe="SessionCredentials",Ope="SessionMode",Oo="ServerSideEncryption",Mo="SSECustomerAlgorithm",Tl="SSECustomerKey",Do="SSECustomerKeyMD5",Ya="SSEKMSEncryptionContext",jr="SSEKMSKeyId",oI="SessionToken",LN="Size",Mpe="Tags",Dpe="TagCount",kpe="TooManyParts",BN="TagSet",$N="Tag",Sf="Tagging",UN="Type",Em="UploadId",Ppe="UploadPart",Npe="UploadPartOutput",zpe="UploadPartRequest",Lpe="Value",Qi="VersionId",Bpe="WriteOffsetBytes",q_="WebsiteRedirectLocation",$pe="accept-ranges",Upe="bucket-region",vs="client",jN="continuation-token",jpe="delimiter",Ss="error",Hpe="encoding-type",Fpe="fetch-owner",fr="http",xm="httpChecksum",Bs="httpError",z="httpHeader",G_="httpPayload",K_="httpPrefixHeaders",Bt="httpQuery",Vpe="max-buckets",qpe="max-keys",HN="prefix",FN="partNumber",Gpe="response-cache-control",Kpe="response-content-disposition",Zpe="response-content-encoding",Qpe="response-content-language",Ype="response-content-type",Xpe="response-expires",Wpe="streaming",Jpe="start-after",VN="smithy.ts.sdk.synthetic.com.amazonaws.s3",Z_="uploadId",Q_="versionId",Rp="xmlFlattened",Un="xmlName",Y_="x-amz-acl",eme="x-amz-abort-date",tme="x-amz-abort-rule-id",nme="x-amz-bucket-arn",sme="x-amz-bypass-governance-retention",rme="x-amz-bucket-object-lock-enabled",qN="x-amz-checksum-algorithm",Al="x-amz-checksum-crc32",Il="x-amz-checksum-crc32c",Ol="x-amz-checksum-crc64nvme",ome="x-amz-checksum-mode",Ml="x-amz-checksum-sha1",Dl="x-amz-checksum-sha256",ime="x-amz-create-session-mode",$f="x-amz-checksum-type",GN="x-amz-delete-marker",X_="x-amz-expiration",ko="x-amz-expected-bucket-owner",W_="x-amz-grant-full-control",J_="x-amz-grant-read",ew="x-amz-grant-read-acp",ame="x-amz-grant-write",tw="x-amz-grant-write-acp",cme="x-amz-if-match-initiated-time",lme="x-amz-if-match-last-modified-time",ume="x-amz-if-match-size",nw="x-amz-meta-",fme="x-amz-mfa",dme="x-amz-missing-meta",hme="x-amz-mp-object-size",pme="x-amz-mp-parts-count",sw="x-amz-object-lock-legal-hold",rw="x-amz-object-lock-mode",ow="x-amz-object-lock-retain-until-date",mme="x-amz-object-ownership",gme="x-amz-optional-object-attributes",yme="x-amz-object-size",bme="x-amz-restore",Yi="x-amz-request-charged",Po="x-amz-request-payer",vme="x-amz-replication-status",iw="x-amz-storage-class",aw="x-amz-sdk-checksum-algorithm",No="x-amz-server-side-encryption",zo="x-amz-server-side-encryption-aws-kms-key-id",Lo="x-amz-server-side-encryption-bucket-key-enabled",kl="x-amz-server-side-encryption-context",Bo="x-amz-server-side-encryption-customer-algorithm",Uf="x-amz-server-side-encryption-customer-key",$o="x-amz-server-side-encryption-customer-key-MD5",KN="x-amz-tagging",Sme="x-amz-tagging-count",jf="x-amz-version-id",_me="x-amz-write-offset-bytes",cw="x-amz-website-redirect-location",Se="com.amazonaws.s3";var iI=[0,Se,Ape,8,0],Hf=[0,Se,Tl,8,0],Pl=[0,Se,Ya,8,0],Uo=[0,Se,jr,8,0],lw=[0,Se,Tpe,{[Wpe]:1},42],wme=[3,Se,Ide,0,[Zi],[[0,{[z]:Yi}]]],Eme=[3,Se,Ode,0,[Hn,ur,Em,Io,Ao,She],[[0,1],[0,1],[0,{[Bt]:Z_}],[0,{[z]:Po}],[0,{[z]:ko}],[6,{[z]:cme}]],3],xme=[3,Se,Hn,0,[$_,jde,TN,CN],[0,4,0,0]],Rme=[-3,Se,Pde,{[Ss]:vs,[Bs]:409},[],[]];Mt.for(Se).registerError(Rme,r_);var Cme=[-3,Se,Nde,{[Ss]:vs,[Bs]:409},[],[]];Mt.for(Se).registerError(Cme,o_);var Tme=[3,Se,Lde,0,[dhe,UN],[0,0]],Ame=[3,Se,Yde,0,[Lf],[0]],Ime=[3,Se,Hde,0,[gpe],[[()=>_ge,{[Rp]:1,[Un]:ype}]]],Ome=[3,Se,Jde,0,[_o,Fi,Vi,qi,Gi,Ki,V_],[0,0,0,0,0,0,1]],Mme=[3,Se,Fde,{[Un]:qde},[xp,Hn,ur,vf,_o,Fi,Vi,qi,Gi,Ki,Qa,Oo,Qi,jr,To,Zi],[0,0,0,[0,{[z]:X_}],0,0,0,0,0,0,0,[0,{[z]:No}],[0,{[z]:jf}],[()=>Uo,{[z]:zo}],[2,{[z]:Lo}],[0,{[z]:Yi}]]],Dme=[3,Se,Gde,0,[Hn,ur,Em,Yhe,Fi,Vi,qi,Gi,Ki,Qa,Qhe,Io,Ao,_m,z_,Mo,Tl,Do],[[0,1],[0,1],[0,{[Bt]:Z_}],[()=>Ime,{[G_]:1,[Un]:IN}],[0,{[z]:Al}],[0,{[z]:Il}],[0,{[z]:Ol}],[0,{[z]:Ml}],[0,{[z]:Dl}],[0,{[z]:$f}],[1,{[z]:hme}],[0,{[z]:Po}],[0,{[z]:ko}],[0,{[z]:wm}],[0,{[z]:L_}],[0,{[z]:Bo}],[()=>Hf,{[z]:Uf}],[0,{[z]:$o}]],3],kme=[3,Se,Vb,0,[Uhe,xp,Hn,Mpe],[0,()=>Jme,()=>Tme,[()=>QN,0]]],Pme=[3,Se,$de,0,[xp,CN],[[0,{[z]:xp}],[0,{[z]:nme}]]],Nme=[3,Se,Ude,0,[Hn,g_,Vb,D_,k_,P_,bhe,N_,spe,ipe],[[0,1],[0,{[z]:Y_}],[()=>kme,{[G_]:1,[Un]:Vb}],[0,{[z]:W_}],[0,{[z]:J_}],[0,{[z]:ew}],[0,{[z]:ame}],[0,{[z]:tw}],[2,{[z]:rme}],[0,{[z]:mme}]],1],zme=[3,Se,Vde,{[Un]:Rhe},[Tde,Dde,Hn,ur,Em,Oo,Mo,Do,jr,Ya,To,Zi,Cl,Qa],[[4,{[z]:eme}],[0,{[z]:tme}],[0,{[Un]:Hn}],0,0,[0,{[z]:No}],[0,{[z]:Bo}],[0,{[z]:$o}],[()=>Uo,{[z]:zo}],[()=>Pl,{[z]:kl}],[2,{[z]:Lo}],[0,{[z]:Yi}],[0,{[z]:qN}],[0,{[z]:$f}]]],Lme=[3,Se,Kde,0,[Hn,ur,g_,b_,__,E_,x_,M_,al,D_,k_,P_,N_,B_,Oo,Bf,q_,Mo,Tl,Do,jr,Ya,To,Io,Sf,H_,F_,j_,Ao,Cl,Qa],[[0,1],[0,1],[0,{[z]:Y_}],[0,{[z]:v_}],[0,{[z]:S_}],[0,{[z]:w_}],[0,{[z]:R_}],[0,{[z]:O_}],[4,{[z]:al}],[0,{[z]:W_}],[0,{[z]:J_}],[0,{[z]:ew}],[0,{[z]:tw}],[128,{[K_]:nw}],[0,{[z]:No}],[0,{[z]:iw}],[0,{[z]:cw}],[0,{[z]:Bo}],[()=>Hf,{[z]:Uf}],[0,{[z]:$o}],[()=>Uo,{[z]:zo}],[()=>Pl,{[z]:kl}],[2,{[z]:Lo}],[0,{[z]:Po}],[0,{[z]:KN}],[0,{[z]:rw}],[5,{[z]:ow}],[0,{[z]:sw}],[0,{[z]:ko}],[0,{[z]:qN}],[0,{[z]:$f}]],2],Bme=[3,Se,she,{[Un]:rhe},[tI,Oo,jr,Ya,To],[[()=>dge,{[Un]:tI}],[0,{[z]:No}],[()=>Uo,{[z]:zo}],[()=>Pl,{[z]:kl}],[2,{[z]:Lo}]],1],$me=[3,Se,ohe,0,[Hn,Ope,Oo,jr,Ya,To],[[0,1],[0,{[z]:ime}],[0,{[z]:No}],[()=>Uo,{[z]:zo}],[()=>Pl,{[z]:kl}],[2,{[z]:Lo}]],1],Ume=[3,Se,lhe,0,[ON,Qi,Zi],[[2,{[z]:GN}],[0,{[z]:jf}],[0,{[z]:Yi}]]],jme=[3,Se,uhe,0,[Hn,ur,Khe,Qi,Io,zde,Ao,_m,_he,whe],[[0,1],[0,1],[0,{[z]:fme}],[0,{[Bt]:Q_}],[0,{[z]:Po}],[2,{[z]:sme}],[0,{[z]:ko}],[0,{[z]:wm}],[6,{[z]:lme}],[1,{[z]:ume}]],2],Hme=[-3,Se,hhe,{[Ss]:vs,[Bs]:400},[],[]];Mt.for(Se).registerError(Hme,u_);var Fme=[3,Se,ghe,0,[y_,ON,Mde,vf,Cpe,kN,T_,_o,Fi,Vi,qi,Gi,Ki,Qa,Zhe,Qi,b_,__,E_,x_,the,M_,al,nI,q_,Oo,B_,Mo,Do,jr,To,Bf,Zi,Rpe,lpe,Dpe,H_,F_,j_],[[()=>lw,16],[2,{[z]:GN}],[0,{[z]:$pe}],[0,{[z]:X_}],[0,{[z]:bme}],[4,{[z]:Hhe}],[1,{[z]:C_}],[0,{[z]:_o}],[0,{[z]:Al}],[0,{[z]:Il}],[0,{[z]:Ol}],[0,{[z]:Ml}],[0,{[z]:Dl}],[0,{[z]:$f}],[1,{[z]:dme}],[0,{[z]:jf}],[0,{[z]:v_}],[0,{[z]:S_}],[0,{[z]:w_}],[0,{[z]:R_}],[0,{[z]:nhe}],[0,{[z]:O_}],[4,{[z]:al}],[0,{[z]:nI}],[0,{[z]:cw}],[0,{[z]:No}],[128,{[K_]:nw}],[0,{[z]:Bo}],[0,{[z]:$o}],[()=>Uo,{[z]:zo}],[2,{[z]:Lo}],[0,{[z]:iw}],[0,{[z]:Yi}],[0,{[z]:vme}],[1,{[z]:pme}],[1,{[z]:Sme}],[0,{[z]:rw}],[5,{[z]:ow}],[0,{[z]:sw}]]],Vme=[3,Se,yhe,0,[Hn,ur,_m,xhe,z_,Mhe,sI,bpe,vpe,Spe,_pe,wpe,Epe,Qi,Mo,Tl,Do,Io,V_,Ao,Qde],[[0,1],[0,1],[0,{[z]:wm}],[4,{[z]:Ehe}],[0,{[z]:L_}],[4,{[z]:Dhe}],[0,{[z]:sI}],[0,{[Bt]:Gpe}],[0,{[Bt]:Kpe}],[0,{[Bt]:Zpe}],[0,{[Bt]:Qpe}],[0,{[Bt]:Ype}],[6,{[Bt]:Xpe}],[0,{[Bt]:Q_}],[0,{[z]:Bo}],[()=>Hf,{[z]:Uf}],[0,{[z]:$o}],[0,{[z]:Po}],[1,{[Bt]:FN}],[0,{[z]:ko}],[0,{[z]:ome}]],2],qme=[-3,Se,The,{[Ss]:vs,[Bs]:400},[],[]];Mt.for(Se).registerError(qme,p_);var Gme=[-3,Se,Che,{[Ss]:vs,[Bs]:403},[Bf,kde],[0,0]];Mt.for(Se).registerError(Gme,a_);var Kme=[-3,Se,Ahe,{[Ss]:vs,[Bs]:400},[],[]];Mt.for(Se).registerError(Kme,f_);var Zme=[-3,Se,khe,{[Ss]:vs,[Bs]:400},[],[]];Mt.for(Se).registerError(Zme,d_);var Qme=[3,Se,Lhe,{[Un]:Nhe},[AN,U_,Sm,Lf],[[()=>vge,0],()=>ZN,0,0]],Yme=[3,Se,Bhe,0,[Ghe,Sm,Lf,TN],[[1,{[Bt]:Vpe}],[0,{[Bt]:jN}],[0,{[Bt]:HN}],[0,{[Bt]:Upe}]]],Xme=[3,Se,Vhe,{[Un]:$he},[Ohe,ahe,$_,Lf,MN,PN,ehe,DN,Phe,Sm,Xhe,zN,Zi],[2,[()=>wge,{[Rp]:1}],0,0,0,1,[()=>Sge,{[Rp]:1}],0,1,0,0,0,[0,{[z]:Yi}]]],Wme=[3,Se,qhe,0,[Hn,MN,DN,PN,Lf,Sm,phe,zN,Io,Ao,ape],[[0,1],[0,{[Bt]:jpe}],[0,{[Bt]:Hpe}],[1,{[Bt]:qpe}],[0,{[Bt]:HN}],[0,{[Bt]:jN}],[2,{[Bt]:Fpe}],[0,{[Bt]:Jpe}],[0,{[z]:Po}],[0,{[z]:ko}],[64,{[z]:gme}]],1],Jme=[3,Se,jhe,0,[UN,$_],[0,0]],ege=[-3,Se,Jhe,{[Ss]:vs,[Bs]:404},[],[]];Mt.for(Se).registerError(ege,i_);var tge=[-3,Se,epe,{[Ss]:vs,[Bs]:404},[],[]];Mt.for(Se).registerError(tge,c_);var nge=[-3,Se,tpe,{[Ss]:vs,[Bs]:404},[],[]];Mt.for(Se).registerError(nge,n_);var sge=[-3,Se,Whe,{[Ss]:vs},[],[]];Mt.for(Se).registerError(sge,l_);var rge=[3,Se,cpe,0,[ur,kN,_o,Cl,Qa,LN,Bf,U_,NN],[0,4,0,[64,{[Rp]:1}],0,1,0,()=>ZN,()=>fge]],oge=[-3,Se,npe,{[Ss]:vs,[Bs]:403},[],[]];Mt.for(Se).registerError(oge,m_);var ige=[-3,Se,ope,{[Ss]:vs,[Bs]:403},[],[]];Mt.for(Se).registerError(ige,s_);var ZN=[3,Se,U_,0,[che,vhe],[0,0]],age=[3,Se,fpe,0,[vf,_o,Fi,Vi,qi,Gi,Ki,Qa,Oo,Qi,Mo,Do,jr,Ya,To,LN,Zi],[[0,{[z]:X_}],[0,{[z]:_o}],[0,{[z]:Al}],[0,{[z]:Il}],[0,{[z]:Ol}],[0,{[z]:Ml}],[0,{[z]:Dl}],[0,{[z]:$f}],[0,{[z]:No}],[0,{[z]:jf}],[0,{[z]:Bo}],[0,{[z]:$o}],[()=>Uo,{[z]:zo}],[()=>Pl,{[z]:kl}],[2,{[z]:Lo}],[1,{[z]:yme}],[0,{[z]:Yi}]]],cge=[3,Se,dpe,0,[Hn,ur,g_,y_,b_,__,E_,x_,T_,I_,M_,Cl,Fi,Vi,qi,Gi,Ki,al,_m,z_,D_,k_,P_,N_,Bpe,B_,Oo,Bf,q_,Mo,Tl,Do,jr,Ya,To,Io,Sf,H_,F_,j_,Ao],[[0,1],[0,1],[0,{[z]:Y_}],[()=>lw,16],[0,{[z]:v_}],[0,{[z]:S_}],[0,{[z]:w_}],[0,{[z]:R_}],[1,{[z]:C_}],[0,{[z]:A_}],[0,{[z]:O_}],[0,{[z]:aw}],[0,{[z]:Al}],[0,{[z]:Il}],[0,{[z]:Ol}],[0,{[z]:Ml}],[0,{[z]:Dl}],[4,{[z]:al}],[0,{[z]:wm}],[0,{[z]:L_}],[0,{[z]:W_}],[0,{[z]:J_}],[0,{[z]:ew}],[0,{[z]:tw}],[1,{[z]:_me}],[128,{[K_]:nw}],[0,{[z]:No}],[0,{[z]:iw}],[0,{[z]:cw}],[0,{[z]:Bo}],[()=>Hf,{[z]:Uf}],[0,{[z]:$o}],[()=>Uo,{[z]:zo}],[()=>Pl,{[z]:kl}],[2,{[z]:Lo}],[0,{[z]:Po}],[0,{[z]:KN}],[0,{[z]:rw}],[5,{[z]:ow}],[0,{[z]:sw}],[0,{[z]:ko}]],2],lge=[3,Se,ppe,0,[Qi],[[0,{[z]:jf}]]],uge=[3,Se,mpe,0,[Hn,ur,Sf,Qi,I_,Cl,Ao,Io],[[0,1],[0,1],[()=>pge,{[G_]:1,[Un]:Sf}],[0,{[Bt]:Q_}],[0,{[z]:A_}],[0,{[z]:aw}],[0,{[z]:ko}],[0,{[z]:Po}]],3],fge=[3,Se,NN,0,[Ihe,xpe],[2,4]],dge=[3,Se,Ipe,0,[eI,rI,oI,vf],[[0,{[Un]:eI}],[()=>iI,{[Un]:rI}],[()=>iI,{[Un]:oI}],[4,{[Un]:vf}]],4],hge=[3,Se,$N,0,[ur,Lpe],[0,0],2],pge=[3,Se,Sf,0,[BN],[[()=>QN,0]],1],mge=[-3,Se,kpe,{[Ss]:vs,[Bs]:400},[],[]];Mt.for(Se).registerError(mge,h_);var gge=[3,Se,Npe,0,[Oo,_o,Fi,Vi,qi,Gi,Ki,Mo,Do,jr,To,Zi],[[0,{[z]:No}],[0,{[z]:_o}],[0,{[z]:Al}],[0,{[z]:Il}],[0,{[z]:Ol}],[0,{[z]:Ml}],[0,{[z]:Dl}],[0,{[z]:Bo}],[0,{[z]:$o}],[()=>Uo,{[z]:zo}],[2,{[z]:Lo}],[0,{[z]:Yi}]]],yge=[3,Se,zpe,0,[Hn,ur,V_,Em,y_,T_,I_,Cl,Fi,Vi,qi,Gi,Ki,Mo,Tl,Do,Io,Ao],[[0,1],[0,1],[1,{[Bt]:FN}],[0,{[Bt]:Z_}],[()=>lw,16],[1,{[z]:C_}],[0,{[z]:A_}],[0,{[z]:aw}],[0,{[z]:Al}],[0,{[z]:Il}],[0,{[z]:Ol}],[0,{[z]:Ml}],[0,{[z]:Dl}],[0,{[z]:Bo}],[()=>Hf,{[z]:Uf}],[0,{[z]:$o}],[0,{[z]:Po}],[0,{[z]:ko}]],4],bge=[-3,VN,"S3ServiceException",0,[],[]];Mt.for(VN).registerError(bge,Vn);var vge=[1,Se,AN,0,[()=>xme,{[Un]:Hn}]],Sge=[1,Se,Xde,0,()=>Ame],_ge=[1,Se,Wde,0,()=>Ome],wge=[1,Se,rpe,0,[()=>rge,0]],QN=[1,Se,BN,0,[()=>hge,{[Un]:$N}]],Abe=[9,Se,Ade,{[fr]:["DELETE","/{Key+}?x-id=AbortMultipartUpload",204]},()=>Eme,()=>wme],Ibe=[9,Se,IN,{[fr]:["POST","/{Key+}",200]},()=>Dme,()=>Mme],Obe=[9,Se,Bde,{[fr]:["PUT","/",200]},()=>Nme,()=>Pme],Mbe=[9,Se,Zde,{[fr]:["POST","/{Key+}?uploads",200]},()=>Lme,()=>zme],Ege=[9,Se,ihe,{[fr]:["GET","/?session",200]},()=>$me,()=>Bme],Dbe=[9,Se,fhe,{[fr]:["DELETE","/{Key+}?x-id=DeleteObject",204]},()=>jme,()=>Ume],kbe=[9,Se,mhe,{[xm]:"-",[fr]:["GET","/{Key+}?x-id=GetObject",200]},()=>Vme,()=>Fme],xge=[9,Se,zhe,{[fr]:["GET","/?x-id=ListBuckets",200]},()=>Yme,()=>Qme],Rge=[9,Se,Fhe,{[fr]:["GET","/?list-type=2",200]},()=>Wme,()=>Xme],Pbe=[9,Se,upe,{[xm]:"-",[fr]:["PUT","/{Key+}?x-id=PutObject",200]},()=>cge,()=>age],Nbe=[9,Se,hpe,{[xm]:"-",[fr]:["PUT","/{Key+}?tagging",200]},()=>uge,()=>lge],zbe=[9,Se,Ppe,{[xm]:"-",[fr]:["PUT","/{Key+}?x-id=UploadPart",200]},()=>yge,()=>gge];class Cge extends $r.classBuilder().ep({...t_,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions()),KS(r)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").sc(Ege).build(){}const Tge="3.975.0",Age={version:Tge};function aI(e){return typeof e=="string"?e.length===0:e.byteLength===0}var YN={name:"SHA-1"},cI={name:"HMAC",hash:YN},Ige=new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]),Oge=(function(){function e(t){this.toHash=new Uint8Array(0),t!==void 0&&(this.key=new Promise(function(n,r){Ai().crypto.subtle.importKey("raw",lI(t),cI,!1,["sign"]).then(n,r)}),this.key.catch(function(){}))}return e.prototype.update=function(t){if(!aI(t)){var n=lI(t),r=new Uint8Array(this.toHash.byteLength+n.byteLength);r.set(this.toHash,0),r.set(n,this.toHash.byteLength),this.toHash=r}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(n){return Ai().crypto.subtle.sign(cI,n,t.toHash).then(function(r){return new Uint8Array(r)})}):aI(this.toHash)?Promise.resolve(Ige):Promise.resolve().then(function(){return Ai().crypto.subtle.digest(YN,t.toHash)}).then(function(n){return Promise.resolve(new Uint8Array(n))})},e.prototype.reset=function(){this.toHash=new Uint8Array(0)},e})();function lI(e){return typeof e=="string"?ED(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}var Mge=(function(){function e(t){if(TD(Ai()))this.hash=new Oge(t);else throw new Error("SHA1 not supported")}return e.prototype.update=function(t,n){this.hash.update(za(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();class ef{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,i=Math.abs(Math.round(t));r>-1&&i>0;r--,i/=256)n[r]=i;return t<0&&uI(n),new ef(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&uI(t),parseInt(ms(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function uI(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}class Dge{toUtf8;fromUtf8;constructor(t,n){this.toUtf8=t,this.fromUtf8=n}format(t){const n=[];for(const c of Object.keys(t)){const l=this.fromUtf8(c);n.push(Uint8Array.from([l.byteLength]),l,this.formatHeaderValue(t[c]))}const r=new Uint8Array(n.reduce((c,l)=>c+l.byteLength,0));let i=0;for(const c of n)r.set(c,i),i+=c.byteLength;return r}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,3),n.setInt16(1,t.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,t.value,!1),new Uint8Array(r.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":const c=new DataView(new ArrayBuffer(3+t.value.byteLength));c.setUint8(0,6),c.setUint16(1,t.value.byteLength,!1);const l=new Uint8Array(c.buffer);return l.set(t.value,3),l;case"string":const f=this.fromUtf8(t.value),d=new DataView(new ArrayBuffer(3+f.byteLength));d.setUint8(0,7),d.setUint16(1,f.byteLength,!1);const h=new Uint8Array(d.buffer);return h.set(f,3),h;case"timestamp":const y=new Uint8Array(9);return y[0]=8,y.set(ef.fromNumber(t.value.valueOf()).bytes,1),y;case"uuid":if(!jge.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const g=new Uint8Array(17);return g[0]=9,g.set(yM(t.value.replace(/\-/g,"")),1),g}}parse(t){const n={};let r=0;for(;r{if(typeof f!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+f);t=f,n=4,r=new Uint8Array(f),new DataView(r.buffer).setUint32(0,f,!1)},l=async function*(){const f=e[Symbol.asyncIterator]();for(;;){const{value:d,done:h}=await f.next();if(h){if(t)if(t===n)yield r;else throw new Error("Truncated event message received.");else return;return}const y=d.length;let g=0;for(;g({[Symbol.asyncIterator]:async function*(){const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)return;yield r}}finally{t.releaseLock()}}}),Jge=e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(n){const{done:r,value:i}=await t.next();if(r)return n.close();n.enqueue(i)}})};class eye{universalMarshaller;constructor({utf8Encoder:t,utf8Decoder:n}){this.universalMarshaller=new Xge({utf8Decoder:n,utf8Encoder:t})}deserialize(t,n){const r=tye(t)?Wge(t):t;return this.universalMarshaller.deserialize(r,n)}serialize(t,n){const r=this.universalMarshaller.serialize(t,n);return typeof ReadableStream=="function"?Jge(r):r}}const tye=e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,nye=e=>new eye(e);async function sye(e,t,n=1024*1024){const r=e.size;let i=0;for(;i{r.update(i)}),r.digest()},yi=64,oye=16,iye=[1732584193,4023233417,2562383102,271733878];class aye{state;buffer;bufferLength;bytesHashed;finished;constructor(){this.reset()}update(t){if(cye(t))return;if(this.finished)throw new Error("Attempted to update an already finished hash.");const n=lye(t);let r=0,{byteLength:i}=n;for(this.bytesHashed+=i;i>0;)this.buffer.setUint8(this.bufferLength++,n[r++]),i--,this.bufferLength===yi&&(this.hashBuffer(),this.bufferLength=0)}async digest(){if(!this.finished){const{buffer:n,bufferLength:r,bytesHashed:i}=this,c=i*8;if(n.setUint8(this.bufferLength++,128),r%yi>=yi-8){for(let l=this.bufferLength;l>>0,!0),n.setUint32(yi-4,Math.floor(c/4294967296),!0),this.hashBuffer(),this.finished=!0}const t=new DataView(new ArrayBuffer(oye));for(let n=0;n<4;n++)t.setUint32(n*4,this.state[n],!0);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}hashBuffer(){const{buffer:t,state:n}=this;let r=n[0],i=n[1],c=n[2],l=n[3];r=Yn(r,i,c,l,t.getUint32(0,!0),7,3614090360),l=Yn(l,r,i,c,t.getUint32(4,!0),12,3905402710),c=Yn(c,l,r,i,t.getUint32(8,!0),17,606105819),i=Yn(i,c,l,r,t.getUint32(12,!0),22,3250441966),r=Yn(r,i,c,l,t.getUint32(16,!0),7,4118548399),l=Yn(l,r,i,c,t.getUint32(20,!0),12,1200080426),c=Yn(c,l,r,i,t.getUint32(24,!0),17,2821735955),i=Yn(i,c,l,r,t.getUint32(28,!0),22,4249261313),r=Yn(r,i,c,l,t.getUint32(32,!0),7,1770035416),l=Yn(l,r,i,c,t.getUint32(36,!0),12,2336552879),c=Yn(c,l,r,i,t.getUint32(40,!0),17,4294925233),i=Yn(i,c,l,r,t.getUint32(44,!0),22,2304563134),r=Yn(r,i,c,l,t.getUint32(48,!0),7,1804603682),l=Yn(l,r,i,c,t.getUint32(52,!0),12,4254626195),c=Yn(c,l,r,i,t.getUint32(56,!0),17,2792965006),i=Yn(i,c,l,r,t.getUint32(60,!0),22,1236535329),r=Xn(r,i,c,l,t.getUint32(4,!0),5,4129170786),l=Xn(l,r,i,c,t.getUint32(24,!0),9,3225465664),c=Xn(c,l,r,i,t.getUint32(44,!0),14,643717713),i=Xn(i,c,l,r,t.getUint32(0,!0),20,3921069994),r=Xn(r,i,c,l,t.getUint32(20,!0),5,3593408605),l=Xn(l,r,i,c,t.getUint32(40,!0),9,38016083),c=Xn(c,l,r,i,t.getUint32(60,!0),14,3634488961),i=Xn(i,c,l,r,t.getUint32(16,!0),20,3889429448),r=Xn(r,i,c,l,t.getUint32(36,!0),5,568446438),l=Xn(l,r,i,c,t.getUint32(56,!0),9,3275163606),c=Xn(c,l,r,i,t.getUint32(12,!0),14,4107603335),i=Xn(i,c,l,r,t.getUint32(32,!0),20,1163531501),r=Xn(r,i,c,l,t.getUint32(52,!0),5,2850285829),l=Xn(l,r,i,c,t.getUint32(8,!0),9,4243563512),c=Xn(c,l,r,i,t.getUint32(28,!0),14,1735328473),i=Xn(i,c,l,r,t.getUint32(48,!0),20,2368359562),r=Wn(r,i,c,l,t.getUint32(20,!0),4,4294588738),l=Wn(l,r,i,c,t.getUint32(32,!0),11,2272392833),c=Wn(c,l,r,i,t.getUint32(44,!0),16,1839030562),i=Wn(i,c,l,r,t.getUint32(56,!0),23,4259657740),r=Wn(r,i,c,l,t.getUint32(4,!0),4,2763975236),l=Wn(l,r,i,c,t.getUint32(16,!0),11,1272893353),c=Wn(c,l,r,i,t.getUint32(28,!0),16,4139469664),i=Wn(i,c,l,r,t.getUint32(40,!0),23,3200236656),r=Wn(r,i,c,l,t.getUint32(52,!0),4,681279174),l=Wn(l,r,i,c,t.getUint32(0,!0),11,3936430074),c=Wn(c,l,r,i,t.getUint32(12,!0),16,3572445317),i=Wn(i,c,l,r,t.getUint32(24,!0),23,76029189),r=Wn(r,i,c,l,t.getUint32(36,!0),4,3654602809),l=Wn(l,r,i,c,t.getUint32(48,!0),11,3873151461),c=Wn(c,l,r,i,t.getUint32(60,!0),16,530742520),i=Wn(i,c,l,r,t.getUint32(8,!0),23,3299628645),r=Jn(r,i,c,l,t.getUint32(0,!0),6,4096336452),l=Jn(l,r,i,c,t.getUint32(28,!0),10,1126891415),c=Jn(c,l,r,i,t.getUint32(56,!0),15,2878612391),i=Jn(i,c,l,r,t.getUint32(20,!0),21,4237533241),r=Jn(r,i,c,l,t.getUint32(48,!0),6,1700485571),l=Jn(l,r,i,c,t.getUint32(12,!0),10,2399980690),c=Jn(c,l,r,i,t.getUint32(40,!0),15,4293915773),i=Jn(i,c,l,r,t.getUint32(4,!0),21,2240044497),r=Jn(r,i,c,l,t.getUint32(32,!0),6,1873313359),l=Jn(l,r,i,c,t.getUint32(60,!0),10,4264355552),c=Jn(c,l,r,i,t.getUint32(24,!0),15,2734768916),i=Jn(i,c,l,r,t.getUint32(52,!0),21,1309151649),r=Jn(r,i,c,l,t.getUint32(16,!0),6,4149444226),l=Jn(l,r,i,c,t.getUint32(44,!0),10,3174756917),c=Jn(c,l,r,i,t.getUint32(8,!0),15,718787259),i=Jn(i,c,l,r,t.getUint32(36,!0),21,3951481745),n[0]=r+n[0]&4294967295,n[1]=i+n[1]&4294967295,n[2]=c+n[2]&4294967295,n[3]=l+n[3]&4294967295}reset(){this.state=Uint32Array.from(iye),this.buffer=new DataView(new ArrayBuffer(yi)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}}function Rm(e,t,n,r,i,c){return t=(t+e&4294967295)+(r+c&4294967295)&4294967295,(t<>>32-i)+n&4294967295}function Yn(e,t,n,r,i,c,l){return Rm(t&n|~t&r,e,t,i,c,l)}function Xn(e,t,n,r,i,c,l){return Rm(t&r|n&~r,e,t,i,c,l)}function Wn(e,t,n,r,i,c,l){return Rm(t^n^r,e,t,i,c,l)}function Jn(e,t,n,r,i,c,l){return Rm(n^(t|~r),e,t,i,c,l)}function cye(e){return typeof e=="string"?e.length===0:e.byteLength===0}function lye(e){return typeof e=="string"?So(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}const uye=e=>({apiVersion:"2006-03-01",base64Decoder:e?.base64Decoder??Na,base64Encoder:e?.base64Encoder??Mi,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??EN,extensions:e?.extensions??[],getAwsChunkedEncodingStream:e?.getAwsChunkedEncodingStream??SG,httpAuthSchemeProvider:e?.httpAuthSchemeProvider??xde,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Lv},{schemeId:"aws.auth#sigv4a",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new XK}],logger:e?.logger??new Bv,protocol:e?.protocol??FZ,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.s3",xmlNamespace:"http://s3.amazonaws.com/doc/2006-03-01/",version:"2006-03-01",serviceTarget:"AmazonS3"},sdkStreamMixin:e?.sdkStreamMixin??bM,serviceId:e?.serviceId??"S3",signerConstructor:e?.signerConstructor??iN,signingEscapePath:e?.signingEscapePath??!1,urlParser:e?.urlParser??mf,useArnRegion:e?.useArnRegion??void 0,utf8Decoder:e?.utf8Decoder??So,utf8Encoder:e?.utf8Encoder??Ha}),fye=e=>{const t=MD(e),n=()=>t().then(eD),r=uye(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??WM,credentialDefaultProvider:e?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ID({serviceId:r.serviceId,clientVersion:Age.version}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??nye,maxAttempts:e?.maxAttempts??gf,md5:e?.md5??aye,region:e?.region??OD("Region is missing"),requestHandler:Yp.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||yD),sha1:e?.sha1??Mge,sha256:e?.sha256??AD,streamCollector:e?.streamCollector??Av,streamHasher:e?.streamHasher??rye,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(cD)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(lD))}},dye=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(i){const c=t.findIndex(l=>l.schemeId===i.schemeId);c===-1?t.push(i):t.splice(c,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){n=i},httpAuthSchemeProvider(){return n},setCredentials(i){r=i},credentials(){return r}}},hye=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),pye=(e,t)=>{const n=Object.assign(zD(e),tD(e),aM(e),dye(e));return t.forEach(r=>r.configure(n)),Object.assign(e,LD(n),nD(n),cM(n),hye(n))};class mye extends JM{config;constructor(...[t]){const n=fye(t||{});super(n),this.initConfig=n;const r=Cde(n),i=IM(r),c=Tfe(i),l=_D(c),f=fD(l),d=f,h=gD(d),y=rde(h),g=Rde(y),b=Gfe(g,{session:[()=>this,Cge]}),v=pye(b,t?.extensions||[]);this.config=v,this.middlewareStack.use(SM(this.config)),this.middlewareStack.use(aD(this.config)),this.middlewareStack.use(wD(this.config)),this.middlewareStack.use(dD(this.config)),this.middlewareStack.use(lM(this.config)),this.middlewareStack.use(uM(this.config)),this.middlewareStack.use(fM(this.config)),this.middlewareStack.use(dM(this.config,{httpAuthSchemeParametersProvider:_de,identityProviderConfigProvider:async _=>new TM({"aws.auth#sigv4":_.credentials,"aws.auth#sigv4a":_.credentials})})),this.middlewareStack.use(pM(this.config)),this.middlewareStack.use(sde(this.config)),this.middlewareStack.use(wfe(this.config)),this.middlewareStack.use(Dfe(this.config)),this.middlewareStack.use(Ufe(this.config)),this.middlewareStack.use(qfe(this.config))}destroy(){super.destroy()}}class gye extends $r.classBuilder().ep(t_).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions()),KS(r)]}).s("AmazonS3","ListBuckets",{}).n("S3Client","ListBucketsCommand").sc(xge).build(){}class yye extends $r.classBuilder().ep({...t_,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(t,n,r,i){return[xo(r,t.getEndpointParameterInstructions()),KS(r)]}).s("AmazonS3","ListObjectsV2",{}).n("S3Client","ListObjectsV2Command").sc(Rge).build(){}let Uh=null,Hu=null;function Hr(){if(!Uh){const e=Qp();if(!e)throw new Error("AWS credentials not configured");Uh=new yY({endpoint:"https://localhost:9999",region:"ap-southeast-2",credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey}})}return Uh}function WN(){if(!Hu){const e=Qp();if(!e)throw new Error("AWS credentials not configured");Hu=new mye({endpoint:"https://localhost:8443",region:"ap-southeast-2",credentials:{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey},forcePathStyle:!0}),Hu.middlewareStack.use({applyToStack:t=>{t.add(n=>r=>{const i=r.request;return i?.path?.endsWith("/")&&i.path!=="/"&&(i.path=i.path.slice(0,-1)),n(r)},{step:"build",name:"removeTrailingSlash"})}})}return Hu}function bye(){Uh=null,Hu=null}function JN(){const e=Ct.c(58);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={select:vye},e[0]=t):t=e[0];const n=U6(t),r=Mp(),i=_I();let c;e[1]!==r||e[2]!==i?(c=function(){nG(),bye(),i.clear(),r({to:"/login"})},e[1]=r,e[2]=i,e[3]=c):c=e[3];const l=c;let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=U.jsx(y0,{children:"General"}),e[4]=f):f=e[4];const d=n==="/";let h,y;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=U.jsx(D$,{className:"size-4"}),y=U.jsx("span",{children:"Dashboard"}),e[5]=h,e[6]=y):(h=e[5],y=e[6]);let g;e[7]!==d?(g=U.jsxs(g0,{children:[f,U.jsx(Sh,{children:U.jsx(ga,{children:U.jsx(Or,{to:"/",children:U.jsxs(ya,{isActive:d,tooltip:"Dashboard",children:[h,y]})})})})]}),e[7]=d,e[8]=g):g=e[8];let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=U.jsx(y0,{children:"EC2"}),e[9]=b):b=e[9];let v;e[10]!==n?(v=n.startsWith("/ec2/describe-instances")||n.startsWith("/ec2/run-instances"),e[10]=n,e[11]=v):v=e[11];let _,x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=U.jsx(QR,{className:"size-4"}),_=U.jsx("span",{children:"Instances"}),e[12]=_,e[13]=x):(_=e[12],x=e[13]);let R;e[14]!==v?(R=U.jsx(ga,{children:U.jsx(Or,{to:"/ec2/describe-instances",children:U.jsxs(ya,{isActive:v,tooltip:"EC2 Instances",children:[x,_]})})}),e[14]=v,e[15]=R):R=e[15];let C;e[16]!==n?(C=n.startsWith("/ec2/describe-images"),e[16]=n,e[17]=C):C=e[17];let A,O;e[18]===Symbol.for("react.memo_cache_sentinel")?(A=U.jsx(P$,{className:"size-4"}),O=U.jsx("span",{children:"Images"}),e[18]=A,e[19]=O):(A=e[18],O=e[19]);let D;e[20]!==C?(D=U.jsx(ga,{children:U.jsx(Or,{to:"/ec2/describe-images",children:U.jsxs(ya,{isActive:C,tooltip:"Images",children:[A,O]})})}),e[20]=C,e[21]=D):D=e[21];let N;e[22]!==n?(N=n.startsWith("/ec2/describe-key-pairs"),e[22]=n,e[23]=N):N=e[23];let j,$;e[24]===Symbol.for("react.memo_cache_sentinel")?(j=U.jsx(z$,{className:"size-4"}),$=U.jsx("span",{children:"Key Pairs"}),e[24]=j,e[25]=$):(j=e[24],$=e[25]);let k;e[26]!==N?(k=U.jsx(ga,{children:U.jsx(Or,{to:"/ec2/describe-key-pairs",children:U.jsxs(ya,{isActive:N,tooltip:"Key Pairs",children:[j,$]})})}),e[26]=N,e[27]=k):k=e[27];let Z;e[28]!==n?(Z=n.startsWith("/ec2/describe-volumes"),e[28]=n,e[29]=Z):Z=e[29];let se,le;e[30]===Symbol.for("react.memo_cache_sentinel")?(se=U.jsx(O$,{className:"size-4"}),le=U.jsx("span",{children:"Volumes"}),e[30]=se,e[31]=le):(se=e[30],le=e[31]);let K;e[32]!==Z?(K=U.jsx(ga,{children:U.jsx(Or,{to:"/ec2/describe-volumes",children:U.jsxs(ya,{isActive:Z,tooltip:"Volumes",children:[se,le]})})}),e[32]=Z,e[33]=K):K=e[33];let Q;e[34]!==R||e[35]!==D||e[36]!==k||e[37]!==K?(Q=U.jsxs(g0,{children:[b,U.jsxs(Sh,{children:[R,D,k,K]})]}),e[34]=R,e[35]=D,e[36]=k,e[37]=K,e[38]=Q):Q=e[38];let ye;e[39]===Symbol.for("react.memo_cache_sentinel")?(ye=U.jsx(y0,{children:"S3"}),e[39]=ye):ye=e[39];let fe;e[40]!==n?(fe=n.startsWith("/s3/ls"),e[40]=n,e[41]=fe):fe=e[41];let q,W;e[42]===Symbol.for("react.memo_cache_sentinel")?(q=U.jsx(QR,{className:"size-4"}),W=U.jsx("span",{children:"Buckets"}),e[42]=q,e[43]=W):(q=e[42],W=e[43]);let F;e[44]!==fe?(F=U.jsxs(g0,{children:[ye,U.jsx(Sh,{children:U.jsx(ga,{children:U.jsx(Or,{to:"/s3/ls",children:U.jsxs(ya,{isActive:fe,tooltip:"Buckets",children:[q,W]})})})})]}),e[44]=fe,e[45]=F):F=e[45];let be;e[46]!==Q||e[47]!==F||e[48]!==g?(be=U.jsxs(EH,{children:[g,Q,F]}),e[46]=Q,e[47]=F,e[48]=g,e[49]=be):be=e[49];let Te,P;e[50]===Symbol.for("react.memo_cache_sentinel")?(Te=U.jsx(B$,{className:"size-4"}),P=U.jsx("span",{children:"Sign out"}),e[50]=Te,e[51]=P):(Te=e[50],P=e[51]);let ne;e[52]!==l?(ne=U.jsx(wH,{children:U.jsx(Sh,{children:U.jsx(ga,{children:U.jsxs(ya,{onClick:l,tooltip:"Sign out",children:[Te,P]})})})}),e[52]=l,e[53]=ne):ne=e[53];let ie;e[54]===Symbol.for("react.memo_cache_sentinel")?(ie=U.jsx(_H,{}),e[54]=ie):ie=e[54];let de;return e[55]!==be||e[56]!==ne?(de=U.jsxs(vH,{collapsible:"icon",children:[be,ne,ie]}),e[55]=be,e[56]=ne,e[57]=de):de=e[57],de}function vye(e){return e.pathname}function Sye(e){const t=Ct.c(18),{error:n,reset:r}=e,i=es(),c=_I();let l;t[0]!==c||t[1]!==r||t[2]!==i?(l=function(){c.invalidateQueries(),r(),i.invalidate()},t[0]=c,t[1]=r,t[2]=i,t[3]=l):l=t[3];const f=l;let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=U.jsx(JN,{}),t[4]=d):d=t[4];let h;t[5]===Symbol.for("react.memo_cache_sentinel")?(h=U.jsx(OO,{}),t[5]=h):h=t[5];let y,g;t[6]===Symbol.for("react.memo_cache_sentinel")?(y=U.jsx("div",{className:"flex justify-center",children:U.jsx(A$,{className:"size-12 text-destructive"})}),g=U.jsx("h1",{className:"font-semibold text-2xl",children:"Something went wrong"}),t[6]=y,t[7]=g):(y=t[6],g=t[7]);const b=n.message||"An unexpected error occurred";let v;t[8]!==b?(v=U.jsx("p",{className:"text-muted-foreground",children:b}),t[8]=b,t[9]=v):v=t[9];let _;t[10]!==f?(_=U.jsx(tl,{onClick:f,variant:"default",children:"Try Again"}),t[10]=f,t[11]=_):_=t[11];let x;t[12]===Symbol.for("react.memo_cache_sentinel")?(x=U.jsx(Or,{to:"/",children:U.jsx(tl,{variant:"outline",children:"Go Home"})}),t[12]=x):x=t[12];let R;t[13]!==_?(R=U.jsxs("div",{className:"flex justify-center gap-2",children:[_,x]}),t[13]=_,t[14]=R):R=t[14];let C;return t[15]!==R||t[16]!==v?(C=U.jsxs(U.Fragment,{children:[d,U.jsxs("main",{className:"flex flex-1 flex-col",children:[h,U.jsx("div",{className:"flex flex-1 items-center justify-center p-6 pt-0",children:U.jsxs("div",{className:"max-w-md space-y-4 text-center",children:[y,g,v,R]})})]})]}),t[15]=R,t[16]=v,t[17]=C):C=t[17],C}const uw=C6()({head:()=>({meta:[{title:"Mulga"}]}),component:()=>U.jsxs(U.Fragment,{children:[U.jsx(q6,{}),U.jsx(JN,{}),U.jsxs("main",{className:"flex flex-1 flex-col",children:[U.jsx(OO,{}),U.jsx("div",{className:"flex flex-1 flex-col p-8",children:U.jsx(qI,{})})]})]}),errorComponent:Sye,notFoundComponent:CH}),_ye=()=>Wt(()=>import("./login.js"),__vite__mapDeps([0,1])),wye=Kt("/login")({beforeLoad:()=>{if(Qp())throw Wb({to:"/"})},component:rn(_ye,"component")}),Eye=()=>Wt(()=>import("./route.js"),[]),xye=Kt("/_auth")({beforeLoad:()=>{if(!Qp())throw Wb({to:"/login"})},component:rn(Eye,"component")}),Rye={queryKey:["ec2","instances"],queryFn:async()=>{try{const e=new nN({});return await Hr().send(e)}catch{throw new Error("Failed to fetch EC2 instances")}}},Cye=e=>({queryKey:["ec2","instances",e],queryFn:async()=>{try{const t=new nN({InstanceIds:[e]});return await Hr().send(t)}catch{throw new Error("Failed to fetch EC2 instance")}}}),Tye={queryKey:["ec2","instances","types"],queryFn:async()=>{try{const e=new bfe({Filters:[{Name:"capacity",Values:["true"]}]});return await Hr().send(e)}catch{throw new Error("Failed to fetch EC2 instance types")}}},ez={queryKey:["ec2","images"],queryFn:async()=>{try{const e=new tN({});return await Hr().send(e)}catch{throw new Error("Failed to fetch EC2 images")}}},tz=e=>({queryKey:["ec2","images",e??"none"],queryFn:async()=>{try{if(!e)return{Images:[],$metadata:{}};const t=new tN({ImageIds:[e]});return await Hr().send(t)}catch{throw new Error("Failed to fetch EC2 image")}}}),nz={queryKey:["ec2","keypairs"],queryFn:async()=>{try{const e=new sN({});return await Hr().send(e)}catch{throw new Error("Failed to fetch key pairs")}}},Aye=e=>({queryKey:["ec2","keypairs",e],queryFn:async()=>{try{const t=new sN({KeyPairIds:[e]});return await Hr().send(t)}catch{throw new Error("Failed to fetch key pair")}}}),Iye={queryKey:["ec2","regions"],queryFn:async()=>{try{const e=new vfe({});return await Hr().send(e)}catch{throw new Error("Failed to fetch regions")}}},Oye={queryKey:["ec2","volumes"],queryFn:async()=>{try{const e=new rN({});return await Hr().send(e)}catch{throw new Error("Failed to fetch volumes")}}},sz=e=>({queryKey:["ec2","volumes",e],queryFn:async()=>{try{const t=new rN({VolumeIds:[e]});return await Hr().send(t)}catch{throw new Error("Failed to fetch volume")}}}),Mye=()=>Wt(()=>import("./index3.js"),__vite__mapDeps([2,3,4])),Dye=Kt("/_auth/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Iye)},head:()=>({meta:[{title:"Dashboard | Mulga"}]}),component:rn(Mye,"component")}),kye={queryKey:["s3","buckets"],queryFn:async()=>{try{const e=new gye({});return await WN().send(e)}catch{throw new Error("Failed to fetch S3 buckets")}}},rz=(e,t)=>({queryKey:["s3","buckets",e,"objects",t??""],queryFn:async()=>{try{const n=new yye({Bucket:e,Prefix:t,Delimiter:"/"});return await WN().send(n)}catch{throw new Error("Failed to fetch S3 bucket objects")}}}),Pye=()=>Wt(()=>import("./index4.js"),__vite__mapDeps([5,3,6,4])),Nye=Kt("/_auth/s3/ls/")({head:()=>({meta:[{title:"Buckets | S3 | Mulga"}]}),loader:async({context:e})=>{await e.queryClient.ensureQueryData(kye)},component:rn(Pye,"component")}),Bbe=ja({bucketName:Pr().min(3,"Bucket name must be at least 3 characters").max(63,"Bucket name must be at most 63 characters").regex(/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/,"Must start and end with a lowercase letter or number").regex(/^[a-z0-9.-]+$/,"Only lowercase letters, numbers, hyphens, and periods allowed").refine(e=>!e.includes(".."),"Must not contain consecutive periods").refine(e=>!(e.includes(".-")||e.includes("-.")),"Must not contain adjacent period and hyphen")}),zye=()=>Wt(()=>import("./create-bucket.js"),__vite__mapDeps([7,1,8,9,4,10])),Lye=Kt("/_auth/s3/(buckets)/create-bucket")({head:()=>({meta:[{title:"Create Bucket | S3 | Mulga"}]}),component:rn(zye,"component")}),Bye=()=>Wt(()=>import("./create-volume.js"),__vite__mapDeps([11,1,8,9,4,12])),$ye=Kt("/_auth/ec2/(volumes)/create-volume")({head:()=>({meta:[{title:"Create Volume | EC2 | Mulga"}]}),component:rn(Bye,"component")}),$be=ja({imageId:Pr("Please select an Image"),instanceType:Pr("Please select an instance type"),keyName:Pr("Please select a key pair"),count:Ib("Instance count must be a whole number").min(1,"Instance count must be at least 1")}),Ube=ja({keyName:Pr().min(1,"Key name is required").max(255,"Key name must be 255 characters or less").regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,"Key name contains invalid characters")}),jbe=ja({keyName:Pr().min(1,"Key name is required").max(255,"Key name must be 255 characters or less").regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,"Key name contains invalid characters"),publicKeyMaterial:Pr().min(1,"Public key is required").refine(e=>e.trim().length>0,"Public key cannot be empty")}),Hbe=ja({size:rM().int("Size must be a whole number").min(1,"Size must be at least 1 GiB").max(16384,"Size must be at most 16384 GiB"),availabilityZone:Pr().min(1,"Availability zone is required")}),Fbe=ja({size:rM().int("Size must be a whole number").min(1,"Size must be at least 1 GiB")}),Uye=()=>Wt(()=>import("./import-key-pair.js"),__vite__mapDeps([13,1,8,9,4,14,12])),jye=Kt("/_auth/ec2/(key)/import-key-pair")({head:()=>({meta:[{title:"Import Key Pair | EC2 | Mulga"}]}),component:rn(Uye,"component")}),Hye=()=>Wt(()=>import("./create-key-pair.js"),__vite__mapDeps([15,1,8,9,4,12,16,14,17,18])),Fye=Kt("/_auth/ec2/(key)/create-key-pair")({head:()=>({meta:[{title:"Create Key Pair | EC2 | Mulga"}]}),component:rn(Hye,"component")}),Vye=()=>Wt(()=>import("./run-instances.js"),__vite__mapDeps([19,1,3,8,9,4,17,12])),qye=Kt("/_auth/ec2/(instances)/run-instances")({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(ez),e.queryClient.ensureQueryData(nz),e.queryClient.ensureQueryData(Tye)])},head:()=>({meta:[{title:"Run Instances | EC2 | Mulga"}]}),component:rn(Vye,"component")}),Gye=()=>Wt(()=>import("./route2.js"),[]),Kye=Kt("/_auth/s3/ls/$bucket")({component:rn(Gye,"component")}),Zye=()=>Wt(()=>import("./index5.js"),__vite__mapDeps([20,3,8,9,4,10,21,16,18,22])),Qye=Kt("/_auth/s3/ls/$bucket/")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(rz(t.bucket))},head:({params:e})=>({meta:[{title:`${e.bucket} | S3 | Mulga`}]}),component:rn(Zye,"component")}),Yye=()=>Wt(()=>import("./index6.js"),__vite__mapDeps([23,3,6,4,24])),Xye=Kt("/_auth/ec2/(volumes)/describe-volumes/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Oye)},head:()=>({meta:[{title:"Volumes | EC2 | Mulga"}]}),component:rn(Yye,"component")}),Wye=()=>Wt(()=>import("./index7.js"),__vite__mapDeps([25,3,6,4])),Jye=Kt("/_auth/ec2/(key)/describe-key-pairs/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(nz)},head:()=>({meta:[{title:"Key Pairs | EC2 | Mulga"}]}),component:rn(Wye,"component")}),e0e=()=>Wt(()=>import("./index8.js"),__vite__mapDeps([26,3,6,4,27])),t0e=Kt("/_auth/ec2/(instances)/describe-instances/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Rye)},head:()=>({meta:[{title:"Instances | EC2 | Mulga"}]}),component:rn(e0e,"component")}),n0e=()=>Wt(()=>import("./index9.js"),__vite__mapDeps([28,3,6,4,24])),s0e=Kt("/_auth/ec2/(images)/describe-images/")({loader:async({context:e})=>{await e.queryClient.ensureQueryData(ez)},head:()=>({meta:[{title:"Images | EC2 | Mulga"}]}),component:rn(n0e,"component")}),r0e=()=>Wt(()=>import("./_.js"),__vite__mapDeps([29,3,8,9,10,21,16,18,22])),o0e=Kt("/_auth/s3/ls/$bucket/$")({loader:async({context:e,params:t})=>{const n=t5(t._splat||"");await e.queryClient.ensureQueryData(rz(t.bucket,n))},head:({params:e})=>({meta:[{title:`${n5(e._splat||"",`${e.bucket}/`)} | S3 | Mulga`}]}),component:rn(r0e,"component")}),i0e=()=>Wt(()=>import("./_id.js"),__vite__mapDeps([30,1,3,8,9,4,12])),a0e=Kt("/_auth/ec2/(volumes)/modify-volume/$id")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(sz(t.id))},head:({params:e})=>({meta:[{title:`Resize ${e.id} | EC2 | Mulga`}]}),component:rn(i0e,"component")}),c0e=()=>Wt(()=>import("./_id2.js"),__vite__mapDeps([31,3,8,32,9,4,16,24,12,22])),l0e=Kt("/_auth/ec2/(volumes)/describe-volumes/$id")({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(sz(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:rn(c0e,"component")}),u0e=()=>Wt(()=>import("./_id3.js"),__vite__mapDeps([33,3,8,32,9,4,16,12,22])),f0e=Kt("/_auth/ec2/(key)/describe-key-pairs/$id")({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(Aye(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.KeyPairs?.[0]?.KeyName??"Key Pair"} | EC2 | Mulga`}]}),component:rn(u0e,"component")}),d0e=()=>Wt(()=>import("./_id4.js"),__vite__mapDeps([34,3,8,32,4,27,35,9,12,22])),h0e=Kt("/_auth/ec2/(instances)/describe-instances/$id")({loader:async({context:e,params:t})=>{const n=await e.queryClient.ensureQueryData(Cye(t.id)),r=n.Reservations?.[0]?.Instances?.[0]?.ImageId;return await e.queryClient.ensureQueryData(tz(r)),n},head:({loaderData:e})=>({meta:[{title:`${e?.Reservations?.[0]?.Instances?.[0]?.InstanceId??"Instance"} | EC2 | Mulga`}]}),component:rn(d0e,"component")}),p0e=()=>Wt(()=>import("./_id5.js"),__vite__mapDeps([36,3,8,4,24,35,32])),m0e=Kt("/_auth/ec2/(images)/describe-images/$id")({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(tz(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.Images?.[0]?.Name??"Image"} | EC2 | Mulga`}]}),component:rn(p0e,"component")}),g0e=wye.update({id:"/login",path:"/login",getParentRoute:()=>uw}),Dn=xye.update({id:"/_auth",getParentRoute:()=>uw}),y0e=Dye.update({id:"/",path:"/",getParentRoute:()=>Dn}),b0e=Nye.update({id:"/s3/ls/",path:"/s3/ls/",getParentRoute:()=>Dn}),v0e=Lye.update({id:"/s3/(buckets)/create-bucket",path:"/s3/create-bucket",getParentRoute:()=>Dn}),S0e=$ye.update({id:"/ec2/(volumes)/create-volume",path:"/ec2/create-volume",getParentRoute:()=>Dn}),_0e=jye.update({id:"/ec2/(key)/import-key-pair",path:"/ec2/import-key-pair",getParentRoute:()=>Dn}),w0e=Fye.update({id:"/ec2/(key)/create-key-pair",path:"/ec2/create-key-pair",getParentRoute:()=>Dn}),E0e=qye.update({id:"/ec2/(instances)/run-instances",path:"/ec2/run-instances",getParentRoute:()=>Dn}),fw=Kye.update({id:"/s3/ls/$bucket",path:"/s3/ls/$bucket",getParentRoute:()=>Dn}),x0e=Qye.update({id:"/",path:"/",getParentRoute:()=>fw}),R0e=Xye.update({id:"/ec2/(volumes)/describe-volumes/",path:"/ec2/describe-volumes/",getParentRoute:()=>Dn}),C0e=Jye.update({id:"/ec2/(key)/describe-key-pairs/",path:"/ec2/describe-key-pairs/",getParentRoute:()=>Dn}),T0e=t0e.update({id:"/ec2/(instances)/describe-instances/",path:"/ec2/describe-instances/",getParentRoute:()=>Dn}),A0e=s0e.update({id:"/ec2/(images)/describe-images/",path:"/ec2/describe-images/",getParentRoute:()=>Dn}),I0e=o0e.update({id:"/$",path:"/$",getParentRoute:()=>fw}),O0e=a0e.update({id:"/ec2/(volumes)/modify-volume/$id",path:"/ec2/modify-volume/$id",getParentRoute:()=>Dn}),M0e=l0e.update({id:"/ec2/(volumes)/describe-volumes/$id",path:"/ec2/describe-volumes/$id",getParentRoute:()=>Dn}),D0e=f0e.update({id:"/ec2/(key)/describe-key-pairs/$id",path:"/ec2/describe-key-pairs/$id",getParentRoute:()=>Dn}),k0e=h0e.update({id:"/ec2/(instances)/describe-instances/$id",path:"/ec2/describe-instances/$id",getParentRoute:()=>Dn}),P0e=m0e.update({id:"/ec2/(images)/describe-images/$id",path:"/ec2/describe-images/$id",getParentRoute:()=>Dn}),N0e={AuthS3LsBucketSplatRoute:I0e,AuthS3LsBucketIndexRoute:x0e},z0e=fw._addFileChildren(N0e),L0e={AuthIndexRoute:y0e,AuthS3LsBucketRouteRoute:z0e,AuthEc2instancesRunInstancesRoute:E0e,AuthEc2keyCreateKeyPairRoute:w0e,AuthEc2keyImportKeyPairRoute:_0e,AuthEc2volumesCreateVolumeRoute:S0e,AuthS3bucketsCreateBucketRoute:v0e,AuthS3LsIndexRoute:b0e,AuthEc2imagesDescribeImagesIdRoute:P0e,AuthEc2instancesDescribeInstancesIdRoute:k0e,AuthEc2keyDescribeKeyPairsIdRoute:D0e,AuthEc2volumesDescribeVolumesIdRoute:M0e,AuthEc2volumesModifyVolumeIdRoute:O0e,AuthEc2imagesDescribeImagesIndexRoute:A0e,AuthEc2instancesDescribeInstancesIndexRoute:T0e,AuthEc2keyDescribeKeyPairsIndexRoute:C0e,AuthEc2volumesDescribeVolumesIndexRoute:R0e},B0e=Dn._addFileChildren(L0e),$0e={AuthRouteRoute:B0e,LoginRoute:g0e},U0e=uw._addFileChildren($0e)._addFileTypes(),oz=new GL({defaultOptions:{queries:{staleTime:5e3}}}),j0e=z6({routeTree:U0e,context:{queryClient:oz},defaultPreload:"intent",scrollRestoration:!0,defaultStructuralSharing:!0,defaultPreloadStaleTime:0}),rb=document.getElementById("app");rb&&!rb.innerHTML&&X6.createRoot(rb).render(U.jsx(I.StrictMode,{children:U.jsx(t$,{defaultTheme:"system",storageKey:"hive-ui-theme",children:U.jsx(ZL,{client:oz,children:U.jsx(gH,{children:U.jsx($6,{router:j0e})})})})}));export{Lr as $,nbe as A,tl as B,Sb as C,Dr as D,Ds as E,Bp as F,xf as G,mt as H,sC as I,Ze as J,l0 as K,Or as L,Si as M,En as N,qI as O,vt as P,obe as Q,xn as R,is as S,$2 as T,g5 as U,y5 as V,Z0e as W,wo as X,ot as Y,Nj as Z,S9 as _,nn as a,RD as a$,Ku as a0,Mj as a1,B2 as a2,Sv as a3,Uj as a4,rO as a5,hO as a6,Dp as a7,Yh as a8,lbe as a9,Tye as aA,$be as aB,Qye as aC,W0e as aD,rz as aE,Oye as aF,Rye as aG,o0e as aH,t5 as aI,J0e as aJ,n5 as aK,Pa as aL,hbe as aM,$r as aN,t_ as aO,xo as aP,kbe as aQ,X0e as aR,WN as aS,JC as aT,Mi as aU,Ub as aV,Cbe as aW,oN as aX,gZ as aY,bp as aZ,za as a_,V2 as aa,hv as ab,r2 as ac,cr as ad,Ba as ae,ibe as af,cbe as ag,t8 as ah,y8 as ai,Q0e as aj,b9 as ak,Y9 as al,u9 as am,l9 as an,Ef as ao,gn as ap,a5 as aq,ki as ar,w8 as as,abe as at,mv as au,TO as av,i9 as aw,rbe as ax,ez as ay,nz as az,tG as b,wbe as b$,CD as b0,qQ as b1,YQ as b2,GQ as b3,Tbe as b4,df as b5,Mn as b6,vr as b7,Rbe as b8,Bv as b9,l0e as bA,Y0e as bB,s5 as bC,f0e as bD,Aye as bE,$a as bF,E9 as bG,_9 as bH,j2 as bI,o8 as bJ,C9 as bK,r8 as bL,c9 as bM,f9 as bN,s8 as bO,h0e as bP,Cye as bQ,tz as bR,hl as bS,pbe as bT,mbe as bU,gbe as bV,ybe as bW,bbe as bX,vbe as bY,Sbe as bZ,_be as b_,KS as ba,Abe as bb,Ibe as bc,Obe as bd,Mbe as be,Dbe as bf,Pbe as bg,Nbe as bh,zbe as bi,F0e as bj,H0e as bk,pD as bl,lQ as bm,pp as bn,_I as bo,a0e as bp,Fbe as bq,sz as br,XI as bs,lv as bt,_t as bu,Wc as bv,ube as bw,fbe as bx,BO as by,t2 as bz,Ct as c,Ebe as c0,xbe as c1,Hr as c2,Cp as c3,V0e as c4,tf as c5,FL as c6,os as c7,Sr as c8,q0e as c9,m0e as ca,WI as cb,PL as cc,CL as cd,ib as ce,Tp as cf,xL as cg,RL as ch,ob as ci,gI as cj,UL as ck,IL as cl,Ha as cm,So as cn,kye as d,Iye as e,Bbe as f,Hbe as g,wr as h,jbe as i,U as j,Ube as k,p5 as l,sbe as m,ebe as n,tbe as o,hh as p,q2 as q,I as r,dbe as s,Oi as t,Mp as u,of as v,b5 as w,qt as x,op as y,C2 as z}; diff --git a/hive/services/hiveui/frontend/dist/assets/index2.js b/hive/services/hiveui/frontend/dist/assets/index2.js index 344fc3fd6..1eede9d2e 100644 --- a/hive/services/hiveui/frontend/dist/assets/index2.js +++ b/hive/services/hiveui/frontend/dist/assets/index2.js @@ -1 +1 @@ -import{cn as z,co as x}from"./index.js";class T{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:a,serializer:n,deserializer:o,serdeContext:m,defaultContentType:y}){this.marshaller=a,this.serializer=n,this.deserializer=o,this.serdeContext=m,this.defaultContentType=y}async serializeEventStream({eventStream:a,requestSchema:n,initialRequest:o}){const m=this.marshaller,y=n.getEventStreamMember(),p=n.getMemberSchema(y),d=this.serializer,f=this.defaultContentType,h=Symbol("initialRequestMarker"),S={async*[Symbol.asyncIterator](){if(o){const r={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:f}};d.write(n,o);const t=d.flush();yield{[h]:!0,headers:r,body:t}}for await(const r of a)yield r}};return m.serialize(S,r=>{if(r[h])return{headers:r.headers,body:r.body};const t=Object.keys(r).find(s=>s!=="__type")??"",{additionalHeaders:e,body:i,eventType:l,explicitPayloadContentType:c}=this.writeEventBody(t,p,r);return{headers:{":event-type":{type:"string",value:l},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:c??f},...e},body:i}})}async deserializeEventStream({response:a,responseSchema:n,initialResponseContainer:o}){const m=this.marshaller,y=n.getEventStreamMember(),d=n.getMemberSchema(y).getMemberSchemas(),f=Symbol("initialResponseMarker"),h=m.deserialize(a.body,async t=>{const e=Object.keys(t).find(l=>l!=="__type")??"",i=t[e].body;if(e==="initial-response"){const l=await this.deserializer.read(n,i);return delete l[y],{[f]:!0,...l}}else if(e in d){const l=d[e];if(l.isStructSchema()){const c={};let u=!1;for(const[s,g]of l.structIterator()){const{eventHeader:v,eventPayload:w}=g.getMergedTraits();if(u=u||!!(v||w),w)g.isBlobSchema()?c[s]=i:g.isStringSchema()?c[s]=(this.serdeContext?.utf8Encoder??z)(i):g.isStructSchema()&&(c[s]=await this.deserializer.read(g,i));else if(v){const b=t[e].headers[s]?.value;b!=null&&(g.isNumericSchema()?b&&typeof b=="object"&&"bytes"in b?c[s]=BigInt(b.toString()):c[s]=Number(b):c[s]=b)}}if(u)return{[e]:c};if(i.byteLength===0)return{[e]:{}}}return{[e]:await this.deserializer.read(l,i)}}else return{$unknown:t}}),S=h[Symbol.asyncIterator](),r=await S.next();if(r.done)return h;if(r.value?.[f]){if(!n)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[t,e]of Object.entries(r.value))o[t]=e}return{async*[Symbol.asyncIterator](){for(r?.value?.[f]||(yield r.value);;){const{done:t,value:e}=await S.next();if(t)break;yield e}}}}writeEventBody(a,n,o){const m=this.serializer;let y=a,p=null,d;const f=n.getSchema()[4].includes(a),h={};if(f){const t=n.getMemberSchema(a);if(t.isStructSchema()){for(const[e,i]of t.structIterator()){const{eventHeader:l,eventPayload:c}=i.getMergedTraits();if(c)p=e;else if(l){const u=o[a][e];let s="binary";i.isNumericSchema()?(-2)**31<=u&&u<=2**31-1?s="integer":s="long":i.isTimestampSchema()?s="timestamp":i.isStringSchema()?s="string":i.isBooleanSchema()&&(s="boolean"),u!=null&&(h[e]={type:s,value:u},delete o[a][e])}}if(p!==null){const e=t.getMemberSchema(p);e.isBlobSchema()?d="application/octet-stream":e.isStringSchema()&&(d="text/plain"),m.write(e,o[a][p])}else m.write(t,o[a])}else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}else{const[t,e]=o[a];y=t,m.write(15,e)}const S=m.flush();return{body:typeof S=="string"?(this.serdeContext?.utf8Decoder??x)(S):S,eventType:y,explicitPayloadContentType:d,additionalHeaders:h}}}export{T as EventStreamSerde}; +import{cm as z,cn as x}from"./index.js";class T{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:a,serializer:n,deserializer:o,serdeContext:m,defaultContentType:y}){this.marshaller=a,this.serializer=n,this.deserializer=o,this.serdeContext=m,this.defaultContentType=y}async serializeEventStream({eventStream:a,requestSchema:n,initialRequest:o}){const m=this.marshaller,y=n.getEventStreamMember(),p=n.getMemberSchema(y),d=this.serializer,f=this.defaultContentType,h=Symbol("initialRequestMarker"),S={async*[Symbol.asyncIterator](){if(o){const r={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:f}};d.write(n,o);const t=d.flush();yield{[h]:!0,headers:r,body:t}}for await(const r of a)yield r}};return m.serialize(S,r=>{if(r[h])return{headers:r.headers,body:r.body};const t=Object.keys(r).find(s=>s!=="__type")??"",{additionalHeaders:e,body:i,eventType:l,explicitPayloadContentType:c}=this.writeEventBody(t,p,r);return{headers:{":event-type":{type:"string",value:l},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:c??f},...e},body:i}})}async deserializeEventStream({response:a,responseSchema:n,initialResponseContainer:o}){const m=this.marshaller,y=n.getEventStreamMember(),d=n.getMemberSchema(y).getMemberSchemas(),f=Symbol("initialResponseMarker"),h=m.deserialize(a.body,async t=>{const e=Object.keys(t).find(l=>l!=="__type")??"",i=t[e].body;if(e==="initial-response"){const l=await this.deserializer.read(n,i);return delete l[y],{[f]:!0,...l}}else if(e in d){const l=d[e];if(l.isStructSchema()){const c={};let u=!1;for(const[s,g]of l.structIterator()){const{eventHeader:v,eventPayload:w}=g.getMergedTraits();if(u=u||!!(v||w),w)g.isBlobSchema()?c[s]=i:g.isStringSchema()?c[s]=(this.serdeContext?.utf8Encoder??z)(i):g.isStructSchema()&&(c[s]=await this.deserializer.read(g,i));else if(v){const b=t[e].headers[s]?.value;b!=null&&(g.isNumericSchema()?b&&typeof b=="object"&&"bytes"in b?c[s]=BigInt(b.toString()):c[s]=Number(b):c[s]=b)}}if(u)return{[e]:c};if(i.byteLength===0)return{[e]:{}}}return{[e]:await this.deserializer.read(l,i)}}else return{$unknown:t}}),S=h[Symbol.asyncIterator](),r=await S.next();if(r.done)return h;if(r.value?.[f]){if(!n)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[t,e]of Object.entries(r.value))o[t]=e}return{async*[Symbol.asyncIterator](){for(r?.value?.[f]||(yield r.value);;){const{done:t,value:e}=await S.next();if(t)break;yield e}}}}writeEventBody(a,n,o){const m=this.serializer;let y=a,p=null,d;const f=n.getSchema()[4].includes(a),h={};if(f){const t=n.getMemberSchema(a);if(t.isStructSchema()){for(const[e,i]of t.structIterator()){const{eventHeader:l,eventPayload:c}=i.getMergedTraits();if(c)p=e;else if(l){const u=o[a][e];let s="binary";i.isNumericSchema()?(-2)**31<=u&&u<=2**31-1?s="integer":s="long":i.isTimestampSchema()?s="timestamp":i.isStringSchema()?s="string":i.isBooleanSchema()&&(s="boolean"),u!=null&&(h[e]={type:s,value:u},delete o[a][e])}}if(p!==null){const e=t.getMemberSchema(p);e.isBlobSchema()?d="application/octet-stream":e.isStringSchema()&&(d="text/plain"),m.write(e,o[a][p])}else m.write(t,o[a])}else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}else{const[t,e]=o[a];y=t,m.write(15,e)}const S=m.flush();return{body:typeof S=="string"?(this.serdeContext?.utf8Decoder??x)(S):S,eventType:y,explicitPayloadContentType:d,additionalHeaders:h}}}export{T as EventStreamSerde}; diff --git a/hive/services/hiveui/frontend/dist/assets/index5.js b/hive/services/hiveui/frontend/dist/assets/index5.js index 5e4213b4d..84ccf810c 100644 --- a/hive/services/hiveui/frontend/dist/assets/index5.js +++ b/hive/services/hiveui/frontend/dist/assets/index5.js @@ -1 +1 @@ -import{c as g,aD as b,j as s,aE as P,aF as y}from"./index.js";import{u as k}from"./useSuspenseQuery.js";import{B as N}from"./back-link.js";import{P as B}from"./page-heading.js";import{F as C,O,U as F}from"./upload-button.js";import"./alert-dialog.js";import"./s3.js";import"./useMutation.js";import"./download.js";import"./trash-2.js";function D(){const e=g.c(26),{bucket:t}=b.useParams();let u;e[0]!==t?(u=y(t),e[0]=t,e[1]=u):u=e[1];const{data:i}=k(u);let x;e[2]!==i.Contents?(x=i.Contents||[],e[2]=i.Contents,e[3]=x):x=e[3];const n=x;let d;e[4]!==i.CommonPrefixes?(d=i.CommonPrefixes||[],e[4]=i.CommonPrefixes,e[5]=d):d=e[5];const o=d;let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(N,{to:"/s3/ls",children:"Back to buckets"}),e[6]=h):h=e[6];let r;e[7]!==t?(r=s.jsx(F,{bucket:t}),e[7]=t,e[8]=r):r=e[8];let m;e[9]!==t||e[10]!==r?(m=s.jsx(B,{actions:r,title:t}),e[9]=t,e[10]=r,e[11]=m):m=e[11];let a;e[12]!==t||e[13]!==o?(a=o.length>0&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Folders"}),s.jsx("div",{className:"space-y-2",children:o.map(l=>{if(!l.Prefix)return null;const j=P(l.Prefix);return s.jsx(C,{bucketName:t,folderName:j,fullPrefix:l.Prefix},l.Prefix)})})]}),e[12]=t,e[13]=o,e[14]=a):a=e[14];let c;e[15]!==t||e[16]!==n?(c=n.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Objects"}),n.map(l=>l.Key?s.jsx(O,{bucketName:t,displayName:l.Key,fullKey:l.Key,object:l},l.Key):null)]}),e[15]=t,e[16]=n,e[17]=c):c=e[17];let f;e[18]!==o.length||e[19]!==n.length?(f=n.length===0&&o.length===0&&s.jsx("p",{className:"text-muted-foreground",children:"No objects found in this bucket."}),e[18]=o.length,e[19]=n.length,e[20]=f):f=e[20];let p;return e[21]!==m||e[22]!==a||e[23]!==c||e[24]!==f?(p=s.jsxs(s.Fragment,{children:[h,m,a,c,f]}),e[21]=m,e[22]=a,e[23]=c,e[24]=f,e[25]=p):p=e[25],p}export{D as component}; +import{c as b,aC as y,j as s,aD as k,aE as N}from"./index.js";import{u as B}from"./useSuspenseQuery.js";import{B as C}from"./back-link.js";import{E as O}from"./error-banner.js";import{P as E}from"./page-heading.js";import{a as F}from"./s3.js";import{U as K,F as v,O as U}from"./upload-button.js";import"./alert-dialog.js";import"./download.js";import"./trash-2.js";function T(){const e=b.c(31),{bucket:t}=y.useParams();let x;e[0]!==t?(x=N(t),e[0]=t,e[1]=x):x=e[1];const{data:i}=B(x),r=F();let p;e[2]!==i.Contents?(p=i.Contents||[],e[2]=i.Contents,e[3]=p):p=e[3];const o=p;let h;e[4]!==i.CommonPrefixes?(h=i.CommonPrefixes||[],e[4]=i.CommonPrefixes,e[5]=h):h=e[5];const l=h;let g;e[6]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(C,{to:"/s3/ls",children:"Back to buckets"}),e[6]=g):g=e[6];let a;e[7]!==t||e[8]!==r.isPending||e[9]!==r.mutateAsync?(a=s.jsx(K,{bucket:t,isPending:r.isPending,onUpload:r.mutateAsync}),e[7]=t,e[8]=r.isPending,e[9]=r.mutateAsync,e[10]=a):a=e[10];let m;e[11]!==t||e[12]!==a?(m=s.jsx(E,{actions:a,title:t}),e[11]=t,e[12]=a,e[13]=m):m=e[13];let c;e[14]!==r.error?(c=r.error&&s.jsx(O,{error:r.error,msg:"Failed to upload object"}),e[14]=r.error,e[15]=c):c=e[15];let u;e[16]!==t||e[17]!==l?(u=l.length>0&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Folders"}),s.jsx("div",{className:"space-y-2",children:l.map(n=>{if(!n.Prefix)return null;const P=k(n.Prefix);return s.jsx(v,{bucketName:t,folderName:P,fullPrefix:n.Prefix},n.Prefix)})})]}),e[16]=t,e[17]=l,e[18]=u):u=e[18];let f;e[19]!==t||e[20]!==o?(f=o.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Objects"}),o.map(n=>n.Key?s.jsx(U,{bucketName:t,displayName:n.Key,fullKey:n.Key,object:n},n.Key):null)]}),e[19]=t,e[20]=o,e[21]=f):f=e[21];let d;e[22]!==l.length||e[23]!==o.length?(d=o.length===0&&l.length===0&&s.jsx("p",{className:"text-muted-foreground",children:"No objects found in this bucket."}),e[22]=l.length,e[23]=o.length,e[24]=d):d=e[24];let j;return e[25]!==m||e[26]!==c||e[27]!==u||e[28]!==f||e[29]!==d?(j=s.jsxs(s.Fragment,{children:[g,m,c,u,f,d]}),e[25]=m,e[26]=c,e[27]=u,e[28]=f,e[29]=d,e[30]=j):j=e[30],j}export{T as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/index6.js b/hive/services/hiveui/frontend/dist/assets/index6.js index 12780d184..b3861dcb8 100644 --- a/hive/services/hiveui/frontend/dist/assets/index6.js +++ b/hive/services/hiveui/frontend/dist/assets/index6.js @@ -1 +1 @@ -import{c as l,aG as n,j as t,L as m,B as u}from"./index.js";import{u as c}from"./useSuspenseQuery.js";import{L as d}from"./list-card.js";import{P as p}from"./page-heading.js";import{B as f}from"./badge.js";function b(){const e=l.c(5),{data:r}=c(n);let s;e[0]!==r.Volumes?(s=r.Volumes||[],e[0]=r.Volumes,e[1]=s):s=e[1];const o=s;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(p,{actions:t.jsx(m,{to:"/ec2/create-volume",children:t.jsx(u,{children:"Create Volume"})}),title:"EC2 Volumes"}),e[2]=a):a=e[2];let i;return e[3]!==o?(i=t.jsxs(t.Fragment,{children:[a,o.length>0?t.jsx("div",{className:"space-y-4",children:o.map(x)}):t.jsx("p",{className:"text-muted-foreground",children:"No volumes found."})]}),e[3]=o,e[4]=i):i=e[4],i}function x(e){return e.VolumeId?t.jsx(d,{badge:e.State?t.jsx(f,{variant:e.State==="available"?"default":"outline",children:e.State}):void 0,params:{id:e.VolumeId},subtitle:`${e.Size} GiB • ${e.VolumeType}`,title:e.VolumeId,to:"/ec2/describe-volumes/$id"},e.VolumeId):null}export{b as component}; +import{c as l,aF as n,j as t,L as m,B as u}from"./index.js";import{u as c}from"./useSuspenseQuery.js";import{L as d}from"./list-card.js";import{P as p}from"./page-heading.js";import{B as f}from"./badge.js";function b(){const e=l.c(5),{data:r}=c(n);let s;e[0]!==r.Volumes?(s=r.Volumes||[],e[0]=r.Volumes,e[1]=s):s=e[1];const o=s;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(p,{actions:t.jsx(m,{to:"/ec2/create-volume",children:t.jsx(u,{children:"Create Volume"})}),title:"EC2 Volumes"}),e[2]=a):a=e[2];let i;return e[3]!==o?(i=t.jsxs(t.Fragment,{children:[a,o.length>0?t.jsx("div",{className:"space-y-4",children:o.map(x)}):t.jsx("p",{className:"text-muted-foreground",children:"No volumes found."})]}),e[3]=o,e[4]=i):i=e[4],i}function x(e){return e.VolumeId?t.jsx(d,{badge:e.State?t.jsx(f,{variant:e.State==="available"?"default":"outline",children:e.State}):void 0,params:{id:e.VolumeId},subtitle:`${e.Size} GiB • ${e.VolumeType}`,title:e.VolumeId,to:"/ec2/describe-volumes/$id"},e.VolumeId):null}export{b as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/index7.js b/hive/services/hiveui/frontend/dist/assets/index7.js index 2727e529a..bcfd21ca7 100644 --- a/hive/services/hiveui/frontend/dist/assets/index7.js +++ b/hive/services/hiveui/frontend/dist/assets/index7.js @@ -1 +1 @@ -import{c as m,aA as l,j as t,L as n,B as c}from"./index.js";import{u as p}from"./useSuspenseQuery.js";import{L as d}from"./list-card.js";import{P as y}from"./page-heading.js";function P(){const e=m.c(4),{data:r}=p(l);let s;if(e[0]!==r.KeyPairs){const a=[...r.KeyPairs||[]].sort(f);let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(n,{to:"/ec2/import-key-pair",children:t.jsx(c,{variant:"outline",children:"Import Key Pair"})}),e[2]=i):i=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(y,{actions:t.jsxs("div",{className:"flex gap-2",children:[i,t.jsx(n,{to:"/ec2/create-key-pair",children:t.jsx(c,{children:"Create Key Pair"})})]}),title:"EC2 Key Pairs"}),e[3]=o):o=e[3],s=t.jsxs(t.Fragment,{children:[o,a.length>0?t.jsx("div",{className:"space-y-4",children:a.map(u)}):t.jsx("p",{className:"text-muted-foreground",children:"No key pairs found."})]}),e[0]=r.KeyPairs,e[1]=s}else s=e[1];return s}function u(e){return e.KeyPairId?t.jsx(d,{params:{id:e.KeyPairId},subtitle:`${e.KeyPairId} • ${e.KeyType}`,title:e.KeyName??"",to:"/ec2/describe-key-pairs/$id"},e.KeyPairId):null}function f(e,r){const s=e.KeyName?.toLowerCase()??"",a=r.KeyName?.toLowerCase()??"";return s.localeCompare(a)}export{P as component}; +import{c as m,az as l,j as t,L as n,B as c}from"./index.js";import{u as p}from"./useSuspenseQuery.js";import{L as d}from"./list-card.js";import{P as y}from"./page-heading.js";function P(){const e=m.c(4),{data:r}=p(l);let s;if(e[0]!==r.KeyPairs){const a=[...r.KeyPairs||[]].sort(f);let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(n,{to:"/ec2/import-key-pair",children:t.jsx(c,{variant:"outline",children:"Import Key Pair"})}),e[2]=i):i=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(y,{actions:t.jsxs("div",{className:"flex gap-2",children:[i,t.jsx(n,{to:"/ec2/create-key-pair",children:t.jsx(c,{children:"Create Key Pair"})})]}),title:"EC2 Key Pairs"}),e[3]=o):o=e[3],s=t.jsxs(t.Fragment,{children:[o,a.length>0?t.jsx("div",{className:"space-y-4",children:a.map(u)}):t.jsx("p",{className:"text-muted-foreground",children:"No key pairs found."})]}),e[0]=r.KeyPairs,e[1]=s}else s=e[1];return s}function u(e){return e.KeyPairId?t.jsx(d,{params:{id:e.KeyPairId},subtitle:`${e.KeyPairId} • ${e.KeyType}`,title:e.KeyName??"",to:"/ec2/describe-key-pairs/$id"},e.KeyPairId):null}function f(e,r){const s=e.KeyName?.toLowerCase()??"",a=r.KeyName?.toLowerCase()??"";return s.localeCompare(a)}export{P as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/index8.js b/hive/services/hiveui/frontend/dist/assets/index8.js index 9fe5a352b..b5c21d9ec 100644 --- a/hive/services/hiveui/frontend/dist/assets/index8.js +++ b/hive/services/hiveui/frontend/dist/assets/index8.js @@ -1 +1 @@ -import{c as o,aH as c,j as t,L as i,B as m}from"./index.js";import{u as d}from"./useSuspenseQuery.js";import{L as u}from"./list-card.js";import{P as l}from"./page-heading.js";import{S as p}from"./state-badge.js";function y(){const e=o.c(3),{data:a}=d(c);let s;if(e[0]!==a.Reservations){const r=a.Reservations?.flatMap(I)||[];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(l,{actions:t.jsx(i,{to:"/ec2/run-instances",children:t.jsx(m,{children:"Run Instances"})}),title:"EC2 Instances"}),e[2]=n):n=e[2],s=t.jsxs(t.Fragment,{children:[n,r.length>0?t.jsx("div",{className:"space-y-4",children:r.map(f)}):t.jsx("p",{className:"text-muted-foreground",children:"No instances found."})]}),e[0]=a.Reservations,e[1]=s}else s=e[1];return s}function f(e){return e.InstanceId?t.jsx(u,{badge:t.jsx(p,{state:e.State?.Name}),params:{id:e.InstanceId},subtitle:`${e.InstanceType} • ${e.ImageId}`,title:e.InstanceId,to:"/ec2/describe-instances/$id"},e.InstanceId):null}function I(e){return e.Instances||[]}export{y as component}; +import{c as o,aG as c,j as t,L as i,B as m}from"./index.js";import{u as d}from"./useSuspenseQuery.js";import{L as u}from"./list-card.js";import{P as l}from"./page-heading.js";import{S as p}from"./state-badge.js";function y(){const e=o.c(3),{data:a}=d(c);let s;if(e[0]!==a.Reservations){const r=a.Reservations?.flatMap(I)||[];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(l,{actions:t.jsx(i,{to:"/ec2/run-instances",children:t.jsx(m,{children:"Run Instances"})}),title:"EC2 Instances"}),e[2]=n):n=e[2],s=t.jsxs(t.Fragment,{children:[n,r.length>0?t.jsx("div",{className:"space-y-4",children:r.map(f)}):t.jsx("p",{className:"text-muted-foreground",children:"No instances found."})]}),e[0]=a.Reservations,e[1]=s}else s=e[1];return s}function f(e){return e.InstanceId?t.jsx(u,{badge:t.jsx(p,{state:e.State?.Name}),params:{id:e.InstanceId},subtitle:`${e.InstanceType} • ${e.ImageId}`,title:e.InstanceId,to:"/ec2/describe-instances/$id"},e.InstanceId):null}function I(e){return e.Instances||[]}export{y as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/index9.js b/hive/services/hiveui/frontend/dist/assets/index9.js index 573850f6d..3c88fa210 100644 --- a/hive/services/hiveui/frontend/dist/assets/index9.js +++ b/hive/services/hiveui/frontend/dist/assets/index9.js @@ -1 +1 @@ -import{c as n,az as i,j as t}from"./index.js";import{u as l}from"./useSuspenseQuery.js";import{L as c}from"./list-card.js";import{P as d}from"./page-heading.js";import{B as u}from"./badge.js";function h(){const e=n.c(5),{data:m}=l(i);let s;e[0]!==m.Images?(s=m.Images||[],e[0]=m.Images,e[1]=s):s=e[1];const a=s;let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(d,{title:"EC2 Images"}),e[2]=r):r=e[2];let o;return e[3]!==a?(o=t.jsxs(t.Fragment,{children:[r,a.length>0?t.jsx("div",{className:"space-y-4",children:a.map(p)}):t.jsx("p",{className:"text-muted-foreground",children:"No images found."})]}),e[3]=a,e[4]=o):o=e[4],o}function p(e){return e.ImageId?t.jsx(c,{badge:e.State?t.jsx(u,{variant:e.State==="available"?"default":"outline",children:e.State}):void 0,params:{id:e.ImageId},subtitle:e.Name,title:e.ImageId,to:"/ec2/describe-images/$id"},e.ImageId):null}export{h as component}; +import{c as n,ay as i,j as t}from"./index.js";import{u as l}from"./useSuspenseQuery.js";import{L as c}from"./list-card.js";import{P as d}from"./page-heading.js";import{B as u}from"./badge.js";function h(){const e=n.c(5),{data:m}=l(i);let s;e[0]!==m.Images?(s=m.Images||[],e[0]=m.Images,e[1]=s):s=e[1];const a=s;let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(d,{title:"EC2 Images"}),e[2]=r):r=e[2];let o;return e[3]!==a?(o=t.jsxs(t.Fragment,{children:[r,a.length>0?t.jsx("div",{className:"space-y-4",children:a.map(p)}):t.jsx("p",{className:"text-muted-foreground",children:"No images found."})]}),e[3]=a,e[4]=o):o=e[4],o}function p(e){return e.ImageId?t.jsx(c,{badge:e.State?t.jsx(u,{variant:e.State==="available"?"default":"outline",children:e.State}):void 0,params:{id:e.ImageId},subtitle:e.Name,title:e.ImageId,to:"/ec2/describe-images/$id"},e.ImageId):null}export{h as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/run-instances.js b/hive/services/hiveui/frontend/dist/assets/run-instances.js index be5af80e5..7586ac3c0 100644 --- a/hive/services/hiveui/frontend/dist/assets/run-instances.js +++ b/hive/services/hiveui/frontend/dist/assets/run-instances.js @@ -1 +1 @@ -import{h as en,A as Dt,l as Re,m as Je,n as He,p as Ue,q as _t,r as l,t as tn,v as Fe,w as zt,x as Mn,y as xe,z as yt,C as Cn,E as nn,D as rn,F as De,G as En,H as An,I as Y,J as Pn,K as de,M as On,N as Kt,P as Nn,Q as Ge,R as bt,S as Wt,T as Vn,U as on,V as jn,W as kn,X as Ot,Y as dt,j as h,Z as q,_ as Ft,$ as Ln,a0 as Nt,a1 as Dn,a2 as k,a3 as Fn,a4 as pt,a5 as Hn,a6 as Un,a7 as Bn,a8 as sn,a9 as ln,aa as _n,ab as zn,ac as Ht,ad as cn,ae as Ve,af as Vt,ag as Kn,ah as Wn,ai as $n,aj as qn,ak as Yn,al as Gn,am as Xn,an as Qn,ao as Jn,ap as an,aq as $t,ar as Zn,as as er,at as tr,au as nr,av as un,aw as rr,ax as or,ay as Rt,c as We,a as $e,u as sr,az as ir,aA as lr,aB as cr,aC as ar,B as qt}from"./index.js";import{e as ur,f as fn,g as dn,h as Yt,i as fr,j as dr,k as pr,u as mr,a as gr,c as ot,b as st,C as wt,F as it,I as hr}from"./field.js";import{u as St}from"./useSuspenseQuery.js";import{B as xr}from"./back-link.js";import{E as Gt}from"./error-banner.js";import{P as yr}from"./page-heading.js";import{C as br}from"./check.js";import{c as Rr}from"./ec2.js";import"./useMutation.js";const wr=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],pn=en("chevron-down",wr);const Sr=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ir=en("chevron-up",Sr);function lt(t,e,n){return Math.floor(t/e)!==n}function Xe(t,e){return e<0||e>=t.current.length}function It(t,e){return he(t,{disabledIndices:e})}function Xt(t,e){return he(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function he(t,{startingIndex:e=-1,decrement:n=!1,disabledIndices:o,amount:i=1}={}){let r=e;do r+=n?-i:i;while(r>=0&&r<=t.current.length-1&&Qe(t,r,o));return r}function vr(t,{event:e,orientation:n,loopFocus:o,rtl:i,cols:r,disabledIndices:c,minIndex:u,maxIndex:f,prevIndex:d,stopEvent:m=!1}){let p=d;const b=[],P={};let w=!1;{let s=null,R=-1;t.current.forEach((a,x)=>{if(a==null)return;const E=a.closest('[role="row"]');E&&(w=!0),(E!==s||R===-1)&&(s=E,R+=1,b[R]=[]),b[R].push(x),P[x]=R})}const y=w&&b.length>0&&b.some(s=>s.length!==r);function T(s){if(!y||d===-1)return;const R=P[d];if(R==null)return;const a=b[R].indexOf(d);let x=s==="up"?R-1:R+1;o&&(x<0?x=b.length-1:x>=b.length&&(x=0));const E=new Set;for(;x>=0&&x=0;N-=1){const re=I[N];if(!Qe(t,re,c))return re}x=s==="up"?x-1:x+1,o&&(x<0?x=b.length-1:x>=b.length&&(x=0))}}if(e.key===Dt){const s=T("up");if(s!==void 0)m&&Re(e),p=s;else{if(m&&Re(e),d===-1)p=f;else if(p=he(t,{startingIndex:p,amount:r,decrement:!0,disabledIndices:c}),o&&(d-rR?x:x-r}Xe(t,p)&&(p=d)}}if(e.key===Je){const s=T("down");s!==void 0?(m&&Re(e),p=s):(m&&Re(e),d===-1?p=u:(p=he(t,{startingIndex:d,amount:r,disabledIndices:c}),o&&d+r>f&&(p=he(t,{startingIndex:d%r-r,amount:r,disabledIndices:c}))),Xe(t,p)&&(p=d))}if(n==="both"){const s=_t(d/r);e.key===(i?He:Ue)&&(m&&Re(e),d%r!==r-1?(p=he(t,{startingIndex:d,disabledIndices:c}),o&<(p,r,s)&&(p=he(t,{startingIndex:d-d%r-1,disabledIndices:c}))):o&&(p=he(t,{startingIndex:d-d%r-1,disabledIndices:c})),lt(p,r,s)&&(p=d)),e.key===(i?Ue:He)&&(m&&Re(e),d%r!==0?(p=he(t,{startingIndex:d,decrement:!0,disabledIndices:c}),o&<(p,r,s)&&(p=he(t,{startingIndex:d+(r-d%r),decrement:!0,disabledIndices:c}))):o&&(p=he(t,{startingIndex:d+(r-d%r),decrement:!0,disabledIndices:c})),lt(p,r,s)&&(p=d));const R=_t(f/r)===s;Xe(t,p)&&(o&&R?p=e.key===(i?Ue:He)?f:he(t,{startingIndex:d-d%r-1,disabledIndices:c}):p=d)}return p}function Tr(t,e,n){const o=[];let i=0;return t.forEach(({width:r,height:c},u)=>{let f=!1;for(n&&(i=0);!f;){const d=[];for(let m=0;mo[m]==null)?(d.forEach(m=>{o[m]=u}),f=!0):i+=1}}),[...o]}function Mr(t,e,n,o,i){if(t===-1)return-1;const r=n.indexOf(t),c=e[t];switch(i){case"tl":return r;case"tr":return c?r+c.width-1:r;case"bl":return c?r+(c.height-1)*o:r;case"br":return n.lastIndexOf(t);default:return-1}}function Cr(t,e){return e.flatMap((n,o)=>t.includes(n)?[o]:[])}function Qe(t,e,n){if(typeof n=="function")return n(e);if(n)return n.includes(e);const o=t.current[e];return o?o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true":!1}function Er(t,e={}){const n="rootStore"in t?t.rootStore:t,o=n.context.dataRef,{enabled:i=!0,event:r="click",toggle:c=!0,ignoreMouse:u=!1,stickIfOpen:f=!0,touchOpenDelay:d=0}=e,m=l.useRef(void 0),p=tn(),b=Fe(),P=l.useMemo(()=>({onPointerDown(w){m.current=w.pointerType},onMouseDown(w){const y=m.current,T=w.nativeEvent,s=n.select("open");if(w.button!==0||r==="click"||zt(y,!0)&&u)return;const R=o.current.openEvent,a=R?.type,x=n.select("domReferenceElement")!==w.currentTarget,E=s&&x||!(s&&c&&(!(R&&f)||a==="click"||a==="mousedown"));if(Cn(T.target)){const O=xe(yt,T,T.target);E&&y==="touch"&&d>0?b.start(d,()=>{n.setOpen(!0,O)}):n.setOpen(E,O);return}const I=w.currentTarget;p.request(()=>{const O=xe(yt,T,I);E&&y==="touch"&&d>0?b.start(d,()=>{n.setOpen(!0,O)}):n.setOpen(E,O)})},onClick(w){if(r==="mousedown-only")return;const y=m.current;if(r==="mousedown"&&y){m.current=void 0;return}if(zt(y,!0)&&u)return;const T=n.select("open"),s=o.current.openEvent,R=n.select("domReferenceElement")!==w.currentTarget,a=T&&R||!(T&&c&&(!(s&&f)||Mn(s))),x=xe(yt,w.nativeEvent,w.currentTarget);a&&y==="touch"&&d>0?b.start(d,()=>{n.setOpen(!0,x)}):n.setOpen(a,x)},onKeyDown(){m.current=void 0}}),[o,r,u,n,f,c,p,b,d]);return l.useMemo(()=>i?{reference:P}:nn,[i,P])}const Ar="Escape";function mt(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function ct(t,e){return mt(e,t===Dt||t===Je,t===He||t===Ue)}function vt(t,e,n){return mt(e,t===Je,n?t===He:t===Ue)||t==="Enter"||t===" "||t===""}function Pr(t,e,n){return mt(e,n?t===He:t===Ue,t===Je)}function Or(t,e,n,o){const i=n?t===Ue:t===He,r=t===Dt;return e==="both"||e==="horizontal"&&o&&o>1?t===Ar:mt(e,i,r)}function Nr(t,e){const n="rootStore"in t?t.rootStore:t,o=n.useState("open"),i=n.useState("floatingElement"),r=n.useState("domReferenceElement"),c=n.context.dataRef,{listRef:u,activeIndex:f,onNavigate:d=()=>{},enabled:m=!0,selectedIndex:p=null,allowEscape:b=!1,loopFocus:P=!1,nested:w=!1,rtl:y=!1,virtual:T=!1,focusItemOnOpen:s="auto",focusItemOnHover:R=!0,openOnArrowKeyDown:a=!0,disabledIndices:x=void 0,orientation:E="vertical",parentOrientation:I,cols:O=1,scrollItemIntoView:N=!0,itemSizes:re,dense:ae=!1,id:K,resetOnPointerLeave:W=!0,externalTree:z}=e,D=rn(i),ee=De(D),U=En(),te=An(z);Y(()=>{c.current.orientation=E},[c,E]);const v=Pn(r),B=l.useRef(s),S=l.useRef(p??-1),A=l.useRef(null),ie=l.useRef(!0),M=de(g=>{d(S.current===-1?null:S.current,g)}),se=l.useRef(M),G=l.useRef(!!i),j=l.useRef(o),_=l.useRef(!1),ue=l.useRef(!1),Ie=De(x),H=De(o),fe=De(N),X=De(p),me=De(W),we=de(()=>{function g(Z){T?te?.events.emit("virtualfocus",Z):On(Z,{sync:_.current,preventScroll:!0})}const L=u.current[S.current],C=ue.current;L&&g(L),(_.current?Z=>Z():requestAnimationFrame)(()=>{const Z=u.current[S.current]||L;if(!Z)return;L||g(Z);const le=fe.current;le&&Q&&(C||!ie.current)&&Z.scrollIntoView?.(typeof le=="boolean"?{block:"nearest",inline:"nearest"}:le)})});Y(()=>{m&&(o&&i?(S.current=p??-1,B.current&&p!=null&&(ue.current=!0,M())):G.current&&(S.current=-1,se.current()))},[m,o,i,p,M]),Y(()=>{if(m){if(!o){_.current=!1;return}if(i)if(f==null){if(_.current=!1,X.current!=null)return;if(G.current&&(S.current=-1,we()),(!j.current||!G.current)&&B.current&&(A.current!=null||B.current===!0&&A.current==null)){let g=0;const L=()=>{u.current[0]==null?(g<2&&(g?requestAnimationFrame:queueMicrotask)(L),g+=1):(S.current=A.current==null||vt(A.current,E,y)||w?It(u):Xt(u),A.current=null,M())};L()}}else Xe(u,f)||(S.current=f,we(),ue.current=!1)}},[m,o,i,f,X,w,u,E,y,M,we,Ie]),Y(()=>{if(!m||i||!te||T||!G.current)return;const g=te.nodesRef.current,L=g.find(Z=>Z.id===U)?.context?.elements.floating,C=Kt(Nn(i)),$=g.some(Z=>Z.context&&Ge(Z.context.elements.floating,C));L&&!$&&ie.current&&L.focus({preventScroll:!0})},[m,i,te,U,T]),Y(()=>{se.current=M,j.current=o,G.current=!!i}),Y(()=>{o||(A.current=null,B.current=s)},[o,s]);const pe=f!=null,Q=l.useMemo(()=>{function g(C){if(!H.current)return;const $=u.current.indexOf(C.currentTarget);$!==-1&&S.current!==$&&(S.current=$,M(C))}return{onFocus(C){_.current=!0,g(C)},onClick:({currentTarget:C})=>C.focus({preventScroll:!0}),onMouseMove(C){_.current=!0,ue.current=!1,R&&g(C)},onPointerLeave(C){if(!H.current||!ie.current||C.pointerType==="touch")return;_.current=!0;const $=C.relatedTarget;!R||u.current.includes($)||me.current&&(S.current=-1,M(C),T||ee.current?.focus({preventScroll:!0}))}}},[H,ee,R,u,M,me,T]),J=l.useCallback(()=>I??te?.nodesRef.current.find(g=>g.id===U)?.context?.dataRef?.current.orientation,[U,te,I]),ye=de(g=>{if(ie.current=!1,_.current=!0,g.which===229||!H.current&&g.currentTarget===ee.current)return;if(w&&Or(g.key,E,y,O)){ct(g.key,J())||Re(g),n.setOpen(!1,xe(bt,g.nativeEvent)),Wt(r)&&(T?te?.events.emit("virtualfocus",r):r.focus());return}const L=S.current,C=It(u,x),$=Xt(u,x);if(v||(g.key==="Home"&&(Re(g),S.current=C,M(g)),g.key==="End"&&(Re(g),S.current=$,M(g))),O>1){const Z=re||Array.from({length:u.current.length},()=>({width:1,height:1})),le=Tr(Z,O,ae),ge=le.findIndex(Se=>Se!=null&&!Qe(u,Se,x)),be=le.reduce((Se,Me,Le)=>Me!=null&&!Qe(u,Me,x)?Le:Se,-1),ke=le[vr({current:le.map(Se=>Se!=null?u.current[Se]:null)},{event:g,orientation:E,loopFocus:P,rtl:y,cols:O,disabledIndices:Cr([...(typeof x!="function"?x:null)||u.current.map((Se,Me)=>Qe(u,Me,x)?Me:void 0),void 0],le),minIndex:ge,maxIndex:be,prevIndex:Mr(S.current>$?C:S.current,Z,le,O,g.key===Je?"bl":g.key===(y?He:Ue)?"tr":"tl"),stopEvent:!0})];if(ke!=null&&(S.current=ke,M(g)),E==="both")return}if(ct(g.key,E)){if(Re(g),o&&!T&&Kt(g.currentTarget.ownerDocument)===g.currentTarget){S.current=vt(g.key,E,y)?C:$,M(g);return}vt(g.key,E,y)?P?L>=$?b&&L!==u.current.length?S.current=-1:(_.current=!1,S.current=C):S.current=he(u,{startingIndex:L,disabledIndices:x}):S.current=Math.min($,he(u,{startingIndex:L,disabledIndices:x})):P?L<=C?b&&L!==-1?S.current=u.current.length:(_.current=!1,S.current=$):S.current=he(u,{startingIndex:L,decrement:!0,disabledIndices:x}):S.current=Math.max(C,he(u,{startingIndex:L,decrement:!0,disabledIndices:x})),Xe(u,S.current)&&(S.current=-1),M(g)}}),oe=l.useMemo(()=>T&&o&&pe&&{"aria-activedescendant":`${K}-${f}`},[T,o,pe,K,f]),ne=l.useMemo(()=>({"aria-orientation":E==="both"?void 0:E,...v?{}:oe,onKeyDown(g){if(g.key==="Tab"&&g.shiftKey&&o&&!T){const L=Vn(g.nativeEvent);if(L&&!Ge(ee.current,L))return;Re(g),n.setOpen(!1,xe(on,g.nativeEvent)),Wt(r)&&r.focus();return}ye(g)},onPointerMove(){ie.current=!0}}),[oe,ye,ee,E,v,n,o,T,r]),Te=l.useMemo(()=>{function g(C){s==="auto"&&jn(C.nativeEvent)&&(B.current=!T)}function L(C){B.current=s,s==="auto"&&kn(C.nativeEvent)&&(B.current=!0)}return{onKeyDown(C){const $=n.select("open");ie.current=!1;const Z=C.key.startsWith("Arrow"),le=Pr(C.key,J(),y),ge=ct(C.key,E),be=(w?le:ge)||C.key==="Enter"||C.key.trim()==="";if(T&&$)return ye(C);if(!(!$&&!a&&Z)){if(be){const ke=ct(C.key,J());A.current=w&&ke?null:C.key}if(w){le&&(Re(C),$?(S.current=It(u,Ie.current),M(C)):n.setOpen(!0,xe(bt,C.nativeEvent,C.currentTarget)));return}ge&&(X.current!=null&&(S.current=X.current),Re(C),!$&&a?n.setOpen(!0,xe(bt,C.nativeEvent,C.currentTarget)):ye(C),$&&M(C))}},onFocus(C){n.select("open")&&!T&&(S.current=-1,M(C))},onPointerDown:L,onPointerEnter:L,onMouseDown:g,onClick:g}},[ye,Ie,s,u,w,M,n,a,E,J,y,X,T]),Ae=l.useMemo(()=>({...oe,...Te}),[oe,Te]);return l.useMemo(()=>m?{reference:Ae,floating:ne,item:Q,trigger:Te}:{},[m,Ae,ne,Te,Q])}function Vr(t,e){const n="rootStore"in t?t.rootStore:t,o=n.useState("open"),i=n.context.dataRef,{listRef:r,activeIndex:c,onMatch:u,onTypingChange:f,enabled:d=!0,findMatch:m=null,resetMs:p=750,ignoreKeys:b=Ot,selectedIndex:P=null}=e,w=Fe(),y=l.useRef(""),T=l.useRef(P??c??-1),s=l.useRef(null);Y(()=>{o&&(w.clear(),s.current=null,y.current="")},[o,w]),Y(()=>{o&&y.current===""&&(T.current=P??c??-1)},[o,P,c]);const R=de(I=>{I?i.current.typing||(i.current.typing=I,f?.(I)):i.current.typing&&(i.current.typing=I,f?.(I))}),a=de(I=>{function O(W,z,D){const ee=m?m(z,D):z.find(U=>U?.toLocaleLowerCase().indexOf(D.toLocaleLowerCase())===0);return ee?W.indexOf(ee):-1}const N=r.current;if(y.current.length>0&&y.current[0]!==" "&&(O(N,N,y.current)===-1?R(!1):I.key===" "&&Re(I)),N==null||b.includes(I.key)||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;o&&I.key!==" "&&(Re(I),R(!0)),N.every(W=>W?W[0]?.toLocaleLowerCase()!==W[1]?.toLocaleLowerCase():!0)&&y.current===I.key&&(y.current="",T.current=s.current),y.current+=I.key,w.start(p,()=>{y.current="",T.current=s.current,R(!1)});const ae=T.current,K=O(N,[...N.slice((ae||0)+1),...N.slice(0,(ae||0)+1)],y.current);K!==-1?(u?.(K),s.current=K):I.key!==" "&&(y.current="",R(!1))}),x=l.useMemo(()=>({onKeyDown:a}),[a]),E=l.useMemo(()=>({onKeyDown:a,onKeyUp(I){I.key===" "&&R(!1)}}),[a,R]);return l.useMemo(()=>d?{reference:x,floating:E}:{},[d,x,E])}function jr(t){const e=l.useRef(!0);e.current&&(e.current=!1,t())}const mn=l.createContext(null),gn=l.createContext(null);function je(){const t=l.useContext(mn);if(t===null)throw new Error(dt(60));return t}function hn(){const t=l.useContext(gn);if(t===null)throw new Error(dt(61));return t}const kr=(t,e)=>Object.is(t,e);function Ke(t,e,n){return t==null||e==null?Object.is(t,e):n(t,e)}function Tt(t,e,n){return!t||t.length===0?!1:t.some(o=>o===void 0?!1:Ke(o,e,n))}function jt(t,e,n){return!t||t.length===0?-1:t.findIndex(o=>o===void 0?!1:Ke(o,e,n))}function Lr(t,e,n){return t.filter(o=>!Ke(o,e,n))}function kt(t){if(t==null)return"";if(typeof t=="string")return t;try{return JSON.stringify(t)}catch{return String(t)}}function xn(t){return t!=null&&t.length>0&&typeof t[0]=="object"&&t[0]!=null&&"items"in t[0]}function Dr(t){if(!Array.isArray(t))return t!=null&&!("null"in t);if(xn(t)){for(const e of t)for(const n of e.items)if(n&&n.value==null&&n.label!=null)return!0;return!1}for(const e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function Fr(t,e){if(e&&t!=null)return e(t)??"";if(t&&typeof t=="object"){if("label"in t&&t.label!=null)return String(t.label);if("value"in t)return String(t.value)}return kt(t)}function ze(t,e){return e&&t!=null?e(t)??"":t&&typeof t=="object"&&"value"in t&&"label"in t?kt(t.value):kt(t)}function yn(t,e,n){function o(){return Fr(t,n)}if(n&&t!=null)return n(t);if(t&&typeof t=="object"&&"label"in t&&t.label!=null)return t.label;if(e&&!Array.isArray(e))return e[t]??o();if(Array.isArray(e)){const i=xn(e)?e.flatMap(r=>r.items):e;if(t==null||typeof t!="object"){const r=i.find(c=>c.value===t);return r&&r.label!=null?r.label:o()}if("value"in t){const r=i.find(c=>c&&c.value===t.value);if(r&&r.label!=null)return r.label}}return o()}function Hr(t,e,n){return t.reduce((o,i,r)=>(r>0&&o.push(", "),o.push(h.jsx(l.Fragment,{children:yn(i,e,n)},r)),o),[])}const V={id:q(t=>t.id),modal:q(t=>t.modal),multiple:q(t=>t.multiple),items:q(t=>t.items),itemToStringLabel:q(t=>t.itemToStringLabel),itemToStringValue:q(t=>t.itemToStringValue),isItemEqualToValue:q(t=>t.isItemEqualToValue),value:q(t=>t.value),hasSelectedValue:q(t=>{const{value:e,multiple:n,itemToStringValue:o}=t;return e==null?!1:n&&Array.isArray(e)?e.length>0:ze(e,o)!==""}),hasNullItemLabel:q((t,e)=>e?Dr(t.items):!1),open:q(t=>t.open),mounted:q(t=>t.mounted),forceMount:q(t=>t.forceMount),transitionStatus:q(t=>t.transitionStatus),openMethod:q(t=>t.openMethod),activeIndex:q(t=>t.activeIndex),selectedIndex:q(t=>t.selectedIndex),isActive:q((t,e)=>t.activeIndex===e),isSelected:q((t,e,n)=>{const o=t.isItemEqualToValue,i=t.value;return t.multiple?Array.isArray(i)&&i.some(r=>Ke(r,n,o)):t.selectedIndex===e&&t.selectedIndex!==null?!0:Ke(i,n,o)}),isSelectedByFocus:q((t,e)=>t.selectedIndex===e),popupProps:q(t=>t.popupProps),triggerProps:q(t=>t.triggerProps),triggerElement:q(t=>t.triggerElement),positionerElement:q(t=>t.positionerElement),listElement:q(t=>t.listElement),scrollUpArrowVisible:q(t=>t.scrollUpArrowVisible),scrollDownArrowVisible:q(t=>t.scrollDownArrowVisible),hasScrollArrows:q(t=>t.hasScrollArrows)};function Ur(t,e){const n=l.useRef(t),o=de(e);Y(()=>{n.current!==t&&o(n.current)},[t,o]),Y(()=>{n.current=t},[t])}function Br(t){const{id:e,value:n,defaultValue:o=null,onValueChange:i,open:r,defaultOpen:c=!1,onOpenChange:u,name:f,disabled:d=!1,readOnly:m=!1,required:p=!1,modal:b=!0,actionsRef:P,inputRef:w,onOpenChangeComplete:y,items:T,multiple:s=!1,itemToStringLabel:R,itemToStringValue:a,isItemEqualToValue:x=kr,highlightItemOnHover:E=!0,children:I}=t,{clearErrors:O}=ur(),{setDirty:N,setTouched:re,setFocused:ae,shouldValidateOnChange:K,validityData:W,setFilled:z,name:D,disabled:ee,validation:U,validationMode:te}=fn(),v=dn({id:e}),B=ee||d,S=D??f,[A,ie]=Yt({controlled:n,default:s?o??Ot:o,name:"Select",state:"value"}),[M,se]=Yt({controlled:r,default:c,name:"Select",state:"open"}),G=l.useRef([]),j=l.useRef([]),_=l.useRef(null),ue=l.useRef(null),Ie=l.useRef(0),H=l.useRef(null),fe=l.useRef([]),X=l.useRef(!1),me=l.useRef(!1),we=l.useRef(null),pe=l.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Q=l.useRef(!1),{mounted:J,setMounted:ye,transitionStatus:oe}=Ft(M),{openMethod:ne,triggerProps:Te,reset:Ae}=Ln(M),g=Nt(()=>new Dn({id:v,modal:b,multiple:s,itemToStringLabel:R,itemToStringValue:a,isItemEqualToValue:x,value:A,open:M,mounted:J,transitionStatus:oe,items:T,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,L=k(g,V.activeIndex),C=k(g,V.selectedIndex),$=k(g,V.triggerElement),Z=k(g,V.positionerElement),le=l.useMemo(()=>s&&Array.isArray(A)&&A.length===0?"":ze(A,a),[s,A,a]),ge=l.useMemo(()=>s&&Array.isArray(A)?A.map(F=>ze(F,a)):ze(A,a),[s,A,a]),be=De(g.state.triggerElement);fr({id:v,commit:U.commit,value:A,controlRef:be,name:S,getValue:()=>ge});const ke=l.useRef(A);Y(()=>{A!==ke.current&&g.set("forceMount",!0)},[g,A]),Y(()=>{z(s?Array.isArray(A)&&A.length>0:A!=null)},[s,A,z]),Y(function(){if(M)return;const ce=fe.current;if(s){const Ee=Array.isArray(A)?A:[];if(Ee.length===0){g.set("selectedIndex",null);return}const ve=Ee[Ee.length-1],rt=jt(ce,ve,x);g.set("selectedIndex",rt===-1?null:rt);return}const Ce=jt(ce,A,x);g.set("selectedIndex",Ce===-1?null:Ce)},[s,M,A,fe,x,g]),Ur(A,()=>{O(S),N(A!==W.initialValue),K()?U.commit(A):U.commit(A,!0)});const Se=de((F,ce)=>{if(u?.(F,ce),!ce.isCanceled&&(se(F),!F&&(ce.reason===on||ce.reason===Fn)&&(re(!0),ae(!1),te==="onBlur"&&U.commit(A)),!F&&g.state.activeIndex!==null)){const Ce=G.current[g.state.activeIndex];queueMicrotask(()=>{Ce?.setAttribute("tabindex","-1")})}}),Me=de(()=>{ye(!1),g.set("activeIndex",null),Ae(),y?.(!1)});pt({enabled:!P,open:M,ref:_,onComplete(){M||Me()}}),l.useImperativeHandle(P,()=>({unmount:Me}),[Me]);const Le=de((F,ce)=>{i?.(F,ce),!ce.isCanceled&&ie(F)}),Pe=de(()=>{const F=g.state.listElement||_.current;if(!F)return;const ce=F.scrollTop,Ce=F.scrollTop+F.clientHeight,Ee=ce>1,ve=Cesn(Be(),Te,v?{id:v}:nn),[Be,Te,v]);jr(()=>{g.update({popupProps:_e(),triggerProps:Ye})}),Y(()=>{g.update({id:v,modal:b,multiple:s,value:A,open:M,mounted:J,transitionStatus:oe,popupProps:_e(),triggerProps:Ye,items:T,itemToStringLabel:R,itemToStringValue:a,isItemEqualToValue:x,openMethod:ne})},[g,v,b,s,A,M,J,oe,_e,Ye,T,R,a,x,ne]);const tt=l.useMemo(()=>({store:g,name:S,required:p,disabled:B,readOnly:m,multiple:s,itemToStringLabel:R,itemToStringValue:a,highlightItemOnHover:E,setValue:Le,setOpen:Se,listRef:G,popupRef:_,scrollHandlerRef:ue,handleScrollArrowVisibility:Pe,scrollArrowsMountedCountRef:Ie,getItemProps:et,events:Oe.context.events,valueRef:H,valuesRef:fe,labelsRef:j,typingRef:X,selectionRef:pe,selectedItemTextRef:we,validation:U,onOpenChangeComplete:y,keyboardActiveRef:me,alignItemWithTriggerActiveRef:Q,initialValueRef:ke}),[g,S,p,B,m,s,R,a,E,Le,Se,et,Oe.context.events,U,y,Pe]),nt=ln(w,U.inputRef),ht=s&&Array.isArray(A)&&A.length>0,xt=l.useMemo(()=>!s||!Array.isArray(A)||!S?null:A.map(F=>{const ce=ze(F,a);return h.jsx("input",{type:"hidden",name:S,value:ce},ce)}),[s,A,S,a]);return h.jsx(mn.Provider,{value:tt,children:h.jsxs(gn.Provider,{value:Oe,children:[I,h.jsx("input",{...U.getInputValidationProps({onFocus(){g.state.triggerElement?.focus({focusVisible:!0})},onChange(F){if(F.nativeEvent.defaultPrevented)return;const ce=F.target.value,Ce=xe(Ht,F.nativeEvent);function Ee(){if(s)return;const ve=fe.current.find(rt=>ze(rt,a).toLowerCase()===ce.toLowerCase());ve!=null&&(N(ve!==W.initialValue),Le(ve,Ce),K()&&U.commit(ve))}g.set("forceMount",!0),queueMicrotask(Ee)}}),name:s?void 0:S,value:le,disabled:B,required:p&&!ht,readOnly:m,ref:nt,style:S?_n:zn,tabIndex:-1,"aria-hidden":!0}),xt]})})}function _r(t){const e=t.getBoundingClientRect(),n=window.getComputedStyle(t,"::before"),o=window.getComputedStyle(t,"::after");if(!(n.content!=="none"||o.content!=="none"))return e;const r=parseFloat(n.width)||0,c=parseFloat(n.height)||0,u=parseFloat(o.width)||0,f=parseFloat(o.height)||0,d=Math.max(e.width,r,u),m=Math.max(e.height,c,f),p=d-e.width,b=m-e.height;return{left:e.left-p/2,right:e.right+p/2,top:e.top-b/2,bottom:e.bottom+b/2}}const at=2,zr=400,Qt=200,Kr={...Wn,...pr,value:()=>null},Wr=l.forwardRef(function(e,n){const{render:o,className:i,id:r,disabled:c=!1,nativeButton:u=!0,...f}=e,{setTouched:d,setFocused:m,validationMode:p,state:b,disabled:P}=fn(),{labelId:w}=dr(),{store:y,setOpen:T,selectionRef:s,validation:R,readOnly:a,required:x,alignItemWithTriggerActiveRef:E,disabled:I,keyboardActiveRef:O}=je(),N=P||I||c,re=k(y,V.open),ae=k(y,V.value),K=k(y,V.triggerProps),W=k(y,V.positionerElement),z=k(y,V.listElement),D=k(y,V.id),ee=k(y,V.hasSelectedValue),U=!ee&&re,te=k(y,V.hasNullItemLabel,U),v=r??D;dn({id:v});const B=De(W),S=l.useRef(null),{getButtonProps:A,buttonRef:ie}=cn({disabled:N,native:u}),M=de(X=>{y.set("triggerElement",X)}),se=ln(n,S,ie,M),G=Fe(),j=Fe(),_=Fe(),ue=Fe();l.useEffect(()=>{if(re)return!(ee||te)?_.start(zr,()=>{s.current.allowUnselectedMouseUp=!0,s.current.allowSelectedMouseUp=!0}):ue.start(Qt,()=>{s.current.allowUnselectedMouseUp=!0,_.start(Qt,()=>{s.current.allowSelectedMouseUp=!0})}),()=>{_.clear(),ue.clear()};s.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},j.clear()},[re,ee,te,s,j,_,ue]);const Ie=l.useMemo(()=>z?.id??rn(W)?.id,[z,W]),H=sn(K,{id:v,role:"combobox","aria-expanded":re?"true":"false","aria-haspopup":"listbox","aria-controls":re?Ie:void 0,"aria-labelledby":w,"aria-readonly":a||void 0,"aria-required":x||void 0,tabIndex:N?-1:0,ref:se,onFocus(X){m(!0),re&&E.current&&T(!1,xe(Ht,X.nativeEvent)),G.start(0,()=>{y.set("forceMount",!0)})},onBlur(X){Ge(W,X.relatedTarget)||(d(!0),m(!1),p==="onBlur"&&R.commit(ae))},onPointerMove(){O.current=!1},onKeyDown(){O.current=!0},onMouseDown(X){if(re)return;const me=Vt(X.currentTarget);function we(pe){if(!S.current)return;const Q=pe.target;if(Ge(S.current,Q)||Ge(B.current,Q)||Q===S.current)return;const J=_r(S.current);pe.clientX>=J.left-at&&pe.clientX<=J.right+at&&pe.clientY>=J.top-at&&pe.clientY<=J.bottom+at||T(!1,xe(Kn,pe))}j.start(0,()=>{me.addEventListener("mouseup",we,{once:!0})})}},R.getValidationProps,f,A);H.role="combobox";const fe=l.useMemo(()=>({...b,open:re,disabled:N,value:ae,readOnly:a,placeholder:!ee}),[b,re,N,ae,a,ee]);return Ve("button",e,{ref:[n,S],state:fe,stateAttributesMapping:Kr,props:H})}),$r={value:()=>null},qr=l.forwardRef(function(e,n){const{className:o,render:i,children:r,placeholder:c,...u}=e,{store:f,valueRef:d}=je(),m=k(f,V.value),p=k(f,V.items),b=k(f,V.itemToStringLabel),P=k(f,V.hasSelectedValue),w=!P&&c!=null&&r==null,y=k(f,V.hasNullItemLabel,w),T=l.useMemo(()=>({value:m,placeholder:!P}),[m,P]);let s=null;return typeof r=="function"?s=r(m):r!=null?s=r:!P&&c!=null&&!y?s=c:Array.isArray(m)?s=Hr(m,p,b):s=yn(m,p,b),Ve("span",e,{state:T,ref:[n,d],props:[{children:s},u],stateAttributesMapping:$r})}),Yr=l.forwardRef(function(e,n){const{className:o,render:i,...r}=e,{store:c}=je(),u=k(c,V.open),f=l.useMemo(()=>({open:u}),[u]);return Ve("span",e,{state:f,ref:n,props:[{"aria-hidden":!0,children:"▼"},r],stateAttributesMapping:$n})}),Gr=l.createContext(void 0),Xr=l.forwardRef(function(e,n){const{store:o}=je(),i=k(o,V.mounted),r=k(o,V.forceMount);return i||r?h.jsx(Gr.Provider,{value:!0,children:h.jsx(qn,{ref:n,...e})}):null}),bn=l.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Qr(){return l.useContext(bn)}function Jr(t){const{children:e,elementsRef:n,labelsRef:o,onMapChange:i}=t,r=de(i),c=l.useRef(0),u=Nt(eo).current,f=Nt(Zr).current,[d,m]=l.useState(0),p=l.useRef(d),b=de((s,R)=>{f.set(s,R??null),p.current+=1,m(p.current)}),P=de(s=>{f.delete(s),p.current+=1,m(p.current)}),w=l.useMemo(()=>{const s=new Map;return Array.from(f.keys()).filter(a=>a.isConnected).sort(to).forEach((a,x)=>{const E=f.get(a)??{};s.set(a,{...E,index:x})}),s},[f,d]);Y(()=>{if(typeof MutationObserver!="function"||w.size===0)return;const s=new MutationObserver(R=>{const a=new Set,x=E=>a.has(E)?a.delete(E):a.add(E);R.forEach(E=>{E.removedNodes.forEach(x),E.addedNodes.forEach(x)}),a.size===0&&(p.current+=1,m(p.current))});return w.forEach((R,a)=>{a.parentElement&&s.observe(a.parentElement,{childList:!0})}),()=>{s.disconnect()}},[w]),Y(()=>{p.current===d&&(n.current.length!==w.size&&(n.current.length=w.size),o&&o.current.length!==w.size&&(o.current.length=w.size),c.current=w.size),r(w)},[r,w,n,o,d]),Y(()=>()=>{n.current=[]},[n]),Y(()=>()=>{o&&(o.current=[])},[o]);const y=de(s=>(u.add(s),()=>{u.delete(s)}));Y(()=>{u.forEach(s=>s(w))},[u,w]);const T=l.useMemo(()=>({register:b,unregister:P,subscribeMapChange:y,elementsRef:n,labelsRef:o,nextIndexRef:c}),[b,P,y,n,o,c]);return h.jsx(bn.Provider,{value:T,children:e})}function Zr(){return new Map}function eo(){return new Set}function to(t,e){const n=t.compareDocumentPosition(e);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Rn=l.createContext(void 0);function Ut(){const t=l.useContext(Rn);if(!t)throw new Error(dt(59));return t}function ft(t,e){t&&Object.assign(t.style,e)}const wn={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},no={position:"fixed"},ro=l.forwardRef(function(e,n){const{anchor:o,positionMethod:i="absolute",className:r,render:c,side:u="bottom",align:f="center",sideOffset:d=0,alignOffset:m=0,collisionBoundary:p="clipping-ancestors",collisionPadding:b,arrowPadding:P=5,sticky:w=!1,disableAnchorTracking:y,alignItemWithTrigger:T=!0,collisionAvoidance:s=Yn,...R}=e,{store:a,listRef:x,labelsRef:E,alignItemWithTriggerActiveRef:I,selectedItemTextRef:O,valuesRef:N,initialValueRef:re,popupRef:ae,setValue:K}=je(),W=hn(),z=k(a,V.open),D=k(a,V.mounted),ee=k(a,V.modal),U=k(a,V.value),te=k(a,V.openMethod),v=k(a,V.positionerElement),B=k(a,V.triggerElement),S=k(a,V.isItemEqualToValue),A=l.useRef(null),ie=l.useRef(null),[M,se]=l.useState(T),G=D&&M&&te!=="touch";!D&&M!==T&&se(T),Y(()=>{D||(V.scrollUpArrowVisible(a.state)&&a.set("scrollUpArrowVisible",!1),V.scrollDownArrowVisible(a.state)&&a.set("scrollDownArrowVisible",!1))},[a,D]),l.useImperativeHandle(I,()=>G),Gn((G||ee)&&z&&te!=="touch",B);const j=Xn({anchor:o,floatingRootContext:W,positionMethod:i,mounted:D,side:u,sideOffset:d,align:f,alignOffset:m,arrowPadding:P,collisionBoundary:p,collisionPadding:b,sticky:w,disableAnchorTracking:y??G,collisionAvoidance:s,keepMounted:!0}),_=G?"none":j.side,ue=G?no:j.positionerStyles,Ie=l.useMemo(()=>{const Q={};return z||(Q.pointerEvents="none"),{role:"presentation",hidden:!D,style:{...ue,...Q}}},[z,D,ue]),H=l.useMemo(()=>({open:z,side:_,align:j.align,anchorHidden:j.anchorHidden}),[z,_,j.align,j.anchorHidden]),fe=de(Q=>{a.set("positionerElement",Q)}),X=Ve("div",e,{ref:[n,fe],state:H,stateAttributesMapping:an,props:[Ie,R]}),me=l.useRef(0),we=de(Q=>{if(Q.size===0&&me.current===0||N.current.length===0)return;const J=me.current;if(me.current=Q.size,Q.size===J)return;const ye=xe(Ht);if(J!==0&&!a.state.multiple&&U!==null&&jt(N.current,U,S)===-1){const ne=re.current,Ae=ne!=null&&Tt(N.current,ne,S)?ne:null;K(Ae,ye),Ae===null&&(a.set("selectedIndex",null),O.current=null)}if(J!==0&&a.state.multiple&&Array.isArray(U)){const oe=U.filter(ne=>Tt(N.current,ne,S));(oe.length!==U.length||oe.some(ne=>!Tt(U,ne,S)))&&(K(oe,ye),oe.length===0&&(a.set("selectedIndex",null),O.current=null))}if(z&&G){a.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const oe={height:""};ft(v,oe),ft(ae.current,oe)}}),pe=l.useMemo(()=>({...j,side:_,alignItemWithTriggerActive:G,setControlledAlignItemWithTrigger:se,scrollUpArrowRef:A,scrollDownArrowRef:ie}),[j,_,G,se]);return h.jsx(Jr,{elementsRef:x,labelsRef:E,onMapChange:we,children:h.jsxs(Rn.Provider,{value:pe,children:[D&&ee&&h.jsx(Qn,{inert:Jn(!z),cutout:B}),X]})})});function Sn(t){const e=t.currentTarget.getBoundingClientRect();return e.top+1<=t.clientY&&t.clientY<=e.bottom-1&&e.left+1<=t.clientX&&t.clientX<=e.right-1}const ut="base-ui-disable-scrollbar",Lt={className:ut,getElement(t){return h.jsx("style",{nonce:t,href:ut,precedence:"base-ui:low",children:`.${ut}{scrollbar-width:none}.${ut}::-webkit-scrollbar{display:none}`})}},oo=l.createContext(void 0);function so(t){return l.useContext(oo)}function io(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}const lo=l.createContext(void 0),co={disableStyleElements:!1};function ao(){return l.useContext(lo)??co}const uo={...an,...un},fo=l.forwardRef(function(e,n){const{render:o,className:i,...r}=e,{store:c,popupRef:u,onOpenChangeComplete:f,setOpen:d,valueRef:m,selectedItemTextRef:p,keyboardActiveRef:b,multiple:P,handleScrollArrowVisibility:w,scrollHandlerRef:y,highlightItemOnHover:T}=je(),{side:s,align:R,alignItemWithTriggerActive:a,setControlledAlignItemWithTrigger:x,scrollDownArrowRef:E,scrollUpArrowRef:I}=Ut(),O=so()!=null,N=hn(),{nonce:re,disableStyleElements:ae}=ao(),K=Fe(),W=k(c,V.id),z=k(c,V.open),D=k(c,V.mounted),ee=k(c,V.popupProps),U=k(c,V.transitionStatus),te=k(c,V.triggerElement),v=k(c,V.positionerElement),B=k(c,V.listElement),S=l.useRef(0),A=l.useRef(!1),ie=l.useRef(0),M=l.useRef(!1),se=l.useRef({}),G=tn(),j=de(H=>{if(!v||!u.current||!M.current)return;if(A.current||!a){w();return}const fe=v.style.top==="0px",X=v.style.bottom==="0px",me=v.getBoundingClientRect().height,we=Vt(v),pe=getComputedStyle(v),Q=parseFloat(pe.marginTop),J=parseFloat(pe.marginBottom),ye=Jt(getComputedStyle(u.current)),oe=we.documentElement.clientHeight-Q-J,ne=H.scrollTop,Te=H.scrollHeight,Ae=H.clientHeight,g=Te-Ae;let L=0,C=null,$=!1;if(fe){const Z=g-ne,le=me+Z,ge=Math.min(le,oe);L=ge,ge!==oe?C=g:$=!0}else if(X){const Z=ne-0,le=me+Z,ge=Math.min(le,oe),be=le-oe;L=ge,ge!==oe?C=0:($=!0,ne=ye)&&(A.current=!0),w()});l.useImperativeHandle(y,()=>j,[j]),pt({open:z,ref:u,onComplete(){z&&f?.(!0)}});const _=l.useMemo(()=>({open:z,transitionStatus:U,side:s,align:R}),[z,U,s,R]);Y(()=>{!v||!u.current||Object.keys(se.current).length||(se.current={top:v.style.top||"0",left:v.style.left||"0",right:v.style.right,height:v.style.height,bottom:v.style.bottom,minHeight:v.style.minHeight,maxHeight:v.style.maxHeight,marginTop:v.style.marginTop,marginBottom:v.style.marginBottom})},[u,v]),Y(()=>{z||a||(M.current=!1,A.current=!1,S.current=0,ie.current=0,ft(v,se.current))},[z,a,v,u]),Y(()=>{const H=u.current;if(!(!z||!te||!v||!H||c.state.transitionStatus==="ending")){if(!a){M.current=!0,G.request(w),H.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{const fe=mo(H);H.style.removeProperty("--transform-origin");try{const X=getComputedStyle(v),me=getComputedStyle(H),we=Vt(te),pe=$t(v),Q=te.getBoundingClientRect(),J=v.getBoundingClientRect(),ye=Q.left,oe=Q.height,ne=B||H,Te=ne.scrollHeight,Ae=parseFloat(me.borderBottomWidth),g=parseFloat(X.marginTop)||10,L=parseFloat(X.marginBottom)||10,C=parseFloat(X.minHeight)||100,$=Jt(me),Z=5,le=5,ge=20,be=we.documentElement.clientHeight-g-L,ke=we.documentElement.clientWidth,Se=be-Q.bottom+oe,Me=p.current,Le=m.current;let Pe,Oe=0,Ze=0;if(Me&&Le){const F=Le.getBoundingClientRect();Pe=Me.getBoundingClientRect();const ce=F.left-ye,Ce=Pe.left-J.left,Ee=F.top-Q.top+F.height/2,ve=Pe.top-J.top+Pe.height/2;Oe=ce-Ce,Ze=ve-Ee}const qe=Se+Ze+L+Ae;let Ne=Math.min(be,qe);const gt=be-g-L,Be=qe-Ne,_e=Math.max(Z,ye+Oe),et=ke-le,Ye=Math.max(0,_e+J.width-et);v.style.left=`${_e-Ye}px`,v.style.height=`${Ne}px`,v.style.maxHeight="auto",v.style.marginTop=`${g}px`,v.style.marginBottom=`${L}px`,H.style.height="100%";const tt=ne.scrollHeight-ne.clientHeight,nt=Be>=tt;nt&&(Ne=Math.min(be,J.height)-(Be-tt));const ht=Q.topbe-ge||Nex(!1));return}if(nt){const F=Math.max(0,be-qe);v.style.top=J.height>=gt?"0":`${F}px`,v.style.height=`${Ne}px`,ne.scrollTop=ne.scrollHeight-ne.clientHeight,S.current=Math.max(C,Ne)}else v.style.bottom="0",S.current=Math.max(C,Ne),ne.scrollTop=Be;if(Pe){const F=J.top,ce=J.height,Ce=Pe.top+Pe.height/2,Ee=ce>0?(Ce-F)/ce*100:50,ve=io(Ee,0,100);H.style.setProperty("--transform-origin",`50% ${ve}%`)}(S.current===be||Ne>=$)&&(A.current=!0),w(),setTimeout(()=>{M.current=!0})}finally{fe()}})}},[c,z,v,te,m,p,u,w,a,x,G,E,I,B]),l.useEffect(()=>{if(!a||!v||!z)return;const H=$t(v);function fe(X){d(!1,xe(nr,X))}return H.addEventListener("resize",fe),()=>{H.removeEventListener("resize",fe)}},[d,a,v,z]);const ue={...B?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":P||void 0,id:`${W}-list`},onKeyDown(H){b.current=!0,O&&or.has(H.key)&&H.stopPropagation()},onMouseMove(){b.current=!1},onPointerLeave(H){if(!T||Sn(H)||H.pointerType==="touch")return;const fe=H.currentTarget;K.start(0,()=>{c.set("activeIndex",null),fe.focus({preventScroll:!0})})},onScroll(H){B||y.current?.(H.currentTarget)},...a&&{style:B?{height:"100%"}:wn}},Ie=Ve("div",e,{ref:[n,u],state:_,stateAttributesMapping:uo,props:[ee,ue,rr(U),{className:!B&&a?Lt.className:void 0},r]});return h.jsxs(l.Fragment,{children:[!ae&&Lt.getElement(re),h.jsx(tr,{context:N,modal:!1,disabled:!D,restoreFocus:!0,children:Ie})]})});function Jt(t){const e=t.maxHeight||"";return e.endsWith("px")&&parseFloat(e)||1/0}const Zt={transform:"none",scale:"1",translate:"0 0"};function po(t,e,n){n?t.setProperty(e,n):t.removeProperty(e)}function mo(t){const{style:e}=t,n={},o=Object.keys(Zt);for(const i of o)n[i]=e.getPropertyValue(i),e.setProperty(i,Zt[i]);return()=>{for(const i of o)po(e,i,n[i])}}const go=l.forwardRef(function(e,n){const{className:o,render:i,...r}=e,{store:c,scrollHandlerRef:u}=je(),{alignItemWithTriggerActive:f}=Ut(),d=k(c,V.hasScrollArrows),m=k(c,V.openMethod),p=k(c,V.multiple),P={id:`${k(c,V.id)}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(y){u.current?.(y.currentTarget)},...f&&{style:wn},className:d&&m!=="touch"?Lt.className:void 0},w=de(y=>{c.set("listElement",y)});return Ve("div",e,{ref:[n,w],props:[P,r]})});let In=(function(t){return t[t.None=0]="None",t[t.GuessFromOrder=1]="GuessFromOrder",t})({});function ho(t={}){const{label:e,metadata:n,textRef:o,indexGuessBehavior:i,index:r}=t,{register:c,unregister:u,subscribeMapChange:f,elementsRef:d,labelsRef:m,nextIndexRef:p}=Qr(),b=l.useRef(-1),[P,w]=l.useState(r??(i===In.GuessFromOrder?()=>{if(b.current===-1){const s=p.current;p.current+=1,b.current=s}return b.current}:-1)),y=l.useRef(null),T=l.useCallback(s=>{if(y.current=s,P!==-1&&s!==null&&(d.current[P]=s,m)){const R=e!==void 0;m.current[P]=R?e:o?.current?.textContent??s.textContent}},[P,d,m,e,o]);return Y(()=>{if(r!=null)return;const s=y.current;if(s)return c(s,n),()=>{u(s)}},[r,c,u,n]),Y(()=>{if(r==null)return f(s=>{const R=y.current?s.get(y.current)?.index:null;R!=null&&w(R)})},[r,f,w]),l.useMemo(()=>({ref:T,index:P}),[P,T])}const vn=l.createContext(void 0);function Bt(){const t=l.useContext(vn);if(!t)throw new Error(dt(57));return t}const xo=l.memo(l.forwardRef(function(e,n){const{render:o,className:i,value:r=null,label:c,disabled:u=!1,nativeButton:f=!1,...d}=e,m=l.useRef(null),p=ho({label:c,textRef:m,indexGuessBehavior:In.GuessFromOrder}),{store:b,getItemProps:P,setOpen:w,setValue:y,selectionRef:T,typingRef:s,valuesRef:R,keyboardActiveRef:a,multiple:x,highlightItemOnHover:E}=je(),I=Fe(),O=k(b,V.isActive,p.index),N=k(b,V.isSelected,p.index,r),re=k(b,V.isSelectedByFocus,p.index),ae=k(b,V.isItemEqualToValue),K=p.index,W=K!==-1,z=l.useRef(null),D=De(K);Y(()=>{if(!W)return;const j=R.current;return j[K]=r,()=>{delete j[K]}},[W,K,r,R]),Y(()=>{if(!W)return;const j=b.state.value;let _=j;x&&Array.isArray(j)&&j.length>0&&(_=j[j.length-1]),_!==void 0&&Ke(_,r,ae)&&b.set("selectedIndex",K)},[W,K,x,ae,b,r]);const ee=l.useMemo(()=>({disabled:u,selected:N,highlighted:O}),[u,N,O]),U=P({active:O,selected:N});U.onFocus=void 0,U.id=void 0;const te=l.useRef(null),v=l.useRef("mouse"),B=l.useRef(!1),{getButtonProps:S,buttonRef:A}=cn({disabled:u,focusableWhenDisabled:!0,native:f});function ie(j){const _=b.state.value;if(x){const ue=Array.isArray(_)?_:[],Ie=N?Lr(ue,r,ae):[...ue,r];y(Ie,xe(Rt,j))}else y(r,xe(Rt,j)),w(!1,xe(Rt,j))}const M={role:"option","aria-selected":N,tabIndex:O?0:-1,onFocus(){b.set("activeIndex",K)},onMouseEnter(){!a.current&&b.state.selectedIndex===null&&b.set("activeIndex",K)},onMouseMove(){E&&b.set("activeIndex",K)},onMouseLeave(j){!E||a.current||Sn(j)||I.start(0,()=>{b.state.activeIndex===K&&b.set("activeIndex",null)})},onTouchStart(){T.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(j){te.current=j.key,b.set("activeIndex",K)},onClick(j){B.current=!1,!(j.type==="keydown"&&te.current===null)&&(u||te.current===" "&&s.current||v.current!=="touch"&&!O||(te.current=null,ie(j.nativeEvent)))},onPointerEnter(j){v.current=j.pointerType},onPointerDown(j){v.current=j.pointerType,B.current=!0},onMouseUp(j){if(u)return;if(B.current){B.current=!1;return}const _=!T.current.allowSelectedMouseUp&&N,ue=!T.current.allowUnselectedMouseUp&&!N;_||ue||v.current!=="touch"&&!O||ie(j.nativeEvent)}},se=Ve("div",e,{ref:[A,n,p.ref,z],state:ee,props:[U,M,d,S]}),G=l.useMemo(()=>({selected:N,indexRef:D,textRef:m,selectedByFocus:re,hasRegistered:W}),[N,D,m,re,W]);return h.jsx(vn.Provider,{value:G,children:se})})),yo=l.forwardRef(function(e,n){const o=e.keepMounted??!1,{selected:i}=Bt();return o||i?h.jsx(bo,{...e,ref:n}):null}),bo=l.memo(l.forwardRef((t,e)=>{const{render:n,className:o,keepMounted:i,...r}=t,{selected:c}=Bt(),u=l.useRef(null),{transitionStatus:f,setMounted:d}=Ft(c),m=l.useMemo(()=>({selected:c,transitionStatus:f}),[c,f]),p=Ve("span",t,{ref:[e,u],state:m,props:[{"aria-hidden":!0,children:"✔️"},r],stateAttributesMapping:un});return pt({open:c,ref:u,onComplete(){c||d(!1)}}),p})),Ro=l.memo(l.forwardRef(function(e,n){const{indexRef:o,textRef:i,selectedByFocus:r,hasRegistered:c}=Bt(),{selectedItemTextRef:u}=je(),{className:f,render:d,...m}=e,p=l.useCallback(P=>{if(!P||!c)return;const w=u.current===null||!u.current.isConnected;(r||w&&o.current===0)&&(u.current=P)},[u,o,r,c]);return Ve("div",e,{ref:[p,n,i],props:m})})),Tn=l.forwardRef(function(e,n){const{render:o,className:i,direction:r,keepMounted:c=!1,...u}=e,{store:f,popupRef:d,listRef:m,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:b}=je(),{side:P,scrollDownArrowRef:w,scrollUpArrowRef:y}=Ut(),T=r==="up"?V.scrollUpArrowVisible:V.scrollDownArrowVisible,s=k(f,T),R=k(f,V.openMethod),a=s&&R!=="touch",x=Fe(),E=r==="up"?y:w,{transitionStatus:I,setMounted:O}=Ft(a);Y(()=>(b.current+=1,f.state.hasScrollArrows||f.set("hasScrollArrows",!0),()=>{b.current=Math.max(0,b.current-1),b.current===0&&f.state.hasScrollArrows&&f.set("hasScrollArrows",!1)}),[f,b]),pt({open:a,ref:E,onComplete(){a||O(!1)}});const N=l.useMemo(()=>({direction:r,visible:a,side:P,transitionStatus:I}),[r,a,P,I]),ae=Ve("div",e,{ref:[n,E],state:N,props:[{"aria-hidden":!0,children:r==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(W){if(W.movementX===0&&W.movementY===0||x.isStarted())return;f.set("activeIndex",null);function z(){const D=f.state.listElement??d.current;if(!D)return;f.set("activeIndex",null),p();const ee=D.scrollTop===0,U=Math.round(D.scrollTop+D.clientHeight)>=D.scrollHeight;if(m.current.length===0&&(r==="up"?f.set("scrollUpArrowVisible",!ee):f.set("scrollDownArrowVisible",!U)),r==="up"&&ee||r==="down"&&U){x.clear();return}if((f.state.listElement||d.current)&&m.current&&m.current.length>0){const v=m.current,B=E.current?.offsetHeight||0;if(r==="up"){let S=0;const A=D.scrollTop+B;for(let M=0;M=A){S=M;break}}const ie=Math.max(0,S-1);if(ieA){S=Math.max(0,M-1);break}}const ie=Math.min(v.length-1,S+1);if(ie>S){const M=v[ie];M&&(D.scrollTop=M.offsetTop+M.offsetHeight-D.clientHeight+B)}else D.scrollTop=D.scrollHeight-D.clientHeight}}x.start(40,z)}x.start(40,z)},onMouseLeave(){x.clear()}},u]});return a||c?ae:null}),wo=l.forwardRef(function(e,n){return h.jsx(Tn,{...e,ref:n,direction:"down"})}),So=l.forwardRef(function(e,n){return h.jsx(Tn,{...e,ref:n,direction:"up"})}),Mt=Br;function Ct(t){const e=We.c(8);let n,o;e[0]!==t?({className:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let i;e[3]!==n?(i=$e("flex flex-1 text-left",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==o||e[6]!==i?(r=h.jsx(qr,{className:i,"data-slot":"select-value",...o}),e[5]=o,e[6]=i,e[7]=r):r=e[7],r}function Et(t){const e=We.c(15);let n,o,i,r,c;e[0]!==t?({className:o,size:c,id:i,children:n,...r}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=i,e[4]=r,e[5]=c):(n=e[1],o=e[2],i=e[3],r=e[4],c=e[5]);const u=c===void 0?"default":c;let f;e[6]!==o?(f=$e("flex w-fit items-center justify-between gap-1.5 whitespace-nowrap rounded-md border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed outline-none transition-colors focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-[size=default]:h-7 data-[size=sm]:h-6 data-placeholder:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-3.5 [&_svg]:pointer-events-none [&_svg]:shrink-0",o),e[6]=o,e[7]=f):f=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=h.jsx(Yr,{render:h.jsx(pn,{className:"pointer-events-none size-3.5 text-muted-foreground"})}),e[8]=d):d=e[8];let m;return e[9]!==n||e[10]!==i||e[11]!==r||e[12]!==u||e[13]!==f?(m=h.jsxs(Wr,{className:f,"data-size":u,"data-slot":"select-trigger",id:i,...r,children:[n,d]}),e[9]=n,e[10]=i,e[11]=r,e[12]=u,e[13]=f,e[14]=m):m=e[14],m}function At(t){const e=We.c(26);let n,o,i,r,c,u,f,d;e[0]!==t?({className:o,children:n,side:r,sideOffset:c,align:u,alignOffset:f,alignItemWithTrigger:d,...i}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=i,e[4]=r,e[5]=c,e[6]=u,e[7]=f,e[8]=d):(n=e[1],o=e[2],i=e[3],r=e[4],c=e[5],u=e[6],f=e[7],d=e[8]);const m=r===void 0?"bottom":r,p=c===void 0?4:c,b=u===void 0?"center":u,P=f===void 0?0:f,w=d===void 0?!0:d;let y;e[9]!==o?(y=$e("data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-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 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-y-auto overflow-x-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-closed:animate-out data-open:animate-in",o),e[9]=o,e[10]=y):y=e[10];let T;e[11]===Symbol.for("react.memo_cache_sentinel")?(T=h.jsx(Io,{}),e[11]=T):T=e[11];let s;e[12]!==n?(s=h.jsx(go,{children:n}),e[12]=n,e[13]=s):s=e[13];let R;e[14]===Symbol.for("react.memo_cache_sentinel")?(R=h.jsx(vo,{}),e[14]=R):R=e[14];let a;e[15]!==i||e[16]!==y||e[17]!==s?(a=h.jsxs(fo,{className:y,"data-slot":"select-content",...i,children:[T,s,R]}),e[15]=i,e[16]=y,e[17]=s,e[18]=a):a=e[18];let x;return e[19]!==b||e[20]!==w||e[21]!==P||e[22]!==m||e[23]!==p||e[24]!==a?(x=h.jsx(Xr,{children:h.jsx(ro,{align:b,alignItemWithTrigger:w,alignOffset:P,className:"isolate z-50",side:m,sideOffset:p,children:a})}),e[19]=b,e[20]=w,e[21]=P,e[22]=m,e[23]=p,e[24]=a,e[25]=x):x=e[25],x}function Pt(t){const e=We.c(13);let n,o,i;e[0]!==t?({className:o,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=i):(n=e[1],o=e[2],i=e[3]);let r;e[4]!==o?(r=$e("relative flex min-h-7 w-full cursor-default select-none items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-3.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[4]=o,e[5]=r):r=e[5];let c;e[6]!==n?(c=h.jsx(Ro,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:n}),e[6]=n,e[7]=c):c=e[7];let u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=h.jsx(yo,{render:h.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center"}),children:h.jsx(br,{className:"pointer-events-none"})}),e[8]=u):u=e[8];let f;return e[9]!==i||e[10]!==r||e[11]!==c?(f=h.jsxs(xo,{className:r,"data-slot":"select-item",...i,children:[c,u]}),e[9]=i,e[10]=r,e[11]=c,e[12]=f):f=e[12],f}function Io(t){const e=We.c(9);let n,o;e[0]!==t?({className:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let i;e[3]!==n?(i=$e("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",n),e[3]=n,e[4]=i):i=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=h.jsx(Ir,{}),e[5]=r):r=e[5];let c;return e[6]!==o||e[7]!==i?(c=h.jsx(So,{className:i,"data-slot":"select-scroll-up-button",...o,children:r}),e[6]=o,e[7]=i,e[8]=c):c=e[8],c}function vo(t){const e=We.c(9);let n,o;e[0]!==t?({className:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let i;e[3]!==n?(i=$e("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",n),e[3]=n,e[4]=i):i=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=h.jsx(pn,{}),e[5]=r):r=e[5];let c;return e[6]!==o||e[7]!==i?(c=h.jsx(wo,{className:i,"data-slot":"select-scroll-down-button",...o,children:r}),e[6]=o,e[7]=i,e[8]=c):c=e[8],c}const To=["sg-placeholder"],Mo="subnet-placeholder";function Do(){const t=sr(),{data:e}=St(ir),{data:n}=St(lr),{data:o}=St(cr),i=Rr(),r=e.Images??[],c=n.KeyPairs??[],u=o.InstanceTypes?.flatMap(I=>I.InstanceType?[I.InstanceType]:[])??[],f=o.InstanceTypes?.reduce((I,O)=>{const N=O.InstanceType;return N&&(I[N]=(I[N]||0)+1),I},{})??{},d=Object.keys(f).sort(),m=r[0]?.ImageId,p=c[0]?.KeyName,b=d.find(I=>I.endsWith(".nano"))??d[0],{control:P,handleSubmit:w,register:y,watch:T,formState:{errors:s,isSubmitting:R}}=mr({resolver:gr(ar.refine(I=>I.count<=(f[I.instanceType]??1),{message:"Cannot exceed available capacity",path:["count"]})),defaultValues:{count:1,imageId:m??"",keyName:p??"",instanceType:b??""}}),a=T("instanceType"),x=a?f[a]??1:1,E=async I=>{await i.mutateAsync({...I,securityGroupIds:To,subnetId:Mo}),t({to:"/ec2/describe-instances"})};return h.jsxs(h.Fragment,{children:[h.jsx(xr,{to:"/ec2/describe-instances",children:"Back to instances"}),h.jsx(yr,{title:"Run EC2 Instances"}),u.length===0&&h.jsx(Gt,{msg:"No compute available. No new instances can be created until compute is available."}),i.error&&h.jsx(Gt,{error:i.error,msg:"Failed to create instance"}),h.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:w(E),children:[h.jsxs(ot,{children:[h.jsx(st,{children:h.jsx("label",{htmlFor:"imageId",children:"Image"})}),h.jsx(wt,{control:P,name:"imageId",render:({field:I})=>{const O=r.find(N=>N.ImageId===I.value);return h.jsxs(Mt,{onValueChange:N=>I.onChange(N),value:I.value??"",children:[h.jsx(Et,{"aria-invalid":!!s.imageId,className:"w-full",id:"imageId",children:h.jsx(Ct,{children:O?`${O.Name||"Unnamed"} (${O.Architecture})`:""})}),h.jsx(At,{children:r.map(N=>h.jsxs(Pt,{value:N.ImageId??"",children:[N.Name||"Unnamed"," (",N.Architecture,")"]},N.ImageId))})]})}}),h.jsx(it,{errors:[s.imageId]})]}),h.jsxs(ot,{children:[h.jsx(st,{children:h.jsx("label",{htmlFor:"instanceType",children:"Instance Type"})}),h.jsx(wt,{control:P,name:"instanceType",render:({field:I})=>h.jsxs(Mt,{onValueChange:O=>I.onChange(O),value:I.value?I.value:"",children:[h.jsx(Et,{"aria-invalid":!!s.instanceType,className:"w-full",id:"instanceType",children:h.jsx(Ct,{})}),h.jsx(At,{children:d.map(O=>h.jsxs(Pt,{value:O,children:[O," (",f[O]," available)"]},O))})]})}),h.jsx(it,{errors:[s.instanceType]})]}),h.jsxs(ot,{children:[h.jsx(st,{children:h.jsx("label",{htmlFor:"keyName",children:"Key Pair"})}),h.jsx(wt,{control:P,name:"keyName",render:({field:I})=>h.jsxs(Mt,{onValueChange:O=>I.onChange(O),value:I.value?I.value:"",children:[h.jsx(Et,{"aria-invalid":!!s.keyName,className:"w-full",id:"keyName",children:h.jsx(Ct,{})}),h.jsx(At,{children:c.map(O=>h.jsx(Pt,{value:O.KeyName??"",children:O.KeyName},O.KeyPairId))})]})}),h.jsx(it,{errors:[s.keyName]})]}),h.jsxs(ot,{children:[h.jsx(st,{children:h.jsx("label",{htmlFor:"count",children:"Number of Instances"})}),h.jsx(hr,{"aria-invalid":!!s.count,id:"count",type:"number",...y("count",{valueAsNumber:!0})}),h.jsx("p",{className:"text-muted-foreground text-xs",id:"count-description",children:a&&`Available capacity for ${a}: ${x}`}),h.jsx(it,{errors:[s.count]})]}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(qt,{disabled:R||i.isPending,onClick:()=>t({to:"/ec2/describe-instances"}),type:"button",variant:"outline",children:"Cancel"}),h.jsx(qt,{disabled:R||i.isPending||u.length===0,type:"submit",children:R||i.isPending?"Creating…":"Create Instance"})]})]})]})}export{Do as component}; +import{h as en,A as Dt,l as Re,m as Je,n as He,o as Ue,p as _t,r as l,q as tn,t as Fe,v as zt,w as Mn,x as xe,y as yt,z as Cn,E as nn,C as rn,D as De,F as En,G as An,H as Y,I as Pn,J as de,K as On,M as Kt,N as Nn,P as Ge,Q as bt,R as Wt,S as Vn,T as on,U as jn,V as kn,W as Ot,X as dt,j as h,Y as q,Z as Ft,_ as Ln,$ as Nt,a0 as Dn,a1 as k,a2 as Fn,a3 as pt,a4 as Hn,a5 as Un,a6 as Bn,a7 as sn,a8 as ln,a9 as _n,aa as zn,ab as Ht,ac as cn,ad as Ve,ae as Vt,af as Kn,ag as Wn,ah as $n,ai as qn,aj as Yn,ak as Gn,al as Xn,am as Qn,an as Jn,ao as an,ap as $t,aq as Zn,ar as er,as as tr,at as nr,au as un,av as rr,aw as or,ax as Rt,c as We,a as $e,u as sr,ay as ir,az as lr,aA as cr,aB as ar,B as qt}from"./index.js";import{e as ur,f as fn,g as dn,h as Yt,i as fr,j as dr,k as pr,u as mr,a as gr,c as ot,b as st,C as wt,F as it,I as hr}from"./field.js";import{u as St}from"./useSuspenseQuery.js";import{B as xr}from"./back-link.js";import{E as Gt}from"./error-banner.js";import{P as yr}from"./page-heading.js";import{C as br}from"./check.js";import{c as Rr}from"./ec2.js";const wr=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],pn=en("chevron-down",wr);const Sr=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ir=en("chevron-up",Sr);function lt(t,e,n){return Math.floor(t/e)!==n}function Xe(t,e){return e<0||e>=t.current.length}function It(t,e){return he(t,{disabledIndices:e})}function Xt(t,e){return he(t,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function he(t,{startingIndex:e=-1,decrement:n=!1,disabledIndices:o,amount:i=1}={}){let r=e;do r+=n?-i:i;while(r>=0&&r<=t.current.length-1&&Qe(t,r,o));return r}function vr(t,{event:e,orientation:n,loopFocus:o,rtl:i,cols:r,disabledIndices:c,minIndex:u,maxIndex:f,prevIndex:d,stopEvent:m=!1}){let p=d;const b=[],P={};let w=!1;{let s=null,R=-1;t.current.forEach((a,x)=>{if(a==null)return;const E=a.closest('[role="row"]');E&&(w=!0),(E!==s||R===-1)&&(s=E,R+=1,b[R]=[]),b[R].push(x),P[x]=R})}const y=w&&b.length>0&&b.some(s=>s.length!==r);function T(s){if(!y||d===-1)return;const R=P[d];if(R==null)return;const a=b[R].indexOf(d);let x=s==="up"?R-1:R+1;o&&(x<0?x=b.length-1:x>=b.length&&(x=0));const E=new Set;for(;x>=0&&x=0;N-=1){const re=I[N];if(!Qe(t,re,c))return re}x=s==="up"?x-1:x+1,o&&(x<0?x=b.length-1:x>=b.length&&(x=0))}}if(e.key===Dt){const s=T("up");if(s!==void 0)m&&Re(e),p=s;else{if(m&&Re(e),d===-1)p=f;else if(p=he(t,{startingIndex:p,amount:r,decrement:!0,disabledIndices:c}),o&&(d-rR?x:x-r}Xe(t,p)&&(p=d)}}if(e.key===Je){const s=T("down");s!==void 0?(m&&Re(e),p=s):(m&&Re(e),d===-1?p=u:(p=he(t,{startingIndex:d,amount:r,disabledIndices:c}),o&&d+r>f&&(p=he(t,{startingIndex:d%r-r,amount:r,disabledIndices:c}))),Xe(t,p)&&(p=d))}if(n==="both"){const s=_t(d/r);e.key===(i?He:Ue)&&(m&&Re(e),d%r!==r-1?(p=he(t,{startingIndex:d,disabledIndices:c}),o&<(p,r,s)&&(p=he(t,{startingIndex:d-d%r-1,disabledIndices:c}))):o&&(p=he(t,{startingIndex:d-d%r-1,disabledIndices:c})),lt(p,r,s)&&(p=d)),e.key===(i?Ue:He)&&(m&&Re(e),d%r!==0?(p=he(t,{startingIndex:d,decrement:!0,disabledIndices:c}),o&<(p,r,s)&&(p=he(t,{startingIndex:d+(r-d%r),decrement:!0,disabledIndices:c}))):o&&(p=he(t,{startingIndex:d+(r-d%r),decrement:!0,disabledIndices:c})),lt(p,r,s)&&(p=d));const R=_t(f/r)===s;Xe(t,p)&&(o&&R?p=e.key===(i?Ue:He)?f:he(t,{startingIndex:d-d%r-1,disabledIndices:c}):p=d)}return p}function Tr(t,e,n){const o=[];let i=0;return t.forEach(({width:r,height:c},u)=>{let f=!1;for(n&&(i=0);!f;){const d=[];for(let m=0;mo[m]==null)?(d.forEach(m=>{o[m]=u}),f=!0):i+=1}}),[...o]}function Mr(t,e,n,o,i){if(t===-1)return-1;const r=n.indexOf(t),c=e[t];switch(i){case"tl":return r;case"tr":return c?r+c.width-1:r;case"bl":return c?r+(c.height-1)*o:r;case"br":return n.lastIndexOf(t);default:return-1}}function Cr(t,e){return e.flatMap((n,o)=>t.includes(n)?[o]:[])}function Qe(t,e,n){if(typeof n=="function")return n(e);if(n)return n.includes(e);const o=t.current[e];return o?o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true":!1}function Er(t,e={}){const n="rootStore"in t?t.rootStore:t,o=n.context.dataRef,{enabled:i=!0,event:r="click",toggle:c=!0,ignoreMouse:u=!1,stickIfOpen:f=!0,touchOpenDelay:d=0}=e,m=l.useRef(void 0),p=tn(),b=Fe(),P=l.useMemo(()=>({onPointerDown(w){m.current=w.pointerType},onMouseDown(w){const y=m.current,T=w.nativeEvent,s=n.select("open");if(w.button!==0||r==="click"||zt(y,!0)&&u)return;const R=o.current.openEvent,a=R?.type,x=n.select("domReferenceElement")!==w.currentTarget,E=s&&x||!(s&&c&&(!(R&&f)||a==="click"||a==="mousedown"));if(Cn(T.target)){const O=xe(yt,T,T.target);E&&y==="touch"&&d>0?b.start(d,()=>{n.setOpen(!0,O)}):n.setOpen(E,O);return}const I=w.currentTarget;p.request(()=>{const O=xe(yt,T,I);E&&y==="touch"&&d>0?b.start(d,()=>{n.setOpen(!0,O)}):n.setOpen(E,O)})},onClick(w){if(r==="mousedown-only")return;const y=m.current;if(r==="mousedown"&&y){m.current=void 0;return}if(zt(y,!0)&&u)return;const T=n.select("open"),s=o.current.openEvent,R=n.select("domReferenceElement")!==w.currentTarget,a=T&&R||!(T&&c&&(!(s&&f)||Mn(s))),x=xe(yt,w.nativeEvent,w.currentTarget);a&&y==="touch"&&d>0?b.start(d,()=>{n.setOpen(!0,x)}):n.setOpen(a,x)},onKeyDown(){m.current=void 0}}),[o,r,u,n,f,c,p,b,d]);return l.useMemo(()=>i?{reference:P}:nn,[i,P])}const Ar="Escape";function mt(t,e,n){switch(t){case"vertical":return e;case"horizontal":return n;default:return e||n}}function ct(t,e){return mt(e,t===Dt||t===Je,t===He||t===Ue)}function vt(t,e,n){return mt(e,t===Je,n?t===He:t===Ue)||t==="Enter"||t===" "||t===""}function Pr(t,e,n){return mt(e,n?t===He:t===Ue,t===Je)}function Or(t,e,n,o){const i=n?t===Ue:t===He,r=t===Dt;return e==="both"||e==="horizontal"&&o&&o>1?t===Ar:mt(e,i,r)}function Nr(t,e){const n="rootStore"in t?t.rootStore:t,o=n.useState("open"),i=n.useState("floatingElement"),r=n.useState("domReferenceElement"),c=n.context.dataRef,{listRef:u,activeIndex:f,onNavigate:d=()=>{},enabled:m=!0,selectedIndex:p=null,allowEscape:b=!1,loopFocus:P=!1,nested:w=!1,rtl:y=!1,virtual:T=!1,focusItemOnOpen:s="auto",focusItemOnHover:R=!0,openOnArrowKeyDown:a=!0,disabledIndices:x=void 0,orientation:E="vertical",parentOrientation:I,cols:O=1,scrollItemIntoView:N=!0,itemSizes:re,dense:ae=!1,id:K,resetOnPointerLeave:W=!0,externalTree:z}=e,D=rn(i),ee=De(D),U=En(),te=An(z);Y(()=>{c.current.orientation=E},[c,E]);const v=Pn(r),B=l.useRef(s),S=l.useRef(p??-1),A=l.useRef(null),ie=l.useRef(!0),M=de(g=>{d(S.current===-1?null:S.current,g)}),se=l.useRef(M),G=l.useRef(!!i),j=l.useRef(o),_=l.useRef(!1),ue=l.useRef(!1),Ie=De(x),H=De(o),fe=De(N),X=De(p),me=De(W),we=de(()=>{function g(Z){T?te?.events.emit("virtualfocus",Z):On(Z,{sync:_.current,preventScroll:!0})}const L=u.current[S.current],C=ue.current;L&&g(L),(_.current?Z=>Z():requestAnimationFrame)(()=>{const Z=u.current[S.current]||L;if(!Z)return;L||g(Z);const le=fe.current;le&&Q&&(C||!ie.current)&&Z.scrollIntoView?.(typeof le=="boolean"?{block:"nearest",inline:"nearest"}:le)})});Y(()=>{m&&(o&&i?(S.current=p??-1,B.current&&p!=null&&(ue.current=!0,M())):G.current&&(S.current=-1,se.current()))},[m,o,i,p,M]),Y(()=>{if(m){if(!o){_.current=!1;return}if(i)if(f==null){if(_.current=!1,X.current!=null)return;if(G.current&&(S.current=-1,we()),(!j.current||!G.current)&&B.current&&(A.current!=null||B.current===!0&&A.current==null)){let g=0;const L=()=>{u.current[0]==null?(g<2&&(g?requestAnimationFrame:queueMicrotask)(L),g+=1):(S.current=A.current==null||vt(A.current,E,y)||w?It(u):Xt(u),A.current=null,M())};L()}}else Xe(u,f)||(S.current=f,we(),ue.current=!1)}},[m,o,i,f,X,w,u,E,y,M,we,Ie]),Y(()=>{if(!m||i||!te||T||!G.current)return;const g=te.nodesRef.current,L=g.find(Z=>Z.id===U)?.context?.elements.floating,C=Kt(Nn(i)),$=g.some(Z=>Z.context&&Ge(Z.context.elements.floating,C));L&&!$&&ie.current&&L.focus({preventScroll:!0})},[m,i,te,U,T]),Y(()=>{se.current=M,j.current=o,G.current=!!i}),Y(()=>{o||(A.current=null,B.current=s)},[o,s]);const pe=f!=null,Q=l.useMemo(()=>{function g(C){if(!H.current)return;const $=u.current.indexOf(C.currentTarget);$!==-1&&S.current!==$&&(S.current=$,M(C))}return{onFocus(C){_.current=!0,g(C)},onClick:({currentTarget:C})=>C.focus({preventScroll:!0}),onMouseMove(C){_.current=!0,ue.current=!1,R&&g(C)},onPointerLeave(C){if(!H.current||!ie.current||C.pointerType==="touch")return;_.current=!0;const $=C.relatedTarget;!R||u.current.includes($)||me.current&&(S.current=-1,M(C),T||ee.current?.focus({preventScroll:!0}))}}},[H,ee,R,u,M,me,T]),J=l.useCallback(()=>I??te?.nodesRef.current.find(g=>g.id===U)?.context?.dataRef?.current.orientation,[U,te,I]),ye=de(g=>{if(ie.current=!1,_.current=!0,g.which===229||!H.current&&g.currentTarget===ee.current)return;if(w&&Or(g.key,E,y,O)){ct(g.key,J())||Re(g),n.setOpen(!1,xe(bt,g.nativeEvent)),Wt(r)&&(T?te?.events.emit("virtualfocus",r):r.focus());return}const L=S.current,C=It(u,x),$=Xt(u,x);if(v||(g.key==="Home"&&(Re(g),S.current=C,M(g)),g.key==="End"&&(Re(g),S.current=$,M(g))),O>1){const Z=re||Array.from({length:u.current.length},()=>({width:1,height:1})),le=Tr(Z,O,ae),ge=le.findIndex(Se=>Se!=null&&!Qe(u,Se,x)),be=le.reduce((Se,Me,Le)=>Me!=null&&!Qe(u,Me,x)?Le:Se,-1),ke=le[vr({current:le.map(Se=>Se!=null?u.current[Se]:null)},{event:g,orientation:E,loopFocus:P,rtl:y,cols:O,disabledIndices:Cr([...(typeof x!="function"?x:null)||u.current.map((Se,Me)=>Qe(u,Me,x)?Me:void 0),void 0],le),minIndex:ge,maxIndex:be,prevIndex:Mr(S.current>$?C:S.current,Z,le,O,g.key===Je?"bl":g.key===(y?He:Ue)?"tr":"tl"),stopEvent:!0})];if(ke!=null&&(S.current=ke,M(g)),E==="both")return}if(ct(g.key,E)){if(Re(g),o&&!T&&Kt(g.currentTarget.ownerDocument)===g.currentTarget){S.current=vt(g.key,E,y)?C:$,M(g);return}vt(g.key,E,y)?P?L>=$?b&&L!==u.current.length?S.current=-1:(_.current=!1,S.current=C):S.current=he(u,{startingIndex:L,disabledIndices:x}):S.current=Math.min($,he(u,{startingIndex:L,disabledIndices:x})):P?L<=C?b&&L!==-1?S.current=u.current.length:(_.current=!1,S.current=$):S.current=he(u,{startingIndex:L,decrement:!0,disabledIndices:x}):S.current=Math.max(C,he(u,{startingIndex:L,decrement:!0,disabledIndices:x})),Xe(u,S.current)&&(S.current=-1),M(g)}}),oe=l.useMemo(()=>T&&o&&pe&&{"aria-activedescendant":`${K}-${f}`},[T,o,pe,K,f]),ne=l.useMemo(()=>({"aria-orientation":E==="both"?void 0:E,...v?{}:oe,onKeyDown(g){if(g.key==="Tab"&&g.shiftKey&&o&&!T){const L=Vn(g.nativeEvent);if(L&&!Ge(ee.current,L))return;Re(g),n.setOpen(!1,xe(on,g.nativeEvent)),Wt(r)&&r.focus();return}ye(g)},onPointerMove(){ie.current=!0}}),[oe,ye,ee,E,v,n,o,T,r]),Te=l.useMemo(()=>{function g(C){s==="auto"&&jn(C.nativeEvent)&&(B.current=!T)}function L(C){B.current=s,s==="auto"&&kn(C.nativeEvent)&&(B.current=!0)}return{onKeyDown(C){const $=n.select("open");ie.current=!1;const Z=C.key.startsWith("Arrow"),le=Pr(C.key,J(),y),ge=ct(C.key,E),be=(w?le:ge)||C.key==="Enter"||C.key.trim()==="";if(T&&$)return ye(C);if(!(!$&&!a&&Z)){if(be){const ke=ct(C.key,J());A.current=w&&ke?null:C.key}if(w){le&&(Re(C),$?(S.current=It(u,Ie.current),M(C)):n.setOpen(!0,xe(bt,C.nativeEvent,C.currentTarget)));return}ge&&(X.current!=null&&(S.current=X.current),Re(C),!$&&a?n.setOpen(!0,xe(bt,C.nativeEvent,C.currentTarget)):ye(C),$&&M(C))}},onFocus(C){n.select("open")&&!T&&(S.current=-1,M(C))},onPointerDown:L,onPointerEnter:L,onMouseDown:g,onClick:g}},[ye,Ie,s,u,w,M,n,a,E,J,y,X,T]),Ae=l.useMemo(()=>({...oe,...Te}),[oe,Te]);return l.useMemo(()=>m?{reference:Ae,floating:ne,item:Q,trigger:Te}:{},[m,Ae,ne,Te,Q])}function Vr(t,e){const n="rootStore"in t?t.rootStore:t,o=n.useState("open"),i=n.context.dataRef,{listRef:r,activeIndex:c,onMatch:u,onTypingChange:f,enabled:d=!0,findMatch:m=null,resetMs:p=750,ignoreKeys:b=Ot,selectedIndex:P=null}=e,w=Fe(),y=l.useRef(""),T=l.useRef(P??c??-1),s=l.useRef(null);Y(()=>{o&&(w.clear(),s.current=null,y.current="")},[o,w]),Y(()=>{o&&y.current===""&&(T.current=P??c??-1)},[o,P,c]);const R=de(I=>{I?i.current.typing||(i.current.typing=I,f?.(I)):i.current.typing&&(i.current.typing=I,f?.(I))}),a=de(I=>{function O(W,z,D){const ee=m?m(z,D):z.find(U=>U?.toLocaleLowerCase().indexOf(D.toLocaleLowerCase())===0);return ee?W.indexOf(ee):-1}const N=r.current;if(y.current.length>0&&y.current[0]!==" "&&(O(N,N,y.current)===-1?R(!1):I.key===" "&&Re(I)),N==null||b.includes(I.key)||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;o&&I.key!==" "&&(Re(I),R(!0)),N.every(W=>W?W[0]?.toLocaleLowerCase()!==W[1]?.toLocaleLowerCase():!0)&&y.current===I.key&&(y.current="",T.current=s.current),y.current+=I.key,w.start(p,()=>{y.current="",T.current=s.current,R(!1)});const ae=T.current,K=O(N,[...N.slice((ae||0)+1),...N.slice(0,(ae||0)+1)],y.current);K!==-1?(u?.(K),s.current=K):I.key!==" "&&(y.current="",R(!1))}),x=l.useMemo(()=>({onKeyDown:a}),[a]),E=l.useMemo(()=>({onKeyDown:a,onKeyUp(I){I.key===" "&&R(!1)}}),[a,R]);return l.useMemo(()=>d?{reference:x,floating:E}:{},[d,x,E])}function jr(t){const e=l.useRef(!0);e.current&&(e.current=!1,t())}const mn=l.createContext(null),gn=l.createContext(null);function je(){const t=l.useContext(mn);if(t===null)throw new Error(dt(60));return t}function hn(){const t=l.useContext(gn);if(t===null)throw new Error(dt(61));return t}const kr=(t,e)=>Object.is(t,e);function Ke(t,e,n){return t==null||e==null?Object.is(t,e):n(t,e)}function Tt(t,e,n){return!t||t.length===0?!1:t.some(o=>o===void 0?!1:Ke(o,e,n))}function jt(t,e,n){return!t||t.length===0?-1:t.findIndex(o=>o===void 0?!1:Ke(o,e,n))}function Lr(t,e,n){return t.filter(o=>!Ke(o,e,n))}function kt(t){if(t==null)return"";if(typeof t=="string")return t;try{return JSON.stringify(t)}catch{return String(t)}}function xn(t){return t!=null&&t.length>0&&typeof t[0]=="object"&&t[0]!=null&&"items"in t[0]}function Dr(t){if(!Array.isArray(t))return t!=null&&!("null"in t);if(xn(t)){for(const e of t)for(const n of e.items)if(n&&n.value==null&&n.label!=null)return!0;return!1}for(const e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function Fr(t,e){if(e&&t!=null)return e(t)??"";if(t&&typeof t=="object"){if("label"in t&&t.label!=null)return String(t.label);if("value"in t)return String(t.value)}return kt(t)}function ze(t,e){return e&&t!=null?e(t)??"":t&&typeof t=="object"&&"value"in t&&"label"in t?kt(t.value):kt(t)}function yn(t,e,n){function o(){return Fr(t,n)}if(n&&t!=null)return n(t);if(t&&typeof t=="object"&&"label"in t&&t.label!=null)return t.label;if(e&&!Array.isArray(e))return e[t]??o();if(Array.isArray(e)){const i=xn(e)?e.flatMap(r=>r.items):e;if(t==null||typeof t!="object"){const r=i.find(c=>c.value===t);return r&&r.label!=null?r.label:o()}if("value"in t){const r=i.find(c=>c&&c.value===t.value);if(r&&r.label!=null)return r.label}}return o()}function Hr(t,e,n){return t.reduce((o,i,r)=>(r>0&&o.push(", "),o.push(h.jsx(l.Fragment,{children:yn(i,e,n)},r)),o),[])}const V={id:q(t=>t.id),modal:q(t=>t.modal),multiple:q(t=>t.multiple),items:q(t=>t.items),itemToStringLabel:q(t=>t.itemToStringLabel),itemToStringValue:q(t=>t.itemToStringValue),isItemEqualToValue:q(t=>t.isItemEqualToValue),value:q(t=>t.value),hasSelectedValue:q(t=>{const{value:e,multiple:n,itemToStringValue:o}=t;return e==null?!1:n&&Array.isArray(e)?e.length>0:ze(e,o)!==""}),hasNullItemLabel:q((t,e)=>e?Dr(t.items):!1),open:q(t=>t.open),mounted:q(t=>t.mounted),forceMount:q(t=>t.forceMount),transitionStatus:q(t=>t.transitionStatus),openMethod:q(t=>t.openMethod),activeIndex:q(t=>t.activeIndex),selectedIndex:q(t=>t.selectedIndex),isActive:q((t,e)=>t.activeIndex===e),isSelected:q((t,e,n)=>{const o=t.isItemEqualToValue,i=t.value;return t.multiple?Array.isArray(i)&&i.some(r=>Ke(r,n,o)):t.selectedIndex===e&&t.selectedIndex!==null?!0:Ke(i,n,o)}),isSelectedByFocus:q((t,e)=>t.selectedIndex===e),popupProps:q(t=>t.popupProps),triggerProps:q(t=>t.triggerProps),triggerElement:q(t=>t.triggerElement),positionerElement:q(t=>t.positionerElement),listElement:q(t=>t.listElement),scrollUpArrowVisible:q(t=>t.scrollUpArrowVisible),scrollDownArrowVisible:q(t=>t.scrollDownArrowVisible),hasScrollArrows:q(t=>t.hasScrollArrows)};function Ur(t,e){const n=l.useRef(t),o=de(e);Y(()=>{n.current!==t&&o(n.current)},[t,o]),Y(()=>{n.current=t},[t])}function Br(t){const{id:e,value:n,defaultValue:o=null,onValueChange:i,open:r,defaultOpen:c=!1,onOpenChange:u,name:f,disabled:d=!1,readOnly:m=!1,required:p=!1,modal:b=!0,actionsRef:P,inputRef:w,onOpenChangeComplete:y,items:T,multiple:s=!1,itemToStringLabel:R,itemToStringValue:a,isItemEqualToValue:x=kr,highlightItemOnHover:E=!0,children:I}=t,{clearErrors:O}=ur(),{setDirty:N,setTouched:re,setFocused:ae,shouldValidateOnChange:K,validityData:W,setFilled:z,name:D,disabled:ee,validation:U,validationMode:te}=fn(),v=dn({id:e}),B=ee||d,S=D??f,[A,ie]=Yt({controlled:n,default:s?o??Ot:o,name:"Select",state:"value"}),[M,se]=Yt({controlled:r,default:c,name:"Select",state:"open"}),G=l.useRef([]),j=l.useRef([]),_=l.useRef(null),ue=l.useRef(null),Ie=l.useRef(0),H=l.useRef(null),fe=l.useRef([]),X=l.useRef(!1),me=l.useRef(!1),we=l.useRef(null),pe=l.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Q=l.useRef(!1),{mounted:J,setMounted:ye,transitionStatus:oe}=Ft(M),{openMethod:ne,triggerProps:Te,reset:Ae}=Ln(M),g=Nt(()=>new Dn({id:v,modal:b,multiple:s,itemToStringLabel:R,itemToStringValue:a,isItemEqualToValue:x,value:A,open:M,mounted:J,transitionStatus:oe,items:T,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,L=k(g,V.activeIndex),C=k(g,V.selectedIndex),$=k(g,V.triggerElement),Z=k(g,V.positionerElement),le=l.useMemo(()=>s&&Array.isArray(A)&&A.length===0?"":ze(A,a),[s,A,a]),ge=l.useMemo(()=>s&&Array.isArray(A)?A.map(F=>ze(F,a)):ze(A,a),[s,A,a]),be=De(g.state.triggerElement);fr({id:v,commit:U.commit,value:A,controlRef:be,name:S,getValue:()=>ge});const ke=l.useRef(A);Y(()=>{A!==ke.current&&g.set("forceMount",!0)},[g,A]),Y(()=>{z(s?Array.isArray(A)&&A.length>0:A!=null)},[s,A,z]),Y(function(){if(M)return;const ce=fe.current;if(s){const Ee=Array.isArray(A)?A:[];if(Ee.length===0){g.set("selectedIndex",null);return}const ve=Ee[Ee.length-1],rt=jt(ce,ve,x);g.set("selectedIndex",rt===-1?null:rt);return}const Ce=jt(ce,A,x);g.set("selectedIndex",Ce===-1?null:Ce)},[s,M,A,fe,x,g]),Ur(A,()=>{O(S),N(A!==W.initialValue),K()?U.commit(A):U.commit(A,!0)});const Se=de((F,ce)=>{if(u?.(F,ce),!ce.isCanceled&&(se(F),!F&&(ce.reason===on||ce.reason===Fn)&&(re(!0),ae(!1),te==="onBlur"&&U.commit(A)),!F&&g.state.activeIndex!==null)){const Ce=G.current[g.state.activeIndex];queueMicrotask(()=>{Ce?.setAttribute("tabindex","-1")})}}),Me=de(()=>{ye(!1),g.set("activeIndex",null),Ae(),y?.(!1)});pt({enabled:!P,open:M,ref:_,onComplete(){M||Me()}}),l.useImperativeHandle(P,()=>({unmount:Me}),[Me]);const Le=de((F,ce)=>{i?.(F,ce),!ce.isCanceled&&ie(F)}),Pe=de(()=>{const F=g.state.listElement||_.current;if(!F)return;const ce=F.scrollTop,Ce=F.scrollTop+F.clientHeight,Ee=ce>1,ve=Cesn(Be(),Te,v?{id:v}:nn),[Be,Te,v]);jr(()=>{g.update({popupProps:_e(),triggerProps:Ye})}),Y(()=>{g.update({id:v,modal:b,multiple:s,value:A,open:M,mounted:J,transitionStatus:oe,popupProps:_e(),triggerProps:Ye,items:T,itemToStringLabel:R,itemToStringValue:a,isItemEqualToValue:x,openMethod:ne})},[g,v,b,s,A,M,J,oe,_e,Ye,T,R,a,x,ne]);const tt=l.useMemo(()=>({store:g,name:S,required:p,disabled:B,readOnly:m,multiple:s,itemToStringLabel:R,itemToStringValue:a,highlightItemOnHover:E,setValue:Le,setOpen:Se,listRef:G,popupRef:_,scrollHandlerRef:ue,handleScrollArrowVisibility:Pe,scrollArrowsMountedCountRef:Ie,getItemProps:et,events:Oe.context.events,valueRef:H,valuesRef:fe,labelsRef:j,typingRef:X,selectionRef:pe,selectedItemTextRef:we,validation:U,onOpenChangeComplete:y,keyboardActiveRef:me,alignItemWithTriggerActiveRef:Q,initialValueRef:ke}),[g,S,p,B,m,s,R,a,E,Le,Se,et,Oe.context.events,U,y,Pe]),nt=ln(w,U.inputRef),ht=s&&Array.isArray(A)&&A.length>0,xt=l.useMemo(()=>!s||!Array.isArray(A)||!S?null:A.map(F=>{const ce=ze(F,a);return h.jsx("input",{type:"hidden",name:S,value:ce},ce)}),[s,A,S,a]);return h.jsx(mn.Provider,{value:tt,children:h.jsxs(gn.Provider,{value:Oe,children:[I,h.jsx("input",{...U.getInputValidationProps({onFocus(){g.state.triggerElement?.focus({focusVisible:!0})},onChange(F){if(F.nativeEvent.defaultPrevented)return;const ce=F.target.value,Ce=xe(Ht,F.nativeEvent);function Ee(){if(s)return;const ve=fe.current.find(rt=>ze(rt,a).toLowerCase()===ce.toLowerCase());ve!=null&&(N(ve!==W.initialValue),Le(ve,Ce),K()&&U.commit(ve))}g.set("forceMount",!0),queueMicrotask(Ee)}}),name:s?void 0:S,value:le,disabled:B,required:p&&!ht,readOnly:m,ref:nt,style:S?_n:zn,tabIndex:-1,"aria-hidden":!0}),xt]})})}function _r(t){const e=t.getBoundingClientRect(),n=window.getComputedStyle(t,"::before"),o=window.getComputedStyle(t,"::after");if(!(n.content!=="none"||o.content!=="none"))return e;const r=parseFloat(n.width)||0,c=parseFloat(n.height)||0,u=parseFloat(o.width)||0,f=parseFloat(o.height)||0,d=Math.max(e.width,r,u),m=Math.max(e.height,c,f),p=d-e.width,b=m-e.height;return{left:e.left-p/2,right:e.right+p/2,top:e.top-b/2,bottom:e.bottom+b/2}}const at=2,zr=400,Qt=200,Kr={...Wn,...pr,value:()=>null},Wr=l.forwardRef(function(e,n){const{render:o,className:i,id:r,disabled:c=!1,nativeButton:u=!0,...f}=e,{setTouched:d,setFocused:m,validationMode:p,state:b,disabled:P}=fn(),{labelId:w}=dr(),{store:y,setOpen:T,selectionRef:s,validation:R,readOnly:a,required:x,alignItemWithTriggerActiveRef:E,disabled:I,keyboardActiveRef:O}=je(),N=P||I||c,re=k(y,V.open),ae=k(y,V.value),K=k(y,V.triggerProps),W=k(y,V.positionerElement),z=k(y,V.listElement),D=k(y,V.id),ee=k(y,V.hasSelectedValue),U=!ee&&re,te=k(y,V.hasNullItemLabel,U),v=r??D;dn({id:v});const B=De(W),S=l.useRef(null),{getButtonProps:A,buttonRef:ie}=cn({disabled:N,native:u}),M=de(X=>{y.set("triggerElement",X)}),se=ln(n,S,ie,M),G=Fe(),j=Fe(),_=Fe(),ue=Fe();l.useEffect(()=>{if(re)return!(ee||te)?_.start(zr,()=>{s.current.allowUnselectedMouseUp=!0,s.current.allowSelectedMouseUp=!0}):ue.start(Qt,()=>{s.current.allowUnselectedMouseUp=!0,_.start(Qt,()=>{s.current.allowSelectedMouseUp=!0})}),()=>{_.clear(),ue.clear()};s.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},j.clear()},[re,ee,te,s,j,_,ue]);const Ie=l.useMemo(()=>z?.id??rn(W)?.id,[z,W]),H=sn(K,{id:v,role:"combobox","aria-expanded":re?"true":"false","aria-haspopup":"listbox","aria-controls":re?Ie:void 0,"aria-labelledby":w,"aria-readonly":a||void 0,"aria-required":x||void 0,tabIndex:N?-1:0,ref:se,onFocus(X){m(!0),re&&E.current&&T(!1,xe(Ht,X.nativeEvent)),G.start(0,()=>{y.set("forceMount",!0)})},onBlur(X){Ge(W,X.relatedTarget)||(d(!0),m(!1),p==="onBlur"&&R.commit(ae))},onPointerMove(){O.current=!1},onKeyDown(){O.current=!0},onMouseDown(X){if(re)return;const me=Vt(X.currentTarget);function we(pe){if(!S.current)return;const Q=pe.target;if(Ge(S.current,Q)||Ge(B.current,Q)||Q===S.current)return;const J=_r(S.current);pe.clientX>=J.left-at&&pe.clientX<=J.right+at&&pe.clientY>=J.top-at&&pe.clientY<=J.bottom+at||T(!1,xe(Kn,pe))}j.start(0,()=>{me.addEventListener("mouseup",we,{once:!0})})}},R.getValidationProps,f,A);H.role="combobox";const fe=l.useMemo(()=>({...b,open:re,disabled:N,value:ae,readOnly:a,placeholder:!ee}),[b,re,N,ae,a,ee]);return Ve("button",e,{ref:[n,S],state:fe,stateAttributesMapping:Kr,props:H})}),$r={value:()=>null},qr=l.forwardRef(function(e,n){const{className:o,render:i,children:r,placeholder:c,...u}=e,{store:f,valueRef:d}=je(),m=k(f,V.value),p=k(f,V.items),b=k(f,V.itemToStringLabel),P=k(f,V.hasSelectedValue),w=!P&&c!=null&&r==null,y=k(f,V.hasNullItemLabel,w),T=l.useMemo(()=>({value:m,placeholder:!P}),[m,P]);let s=null;return typeof r=="function"?s=r(m):r!=null?s=r:!P&&c!=null&&!y?s=c:Array.isArray(m)?s=Hr(m,p,b):s=yn(m,p,b),Ve("span",e,{state:T,ref:[n,d],props:[{children:s},u],stateAttributesMapping:$r})}),Yr=l.forwardRef(function(e,n){const{className:o,render:i,...r}=e,{store:c}=je(),u=k(c,V.open),f=l.useMemo(()=>({open:u}),[u]);return Ve("span",e,{state:f,ref:n,props:[{"aria-hidden":!0,children:"▼"},r],stateAttributesMapping:$n})}),Gr=l.createContext(void 0),Xr=l.forwardRef(function(e,n){const{store:o}=je(),i=k(o,V.mounted),r=k(o,V.forceMount);return i||r?h.jsx(Gr.Provider,{value:!0,children:h.jsx(qn,{ref:n,...e})}):null}),bn=l.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Qr(){return l.useContext(bn)}function Jr(t){const{children:e,elementsRef:n,labelsRef:o,onMapChange:i}=t,r=de(i),c=l.useRef(0),u=Nt(eo).current,f=Nt(Zr).current,[d,m]=l.useState(0),p=l.useRef(d),b=de((s,R)=>{f.set(s,R??null),p.current+=1,m(p.current)}),P=de(s=>{f.delete(s),p.current+=1,m(p.current)}),w=l.useMemo(()=>{const s=new Map;return Array.from(f.keys()).filter(a=>a.isConnected).sort(to).forEach((a,x)=>{const E=f.get(a)??{};s.set(a,{...E,index:x})}),s},[f,d]);Y(()=>{if(typeof MutationObserver!="function"||w.size===0)return;const s=new MutationObserver(R=>{const a=new Set,x=E=>a.has(E)?a.delete(E):a.add(E);R.forEach(E=>{E.removedNodes.forEach(x),E.addedNodes.forEach(x)}),a.size===0&&(p.current+=1,m(p.current))});return w.forEach((R,a)=>{a.parentElement&&s.observe(a.parentElement,{childList:!0})}),()=>{s.disconnect()}},[w]),Y(()=>{p.current===d&&(n.current.length!==w.size&&(n.current.length=w.size),o&&o.current.length!==w.size&&(o.current.length=w.size),c.current=w.size),r(w)},[r,w,n,o,d]),Y(()=>()=>{n.current=[]},[n]),Y(()=>()=>{o&&(o.current=[])},[o]);const y=de(s=>(u.add(s),()=>{u.delete(s)}));Y(()=>{u.forEach(s=>s(w))},[u,w]);const T=l.useMemo(()=>({register:b,unregister:P,subscribeMapChange:y,elementsRef:n,labelsRef:o,nextIndexRef:c}),[b,P,y,n,o,c]);return h.jsx(bn.Provider,{value:T,children:e})}function Zr(){return new Map}function eo(){return new Set}function to(t,e){const n=t.compareDocumentPosition(e);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Rn=l.createContext(void 0);function Ut(){const t=l.useContext(Rn);if(!t)throw new Error(dt(59));return t}function ft(t,e){t&&Object.assign(t.style,e)}const wn={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},no={position:"fixed"},ro=l.forwardRef(function(e,n){const{anchor:o,positionMethod:i="absolute",className:r,render:c,side:u="bottom",align:f="center",sideOffset:d=0,alignOffset:m=0,collisionBoundary:p="clipping-ancestors",collisionPadding:b,arrowPadding:P=5,sticky:w=!1,disableAnchorTracking:y,alignItemWithTrigger:T=!0,collisionAvoidance:s=Yn,...R}=e,{store:a,listRef:x,labelsRef:E,alignItemWithTriggerActiveRef:I,selectedItemTextRef:O,valuesRef:N,initialValueRef:re,popupRef:ae,setValue:K}=je(),W=hn(),z=k(a,V.open),D=k(a,V.mounted),ee=k(a,V.modal),U=k(a,V.value),te=k(a,V.openMethod),v=k(a,V.positionerElement),B=k(a,V.triggerElement),S=k(a,V.isItemEqualToValue),A=l.useRef(null),ie=l.useRef(null),[M,se]=l.useState(T),G=D&&M&&te!=="touch";!D&&M!==T&&se(T),Y(()=>{D||(V.scrollUpArrowVisible(a.state)&&a.set("scrollUpArrowVisible",!1),V.scrollDownArrowVisible(a.state)&&a.set("scrollDownArrowVisible",!1))},[a,D]),l.useImperativeHandle(I,()=>G),Gn((G||ee)&&z&&te!=="touch",B);const j=Xn({anchor:o,floatingRootContext:W,positionMethod:i,mounted:D,side:u,sideOffset:d,align:f,alignOffset:m,arrowPadding:P,collisionBoundary:p,collisionPadding:b,sticky:w,disableAnchorTracking:y??G,collisionAvoidance:s,keepMounted:!0}),_=G?"none":j.side,ue=G?no:j.positionerStyles,Ie=l.useMemo(()=>{const Q={};return z||(Q.pointerEvents="none"),{role:"presentation",hidden:!D,style:{...ue,...Q}}},[z,D,ue]),H=l.useMemo(()=>({open:z,side:_,align:j.align,anchorHidden:j.anchorHidden}),[z,_,j.align,j.anchorHidden]),fe=de(Q=>{a.set("positionerElement",Q)}),X=Ve("div",e,{ref:[n,fe],state:H,stateAttributesMapping:an,props:[Ie,R]}),me=l.useRef(0),we=de(Q=>{if(Q.size===0&&me.current===0||N.current.length===0)return;const J=me.current;if(me.current=Q.size,Q.size===J)return;const ye=xe(Ht);if(J!==0&&!a.state.multiple&&U!==null&&jt(N.current,U,S)===-1){const ne=re.current,Ae=ne!=null&&Tt(N.current,ne,S)?ne:null;K(Ae,ye),Ae===null&&(a.set("selectedIndex",null),O.current=null)}if(J!==0&&a.state.multiple&&Array.isArray(U)){const oe=U.filter(ne=>Tt(N.current,ne,S));(oe.length!==U.length||oe.some(ne=>!Tt(U,ne,S)))&&(K(oe,ye),oe.length===0&&(a.set("selectedIndex",null),O.current=null))}if(z&&G){a.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const oe={height:""};ft(v,oe),ft(ae.current,oe)}}),pe=l.useMemo(()=>({...j,side:_,alignItemWithTriggerActive:G,setControlledAlignItemWithTrigger:se,scrollUpArrowRef:A,scrollDownArrowRef:ie}),[j,_,G,se]);return h.jsx(Jr,{elementsRef:x,labelsRef:E,onMapChange:we,children:h.jsxs(Rn.Provider,{value:pe,children:[D&&ee&&h.jsx(Qn,{inert:Jn(!z),cutout:B}),X]})})});function Sn(t){const e=t.currentTarget.getBoundingClientRect();return e.top+1<=t.clientY&&t.clientY<=e.bottom-1&&e.left+1<=t.clientX&&t.clientX<=e.right-1}const ut="base-ui-disable-scrollbar",Lt={className:ut,getElement(t){return h.jsx("style",{nonce:t,href:ut,precedence:"base-ui:low",children:`.${ut}{scrollbar-width:none}.${ut}::-webkit-scrollbar{display:none}`})}},oo=l.createContext(void 0);function so(t){return l.useContext(oo)}function io(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}const lo=l.createContext(void 0),co={disableStyleElements:!1};function ao(){return l.useContext(lo)??co}const uo={...an,...un},fo=l.forwardRef(function(e,n){const{render:o,className:i,...r}=e,{store:c,popupRef:u,onOpenChangeComplete:f,setOpen:d,valueRef:m,selectedItemTextRef:p,keyboardActiveRef:b,multiple:P,handleScrollArrowVisibility:w,scrollHandlerRef:y,highlightItemOnHover:T}=je(),{side:s,align:R,alignItemWithTriggerActive:a,setControlledAlignItemWithTrigger:x,scrollDownArrowRef:E,scrollUpArrowRef:I}=Ut(),O=so()!=null,N=hn(),{nonce:re,disableStyleElements:ae}=ao(),K=Fe(),W=k(c,V.id),z=k(c,V.open),D=k(c,V.mounted),ee=k(c,V.popupProps),U=k(c,V.transitionStatus),te=k(c,V.triggerElement),v=k(c,V.positionerElement),B=k(c,V.listElement),S=l.useRef(0),A=l.useRef(!1),ie=l.useRef(0),M=l.useRef(!1),se=l.useRef({}),G=tn(),j=de(H=>{if(!v||!u.current||!M.current)return;if(A.current||!a){w();return}const fe=v.style.top==="0px",X=v.style.bottom==="0px",me=v.getBoundingClientRect().height,we=Vt(v),pe=getComputedStyle(v),Q=parseFloat(pe.marginTop),J=parseFloat(pe.marginBottom),ye=Jt(getComputedStyle(u.current)),oe=we.documentElement.clientHeight-Q-J,ne=H.scrollTop,Te=H.scrollHeight,Ae=H.clientHeight,g=Te-Ae;let L=0,C=null,$=!1;if(fe){const Z=g-ne,le=me+Z,ge=Math.min(le,oe);L=ge,ge!==oe?C=g:$=!0}else if(X){const Z=ne-0,le=me+Z,ge=Math.min(le,oe),be=le-oe;L=ge,ge!==oe?C=0:($=!0,ne=ye)&&(A.current=!0),w()});l.useImperativeHandle(y,()=>j,[j]),pt({open:z,ref:u,onComplete(){z&&f?.(!0)}});const _=l.useMemo(()=>({open:z,transitionStatus:U,side:s,align:R}),[z,U,s,R]);Y(()=>{!v||!u.current||Object.keys(se.current).length||(se.current={top:v.style.top||"0",left:v.style.left||"0",right:v.style.right,height:v.style.height,bottom:v.style.bottom,minHeight:v.style.minHeight,maxHeight:v.style.maxHeight,marginTop:v.style.marginTop,marginBottom:v.style.marginBottom})},[u,v]),Y(()=>{z||a||(M.current=!1,A.current=!1,S.current=0,ie.current=0,ft(v,se.current))},[z,a,v,u]),Y(()=>{const H=u.current;if(!(!z||!te||!v||!H||c.state.transitionStatus==="ending")){if(!a){M.current=!0,G.request(w),H.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{const fe=mo(H);H.style.removeProperty("--transform-origin");try{const X=getComputedStyle(v),me=getComputedStyle(H),we=Vt(te),pe=$t(v),Q=te.getBoundingClientRect(),J=v.getBoundingClientRect(),ye=Q.left,oe=Q.height,ne=B||H,Te=ne.scrollHeight,Ae=parseFloat(me.borderBottomWidth),g=parseFloat(X.marginTop)||10,L=parseFloat(X.marginBottom)||10,C=parseFloat(X.minHeight)||100,$=Jt(me),Z=5,le=5,ge=20,be=we.documentElement.clientHeight-g-L,ke=we.documentElement.clientWidth,Se=be-Q.bottom+oe,Me=p.current,Le=m.current;let Pe,Oe=0,Ze=0;if(Me&&Le){const F=Le.getBoundingClientRect();Pe=Me.getBoundingClientRect();const ce=F.left-ye,Ce=Pe.left-J.left,Ee=F.top-Q.top+F.height/2,ve=Pe.top-J.top+Pe.height/2;Oe=ce-Ce,Ze=ve-Ee}const qe=Se+Ze+L+Ae;let Ne=Math.min(be,qe);const gt=be-g-L,Be=qe-Ne,_e=Math.max(Z,ye+Oe),et=ke-le,Ye=Math.max(0,_e+J.width-et);v.style.left=`${_e-Ye}px`,v.style.height=`${Ne}px`,v.style.maxHeight="auto",v.style.marginTop=`${g}px`,v.style.marginBottom=`${L}px`,H.style.height="100%";const tt=ne.scrollHeight-ne.clientHeight,nt=Be>=tt;nt&&(Ne=Math.min(be,J.height)-(Be-tt));const ht=Q.topbe-ge||Nex(!1));return}if(nt){const F=Math.max(0,be-qe);v.style.top=J.height>=gt?"0":`${F}px`,v.style.height=`${Ne}px`,ne.scrollTop=ne.scrollHeight-ne.clientHeight,S.current=Math.max(C,Ne)}else v.style.bottom="0",S.current=Math.max(C,Ne),ne.scrollTop=Be;if(Pe){const F=J.top,ce=J.height,Ce=Pe.top+Pe.height/2,Ee=ce>0?(Ce-F)/ce*100:50,ve=io(Ee,0,100);H.style.setProperty("--transform-origin",`50% ${ve}%`)}(S.current===be||Ne>=$)&&(A.current=!0),w(),setTimeout(()=>{M.current=!0})}finally{fe()}})}},[c,z,v,te,m,p,u,w,a,x,G,E,I,B]),l.useEffect(()=>{if(!a||!v||!z)return;const H=$t(v);function fe(X){d(!1,xe(nr,X))}return H.addEventListener("resize",fe),()=>{H.removeEventListener("resize",fe)}},[d,a,v,z]);const ue={...B?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":P||void 0,id:`${W}-list`},onKeyDown(H){b.current=!0,O&&or.has(H.key)&&H.stopPropagation()},onMouseMove(){b.current=!1},onPointerLeave(H){if(!T||Sn(H)||H.pointerType==="touch")return;const fe=H.currentTarget;K.start(0,()=>{c.set("activeIndex",null),fe.focus({preventScroll:!0})})},onScroll(H){B||y.current?.(H.currentTarget)},...a&&{style:B?{height:"100%"}:wn}},Ie=Ve("div",e,{ref:[n,u],state:_,stateAttributesMapping:uo,props:[ee,ue,rr(U),{className:!B&&a?Lt.className:void 0},r]});return h.jsxs(l.Fragment,{children:[!ae&&Lt.getElement(re),h.jsx(tr,{context:N,modal:!1,disabled:!D,restoreFocus:!0,children:Ie})]})});function Jt(t){const e=t.maxHeight||"";return e.endsWith("px")&&parseFloat(e)||1/0}const Zt={transform:"none",scale:"1",translate:"0 0"};function po(t,e,n){n?t.setProperty(e,n):t.removeProperty(e)}function mo(t){const{style:e}=t,n={},o=Object.keys(Zt);for(const i of o)n[i]=e.getPropertyValue(i),e.setProperty(i,Zt[i]);return()=>{for(const i of o)po(e,i,n[i])}}const go=l.forwardRef(function(e,n){const{className:o,render:i,...r}=e,{store:c,scrollHandlerRef:u}=je(),{alignItemWithTriggerActive:f}=Ut(),d=k(c,V.hasScrollArrows),m=k(c,V.openMethod),p=k(c,V.multiple),P={id:`${k(c,V.id)}-list`,role:"listbox","aria-multiselectable":p||void 0,onScroll(y){u.current?.(y.currentTarget)},...f&&{style:wn},className:d&&m!=="touch"?Lt.className:void 0},w=de(y=>{c.set("listElement",y)});return Ve("div",e,{ref:[n,w],props:[P,r]})});let In=(function(t){return t[t.None=0]="None",t[t.GuessFromOrder=1]="GuessFromOrder",t})({});function ho(t={}){const{label:e,metadata:n,textRef:o,indexGuessBehavior:i,index:r}=t,{register:c,unregister:u,subscribeMapChange:f,elementsRef:d,labelsRef:m,nextIndexRef:p}=Qr(),b=l.useRef(-1),[P,w]=l.useState(r??(i===In.GuessFromOrder?()=>{if(b.current===-1){const s=p.current;p.current+=1,b.current=s}return b.current}:-1)),y=l.useRef(null),T=l.useCallback(s=>{if(y.current=s,P!==-1&&s!==null&&(d.current[P]=s,m)){const R=e!==void 0;m.current[P]=R?e:o?.current?.textContent??s.textContent}},[P,d,m,e,o]);return Y(()=>{if(r!=null)return;const s=y.current;if(s)return c(s,n),()=>{u(s)}},[r,c,u,n]),Y(()=>{if(r==null)return f(s=>{const R=y.current?s.get(y.current)?.index:null;R!=null&&w(R)})},[r,f,w]),l.useMemo(()=>({ref:T,index:P}),[P,T])}const vn=l.createContext(void 0);function Bt(){const t=l.useContext(vn);if(!t)throw new Error(dt(57));return t}const xo=l.memo(l.forwardRef(function(e,n){const{render:o,className:i,value:r=null,label:c,disabled:u=!1,nativeButton:f=!1,...d}=e,m=l.useRef(null),p=ho({label:c,textRef:m,indexGuessBehavior:In.GuessFromOrder}),{store:b,getItemProps:P,setOpen:w,setValue:y,selectionRef:T,typingRef:s,valuesRef:R,keyboardActiveRef:a,multiple:x,highlightItemOnHover:E}=je(),I=Fe(),O=k(b,V.isActive,p.index),N=k(b,V.isSelected,p.index,r),re=k(b,V.isSelectedByFocus,p.index),ae=k(b,V.isItemEqualToValue),K=p.index,W=K!==-1,z=l.useRef(null),D=De(K);Y(()=>{if(!W)return;const j=R.current;return j[K]=r,()=>{delete j[K]}},[W,K,r,R]),Y(()=>{if(!W)return;const j=b.state.value;let _=j;x&&Array.isArray(j)&&j.length>0&&(_=j[j.length-1]),_!==void 0&&Ke(_,r,ae)&&b.set("selectedIndex",K)},[W,K,x,ae,b,r]);const ee=l.useMemo(()=>({disabled:u,selected:N,highlighted:O}),[u,N,O]),U=P({active:O,selected:N});U.onFocus=void 0,U.id=void 0;const te=l.useRef(null),v=l.useRef("mouse"),B=l.useRef(!1),{getButtonProps:S,buttonRef:A}=cn({disabled:u,focusableWhenDisabled:!0,native:f});function ie(j){const _=b.state.value;if(x){const ue=Array.isArray(_)?_:[],Ie=N?Lr(ue,r,ae):[...ue,r];y(Ie,xe(Rt,j))}else y(r,xe(Rt,j)),w(!1,xe(Rt,j))}const M={role:"option","aria-selected":N,tabIndex:O?0:-1,onFocus(){b.set("activeIndex",K)},onMouseEnter(){!a.current&&b.state.selectedIndex===null&&b.set("activeIndex",K)},onMouseMove(){E&&b.set("activeIndex",K)},onMouseLeave(j){!E||a.current||Sn(j)||I.start(0,()=>{b.state.activeIndex===K&&b.set("activeIndex",null)})},onTouchStart(){T.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(j){te.current=j.key,b.set("activeIndex",K)},onClick(j){B.current=!1,!(j.type==="keydown"&&te.current===null)&&(u||te.current===" "&&s.current||v.current!=="touch"&&!O||(te.current=null,ie(j.nativeEvent)))},onPointerEnter(j){v.current=j.pointerType},onPointerDown(j){v.current=j.pointerType,B.current=!0},onMouseUp(j){if(u)return;if(B.current){B.current=!1;return}const _=!T.current.allowSelectedMouseUp&&N,ue=!T.current.allowUnselectedMouseUp&&!N;_||ue||v.current!=="touch"&&!O||ie(j.nativeEvent)}},se=Ve("div",e,{ref:[A,n,p.ref,z],state:ee,props:[U,M,d,S]}),G=l.useMemo(()=>({selected:N,indexRef:D,textRef:m,selectedByFocus:re,hasRegistered:W}),[N,D,m,re,W]);return h.jsx(vn.Provider,{value:G,children:se})})),yo=l.forwardRef(function(e,n){const o=e.keepMounted??!1,{selected:i}=Bt();return o||i?h.jsx(bo,{...e,ref:n}):null}),bo=l.memo(l.forwardRef((t,e)=>{const{render:n,className:o,keepMounted:i,...r}=t,{selected:c}=Bt(),u=l.useRef(null),{transitionStatus:f,setMounted:d}=Ft(c),m=l.useMemo(()=>({selected:c,transitionStatus:f}),[c,f]),p=Ve("span",t,{ref:[e,u],state:m,props:[{"aria-hidden":!0,children:"✔️"},r],stateAttributesMapping:un});return pt({open:c,ref:u,onComplete(){c||d(!1)}}),p})),Ro=l.memo(l.forwardRef(function(e,n){const{indexRef:o,textRef:i,selectedByFocus:r,hasRegistered:c}=Bt(),{selectedItemTextRef:u}=je(),{className:f,render:d,...m}=e,p=l.useCallback(P=>{if(!P||!c)return;const w=u.current===null||!u.current.isConnected;(r||w&&o.current===0)&&(u.current=P)},[u,o,r,c]);return Ve("div",e,{ref:[p,n,i],props:m})})),Tn=l.forwardRef(function(e,n){const{render:o,className:i,direction:r,keepMounted:c=!1,...u}=e,{store:f,popupRef:d,listRef:m,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:b}=je(),{side:P,scrollDownArrowRef:w,scrollUpArrowRef:y}=Ut(),T=r==="up"?V.scrollUpArrowVisible:V.scrollDownArrowVisible,s=k(f,T),R=k(f,V.openMethod),a=s&&R!=="touch",x=Fe(),E=r==="up"?y:w,{transitionStatus:I,setMounted:O}=Ft(a);Y(()=>(b.current+=1,f.state.hasScrollArrows||f.set("hasScrollArrows",!0),()=>{b.current=Math.max(0,b.current-1),b.current===0&&f.state.hasScrollArrows&&f.set("hasScrollArrows",!1)}),[f,b]),pt({open:a,ref:E,onComplete(){a||O(!1)}});const N=l.useMemo(()=>({direction:r,visible:a,side:P,transitionStatus:I}),[r,a,P,I]),ae=Ve("div",e,{ref:[n,E],state:N,props:[{"aria-hidden":!0,children:r==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(W){if(W.movementX===0&&W.movementY===0||x.isStarted())return;f.set("activeIndex",null);function z(){const D=f.state.listElement??d.current;if(!D)return;f.set("activeIndex",null),p();const ee=D.scrollTop===0,U=Math.round(D.scrollTop+D.clientHeight)>=D.scrollHeight;if(m.current.length===0&&(r==="up"?f.set("scrollUpArrowVisible",!ee):f.set("scrollDownArrowVisible",!U)),r==="up"&&ee||r==="down"&&U){x.clear();return}if((f.state.listElement||d.current)&&m.current&&m.current.length>0){const v=m.current,B=E.current?.offsetHeight||0;if(r==="up"){let S=0;const A=D.scrollTop+B;for(let M=0;M=A){S=M;break}}const ie=Math.max(0,S-1);if(ieA){S=Math.max(0,M-1);break}}const ie=Math.min(v.length-1,S+1);if(ie>S){const M=v[ie];M&&(D.scrollTop=M.offsetTop+M.offsetHeight-D.clientHeight+B)}else D.scrollTop=D.scrollHeight-D.clientHeight}}x.start(40,z)}x.start(40,z)},onMouseLeave(){x.clear()}},u]});return a||c?ae:null}),wo=l.forwardRef(function(e,n){return h.jsx(Tn,{...e,ref:n,direction:"down"})}),So=l.forwardRef(function(e,n){return h.jsx(Tn,{...e,ref:n,direction:"up"})}),Mt=Br;function Ct(t){const e=We.c(8);let n,o;e[0]!==t?({className:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let i;e[3]!==n?(i=$e("flex flex-1 text-left",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==o||e[6]!==i?(r=h.jsx(qr,{className:i,"data-slot":"select-value",...o}),e[5]=o,e[6]=i,e[7]=r):r=e[7],r}function Et(t){const e=We.c(15);let n,o,i,r,c;e[0]!==t?({className:o,size:c,id:i,children:n,...r}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=i,e[4]=r,e[5]=c):(n=e[1],o=e[2],i=e[3],r=e[4],c=e[5]);const u=c===void 0?"default":c;let f;e[6]!==o?(f=$e("flex w-fit items-center justify-between gap-1.5 whitespace-nowrap rounded-md border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed outline-none transition-colors focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-[size=default]:h-7 data-[size=sm]:h-6 data-placeholder:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-3.5 [&_svg]:pointer-events-none [&_svg]:shrink-0",o),e[6]=o,e[7]=f):f=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=h.jsx(Yr,{render:h.jsx(pn,{className:"pointer-events-none size-3.5 text-muted-foreground"})}),e[8]=d):d=e[8];let m;return e[9]!==n||e[10]!==i||e[11]!==r||e[12]!==u||e[13]!==f?(m=h.jsxs(Wr,{className:f,"data-size":u,"data-slot":"select-trigger",id:i,...r,children:[n,d]}),e[9]=n,e[10]=i,e[11]=r,e[12]=u,e[13]=f,e[14]=m):m=e[14],m}function At(t){const e=We.c(26);let n,o,i,r,c,u,f,d;e[0]!==t?({className:o,children:n,side:r,sideOffset:c,align:u,alignOffset:f,alignItemWithTrigger:d,...i}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=i,e[4]=r,e[5]=c,e[6]=u,e[7]=f,e[8]=d):(n=e[1],o=e[2],i=e[3],r=e[4],c=e[5],u=e[6],f=e[7],d=e[8]);const m=r===void 0?"bottom":r,p=c===void 0?4:c,b=u===void 0?"center":u,P=f===void 0?0:f,w=d===void 0?!0:d;let y;e[9]!==o?(y=$e("data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-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 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-y-auto overflow-x-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-closed:animate-out data-open:animate-in",o),e[9]=o,e[10]=y):y=e[10];let T;e[11]===Symbol.for("react.memo_cache_sentinel")?(T=h.jsx(Io,{}),e[11]=T):T=e[11];let s;e[12]!==n?(s=h.jsx(go,{children:n}),e[12]=n,e[13]=s):s=e[13];let R;e[14]===Symbol.for("react.memo_cache_sentinel")?(R=h.jsx(vo,{}),e[14]=R):R=e[14];let a;e[15]!==i||e[16]!==y||e[17]!==s?(a=h.jsxs(fo,{className:y,"data-slot":"select-content",...i,children:[T,s,R]}),e[15]=i,e[16]=y,e[17]=s,e[18]=a):a=e[18];let x;return e[19]!==b||e[20]!==w||e[21]!==P||e[22]!==m||e[23]!==p||e[24]!==a?(x=h.jsx(Xr,{children:h.jsx(ro,{align:b,alignItemWithTrigger:w,alignOffset:P,className:"isolate z-50",side:m,sideOffset:p,children:a})}),e[19]=b,e[20]=w,e[21]=P,e[22]=m,e[23]=p,e[24]=a,e[25]=x):x=e[25],x}function Pt(t){const e=We.c(13);let n,o,i;e[0]!==t?({className:o,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=o,e[3]=i):(n=e[1],o=e[2],i=e[3]);let r;e[4]!==o?(r=$e("relative flex min-h-7 w-full cursor-default select-none items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-3.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[4]=o,e[5]=r):r=e[5];let c;e[6]!==n?(c=h.jsx(Ro,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:n}),e[6]=n,e[7]=c):c=e[7];let u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=h.jsx(yo,{render:h.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center"}),children:h.jsx(br,{className:"pointer-events-none"})}),e[8]=u):u=e[8];let f;return e[9]!==i||e[10]!==r||e[11]!==c?(f=h.jsxs(xo,{className:r,"data-slot":"select-item",...i,children:[c,u]}),e[9]=i,e[10]=r,e[11]=c,e[12]=f):f=e[12],f}function Io(t){const e=We.c(9);let n,o;e[0]!==t?({className:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let i;e[3]!==n?(i=$e("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",n),e[3]=n,e[4]=i):i=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=h.jsx(Ir,{}),e[5]=r):r=e[5];let c;return e[6]!==o||e[7]!==i?(c=h.jsx(So,{className:i,"data-slot":"select-scroll-up-button",...o,children:r}),e[6]=o,e[7]=i,e[8]=c):c=e[8],c}function vo(t){const e=We.c(9);let n,o;e[0]!==t?({className:n,...o}=t,e[0]=t,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let i;e[3]!==n?(i=$e("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",n),e[3]=n,e[4]=i):i=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=h.jsx(pn,{}),e[5]=r):r=e[5];let c;return e[6]!==o||e[7]!==i?(c=h.jsx(wo,{className:i,"data-slot":"select-scroll-down-button",...o,children:r}),e[6]=o,e[7]=i,e[8]=c):c=e[8],c}const To=["sg-placeholder"],Mo="subnet-placeholder";function Lo(){const t=sr(),{data:e}=St(ir),{data:n}=St(lr),{data:o}=St(cr),i=Rr(),r=e.Images??[],c=n.KeyPairs??[],u=o.InstanceTypes?.flatMap(I=>I.InstanceType?[I.InstanceType]:[])??[],f=o.InstanceTypes?.reduce((I,O)=>{const N=O.InstanceType;return N&&(I[N]=(I[N]||0)+1),I},{})??{},d=Object.keys(f).sort(),m=r[0]?.ImageId,p=c[0]?.KeyName,b=d.find(I=>I.endsWith(".nano"))??d[0],{control:P,handleSubmit:w,register:y,watch:T,formState:{errors:s,isSubmitting:R}}=mr({resolver:gr(ar.refine(I=>I.count<=(f[I.instanceType]??1),{message:"Cannot exceed available capacity",path:["count"]})),defaultValues:{count:1,imageId:m??"",keyName:p??"",instanceType:b??""}}),a=T("instanceType"),x=a?f[a]??1:1,E=async I=>{await i.mutateAsync({...I,securityGroupIds:To,subnetId:Mo}),t({to:"/ec2/describe-instances"})};return h.jsxs(h.Fragment,{children:[h.jsx(xr,{to:"/ec2/describe-instances",children:"Back to instances"}),h.jsx(yr,{title:"Run EC2 Instances"}),u.length===0&&h.jsx(Gt,{msg:"No compute available. No new instances can be created until compute is available."}),i.error&&h.jsx(Gt,{error:i.error,msg:"Failed to create instance"}),h.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:w(E),children:[h.jsxs(ot,{children:[h.jsx(st,{children:h.jsx("label",{htmlFor:"imageId",children:"Image"})}),h.jsx(wt,{control:P,name:"imageId",render:({field:I})=>{const O=r.find(N=>N.ImageId===I.value);return h.jsxs(Mt,{onValueChange:N=>I.onChange(N),value:I.value??"",children:[h.jsx(Et,{"aria-invalid":!!s.imageId,className:"w-full",id:"imageId",children:h.jsx(Ct,{children:O?`${O.Name||"Unnamed"} (${O.Architecture})`:""})}),h.jsx(At,{children:r.map(N=>h.jsxs(Pt,{value:N.ImageId??"",children:[N.Name||"Unnamed"," (",N.Architecture,")"]},N.ImageId))})]})}}),h.jsx(it,{errors:[s.imageId]})]}),h.jsxs(ot,{children:[h.jsx(st,{children:h.jsx("label",{htmlFor:"instanceType",children:"Instance Type"})}),h.jsx(wt,{control:P,name:"instanceType",render:({field:I})=>h.jsxs(Mt,{onValueChange:O=>I.onChange(O),value:I.value?I.value:"",children:[h.jsx(Et,{"aria-invalid":!!s.instanceType,className:"w-full",id:"instanceType",children:h.jsx(Ct,{})}),h.jsx(At,{children:d.map(O=>h.jsxs(Pt,{value:O,children:[O," (",f[O]," available)"]},O))})]})}),h.jsx(it,{errors:[s.instanceType]})]}),h.jsxs(ot,{children:[h.jsx(st,{children:h.jsx("label",{htmlFor:"keyName",children:"Key Pair"})}),h.jsx(wt,{control:P,name:"keyName",render:({field:I})=>h.jsxs(Mt,{onValueChange:O=>I.onChange(O),value:I.value?I.value:"",children:[h.jsx(Et,{"aria-invalid":!!s.keyName,className:"w-full",id:"keyName",children:h.jsx(Ct,{})}),h.jsx(At,{children:c.map(O=>h.jsx(Pt,{value:O.KeyName??"",children:O.KeyName},O.KeyPairId))})]})}),h.jsx(it,{errors:[s.keyName]})]}),h.jsxs(ot,{children:[h.jsx(st,{children:h.jsx("label",{htmlFor:"count",children:"Number of Instances"})}),h.jsx(hr,{"aria-describedby":"count-description","aria-invalid":!!s.count,id:"count",type:"number",...y("count",{valueAsNumber:!0})}),h.jsx("p",{className:"text-muted-foreground text-xs",id:"count-description",children:a&&`Available capacity for ${a}: ${x}`}),h.jsx(it,{errors:[s.count]})]}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(qt,{disabled:R||i.isPending,onClick:()=>t({to:"/ec2/describe-instances"}),type:"button",variant:"outline",children:"Cancel"}),h.jsx(qt,{disabled:R||i.isPending||u.length===0,type:"submit",children:R||i.isPending?"Creating…":"Create Instance"})]})]})]})}export{Lo as component}; diff --git a/hive/services/hiveui/frontend/dist/assets/s3.js b/hive/services/hiveui/frontend/dist/assets/s3.js index 84b34a3a9..5a43d5f4f 100644 --- a/hive/services/hiveui/frontend/dist/assets/s3.js +++ b/hive/services/hiveui/frontend/dist/assets/s3.js @@ -1,6 +1,6 @@ -import{aU as cr,aV as hr,aW as G,aX as ot,aY as Me,aZ as dr,a_ as pr,a$ as yr,b0 as mr,b1 as Er,b2 as wr,b3 as gr,b4 as br,b5 as vr,b6 as xr,b7 as yt,b8 as ae,b9 as Ie,ba as _r,aO as fe,aP as le,aQ as ce,bb as he,bc as Cr,bd as Sr,be as Ar,bf as Rr,bg as Br,bh as Fr,bi as Tr,bj as Dr,bk as Lr,bl as we,bm as Mr,bn as kr,bo as St,c as mt,bp as Et,aT as wt}from"./index.js";import{u as gt}from"./useMutation.js";const Pr=typeof ReadableStream=="function"?ReadableStream:function(){};class Nr extends Pr{}const Ir=({expectedChecksum:a,checksum:n,source:f,checksumSourceLocation:l,base64Encoder:y})=>{if(!cr(f))throw new Error(`@smithy/util-stream: unsupported source type ${f?.constructor?.name??f} in ChecksumStream.`);const c=y??hr;if(typeof TransformStream!="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");const h=new TransformStream({start(){},async transform(d,g){n.update(d),g.enqueue(d)},async flush(d){const g=await n.digest(),F=c(g);if(a!==F){const R=new Error(`Checksum mismatch: expected "${a}" but received "${F}" in response header "${l}".`);d.error(R)}else d.terminate()}});f.pipeThrough(h);const i=h.readable;return Object.setPrototypeOf(i,Nr.prototype),i};class Ur{allocByteArray;byteLength=0;byteArrays=[];constructor(n){this.allocByteArray=n}push(n){this.byteArrays.push(n),this.byteLength+=n.byteLength}flush(){if(this.byteArrays.length===1){const l=this.byteArrays[0];return this.reset(),l}const n=this.allocByteArray(this.byteLength);let f=0;for(let l=0;lnew Uint8Array(g))];let i=-1;const d=async g=>{const{value:F,done:R}=await l.read(),B=F;if(R){if(i!==-1){const C=Ue(h,i);Se(C)>0&&g.enqueue(C)}g.close()}else{const C=jr(B,!1);if(i!==C&&(i>=0&&g.enqueue(Ue(h,i)),i=C),i===-1){g.enqueue(B);return}const _=Se(B);c+=_;const L=Se(h[i]);if(_>=n&&L===0)g.enqueue(B);else{const T=Hr(h,i,B);!y&&c>n*2&&(y=!0,f?.warn(`@smithy/util-stream - stream chunk size ${_} is below threshold of ${n}, automatically buffering.`)),T>=n?g.enqueue(Ue(h,i)):await d(g)}}};return new ReadableStream({pull:d})}const qr=Or;function Hr(a,n,f){switch(n){case 0:return a[0]+=f,Se(a[0]);case 1:case 2:return a[n].push(f),Se(a[n])}}function Ue(a,n){switch(n){case 0:const f=a[0];return a[0]="",f;case 1:case 2:return a[n].flush()}throw new Error(`@smithy/util-stream - invalid index ${n} given to flush()`)}function Se(a){return a?.byteLength??a?.length??0}function jr(a,n=!0){return n&&typeof Buffer<"u"&&a instanceof Buffer?2:a instanceof Uint8Array?1:typeof a=="string"?0:-1}const st=[G.CRC32,G.CRC32C,G.CRC64NVME,G.SHA1,G.SHA256],Wr=[G.SHA256,G.SHA1,G.CRC32,G.CRC32C,G.CRC64NVME],Kr=(a,{requestChecksumRequired:n,requestAlgorithmMember:f,requestChecksumCalculation:l})=>{if(!f)return l===Me.WHEN_SUPPORTED||n?ot:void 0;if(!a[f])return;const y=a[f];if(!st.includes(y))throw new Error(`The checksum algorithm "${y}" is not supported by the client. Select one of ${st}.`);return y},bt=a=>a===G.MD5?"content-md5":`x-amz-checksum-${a.toLowerCase()}`,$r=(a,n)=>{const f=a.toLowerCase();for(const l of Object.keys(n))if(f===l.toLowerCase())return!0;return!1},zr=(a,n)=>{const f=a.toLowerCase();for(const l of Object.keys(n))if(l.toLowerCase().startsWith(f))return!0;return!1},er=a=>a!==void 0&&typeof a!="string"&&!ArrayBuffer.isView(a)&&!dr(a);var Vr=(function(){function a(){this.crc32c=new At}return a.prototype.update=function(n){pr(n)||this.crc32c.update(yr(n))},a.prototype.digest=function(){return mr(this,void 0,void 0,function(){return Er(this,function(n){return[2,wr(this.crc32c.digest())]})})},a.prototype.reset=function(){this.crc32c=new At},a})(),At=(function(){function a(){this.checksum=4294967295}return a.prototype.update=function(n){var f,l;try{for(var y=gr(n),c=y.next();!c.done;c=y.next()){var h=c.value;this.checksum=this.checksum>>>8^Yr[(this.checksum^h)&255]}}catch(i){f={error:i}}finally{try{c&&!c.done&&(l=y.return)&&l.call(y)}finally{if(f)throw f.error}}return this},a.prototype.digest=function(){return(this.checksum^4294967295)>>>0},a})(),Gr=[0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697],Yr=br(Gr);const Xr=()=>{const n=new Array(8);for(let f=0;f<8;f++){const l=new Array(512);for(let y=0;y<256;y++){let c=BigInt(y);for(let h=0;h<8*(f+1);h++)c&1n?c=c>>1n^0x9a6c9329ac4bc9b5n:c=c>>1n;l[y*2]=Number(c>>32n&0xffffffffn),l[y*2+1]=Number(c&0xffffffffn)}n[f]=new Uint32Array(l)}return n};let Oe,Ce,ut,ft,lt,ct,ht,dt,pt;const Qr=()=>{Oe||(Oe=Xr(),[Ce,ut,ft,lt,ct,ht,dt,pt]=Oe)};class Zr{c1=0;c2=0;constructor(){Qr(),this.reset()}update(n){const f=n.length;let l=0,y=this.c1,c=this.c2;for(;l+8<=f;){const h=((c^n[l++])&255)<<1,i=((c>>>8^n[l++])&255)<<1,d=((c>>>16^n[l++])&255)<<1,g=((c>>>24^n[l++])&255)<<1,F=((y^n[l++])&255)<<1,R=((y>>>8^n[l++])&255)<<1,B=((y>>>16^n[l++])&255)<<1,C=((y>>>24^n[l++])&255)<<1;y=pt[h]^dt[i]^ht[d]^ct[g]^lt[F]^ft[R]^ut[B]^Ce[C],c=pt[h+1]^dt[i+1]^ht[d+1]^ct[g+1]^lt[F+1]^ft[R+1]^ut[B+1]^Ce[C+1]}for(;l>>8|(y&255)<<24)>>>0,y=y>>>8^Ce[h],c^=Ce[h+1],l++}this.c1=y,this.c2=c}async digest(){const n=this.c1^4294967295,f=this.c2^4294967295;return new Uint8Array([n>>>24,n>>>16&255,n>>>8&255,n&255,f>>>24,f>>>16&255,f>>>8&255,f&255])}reset(){this.c1=4294967295,this.c2=4294967295}}const Jr=()=>vr,tr=(a,n)=>{switch(a){case G.MD5:return n.md5;case G.CRC32:return Jr();case G.CRC32C:return Vr;case G.CRC64NVME:return Zr;case G.SHA1:return n.sha1;case G.SHA256:return n.sha256;default:throw new Error(`Unsupported checksum algorithm: ${a}`)}},rr=(a,n)=>{const f=new a;return f.update(xr(n||"")),f.digest()},en={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},tn=(a,n)=>(f,l)=>async y=>{if(!yt.isInstance(y.request)||zr("x-amz-checksum-",y.request.headers))return f(y);const{request:c,input:h}=y,{body:i,headers:d}=c,{base64Encoder:g,streamHasher:F}=a,{requestChecksumRequired:R,requestAlgorithmMember:B}=n,C=await a.requestChecksumCalculation(),_=B?.name,L=B?.httpHeader;_&&!h[_]&&(C===Me.WHEN_SUPPORTED||R)&&(h[_]=ot,L&&(d[L]=ot));const T=Kr(h,{requestChecksumRequired:R,requestAlgorithmMember:B?.name,requestChecksumCalculation:C});let p=i,x=d;if(T){switch(T){case G.CRC32:ae(l,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case G.CRC32C:ae(l,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case G.CRC64NVME:ae(l,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case G.SHA1:ae(l,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case G.SHA256:ae(l,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y");break}const A=bt(T),E=tr(T,a);if(er(i)){const{getAwsChunkedEncodingStream:m,bodyLengthChecker:S}=a;p=m(typeof a.requestStreamBufferSize=="number"&&a.requestStreamBufferSize>=8*1024?qr(i,a.requestStreamBufferSize,l.logger):i,{base64Encoder:g,bodyLengthChecker:S,checksumLocationName:A,checksumAlgorithmFn:E,streamHasher:F}),x={...d,"content-encoding":d["content-encoding"]?`${d["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":d["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":A},delete x["content-length"]}else if(!$r(A,d)){const m=await rr(E,i);x={...d,[A]:g(m)}}}try{return await f({...y,request:{...c,headers:x,body:p}})}catch(A){if(A instanceof Error&&A.name==="InvalidChunkSizeError")try{A.message.endsWith(".")||(A.message+="."),A.message+=" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream."}catch{}throw A}},rn={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0},nn=(a,n)=>(f,l)=>async y=>{const c=y.input,{requestValidationModeMember:h}=n,i=await a.requestChecksumCalculation(),d=await a.responseChecksumValidation();switch(i){case Me.WHEN_REQUIRED:ae(l,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case Me.WHEN_SUPPORTED:ae(l,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z");break}switch(d){case Ie.WHEN_REQUIRED:ae(l,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case Ie.WHEN_SUPPORTED:ae(l,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b");break}return h&&!c[h]&&d===Ie.WHEN_SUPPORTED&&(c[h]="ENABLED"),f(y)},nr=(a=[])=>{const n=[];for(const f of Wr)!a.includes(f)||!st.includes(f)||n.push(f);return n},an=a=>{const n=a.lastIndexOf("-");if(n!==-1){const f=a.slice(n+1);if(!f.startsWith("0")){const l=parseInt(f,10);if(!isNaN(l)&&l>=1&&l<=1e4)return!0}}return!1},on=async(a,{checksumAlgorithmFn:n,base64Encoder:f})=>f(await rr(n,a)),sn=async(a,{config:n,responseAlgorithms:f,logger:l})=>{const y=nr(f),{body:c,headers:h}=a;for(const i of y){const d=bt(i),g=h[d];if(g){let F;try{F=tr(i,n)}catch(C){if(i===G.CRC64NVME){l?.warn(`Skipping ${G.CRC64NVME} checksum validation: ${C.message}`);continue}throw C}const{base64Encoder:R}=n;if(er(c)){a.body=Ir({expectedChecksum:g,checksumSourceLocation:d,checksum:new F,source:c,base64Encoder:R});return}const B=await on(c,{checksumAlgorithmFn:F,base64Encoder:R});if(B===g)break;throw new Error(`Checksum mismatch: expected "${B}" but received "${g}" in response header "${d}".`)}}},un={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},fn=(a,n)=>(f,l)=>async y=>{if(!yt.isInstance(y.request))return f(y);const c=y.input,h=await f(y),i=h.response,{requestValidationModeMember:d,responseAlgorithms:g}=n;if(d&&c[d]==="ENABLED"){const{clientName:F,commandName:R}=l;if(F==="S3Client"&&R==="GetObjectCommand"&&nr(g).every(C=>{const _=bt(C),L=i.headers[_];return!L||an(L)}))return h;await sn(i,{config:a,responseAlgorithms:g,logger:l.logger})}return h},vt=(a,n)=>({applyToStack:f=>{f.add(tn(a,n),en),f.addRelativeTo(nn(a,n),rn),f.addRelativeTo(fn(a,n),un)}}),ln="content-length",cn="x-amz-decoded-content-length";function hn(){return(a,n)=>async f=>{const{request:l}=f;if(yt.isInstance(l)&&!(ln in l.headers)&&!(cn in l.headers)){const y="Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.";typeof n?.logger?.warn=="function"&&!(n.logger instanceof _r)?n.logger.warn(y):console.warn(y)}return a({...f})}}const dn={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},pn=a=>({applyToStack:n=>{n.add(hn(),dn)}});class yn extends fe.classBuilder().ep({...le,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(n,f,l,y){return[ce(l,n.getEndpointParameterInstructions()),he(l)]}).s("AmazonS3","AbortMultipartUpload",{}).n("S3Client","AbortMultipartUploadCommand").sc(Cr).build(){}function mn(a){return n=>async f=>{const l={...f.input},y=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const c of y){const h=l[c.target];if(h){let i;typeof h=="string"?wn(h,a)?i=a.base64Decoder(h):(i=a.utf8Decoder(h),l[c.target]=a.base64Encoder(i)):(i=ArrayBuffer.isView(h)?new Uint8Array(h.buffer,h.byteOffset,h.byteLength):new Uint8Array(h),l[c.target]=a.base64Encoder(i));const d=new a.md5;d.update(i),l[c.hash]=a.base64Encoder(await d.digest())}}return n({...f,input:l})}}const En={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},Pe=a=>({applyToStack:n=>{n.add(mn(a),En)}});function wn(a,n){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(a))return!1;try{return n.base64Decoder(a).length===32}catch{return!1}}class gn extends fe.classBuilder().ep({...le,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(n,f,l,y){return[ce(l,n.getEndpointParameterInstructions()),he(l),Pe(l)]}).s("AmazonS3","CompleteMultipartUpload",{}).n("S3Client","CompleteMultipartUploadCommand").sc(Sr).build(){}function bn(a){return n=>async f=>{const{CreateBucketConfiguration:l}=f.input,y=await a.region();return!l?.LocationConstraint&&!l?.Location&&y!=="us-east-1"&&(f.input.CreateBucketConfiguration=f.input.CreateBucketConfiguration??{},f.input.CreateBucketConfiguration.LocationConstraint=y),n(f)}}const vn={step:"initialize",tags:["LOCATION_CONSTRAINT","CREATE_BUCKET_CONFIGURATION"],name:"locationConstraintMiddleware",override:!0},xn=a=>({applyToStack:n=>{n.add(bn(a),vn)}});class _n extends fe.classBuilder().ep({...le,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},DisableAccessPoints:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(n,f,l,y){return[ce(l,n.getEndpointParameterInstructions()),he(l),xn(l)]}).s("AmazonS3","CreateBucket",{}).n("S3Client","CreateBucketCommand").sc(Ar).build(){}class Cn extends fe.classBuilder().ep({...le,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(n,f,l,y){return[ce(l,n.getEndpointParameterInstructions()),he(l),Pe(l)]}).s("AmazonS3","CreateMultipartUpload",{}).n("S3Client","CreateMultipartUploadCommand").sc(Rr).build(){}class Sn extends fe.classBuilder().ep({...le,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(n,f,l,y){return[ce(l,n.getEndpointParameterInstructions()),he(l)]}).s("AmazonS3","DeleteObject",{}).n("S3Client","DeleteObjectCommand").sc(Br).build(){}class Rt extends fe.classBuilder().ep({...le,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(n,f,l,y){return[ce(l,n.getEndpointParameterInstructions()),vt(l,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),pn(),he(l),Pe(l)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").sc(Fr).build(){}class An extends fe.classBuilder().ep({...le,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(n,f,l,y){return[ce(l,n.getEndpointParameterInstructions()),vt(l,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),he(l)]}).s("AmazonS3","PutObjectTagging",{}).n("S3Client","PutObjectTaggingCommand").sc(Tr).build(){}class Rn extends fe.classBuilder().ep({...le,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(n,f,l,y){return[ce(l,n.getEndpointParameterInstructions()),vt(l,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),he(l),Pe(l)]}).s("AmazonS3","UploadPart",{}).n("S3Client","UploadPartCommand").sc(Dr).build(){}const Bn={CRC32:"CRC32"};class Fn{onabort=null;_aborted=!1;constructor(){Object.defineProperty(this,"_aborted",{value:!1,writable:!0})}get aborted(){return this._aborted}abort(){this._aborted=!0,this.onabort&&(this.onabort(this),this.onabort=null)}}class Tn{signal=new Fn;abort(){this.signal.abort()}}var Be={exports:{}},Bt;function Ne(){if(Bt)return Be.exports;Bt=1;var a=typeof Reflect=="object"?Reflect:null,n=a&&typeof a.apply=="function"?a.apply:function(m,S,I){return Function.prototype.apply.call(m,S,I)},f;a&&typeof a.ownKeys=="function"?f=a.ownKeys:Object.getOwnPropertySymbols?f=function(m){return Object.getOwnPropertyNames(m).concat(Object.getOwnPropertySymbols(m))}:f=function(m){return Object.getOwnPropertyNames(m)};function l(E){console&&console.warn&&console.warn(E)}var y=Number.isNaN||function(m){return m!==m};function c(){c.init.call(this)}Be.exports=c,Be.exports.once=p,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var h=10;function i(E){if(typeof E!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof E)}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(E){if(typeof E!="number"||E<0||y(E))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+E+".");h=E}}),c.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},c.prototype.setMaxListeners=function(m){if(typeof m!="number"||m<0||y(m))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+m+".");return this._maxListeners=m,this};function d(E){return E._maxListeners===void 0?c.defaultMaxListeners:E._maxListeners}c.prototype.getMaxListeners=function(){return d(this)},c.prototype.emit=function(m){for(var S=[],I=1;I0&&(H=S[0]),H instanceof Error)throw H;var Q=new Error("Unhandled error."+(H?" ("+H.message+")":""));throw Q.context=H,Q}var J=U[m];if(J===void 0)return!1;if(typeof J=="function")n(J,this,S);else for(var ee=J.length,oe=_(J,ee),I=0;I0&&H.length>N&&!H.warned){H.warned=!0;var Q=new Error("Possible EventEmitter memory leak detected. "+H.length+" "+String(m)+" listeners added. Use emitter.setMaxListeners() to increase limit");Q.name="MaxListenersExceededWarning",Q.emitter=E,Q.type=m,Q.count=H.length,l(Q)}return E}c.prototype.addListener=function(m,S){return g(this,m,S,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(m,S){return g(this,m,S,!0)};function F(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function R(E,m,S){var I={fired:!1,wrapFn:void 0,target:E,type:m,listener:S},N=F.bind(I);return N.listener=S,I.wrapFn=N,N}c.prototype.once=function(m,S){return i(S),this.on(m,R(this,m,S)),this},c.prototype.prependOnceListener=function(m,S){return i(S),this.prependListener(m,R(this,m,S)),this},c.prototype.removeListener=function(m,S){var I,N,U,H,Q;if(i(S),N=this._events,N===void 0)return this;if(I=N[m],I===void 0)return this;if(I===S||I.listener===S)--this._eventsCount===0?this._events=Object.create(null):(delete N[m],N.removeListener&&this.emit("removeListener",m,I.listener||S));else if(typeof I!="function"){for(U=-1,H=I.length-1;H>=0;H--)if(I[H]===S||I[H].listener===S){Q=I[H].listener,U=H;break}if(U<0)return this;U===0?I.shift():L(I,U),I.length===1&&(N[m]=I[0]),N.removeListener!==void 0&&this.emit("removeListener",m,Q||S)}return this},c.prototype.off=c.prototype.removeListener,c.prototype.removeAllListeners=function(m){var S,I,N;if(I=this._events,I===void 0)return this;if(I.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):I[m]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete I[m]),this;if(arguments.length===0){var U=Object.keys(I),H;for(N=0;N=0;N--)this.removeListener(m,S[N]);return this};function B(E,m,S){var I=E._events;if(I===void 0)return[];var N=I[m];return N===void 0?[]:typeof N=="function"?S?[N.listener||N]:[N]:S?T(N):_(N,N.length)}c.prototype.listeners=function(m){return B(this,m,!0)},c.prototype.rawListeners=function(m){return B(this,m,!1)},c.listenerCount=function(E,m){return typeof E.listenerCount=="function"?E.listenerCount(m):C.call(E,m)},c.prototype.listenerCount=C;function C(E){var m=this._events;if(m!==void 0){var S=m[E];if(typeof S=="function")return 1;if(S!==void 0)return S.length}return 0}c.prototype.eventNames=function(){return this._eventsCount>0?f(this._events):[]};function _(E,m){for(var S=new Array(m),I=0;I0)throw new Error("Invalid string. Length must be a multiple of 4");var L=C.indexOf("=");L===-1&&(L=_);var T=L===_?0:4-L%4;return[L,T]}function i(C){var _=h(C),L=_[0],T=_[1];return(L+T)*3/4-T}function d(C,_,L){return(_+L)*3/4-L}function g(C){var _,L=h(C),T=L[0],p=L[1],x=new f(d(C,T,p)),A=0,E=p>0?T-4:T,m;for(m=0;m>16&255,x[A++]=_>>8&255,x[A++]=_&255;return p===2&&(_=n[C.charCodeAt(m)]<<2|n[C.charCodeAt(m+1)]>>4,x[A++]=_&255),p===1&&(_=n[C.charCodeAt(m)]<<10|n[C.charCodeAt(m+1)]<<4|n[C.charCodeAt(m+2)]>>2,x[A++]=_>>8&255,x[A++]=_&255),x}function F(C){return a[C>>18&63]+a[C>>12&63]+a[C>>6&63]+a[C&63]}function R(C,_,L){for(var T,p=[],x=_;xE?E:A+x));return T===1?(_=C[L-1],p.push(a[_>>2]+a[_<<4&63]+"==")):T===2&&(_=(C[L-2]<<8)+C[L-1],p.push(a[_>>10]+a[_>>4&63]+a[_<<2&63]+"=")),p.join("")}return _e}var Fe={};var Tt;function Ln(){return Tt||(Tt=1,Fe.read=function(a,n,f,l,y){var c,h,i=y*8-l-1,d=(1<>1,F=-7,R=f?y-1:0,B=f?-1:1,C=a[n+R];for(R+=B,c=C&(1<<-F)-1,C>>=-F,F+=i;F>0;c=c*256+a[n+R],R+=B,F-=8);for(h=c&(1<<-F)-1,c>>=-F,F+=l;F>0;h=h*256+a[n+R],R+=B,F-=8);if(c===0)c=1-g;else{if(c===d)return h?NaN:(C?-1:1)*(1/0);h=h+Math.pow(2,l),c=c-g}return(C?-1:1)*h*Math.pow(2,c-l)},Fe.write=function(a,n,f,l,y,c){var h,i,d,g=c*8-y-1,F=(1<>1,B=y===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=l?0:c-1,_=l?1:-1,L=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(i=isNaN(n)?1:0,h=F):(h=Math.floor(Math.log(n)/Math.LN2),n*(d=Math.pow(2,-h))<1&&(h--,d*=2),h+R>=1?n+=B/d:n+=B*Math.pow(2,1-R),n*d>=2&&(h++,d/=2),h+R>=F?(i=0,h=F):h+R>=1?(i=(n*d-1)*Math.pow(2,y),h=h+R):(i=n*Math.pow(2,R-1)*Math.pow(2,y),h=0));y>=8;a[f+C]=i&255,C+=_,i/=256,y-=8);for(h=h<0;a[f+C]=h&255,C+=_,h/=256,g-=8);a[f+C-_]|=L*128}),Fe}var Dt;function Re(){return Dt||(Dt=1,(function(a){var n=Dn(),f=Ln(),l=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=i,a.SlowBuffer=p,a.INSPECT_MAX_BYTES=50;var y=2147483647;a.kMaxLength=y,i.TYPED_ARRAY_SUPPORT=c(),!i.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{var r=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(r,e),r.foo()===42}catch{return!1}}Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}});function h(r){if(r>y)throw new RangeError('The value "'+r+'" is invalid for option "size"');var e=new Uint8Array(r);return Object.setPrototypeOf(e,i.prototype),e}function i(r,e,t){if(typeof r=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return R(r)}return d(r,e,t)}i.poolSize=8192;function d(r,e,t){if(typeof r=="string")return B(r,e);if(ArrayBuffer.isView(r))return C(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(D(r,ArrayBuffer)||r&&D(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(D(r,SharedArrayBuffer)||r&&D(r.buffer,SharedArrayBuffer)))return _(r,e,t);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var s=r.valueOf&&r.valueOf();if(s!=null&&s!==r)return i.from(s,e,t);var w=L(r);if(w)return w;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return i.from(r[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}i.from=function(r,e,t){return d(r,e,t)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array);function g(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function F(r,e,t){return g(r),r<=0?h(r):e!==void 0?typeof t=="string"?h(r).fill(e,t):h(r).fill(e):h(r)}i.alloc=function(r,e,t){return F(r,e,t)};function R(r){return g(r),h(r<0?0:T(r)|0)}i.allocUnsafe=function(r){return R(r)},i.allocUnsafeSlow=function(r){return R(r)};function B(r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!i.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var t=x(r,e)|0,s=h(t),w=s.write(r,e);return w!==t&&(s=s.slice(0,w)),s}function C(r){for(var e=r.length<0?0:T(r.length)|0,t=h(e),s=0;s=y)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+y.toString(16)+" bytes");return r|0}function p(r){return+r!=r&&(r=0),i.alloc(+r)}i.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==i.prototype},i.compare=function(e,t){if(D(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),D(t,Uint8Array)&&(t=i.from(t,t.offset,t.byteLength)),!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var s=e.length,w=t.length,M=0,k=Math.min(s,w);M2&&arguments[2]===!0;if(!s&&t===0)return 0;for(var w=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return P(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return o(r).length;default:if(w)return s?-1:P(r).length;e=(""+e).toLowerCase(),w=!0}}i.byteLength=x;function A(r,e,t){var s=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return se(this,e,t);case"utf8":case"utf-8":return oe(this,e,t);case"ascii":return ie(this,e,t);case"latin1":case"binary":return pe(this,e,t);case"base64":return ee(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ye(this,e,t);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),s=!0}}i.prototype._isBuffer=!0;function E(r,e,t){var s=r[e];r[e]=r[t],r[t]=s}i.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tt&&(e+=" ... "),""},l&&(i.prototype[l]=i.prototype.inspect),i.prototype.compare=function(e,t,s,w,M){if(D(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),!i.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),s===void 0&&(s=e?e.length:0),w===void 0&&(w=0),M===void 0&&(M=this.length),t<0||s>e.length||w<0||M>this.length)throw new RangeError("out of range index");if(w>=M&&t>=s)return 0;if(w>=M)return-1;if(t>=s)return 1;if(t>>>=0,s>>>=0,w>>>=0,M>>>=0,this===e)return 0;for(var k=M-w,W=s-t,K=Math.min(k,W),z=this.slice(w,M),X=e.slice(t,s),$=0;$2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,O(t)&&(t=w?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(w)return-1;t=r.length-1}else if(t<0)if(w)t=0;else return-1;if(typeof e=="string"&&(e=i.from(e,s)),i.isBuffer(e))return e.length===0?-1:S(r,e,t,s,w);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?w?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):S(r,[e],t,s,w);throw new TypeError("val must be string, number or Buffer")}function S(r,e,t,s,w){var M=1,k=r.length,W=e.length;if(s!==void 0&&(s=String(s).toLowerCase(),s==="ucs2"||s==="ucs-2"||s==="utf16le"||s==="utf-16le")){if(r.length<2||e.length<2)return-1;M=2,k/=2,W/=2,t/=2}function K(_t,Ct){return M===1?_t[Ct]:_t.readUInt16BE(Ct*M)}var z;if(w){var X=-1;for(z=t;zk&&(t=k-W),z=t;z>=0;z--){for(var $=!0,te=0;tew&&(s=w)):s=w;var M=e.length;s>M/2&&(s=M/2);for(var k=0;k>>0,isFinite(s)?(s=s>>>0,w===void 0&&(w="utf8")):(w=s,s=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var M=this.length-t;if((s===void 0||s>M)&&(s=M),e.length>0&&(s<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");w||(w="utf8");for(var k=!1;;)switch(w){case"hex":return I(this,e,t,s);case"utf8":case"utf-8":return N(this,e,t,s);case"ascii":return U(this,e,t,s);case"latin1":case"binary":return H(this,e,t,s);case"base64":return Q(this,e,t,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,e,t,s);default:if(k)throw new TypeError("Unknown encoding: "+w);w=(""+w).toLowerCase(),k=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ee(r,e,t){return e===0&&t===r.length?n.fromByteArray(r):n.fromByteArray(r.slice(e,t))}function oe(r,e,t){t=Math.min(r.length,t);for(var s=[],w=e;w239?4:M>223?3:M>191?2:1;if(w+W<=t){var K,z,X,$;switch(W){case 1:M<128&&(k=M);break;case 2:K=r[w+1],(K&192)===128&&($=(M&31)<<6|K&63,$>127&&(k=$));break;case 3:K=r[w+1],z=r[w+2],(K&192)===128&&(z&192)===128&&($=(M&15)<<12|(K&63)<<6|z&63,$>2047&&($<55296||$>57343)&&(k=$));break;case 4:K=r[w+1],z=r[w+2],X=r[w+3],(K&192)===128&&(z&192)===128&&(X&192)===128&&($=(M&15)<<18|(K&63)<<12|(z&63)<<6|X&63,$>65535&&$<1114112&&(k=$))}}k===null?(k=65533,W=1):k>65535&&(k-=65536,s.push(k>>>10&1023|55296),k=56320|k&1023),s.push(k),w+=W}return xe(s)}var de=4096;function xe(r){var e=r.length;if(e<=de)return String.fromCharCode.apply(String,r);for(var t="",s=0;ss)&&(t=s);for(var w="",M=e;Ms&&(e=s),t<0?(t+=s,t<0&&(t=0)):t>s&&(t=s),tt)throw new RangeError("Trying to access beyond buffer length")}i.prototype.readUIntLE=function(e,t,s){e=e>>>0,t=t>>>0,s||Y(e,t,this.length);for(var w=this[e],M=1,k=0;++k>>0,t=t>>>0,s||Y(e,t,this.length);for(var w=this[e+--t],M=1;t>0&&(M*=256);)w+=this[e+--t]*M;return w},i.prototype.readUInt8=function(e,t){return e=e>>>0,t||Y(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||Y(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||Y(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},i.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,s){e=e>>>0,t=t>>>0,s||Y(e,t,this.length);for(var w=this[e],M=1,k=0;++k=M&&(w-=Math.pow(2,8*t)),w},i.prototype.readIntBE=function(e,t,s){e=e>>>0,t=t>>>0,s||Y(e,t,this.length);for(var w=t,M=1,k=this[e+--w];w>0&&(M*=256);)k+=this[e+--w]*M;return M*=128,k>=M&&(k-=Math.pow(2,8*t)),k},i.prototype.readInt8=function(e,t){return e=e>>>0,t||Y(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},i.prototype.readInt16LE=function(e,t){e=e>>>0,t||Y(e,2,this.length);var s=this[e]|this[e+1]<<8;return s&32768?s|4294901760:s},i.prototype.readInt16BE=function(e,t){e=e>>>0,t||Y(e,2,this.length);var s=this[e+1]|this[e]<<8;return s&32768?s|4294901760:s},i.prototype.readInt32LE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),f.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),f.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||Y(e,8,this.length),f.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||Y(e,8,this.length),f.read(this,e,!1,52,8)};function Z(r,e,t,s,w,M){if(!i.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>w||er.length)throw new RangeError("Index out of range")}i.prototype.writeUIntLE=function(e,t,s,w){if(e=+e,t=t>>>0,s=s>>>0,!w){var M=Math.pow(2,8*s)-1;Z(this,e,t,s,M,0)}var k=1,W=0;for(this[t]=e&255;++W>>0,s=s>>>0,!w){var M=Math.pow(2,8*s)-1;Z(this,e,t,s,M,0)}var k=s-1,W=1;for(this[t+k]=e&255;--k>=0&&(W*=256);)this[t+k]=e/W&255;return t+s},i.prototype.writeUInt8=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,1,255,0),this[t]=e&255,t+1},i.prototype.writeUInt16LE=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},i.prototype.writeUInt32LE=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},i.prototype.writeUInt32BE=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},i.prototype.writeIntLE=function(e,t,s,w){if(e=+e,t=t>>>0,!w){var M=Math.pow(2,8*s-1);Z(this,e,t,s,M-1,-M)}var k=0,W=1,K=0;for(this[t]=e&255;++k>0)-K&255;return t+s},i.prototype.writeIntBE=function(e,t,s,w){if(e=+e,t=t>>>0,!w){var M=Math.pow(2,8*s-1);Z(this,e,t,s,M-1,-M)}var k=s-1,W=1,K=0;for(this[t+k]=e&255;--k>=0&&(W*=256);)e<0&&K===0&&this[t+k+1]!==0&&(K=1),this[t+k]=(e/W>>0)-K&255;return t+s},i.prototype.writeInt8=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},i.prototype.writeInt16LE=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},i.prototype.writeInt32LE=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function re(r,e,t,s,w,M){if(t+s>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function me(r,e,t,s,w){return e=+e,t=t>>>0,w||re(r,e,t,4),f.write(r,e,t,s,23,4),t+4}i.prototype.writeFloatLE=function(e,t,s){return me(this,e,t,!0,s)},i.prototype.writeFloatBE=function(e,t,s){return me(this,e,t,!1,s)};function Ee(r,e,t,s,w){return e=+e,t=t>>>0,w||re(r,e,t,8),f.write(r,e,t,s,52,8),t+8}i.prototype.writeDoubleLE=function(e,t,s){return Ee(this,e,t,!0,s)},i.prototype.writeDoubleBE=function(e,t,s){return Ee(this,e,t,!1,s)},i.prototype.copy=function(e,t,s,w){if(!i.isBuffer(e))throw new TypeError("argument should be a Buffer");if(s||(s=0),!w&&w!==0&&(w=this.length),t>=e.length&&(t=e.length),t||(t=0),w>0&&w=this.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("sourceEnd out of bounds");w>this.length&&(w=this.length),e.length-t=0;--k)e[k+t]=this[k+s];else Uint8Array.prototype.set.call(e,this.subarray(s,w),t);return M},i.prototype.fill=function(e,t,s,w){if(typeof e=="string"){if(typeof t=="string"?(w=t,t=0,s=this.length):typeof s=="string"&&(w=s,s=this.length),w!==void 0&&typeof w!="string")throw new TypeError("encoding must be a string");if(typeof w=="string"&&!i.isEncoding(w))throw new TypeError("Unknown encoding: "+w);if(e.length===1){var M=e.charCodeAt(0);(w==="utf8"&&M<128||w==="latin1")&&(e=M)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length>>0,s=s===void 0?this.length:s>>>0,e||(e=0);var k;if(typeof e=="number")for(k=t;k55295&&t<57344){if(!w){if(t>56319){(e-=3)>-1&&M.push(239,191,189);continue}else if(k+1===s){(e-=3)>-1&&M.push(239,191,189);continue}w=t;continue}if(t<56320){(e-=3)>-1&&M.push(239,191,189),w=t;continue}t=(w-55296<<10|t-56320)+65536}else w&&(e-=3)>-1&&M.push(239,191,189);if(w=null,t<128){if((e-=1)<0)break;M.push(t)}else if(t<2048){if((e-=2)<0)break;M.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;M.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;M.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return M}function q(r){for(var e=[],t=0;t>8,w=t%256,M.push(w),M.push(s);return M}function o(r){return n.toByteArray(b(r))}function u(r,e,t,s){for(var w=0;w=e.length||w>=r.length);++w)e[w+t]=r[w];return w}function D(r,e){return r instanceof e||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===e.name}function O(r){return r!==r}var V=(function(){for(var r="0123456789abcdef",e=new Array(256),t=0;t<16;++t)for(var s=t*16,w=0;w<16;++w)e[s+w]=r[t]+r[w];return e})()})(He)),He}var ue=Re();const Mn={lstatSync:()=>{},isFileReadStream(a){return!1}},ke={...Mn,runtime:"browser"},Te=a=>{if(a==null)return 0;if(typeof a=="string")return ue.Buffer.byteLength(a);if(typeof a.byteLength=="number")return a.byteLength;if(typeof a.length=="number")return a.length;if(typeof a.size=="number")return a.size;if(typeof a.start=="number"&&typeof a.end=="number")return a.end+1-a.start;if(ke.isFileReadStream(a))try{return ke.lstatSync(a.path).size}catch{return}};var ne;(function(a){a.EMPTY_INPUT="a null or undefined Body",a.CONTENT_LENGTH="the ContentLength property of the params set by the caller",a.STRING_LENGTH="the encoded byte length of the Body string",a.TYPED_ARRAY="the byteLength of a typed byte array such as Uint8Array",a.LENGTH="the value of Body.length",a.SIZE="the value of Body.size",a.START_END_DIFF="the numeric difference between Body.start and Body.end",a.LSTAT="the size of the file given by Body.path on disk as reported by lstatSync"})(ne||(ne={}));const kn=(a,n)=>{if(n!=null)return ne.CONTENT_LENGTH;if(a==null)return ne.EMPTY_INPUT;if(typeof a=="string")return ne.STRING_LENGTH;if(typeof a.byteLength=="number")return ne.TYPED_ARRAY;if(typeof a.length=="number")return ne.LENGTH;if(typeof a.size=="number")return ne.SIZE;if(typeof a.start=="number"&&typeof a.end=="number")return ne.START_END_DIFF;if(ke.isFileReadStream(a))try{return ke.lstatSync(a.path).size,ne.LSTAT}catch{return}};var De={exports:{}},Lt;function be(){return Lt||(Lt=1,typeof Object.create=="function"?De.exports=function(n,f){f&&(n.super_=f,n.prototype=Object.create(f.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:De.exports=function(n,f){if(f){n.super_=f;var l=function(){};l.prototype=f.prototype,n.prototype=new l,n.prototype.constructor=n}}),De.exports}var je,Mt;function ir(){return Mt||(Mt=1,je=Ne().EventEmitter),je}const Pn={},Nn=Object.freeze(Object.defineProperty({__proto__:null,default:Pn},Symbol.toStringTag,{value:"Module"})),ar=Lr(Nn);var We,kt;function In(){if(kt)return We;kt=1;function a(_,L){var T=Object.keys(_);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(_);L&&(p=p.filter(function(x){return Object.getOwnPropertyDescriptor(_,x).enumerable})),T.push.apply(T,p)}return T}function n(_){for(var L=1;L0?this.tail.next=p:this.head=p,this.tail=p,++this.length}},{key:"unshift",value:function(T){var p={data:T,next:this.head};this.length===0&&(this.tail=p),this.head=p,++this.length}},{key:"shift",value:function(){if(this.length!==0){var T=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,T}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(T){if(this.length===0)return"";for(var p=this.head,x=""+p.data;p=p.next;)x+=T+p.data;return x}},{key:"concat",value:function(T){if(this.length===0)return g.alloc(0);for(var p=g.allocUnsafe(T>>>0),x=this.head,A=0;x;)C(x.data,p,A),A+=x.data.length,x=x.next;return p}},{key:"consume",value:function(T,p){var x;return TE.length?E.length:T;if(m===E.length?A+=E:A+=E.slice(0,T),T-=m,T===0){m===E.length?(++x,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=E.slice(m));break}++x}return this.length-=x,A}},{key:"_getBuffer",value:function(T){var p=g.allocUnsafe(T),x=this.head,A=1;for(x.data.copy(p),T-=x.data.length;x=x.next;){var E=x.data,m=T>E.length?E.length:T;if(E.copy(p,p.length-T,0,m),T-=m,T===0){m===E.length?(++A,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=E.slice(m));break}++A}return this.length-=A,p}},{key:B,value:function(T,p){return R(this,n(n({},p),{},{depth:0,customInspect:!1}))}}]),_})(),We}var Ke,Pt;function or(){if(Pt)return Ke;Pt=1;function a(h,i){var d=this,g=this._readableState&&this._readableState.destroyed,F=this._writableState&&this._writableState.destroyed;return g||F?(i?i(h):h&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(y,this,h)):process.nextTick(y,this,h)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(h||null,function(R){!i&&R?d._writableState?d._writableState.errorEmitted?process.nextTick(f,d):(d._writableState.errorEmitted=!0,process.nextTick(n,d,R)):process.nextTick(n,d,R):i?(process.nextTick(f,d),i(R)):process.nextTick(f,d)}),this)}function n(h,i){y(h,i),f(h)}function f(h){h._writableState&&!h._writableState.emitClose||h._readableState&&!h._readableState.emitClose||h.emit("close")}function l(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function y(h,i){h.emit("error",i)}function c(h,i){var d=h._readableState,g=h._writableState;d&&d.autoDestroy||g&&g.autoDestroy?h.destroy(i):h.emit("error",i)}return Ke={destroy:a,undestroy:l,errorOrDestroy:c},Ke}var $e={},Nt;function ve(){if(Nt)return $e;Nt=1;function a(i,d){i.prototype=Object.create(d.prototype),i.prototype.constructor=i,i.__proto__=d}var n={};function f(i,d,g){g||(g=Error);function F(B,C,_){return typeof d=="string"?d:d(B,C,_)}var R=(function(B){a(C,B);function C(_,L,T){return B.call(this,F(_,L,T))||this}return C})(g);R.prototype.name=g.name,R.prototype.code=i,n[i]=R}function l(i,d){if(Array.isArray(i)){var g=i.length;return i=i.map(function(F){return String(F)}),g>2?"one of ".concat(d," ").concat(i.slice(0,g-1).join(", "),", or ")+i[g-1]:g===2?"one of ".concat(d," ").concat(i[0]," or ").concat(i[1]):"of ".concat(d," ").concat(i[0])}else return"of ".concat(d," ").concat(String(i))}function y(i,d,g){return i.substr(0,d.length)===d}function c(i,d,g){return(g===void 0||g>i.length)&&(g=i.length),i.substring(g-d.length,g)===d}function h(i,d,g){return typeof g!="number"&&(g=0),g+d.length>i.length?!1:i.indexOf(d,g)!==-1}return f("ERR_INVALID_OPT_VALUE",function(i,d){return'The value "'+d+'" is invalid for option "'+i+'"'},TypeError),f("ERR_INVALID_ARG_TYPE",function(i,d,g){var F;typeof d=="string"&&y(d,"not ")?(F="must not be",d=d.replace(/^not /,"")):F="must be";var R;if(c(i," argument"))R="The ".concat(i," ").concat(F," ").concat(l(d,"type"));else{var B=h(i,".")?"property":"argument";R='The "'.concat(i,'" ').concat(B," ").concat(F," ").concat(l(d,"type"))}return R+=". Received type ".concat(typeof g),R},TypeError),f("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),f("ERR_METHOD_NOT_IMPLEMENTED",function(i){return"The "+i+" method is not implemented"}),f("ERR_STREAM_PREMATURE_CLOSE","Premature close"),f("ERR_STREAM_DESTROYED",function(i){return"Cannot call "+i+" after a stream was destroyed"}),f("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),f("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),f("ERR_STREAM_WRITE_AFTER_END","write after end"),f("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),f("ERR_UNKNOWN_ENCODING",function(i){return"Unknown encoding: "+i},TypeError),f("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),$e.codes=n,$e}var ze,It;function sr(){if(It)return ze;It=1;var a=ve().codes.ERR_INVALID_OPT_VALUE;function n(l,y,c){return l.highWaterMark!=null?l.highWaterMark:y?l[c]:null}function f(l,y,c,h){var i=n(y,h,c);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var d=h?c:"highWaterMark";throw new a(d,i)}return Math.floor(i)}return l.objectMode?16:16*1024}return ze={getHighWaterMark:f},ze}var Ve,Ut;function Un(){if(Ut)return Ve;Ut=1,Ve=a;function a(f,l){if(n("noDeprecation"))return f;var y=!1;function c(){if(!y){if(n("throwDeprecation"))throw new Error(l);n("traceDeprecation")?console.trace(l):console.warn(l),y=!0}return f.apply(this,arguments)}return c}function n(f){try{if(!we.localStorage)return!1}catch{return!1}var l=we.localStorage[f];return l==null?!1:String(l).toLowerCase()==="true"}return Ve}var Ge,Ot;function ur(){if(Ot)return Ge;Ot=1,Ge=N;function a(v){var b=this;this.next=null,this.entry=null,this.finish=function(){Ee(b,v)}}var n;N.WritableState=S;var f={deprecate:Un()},l=ir(),y=Re().Buffer,c=(typeof we<"u"?we:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function h(v){return y.from(v)}function i(v){return y.isBuffer(v)||v instanceof c}var d=or(),g=sr(),F=g.getHighWaterMark,R=ve().codes,B=R.ERR_INVALID_ARG_TYPE,C=R.ERR_METHOD_NOT_IMPLEMENTED,_=R.ERR_MULTIPLE_CALLBACK,L=R.ERR_STREAM_CANNOT_PIPE,T=R.ERR_STREAM_DESTROYED,p=R.ERR_STREAM_NULL_VALUES,x=R.ERR_STREAM_WRITE_AFTER_END,A=R.ERR_UNKNOWN_ENCODING,E=d.errorOrDestroy;be()(N,l);function m(){}function S(v,b,P){n=n||ge(),v=v||{},typeof P!="boolean"&&(P=b instanceof n),this.objectMode=!!v.objectMode,P&&(this.objectMode=this.objectMode||!!v.writableObjectMode),this.highWaterMark=F(this,v,"writableHighWaterMark",P),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var q=v.decodeStrings===!1;this.decodeStrings=!q,this.defaultEncoding=v.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(j){xe(b,j)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=v.emitClose!==!1,this.autoDestroy=!!v.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}S.prototype.getBuffer=function(){for(var b=this.bufferedRequest,P=[];b;)P.push(b),b=b.next;return P},(function(){try{Object.defineProperty(S.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var I;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(I=Function.prototype[Symbol.hasInstance],Object.defineProperty(N,Symbol.hasInstance,{value:function(b){return I.call(this,b)?!0:this!==N?!1:b&&b._writableState instanceof S}})):I=function(b){return b instanceof this};function N(v){n=n||ge();var b=this instanceof n;if(!b&&!I.call(N,this))return new N(v);this._writableState=new S(v,this,b),this.writable=!0,v&&(typeof v.write=="function"&&(this._write=v.write),typeof v.writev=="function"&&(this._writev=v.writev),typeof v.destroy=="function"&&(this._destroy=v.destroy),typeof v.final=="function"&&(this._final=v.final)),l.call(this)}N.prototype.pipe=function(){E(this,new L)};function U(v,b){var P=new x;E(v,P),process.nextTick(b,P)}function H(v,b,P,q){var j;return P===null?j=new p:typeof P!="string"&&!b.objectMode&&(j=new B("chunk",["string","Buffer"],P)),j?(E(v,j),process.nextTick(q,j),!1):!0}N.prototype.write=function(v,b,P){var q=this._writableState,j=!1,o=!q.objectMode&&i(v);return o&&!y.isBuffer(v)&&(v=h(v)),typeof b=="function"&&(P=b,b=null),o?b="buffer":b||(b=q.defaultEncoding),typeof P!="function"&&(P=m),q.ending?U(this,P):(o||H(this,q,v,P))&&(q.pendingcb++,j=J(this,q,o,v,b,P)),j},N.prototype.cork=function(){this._writableState.corked++},N.prototype.uncork=function(){var v=this._writableState;v.corked&&(v.corked--,!v.writing&&!v.corked&&!v.bufferProcessing&&v.bufferedRequest&&se(this,v))},N.prototype.setDefaultEncoding=function(b){if(typeof b=="string"&&(b=b.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((b+"").toLowerCase())>-1))throw new A(b);return this._writableState.defaultEncoding=b,this},Object.defineProperty(N.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Q(v,b,P){return!v.objectMode&&v.decodeStrings!==!1&&typeof b=="string"&&(b=y.from(b,P)),b}Object.defineProperty(N.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function J(v,b,P,q,j,o){if(!P){var u=Q(b,q,j);q!==u&&(P=!0,j="buffer",q=u)}var D=b.objectMode?1:q.length;b.length+=D;var O=b.length>5===6?2:p>>4===14?3:p>>3===30?4:p>>6===2?-1:-2}function h(p,x,A){var E=x.length-1;if(E=0?(m>0&&(p.lastNeed=m-1),m):--E=0?(m>0&&(p.lastNeed=m-2),m):--E=0?(m>0&&(m===2?m=0:p.lastNeed=m-3),m):0))}function i(p,x,A){if((x[0]&192)!==128)return p.lastNeed=0,"�";if(p.lastNeed>1&&x.length>1){if((x[1]&192)!==128)return p.lastNeed=1,"�";if(p.lastNeed>2&&x.length>2&&(x[2]&192)!==128)return p.lastNeed=2,"�"}}function d(p){var x=this.lastTotal-this.lastNeed,A=i(this,p);if(A!==void 0)return A;if(this.lastNeed<=p.length)return p.copy(this.lastChar,x,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);p.copy(this.lastChar,x,0,p.length),this.lastNeed-=p.length}function g(p,x){var A=h(this,p,x);if(!this.lastNeed)return p.toString("utf8",x);this.lastTotal=A;var E=p.length-(A-this.lastNeed);return p.copy(this.lastChar,0,E),p.toString("utf8",x,E)}function F(p){var x=p&&p.length?this.write(p):"";return this.lastNeed?x+"�":x}function R(p,x){if((p.length-x)%2===0){var A=p.toString("utf16le",x);if(A){var E=A.charCodeAt(A.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=p[p.length-2],this.lastChar[1]=p[p.length-1],A.slice(0,-1)}return A}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=p[p.length-1],p.toString("utf16le",x,p.length-1)}function B(p){var x=p&&p.length?this.write(p):"";if(this.lastNeed){var A=this.lastTotal-this.lastNeed;return x+this.lastChar.toString("utf16le",0,A)}return x}function C(p,x){var A=(p.length-x)%3;return A===0?p.toString("base64",x):(this.lastNeed=3-A,this.lastTotal=3,A===1?this.lastChar[0]=p[p.length-1]:(this.lastChar[0]=p[p.length-2],this.lastChar[1]=p[p.length-1]),p.toString("base64",x,p.length-A))}function _(p){var x=p&&p.length?this.write(p):"";return this.lastNeed?x+this.lastChar.toString("base64",0,3-this.lastNeed):x}function L(p){return p.toString(this.encoding)}function T(p){return p&&p.length?this.write(p):""}return Xe}var Qe,Kt;function xt(){if(Kt)return Qe;Kt=1;var a=ve().codes.ERR_STREAM_PREMATURE_CLOSE;function n(c){var h=!1;return function(){if(!h){h=!0;for(var i=arguments.length,d=new Array(i),g=0;g0)if(typeof u!="string"&&!r.objectMode&&Object.getPrototypeOf(u)!==l.prototype&&(u=c(u)),O)r.endEmitted?m(o,new p):Q(o,r,u,!0);else if(r.ended)m(o,new L);else{if(r.destroyed)return!1;r.reading=!1,r.decoder&&!D?(u=r.decoder.write(u),r.objectMode||u.length!==0?Q(o,r,u,!1):se(o,r)):Q(o,r,u,!1)}else O||(r.reading=!1,se(o,r))}return!r.ended&&(r.length=ee?o=ee:(o--,o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o++),o}function de(o,u){return o<=0||u.length===0&&u.ended?0:u.objectMode?1:o!==o?u.flowing&&u.length?u.buffer.head.data.length:u.length:(o>u.highWaterMark&&(u.highWaterMark=oe(o)),o<=u.length?o:u.ended?u.length:(u.needReadable=!0,0))}U.prototype.read=function(o){d("read",o),o=parseInt(o,10);var u=this._readableState,D=o;if(o!==0&&(u.emittedReadable=!1),o===0&&u.needReadable&&((u.highWaterMark!==0?u.length>=u.highWaterMark:u.length>0)||u.ended))return d("read: emitReadable",u.length,u.ended),u.length===0&&u.ended?P(this):ie(this),null;if(o=de(o,u),o===0&&u.ended)return u.length===0&&P(this),null;var O=u.needReadable;d("need readable",O),(u.length===0||u.length-o0?V=b(o,u):V=null,V===null?(u.needReadable=u.length<=u.highWaterMark,o=0):(u.length-=o,u.awaitDrain=0),u.length===0&&(u.ended||(u.needReadable=!0),D!==o&&u.ended&&P(this)),V!==null&&this.emit("data",V),V};function xe(o,u){if(d("onEofChunk"),!u.ended){if(u.decoder){var D=u.decoder.end();D&&D.length&&(u.buffer.push(D),u.length+=u.objectMode?1:D.length)}u.ended=!0,u.sync?ie(o):(u.needReadable=!1,u.emittedReadable||(u.emittedReadable=!0,pe(o)))}}function ie(o){var u=o._readableState;d("emitReadable",u.needReadable,u.emittedReadable),u.needReadable=!1,u.emittedReadable||(d("emitReadable",u.flowing),u.emittedReadable=!0,process.nextTick(pe,o))}function pe(o){var u=o._readableState;d("emitReadable_",u.destroyed,u.length,u.ended),!u.destroyed&&(u.length||u.ended)&&(o.emit("readable"),u.emittedReadable=!1),u.needReadable=!u.flowing&&!u.ended&&u.length<=u.highWaterMark,v(o)}function se(o,u){u.readingMore||(u.readingMore=!0,process.nextTick(ye,o,u))}function ye(o,u){for(;!u.reading&&!u.ended&&(u.length1&&j(O.pipes,o)!==-1)&&!w&&(d("false write response, pause",O.awaitDrain),O.awaitDrain++),D.pause())}function W($){d("onerror",$),X(),o.removeListener("error",W),n(o,"error")===0&&m(o,$)}I(o,"error",W);function K(){o.removeListener("finish",z),X()}o.once("close",K);function z(){d("onfinish"),o.removeListener("close",K),X()}o.once("finish",z);function X(){d("unpipe"),D.unpipe(o)}return o.emit("pipe",D),O.flowing||(d("pipe resume"),D.resume()),o};function Y(o){return function(){var D=o._readableState;d("pipeOnDrain",D.awaitDrain),D.awaitDrain&&D.awaitDrain--,D.awaitDrain===0&&n(o,"data")&&(D.flowing=!0,v(o))}}U.prototype.unpipe=function(o){var u=this._readableState,D={hasUnpiped:!1};if(u.pipesCount===0)return this;if(u.pipesCount===1)return o&&o!==u.pipes?this:(o||(o=u.pipes),u.pipes=null,u.pipesCount=0,u.flowing=!1,o&&o.emit("unpipe",this,D),this);if(!o){var O=u.pipes,V=u.pipesCount;u.pipes=null,u.pipesCount=0,u.flowing=!1;for(var r=0;r0,O.flowing!==!1&&this.resume()):o==="readable"&&!O.endEmitted&&!O.readableListening&&(O.readableListening=O.needReadable=!0,O.flowing=!1,O.emittedReadable=!1,d("on readable",O.length,O.reading),O.length?ie(this):O.reading||process.nextTick(re,this)),D},U.prototype.addListener=U.prototype.on,U.prototype.removeListener=function(o,u){var D=f.prototype.removeListener.call(this,o,u);return o==="readable"&&process.nextTick(Z,this),D},U.prototype.removeAllListeners=function(o){var u=f.prototype.removeAllListeners.apply(this,arguments);return(o==="readable"||o===void 0)&&process.nextTick(Z,this),u};function Z(o){var u=o._readableState;u.readableListening=o.listenerCount("readable")>0,u.resumeScheduled&&!u.paused?u.flowing=!0:o.listenerCount("data")>0&&o.resume()}function re(o){d("readable nexttick read 0"),o.read(0)}U.prototype.resume=function(){var o=this._readableState;return o.flowing||(d("resume"),o.flowing=!o.readableListening,me(this,o)),o.paused=!1,this};function me(o,u){u.resumeScheduled||(u.resumeScheduled=!0,process.nextTick(Ee,o,u))}function Ee(o,u){d("resume",u.reading),u.reading||o.read(0),u.resumeScheduled=!1,o.emit("resume"),v(o),u.flowing&&!u.reading&&o.read(0)}U.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function v(o){var u=o._readableState;for(d("flow",u.flowing);u.flowing&&o.read()!==null;);}U.prototype.wrap=function(o){var u=this,D=this._readableState,O=!1;o.on("end",function(){if(d("wrapped end"),D.decoder&&!D.ended){var e=D.decoder.end();e&&e.length&&u.push(e)}u.push(null)}),o.on("data",function(e){if(d("wrapped data"),D.decoder&&(e=D.decoder.write(e)),!(D.objectMode&&e==null)&&!(!D.objectMode&&(!e||!e.length))){var t=u.push(e);t||(O=!0,o.pause())}});for(var V in o)this[V]===void 0&&typeof o[V]=="function"&&(this[V]=(function(t){return function(){return o[t].apply(o,arguments)}})(V));for(var r=0;r=u.length?(u.decoder?D=u.buffer.join(""):u.buffer.length===1?D=u.buffer.first():D=u.buffer.concat(u.length),u.buffer.clear()):D=u.buffer.consume(o,u.decoder),D}function P(o){var u=o._readableState;d("endReadable",u.endEmitted),u.endEmitted||(u.ended=!0,process.nextTick(q,u,o))}function q(o,u){if(d("endReadableNT",o.endEmitted,o.length),!o.endEmitted&&o.length===0&&(o.endEmitted=!0,u.readable=!1,u.emit("end"),o.autoDestroy)){var D=u._writableState;(!D||D.autoDestroy&&D.finished)&&u.destroy()}}typeof Symbol=="function"&&(U.from=function(o,u){return E===void 0&&(E=Hn()),E(U,o,u)});function j(o,u){for(var D=0,O=o.length;D0;return i(x,E,m,function(S){T||(T=S),S&&p.forEach(d),!E&&(p.forEach(d),L(T))})});return C.reduce(g)}return nt=R,nt}var it,Qt;function Kn(){if(Qt)return it;Qt=1,it=f;var a=Ne().EventEmitter,n=be();n(f,a),f.Readable=fr(),f.Writable=ur(),f.Duplex=ge(),f.Transform=lr(),f.PassThrough=jn(),f.finished=xt(),f.pipeline=Wn(),f.Stream=f;function f(){a.call(this)}return f.prototype.pipe=function(l,y){var c=this;function h(C){l.writable&&l.write(C)===!1&&c.pause&&c.pause()}c.on("data",h);function i(){c.readable&&c.resume&&c.resume()}l.on("drain",i),!l._isStdio&&(!y||y.end!==!1)&&(c.on("end",g),c.on("close",F));var d=!1;function g(){d||(d=!0,l.end())}function F(){d||(d=!0,typeof l.destroy=="function"&&l.destroy())}function R(C){if(B(),a.listenerCount(this,"error")===0)throw C}c.on("error",R),l.on("error",R);function B(){c.removeListener("data",h),l.removeListener("drain",i),c.removeListener("end",g),c.removeListener("close",F),c.removeListener("error",R),l.removeListener("error",R),c.removeListener("end",B),c.removeListener("close",B),l.removeListener("close",B)}return c.on("end",B),c.on("close",B),l.on("close",B),l.emit("pipe",c),l},it}var $n=Kn();async function*at(a,n,f){let l=1;const y={chunks:[],length:0};for await(const c of f(a))for(y.chunks.push(c),y.length+=c.byteLength;y.length>n;){const h=y.chunks.length>1?ue.Buffer.concat(y.chunks):y.chunks[0];yield{partNumber:l,data:h.subarray(0,n)},y.chunks=[h.subarray(n)],y.length=y.chunks[0].byteLength,l+=1}yield{partNumber:l,data:y.chunks.length!==1?ue.Buffer.concat(y.chunks):y.chunks[0],lastPart:!0}}async function*Zt(a,n){let f=1,l=0,y=n;for(;y{if(a instanceof Uint8Array)return Zt(a,n);if(a instanceof $n.Readable)return at(a,n,zn);if(a instanceof String||typeof a=="string")return Zt(ue.Buffer.from(a),n);if(typeof a.stream=="function")return at(a.stream(),n,Jt);if(a instanceof ReadableStream)return at(a,n,Jt);throw new Error("Body Data is unsupported format, expected data to be one of: string | Uint8Array | Buffer | Readable | ReadableStream | Blob;.")};class Ae extends qe.EventEmitter{static MIN_PART_SIZE=1024*1024*5;MAX_PARTS=1e4;queueSize=4;partSize;leavePartsOnError=!1;tags=[];client;params;totalBytes;totalBytesSource;bytesUploadedSoFar;abortController;concurrentUploaders=[];createMultiPartPromise;abortMultipartUploadCommand=null;uploadedParts=[];uploadEnqueuedPartsCount=0;expectedPartsCount;uploadId;uploadEvent;isMultiPart=!0;singleUploadResult;sent=!1;constructor(n){if(super(),this.queueSize=n.queueSize||this.queueSize,this.leavePartsOnError=n.leavePartsOnError||this.leavePartsOnError,this.tags=n.tags||this.tags,this.client=n.client,this.params=n.params,!this.params)throw new Error("InputError: Upload requires params to be passed to upload.");this.totalBytes=this.params.ContentLength??Te(this.params.Body),this.totalBytesSource=kn(this.params.Body,this.params.ContentLength),this.bytesUploadedSoFar=0,this.abortController=n.abortController??new Tn,this.partSize=n.partSize||Math.max(Ae.MIN_PART_SIZE,Math.floor((this.totalBytes||0)/this.MAX_PARTS)),this.totalBytes!==void 0&&(this.expectedPartsCount=Math.ceil(this.totalBytes/this.partSize)),this.__validateInput()}async abort(){this.abortController.abort()}async done(){if(this.sent)throw new Error("@aws-sdk/lib-storage: this instance of Upload has already executed .done(). Create a new instance.");return this.sent=!0,await Promise.race([this.__doMultipartUpload(),this.__abortTimeout(this.abortController.signal)])}on(n,f){return this.uploadEvent=n,super.on(n,f)}async __uploadUsingPut(n){this.isMultiPart=!1;const f={...this.params,Body:n.data},l=this.client.config,y=l.requestHandler,c=y instanceof qe.EventEmitter?y:null,h=_=>{this.bytesUploadedSoFar=_.loaded,this.totalBytes=_.total,this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:n.partNumber,Key:this.params.Key,Bucket:this.params.Bucket})};c!==null&&c.on("xhr.upload.progress",h);const i=await Promise.all([this.client.send(new Rt(f)),l?.endpoint?.()]),d=i[0];let g=i[1];if(g||(g=Mr(await kr(f,Rt,{...l}))),!g)throw new Error('Could not resolve endpoint from S3 "client.config.endpoint()" nor EndpointsV2.');c!==null&&c.off("xhr.upload.progress",h);const F=this.params.Key.split("/").map(_=>St(_)).join("/"),R=St(this.params.Bucket),B=(()=>{const _=g.hostname.startsWith(`${R}.`),L=this.client.config.forcePathStyle,T=g.port?`:${g.port}`:"";return L?`${g.protocol}//${g.hostname}${T}/${R}/${F}`:_?`${g.protocol}//${g.hostname}${T}/${F}`:`${g.protocol}//${R}.${g.hostname}${T}/${F}`})();this.singleUploadResult={...d,Bucket:this.params.Bucket,Key:this.params.Key,Location:B};const C=Te(n.data);this.__notifyProgress({loaded:C,total:C,part:1,Key:this.params.Key,Bucket:this.params.Bucket})}async __createMultipartUpload(){const n=await this.client.config.requestChecksumCalculation();if(!this.createMultiPartPromise){const f={...this.params,Body:void 0};n==="WHEN_SUPPORTED"&&(f.ChecksumAlgorithm=this.params.ChecksumAlgorithm||Bn.CRC32),this.createMultiPartPromise=this.client.send(new Cn(f)).then(l=>(this.abortMultipartUploadCommand=new yn({Bucket:this.params.Bucket,Key:this.params.Key,UploadId:l.UploadId}),l))}return this.createMultiPartPromise}async __doConcurrentUpload(n){for await(const f of n){if(this.uploadEnqueuedPartsCount>this.MAX_PARTS)throw new Error(`Exceeded ${this.MAX_PARTS} parts in multipart upload to Bucket: ${this.params.Bucket} Key: ${this.params.Key}.`);if(this.abortController.signal.aborted)return;if(f.partNumber===1&&f.lastPart)return await this.__uploadUsingPut(f);if(!this.uploadId){const{UploadId:g}=await this.__createMultipartUpload();if(this.uploadId=g,this.abortController.signal.aborted)return}const l=Te(f.data)||0,y=this.client.config.requestHandler,c=y instanceof qe.EventEmitter?y:null;let h=0;const i=(g,F)=>{(Number(F.query.partNumber)||-1)===f.partNumber&&(g.total&&l&&(this.bytesUploadedSoFar+=g.loaded-h,h=g.loaded),this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:f.partNumber,Key:this.params.Key,Bucket:this.params.Bucket}))};c!==null&&c.on("xhr.upload.progress",i),this.uploadEnqueuedPartsCount+=1,this.__validateUploadPart(f);const d=await this.client.send(new Rn({...this.params,ContentLength:void 0,UploadId:this.uploadId,Body:f.data,PartNumber:f.partNumber}));if(c!==null&&c.off("xhr.upload.progress",i),this.abortController.signal.aborted)return;if(!d.ETag)throw new Error(`Part ${f.partNumber} is missing ETag in UploadPart response. Missing Bucket CORS configuration for ETag header?`);this.uploadedParts.push({PartNumber:f.partNumber,ETag:d.ETag,...d.ChecksumCRC32&&{ChecksumCRC32:d.ChecksumCRC32},...d.ChecksumCRC32C&&{ChecksumCRC32C:d.ChecksumCRC32C},...d.ChecksumSHA1&&{ChecksumSHA1:d.ChecksumSHA1},...d.ChecksumSHA256&&{ChecksumSHA256:d.ChecksumSHA256}}),c===null&&(this.bytesUploadedSoFar+=l),this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:f.partNumber,Key:this.params.Key,Bucket:this.params.Bucket})}}async __doMultipartUpload(){const n=Vn(this.params.Body,this.partSize),f=[];for(let y=0;y{f.push(h)});this.concurrentUploaders.push(c)}if(await Promise.all(this.concurrentUploaders),f.length>=1)throw await this.markUploadAsAborted(),f[0];if(this.abortController.signal.aborted)throw await this.markUploadAsAborted(),Object.assign(new Error("Upload aborted."),{name:"AbortError"});let l;if(this.isMultiPart){const{expectedPartsCount:y,uploadedParts:c,totalBytes:h,totalBytesSource:i}=this;if(h!==void 0&&y!==void 0&&c.length!==y)throw new Error(`Expected ${y} part(s) but uploaded ${c.length} part(s). +import{aT as cr,aU as hr,aV as G,aW as ot,aX as Me,aY as dr,aZ as pr,a_ as yr,a$ as mr,b0 as Er,b1 as wr,b2 as gr,b3 as br,b4 as vr,b5 as xr,b6 as yt,b7 as ae,b8 as Ie,b9 as _r,aN as fe,aO as le,aP as ce,ba as he,bb as Cr,bc as Sr,bd as Ar,be as Rr,bf as Br,bg as Fr,bh as Tr,bi as Dr,bj as Lr,bk as we,bl as Mr,bm as kr,bn as St,c as mt,bo as Et,aS as wt}from"./index.js";import{u as gt}from"./error-banner.js";const Pr=typeof ReadableStream=="function"?ReadableStream:function(){};class Nr extends Pr{}const Ir=({expectedChecksum:a,checksum:n,source:f,checksumSourceLocation:l,base64Encoder:y})=>{if(!cr(f))throw new Error(`@smithy/util-stream: unsupported source type ${f?.constructor?.name??f} in ChecksumStream.`);const c=y??hr;if(typeof TransformStream!="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");const h=new TransformStream({start(){},async transform(d,g){n.update(d),g.enqueue(d)},async flush(d){const g=await n.digest(),F=c(g);if(a!==F){const R=new Error(`Checksum mismatch: expected "${a}" but received "${F}" in response header "${l}".`);d.error(R)}else d.terminate()}});f.pipeThrough(h);const i=h.readable;return Object.setPrototypeOf(i,Nr.prototype),i};class Ur{allocByteArray;byteLength=0;byteArrays=[];constructor(n){this.allocByteArray=n}push(n){this.byteArrays.push(n),this.byteLength+=n.byteLength}flush(){if(this.byteArrays.length===1){const l=this.byteArrays[0];return this.reset(),l}const n=this.allocByteArray(this.byteLength);let f=0;for(let l=0;lnew Uint8Array(g))];let i=-1;const d=async g=>{const{value:F,done:R}=await l.read(),B=F;if(R){if(i!==-1){const C=Ue(h,i);Se(C)>0&&g.enqueue(C)}g.close()}else{const C=jr(B,!1);if(i!==C&&(i>=0&&g.enqueue(Ue(h,i)),i=C),i===-1){g.enqueue(B);return}const _=Se(B);c+=_;const L=Se(h[i]);if(_>=n&&L===0)g.enqueue(B);else{const T=Hr(h,i,B);!y&&c>n*2&&(y=!0,f?.warn(`@smithy/util-stream - stream chunk size ${_} is below threshold of ${n}, automatically buffering.`)),T>=n?g.enqueue(Ue(h,i)):await d(g)}}};return new ReadableStream({pull:d})}const qr=Or;function Hr(a,n,f){switch(n){case 0:return a[0]+=f,Se(a[0]);case 1:case 2:return a[n].push(f),Se(a[n])}}function Ue(a,n){switch(n){case 0:const f=a[0];return a[0]="",f;case 1:case 2:return a[n].flush()}throw new Error(`@smithy/util-stream - invalid index ${n} given to flush()`)}function Se(a){return a?.byteLength??a?.length??0}function jr(a,n=!0){return n&&typeof Buffer<"u"&&a instanceof Buffer?2:a instanceof Uint8Array?1:typeof a=="string"?0:-1}const st=[G.CRC32,G.CRC32C,G.CRC64NVME,G.SHA1,G.SHA256],Wr=[G.SHA256,G.SHA1,G.CRC32,G.CRC32C,G.CRC64NVME],Kr=(a,{requestChecksumRequired:n,requestAlgorithmMember:f,requestChecksumCalculation:l})=>{if(!f)return l===Me.WHEN_SUPPORTED||n?ot:void 0;if(!a[f])return;const y=a[f];if(!st.includes(y))throw new Error(`The checksum algorithm "${y}" is not supported by the client. Select one of ${st}.`);return y},bt=a=>a===G.MD5?"content-md5":`x-amz-checksum-${a.toLowerCase()}`,$r=(a,n)=>{const f=a.toLowerCase();for(const l of Object.keys(n))if(f===l.toLowerCase())return!0;return!1},zr=(a,n)=>{const f=a.toLowerCase();for(const l of Object.keys(n))if(l.toLowerCase().startsWith(f))return!0;return!1},er=a=>a!==void 0&&typeof a!="string"&&!ArrayBuffer.isView(a)&&!dr(a);var Vr=(function(){function a(){this.crc32c=new At}return a.prototype.update=function(n){pr(n)||this.crc32c.update(yr(n))},a.prototype.digest=function(){return mr(this,void 0,void 0,function(){return Er(this,function(n){return[2,wr(this.crc32c.digest())]})})},a.prototype.reset=function(){this.crc32c=new At},a})(),At=(function(){function a(){this.checksum=4294967295}return a.prototype.update=function(n){var f,l;try{for(var y=gr(n),c=y.next();!c.done;c=y.next()){var h=c.value;this.checksum=this.checksum>>>8^Yr[(this.checksum^h)&255]}}catch(i){f={error:i}}finally{try{c&&!c.done&&(l=y.return)&&l.call(y)}finally{if(f)throw f.error}}return this},a.prototype.digest=function(){return(this.checksum^4294967295)>>>0},a})(),Gr=[0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697],Yr=br(Gr);const Xr=()=>{const n=new Array(8);for(let f=0;f<8;f++){const l=new Array(512);for(let y=0;y<256;y++){let c=BigInt(y);for(let h=0;h<8*(f+1);h++)c&1n?c=c>>1n^0x9a6c9329ac4bc9b5n:c=c>>1n;l[y*2]=Number(c>>32n&0xffffffffn),l[y*2+1]=Number(c&0xffffffffn)}n[f]=new Uint32Array(l)}return n};let Oe,Ce,ut,ft,lt,ct,ht,dt,pt;const Qr=()=>{Oe||(Oe=Xr(),[Ce,ut,ft,lt,ct,ht,dt,pt]=Oe)};class Zr{c1=0;c2=0;constructor(){Qr(),this.reset()}update(n){const f=n.length;let l=0,y=this.c1,c=this.c2;for(;l+8<=f;){const h=((c^n[l++])&255)<<1,i=((c>>>8^n[l++])&255)<<1,d=((c>>>16^n[l++])&255)<<1,g=((c>>>24^n[l++])&255)<<1,F=((y^n[l++])&255)<<1,R=((y>>>8^n[l++])&255)<<1,B=((y>>>16^n[l++])&255)<<1,C=((y>>>24^n[l++])&255)<<1;y=pt[h]^dt[i]^ht[d]^ct[g]^lt[F]^ft[R]^ut[B]^Ce[C],c=pt[h+1]^dt[i+1]^ht[d+1]^ct[g+1]^lt[F+1]^ft[R+1]^ut[B+1]^Ce[C+1]}for(;l>>8|(y&255)<<24)>>>0,y=y>>>8^Ce[h],c^=Ce[h+1],l++}this.c1=y,this.c2=c}async digest(){const n=this.c1^4294967295,f=this.c2^4294967295;return new Uint8Array([n>>>24,n>>>16&255,n>>>8&255,n&255,f>>>24,f>>>16&255,f>>>8&255,f&255])}reset(){this.c1=4294967295,this.c2=4294967295}}const Jr=()=>vr,tr=(a,n)=>{switch(a){case G.MD5:return n.md5;case G.CRC32:return Jr();case G.CRC32C:return Vr;case G.CRC64NVME:return Zr;case G.SHA1:return n.sha1;case G.SHA256:return n.sha256;default:throw new Error(`Unsupported checksum algorithm: ${a}`)}},rr=(a,n)=>{const f=new a;return f.update(xr(n||"")),f.digest()},en={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},tn=(a,n)=>(f,l)=>async y=>{if(!yt.isInstance(y.request)||zr("x-amz-checksum-",y.request.headers))return f(y);const{request:c,input:h}=y,{body:i,headers:d}=c,{base64Encoder:g,streamHasher:F}=a,{requestChecksumRequired:R,requestAlgorithmMember:B}=n,C=await a.requestChecksumCalculation(),_=B?.name,L=B?.httpHeader;_&&!h[_]&&(C===Me.WHEN_SUPPORTED||R)&&(h[_]=ot,L&&(d[L]=ot));const T=Kr(h,{requestChecksumRequired:R,requestAlgorithmMember:B?.name,requestChecksumCalculation:C});let p=i,x=d;if(T){switch(T){case G.CRC32:ae(l,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case G.CRC32C:ae(l,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case G.CRC64NVME:ae(l,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case G.SHA1:ae(l,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case G.SHA256:ae(l,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y");break}const A=bt(T),E=tr(T,a);if(er(i)){const{getAwsChunkedEncodingStream:m,bodyLengthChecker:S}=a;p=m(typeof a.requestStreamBufferSize=="number"&&a.requestStreamBufferSize>=8*1024?qr(i,a.requestStreamBufferSize,l.logger):i,{base64Encoder:g,bodyLengthChecker:S,checksumLocationName:A,checksumAlgorithmFn:E,streamHasher:F}),x={...d,"content-encoding":d["content-encoding"]?`${d["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":d["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":A},delete x["content-length"]}else if(!$r(A,d)){const m=await rr(E,i);x={...d,[A]:g(m)}}}try{return await f({...y,request:{...c,headers:x,body:p}})}catch(A){if(A instanceof Error&&A.name==="InvalidChunkSizeError")try{A.message.endsWith(".")||(A.message+="."),A.message+=" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream."}catch{}throw A}},rn={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0},nn=(a,n)=>(f,l)=>async y=>{const c=y.input,{requestValidationModeMember:h}=n,i=await a.requestChecksumCalculation(),d=await a.responseChecksumValidation();switch(i){case Me.WHEN_REQUIRED:ae(l,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case Me.WHEN_SUPPORTED:ae(l,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z");break}switch(d){case Ie.WHEN_REQUIRED:ae(l,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case Ie.WHEN_SUPPORTED:ae(l,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b");break}return h&&!c[h]&&d===Ie.WHEN_SUPPORTED&&(c[h]="ENABLED"),f(y)},nr=(a=[])=>{const n=[];for(const f of Wr)!a.includes(f)||!st.includes(f)||n.push(f);return n},an=a=>{const n=a.lastIndexOf("-");if(n!==-1){const f=a.slice(n+1);if(!f.startsWith("0")){const l=parseInt(f,10);if(!isNaN(l)&&l>=1&&l<=1e4)return!0}}return!1},on=async(a,{checksumAlgorithmFn:n,base64Encoder:f})=>f(await rr(n,a)),sn=async(a,{config:n,responseAlgorithms:f,logger:l})=>{const y=nr(f),{body:c,headers:h}=a;for(const i of y){const d=bt(i),g=h[d];if(g){let F;try{F=tr(i,n)}catch(C){if(i===G.CRC64NVME){l?.warn(`Skipping ${G.CRC64NVME} checksum validation: ${C.message}`);continue}throw C}const{base64Encoder:R}=n;if(er(c)){a.body=Ir({expectedChecksum:g,checksumSourceLocation:d,checksum:new F,source:c,base64Encoder:R});return}const B=await on(c,{checksumAlgorithmFn:F,base64Encoder:R});if(B===g)break;throw new Error(`Checksum mismatch: expected "${B}" but received "${g}" in response header "${d}".`)}}},un={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},fn=(a,n)=>(f,l)=>async y=>{if(!yt.isInstance(y.request))return f(y);const c=y.input,h=await f(y),i=h.response,{requestValidationModeMember:d,responseAlgorithms:g}=n;if(d&&c[d]==="ENABLED"){const{clientName:F,commandName:R}=l;if(F==="S3Client"&&R==="GetObjectCommand"&&nr(g).every(C=>{const _=bt(C),L=i.headers[_];return!L||an(L)}))return h;await sn(i,{config:a,responseAlgorithms:g,logger:l.logger})}return h},vt=(a,n)=>({applyToStack:f=>{f.add(tn(a,n),en),f.addRelativeTo(nn(a,n),rn),f.addRelativeTo(fn(a,n),un)}}),ln="content-length",cn="x-amz-decoded-content-length";function hn(){return(a,n)=>async f=>{const{request:l}=f;if(yt.isInstance(l)&&!(ln in l.headers)&&!(cn in l.headers)){const y="Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.";typeof n?.logger?.warn=="function"&&!(n.logger instanceof _r)?n.logger.warn(y):console.warn(y)}return a({...f})}}const dn={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},pn=a=>({applyToStack:n=>{n.add(hn(),dn)}});class yn extends fe.classBuilder().ep({...le,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(n,f,l,y){return[ce(l,n.getEndpointParameterInstructions()),he(l)]}).s("AmazonS3","AbortMultipartUpload",{}).n("S3Client","AbortMultipartUploadCommand").sc(Cr).build(){}function mn(a){return n=>async f=>{const l={...f.input},y=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const c of y){const h=l[c.target];if(h){let i;typeof h=="string"?wn(h,a)?i=a.base64Decoder(h):(i=a.utf8Decoder(h),l[c.target]=a.base64Encoder(i)):(i=ArrayBuffer.isView(h)?new Uint8Array(h.buffer,h.byteOffset,h.byteLength):new Uint8Array(h),l[c.target]=a.base64Encoder(i));const d=new a.md5;d.update(i),l[c.hash]=a.base64Encoder(await d.digest())}}return n({...f,input:l})}}const En={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},Pe=a=>({applyToStack:n=>{n.add(mn(a),En)}});function wn(a,n){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(a))return!1;try{return n.base64Decoder(a).length===32}catch{return!1}}class gn extends fe.classBuilder().ep({...le,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(n,f,l,y){return[ce(l,n.getEndpointParameterInstructions()),he(l),Pe(l)]}).s("AmazonS3","CompleteMultipartUpload",{}).n("S3Client","CompleteMultipartUploadCommand").sc(Sr).build(){}function bn(a){return n=>async f=>{const{CreateBucketConfiguration:l}=f.input,y=await a.region();return!l?.LocationConstraint&&!l?.Location&&y!=="us-east-1"&&(f.input.CreateBucketConfiguration=f.input.CreateBucketConfiguration??{},f.input.CreateBucketConfiguration.LocationConstraint=y),n(f)}}const vn={step:"initialize",tags:["LOCATION_CONSTRAINT","CREATE_BUCKET_CONFIGURATION"],name:"locationConstraintMiddleware",override:!0},xn=a=>({applyToStack:n=>{n.add(bn(a),vn)}});class _n extends fe.classBuilder().ep({...le,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},DisableAccessPoints:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(n,f,l,y){return[ce(l,n.getEndpointParameterInstructions()),he(l),xn(l)]}).s("AmazonS3","CreateBucket",{}).n("S3Client","CreateBucketCommand").sc(Ar).build(){}class Cn extends fe.classBuilder().ep({...le,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(n,f,l,y){return[ce(l,n.getEndpointParameterInstructions()),he(l),Pe(l)]}).s("AmazonS3","CreateMultipartUpload",{}).n("S3Client","CreateMultipartUploadCommand").sc(Rr).build(){}class Sn extends fe.classBuilder().ep({...le,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(n,f,l,y){return[ce(l,n.getEndpointParameterInstructions()),he(l)]}).s("AmazonS3","DeleteObject",{}).n("S3Client","DeleteObjectCommand").sc(Br).build(){}class Rt extends fe.classBuilder().ep({...le,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(n,f,l,y){return[ce(l,n.getEndpointParameterInstructions()),vt(l,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),pn(),he(l),Pe(l)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").sc(Fr).build(){}class An extends fe.classBuilder().ep({...le,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(n,f,l,y){return[ce(l,n.getEndpointParameterInstructions()),vt(l,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),he(l)]}).s("AmazonS3","PutObjectTagging",{}).n("S3Client","PutObjectTaggingCommand").sc(Tr).build(){}class Rn extends fe.classBuilder().ep({...le,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(n,f,l,y){return[ce(l,n.getEndpointParameterInstructions()),vt(l,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),he(l),Pe(l)]}).s("AmazonS3","UploadPart",{}).n("S3Client","UploadPartCommand").sc(Dr).build(){}const Bn={CRC32:"CRC32"};class Fn{onabort=null;_aborted=!1;constructor(){Object.defineProperty(this,"_aborted",{value:!1,writable:!0})}get aborted(){return this._aborted}abort(){this._aborted=!0,this.onabort&&(this.onabort(this),this.onabort=null)}}class Tn{signal=new Fn;abort(){this.signal.abort()}}var Be={exports:{}},Bt;function Ne(){if(Bt)return Be.exports;Bt=1;var a=typeof Reflect=="object"?Reflect:null,n=a&&typeof a.apply=="function"?a.apply:function(m,S,I){return Function.prototype.apply.call(m,S,I)},f;a&&typeof a.ownKeys=="function"?f=a.ownKeys:Object.getOwnPropertySymbols?f=function(m){return Object.getOwnPropertyNames(m).concat(Object.getOwnPropertySymbols(m))}:f=function(m){return Object.getOwnPropertyNames(m)};function l(E){console&&console.warn&&console.warn(E)}var y=Number.isNaN||function(m){return m!==m};function c(){c.init.call(this)}Be.exports=c,Be.exports.once=p,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var h=10;function i(E){if(typeof E!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof E)}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(E){if(typeof E!="number"||E<0||y(E))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+E+".");h=E}}),c.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},c.prototype.setMaxListeners=function(m){if(typeof m!="number"||m<0||y(m))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+m+".");return this._maxListeners=m,this};function d(E){return E._maxListeners===void 0?c.defaultMaxListeners:E._maxListeners}c.prototype.getMaxListeners=function(){return d(this)},c.prototype.emit=function(m){for(var S=[],I=1;I0&&(H=S[0]),H instanceof Error)throw H;var Q=new Error("Unhandled error."+(H?" ("+H.message+")":""));throw Q.context=H,Q}var J=U[m];if(J===void 0)return!1;if(typeof J=="function")n(J,this,S);else for(var ee=J.length,oe=_(J,ee),I=0;I0&&H.length>N&&!H.warned){H.warned=!0;var Q=new Error("Possible EventEmitter memory leak detected. "+H.length+" "+String(m)+" listeners added. Use emitter.setMaxListeners() to increase limit");Q.name="MaxListenersExceededWarning",Q.emitter=E,Q.type=m,Q.count=H.length,l(Q)}return E}c.prototype.addListener=function(m,S){return g(this,m,S,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(m,S){return g(this,m,S,!0)};function F(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function R(E,m,S){var I={fired:!1,wrapFn:void 0,target:E,type:m,listener:S},N=F.bind(I);return N.listener=S,I.wrapFn=N,N}c.prototype.once=function(m,S){return i(S),this.on(m,R(this,m,S)),this},c.prototype.prependOnceListener=function(m,S){return i(S),this.prependListener(m,R(this,m,S)),this},c.prototype.removeListener=function(m,S){var I,N,U,H,Q;if(i(S),N=this._events,N===void 0)return this;if(I=N[m],I===void 0)return this;if(I===S||I.listener===S)--this._eventsCount===0?this._events=Object.create(null):(delete N[m],N.removeListener&&this.emit("removeListener",m,I.listener||S));else if(typeof I!="function"){for(U=-1,H=I.length-1;H>=0;H--)if(I[H]===S||I[H].listener===S){Q=I[H].listener,U=H;break}if(U<0)return this;U===0?I.shift():L(I,U),I.length===1&&(N[m]=I[0]),N.removeListener!==void 0&&this.emit("removeListener",m,Q||S)}return this},c.prototype.off=c.prototype.removeListener,c.prototype.removeAllListeners=function(m){var S,I,N;if(I=this._events,I===void 0)return this;if(I.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):I[m]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete I[m]),this;if(arguments.length===0){var U=Object.keys(I),H;for(N=0;N=0;N--)this.removeListener(m,S[N]);return this};function B(E,m,S){var I=E._events;if(I===void 0)return[];var N=I[m];return N===void 0?[]:typeof N=="function"?S?[N.listener||N]:[N]:S?T(N):_(N,N.length)}c.prototype.listeners=function(m){return B(this,m,!0)},c.prototype.rawListeners=function(m){return B(this,m,!1)},c.listenerCount=function(E,m){return typeof E.listenerCount=="function"?E.listenerCount(m):C.call(E,m)},c.prototype.listenerCount=C;function C(E){var m=this._events;if(m!==void 0){var S=m[E];if(typeof S=="function")return 1;if(S!==void 0)return S.length}return 0}c.prototype.eventNames=function(){return this._eventsCount>0?f(this._events):[]};function _(E,m){for(var S=new Array(m),I=0;I0)throw new Error("Invalid string. Length must be a multiple of 4");var L=C.indexOf("=");L===-1&&(L=_);var T=L===_?0:4-L%4;return[L,T]}function i(C){var _=h(C),L=_[0],T=_[1];return(L+T)*3/4-T}function d(C,_,L){return(_+L)*3/4-L}function g(C){var _,L=h(C),T=L[0],p=L[1],x=new f(d(C,T,p)),A=0,E=p>0?T-4:T,m;for(m=0;m>16&255,x[A++]=_>>8&255,x[A++]=_&255;return p===2&&(_=n[C.charCodeAt(m)]<<2|n[C.charCodeAt(m+1)]>>4,x[A++]=_&255),p===1&&(_=n[C.charCodeAt(m)]<<10|n[C.charCodeAt(m+1)]<<4|n[C.charCodeAt(m+2)]>>2,x[A++]=_>>8&255,x[A++]=_&255),x}function F(C){return a[C>>18&63]+a[C>>12&63]+a[C>>6&63]+a[C&63]}function R(C,_,L){for(var T,p=[],x=_;xE?E:A+x));return T===1?(_=C[L-1],p.push(a[_>>2]+a[_<<4&63]+"==")):T===2&&(_=(C[L-2]<<8)+C[L-1],p.push(a[_>>10]+a[_>>4&63]+a[_<<2&63]+"=")),p.join("")}return _e}var Fe={};var Tt;function Ln(){return Tt||(Tt=1,Fe.read=function(a,n,f,l,y){var c,h,i=y*8-l-1,d=(1<>1,F=-7,R=f?y-1:0,B=f?-1:1,C=a[n+R];for(R+=B,c=C&(1<<-F)-1,C>>=-F,F+=i;F>0;c=c*256+a[n+R],R+=B,F-=8);for(h=c&(1<<-F)-1,c>>=-F,F+=l;F>0;h=h*256+a[n+R],R+=B,F-=8);if(c===0)c=1-g;else{if(c===d)return h?NaN:(C?-1:1)*(1/0);h=h+Math.pow(2,l),c=c-g}return(C?-1:1)*h*Math.pow(2,c-l)},Fe.write=function(a,n,f,l,y,c){var h,i,d,g=c*8-y-1,F=(1<>1,B=y===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=l?0:c-1,_=l?1:-1,L=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(i=isNaN(n)?1:0,h=F):(h=Math.floor(Math.log(n)/Math.LN2),n*(d=Math.pow(2,-h))<1&&(h--,d*=2),h+R>=1?n+=B/d:n+=B*Math.pow(2,1-R),n*d>=2&&(h++,d/=2),h+R>=F?(i=0,h=F):h+R>=1?(i=(n*d-1)*Math.pow(2,y),h=h+R):(i=n*Math.pow(2,R-1)*Math.pow(2,y),h=0));y>=8;a[f+C]=i&255,C+=_,i/=256,y-=8);for(h=h<0;a[f+C]=h&255,C+=_,h/=256,g-=8);a[f+C-_]|=L*128}),Fe}var Dt;function Re(){return Dt||(Dt=1,(function(a){var n=Dn(),f=Ln(),l=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=i,a.SlowBuffer=p,a.INSPECT_MAX_BYTES=50;var y=2147483647;a.kMaxLength=y,i.TYPED_ARRAY_SUPPORT=c(),!i.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{var r=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(r,e),r.foo()===42}catch{return!1}}Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}});function h(r){if(r>y)throw new RangeError('The value "'+r+'" is invalid for option "size"');var e=new Uint8Array(r);return Object.setPrototypeOf(e,i.prototype),e}function i(r,e,t){if(typeof r=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return R(r)}return d(r,e,t)}i.poolSize=8192;function d(r,e,t){if(typeof r=="string")return B(r,e);if(ArrayBuffer.isView(r))return C(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(D(r,ArrayBuffer)||r&&D(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(D(r,SharedArrayBuffer)||r&&D(r.buffer,SharedArrayBuffer)))return _(r,e,t);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var s=r.valueOf&&r.valueOf();if(s!=null&&s!==r)return i.from(s,e,t);var w=L(r);if(w)return w;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return i.from(r[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}i.from=function(r,e,t){return d(r,e,t)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array);function g(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function F(r,e,t){return g(r),r<=0?h(r):e!==void 0?typeof t=="string"?h(r).fill(e,t):h(r).fill(e):h(r)}i.alloc=function(r,e,t){return F(r,e,t)};function R(r){return g(r),h(r<0?0:T(r)|0)}i.allocUnsafe=function(r){return R(r)},i.allocUnsafeSlow=function(r){return R(r)};function B(r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!i.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var t=x(r,e)|0,s=h(t),w=s.write(r,e);return w!==t&&(s=s.slice(0,w)),s}function C(r){for(var e=r.length<0?0:T(r.length)|0,t=h(e),s=0;s=y)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+y.toString(16)+" bytes");return r|0}function p(r){return+r!=r&&(r=0),i.alloc(+r)}i.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==i.prototype},i.compare=function(e,t){if(D(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),D(t,Uint8Array)&&(t=i.from(t,t.offset,t.byteLength)),!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var s=e.length,w=t.length,M=0,k=Math.min(s,w);M2&&arguments[2]===!0;if(!s&&t===0)return 0;for(var w=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return P(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return o(r).length;default:if(w)return s?-1:P(r).length;e=(""+e).toLowerCase(),w=!0}}i.byteLength=x;function A(r,e,t){var s=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return se(this,e,t);case"utf8":case"utf-8":return oe(this,e,t);case"ascii":return ie(this,e,t);case"latin1":case"binary":return pe(this,e,t);case"base64":return ee(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ye(this,e,t);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),s=!0}}i.prototype._isBuffer=!0;function E(r,e,t){var s=r[e];r[e]=r[t],r[t]=s}i.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tt&&(e+=" ... "),""},l&&(i.prototype[l]=i.prototype.inspect),i.prototype.compare=function(e,t,s,w,M){if(D(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),!i.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),s===void 0&&(s=e?e.length:0),w===void 0&&(w=0),M===void 0&&(M=this.length),t<0||s>e.length||w<0||M>this.length)throw new RangeError("out of range index");if(w>=M&&t>=s)return 0;if(w>=M)return-1;if(t>=s)return 1;if(t>>>=0,s>>>=0,w>>>=0,M>>>=0,this===e)return 0;for(var k=M-w,W=s-t,K=Math.min(k,W),z=this.slice(w,M),X=e.slice(t,s),$=0;$2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,O(t)&&(t=w?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(w)return-1;t=r.length-1}else if(t<0)if(w)t=0;else return-1;if(typeof e=="string"&&(e=i.from(e,s)),i.isBuffer(e))return e.length===0?-1:S(r,e,t,s,w);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?w?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):S(r,[e],t,s,w);throw new TypeError("val must be string, number or Buffer")}function S(r,e,t,s,w){var M=1,k=r.length,W=e.length;if(s!==void 0&&(s=String(s).toLowerCase(),s==="ucs2"||s==="ucs-2"||s==="utf16le"||s==="utf-16le")){if(r.length<2||e.length<2)return-1;M=2,k/=2,W/=2,t/=2}function K(_t,Ct){return M===1?_t[Ct]:_t.readUInt16BE(Ct*M)}var z;if(w){var X=-1;for(z=t;zk&&(t=k-W),z=t;z>=0;z--){for(var $=!0,te=0;tew&&(s=w)):s=w;var M=e.length;s>M/2&&(s=M/2);for(var k=0;k>>0,isFinite(s)?(s=s>>>0,w===void 0&&(w="utf8")):(w=s,s=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var M=this.length-t;if((s===void 0||s>M)&&(s=M),e.length>0&&(s<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");w||(w="utf8");for(var k=!1;;)switch(w){case"hex":return I(this,e,t,s);case"utf8":case"utf-8":return N(this,e,t,s);case"ascii":return U(this,e,t,s);case"latin1":case"binary":return H(this,e,t,s);case"base64":return Q(this,e,t,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,e,t,s);default:if(k)throw new TypeError("Unknown encoding: "+w);w=(""+w).toLowerCase(),k=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ee(r,e,t){return e===0&&t===r.length?n.fromByteArray(r):n.fromByteArray(r.slice(e,t))}function oe(r,e,t){t=Math.min(r.length,t);for(var s=[],w=e;w239?4:M>223?3:M>191?2:1;if(w+W<=t){var K,z,X,$;switch(W){case 1:M<128&&(k=M);break;case 2:K=r[w+1],(K&192)===128&&($=(M&31)<<6|K&63,$>127&&(k=$));break;case 3:K=r[w+1],z=r[w+2],(K&192)===128&&(z&192)===128&&($=(M&15)<<12|(K&63)<<6|z&63,$>2047&&($<55296||$>57343)&&(k=$));break;case 4:K=r[w+1],z=r[w+2],X=r[w+3],(K&192)===128&&(z&192)===128&&(X&192)===128&&($=(M&15)<<18|(K&63)<<12|(z&63)<<6|X&63,$>65535&&$<1114112&&(k=$))}}k===null?(k=65533,W=1):k>65535&&(k-=65536,s.push(k>>>10&1023|55296),k=56320|k&1023),s.push(k),w+=W}return xe(s)}var de=4096;function xe(r){var e=r.length;if(e<=de)return String.fromCharCode.apply(String,r);for(var t="",s=0;ss)&&(t=s);for(var w="",M=e;Ms&&(e=s),t<0?(t+=s,t<0&&(t=0)):t>s&&(t=s),tt)throw new RangeError("Trying to access beyond buffer length")}i.prototype.readUIntLE=function(e,t,s){e=e>>>0,t=t>>>0,s||Y(e,t,this.length);for(var w=this[e],M=1,k=0;++k>>0,t=t>>>0,s||Y(e,t,this.length);for(var w=this[e+--t],M=1;t>0&&(M*=256);)w+=this[e+--t]*M;return w},i.prototype.readUInt8=function(e,t){return e=e>>>0,t||Y(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||Y(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||Y(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},i.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,s){e=e>>>0,t=t>>>0,s||Y(e,t,this.length);for(var w=this[e],M=1,k=0;++k=M&&(w-=Math.pow(2,8*t)),w},i.prototype.readIntBE=function(e,t,s){e=e>>>0,t=t>>>0,s||Y(e,t,this.length);for(var w=t,M=1,k=this[e+--w];w>0&&(M*=256);)k+=this[e+--w]*M;return M*=128,k>=M&&(k-=Math.pow(2,8*t)),k},i.prototype.readInt8=function(e,t){return e=e>>>0,t||Y(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},i.prototype.readInt16LE=function(e,t){e=e>>>0,t||Y(e,2,this.length);var s=this[e]|this[e+1]<<8;return s&32768?s|4294901760:s},i.prototype.readInt16BE=function(e,t){e=e>>>0,t||Y(e,2,this.length);var s=this[e+1]|this[e]<<8;return s&32768?s|4294901760:s},i.prototype.readInt32LE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),f.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e=e>>>0,t||Y(e,4,this.length),f.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||Y(e,8,this.length),f.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||Y(e,8,this.length),f.read(this,e,!1,52,8)};function Z(r,e,t,s,w,M){if(!i.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>w||er.length)throw new RangeError("Index out of range")}i.prototype.writeUIntLE=function(e,t,s,w){if(e=+e,t=t>>>0,s=s>>>0,!w){var M=Math.pow(2,8*s)-1;Z(this,e,t,s,M,0)}var k=1,W=0;for(this[t]=e&255;++W>>0,s=s>>>0,!w){var M=Math.pow(2,8*s)-1;Z(this,e,t,s,M,0)}var k=s-1,W=1;for(this[t+k]=e&255;--k>=0&&(W*=256);)this[t+k]=e/W&255;return t+s},i.prototype.writeUInt8=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,1,255,0),this[t]=e&255,t+1},i.prototype.writeUInt16LE=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},i.prototype.writeUInt32LE=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},i.prototype.writeUInt32BE=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},i.prototype.writeIntLE=function(e,t,s,w){if(e=+e,t=t>>>0,!w){var M=Math.pow(2,8*s-1);Z(this,e,t,s,M-1,-M)}var k=0,W=1,K=0;for(this[t]=e&255;++k>0)-K&255;return t+s},i.prototype.writeIntBE=function(e,t,s,w){if(e=+e,t=t>>>0,!w){var M=Math.pow(2,8*s-1);Z(this,e,t,s,M-1,-M)}var k=s-1,W=1,K=0;for(this[t+k]=e&255;--k>=0&&(W*=256);)e<0&&K===0&&this[t+k+1]!==0&&(K=1),this[t+k]=(e/W>>0)-K&255;return t+s},i.prototype.writeInt8=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},i.prototype.writeInt16LE=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},i.prototype.writeInt32LE=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,s){return e=+e,t=t>>>0,s||Z(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function re(r,e,t,s,w,M){if(t+s>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function me(r,e,t,s,w){return e=+e,t=t>>>0,w||re(r,e,t,4),f.write(r,e,t,s,23,4),t+4}i.prototype.writeFloatLE=function(e,t,s){return me(this,e,t,!0,s)},i.prototype.writeFloatBE=function(e,t,s){return me(this,e,t,!1,s)};function Ee(r,e,t,s,w){return e=+e,t=t>>>0,w||re(r,e,t,8),f.write(r,e,t,s,52,8),t+8}i.prototype.writeDoubleLE=function(e,t,s){return Ee(this,e,t,!0,s)},i.prototype.writeDoubleBE=function(e,t,s){return Ee(this,e,t,!1,s)},i.prototype.copy=function(e,t,s,w){if(!i.isBuffer(e))throw new TypeError("argument should be a Buffer");if(s||(s=0),!w&&w!==0&&(w=this.length),t>=e.length&&(t=e.length),t||(t=0),w>0&&w=this.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("sourceEnd out of bounds");w>this.length&&(w=this.length),e.length-t=0;--k)e[k+t]=this[k+s];else Uint8Array.prototype.set.call(e,this.subarray(s,w),t);return M},i.prototype.fill=function(e,t,s,w){if(typeof e=="string"){if(typeof t=="string"?(w=t,t=0,s=this.length):typeof s=="string"&&(w=s,s=this.length),w!==void 0&&typeof w!="string")throw new TypeError("encoding must be a string");if(typeof w=="string"&&!i.isEncoding(w))throw new TypeError("Unknown encoding: "+w);if(e.length===1){var M=e.charCodeAt(0);(w==="utf8"&&M<128||w==="latin1")&&(e=M)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length>>0,s=s===void 0?this.length:s>>>0,e||(e=0);var k;if(typeof e=="number")for(k=t;k55295&&t<57344){if(!w){if(t>56319){(e-=3)>-1&&M.push(239,191,189);continue}else if(k+1===s){(e-=3)>-1&&M.push(239,191,189);continue}w=t;continue}if(t<56320){(e-=3)>-1&&M.push(239,191,189),w=t;continue}t=(w-55296<<10|t-56320)+65536}else w&&(e-=3)>-1&&M.push(239,191,189);if(w=null,t<128){if((e-=1)<0)break;M.push(t)}else if(t<2048){if((e-=2)<0)break;M.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;M.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;M.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return M}function q(r){for(var e=[],t=0;t>8,w=t%256,M.push(w),M.push(s);return M}function o(r){return n.toByteArray(b(r))}function u(r,e,t,s){for(var w=0;w=e.length||w>=r.length);++w)e[w+t]=r[w];return w}function D(r,e){return r instanceof e||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===e.name}function O(r){return r!==r}var V=(function(){for(var r="0123456789abcdef",e=new Array(256),t=0;t<16;++t)for(var s=t*16,w=0;w<16;++w)e[s+w]=r[t]+r[w];return e})()})(He)),He}var ue=Re();const Mn={lstatSync:()=>{},isFileReadStream(a){return!1}},ke={...Mn,runtime:"browser"},Te=a=>{if(a==null)return 0;if(typeof a=="string")return ue.Buffer.byteLength(a);if(typeof a.byteLength=="number")return a.byteLength;if(typeof a.length=="number")return a.length;if(typeof a.size=="number")return a.size;if(typeof a.start=="number"&&typeof a.end=="number")return a.end+1-a.start;if(ke.isFileReadStream(a))try{return ke.lstatSync(a.path).size}catch{return}};var ne;(function(a){a.EMPTY_INPUT="a null or undefined Body",a.CONTENT_LENGTH="the ContentLength property of the params set by the caller",a.STRING_LENGTH="the encoded byte length of the Body string",a.TYPED_ARRAY="the byteLength of a typed byte array such as Uint8Array",a.LENGTH="the value of Body.length",a.SIZE="the value of Body.size",a.START_END_DIFF="the numeric difference between Body.start and Body.end",a.LSTAT="the size of the file given by Body.path on disk as reported by lstatSync"})(ne||(ne={}));const kn=(a,n)=>{if(n!=null)return ne.CONTENT_LENGTH;if(a==null)return ne.EMPTY_INPUT;if(typeof a=="string")return ne.STRING_LENGTH;if(typeof a.byteLength=="number")return ne.TYPED_ARRAY;if(typeof a.length=="number")return ne.LENGTH;if(typeof a.size=="number")return ne.SIZE;if(typeof a.start=="number"&&typeof a.end=="number")return ne.START_END_DIFF;if(ke.isFileReadStream(a))try{return ke.lstatSync(a.path).size,ne.LSTAT}catch{return}};var De={exports:{}},Lt;function be(){return Lt||(Lt=1,typeof Object.create=="function"?De.exports=function(n,f){f&&(n.super_=f,n.prototype=Object.create(f.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:De.exports=function(n,f){if(f){n.super_=f;var l=function(){};l.prototype=f.prototype,n.prototype=new l,n.prototype.constructor=n}}),De.exports}var je,Mt;function ir(){return Mt||(Mt=1,je=Ne().EventEmitter),je}const Pn={},Nn=Object.freeze(Object.defineProperty({__proto__:null,default:Pn},Symbol.toStringTag,{value:"Module"})),ar=Lr(Nn);var We,kt;function In(){if(kt)return We;kt=1;function a(_,L){var T=Object.keys(_);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(_);L&&(p=p.filter(function(x){return Object.getOwnPropertyDescriptor(_,x).enumerable})),T.push.apply(T,p)}return T}function n(_){for(var L=1;L0?this.tail.next=p:this.head=p,this.tail=p,++this.length}},{key:"unshift",value:function(T){var p={data:T,next:this.head};this.length===0&&(this.tail=p),this.head=p,++this.length}},{key:"shift",value:function(){if(this.length!==0){var T=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,T}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(T){if(this.length===0)return"";for(var p=this.head,x=""+p.data;p=p.next;)x+=T+p.data;return x}},{key:"concat",value:function(T){if(this.length===0)return g.alloc(0);for(var p=g.allocUnsafe(T>>>0),x=this.head,A=0;x;)C(x.data,p,A),A+=x.data.length,x=x.next;return p}},{key:"consume",value:function(T,p){var x;return TE.length?E.length:T;if(m===E.length?A+=E:A+=E.slice(0,T),T-=m,T===0){m===E.length?(++x,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=E.slice(m));break}++x}return this.length-=x,A}},{key:"_getBuffer",value:function(T){var p=g.allocUnsafe(T),x=this.head,A=1;for(x.data.copy(p),T-=x.data.length;x=x.next;){var E=x.data,m=T>E.length?E.length:T;if(E.copy(p,p.length-T,0,m),T-=m,T===0){m===E.length?(++A,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=E.slice(m));break}++A}return this.length-=A,p}},{key:B,value:function(T,p){return R(this,n(n({},p),{},{depth:0,customInspect:!1}))}}]),_})(),We}var Ke,Pt;function or(){if(Pt)return Ke;Pt=1;function a(h,i){var d=this,g=this._readableState&&this._readableState.destroyed,F=this._writableState&&this._writableState.destroyed;return g||F?(i?i(h):h&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(y,this,h)):process.nextTick(y,this,h)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(h||null,function(R){!i&&R?d._writableState?d._writableState.errorEmitted?process.nextTick(f,d):(d._writableState.errorEmitted=!0,process.nextTick(n,d,R)):process.nextTick(n,d,R):i?(process.nextTick(f,d),i(R)):process.nextTick(f,d)}),this)}function n(h,i){y(h,i),f(h)}function f(h){h._writableState&&!h._writableState.emitClose||h._readableState&&!h._readableState.emitClose||h.emit("close")}function l(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function y(h,i){h.emit("error",i)}function c(h,i){var d=h._readableState,g=h._writableState;d&&d.autoDestroy||g&&g.autoDestroy?h.destroy(i):h.emit("error",i)}return Ke={destroy:a,undestroy:l,errorOrDestroy:c},Ke}var $e={},Nt;function ve(){if(Nt)return $e;Nt=1;function a(i,d){i.prototype=Object.create(d.prototype),i.prototype.constructor=i,i.__proto__=d}var n={};function f(i,d,g){g||(g=Error);function F(B,C,_){return typeof d=="string"?d:d(B,C,_)}var R=(function(B){a(C,B);function C(_,L,T){return B.call(this,F(_,L,T))||this}return C})(g);R.prototype.name=g.name,R.prototype.code=i,n[i]=R}function l(i,d){if(Array.isArray(i)){var g=i.length;return i=i.map(function(F){return String(F)}),g>2?"one of ".concat(d," ").concat(i.slice(0,g-1).join(", "),", or ")+i[g-1]:g===2?"one of ".concat(d," ").concat(i[0]," or ").concat(i[1]):"of ".concat(d," ").concat(i[0])}else return"of ".concat(d," ").concat(String(i))}function y(i,d,g){return i.substr(0,d.length)===d}function c(i,d,g){return(g===void 0||g>i.length)&&(g=i.length),i.substring(g-d.length,g)===d}function h(i,d,g){return typeof g!="number"&&(g=0),g+d.length>i.length?!1:i.indexOf(d,g)!==-1}return f("ERR_INVALID_OPT_VALUE",function(i,d){return'The value "'+d+'" is invalid for option "'+i+'"'},TypeError),f("ERR_INVALID_ARG_TYPE",function(i,d,g){var F;typeof d=="string"&&y(d,"not ")?(F="must not be",d=d.replace(/^not /,"")):F="must be";var R;if(c(i," argument"))R="The ".concat(i," ").concat(F," ").concat(l(d,"type"));else{var B=h(i,".")?"property":"argument";R='The "'.concat(i,'" ').concat(B," ").concat(F," ").concat(l(d,"type"))}return R+=". Received type ".concat(typeof g),R},TypeError),f("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),f("ERR_METHOD_NOT_IMPLEMENTED",function(i){return"The "+i+" method is not implemented"}),f("ERR_STREAM_PREMATURE_CLOSE","Premature close"),f("ERR_STREAM_DESTROYED",function(i){return"Cannot call "+i+" after a stream was destroyed"}),f("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),f("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),f("ERR_STREAM_WRITE_AFTER_END","write after end"),f("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),f("ERR_UNKNOWN_ENCODING",function(i){return"Unknown encoding: "+i},TypeError),f("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),$e.codes=n,$e}var ze,It;function sr(){if(It)return ze;It=1;var a=ve().codes.ERR_INVALID_OPT_VALUE;function n(l,y,c){return l.highWaterMark!=null?l.highWaterMark:y?l[c]:null}function f(l,y,c,h){var i=n(y,h,c);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var d=h?c:"highWaterMark";throw new a(d,i)}return Math.floor(i)}return l.objectMode?16:16*1024}return ze={getHighWaterMark:f},ze}var Ve,Ut;function Un(){if(Ut)return Ve;Ut=1,Ve=a;function a(f,l){if(n("noDeprecation"))return f;var y=!1;function c(){if(!y){if(n("throwDeprecation"))throw new Error(l);n("traceDeprecation")?console.trace(l):console.warn(l),y=!0}return f.apply(this,arguments)}return c}function n(f){try{if(!we.localStorage)return!1}catch{return!1}var l=we.localStorage[f];return l==null?!1:String(l).toLowerCase()==="true"}return Ve}var Ge,Ot;function ur(){if(Ot)return Ge;Ot=1,Ge=N;function a(v){var b=this;this.next=null,this.entry=null,this.finish=function(){Ee(b,v)}}var n;N.WritableState=S;var f={deprecate:Un()},l=ir(),y=Re().Buffer,c=(typeof we<"u"?we:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function h(v){return y.from(v)}function i(v){return y.isBuffer(v)||v instanceof c}var d=or(),g=sr(),F=g.getHighWaterMark,R=ve().codes,B=R.ERR_INVALID_ARG_TYPE,C=R.ERR_METHOD_NOT_IMPLEMENTED,_=R.ERR_MULTIPLE_CALLBACK,L=R.ERR_STREAM_CANNOT_PIPE,T=R.ERR_STREAM_DESTROYED,p=R.ERR_STREAM_NULL_VALUES,x=R.ERR_STREAM_WRITE_AFTER_END,A=R.ERR_UNKNOWN_ENCODING,E=d.errorOrDestroy;be()(N,l);function m(){}function S(v,b,P){n=n||ge(),v=v||{},typeof P!="boolean"&&(P=b instanceof n),this.objectMode=!!v.objectMode,P&&(this.objectMode=this.objectMode||!!v.writableObjectMode),this.highWaterMark=F(this,v,"writableHighWaterMark",P),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var q=v.decodeStrings===!1;this.decodeStrings=!q,this.defaultEncoding=v.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(j){xe(b,j)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=v.emitClose!==!1,this.autoDestroy=!!v.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}S.prototype.getBuffer=function(){for(var b=this.bufferedRequest,P=[];b;)P.push(b),b=b.next;return P},(function(){try{Object.defineProperty(S.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var I;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(I=Function.prototype[Symbol.hasInstance],Object.defineProperty(N,Symbol.hasInstance,{value:function(b){return I.call(this,b)?!0:this!==N?!1:b&&b._writableState instanceof S}})):I=function(b){return b instanceof this};function N(v){n=n||ge();var b=this instanceof n;if(!b&&!I.call(N,this))return new N(v);this._writableState=new S(v,this,b),this.writable=!0,v&&(typeof v.write=="function"&&(this._write=v.write),typeof v.writev=="function"&&(this._writev=v.writev),typeof v.destroy=="function"&&(this._destroy=v.destroy),typeof v.final=="function"&&(this._final=v.final)),l.call(this)}N.prototype.pipe=function(){E(this,new L)};function U(v,b){var P=new x;E(v,P),process.nextTick(b,P)}function H(v,b,P,q){var j;return P===null?j=new p:typeof P!="string"&&!b.objectMode&&(j=new B("chunk",["string","Buffer"],P)),j?(E(v,j),process.nextTick(q,j),!1):!0}N.prototype.write=function(v,b,P){var q=this._writableState,j=!1,o=!q.objectMode&&i(v);return o&&!y.isBuffer(v)&&(v=h(v)),typeof b=="function"&&(P=b,b=null),o?b="buffer":b||(b=q.defaultEncoding),typeof P!="function"&&(P=m),q.ending?U(this,P):(o||H(this,q,v,P))&&(q.pendingcb++,j=J(this,q,o,v,b,P)),j},N.prototype.cork=function(){this._writableState.corked++},N.prototype.uncork=function(){var v=this._writableState;v.corked&&(v.corked--,!v.writing&&!v.corked&&!v.bufferProcessing&&v.bufferedRequest&&se(this,v))},N.prototype.setDefaultEncoding=function(b){if(typeof b=="string"&&(b=b.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((b+"").toLowerCase())>-1))throw new A(b);return this._writableState.defaultEncoding=b,this},Object.defineProperty(N.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Q(v,b,P){return!v.objectMode&&v.decodeStrings!==!1&&typeof b=="string"&&(b=y.from(b,P)),b}Object.defineProperty(N.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function J(v,b,P,q,j,o){if(!P){var u=Q(b,q,j);q!==u&&(P=!0,j="buffer",q=u)}var D=b.objectMode?1:q.length;b.length+=D;var O=b.length>5===6?2:p>>4===14?3:p>>3===30?4:p>>6===2?-1:-2}function h(p,x,A){var E=x.length-1;if(E=0?(m>0&&(p.lastNeed=m-1),m):--E=0?(m>0&&(p.lastNeed=m-2),m):--E=0?(m>0&&(m===2?m=0:p.lastNeed=m-3),m):0))}function i(p,x,A){if((x[0]&192)!==128)return p.lastNeed=0,"�";if(p.lastNeed>1&&x.length>1){if((x[1]&192)!==128)return p.lastNeed=1,"�";if(p.lastNeed>2&&x.length>2&&(x[2]&192)!==128)return p.lastNeed=2,"�"}}function d(p){var x=this.lastTotal-this.lastNeed,A=i(this,p);if(A!==void 0)return A;if(this.lastNeed<=p.length)return p.copy(this.lastChar,x,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);p.copy(this.lastChar,x,0,p.length),this.lastNeed-=p.length}function g(p,x){var A=h(this,p,x);if(!this.lastNeed)return p.toString("utf8",x);this.lastTotal=A;var E=p.length-(A-this.lastNeed);return p.copy(this.lastChar,0,E),p.toString("utf8",x,E)}function F(p){var x=p&&p.length?this.write(p):"";return this.lastNeed?x+"�":x}function R(p,x){if((p.length-x)%2===0){var A=p.toString("utf16le",x);if(A){var E=A.charCodeAt(A.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=p[p.length-2],this.lastChar[1]=p[p.length-1],A.slice(0,-1)}return A}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=p[p.length-1],p.toString("utf16le",x,p.length-1)}function B(p){var x=p&&p.length?this.write(p):"";if(this.lastNeed){var A=this.lastTotal-this.lastNeed;return x+this.lastChar.toString("utf16le",0,A)}return x}function C(p,x){var A=(p.length-x)%3;return A===0?p.toString("base64",x):(this.lastNeed=3-A,this.lastTotal=3,A===1?this.lastChar[0]=p[p.length-1]:(this.lastChar[0]=p[p.length-2],this.lastChar[1]=p[p.length-1]),p.toString("base64",x,p.length-A))}function _(p){var x=p&&p.length?this.write(p):"";return this.lastNeed?x+this.lastChar.toString("base64",0,3-this.lastNeed):x}function L(p){return p.toString(this.encoding)}function T(p){return p&&p.length?this.write(p):""}return Xe}var Qe,Kt;function xt(){if(Kt)return Qe;Kt=1;var a=ve().codes.ERR_STREAM_PREMATURE_CLOSE;function n(c){var h=!1;return function(){if(!h){h=!0;for(var i=arguments.length,d=new Array(i),g=0;g0)if(typeof u!="string"&&!r.objectMode&&Object.getPrototypeOf(u)!==l.prototype&&(u=c(u)),O)r.endEmitted?m(o,new p):Q(o,r,u,!0);else if(r.ended)m(o,new L);else{if(r.destroyed)return!1;r.reading=!1,r.decoder&&!D?(u=r.decoder.write(u),r.objectMode||u.length!==0?Q(o,r,u,!1):se(o,r)):Q(o,r,u,!1)}else O||(r.reading=!1,se(o,r))}return!r.ended&&(r.length=ee?o=ee:(o--,o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o++),o}function de(o,u){return o<=0||u.length===0&&u.ended?0:u.objectMode?1:o!==o?u.flowing&&u.length?u.buffer.head.data.length:u.length:(o>u.highWaterMark&&(u.highWaterMark=oe(o)),o<=u.length?o:u.ended?u.length:(u.needReadable=!0,0))}U.prototype.read=function(o){d("read",o),o=parseInt(o,10);var u=this._readableState,D=o;if(o!==0&&(u.emittedReadable=!1),o===0&&u.needReadable&&((u.highWaterMark!==0?u.length>=u.highWaterMark:u.length>0)||u.ended))return d("read: emitReadable",u.length,u.ended),u.length===0&&u.ended?P(this):ie(this),null;if(o=de(o,u),o===0&&u.ended)return u.length===0&&P(this),null;var O=u.needReadable;d("need readable",O),(u.length===0||u.length-o0?V=b(o,u):V=null,V===null?(u.needReadable=u.length<=u.highWaterMark,o=0):(u.length-=o,u.awaitDrain=0),u.length===0&&(u.ended||(u.needReadable=!0),D!==o&&u.ended&&P(this)),V!==null&&this.emit("data",V),V};function xe(o,u){if(d("onEofChunk"),!u.ended){if(u.decoder){var D=u.decoder.end();D&&D.length&&(u.buffer.push(D),u.length+=u.objectMode?1:D.length)}u.ended=!0,u.sync?ie(o):(u.needReadable=!1,u.emittedReadable||(u.emittedReadable=!0,pe(o)))}}function ie(o){var u=o._readableState;d("emitReadable",u.needReadable,u.emittedReadable),u.needReadable=!1,u.emittedReadable||(d("emitReadable",u.flowing),u.emittedReadable=!0,process.nextTick(pe,o))}function pe(o){var u=o._readableState;d("emitReadable_",u.destroyed,u.length,u.ended),!u.destroyed&&(u.length||u.ended)&&(o.emit("readable"),u.emittedReadable=!1),u.needReadable=!u.flowing&&!u.ended&&u.length<=u.highWaterMark,v(o)}function se(o,u){u.readingMore||(u.readingMore=!0,process.nextTick(ye,o,u))}function ye(o,u){for(;!u.reading&&!u.ended&&(u.length1&&j(O.pipes,o)!==-1)&&!w&&(d("false write response, pause",O.awaitDrain),O.awaitDrain++),D.pause())}function W($){d("onerror",$),X(),o.removeListener("error",W),n(o,"error")===0&&m(o,$)}I(o,"error",W);function K(){o.removeListener("finish",z),X()}o.once("close",K);function z(){d("onfinish"),o.removeListener("close",K),X()}o.once("finish",z);function X(){d("unpipe"),D.unpipe(o)}return o.emit("pipe",D),O.flowing||(d("pipe resume"),D.resume()),o};function Y(o){return function(){var D=o._readableState;d("pipeOnDrain",D.awaitDrain),D.awaitDrain&&D.awaitDrain--,D.awaitDrain===0&&n(o,"data")&&(D.flowing=!0,v(o))}}U.prototype.unpipe=function(o){var u=this._readableState,D={hasUnpiped:!1};if(u.pipesCount===0)return this;if(u.pipesCount===1)return o&&o!==u.pipes?this:(o||(o=u.pipes),u.pipes=null,u.pipesCount=0,u.flowing=!1,o&&o.emit("unpipe",this,D),this);if(!o){var O=u.pipes,V=u.pipesCount;u.pipes=null,u.pipesCount=0,u.flowing=!1;for(var r=0;r0,O.flowing!==!1&&this.resume()):o==="readable"&&!O.endEmitted&&!O.readableListening&&(O.readableListening=O.needReadable=!0,O.flowing=!1,O.emittedReadable=!1,d("on readable",O.length,O.reading),O.length?ie(this):O.reading||process.nextTick(re,this)),D},U.prototype.addListener=U.prototype.on,U.prototype.removeListener=function(o,u){var D=f.prototype.removeListener.call(this,o,u);return o==="readable"&&process.nextTick(Z,this),D},U.prototype.removeAllListeners=function(o){var u=f.prototype.removeAllListeners.apply(this,arguments);return(o==="readable"||o===void 0)&&process.nextTick(Z,this),u};function Z(o){var u=o._readableState;u.readableListening=o.listenerCount("readable")>0,u.resumeScheduled&&!u.paused?u.flowing=!0:o.listenerCount("data")>0&&o.resume()}function re(o){d("readable nexttick read 0"),o.read(0)}U.prototype.resume=function(){var o=this._readableState;return o.flowing||(d("resume"),o.flowing=!o.readableListening,me(this,o)),o.paused=!1,this};function me(o,u){u.resumeScheduled||(u.resumeScheduled=!0,process.nextTick(Ee,o,u))}function Ee(o,u){d("resume",u.reading),u.reading||o.read(0),u.resumeScheduled=!1,o.emit("resume"),v(o),u.flowing&&!u.reading&&o.read(0)}U.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function v(o){var u=o._readableState;for(d("flow",u.flowing);u.flowing&&o.read()!==null;);}U.prototype.wrap=function(o){var u=this,D=this._readableState,O=!1;o.on("end",function(){if(d("wrapped end"),D.decoder&&!D.ended){var e=D.decoder.end();e&&e.length&&u.push(e)}u.push(null)}),o.on("data",function(e){if(d("wrapped data"),D.decoder&&(e=D.decoder.write(e)),!(D.objectMode&&e==null)&&!(!D.objectMode&&(!e||!e.length))){var t=u.push(e);t||(O=!0,o.pause())}});for(var V in o)this[V]===void 0&&typeof o[V]=="function"&&(this[V]=(function(t){return function(){return o[t].apply(o,arguments)}})(V));for(var r=0;r=u.length?(u.decoder?D=u.buffer.join(""):u.buffer.length===1?D=u.buffer.first():D=u.buffer.concat(u.length),u.buffer.clear()):D=u.buffer.consume(o,u.decoder),D}function P(o){var u=o._readableState;d("endReadable",u.endEmitted),u.endEmitted||(u.ended=!0,process.nextTick(q,u,o))}function q(o,u){if(d("endReadableNT",o.endEmitted,o.length),!o.endEmitted&&o.length===0&&(o.endEmitted=!0,u.readable=!1,u.emit("end"),o.autoDestroy)){var D=u._writableState;(!D||D.autoDestroy&&D.finished)&&u.destroy()}}typeof Symbol=="function"&&(U.from=function(o,u){return E===void 0&&(E=Hn()),E(U,o,u)});function j(o,u){for(var D=0,O=o.length;D0;return i(x,E,m,function(S){T||(T=S),S&&p.forEach(d),!E&&(p.forEach(d),L(T))})});return C.reduce(g)}return nt=R,nt}var it,Qt;function Kn(){if(Qt)return it;Qt=1,it=f;var a=Ne().EventEmitter,n=be();n(f,a),f.Readable=fr(),f.Writable=ur(),f.Duplex=ge(),f.Transform=lr(),f.PassThrough=jn(),f.finished=xt(),f.pipeline=Wn(),f.Stream=f;function f(){a.call(this)}return f.prototype.pipe=function(l,y){var c=this;function h(C){l.writable&&l.write(C)===!1&&c.pause&&c.pause()}c.on("data",h);function i(){c.readable&&c.resume&&c.resume()}l.on("drain",i),!l._isStdio&&(!y||y.end!==!1)&&(c.on("end",g),c.on("close",F));var d=!1;function g(){d||(d=!0,l.end())}function F(){d||(d=!0,typeof l.destroy=="function"&&l.destroy())}function R(C){if(B(),a.listenerCount(this,"error")===0)throw C}c.on("error",R),l.on("error",R);function B(){c.removeListener("data",h),l.removeListener("drain",i),c.removeListener("end",g),c.removeListener("close",F),c.removeListener("error",R),l.removeListener("error",R),c.removeListener("end",B),c.removeListener("close",B),l.removeListener("close",B)}return c.on("end",B),c.on("close",B),l.on("close",B),l.emit("pipe",c),l},it}var $n=Kn();async function*at(a,n,f){let l=1;const y={chunks:[],length:0};for await(const c of f(a))for(y.chunks.push(c),y.length+=c.byteLength;y.length>n;){const h=y.chunks.length>1?ue.Buffer.concat(y.chunks):y.chunks[0];yield{partNumber:l,data:h.subarray(0,n)},y.chunks=[h.subarray(n)],y.length=y.chunks[0].byteLength,l+=1}yield{partNumber:l,data:y.chunks.length!==1?ue.Buffer.concat(y.chunks):y.chunks[0],lastPart:!0}}async function*Zt(a,n){let f=1,l=0,y=n;for(;y{if(a instanceof Uint8Array)return Zt(a,n);if(a instanceof $n.Readable)return at(a,n,zn);if(a instanceof String||typeof a=="string")return Zt(ue.Buffer.from(a),n);if(typeof a.stream=="function")return at(a.stream(),n,Jt);if(a instanceof ReadableStream)return at(a,n,Jt);throw new Error("Body Data is unsupported format, expected data to be one of: string | Uint8Array | Buffer | Readable | ReadableStream | Blob;.")};class Ae extends qe.EventEmitter{static MIN_PART_SIZE=1024*1024*5;MAX_PARTS=1e4;queueSize=4;partSize;leavePartsOnError=!1;tags=[];client;params;totalBytes;totalBytesSource;bytesUploadedSoFar;abortController;concurrentUploaders=[];createMultiPartPromise;abortMultipartUploadCommand=null;uploadedParts=[];uploadEnqueuedPartsCount=0;expectedPartsCount;uploadId;uploadEvent;isMultiPart=!0;singleUploadResult;sent=!1;constructor(n){if(super(),this.queueSize=n.queueSize||this.queueSize,this.leavePartsOnError=n.leavePartsOnError||this.leavePartsOnError,this.tags=n.tags||this.tags,this.client=n.client,this.params=n.params,!this.params)throw new Error("InputError: Upload requires params to be passed to upload.");this.totalBytes=this.params.ContentLength??Te(this.params.Body),this.totalBytesSource=kn(this.params.Body,this.params.ContentLength),this.bytesUploadedSoFar=0,this.abortController=n.abortController??new Tn,this.partSize=n.partSize||Math.max(Ae.MIN_PART_SIZE,Math.floor((this.totalBytes||0)/this.MAX_PARTS)),this.totalBytes!==void 0&&(this.expectedPartsCount=Math.ceil(this.totalBytes/this.partSize)),this.__validateInput()}async abort(){this.abortController.abort()}async done(){if(this.sent)throw new Error("@aws-sdk/lib-storage: this instance of Upload has already executed .done(). Create a new instance.");return this.sent=!0,await Promise.race([this.__doMultipartUpload(),this.__abortTimeout(this.abortController.signal)])}on(n,f){return this.uploadEvent=n,super.on(n,f)}async __uploadUsingPut(n){this.isMultiPart=!1;const f={...this.params,Body:n.data},l=this.client.config,y=l.requestHandler,c=y instanceof qe.EventEmitter?y:null,h=_=>{this.bytesUploadedSoFar=_.loaded,this.totalBytes=_.total,this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:n.partNumber,Key:this.params.Key,Bucket:this.params.Bucket})};c!==null&&c.on("xhr.upload.progress",h);const i=await Promise.all([this.client.send(new Rt(f)),l?.endpoint?.()]),d=i[0];let g=i[1];if(g||(g=Mr(await kr(f,Rt,{...l}))),!g)throw new Error('Could not resolve endpoint from S3 "client.config.endpoint()" nor EndpointsV2.');c!==null&&c.off("xhr.upload.progress",h);const F=this.params.Key.split("/").map(_=>St(_)).join("/"),R=St(this.params.Bucket),B=(()=>{const _=g.hostname.startsWith(`${R}.`),L=this.client.config.forcePathStyle,T=g.port?`:${g.port}`:"";return L?`${g.protocol}//${g.hostname}${T}/${R}/${F}`:_?`${g.protocol}//${g.hostname}${T}/${F}`:`${g.protocol}//${R}.${g.hostname}${T}/${F}`})();this.singleUploadResult={...d,Bucket:this.params.Bucket,Key:this.params.Key,Location:B};const C=Te(n.data);this.__notifyProgress({loaded:C,total:C,part:1,Key:this.params.Key,Bucket:this.params.Bucket})}async __createMultipartUpload(){const n=await this.client.config.requestChecksumCalculation();if(!this.createMultiPartPromise){const f={...this.params,Body:void 0};n==="WHEN_SUPPORTED"&&(f.ChecksumAlgorithm=this.params.ChecksumAlgorithm||Bn.CRC32),this.createMultiPartPromise=this.client.send(new Cn(f)).then(l=>(this.abortMultipartUploadCommand=new yn({Bucket:this.params.Bucket,Key:this.params.Key,UploadId:l.UploadId}),l))}return this.createMultiPartPromise}async __doConcurrentUpload(n){for await(const f of n){if(this.uploadEnqueuedPartsCount>this.MAX_PARTS)throw new Error(`Exceeded ${this.MAX_PARTS} parts in multipart upload to Bucket: ${this.params.Bucket} Key: ${this.params.Key}.`);if(this.abortController.signal.aborted)return;if(f.partNumber===1&&f.lastPart)return await this.__uploadUsingPut(f);if(!this.uploadId){const{UploadId:g}=await this.__createMultipartUpload();if(this.uploadId=g,this.abortController.signal.aborted)return}const l=Te(f.data)||0,y=this.client.config.requestHandler,c=y instanceof qe.EventEmitter?y:null;let h=0;const i=(g,F)=>{(Number(F.query.partNumber)||-1)===f.partNumber&&(g.total&&l&&(this.bytesUploadedSoFar+=g.loaded-h,h=g.loaded),this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:f.partNumber,Key:this.params.Key,Bucket:this.params.Bucket}))};c!==null&&c.on("xhr.upload.progress",i),this.uploadEnqueuedPartsCount+=1,this.__validateUploadPart(f);const d=await this.client.send(new Rn({...this.params,ContentLength:void 0,UploadId:this.uploadId,Body:f.data,PartNumber:f.partNumber}));if(c!==null&&c.off("xhr.upload.progress",i),this.abortController.signal.aborted)return;if(!d.ETag)throw new Error(`Part ${f.partNumber} is missing ETag in UploadPart response. Missing Bucket CORS configuration for ETag header?`);this.uploadedParts.push({PartNumber:f.partNumber,ETag:d.ETag,...d.ChecksumCRC32&&{ChecksumCRC32:d.ChecksumCRC32},...d.ChecksumCRC32C&&{ChecksumCRC32C:d.ChecksumCRC32C},...d.ChecksumSHA1&&{ChecksumSHA1:d.ChecksumSHA1},...d.ChecksumSHA256&&{ChecksumSHA256:d.ChecksumSHA256}}),c===null&&(this.bytesUploadedSoFar+=l),this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:f.partNumber,Key:this.params.Key,Bucket:this.params.Bucket})}}async __doMultipartUpload(){const n=Vn(this.params.Body,this.partSize),f=[];for(let y=0;y{f.push(h)});this.concurrentUploaders.push(c)}if(await Promise.all(this.concurrentUploaders),f.length>=1)throw await this.markUploadAsAborted(),f[0];if(this.abortController.signal.aborted)throw await this.markUploadAsAborted(),Object.assign(new Error("Upload aborted."),{name:"AbortError"});let l;if(this.isMultiPart){const{expectedPartsCount:y,uploadedParts:c,totalBytes:h,totalBytesSource:i}=this;if(h!==void 0&&y!==void 0&&c.length!==y)throw new Error(`Expected ${y} part(s) but uploaded ${c.length} part(s). The expected part count is based on the byte-count of the input.params.Body, which was read from ${i} and is ${h}. If this is not correct, provide an override value by setting a number to input.params.ContentLength in bytes. -`);this.uploadedParts.sort((g,F)=>g.PartNumber-F.PartNumber);const d={...this.params,Body:void 0,UploadId:this.uploadId,MultipartUpload:{Parts:this.uploadedParts}};l=await this.client.send(new gn(d)),typeof l?.Location=="string"&&l.Location.includes("%2F")&&(l.Location=l.Location.replace(/%2F/g,"/"))}else l=this.singleUploadResult;return this.abortMultipartUploadCommand=null,this.tags.length&&await this.client.send(new An({...this.params,Tagging:{TagSet:this.tags}})),l}async markUploadAsAborted(){this.uploadId&&!this.leavePartsOnError&&this.abortMultipartUploadCommand!==null&&(await this.client.send(this.abortMultipartUploadCommand),this.abortMultipartUploadCommand=null)}__notifyProgress(n){this.uploadEvent&&this.emit(this.uploadEvent,n)}async __abortTimeout(n){return new Promise((f,l)=>{n.onabort=()=>{const y=new Error("Upload aborted.");y.name="AbortError",l(y)}})}__validateUploadPart(n){const f=Te(n.data);if(f===void 0)throw new Error(`A dataPart was generated without a measurable data chunk size for part number ${n.partNumber}`);if(!(n.partNumber===1&&n.lastPart)&&!n.lastPart&&f!==this.partSize)throw new Error(`The byte size for part number ${n.partNumber}, size ${f} does not match expected size ${this.partSize}`)}__validateInput(){if(!this.client)throw new Error("InputError: Upload requires a AWS client to do uploads with.");if(this.partSize{n.invalidateQueries({queryKey:["s3","buckets",y.bucket,"objects"]})}},a[0]=n,a[1]=f):f=a[1],gt(f)}async function Gn(a){const{bucket:n,key:f,file:l}=a;return await new Ae({client:wt(),params:{Bucket:n,Key:f,Body:l,ContentType:l.type}}).done()}function ei(){const a=mt.c(2),n=Et();let f;return a[0]!==n?(f={mutationFn:Yn,onSuccess:()=>{n.invalidateQueries({queryKey:["s3","buckets"]})}},a[0]=n,a[1]=f):f=a[1],gt(f)}async function Yn(a){const{bucketName:n}=a,f=new _n({Bucket:n});return await wt().send(f)}function ti(){const a=mt.c(2),n=Et();let f;return a[0]!==n?(f={mutationFn:Xn,onSuccess:(l,y)=>{n.invalidateQueries({queryKey:["s3","buckets",y.bucket,"objects"]})}},a[0]=n,a[1]=f):f=a[1],gt(f)}async function Xn(a){const{bucket:n,key:f}=a,l=new Sn({Bucket:n,Key:f});return await wt().send(l)}export{Pe as a,ti as b,Jn as c,vt as g,ei as u}; +`);this.uploadedParts.sort((g,F)=>g.PartNumber-F.PartNumber);const d={...this.params,Body:void 0,UploadId:this.uploadId,MultipartUpload:{Parts:this.uploadedParts}};l=await this.client.send(new gn(d)),typeof l?.Location=="string"&&l.Location.includes("%2F")&&(l.Location=l.Location.replace(/%2F/g,"/"))}else l=this.singleUploadResult;return this.abortMultipartUploadCommand=null,this.tags.length&&await this.client.send(new An({...this.params,Tagging:{TagSet:this.tags}})),l}async markUploadAsAborted(){this.uploadId&&!this.leavePartsOnError&&this.abortMultipartUploadCommand!==null&&(await this.client.send(this.abortMultipartUploadCommand),this.abortMultipartUploadCommand=null)}__notifyProgress(n){this.uploadEvent&&this.emit(this.uploadEvent,n)}async __abortTimeout(n){return new Promise((f,l)=>{n.onabort=()=>{const y=new Error("Upload aborted.");y.name="AbortError",l(y)}})}__validateUploadPart(n){const f=Te(n.data);if(f===void 0)throw new Error(`A dataPart was generated without a measurable data chunk size for part number ${n.partNumber}`);if(!(n.partNumber===1&&n.lastPart)&&!n.lastPart&&f!==this.partSize)throw new Error(`The byte size for part number ${n.partNumber}, size ${f} does not match expected size ${this.partSize}`)}__validateInput(){if(!this.client)throw new Error("InputError: Upload requires a AWS client to do uploads with.");if(this.partSize{n.invalidateQueries({queryKey:["s3","buckets",y.bucket,"objects"]})}},a[0]=n,a[1]=f):f=a[1],gt(f)}async function Gn(a){const{bucket:n,key:f,file:l}=a;try{return await new Ae({client:wt(),params:{Bucket:n,Key:f,Body:l,ContentType:l.type}}).done()}catch{throw new Error("Failed to upload object")}}function ei(){const a=mt.c(2),n=Et();let f;return a[0]!==n?(f={mutationFn:Yn,onSuccess:()=>{n.invalidateQueries({queryKey:["s3","buckets"]})}},a[0]=n,a[1]=f):f=a[1],gt(f)}async function Yn(a){const{bucketName:n}=a;try{const f=new _n({Bucket:n});return await wt().send(f)}catch{throw new Error("Failed to create bucket")}}function ti(){const a=mt.c(2),n=Et();let f;return a[0]!==n?(f={mutationFn:Xn,onSuccess:(l,y)=>{n.invalidateQueries({queryKey:["s3","buckets",y.bucket,"objects"]})}},a[0]=n,a[1]=f):f=a[1],gt(f)}async function Xn(a){const{bucket:n,key:f}=a;try{const l=new Sn({Bucket:n,Key:f});return await wt().send(l)}catch{throw new Error("Failed to delete object")}}export{Jn as a,Pe as b,ti as c,vt as g,ei as u}; diff --git a/hive/services/hiveui/frontend/dist/assets/upload-button.js b/hive/services/hiveui/frontend/dist/assets/upload-button.js index 147613800..3eb654301 100644 --- a/hive/services/hiveui/frontend/dist/assets/upload-button.js +++ b/hive/services/hiveui/frontend/dist/assets/upload-button.js @@ -1 +1 @@ -import{h as $,aM as I,aN as q,aO as G,aP as V,aQ as W,aR as Q,c as B,j as t,L as Z,r as F,aS as J,aT as X,B as Y}from"./index.js";import{a as ee,b as te,c as se,e as ae,d as ne,h as le,f as oe,g as ie}from"./alert-dialog.js";import{g as re,a as ce,b as de,c as me}from"./s3.js";import{D as ue}from"./download.js";import{T as fe}from"./trash-2.js";const he=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],pe=$("file",he);const ge=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],xe=$("folder",ge);const be=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],ye=$("upload",be),je=c=>(e,a)=>async n=>{const l=await e(n),{response:s}=l;if(I.isInstance(s)&&s.headers.expires){s.headers.expiresstring=s.headers.expires;try{q(s.headers.expires)}catch(o){a.logger?.warn(`AWS SDK Warning for ${a.clientName}::${a.commandName} response parsing (${s.headers.expires}): ${o}`),delete s.headers.expires}}return l},ke={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},Ne=c=>({applyToStack:e=>{e.addRelativeTo(je(),ke)}});class Ce extends G.classBuilder().ep({...V,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,a,n,l){return[W(n,e.getEndpointParameterInstructions()),re(n,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1"]}),ce(n),Ne()]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").sc(Q).build(){}function Ae(c){const e=B.c(9),{folderName:a,fullPrefix:n,bucketName:l}=c;let s;e[0]!==l||e[1]!==n?(s={bucket:l,_splat:n},e[0]=l,e[1]=n,e[2]=s):s=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(xe,{className:"size-5 text-muted-foreground"}),e[3]=o):o=e[3];let i;e[4]!==a?(i=t.jsx("span",{className:"font-medium",children:a}),e[4]=a,e[5]=i):i=e[5];let r;return e[6]!==s||e[7]!==i?(r=t.jsxs(Z,{className:"flex items-center gap-3 rounded-lg border bg-card p-4 transition-colors hover:bg-accent",params:s,to:"/s3/ls/$bucket/$",children:[o,i]}),e[6]=s,e[7]=i,e[8]=r):r=e[8],r}function _e(c){const e=B.c(46),{object:a,bucketName:n,displayName:l,fullKey:s}=c,[o,i]=F.useState(!1),r=de();let N;e[0]!==n||e[1]!==l||e[2]!==s?(N=async function(){try{const K=new Ce({Bucket:n,Key:s}),z=await X().send(K);if(z.Body){const H=await z.Body.transformToByteArray(),E=URL.createObjectURL(new Blob([H])),k=document.createElement("a");k.href=E,k.download=l,document.body.appendChild(k),k.click(),document.body.removeChild(k),URL.revokeObjectURL(E)}}catch{throw new Error("Failed to download object")}},e[0]=n,e[1]=l,e[2]=s,e[3]=N):N=e[3];const L=N;let C;e[4]!==n||e[5]!==r||e[6]!==s?(C=async function(){await r.mutateAsync({bucket:n,key:s}),i(!1)},e[4]=n,e[5]=r,e[6]=s,e[7]=C):C=e[7];const O=C,U=a.Key;let w;e[8]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(pe,{className:"size-5 text-muted-foreground"}),e[8]=w):w=e[8];let d;e[9]!==l?(d=t.jsx("h3",{className:"font-medium",children:l}),e[9]=l,e[10]=d):d=e[10];let m;e[11]!==a.LastModified?(m=a.LastModified&&t.jsxs("p",{className:"text-muted-foreground text-sm",children:["Last Modified: ",a.LastModified.toLocaleString()]}),e[11]=a.LastModified,e[12]=m):m=e[12];let u;e[13]!==d||e[14]!==m?(u=t.jsxs("div",{className:"flex items-center gap-3",children:[w,t.jsxs("div",{children:[d,m]})]}),e[13]=d,e[14]=m,e[15]=u):u=e[15];const R=a.Size||0;let f;e[16]!==R?(f=J(R),e[16]=R,e[17]=f):f=e[17];let h;e[18]!==f?(h=t.jsx("div",{className:"text-muted-foreground text-sm",children:f}),e[18]=f,e[19]=h):h=e[19];let S;e[20]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(ue,{className:"size-4"}),e[20]=S):S=e[20];let p;e[21]!==L?(p=t.jsx("button",{className:"rounded-md p-2 transition-colors hover:bg-accent",onClick:L,type:"button",children:S}),e[21]=L,e[22]=p):p=e[22];let v;e[23]===Symbol.for("react.memo_cache_sentinel")?(v=()=>i(!0),e[23]=v):v=e[23];let D;e[24]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx("button",{className:"rounded-md p-2 text-destructive transition-colors hover:bg-accent",onClick:v,type:"button",children:t.jsx(fe,{className:"size-4"})}),e[24]=D):D=e[24];let g;e[25]!==h||e[26]!==p?(g=t.jsxs("div",{className:"flex items-center gap-3",children:[h,p,D]}),e[25]=h,e[26]=p,e[27]=g):g=e[27];let M;e[28]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx(ee,{children:"Delete Object"}),e[28]=M):M=e[28];let x;e[29]!==l?(x=t.jsxs(te,{children:[M,t.jsxs(se,{children:["Are you sure you want to delete ",t.jsx("strong",{children:l}),"? This action cannot be undone."]})]}),e[29]=l,e[30]=x):x=e[30];let A;e[31]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ae,{children:"Cancel"}),e[31]=A):A=e[31];const P=r.isPending?"Deleting…":"Delete";let b;e[32]!==O||e[33]!==P?(b=t.jsxs(ne,{children:[A,t.jsx(le,{className:"bg-destructive hover:bg-destructive/90",onClick:O,children:P})]}),e[32]=O,e[33]=P,e[34]=b):b=e[34];let y;e[35]!==x||e[36]!==b?(y=t.jsxs(oe,{children:[x,b]}),e[35]=x,e[36]=b,e[37]=y):y=e[37];let j;e[38]!==o||e[39]!==y?(j=t.jsx(ie,{onOpenChange:i,open:o,children:y}),e[38]=o,e[39]=y,e[40]=j):j=e[40];let _;return e[41]!==a.Key||e[42]!==g||e[43]!==j||e[44]!==u?(_=t.jsxs("div",{className:"flex items-center justify-between rounded-lg border bg-card p-4",children:[u,g,j]},U),e[41]=a.Key,e[42]=g,e[43]=j,e[44]=u,e[45]=_):_=e[45],_}function Le({bucket:c,prefix:e=""}){const a=F.useRef(null),n=me();async function l(s){const o=s.target.files;if(!(!o||o.length===0))try{await Promise.all(Array.from(o).map(i=>{const r=`${e}${i.name}`;return n.mutateAsync({bucket:c,key:r,file:i})}))}finally{a.current&&(a.current.value="")}}return t.jsxs(t.Fragment,{children:[t.jsx("input",{accept:"*/*",className:"hidden",multiple:!0,onChange:l,ref:a,type:"file"}),t.jsxs(Y,{disabled:n.isPending,onClick:()=>a.current?.click(),size:"sm",children:[t.jsx(ye,{className:"mr-2 size-4"}),n.isPending?"Uploading…":"Upload Files"]})]})}export{Ae as F,_e as O,Le as U}; +import{h as B,aL as G,aM as V,aN as W,aO as Q,aP as Z,aQ as J,c as U,j as t,L as X,r as K,aR as Y,aS as ee,B as te}from"./index.js";import{E as se}from"./error-banner.js";import{a as ae,b as le,c as oe,e as re,d as ne,h as ie,f as ce,g as de}from"./alert-dialog.js";import{g as me,b as fe,c as ue}from"./s3.js";import{D as he}from"./download.js";import{T as pe}from"./trash-2.js";const xe=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],ge=B("file",xe);const be=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],je=B("folder",be);const ye=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],ke=B("upload",ye),Ce=c=>(e,l)=>async o=>{const a=await e(o),{response:s}=a;if(G.isInstance(s)&&s.headers.expires){s.headers.expiresstring=s.headers.expires;try{V(s.headers.expires)}catch(i){l.logger?.warn(`AWS SDK Warning for ${l.clientName}::${l.commandName} response parsing (${s.headers.expires}): ${i}`),delete s.headers.expires}}return a},Ne={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},we=c=>({applyToStack:e=>{e.addRelativeTo(Ce(),Ne)}});class Se extends W.classBuilder().ep({...Q,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,l,o,a){return[Z(o,e.getEndpointParameterInstructions()),me(o,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1"]}),fe(o),we()]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").sc(J).build(){}function Re(c){const e=U.c(9),{folderName:l,fullPrefix:o,bucketName:a}=c;let s;e[0]!==a||e[1]!==o?(s={bucket:a,_splat:o},e[0]=a,e[1]=o,e[2]=s):s=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(je,{className:"size-5 text-muted-foreground"}),e[3]=i):i=e[3];let n;e[4]!==l?(n=t.jsx("span",{className:"font-medium",children:l}),e[4]=l,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==n?(r=t.jsxs(X,{className:"flex items-center gap-3 rounded-lg border bg-card p-4 transition-colors hover:bg-accent",params:s,to:"/s3/ls/$bucket/$",children:[i,n]}),e[6]=s,e[7]=n,e[8]=r):r=e[8],r}function Oe(c){const e=U.c(51),{object:l,bucketName:o,displayName:a,fullKey:s}=c,[i,n]=K.useState(!1),r=ue();let d;e[0]!==o||e[1]!==a||e[2]!==s?(d=async function(){try{const I=new Se({Bucket:o,Key:s}),F=await ee().send(I);if(F.Body){const q=await F.Body.transformToByteArray(),P=URL.createObjectURL(new Blob([q])),w=document.createElement("a");w.href=P,w.download=a,document.body.appendChild(w),w.click(),document.body.removeChild(w),URL.revokeObjectURL(P)}}catch{throw new Error("Failed to download object")}},e[0]=o,e[1]=a,e[2]=s,e[3]=d):d=e[3];const O=d;let S;e[4]!==o||e[5]!==r||e[6]!==s?(S=async function(){await r.mutateAsync({bucket:o,key:s}),n(!1)},e[4]=o,e[5]=r,e[6]=s,e[7]=S):S=e[7];const E=S,T=l.Key;let m;e[8]!==r.error?(m=r.error&&t.jsx(se,{error:r.error,msg:"Failed to delete object"}),e[8]=r.error,e[9]=m):m=e[9];let v;e[10]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(ge,{className:"size-5 text-muted-foreground"}),e[10]=v):v=e[10];let f;e[11]!==a?(f=t.jsx("h3",{className:"font-medium",children:a}),e[11]=a,e[12]=f):f=e[12];let u;e[13]!==l.LastModified?(u=l.LastModified&&t.jsxs("p",{className:"text-muted-foreground text-sm",children:["Last Modified: ",l.LastModified.toLocaleString()]}),e[13]=l.LastModified,e[14]=u):u=e[14];let h;e[15]!==f||e[16]!==u?(h=t.jsxs("div",{className:"flex items-center gap-3",children:[v,t.jsxs("div",{children:[f,u]})]}),e[15]=f,e[16]=u,e[17]=h):h=e[17];const $=l.Size||0;let p;e[18]!==$?(p=Y($),e[18]=$,e[19]=p):p=e[19];let x;e[20]!==p?(x=t.jsx("div",{className:"text-muted-foreground text-sm",children:p}),e[20]=p,e[21]=x):x=e[21];let D;e[22]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(he,{className:"size-4"}),e[22]=D):D=e[22];let g;e[23]!==O?(g=t.jsx("button",{className:"rounded-md p-2 transition-colors hover:bg-accent",onClick:O,type:"button",children:D}),e[23]=O,e[24]=g):g=e[24];let M;e[25]===Symbol.for("react.memo_cache_sentinel")?(M=()=>n(!0),e[25]=M):M=e[25];let _;e[26]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("button",{className:"rounded-md p-2 text-destructive transition-colors hover:bg-accent",onClick:M,type:"button",children:t.jsx(pe,{className:"size-4"})}),e[26]=_):_=e[26];let b;e[27]!==x||e[28]!==g?(b=t.jsxs("div",{className:"flex items-center gap-3",children:[x,g,_]}),e[27]=x,e[28]=g,e[29]=b):b=e[29];let A;e[30]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ae,{children:"Delete Object"}),e[30]=A):A=e[30];let j;e[31]!==a?(j=t.jsxs(le,{children:[A,t.jsxs(oe,{children:["Are you sure you want to delete ",t.jsx("strong",{children:a}),"? This action cannot be undone."]})]}),e[31]=a,e[32]=j):j=e[32];let L;e[33]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(re,{children:"Cancel"}),e[33]=L):L=e[33];const z=r.isPending?"Deleting…":"Delete";let y;e[34]!==E||e[35]!==z?(y=t.jsxs(ne,{children:[L,t.jsx(ie,{className:"bg-destructive hover:bg-destructive/90",onClick:E,children:z})]}),e[34]=E,e[35]=z,e[36]=y):y=e[36];let k;e[37]!==j||e[38]!==y?(k=t.jsxs(ce,{children:[j,y]}),e[37]=j,e[38]=y,e[39]=k):k=e[39];let C;e[40]!==i||e[41]!==k?(C=t.jsx(de,{onOpenChange:n,open:i,children:k}),e[40]=i,e[41]=k,e[42]=C):C=e[42];let N;e[43]!==b||e[44]!==C||e[45]!==h?(N=t.jsxs("div",{className:"flex items-center justify-between rounded-lg border bg-card p-4",children:[h,b,C]}),e[43]=b,e[44]=C,e[45]=h,e[46]=N):N=e[46];let R;return e[47]!==l.Key||e[48]!==N||e[49]!==m?(R=t.jsxs("div",{children:[m,N]},T),e[47]=l.Key,e[48]=N,e[49]=m,e[50]=R):R=e[50],R}function Ee({bucket:c,prefix:e="",isPending:l,onUpload:o}){const a=K.useRef(null);async function s(i){const n=i.target.files;if(!(!n||n.length===0))try{await Promise.all(Array.from(n).map(r=>{const d=`${e}${r.name}`;return o({bucket:c,key:d,file:r})}))}finally{a.current&&(a.current.value="")}}return t.jsxs(t.Fragment,{children:[t.jsx("input",{accept:"*/*","aria-label":"Choose files to upload",className:"hidden",multiple:!0,onChange:s,ref:a,type:"file"}),t.jsxs(te,{disabled:l,onClick:()=>a.current?.click(),size:"sm",children:[t.jsx(ke,{className:"mr-2 size-4"}),l?"Uploading…":"Upload Files"]})]})}export{Re as F,Oe as O,Ee as U}; diff --git a/hive/services/hiveui/frontend/dist/assets/useMutation.js b/hive/services/hiveui/frontend/dist/assets/useMutation.js deleted file mode 100644 index ada9d1172..000000000 --- a/hive/services/hiveui/frontend/dist/assets/useMutation.js +++ /dev/null @@ -1 +0,0 @@ -import{c4 as l,c5 as d,c6 as a,c7 as p,c8 as h,bp as b,r as o,c9 as m,ca as v}from"./index.js";var y=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),d(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&a(s.mutationKey)!==a(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??p();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,r=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#e.onSuccess?.(t.data,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(t.data,null,s,r,e)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#e.onError?.(t.error,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(void 0,t.error,s,r,e)}catch(i){Promise.reject(i)}}}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const r=b(),[e]=o.useState(()=>new y(r,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const i=o.useSyncExternalStore(o.useCallback(n=>e.subscribe(h.batchCalls(n)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((n,c)=>{e.mutate(n,c).catch(m)},[e]);if(i.error&&v(e.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:u,mutateAsync:i.mutate}}export{O as u}; diff --git a/hive/services/hiveui/frontend/dist/assets/useSuspenseQuery.js b/hive/services/hiveui/frontend/dist/assets/useSuspenseQuery.js index 51573626b..3ef90ce95 100644 --- a/hive/services/hiveui/frontend/dist/assets/useSuspenseQuery.js +++ b/hive/services/hiveui/frontend/dist/assets/useSuspenseQuery.js @@ -1 +1 @@ -import{c4 as G,cd as N,ce as l,c5 as Q,cf as g,c9 as M,cg as _,ch as B,ci as J,cj as C,ck as X,cl as Y,cm as j,c8 as z,r as d,ca as V,bp as Z}from"./index.js";var $=class extends G{constructor(t,e){super(),this.options=e,this.#s=t,this.#i=null,this.#r=N(),this.bindMethods(),this.setOptions(e)}#s;#t=void 0;#p=void 0;#e=void 0;#n;#u;#r;#i;#b;#l;#d;#o;#h;#a;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),A(this.#t,this.options)?this.#c():this.updateResult(),this.#g())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return x(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return x(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#y(),this.#S(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,s=this.#t;if(this.options=this.#s.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof l(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#O(),this.#t.setOptions(this.options),e._defaulted&&!Q(this.options,e)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&H(this.#t,s,this.options,e)&&this.#c(),this.updateResult(),r&&(this.#t!==s||l(this.options.enabled,this.#t)!==l(e.enabled,this.#t)||g(this.options.staleTime,this.#t)!==g(e.staleTime,this.#t))&&this.#v();const i=this.#R();r&&(this.#t!==s||l(this.options.enabled,this.#t)!==l(e.enabled,this.#t)||i!==this.#a)&&this.#m(i)}getOptimisticResult(t){const e=this.#s.getQueryCache().build(this.#s,t),s=this.createResult(e,t);return tt(this,s)&&(this.#e=s,this.#u=this.options,this.#n=this.#t.state),s}getCurrentResult(){return this.#e}trackResult(t,e){return new Proxy(t,{get:(s,r)=>(this.trackProp(r),e?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#r.status==="pending"&&this.#r.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,r))})}trackProp(t){this.#f.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#s.defaultQueryOptions(t),s=this.#s.getQueryCache().build(this.#s,e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){return this.#c({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#e))}#c(t){this.#O();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(M)),e}#v(){this.#y();const t=g(this.options.staleTime,this.#t);if(_||this.#e.isStale||!B(t))return;const s=J(this.#e.dataUpdatedAt,t)+1;this.#o=C.setTimeout(()=>{this.#e.isStale||this.updateResult()},s)}#R(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#m(t){this.#S(),this.#a=t,!(_||l(this.options.enabled,this.#t)===!1||!B(this.#a)||this.#a===0)&&(this.#h=C.setInterval(()=>{(this.options.refetchIntervalInBackground||X.isFocused())&&this.#c()},this.#a))}#g(){this.#v(),this.#m(this.#R())}#y(){this.#o&&(C.clearTimeout(this.#o),this.#o=void 0)}#S(){this.#h&&(C.clearInterval(this.#h),this.#h=void 0)}createResult(t,e){const s=this.#t,r=this.options,i=this.#e,u=this.#n,n=this.#u,v=t!==s?t.state:this.#p,{state:h}=t;let a={...h},R=!1,o;if(e._optimisticResults){const c=this.hasListeners(),m=!c&&A(t,e),S=c&&H(t,s,e,r);(m||S)&&(a={...a,...Y(h.data,t.options)}),e._optimisticResults==="isRestoring"&&(a.fetchStatus="idle")}let{error:y,errorUpdatedAt:U,status:b}=a;o=a.data;let D=!1;if(e.placeholderData!==void 0&&o===void 0&&b==="pending"){let c;i?.isPlaceholderData&&e.placeholderData===n?.placeholderData?(c=i.data,D=!0):c=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,c!==void 0&&(b="success",o=j(i?.data,c,e),R=!0)}if(e.select&&o!==void 0&&!D)if(i&&o===u?.data&&e.select===this.#b)o=this.#l;else try{this.#b=e.select,o=e.select(o),o=j(i?.data,o,e),this.#l=o,this.#i=null}catch(c){this.#i=c}this.#i&&(y=this.#i,o=this.#l,U=Date.now(),b="error");const I=a.fetchStatus==="fetching",T=b==="pending",w=b==="error",F=T&&I,k=o!==void 0,p={status:b,fetchStatus:a.fetchStatus,isPending:T,isSuccess:b==="success",isError:w,isInitialLoading:F,isLoading:F,data:o,dataUpdatedAt:a.dataUpdatedAt,error:y,errorUpdatedAt:U,failureCount:a.fetchFailureCount,failureReason:a.fetchFailureReason,errorUpdateCount:a.errorUpdateCount,isFetched:a.dataUpdateCount>0||a.errorUpdateCount>0,isFetchedAfterMount:a.dataUpdateCount>v.dataUpdateCount||a.errorUpdateCount>v.errorUpdateCount,isFetching:I,isRefetching:I&&!T,isLoadingError:w&&!k,isPaused:a.fetchStatus==="paused",isPlaceholderData:R,isRefetchError:w&&k,isStale:P(t,e),refetch:this.refetch,promise:this.#r,isEnabled:l(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const c=p.data!==void 0,m=p.status==="error"&&!c,S=E=>{m?E.reject(p.error):c&&E.resolve(p.data)},L=()=>{const E=this.#r=p.promise=N();S(E)},O=this.#r;switch(O.status){case"pending":t.queryHash===s.queryHash&&S(O);break;case"fulfilled":(m||p.data!==O.value)&&L();break;case"rejected":(!m||p.error!==O.reason)&&L();break}}return p}updateResult(){const t=this.#e,e=this.createResult(this.#t,this.options);if(this.#n=this.#t.state,this.#u=this.options,this.#n.data!==void 0&&(this.#d=this.#t),Q(e,t))return;this.#e=e;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#f.size)return!0;const u=new Set(i??this.#f);return this.options.throwOnError&&u.add("error"),Object.keys(this.#e).some(n=>{const f=n;return this.#e[f]!==t[f]&&u.has(f)})};this.#E({listeners:s()})}#O(){const t=this.#s.getQueryCache().build(this.#s,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#p=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#g()}#E(t){z.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#e)}),this.#s.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function q(t,e){return l(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function A(t,e){return q(t,e)||t.state.data!==void 0&&x(t,e,e.refetchOnMount)}function x(t,e,s){if(l(e.enabled,t)!==!1&&g(e.staleTime,t)!=="static"){const r=typeof s=="function"?s(t):s;return r==="always"||r!==!1&&P(t,e)}return!1}function H(t,e,s,r){return(t!==e||l(r.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&P(t,s)}function P(t,e){return l(e.enabled,t)!==!1&&t.isStaleByTime(g(e.staleTime,t))}function tt(t,e){return!Q(t.getCurrentResult(),e)}var K=d.createContext(!1),et=()=>d.useContext(K);K.Provider;function st(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var rt=d.createContext(st()),it=()=>d.useContext(rt),at=(t,e,s)=>{const r=s?.state.error&&typeof t.throwOnError=="function"?V(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},nt=t=>{d.useEffect(()=>{t.clearReset()},[t])},ot=({result:t,errorResetBoundary:e,throwOnError:s,query:r,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(i&&t.data===void 0||V(s,[t.error,r])),ht=(t,e)=>e.state.data===void 0,ct=t=>{if(t.suspense){const s=i=>i==="static"?i:Math.max(i??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...i)=>s(r(...i)):s(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},ut=(t,e)=>t.isLoading&&t.isFetching&&!e,lt=(t,e)=>t?.suspense&&e.isPending,W=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function dt(t,e,s){const r=et(),i=it(),u=Z(),n=u.defaultQueryOptions(t);u.getDefaultOptions().queries?._experimental_beforeQuery?.(n);const f=u.getQueryCache().get(n.queryHash);n._optimisticResults=r?"isRestoring":"optimistic",ct(n),at(n,i,f),nt(i);const v=!u.getQueryCache().get(n.queryHash),[h]=d.useState(()=>new e(u,n)),a=h.getOptimisticResult(n),R=!r&&t.subscribed!==!1;if(d.useSyncExternalStore(d.useCallback(o=>{const y=R?h.subscribe(z.batchCalls(o)):M;return h.updateResult(),y},[h,R]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),d.useEffect(()=>{h.setOptions(n)},[n,h]),lt(n,a))throw W(n,h,i);if(ot({result:a,errorResetBoundary:i,throwOnError:n.throwOnError,query:f,suspense:n.suspense}))throw a.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(n,a),n.experimental_prefetchInRender&&!_&&ut(a,r)&&(v?W(n,h,i):f?.promise)?.catch(M).finally(()=>{h.updateResult()}),n.notifyOnChangeProps?a:h.trackResult(a)}function bt(t,e){return dt({...t,enabled:!0,suspense:!0,throwOnError:ht,placeholderData:void 0},$)}export{bt as u}; +import{c3 as G,cc as N,cd as l,c4 as Q,ce as g,c8 as M,cf as _,cg as B,ch as J,ci as C,cj as X,ck as Y,cl as j,c7 as z,r as d,c9 as V,bo as Z}from"./index.js";var $=class extends G{constructor(t,e){super(),this.options=e,this.#s=t,this.#i=null,this.#r=N(),this.bindMethods(),this.setOptions(e)}#s;#t=void 0;#p=void 0;#e=void 0;#n;#u;#r;#i;#b;#l;#d;#o;#h;#a;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),A(this.#t,this.options)?this.#c():this.updateResult(),this.#g())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return x(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return x(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#y(),this.#S(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,s=this.#t;if(this.options=this.#s.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof l(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#O(),this.#t.setOptions(this.options),e._defaulted&&!Q(this.options,e)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&H(this.#t,s,this.options,e)&&this.#c(),this.updateResult(),r&&(this.#t!==s||l(this.options.enabled,this.#t)!==l(e.enabled,this.#t)||g(this.options.staleTime,this.#t)!==g(e.staleTime,this.#t))&&this.#v();const i=this.#R();r&&(this.#t!==s||l(this.options.enabled,this.#t)!==l(e.enabled,this.#t)||i!==this.#a)&&this.#m(i)}getOptimisticResult(t){const e=this.#s.getQueryCache().build(this.#s,t),s=this.createResult(e,t);return tt(this,s)&&(this.#e=s,this.#u=this.options,this.#n=this.#t.state),s}getCurrentResult(){return this.#e}trackResult(t,e){return new Proxy(t,{get:(s,r)=>(this.trackProp(r),e?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#r.status==="pending"&&this.#r.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,r))})}trackProp(t){this.#f.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#s.defaultQueryOptions(t),s=this.#s.getQueryCache().build(this.#s,e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){return this.#c({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#e))}#c(t){this.#O();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(M)),e}#v(){this.#y();const t=g(this.options.staleTime,this.#t);if(_||this.#e.isStale||!B(t))return;const s=J(this.#e.dataUpdatedAt,t)+1;this.#o=C.setTimeout(()=>{this.#e.isStale||this.updateResult()},s)}#R(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#m(t){this.#S(),this.#a=t,!(_||l(this.options.enabled,this.#t)===!1||!B(this.#a)||this.#a===0)&&(this.#h=C.setInterval(()=>{(this.options.refetchIntervalInBackground||X.isFocused())&&this.#c()},this.#a))}#g(){this.#v(),this.#m(this.#R())}#y(){this.#o&&(C.clearTimeout(this.#o),this.#o=void 0)}#S(){this.#h&&(C.clearInterval(this.#h),this.#h=void 0)}createResult(t,e){const s=this.#t,r=this.options,i=this.#e,u=this.#n,n=this.#u,v=t!==s?t.state:this.#p,{state:h}=t;let a={...h},R=!1,o;if(e._optimisticResults){const c=this.hasListeners(),m=!c&&A(t,e),S=c&&H(t,s,e,r);(m||S)&&(a={...a,...Y(h.data,t.options)}),e._optimisticResults==="isRestoring"&&(a.fetchStatus="idle")}let{error:y,errorUpdatedAt:U,status:b}=a;o=a.data;let D=!1;if(e.placeholderData!==void 0&&o===void 0&&b==="pending"){let c;i?.isPlaceholderData&&e.placeholderData===n?.placeholderData?(c=i.data,D=!0):c=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,c!==void 0&&(b="success",o=j(i?.data,c,e),R=!0)}if(e.select&&o!==void 0&&!D)if(i&&o===u?.data&&e.select===this.#b)o=this.#l;else try{this.#b=e.select,o=e.select(o),o=j(i?.data,o,e),this.#l=o,this.#i=null}catch(c){this.#i=c}this.#i&&(y=this.#i,o=this.#l,U=Date.now(),b="error");const I=a.fetchStatus==="fetching",T=b==="pending",w=b==="error",F=T&&I,k=o!==void 0,p={status:b,fetchStatus:a.fetchStatus,isPending:T,isSuccess:b==="success",isError:w,isInitialLoading:F,isLoading:F,data:o,dataUpdatedAt:a.dataUpdatedAt,error:y,errorUpdatedAt:U,failureCount:a.fetchFailureCount,failureReason:a.fetchFailureReason,errorUpdateCount:a.errorUpdateCount,isFetched:a.dataUpdateCount>0||a.errorUpdateCount>0,isFetchedAfterMount:a.dataUpdateCount>v.dataUpdateCount||a.errorUpdateCount>v.errorUpdateCount,isFetching:I,isRefetching:I&&!T,isLoadingError:w&&!k,isPaused:a.fetchStatus==="paused",isPlaceholderData:R,isRefetchError:w&&k,isStale:P(t,e),refetch:this.refetch,promise:this.#r,isEnabled:l(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const c=p.data!==void 0,m=p.status==="error"&&!c,S=E=>{m?E.reject(p.error):c&&E.resolve(p.data)},L=()=>{const E=this.#r=p.promise=N();S(E)},O=this.#r;switch(O.status){case"pending":t.queryHash===s.queryHash&&S(O);break;case"fulfilled":(m||p.data!==O.value)&&L();break;case"rejected":(!m||p.error!==O.reason)&&L();break}}return p}updateResult(){const t=this.#e,e=this.createResult(this.#t,this.options);if(this.#n=this.#t.state,this.#u=this.options,this.#n.data!==void 0&&(this.#d=this.#t),Q(e,t))return;this.#e=e;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#f.size)return!0;const u=new Set(i??this.#f);return this.options.throwOnError&&u.add("error"),Object.keys(this.#e).some(n=>{const f=n;return this.#e[f]!==t[f]&&u.has(f)})};this.#E({listeners:s()})}#O(){const t=this.#s.getQueryCache().build(this.#s,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#p=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#g()}#E(t){z.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#e)}),this.#s.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function q(t,e){return l(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function A(t,e){return q(t,e)||t.state.data!==void 0&&x(t,e,e.refetchOnMount)}function x(t,e,s){if(l(e.enabled,t)!==!1&&g(e.staleTime,t)!=="static"){const r=typeof s=="function"?s(t):s;return r==="always"||r!==!1&&P(t,e)}return!1}function H(t,e,s,r){return(t!==e||l(r.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&P(t,s)}function P(t,e){return l(e.enabled,t)!==!1&&t.isStaleByTime(g(e.staleTime,t))}function tt(t,e){return!Q(t.getCurrentResult(),e)}var K=d.createContext(!1),et=()=>d.useContext(K);K.Provider;function st(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var rt=d.createContext(st()),it=()=>d.useContext(rt),at=(t,e,s)=>{const r=s?.state.error&&typeof t.throwOnError=="function"?V(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},nt=t=>{d.useEffect(()=>{t.clearReset()},[t])},ot=({result:t,errorResetBoundary:e,throwOnError:s,query:r,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(i&&t.data===void 0||V(s,[t.error,r])),ht=(t,e)=>e.state.data===void 0,ct=t=>{if(t.suspense){const s=i=>i==="static"?i:Math.max(i??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...i)=>s(r(...i)):s(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},ut=(t,e)=>t.isLoading&&t.isFetching&&!e,lt=(t,e)=>t?.suspense&&e.isPending,W=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function dt(t,e,s){const r=et(),i=it(),u=Z(),n=u.defaultQueryOptions(t);u.getDefaultOptions().queries?._experimental_beforeQuery?.(n);const f=u.getQueryCache().get(n.queryHash);n._optimisticResults=r?"isRestoring":"optimistic",ct(n),at(n,i,f),nt(i);const v=!u.getQueryCache().get(n.queryHash),[h]=d.useState(()=>new e(u,n)),a=h.getOptimisticResult(n),R=!r&&t.subscribed!==!1;if(d.useSyncExternalStore(d.useCallback(o=>{const y=R?h.subscribe(z.batchCalls(o)):M;return h.updateResult(),y},[h,R]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),d.useEffect(()=>{h.setOptions(n)},[n,h]),lt(n,a))throw W(n,h,i);if(ot({result:a,errorResetBoundary:i,throwOnError:n.throwOnError,query:f,suspense:n.suspense}))throw a.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(n,a),n.experimental_prefetchInRender&&!_&&ut(a,r)&&(v?W(n,h,i):f?.promise)?.catch(M).finally(()=>{h.updateResult()}),n.notifyOnChangeProps?a:h.trackResult(a)}function bt(t,e){return dt({...t,enabled:!0,suspense:!0,throwOnError:ht,placeholderData:void 0},$)}export{bt as u}; diff --git a/hive/services/hiveui/frontend/src/main.tsx b/hive/services/hiveui/frontend/src/main.tsx index fbc1ee431..ef260b4eb 100644 --- a/hive/services/hiveui/frontend/src/main.tsx +++ b/hive/services/hiveui/frontend/src/main.tsx @@ -8,7 +8,13 @@ import { SidebarProvider } from "@/components/ui/sidebar" import { routeTree } from "./routeTree.gen" import "./styles.css" -const queryClient = new QueryClient() +const queryClient = new QueryClient({ + defaultOptions: { + queries: { + staleTime: 5000, + }, + }, +}) const router = createRouter({ routeTree, diff --git a/hive/services/hiveui/frontend/src/mutations/ec2.ts b/hive/services/hiveui/frontend/src/mutations/ec2.ts index 3eaf563fa..8b2b64973 100644 --- a/hive/services/hiveui/frontend/src/mutations/ec2.ts +++ b/hive/services/hiveui/frontend/src/mutations/ec2.ts @@ -33,10 +33,14 @@ export function useStartInstance() { const queryClient = useQueryClient() return useMutation({ mutationFn: async (instanceId: string) => { - const command = new StartInstancesCommand({ - InstanceIds: [instanceId], - }) - return await getEc2Client().send(command) + try { + const command = new StartInstancesCommand({ + InstanceIds: [instanceId], + }) + return await getEc2Client().send(command) + } catch { + throw new Error("Failed to start instance") + } }, onSuccess: () => { queryClient.invalidateQueries({ queryKey: ["ec2", "instances"] }) @@ -48,10 +52,14 @@ export function useStopInstance() { const queryClient = useQueryClient() return useMutation({ mutationFn: async (instanceId: string) => { - const command = new StopInstancesCommand({ - InstanceIds: [instanceId], - }) - return await getEc2Client().send(command) + try { + const command = new StopInstancesCommand({ + InstanceIds: [instanceId], + }) + return await getEc2Client().send(command) + } catch { + throw new Error("Failed to stop instance") + } }, onSuccess: () => { queryClient.invalidateQueries({ queryKey: ["ec2", "instances"] }) @@ -63,10 +71,14 @@ export function useTerminateInstance() { const queryClient = useQueryClient() return useMutation({ mutationFn: async (instanceId: string) => { - const command = new TerminateInstancesCommand({ - InstanceIds: [instanceId], - }) - return await getEc2Client().send(command) + try { + const command = new TerminateInstancesCommand({ + InstanceIds: [instanceId], + }) + return await getEc2Client().send(command) + } catch { + throw new Error("Failed to terminate instance") + } }, onSuccess: () => { queryClient.invalidateQueries({ queryKey: ["ec2", "instances"] }) @@ -78,10 +90,14 @@ export function useRebootInstance() { const queryClient = useQueryClient() return useMutation({ mutationFn: async (instanceId: string) => { - const command = new RebootInstancesCommand({ - InstanceIds: [instanceId], - }) - return await getEc2Client().send(command) + try { + const command = new RebootInstancesCommand({ + InstanceIds: [instanceId], + }) + return await getEc2Client().send(command) + } catch { + throw new Error("Failed to reboot instance") + } }, onSuccess: () => { queryClient.invalidateQueries({ queryKey: ["ec2", "instances"] }) @@ -93,16 +109,20 @@ export function useCreateInstance() { const queryClient = useQueryClient() return useMutation({ mutationFn: async (params: CreateInstanceParams) => { - const command = new RunInstancesCommand({ - ImageId: params.imageId, - InstanceType: params.instanceType as _InstanceType, - KeyName: params.keyName, - MinCount: params.count, - MaxCount: params.count, - SecurityGroupIds: params.securityGroupIds, - SubnetId: params.subnetId, - }) - return await getEc2Client().send(command) + try { + const command = new RunInstancesCommand({ + ImageId: params.imageId, + InstanceType: params.instanceType as _InstanceType, + KeyName: params.keyName, + MinCount: params.count, + MaxCount: params.count, + SecurityGroupIds: params.securityGroupIds, + SubnetId: params.subnetId, + }) + return await getEc2Client().send(command) + } catch { + throw new Error("Failed to create instance") + } }, onSuccess: async (data) => { await queryClient.cancelQueries(ec2InstancesQueryOptions) @@ -135,11 +155,15 @@ export function useCreateKeyPair() { const queryClient = useQueryClient() return useMutation({ mutationFn: async (params: CreateKeyPairData) => { - const command = new CreateKeyPairCommand({ - KeyName: params.keyName, - KeyType: "rsa", - }) - return await getEc2Client().send(command) + try { + const command = new CreateKeyPairCommand({ + KeyName: params.keyName, + KeyType: "rsa", + }) + return await getEc2Client().send(command) + } catch { + throw new Error("Failed to create key pair") + } }, onSuccess: () => { queryClient.invalidateQueries(ec2KeyPairsQueryOptions) @@ -151,15 +175,19 @@ export function useImportKeyPair() { const queryClient = useQueryClient() return useMutation({ mutationFn: async (params: ImportKeyPairData) => { - // remove optional comment from ssh key as it breaks the import - const keyParts = params.publicKeyMaterial.trim().split(WHITESPACE_REGEX) - const cleanedKey = keyParts.slice(0, 2).join(" ") + try { + // remove optional comment from ssh key as it breaks the import + const keyParts = params.publicKeyMaterial.trim().split(WHITESPACE_REGEX) + const cleanedKey = keyParts.slice(0, 2).join(" ") - const command = new ImportKeyPairCommand({ - KeyName: params.keyName, - PublicKeyMaterial: new TextEncoder().encode(cleanedKey), - }) - return await getEc2Client().send(command) + const command = new ImportKeyPairCommand({ + KeyName: params.keyName, + PublicKeyMaterial: new TextEncoder().encode(cleanedKey), + }) + return await getEc2Client().send(command) + } catch { + throw new Error("Failed to import key pair") + } }, onSuccess: () => { queryClient.invalidateQueries(ec2KeyPairsQueryOptions) @@ -171,10 +199,14 @@ export function useDeleteKeyPair() { const queryClient = useQueryClient() return useMutation({ mutationFn: async (keyPairId: string) => { - const command = new DeleteKeyPairCommand({ - KeyPairId: keyPairId, - }) - return await getEc2Client().send(command) + try { + const command = new DeleteKeyPairCommand({ + KeyPairId: keyPairId, + }) + return await getEc2Client().send(command) + } catch { + throw new Error("Failed to delete key pair") + } }, onSuccess: () => { queryClient.invalidateQueries(ec2KeyPairsQueryOptions) @@ -186,12 +218,16 @@ export function useCreateVolume() { const queryClient = useQueryClient() return useMutation({ mutationFn: async (params: CreateVolumeFormData) => { - const command = new CreateVolumeCommand({ - Size: params.size, - AvailabilityZone: params.availabilityZone, - VolumeType: "gp3", - }) - return await getEc2Client().send(command) + try { + const command = new CreateVolumeCommand({ + Size: params.size, + AvailabilityZone: params.availabilityZone, + VolumeType: "gp3", + }) + return await getEc2Client().send(command) + } catch { + throw new Error("Failed to create volume") + } }, onSuccess: () => { queryClient.invalidateQueries({ queryKey: ["ec2", "volumes"] }) @@ -203,11 +239,15 @@ export function useModifyVolume() { const queryClient = useQueryClient() return useMutation({ mutationFn: async (params: ModifyVolumeParams) => { - const command = new ModifyVolumeCommand({ - VolumeId: params.volumeId, - Size: params.size, - }) - return await getEc2Client().send(command) + try { + const command = new ModifyVolumeCommand({ + VolumeId: params.volumeId, + Size: params.size, + }) + return await getEc2Client().send(command) + } catch { + throw new Error("Failed to modify volume") + } }, onSuccess: () => { queryClient.invalidateQueries({ queryKey: ["ec2", "volumes"] }) @@ -219,10 +259,14 @@ export function useDeleteVolume() { const queryClient = useQueryClient() return useMutation({ mutationFn: async (volumeId: string) => { - const command = new DeleteVolumeCommand({ - VolumeId: volumeId, - }) - return await getEc2Client().send(command) + try { + const command = new DeleteVolumeCommand({ + VolumeId: volumeId, + }) + return await getEc2Client().send(command) + } catch { + throw new Error("Failed to delete volume") + } }, onSuccess: () => { queryClient.invalidateQueries({ queryKey: ["ec2", "volumes"] }) diff --git a/hive/services/hiveui/frontend/src/mutations/s3.ts b/hive/services/hiveui/frontend/src/mutations/s3.ts index 65b4adacd..550f77526 100644 --- a/hive/services/hiveui/frontend/src/mutations/s3.ts +++ b/hive/services/hiveui/frontend/src/mutations/s3.ts @@ -16,17 +16,21 @@ export function useUploadObject() { return useMutation({ mutationFn: async ({ bucket, key, file }: UploadObjectParams) => { - const upload = new Upload({ - client: getS3Client(), - params: { - Bucket: bucket, - Key: key, - Body: file, - ContentType: file.type, - }, - }) + try { + const upload = new Upload({ + client: getS3Client(), + params: { + Bucket: bucket, + Key: key, + Body: file, + ContentType: file.type, + }, + }) - return await upload.done() + return await upload.done() + } catch { + throw new Error("Failed to upload object") + } }, onSuccess: (_, variables) => { queryClient.invalidateQueries({ @@ -41,11 +45,15 @@ export function useCreateBucket() { return useMutation({ mutationFn: async ({ bucketName }: CreateBucketFormData) => { - const command = new CreateBucketCommand({ - Bucket: bucketName, - }) + try { + const command = new CreateBucketCommand({ + Bucket: bucketName, + }) - return await getS3Client().send(command) + return await getS3Client().send(command) + } catch { + throw new Error("Failed to create bucket") + } }, onSuccess: () => { queryClient.invalidateQueries({ @@ -60,12 +68,16 @@ export function useDeleteObject() { return useMutation({ mutationFn: async ({ bucket, key }: { bucket: string; key: string }) => { - const command = new DeleteObjectCommand({ - Bucket: bucket, - Key: key, - }) + try { + const command = new DeleteObjectCommand({ + Bucket: bucket, + Key: key, + }) - return await getS3Client().send(command) + return await getS3Client().send(command) + } catch { + throw new Error("Failed to delete object") + } }, onSuccess: (_, variables) => { queryClient.invalidateQueries({ diff --git a/hive/services/hiveui/frontend/src/queries/ec2.ts b/hive/services/hiveui/frontend/src/queries/ec2.ts index 81280af38..5d67d6511 100644 --- a/hive/services/hiveui/frontend/src/queries/ec2.ts +++ b/hive/services/hiveui/frontend/src/queries/ec2.ts @@ -20,7 +20,6 @@ export const ec2InstancesQueryOptions = queryOptions({ throw new Error("Failed to fetch EC2 instances") } }, - staleTime: 5000, }) export const ec2InstanceQueryOptions = (instanceId: string) => @@ -36,7 +35,6 @@ export const ec2InstanceQueryOptions = (instanceId: string) => throw new Error("Failed to fetch EC2 instance") } }, - staleTime: 5000, }) export const ec2InstanceTypesQueryOptions = queryOptions({ @@ -56,7 +54,6 @@ export const ec2InstanceTypesQueryOptions = queryOptions({ throw new Error("Failed to fetch EC2 instance types") } }, - staleTime: 5000, }) export const ec2ImagesQueryOptions = queryOptions({ @@ -69,7 +66,6 @@ export const ec2ImagesQueryOptions = queryOptions({ throw new Error("Failed to fetch EC2 images") } }, - staleTime: 300_000, }) export const ec2ImageQueryOptions = (imageId: string | undefined) => @@ -88,7 +84,6 @@ export const ec2ImageQueryOptions = (imageId: string | undefined) => throw new Error("Failed to fetch EC2 image") } }, - staleTime: 300_000, }) export const ec2KeyPairsQueryOptions = queryOptions({ @@ -101,7 +96,6 @@ export const ec2KeyPairsQueryOptions = queryOptions({ throw new Error("Failed to fetch key pairs") } }, - staleTime: 300_000, }) export const ec2KeyPairQueryOptions = (keyPairId: string) => @@ -117,7 +111,6 @@ export const ec2KeyPairQueryOptions = (keyPairId: string) => throw new Error("Failed to fetch key pair") } }, - staleTime: 300_000, }) export const ec2RegionsQueryOptions = queryOptions({ @@ -143,7 +136,6 @@ export const ec2VolumesQueryOptions = queryOptions({ throw new Error("Failed to fetch volumes") } }, - staleTime: 5000, }) export const ec2VolumeQueryOptions = (volumeId: string) => @@ -159,5 +151,4 @@ export const ec2VolumeQueryOptions = (volumeId: string) => throw new Error("Failed to fetch volume") } }, - staleTime: 5000, }) diff --git a/hive/services/hiveui/frontend/src/queries/s3.ts b/hive/services/hiveui/frontend/src/queries/s3.ts index df39e13d9..34ec1e41f 100644 --- a/hive/services/hiveui/frontend/src/queries/s3.ts +++ b/hive/services/hiveui/frontend/src/queries/s3.ts @@ -13,7 +13,6 @@ export const s3BucketsQueryOptions = queryOptions({ throw new Error("Failed to fetch S3 buckets") } }, - staleTime: 5000, }) export const s3BucketObjectsQueryOptions = ( @@ -34,5 +33,4 @@ export const s3BucketObjectsQueryOptions = ( throw new Error("Failed to fetch S3 bucket objects") } }, - staleTime: 5000, }) diff --git a/hive/services/hiveui/frontend/src/routes/_auth/ec2/(key)/describe-key-pairs/$id.tsx b/hive/services/hiveui/frontend/src/routes/_auth/ec2/(key)/describe-key-pairs/$id.tsx index 417755f21..1bae78e6a 100644 --- a/hive/services/hiveui/frontend/src/routes/_auth/ec2/(key)/describe-key-pairs/$id.tsx +++ b/hive/services/hiveui/frontend/src/routes/_auth/ec2/(key)/describe-key-pairs/$id.tsx @@ -6,6 +6,7 @@ import { useState } from "react" import { BackLink } from "@/components/back-link" import { DetailCard } from "@/components/detail-card" import { DetailRow } from "@/components/detail-row" +import { ErrorBanner } from "@/components/error-banner" import { PageHeading } from "@/components/page-heading" import { AlertDialog, @@ -68,6 +69,13 @@ function KeyPairDetail() { <> Back to key pairs + {deleteMutation.error && ( + + )} +
Back to volumes + {deleteMutation.error && ( + + )} +

Instance Actions

+ {startMutation.error && ( + + )} + {stopMutation.error && ( + + )} + {rebootMutation.error && ( + + )} + {terminateMutation.error && ( + + )}
{state === "stopped" && ( +
- - -
- - - - Delete Object - - Are you sure you want to delete {displayName}? - This action cannot be undone. - - - - Cancel - - {deleteMutation.isPending ? "Deleting…" : "Delete"} - - - - + + + + Delete Object + + Are you sure you want to delete {displayName}? + This action cannot be undone. + + + + Cancel + + {deleteMutation.isPending ? "Deleting…" : "Delete"} + + + + +
) } diff --git a/hive/services/hiveui/frontend/src/routes/_auth/s3/-components/upload-button.tsx b/hive/services/hiveui/frontend/src/routes/_auth/s3/-components/upload-button.tsx index c17952cde..9a9f89af9 100644 --- a/hive/services/hiveui/frontend/src/routes/_auth/s3/-components/upload-button.tsx +++ b/hive/services/hiveui/frontend/src/routes/_auth/s3/-components/upload-button.tsx @@ -2,16 +2,25 @@ import { Upload } from "lucide-react" import { useRef } from "react" import { Button } from "@/components/ui/button" -import { useUploadObject } from "@/mutations/s3" interface UploadButtonProps { bucket: string prefix?: string + isPending: boolean + onUpload: (params: { + bucket: string + key: string + file: File + }) => Promise } -export function UploadButton({ bucket, prefix = "" }: UploadButtonProps) { +export function UploadButton({ + bucket, + prefix = "", + isPending, + onUpload, +}: UploadButtonProps) { const fileInputRef = useRef(null) - const uploadMutation = useUploadObject() async function handleFileSelect(event: React.ChangeEvent) { const files = event.target.files @@ -23,11 +32,7 @@ export function UploadButton({ bucket, prefix = "" }: UploadButtonProps) { await Promise.all( Array.from(files).map((file) => { const key = `${prefix}${file.name}` - return uploadMutation.mutateAsync({ - bucket, - key, - file, - }) + return onUpload({ bucket, key, file }) }), ) } finally { @@ -50,12 +55,12 @@ export function UploadButton({ bucket, prefix = "" }: UploadButtonProps) { type="file" /> ) diff --git a/hive/services/hiveui/frontend/src/routes/_auth/s3/ls/$bucket/$.tsx b/hive/services/hiveui/frontend/src/routes/_auth/s3/ls/$bucket/$.tsx index d5a4bc569..ff9ab6ebf 100644 --- a/hive/services/hiveui/frontend/src/routes/_auth/s3/ls/$bucket/$.tsx +++ b/hive/services/hiveui/frontend/src/routes/_auth/s3/ls/$bucket/$.tsx @@ -3,12 +3,14 @@ import { useSuspenseQuery } from "@tanstack/react-query" import { createFileRoute, Link } from "@tanstack/react-router" import { BackLink } from "@/components/back-link" +import { ErrorBanner } from "@/components/error-banner" import { buildFullS3Key, ensureTrailingSlash, extractDisplayName, removeTrailingSlash, } from "@/lib/utils" +import { useUploadObject } from "@/mutations/s3" import { s3BucketObjectsQueryOptions } from "@/queries/s3" import { FolderListItem } from "@/routes/_auth/s3/-components/folder-list-item" import { ObjectListItem } from "@/routes/_auth/s3/-components/object-list-item" @@ -40,6 +42,7 @@ function BucketObjectsWithPrefix() { const prefix = ensureTrailingSlash(_splat || "") const { data } = useSuspenseQuery(s3BucketObjectsQueryOptions(bucket, prefix)) + const uploadMutation = useUploadObject() const objects = data.Contents || [] const commonPrefixes = data.CommonPrefixes || [] @@ -83,9 +86,20 @@ function BucketObjectsWithPrefix() { ))} - + + {uploadMutation.error && ( + + )} {commonPrefixes.length > 0 && (

Folders

diff --git a/hive/services/hiveui/frontend/src/routes/_auth/s3/ls/$bucket/index.tsx b/hive/services/hiveui/frontend/src/routes/_auth/s3/ls/$bucket/index.tsx index 2906d0c1e..299be3c02 100644 --- a/hive/services/hiveui/frontend/src/routes/_auth/s3/ls/$bucket/index.tsx +++ b/hive/services/hiveui/frontend/src/routes/_auth/s3/ls/$bucket/index.tsx @@ -3,8 +3,10 @@ import { useSuspenseQuery } from "@tanstack/react-query" import { createFileRoute } from "@tanstack/react-router" import { BackLink } from "@/components/back-link" +import { ErrorBanner } from "@/components/error-banner" import { PageHeading } from "@/components/page-heading" import { removeTrailingSlash } from "@/lib/utils" +import { useUploadObject } from "@/mutations/s3" import { s3BucketObjectsQueryOptions } from "@/queries/s3" import { FolderListItem } from "@/routes/_auth/s3/-components/folder-list-item" import { ObjectListItem } from "@/routes/_auth/s3/-components/object-list-item" @@ -29,6 +31,7 @@ export const Route = createFileRoute("/_auth/s3/ls/$bucket/")({ function BucketObjects() { const { bucket: bucketName } = Route.useParams() const { data } = useSuspenseQuery(s3BucketObjectsQueryOptions(bucketName)) + const uploadMutation = useUploadObject() const objects = data.Contents || [] const commonPrefixes = data.CommonPrefixes || [] @@ -37,9 +40,21 @@ function BucketObjects() { <> Back to buckets } + actions={ + + } title={bucketName} /> + {uploadMutation.error && ( + + )} {commonPrefixes.length > 0 && (

Folders