@sudobility/entity_pages 0.0.18 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1 +1,44 @@
1
- (function(a,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react/jsx-runtime"),require("react"),require("lucide-react"),require("@sudobility/entity-components"),require("@sudobility/entity_client")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","lucide-react","@sudobility/entity-components","@sudobility/entity_client"],e):(a=typeof globalThis<"u"?globalThis:a||self,e(a.EntityPages={},a.jsxRuntime,a.React,a.LucideReact,a.SudobilityEntityComponents,a.SudobilityEntityClient))})(this,(function(a,e,x,w,h,s){"use strict";function C({client:n,onSelectEntity:t}){const[y,i]=x.useState(!1),[d,c]=x.useState({displayName:"",description:""}),[b,g]=x.useState(null),{data:m=[],isLoading:r}=s.useEntities(n),l=s.useCreateEntity(n),f=m.filter(o=>o.entityType==="personal"),N=m.filter(o=>o.entityType==="organization"),S=async o=>{if(o.preventDefault(),g(null),!d.displayName.trim()){g("Display name is required");return}try{await l.mutateAsync({displayName:d.displayName.trim(),description:d.description.trim()||void 0}),i(!1),c({displayName:"",description:""})}catch(u){g(u.message||"Failed to create organization")}};return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Workspaces"}),e.jsx("p",{className:"text-muted-foreground",children:"Manage your personal and organization workspaces"})]}),e.jsxs("button",{type:"button",onClick:()=>i(!0),className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-primary text-primary-foreground font-medium hover:bg-primary/90 transition-colors",children:[e.jsx(w.Plus,{className:"h-4 w-4"}),e.jsx("span",{children:"New Organization"})]})]}),y&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:e.jsxs("div",{className:"w-full max-w-md rounded-lg bg-background p-6 shadow-lg",children:[e.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Create Organization"}),e.jsxs("form",{onSubmit:S,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-1",children:"Display Name"}),e.jsx("input",{type:"text",value:d.displayName,onChange:o=>c(u=>({...u,displayName:o.target.value})),placeholder:"My Organization",className:"w-full px-3 py-2 rounded-lg border bg-background focus:outline-none focus:ring-2 focus:ring-primary"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-1",children:"Description (optional)"}),e.jsx("textarea",{value:d.description,onChange:o=>c(u=>({...u,description:o.target.value})),placeholder:"What is this organization for?",rows:3,className:"w-full px-3 py-2 rounded-lg border bg-background focus:outline-none focus:ring-2 focus:ring-primary resize-none"})]}),b&&e.jsx("p",{className:"text-sm text-destructive",children:b}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>{i(!1),c({displayName:"",description:""}),g(null)},className:"px-4 py-2 rounded-lg border hover:bg-muted transition-colors",children:"Cancel"}),e.jsx("button",{type:"submit",disabled:l.isPending,className:"px-4 py-2 rounded-lg bg-primary text-primary-foreground font-medium hover:bg-primary/90 transition-colors disabled:opacity-50",children:l.isPending?"Creating...":"Create"})]})]})]})}),f.length>0&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Personal Workspace"}),e.jsx(h.EntityList,{entities:f,onSelect:t,isLoading:r})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Organizations"}),N.length===0&&!r?e.jsxs("div",{className:"text-center py-8 text-muted-foreground border border-dashed rounded-lg",children:[e.jsx("p",{children:"No organizations yet"}),e.jsx("button",{type:"button",onClick:()=>i(!0),className:"mt-2 text-primary hover:underline",children:"Create your first organization"})]}):e.jsx(h.EntityList,{entities:N,onSelect:t,isLoading:r})]})]})}function M({client:n,entity:t,currentUserId:y}){const i=t.userRole==="admin",{data:d=[],isLoading:c}=s.useEntityMembers(n,t.entitySlug),b=s.useUpdateMemberRole(n),g=s.useRemoveMember(n),{data:m=[],isLoading:r}=s.useEntityInvitations(n,i?t.entitySlug:null),l=s.useCreateInvitation(n),f=s.useCancelInvitation(n),N=async(p,v)=>{try{await b.mutateAsync({entitySlug:t.entitySlug,memberId:p,role:v})}catch(L){console.error("Failed to update role:",L)}},S=async p=>{if(confirm("Are you sure you want to remove this member?"))try{await g.mutateAsync({entitySlug:t.entitySlug,memberId:p})}catch(v){console.error("Failed to remove member:",v)}},o=async p=>{await l.mutateAsync({entitySlug:t.entitySlug,request:p})},u=async p=>{try{await f.mutateAsync({entitySlug:t.entitySlug,invitationId:p})}catch(v){console.error("Failed to cancel invitation:",v)}};return t.entityType==="personal"?e.jsxs("div",{className:"text-center py-12 text-muted-foreground",children:[e.jsx("p",{children:"Personal workspaces cannot have additional members."}),e.jsx("p",{className:"mt-2",children:"Create an organization to collaborate with others."})]}):e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Members"}),e.jsxs("p",{className:"text-muted-foreground",children:["Manage members and invitations for ",t.displayName]})]}),i&&e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Invite Members"}),e.jsx(h.InvitationForm,{onSubmit:o,isSubmitting:l.isPending})]}),i&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Pending Invitations"}),e.jsx(h.InvitationList,{invitations:m,mode:"admin",onCancel:u,isLoading:r,emptyMessage:"No pending invitations"})]}),e.jsxs("div",{children:[e.jsxs("h2",{className:"text-lg font-semibold mb-3",children:["Current Members (",d.length,")"]}),e.jsx(h.MemberList,{members:d,currentUserId:y,canManage:i,onRoleChange:N,onRemove:S,isLoading:c})]})]})}function I({client:n,onInvitationAccepted:t}){const{data:y=[],isLoading:i}=s.useMyInvitations(n),d=s.useAcceptInvitation(n),c=s.useDeclineInvitation(n),b=async r=>{try{await d.mutateAsync(r),t?.()}catch(l){console.error("Failed to accept invitation:",l)}},g=async r=>{try{await c.mutateAsync(r)}catch(l){console.error("Failed to decline invitation:",l)}},m=y.filter(r=>r.status==="pending").length;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Invitations"}),e.jsx("p",{className:"text-muted-foreground",children:m>0?`You have ${m} pending invitation${m>1?"s":""}`:"No pending invitations"})]}),e.jsx(h.InvitationList,{invitations:y,mode:"user",onAccept:b,onDecline:g,isLoading:i,emptyMessage:"You don't have any pending invitations"})]})}a.EntityListPage=C,a.InvitationsPage=I,a.MembersManagementPage=M,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(ue,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react/jsx-runtime"),require("react"),require("lucide-react"),require("react-dom"),require("@sudobility/entity-components"),require("@sudobility/entity_client")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","lucide-react","react-dom","@sudobility/entity-components","@sudobility/entity_client"],S):(ue=typeof globalThis<"u"?globalThis:ue||self,S(ue.EntityPages={},ue.jsxRuntime,ue.React,ue.LucideReact,ue.ReactDOM,ue.SudobilityEntityComponents,ue.SudobilityEntityClient))})(this,(function(ue,S,K,Ct,Pn,nt,ye){"use strict";function Nn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const d=Nn(K),Wt=Nn(Pn);function In(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=In(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Rn(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=In(e))&&(n&&(n+=" "),n+=t);return n}const il=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},sl=(e,t)=>({classGroupId:e,validator:t}),kn=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Ut="-",_n=[],ll="arbitrary..",cl=e=>{const t=dl(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return ul(i);const s=i.split(Ut),l=s[0]===""&&s.length>1?1:0;return Mn(s,l,t)},getConflictingClassGroupIds:(i,s)=>{if(s){const l=n[i],c=r[i];return l?c?il(c,l):l:c||_n}return r[i]||_n}}},Mn=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],a=r.nextPart.get(o);if(a){const c=Mn(e,t+1,a);if(c)return c}const i=r.validators;if(i===null)return;const s=t===0?e.join(Ut):e.slice(t).join(Ut),l=i.length;for(let c=0;c<l;c++){const f=i[c];if(f.validator(s))return f.classGroupId}},ul=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?ll+n:void 0})(),dl=e=>{const{theme:t,classGroups:r}=e;return fl(r,t)},fl=(e,t)=>{const r=kn();for(const n in e){const o=e[n];Tr(o,r,n,t)}return r},Tr=(e,t,r,n)=>{const o=e.length;for(let a=0;a<o;a++){const i=e[a];pl(i,t,r,n)}},pl=(e,t,r,n)=>{if(typeof e=="string"){ml(e,t,r);return}if(typeof e=="function"){gl(e,t,r,n);return}hl(e,t,r,n)},ml=(e,t,r)=>{const n=e===""?t:Ln(t,e);n.classGroupId=r},gl=(e,t,r,n)=>{if(bl(e)){Tr(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(sl(r,e))},hl=(e,t,r,n)=>{const o=Object.entries(e),a=o.length;for(let i=0;i<a;i++){const[s,l]=o[i];Tr(l,Ln(t,s),r,n)}},Ln=(e,t)=>{let r=e;const n=t.split(Ut),o=n.length;for(let a=0;a<o;a++){const i=n[a];let s=r.nextPart.get(i);s||(s=kn(),r.nextPart.set(i,s)),r=s}return r},bl=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,yl=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(a,i)=>{r[a]=i,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let i=r[a];if(i!==void 0)return i;if((i=n[a])!==void 0)return o(a,i),i},set(a,i){a in r?r[a]=i:o(a,i)}}},Or="!",Dn=":",vl=[],jn=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),wl=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const a=[];let i=0,s=0,l=0,c;const f=o.length;for(let m=0;m<f;m++){const g=o[m];if(i===0&&s===0){if(g===Dn){a.push(o.slice(l,m)),l=m+1;continue}if(g==="/"){c=m;continue}}g==="["?i++:g==="]"?i--:g==="("?s++:g===")"&&s--}const u=a.length===0?o:o.slice(l);let p=u,h=!1;u.endsWith(Or)?(p=u.slice(0,-1),h=!0):u.startsWith(Or)&&(p=u.slice(1),h=!0);const y=c&&c>l?c-l:void 0;return jn(a,h,p,y)};if(t){const o=t+Dn,a=n;n=i=>i.startsWith(o)?a(i.slice(o.length)):jn(vl,!1,i,void 0,!0)}if(r){const o=n;n=a=>r({className:a,parseClassName:o})}return n},El=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let a=0;a<r.length;a++){const i=r[a],s=i[0]==="[",l=t.has(i);s||l?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(i)):o.push(i)}return o.length>0&&(o.sort(),n.push(...o)),n}},Sl=e=>({cache:yl(e.cacheSize),parseClassName:wl(e),sortModifiers:El(e),...cl(e)}),xl=/\s+/,Cl=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,i=[],s=e.trim().split(xl);let l="";for(let c=s.length-1;c>=0;c-=1){const f=s[c],{isExternal:u,modifiers:p,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:m}=r(f);if(u){l=f+(l.length>0?" "+l:l);continue}let g=!!m,w=n(g?y.substring(0,m):y);if(!w){if(!g){l=f+(l.length>0?" "+l:l);continue}if(w=n(y),!w){l=f+(l.length>0?" "+l:l);continue}g=!1}const E=p.length===0?"":p.length===1?p[0]:a(p).join(":"),v=h?E+Or:E,x=v+w;if(i.indexOf(x)>-1)continue;i.push(x);const C=o(w,g);for(let O=0;O<C.length;++O){const b=C[O];i.push(v+b)}l=f+(l.length>0?" "+l:l)}return l},Al=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=Fn(r))&&(o&&(o+=" "),o+=n);return o},Fn=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Fn(e[n]))&&(r&&(r+=" "),r+=t);return r},Tl=(e,...t)=>{let r,n,o,a;const i=l=>{const c=t.reduce((f,u)=>u(f),e());return r=Sl(c),n=r.cache.get,o=r.cache.set,a=s,s(l)},s=l=>{const c=n(l);if(c)return c;const f=Cl(l,r);return o(l,f),f};return a=i,(...l)=>a(Al(...l))},Ol=[],ne=e=>{const t=r=>r[e]||Ol;return t.isThemeGetter=!0,t},$n=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Wn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Pl=/^\d+\/\d+$/,Nl=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Il=/\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$/,Rl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_l=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ot=e=>Pl.test(e),L=e=>!!e&&!Number.isNaN(Number(e)),Ue=e=>!!e&&Number.isInteger(Number(e)),Pr=e=>e.endsWith("%")&&L(e.slice(0,-1)),Me=e=>Nl.test(e),Ml=()=>!0,Ll=e=>Il.test(e)&&!Rl.test(e),Un=()=>!1,Dl=e=>kl.test(e),jl=e=>_l.test(e),Fl=e=>!N(e)&&!I(e),$l=e=>at(e,Gn,Un),N=e=>$n.test(e),Xe=e=>at(e,Yn,Ll),Nr=e=>at(e,zl,L),Vn=e=>at(e,zn,Un),Wl=e=>at(e,Hn,jl),Vt=e=>at(e,Kn,Dl),I=e=>Wn.test(e),At=e=>it(e,Yn),Ul=e=>it(e,Hl),Bn=e=>it(e,zn),Vl=e=>it(e,Gn),Bl=e=>it(e,Hn),Bt=e=>it(e,Kn,!0),at=(e,t,r)=>{const n=$n.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},it=(e,t,r=!1)=>{const n=Wn.exec(e);return n?n[1]?t(n[1]):r:!1},zn=e=>e==="position"||e==="percentage",Hn=e=>e==="image"||e==="url",Gn=e=>e==="length"||e==="size"||e==="bg-size",Yn=e=>e==="length",zl=e=>e==="number",Hl=e=>e==="family-name",Kn=e=>e==="shadow",Gl=Tl(()=>{const e=ne("color"),t=ne("font"),r=ne("text"),n=ne("font-weight"),o=ne("tracking"),a=ne("leading"),i=ne("breakpoint"),s=ne("container"),l=ne("spacing"),c=ne("radius"),f=ne("shadow"),u=ne("inset-shadow"),p=ne("text-shadow"),h=ne("drop-shadow"),y=ne("blur"),m=ne("perspective"),g=ne("aspect"),w=ne("ease"),E=ne("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...x(),I,N],O=()=>["auto","hidden","clip","visible","scroll"],b=()=>["auto","contain","none"],A=()=>[I,N,l],k=()=>[ot,"full","auto",...A()],M=()=>[Ue,"none","subgrid",I,N],j=()=>["auto",{span:["full",Ue,I,N]},Ue,I,N],$=()=>[Ue,"auto",I,N],V=()=>["auto","min","max","fr",I,N],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],_=()=>["auto",...A()],F=()=>[ot,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],T=()=>[e,I,N],G=()=>[...x(),Bn,Vn,{position:[I,N]}],le=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ke=()=>["auto","cover","contain",Vl,$l,{size:[I,N]}],We=()=>[Pr,At,Xe],te=()=>["","none","full",c,I,N],Z=()=>["",L,At,Xe],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"],P=()=>[L,Pr,Bn,Vn],X=()=>["","none",y,I,N],re=()=>["none",L,I,N],z=()=>["none",L,I,N],Y=()=>[L,I,N],q=()=>[ot,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Me],breakpoint:[Me],color:[Ml],container:[Me],"drop-shadow":[Me],ease:["in","out","in-out"],font:[Fl],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Me],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Me],shadow:[Me],spacing:["px",L],text:[Me],"text-shadow":[Me],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ot,N,I,g]}],container:["container"],columns:[{columns:[L,N,I,s]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"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:C()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:b()}],"overscroll-x":[{"overscroll-x":b()}],"overscroll-y":[{"overscroll-y":b()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{start:k()}],end:[{end:k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[Ue,"auto",I,N]}],basis:[{basis:[ot,"full","auto",s,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[L,ot,"auto","initial","none",N]}],grow:[{grow:["",L,I,N]}],shrink:[{shrink:["",L,I,N]}],order:[{order:[Ue,"first","last","none",I,N]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:_()}],mx:[{mx:_()}],my:[{my:_()}],ms:[{ms:_()}],me:[{me:_()}],mt:[{mt:_()}],mr:[{mr:_()}],mb:[{mb:_()}],ml:[{ml:_()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[s,"screen",...F()]}],"min-w":[{"min-w":[s,"screen","none",...F()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",r,At,Xe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,I,Nr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Pr,N]}],"font-family":[{font:[Ul,N,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:[o,I,N]}],"line-clamp":[{"line-clamp":[L,"none",I,Nr]}],leading:[{leading:[a,...A()]}],"list-image":[{"list-image":["none",I,N]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",I,N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[L,"from-font","auto",I,Xe]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[L,"auto",I,N]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",I,N]}],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",I,N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:le()}],"bg-size":[{bg:ke()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ue,I,N],radial:["",I,N],conic:[Ue,I,N]},Bl,Wl]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:We()}],"gradient-via-pos":[{via:We()}],"gradient-to-pos":[{to:We()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ce(),"hidden","none"]}],"divide-style":[{divide:[...Ce(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...Ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[L,I,N]}],"outline-w":[{outline:["",L,At,Xe]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",f,Bt,Vt]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",u,Bt,Vt]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[L,Xe]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",p,Bt,Vt]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[L,I,N]}],"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":[L]}],"mask-image-linear-from-pos":[{"mask-linear-from":P()}],"mask-image-linear-to-pos":[{"mask-linear-to":P()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":P()}],"mask-image-t-to-pos":[{"mask-t-to":P()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":P()}],"mask-image-r-to-pos":[{"mask-r-to":P()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":P()}],"mask-image-b-to-pos":[{"mask-b-to":P()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":P()}],"mask-image-l-to-pos":[{"mask-l-to":P()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":P()}],"mask-image-x-to-pos":[{"mask-x-to":P()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":P()}],"mask-image-y-to-pos":[{"mask-y-to":P()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[I,N]}],"mask-image-radial-from-pos":[{"mask-radial-from":P()}],"mask-image-radial-to-pos":[{"mask-radial-to":P()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"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":x()}],"mask-image-conic-pos":[{"mask-conic":[L]}],"mask-image-conic-from-pos":[{"mask-conic-from":P()}],"mask-image-conic-to-pos":[{"mask-conic-to":P()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:le()}],"mask-size":[{mask:ke()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",I,N]}],filter:[{filter:["","none",I,N]}],blur:[{blur:X()}],brightness:[{brightness:[L,I,N]}],contrast:[{contrast:[L,I,N]}],"drop-shadow":[{"drop-shadow":["","none",h,Bt,Vt]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",L,I,N]}],"hue-rotate":[{"hue-rotate":[L,I,N]}],invert:[{invert:["",L,I,N]}],saturate:[{saturate:[L,I,N]}],sepia:[{sepia:["",L,I,N]}],"backdrop-filter":[{"backdrop-filter":["","none",I,N]}],"backdrop-blur":[{"backdrop-blur":X()}],"backdrop-brightness":[{"backdrop-brightness":[L,I,N]}],"backdrop-contrast":[{"backdrop-contrast":[L,I,N]}],"backdrop-grayscale":[{"backdrop-grayscale":["",L,I,N]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[L,I,N]}],"backdrop-invert":[{"backdrop-invert":["",L,I,N]}],"backdrop-opacity":[{"backdrop-opacity":[L,I,N]}],"backdrop-saturate":[{"backdrop-saturate":[L,I,N]}],"backdrop-sepia":[{"backdrop-sepia":["",L,I,N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",I,N]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[L,"initial",I,N]}],ease:[{ease:["linear","initial",w,I,N]}],delay:[{delay:[L,I,N]}],animate:[{animate:["none",E,I,N]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,I,N]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:z()}],"scale-x":[{"scale-x":z()}],"scale-y":[{"scale-y":z()}],"scale-z":[{"scale-z":z()}],"scale-3d":["scale-3d"],skew:[{skew:Y()}],"skew-x":[{"skew-x":Y()}],"skew-y":[{"skew-y":Y()}],transform:[{transform:[I,N,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:q()}],"translate-x":[{"translate-x":q()}],"translate-y":[{"translate-y":q()}],"translate-z":[{"translate-z":q()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"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",I,N]}],"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":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",I,N]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[L,At,Xe,Nr]}],stroke:[{stroke:["none",...T()]}],"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"]}}),Xn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,qn=Rn,zt=(e,t)=>r=>{var n;if(t?.variants==null)return qn(e,r?.class,r?.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(c=>{const f=r?.[c],u=a?.[c];if(f===null)return null;const p=Xn(f)||Xn(u);return o[c][p]}),s=r&&Object.entries(r).reduce((c,f)=>{let[u,p]=f;return p===void 0||(c[u]=p),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,f)=>{let{class:u,className:p,...h}=f;return Object.entries(h).every(y=>{let[m,g]=y;return Array.isArray(g)?g.includes({...a,...s}[m]):{...a,...s}[m]===g})?[...c,u,p]:c},[]);return qn(e,i,l,r?.class,r?.className)};function U(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}function Zn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Tt(...e){return t=>{let r=!1;const n=e.map(o=>{const a=Zn(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():Zn(e[o],null)}}}}function J(...e){return d.useCallback(Tt(...e),e)}function st(e,t=[]){let r=[];function n(a,i){const s=d.createContext(i),l=r.length;r=[...r,i];const c=u=>{const{scope:p,children:h,...y}=u,m=p?.[e]?.[l]||s,g=d.useMemo(()=>y,Object.values(y));return S.jsx(m.Provider,{value:g,children:h})};c.displayName=a+"Provider";function f(u,p){const h=p?.[e]?.[l]||s,y=d.useContext(h);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${a}\``)}return[c,f]}const o=()=>{const a=r.map(i=>d.createContext(i));return function(s){const l=s?.[e]||a;return d.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,Yl(o,...t)]}function Yl(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=n.reduce((s,{useScope:l,scopeName:c})=>{const u=l(a)[`__scope${c}`];return{...s,...u}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var ce=globalThis?.document?d.useLayoutEffect:()=>{},Kl=d[" useInsertionEffect ".trim().toString()]||ce;function Ir({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,i]=Xl({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:o;{const f=d.useRef(e!==void 0);d.useEffect(()=>{const u=f.current;u!==s&&console.warn(`${n} is changing from ${u?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=s},[s,n])}const c=d.useCallback(f=>{if(s){const u=ql(f)?f(e):f;u!==e&&i.current?.(u)}else a(f)},[s,e,a,i]);return[l,c]}function Xl({defaultProp:e,onChange:t}){const[r,n]=d.useState(e),o=d.useRef(r),a=d.useRef(t);return Kl(()=>{a.current=t},[t]),d.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}function ql(e){return typeof e=="function"}function Jn(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Qn(e){const[t,r]=d.useState(void 0);return ce(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,s;if("borderBoxSize"in a){const l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,s=c.blockSize}else i=e.offsetWidth,s=e.offsetHeight;r({width:i,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}function Zl(e){const t=Jl(e),r=d.forwardRef((n,o)=>{const{children:a,...i}=n,s=d.Children.toArray(a),l=s.find(ec);if(l){const c=l.props.children,f=s.map(u=>u===l?d.Children.count(c)>1?d.Children.only(null):d.isValidElement(c)?c.props.children:null:u);return S.jsx(t,{...i,ref:o,children:d.isValidElement(c)?d.cloneElement(c,void 0,f):null})}return S.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Jl(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const i=rc(o),s=tc(a,o.props);return o.type!==d.Fragment&&(s.ref=n?Tt(n,i):i),d.cloneElement(o,s)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ql=Symbol("radix.slottable");function ec(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ql}function tc(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...s)=>{const l=a(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function rc(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var nc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],H=nc.reduce((e,t)=>{const r=Zl(`Primitive.${t}`),n=d.forwardRef((o,a)=>{const{asChild:i,...s}=o,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function oc(e,t){e&&Wt.flushSync(()=>e.dispatchEvent(t))}var Ht="Switch",[ac]=st(Ht),[ic,sc]=ac(Ht),eo=d.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:i,disabled:s,value:l="on",onCheckedChange:c,form:f,...u}=e,[p,h]=d.useState(null),y=J(t,v=>h(v)),m=d.useRef(!1),g=p?f||!!p.closest("form"):!0,[w,E]=Ir({prop:o,defaultProp:a??!1,onChange:c,caller:Ht});return S.jsxs(ic,{scope:r,checked:w,disabled:s,children:[S.jsx(H.button,{type:"button",role:"switch","aria-checked":w,"aria-required":i,"data-state":oo(w),"data-disabled":s?"":void 0,disabled:s,value:l,...u,ref:y,onClick:U(e.onClick,v=>{E(x=>!x),g&&(m.current=v.isPropagationStopped(),m.current||v.stopPropagation())})}),g&&S.jsx(no,{control:p,bubbles:!m.current,name:n,value:l,checked:w,required:i,disabled:s,form:f,style:{transform:"translateX(-100%)"}})]})});eo.displayName=Ht;var to="SwitchThumb",ro=d.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=sc(to,r);return S.jsx(H.span,{"data-state":oo(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});ro.displayName=to;var lc="SwitchBubbleInput",no=d.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=d.useRef(null),s=J(i,a),l=Jn(r),c=Qn(t);return d.useEffect(()=>{const f=i.current;if(!f)return;const u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"checked").set;if(l!==r&&h){const y=new Event("click",{bubbles:n});h.call(f,r),f.dispatchEvent(y)}},[l,r,n]),S.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:s,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});no.displayName=lc;function oo(e){return e?"checked":"unchecked"}var ao=eo,cc=ro;function io(e,[t,r]){return Math.min(r,Math.max(t,e))}function so(e){const t=uc(e),r=d.forwardRef((n,o)=>{const{children:a,...i}=n,s=d.Children.toArray(a),l=s.find(fc);if(l){const c=l.props.children,f=s.map(u=>u===l?d.Children.count(c)>1?d.Children.only(null):d.isValidElement(c)?c.props.children:null:u);return S.jsx(t,{...i,ref:o,children:d.isValidElement(c)?d.cloneElement(c,void 0,f):null})}return S.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function uc(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const i=mc(o),s=pc(a,o.props);return o.type!==d.Fragment&&(s.ref=n?Tt(n,i):i),d.cloneElement(o,s)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dc=Symbol("radix.slottable");function fc(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dc}function pc(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...s)=>{const l=a(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function mc(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function lo(e){const t=e+"CollectionProvider",[r,n]=st(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:g,children:w}=m,E=K.useRef(null),v=K.useRef(new Map).current;return S.jsx(o,{scope:g,itemMap:v,collectionRef:E,children:w})};i.displayName=t;const s=e+"CollectionSlot",l=so(s),c=K.forwardRef((m,g)=>{const{scope:w,children:E}=m,v=a(s,w),x=J(g,v.collectionRef);return S.jsx(l,{ref:x,children:E})});c.displayName=s;const f=e+"CollectionItemSlot",u="data-radix-collection-item",p=so(f),h=K.forwardRef((m,g)=>{const{scope:w,children:E,...v}=m,x=K.useRef(null),C=J(g,x),O=a(f,w);return K.useEffect(()=>(O.itemMap.set(x,{ref:x,...v}),()=>{O.itemMap.delete(x)})),S.jsx(p,{[u]:"",ref:C,children:E})});h.displayName=f;function y(m){const g=a(e+"CollectionConsumer",m);return K.useCallback(()=>{const E=g.collectionRef.current;if(!E)return[];const v=Array.from(E.querySelectorAll(`[${u}]`));return Array.from(g.itemMap.values()).sort((O,b)=>v.indexOf(O.ref.current)-v.indexOf(b.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:c,ItemSlot:h},y,n]}var gc=d.createContext(void 0);function co(e){const t=d.useContext(gc);return e||t||"ltr"}function Ve(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...r)=>t.current?.(...r),[])}function hc(e,t=globalThis?.document){const r=Ve(e);d.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var bc="DismissableLayer",Rr="dismissableLayer.update",yc="dismissableLayer.pointerDownOutside",vc="dismissableLayer.focusOutside",uo,fo=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),po=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,c=d.useContext(fo),[f,u]=d.useState(null),p=f?.ownerDocument??globalThis?.document,[,h]=d.useState({}),y=J(t,b=>u(b)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(g),E=f?m.indexOf(f):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,x=E>=w,C=Sc(b=>{const A=b.target,k=[...c.branches].some(M=>M.contains(A));!x||k||(o?.(b),i?.(b),b.defaultPrevented||s?.())},p),O=xc(b=>{const A=b.target;[...c.branches].some(M=>M.contains(A))||(a?.(b),i?.(b),b.defaultPrevented||s?.())},p);return hc(b=>{E===c.layers.size-1&&(n?.(b),!b.defaultPrevented&&s&&(b.preventDefault(),s()))},p),d.useEffect(()=>{if(f)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(uo=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(f)),c.layers.add(f),mo(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=uo)}},[f,p,r,c]),d.useEffect(()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),mo())},[f,c]),d.useEffect(()=>{const b=()=>h({});return document.addEventListener(Rr,b),()=>document.removeEventListener(Rr,b)},[]),S.jsx(H.div,{...l,ref:y,style:{pointerEvents:v?x?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,O.onFocusCapture),onBlurCapture:U(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,C.onPointerDownCapture)})});po.displayName=bc;var wc="DismissableLayerBranch",Ec=d.forwardRef((e,t)=>{const r=d.useContext(fo),n=d.useRef(null),o=J(t,n);return d.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),S.jsx(H.div,{...e,ref:o})});Ec.displayName=wc;function Sc(e,t=globalThis?.document){const r=Ve(e),n=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!n.current){let l=function(){go(yc,r,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function xc(e,t=globalThis?.document){const r=Ve(e),n=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!n.current&&go(vc,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function mo(){const e=new CustomEvent(Rr);document.dispatchEvent(e)}function go(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?oc(o,a):o.dispatchEvent(a)}var kr=0;function Cc(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ho()),document.body.insertAdjacentElement("beforeend",e[1]??ho()),kr++,()=>{kr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),kr--}},[])}function ho(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var _r="focusScope.autoFocusOnMount",Mr="focusScope.autoFocusOnUnmount",bo={bubbles:!1,cancelable:!0},Ac="FocusScope",yo=d.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,l]=d.useState(null),c=Ve(o),f=Ve(a),u=d.useRef(null),p=J(t,m=>l(m)),h=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(n){let m=function(v){if(h.paused||!s)return;const x=v.target;s.contains(x)?u.current=x:Be(u.current,{select:!0})},g=function(v){if(h.paused||!s)return;const x=v.relatedTarget;x!==null&&(s.contains(x)||Be(u.current,{select:!0}))},w=function(v){if(document.activeElement===document.body)for(const C of v)C.removedNodes.length>0&&Be(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const E=new MutationObserver(w);return s&&E.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),E.disconnect()}}},[n,s,h.paused]),d.useEffect(()=>{if(s){Eo.add(h);const m=document.activeElement;if(!s.contains(m)){const w=new CustomEvent(_r,bo);s.addEventListener(_r,c),s.dispatchEvent(w),w.defaultPrevented||(Tc(Rc(vo(s)),{select:!0}),document.activeElement===m&&Be(s))}return()=>{s.removeEventListener(_r,c),setTimeout(()=>{const w=new CustomEvent(Mr,bo);s.addEventListener(Mr,f),s.dispatchEvent(w),w.defaultPrevented||Be(m??document.body,{select:!0}),s.removeEventListener(Mr,f),Eo.remove(h)},0)}}},[s,c,f,h]);const y=d.useCallback(m=>{if(!r&&!n||h.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(g&&w){const E=m.currentTarget,[v,x]=Oc(E);v&&x?!m.shiftKey&&w===x?(m.preventDefault(),r&&Be(v,{select:!0})):m.shiftKey&&w===v&&(m.preventDefault(),r&&Be(x,{select:!0})):w===E&&m.preventDefault()}},[r,n,h.paused]);return S.jsx(H.div,{tabIndex:-1,...i,ref:p,onKeyDown:y})});yo.displayName=Ac;function Tc(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Be(n,{select:t}),document.activeElement!==r)return}function Oc(e){const t=vo(e),r=wo(t,e),n=wo(t.reverse(),e);return[r,n]}function vo(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function wo(e,t){for(const r of e)if(!Pc(r,{upTo:t}))return r}function Pc(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Nc(e){return e instanceof HTMLInputElement&&"select"in e}function Be(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Nc(e)&&t&&e.select()}}var Eo=Ic();function Ic(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=So(e,t),e.unshift(t)},remove(t){e=So(e,t),e[0]?.resume()}}}function So(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Rc(e){return e.filter(t=>t.tagName!=="A")}var kc=d[" useId ".trim().toString()]||(()=>{}),_c=0;function Gt(e){const[t,r]=d.useState(kc());return ce(()=>{r(n=>n??String(_c++))},[e]),t?`radix-${t}`:""}const Mc=["top","right","bottom","left"],ze=Math.min,fe=Math.max,Yt=Math.round,Kt=Math.floor,Ae=e=>({x:e,y:e}),Lc={left:"right",right:"left",bottom:"top",top:"bottom"},Dc={start:"end",end:"start"};function Lr(e,t,r){return fe(e,ze(t,r))}function Le(e,t){return typeof e=="function"?e(t):e}function De(e){return e.split("-")[0]}function lt(e){return e.split("-")[1]}function Dr(e){return e==="x"?"y":"x"}function jr(e){return e==="y"?"height":"width"}const jc=new Set(["top","bottom"]);function Te(e){return jc.has(De(e))?"y":"x"}function Fr(e){return Dr(Te(e))}function Fc(e,t,r){r===void 0&&(r=!1);const n=lt(e),o=Fr(e),a=jr(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Xt(i)),[i,Xt(i)]}function $c(e){const t=Xt(e);return[$r(e),t,$r(t)]}function $r(e){return e.replace(/start|end/g,t=>Dc[t])}const xo=["left","right"],Co=["right","left"],Wc=["top","bottom"],Uc=["bottom","top"];function Vc(e,t,r){switch(e){case"top":case"bottom":return r?t?Co:xo:t?xo:Co;case"left":case"right":return t?Wc:Uc;default:return[]}}function Bc(e,t,r,n){const o=lt(e);let a=Vc(De(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map($r)))),a}function Xt(e){return e.replace(/left|right|bottom|top/g,t=>Lc[t])}function zc(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ao(e){return typeof e!="number"?zc(e):{top:e,right:e,bottom:e,left:e}}function qt(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function To(e,t,r){let{reference:n,floating:o}=e;const a=Te(t),i=Fr(t),s=jr(i),l=De(t),c=a==="y",f=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,p=n[s]/2-o[s]/2;let h;switch(l){case"top":h={x:f,y:n.y-o.height};break;case"bottom":h={x:f,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-o.width,y:u};break;default:h={x:n.x,y:n.y}}switch(lt(t)){case"start":h[i]-=p*(r&&c?-1:1);break;case"end":h[i]+=p*(r&&c?-1:1);break}return h}const Hc=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:u}=To(c,n,l),p=n,h={},y=0;for(let m=0;m<s.length;m++){const{name:g,fn:w}=s[m],{x:E,y:v,data:x,reset:C}=await w({x:f,y:u,initialPlacement:n,placement:p,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});f=E??f,u=v??u,h={...h,[g]:{...h[g],...x}},C&&y<=50&&(y++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(c=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:f,y:u}=To(c,p,l)),m=-1)}return{x:f,y:u,placement:p,strategy:o,middlewareData:h}};async function Ot(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=Le(t,e),y=Ao(h),g=s[p?u==="floating"?"reference":"floating":u],w=qt(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(g)))==null||r?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:f,strategy:l})),E=u==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,v=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),x=await(a.isElement==null?void 0:a.isElement(v))?await(a.getScale==null?void 0:a.getScale(v))||{x:1,y:1}:{x:1,y:1},C=qt(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:E,offsetParent:v,strategy:l}):E);return{top:(w.top-C.top+y.top)/x.y,bottom:(C.bottom-w.bottom+y.bottom)/x.y,left:(w.left-C.left+y.left)/x.x,right:(C.right-w.right+y.right)/x.x}}const Gc=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:f=0}=Le(e,t)||{};if(c==null)return{};const u=Ao(f),p={x:r,y:n},h=Fr(o),y=jr(h),m=await i.getDimensions(c),g=h==="y",w=g?"top":"left",E=g?"bottom":"right",v=g?"clientHeight":"clientWidth",x=a.reference[y]+a.reference[h]-p[h]-a.floating[y],C=p[h]-a.reference[h],O=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let b=O?O[v]:0;(!b||!await(i.isElement==null?void 0:i.isElement(O)))&&(b=s.floating[v]||a.floating[y]);const A=x/2-C/2,k=b/2-m[y]/2-1,M=ze(u[w],k),j=ze(u[E],k),$=M,V=b-m[y]-j,W=b/2-m[y]/2+A,B=Lr($,W,V),_=!l.arrow&&lt(o)!=null&&W!==B&&a.reference[y]/2-(W<$?M:j)-m[y]/2<0,F=_?W<$?W-$:W-V:0;return{[h]:p[h]+F,data:{[h]:B,centerOffset:W-B-F,..._&&{alignmentOffset:F}},reset:_}}}),Yc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:m=!0,...g}=Le(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const w=De(o),E=Te(s),v=De(s)===s,x=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=p||(v||!m?[Xt(s)]:$c(s)),O=y!=="none";!p&&O&&C.push(...Bc(s,m,y,x));const b=[s,...C],A=await Ot(t,g),k=[];let M=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&k.push(A[w]),u){const W=Fc(o,i,x);k.push(A[W[0]],A[W[1]])}if(M=[...M,{placement:o,overflows:k}],!k.every(W=>W<=0)){var j,$;const W=(((j=a.flip)==null?void 0:j.index)||0)+1,B=b[W];if(B&&(!(u==="alignment"?E!==Te(B):!1)||M.every(T=>Te(T.placement)===E?T.overflows[0]>0:!0)))return{data:{index:W,overflows:M},reset:{placement:B}};let _=($=M.filter(F=>F.overflows[0]<=0).sort((F,T)=>F.overflows[1]-T.overflows[1])[0])==null?void 0:$.placement;if(!_)switch(h){case"bestFit":{var V;const F=(V=M.filter(T=>{if(O){const G=Te(T.placement);return G===E||G==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(G=>G>0).reduce((G,le)=>G+le,0)]).sort((T,G)=>T[1]-G[1])[0])==null?void 0:V[0];F&&(_=F);break}case"initialPlacement":_=s;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function Oo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Po(e){return Mc.some(t=>e[t]>=0)}const Kc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=Le(e,t);switch(n){case"referenceHidden":{const a=await Ot(t,{...o,elementContext:"reference"}),i=Oo(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Po(i)}}}case"escaped":{const a=await Ot(t,{...o,altBoundary:!0}),i=Oo(a,r.floating);return{data:{escapedOffsets:i,escaped:Po(i)}}}default:return{}}}}},No=new Set(["left","top"]);async function Xc(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=De(r),s=lt(r),l=Te(r)==="y",c=No.has(i)?-1:1,f=a&&l?-1:1,u=Le(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:y}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof y=="number"&&(h=s==="end"?y*-1:y),l?{x:h*f,y:p*c}:{x:p*c,y:h*f}}const qc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:i,middlewareData:s}=t,l=await Xc(t,e);return i===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},Zc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:g=>{let{x:w,y:E}=g;return{x:w,y:E}}},...l}=Le(e,t),c={x:r,y:n},f=await Ot(t,l),u=Te(De(o)),p=Dr(u);let h=c[p],y=c[u];if(a){const g=p==="y"?"top":"left",w=p==="y"?"bottom":"right",E=h+f[g],v=h-f[w];h=Lr(E,h,v)}if(i){const g=u==="y"?"top":"left",w=u==="y"?"bottom":"right",E=y+f[g],v=y-f[w];y=Lr(E,y,v)}const m=s.fn({...t,[p]:h,[u]:y});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[p]:a,[u]:i}}}}}},Jc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Le(e,t),f={x:r,y:n},u=Te(o),p=Dr(u);let h=f[p],y=f[u];const m=Le(s,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const v=p==="y"?"height":"width",x=a.reference[p]-a.floating[v]+g.mainAxis,C=a.reference[p]+a.reference[v]-g.mainAxis;h<x?h=x:h>C&&(h=C)}if(c){var w,E;const v=p==="y"?"width":"height",x=No.has(De(o)),C=a.reference[u]-a.floating[v]+(x&&((w=i.offset)==null?void 0:w[u])||0)+(x?0:g.crossAxis),O=a.reference[u]+a.reference[v]+(x?0:((E=i.offset)==null?void 0:E[u])||0)-(x?g.crossAxis:0);y<C?y=C:y>O&&(y=O)}return{[p]:h,[u]:y}}}},Qc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...c}=Le(e,t),f=await Ot(t,c),u=De(o),p=lt(o),h=Te(o)==="y",{width:y,height:m}=a.floating;let g,w;u==="top"||u==="bottom"?(g=u,w=p===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(w=u,g=p==="end"?"top":"bottom");const E=m-f.top-f.bottom,v=y-f.left-f.right,x=ze(m-f[g],E),C=ze(y-f[w],v),O=!t.middlewareData.shift;let b=x,A=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(A=v),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(b=E),O&&!p){const M=fe(f.left,0),j=fe(f.right,0),$=fe(f.top,0),V=fe(f.bottom,0);h?A=y-2*(M!==0||j!==0?M+j:fe(f.left,f.right)):b=m-2*($!==0||V!==0?$+V:fe(f.top,f.bottom))}await l({...t,availableWidth:A,availableHeight:b});const k=await i.getDimensions(s.floating);return y!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}};function Zt(){return typeof window<"u"}function ct(e){return Io(e)?(e.nodeName||"").toLowerCase():"#document"}function pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Oe(e){var t;return(t=(Io(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Io(e){return Zt()?e instanceof Node||e instanceof pe(e).Node:!1}function ve(e){return Zt()?e instanceof Element||e instanceof pe(e).Element:!1}function Pe(e){return Zt()?e instanceof HTMLElement||e instanceof pe(e).HTMLElement:!1}function Ro(e){return!Zt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof pe(e).ShadowRoot}const eu=new Set(["inline","contents"]);function Pt(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=we(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!eu.has(o)}const tu=new Set(["table","td","th"]);function ru(e){return tu.has(ct(e))}const nu=[":popover-open",":modal"];function Jt(e){return nu.some(t=>{try{return e.matches(t)}catch{return!1}})}const ou=["transform","translate","scale","rotate","perspective"],au=["transform","translate","scale","rotate","perspective","filter"],iu=["paint","layout","strict","content"];function Wr(e){const t=Ur(),r=ve(e)?we(e):e;return ou.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||au.some(n=>(r.willChange||"").includes(n))||iu.some(n=>(r.contain||"").includes(n))}function su(e){let t=He(e);for(;Pe(t)&&!ut(t);){if(Wr(t))return t;if(Jt(t))return null;t=He(t)}return null}function Ur(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const lu=new Set(["html","body","#document"]);function ut(e){return lu.has(ct(e))}function we(e){return pe(e).getComputedStyle(e)}function Qt(e){return ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function He(e){if(ct(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ro(e)&&e.host||Oe(e);return Ro(t)?t.host:t}function ko(e){const t=He(e);return ut(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pe(t)&&Pt(t)?t:ko(t)}function Nt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=ko(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=pe(o);if(a){const s=Vr(i);return t.concat(i,i.visualViewport||[],Pt(o)?o:[],s&&r?Nt(s):[])}return t.concat(o,Nt(o,[],r))}function Vr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _o(e){const t=we(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Pe(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,s=Yt(r)!==a||Yt(n)!==i;return s&&(r=a,n=i),{width:r,height:n,$:s}}function Br(e){return ve(e)?e:e.contextElement}function dt(e){const t=Br(e);if(!Pe(t))return Ae(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=_o(t);let i=(a?Yt(r.width):r.width)/n,s=(a?Yt(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const cu=Ae(0);function Mo(e){const t=pe(e);return!Ur()||!t.visualViewport?cu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uu(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==pe(e)?!1:t}function qe(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=Br(e);let i=Ae(1);t&&(n?ve(n)&&(i=dt(n)):i=dt(e));const s=uu(a,r,n)?Mo(a):Ae(0);let l=(o.left+s.x)/i.x,c=(o.top+s.y)/i.y,f=o.width/i.x,u=o.height/i.y;if(a){const p=pe(a),h=n&&ve(n)?pe(n):n;let y=p,m=Vr(y);for(;m&&n&&h!==y;){const g=dt(m),w=m.getBoundingClientRect(),E=we(m),v=w.left+(m.clientLeft+parseFloat(E.paddingLeft))*g.x,x=w.top+(m.clientTop+parseFloat(E.paddingTop))*g.y;l*=g.x,c*=g.y,f*=g.x,u*=g.y,l+=v,c+=x,y=pe(m),m=Vr(y)}}return qt({width:f,height:u,x:l,y:c})}function er(e,t){const r=Qt(e).scrollLeft;return t?t.left+r:qe(Oe(e)).left+r}function Lo(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-er(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function du(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",i=Oe(n),s=t?Jt(t.floating):!1;if(n===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},c=Ae(1);const f=Ae(0),u=Pe(n);if((u||!u&&!a)&&((ct(n)!=="body"||Pt(i))&&(l=Qt(n)),Pe(n))){const h=qe(n);c=dt(n),f.x=h.x+n.clientLeft,f.y=h.y+n.clientTop}const p=i&&!u&&!a?Lo(i,l):Ae(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+f.x+p.x,y:r.y*c.y-l.scrollTop*c.y+f.y+p.y}}function fu(e){return Array.from(e.getClientRects())}function pu(e){const t=Oe(e),r=Qt(e),n=e.ownerDocument.body,o=fe(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=fe(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+er(e);const s=-r.scrollTop;return we(n).direction==="rtl"&&(i+=fe(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}const Do=25;function mu(e,t){const r=pe(e),n=Oe(e),o=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const f=Ur();(!f||f&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const c=er(n);if(c<=0){const f=n.ownerDocument,u=f.body,p=getComputedStyle(u),h=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,y=Math.abs(n.clientWidth-u.clientWidth-h);y<=Do&&(a-=y)}else c<=Do&&(a+=c);return{width:a,height:i,x:s,y:l}}const gu=new Set(["absolute","fixed"]);function hu(e,t){const r=qe(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=Pe(e)?dt(e):Ae(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=o*a.x,c=n*a.y;return{width:i,height:s,x:l,y:c}}function jo(e,t,r){let n;if(t==="viewport")n=mu(e,r);else if(t==="document")n=pu(Oe(e));else if(ve(t))n=hu(t,r);else{const o=Mo(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return qt(n)}function Fo(e,t){const r=He(e);return r===t||!ve(r)||ut(r)?!1:we(r).position==="fixed"||Fo(r,t)}function bu(e,t){const r=t.get(e);if(r)return r;let n=Nt(e,[],!1).filter(s=>ve(s)&&ct(s)!=="body"),o=null;const a=we(e).position==="fixed";let i=a?He(e):e;for(;ve(i)&&!ut(i);){const s=we(i),l=Wr(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&gu.has(o.position)||Pt(i)&&!l&&Fo(e,i))?n=n.filter(f=>f!==i):o=s,i=He(i)}return t.set(e,n),n}function yu(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?Jt(t)?[]:bu(t,this._c):[].concat(r),n],s=i[0],l=i.reduce((c,f)=>{const u=jo(t,f,o);return c.top=fe(u.top,c.top),c.right=ze(u.right,c.right),c.bottom=ze(u.bottom,c.bottom),c.left=fe(u.left,c.left),c},jo(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function vu(e){const{width:t,height:r}=_o(e);return{width:t,height:r}}function wu(e,t,r){const n=Pe(t),o=Oe(t),a=r==="fixed",i=qe(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=Ae(0);function c(){l.x=er(o)}if(n||!n&&!a)if((ct(t)!=="body"||Pt(o))&&(s=Qt(t)),n){const h=qe(t,!0,a,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&c();a&&!n&&o&&c();const f=o&&!n&&!a?Lo(o,s):Ae(0),u=i.left+s.scrollLeft-l.x-f.x,p=i.top+s.scrollTop-l.y-f.y;return{x:u,y:p,width:i.width,height:i.height}}function zr(e){return we(e).position==="static"}function $o(e,t){if(!Pe(e)||we(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Oe(e)===r&&(r=r.ownerDocument.body),r}function Wo(e,t){const r=pe(e);if(Jt(e))return r;if(!Pe(e)){let o=He(e);for(;o&&!ut(o);){if(ve(o)&&!zr(o))return o;o=He(o)}return r}let n=$o(e,t);for(;n&&ru(n)&&zr(n);)n=$o(n,t);return n&&ut(n)&&zr(n)&&!Wr(n)?r:n||su(e)||r}const Eu=async function(e){const t=this.getOffsetParent||Wo,r=this.getDimensions,n=await r(e.floating);return{reference:wu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Su(e){return we(e).direction==="rtl"}const xu={convertOffsetParentRelativeRectToViewportRelativeRect:du,getDocumentElement:Oe,getClippingRect:yu,getOffsetParent:Wo,getElementRects:Eu,getClientRects:fu,getDimensions:vu,getScale:dt,isElement:ve,isRTL:Su};function Uo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Cu(e,t){let r=null,n;const o=Oe(e);function a(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const c=e.getBoundingClientRect(),{left:f,top:u,width:p,height:h}=c;if(s||t(),!p||!h)return;const y=Kt(u),m=Kt(o.clientWidth-(f+p)),g=Kt(o.clientHeight-(u+h)),w=Kt(f),v={rootMargin:-y+"px "+-m+"px "+-g+"px "+-w+"px",threshold:fe(0,ze(1,l))||1};let x=!0;function C(O){const b=O[0].intersectionRatio;if(b!==l){if(!x)return i();b?i(!1,b):n=setTimeout(()=>{i(!1,1e-7)},1e3)}b===1&&!Uo(c,e.getBoundingClientRect())&&i(),x=!1}try{r=new IntersectionObserver(C,{...v,root:o.ownerDocument})}catch{r=new IntersectionObserver(C,v)}r.observe(e)}return i(!0),a}function Au(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Br(e),f=o||a?[...c?Nt(c):[],...Nt(t)]:[];f.forEach(w=>{o&&w.addEventListener("scroll",r,{passive:!0}),a&&w.addEventListener("resize",r)});const u=c&&s?Cu(c,r):null;let p=-1,h=null;i&&(h=new ResizeObserver(w=>{let[E]=w;E&&E.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(t)})),r()}),c&&!l&&h.observe(c),h.observe(t));let y,m=l?qe(e):null;l&&g();function g(){const w=qe(e);m&&!Uo(m,w)&&r(),m=w,y=requestAnimationFrame(g)}return r(),()=>{var w;f.forEach(E=>{o&&E.removeEventListener("scroll",r),a&&E.removeEventListener("resize",r)}),u?.(),(w=h)==null||w.disconnect(),h=null,l&&cancelAnimationFrame(y)}}const Tu=qc,Ou=Zc,Pu=Yc,Nu=Qc,Iu=Kc,Vo=Gc,Ru=Jc,ku=(e,t,r)=>{const n=new Map,o={platform:xu,...r},a={...o.platform,_c:n};return Hc(e,t,{...o,platform:a})};var _u=typeof document<"u",Mu=function(){},tr=_u?K.useLayoutEffect:Mu;function rr(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!rr(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!rr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Bo(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zo(e,t){const r=Bo(e);return Math.round(t*r)/r}function Hr(e){const t=d.useRef(e);return tr(()=>{t.current=e}),t}function Lu(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[f,u]=d.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=d.useState(n);rr(p,n)||h(n);const[y,m]=d.useState(null),[g,w]=d.useState(null),E=d.useCallback(T=>{T!==O.current&&(O.current=T,m(T))},[]),v=d.useCallback(T=>{T!==b.current&&(b.current=T,w(T))},[]),x=a||y,C=i||g,O=d.useRef(null),b=d.useRef(null),A=d.useRef(f),k=l!=null,M=Hr(l),j=Hr(o),$=Hr(c),V=d.useCallback(()=>{if(!O.current||!b.current)return;const T={placement:t,strategy:r,middleware:p};j.current&&(T.platform=j.current),ku(O.current,b.current,T).then(G=>{const le={...G,isPositioned:$.current!==!1};W.current&&!rr(A.current,le)&&(A.current=le,Wt.flushSync(()=>{u(le)}))})},[p,t,r,j,$]);tr(()=>{c===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,u(T=>({...T,isPositioned:!1})))},[c]);const W=d.useRef(!1);tr(()=>(W.current=!0,()=>{W.current=!1}),[]),tr(()=>{if(x&&(O.current=x),C&&(b.current=C),x&&C){if(M.current)return M.current(x,C,V);V()}},[x,C,V,M,k]);const B=d.useMemo(()=>({reference:O,floating:b,setReference:E,setFloating:v}),[E,v]),_=d.useMemo(()=>({reference:x,floating:C}),[x,C]),F=d.useMemo(()=>{const T={position:r,left:0,top:0};if(!_.floating)return T;const G=zo(_.floating,f.x),le=zo(_.floating,f.y);return s?{...T,transform:"translate("+G+"px, "+le+"px)",...Bo(_.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:G,top:le}},[r,s,_.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:V,refs:B,elements:_,floatingStyles:F}),[f,V,B,_,F])}const Du=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Vo({element:n.current,padding:o}).fn(r):{}:n?Vo({element:n,padding:o}).fn(r):{}}}},ju=(e,t)=>({...Tu(e),options:[e,t]}),Fu=(e,t)=>({...Ou(e),options:[e,t]}),$u=(e,t)=>({...Ru(e),options:[e,t]}),Wu=(e,t)=>({...Pu(e),options:[e,t]}),Uu=(e,t)=>({...Nu(e),options:[e,t]}),Vu=(e,t)=>({...Iu(e),options:[e,t]}),Bu=(e,t)=>({...Du(e),options:[e,t]});var zu="Arrow",Ho=d.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return S.jsx(H.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:S.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ho.displayName=zu;var Hu=Ho,Go="Popper",[Yo,Ko]=st(Go),[Ig,Xo]=Yo(Go),qo="PopperAnchor",Zo=d.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=Xo(qo,r),i=d.useRef(null),s=J(t,i),l=d.useRef(null);return d.useEffect(()=>{const c=l.current;l.current=n?.current||i.current,c!==l.current&&a.onAnchorChange(l.current)}),n?null:S.jsx(H.div,{...o,ref:s})});Zo.displayName=qo;var Gr="PopperContent",[Gu,Yu]=Yo(Gr),Jo=d.forwardRef((e,t)=>{const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:y,...m}=e,g=Xo(Gr,r),[w,E]=d.useState(null),v=J(t,P=>E(P)),[x,C]=d.useState(null),O=Qn(x),b=O?.width??0,A=O?.height??0,k=n+(a!=="center"?"-"+a:""),M=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},j=Array.isArray(c)?c:[c],$=j.length>0,V={padding:M,boundary:j.filter(Xu),altBoundary:$},{refs:W,floatingStyles:B,placement:_,isPositioned:F,middlewareData:T}=Lu({strategy:"fixed",placement:k,whileElementsMounted:(...P)=>Au(...P,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[ju({mainAxis:o+A,alignmentAxis:i}),l&&Fu({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?$u():void 0,...V}),l&&Wu({...V}),Uu({...V,apply:({elements:P,rects:X,availableWidth:re,availableHeight:z})=>{const{width:Y,height:q}=X.reference,be=P.floating.style;be.setProperty("--radix-popper-available-width",`${re}px`),be.setProperty("--radix-popper-available-height",`${z}px`),be.setProperty("--radix-popper-anchor-width",`${Y}px`),be.setProperty("--radix-popper-anchor-height",`${q}px`)}}),x&&Bu({element:x,padding:s}),qu({arrowWidth:b,arrowHeight:A}),p&&Vu({strategy:"referenceHidden",...V})]}),[G,le]=ta(_),ke=Ve(y);ce(()=>{F&&ke?.()},[F,ke]);const We=T.arrow?.x,te=T.arrow?.y,Z=T.arrow?.centerOffset!==0,[Ce,_e]=d.useState();return ce(()=>{w&&_e(window.getComputedStyle(w).zIndex)},[w]),S.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:F?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ce,"--radix-popper-transform-origin":[T.transformOrigin?.x,T.transformOrigin?.y].join(" "),...T.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:S.jsx(Gu,{scope:r,placedSide:G,onArrowChange:C,arrowX:We,arrowY:te,shouldHideArrow:Z,children:S.jsx(H.div,{"data-side":G,"data-align":le,...m,ref:v,style:{...m.style,animation:F?void 0:"none"}})})})});Jo.displayName=Gr;var Qo="PopperArrow",Ku={top:"bottom",right:"left",bottom:"top",left:"right"},ea=d.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=Yu(Qo,n),i=Ku[a.placedSide];return S.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:S.jsx(Hu,{...o,ref:r,style:{...o.style,display:"block"}})})});ea.displayName=Qo;function Xu(e){return e!==null}var qu=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,s=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,f]=ta(r),u={start:"0%",center:"50%",end:"100%"}[f],p=(o.arrow?.x??0)+s/2,h=(o.arrow?.y??0)+l/2;let y="",m="";return c==="bottom"?(y=i?u:`${p}px`,m=`${-l}px`):c==="top"?(y=i?u:`${p}px`,m=`${n.floating.height+l}px`):c==="right"?(y=`${-l}px`,m=i?u:`${h}px`):c==="left"&&(y=`${n.floating.width+l}px`,m=i?u:`${h}px`),{data:{x:y,y:m}}}});function ta(e){const[t,r="center"]=e.split("-");return[t,r]}var Zu=Zo,Ju=Jo,Qu=ea,ed="Portal",ra=d.forwardRef((e,t)=>{const{container:r,...n}=e,[o,a]=d.useState(!1);ce(()=>a(!0),[]);const i=r||o&&globalThis?.document?.body;return i?Pn.createPortal(S.jsx(H.div,{...n,ref:t}),i):null});ra.displayName=ed;function td(e){const t=rd(e),r=d.forwardRef((n,o)=>{const{children:a,...i}=n,s=d.Children.toArray(a),l=s.find(od);if(l){const c=l.props.children,f=s.map(u=>u===l?d.Children.count(c)>1?d.Children.only(null):d.isValidElement(c)?c.props.children:null:u);return S.jsx(t,{...i,ref:o,children:d.isValidElement(c)?d.cloneElement(c,void 0,f):null})}return S.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function rd(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const i=id(o),s=ad(a,o.props);return o.type!==d.Fragment&&(s.ref=n?Tt(n,i):i),d.cloneElement(o,s)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nd=Symbol("radix.slottable");function od(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nd}function ad(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...s)=>{const l=a(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function id(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var na=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),sd="VisuallyHidden",ld=d.forwardRef((e,t)=>S.jsx(H.span,{...e,ref:t,style:{...na,...e.style}}));ld.displayName=sd;var cd=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ft=new WeakMap,nr=new WeakMap,or={},Yr=0,oa=function(e){return e&&(e.host||oa(e.parentNode))},ud=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=oa(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},dd=function(e,t,r,n){var o=ud(t,Array.isArray(e)?e:[e]);or[r]||(or[r]=new WeakMap);var a=or[r],i=[],s=new Set,l=new Set(o),c=function(u){!u||s.has(u)||(s.add(u),c(u.parentNode))};o.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(p){if(s.has(p))f(p);else try{var h=p.getAttribute(n),y=h!==null&&h!=="false",m=(ft.get(p)||0)+1,g=(a.get(p)||0)+1;ft.set(p,m),a.set(p,g),i.push(p),m===1&&y&&nr.set(p,!0),g===1&&p.setAttribute(r,"true"),y||p.setAttribute(n,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return f(t),s.clear(),Yr++,function(){i.forEach(function(u){var p=ft.get(u)-1,h=a.get(u)-1;ft.set(u,p),a.set(u,h),p||(nr.has(u)||u.removeAttribute(n),nr.delete(u)),h||u.removeAttribute(r)}),Yr--,Yr||(ft=new WeakMap,ft=new WeakMap,nr=new WeakMap,or={})}},fd=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=cd(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),dd(n,o,r,"aria-hidden")):function(){return null}},Ne=function(){return Ne=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Ne.apply(this,arguments)};function aa(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function pd(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var ar="right-scroll-bar-position",ir="width-before-scroll-bar",md="with-scroll-bars-hidden",gd="--removed-body-scroll-bar-size";function Kr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function hd(e,t){var r=K.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var bd=typeof window<"u"?d.useLayoutEffect:d.useEffect,ia=new WeakMap;function yd(e,t){var r=hd(null,function(n){return e.forEach(function(o){return Kr(o,n)})});return bd(function(){var n=ia.get(r);if(n){var o=new Set(n),a=new Set(e),i=r.current;o.forEach(function(s){a.has(s)||Kr(s,null)}),a.forEach(function(s){o.has(s)||Kr(s,i)})}ia.set(r,e)},[e]),r}function vd(e){return e}function wd(e,t){t===void 0&&(t=vd);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,n);return r.push(i),function(){r=r.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(s){return a(s)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var s=r;r=[],s.forEach(a),i=r}var l=function(){var f=i;i=[],f.forEach(a)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(f){i.push(f),c()},filter:function(f){return i=i.filter(f),r}}}};return o}function Ed(e){e===void 0&&(e={});var t=wd(null);return t.options=Ne({async:!0,ssr:!1},e),t}var sa=function(e){var t=e.sideCar,r=aa(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return d.createElement(n,Ne({},r))};sa.isSideCarExport=!0;function Sd(e,t){return e.useMedium(t),sa}var la=Ed(),Xr=function(){},sr=d.forwardRef(function(e,t){var r=d.useRef(null),n=d.useState({onScrollCapture:Xr,onWheelCapture:Xr,onTouchMoveCapture:Xr}),o=n[0],a=n[1],i=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,f=e.enabled,u=e.shards,p=e.sideCar,h=e.noRelative,y=e.noIsolation,m=e.inert,g=e.allowPinchZoom,w=e.as,E=w===void 0?"div":w,v=e.gapMode,x=aa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,O=yd([r,t]),b=Ne(Ne({},x),o);return d.createElement(d.Fragment,null,f&&d.createElement(C,{sideCar:la,removeScrollBar:c,shards:u,noRelative:h,noIsolation:y,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:r,gapMode:v}),i?d.cloneElement(d.Children.only(s),Ne(Ne({},b),{ref:O})):d.createElement(E,Ne({},b,{className:l,ref:O}),s))});sr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},sr.classNames={fullWidth:ir,zeroRight:ar};var xd=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Cd(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=xd();return t&&e.setAttribute("nonce",t),e}function Ad(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Td(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Od=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Cd())&&(Ad(t,r),Td(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Pd=function(){var e=Od();return function(t,r){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},ca=function(){var e=Pd(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Nd={left:0,top:0,right:0,gap:0},qr=function(e){return parseInt(e||"",10)||0},Id=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[qr(r),qr(n),qr(o)]},Rd=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Nd;var t=Id(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},kd=ca(),pt="data-scroll-locked",_d=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,s=e.gap;return r===void 0&&(r="margin"),`
2
+ .`.concat(md,` {
3
+ overflow: hidden `).concat(n,`;
4
+ padding-right: `).concat(s,"px ").concat(n,`;
5
+ }
6
+ body[`).concat(pt,`] {
7
+ overflow: hidden `).concat(n,`;
8
+ overscroll-behavior: contain;
9
+ `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
10
+ padding-left: `.concat(o,`px;
11
+ padding-top: `).concat(a,`px;
12
+ padding-right: `).concat(i,`px;
13
+ margin-left:0;
14
+ margin-top:0;
15
+ margin-right: `).concat(s,"px ").concat(n,`;
16
+ `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),`
17
+ }
18
+
19
+ .`).concat(ar,` {
20
+ right: `).concat(s,"px ").concat(n,`;
21
+ }
22
+
23
+ .`).concat(ir,` {
24
+ margin-right: `).concat(s,"px ").concat(n,`;
25
+ }
26
+
27
+ .`).concat(ar," .").concat(ar,` {
28
+ right: 0 `).concat(n,`;
29
+ }
30
+
31
+ .`).concat(ir," .").concat(ir,` {
32
+ margin-right: 0 `).concat(n,`;
33
+ }
34
+
35
+ body[`).concat(pt,`] {
36
+ `).concat(gd,": ").concat(s,`px;
37
+ }
38
+ `)},ua=function(){var e=parseInt(document.body.getAttribute(pt)||"0",10);return isFinite(e)?e:0},Md=function(){d.useEffect(function(){return document.body.setAttribute(pt,(ua()+1).toString()),function(){var e=ua()-1;e<=0?document.body.removeAttribute(pt):document.body.setAttribute(pt,e.toString())}},[])},Ld=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Md();var a=d.useMemo(function(){return Rd(o)},[o]);return d.createElement(kd,{styles:_d(a,!t,o,r?"":"!important")})},Zr=!1;if(typeof window<"u")try{var lr=Object.defineProperty({},"passive",{get:function(){return Zr=!0,!0}});window.addEventListener("test",lr,lr),window.removeEventListener("test",lr,lr)}catch{Zr=!1}var mt=Zr?{passive:!1}:!1,Dd=function(e){return e.tagName==="TEXTAREA"},da=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Dd(e)&&r[t]==="visible")},jd=function(e){return da(e,"overflowY")},Fd=function(e){return da(e,"overflowX")},fa=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=pa(e,n);if(o){var a=ma(e,n),i=a[1],s=a[2];if(i>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},$d=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Wd=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},pa=function(e,t){return e==="v"?jd(t):Fd(t)},ma=function(e,t){return e==="v"?$d(t):Wd(t)},Ud=function(e,t){return e==="h"&&t==="rtl"?-1:1},Vd=function(e,t,r,n,o){var a=Ud(e,window.getComputedStyle(t).direction),i=a*n,s=r.target,l=t.contains(s),c=!1,f=i>0,u=0,p=0;do{if(!s)break;var h=ma(e,s),y=h[0],m=h[1],g=h[2],w=m-g-a*y;(y||w)&&pa(e,s)&&(u+=w,p+=y);var E=s.parentNode;s=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&Math.abs(u)<1||!f&&Math.abs(p)<1)&&(c=!0),c},cr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ga=function(e){return[e.deltaX,e.deltaY]},ha=function(e){return e&&"current"in e?e.current:e},Bd=function(e,t){return e[0]===t[0]&&e[1]===t[1]},zd=function(e){return`
39
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
40
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
+ `)},Hd=0,gt=[];function Gd(e){var t=d.useRef([]),r=d.useRef([0,0]),n=d.useRef(),o=d.useState(Hd++)[0],a=d.useState(ca)[0],i=d.useRef(e);d.useEffect(function(){i.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=pd([e.lockRef.current],(e.shards||[]).map(ha),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=d.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var w=cr(m),E=r.current,v="deltaX"in m?m.deltaX:E[0]-w[0],x="deltaY"in m?m.deltaY:E[1]-w[1],C,O=m.target,b=Math.abs(v)>Math.abs(x)?"h":"v";if("touches"in m&&b==="h"&&O.type==="range")return!1;var A=window.getSelection(),k=A&&A.anchorNode,M=k?k===O||k.contains(O):!1;if(M)return!1;var j=fa(b,O);if(!j)return!0;if(j?C=b:(C=b==="v"?"h":"v",j=fa(b,O)),!j)return!1;if(!n.current&&"changedTouches"in m&&(v||x)&&(n.current=C),!C)return!0;var $=n.current||C;return Vd($,g,m,$==="h"?v:x)},[]),l=d.useCallback(function(m){var g=m;if(!(!gt.length||gt[gt.length-1]!==a)){var w="deltaY"in g?ga(g):cr(g),E=t.current.filter(function(C){return C.name===g.type&&(C.target===g.target||g.target===C.shadowParent)&&Bd(C.delta,w)})[0];if(E&&E.should){g.cancelable&&g.preventDefault();return}if(!E){var v=(i.current.shards||[]).map(ha).filter(Boolean).filter(function(C){return C.contains(g.target)}),x=v.length>0?s(g,v[0]):!i.current.noIsolation;x&&g.cancelable&&g.preventDefault()}}},[]),c=d.useCallback(function(m,g,w,E){var v={name:m,delta:g,target:w,should:E,shadowParent:Yd(w)};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(x){return x!==v})},1)},[]),f=d.useCallback(function(m){r.current=cr(m),n.current=void 0},[]),u=d.useCallback(function(m){c(m.type,ga(m),m.target,s(m,e.lockRef.current))},[]),p=d.useCallback(function(m){c(m.type,cr(m),m.target,s(m,e.lockRef.current))},[]);d.useEffect(function(){return gt.push(a),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:p}),document.addEventListener("wheel",l,mt),document.addEventListener("touchmove",l,mt),document.addEventListener("touchstart",f,mt),function(){gt=gt.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,mt),document.removeEventListener("touchmove",l,mt),document.removeEventListener("touchstart",f,mt)}},[]);var h=e.removeScrollBar,y=e.inert;return d.createElement(d.Fragment,null,y?d.createElement(a,{styles:zd(o)}):null,h?d.createElement(Ld,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Yd(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Kd=Sd(la,Gd);var ba=d.forwardRef(function(e,t){return d.createElement(sr,Ne({},e,{ref:t,sideCar:Kd}))});ba.classNames=sr.classNames;var Xd=[" ","Enter","ArrowUp","ArrowDown"],qd=[" ","Enter"],ur="Select",[Jr,dr,Zd]=lo(ur),[ht]=st(ur,[Zd,Ko]),Qr=Ko(),[Rg,Ge]=ht(ur),[kg,Jd]=ht(ur),ya="SelectTrigger",va=d.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,a=Qr(r),i=Ge(ya,r),s=i.disabled||n,l=J(t,i.onTriggerChange),c=dr(r),f=d.useRef("touch"),[u,p,h]=Ua(m=>{const g=c().filter(v=>!v.disabled),w=g.find(v=>v.value===i.value),E=Va(g,m,w);E!==void 0&&i.onValueChange(E.value)}),y=m=>{s||(i.onOpenChange(!0),h()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return S.jsx(Zu,{asChild:!0,...a,children:S.jsx(H.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Wa(i.value)?"":void 0,...o,ref:l,onClick:U(o.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&y(m)}),onPointerDown:U(o.onPointerDown,m=>{f.current=m.pointerType;const g=m.target;g.hasPointerCapture(m.pointerId)&&g.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(y(m),m.preventDefault())}),onKeyDown:U(o.onKeyDown,m=>{const g=u.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&p(m.key),!(g&&m.key===" ")&&Xd.includes(m.key)&&(y(),m.preventDefault())})})})});va.displayName=ya;var wa="SelectValue",Qd=d.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:a,placeholder:i="",...s}=e,l=Ge(wa,r),{onValueNodeHasChildrenChange:c}=l,f=a!==void 0,u=J(t,l.onValueNodeChange);return ce(()=>{c(f)},[c,f]),S.jsx(H.span,{...s,ref:u,style:{pointerEvents:"none"},children:Wa(l.value)?S.jsx(S.Fragment,{children:i}):a})});Qd.displayName=wa;var ef="SelectIcon",Ea=d.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return S.jsx(H.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});Ea.displayName=ef;var tf="SelectPortal",Sa=e=>S.jsx(ra,{asChild:!0,...e});Sa.displayName=tf;var Ze="SelectContent",xa=d.forwardRef((e,t)=>{const r=Ge(Ze,e.__scopeSelect),[n,o]=d.useState();if(ce(()=>{o(new DocumentFragment)},[]),!r.open){const a=n;return a?Wt.createPortal(S.jsx(Ca,{scope:e.__scopeSelect,children:S.jsx(Jr.Slot,{scope:e.__scopeSelect,children:S.jsx("div",{children:e.children})})}),a):null}return S.jsx(Aa,{...e,ref:t})});xa.displayName=Ze;var Ee=10,[Ca,Ye]=ht(Ze),rf="SelectContentImpl",nf=td("SelectContent.RemoveScroll"),Aa=d.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:m,avoidCollisions:g,...w}=e,E=Ge(Ze,r),[v,x]=d.useState(null),[C,O]=d.useState(null),b=J(t,P=>x(P)),[A,k]=d.useState(null),[M,j]=d.useState(null),$=dr(r),[V,W]=d.useState(!1),B=d.useRef(!1);d.useEffect(()=>{if(v)return fd(v)},[v]),Cc();const _=d.useCallback(P=>{const[X,...re]=$().map(q=>q.ref.current),[z]=re.slice(-1),Y=document.activeElement;for(const q of P)if(q===Y||(q?.scrollIntoView({block:"nearest"}),q===X&&C&&(C.scrollTop=0),q===z&&C&&(C.scrollTop=C.scrollHeight),q?.focus(),document.activeElement!==Y))return},[$,C]),F=d.useCallback(()=>_([A,v]),[_,A,v]);d.useEffect(()=>{V&&F()},[V,F]);const{onOpenChange:T,triggerPointerDownPosRef:G}=E;d.useEffect(()=>{if(v){let P={x:0,y:0};const X=z=>{P={x:Math.abs(Math.round(z.pageX)-(G.current?.x??0)),y:Math.abs(Math.round(z.pageY)-(G.current?.y??0))}},re=z=>{P.x<=10&&P.y<=10?z.preventDefault():v.contains(z.target)||T(!1),document.removeEventListener("pointermove",X),G.current=null};return G.current!==null&&(document.addEventListener("pointermove",X),document.addEventListener("pointerup",re,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",X),document.removeEventListener("pointerup",re,{capture:!0})}}},[v,T,G]),d.useEffect(()=>{const P=()=>T(!1);return window.addEventListener("blur",P),window.addEventListener("resize",P),()=>{window.removeEventListener("blur",P),window.removeEventListener("resize",P)}},[T]);const[le,ke]=Ua(P=>{const X=$().filter(Y=>!Y.disabled),re=X.find(Y=>Y.ref.current===document.activeElement),z=Va(X,P,re);z&&setTimeout(()=>z.ref.current.focus())}),We=d.useCallback((P,X,re)=>{const z=!B.current&&!re;(E.value!==void 0&&E.value===X||z)&&(k(P),z&&(B.current=!0))},[E.value]),te=d.useCallback(()=>v?.focus(),[v]),Z=d.useCallback((P,X,re)=>{const z=!B.current&&!re;(E.value!==void 0&&E.value===X||z)&&j(P)},[E.value]),Ce=n==="popper"?en:Ta,_e=Ce===en?{side:s,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:m,avoidCollisions:g}:{};return S.jsx(Ca,{scope:r,content:v,viewport:C,onViewportChange:O,itemRefCallback:We,selectedItem:A,onItemLeave:te,itemTextRefCallback:Z,focusSelectedItem:F,selectedItemText:M,position:n,isPositioned:V,searchRef:le,children:S.jsx(ba,{as:nf,allowPinchZoom:!0,children:S.jsx(yo,{asChild:!0,trapped:E.open,onMountAutoFocus:P=>{P.preventDefault()},onUnmountAutoFocus:U(o,P=>{E.trigger?.focus({preventScroll:!0}),P.preventDefault()}),children:S.jsx(po,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:P=>P.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:S.jsx(Ce,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:P=>P.preventDefault(),...w,..._e,onPlaced:()=>W(!0),ref:b,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:U(w.onKeyDown,P=>{const X=P.ctrlKey||P.altKey||P.metaKey;if(P.key==="Tab"&&P.preventDefault(),!X&&P.key.length===1&&ke(P.key),["ArrowUp","ArrowDown","Home","End"].includes(P.key)){let z=$().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);if(["ArrowUp","End"].includes(P.key)&&(z=z.slice().reverse()),["ArrowUp","ArrowDown"].includes(P.key)){const Y=P.target,q=z.indexOf(Y);z=z.slice(q+1)}setTimeout(()=>_(z)),P.preventDefault()}})})})})})})});Aa.displayName=rf;var of="SelectItemAlignedPosition",Ta=d.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,a=Ge(Ze,r),i=Ye(Ze,r),[s,l]=d.useState(null),[c,f]=d.useState(null),u=J(t,b=>f(b)),p=dr(r),h=d.useRef(!1),y=d.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:w,focusSelectedItem:E}=i,v=d.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&c&&m&&g&&w){const b=a.trigger.getBoundingClientRect(),A=c.getBoundingClientRect(),k=a.valueNode.getBoundingClientRect(),M=w.getBoundingClientRect();if(a.dir!=="rtl"){const Y=M.left-A.left,q=k.left-Y,be=b.left-q,rt=b.width+be,An=Math.max(rt,A.width),Tn=window.innerWidth-Ee,On=io(q,[Ee,Math.max(Ee,Tn-An)]);s.style.minWidth=rt+"px",s.style.left=On+"px"}else{const Y=A.right-M.right,q=window.innerWidth-k.right-Y,be=window.innerWidth-b.right-q,rt=b.width+be,An=Math.max(rt,A.width),Tn=window.innerWidth-Ee,On=io(q,[Ee,Math.max(Ee,Tn-An)]);s.style.minWidth=rt+"px",s.style.right=On+"px"}const j=p(),$=window.innerHeight-Ee*2,V=m.scrollHeight,W=window.getComputedStyle(c),B=parseInt(W.borderTopWidth,10),_=parseInt(W.paddingTop,10),F=parseInt(W.borderBottomWidth,10),T=parseInt(W.paddingBottom,10),G=B+_+V+T+F,le=Math.min(g.offsetHeight*5,G),ke=window.getComputedStyle(m),We=parseInt(ke.paddingTop,10),te=parseInt(ke.paddingBottom,10),Z=b.top+b.height/2-Ee,Ce=$-Z,_e=g.offsetHeight/2,P=g.offsetTop+_e,X=B+_+P,re=G-X;if(X<=Z){const Y=j.length>0&&g===j[j.length-1].ref.current;s.style.bottom="0px";const q=c.clientHeight-m.offsetTop-m.offsetHeight,be=Math.max(Ce,_e+(Y?te:0)+q+F),rt=X+be;s.style.height=rt+"px"}else{const Y=j.length>0&&g===j[0].ref.current;s.style.top="0px";const be=Math.max(Z,B+m.offsetTop+(Y?We:0)+_e)+re;s.style.height=be+"px",m.scrollTop=X-Z+m.offsetTop}s.style.margin=`${Ee}px 0`,s.style.minHeight=le+"px",s.style.maxHeight=$+"px",n?.(),requestAnimationFrame(()=>h.current=!0)}},[p,a.trigger,a.valueNode,s,c,m,g,w,a.dir,n]);ce(()=>v(),[v]);const[x,C]=d.useState();ce(()=>{c&&C(window.getComputedStyle(c).zIndex)},[c]);const O=d.useCallback(b=>{b&&y.current===!0&&(v(),E?.(),y.current=!1)},[v,E]);return S.jsx(sf,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:O,children:S.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x},children:S.jsx(H.div,{...o,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Ta.displayName=of;var af="SelectPopperPosition",en=d.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=Ee,...a}=e,i=Qr(r);return S.jsx(Ju,{...i,...a,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});en.displayName=af;var[sf,tn]=ht(Ze,{}),rn="SelectViewport",Oa=d.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,a=Ye(rn,r),i=tn(rn,r),s=J(t,a.onViewportChange),l=d.useRef(0);return S.jsxs(S.Fragment,{children:[S.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),S.jsx(Jr.Slot,{scope:r,children:S.jsx(H.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:U(o.onScroll,c=>{const f=c.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:p}=i;if(p?.current&&u){const h=Math.abs(l.current-f.scrollTop);if(h>0){const y=window.innerHeight-Ee*2,m=parseFloat(u.style.minHeight),g=parseFloat(u.style.height),w=Math.max(m,g);if(w<y){const E=w+h,v=Math.min(y,E),x=E-v;u.style.height=v+"px",u.style.bottom==="0px"&&(f.scrollTop=x>0?x:0,u.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});Oa.displayName=rn;var Pa="SelectGroup",[lf,cf]=ht(Pa),uf=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Gt();return S.jsx(lf,{scope:r,id:o,children:S.jsx(H.div,{role:"group","aria-labelledby":o,...n,ref:t})})});uf.displayName=Pa;var Na="SelectLabel",Ia=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=cf(Na,r);return S.jsx(H.div,{id:o.id,...n,ref:t})});Ia.displayName=Na;var fr="SelectItem",[df,Ra]=ht(fr),ka=d.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:a,...i}=e,s=Ge(fr,r),l=Ye(fr,r),c=s.value===n,[f,u]=d.useState(a??""),[p,h]=d.useState(!1),y=J(t,E=>l.itemRefCallback?.(E,n,o)),m=Gt(),g=d.useRef("touch"),w=()=>{o||(s.onValueChange(n),s.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return S.jsx(df,{scope:r,value:n,disabled:o,textId:m,isSelected:c,onItemTextChange:d.useCallback(E=>{u(v=>v||(E?.textContent??"").trim())},[]),children:S.jsx(Jr.ItemSlot,{scope:r,value:n,disabled:o,textValue:f,children:S.jsx(H.div,{role:"option","aria-labelledby":m,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:y,onFocus:U(i.onFocus,()=>h(!0)),onBlur:U(i.onBlur,()=>h(!1)),onClick:U(i.onClick,()=>{g.current!=="mouse"&&w()}),onPointerUp:U(i.onPointerUp,()=>{g.current==="mouse"&&w()}),onPointerDown:U(i.onPointerDown,E=>{g.current=E.pointerType}),onPointerMove:U(i.onPointerMove,E=>{g.current=E.pointerType,o?l.onItemLeave?.():g.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:U(i.onPointerLeave,E=>{E.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:U(i.onKeyDown,E=>{l.searchRef?.current!==""&&E.key===" "||(qd.includes(E.key)&&w(),E.key===" "&&E.preventDefault())})})})})});ka.displayName=fr;var It="SelectItemText",_a=d.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...a}=e,i=Ge(It,r),s=Ye(It,r),l=Ra(It,r),c=Jd(It,r),[f,u]=d.useState(null),p=J(t,w=>u(w),l.onItemTextChange,w=>s.itemTextRefCallback?.(w,l.value,l.disabled)),h=f?.textContent,y=d.useMemo(()=>S.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=c;return ce(()=>(m(y),()=>g(y)),[m,g,y]),S.jsxs(S.Fragment,{children:[S.jsx(H.span,{id:l.textId,...a,ref:p}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Wt.createPortal(a.children,i.valueNode):null]})});_a.displayName=It;var Ma="SelectItemIndicator",La=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return Ra(Ma,r).isSelected?S.jsx(H.span,{"aria-hidden":!0,...n,ref:t}):null});La.displayName=Ma;var nn="SelectScrollUpButton",Da=d.forwardRef((e,t)=>{const r=Ye(nn,e.__scopeSelect),n=tn(nn,e.__scopeSelect),[o,a]=d.useState(!1),i=J(t,n.onScrollButtonChange);return ce(()=>{if(r.viewport&&r.isPositioned){let s=function(){const c=l.scrollTop>0;a(c)};const l=r.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[r.viewport,r.isPositioned]),o?S.jsx(Fa,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});Da.displayName=nn;var on="SelectScrollDownButton",ja=d.forwardRef((e,t)=>{const r=Ye(on,e.__scopeSelect),n=tn(on,e.__scopeSelect),[o,a]=d.useState(!1),i=J(t,n.onScrollButtonChange);return ce(()=>{if(r.viewport&&r.isPositioned){let s=function(){const c=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<c;a(f)};const l=r.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[r.viewport,r.isPositioned]),o?S.jsx(Fa,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});ja.displayName=on;var Fa=d.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,a=Ye("SelectScrollButton",r),i=d.useRef(null),s=dr(r),l=d.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return d.useEffect(()=>()=>l(),[l]),ce(()=>{s().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),S.jsx(H.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:U(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:U(o.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:U(o.onPointerLeave,()=>{l()})})}),ff="SelectSeparator",$a=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return S.jsx(H.div,{"aria-hidden":!0,...n,ref:t})});$a.displayName=ff;var an="SelectArrow",pf=d.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Qr(r),a=Ge(an,r),i=Ye(an,r);return a.open&&i.position==="popper"?S.jsx(Qu,{...o,...n,ref:t}):null});pf.displayName=an;var mf="SelectBubbleInput",gf=d.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=d.useRef(null),a=J(n,o),i=Jn(t);return d.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&f){const u=new Event("change",{bubbles:!0});f.call(s,t),s.dispatchEvent(u)}},[i,t]),S.jsx(H.select,{...r,style:{...na,...r.style},ref:a,defaultValue:t})});gf.displayName=mf;function Wa(e){return e===""||e===void 0}function Ua(e){const t=Ve(e),r=d.useRef(""),n=d.useRef(0),o=d.useCallback(i=>{const s=r.current+i;t(s),(function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))})(s)},[t]),a=d.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,a]}function Va(e,t,r){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let i=hf(e,Math.max(a,0));o.length===1&&(i=i.filter(c=>c!==r));const l=i.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function hf(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Ba=va,bf=Ea,yf=Sa,za=xa,vf=Oa,Ha=Ia,Ga=ka,wf=_a,Ef=La,Ya=Da,Ka=ja,Xa=$a,Sf=Symbol.for("react.lazy"),pr=d[" use ".trim().toString()];function xf(e){return typeof e=="object"&&e!==null&&"then"in e}function qa(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Sf&&"_payload"in e&&xf(e._payload)}function Za(e){const t=Af(e),r=d.forwardRef((n,o)=>{let{children:a,...i}=n;qa(a)&&typeof pr=="function"&&(a=pr(a._payload));const s=d.Children.toArray(a),l=s.find(Of);if(l){const c=l.props.children,f=s.map(u=>u===l?d.Children.count(c)>1?d.Children.only(null):d.isValidElement(c)?c.props.children:null:u);return S.jsx(t,{...i,ref:o,children:d.isValidElement(c)?d.cloneElement(c,void 0,f):null})}return S.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}var Cf=Za("Slot");function Af(e){const t=d.forwardRef((r,n)=>{let{children:o,...a}=r;if(qa(o)&&typeof pr=="function"&&(o=pr(o._payload)),d.isValidElement(o)){const i=Nf(o),s=Pf(a,o.props);return o.type!==d.Fragment&&(s.ref=n?Tt(n,i):i),d.cloneElement(o,s)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Tf=Symbol("radix.slottable");function Of(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Tf}function Pf(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...s)=>{const l=a(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Nf(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var If=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Rf=If.reduce((e,t)=>{const r=Za(`Primitive.${t}`),n=d.forwardRef((o,a)=>{const{asChild:i,...s}=o,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),kf="Label",Ja=d.forwardRef((e,t)=>S.jsx(Rf.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Ja.displayName=kf;var Qa=Ja;function ae(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ie(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function sn({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function ln(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function ei(e,t,r="/"){return _f(e,t,r,!1)}function _f(e,t,r,n){let o=typeof t=="string"?ln(t):t,a=Ke(o.pathname||"/",r);if(a==null)return null;let i=ti(e);Mf(i);let s=null;for(let l=0;s==null&&l<i.length;++l){let c=Hf(a);s=Bf(i[l],c,n)}return s}function ti(e,t=[],r=[],n="",o=!1){let a=(i,s,l=o,c)=>{let f={relativePath:c===void 0?i.path||"":c,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(n)&&l)return;ae(f.relativePath.startsWith(n),`Absolute route path "${f.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(n.length)}let u=je([n,f.relativePath]),p=r.concat(f);i.children&&i.children.length>0&&(ae(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),ti(i.children,t,p,u,l)),!(i.path==null&&!i.index)&&t.push({path:u,score:Uf(u,i.index),routesMeta:p})};return e.forEach((i,s)=>{if(i.path===""||!i.path?.includes("?"))a(i,s);else for(let l of ri(i.path))a(i,s,!0,l)}),t}function ri(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return o?[a,""]:[a];let i=ri(n.join("/")),s=[];return s.push(...i.map(l=>l===""?a:[a,l].join("/"))),o&&s.push(...i),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function Mf(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Vf(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var Lf=/^:[\w-]+$/,Df=3,jf=2,Ff=1,$f=10,Wf=-2,ni=e=>e==="*";function Uf(e,t){let r=e.split("/"),n=r.length;return r.some(ni)&&(n+=Wf),t&&(n+=jf),r.filter(o=>!ni(o)).reduce((o,a)=>o+(Lf.test(a)?Df:a===""?Ff:$f),n)}function Vf(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function Bf(e,t,r=!1){let{routesMeta:n}=e,o={},a="/",i=[];for(let s=0;s<n.length;++s){let l=n[s],c=s===n.length-1,f=a==="/"?t:t.slice(a.length)||"/",u=mr({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},f),p=l.route;if(!u&&c&&r&&!n[n.length-1].route.index&&(u=mr({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},f)),!u)return null;Object.assign(o,u.params),i.push({params:o,pathname:je([a,u.pathname]),pathnameBase:Xf(je([a,u.pathnameBase])),route:p}),u.pathnameBase!=="/"&&(a=je([a,u.pathnameBase]))}return i}function mr(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=zf(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:n.reduce((c,{paramName:f,isOptional:u},p)=>{if(f==="*"){let y=s[p]||"";i=a.slice(0,a.length-y.length).replace(/(.)\/+$/,"$1")}const h=s[p];return u&&!h?c[f]=void 0:c[f]=(h||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:i,pattern:e}}function zf(e,t=!1,r=!0){Ie(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function Hf(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ie(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ke(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}var oi=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Gf=e=>oi.test(e);function Yf(e,t="/"){let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?ln(e):e,a;if(r)if(Gf(r))a=r;else{if(r.includes("//")){let i=r;r=r.replace(/\/\/+/g,"/"),Ie(!1,`Pathnames cannot have embedded double slashes - normalizing ${i} -> ${r}`)}r.startsWith("/")?a=ai(r.substring(1),"/"):a=ai(r,t)}else a=t;return{pathname:a,search:qf(n),hash:Zf(o)}}function ai(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function cn(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Kf(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function ii(e){let t=Kf(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function si(e,t,r,n=!1){let o;typeof e=="string"?o=ln(e):(o={...e},ae(!o.pathname||!o.pathname.includes("?"),cn("?","pathname","search",o)),ae(!o.pathname||!o.pathname.includes("#"),cn("#","pathname","hash",o)),ae(!o.search||!o.search.includes("#"),cn("#","search","hash",o)));let a=e===""||o.pathname==="",i=a?"/":o.pathname,s;if(i==null)s=r;else{let u=t.length-1;if(!n&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),u-=1;o.pathname=p.join("/")}s=u>=0?t[u]:"/"}let l=Yf(o,s),c=i&&i!=="/"&&i.endsWith("/"),f=(a||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}var je=e=>e.join("/").replace(/\/\/+/g,"/"),Xf=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),qf=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Zf=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Jf=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Qf(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ep(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var li=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ci(e,t){let r=e;if(typeof r!="string"||!oi.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,o=!1;if(li)try{let a=new URL(window.location.href),i=r.startsWith("//")?new URL(a.protocol+r):new URL(r),s=Ke(i.pathname,t);i.origin===a.origin&&s!=null?r=s+i.search+i.hash:o=!0}catch{Ie(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:o,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var ui=["POST","PUT","PATCH","DELETE"];new Set(ui);var tp=["GET",...ui];new Set(tp);var bt=d.createContext(null);bt.displayName="DataRouter";var gr=d.createContext(null);gr.displayName="DataRouterState";var rp=d.createContext(!1),di=d.createContext({isTransitioning:!1});di.displayName="ViewTransition";var np=d.createContext(new Map);np.displayName="Fetchers";var op=d.createContext(null);op.displayName="Await";var Se=d.createContext(null);Se.displayName="Navigation";var un=d.createContext(null);un.displayName="Location";var Fe=d.createContext({outlet:null,matches:[],isDataRoute:!1});Fe.displayName="Route";var dn=d.createContext(null);dn.displayName="RouteError";var fi="REACT_ROUTER_ERROR",ap="REDIRECT",ip="ROUTE_ERROR_RESPONSE";function sp(e){if(e.startsWith(`${fi}:${ap}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function lp(e){if(e.startsWith(`${fi}:${ip}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Jf(t.status,t.statusText,t.data)}catch{}}function cp(e,{relative:t}={}){ae(hr(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=d.useContext(Se),{hash:o,pathname:a,search:i}=Rt(e,{relative:t}),s=a;return r!=="/"&&(s=a==="/"?r:je([r,a])),n.createHref({pathname:s,search:i,hash:o})}function hr(){return d.useContext(un)!=null}function Je(){return ae(hr(),"useLocation() may be used only in the context of a <Router> component."),d.useContext(un).location}var pi="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function mi(e){d.useContext(Se).static||d.useLayoutEffect(e)}function up(){let{isDataRoute:e}=d.useContext(Fe);return e?xp():dp()}function dp(){ae(hr(),"useNavigate() may be used only in the context of a <Router> component.");let e=d.useContext(bt),{basename:t,navigator:r}=d.useContext(Se),{matches:n}=d.useContext(Fe),{pathname:o}=Je(),a=JSON.stringify(ii(n)),i=d.useRef(!1);return mi(()=>{i.current=!0}),d.useCallback((l,c={})=>{if(Ie(i.current,pi),!i.current)return;if(typeof l=="number"){r.go(l);return}let f=si(l,JSON.parse(a),o,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:je([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,a,o,e])}d.createContext(null);function Rt(e,{relative:t}={}){let{matches:r}=d.useContext(Fe),{pathname:n}=Je(),o=JSON.stringify(ii(r));return d.useMemo(()=>si(e,JSON.parse(o),n,t==="path"),[e,o,n,t])}function fp(e,t,r,n,o){ae(hr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=d.useContext(Se),{matches:i}=d.useContext(Fe),s=i[i.length-1],l=s?s.params:{},c=s?s.pathname:"/",f=s?s.pathnameBase:"/",u=s&&s.route;{let E=u&&u.path||"";bi(c,!u||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
42
+
43
+ Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let p=Je(),h;h=p;let y=h.pathname||"/",m=y;if(f!=="/"){let E=f.replace(/^\//,"").split("/");m="/"+y.replace(/^\//,"").split("/").slice(E.length).join("/")}let g=ei(e,{pathname:m});return Ie(u||g!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Ie(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),bp(g&&g.map(E=>Object.assign({},E,{params:Object.assign({},l,E.params),pathname:je([f,a.encodeLocation?a.encodeLocation(E.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?f:je([f,a.encodeLocation?a.encodeLocation(E.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),i,r,n,o)}function pp(){let e=Sp(),t=Qf(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=d.createElement(d.Fragment,null,d.createElement("p",null,"💿 Hey developer 👋"),d.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",d.createElement("code",{style:a},"ErrorBoundary")," or"," ",d.createElement("code",{style:a},"errorElement")," prop on your route.")),d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},t),r?d.createElement("pre",{style:o},r):null,i)}var mp=d.createElement(pp,null),gi=class extends d.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=lp(e.digest);r&&(e=r)}let t=e!==void 0?d.createElement(Fe.Provider,{value:this.props.routeContext},d.createElement(dn.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?d.createElement(gp,{error:e},t):t}};gi.contextType=rp;var fn=new WeakMap;function gp({children:e,error:t}){let{basename:r}=d.useContext(Se);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=sp(t.digest);if(n){let o=fn.get(t);if(o)throw o;let a=ci(n.location,r);if(li&&!fn.get(t))if(a.isExternal||n.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const i=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:n.replace}));throw fn.set(t,i),i}return d.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function hp({routeContext:e,match:t,children:r}){let n=d.useContext(bt);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),d.createElement(Fe.Provider,{value:e},r)}function bp(e,t=[],r=null,n=null,o=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,i=r?.errors;if(i!=null){let f=a.findIndex(u=>u.route.id&&i?.[u.route.id]!==void 0);ae(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,f+1))}let s=!1,l=-1;if(r)for(let f=0;f<a.length;f++){let u=a[f];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(l=f),u.route.id){let{loaderData:p,errors:h}=r,y=u.route.loader&&!p.hasOwnProperty(u.route.id)&&(!h||h[u.route.id]===void 0);if(u.route.lazy||y){s=!0,l>=0?a=a.slice(0,l+1):a=[a[0]];break}}}let c=r&&n?(f,u)=>{n(f,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:ep(r.matches),errorInfo:u})}:void 0;return a.reduceRight((f,u,p)=>{let h,y=!1,m=null,g=null;r&&(h=i&&u.route.id?i[u.route.id]:void 0,m=u.route.errorElement||mp,s&&(l<0&&p===0?(bi("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,g=null):l===p&&(y=!0,g=u.route.hydrateFallbackElement||null)));let w=t.concat(a.slice(0,p+1)),E=()=>{let v;return h?v=m:y?v=g:u.route.Component?v=d.createElement(u.route.Component,null):u.route.element?v=u.route.element:v=f,d.createElement(hp,{match:u,routeContext:{outlet:f,matches:w,isDataRoute:r!=null},children:v})};return r&&(u.route.ErrorBoundary||u.route.errorElement||p===0)?d.createElement(gi,{location:r.location,revalidation:r.revalidation,component:m,error:h,children:E(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:c}):E()},null)}function pn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yp(e){let t=d.useContext(bt);return ae(t,pn(e)),t}function vp(e){let t=d.useContext(gr);return ae(t,pn(e)),t}function wp(e){let t=d.useContext(Fe);return ae(t,pn(e)),t}function mn(e){let t=wp(e),r=t.matches[t.matches.length-1];return ae(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Ep(){return mn("useRouteId")}function Sp(){let e=d.useContext(dn),t=vp("useRouteError"),r=mn("useRouteError");return e!==void 0?e:t.errors?.[r]}function xp(){let{router:e}=yp("useNavigate"),t=mn("useNavigate"),r=d.useRef(!1);return mi(()=>{r.current=!0}),d.useCallback(async(o,a={})=>{Ie(r.current,pi),r.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...a}))},[e,t])}var hi={};function bi(e,t,r){!t&&!hi[e]&&(hi[e]=!0,Ie(!1,r))}d.memo(Cp);function Cp({routes:e,future:t,state:r,onError:n}){return fp(e,void 0,r,n,t)}var br="get",yr="application/x-www-form-urlencoded";function vr(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Ap(e){return vr(e)&&e.tagName.toLowerCase()==="button"}function Tp(e){return vr(e)&&e.tagName.toLowerCase()==="form"}function Op(e){return vr(e)&&e.tagName.toLowerCase()==="input"}function Pp(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Np(e,t){return e.button===0&&(!t||t==="_self")&&!Pp(e)}var wr=null;function Ip(){if(wr===null)try{new FormData(document.createElement("form"),0),wr=!1}catch{wr=!0}return wr}var Rp=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gn(e){return e!=null&&!Rp.has(e)?(Ie(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${yr}"`),null):e}function kp(e,t){let r,n,o,a,i;if(Tp(e)){let s=e.getAttribute("action");n=s?Ke(s,t):null,r=e.getAttribute("method")||br,o=gn(e.getAttribute("enctype"))||yr,a=new FormData(e)}else if(Ap(e)||Op(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||s.getAttribute("action");if(n=l?Ke(l,t):null,r=e.getAttribute("formmethod")||s.getAttribute("method")||br,o=gn(e.getAttribute("formenctype"))||gn(s.getAttribute("enctype"))||yr,a=new FormData(s,e),!Ip()){let{name:c,type:f,value:u}=e;if(f==="image"){let p=c?`${c}.`:"";a.append(`${p}x`,"0"),a.append(`${p}y`,"0")}else c&&a.append(c,u)}}else{if(vr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=br,n=null,o=yr,i=e}return a&&o==="text/plain"&&(i=a,a=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:a,body:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function hn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function _p(e,t,r){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname=`_root.${r}`:t&&Ke(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function Mp(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Lp(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Dp(e,t,r){let n=await Promise.all(e.map(async o=>{let a=t.routes[o.route.id];if(a){let i=await Mp(a,r);return i.links?i.links():[]}return[]}));return Wp(n.flat(1).filter(Lp).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function yi(e,t,r,n,o,a){let i=(l,c)=>r[c]?l.route.id!==r[c].route.id:!0,s=(l,c)=>r[c].pathname!==l.pathname||r[c].route.path?.endsWith("*")&&r[c].params["*"]!==l.params["*"];return a==="assets"?t.filter((l,c)=>i(l,c)||s(l,c)):a==="data"?t.filter((l,c)=>{let f=n.routes[l.route.id];if(!f||!f.hasLoader)return!1;if(i(l,c)||s(l,c))return!0;if(l.route.shouldRevalidate){let u=l.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof u=="boolean")return u}return!0}):[]}function jp(e,t,{includeHydrateFallback:r}={}){return Fp(e.map(n=>{let o=t.routes[n.route.id];if(!o)return[];let a=[o.module];return o.clientActionModule&&(a=a.concat(o.clientActionModule)),o.clientLoaderModule&&(a=a.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(a=a.concat(o.hydrateFallbackModule)),o.imports&&(a=a.concat(o.imports)),a}).flat(1))}function Fp(e){return[...new Set(e)]}function $p(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function Wp(e,t){let r=new Set;return new Set(t),e.reduce((n,o)=>{let a=JSON.stringify($p(o));return r.has(a)||(r.add(a),n.push({key:a,link:o})),n},[])}function vi(){let e=d.useContext(bt);return hn(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Up(){let e=d.useContext(gr);return hn(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var bn=d.createContext(void 0);bn.displayName="FrameworkContext";function wi(){let e=d.useContext(bn);return hn(e,"You must render this element inside a <HydratedRouter> element"),e}function Vp(e,t){let r=d.useContext(bn),[n,o]=d.useState(!1),[a,i]=d.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:c,onMouseLeave:f,onTouchStart:u}=t,p=d.useRef(null);d.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let m=w=>{w.forEach(E=>{i(E.isIntersecting)})},g=new IntersectionObserver(m,{threshold:.5});return p.current&&g.observe(p.current),()=>{g.disconnect()}}},[e]),d.useEffect(()=>{if(n){let m=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(m)}}},[n]);let h=()=>{o(!0)},y=()=>{o(!1),i(!1)};return r?e!=="intent"?[a,p,{}]:[a,p,{onFocus:kt(s,h),onBlur:kt(l,y),onMouseEnter:kt(c,h),onMouseLeave:kt(f,y),onTouchStart:kt(u,h)}]:[!1,p,{}]}function kt(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Bp({page:e,...t}){let{router:r}=vi(),n=d.useMemo(()=>ei(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?d.createElement(Hp,{page:e,matches:n,...t}):null}function zp(e){let{manifest:t,routeModules:r}=wi(),[n,o]=d.useState([]);return d.useEffect(()=>{let a=!1;return Dp(e,t,r).then(i=>{a||o(i)}),()=>{a=!0}},[e,t,r]),n}function Hp({page:e,matches:t,...r}){let n=Je(),{manifest:o,routeModules:a}=wi(),{basename:i}=vi(),{loaderData:s,matches:l}=Up(),c=d.useMemo(()=>yi(e,t,l,o,n,"data"),[e,t,l,o,n]),f=d.useMemo(()=>yi(e,t,l,o,n,"assets"),[e,t,l,o,n]),u=d.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let y=new Set,m=!1;if(t.forEach(w=>{let E=o.routes[w.route.id];!E||!E.hasLoader||(!c.some(v=>v.route.id===w.route.id)&&w.route.id in s&&a[w.route.id]?.shouldRevalidate||E.hasClientLoader?m=!0:y.add(w.route.id))}),y.size===0)return[];let g=_p(e,i,"data");return m&&y.size>0&&g.searchParams.set("_routes",t.filter(w=>y.has(w.route.id)).map(w=>w.route.id).join(",")),[g.pathname+g.search]},[i,s,n,o,c,t,e,a]),p=d.useMemo(()=>jp(f,o),[f,o]),h=zp(f);return d.createElement(d.Fragment,null,u.map(y=>d.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...r})),p.map(y=>d.createElement("link",{key:y,rel:"modulepreload",href:y,...r})),h.map(({key:y,link:m})=>d.createElement("link",{key:y,nonce:r.nonce,...m})))}function Gp(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Yp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Yp&&(window.__reactRouterVersion="7.11.0")}catch{}var Ei=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yn=d.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:o,reloadDocument:a,replace:i,state:s,target:l,to:c,preventScrollReset:f,viewTransition:u,unstable_defaultShouldRevalidate:p,...h},y){let{basename:m,unstable_useTransitions:g}=d.useContext(Se),w=typeof c=="string"&&Ei.test(c),E=ci(c,m);c=E.to;let v=cp(c,{relative:o}),[x,C,O]=Vp(n,h),b=Zp(c,{replace:i,state:s,target:l,preventScrollReset:f,relative:o,viewTransition:u,unstable_defaultShouldRevalidate:p,unstable_useTransitions:g});function A(M){t&&t(M),M.defaultPrevented||b(M)}let k=d.createElement("a",{...h,...O,href:E.absoluteURL||v,onClick:E.isExternal||a?t:A,ref:Gp(y,C),target:l,"data-discover":!w&&r==="render"?"true":void 0});return x&&!w?d.createElement(d.Fragment,null,k,d.createElement(Bp,{page:v})):k});yn.displayName="Link";var Kp=d.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:o=!1,style:a,to:i,viewTransition:s,children:l,...c},f){let u=Rt(i,{relative:c.relative}),p=Je(),h=d.useContext(gr),{navigator:y,basename:m}=d.useContext(Se),g=h!=null&&rm(u)&&s===!0,w=y.encodeLocation?y.encodeLocation(u).pathname:u.pathname,E=p.pathname,v=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;r||(E=E.toLowerCase(),v=v?v.toLowerCase():null,w=w.toLowerCase()),v&&m&&(v=Ke(v,m)||v);const x=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let C=E===w||!o&&E.startsWith(w)&&E.charAt(x)==="/",O=v!=null&&(v===w||!o&&v.startsWith(w)&&v.charAt(w.length)==="/"),b={isActive:C,isPending:O,isTransitioning:g},A=C?t:void 0,k;typeof n=="function"?k=n(b):k=[n,C?"active":null,O?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let M=typeof a=="function"?a(b):a;return d.createElement(yn,{...c,"aria-current":A,className:k,ref:f,style:M,to:i,viewTransition:s},typeof l=="function"?l(b):l)});Kp.displayName="NavLink";var Xp=d.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:a,method:i=br,action:s,onSubmit:l,relative:c,preventScrollReset:f,viewTransition:u,unstable_defaultShouldRevalidate:p,...h},y)=>{let{unstable_useTransitions:m}=d.useContext(Se),g=em(),w=tm(s,{relative:c}),E=i.toLowerCase()==="get"?"get":"post",v=typeof s=="string"&&Ei.test(s),x=C=>{if(l&&l(C),C.defaultPrevented)return;C.preventDefault();let O=C.nativeEvent.submitter,b=O?.getAttribute("formmethod")||i,A=()=>g(O||C.currentTarget,{fetcherKey:t,method:b,navigate:r,replace:o,state:a,relative:c,preventScrollReset:f,viewTransition:u,unstable_defaultShouldRevalidate:p});m&&r!==!1?d.startTransition(()=>A()):A()};return d.createElement("form",{ref:y,method:E,action:w,onSubmit:n?l:x,...h,"data-discover":!v&&e==="render"?"true":void 0})});Xp.displayName="Form";function qp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Si(e){let t=d.useContext(bt);return ae(t,qp(e)),t}function Zp(e,{target:t,replace:r,state:n,preventScrollReset:o,relative:a,viewTransition:i,unstable_defaultShouldRevalidate:s,unstable_useTransitions:l}={}){let c=up(),f=Je(),u=Rt(e,{relative:a});return d.useCallback(p=>{if(Np(p,t)){p.preventDefault();let h=r!==void 0?r:sn(f)===sn(u),y=()=>c(e,{replace:h,state:n,preventScrollReset:o,relative:a,viewTransition:i,unstable_defaultShouldRevalidate:s});l?d.startTransition(()=>y()):y()}},[f,c,u,r,n,t,e,o,a,i,s,l])}var Jp=0,Qp=()=>`__${String(++Jp)}__`;function em(){let{router:e}=Si("useSubmit"),{basename:t}=d.useContext(Se),r=Ep(),n=e.fetch,o=e.navigate;return d.useCallback(async(a,i={})=>{let{action:s,method:l,encType:c,formData:f,body:u}=kp(a,t);if(i.navigate===!1){let p=i.fetcherKey||Qp();await n(p,r,i.action||s,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:f,body:u,formMethod:i.method||l,formEncType:i.encType||c,flushSync:i.flushSync})}else await o(i.action||s,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:f,body:u,formMethod:i.method||l,formEncType:i.encType||c,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[n,o,t,r])}function tm(e,{relative:t}={}){let{basename:r}=d.useContext(Se),n=d.useContext(Fe);ae(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),a={...Rt(e||".",{relative:t})},i=Je();if(e==null){a.search=i.search;let s=new URLSearchParams(a.search),l=s.getAll("index");if(l.some(f=>f==="")){s.delete("index"),l.filter(u=>u).forEach(u=>s.append("index",u));let f=s.toString();a.search=f?`?${f}`:""}}return(!e||e===".")&&o.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(a.pathname=a.pathname==="/"?r:je([r,a.pathname])),sn(a)}function rm(e,{relative:t}={}){let r=d.useContext(di);ae(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Si("useViewTransitionState"),o=Rt(e,{relative:t});if(!r.isTransitioning)return!1;let a=Ke(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=Ke(r.nextLocation.pathname,n)||r.nextLocation.pathname;return mr(o.pathname,i)!=null||mr(o.pathname,a)!=null}var vn="rovingFocusGroup.onEntryFocus",nm={bubbles:!1,cancelable:!0},_t="RovingFocusGroup",[wn,xi,om]=lo(_t),[am,Ci]=st(_t,[om]),[im,sm]=am(_t),Ai=d.forwardRef((e,t)=>S.jsx(wn.Provider,{scope:e.__scopeRovingFocusGroup,children:S.jsx(wn.Slot,{scope:e.__scopeRovingFocusGroup,children:S.jsx(lm,{...e,ref:t})})}));Ai.displayName=_t;var lm=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:f=!1,...u}=e,p=d.useRef(null),h=J(t,p),y=co(a),[m,g]=Ir({prop:i,defaultProp:s??null,onChange:l,caller:_t}),[w,E]=d.useState(!1),v=Ve(c),x=xi(r),C=d.useRef(!1),[O,b]=d.useState(0);return d.useEffect(()=>{const A=p.current;if(A)return A.addEventListener(vn,v),()=>A.removeEventListener(vn,v)},[v]),S.jsx(im,{scope:r,orientation:n,dir:y,loop:o,currentTabStopId:m,onItemFocus:d.useCallback(A=>g(A),[g]),onItemShiftTab:d.useCallback(()=>E(!0),[]),onFocusableItemAdd:d.useCallback(()=>b(A=>A+1),[]),onFocusableItemRemove:d.useCallback(()=>b(A=>A-1),[]),children:S.jsx(H.div,{tabIndex:w||O===0?-1:0,"data-orientation":n,...u,ref:h,style:{outline:"none",...e.style},onMouseDown:U(e.onMouseDown,()=>{C.current=!0}),onFocus:U(e.onFocus,A=>{const k=!C.current;if(A.target===A.currentTarget&&k&&!w){const M=new CustomEvent(vn,nm);if(A.currentTarget.dispatchEvent(M),!M.defaultPrevented){const j=x().filter(_=>_.focusable),$=j.find(_=>_.active),V=j.find(_=>_.id===m),B=[$,V,...j].filter(Boolean).map(_=>_.ref.current);Pi(B,f)}}C.current=!1}),onBlur:U(e.onBlur,()=>E(!1))})})}),Ti="RovingFocusGroupItem",Oi=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,children:i,...s}=e,l=Gt(),c=a||l,f=sm(Ti,r),u=f.currentTabStopId===c,p=xi(r),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:m}=f;return d.useEffect(()=>{if(n)return h(),()=>y()},[n,h,y]),S.jsx(wn.ItemSlot,{scope:r,id:c,focusable:n,active:o,children:S.jsx(H.span,{tabIndex:u?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:U(e.onMouseDown,g=>{n?f.onItemFocus(c):g.preventDefault()}),onFocus:U(e.onFocus,()=>f.onItemFocus(c)),onKeyDown:U(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){f.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const w=dm(g,f.orientation,f.dir);if(w!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let v=p().filter(x=>x.focusable).map(x=>x.ref.current);if(w==="last")v.reverse();else if(w==="prev"||w==="next"){w==="prev"&&v.reverse();const x=v.indexOf(g.currentTarget);v=f.loop?fm(v,x+1):v.slice(x+1)}setTimeout(()=>Pi(v))}}),children:typeof i=="function"?i({isCurrentTabStop:u,hasTabStop:m!=null}):i})})});Oi.displayName=Ti;var cm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function um(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dm(e,t,r){const n=um(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return cm[n]}function Pi(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function fm(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var pm=Ai,mm=Oi;function gm(e,t){return d.useReducer((r,n)=>t[r][n]??r,e)}var Ni=e=>{const{present:t,children:r}=e,n=hm(t),o=typeof r=="function"?r({present:n.isPresent}):d.Children.only(r),a=J(n.ref,bm(o));return typeof r=="function"||n.isPresent?d.cloneElement(o,{ref:a}):null};Ni.displayName="Presence";function hm(e){const[t,r]=d.useState(),n=d.useRef(null),o=d.useRef(e),a=d.useRef("none"),i=e?"mounted":"unmounted",[s,l]=gm(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const c=Er(n.current);a.current=s==="mounted"?c:"none"},[s]),ce(()=>{const c=n.current,f=o.current;if(f!==e){const p=a.current,h=Er(c);e?l("MOUNT"):h==="none"||c?.display==="none"?l("UNMOUNT"):l(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),ce(()=>{if(t){let c;const f=t.ownerDocument.defaultView??window,u=h=>{const m=Er(n.current).includes(CSS.escape(h.animationName));if(h.target===t&&m&&(l("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=h=>{h.target===t&&(a.current=Er(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{f.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:d.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Er(e){return e?.animationName||"none"}function bm(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Sr="Tabs",[ym]=st(Sr,[Ci]),Ii=Ci(),[vm,En]=ym(Sr),Ri=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...c}=e,f=co(s),[u,p]=Ir({prop:n,onChange:o,defaultProp:a??"",caller:Sr});return S.jsx(vm,{scope:r,baseId:Gt(),value:u,onValueChange:p,orientation:i,dir:f,activationMode:l,children:S.jsx(H.div,{dir:f,"data-orientation":i,...c,ref:t})})});Ri.displayName=Sr;var ki="TabsList",_i=d.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...o}=e,a=En(ki,r),i=Ii(r);return S.jsx(pm,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:n,children:S.jsx(H.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});_i.displayName=ki;var Mi="TabsTrigger",Li=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:o=!1,...a}=e,i=En(Mi,r),s=Ii(r),l=Fi(i.baseId,n),c=$i(i.baseId,n),f=n===i.value;return S.jsx(mm,{asChild:!0,...s,focusable:!o,active:f,children:S.jsx(H.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":c,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:U(e.onMouseDown,u=>{!o&&u.button===0&&u.ctrlKey===!1?i.onValueChange(n):u.preventDefault()}),onKeyDown:U(e.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&i.onValueChange(n)}),onFocus:U(e.onFocus,()=>{const u=i.activationMode!=="manual";!f&&!o&&u&&i.onValueChange(n)})})})});Li.displayName=Mi;var Di="TabsContent",ji=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:o,children:a,...i}=e,s=En(Di,r),l=Fi(s.baseId,n),c=$i(s.baseId,n),f=n===s.value,u=d.useRef(f);return d.useEffect(()=>{const p=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(p)},[]),S.jsx(Ni,{present:o||f,children:({present:p})=>S.jsx(H.div,{"data-state":f?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!p,id:c,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:u.current?"0s":void 0},children:p&&a})})});ji.displayName=Di;function Fi(e,t){return`${e}-trigger-${t}`}function $i(e,t){return`${e}-content-${t}`}var wm=Ri,Wi=_i,Ui=Li,Vi=ji;function Q(...e){return Gl(Rn(e))}const Em=zt("",{variants:{variant:{default:"",hero:"relative overflow-hidden",feature:"bg-white dark:bg-gray-800",cta:"relative overflow-hidden",testimonial:"bg-gray-50 dark:bg-gray-900",footer:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 border-t"},spacing:{none:"",xs:"py-2",sm:"py-3",md:"py-4",lg:"py-6",xl:"py-8","2xl":"py-12","3xl":"py-16","4xl":"py-20","5xl":"py-24"},background:{none:"bg-transparent",default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/50 dark:to-purple-900/50","gradient-primary":"bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-blue-900/50 dark:to-indigo-900/50","gradient-secondary":"bg-gradient-to-br from-green-50 to-blue-100 dark:from-green-900/50 dark:to-blue-900/50","gradient-tertiary":"bg-gradient-to-r from-emerald-50 to-teal-50 dark:from-gray-800 dark:to-gray-900","gradient-vibrant":"bg-gradient-to-br from-blue-800 to-purple-800 dark:from-blue-900 dark:to-purple-900"}},defaultVariants:{variant:"default",spacing:"3xl",background:"none"}}),Sm={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl",full:"max-w-full"},xr=({children:e,variant:t="default",spacing:r="3xl",background:n="none",maxWidth:o="7xl",className:a,containerClassName:i,as:s="section",id:l,fullWidth:c=!1})=>{const f=c?e:S.jsx("div",{className:Q(Sm[o],"mx-auto px-4 sm:px-6 lg:px-8",i),children:e});return K.createElement(s,{id:l,className:Q(Em({variant:t,spacing:r,background:n}),a)},f)},ee={typography:{family:{body:"font-sans"},weight:{body:"font-normal",emphasis:"font-medium"},decoration:{none:"no-underline",underline:"underline"},underlineOffset:{medium:"underline-offset-2"}}},Mt={link:{default:()=>`${ee.typography.decoration.underline} ${ee.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150`,subtle:()=>`${ee.typography.decoration.none} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 hover:${ee.typography.decoration.underline} hover:${ee.typography.underlineOffset.medium} transition-all duration-150`,muted:()=>`${ee.typography.decoration.underline} ${ee.typography.underlineOffset.medium} text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 transition-colors duration-150`,external:()=>`${ee.typography.decoration.underline} ${ee.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150 inline-flex items-center gap-1`},label:{default:()=>`${ee.typography.family.body} text-sm ${ee.typography.weight.emphasis} text-gray-900 dark:text-white`,required:()=>`${ee.typography.family.body} text-sm ${ee.typography.weight.emphasis} text-gray-900 dark:text-white after:content-['*'] after:ml-0.5 after:text-red-500`,optional:()=>`${ee.typography.family.body} text-sm ${ee.typography.weight.body} text-gray-600 dark:text-gray-400`,helper:()=>`${ee.typography.family.body} text-sm ${ee.typography.weight.body} text-gray-500 dark:text-gray-500`,error:()=>`${ee.typography.family.body} text-sm ${ee.typography.weight.body} text-red-600 dark:text-red-400`,success:()=>`${ee.typography.family.body} text-sm ${ee.typography.weight.body} text-green-600 dark:text-green-400`}},de={button:{primary:{default:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",fullWidth:()=>"bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 border-transparent focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-blue-600 dark:hover:bg-blue-700 dark:active:bg-blue-800 dark:text-white dark:focus-visible:ring-blue-400 flex items-center justify-center w-full rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},secondary:{default:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-gray-100 text-gray-900 hover:bg-gray-200 active:bg-gray-300 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-700 dark:active:bg-gray-600 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},outline:{default:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8",large:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center rounded-md px-6 py-3 text-base font-medium transition-colors duration-200 h-12",withIcon:()=>"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-900 border border-gray-300 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-50 dark:border-gray-600 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"},destructive:{default:()=>"bg-red-600 text-white hover:bg-red-700 active:bg-red-800 border-transparent focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-red-600 dark:hover:bg-red-700 dark:active:bg-red-800 dark:text-white inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",outline:()=>"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border border-red-300 focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:hover:bg-red-900/20 dark:text-red-400 dark:border-red-800 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-red-600 text-white hover:bg-red-700 active:bg-red-800 border-transparent focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-red-600 dark:hover:bg-red-700 dark:active:bg-red-800 dark:text-white inline-flex items-center justify-center rounded-md px-3 py-1.5 text-xs font-medium transition-colors duration-200 h-8"},ghost:{default:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",small:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md px-2 py-1 text-xs font-medium transition-colors duration-200 h-8",icon:()=>"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-700 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:bg-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 inline-flex items-center justify-center rounded-md p-2 transition-colors duration-200 h-10 w-10"},link:{default:()=>"bg-transparent hover:bg-transparent active:bg-transparent text-blue-600 border-transparent underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:no-underline dark:text-blue-400 inline-flex items-center justify-center rounded-md px-0 py-0 text-sm font-medium transition-colors duration-200",muted:()=>"bg-transparent hover:bg-transparent active:bg-transparent text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 border-transparent underline-offset-4 hover:underline focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:no-underline inline-flex items-center justify-center rounded-md px-0 py-0 text-sm font-medium transition-colors duration-200"},gradient:{primary:()=>"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",secondary:()=>"bg-gradient-to-r from-gray-100 to-gray-200 hover:from-gray-200 hover:to-gray-300 text-gray-900 border-transparent focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",success:()=>"bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-green-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-all duration-200"},web3:{wallet:()=>"bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-900 dark:text-gray-100 focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200",connect:()=>"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white border-transparent shadow-lg hover:shadow-xl focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-all duration-200",disconnect:()=>"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border border-red-300 focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed dark:hover:bg-red-900/20 dark:text-red-400 dark:border-red-800 inline-flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors duration-200"}},input:{default:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",search:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",error:()=>"bg-gray-50 dark:bg-gray-800 border-red-300 dark:border-red-700 text-gray-900 dark:text-gray-100 focus:border-red-500 focus:ring-red-500 block w-full rounded-md px-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",small:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-2 py-1.5 text-xs placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",large:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md px-4 py-3 text-base placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",withIcon:()=>"bg-gray-50 dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 focus:border-blue-500 focus:ring-blue-500 dark:focus:border-blue-400 dark:focus:ring-blue-400 block w-full rounded-md pl-10 pr-3 py-2 text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2"},navigation:{tabs:{root:()=>"",list:()=>"inline-flex h-10 items-center justify-center rounded-md bg-gray-100 dark:bg-gray-800 p-1 text-gray-500 dark:text-gray-400",listUnderlined:()=>"flex border-b border-gray-200 dark:border-gray-700",listPills:()=>"flex space-x-1 bg-gray-100 dark:bg-gray-800 rounded-lg p-1",trigger:()=>"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-gray-950 data-[state=active]:shadow-sm dark:ring-offset-gray-950 dark:focus-visible:ring-blue-400 dark:data-[state=active]:bg-gray-950 dark:data-[state=active]:text-gray-50",triggerUnderlined:()=>"inline-flex items-center justify-center whitespace-nowrap px-4 py-2 text-sm font-medium text-gray-500 dark:text-gray-400 border-b-2 border-transparent hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300 dark:hover:border-gray-600 focus:outline-none focus:text-blue-600 focus:border-blue-600 dark:focus:text-blue-400 dark:focus:border-blue-400 data-[state=active]:text-blue-600 data-[state=active]:border-blue-600 dark:data-[state=active]:text-blue-400 dark:data-[state=active]:border-blue-400 transition-colors",triggerPills:()=>"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-white dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 data-[state=active]:bg-white data-[state=active]:text-gray-900 data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-700 dark:data-[state=active]:text-gray-100 transition-all",content:()=>"mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 dark:ring-offset-gray-950 dark:focus-visible:ring-blue-400"}},overlays:{dropdown:{container:()=>"relative inline-block",trigger:()=>"inline-flex justify-center items-center bg-transparent border-0 text-gray-900 dark:text-gray-100 focus:outline-none transition-colors",triggerBordered:()=>"inline-flex justify-center items-center bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors",menu:()=>"absolute z-50 w-56 bg-white dark:bg-gray-800 rounded-md shadow-lg focus:outline-none transition-all duration-200",menuSmall:()=>"w-40",menuLarge:()=>"w-72",menuAuto:()=>"w-auto min-w-40",menuTop:()=>"bottom-full mb-1",menuBottom:()=>"top-full mt-1",menuLeft:()=>"right-0",menuRight:()=>"left-0",menuEntering:()=>"opacity-0 scale-95 transform origin-top",menuEntered:()=>"opacity-100 scale-100 transform origin-top",menuExiting:()=>"opacity-0 scale-95 transform origin-top",itemContainer:()=>"py-1 px-1",item:()=>"flex items-center w-full text-left px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-blue-50 dark:hover:bg-blue-900/20 hover:text-blue-700 dark:hover:text-blue-300 transition-all duration-200 cursor-pointer hover:shadow-sm rounded-sm",itemActive:()=>"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 shadow-sm",itemDisabled:()=>"text-gray-400 dark:text-gray-600 cursor-not-allowed hover:bg-transparent hover:text-gray-400 dark:hover:text-gray-600",divider:()=>"my-1 border-t border-gray-200 dark:border-gray-700",header:()=>"px-4 py-2 text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide",itemIcon:()=>"mr-3 h-4 w-4 flex-shrink-0",itemIconRight:()=>"ml-auto h-4 w-4 flex-shrink-0"}}};K.createContext(null);var yt={},vt={},Bi={},zi;function xm(){return zi||(zi=1,Object.defineProperty(Bi,"__esModule",{value:!0})),Bi}var Hi={},R={},Gi;function wt(){if(Gi)return R;Gi=1,Object.defineProperty(R,"__esModule",{value:!0}),R.Currency=R.ErrorType=R.FeatureFlag=R.EmailValidationState=R.PlatformType=R.ConnectionState=R.ConnectionType=R.EmailSortCriteria=R.SortOrder=R.EmailAddressType=R.InfoType=R.NotificationType=R.RequestStatus=R.SubscriptionAction=R.EmailAction=R.MediumView=R.MobileView=R.EmailComposeType=R.FontSize=R.Theme=R.Chain=R.ChainType=R.AuthStatus=void 0;var e;(function(b){b.CONNECTED="connected",b.DISCONNECTED="disconnected",b.VERIFIED="verified"})(e||(R.AuthStatus=e={}));var t;(function(b){b.EVM="evm",b.SOLANA="solana"})(t||(R.ChainType=t={}));var r;(function(b){b.ETH_MAINNET="eth-mainnet",b.ETH_SEPOLIA="eth-sepolia",b.ETH_GOERLI="eth-goerli",b.POLYGON_MAINNET="polygon-mainnet",b.POLYGON_MUMBAI="polygon-mumbai",b.POLYGON_AMOY="polygon-amoy",b.OPTIMISM_MAINNET="optimism-mainnet",b.OPTIMISM_SEPOLIA="optimism-sepolia",b.OPTIMISM_GOERLI="optimism-goerli",b.ARBITRUM_MAINNET="arbitrum-mainnet",b.ARBITRUM_SEPOLIA="arbitrum-sepolia",b.ARBITRUM_GOERLI="arbitrum-goerli",b.BASE_MAINNET="base-mainnet",b.BASE_SEPOLIA="base-sepolia",b.BASE_GOERLI="base-goerli",b.AVALANCHE_MAINNET="avalanche-mainnet",b.AVALANCHE_FUJI="avalanche-fuji",b.BNB_MAINNET="bnb-mainnet",b.BNB_TESTNET="bnb-testnet",b.GNOSIS_MAINNET="gnosis-mainnet",b.GNOSIS_CHIADO="gnosis-chiado",b.CELO_MAINNET="celo-mainnet",b.CELO_ALFAJORES="celo-alfajores",b.ZKSYNC_MAINNET="zksync-mainnet",b.ZKSYNC_SEPOLIA="zksync-sepolia",b.LINEA_MAINNET="linea-mainnet",b.LINEA_SEPOLIA="linea-sepolia",b.SCROLL_MAINNET="scroll-mainnet",b.SCROLL_SEPOLIA="scroll-sepolia",b.MONAD_MAINNET="monad-mainnet",b.MONAD_TESTNET="monad-testnet",b.STORY_MAINNET="story-mainnet",b.STORY_TESTNET="story-testnet",b.PLUME_MAINNET="plume-mainnet",b.PLUME_TESTNET="plume-testnet",b.NEXUS_MAINNET="nexus-mainnet",b.NEXUS_TESTNET="nexus-testnet",b.HYPEREVM_MAINNET="hyperevm-mainnet",b.HYPEREVM_TESTNET="hyperevm-testnet",b.SONIC_MAINNET="sonic-mainnet",b.SONIC_TESTNET="sonic-testnet",b.SONIC_BLAZE="sonic-blaze",b.UNICHAIN_MAINNET="unichain-mainnet",b.UNICHAIN_SEPOLIA="unichain-sepolia",b.WORLD_MAINNET="world-mainnet",b.XDC_MAINNET="xdc-mainnet",b.INK_TESTNET="ink-testnet",b.FETCH_MAINNET="fetch-mainnet",b.FETCH_TESTNET="fetch-testnet",b.GENSYN_MAINNET="gensyn-mainnet",b.GENSYN_TESTNET="gensyn-testnet",b.RITUAL_MAINNET="ritual-mainnet",b.RITUAL_TESTNET="ritual-testnet",b.SOLANA_MAINNET="solana-mainnet",b.SOLANA_DEVNET="solana-devnet",b.SOLANA_TESTNET="solana-testnet",b.EVM_LOCAL="evm-local",b.SOLANA_LOCAL="solana-local"})(r||(R.Chain=r={}));var n;(function(b){b.LIGHT="light",b.DARK="dark",b.SYSTEM="system"})(n||(R.Theme=n={}));var o;(function(b){b.SMALL="small",b.MEDIUM="medium",b.LARGE="large"})(o||(R.FontSize=o={}));var a;(function(b){b.NEW="new",b.REPLY="reply",b.REPLY_ALL="replyAll",b.FORWARD="forward"})(a||(R.EmailComposeType=a={}));var i;(function(b){b.EMAIL_ADDRESSES="emailAddresses",b.FOLDERS="folders",b.EMAILS="emails",b.EMAIL_BODY="emailBody"})(i||(R.MobileView=i={}));var s;(function(b){b.LEFT="left",b.RIGHT="right"})(s||(R.MediumView=s={}));var l;(function(b){b.OPEN="open",b.REPLY="reply",b.FORWARD="forward",b.DELETE="delete",b.STAR="star",b.UNSTAR="unstar",b.MARK_READ="mark_read",b.MARK_UNREAD="mark_unread"})(l||(R.EmailAction=l={}));var c;(function(b){b.VIEW="view",b.PURCHASE="purchase",b.CANCEL="cancel",b.RESTORE="restore"})(c||(R.SubscriptionAction=c={}));var f;(function(b){b.IDLE="idle",b.LOADING="loading",b.SUCCESS="success",b.ERROR="error"})(f||(R.RequestStatus=f={}));var u;(function(b){b.INFO="info",b.SUCCESS="success",b.WARNING="warning",b.ERROR="error"})(u||(R.NotificationType=u={}));var p;(function(b){b.INFO="info",b.SUCCESS="success",b.WARNING="warning",b.ERROR="error"})(p||(R.InfoType=p={}));var h;(function(b){b.DIRECT="direct",b.ENS="ens",b.SNS="sns",b.CUSTOM="custom"})(h||(R.EmailAddressType=h={}));var y;(function(b){b.ASC="asc",b.DESC="desc"})(y||(R.SortOrder=y={}));var m;(function(b){b.DATE="date",b.SUBJECT="subject",b.FROM="from",b.SIZE="size"})(m||(R.EmailSortCriteria=m={}));var g;(function(b){b.UNKNOWN="unknown",b.NONE="none",b.WIFI="wifi",b.CELLULAR_2G="2g",b.CELLULAR_3G="3g",b.CELLULAR_4G="4g",b.CELLULAR_5G="5g",b.ETHERNET="ethernet"})(g||(R.ConnectionType=g={}));var w;(function(b){b.UNKNOWN="unknown",b.DISCONNECTED="disconnected",b.CONNECTING="connecting",b.CONNECTED="connected",b.RECONNECTING="reconnecting",b.VERIFIED="verified",b.LIMITED="limited",b.ERROR="error"})(w||(R.ConnectionState=w={}));var E;(function(b){b.WEB="web",b.REACT_NATIVE="react_native",b.DESKTOP="desktop"})(E||(R.PlatformType=E={}));var v;(function(b){b.VALID="valid",b.INVALID="invalid",b.PENDING="pending",b.UNKNOWN="unknown"})(v||(R.EmailValidationState=v={}));var x;(function(b){b.AI_SEARCH="ai_search",b.SMART_COMPOSE="smart_compose",b.ADVANCED_FILTERS="advanced_filters",b.DARK_MODE="dark_mode",b.NOTIFICATIONS="notifications",b.ANALYTICS="analytics"})(x||(R.FeatureFlag=x={}));var C;(function(b){b.NETWORK="network",b.AUTH="auth",b.VALIDATION="validation",b.PERMISSION="permission",b.UNKNOWN="unknown"})(C||(R.ErrorType=C={}));var O;return(function(b){b.USD="USD",b.EUR="EUR",b.GBP="GBP",b.CAD="CAD",b.AUD="AUD"})(O||(R.Currency=O={})),R}var Yi={},Ki;function Cm(){return Ki||(Ki=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getWalletConnectionState=e.isWalletVerified=e.isWalletConnected=void 0;const t=wt(),r=a=>a!=null&&!!a.walletAddress;e.isWalletConnected=r;const n=a=>(0,e.isWalletConnected)(a)&&!!a.message&&!!a.signature;e.isWalletVerified=n;const o=a=>(0,e.isWalletConnected)(a)?(0,e.isWalletVerified)(a)?t.ConnectionState.VERIFIED:t.ConnectionState.CONNECTED:t.ConnectionState.DISCONNECTED;e.getWalletConnectionState=o})(Yi)),Yi}var Xi;function Am(){return Xi||(Xi=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isWalletVerified=e.isWalletConnected=e.getWalletConnectionState=e.Theme=e.SubscriptionAction=e.SortOrder=e.RequestStatus=e.PlatformType=e.NotificationType=e.MobileView=e.MediumView=e.InfoType=e.FontSize=e.FeatureFlag=e.ErrorType=e.EmailValidationState=e.EmailSortCriteria=e.EmailComposeType=e.EmailAddressType=e.EmailAction=e.Currency=e.ConnectionType=e.ConnectionState=e.ChainType=e.Chain=e.AuthStatus=void 0;var t=wt();Object.defineProperty(e,"AuthStatus",{enumerable:!0,get:function(){return t.AuthStatus}}),Object.defineProperty(e,"Chain",{enumerable:!0,get:function(){return t.Chain}}),Object.defineProperty(e,"ChainType",{enumerable:!0,get:function(){return t.ChainType}}),Object.defineProperty(e,"ConnectionState",{enumerable:!0,get:function(){return t.ConnectionState}}),Object.defineProperty(e,"ConnectionType",{enumerable:!0,get:function(){return t.ConnectionType}}),Object.defineProperty(e,"Currency",{enumerable:!0,get:function(){return t.Currency}}),Object.defineProperty(e,"EmailAction",{enumerable:!0,get:function(){return t.EmailAction}}),Object.defineProperty(e,"EmailAddressType",{enumerable:!0,get:function(){return t.EmailAddressType}}),Object.defineProperty(e,"EmailComposeType",{enumerable:!0,get:function(){return t.EmailComposeType}}),Object.defineProperty(e,"EmailSortCriteria",{enumerable:!0,get:function(){return t.EmailSortCriteria}}),Object.defineProperty(e,"EmailValidationState",{enumerable:!0,get:function(){return t.EmailValidationState}}),Object.defineProperty(e,"ErrorType",{enumerable:!0,get:function(){return t.ErrorType}}),Object.defineProperty(e,"FeatureFlag",{enumerable:!0,get:function(){return t.FeatureFlag}}),Object.defineProperty(e,"FontSize",{enumerable:!0,get:function(){return t.FontSize}}),Object.defineProperty(e,"InfoType",{enumerable:!0,get:function(){return t.InfoType}}),Object.defineProperty(e,"MediumView",{enumerable:!0,get:function(){return t.MediumView}}),Object.defineProperty(e,"MobileView",{enumerable:!0,get:function(){return t.MobileView}}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:function(){return t.NotificationType}}),Object.defineProperty(e,"PlatformType",{enumerable:!0,get:function(){return t.PlatformType}}),Object.defineProperty(e,"RequestStatus",{enumerable:!0,get:function(){return t.RequestStatus}}),Object.defineProperty(e,"SortOrder",{enumerable:!0,get:function(){return t.SortOrder}}),Object.defineProperty(e,"SubscriptionAction",{enumerable:!0,get:function(){return t.SubscriptionAction}}),Object.defineProperty(e,"Theme",{enumerable:!0,get:function(){return t.Theme}});var r=Cm();Object.defineProperty(e,"getWalletConnectionState",{enumerable:!0,get:function(){return r.getWalletConnectionState}}),Object.defineProperty(e,"isWalletConnected",{enumerable:!0,get:function(){return r.isWalletConnected}}),Object.defineProperty(e,"isWalletVerified",{enumerable:!0,get:function(){return r.isWalletVerified}})})(Hi)),Hi}var qi={},me={},Zi;function Sn(){if(Zi)return me;Zi=1,Object.defineProperty(me,"__esModule",{value:!0}),me.PROTOCOL_CONSTANTS=me.TransactionStatus=me.MessageType=void 0,me.isSolanaAddress=r,me.isEvmAddress=n,me.isSolanaRecipient=o,me.isEvmRecipient=a;var e;(function(i){i.STANDARD="standard",i.PRIORITY="priority",i.PREPARED_STANDARD="prepared_standard",i.PREPARED_PRIORITY="prepared_priority"})(e||(me.MessageType=e={}));var t;(function(i){i.SUCCESS="success",i.FAILED="failed",i.PENDING="pending"})(t||(me.TransactionStatus=t={}));function r(i){try{if(i.length<32||i.length>44||!/^[1-9A-HJ-NP-Za-km-z]+$/.test(i))return!1;try{return require("bs58").decode(i).length===32}catch{return!0}}catch{return!1}}function n(i){return/^0x[a-fA-F0-9]{40}$/.test(i)}function o(i){return r(i)}function a(i){return n(i)}return me.PROTOCOL_CONSTANTS={SEND_FEE:100000n,CLAIM_PERIOD:1440*60*60,REVENUE_SHARES:{SENDER:90,OWNER:10},USDC_DECIMALS:6,MAX_LENGTHS:{SUBJECT:200,BODY:2e3,MAIL_ID:100}},me}var Qe={},ge={},Ji;function Qi(){if(Ji)return ge;Ji=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.AddressType=void 0,ge.isENSName=n,ge.isSNSName=o,ge.getAddressType=a,ge.isValidWalletAddress=i,ge.isValidSignature=s,ge.parseEmailAddress=l,ge.formatWalletAddress=c,ge.getChainDisplayName=f;const e=wt(),t=Sn();var r;(function(u){u.EVMAddress="EVMAddress",u.SolanaAddress="SolanaAddress",u.ENSName="ENSName",u.SNSName="SNSName"})(r||(ge.AddressType=r={}));function n(u){const p=u.toLowerCase();if(!p.endsWith(".eth")&&!p.endsWith(".box"))return!1;const h=(p.endsWith(".eth"),p.slice(0,-4));if(h.length===0)return!1;const y=h.split("."),m=/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;for(const g of y)if(g.length===0||!m.test(g)||g.includes("--"))return!1;return!0}function o(u){const p=u.toLowerCase(),h=[".sol",".abc",".bonk",".poor",".gm",".dao",".defi",".web3"].find(w=>p.endsWith(w));if(!h)return!1;const y=p.slice(0,-h.length);if(y.length===0)return!1;const m=y.split("."),g=/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;for(const w of m)if(w.length===0||!g.test(w)||w.includes("--"))return!1;return!0}function a(u,p=void 0){if((0,t.isEvmAddress)(u))return r.EVMAddress;if((0,t.isSolanaAddress)(u))return r.SolanaAddress;if(p&&u.includes(".")){if(p===r.EVMAddress)return r.ENSName;if(p===r.SolanaAddress)return r.SNSName}}function i(u,p){if(!u||typeof u!="string")return!1;const h=a(u);switch(p){case e.ChainType.EVM:return h===r.EVMAddress||h===r.ENSName;case e.ChainType.SOLANA:return h===r.SolanaAddress||h===r.SNSName;default:return!!h}}function s(u,p){if(!u||typeof u!="string")return!1;switch(p){case e.ChainType.EVM:return/^0x[a-fA-F0-9]{130}$/.test(u);case e.ChainType.SOLANA:return/^[1-9A-HJ-NP-Za-km-z]{87,88}$/.test(u);default:return u.length>50}}function l(u){if(!u||typeof u!="string")return;const p=u.split("@");if(p.length!==2)return;const[h,y]=p;if(!h||!y)return;const m=a(h);return{address:h,domain:y,type:m}}function c(u){if(!u||u.length<10)return u;const p=a(u);return(p===r.ENSName||p===r.SNSName)&&u.length<=20?u:`${u.slice(0,6)}...${u.slice(-4)}`}function f(u){if(!u)return"Unknown Chain";switch(u){case e.ChainType.EVM:return"EVM Chain";case e.ChainType.SOLANA:return"Solana";default:return"Blockchain"}}return ge}var es;function Tm(){if(es)return Qe;es=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.validateDomain=t,Qe.validateMessage=r,Qe.validateAddress=n,Qe.validateAmount=o;const e=Qi();function t(a){if(!a||a.length===0)throw new Error("Domain cannot be empty");if(a.length>100)throw new Error("Domain cannot exceed 100 characters");if(!/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a))throw new Error("Invalid domain format");return!0}function r(a,i){if(!a||a.length===0)throw new Error("Message subject cannot be empty");if(a.length>200)throw new Error("Message subject cannot exceed 200 characters");if(!i||i.length===0)throw new Error("Message body cannot be empty");if(i.length>1e4)throw new Error("Message body cannot exceed 10000 characters");return!0}function n(a,i){if(!a||a.length===0)throw new Error("Address cannot be empty");if(!(0,e.isValidWalletAddress)(a,i))throw new Error(`Invalid ${i} address format`);return!0}function o(a){if(a==null||a===""||typeof a=="string"&&a.trim()==="")throw new Error("Invalid amount format");let i;try{if(typeof a=="string"){if(!/^-?\d+$/.test(a.trim()))throw new Error("Invalid amount format");i=BigInt(a)}else if(typeof a=="number"){if(!Number.isFinite(a))throw new Error("Invalid amount format");i=BigInt(Math.floor(a))}else if(typeof a=="bigint")i=a;else throw new Error("Invalid amount format")}catch{throw new Error("Invalid amount format")}if(i<0n)throw new Error("Amount cannot be negative");return i}return Qe}var ts;function Om(){return ts||(ts=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateMessage=e.validateDomain=e.validateAmount=e.validateAddress=e.isSolanaRecipient=e.isSolanaAddress=e.isEvmRecipient=e.isEvmAddress=e.TransactionStatus=e.PROTOCOL_CONSTANTS=e.MessageType=void 0;var t=Sn();Object.defineProperty(e,"MessageType",{enumerable:!0,get:function(){return t.MessageType}}),Object.defineProperty(e,"PROTOCOL_CONSTANTS",{enumerable:!0,get:function(){return t.PROTOCOL_CONSTANTS}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return t.TransactionStatus}}),Object.defineProperty(e,"isEvmAddress",{enumerable:!0,get:function(){return t.isEvmAddress}}),Object.defineProperty(e,"isEvmRecipient",{enumerable:!0,get:function(){return t.isEvmRecipient}}),Object.defineProperty(e,"isSolanaAddress",{enumerable:!0,get:function(){return t.isSolanaAddress}}),Object.defineProperty(e,"isSolanaRecipient",{enumerable:!0,get:function(){return t.isSolanaRecipient}});var r=Tm();Object.defineProperty(e,"validateAddress",{enumerable:!0,get:function(){return r.validateAddress}}),Object.defineProperty(e,"validateAmount",{enumerable:!0,get:function(){return r.validateAmount}}),Object.defineProperty(e,"validateDomain",{enumerable:!0,get:function(){return r.validateDomain}}),Object.defineProperty(e,"validateMessage",{enumerable:!0,get:function(){return r.validateMessage}})})(qi)),qi}var rs={},Lt={},ns;function Pm(){if(ns)return Lt;ns=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.StorageType=void 0;var e;return(function(t){t.LOCAL_STORAGE="localStorage",t.SESSION_STORAGE="sessionStorage",t.ASYNC_STORAGE="asyncStorage",t.MEMORY="memory"})(e||(Lt.StorageType=e={})),Lt}var os;function Nm(){return os||(os=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StorageType=void 0;var t=Pm();Object.defineProperty(e,"StorageType",{enumerable:!0,get:function(){return t.StorageType}})})(rs)),rs}var as={},et={},is;function Im(){if(is)return et;is=1,Object.defineProperty(et,"__esModule",{value:!0}),et.AnalyticsEventBuilder=et.AnalyticsEvent=void 0;var e;(function(r){r.USER_LOGIN="user_login",r.USER_LOGOUT="user_logout",r.USER_SIGNUP="user_signup",r.EMAIL_SENT="email_sent",r.EMAIL_RECEIVED="email_received",r.EMAIL_OPENED="email_opened",r.EMAIL_REPLY="email_reply",r.EMAIL_FORWARD="email_forward",r.EMAIL_DELETE="email_delete",r.EMAIL_STAR="email_star",r.EMAIL_COMPOSE="email_compose",r.EMAIL_CLICKED="email_clicked",r.PAGE_VIEW="page_view",r.SCREEN_VIEW="screen_view",r.FOLDER_SWITCH="folder_switch",r.SUBSCRIPTION_VIEW="subscription_view",r.SUBSCRIPTION_PURCHASE="subscription_purchase",r.SUBSCRIPTION_CANCEL="subscription_cancel",r.SEARCH_PERFORMED="search_performed",r.SETTINGS_CHANGED="settings_changed",r.ERROR_OCCURRED="error_occurred",r.AB_TEST_VIEWED="ab_test_viewed",r.AB_TEST_CONVERTED="ab_test_converted",r.CUSTOM_EVENT="custom_event"})(e||(et.AnalyticsEvent=e={}));class t{static emailAction(n,o,a){return{action:n,email_id:o,folder:a,timestamp:Date.now()}}static pageView(n,o){return{page_name:n,page_path:o,timestamp:Date.now()}}static error(n,o,a){return{error_type:n,error_message:o,page_name:a,timestamp:Date.now()}}static subscription(n,o,a,i){return{action:n,plan_type:o,amount:a,currency:i,timestamp:Date.now()}}static engagement(n,o,a){return{feature:n,interaction:o,duration:a,timestamp:Date.now()}}static performance(n,o,a){return{metric:n,value:o,context:a,timestamp:Date.now()}}}return et.AnalyticsEventBuilder=t,et}var ss={},ls;function Rm(){return ls||(ls=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProcessedEventName=e.ContractType=e.ChainType=void 0;var t=wt();Object.defineProperty(e,"ChainType",{enumerable:!0,get:function(){return t.ChainType}});var r;(function(o){o.Mailer="Mailer",o.MailService="MailService"})(r||(e.ContractType=r={}));var n;(function(o){o.MailSent="MailSent",o.PreparedMailSent="PreparedMailSent",o.DelegationSet="DelegationSet",o.DelegationCleared="DelegationCleared",o.DomainRegistered="DomainRegistered",o.DomainExtended="DomainExtended",o.DomainReleased="DomainReleased",o.FeeUpdated="FeeUpdated",o.SharesRecorded="SharesRecorded",o.RecipientClaimed="RecipientClaimed",o.OwnerClaimed="OwnerClaimed",o.ExpiredSharesClaimed="ExpiredSharesClaimed"})(n||(e.ProcessedEventName=n={}))})(ss)),ss}var Dt={},cs;function km(){if(cs)return Dt;cs=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.NetworkError=void 0;class e extends Error{constructor(r,n,o,a){super(r),this.name="NetworkError",this.status=n,this.statusText=o,this.response=a}}return Dt.NetworkError=e,Dt}var jt={},us;function _m(){if(us)return jt;us=1,Object.defineProperty(jt,"__esModule",{value:!0}),jt.WalletType=void 0;var e;return(function(t){t.METAMASK="metamask",t.PHANTOM="phantom",t.COINBASE="coinbase",t.WALLETCONNECT="walletconnect",t.INJECTED="injected"})(e||(jt.WalletType=e={})),jt}var ds;function Mm(){return ds||(ds=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WalletType=e.NetworkError=e.ProcessedEventName=e.ContractType=e.ChainType=e.AnalyticsEventBuilder=e.AnalyticsEvent=void 0;var t=Im();Object.defineProperty(e,"AnalyticsEvent",{enumerable:!0,get:function(){return t.AnalyticsEvent}}),Object.defineProperty(e,"AnalyticsEventBuilder",{enumerable:!0,get:function(){return t.AnalyticsEventBuilder}});var r=Rm();Object.defineProperty(e,"ChainType",{enumerable:!0,get:function(){return r.ChainType}}),Object.defineProperty(e,"ContractType",{enumerable:!0,get:function(){return r.ContractType}}),Object.defineProperty(e,"ProcessedEventName",{enumerable:!0,get:function(){return r.ProcessedEventName}});var n=km();Object.defineProperty(e,"NetworkError",{enumerable:!0,get:function(){return n.NetworkError}});var o=_m();Object.defineProperty(e,"WalletType",{enumerable:!0,get:function(){return o.WalletType}})})(as)),as}var Et={},Ft={},fs;function Lm(){if(fs)return Ft;fs=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.RateLimitPeriodType=void 0;var e;return(function(t){t.HOUR="hour",t.DAY="day",t.MONTH="month"})(e||(Ft.RateLimitPeriodType=e={})),Ft}var ps;function Dm(){return ps||(ps=1,(function(e){var t=Et&&Et.__createBinding||(Object.create?(function(n,o,a,i){i===void 0&&(i=a);var s=Object.getOwnPropertyDescriptor(o,a);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[a]}}),Object.defineProperty(n,i,s)}):(function(n,o,a,i){i===void 0&&(i=a),n[i]=o[a]})),r=Et&&Et.__exportStar||function(n,o){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(o,a)&&t(o,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(Lm(),e)})(Et)),Et}var St={},$e={},ms;function gs(){if(ms)return $e;ms=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.InvitationStatus=$e.EntityRole=$e.EntityType=void 0;var e;(function(n){n.PERSONAL="personal",n.ORGANIZATION="organization"})(e||($e.EntityType=e={}));var t;(function(n){n.OWNER="owner",n.ADMIN="admin",n.MEMBER="member"})(t||($e.EntityRole=t={}));var r;return(function(n){n.PENDING="pending",n.ACCEPTED="accepted",n.DECLINED="declined",n.EXPIRED="expired"})(r||($e.InvitationStatus=r={})),$e}var hs={},bs;function jm(){return bs||(bs=1,Object.defineProperty(hs,"__esModule",{value:!0})),hs}var ys={},vs;function Fm(){return vs||(vs=1,Object.defineProperty(ys,"__esModule",{value:!0})),ys}var ws={},Es;function $m(){return Es||(Es=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ROLE_PERMISSIONS=void 0,e.getPermissionsForRole=a,e.hasPermission=i;const t=gs(),r={canViewEntity:!0,canEditEntity:!0,canDeleteEntity:!0,canManageMembers:!0,canInviteMembers:!0,canManageProjects:!0,canCreateProjects:!0,canViewProjects:!0,canManageApiKeys:!0,canViewApiKeys:!0},n={canViewEntity:!0,canEditEntity:!0,canDeleteEntity:!1,canManageMembers:!1,canInviteMembers:!1,canManageProjects:!0,canCreateProjects:!0,canViewProjects:!0,canManageApiKeys:!0,canViewApiKeys:!0},o={canViewEntity:!0,canEditEntity:!1,canDeleteEntity:!1,canManageMembers:!1,canInviteMembers:!1,canManageProjects:!1,canCreateProjects:!1,canViewProjects:!0,canManageApiKeys:!1,canViewApiKeys:!0};e.ROLE_PERMISSIONS={[t.EntityRole.OWNER]:r,[t.EntityRole.ADMIN]:n,[t.EntityRole.MEMBER]:o};function a(s){return e.ROLE_PERMISSIONS[s]}function i(s,l){return e.ROLE_PERMISSIONS[s][l]}})(ws)),ws}var Ss;function Wm(){return Ss||(Ss=1,(function(e){var t=St&&St.__createBinding||(Object.create?(function(n,o,a,i){i===void 0&&(i=a);var s=Object.getOwnPropertyDescriptor(o,a);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[a]}}),Object.defineProperty(n,i,s)}):(function(n,o,a,i){i===void 0&&(i=a),n[i]=o[a]})),r=St&&St.__exportStar||function(n,o){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(o,a)&&t(o,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(gs(),e),r(jm(),e),r(Fm(),e),r($m(),e)})(St)),St}var xs;function Cs(){return xs||(xs=1,(function(e){var t=vt&&vt.__createBinding||(Object.create?(function(n,o,a,i){i===void 0&&(i=a);var s=Object.getOwnPropertyDescriptor(o,a);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[a]}}),Object.defineProperty(n,i,s)}):(function(n,o,a,i){i===void 0&&(i=a),n[i]=o[a]})),r=vt&&vt.__exportStar||function(n,o){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(o,a)&&t(o,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(xm(),e),r(Am(),e),r(Om(),e),r(Nm(),e),r(Mm(),e),r(Dm(),e),r(Wm(),e)})(vt)),vt}var xt={},As={},$t={},Ts;function Um(){if(Ts)return $t;Ts=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.Web3UsernameValidator=void 0;const e=wt();class t{static validate(n){if(n){if(this.EVM_REGEX.test(n))return{name:null,address:n.toLowerCase(),chainType:e.ChainType.EVM};if(!n.startsWith("0x")&&n.length>=32&&n.length<=44&&this.BASE58_REGEX.test(n))return{name:null,address:n,chainType:e.ChainType.SOLANA};if((n.toLowerCase().endsWith(".eth")||n.toLowerCase().endsWith(".box"))&&n.length>=5&&this.ENS_REGEX.test(n))return{name:n.toLowerCase(),address:null,chainType:e.ChainType.EVM};if(n.toLowerCase().includes(".")){const o=n.toLowerCase().split(".");if(o.length===2){const[a,i]=o;if(this.VALID_SNS_TLDS.includes(i)&&this.SNS_NAME_REGEX.test(a)&&a.length>=1)return{name:n.toLowerCase(),address:null,chainType:e.ChainType.SOLANA}}}}}static isValidEVMAddress(n){return this.EVM_REGEX.test(n)}static isValidSolanaAddress(n){return!n.startsWith("0x")&&n.length>=32&&n.length<=44&&this.BASE58_REGEX.test(n)}static isValidENSName(n){return(n.toLowerCase().endsWith(".eth")||n.toLowerCase().endsWith(".box"))&&n.length>=5&&this.ENS_REGEX.test(n)}static isValidSNSName(n){if(!n.toLowerCase().includes("."))return!1;const o=n.toLowerCase().split(".");if(o.length!==2)return!1;const[a,i]=o;return this.VALID_SNS_TLDS.includes(i)&&this.SNS_NAME_REGEX.test(a)&&a.length>=1}}return $t.Web3UsernameValidator=t,t.EVM_REGEX=/^0x[a-fA-F0-9]{40}$/,t.BASE58_REGEX=/^[1-9A-HJ-NP-Za-km-z]+$/,t.ENS_REGEX=/^[a-zA-Z0-9]([a-zA-Z0-9]|(-[a-zA-Z0-9]))*\.(eth|box)$/i,t.SNS_NAME_REGEX=/^[a-zA-Z0-9]([a-zA-Z0-9]|(-[a-zA-Z0-9]))*$/,t.VALID_SNS_TLDS=["sol","abc","backpack","bonk","coin","dao","defi","gm","poor","pump","shdw","stepn","web3"],$t}var Os={},Ps;function Vm(){return Ps||(Ps=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseJson=e.createAssertion=e.isUrl=e.isEmail=e.isValidDate=e.isErrorResponse=e.isSuccessResponse=e.isApiResponse=e.optional=e.validateArray=e.hasRequiredProperties=e.isNullish=e.isArray=e.isObject=e.isBoolean=e.isNumber=e.isString=e.createValidator=void 0;const t=(v,x)=>C=>{try{return v(C)?{isValid:!0,data:C}:{isValid:!1,error:`Invalid ${x}`,data:null}}catch(O){return{isValid:!1,error:`Validation error for ${x}: ${O instanceof Error?O.message:"Unknown error"}`,data:null}}};e.createValidator=t;const r=v=>typeof v=="string";e.isString=r;const n=v=>typeof v=="number"&&!isNaN(v);e.isNumber=n;const o=v=>typeof v=="boolean";e.isBoolean=o;const a=v=>typeof v=="object"&&v!==null&&!Array.isArray(v);e.isObject=a;const i=v=>Array.isArray(v);e.isArray=i;const s=v=>v==null;e.isNullish=s;const l=(v,x)=>(0,e.isObject)(v)?x.every(C=>C in v):!1;e.hasRequiredProperties=l;const c=(v,x)=>(0,e.isArray)(v)?v.every(x):!1;e.validateArray=c;const f=v=>x=>x===void 0||v(x);e.optional=f;const u=v=>(0,e.isObject)(v)&&(0,e.isBoolean)(v.success);e.isApiResponse=u;const p=(v,x)=>!(0,e.isApiResponse)(v)||!v.success?!1:x&&"data"in v?x(v.data):!0;e.isSuccessResponse=p;const h=v=>(0,e.isApiResponse)(v)&&!v.success&&"error"in v&&(0,e.isString)(v.error);e.isErrorResponse=h;const y=v=>{if(!(0,e.isString)(v))return!1;const x=new Date(v);return!isNaN(x.getTime())};e.isValidDate=y;const m=v=>(0,e.isString)(v)?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(v):!1;e.isEmail=m;const g=v=>{if(!(0,e.isString)(v))return!1;try{return new URL(v),!0}catch{return!1}};e.isUrl=g;const w=(v,x)=>(C,O=x)=>{if(!v(C))throw new TypeError(`Invalid ${O}: expected ${x}`)};e.createAssertion=w;const E=(v,x)=>{try{const C=JSON.parse(v);return x?x(C)?{isValid:!0,data:C}:{isValid:!1,error:"Parsed JSON does not match expected type",data:null}:{isValid:!0,data:C}}catch(C){return{isValid:!1,error:`JSON parse error: ${C instanceof Error?C.message:"Unknown error"}`,data:null}}};e.parseJson=E})(Os)),Os}var Ns;function Bm(){return Ns||(Ns=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateArray=e.parseJson=e.optional=e.isValidDate=e.isUrl=e.isSuccessResponse=e.isString=e.isObject=e.isNumber=e.isNullish=e.isErrorResponse=e.isEmail=e.isBoolean=e.isArray=e.isApiResponse=e.hasRequiredProperties=e.createValidator=e.createAssertion=e.Web3UsernameValidator=void 0;var t=Um();Object.defineProperty(e,"Web3UsernameValidator",{enumerable:!0,get:function(){return t.Web3UsernameValidator}});var r=Vm();Object.defineProperty(e,"createAssertion",{enumerable:!0,get:function(){return r.createAssertion}}),Object.defineProperty(e,"createValidator",{enumerable:!0,get:function(){return r.createValidator}}),Object.defineProperty(e,"hasRequiredProperties",{enumerable:!0,get:function(){return r.hasRequiredProperties}}),Object.defineProperty(e,"isApiResponse",{enumerable:!0,get:function(){return r.isApiResponse}}),Object.defineProperty(e,"isArray",{enumerable:!0,get:function(){return r.isArray}}),Object.defineProperty(e,"isBoolean",{enumerable:!0,get:function(){return r.isBoolean}}),Object.defineProperty(e,"isEmail",{enumerable:!0,get:function(){return r.isEmail}}),Object.defineProperty(e,"isErrorResponse",{enumerable:!0,get:function(){return r.isErrorResponse}}),Object.defineProperty(e,"isNullish",{enumerable:!0,get:function(){return r.isNullish}}),Object.defineProperty(e,"isNumber",{enumerable:!0,get:function(){return r.isNumber}}),Object.defineProperty(e,"isObject",{enumerable:!0,get:function(){return r.isObject}}),Object.defineProperty(e,"isString",{enumerable:!0,get:function(){return r.isString}}),Object.defineProperty(e,"isSuccessResponse",{enumerable:!0,get:function(){return r.isSuccessResponse}}),Object.defineProperty(e,"isUrl",{enumerable:!0,get:function(){return r.isUrl}}),Object.defineProperty(e,"isValidDate",{enumerable:!0,get:function(){return r.isValidDate}}),Object.defineProperty(e,"optional",{enumerable:!0,get:function(){return r.optional}}),Object.defineProperty(e,"parseJson",{enumerable:!0,get:function(){return r.parseJson}}),Object.defineProperty(e,"validateArray",{enumerable:!0,get:function(){return r.validateArray}})})(As)),As}var Is={},he={},Rs;function zm(){if(Rs)return he;Rs=1,Object.defineProperty(he,"__esModule",{value:!0}),he.createMultiChainId=e,he.createUserMultiChainId=t,he.createChainStatsId=r,he.createDelegationId=n,he.normalizeAddress=o,he.formatBigInt=a,he.isZeroAddress=i,he.isTestNet=s,he.validateEventArgs=l;function e(c,f,u){return`${c}-${f}-${u}`}function t(c,f){return`${c}-${f.toLowerCase()}`}function r(c){return`${c}-global`}function n(c,f){return`${c.toLowerCase()}-${f}`}function o(c){return c.toLowerCase()}function a(c,f=18){const u=BigInt(10**f),p=c/u,h=c%u;return h===0n?p.toString():`${p}.${h.toString().padStart(f,"0").replace(/0+$/,"")}`}function i(c){return c.toLowerCase()==="0x0000000000000000000000000000000000000000"}function s(c){const f=new Set([31337,11155111,80001,80002,421614,11155420,84532,43113]),u=new Set([-102,-103,-104]);return f.has(c)||u.has(c)}function l(c,f){for(const u of f)if(c[u]===void 0||c[u]===null)return console.error(`❌ Missing required field: ${String(u)}`),!1;return!0}return he}var ks;function Hm(){return ks||(ks=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateEventArgs=e.normalizeAddress=e.isZeroAddress=e.isTestNet=e.formatBigInt=e.createUserMultiChainId=e.createMultiChainId=e.createDelegationId=e.createChainStatsId=e.isSolanaAddress=e.isEvmAddress=e.parseEmailAddress=e.isValidWalletAddress=e.isValidSignature=e.isSNSName=e.isENSName=e.getChainDisplayName=e.getAddressType=e.formatWalletAddress=e.AddressType=void 0;var t=Qi();Object.defineProperty(e,"AddressType",{enumerable:!0,get:function(){return t.AddressType}}),Object.defineProperty(e,"formatWalletAddress",{enumerable:!0,get:function(){return t.formatWalletAddress}}),Object.defineProperty(e,"getAddressType",{enumerable:!0,get:function(){return t.getAddressType}}),Object.defineProperty(e,"getChainDisplayName",{enumerable:!0,get:function(){return t.getChainDisplayName}}),Object.defineProperty(e,"isENSName",{enumerable:!0,get:function(){return t.isENSName}}),Object.defineProperty(e,"isSNSName",{enumerable:!0,get:function(){return t.isSNSName}}),Object.defineProperty(e,"isValidSignature",{enumerable:!0,get:function(){return t.isValidSignature}}),Object.defineProperty(e,"isValidWalletAddress",{enumerable:!0,get:function(){return t.isValidWalletAddress}}),Object.defineProperty(e,"parseEmailAddress",{enumerable:!0,get:function(){return t.parseEmailAddress}});var r=Sn();Object.defineProperty(e,"isEvmAddress",{enumerable:!0,get:function(){return r.isEvmAddress}}),Object.defineProperty(e,"isSolanaAddress",{enumerable:!0,get:function(){return r.isSolanaAddress}});var n=zm();Object.defineProperty(e,"createChainStatsId",{enumerable:!0,get:function(){return n.createChainStatsId}}),Object.defineProperty(e,"createDelegationId",{enumerable:!0,get:function(){return n.createDelegationId}}),Object.defineProperty(e,"createMultiChainId",{enumerable:!0,get:function(){return n.createMultiChainId}}),Object.defineProperty(e,"createUserMultiChainId",{enumerable:!0,get:function(){return n.createUserMultiChainId}}),Object.defineProperty(e,"formatBigInt",{enumerable:!0,get:function(){return n.formatBigInt}}),Object.defineProperty(e,"isTestNet",{enumerable:!0,get:function(){return n.isTestNet}}),Object.defineProperty(e,"isZeroAddress",{enumerable:!0,get:function(){return n.isZeroAddress}}),Object.defineProperty(e,"normalizeAddress",{enumerable:!0,get:function(){return n.normalizeAddress}}),Object.defineProperty(e,"validateEventArgs",{enumerable:!0,get:function(){return n.validateEventArgs}})})(Is)),Is}var _s={},xe={},Ms;function Gm(){if(Ms)return xe;Ms=1,Object.defineProperty(xe,"__esModule",{value:!0}),xe.generateAuthMessage=t,xe.isAuthExpired=r,xe.getAuthStatusText=n,xe.canAccessProtectedFeatures=o,xe.isAuthStatusConnected=a,xe.generateNonce=i,xe.extractNonceFromMessage=s,xe.isValidNonce=l;const e=wt();function t(c,f){const u=f||`${Date.now()}-${Math.random().toString(36).substr(2,9)}`;return`Authenticate with ${c}
44
+ Nonce: ${u}`}function r(c,f=24){const u=new Date(c.getTime()+f*60*60*1e3);return new Date>u}function n(c){switch(c){case e.AuthStatus.DISCONNECTED:return"Not connected";case e.AuthStatus.CONNECTED:return"Connected - Please verify";case e.AuthStatus.VERIFIED:return"Authenticated";default:return"Unknown status"}}function o(c){return c===e.AuthStatus.VERIFIED}function a(c){return c===e.AuthStatus.CONNECTED||c===e.AuthStatus.VERIFIED}function i(){return`${Date.now()}-${Math.random().toString(36).substr(2,9)}`}function s(c){const f=c.match(/Nonce:\s*(.+)$/m);return f?f[1].trim():void 0}function l(c){if(!c||typeof c!="string"||c.length<10)return!1;const f=c.split("-");if(f.length>=2){const u=parseInt(f[0],10);if(!isNaN(u)){const p=Date.now()-864e5;if(u<p)return!1}}return!0}return xe}var Ls;function Ym(){return Ls||(Ls=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isValidNonce=e.isAuthStatusConnected=e.isAuthExpired=e.getAuthStatusText=e.generateNonce=e.generateAuthMessage=e.extractNonceFromMessage=e.canAccessProtectedFeatures=void 0;var t=Gm();Object.defineProperty(e,"canAccessProtectedFeatures",{enumerable:!0,get:function(){return t.canAccessProtectedFeatures}}),Object.defineProperty(e,"extractNonceFromMessage",{enumerable:!0,get:function(){return t.extractNonceFromMessage}}),Object.defineProperty(e,"generateAuthMessage",{enumerable:!0,get:function(){return t.generateAuthMessage}}),Object.defineProperty(e,"generateNonce",{enumerable:!0,get:function(){return t.generateNonce}}),Object.defineProperty(e,"getAuthStatusText",{enumerable:!0,get:function(){return t.getAuthStatusText}}),Object.defineProperty(e,"isAuthExpired",{enumerable:!0,get:function(){return t.isAuthExpired}}),Object.defineProperty(e,"isAuthStatusConnected",{enumerable:!0,get:function(){return t.isAuthStatusConnected}}),Object.defineProperty(e,"isValidNonce",{enumerable:!0,get:function(){return t.isValidNonce}})})(_s)),_s}var Ds={},js={},Fs;function Km(){return Fs||(Fs=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CLAIM_PERIOD_DAYS=e.USDC_DECIMALS=void 0,e.formatUSDC=t,e.parseUSDC=r,e.USDC_DECIMALS=6,e.CLAIM_PERIOD_DAYS=60;function t(n){return(n/Math.pow(10,e.USDC_DECIMALS)).toFixed(2)}function r(n){return Math.floor(parseFloat(n)*Math.pow(10,e.USDC_DECIMALS))}})(js)),js}var Re={},$s;function Xm(){if($s)return Re;$s=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.formatEmailDate=e,Re.formatTimestamp=t,Re.formatRelativeTime=r,Re.parseDate=n,Re.isDateInRange=o,Re.addDays=a,Re.addHours=i;function e(s){const l=typeof s=="string"?new Date(s):s;if(isNaN(l.getTime()))return"Invalid date";const c=new Date,f=c.getTime()-l.getTime(),u=Math.floor(f/(1e3*60*60*24));return u===0?l.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}):u===1?"Yesterday":u<7?l.toLocaleDateString("en-US",{weekday:"long"}):l.getFullYear()===c.getFullYear()?l.toLocaleDateString("en-US",{month:"short",day:"numeric"}):l.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function t(s){return new Date(s).toISOString()}function r(s){const l=typeof s=="string"||typeof s=="number"?new Date(s):s;if(isNaN(l.getTime()))return"Invalid date";const c=new Date().getTime()-l.getTime(),f=Math.floor(c/1e3),u=Math.floor(f/60),p=Math.floor(u/60),h=Math.floor(p/24),y=Math.floor(h/7),m=Math.floor(h/30),g=Math.floor(h/365);return f<60?"just now":u<60?u===1?"1 minute ago":`${u} minutes ago`:p<24?p===1?"1 hour ago":`${p} hours ago`:h<7?h===1?"1 day ago":`${h} days ago`:y<4?y===1?"1 week ago":`${y} weeks ago`:m<12?m===1?"1 month ago":`${m} months ago`:g===1?"1 year ago":`${g} years ago`}function n(s){try{const l=new Date(s);return isNaN(l.getTime())?null:l}catch{return null}}function o(s,l,c){return s>=l&&s<=c}function a(s,l){const c=new Date(s);return c.setDate(c.getDate()+l),c}function i(s,l){const c=new Date(s);return c.setHours(c.getHours()+l),c}return Re}var oe={},Ws;function qm(){if(Ws)return oe;Ws=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.truncate=e,oe.capitalize=t,oe.toTitleCase=r,oe.toKebabCase=n,oe.toCamelCase=o,oe.toSnakeCase=a,oe.normalizeWhitespace=i,oe.isBlank=s,oe.isNotBlank=l,oe.escapeHtml=c,oe.stripHtml=f,oe.getInitials=u,oe.formatBytes=p,oe.randomString=h,oe.pluralize=y,oe.formatNumber=m;function e(g,w,E="..."){return!g||g.length<=w?g:g.slice(0,w-E.length)+E}function t(g){return g&&g.charAt(0).toUpperCase()+g.slice(1)}function r(g){return g&&g.toLowerCase().split(" ").map(w=>t(w)).join(" ")}function n(g){return g&&g.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function o(g){return g&&g.replace(/[-_\s]+(.)?/g,(w,E)=>E?E.toUpperCase():"").replace(/^./,w=>w.toLowerCase())}function a(g){return g&&g.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[\s-]+/g,"_").toLowerCase()}function i(g){return g&&g.replace(/\s+/g," ").trim()}function s(g){return!g||g.trim().length===0}function l(g){return!s(g)}function c(g){if(!g)return g;const w={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return g.replace(/[&<>"']/g,E=>w[E])}function f(g){return g&&g.replace(/<[^>]*>/g,"")}function u(g,w=2){return g?g.trim().split(/\s+/).slice(0,w).map(E=>E.charAt(0).toUpperCase()).join(""):""}function p(g,w=2){if(g===0)return"0 Bytes";const E=1024,v=w<0?0:w,x=["Bytes","KB","MB","GB","TB","PB"],C=Math.floor(Math.log(g)/Math.log(E));return parseFloat((g/Math.pow(E,C)).toFixed(v))+" "+x[C]}function h(g,w="alphanumeric"){let E;switch(w){case"alpha":E="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";break;case"numeric":E="0123456789";break;case"alphanumeric":E="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";break;case"hex":E="0123456789abcdef";break;default:E=w}let v="";for(let x=0;x<g;x++)v+=E.charAt(Math.floor(Math.random()*E.length));return v}function y(g,w,E){return g===1?w:E||`${w}s`}function m(g){return g.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}return oe}var Us;function Zm(){return Us||(Us=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.truncate=e.toTitleCase=e.toSnakeCase=e.toKebabCase=e.toCamelCase=e.stripHtml=e.randomString=e.pluralize=e.normalizeWhitespace=e.isNotBlank=e.isBlank=e.getInitials=e.formatNumber=e.formatBytes=e.escapeHtml=e.capitalize=e.parseDate=e.isDateInRange=e.formatTimestamp=e.formatRelativeTime=e.formatEmailDate=e.addHours=e.addDays=e.parseUSDC=e.formatUSDC=e.USDC_DECIMALS=e.CLAIM_PERIOD_DAYS=void 0;var t=Km();Object.defineProperty(e,"CLAIM_PERIOD_DAYS",{enumerable:!0,get:function(){return t.CLAIM_PERIOD_DAYS}}),Object.defineProperty(e,"USDC_DECIMALS",{enumerable:!0,get:function(){return t.USDC_DECIMALS}}),Object.defineProperty(e,"formatUSDC",{enumerable:!0,get:function(){return t.formatUSDC}}),Object.defineProperty(e,"parseUSDC",{enumerable:!0,get:function(){return t.parseUSDC}});var r=Xm();Object.defineProperty(e,"addDays",{enumerable:!0,get:function(){return r.addDays}}),Object.defineProperty(e,"addHours",{enumerable:!0,get:function(){return r.addHours}}),Object.defineProperty(e,"formatEmailDate",{enumerable:!0,get:function(){return r.formatEmailDate}}),Object.defineProperty(e,"formatRelativeTime",{enumerable:!0,get:function(){return r.formatRelativeTime}}),Object.defineProperty(e,"formatTimestamp",{enumerable:!0,get:function(){return r.formatTimestamp}}),Object.defineProperty(e,"isDateInRange",{enumerable:!0,get:function(){return r.isDateInRange}}),Object.defineProperty(e,"parseDate",{enumerable:!0,get:function(){return r.parseDate}});var n=qm();Object.defineProperty(e,"capitalize",{enumerable:!0,get:function(){return n.capitalize}}),Object.defineProperty(e,"escapeHtml",{enumerable:!0,get:function(){return n.escapeHtml}}),Object.defineProperty(e,"formatBytes",{enumerable:!0,get:function(){return n.formatBytes}}),Object.defineProperty(e,"formatNumber",{enumerable:!0,get:function(){return n.formatNumber}}),Object.defineProperty(e,"getInitials",{enumerable:!0,get:function(){return n.getInitials}}),Object.defineProperty(e,"isBlank",{enumerable:!0,get:function(){return n.isBlank}}),Object.defineProperty(e,"isNotBlank",{enumerable:!0,get:function(){return n.isNotBlank}}),Object.defineProperty(e,"normalizeWhitespace",{enumerable:!0,get:function(){return n.normalizeWhitespace}}),Object.defineProperty(e,"pluralize",{enumerable:!0,get:function(){return n.pluralize}}),Object.defineProperty(e,"randomString",{enumerable:!0,get:function(){return n.randomString}}),Object.defineProperty(e,"stripHtml",{enumerable:!0,get:function(){return n.stripHtml}}),Object.defineProperty(e,"toCamelCase",{enumerable:!0,get:function(){return n.toCamelCase}}),Object.defineProperty(e,"toKebabCase",{enumerable:!0,get:function(){return n.toKebabCase}}),Object.defineProperty(e,"toSnakeCase",{enumerable:!0,get:function(){return n.toSnakeCase}}),Object.defineProperty(e,"toTitleCase",{enumerable:!0,get:function(){return n.toTitleCase}}),Object.defineProperty(e,"truncate",{enumerable:!0,get:function(){return n.truncate}})})(Ds)),Ds}var Vs={},D={},Bs;function Jm(){if(Bs)return D;Bs=1,Object.defineProperty(D,"__esModule",{value:!0}),D.Z_INDEX=D.ANIMATION=D.NETWORK_IDS=D.WALLET_NAMES=D.CONTACT_INFO=D.ROUTES=D.SUCCESS_MESSAGES=D.ERROR_MESSAGES=D.TIME_FORMAT=D.SUBSCRIPTION_TIERS=D.EMAIL_CONFIG=D.STORAGE_KEYS=D.CHAIN_TYPE=D.AUTH_STATUS=D.API_RETRY_DELAY=D.API_RETRY_ATTEMPTS=D.API_TIMEOUT=void 0;const e=3e4;D.API_TIMEOUT=e;const t=3;D.API_RETRY_ATTEMPTS=t;const r=1e3;D.API_RETRY_DELAY=r;const n={DISCONNECTED:"disconnected",CONNECTED:"connected",VERIFIED:"verified"};D.AUTH_STATUS=n;const o={EVM:"evm",SOLANA:"solana",UNKNOWN:"unknown"};D.CHAIN_TYPE=o;const a={AUTH_TOKEN:"authToken",USER_DATA:"userData",THEME:"theme",EMAIL_CACHE:"emailCache",WALLET_ADDRESS:"walletAddress",CHAIN_TYPE:"chainType"};D.STORAGE_KEYS=a;const i={MAX_ATTACHMENT_SIZE:25*1024*1024,MAX_RECIPIENTS:100,ITEMS_PER_PAGE:50,REFRESH_INTERVAL:6e4,NOTIFICATION_COOLDOWN:3e5};D.EMAIL_CONFIG=i;const s={FREE:"free",BASIC:"basic",PRO:"pro",ENTERPRISE:"enterprise"};D.SUBSCRIPTION_TIERS=s;const l={SHORT_DATE:"MMM d",FULL_DATE:"MMM d, yyyy",DATE_TIME:"MMM d, yyyy h:mm a",RELATIVE:"relative"};D.TIME_FORMAT=l;const c={WALLET_NOT_CONNECTED:"Please connect your wallet first",INVALID_ADDRESS:"Please enter a valid address",NETWORK_ERROR:"Network error. Please try again.",AUTHENTICATION_FAILED:"Authentication failed. Please sign in again.",TRANSACTION_FAILED:"Transaction failed. Please try again.",INSUFFICIENT_FUNDS:"Insufficient funds for this operation",RATE_LIMITED:"Too many requests. Please wait a moment.",SESSION_EXPIRED:"Your session has expired. Please sign in again.",PERMISSION_DENIED:"You do not have permission to perform this action"};D.ERROR_MESSAGES=c;const f={EMAIL_SENT:"Email sent successfully",EMAIL_DELETED:"Email deleted successfully",PREFERENCES_SAVED:"Preferences saved successfully",WALLET_CONNECTED:"Wallet connected successfully",AUTHENTICATION_SUCCESS:"Authentication successful",DELEGATION_SUCCESS:"Delegation successful",SUBSCRIPTION_ACTIVATED:"Subscription activated successfully"};D.SUCCESS_MESSAGES=f;const u={HOME:"/",ABOUT:"/about",CONNECT:"/connect",MAIL:"/mail",COMPOSE:"/mail/compose",PREFERENCES:"/preferences",TERMS:"/terms",PRIVACY:"/privacy",DOCUMENTATION:"/document",WEB3_USERS:"/web3-users",WEB3_PROJECTS:"/web3-projects"};D.ROUTES=u;const p={SUPPORT_EMAIL:"support@sudobility.com",CONTACT_EMAIL:"info@sudobility.com"};D.CONTACT_INFO=p;const h={METAMASK:"MetaMask",WALLETCONNECT:"WalletConnect",COINBASE:"Coinbase Wallet",PHANTOM:"Phantom",SAFE:"Safe",ARGENT:"Argent",RAINBOW:"Rainbow",TRUST:"Trust Wallet",LEDGER:"Ledger",TREZOR:"Trezor"};D.WALLET_NAMES=h;const y={ETHEREUM_MAINNET:1,POLYGON:137,ARBITRUM:42161,OPTIMISM:10,BASE:8453,SOLANA_MAINNET:"mainnet-beta",SOLANA_DEVNET:"devnet"};D.NETWORK_IDS=y;const m={FAST:150,NORMAL:300,SLOW:500,VERY_SLOW:1e3};D.ANIMATION=m;const g={DROPDOWN:10,OVERLAY:20,MODAL:30,POPOVER:40,TOOLTIP:50,TOAST:60};return D.Z_INDEX=g,D}var Cr={},zs;function Qm(){return zs||(zs=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.STATUS_VALUES=void 0,Cr.STATUS_VALUES={SUCCESS:"success",PENDING:"pending",FAILED:"failed",ERROR:"error"}),Cr}var Hs;function eg(){return Hs||(Hs=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.STATUS_VALUES=e.Z_INDEX=e.ANIMATION=e.NETWORK_IDS=e.WALLET_NAMES=e.CONTACT_INFO=e.ROUTES=e.SUCCESS_MESSAGES=e.ERROR_MESSAGES=e.TIME_FORMAT=e.SUBSCRIPTION_TIERS=e.EMAIL_CONFIG=e.STORAGE_KEYS=e.CHAIN_TYPE=e.AUTH_STATUS=e.API_RETRY_DELAY=e.API_RETRY_ATTEMPTS=e.API_TIMEOUT=void 0;var t=Jm();Object.defineProperty(e,"API_TIMEOUT",{enumerable:!0,get:function(){return t.API_TIMEOUT}}),Object.defineProperty(e,"API_RETRY_ATTEMPTS",{enumerable:!0,get:function(){return t.API_RETRY_ATTEMPTS}}),Object.defineProperty(e,"API_RETRY_DELAY",{enumerable:!0,get:function(){return t.API_RETRY_DELAY}}),Object.defineProperty(e,"AUTH_STATUS",{enumerable:!0,get:function(){return t.AUTH_STATUS}}),Object.defineProperty(e,"CHAIN_TYPE",{enumerable:!0,get:function(){return t.CHAIN_TYPE}}),Object.defineProperty(e,"STORAGE_KEYS",{enumerable:!0,get:function(){return t.STORAGE_KEYS}}),Object.defineProperty(e,"EMAIL_CONFIG",{enumerable:!0,get:function(){return t.EMAIL_CONFIG}}),Object.defineProperty(e,"SUBSCRIPTION_TIERS",{enumerable:!0,get:function(){return t.SUBSCRIPTION_TIERS}}),Object.defineProperty(e,"TIME_FORMAT",{enumerable:!0,get:function(){return t.TIME_FORMAT}}),Object.defineProperty(e,"ERROR_MESSAGES",{enumerable:!0,get:function(){return t.ERROR_MESSAGES}}),Object.defineProperty(e,"SUCCESS_MESSAGES",{enumerable:!0,get:function(){return t.SUCCESS_MESSAGES}}),Object.defineProperty(e,"ROUTES",{enumerable:!0,get:function(){return t.ROUTES}}),Object.defineProperty(e,"CONTACT_INFO",{enumerable:!0,get:function(){return t.CONTACT_INFO}}),Object.defineProperty(e,"WALLET_NAMES",{enumerable:!0,get:function(){return t.WALLET_NAMES}}),Object.defineProperty(e,"NETWORK_IDS",{enumerable:!0,get:function(){return t.NETWORK_IDS}}),Object.defineProperty(e,"ANIMATION",{enumerable:!0,get:function(){return t.ANIMATION}}),Object.defineProperty(e,"Z_INDEX",{enumerable:!0,get:function(){return t.Z_INDEX}});var r=Qm();Object.defineProperty(e,"STATUS_VALUES",{enumerable:!0,get:function(){return r.STATUS_VALUES}})})(Vs)),Vs}var Gs={},ie={},Ys;function tg(){if(Ys)return ie;Ys=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.storageLogger=ie.ensLogger=ie.contractLogger=ie.apiLogger=ie.authLogger=ie.logger=ie.LogLevel=void 0;var e;(function(l){l.ERROR="error",l.WARN="warn",l.INFO="info",l.DEBUG="debug"})(e||(ie.LogLevel=e={}));class t{constructor(){this.isDevelopment=process.env.NODE_ENV==="development"}formatTimestamp(){return new Date().toISOString()}formatMessage(c,f,u){const p=this.formatTimestamp(),h=u?` [${u}]`:"";return`[${p}]${h} ${f}`}shouldLog(c){return this.isDevelopment?!0:c===e.ERROR||c===e.WARN}error(c,f,u){this.shouldLog(e.ERROR)&&(console.error(this.formatMessage(e.ERROR,c,f)),u&&console.error(u))}warn(c,f,u){this.shouldLog(e.WARN)&&(console.warn(this.formatMessage(e.WARN,c,f)),u&&console.warn(u))}info(c,f,u){this.shouldLog(e.INFO)&&(console.log(this.formatMessage(e.INFO,c,f)),u&&console.log(u))}debug(c,f,u){this.shouldLog(e.DEBUG)&&(console.log(this.formatMessage(e.DEBUG,c,f)),u&&console.log(u))}withContext(c){return{error:(f,u)=>this.error(f,c,u),warn:(f,u)=>this.warn(f,c,u),info:(f,u)=>this.info(f,c,u),debug:(f,u)=>this.debug(f,c,u)}}}const r=new t;ie.logger=r;const n=r.withContext("AUTH");ie.authLogger=n;const o=r.withContext("API");ie.apiLogger=o;const a=r.withContext("CONTRACT");ie.contractLogger=a;const i=r.withContext("ENS");ie.ensLogger=i;const s=r.withContext("STORAGE");return ie.storageLogger=s,ie}var Ks;function Xs(){return Ks||(Ks=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.storageLogger=e.ensLogger=e.contractLogger=e.apiLogger=e.authLogger=e.logger=e.LogLevel=void 0;var t=tg();Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return t.LogLevel}}),Object.defineProperty(e,"logger",{enumerable:!0,get:function(){return t.logger}}),Object.defineProperty(e,"authLogger",{enumerable:!0,get:function(){return t.authLogger}}),Object.defineProperty(e,"apiLogger",{enumerable:!0,get:function(){return t.apiLogger}}),Object.defineProperty(e,"contractLogger",{enumerable:!0,get:function(){return t.contractLogger}}),Object.defineProperty(e,"ensLogger",{enumerable:!0,get:function(){return t.ensLogger}}),Object.defineProperty(e,"storageLogger",{enumerable:!0,get:function(){return t.storageLogger}})})(Gs)),Gs}var qs={},tt={},Zs;function rg(){if(Zs)return tt;Zs=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.createURLSearchParams=t,tt.createSearchParams=r,tt.searchParamsToString=n,tt.parseSearchParams=o;class e{constructor(i){if(this.params=new Map,i)if(typeof i=="string")this.parseString(i);else if(Array.isArray(i))for(const[s,l]of i)this.append(s,l);else for(const[s,l]of Object.entries(i))l!==void 0&&this.append(s,l)}parseString(i){const s=i.startsWith("?")?i.slice(1):i;if(s)for(const l of s.split("&")){const[c,f=""]=l.split("=");c&&this.append(decodeURIComponent(c),decodeURIComponent(f))}}append(i,s){this.params.has(i)||this.params.set(i,[]);const l=this.params.get(i);l&&l.push(s)}delete(i){this.params.delete(i)}get(i){const s=this.params.get(i);return s&&s.length>0?s[0]:null}getAll(i){return this.params.get(i)||[]}has(i){return this.params.has(i)}set(i,s){this.params.set(i,[s])}toString(){const i=[];return this.params.forEach((s,l)=>{for(const c of s)i.push(`${encodeURIComponent(l)}=${encodeURIComponent(c)}`)}),i.join("&")}forEach(i){this.params.forEach((s,l)=>{for(const c of s)i(c,l)})}}function t(a){return typeof URLSearchParams<"u"?new URLSearchParams(a):new e(a)}function r(a){const i=t(void 0);for(const[s,l]of Object.entries(a))l!=null&&i.append(s,String(l));return i}function n(a){return a.toString()}function o(a){const i=t(a),s={};return i.forEach((l,c)=>{s[c]=l}),s}return tt}var Js;function ng(){return Js||(Js=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseSearchParams=e.searchParamsToString=e.createSearchParams=e.createURLSearchParams=void 0;var t=rg();Object.defineProperty(e,"createURLSearchParams",{enumerable:!0,get:function(){return t.createURLSearchParams}}),Object.defineProperty(e,"createSearchParams",{enumerable:!0,get:function(){return t.createSearchParams}}),Object.defineProperty(e,"searchParamsToString",{enumerable:!0,get:function(){return t.searchParamsToString}}),Object.defineProperty(e,"parseSearchParams",{enumerable:!0,get:function(){return t.parseSearchParams}})})(qs)),qs}var se={},Qs;function og(){if(Qs)return se;Qs=1,Object.defineProperty(se,"__esModule",{value:!0}),se.debounceAsync=se.clearExpiredCache=se.withCache=se.withTimeout=se.safeParallel=se.withLoadingState=se.safeAsync=void 0;const e=Xs(),t=async(f,u)=>{try{return{data:await f(),success:!0}}catch(p){const h=p instanceof Error?p:new Error(String(p));return e.logger.error(`Async operation failed: ${h.message}`,u,p),{error:h,success:!1}}};se.safeAsync=t;const r=async(f,u,p,h)=>{u(!0),p(null);try{return await f()}catch(y){const m=y instanceof Error?y.message:String(y);p(m),e.logger.error(`Operation failed: ${m}`,h,y);return}finally{u(!1)}};se.withLoadingState=r;const n=async(f,u)=>{try{return{data:await Promise.all(f.map(p=>p())),success:!0}}catch(p){const h=p instanceof Error?p:new Error(String(p));return e.logger.error(`Parallel operations failed: ${h.message}`,u,p),{error:h,success:!1}}};se.safeParallel=n;const o=async(f,u,p)=>{const h=new Promise((y,m)=>setTimeout(()=>m(new Error(`Operation timed out after ${u}ms`)),u));try{return await Promise.race([f(),h])}catch(y){throw e.logger.error("Timeout operation failed",p,y),y}};se.withTimeout=o;const a=new Map,i=async(f,u,p=300*1e3)=>{const h=a.get(f),y=Date.now();if(h&&y-h.timestamp<h.ttl)return h.data;const m=await u();return a.set(f,{data:m,timestamp:y,ttl:p}),m};se.withCache=i;const s=()=>{const f=Date.now();for(const[u,p]of a.entries())f-p.timestamp>=p.ttl&&a.delete(u)};se.clearExpiredCache=s;const l=new Map,c=(f,u,p)=>(...h)=>new Promise(y=>{const m=l.get(p);m&&clearTimeout(m);const g=setTimeout(async()=>{l.delete(p);try{const w=await f(...h);y(w)}catch(w){e.logger.error("Debounced operation failed",p,w),y(void 0)}},u);l.set(p,g)});return se.debounceAsync=c,se}var el;function tl(){return el||(el=1,(function(e){var t=xt&&xt.__createBinding||(Object.create?(function(n,o,a,i){i===void 0&&(i=a);var s=Object.getOwnPropertyDescriptor(o,a);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[a]}}),Object.defineProperty(n,i,s)}):(function(n,o,a,i){i===void 0&&(i=a),n[i]=o[a]})),r=xt&&xt.__exportStar||function(n,o){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(o,a)&&t(o,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(Bm(),e),r(Hm(),e),r(Ym(),e),r(Zm(),e),r(eg(),e),r(Xs(),e),r(ng(),e),r(og(),e)})(xt)),xt}var rl;function ag(){return rl||(rl=1,(function(e){var t=yt&&yt.__createBinding||(Object.create?(function(a,i,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(a,l,c)}):(function(a,i,s,l){l===void 0&&(l=s),a[l]=i[s]})),r=yt&&yt.__exportStar||function(a,i){for(var s in a)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&t(i,a,s)};Object.defineProperty(e,"__esModule",{value:!0}),e.ProcessedEventName=e.ContractType=e.StorageType=e.WalletType=e.ChainType=e.AnalyticsEvent=e.TransactionStatus=e.MessageType=e.InfoType=e.NotificationType=e.RequestStatus=e.MobileView=e.EmailComposeType=e.FontSize=e.Theme=e.Chain=e.AuthStatus=e.debounceAsync=e.clearExpiredCache=e.withCache=e.withTimeout=e.safeParallel=e.withLoadingState=e.safeAsync=void 0,r(Cs(),e),r(tl(),e);var n=tl();Object.defineProperty(e,"safeAsync",{enumerable:!0,get:function(){return n.safeAsync}}),Object.defineProperty(e,"withLoadingState",{enumerable:!0,get:function(){return n.withLoadingState}}),Object.defineProperty(e,"safeParallel",{enumerable:!0,get:function(){return n.safeParallel}}),Object.defineProperty(e,"withTimeout",{enumerable:!0,get:function(){return n.withTimeout}}),Object.defineProperty(e,"withCache",{enumerable:!0,get:function(){return n.withCache}}),Object.defineProperty(e,"clearExpiredCache",{enumerable:!0,get:function(){return n.clearExpiredCache}}),Object.defineProperty(e,"debounceAsync",{enumerable:!0,get:function(){return n.debounceAsync}});var o=Cs();Object.defineProperty(e,"AuthStatus",{enumerable:!0,get:function(){return o.AuthStatus}}),Object.defineProperty(e,"Chain",{enumerable:!0,get:function(){return o.Chain}}),Object.defineProperty(e,"Theme",{enumerable:!0,get:function(){return o.Theme}}),Object.defineProperty(e,"FontSize",{enumerable:!0,get:function(){return o.FontSize}}),Object.defineProperty(e,"EmailComposeType",{enumerable:!0,get:function(){return o.EmailComposeType}}),Object.defineProperty(e,"MobileView",{enumerable:!0,get:function(){return o.MobileView}}),Object.defineProperty(e,"RequestStatus",{enumerable:!0,get:function(){return o.RequestStatus}}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:function(){return o.NotificationType}}),Object.defineProperty(e,"InfoType",{enumerable:!0,get:function(){return o.InfoType}}),Object.defineProperty(e,"MessageType",{enumerable:!0,get:function(){return o.MessageType}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return o.TransactionStatus}}),Object.defineProperty(e,"AnalyticsEvent",{enumerable:!0,get:function(){return o.AnalyticsEvent}}),Object.defineProperty(e,"ChainType",{enumerable:!0,get:function(){return o.ChainType}}),Object.defineProperty(e,"WalletType",{enumerable:!0,get:function(){return o.WalletType}}),Object.defineProperty(e,"StorageType",{enumerable:!0,get:function(){return o.StorageType}}),Object.defineProperty(e,"ContractType",{enumerable:!0,get:function(){return o.ContractType}}),Object.defineProperty(e,"ProcessedEventName",{enumerable:!0,get:function(){return o.ProcessedEventName}})})(yt)),yt}var Ar=ag();const ig=d.forwardRef(({className:e,type:t,onTrack:r,trackingLabel:n,componentName:o,onBlur:a,onChange:i,...s},l)=>{const c=u=>{r&&r({action:"blur",trackingLabel:n,componentName:o}),a?.(u)},f=u=>{r&&r({action:"change",trackingLabel:n,componentName:o}),i?.(u)};return S.jsx("input",{type:t,className:Q(de.input.default(),e),ref:l,onBlur:c,onChange:f,...s})});ig.displayName="Input";const sg=d.forwardRef(({className:e,onTrack:t,trackingLabel:r,componentName:n,onCheckedChange:o,...a},i)=>{const s=l=>{t&&t({action:"toggle",trackingLabel:r,componentName:n}),o?.(l)};return S.jsx(ao,{className:Q("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-600 data-[state=unchecked]:bg-gray-200 dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-950 dark:data-[state=checked]:bg-blue-500 dark:data-[state=unchecked]:bg-gray-700",e),onCheckedChange:s,...a,ref:i,children:S.jsx(cc,{className:Q("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})})});sg.displayName=ao.displayName;const lg=d.forwardRef(({className:e,children:t,...r},n)=>S.jsxs(Ba,{ref:n,className:Q("flex h-9 w-full items-center justify-between rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,S.jsx(bf,{asChild:!0,children:S.jsx(Ct.ChevronDown,{className:"h-4 w-4 opacity-50 ml-2 flex-shrink-0"})})]}));lg.displayName=Ba.displayName;const nl=d.forwardRef(({className:e,...t},r)=>S.jsx(Ya,{ref:r,className:Q("flex cursor-default items-center justify-center py-1",e),...t,children:S.jsx(Ct.ChevronUp,{className:"h-4 w-4"})}));nl.displayName=Ya.displayName;const ol=d.forwardRef(({className:e,...t},r)=>S.jsx(Ka,{ref:r,className:Q("flex cursor-default items-center justify-center py-1",e),...t,children:S.jsx(Ct.ChevronDown,{className:"h-4 w-4"})}));ol.displayName=Ka.displayName;const cg=d.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>S.jsx(yf,{children:S.jsxs(za,{ref:o,className:Q(de.overlays.dropdown.menu(),"z-[1000000] max-h-96 min-w-[8rem] overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[S.jsx(nl,{}),S.jsx(vf,{className:Q(de.overlays.dropdown.itemContainer(),r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),S.jsx(ol,{})]})}));cg.displayName=za.displayName;const ug=d.forwardRef(({className:e,...t},r)=>S.jsx(Ha,{ref:r,className:Q(de.overlays.dropdown.header(),"py-1.5",e),...t}));ug.displayName=Ha.displayName;const dg=d.forwardRef(({className:e,children:t,...r},n)=>S.jsxs(Ga,{ref:n,className:Q(de.overlays.dropdown.item(),"relative select-none justify-between pr-8 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[S.jsx(wf,{children:t}),S.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:S.jsx(Ef,{children:S.jsx(Ct.Check,{className:"h-4 w-4"})})})]}));dg.displayName=Ga.displayName;const fg=d.forwardRef(({className:e,...t},r)=>S.jsx(Xa,{ref:r,className:Q("my-1 h-px bg-gray-200 dark:bg-gray-700",e),...t}));fg.displayName=Xa.displayName;const pg=zt(`${Mt.label.default()} peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),mg=d.forwardRef(({className:e,...t},r)=>S.jsx(Qa,{ref:r,className:Q(pg(),e),...t}));mg.displayName=Qa.displayName;const gg=zt("min-h-[44px] touch-manipulation",{variants:{variant:{default:"",primary:"",secondary:"",outline:"",ghost:"",destructive:"","destructive-outline":"",success:"",link:"",gradient:"","gradient-secondary":"","gradient-success":"",wallet:"",connect:"",disconnect:""},size:{default:"",sm:"h-8",lg:"h-12",icon:"h-10 w-10 p-0"},animation:{none:"transition-colors duration-200",hover:"transition-all duration-200 hover:scale-105",lift:"transition-all duration-200 hover:scale-105",scale:"transition-transform duration-200 hover:scale-95",glow:"transition-all duration-200 hover:shadow-lg",shimmer:"transition-all duration-200",tap:"transition-transform duration-100 active:scale-95",connect:"transition-all duration-200 hover:scale-105",transaction:"transition-all duration-200 animate-pulse",disconnect:"transition-all duration-200 hover:opacity-80"}},defaultVariants:{variant:"default",size:"default",animation:"hover"}}),hg=d.forwardRef(({className:e,variant:t,size:r,animation:n,asChild:o=!1,onTrack:a,trackingLabel:i,componentName:s,onClick:l,children:c,...f},u)=>{const p=o?Cf:"button",h=t||"default",y=r&&r!=="default"&&r!=="icon"?r:void 0,m=E=>E?{sm:"small",lg:"large",default:"default"}[E]||E:"default",g=(()=>{if(h.startsWith("gradient")){const E=h.replace("gradient-","").replace("gradient","primary");return de.button.gradient[E]?.()||de.button.primary.default()}else{if(["wallet","connect","disconnect"].includes(h))return de.button.web3[h]?.()||de.button.primary.default();{const E=m(y);return de.button[h]?.[E]?.()||de.button.primary.default()}}})(),w=E=>{a&&a({action:"click",trackingLabel:i,componentName:s}),l?.(E)};return S.jsx(p,{className:Q(gg({size:r,animation:n}),g,e),ref:u,onClick:w,...f,children:c})});hg.displayName="Button",Ar.InfoType.INFO+"",Ar.InfoType.SUCCESS+"",Ar.InfoType.WARNING+"",Ar.InfoType.ERROR+"";const xn=zt("transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-sm",{variants:{variant:{subtle:Mt.link.subtle(),default:Mt.link.default(),muted:Mt.link.muted(),external:Mt.link.external(),inherit:"text-inherit hover:text-blue-600 dark:hover:text-blue-400 underline-offset-2 hover:underline transition-colors duration-200"},size:{sm:"text-sm",default:"text-base",lg:"text-lg"}},defaultVariants:{variant:"subtle",size:"default"}}),bg=d.forwardRef(({className:e,variant:t,size:r,to:n,href:o,external:a,children:i,onTrack:s,trackingLabel:l,componentName:c,onClick:f,...u},p)=>{const h=n||o,y=a||h&&(h.startsWith("http")||h.startsWith("mailto:")),m=g=>{s&&s({action:"click",trackingLabel:l,componentName:c}),f?.(g)};return h?y?S.jsx("a",{className:Q(xn({variant:t==="subtle"?"external":t,size:r,className:e})),href:h,target:"_blank",rel:"noopener noreferrer",ref:p,onClick:m,...u,children:i}):S.jsx(yn,{className:Q(xn({variant:t,size:r,className:e})),to:h,ref:p,onClick:m,...u,children:i}):S.jsx("span",{className:Q(xn({variant:t,size:r,className:e})),onClick:m,...u,children:i})});bg.displayName="SmartLink";const yg=d.forwardRef(({onTrack:e,trackingLabel:t,componentName:r,onValueChange:n,children:o,...a},i)=>S.jsx(wm,{ref:i,onValueChange:s=>{e&&e({action:"change",trackingLabel:t,componentName:r}),n?.(s)},...a,children:o}));yg.displayName="Tabs";const vg=d.forwardRef(({className:e,...t},r)=>S.jsx(Wi,{ref:r,className:Q(de.navigation.tabs.list(),e),...t}));vg.displayName=Wi.displayName;const wg=d.forwardRef(({className:e,...t},r)=>S.jsx(Ui,{ref:r,className:Q(de.navigation.tabs.trigger(),e),...t}));wg.displayName=Ui.displayName;const Eg=d.forwardRef(({className:e,...t},r)=>S.jsx(Vi,{ref:r,className:Q(de.navigation.tabs.content(),e),...t}));Eg.displayName=Vi.displayName,K.createContext(void 0),K.memo(({children:e,compute:t,deps:r})=>{const n=K.useRef(r),o=K.useRef(t),a=K.useRef(void 0),i=K.useMemo(()=>{const s=r.length!==n.current.length||r.some((c,f)=>c!==n.current[f]),l=t!==o.current;if(s||l||a.current===void 0){let c;return process.env.NODE_ENV==="development"?(performance.now(),c=t(),performance.now()):c=t(),n.current=r,o.current=t,a.current=c,c}return a.current},[t,r]);return S.jsx(S.Fragment,{children:e(i)})}),K.memo(({item:e,index:t,style:r,renderItem:n})=>S.jsx("div",{style:r,children:n(e,t)}),(e,t)=>e.index===t.index&&e.item===t.item&&e.style.height===t.style.height&&e.style.top===t.style.top),K.memo(({condition:e,children:t,fallback:r=null})=>e?S.jsx(S.Fragment,{children:t}):S.jsx(S.Fragment,{children:r})),K.createContext(void 0),K.createContext(null);const Sg=e=>({"default-src":["'self'"],"script-src":["'self'","'unsafe-inline'","'unsafe-eval'","https://fonts.googleapis.com","https://www.googletagmanager.com","https://www.google-analytics.com"],"style-src":["'self'","'unsafe-inline'","https://fonts.googleapis.com","https://fonts.gstatic.com"],"font-src":["'self'","https://fonts.gstatic.com","data:"],"img-src":["'self'","data:","https:","blob:"],"connect-src":["'self'","https://*.walletconnect.com","https://*.walletconnect.org","https://registry.walletconnect.com","https://relay.walletconnect.com","wss://*.walletconnect.com","wss://*.walletconnect.org","https://keys.coinbase.com","https://api.coinbase.com","https://www.walletlink.org","https://mainnet.infura.io","https://polygon-rpc.com","https://rpc.ankr.com","https://cloudflare-eth.com","https://eth-mainnet.alchemyapi.io","https://api.phantom.app","https://solana-api.projectserum.com","https://api.mainnet-beta.solana.com","https://api.devnet.solana.com","wss://api.phantom.app","wss://api.devnet.solana.com","wss://api.mainnet-beta.solana.com","https://bridge.arbitrum.io","https://polygon-mainnet.infura.io","https://optimism-mainnet.infura.io"],"frame-src":["'self'","https://verify.walletconnect.com","https://verify.walletconnect.org"],"worker-src":["'self'","blob:"],"child-src":["'self'","https://verify.walletconnect.com"],"object-src":["'none'"],"base-uri":["'self'"],"form-action":["'self'"]}),xg=e=>{const t=Sg();return Object.entries(t).map(([r,n])=>`${r} ${n.join(" ")}`).join("; ")};(e=>({"X-Frame-Options":"DENY","X-Content-Type-Options":"nosniff","X-XSS-Protection":"1; mode=block","Referrer-Policy":"strict-origin-when-cross-origin","Permissions-Policy":"camera=(), microphone=(), geolocation=(), interest-cohort=()","Strict-Transport-Security":"max-age=31536000; includeSubDomains; preload","Cross-Origin-Embedder-Policy":"credentialless","Cross-Origin-Opener-Policy":"same-origin-allow-popups","Cross-Origin-Resource-Policy":"cross-origin","Content-Security-Policy":xg()}))();function Cg(){if("connection"in navigator){const e=navigator.connection;e&&(e.effectiveType==="4g"||e.effectiveType)}}Cg(),process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;var al=(e=>(e[e.HIGH=0]="HIGH",e[e.MEDIUM=1]="MEDIUM",e[e.LOW=2]="LOW",e[e.IDLE=3]="IDLE",e))(al||{});class Ag{constructor(){this.queues=new Map,this.isProcessing=!1,Object.values(al).filter(t=>typeof t=="number").forEach(t=>{this.queues.set(t,[])})}load(t,r=1){const n=this.queues.get(r);n&&n.push(t),this.process()}async process(){if(!this.isProcessing){this.isProcessing=!0;for(const[t,r]of this.queues)for(;r.length>0;){const n=r.shift();if(n)try{await n()}catch{}t>=2&&await new Promise(o=>setTimeout(o,50))}this.isProcessing=!1}}}new Ag;class Cn{constructor(t={}){this.prefix=t.prefix||"mailbox",this.defaultTTL=t.ttl,this.platformStorage=t.platformStorage||this.createFallbackStorage()}createFallbackStorage(){const t=new Map;return{getItem:r=>t.get(r)||null,setItem:(r,n)=>{t.set(r,n)},removeItem:r=>{t.delete(r)},clear:()=>{t.clear()},getAllKeys:()=>Array.from(t.keys())}}getKey(t){return`${this.prefix}-${t}`}isExpired(t){return t.ttl?Date.now()-t.timestamp>t.ttl:!1}set(t,r,n){try{const o={value:r,timestamp:Date.now(),ttl:n||this.defaultTTL};this.platformStorage.setItem(this.getKey(t),JSON.stringify(o))}catch{}}get(t,r){try{const n=this.platformStorage.getItem(this.getKey(t));if(!n)return r;const o=JSON.parse(n);return this.isExpired(o)?(this.remove(t),r):o.value}catch{return r}}remove(t){try{this.platformStorage.removeItem(this.getKey(t))}catch{}}clear(t){try{if(this.platformStorage.getAllKeys){const r=this.platformStorage.getAllKeys(),n=this.getKey(t||""),o=r.filter(a=>a.startsWith(n));for(const a of o)this.platformStorage.removeItem(a)}else this.platformStorage.clear?.()}catch(r){console.error("Failed to clear storage:",r)}}has(t){try{return this.platformStorage.getItem(this.getKey(t))!==null}catch(r){return console.error(`Failed to check item ${t}:`,r),!1}}getAllKeys(){try{if(this.platformStorage.getAllKeys){const t=this.platformStorage.getAllKeys(),r=`${this.prefix}-`;return t.filter(n=>n.startsWith(r)).map(n=>n.substring(r.length))}return[]}catch(t){return console.error("Failed to get all keys:",t),[]}}}new Cn,new Cn({prefix:"mailbox-theme"}),new Cn({prefix:"walletUser",ttl:10080*60*1e3});function Tg({client:e,onSelectEntity:t}){const[r,n]=K.useState(!1),[o,a]=K.useState({displayName:"",description:""}),[i,s]=K.useState(null),{data:l=[],isLoading:c}=ye.useEntities(e),f=ye.useCreateEntity(e),u=l.filter(y=>y.entityType==="personal"),p=l.filter(y=>y.entityType==="organization"),h=async y=>{if(y.preventDefault(),s(null),!o.displayName.trim()){s("Display name is required");return}try{await f.mutateAsync({displayName:o.displayName.trim(),description:o.description.trim()||void 0}),n(!1),a({displayName:"",description:""})}catch(m){s(m.message||"Failed to create organization")}};return S.jsxs(xr,{spacing:"lg",maxWidth:"4xl",children:[S.jsxs("div",{className:"flex items-center justify-between mb-8",children:[S.jsxs("div",{children:[S.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Workspaces"}),S.jsx("p",{className:"text-muted-foreground",children:"Manage your personal and organization workspaces"})]}),S.jsxs("button",{type:"button",onClick:()=>n(!0),className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-primary text-primary-foreground font-medium hover:bg-primary/90 transition-colors",children:[S.jsx(Ct.Plus,{className:"h-4 w-4"}),S.jsx("span",{children:"New Organization"})]})]}),r&&S.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:S.jsxs("div",{className:"w-full max-w-md rounded-lg bg-background p-6 shadow-lg",children:[S.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Create Organization"}),S.jsxs("form",{onSubmit:h,className:"space-y-4",children:[S.jsxs("div",{children:[S.jsx("label",{className:"block text-sm font-medium mb-1",children:"Display Name"}),S.jsx("input",{type:"text",value:o.displayName,onChange:y=>a(m=>({...m,displayName:y.target.value})),placeholder:"My Organization",className:"w-full px-3 py-2 rounded-lg border bg-background focus:outline-none focus:ring-2 focus:ring-primary"})]}),S.jsxs("div",{children:[S.jsx("label",{className:"block text-sm font-medium mb-1",children:"Description (optional)"}),S.jsx("textarea",{value:o.description,onChange:y=>a(m=>({...m,description:y.target.value})),placeholder:"What is this organization for?",rows:3,className:"w-full px-3 py-2 rounded-lg border bg-background focus:outline-none focus:ring-2 focus:ring-primary resize-none"})]}),i&&S.jsx("p",{className:"text-sm text-destructive",children:i}),S.jsxs("div",{className:"flex justify-end gap-2",children:[S.jsx("button",{type:"button",onClick:()=>{n(!1),a({displayName:"",description:""}),s(null)},className:"px-4 py-2 rounded-lg border hover:bg-muted transition-colors",children:"Cancel"}),S.jsx("button",{type:"submit",disabled:f.isPending,className:"px-4 py-2 rounded-lg bg-primary text-primary-foreground font-medium hover:bg-primary/90 transition-colors disabled:opacity-50",children:f.isPending?"Creating...":"Create"})]})]})]})}),u.length>0&&S.jsxs("div",{className:"mb-8",children:[S.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Personal Workspace"}),S.jsx(nt.EntityList,{entities:u,onSelect:t,isLoading:c})]}),S.jsxs("div",{children:[S.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Organizations"}),p.length===0&&!c?S.jsxs("div",{className:"text-center py-8 text-muted-foreground border border-dashed rounded-lg",children:[S.jsx("p",{children:"No organizations yet"}),S.jsx("button",{type:"button",onClick:()=>n(!0),className:"mt-2 text-primary hover:underline",children:"Create your first organization"})]}):S.jsx(nt.EntityList,{entities:p,onSelect:t,isLoading:c})]})]})}function Og({client:e,entity:t,currentUserId:r}){const n=t.userRole==="admin",{data:o=[],isLoading:a}=ye.useEntityMembers(e,t.entitySlug),i=ye.useUpdateMemberRole(e),s=ye.useRemoveMember(e),{data:l=[],isLoading:c}=ye.useEntityInvitations(e,n?t.entitySlug:null),f=ye.useCreateInvitation(e),u=ye.useCancelInvitation(e),p=async(g,w)=>{try{await i.mutateAsync({entitySlug:t.entitySlug,memberId:g,role:w})}catch(E){console.error("Failed to update role:",E)}},h=async g=>{if(confirm("Are you sure you want to remove this member?"))try{await s.mutateAsync({entitySlug:t.entitySlug,memberId:g})}catch(w){console.error("Failed to remove member:",w)}},y=async g=>{await f.mutateAsync({entitySlug:t.entitySlug,request:g})},m=async g=>{try{await u.mutateAsync({entitySlug:t.entitySlug,invitationId:g})}catch(w){console.error("Failed to cancel invitation:",w)}};return t.entityType==="personal"?S.jsx(xr,{spacing:"lg",maxWidth:"4xl",children:S.jsxs("div",{className:"text-center py-12 text-muted-foreground",children:[S.jsx("p",{children:"Personal workspaces cannot have additional members."}),S.jsx("p",{className:"mt-2",children:"Create an organization to collaborate with others."})]})}):S.jsxs(xr,{spacing:"lg",maxWidth:"4xl",children:[S.jsxs("div",{className:"mb-8",children:[S.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Members"}),S.jsxs("p",{className:"text-muted-foreground",children:["Manage members and invitations for ",t.displayName]})]}),n&&S.jsxs("div",{className:"rounded-lg border p-4 mb-8",children:[S.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Invite Members"}),S.jsx(nt.InvitationForm,{onSubmit:y,isSubmitting:f.isPending})]}),n&&S.jsxs("div",{className:"mb-8",children:[S.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Pending Invitations"}),S.jsx(nt.InvitationList,{invitations:l,mode:"admin",onCancel:m,isLoading:c,emptyMessage:"No pending invitations"})]}),S.jsxs("div",{children:[S.jsxs("h2",{className:"text-lg font-semibold mb-3",children:["Current Members (",o.length,")"]}),S.jsx(nt.MemberList,{members:o,currentUserId:r,canManage:n,onRoleChange:p,onRemove:h,isLoading:a})]})]})}function Pg({client:e,onInvitationAccepted:t}){const{data:r=[],isLoading:n}=ye.useMyInvitations(e),o=ye.useAcceptInvitation(e),a=ye.useDeclineInvitation(e),i=async c=>{try{await o.mutateAsync(c),t?.()}catch(f){console.error("Failed to accept invitation:",f)}},s=async c=>{try{await a.mutateAsync(c)}catch(f){console.error("Failed to decline invitation:",f)}},l=r.filter(c=>c.status==="pending").length;return S.jsxs(xr,{spacing:"lg",maxWidth:"4xl",children:[S.jsxs("div",{className:"mb-6",children:[S.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Invitations"}),S.jsx("p",{className:"text-muted-foreground",children:l>0?`You have ${l} pending invitation${l>1?"s":""}`:"No pending invitations"})]}),S.jsx(nt.InvitationList,{invitations:r,mode:"user",onAccept:i,onDecline:s,isLoading:n,emptyMessage:"You don't have any pending invitations"})]})}ue.EntityListPage=Tg,ue.InvitationsPage=Pg,ue.MembersManagementPage=Og,Object.defineProperty(ue,Symbol.toStringTag,{value:"Module"})}));