@sudobility/components 4.0.34 → 4.0.80
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/core/BreadcrumbSection.d.ts.map +1 -1
- package/dist/core/PromotionalBanner.d.ts.map +1 -1
- package/dist/features/CTASection.d.ts.map +1 -1
- package/dist/index.esm.js +1228 -1219
- package/dist/index.umd.js +10 -10
- package/dist/layout/MasterDetailLayout.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(u,De){typeof exports=="object"&&typeof module<"u"?De(exports,require("clsx"),require("tailwind-merge"),require("react/jsx-runtime"),require("react"),require("class-variance-authority"),require("react-dom"),require("@heroicons/react/24/outline"),require("@heroicons/react/24/solid"),require("@radix-ui/react-switch"),require("@radix-ui/react-select"),require("lucide-react"),require("@radix-ui/react-label"),require("@radix-ui/react-slot"),require("react-router-dom"),require("@radix-ui/react-tabs"),require("react-i18next"),require("react-helmet-async"),require("web-vitals")):typeof define=="function"&&define.amd?define(["exports","clsx","tailwind-merge","react/jsx-runtime","react","class-variance-authority","react-dom","@heroicons/react/24/outline","@heroicons/react/24/solid","@radix-ui/react-switch","@radix-ui/react-select","lucide-react","@radix-ui/react-label","@radix-ui/react-slot","react-router-dom","@radix-ui/react-tabs","react-i18next","react-helmet-async","web-vitals"],De):(u=typeof globalThis<"u"?globalThis:u||self,De(u.MailBoxComponents={},u.clsx,u.tailwindMerge,u.ReactJSXRuntime,u.React,u.cva,u.ReactDOM,u.HeroiconsOutline,u.HeroiconsSolid,u.RadixSwitch,u.RadixSelect,u.LucideReact,u.RadixLabel,u.RadixSlot,u.ReactRouterDOM,u.RadixTabs,u.ReactI18next,u.ReactHelmetAsync,u.WebVitals))})(this,(function(u,De,jn,t,p,X,ht,L,he,fr,_n,Qe,ft,zn,br,fe,bt,Bn,je){"use strict";function mt(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return r.default=e,Object.freeze(r)}const Y=mt(p),q=mt(_n);function f(...e){return jn.twMerge(De.clsx(e))}const yt=({children:e,as:r="div",p:a,px:n,py:o,m:s,mx:i,my:l,bg:d,border:c=!1,rounded:g,shadow:h,w,h:m,className:b})=>{const y={none:"0",xs:"1",sm:"2",md:"4",lg:"6",xl:"8","2xl":"12",auto:"auto"},v=d?{transparent:"bg-transparent",white:"bg-white dark:bg-gray-900",gray:"bg-gray-100 dark:bg-gray-800",primary:"bg-blue-50 dark:bg-blue-900/20",success:"bg-green-50 dark:bg-green-900/20",warning:"bg-yellow-50 dark:bg-yellow-900/20",danger:"bg-red-50 dark:bg-red-900/20"}[d]:"",T=g?{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}[g]:"",N=h?{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl"}[h]:"",S=w?{auto:"w-auto",full:"w-full",screen:"w-screen",min:"w-min",max:"w-max"}[w]:"",k=m?{auto:"h-auto",full:"h-full",screen:"h-screen",min:"h-min",max:"h-max"}[m]:"",C=[];a&&C.push("p-"+y[a]),n&&C.push("px-"+y[n]),o&&C.push("py-"+y[o]);const I=[];return s&&I.push("m-"+y[s]),i&&I.push("mx-"+y[i]),l&&I.push("my-"+y[l]),t.jsx(r,{className:f(...C,...I,v,c&&"border border-gray-200 dark:border-gray-700",T,N,S,k,b),children:e})},Wn=({direction:e="row",align:r,justify:a,wrap:n="nowrap",gap:o,inline:s=!1,className:i,...l})=>{const d={row:"flex-row","row-reverse":"flex-row-reverse",col:"flex-col","col-reverse":"flex-col-reverse"},c=r?{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"}[r]:"",g=a?{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}[a]:"",h={nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"},w=o?{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"}[o]:"";return t.jsx(yt,{...l,className:f(s?"inline-flex":"flex",d[e],c,g,h[n],w,i)})},Fn={row:"flex-row","row-reverse":"flex-row-reverse",col:"flex-col","col-reverse":"flex-col-reverse"},Vn={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},qn={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},$n={wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},Hn={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},Gn=({children:e,direction:r="row",align:a="start",justify:n="start",wrap:o="nowrap",gap:s="0",className:i})=>t.jsx("div",{className:f("flex",Fn[r],Vn[a],qn[n],$n[o],Hn[s],i),children:e}),Yn=({children:e,size:r="xl",center:a=!0,padding:n="md",className:o})=>{const s={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},i={none:"",sm:"px-4 py-2",md:"px-6 py-4",lg:"px-8 py-6"};return t.jsx("div",{className:f("w-full",s[r],a&&"mx-auto",i[n],o),children:e})},Kn=({children:e,cols:r=1,gap:a="md",autoFit:n,autoFill:o,alignItems:s="stretch",justifyItems:i="stretch",className:l})=>{const d={none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},c={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},g={start:"justify-items-start",center:"justify-items-center",end:"justify-items-end",stretch:"justify-items-stretch"},h=()=>{if(n||o)return"";if(typeof r=="number")return{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"}[r]||"grid-cols-1";const m=[];return r.sm&&m.push("grid-cols-"+r.sm),r.md&&m.push("md:grid-cols-"+r.md),r.lg&&m.push("lg:grid-cols-"+r.lg),r.xl&&m.push("xl:grid-cols-"+r.xl),m.join(" ")};let w;return n?w="repeat(auto-fit, minmax("+n+", 1fr))":o&&(w="repeat(auto-fill, minmax("+o+", 1fr))"),t.jsx("div",{className:f("grid",h(),d[a],c[s],g[i],l),style:w?{gridTemplateColumns:w}:void 0,children:e})},mr=({children:e,direction:r="vertical",spacing:a="md",align:n="stretch",justify:o="start",wrap:s=!1,full:i=!1,divider:l=!1,className:d})=>{const c=r==="vertical",g={vertical:{none:"",xs:"space-y-1",sm:"space-y-2",md:"space-y-4",lg:"space-y-6",xl:"space-y-8","2xl":"space-y-12"},horizontal:{none:"",xs:"space-x-1",sm:"space-x-2",md:"space-x-4",lg:"space-x-6",xl:"space-x-8","2xl":"space-x-12"}},h={vertical:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},horizontal:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"}},w={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},m={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};return t.jsx("div",{className:f("flex",c?"flex-col":"flex-row",l?h[r][a]:g[r][a],w[n],m[o],s&&"flex-wrap",i&&(c?"h-full":"w-full"),d),children:l?p.Children.map(e,(b,y)=>t.jsxs(p.Fragment,{children:[b,y<p.Children.count(e)-1&&t.jsx("div",{className:f("bg-gray-200 dark:bg-gray-700",c?"h-px w-full":"w-px h-full")})]},y)):e})},Zn=e=>t.jsx(mr,{direction:"vertical",...e}),Xn=e=>t.jsx(mr,{direction:"horizontal",...e}),Qn=({children:e,axis:r="both",inline:a=!1,className:n})=>{const o=()=>{switch(r){case"horizontal":return"justify-center";case"vertical":return"items-center";case"both":default:return"justify-center items-center"}};return t.jsx("div",{className:f(a?"inline-flex":"flex",o(),n),children:e})},Jn=({size:e="md",axis:r="vertical",flex:a=!1,className:n})=>{const o={vertical:{xs:"h-1",sm:"h-2",md:"h-4",lg:"h-6",xl:"h-8","2xl":"h-12"},horizontal:{xs:"w-1",sm:"w-2",md:"w-4",lg:"w-6",xl:"w-8","2xl":"w-12"}},s=typeof e=="number"?r==="vertical"?{height:`${e}px`}:{width:`${e}px`}:void 0,i=typeof e=="string"?o[r][e]:"";return t.jsx("div",{className:f(a&&"flex-1",!a&&i,n),style:s,"aria-hidden":"true"})},Rn=X.cva("",{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"}}),eo=({children:e,variant:r="default",spacing:a="3xl",background:n="none",className:o,as:s="section",id:i})=>p.createElement(s,{id:i,className:f(Rn({variant:r,spacing:a,background:n}),o)},e),ro=X.cva("min-h-screen flex flex-col",{variants:{background:{default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",transparent:"bg-transparent",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/20 dark:to-purple-900/20"},overflow:{visible:"overflow-visible",hidden:"overflow-hidden",scroll:"overflow-auto"}},defaultVariants:{background:"default",overflow:"visible"}}),to=({children:e,background:r="default",overflow:a="visible",className:n})=>t.jsx("div",{className:f(ro({background:r,overflow:a}),n),children:e}),ao=({children:e,ratio:r="16/9",className:a})=>{const s=`${1/(typeof r=="string"?{"16/9":1.7777777777777777,"4/3":1.3333333333333333,"1/1":1,"21/9":2.3333333333333335,"3/2":1.5}[r]:r)*100}%`;return t.jsx("div",{className:f("relative w-full",a),style:{paddingBottom:s},children:t.jsx("div",{className:"absolute inset-0",children:e})})},A={typography:{family:{sans:"font-sans",display:"font-sans",body:"font-sans"},semantic:{caption:"text-xs",small:"text-sm",body:"text-base",bodyLarge:"text-lg",h6:"text-base",h5:"text-lg",h4:"text-xl",h3:"text-2xl",h2:"text-3xl",h1:"text-4xl",hero:"text-8xl"},weight:{semibold:"font-semibold",bold:"font-bold",body:"font-normal",emphasis:"font-medium",strong:"font-semibold",heading:"font-bold",display:"font-extrabold"},decoration:{none:"no-underline",underline:"underline"},underlineOffset:{medium:"underline-offset-2"},leading:{tight:"leading-tight",heading:"leading-tight",body:"leading-relaxed",caption:"leading-normal",display:"leading-none"},tracking:{heading:"tracking-tight",body:"tracking-normal",caption:"tracking-normal",uppercase:"tracking-wider"},transform:{uppercase:"uppercase"}}},O={heading:{display:{hero:()=>`${A.typography.family.display} ${A.typography.semantic.hero} ${A.typography.weight.display} ${A.typography.leading.display} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,xl:()=>`${A.typography.family.display} text-7xl ${A.typography.weight.display} ${A.typography.leading.display} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,lg:()=>`${A.typography.family.display} text-6xl ${A.typography.weight.bold} ${A.typography.leading.display} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,md:()=>`${A.typography.family.display} text-5xl ${A.typography.weight.bold} ${A.typography.leading.tight} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,sm:()=>`${A.typography.family.display} text-4xl ${A.typography.weight.bold} ${A.typography.leading.tight} ${A.typography.tracking.heading} text-gray-900 dark:text-white`},h1:()=>`${A.typography.family.sans} ${A.typography.semantic.h1} ${A.typography.weight.heading} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${A.typography.family.sans} ${A.typography.semantic.h2} ${A.typography.weight.heading} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${A.typography.family.sans} ${A.typography.semantic.h3} ${A.typography.weight.heading} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,h4:()=>`${A.typography.family.sans} ${A.typography.semantic.h4} ${A.typography.weight.semibold} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,h5:()=>`${A.typography.family.sans} ${A.typography.semantic.h5} ${A.typography.weight.semibold} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,h6:()=>`${A.typography.family.sans} ${A.typography.semantic.h6} ${A.typography.weight.semibold} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,responsive:{h1:()=>`${A.typography.family.sans} text-2xl sm:text-3xl md:text-4xl lg:text-5xl ${A.typography.weight.heading} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${A.typography.family.sans} text-xl sm:text-2xl md:text-3xl lg:text-4xl ${A.typography.weight.heading} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${A.typography.family.sans} text-lg sm:text-xl md:text-2xl lg:text-3xl ${A.typography.weight.semibold} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,display:()=>`${A.typography.family.display} text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl ${A.typography.weight.display} ${A.typography.leading.display} ${A.typography.tracking.heading} text-gray-900 dark:text-white`}},body:{xl:()=>`${A.typography.family.body} ${A.typography.semantic.bodyLarge} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-700 dark:text-gray-300`,lg:()=>`${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-700 dark:text-gray-300`,md:()=>`${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-700 dark:text-gray-300`,sm:()=>`${A.typography.family.body} ${A.typography.semantic.small} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-600 dark:text-gray-400`,xs:()=>`${A.typography.family.body} ${A.typography.semantic.caption} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-600 dark:text-gray-400`,strong:{xl:()=>`${A.typography.family.body} ${A.typography.semantic.bodyLarge} ${A.typography.weight.strong} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.strong} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.strong} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${A.typography.family.body} ${A.typography.semantic.small} ${A.typography.weight.strong} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`},emphasis:{xl:()=>`${A.typography.family.body} ${A.typography.semantic.bodyLarge} ${A.typography.weight.emphasis} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.emphasis} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.emphasis} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${A.typography.family.body} ${A.typography.semantic.small} ${A.typography.weight.emphasis} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`},muted:{xl:()=>`${A.typography.family.body} ${A.typography.semantic.bodyLarge} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-600 dark:text-gray-400`,lg:()=>`${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-600 dark:text-gray-400`,md:()=>`${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-600 dark:text-gray-400`,sm:()=>`${A.typography.family.body} ${A.typography.semantic.small} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-600 dark:text-gray-400`}},caption:{default:()=>`${A.typography.family.body} ${A.typography.semantic.caption} ${A.typography.weight.body} ${A.typography.leading.caption} ${A.typography.tracking.caption} text-gray-500 dark:text-gray-500`,emphasis:()=>`${A.typography.family.body} ${A.typography.semantic.caption} ${A.typography.weight.emphasis} ${A.typography.leading.caption} ${A.typography.tracking.caption} text-gray-600 dark:text-gray-400`,uppercase:()=>`${A.typography.family.body} ${A.typography.semantic.caption} ${A.typography.weight.emphasis} ${A.typography.leading.caption} ${A.typography.tracking.uppercase} ${A.typography.transform.uppercase} text-gray-500 dark:text-gray-500`},link:{default:()=>`${A.typography.decoration.underline} ${A.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150`,subtle:()=>`${A.typography.decoration.none} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 hover:${A.typography.decoration.underline} hover:${A.typography.underlineOffset.medium} transition-all duration-150`,muted:()=>`${A.typography.decoration.underline} ${A.typography.underlineOffset.medium} text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 transition-colors duration-150`,external:()=>`${A.typography.decoration.underline} ${A.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:()=>`${A.typography.family.body} text-sm ${A.typography.weight.emphasis} text-gray-900 dark:text-white`,required:()=>`${A.typography.family.body} text-sm ${A.typography.weight.emphasis} text-gray-900 dark:text-white after:content-['*'] after:ml-0.5 after:text-red-500`,optional:()=>`${A.typography.family.body} text-sm ${A.typography.weight.body} text-gray-600 dark:text-gray-400`,helper:()=>`${A.typography.family.body} text-sm ${A.typography.weight.body} text-gray-500 dark:text-gray-500`,error:()=>`${A.typography.family.body} text-sm ${A.typography.weight.body} text-red-600 dark:text-red-400`,success:()=>`${A.typography.family.body} text-sm ${A.typography.weight.body} text-green-600 dark:text-green-400`}},_={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"}},badge:{default:()=>"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",primary:()=>"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",success:()=>"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",warning:()=>"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",error:()=>"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",ethereum:()=>"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",solana:()=>"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",small:(e="default")=>{const r={default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",error:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"};return`${r[e]||r.default} inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium`},large:(e="default")=>{const r={default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",error:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"};return`${r[e]||r.default} inline-flex items-center px-3 py-1 rounded-full text-sm font-medium`}},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"},alert:{info:()=>"bg-blue-50 border-blue-200 dark:bg-blue-900/20 dark:border-blue-800 text-blue-800 dark:text-blue-200 rounded-md border p-4 flex items-start gap-3",success:()=>"bg-green-50 border-green-200 dark:bg-green-900/20 dark:border-green-800 text-green-800 dark:text-green-200 rounded-md border p-4 flex items-start gap-3",warning:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded-md border p-4 flex items-start gap-3",attention:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded-md border p-4 flex items-start gap-3",error:()=>"bg-red-50 border-red-200 dark:bg-red-900/20 dark:border-red-800 text-red-800 dark:text-red-200 rounded-md border p-4 flex items-start gap-3",compact:{info:()=>"bg-blue-50 border-blue-200 dark:bg-blue-900/20 dark:border-blue-800 text-blue-800 dark:text-blue-200 rounded border px-3 py-2 text-sm",success:()=>"bg-green-50 border-green-200 dark:bg-green-900/20 dark:border-green-800 text-green-800 dark:text-green-200 rounded border px-3 py-2 text-sm",warning:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded border px-3 py-2 text-sm",attention:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded border px-3 py-2 text-sm",error:()=>"bg-red-50 border-red-200 dark:bg-red-900/20 dark:border-red-800 text-red-800 dark:text-red-200 rounded border px-3 py-2 text-sm"}},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"}},icon:{variant:{default:{xs:()=>"h-3 w-3 text-gray-500 dark:text-gray-400",sm:()=>"h-4 w-4 text-gray-500 dark:text-gray-400",md:()=>"h-5 w-5 text-gray-500 dark:text-gray-400",lg:()=>"h-6 w-6 text-gray-500 dark:text-gray-400",xl:()=>"h-8 w-8 text-gray-500 dark:text-gray-400"},success:{xs:()=>"h-3 w-3 text-green-600 dark:text-green-400",sm:()=>"h-4 w-4 text-green-600 dark:text-green-400",md:()=>"h-5 w-5 text-green-600 dark:text-green-400",lg:()=>"h-6 w-6 text-green-600 dark:text-green-400",xl:()=>"h-8 w-8 text-green-600 dark:text-green-400"},warning:{xs:()=>"h-3 w-3 text-amber-600 dark:text-amber-400",sm:()=>"h-4 w-4 text-amber-600 dark:text-amber-400",md:()=>"h-5 w-5 text-amber-600 dark:text-amber-400",lg:()=>"h-6 w-6 text-amber-600 dark:text-amber-400",xl:()=>"h-8 w-8 text-amber-600 dark:text-amber-400"},error:{xs:()=>"h-3 w-3 text-red-600 dark:text-red-400",sm:()=>"h-4 w-4 text-red-600 dark:text-red-400",md:()=>"h-5 w-5 text-red-600 dark:text-red-400",lg:()=>"h-6 w-6 text-red-600 dark:text-red-400",xl:()=>"h-8 w-8 text-red-600 dark:text-red-400"},muted:{xs:()=>"h-3 w-3 text-gray-400 dark:text-gray-500",sm:()=>"h-4 w-4 text-gray-400 dark:text-gray-500",md:()=>"h-5 w-5 text-gray-400 dark:text-gray-500",lg:()=>"h-6 w-6 text-gray-400 dark:text-gray-500",xl:()=>"h-8 w-8 text-gray-400 dark:text-gray-500"}}},overlays:{modal:{backdrop:()=>"fixed inset-0 z-40 bg-black/50 dark:bg-black/70 backdrop-blur-sm transition-all duration-300 ease-out",backdropEntering:()=>"opacity-0",backdropEntered:()=>"opacity-100",backdropExiting:()=>"opacity-0",container:()=>"fixed inset-0 z-50 flex items-center justify-center p-4 transition-all duration-300 ease-out",containerEntering:()=>"opacity-0 scale-95",containerEntered:()=>"opacity-100 scale-100",containerExiting:()=>"opacity-0 scale-95",content:()=>"relative w-full max-w-lg bg-white dark:bg-gray-900 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 max-h-[80vh] overflow-hidden",small:()=>"max-w-sm",medium:()=>"max-w-lg",large:()=>"max-w-2xl",extraLarge:()=>"max-w-4xl",fullWidth:()=>"max-w-[95vw]",header:()=>"flex items-center justify-between p-4 sm:p-6 border-b border-gray-200 dark:border-gray-700",title:()=>"text-lg font-semibold text-gray-900 dark:text-gray-100",closeButton:()=>"p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md transition-colors",body:()=>"p-4 sm:p-6 overflow-y-auto",footer:()=>"flex items-center justify-end space-x-3 p-4 sm:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/50"},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"}}},no={success:"bg-green-500",error:"bg-red-500",warning:"bg-orange-500",attention:"bg-amber-500",info:"bg-blue-500",neutral:"bg-gray-500"};function Me(e){return no[e]}const oo={default:"bg-white dark:bg-gray-800",bordered:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700",elevated:"bg-white dark:bg-gray-800 shadow-md",info:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 text-blue-900 dark:text-blue-300",success:"bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 text-green-900 dark:text-green-300",warning:"bg-orange-50 dark:bg-orange-900/20 border border-orange-200 dark:border-orange-800 text-orange-900 dark:text-orange-300",attention:"bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 text-amber-900 dark:text-amber-300",error:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-900 dark:text-red-300"};function so(e){return oo[e]}const io={default:{container:"bg-gradient-to-r from-blue-600/10 to-purple-600/10 border border-blue-200 text-blue-600 backdrop-blur-sm",icon:"text-blue-600"},premium:{container:"bg-gradient-to-r from-blue-600/10 to-purple-600/10 border border-blue-200 text-blue-600 backdrop-blur-sm",icon:"text-blue-600"},primary:{container:"bg-gradient-to-r from-blue-600/10 to-purple-600/10 border border-blue-200 text-blue-600 backdrop-blur-sm",icon:"text-blue-600"},light:{container:"bg-white/20 border border-white/30 text-white backdrop-blur-sm",icon:"text-white"}};function lo(e){return io[e]}const co={border:{default:"border-gray-200 dark:border-gray-700"}},uo=({label:e,labelPosition:r="center",orientation:a="horizontal",spacing:n="md",thickness:o="thin",variant:s="light",className:i,lineClassName:l})=>{const d={horizontal:{none:"my-0",sm:"my-2",md:"my-4",lg:"my-6",xl:"my-8"},vertical:{none:"mx-0",sm:"mx-2",md:"mx-4",lg:"mx-6",xl:"mx-8"}},c={horizontal:{thin:"border-t",medium:"border-t-2",thick:"border-t-4"},vertical:{thin:"border-l",medium:"border-l-2",thick:"border-l-4"}},g={light:"border-gray-200 dark:border-gray-700",medium:"border-gray-300 dark:border-gray-600",dark:"border-gray-400 dark:border-gray-500"};if(a==="vertical")return t.jsx("div",{className:f("self-stretch",c.vertical[o],g[s],d.vertical[n],i),role:"separator","aria-orientation":"vertical"});if(!e)return t.jsx("hr",{className:f(c.horizontal[o],g[s],d.horizontal[n],l,i),role:"separator","aria-orientation":"horizontal"});const h={left:"justify-start",center:"justify-center",right:"justify-end"};return t.jsxs("div",{className:f("flex items-center",d.horizontal[n],h[r],i),role:"separator","aria-orientation":"horizontal",children:[r!=="left"&&t.jsx("div",{className:f("flex-1",c.horizontal[o],g[s],l)}),t.jsx("span",{className:f(O.body.sm(),"px-3 text-gray-500 dark:text-gray-400 whitespace-nowrap"),children:e}),r!=="right"&&t.jsx("div",{className:f("flex-1",c.horizontal[o],g[s],l)})]})},go=({orientation:e="horizontal",spacing:r="md",thickness:a="thin",className:n})=>{const o={horizontal:{none:"",sm:"my-1",md:"my-2",lg:"my-4"},vertical:{none:"",sm:"mx-1",md:"mx-2",lg:"mx-4"}},s={horizontal:{thin:"h-px",medium:"h-0.5",thick:"h-1"},vertical:{thin:"w-px",medium:"w-0.5",thick:"w-1"}},i=e==="horizontal";return t.jsx("div",{role:"separator","aria-orientation":e,className:f("bg-gray-200 dark:bg-gray-700",i?"w-full":"h-full",s[e][a],o[e][r],n)})},ho=({children:e,variant:r="blue",position:a="left",width:n="thick",padding:o="md",className:s})=>{const i={blue:"border-blue-500 dark:border-blue-400",green:"border-green-500 dark:border-green-400",purple:"border-purple-500 dark:border-purple-400",indigo:"border-indigo-500 dark:border-indigo-400",emerald:"border-emerald-500 dark:border-emerald-400",orange:"border-orange-500 dark:border-orange-400",red:"border-red-500 dark:border-red-400",gray:"border-gray-400 dark:border-gray-500"},l={left:"border-l",right:"border-r",top:"border-t",bottom:"border-b"},d={thin:"2",medium:"3",thick:"4"},c={left:{sm:"pl-3",md:"pl-4",lg:"pl-6"},right:{sm:"pr-3",md:"pr-4",lg:"pr-6"},top:{sm:"pt-3",md:"pt-4",lg:"pt-6"},bottom:{sm:"pb-3",md:"pb-4",lg:"pb-6"}},g=`${l[a]}-${d[n]}`;return t.jsx("div",{className:f(g,i[r],c[a][o],s),children:e})},fo=({children:e,title:r,position:a="bottom-right",collapsible:n=!0,defaultCollapsed:o=!1,closeable:s=!1,onClose:i,className:l})=>{const[d,c]=p.useState(o),g={"bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-right":"top-4 right-4","top-left":"top-4 left-4"};return t.jsxs("div",{className:f("fixed z-50 w-80","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-lg shadow-2xl",g[a],l),children:[(r||n||s)&&t.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700",children:[r&&t.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white",children:r}),t.jsxs("div",{className:"flex items-center gap-2",children:[n&&t.jsx("button",{onClick:()=>c(!d),className:"p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded transition-colors","aria-label":d?"Expand":"Collapse",children:t.jsx("svg",{className:f("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",d&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})}),s&&t.jsx("button",{onClick:i,className:"p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded transition-colors","aria-label":"Close",children:t.jsx("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),!d&&t.jsx("div",{className:"p-4",children:e})]})},bo=({left:e,right:r,direction:a="horizontal",initialSplit:n=.5,split:o,onSplitChange:s,minLeftSize:i=100,minRightSize:l=100,dividerSize:d=8,resizable:c=!0,className:g})=>{const[h,w]=p.useState(n),[m,b]=p.useState(!1),y=p.useRef(null),v=o!==void 0?o:h,T=S=>{c&&(S.preventDefault(),b(!0))};p.useEffect(()=>{if(!m)return;const S=C=>{const I=y.current;if(!I)return;const E=I.getBoundingClientRect();let M;a==="horizontal"?M=(C.clientX-E.left)/E.width:M=(C.clientY-E.top)/E.height,M=Math.max(0,Math.min(1,M));const x=a==="horizontal"?E.width:E.height,P=typeof i=="string"?parseFloat(i)/100*x:i,D=typeof l=="string"?parseFloat(l)/100*x:l,U=P/x,B=1-D/x;M=Math.max(U,Math.min(B,M)),o!==void 0&&s?s(M):w(M)},k=()=>{b(!1)};return document.addEventListener("mousemove",S),document.addEventListener("mouseup",k),()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",k)}},[m,a,i,l,o,s]),p.useEffect(()=>(m?(document.body.style.userSelect="none",document.body.style.cursor=a==="horizontal"?"col-resize":"row-resize"):(document.body.style.userSelect="",document.body.style.cursor=""),()=>{document.body.style.userSelect="",document.body.style.cursor=""}),[m,a]);const N=a==="horizontal";return t.jsxs("div",{ref:y,className:f("w-full h-full flex",N?"flex-row":"flex-col",g),children:[t.jsx("div",{className:"overflow-auto",style:{[N?"width":"height"]:`${v*100}%`},children:e}),t.jsx("div",{onMouseDown:T,className:f("flex-shrink-0 group","bg-gray-300 dark:bg-gray-700",c&&"hover:bg-blue-500 dark:hover:bg-blue-400","transition-colors",m&&"bg-blue-500 dark:bg-blue-400",N?"cursor-col-resize":"cursor-row-resize",!c&&"cursor-default"),style:{[N?"width":"height"]:`${d}px`},children:c&&t.jsx("div",{className:f("flex items-center justify-center w-full h-full","text-gray-600 dark:text-gray-400","group-hover:text-white",m&&"text-white"),children:N?t.jsxs("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:[t.jsx("circle",{cx:"10",cy:"6",r:"1.5"}),t.jsx("circle",{cx:"10",cy:"12",r:"1.5"}),t.jsx("circle",{cx:"10",cy:"18",r:"1.5"}),t.jsx("circle",{cx:"14",cy:"6",r:"1.5"}),t.jsx("circle",{cx:"14",cy:"12",r:"1.5"}),t.jsx("circle",{cx:"14",cy:"18",r:"1.5"})]}):t.jsxs("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:[t.jsx("circle",{cx:"6",cy:"10",r:"1.5"}),t.jsx("circle",{cx:"12",cy:"10",r:"1.5"}),t.jsx("circle",{cx:"18",cy:"10",r:"1.5"}),t.jsx("circle",{cx:"6",cy:"14",r:"1.5"}),t.jsx("circle",{cx:"12",cy:"14",r:"1.5"}),t.jsx("circle",{cx:"18",cy:"14",r:"1.5"})]})})}),t.jsx("div",{className:"overflow-auto flex-1",style:{[N?"width":"height"]:`${(1-v)*100}%`},children:r})]})},mo=({children:e,defaultWidth:r=300,defaultHeight:a=200,minWidth:n=100,minHeight:o=100,maxWidth:s,maxHeight:i,directions:l=["right","bottom","bottom-right"],onResize:d,onResizeEnd:c,showHandles:g=!0,className:h})=>{const[w,m]=p.useState(r),[b,y]=p.useState(a),[v,T]=p.useState(!1),[N,S]=p.useState(null),k=p.useRef(null),C=p.useRef({x:0,y:0,width:0,height:0}),I=x=>P=>{P.preventDefault(),P.stopPropagation(),T(!0),S(x),C.current={x:P.clientX,y:P.clientY,width:w,height:b}};p.useEffect(()=>{if(!v||!N)return;const x=D=>{const U=D.clientX-C.current.x,B=D.clientY-C.current.y;let z=C.current.width,F=C.current.height;N.includes("right")?z=C.current.width+U:N.includes("left")&&(z=C.current.width-U),N.includes("bottom")?F=C.current.height+B:N.includes("top")&&(F=C.current.height-B),z=Math.max(n,z),F=Math.max(o,F),s&&(z=Math.min(s,z)),i&&(F=Math.min(i,F)),m(z),y(F),d&&d(z,F)},P=()=>{T(!1),S(null),c&&c(w,b)};return document.addEventListener("mousemove",x),document.addEventListener("mouseup",P),()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",P)}},[v,N,w,b,n,o,s,i,d,c]);const E=p.useCallback(x=>({top:"ns-resize",right:"ew-resize",bottom:"ns-resize",left:"ew-resize","top-left":"nwse-resize","top-right":"nesw-resize","bottom-left":"nesw-resize","bottom-right":"nwse-resize"})[x],[]);p.useEffect(()=>(v?(document.body.style.userSelect="none",document.body.style.cursor=E(N)):(document.body.style.userSelect="",document.body.style.cursor=""),()=>{document.body.style.userSelect="",document.body.style.cursor=""}),[v,N,E]);const M=x=>{if(!l.includes(x))return null;const P={top:"top-0 left-0 right-0 h-1 cursor-ns-resize",right:"top-0 right-0 bottom-0 w-1 cursor-ew-resize",bottom:"bottom-0 left-0 right-0 h-1 cursor-ns-resize",left:"top-0 left-0 bottom-0 w-1 cursor-ew-resize","top-left":"top-0 left-0 w-3 h-3 cursor-nwse-resize","top-right":"top-0 right-0 w-3 h-3 cursor-nesw-resize","bottom-left":"bottom-0 left-0 w-3 h-3 cursor-nesw-resize","bottom-right":"bottom-0 right-0 w-3 h-3 cursor-nwse-resize"};return t.jsx("div",{className:f("absolute z-10",g&&"bg-blue-500 dark:bg-blue-400 opacity-0 hover:opacity-50",P[x]),onMouseDown:I(x)},x)};return t.jsxs("div",{ref:k,className:f("relative",h),style:{width:`${w}px`,height:`${b}px`},children:[e,["top","right","bottom","left","top-left","top-right","bottom-left","bottom-right"].map(M)]})},yo=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UresizableUpanels",children:r||"UresizableUpanels Component"}),po=({children:e,maxHeight:r,hideScrollbar:a=!1,direction:n="vertical",className:o})=>{const s={vertical:"overflow-y-auto overflow-x-hidden",horizontal:"overflow-x-auto overflow-y-hidden",both:"overflow-auto"},i=a?"scrollbar-hide":f("scrollbar-thin","scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-600","scrollbar-track-gray-100 dark:scrollbar-track-gray-800","hover:scrollbar-thumb-gray-400 dark:hover:scrollbar-thumb-gray-500"),l=typeof r=="number"?`${r}px`:r;return t.jsx("div",{className:f("relative",s[n],i,o),style:l?{maxHeight:l}:void 0,children:e})},vo=({children:e,columns:r=3,gap:a=16,breakpoints:n,className:o})=>{const[s,i]=p.useState(r),l=p.useRef(null);p.useEffect(()=>{if(!n)return;const g=()=>{const h=window.innerWidth,w=Object.keys(n).map(Number).sort((m,b)=>b-m);for(const m of w)if(h>=m){i(n[m]);return}i(r)};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[n,r]);const d=p.Children.toArray(e),c=Array.from({length:s},()=>[]);return d.forEach((g,h)=>{c[h%s].push(g)}),t.jsx("div",{ref:l,className:f("flex",o),style:{gap:`${a}px`},children:c.map((g,h)=>t.jsx("div",{className:"flex-1 flex flex-col",style:{gap:`${a}px`},children:g},h))})},be=({children:e,container:r})=>{const[a,n]=p.useState(!1);if(p.useEffect(()=>(n(!0),()=>n(!1)),[]),!a)return null;const o=r||document.body;return ht.createPortal(e,o)},Je=({isOpen:e,onClose:r,children:a,blur:n=!1,opacity:o="medium",zIndex:s=40,lockScroll:i=!0,className:l})=>{if(p.useEffect(()=>{if(i){if(e){const c=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",document.body.style.paddingRight=`${c}px`}else document.body.style.overflow="",document.body.style.paddingRight="";return()=>{document.body.style.overflow="",document.body.style.paddingRight=""}}},[e,i]),!e)return null;const d={light:"bg-black/20 dark:bg-black/30",medium:"bg-black/50 dark:bg-black/60",dark:"bg-black/75 dark:bg-black/85"};return t.jsx(be,{children:t.jsx("div",{className:f("fixed inset-0","transition-opacity duration-300",n&&"backdrop-blur-sm",d[o],l),style:{zIndex:s},onClick:r,"aria-hidden":"true",children:a&&t.jsx("div",{className:"relative h-full w-full",onClick:c=>c.stopPropagation(),children:a})})})},wo=({children:e,as:r="p",size:a="base",weight:n="normal",color:o="default",align:s,transform:i="none",truncate:l=!1,lineClamp:d,className:c})=>{const g={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl"},h={light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},w={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-600 dark:text-gray-400",primary:"text-blue-600 dark:text-blue-400",success:"text-green-600 dark:text-green-400",warning:"text-yellow-600 dark:text-yellow-400",danger:"text-red-600 dark:text-red-400"},m=s?{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}[s]:"",b={none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"},y=d?{display:"-webkit-box",WebkitLineClamp:d,WebkitBoxOrient:"vertical",overflow:"hidden"}:void 0;return t.jsx(r,{className:f(g[a],h[n],w[o],m,b[i],l&&"truncate",d&&"overflow-hidden",c),style:y,children:e})},ko=({children:e,level:r=2,size:a,weight:n="bold",color:o="default",align:s,className:i})=>{const d=a||{1:"4xl",2:"3xl",3:"2xl",4:"xl",5:"lg",6:"base"}[r],c={"4xl":"text-4xl","3xl":"text-3xl","2xl":"text-2xl",xl:"text-xl",lg:"text-lg",base:"text-base"},g={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold"},h={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-700 dark:text-gray-300",primary:"text-blue-600 dark:text-blue-400"},w=s?{left:"text-left",center:"text-center",right:"text-right"}[s]:"",m=`h${r}`;return p.createElement(m,{className:f(c[d],g[n],h[o],w,i)},e)},xo=X.cva("",{variants:{variant:{hero:O.heading.display.hero(),display:O.heading.display.lg(),h1:O.heading.h1(),h2:O.heading.h2(),h3:O.heading.h3()},responsive:{true:"",false:""},align:{left:"text-left",center:"text-center",right:"text-right"},color:{default:"text-gray-900 dark:text-white",muted:"text-gray-600 dark:text-gray-400",vibrant:"text-white",brand:"bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent"}},defaultVariants:{variant:"h1",responsive:!0,align:"left",color:"default"}}),No=({children:e,variant:r="h1",responsive:a=!0,align:n="left",color:o="default",className:s,as:i})=>{const l=i||(r==="hero"||r==="display"||r==="h1"?"h1":r==="h2"?"h2":"h3");return t.jsx(l,{className:f(xo({variant:r,responsive:a,align:n,color:o}),s),children:e})},Co=X.cva("",{variants:{variant:{h2:O.heading.h2(),h3:O.heading.h3(),h4:O.heading.h4(),h5:O.heading.h5(),h6:O.heading.h6()},spacing:{none:"",sm:"mb-2",md:"mb-4",lg:"mb-6",xl:"mb-8"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{variant:"h2",spacing:"md",align:"left"}}),So=({children:e,variant:r="h2",spacing:a="md",align:n="left",className:o,as:s})=>{const i=s||r;return p.createElement(i,{className:f(Co({variant:r,spacing:a,align:n}),o)},e)},Eo=X.cva("",{variants:{variant:{body:O.body.md(),lead:O.body.lg(),large:O.body.lg(),small:O.body.sm(),caption:O.body.xs()},color:{default:"text-gray-700 dark:text-gray-300",muted:"text-gray-500 dark:text-gray-500",primary:"text-gray-900 dark:text-white"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}},defaultVariants:{variant:"body",color:"default",align:"left"}}),To=({children:e,variant:r="body",color:a="default",align:n="left",className:o,as:s="p"})=>p.createElement(s,{className:f(Eo({variant:r,color:a,align:n}),o)},e),Ao=X.cva(O.link.default(),{variants:{variant:{default:O.link.default(),subtle:O.link.subtle(),muted:O.link.muted(),button:"inline-flex items-center justify-center px-4 py-2 rounded-md bg-blue-600 text-white hover:bg-blue-700 transition-colors"},external:{true:"inline-flex items-center gap-1",false:""}},defaultVariants:{variant:"default",external:!1}}),Io=({children:e,href:r,variant:a="default",external:n=!1,className:o,target:s,rel:i})=>t.jsxs("a",{href:r,target:s||(n?"_blank":void 0),rel:i||(n?"noopener noreferrer":void 0),className:f(Ao({variant:a,external:n}),o),children:[e,n&&t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]}),Mo=({children:e,size:r="md",variant:a="default",className:n})=>{const o={sm:"text-xs px-1 py-0.5",md:"text-sm px-1.5 py-0.5",lg:"text-base px-2 py-1"},s={default:"bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100",primary:"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",success:"bg-green-50 dark:bg-green-900/30 text-green-700 dark:text-green-300",warning:"bg-yellow-50 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300",danger:"bg-red-50 dark:bg-red-900/30 text-red-700 dark:text-red-300"};return t.jsx("code",{className:f("inline-block font-mono font-medium rounded",o[r],s[a],n),children:e})},Lo=({children:e,variant:r="primary",size:a="md",inline:n=!1,align:o="left",className:s,wrap:i=!1})=>{const l={primary:"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30",secondary:"text-purple-600 dark:text-purple-400 bg-purple-50 dark:bg-purple-900/30",success:"text-green-600 dark:text-green-400 bg-green-50 dark:bg-green-900/30",warning:"text-yellow-700 dark:text-yellow-400 bg-yellow-50 dark:bg-yellow-900/30",neutral:"text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-800"},d={xs:{text:"text-xs",padding:n?"px-1.5 py-0.5":"px-2 py-1"},sm:{text:"text-sm",padding:n?"px-2 py-0.5":"px-3 py-1.5"},md:{text:"text-base",padding:n?"px-2.5 py-1":"px-4 py-2"},lg:{text:"text-lg",padding:n?"px-3 py-1":"px-4 py-2"}},c={left:"text-left",center:"text-center",right:"text-right"},g=d[a],h=n?"code":"div";return t.jsx(h,{className:f("font-mono rounded-lg",l[r],g.text,g.padding,!n&&c[o],n?"inline-block":"block",!i&&"overflow-x-auto whitespace-nowrap",i&&"break-all",s),children:e})},Po=({children:e,size:r="md",className:a})=>{const n={sm:"text-xs px-1.5 py-0.5",md:"text-sm px-2 py-1",lg:"text-base px-2.5 py-1.5"};return t.jsx("kbd",{className:f("inline-flex items-center justify-center","font-mono font-semibold","bg-gray-100 dark:bg-gray-800","text-gray-900 dark:text-gray-100","border border-gray-300 dark:border-gray-600","rounded shadow-sm",n[r],a),children:e})},Oo=({children:e,cite:r,variant:a="default",size:n="md",className:o})=>{const s={sm:"text-sm p-3",md:"text-base p-4",lg:"text-lg p-6"},i={sm:"text-xs",md:"text-sm",lg:"text-base"},l={default:"border-l-4 border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800/50",bordered:"border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800",accent:"border-l-4 border-blue-500 dark:border-blue-400 bg-blue-50 dark:bg-blue-900/20"};return t.jsxs("blockquote",{className:f("rounded-r-lg",s[n],l[a],o),children:[t.jsx("p",{className:"text-gray-800 dark:text-gray-200 italic",children:e}),r&&t.jsxs("footer",{className:f("mt-2 text-gray-600 dark:text-gray-400",i[n]),children:["— ",t.jsx("cite",{className:"not-italic font-medium",children:r})]})]})},Uo=({children:e,variant:r="default",showIcon:a=!1,size:n="sm",className:o})=>{const s={sm:"text-sm",base:"text-base"},i={sm:"h-4 w-4",base:"h-5 w-5"},d={default:{text:"text-gray-600 dark:text-gray-400",icon:L.InformationCircleIcon},error:{text:"text-red-600 dark:text-red-400",icon:L.ExclamationCircleIcon},success:{text:"text-green-600 dark:text-green-400",icon:L.CheckCircleIcon},warning:{text:"text-yellow-600 dark:text-yellow-400",icon:L.ExclamationCircleIcon}}[r],c=d.icon;return t.jsxs("div",{className:f("flex items-start gap-1.5",o),children:[a&&t.jsx(c,{className:f(i[n],d.text,"flex-shrink-0 mt-0.5")}),t.jsx("p",{className:f(s[n],d.text),children:e})]})},Do=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UscreenUreaderUtext",children:r||"UscreenUreaderUtext Component"}),jo=({children:e,maxLength:r=50,position:a="end",ellipsis:n="...",showTooltip:o=!0,className:s})=>{const i=e||"";if(i.length<=r)return t.jsx("span",{className:s,children:i});const d=(()=>{const c=n.length,g=r-c;switch(a){case"start":return n+i.slice(i.length-g);case"middle":{const h=Math.floor(g/2),w=i.slice(0,h),m=i.slice(i.length-(g-h));return w+n+m}case"end":default:return i.slice(0,g)+n}})();return t.jsx("span",{className:f("inline-block",s),title:o?i:void 0,children:d})},_o=({value:e,style:r="decimal",currency:a="USD",unit:n,minimumFractionDigits:o,maximumFractionDigits:s,locale:i="en-US",notation:l="standard",className:d})=>{const c=()=>{try{const g={style:r,notation:l,minimumFractionDigits:o,maximumFractionDigits:s};return r==="currency"&&(g.currency=a),r==="unit"&&n&&(g.unit=n),new Intl.NumberFormat(i,g).format(e)}catch(g){return console.error("Number formatting error:",g),e.toLocaleString(i)}};return t.jsx("span",{className:f(d),children:c()})},zo=({date:e,showTooltip:r=!0,updateInterval:a=0,className:n})=>{const[,o]=p.useState(0),s=p.useMemo(()=>e instanceof Date?e:new Date(e),[e]);p.useEffect(()=>{if(a===0)return;const c=setInterval(()=>{o(g=>g+1)},a*1e3);return()=>clearInterval(c)},[a]);const l=(()=>{const g=new Date().getTime()-s.getTime(),h=Math.floor(g/1e3),w=Math.floor(h/60),m=Math.floor(w/60),b=Math.floor(m/24),y=Math.floor(b/7),v=Math.floor(b/30),T=Math.floor(b/365);return h<60?"just now":w<60?`${w} ${w===1?"minute":"minutes"} ago`:m<24?`${m} ${m===1?"hour":"hours"} ago`:b<7?`${b} ${b===1?"day":"days"} ago`:y<4?`${y} ${y===1?"week":"weeks"} ago`:v<12?`${v} ${v===1?"month":"months"} ago`:`${T} ${T===1?"year":"years"} ago`})(),d=s.toLocaleString();return t.jsx("time",{dateTime:s.toISOString(),title:r?d:void 0,className:f(n),children:l})},_e=({size:e="default",variant:r="default",className:a,ariaLabel:n="Loading",loadingText:o="Loading..."})=>{const s=()=>{const i={small:"w-4 h-4",default:"w-6 h-6",large:"w-8 h-8",extraLarge:"w-16 h-16 border-4"},l={default:"border-gray-300 border-t-blue-600",white:"border-white/30 border-t-white",success:"border-gray-300 border-t-green-600",warning:"border-gray-300 border-t-orange-600",error:"border-gray-300 border-t-red-600"};return`animate-spin rounded-full border-2 ${i[e]} ${l[r]}`};return t.jsx("div",{className:f(s(),a),role:"status","aria-label":n,children:t.jsx("span",{className:"sr-only",children:o})})},Bo=({isLoading:e,message:r,mode:a="fullscreen",blur:n=!1,spinnerSize:o="large",className:s})=>e?t.jsxs("div",{className:f(a==="fullscreen"?"fixed":"absolute","inset-0 z-50","flex flex-col items-center justify-center","bg-white/80 dark:bg-gray-900/80",n&&"backdrop-blur-sm",s),role:"alert","aria-live":"polite","aria-busy":"true",children:[t.jsx(_e,{size:o}),r&&t.jsx("p",{className:f(O.body.md(),"text-gray-700 dark:text-gray-300 mt-4"),children:r})]}):null,Wo=({size:e="md",variant:r="primary",color:a,className:n})=>{const o={sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-3 h-3"},s={primary:"bg-blue-600 dark:bg-blue-500",secondary:"bg-gray-600 dark:bg-gray-400",white:"bg-white"},i=f("rounded-full",o[e],a?"":s[r]);return t.jsxs("div",{className:f("flex items-center gap-1",n),children:[t.jsx("div",{className:i,style:{backgroundColor:a,animation:"loading-dot-bounce 1.4s infinite ease-in-out both",animationDelay:"-0.32s"}}),t.jsx("div",{className:i,style:{backgroundColor:a,animation:"loading-dot-bounce 1.4s infinite ease-in-out both",animationDelay:"-0.16s"}}),t.jsx("div",{className:i,style:{backgroundColor:a,animation:"loading-dot-bounce 1.4s infinite ease-in-out both"}}),t.jsx("style",{children:`
|
|
1
|
+
(function(u,_e){typeof exports=="object"&&typeof module<"u"?_e(exports,require("clsx"),require("tailwind-merge"),require("react/jsx-runtime"),require("react"),require("class-variance-authority"),require("react-dom"),require("@heroicons/react/24/outline"),require("@heroicons/react/24/solid"),require("@radix-ui/react-switch"),require("@radix-ui/react-select"),require("lucide-react"),require("@radix-ui/react-label"),require("@radix-ui/react-slot"),require("react-router-dom"),require("@radix-ui/react-tabs"),require("react-i18next"),require("react-helmet-async"),require("web-vitals")):typeof define=="function"&&define.amd?define(["exports","clsx","tailwind-merge","react/jsx-runtime","react","class-variance-authority","react-dom","@heroicons/react/24/outline","@heroicons/react/24/solid","@radix-ui/react-switch","@radix-ui/react-select","lucide-react","@radix-ui/react-label","@radix-ui/react-slot","react-router-dom","@radix-ui/react-tabs","react-i18next","react-helmet-async","web-vitals"],_e):(u=typeof globalThis<"u"?globalThis:u||self,_e(u.MailBoxComponents={},u.clsx,u.tailwindMerge,u.ReactJSXRuntime,u.React,u.cva,u.ReactDOM,u.HeroiconsOutline,u.HeroiconsSolid,u.RadixSwitch,u.RadixSelect,u.LucideReact,u.RadixLabel,u.RadixSlot,u.ReactRouterDOM,u.RadixTabs,u.ReactI18next,u.ReactHelmetAsync,u.WebVitals))})(this,(function(u,_e,jn,t,v,X,ht,L,fe,br,_n,Re,ft,zn,mr,be,bt,Bn,ze){"use strict";function mt(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return r.default=e,Object.freeze(r)}const Y=mt(v),$=mt(_n);function f(...e){return jn.twMerge(_e.clsx(e))}const yt=({children:e,as:r="div",p:a,px:n,py:o,m:s,mx:i,my:l,bg:d,border:c=!1,rounded:g,shadow:h,w,h:m,className:b})=>{const y={none:"0",xs:"1",sm:"2",md:"4",lg:"6",xl:"8","2xl":"12",auto:"auto"},p=d?{transparent:"bg-transparent",white:"bg-white dark:bg-gray-900",gray:"bg-gray-100 dark:bg-gray-800",primary:"bg-blue-50 dark:bg-blue-900/20",success:"bg-green-50 dark:bg-green-900/20",warning:"bg-yellow-50 dark:bg-yellow-900/20",danger:"bg-red-50 dark:bg-red-900/20"}[d]:"",T=g?{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}[g]:"",N=h?{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl"}[h]:"",C=w?{auto:"w-auto",full:"w-full",screen:"w-screen",min:"w-min",max:"w-max"}[w]:"",k=m?{auto:"h-auto",full:"h-full",screen:"h-screen",min:"h-min",max:"h-max"}[m]:"",S=[];a&&S.push("p-"+y[a]),n&&S.push("px-"+y[n]),o&&S.push("py-"+y[o]);const I=[];return s&&I.push("m-"+y[s]),i&&I.push("mx-"+y[i]),l&&I.push("my-"+y[l]),t.jsx(r,{className:f(...S,...I,p,c&&"border border-gray-200 dark:border-gray-700",T,N,C,k,b),children:e})},Wn=({direction:e="row",align:r,justify:a,wrap:n="nowrap",gap:o,inline:s=!1,className:i,...l})=>{const d={row:"flex-row","row-reverse":"flex-row-reverse",col:"flex-col","col-reverse":"flex-col-reverse"},c=r?{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"}[r]:"",g=a?{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}[a]:"",h={nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"},w=o?{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"}[o]:"";return t.jsx(yt,{...l,className:f(s?"inline-flex":"flex",d[e],c,g,h[n],w,i)})},Fn={row:"flex-row","row-reverse":"flex-row-reverse",col:"flex-col","col-reverse":"flex-col-reverse"},Vn={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},$n={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},qn={wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},Hn={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},Gn=({children:e,direction:r="row",align:a="start",justify:n="start",wrap:o="nowrap",gap:s="0",className:i})=>t.jsx("div",{className:f("flex",Fn[r],Vn[a],$n[n],qn[o],Hn[s],i),children:e}),Yn=({children:e,size:r="xl",center:a=!0,padding:n="md",className:o})=>{const s={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},i={none:"",sm:"px-4 py-2",md:"px-6 py-4",lg:"px-8 py-6"};return t.jsx("div",{className:f("w-full",s[r],a&&"mx-auto",i[n],o),children:e})},Kn=({children:e,cols:r=1,gap:a="md",autoFit:n,autoFill:o,alignItems:s="stretch",justifyItems:i="stretch",className:l})=>{const d={none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},c={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},g={start:"justify-items-start",center:"justify-items-center",end:"justify-items-end",stretch:"justify-items-stretch"},h=()=>{if(n||o)return"";if(typeof r=="number")return{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"}[r]||"grid-cols-1";const m=[];return r.sm&&m.push("grid-cols-"+r.sm),r.md&&m.push("md:grid-cols-"+r.md),r.lg&&m.push("lg:grid-cols-"+r.lg),r.xl&&m.push("xl:grid-cols-"+r.xl),m.join(" ")};let w;return n?w="repeat(auto-fit, minmax("+n+", 1fr))":o&&(w="repeat(auto-fill, minmax("+o+", 1fr))"),t.jsx("div",{className:f("grid",h(),d[a],c[s],g[i],l),style:w?{gridTemplateColumns:w}:void 0,children:e})},yr=({children:e,direction:r="vertical",spacing:a="md",align:n="stretch",justify:o="start",wrap:s=!1,full:i=!1,divider:l=!1,className:d})=>{const c=r==="vertical",g={vertical:{none:"",xs:"space-y-1",sm:"space-y-2",md:"space-y-4",lg:"space-y-6",xl:"space-y-8","2xl":"space-y-12"},horizontal:{none:"",xs:"space-x-1",sm:"space-x-2",md:"space-x-4",lg:"space-x-6",xl:"space-x-8","2xl":"space-x-12"}},h={vertical:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},horizontal:{none:"",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"}},w={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},m={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};return t.jsx("div",{className:f("flex",c?"flex-col":"flex-row",l?h[r][a]:g[r][a],w[n],m[o],s&&"flex-wrap",i&&(c?"h-full":"w-full"),d),children:l?v.Children.map(e,(b,y)=>t.jsxs(v.Fragment,{children:[b,y<v.Children.count(e)-1&&t.jsx("div",{className:f("bg-gray-200 dark:bg-gray-700",c?"h-px w-full":"w-px h-full")})]},y)):e})},Zn=e=>t.jsx(yr,{direction:"vertical",...e}),Xn=e=>t.jsx(yr,{direction:"horizontal",...e}),Qn=({children:e,axis:r="both",inline:a=!1,className:n})=>{const o=()=>{switch(r){case"horizontal":return"justify-center";case"vertical":return"items-center";case"both":default:return"justify-center items-center"}};return t.jsx("div",{className:f(a?"inline-flex":"flex",o(),n),children:e})},Jn=({size:e="md",axis:r="vertical",flex:a=!1,className:n})=>{const o={vertical:{xs:"h-1",sm:"h-2",md:"h-4",lg:"h-6",xl:"h-8","2xl":"h-12"},horizontal:{xs:"w-1",sm:"w-2",md:"w-4",lg:"w-6",xl:"w-8","2xl":"w-12"}},s=typeof e=="number"?r==="vertical"?{height:`${e}px`}:{width:`${e}px`}:void 0,i=typeof e=="string"?o[r][e]:"";return t.jsx("div",{className:f(a&&"flex-1",!a&&i,n),style:s,"aria-hidden":"true"})},Rn=X.cva("",{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"}}),eo=({children:e,variant:r="default",spacing:a="3xl",background:n="none",className:o,as:s="section",id:i})=>v.createElement(s,{id:i,className:f(Rn({variant:r,spacing:a,background:n}),o)},e),ro=X.cva("min-h-screen flex flex-col",{variants:{background:{default:"bg-gray-50 dark:bg-gray-900",surface:"bg-white dark:bg-gray-800",transparent:"bg-transparent",gradient:"bg-gradient-to-br from-gray-50 via-blue-50 to-purple-50 dark:from-gray-900 dark:via-blue-900/20 dark:to-purple-900/20"},overflow:{visible:"overflow-visible",hidden:"overflow-hidden",scroll:"overflow-auto"}},defaultVariants:{background:"default",overflow:"visible"}}),to=({children:e,background:r="default",overflow:a="visible",className:n})=>t.jsx("div",{className:f(ro({background:r,overflow:a}),n),children:e}),ao=({children:e,ratio:r="16/9",className:a})=>{const s=`${1/(typeof r=="string"?{"16/9":1.7777777777777777,"4/3":1.3333333333333333,"1/1":1,"21/9":2.3333333333333335,"3/2":1.5}[r]:r)*100}%`;return t.jsx("div",{className:f("relative w-full",a),style:{paddingBottom:s},children:t.jsx("div",{className:"absolute inset-0",children:e})})},A={typography:{family:{sans:"font-sans",display:"font-sans",body:"font-sans"},semantic:{caption:"text-xs",small:"text-sm",body:"text-base",bodyLarge:"text-lg",h6:"text-base",h5:"text-lg",h4:"text-xl",h3:"text-2xl",h2:"text-3xl",h1:"text-4xl",hero:"text-8xl"},weight:{semibold:"font-semibold",bold:"font-bold",body:"font-normal",emphasis:"font-medium",strong:"font-semibold",heading:"font-bold",display:"font-extrabold"},decoration:{none:"no-underline",underline:"underline"},underlineOffset:{medium:"underline-offset-2"},leading:{tight:"leading-tight",heading:"leading-tight",body:"leading-relaxed",caption:"leading-normal",display:"leading-none"},tracking:{heading:"tracking-tight",body:"tracking-normal",caption:"tracking-normal",uppercase:"tracking-wider"},transform:{uppercase:"uppercase"}}},P={heading:{display:{hero:()=>`${A.typography.family.display} ${A.typography.semantic.hero} ${A.typography.weight.display} ${A.typography.leading.display} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,xl:()=>`${A.typography.family.display} text-7xl ${A.typography.weight.display} ${A.typography.leading.display} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,lg:()=>`${A.typography.family.display} text-6xl ${A.typography.weight.bold} ${A.typography.leading.display} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,md:()=>`${A.typography.family.display} text-5xl ${A.typography.weight.bold} ${A.typography.leading.tight} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,sm:()=>`${A.typography.family.display} text-4xl ${A.typography.weight.bold} ${A.typography.leading.tight} ${A.typography.tracking.heading} text-gray-900 dark:text-white`},h1:()=>`${A.typography.family.sans} ${A.typography.semantic.h1} ${A.typography.weight.heading} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${A.typography.family.sans} ${A.typography.semantic.h2} ${A.typography.weight.heading} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${A.typography.family.sans} ${A.typography.semantic.h3} ${A.typography.weight.heading} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,h4:()=>`${A.typography.family.sans} ${A.typography.semantic.h4} ${A.typography.weight.semibold} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,h5:()=>`${A.typography.family.sans} ${A.typography.semantic.h5} ${A.typography.weight.semibold} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,h6:()=>`${A.typography.family.sans} ${A.typography.semantic.h6} ${A.typography.weight.semibold} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,responsive:{h1:()=>`${A.typography.family.sans} text-2xl sm:text-3xl md:text-4xl lg:text-5xl ${A.typography.weight.heading} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${A.typography.family.sans} text-xl sm:text-2xl md:text-3xl lg:text-4xl ${A.typography.weight.heading} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${A.typography.family.sans} text-lg sm:text-xl md:text-2xl lg:text-3xl ${A.typography.weight.semibold} ${A.typography.leading.heading} ${A.typography.tracking.heading} text-gray-900 dark:text-white`,display:()=>`${A.typography.family.display} text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl ${A.typography.weight.display} ${A.typography.leading.display} ${A.typography.tracking.heading} text-gray-900 dark:text-white`}},body:{xl:()=>`${A.typography.family.body} ${A.typography.semantic.bodyLarge} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-700 dark:text-gray-300`,lg:()=>`${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-700 dark:text-gray-300`,md:()=>`${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-700 dark:text-gray-300`,sm:()=>`${A.typography.family.body} ${A.typography.semantic.small} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-600 dark:text-gray-400`,xs:()=>`${A.typography.family.body} ${A.typography.semantic.caption} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-600 dark:text-gray-400`,strong:{xl:()=>`${A.typography.family.body} ${A.typography.semantic.bodyLarge} ${A.typography.weight.strong} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.strong} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.strong} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${A.typography.family.body} ${A.typography.semantic.small} ${A.typography.weight.strong} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`},emphasis:{xl:()=>`${A.typography.family.body} ${A.typography.semantic.bodyLarge} ${A.typography.weight.emphasis} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.emphasis} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.emphasis} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${A.typography.family.body} ${A.typography.semantic.small} ${A.typography.weight.emphasis} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-900 dark:text-white`},muted:{xl:()=>`${A.typography.family.body} ${A.typography.semantic.bodyLarge} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-600 dark:text-gray-400`,lg:()=>`${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-600 dark:text-gray-400`,md:()=>`${A.typography.family.body} ${A.typography.semantic.body} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-600 dark:text-gray-400`,sm:()=>`${A.typography.family.body} ${A.typography.semantic.small} ${A.typography.weight.body} ${A.typography.leading.body} ${A.typography.tracking.body} text-gray-600 dark:text-gray-400`}},caption:{default:()=>`${A.typography.family.body} ${A.typography.semantic.caption} ${A.typography.weight.body} ${A.typography.leading.caption} ${A.typography.tracking.caption} text-gray-500 dark:text-gray-500`,emphasis:()=>`${A.typography.family.body} ${A.typography.semantic.caption} ${A.typography.weight.emphasis} ${A.typography.leading.caption} ${A.typography.tracking.caption} text-gray-600 dark:text-gray-400`,uppercase:()=>`${A.typography.family.body} ${A.typography.semantic.caption} ${A.typography.weight.emphasis} ${A.typography.leading.caption} ${A.typography.tracking.uppercase} ${A.typography.transform.uppercase} text-gray-500 dark:text-gray-500`},link:{default:()=>`${A.typography.decoration.underline} ${A.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150`,subtle:()=>`${A.typography.decoration.none} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 hover:${A.typography.decoration.underline} hover:${A.typography.underlineOffset.medium} transition-all duration-150`,muted:()=>`${A.typography.decoration.underline} ${A.typography.underlineOffset.medium} text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 transition-colors duration-150`,external:()=>`${A.typography.decoration.underline} ${A.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:()=>`${A.typography.family.body} text-sm ${A.typography.weight.emphasis} text-gray-900 dark:text-white`,required:()=>`${A.typography.family.body} text-sm ${A.typography.weight.emphasis} text-gray-900 dark:text-white after:content-['*'] after:ml-0.5 after:text-red-500`,optional:()=>`${A.typography.family.body} text-sm ${A.typography.weight.body} text-gray-600 dark:text-gray-400`,helper:()=>`${A.typography.family.body} text-sm ${A.typography.weight.body} text-gray-500 dark:text-gray-500`,error:()=>`${A.typography.family.body} text-sm ${A.typography.weight.body} text-red-600 dark:text-red-400`,success:()=>`${A.typography.family.body} text-sm ${A.typography.weight.body} text-green-600 dark:text-green-400`}},_={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"}},badge:{default:()=>"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",primary:()=>"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",success:()=>"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",warning:()=>"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",error:()=>"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",ethereum:()=>"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",solana:()=>"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",small:(e="default")=>{const r={default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",error:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"};return`${r[e]||r.default} inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium`},large:(e="default")=>{const r={default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",error:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"};return`${r[e]||r.default} inline-flex items-center px-3 py-1 rounded-full text-sm font-medium`}},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"},alert:{info:()=>"bg-blue-50 border-blue-200 dark:bg-blue-900/20 dark:border-blue-800 text-blue-800 dark:text-blue-200 rounded-md border p-4 flex items-start gap-3",success:()=>"bg-green-50 border-green-200 dark:bg-green-900/20 dark:border-green-800 text-green-800 dark:text-green-200 rounded-md border p-4 flex items-start gap-3",warning:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded-md border p-4 flex items-start gap-3",attention:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded-md border p-4 flex items-start gap-3",error:()=>"bg-red-50 border-red-200 dark:bg-red-900/20 dark:border-red-800 text-red-800 dark:text-red-200 rounded-md border p-4 flex items-start gap-3",compact:{info:()=>"bg-blue-50 border-blue-200 dark:bg-blue-900/20 dark:border-blue-800 text-blue-800 dark:text-blue-200 rounded border px-3 py-2 text-sm",success:()=>"bg-green-50 border-green-200 dark:bg-green-900/20 dark:border-green-800 text-green-800 dark:text-green-200 rounded border px-3 py-2 text-sm",warning:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded border px-3 py-2 text-sm",attention:()=>"bg-amber-50 border-amber-200 dark:bg-amber-900/20 dark:border-amber-800 text-amber-800 dark:text-amber-200 rounded border px-3 py-2 text-sm",error:()=>"bg-red-50 border-red-200 dark:bg-red-900/20 dark:border-red-800 text-red-800 dark:text-red-200 rounded border px-3 py-2 text-sm"}},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"}},icon:{variant:{default:{xs:()=>"h-3 w-3 text-gray-500 dark:text-gray-400",sm:()=>"h-4 w-4 text-gray-500 dark:text-gray-400",md:()=>"h-5 w-5 text-gray-500 dark:text-gray-400",lg:()=>"h-6 w-6 text-gray-500 dark:text-gray-400",xl:()=>"h-8 w-8 text-gray-500 dark:text-gray-400"},success:{xs:()=>"h-3 w-3 text-green-600 dark:text-green-400",sm:()=>"h-4 w-4 text-green-600 dark:text-green-400",md:()=>"h-5 w-5 text-green-600 dark:text-green-400",lg:()=>"h-6 w-6 text-green-600 dark:text-green-400",xl:()=>"h-8 w-8 text-green-600 dark:text-green-400"},warning:{xs:()=>"h-3 w-3 text-amber-600 dark:text-amber-400",sm:()=>"h-4 w-4 text-amber-600 dark:text-amber-400",md:()=>"h-5 w-5 text-amber-600 dark:text-amber-400",lg:()=>"h-6 w-6 text-amber-600 dark:text-amber-400",xl:()=>"h-8 w-8 text-amber-600 dark:text-amber-400"},error:{xs:()=>"h-3 w-3 text-red-600 dark:text-red-400",sm:()=>"h-4 w-4 text-red-600 dark:text-red-400",md:()=>"h-5 w-5 text-red-600 dark:text-red-400",lg:()=>"h-6 w-6 text-red-600 dark:text-red-400",xl:()=>"h-8 w-8 text-red-600 dark:text-red-400"},muted:{xs:()=>"h-3 w-3 text-gray-400 dark:text-gray-500",sm:()=>"h-4 w-4 text-gray-400 dark:text-gray-500",md:()=>"h-5 w-5 text-gray-400 dark:text-gray-500",lg:()=>"h-6 w-6 text-gray-400 dark:text-gray-500",xl:()=>"h-8 w-8 text-gray-400 dark:text-gray-500"}}},overlays:{modal:{backdrop:()=>"fixed inset-0 z-40 bg-black/50 dark:bg-black/70 backdrop-blur-sm transition-all duration-300 ease-out",backdropEntering:()=>"opacity-0",backdropEntered:()=>"opacity-100",backdropExiting:()=>"opacity-0",container:()=>"fixed inset-0 z-50 flex items-center justify-center p-4 transition-all duration-300 ease-out",containerEntering:()=>"opacity-0 scale-95",containerEntered:()=>"opacity-100 scale-100",containerExiting:()=>"opacity-0 scale-95",content:()=>"relative w-full max-w-lg bg-white dark:bg-gray-900 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 max-h-[80vh] overflow-hidden",small:()=>"max-w-sm",medium:()=>"max-w-lg",large:()=>"max-w-2xl",extraLarge:()=>"max-w-4xl",fullWidth:()=>"max-w-[95vw]",header:()=>"flex items-center justify-between p-4 sm:p-6 border-b border-gray-200 dark:border-gray-700",title:()=>"text-lg font-semibold text-gray-900 dark:text-gray-100",closeButton:()=>"p-1 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-md transition-colors",body:()=>"p-4 sm:p-6 overflow-y-auto",footer:()=>"flex items-center justify-end space-x-3 p-4 sm:p-6 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/50"},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"}}},no={success:"bg-green-500",error:"bg-red-500",warning:"bg-orange-500",attention:"bg-amber-500",info:"bg-blue-500",neutral:"bg-gray-500"};function Pe(e){return no[e]}const oo={default:"bg-white dark:bg-gray-800",bordered:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700",elevated:"bg-white dark:bg-gray-800 shadow-md",info:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 text-blue-900 dark:text-blue-300",success:"bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 text-green-900 dark:text-green-300",warning:"bg-orange-50 dark:bg-orange-900/20 border border-orange-200 dark:border-orange-800 text-orange-900 dark:text-orange-300",attention:"bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 text-amber-900 dark:text-amber-300",error:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-900 dark:text-red-300"};function so(e){return oo[e]}const io={default:{container:"bg-gradient-to-r from-blue-600/10 to-purple-600/10 border border-blue-200 text-blue-600 backdrop-blur-sm",icon:"text-blue-600"},premium:{container:"bg-gradient-to-r from-blue-600/10 to-purple-600/10 border border-blue-200 text-blue-600 backdrop-blur-sm",icon:"text-blue-600"},primary:{container:"bg-gradient-to-r from-blue-600/10 to-purple-600/10 border border-blue-200 text-blue-600 backdrop-blur-sm",icon:"text-blue-600"},light:{container:"bg-white/20 border border-white/30 text-white backdrop-blur-sm",icon:"text-white"}};function lo(e){return io[e]}const co={border:{default:"border-gray-200 dark:border-gray-700"}},uo=({label:e,labelPosition:r="center",orientation:a="horizontal",spacing:n="md",thickness:o="thin",variant:s="light",className:i,lineClassName:l})=>{const d={horizontal:{none:"my-0",sm:"my-2",md:"my-4",lg:"my-6",xl:"my-8"},vertical:{none:"mx-0",sm:"mx-2",md:"mx-4",lg:"mx-6",xl:"mx-8"}},c={horizontal:{thin:"border-t",medium:"border-t-2",thick:"border-t-4"},vertical:{thin:"border-l",medium:"border-l-2",thick:"border-l-4"}},g={light:"border-gray-200 dark:border-gray-700",medium:"border-gray-300 dark:border-gray-600",dark:"border-gray-400 dark:border-gray-500"};if(a==="vertical")return t.jsx("div",{className:f("self-stretch",c.vertical[o],g[s],d.vertical[n],i),role:"separator","aria-orientation":"vertical"});if(!e)return t.jsx("hr",{className:f(c.horizontal[o],g[s],d.horizontal[n],l,i),role:"separator","aria-orientation":"horizontal"});const h={left:"justify-start",center:"justify-center",right:"justify-end"};return t.jsxs("div",{className:f("flex items-center",d.horizontal[n],h[r],i),role:"separator","aria-orientation":"horizontal",children:[r!=="left"&&t.jsx("div",{className:f("flex-1",c.horizontal[o],g[s],l)}),t.jsx("span",{className:f(P.body.sm(),"px-3 text-gray-500 dark:text-gray-400 whitespace-nowrap"),children:e}),r!=="right"&&t.jsx("div",{className:f("flex-1",c.horizontal[o],g[s],l)})]})},go=({orientation:e="horizontal",spacing:r="md",thickness:a="thin",className:n})=>{const o={horizontal:{none:"",sm:"my-1",md:"my-2",lg:"my-4"},vertical:{none:"",sm:"mx-1",md:"mx-2",lg:"mx-4"}},s={horizontal:{thin:"h-px",medium:"h-0.5",thick:"h-1"},vertical:{thin:"w-px",medium:"w-0.5",thick:"w-1"}},i=e==="horizontal";return t.jsx("div",{role:"separator","aria-orientation":e,className:f("bg-gray-200 dark:bg-gray-700",i?"w-full":"h-full",s[e][a],o[e][r],n)})},ho=({children:e,variant:r="blue",position:a="left",width:n="thick",padding:o="md",className:s})=>{const i={blue:"border-blue-500 dark:border-blue-400",green:"border-green-500 dark:border-green-400",purple:"border-purple-500 dark:border-purple-400",indigo:"border-indigo-500 dark:border-indigo-400",emerald:"border-emerald-500 dark:border-emerald-400",orange:"border-orange-500 dark:border-orange-400",red:"border-red-500 dark:border-red-400",gray:"border-gray-400 dark:border-gray-500"},l={left:"border-l",right:"border-r",top:"border-t",bottom:"border-b"},d={thin:"2",medium:"3",thick:"4"},c={left:{sm:"pl-3",md:"pl-4",lg:"pl-6"},right:{sm:"pr-3",md:"pr-4",lg:"pr-6"},top:{sm:"pt-3",md:"pt-4",lg:"pt-6"},bottom:{sm:"pb-3",md:"pb-4",lg:"pb-6"}},g=`${l[a]}-${d[n]}`;return t.jsx("div",{className:f(g,i[r],c[a][o],s),children:e})},fo=({children:e,title:r,position:a="bottom-right",collapsible:n=!0,defaultCollapsed:o=!1,closeable:s=!1,onClose:i,className:l})=>{const[d,c]=v.useState(o),g={"bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-right":"top-4 right-4","top-left":"top-4 left-4"};return t.jsxs("div",{className:f("fixed z-50 w-80","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-lg shadow-2xl",g[a],l),children:[(r||n||s)&&t.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-gray-200 dark:border-gray-700",children:[r&&t.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white",children:r}),t.jsxs("div",{className:"flex items-center gap-2",children:[n&&t.jsx("button",{onClick:()=>c(!d),className:"p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded transition-colors","aria-label":d?"Expand":"Collapse",children:t.jsx("svg",{className:f("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",d&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})}),s&&t.jsx("button",{onClick:i,className:"p-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded transition-colors","aria-label":"Close",children:t.jsx("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),!d&&t.jsx("div",{className:"p-4",children:e})]})},bo=({left:e,right:r,direction:a="horizontal",initialSplit:n=.5,split:o,onSplitChange:s,minLeftSize:i=100,minRightSize:l=100,dividerSize:d=8,resizable:c=!0,className:g})=>{const[h,w]=v.useState(n),[m,b]=v.useState(!1),y=v.useRef(null),p=o!==void 0?o:h,T=C=>{c&&(C.preventDefault(),b(!0))};v.useEffect(()=>{if(!m)return;const C=S=>{const I=y.current;if(!I)return;const E=I.getBoundingClientRect();let M;a==="horizontal"?M=(S.clientX-E.left)/E.width:M=(S.clientY-E.top)/E.height,M=Math.max(0,Math.min(1,M));const x=a==="horizontal"?E.width:E.height,O=typeof i=="string"?parseFloat(i)/100*x:i,D=typeof l=="string"?parseFloat(l)/100*x:l,U=O/x,B=1-D/x;M=Math.max(U,Math.min(B,M)),o!==void 0&&s?s(M):w(M)},k=()=>{b(!1)};return document.addEventListener("mousemove",C),document.addEventListener("mouseup",k),()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",k)}},[m,a,i,l,o,s]),v.useEffect(()=>(m?(document.body.style.userSelect="none",document.body.style.cursor=a==="horizontal"?"col-resize":"row-resize"):(document.body.style.userSelect="",document.body.style.cursor=""),()=>{document.body.style.userSelect="",document.body.style.cursor=""}),[m,a]);const N=a==="horizontal";return t.jsxs("div",{ref:y,className:f("w-full h-full flex",N?"flex-row":"flex-col",g),children:[t.jsx("div",{className:"overflow-auto",style:{[N?"width":"height"]:`${p*100}%`},children:e}),t.jsx("div",{onMouseDown:T,className:f("flex-shrink-0 group","bg-gray-300 dark:bg-gray-700",c&&"hover:bg-blue-500 dark:hover:bg-blue-400","transition-colors",m&&"bg-blue-500 dark:bg-blue-400",N?"cursor-col-resize":"cursor-row-resize",!c&&"cursor-default"),style:{[N?"width":"height"]:`${d}px`},children:c&&t.jsx("div",{className:f("flex items-center justify-center w-full h-full","text-gray-600 dark:text-gray-400","group-hover:text-white",m&&"text-white"),children:N?t.jsxs("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:[t.jsx("circle",{cx:"10",cy:"6",r:"1.5"}),t.jsx("circle",{cx:"10",cy:"12",r:"1.5"}),t.jsx("circle",{cx:"10",cy:"18",r:"1.5"}),t.jsx("circle",{cx:"14",cy:"6",r:"1.5"}),t.jsx("circle",{cx:"14",cy:"12",r:"1.5"}),t.jsx("circle",{cx:"14",cy:"18",r:"1.5"})]}):t.jsxs("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:[t.jsx("circle",{cx:"6",cy:"10",r:"1.5"}),t.jsx("circle",{cx:"12",cy:"10",r:"1.5"}),t.jsx("circle",{cx:"18",cy:"10",r:"1.5"}),t.jsx("circle",{cx:"6",cy:"14",r:"1.5"}),t.jsx("circle",{cx:"12",cy:"14",r:"1.5"}),t.jsx("circle",{cx:"18",cy:"14",r:"1.5"})]})})}),t.jsx("div",{className:"overflow-auto flex-1",style:{[N?"width":"height"]:`${(1-p)*100}%`},children:r})]})},mo=({children:e,defaultWidth:r=300,defaultHeight:a=200,minWidth:n=100,minHeight:o=100,maxWidth:s,maxHeight:i,directions:l=["right","bottom","bottom-right"],onResize:d,onResizeEnd:c,showHandles:g=!0,className:h})=>{const[w,m]=v.useState(r),[b,y]=v.useState(a),[p,T]=v.useState(!1),[N,C]=v.useState(null),k=v.useRef(null),S=v.useRef({x:0,y:0,width:0,height:0}),I=x=>O=>{O.preventDefault(),O.stopPropagation(),T(!0),C(x),S.current={x:O.clientX,y:O.clientY,width:w,height:b}};v.useEffect(()=>{if(!p||!N)return;const x=D=>{const U=D.clientX-S.current.x,B=D.clientY-S.current.y;let z=S.current.width,V=S.current.height;N.includes("right")?z=S.current.width+U:N.includes("left")&&(z=S.current.width-U),N.includes("bottom")?V=S.current.height+B:N.includes("top")&&(V=S.current.height-B),z=Math.max(n,z),V=Math.max(o,V),s&&(z=Math.min(s,z)),i&&(V=Math.min(i,V)),m(z),y(V),d&&d(z,V)},O=()=>{T(!1),C(null),c&&c(w,b)};return document.addEventListener("mousemove",x),document.addEventListener("mouseup",O),()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",O)}},[p,N,w,b,n,o,s,i,d,c]);const E=v.useCallback(x=>({top:"ns-resize",right:"ew-resize",bottom:"ns-resize",left:"ew-resize","top-left":"nwse-resize","top-right":"nesw-resize","bottom-left":"nesw-resize","bottom-right":"nwse-resize"})[x],[]);v.useEffect(()=>(p?(document.body.style.userSelect="none",document.body.style.cursor=E(N)):(document.body.style.userSelect="",document.body.style.cursor=""),()=>{document.body.style.userSelect="",document.body.style.cursor=""}),[p,N,E]);const M=x=>{if(!l.includes(x))return null;const O={top:"top-0 left-0 right-0 h-1 cursor-ns-resize",right:"top-0 right-0 bottom-0 w-1 cursor-ew-resize",bottom:"bottom-0 left-0 right-0 h-1 cursor-ns-resize",left:"top-0 left-0 bottom-0 w-1 cursor-ew-resize","top-left":"top-0 left-0 w-3 h-3 cursor-nwse-resize","top-right":"top-0 right-0 w-3 h-3 cursor-nesw-resize","bottom-left":"bottom-0 left-0 w-3 h-3 cursor-nesw-resize","bottom-right":"bottom-0 right-0 w-3 h-3 cursor-nwse-resize"};return t.jsx("div",{className:f("absolute z-10",g&&"bg-blue-500 dark:bg-blue-400 opacity-0 hover:opacity-50",O[x]),onMouseDown:I(x)},x)};return t.jsxs("div",{ref:k,className:f("relative",h),style:{width:`${w}px`,height:`${b}px`},children:[e,["top","right","bottom","left","top-left","top-right","bottom-left","bottom-right"].map(M)]})},yo=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UresizableUpanels",children:r||"UresizableUpanels Component"}),po=({children:e,maxHeight:r,hideScrollbar:a=!1,direction:n="vertical",className:o})=>{const s={vertical:"overflow-y-auto overflow-x-hidden",horizontal:"overflow-x-auto overflow-y-hidden",both:"overflow-auto"},i=a?"scrollbar-hide":f("scrollbar-thin","scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-600","scrollbar-track-gray-100 dark:scrollbar-track-gray-800","hover:scrollbar-thumb-gray-400 dark:hover:scrollbar-thumb-gray-500"),l=typeof r=="number"?`${r}px`:r;return t.jsx("div",{className:f("relative",s[n],i,o),style:l?{maxHeight:l}:void 0,children:e})},vo=({children:e,columns:r=3,gap:a=16,breakpoints:n,className:o})=>{const[s,i]=v.useState(r),l=v.useRef(null);v.useEffect(()=>{if(!n)return;const g=()=>{const h=window.innerWidth,w=Object.keys(n).map(Number).sort((m,b)=>b-m);for(const m of w)if(h>=m){i(n[m]);return}i(r)};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[n,r]);const d=v.Children.toArray(e),c=Array.from({length:s},()=>[]);return d.forEach((g,h)=>{c[h%s].push(g)}),t.jsx("div",{ref:l,className:f("flex",o),style:{gap:`${a}px`},children:c.map((g,h)=>t.jsx("div",{className:"flex-1 flex flex-col",style:{gap:`${a}px`},children:g},h))})},me=({children:e,container:r})=>{const[a,n]=v.useState(!1);if(v.useEffect(()=>(n(!0),()=>n(!1)),[]),!a)return null;const o=r||document.body;return ht.createPortal(e,o)},er=({isOpen:e,onClose:r,children:a,blur:n=!1,opacity:o="medium",zIndex:s=40,lockScroll:i=!0,className:l})=>{if(v.useEffect(()=>{if(i){if(e){const c=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",document.body.style.paddingRight=`${c}px`}else document.body.style.overflow="",document.body.style.paddingRight="";return()=>{document.body.style.overflow="",document.body.style.paddingRight=""}}},[e,i]),!e)return null;const d={light:"bg-black/20 dark:bg-black/30",medium:"bg-black/50 dark:bg-black/60",dark:"bg-black/75 dark:bg-black/85"};return t.jsx(me,{children:t.jsx("div",{className:f("fixed inset-0","transition-opacity duration-300",n&&"backdrop-blur-sm",d[o],l),style:{zIndex:s},onClick:r,"aria-hidden":"true",children:a&&t.jsx("div",{className:"relative h-full w-full",onClick:c=>c.stopPropagation(),children:a})})})},wo=({children:e,as:r="p",size:a="base",weight:n="normal",color:o="default",align:s,transform:i="none",truncate:l=!1,lineClamp:d,className:c})=>{const g={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl"},h={light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},w={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-600 dark:text-gray-400",primary:"text-blue-600 dark:text-blue-400",success:"text-green-600 dark:text-green-400",warning:"text-yellow-600 dark:text-yellow-400",danger:"text-red-600 dark:text-red-400"},m=s?{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}[s]:"",b={none:"",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"},y=d?{display:"-webkit-box",WebkitLineClamp:d,WebkitBoxOrient:"vertical",overflow:"hidden"}:void 0;return t.jsx(r,{className:f(g[a],h[n],w[o],m,b[i],l&&"truncate",d&&"overflow-hidden",c),style:y,children:e})},ko=({children:e,level:r=2,size:a,weight:n="bold",color:o="default",align:s,className:i})=>{const d=a||{1:"4xl",2:"3xl",3:"2xl",4:"xl",5:"lg",6:"base"}[r],c={"4xl":"text-4xl","3xl":"text-3xl","2xl":"text-2xl",xl:"text-xl",lg:"text-lg",base:"text-base"},g={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold"},h={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-700 dark:text-gray-300",primary:"text-blue-600 dark:text-blue-400"},w=s?{left:"text-left",center:"text-center",right:"text-right"}[s]:"",m=`h${r}`;return v.createElement(m,{className:f(c[d],g[n],h[o],w,i)},e)},xo=X.cva("",{variants:{variant:{hero:P.heading.display.hero(),display:P.heading.display.lg(),h1:P.heading.h1(),h2:P.heading.h2(),h3:P.heading.h3()},responsive:{true:"",false:""},align:{left:"text-left",center:"text-center",right:"text-right"},color:{default:"text-gray-900 dark:text-white",muted:"text-gray-600 dark:text-gray-400",vibrant:"text-white",brand:"bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent"}},defaultVariants:{variant:"h1",responsive:!0,align:"left",color:"default"}}),No=({children:e,variant:r="h1",responsive:a=!0,align:n="left",color:o="default",className:s,as:i})=>{const l=i||(r==="hero"||r==="display"||r==="h1"?"h1":r==="h2"?"h2":"h3");return t.jsx(l,{className:f(xo({variant:r,responsive:a,align:n,color:o}),s),children:e})},Co=X.cva("",{variants:{variant:{h2:P.heading.h2(),h3:P.heading.h3(),h4:P.heading.h4(),h5:P.heading.h5(),h6:P.heading.h6()},spacing:{none:"",sm:"mb-2",md:"mb-4",lg:"mb-6",xl:"mb-8"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{variant:"h2",spacing:"md",align:"left"}}),So=({children:e,variant:r="h2",spacing:a="md",align:n="left",className:o,as:s})=>{const i=s||r;return v.createElement(i,{className:f(Co({variant:r,spacing:a,align:n}),o)},e)},Eo=X.cva("",{variants:{variant:{body:P.body.md(),lead:P.body.lg(),large:P.body.lg(),small:P.body.sm(),caption:P.body.xs()},color:{default:"text-gray-700 dark:text-gray-300",muted:"text-gray-500 dark:text-gray-500",primary:"text-gray-900 dark:text-white"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}},defaultVariants:{variant:"body",color:"default",align:"left"}}),To=({children:e,variant:r="body",color:a="default",align:n="left",className:o,as:s="p"})=>v.createElement(s,{className:f(Eo({variant:r,color:a,align:n}),o)},e),Ao=X.cva(P.link.default(),{variants:{variant:{default:P.link.default(),subtle:P.link.subtle(),muted:P.link.muted(),button:"inline-flex items-center justify-center px-4 py-2 rounded-md bg-blue-600 text-white hover:bg-blue-700 transition-colors"},external:{true:"inline-flex items-center gap-1",false:""}},defaultVariants:{variant:"default",external:!1}}),Io=({children:e,href:r,variant:a="default",external:n=!1,className:o,target:s,rel:i})=>t.jsxs("a",{href:r,target:s||(n?"_blank":void 0),rel:i||(n?"noopener noreferrer":void 0),className:f(Ao({variant:a,external:n}),o),children:[e,n&&t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]}),Mo=({children:e,size:r="md",variant:a="default",className:n})=>{const o={sm:"text-xs px-1 py-0.5",md:"text-sm px-1.5 py-0.5",lg:"text-base px-2 py-1"},s={default:"bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100",primary:"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",success:"bg-green-50 dark:bg-green-900/30 text-green-700 dark:text-green-300",warning:"bg-yellow-50 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300",danger:"bg-red-50 dark:bg-red-900/30 text-red-700 dark:text-red-300"};return t.jsx("code",{className:f("inline-block font-mono font-medium rounded",o[r],s[a],n),children:e})},Lo=({children:e,variant:r="primary",size:a="md",inline:n=!1,align:o="left",className:s,wrap:i=!1})=>{const l={primary:"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30",secondary:"text-purple-600 dark:text-purple-400 bg-purple-50 dark:bg-purple-900/30",success:"text-green-600 dark:text-green-400 bg-green-50 dark:bg-green-900/30",warning:"text-yellow-700 dark:text-yellow-400 bg-yellow-50 dark:bg-yellow-900/30",neutral:"text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-800"},d={xs:{text:"text-xs",padding:n?"px-1.5 py-0.5":"px-2 py-1"},sm:{text:"text-sm",padding:n?"px-2 py-0.5":"px-3 py-1.5"},md:{text:"text-base",padding:n?"px-2.5 py-1":"px-4 py-2"},lg:{text:"text-lg",padding:n?"px-3 py-1":"px-4 py-2"}},c={left:"text-left",center:"text-center",right:"text-right"},g=d[a],h=n?"code":"div";return t.jsx(h,{className:f("font-mono rounded-lg",l[r],g.text,g.padding,!n&&c[o],n?"inline-block":"block",!i&&"overflow-x-auto whitespace-nowrap",i&&"break-all",s),children:e})},Po=({children:e,size:r="md",className:a})=>{const n={sm:"text-xs px-1.5 py-0.5",md:"text-sm px-2 py-1",lg:"text-base px-2.5 py-1.5"};return t.jsx("kbd",{className:f("inline-flex items-center justify-center","font-mono font-semibold","bg-gray-100 dark:bg-gray-800","text-gray-900 dark:text-gray-100","border border-gray-300 dark:border-gray-600","rounded shadow-sm",n[r],a),children:e})},Oo=({children:e,cite:r,variant:a="default",size:n="md",className:o})=>{const s={sm:"text-sm p-3",md:"text-base p-4",lg:"text-lg p-6"},i={sm:"text-xs",md:"text-sm",lg:"text-base"},l={default:"border-l-4 border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800/50",bordered:"border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800",accent:"border-l-4 border-blue-500 dark:border-blue-400 bg-blue-50 dark:bg-blue-900/20"};return t.jsxs("blockquote",{className:f("rounded-r-lg",s[n],l[a],o),children:[t.jsx("p",{className:"text-gray-800 dark:text-gray-200 italic",children:e}),r&&t.jsxs("footer",{className:f("mt-2 text-gray-600 dark:text-gray-400",i[n]),children:["— ",t.jsx("cite",{className:"not-italic font-medium",children:r})]})]})},Uo=({children:e,variant:r="default",showIcon:a=!1,size:n="sm",className:o})=>{const s={sm:"text-sm",base:"text-base"},i={sm:"h-4 w-4",base:"h-5 w-5"},d={default:{text:"text-gray-600 dark:text-gray-400",icon:L.InformationCircleIcon},error:{text:"text-red-600 dark:text-red-400",icon:L.ExclamationCircleIcon},success:{text:"text-green-600 dark:text-green-400",icon:L.CheckCircleIcon},warning:{text:"text-yellow-600 dark:text-yellow-400",icon:L.ExclamationCircleIcon}}[r],c=d.icon;return t.jsxs("div",{className:f("flex items-start gap-1.5",o),children:[a&&t.jsx(c,{className:f(i[n],d.text,"flex-shrink-0 mt-0.5")}),t.jsx("p",{className:f(s[n],d.text),children:e})]})},Do=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UscreenUreaderUtext",children:r||"UscreenUreaderUtext Component"}),jo=({children:e,maxLength:r=50,position:a="end",ellipsis:n="...",showTooltip:o=!0,className:s})=>{const i=e||"";if(i.length<=r)return t.jsx("span",{className:s,children:i});const d=(()=>{const c=n.length,g=r-c;switch(a){case"start":return n+i.slice(i.length-g);case"middle":{const h=Math.floor(g/2),w=i.slice(0,h),m=i.slice(i.length-(g-h));return w+n+m}case"end":default:return i.slice(0,g)+n}})();return t.jsx("span",{className:f("inline-block",s),title:o?i:void 0,children:d})},_o=({value:e,style:r="decimal",currency:a="USD",unit:n,minimumFractionDigits:o,maximumFractionDigits:s,locale:i="en-US",notation:l="standard",className:d})=>{const c=()=>{try{const g={style:r,notation:l,minimumFractionDigits:o,maximumFractionDigits:s};return r==="currency"&&(g.currency=a),r==="unit"&&n&&(g.unit=n),new Intl.NumberFormat(i,g).format(e)}catch(g){return console.error("Number formatting error:",g),e.toLocaleString(i)}};return t.jsx("span",{className:f(d),children:c()})},zo=({date:e,showTooltip:r=!0,updateInterval:a=0,className:n})=>{const[,o]=v.useState(0),s=v.useMemo(()=>e instanceof Date?e:new Date(e),[e]);v.useEffect(()=>{if(a===0)return;const c=setInterval(()=>{o(g=>g+1)},a*1e3);return()=>clearInterval(c)},[a]);const l=(()=>{const g=new Date().getTime()-s.getTime(),h=Math.floor(g/1e3),w=Math.floor(h/60),m=Math.floor(w/60),b=Math.floor(m/24),y=Math.floor(b/7),p=Math.floor(b/30),T=Math.floor(b/365);return h<60?"just now":w<60?`${w} ${w===1?"minute":"minutes"} ago`:m<24?`${m} ${m===1?"hour":"hours"} ago`:b<7?`${b} ${b===1?"day":"days"} ago`:y<4?`${y} ${y===1?"week":"weeks"} ago`:p<12?`${p} ${p===1?"month":"months"} ago`:`${T} ${T===1?"year":"years"} ago`})(),d=s.toLocaleString();return t.jsx("time",{dateTime:s.toISOString(),title:r?d:void 0,className:f(n),children:l})},Be=({size:e="default",variant:r="default",className:a,ariaLabel:n="Loading",loadingText:o="Loading..."})=>{const s=()=>{const i={small:"w-4 h-4",default:"w-6 h-6",large:"w-8 h-8",extraLarge:"w-16 h-16 border-4"},l={default:"border-gray-300 border-t-blue-600",white:"border-white/30 border-t-white",success:"border-gray-300 border-t-green-600",warning:"border-gray-300 border-t-orange-600",error:"border-gray-300 border-t-red-600"};return`animate-spin rounded-full border-2 ${i[e]} ${l[r]}`};return t.jsx("div",{className:f(s(),a),role:"status","aria-label":n,children:t.jsx("span",{className:"sr-only",children:o})})},Bo=({isLoading:e,message:r,mode:a="fullscreen",blur:n=!1,spinnerSize:o="large",className:s})=>e?t.jsxs("div",{className:f(a==="fullscreen"?"fixed":"absolute","inset-0 z-50","flex flex-col items-center justify-center","bg-white/80 dark:bg-gray-900/80",n&&"backdrop-blur-sm",s),role:"alert","aria-live":"polite","aria-busy":"true",children:[t.jsx(Be,{size:o}),r&&t.jsx("p",{className:f(P.body.md(),"text-gray-700 dark:text-gray-300 mt-4"),children:r})]}):null,Wo=({size:e="md",variant:r="primary",color:a,className:n})=>{const o={sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-3 h-3"},s={primary:"bg-blue-600 dark:bg-blue-500",secondary:"bg-gray-600 dark:bg-gray-400",white:"bg-white"},i=f("rounded-full",o[e],a?"":s[r]);return t.jsxs("div",{className:f("flex items-center gap-1",n),children:[t.jsx("div",{className:i,style:{backgroundColor:a,animation:"loading-dot-bounce 1.4s infinite ease-in-out both",animationDelay:"-0.32s"}}),t.jsx("div",{className:i,style:{backgroundColor:a,animation:"loading-dot-bounce 1.4s infinite ease-in-out both",animationDelay:"-0.16s"}}),t.jsx("div",{className:i,style:{backgroundColor:a,animation:"loading-dot-bounce 1.4s infinite ease-in-out both"}}),t.jsx("style",{children:`
|
|
2
2
|
@keyframes loading-dot-bounce {
|
|
3
3
|
0%, 80%, 100% {
|
|
4
4
|
transform: scale(0);
|
|
@@ -9,26 +9,26 @@
|
|
|
9
9
|
opacity: 1;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
`})]})},Fo=({message:e="Loading...",size:r="default",fullScreen:a=!1,variant:n="default",className:o})=>{const i={small:{spinner:"small",text:"text-sm"},default:{spinner:"default",text:"text-base"},large:{spinner:"large",text:"text-lg"}}[r],l=a?"fixed inset-0 z-50 flex items-center justify-center bg-white/80 dark:bg-gray-900/80":"flex flex-col items-center justify-center p-8",d=t.jsxs("div",{className:f(l,o),children:[t.jsx(_e,{size:i.spinner,variant:n,className:"mb-4"}),e&&t.jsx("p",{className:f(i.text,"text-gray-600 dark:text-gray-400 text-center max-w-sm"),children:e})]});return a?t.jsx("div",{className:"fixed inset-0 z-50 bg-white/80 dark:bg-gray-900/80 backdrop-blur-sm",children:t.jsxs("div",{className:"flex items-center justify-center min-h-full p-4",children:[t.jsx(_e,{size:i.spinner,variant:n,className:"mb-4"}),e&&t.jsx("p",{className:"text-center text-gray-600 dark:text-gray-400 max-w-sm",children:e})]})}):d},Vo=({variant:e="text",width:r,height:a,className:n,count:o,lines:s=1,animate:i=!0,borderRadius:l,theme:d,spacing:c,gap:g="md"})=>{const h={text:"h-4 rounded",circle:"rounded-full",rectangle:"rounded-lg",avatar:"w-10 h-10 rounded-full",button:"h-10 rounded-lg"},w={light:"bg-gray-200",dark:"bg-gray-700"},m={sm:"space-y-1",md:"space-y-2",lg:"space-y-3"},b=o??s,y=v=>{const T={};return r&&(T.width=typeof r=="number"?`${r}px`:r),a&&(T.height=typeof a=="number"?`${a}px`:a),l&&(T.borderRadius=l),t.jsx("div",{className:f(i&&"animate-pulse",d?w[d]:"bg-gray-200 dark:bg-gray-700",h[e],n),style:T},v)};if(b>1){const v=c!==void 0?`space-y-${c}`:m[g];return t.jsx("div",{className:f(v),children:Array.from({length:b}).map((T,N)=>y(N))})}return y()},qo={info:L.InformationCircleIcon,success:L.CheckCircleIcon,warning:L.ExclamationTriangleIcon,attention:L.BellAlertIcon,error:L.XCircleIcon},$o=({children:e,className:r})=>t.jsx("div",{className:f("font-medium mb-1",r),children:e}),Ho=({children:e,className:r})=>t.jsx("div",{className:f("text-sm break-words",r),children:e}),yr=({variant:e="info",title:r,description:a,icon:n,children:o,className:s})=>{const i=qo[e],l=n||t.jsx(i,{className:"h-5 w-5"}),d=typeof _.alert[e]=="function"?_.alert[e]():"";return t.jsxs("div",{role:"alert",className:f(d,s),children:[l&&t.jsx("div",{className:"flex-shrink-0",children:l}),t.jsxs("div",{className:"flex-1 min-w-0",children:[r&&t.jsx("div",{className:"font-medium mb-1 break-words",children:r}),a&&t.jsx("div",{className:"text-sm break-words",children:a}),o]})]})},Go=({message:e,variant:r="info",dismissible:a=!1,onDismiss:n,className:o})=>{const s={info:"bg-blue-100 dark:bg-blue-900/20 text-blue-800 dark:text-blue-300 border-blue-300 dark:border-blue-700",success:"bg-green-100 dark:bg-green-900/20 text-green-800 dark:text-green-300 border-green-300 dark:border-green-700",warning:"bg-yellow-100 dark:bg-yellow-900/20 text-yellow-800 dark:text-yellow-300 border-yellow-300 dark:border-yellow-700",error:"bg-red-100 dark:bg-red-900/20 text-red-800 dark:text-red-300 border-red-300 dark:border-red-700"};return t.jsxs("div",{className:f("p-4 border rounded-lg flex items-center justify-between",s[r],o),children:[t.jsx("span",{children:e}),a&&t.jsx("button",{onClick:n,className:"ml-4 font-bold",children:"×"})]})},pt=p.createContext(void 0),Yo=()=>{const e=p.useContext(pt);if(!e)throw new Error("useToast must be used within ToastProvider");return e},vt=({toast:e,onRemove:r})=>{const{id:a,title:n,description:o,variant:s="default",action:i}=e,l={default:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",success:"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800",error:"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800",warning:"bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800",info:"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800"},d={default:"text-gray-600 dark:text-gray-400",success:"text-green-600 dark:text-green-400",error:"text-red-600 dark:text-red-400",warning:"text-yellow-600 dark:text-yellow-400",info:"text-blue-600 dark:text-blue-400"},c={default:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})}),success:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),error:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),warning:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),info:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})};return t.jsxs("div",{className:f("flex items-start gap-3 p-4 rounded-lg border shadow-lg","animate-in slide-in-from-top-2 fade-in duration-300","max-w-md w-full",l[s]),children:[t.jsx("div",{className:f("flex-shrink-0",d[s]),children:c[s]}),t.jsxs("div",{className:"flex-1 min-w-0",children:[n&&t.jsx("p",{className:"font-semibold text-gray-900 dark:text-white",children:n}),o&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 mt-1",children:o}),i&&t.jsx("button",{onClick:i.onClick,className:"text-sm font-medium text-blue-600 dark:text-blue-400 hover:underline mt-2",children:i.label})]}),t.jsx("button",{onClick:()=>r(a),className:"flex-shrink-0 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close notification",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},Ko=({toast:e,onRemove:r})=>(p.useEffect(()=>{const a=e.duration??5e3;if(a>0){const n=setTimeout(()=>{r(e.id)},a);return()=>clearTimeout(n)}},[e.id,e.duration,r]),t.jsx(vt,{toast:e,onRemove:r})),Zo=({children:e})=>{const[r,a]=p.useState([]),n=p.useCallback(s=>{a(i=>i.filter(l=>l.id!==s))},[]),o=p.useCallback(s=>{const i=Math.random().toString(36).substr(2,9);a(l=>[...l,{...s,id:i}])},[]);return t.jsxs(pt.Provider,{value:{toasts:r,addToast:o,removeToast:n},children:[e,t.jsx("div",{className:"fixed top-4 right-4 z-50 flex flex-col gap-2 pointer-events-none",children:t.jsx("div",{className:"pointer-events-auto",children:r.map(s=>t.jsx("div",{className:"mb-2",children:t.jsx(Ko,{toast:s,onRemove:n})},s.id))})})]})},Xo=({message:e,variant:r="info",onClose:a,className:n})=>{const o={info:"bg-blue-500",success:"bg-green-500",warning:"bg-yellow-500",error:"bg-red-500"};return t.jsxs("div",{className:f("fixed bottom-4 right-4 p-4 rounded-lg text-white shadow-lg flex items-center gap-3",o[r],n),children:[t.jsx("span",{children:e}),a&&t.jsx("button",{onClick:a,className:"ml-4",children:"×"})]})},Qo=({count:e,maxCount:r=99,variant:a="danger",className:n})=>{const o=e>r?`${r}+`:e,s={default:"bg-gray-500",primary:"bg-blue-500",danger:"bg-red-500"};return t.jsx("span",{className:f("inline-flex items-center justify-center px-2 py-1 text-xs font-bold text-white rounded-full",s[a],n),children:o})},Jo=({notifications:e,onMarkAsRead:r,className:a})=>t.jsx("div",{className:f("bg-white dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-700 p-4 max-h-96 overflow-y-auto",a),children:e.map(n=>t.jsxs("div",{className:f("p-3 rounded mb-2",n.read?"bg-transparent":"bg-blue-50 dark:bg-blue-900/20"),onClick:()=>r?.(n.id),children:[t.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white",children:n.title}),t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:n.message}),t.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:n.timestamp})]},n.id))}),Ro=({children:e,variant:r="default",size:a="sm",icon:n,dot:o=!1,pill:s=!1,outline:i=!1,onClick:l,dismissible:d=!1,onDismiss:c,count:g,maxCount:h,className:w})=>{const m={default:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400",warning:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400",danger:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400",info:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",purple:"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-400"},b={default:"border border-gray-300 text-gray-700 dark:border-gray-600 dark:text-gray-300",primary:"border border-blue-600 text-blue-600 dark:border-blue-400 dark:text-blue-400",success:"border border-green-600 text-green-600 dark:border-green-400 dark:text-green-400",warning:"border border-yellow-600 text-yellow-600 dark:border-yellow-400 dark:text-yellow-400",danger:"border border-red-600 text-red-600 dark:border-red-400 dark:text-red-400",info:"border border-blue-600 text-blue-600 dark:border-blue-400 dark:text-blue-400",purple:"border border-purple-600 text-purple-600 dark:border-purple-400 dark:text-purple-400"},y={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},v={sm:"h-3 w-3",md:"h-3.5 w-3.5",lg:"h-4 w-4"},T={default:"bg-gray-600 dark:bg-gray-400",primary:"bg-blue-600 dark:bg-blue-400",success:"bg-green-600 dark:bg-green-400",warning:"bg-yellow-600 dark:bg-yellow-400",danger:"bg-red-600 dark:bg-red-400",info:"bg-blue-600 dark:bg-blue-400",purple:"bg-purple-600 dark:bg-purple-400"},N=g!==void 0?h!==void 0&&g>h?`${h}+`:g.toString():null,S=t.jsxs(t.Fragment,{children:[o&&t.jsx("span",{className:f("h-2 w-2 rounded-full mr-1.5",T[r])}),n&&t.jsx("span",{className:f(v[a],"mr-1"),children:n}),e,N&&t.jsx("span",{className:"ml-1",children:N}),d&&c&&t.jsx("button",{onClick:C=>{C.stopPropagation(),c()},className:"ml-1 hover:bg-black/10 dark:hover:bg-white/10 rounded-full p-0.5","aria-label":"Dismiss",children:t.jsx(he.XMarkIcon,{className:f(v[a])})})]}),k=l?"button":"span";return t.jsx(k,{onClick:l,className:f("inline-flex items-center font-medium",i?b[r]:m[r],y[a],s?"rounded-full":"rounded",l&&"cursor-pointer hover:opacity-80",w),children:S})},es=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UbadgeUdesigner",children:r||"UbadgeUdesigner Component"});var me={},ye={},pr={},wt;function rs(){return wt||(wt=1,Object.defineProperty(pr,"__esModule",{value:!0})),pr}var vr={},V={},kt;function ts(){if(kt)return V;kt=1,Object.defineProperty(V,"__esModule",{value:!0}),V.isIndexerErrorResponse=e,V.isIndexerSuccessResponse=r,V.isAddressValidationResponse=a,V.isEmailAccountsResponse=n,V.isRewardsResponse=o,V.isDelegatedToResponse=s,V.isDelegatedFromResponse=i,V.isNonceResponse=l,V.isEntitlementResponse=d,V.isSignInMessageResponse=c,V.isPointsResponse=g,V.isLeaderboardResponse=h,V.isSiteStatsResponse=w,V.isTemplateResponse=m,V.isTemplateListResponse=b,V.isTemplateDeleteResponse=y,V.isWebhookResponse=v,V.isWebhookListResponse=T,V.isWebhookDeleteResponse=N,V.isReferralCodeResponse=S,V.isReferralStatsResponse=k,V.isAuthenticationStatusResponse=C,V.isBlockStatusResponse=I,V.isNameServiceResponse=E,V.isNameResolutionResponse=M;function e(x){return!!(x&&typeof x=="object"&&"error"in x&&"success"in x&&!x.success)}function r(x){return!!(x&&typeof x=="object"&&"success"in x&&x.success===!0&&"data"in x)}function a(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&("name"in x.data||"wallet"in x.data))}function n(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"accounts"in x.data&&Array.isArray(x.data.accounts))}function o(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"rewards"in x.data&&"records"in x.data&&"points"in x.data)}function s(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"walletAddress"in x.data&&"chainType"in x.data)}function i(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"from"in x.data&&Array.isArray(x.data.from))}function l(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"nonce"in x.data)}function d(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"entitlement"in x.data&&"verified"in x.data)}function c(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"message"in x.data&&"walletAddress"in x.data)}function g(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"pointsEarned"in x.data&&"walletAddress"in x.data)}function h(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"leaderboard"in x.data)}function w(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"totalPoints"in x.data)}function m(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"template"in x.data&&"verified"in x.data&&x.data.template&&typeof x.data.template=="object"&&"id"in x.data.template&&"name"in x.data.template&&"subject"in x.data.template&&"body"in x.data.template)}function b(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"templates"in x.data&&"total"in x.data&&"hasMore"in x.data&&"verified"in x.data&&Array.isArray(x.data.templates))}function y(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"message"in x.data&&"verified"in x.data)}function v(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"webhook"in x.data&&"verified"in x.data&&x.data.webhook&&typeof x.data.webhook=="object"&&"id"in x.data.webhook&&"webhookUrl"in x.data.webhook)}function T(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"webhooks"in x.data&&"total"in x.data&&"hasMore"in x.data&&"verified"in x.data&&Array.isArray(x.data.webhooks))}function N(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"message"in x.data&&"verified"in x.data)}function S(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"walletAddress"in x.data&&"referralCode"in x.data&&"createdAt"in x.data)}function k(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"total"in x.data&&"consumptions"in x.data&&Array.isArray(x.data.consumptions))}function C(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"authenticated"in x.data&&typeof x.data.authenticated=="boolean")}function I(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"chains"in x.data&&"totalChains"in x.data&&"activeChains"in x.data&&"timestamp"in x.data&&Array.isArray(x.data.chains))}function E(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"names"in x.data&&Array.isArray(x.data.names))}function M(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"walletAddress"in x.data&&"chainType"in x.data)}return V}var xt;function as(){return xt||(xt=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isIndexerSuccessResponse=e.isIndexerErrorResponse=e.isWebhookDeleteResponse=e.isWebhookListResponse=e.isWebhookResponse=e.isTemplateDeleteResponse=e.isTemplateListResponse=e.isTemplateResponse=e.isNameResolutionResponse=e.isNameServiceResponse=e.isBlockStatusResponse=e.isAuthenticationStatusResponse=e.isReferralStatsResponse=e.isReferralCodeResponse=e.isSiteStatsResponse=e.isLeaderboardResponse=e.isPointsResponse=e.isSignInMessageResponse=e.isEntitlementResponse=e.isNonceResponse=e.isDelegatedFromResponse=e.isDelegatedToResponse=e.isRewardsResponse=e.isEmailAccountsResponse=e.isAddressValidationResponse=void 0;var r=ts();Object.defineProperty(e,"isAddressValidationResponse",{enumerable:!0,get:function(){return r.isAddressValidationResponse}}),Object.defineProperty(e,"isEmailAccountsResponse",{enumerable:!0,get:function(){return r.isEmailAccountsResponse}}),Object.defineProperty(e,"isRewardsResponse",{enumerable:!0,get:function(){return r.isRewardsResponse}}),Object.defineProperty(e,"isDelegatedToResponse",{enumerable:!0,get:function(){return r.isDelegatedToResponse}}),Object.defineProperty(e,"isDelegatedFromResponse",{enumerable:!0,get:function(){return r.isDelegatedFromResponse}}),Object.defineProperty(e,"isNonceResponse",{enumerable:!0,get:function(){return r.isNonceResponse}}),Object.defineProperty(e,"isEntitlementResponse",{enumerable:!0,get:function(){return r.isEntitlementResponse}}),Object.defineProperty(e,"isSignInMessageResponse",{enumerable:!0,get:function(){return r.isSignInMessageResponse}}),Object.defineProperty(e,"isPointsResponse",{enumerable:!0,get:function(){return r.isPointsResponse}}),Object.defineProperty(e,"isLeaderboardResponse",{enumerable:!0,get:function(){return r.isLeaderboardResponse}}),Object.defineProperty(e,"isSiteStatsResponse",{enumerable:!0,get:function(){return r.isSiteStatsResponse}}),Object.defineProperty(e,"isReferralCodeResponse",{enumerable:!0,get:function(){return r.isReferralCodeResponse}}),Object.defineProperty(e,"isReferralStatsResponse",{enumerable:!0,get:function(){return r.isReferralStatsResponse}}),Object.defineProperty(e,"isAuthenticationStatusResponse",{enumerable:!0,get:function(){return r.isAuthenticationStatusResponse}}),Object.defineProperty(e,"isBlockStatusResponse",{enumerable:!0,get:function(){return r.isBlockStatusResponse}}),Object.defineProperty(e,"isNameServiceResponse",{enumerable:!0,get:function(){return r.isNameServiceResponse}}),Object.defineProperty(e,"isNameResolutionResponse",{enumerable:!0,get:function(){return r.isNameResolutionResponse}}),Object.defineProperty(e,"isTemplateResponse",{enumerable:!0,get:function(){return r.isTemplateResponse}}),Object.defineProperty(e,"isTemplateListResponse",{enumerable:!0,get:function(){return r.isTemplateListResponse}}),Object.defineProperty(e,"isTemplateDeleteResponse",{enumerable:!0,get:function(){return r.isTemplateDeleteResponse}}),Object.defineProperty(e,"isWebhookResponse",{enumerable:!0,get:function(){return r.isWebhookResponse}}),Object.defineProperty(e,"isWebhookListResponse",{enumerable:!0,get:function(){return r.isWebhookListResponse}}),Object.defineProperty(e,"isWebhookDeleteResponse",{enumerable:!0,get:function(){return r.isWebhookDeleteResponse}}),Object.defineProperty(e,"isIndexerErrorResponse",{enumerable:!0,get:function(){return r.isIndexerErrorResponse}}),Object.defineProperty(e,"isIndexerSuccessResponse",{enumerable:!0,get:function(){return r.isIndexerSuccessResponse}})})(vr)),vr}var wr={},j={},te={},Nt;function Ct(){if(Nt)return te;Nt=1,Object.defineProperty(te,"__esModule",{value:!0}),te.isWildduckMessage=te.isWildduckAuthResponse=te.MailboxSpecialUse=void 0,te.createPreAuthRequest=e,te.createAuthenticateRequest=r;function e(s,i){return{username:s,scope:"master",...i}}function r(s,i,l,d){return{username:s,...i&&{signature:i},...l&&{message:l},protocol:"API",scope:"master",token:!1,...d}}var a;(function(s){s.Inbox="\\Inbox",s.Sent="\\Sent",s.Trash="\\Trash",s.Drafts="\\Drafts",s.Junk="\\Junk",s.Settings="\\App.Settings",s.Developer="\\App.Developer"})(a||(te.MailboxSpecialUse=a={}));const n=s=>typeof s=="object"&&s!==null&&"success"in s&&typeof s.success=="boolean";te.isWildduckAuthResponse=n;const o=s=>typeof s=="object"&&s!==null&&"id"in s&&"subject"in s&&typeof s.id=="number"&&typeof s.subject=="string";return te.isWildduckMessage=o,te}var St;function pe(){if(St)return j;St=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Currency=j.ErrorType=j.FeatureFlag=j.EmailValidationState=j.PlatformType=j.ConnectionState=j.ConnectionType=j.EmailSortCriteria=j.SortOrder=j.EmailAddressType=j.NotificationType=j.RequestStatus=j.SubscriptionAction=j.EmailAction=j.MediumView=j.MobileView=j.EmailComposeType=j.EmailFolderUtils=j.FontSize=j.Theme=j.Chain=j.ChainType=j.AuthStatus=void 0;const e=Ct();var r;(function(E){E.CONNECTED="connected",E.DISCONNECTED="disconnected",E.VERIFIED="verified"})(r||(j.AuthStatus=r={}));var a;(function(E){E.EVM="evm",E.SOLANA="solana"})(a||(j.ChainType=a={}));var n;(function(E){E.ETH_MAINNET="eth-mainnet",E.ETH_SEPOLIA="eth-sepolia",E.ETH_GOERLI="eth-goerli",E.POLYGON_MAINNET="polygon-mainnet",E.POLYGON_MUMBAI="polygon-mumbai",E.POLYGON_AMOY="polygon-amoy",E.OPTIMISM_MAINNET="optimism-mainnet",E.OPTIMISM_SEPOLIA="optimism-sepolia",E.OPTIMISM_GOERLI="optimism-goerli",E.ARBITRUM_MAINNET="arbitrum-mainnet",E.ARBITRUM_SEPOLIA="arbitrum-sepolia",E.ARBITRUM_GOERLI="arbitrum-goerli",E.BASE_MAINNET="base-mainnet",E.BASE_SEPOLIA="base-sepolia",E.BASE_GOERLI="base-goerli",E.AVALANCHE_MAINNET="avalanche-mainnet",E.AVALANCHE_FUJI="avalanche-fuji",E.BNB_MAINNET="bnb-mainnet",E.BNB_TESTNET="bnb-testnet",E.GNOSIS_MAINNET="gnosis-mainnet",E.GNOSIS_CHIADO="gnosis-chiado",E.CELO_MAINNET="celo-mainnet",E.CELO_ALFAJORES="celo-alfajores",E.ZKSYNC_MAINNET="zksync-mainnet",E.ZKSYNC_SEPOLIA="zksync-sepolia",E.LINEA_MAINNET="linea-mainnet",E.LINEA_SEPOLIA="linea-sepolia",E.SCROLL_MAINNET="scroll-mainnet",E.SCROLL_SEPOLIA="scroll-sepolia",E.MONAD_MAINNET="monad-mainnet",E.MONAD_TESTNET="monad-testnet",E.STORY_MAINNET="story-mainnet",E.STORY_TESTNET="story-testnet",E.PLUME_MAINNET="plume-mainnet",E.PLUME_TESTNET="plume-testnet",E.NEXUS_MAINNET="nexus-mainnet",E.NEXUS_TESTNET="nexus-testnet",E.HYPEREVM_MAINNET="hyperevm-mainnet",E.HYPEREVM_TESTNET="hyperevm-testnet",E.SONIC_MAINNET="sonic-mainnet",E.SONIC_TESTNET="sonic-testnet",E.SONIC_BLAZE="sonic-blaze",E.UNICHAIN_MAINNET="unichain-mainnet",E.UNICHAIN_SEPOLIA="unichain-sepolia",E.WORLD_MAINNET="world-mainnet",E.XDC_MAINNET="xdc-mainnet",E.INK_TESTNET="ink-testnet",E.FETCH_MAINNET="fetch-mainnet",E.FETCH_TESTNET="fetch-testnet",E.GENSYN_MAINNET="gensyn-mainnet",E.GENSYN_TESTNET="gensyn-testnet",E.RITUAL_MAINNET="ritual-mainnet",E.RITUAL_TESTNET="ritual-testnet",E.SOLANA_MAINNET="solana-mainnet",E.SOLANA_DEVNET="solana-devnet",E.SOLANA_TESTNET="solana-testnet",E.EVM_LOCAL="evm-local",E.SOLANA_LOCAL="solana-local"})(n||(j.Chain=n={}));var o;(function(E){E.LIGHT="light",E.DARK="dark",E.SYSTEM="system"})(o||(j.Theme=o={}));var s;(function(E){E.SMALL="small",E.MEDIUM="medium",E.LARGE="large"})(s||(j.FontSize=s={})),j.EmailFolderUtils={isStandardFolder(E){return Object.values(e.MailboxSpecialUse).includes(E)},getStandardFolders(){return Object.values(e.MailboxSpecialUse)},isCustomFolder(E){return!this.isStandardFolder(E)},displayName(E){return E.charAt(0).toUpperCase()+E.slice(1)}};var i;(function(E){E.NEW="new",E.REPLY="reply",E.REPLY_ALL="replyAll",E.FORWARD="forward"})(i||(j.EmailComposeType=i={}));var l;(function(E){E.EMAIL_ADDRESSES="emailAddresses",E.FOLDERS="folders",E.EMAILS="emails",E.EMAIL_BODY="emailBody"})(l||(j.MobileView=l={}));var d;(function(E){E.LEFT="left",E.RIGHT="right"})(d||(j.MediumView=d={}));var c;(function(E){E.OPEN="open",E.REPLY="reply",E.FORWARD="forward",E.DELETE="delete",E.STAR="star",E.UNSTAR="unstar",E.MARK_READ="mark_read",E.MARK_UNREAD="mark_unread"})(c||(j.EmailAction=c={}));var g;(function(E){E.VIEW="view",E.PURCHASE="purchase",E.CANCEL="cancel",E.RESTORE="restore"})(g||(j.SubscriptionAction=g={}));var h;(function(E){E.IDLE="idle",E.LOADING="loading",E.SUCCESS="success",E.ERROR="error"})(h||(j.RequestStatus=h={}));var w;(function(E){E.INFO="info",E.SUCCESS="success",E.WARNING="warning",E.ERROR="error"})(w||(j.NotificationType=w={}));var m;(function(E){E.DIRECT="direct",E.ENS="ens",E.SNS="sns",E.CUSTOM="custom"})(m||(j.EmailAddressType=m={}));var b;(function(E){E.ASC="asc",E.DESC="desc"})(b||(j.SortOrder=b={}));var y;(function(E){E.DATE="date",E.SUBJECT="subject",E.FROM="from",E.SIZE="size"})(y||(j.EmailSortCriteria=y={}));var v;(function(E){E.UNKNOWN="unknown",E.NONE="none",E.WIFI="wifi",E.CELLULAR_2G="2g",E.CELLULAR_3G="3g",E.CELLULAR_4G="4g",E.CELLULAR_5G="5g",E.ETHERNET="ethernet"})(v||(j.ConnectionType=v={}));var T;(function(E){E.UNKNOWN="unknown",E.DISCONNECTED="disconnected",E.CONNECTING="connecting",E.CONNECTED="connected",E.RECONNECTING="reconnecting",E.VERIFIED="verified",E.LIMITED="limited",E.ERROR="error"})(T||(j.ConnectionState=T={}));var N;(function(E){E.WEB="web",E.REACT_NATIVE="react_native",E.DESKTOP="desktop"})(N||(j.PlatformType=N={}));var S;(function(E){E.VALID="valid",E.INVALID="invalid",E.PENDING="pending",E.UNKNOWN="unknown"})(S||(j.EmailValidationState=S={}));var k;(function(E){E.AI_SEARCH="ai_search",E.SMART_COMPOSE="smart_compose",E.ADVANCED_FILTERS="advanced_filters",E.DARK_MODE="dark_mode",E.NOTIFICATIONS="notifications",E.ANALYTICS="analytics"})(k||(j.FeatureFlag=k={}));var C;(function(E){E.NETWORK="network",E.AUTH="auth",E.VALIDATION="validation",E.PERMISSION="permission",E.UNKNOWN="unknown"})(C||(j.ErrorType=C={}));var I;return(function(E){E.USD="USD",E.EUR="EUR",E.GBP="GBP",E.CAD="CAD",E.AUD="AUD"})(I||(j.Currency=I={})),j}var kr={},Et;function ns(){return Et||(Et=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getWalletConnectionState=e.isWalletVerified=e.isWalletConnected=void 0;const r=pe(),a=s=>s!=null&&!!s.walletAddress;e.isWalletConnected=a;const n=s=>(0,e.isWalletConnected)(s)&&!!s.message&&!!s.signature;e.isWalletVerified=n;const o=s=>(0,e.isWalletConnected)(s)?(0,e.isWalletVerified)(s)?r.ConnectionState.VERIFIED:r.ConnectionState.CONNECTED:r.ConnectionState.DISCONNECTED;e.getWalletConnectionState=o})(kr)),kr}var Tt;function os(){return Tt||(Tt=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.FontSize=e.FeatureFlag=e.ErrorType=e.EmailValidationState=e.EmailSortCriteria=e.EmailFolderUtils=e.EmailComposeType=e.EmailAddressType=e.EmailAction=e.Currency=e.ConnectionType=e.ConnectionState=e.ChainType=e.Chain=e.AuthStatus=void 0;var r=pe();Object.defineProperty(e,"AuthStatus",{enumerable:!0,get:function(){return r.AuthStatus}}),Object.defineProperty(e,"Chain",{enumerable:!0,get:function(){return r.Chain}}),Object.defineProperty(e,"ChainType",{enumerable:!0,get:function(){return r.ChainType}}),Object.defineProperty(e,"ConnectionState",{enumerable:!0,get:function(){return r.ConnectionState}}),Object.defineProperty(e,"ConnectionType",{enumerable:!0,get:function(){return r.ConnectionType}}),Object.defineProperty(e,"Currency",{enumerable:!0,get:function(){return r.Currency}}),Object.defineProperty(e,"EmailAction",{enumerable:!0,get:function(){return r.EmailAction}}),Object.defineProperty(e,"EmailAddressType",{enumerable:!0,get:function(){return r.EmailAddressType}}),Object.defineProperty(e,"EmailComposeType",{enumerable:!0,get:function(){return r.EmailComposeType}}),Object.defineProperty(e,"EmailFolderUtils",{enumerable:!0,get:function(){return r.EmailFolderUtils}}),Object.defineProperty(e,"EmailSortCriteria",{enumerable:!0,get:function(){return r.EmailSortCriteria}}),Object.defineProperty(e,"EmailValidationState",{enumerable:!0,get:function(){return r.EmailValidationState}}),Object.defineProperty(e,"ErrorType",{enumerable:!0,get:function(){return r.ErrorType}}),Object.defineProperty(e,"FeatureFlag",{enumerable:!0,get:function(){return r.FeatureFlag}}),Object.defineProperty(e,"FontSize",{enumerable:!0,get:function(){return r.FontSize}}),Object.defineProperty(e,"MediumView",{enumerable:!0,get:function(){return r.MediumView}}),Object.defineProperty(e,"MobileView",{enumerable:!0,get:function(){return r.MobileView}}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(e,"PlatformType",{enumerable:!0,get:function(){return r.PlatformType}}),Object.defineProperty(e,"RequestStatus",{enumerable:!0,get:function(){return r.RequestStatus}}),Object.defineProperty(e,"SortOrder",{enumerable:!0,get:function(){return r.SortOrder}}),Object.defineProperty(e,"SubscriptionAction",{enumerable:!0,get:function(){return r.SubscriptionAction}}),Object.defineProperty(e,"Theme",{enumerable:!0,get:function(){return r.Theme}});var a=ns();Object.defineProperty(e,"getWalletConnectionState",{enumerable:!0,get:function(){return a.getWalletConnectionState}}),Object.defineProperty(e,"isWalletConnected",{enumerable:!0,get:function(){return a.isWalletConnected}}),Object.defineProperty(e,"isWalletVerified",{enumerable:!0,get:function(){return a.isWalletVerified}})})(wr)),wr}var xr={},J={},At;function Nr(){if(At)return J;At=1,Object.defineProperty(J,"__esModule",{value:!0}),J.PROTOCOL_CONSTANTS=J.TransactionStatus=J.MessageType=void 0,J.isSolanaAddress=a,J.isEvmAddress=n,J.isSolanaRecipient=o,J.isEvmRecipient=s;var e;(function(i){i.STANDARD="standard",i.PRIORITY="priority",i.PREPARED_STANDARD="prepared_standard",i.PREPARED_PRIORITY="prepared_priority"})(e||(J.MessageType=e={}));var r;(function(i){i.SUCCESS="success",i.FAILED="failed",i.PENDING="pending"})(r||(J.TransactionStatus=r={}));function a(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 a(i)}function s(i){return n(i)}return J.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}},J}var ve={},R={},It;function Mt(){if(It)return R;It=1,Object.defineProperty(R,"__esModule",{value:!0}),R.AddressType=void 0,R.isENSName=n,R.isSNSName=o,R.getAddressType=s,R.isValidWalletAddress=i,R.isValidSignature=l,R.parseEmailAddress=d,R.formatWalletAddress=c,R.getChainDisplayName=g;const e=pe(),r=Nr();var a;(function(h){h.EVMAddress="EVMAddress",h.SolanaAddress="SolanaAddress",h.ENSName="ENSName",h.SNSName="SNSName"})(a||(R.AddressType=a={}));function n(h){const w=h.toLowerCase();if(!w.endsWith(".eth")&&!w.endsWith(".box"))return!1;const m=(w.endsWith(".eth"),w.slice(0,-4));if(m.length===0)return!1;const b=m.split("."),y=/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;for(const v of b)if(v.length===0||!y.test(v)||v.includes("--"))return!1;return!0}function o(h){const w=h.toLowerCase(),b=[".sol",".abc",".bonk",".poor",".gm",".dao",".defi",".web3"].find(N=>w.endsWith(N));if(!b)return!1;const y=w.slice(0,-b.length);if(y.length===0)return!1;const v=y.split("."),T=/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;for(const N of v)if(N.length===0||!T.test(N)||N.includes("--"))return!1;return!0}function s(h,w=void 0){if((0,r.isEvmAddress)(h))return a.EVMAddress;if((0,r.isSolanaAddress)(h))return a.SolanaAddress;if(w&&h.includes(".")){if(w===a.EVMAddress)return a.ENSName;if(w===a.SolanaAddress)return a.SNSName}}function i(h,w){if(!h||typeof h!="string")return!1;const m=s(h);switch(w){case e.ChainType.EVM:return m===a.EVMAddress||m===a.ENSName;case e.ChainType.SOLANA:return m===a.SolanaAddress||m===a.SNSName;default:return!!m}}function l(h,w){if(!h||typeof h!="string")return!1;switch(w){case e.ChainType.EVM:return/^0x[a-fA-F0-9]{130}$/.test(h);case e.ChainType.SOLANA:return/^[1-9A-HJ-NP-Za-km-z]{87,88}$/.test(h);default:return h.length>50}}function d(h){if(!h||typeof h!="string")return;const w=h.split("@");if(w.length!==2)return;const[m,b]=w;if(!m||!b)return;const y=s(m);return{address:m,domain:b,type:y}}function c(h){if(!h||h.length<10)return h;const w=s(h);return(w===a.ENSName||w===a.SNSName)&&h.length<=20?h:`${h.slice(0,6)}...${h.slice(-4)}`}function g(h){if(!h)return"Unknown Chain";switch(h){case e.ChainType.EVM:return"EVM Chain";case e.ChainType.SOLANA:return"Solana";default:return"Blockchain"}}return R}var Lt;function ss(){if(Lt)return ve;Lt=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.validateDomain=r,ve.validateMessage=a,ve.validateAddress=n,ve.validateAmount=o;const e=Mt();function r(s){if(!s||s.length===0)throw new Error("Domain cannot be empty");if(s.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(s))throw new Error("Invalid domain format");return!0}function a(s,i){if(!s||s.length===0)throw new Error("Message subject cannot be empty");if(s.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(s,i){if(!s||s.length===0)throw new Error("Address cannot be empty");if(!(0,e.isValidWalletAddress)(s,i))throw new Error(`Invalid ${i} address format`);return!0}function o(s){if(s==null||s===""||typeof s=="string"&&s.trim()==="")throw new Error("Invalid amount format");let i;try{if(typeof s=="string"){if(!/^-?\d+$/.test(s.trim()))throw new Error("Invalid amount format");i=BigInt(s)}else if(typeof s=="number"){if(!Number.isFinite(s))throw new Error("Invalid amount format");i=BigInt(Math.floor(s))}else if(typeof s=="bigint")i=s;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 ve}var Pt;function is(){return Pt||(Pt=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 r=Nr();Object.defineProperty(e,"MessageType",{enumerable:!0,get:function(){return r.MessageType}}),Object.defineProperty(e,"PROTOCOL_CONSTANTS",{enumerable:!0,get:function(){return r.PROTOCOL_CONSTANTS}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return r.TransactionStatus}}),Object.defineProperty(e,"isEvmAddress",{enumerable:!0,get:function(){return r.isEvmAddress}}),Object.defineProperty(e,"isEvmRecipient",{enumerable:!0,get:function(){return r.isEvmRecipient}}),Object.defineProperty(e,"isSolanaAddress",{enumerable:!0,get:function(){return r.isSolanaAddress}}),Object.defineProperty(e,"isSolanaRecipient",{enumerable:!0,get:function(){return r.isSolanaRecipient}});var a=ss();Object.defineProperty(e,"validateAddress",{enumerable:!0,get:function(){return a.validateAddress}}),Object.defineProperty(e,"validateAmount",{enumerable:!0,get:function(){return a.validateAmount}}),Object.defineProperty(e,"validateDomain",{enumerable:!0,get:function(){return a.validateDomain}}),Object.defineProperty(e,"validateMessage",{enumerable:!0,get:function(){return a.validateMessage}})})(xr)),xr}var Cr={},ze={},Ot;function ls(){if(Ot)return ze;Ot=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.StorageType=void 0;var e;return(function(r){r.LOCAL_STORAGE="localStorage",r.SESSION_STORAGE="sessionStorage",r.ASYNC_STORAGE="asyncStorage",r.MEMORY="memory"})(e||(ze.StorageType=e={})),ze}var Ut;function cs(){return Ut||(Ut=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StorageType=void 0;var r=ls();Object.defineProperty(e,"StorageType",{enumerable:!0,get:function(){return r.StorageType}})})(Cr)),Cr}var Sr={},we={},Dt;function ds(){if(Dt)return we;Dt=1,Object.defineProperty(we,"__esModule",{value:!0}),we.AnalyticsEventBuilder=we.AnalyticsEvent=void 0;var e;(function(a){a.USER_LOGIN="user_login",a.USER_LOGOUT="user_logout",a.USER_SIGNUP="user_signup",a.EMAIL_SENT="email_sent",a.EMAIL_RECEIVED="email_received",a.EMAIL_OPENED="email_opened",a.EMAIL_REPLY="email_reply",a.EMAIL_FORWARD="email_forward",a.EMAIL_DELETE="email_delete",a.EMAIL_STAR="email_star",a.EMAIL_COMPOSE="email_compose",a.EMAIL_CLICKED="email_clicked",a.PAGE_VIEW="page_view",a.SCREEN_VIEW="screen_view",a.FOLDER_SWITCH="folder_switch",a.SUBSCRIPTION_VIEW="subscription_view",a.SUBSCRIPTION_PURCHASE="subscription_purchase",a.SUBSCRIPTION_CANCEL="subscription_cancel",a.SEARCH_PERFORMED="search_performed",a.SETTINGS_CHANGED="settings_changed",a.ERROR_OCCURRED="error_occurred",a.AB_TEST_VIEWED="ab_test_viewed",a.AB_TEST_CONVERTED="ab_test_converted",a.CUSTOM_EVENT="custom_event"})(e||(we.AnalyticsEvent=e={}));class r{static emailAction(n,o,s){return{action:n,email_id:o,folder:s,timestamp:Date.now()}}static pageView(n,o){return{page_name:n,page_path:o,timestamp:Date.now()}}static error(n,o,s){return{error_type:n,error_message:o,page_name:s,timestamp:Date.now()}}static subscription(n,o,s,i){return{action:n,plan_type:o,amount:s,currency:i,timestamp:Date.now()}}static engagement(n,o,s){return{feature:n,interaction:o,duration:s,timestamp:Date.now()}}static performance(n,o,s){return{metric:n,value:o,context:s,timestamp:Date.now()}}}return we.AnalyticsEventBuilder=r,we}var Er={},jt;function us(){return jt||(jt=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProcessedEventName=e.ContractType=e.ChainType=void 0;var r=pe();Object.defineProperty(e,"ChainType",{enumerable:!0,get:function(){return r.ChainType}});var a;(function(o){o.Mailer="Mailer",o.MailService="MailService"})(a||(e.ContractType=a={}));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={}))})(Er)),Er}var Be={},_t;function gs(){if(_t)return Be;_t=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.NetworkError=void 0;class e extends Error{constructor(a,n,o,s){super(a),this.name="NetworkError",this.status=n,this.statusText=o,this.response=s}}return Be.NetworkError=e,Be}var We={},zt;function hs(){if(zt)return We;zt=1,Object.defineProperty(We,"__esModule",{value:!0}),We.WalletType=void 0;var e;return(function(r){r.METAMASK="metamask",r.PHANTOM="phantom",r.COINBASE="coinbase",r.WALLETCONNECT="walletconnect",r.INJECTED="injected"})(e||(We.WalletType=e={})),We}var Bt;function fs(){return Bt||(Bt=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 r=ds();Object.defineProperty(e,"AnalyticsEvent",{enumerable:!0,get:function(){return r.AnalyticsEvent}}),Object.defineProperty(e,"AnalyticsEventBuilder",{enumerable:!0,get:function(){return r.AnalyticsEventBuilder}});var a=us();Object.defineProperty(e,"ChainType",{enumerable:!0,get:function(){return a.ChainType}}),Object.defineProperty(e,"ContractType",{enumerable:!0,get:function(){return a.ContractType}}),Object.defineProperty(e,"ProcessedEventName",{enumerable:!0,get:function(){return a.ProcessedEventName}});var n=gs();Object.defineProperty(e,"NetworkError",{enumerable:!0,get:function(){return n.NetworkError}});var o=hs();Object.defineProperty(e,"WalletType",{enumerable:!0,get:function(){return o.WalletType}})})(Sr)),Sr}var ke={},ee={},Wt;function bs(){if(Wt)return ee;Wt=1,Object.defineProperty(ee,"__esModule",{value:!0}),ee.FeeType=ee.ClaimType=ee.ConfirmationStatus=void 0,ee.isEVMResponse=o,ee.isSolanaResponse=s,ee.isMailboxErrorResponse=i;const e=pe();var r;(function(l){l.Processed="processed",l.Confirmed="confirmed",l.Finalized="finalized"})(r||(ee.ConfirmationStatus=r={}));var a;(function(l){l.Recipient="recipient",l.Owner="owner",l.Expired="expired"})(a||(ee.ClaimType=a={}));var n;(function(l){l.Send="send",l.Delegation="delegation",l.Registration="registration"})(n||(ee.FeeType=n={}));function o(l){return l.chainType===e.ChainType.EVM}function s(l){return l.chainType===e.ChainType.SOLANA}function i(l){return!l.success&&l.error!==void 0}return ee}var Ft;function ms(){return Ft||(Ft=1,(function(e){var r=ke&&ke.__createBinding||(Object.create?(function(n,o,s,i){i===void 0&&(i=s);var l=Object.getOwnPropertyDescriptor(o,s);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,i,l)}):(function(n,o,s,i){i===void 0&&(i=s),n[i]=o[s]})),a=ke&&ke.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&r(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),a(bs(),e)})(ke)),ke}var xe={},Q={},Vt;function ys(){if(Vt)return Q;Vt=1,Object.defineProperty(Q,"__esModule",{value:!0}),Q.ReviewRejectType=Q.ApplicantType=Q.SumsubReviewAnswer=Q.SumsubReviewStatus=Q.KYCApplicationStatus=Q.KYCVerificationLevel=void 0;var e;(function(i){i.Basic="basic",i.Enhanced="enhanced",i.Accredited="accredited"})(e||(Q.KYCVerificationLevel=e={}));var r;(function(i){i.Pending="PENDING",i.Initiated="INITIATED",i.InProgress="IN_PROGRESS",i.Submitted="SUBMITTED",i.Completed="COMPLETED",i.Rejected="REJECTED"})(r||(Q.KYCApplicationStatus=r={}));var a;(function(i){i.Init="init",i.Pending="pending",i.Prechecked="prechecked",i.Completed="completed"})(a||(Q.SumsubReviewStatus=a={}));var n;(function(i){i.Green="GREEN",i.Red="RED",i.Yellow="YELLOW"})(n||(Q.SumsubReviewAnswer=n={}));var o;(function(i){i.Individual="individual",i.Company="company"})(o||(Q.ApplicantType=o={}));var s;return(function(i){i.Final="FINAL",i.Retry="RETRY",i.External="EXTERNAL"})(s||(Q.ReviewRejectType=s={})),Q}var qt;function ps(){return qt||(qt=1,(function(e){var r=xe&&xe.__createBinding||(Object.create?(function(n,o,s,i){i===void 0&&(i=s);var l=Object.getOwnPropertyDescriptor(o,s);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,i,l)}):(function(n,o,s,i){i===void 0&&(i=s),n[i]=o[s]})),a=xe&&xe.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&r(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),a(ys(),e)})(xe)),xe}var Ne={},$={},$t;function vs(){if($t)return $;$t=1,Object.defineProperty($,"__esModule",{value:!0}),$.isWildduckWebSocketErrorResponse=$.isWildduckDisconnectMessage=$.isWildduckUpdateMessage=$.isWildduckDataMessage=$.isWildduckFetchRequest=$.isWildduckUnsubscribeRequest=$.isWildduckSubscribeRequest=void 0,$.createWildduckSubscribeRequest=l,$.createWildduckUnsubscribeRequest=d,$.createWildduckFetchMessagesRequest=c;const e=g=>typeof g=="object"&&g!==null&&"type"in g&&g.type==="subscribe"&&"channel"in g&&"data"in g;$.isWildduckSubscribeRequest=e;const r=g=>typeof g=="object"&&g!==null&&"type"in g&&g.type==="unsubscribe"&&"channel"in g;$.isWildduckUnsubscribeRequest=r;const a=g=>typeof g=="object"&&g!==null&&"type"in g&&g.type==="fetch"&&"channel"in g&&g.channel==="messages";$.isWildduckFetchRequest=a;const n=g=>typeof g=="object"&&g!==null&&"type"in g&&g.type==="data"&&"channel"in g&&"data"in g;$.isWildduckDataMessage=n;const o=g=>typeof g=="object"&&g!==null&&"type"in g&&g.type==="update"&&"channel"in g&&"data"in g;$.isWildduckUpdateMessage=o;const s=g=>typeof g=="object"&&g!==null&&"type"in g&&g.type==="disconnect"&&"channel"in g&&g.channel==="system";$.isWildduckDisconnectMessage=s;const i=g=>typeof g=="object"&&g!==null&&"success"in g&&g.success===!1&&"error"in g&&"message"in g;$.isWildduckWebSocketErrorResponse=i;function l(g,h){return{type:"subscribe",channel:g,data:h}}function d(g){return{type:"unsubscribe",channel:g,data:{}}}function c(g,h){return{type:"fetch",channel:"messages",data:{mailboxId:g,...h&&{cursor:h}}}}return $}var Ht;function ws(){return Ht||(Ht=1,(function(e){var r=Ne&&Ne.__createBinding||(Object.create?(function(n,o,s,i){i===void 0&&(i=s);var l=Object.getOwnPropertyDescriptor(o,s);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,i,l)}):(function(n,o,s,i){i===void 0&&(i=s),n[i]=o[s]})),a=Ne&&Ne.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&r(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),a(Ct(),e),a(vs(),e)})(Ne)),Ne}var Gt;function Yt(){return Gt||(Gt=1,(function(e){var r=ye&&ye.__createBinding||(Object.create?(function(n,o,s,i){i===void 0&&(i=s);var l=Object.getOwnPropertyDescriptor(o,s);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,i,l)}):(function(n,o,s,i){i===void 0&&(i=s),n[i]=o[s]})),a=ye&&ye.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&r(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),a(rs(),e),a(as(),e),a(os(),e),a(is(),e),a(cs(),e),a(fs(),e),a(ms(),e),a(ps(),e),a(ws(),e)})(ye)),ye}var Ce={},Tr={},Fe={},Kt;function ks(){if(Kt)return Fe;Kt=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.Web3UsernameValidator=void 0;const e=pe();class r{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[s,i]=o;if(this.VALID_SNS_TLDS.includes(i)&&this.SNS_NAME_REGEX.test(s)&&s.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[s,i]=o;return this.VALID_SNS_TLDS.includes(i)&&this.SNS_NAME_REGEX.test(s)&&s.length>=1}}return Fe.Web3UsernameValidator=r,r.EVM_REGEX=/^0x[a-fA-F0-9]{40}$/,r.BASE58_REGEX=/^[1-9A-HJ-NP-Za-km-z]+$/,r.ENS_REGEX=/^[a-zA-Z0-9]([a-zA-Z0-9]|(-[a-zA-Z0-9]))*\.(eth|box)$/i,r.SNS_NAME_REGEX=/^[a-zA-Z0-9]([a-zA-Z0-9]|(-[a-zA-Z0-9]))*$/,r.VALID_SNS_TLDS=["sol","abc","backpack","bonk","coin","dao","defi","gm","poor","pump","shdw","stepn","web3"],Fe}var Ar={},Zt;function xs(){return Zt||(Zt=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 r=(S,k)=>C=>{try{return S(C)?{isValid:!0,data:C}:{isValid:!1,error:`Invalid ${k}`,data:null}}catch(I){return{isValid:!1,error:`Validation error for ${k}: ${I instanceof Error?I.message:"Unknown error"}`,data:null}}};e.createValidator=r;const a=S=>typeof S=="string";e.isString=a;const n=S=>typeof S=="number"&&!isNaN(S);e.isNumber=n;const o=S=>typeof S=="boolean";e.isBoolean=o;const s=S=>typeof S=="object"&&S!==null&&!Array.isArray(S);e.isObject=s;const i=S=>Array.isArray(S);e.isArray=i;const l=S=>S==null;e.isNullish=l;const d=(S,k)=>(0,e.isObject)(S)?k.every(C=>C in S):!1;e.hasRequiredProperties=d;const c=(S,k)=>(0,e.isArray)(S)?S.every(k):!1;e.validateArray=c;const g=S=>k=>k===void 0||S(k);e.optional=g;const h=S=>(0,e.isObject)(S)&&(0,e.isBoolean)(S.success);e.isApiResponse=h;const w=(S,k)=>!(0,e.isApiResponse)(S)||!S.success?!1:k&&"data"in S?k(S.data):!0;e.isSuccessResponse=w;const m=S=>(0,e.isApiResponse)(S)&&!S.success&&"error"in S&&(0,e.isString)(S.error);e.isErrorResponse=m;const b=S=>{if(!(0,e.isString)(S))return!1;const k=new Date(S);return!isNaN(k.getTime())};e.isValidDate=b;const y=S=>(0,e.isString)(S)?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(S):!1;e.isEmail=y;const v=S=>{if(!(0,e.isString)(S))return!1;try{return new URL(S),!0}catch{return!1}};e.isUrl=v;const T=(S,k)=>(C,I=k)=>{if(!S(C))throw new TypeError(`Invalid ${I}: expected ${k}`)};e.createAssertion=T;const N=(S,k)=>{try{const C=JSON.parse(S);return k?k(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=N})(Ar)),Ar}var Xt;function Ns(){return Xt||(Xt=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 r=ks();Object.defineProperty(e,"Web3UsernameValidator",{enumerable:!0,get:function(){return r.Web3UsernameValidator}});var a=xs();Object.defineProperty(e,"createAssertion",{enumerable:!0,get:function(){return a.createAssertion}}),Object.defineProperty(e,"createValidator",{enumerable:!0,get:function(){return a.createValidator}}),Object.defineProperty(e,"hasRequiredProperties",{enumerable:!0,get:function(){return a.hasRequiredProperties}}),Object.defineProperty(e,"isApiResponse",{enumerable:!0,get:function(){return a.isApiResponse}}),Object.defineProperty(e,"isArray",{enumerable:!0,get:function(){return a.isArray}}),Object.defineProperty(e,"isBoolean",{enumerable:!0,get:function(){return a.isBoolean}}),Object.defineProperty(e,"isEmail",{enumerable:!0,get:function(){return a.isEmail}}),Object.defineProperty(e,"isErrorResponse",{enumerable:!0,get:function(){return a.isErrorResponse}}),Object.defineProperty(e,"isNullish",{enumerable:!0,get:function(){return a.isNullish}}),Object.defineProperty(e,"isNumber",{enumerable:!0,get:function(){return a.isNumber}}),Object.defineProperty(e,"isObject",{enumerable:!0,get:function(){return a.isObject}}),Object.defineProperty(e,"isString",{enumerable:!0,get:function(){return a.isString}}),Object.defineProperty(e,"isSuccessResponse",{enumerable:!0,get:function(){return a.isSuccessResponse}}),Object.defineProperty(e,"isUrl",{enumerable:!0,get:function(){return a.isUrl}}),Object.defineProperty(e,"isValidDate",{enumerable:!0,get:function(){return a.isValidDate}}),Object.defineProperty(e,"optional",{enumerable:!0,get:function(){return a.optional}}),Object.defineProperty(e,"parseJson",{enumerable:!0,get:function(){return a.parseJson}}),Object.defineProperty(e,"validateArray",{enumerable:!0,get:function(){return a.validateArray}})})(Tr)),Tr}var Ir={},re={},Qt;function Cs(){if(Qt)return re;Qt=1,Object.defineProperty(re,"__esModule",{value:!0}),re.createMultiChainId=e,re.createUserMultiChainId=r,re.createChainStatsId=a,re.createDelegationId=n,re.normalizeAddress=o,re.formatBigInt=s,re.isZeroAddress=i,re.isTestNet=l,re.validateEventArgs=d;function e(c,g,h){return`${c}-${g}-${h}`}function r(c,g){return`${c}-${g.toLowerCase()}`}function a(c){return`${c}-global`}function n(c,g){return`${c.toLowerCase()}-${g}`}function o(c){return c.toLowerCase()}function s(c,g=18){const h=BigInt(10**g),w=c/h,m=c%h;return m===0n?w.toString():`${w}.${m.toString().padStart(g,"0").replace(/0+$/,"")}`}function i(c){return c.toLowerCase()==="0x0000000000000000000000000000000000000000"}function l(c){const g=new Set([31337,11155111,80001,80002,421614,11155420,84532,43113]),h=new Set([-102,-103,-104]);return g.has(c)||h.has(c)}function d(c,g){for(const h of g)if(c[h]===void 0||c[h]===null)return console.error(`❌ Missing required field: ${String(h)}`),!1;return!0}return re}var Jt;function Ss(){return Jt||(Jt=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 r=Mt();Object.defineProperty(e,"AddressType",{enumerable:!0,get:function(){return r.AddressType}}),Object.defineProperty(e,"formatWalletAddress",{enumerable:!0,get:function(){return r.formatWalletAddress}}),Object.defineProperty(e,"getAddressType",{enumerable:!0,get:function(){return r.getAddressType}}),Object.defineProperty(e,"getChainDisplayName",{enumerable:!0,get:function(){return r.getChainDisplayName}}),Object.defineProperty(e,"isENSName",{enumerable:!0,get:function(){return r.isENSName}}),Object.defineProperty(e,"isSNSName",{enumerable:!0,get:function(){return r.isSNSName}}),Object.defineProperty(e,"isValidSignature",{enumerable:!0,get:function(){return r.isValidSignature}}),Object.defineProperty(e,"isValidWalletAddress",{enumerable:!0,get:function(){return r.isValidWalletAddress}}),Object.defineProperty(e,"parseEmailAddress",{enumerable:!0,get:function(){return r.parseEmailAddress}});var a=Nr();Object.defineProperty(e,"isEvmAddress",{enumerable:!0,get:function(){return a.isEvmAddress}}),Object.defineProperty(e,"isSolanaAddress",{enumerable:!0,get:function(){return a.isSolanaAddress}});var n=Cs();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}})})(Ir)),Ir}var Mr={},ae={},Rt;function Es(){if(Rt)return ae;Rt=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.generateAuthMessage=r,ae.isAuthExpired=a,ae.getAuthStatusText=n,ae.canAccessProtectedFeatures=o,ae.isAuthStatusConnected=s,ae.generateNonce=i,ae.extractNonceFromMessage=l,ae.isValidNonce=d;const e=pe();function r(c,g){const h=g||`${Date.now()}-${Math.random().toString(36).substr(2,9)}`;return`Authenticate with ${c}
|
|
13
|
-
Nonce: ${h}`}function a(c,g=24){const h=new Date(c.getTime()+g*60*60*1e3);return new Date>h}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 s(c){return c===e.AuthStatus.CONNECTED||c===e.AuthStatus.VERIFIED}function i(){return`${Date.now()}-${Math.random().toString(36).substr(2,9)}`}function l(c){const g=c.match(/Nonce:\s*(.+)$/m);return g?g[1].trim():void 0}function d(c){if(!c||typeof c!="string"||c.length<10)return!1;const g=c.split("-");if(g.length>=2){const h=parseInt(g[0],10);if(!isNaN(h)){const w=Date.now()-864e5;if(h<w)return!1}}return!0}return ae}var ea;function Ts(){return ea||(ea=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 r=Es();Object.defineProperty(e,"canAccessProtectedFeatures",{enumerable:!0,get:function(){return r.canAccessProtectedFeatures}}),Object.defineProperty(e,"extractNonceFromMessage",{enumerable:!0,get:function(){return r.extractNonceFromMessage}}),Object.defineProperty(e,"generateAuthMessage",{enumerable:!0,get:function(){return r.generateAuthMessage}}),Object.defineProperty(e,"generateNonce",{enumerable:!0,get:function(){return r.generateNonce}}),Object.defineProperty(e,"getAuthStatusText",{enumerable:!0,get:function(){return r.getAuthStatusText}}),Object.defineProperty(e,"isAuthExpired",{enumerable:!0,get:function(){return r.isAuthExpired}}),Object.defineProperty(e,"isAuthStatusConnected",{enumerable:!0,get:function(){return r.isAuthStatusConnected}}),Object.defineProperty(e,"isValidNonce",{enumerable:!0,get:function(){return r.isValidNonce}})})(Mr)),Mr}var Lr={},Pr={},ra;function As(){return ra||(ra=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CLAIM_PERIOD_DAYS=e.USDC_DECIMALS=void 0,e.formatUSDC=r,e.parseUSDC=a,e.USDC_DECIMALS=6,e.CLAIM_PERIOD_DAYS=60;function r(n){return(n/Math.pow(10,e.USDC_DECIMALS)).toFixed(2)}function a(n){return Math.floor(parseFloat(n)*Math.pow(10,e.USDC_DECIMALS))}})(Pr)),Pr}var oe={},ta;function Is(){if(ta)return oe;ta=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.formatEmailDate=e,oe.formatTimestamp=r,oe.formatRelativeTime=a,oe.parseDate=n,oe.isDateInRange=o,oe.addDays=s,oe.addHours=i;function e(l){const d=typeof l=="string"?new Date(l):l;if(isNaN(d.getTime()))return"Invalid date";const c=new Date,g=c.getTime()-d.getTime(),h=Math.floor(g/(1e3*60*60*24));return h===0?d.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}):h===1?"Yesterday":h<7?d.toLocaleDateString("en-US",{weekday:"long"}):d.getFullYear()===c.getFullYear()?d.toLocaleDateString("en-US",{month:"short",day:"numeric"}):d.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function r(l){return new Date(l).toISOString()}function a(l){const d=typeof l=="string"||typeof l=="number"?new Date(l):l;if(isNaN(d.getTime()))return"Invalid date";const g=new Date().getTime()-d.getTime(),h=Math.floor(g/1e3),w=Math.floor(h/60),m=Math.floor(w/60),b=Math.floor(m/24),y=Math.floor(b/7),v=Math.floor(b/30),T=Math.floor(b/365);return h<60?"just now":w<60?w===1?"1 minute ago":`${w} minutes ago`:m<24?m===1?"1 hour ago":`${m} hours ago`:b<7?b===1?"1 day ago":`${b} days ago`:y<4?y===1?"1 week ago":`${y} weeks ago`:v<12?v===1?"1 month ago":`${v} months ago`:T===1?"1 year ago":`${T} years ago`}function n(l){try{const d=new Date(l);return isNaN(d.getTime())?null:d}catch{return null}}function o(l,d,c){return l>=d&&l<=c}function s(l,d){const c=new Date(l);return c.setDate(c.getDate()+d),c}function i(l,d){const c=new Date(l);return c.setHours(c.getHours()+d),c}return oe}var G={},aa;function Ms(){if(aa)return G;aa=1,Object.defineProperty(G,"__esModule",{value:!0}),G.truncate=e,G.capitalize=r,G.toTitleCase=a,G.toKebabCase=n,G.toCamelCase=o,G.toSnakeCase=s,G.normalizeWhitespace=i,G.isBlank=l,G.isNotBlank=d,G.escapeHtml=c,G.stripHtml=g,G.getInitials=h,G.formatBytes=w,G.randomString=m,G.pluralize=b,G.formatNumber=y;function e(v,T,N="..."){return!v||v.length<=T?v:v.slice(0,T-N.length)+N}function r(v){return v&&v.charAt(0).toUpperCase()+v.slice(1)}function a(v){return v&&v.toLowerCase().split(" ").map(T=>r(T)).join(" ")}function n(v){return v&&v.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function o(v){return v&&v.replace(/[-_\s]+(.)?/g,(T,N)=>N?N.toUpperCase():"").replace(/^./,T=>T.toLowerCase())}function s(v){return v&&v.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[\s-]+/g,"_").toLowerCase()}function i(v){return v&&v.replace(/\s+/g," ").trim()}function l(v){return!v||v.trim().length===0}function d(v){return!l(v)}function c(v){if(!v)return v;const T={"&":"&","<":"<",">":">",'"':""","'":"'"};return v.replace(/[&<>"']/g,N=>T[N])}function g(v){return v&&v.replace(/<[^>]*>/g,"")}function h(v,T=2){return v?v.trim().split(/\s+/).slice(0,T).map(k=>k.charAt(0).toUpperCase()).join(""):""}function w(v,T=2){if(v===0)return"0 Bytes";const N=1024,S=T<0?0:T,k=["Bytes","KB","MB","GB","TB","PB"],C=Math.floor(Math.log(v)/Math.log(N));return parseFloat((v/Math.pow(N,C)).toFixed(S))+" "+k[C]}function m(v,T="alphanumeric"){let N;switch(T){case"alpha":N="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";break;case"numeric":N="0123456789";break;case"alphanumeric":N="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";break;case"hex":N="0123456789abcdef";break;default:N=T}let S="";for(let k=0;k<v;k++)S+=N.charAt(Math.floor(Math.random()*N.length));return S}function b(v,T,N){return v===1?T:N||`${T}s`}function y(v){return v.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}return G}var na;function Ls(){return na||(na=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 r=As();Object.defineProperty(e,"CLAIM_PERIOD_DAYS",{enumerable:!0,get:function(){return r.CLAIM_PERIOD_DAYS}}),Object.defineProperty(e,"USDC_DECIMALS",{enumerable:!0,get:function(){return r.USDC_DECIMALS}}),Object.defineProperty(e,"formatUSDC",{enumerable:!0,get:function(){return r.formatUSDC}}),Object.defineProperty(e,"parseUSDC",{enumerable:!0,get:function(){return r.parseUSDC}});var a=Is();Object.defineProperty(e,"addDays",{enumerable:!0,get:function(){return a.addDays}}),Object.defineProperty(e,"addHours",{enumerable:!0,get:function(){return a.addHours}}),Object.defineProperty(e,"formatEmailDate",{enumerable:!0,get:function(){return a.formatEmailDate}}),Object.defineProperty(e,"formatRelativeTime",{enumerable:!0,get:function(){return a.formatRelativeTime}}),Object.defineProperty(e,"formatTimestamp",{enumerable:!0,get:function(){return a.formatTimestamp}}),Object.defineProperty(e,"isDateInRange",{enumerable:!0,get:function(){return a.isDateInRange}}),Object.defineProperty(e,"parseDate",{enumerable:!0,get:function(){return a.parseDate}});var n=Ms();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}})})(Lr)),Lr}var Or={},W={},oa;function Ps(){if(oa)return W;oa=1,Object.defineProperty(W,"__esModule",{value:!0}),W.Z_INDEX=W.ANIMATION=W.NETWORK_IDS=W.WALLET_NAMES=W.CONTACT_INFO=W.ROUTES=W.SUCCESS_MESSAGES=W.ERROR_MESSAGES=W.TIME_FORMAT=W.SUBSCRIPTION_TIERS=W.EMAIL_CONFIG=W.STORAGE_KEYS=W.CHAIN_TYPE=W.AUTH_STATUS=W.API_RETRY_DELAY=W.API_RETRY_ATTEMPTS=W.API_TIMEOUT=void 0;const e=3e4;W.API_TIMEOUT=e;const r=3;W.API_RETRY_ATTEMPTS=r;const a=1e3;W.API_RETRY_DELAY=a;const n={DISCONNECTED:"disconnected",CONNECTED:"connected",VERIFIED:"verified"};W.AUTH_STATUS=n;const o={EVM:"evm",SOLANA:"solana",UNKNOWN:"unknown"};W.CHAIN_TYPE=o;const s={AUTH_TOKEN:"authToken",USER_DATA:"userData",THEME:"theme",EMAIL_CACHE:"emailCache",WALLET_ADDRESS:"walletAddress",CHAIN_TYPE:"chainType"};W.STORAGE_KEYS=s;const i={MAX_ATTACHMENT_SIZE:25*1024*1024,MAX_RECIPIENTS:100,ITEMS_PER_PAGE:50,REFRESH_INTERVAL:6e4,NOTIFICATION_COOLDOWN:3e5};W.EMAIL_CONFIG=i;const l={FREE:"free",BASIC:"basic",PRO:"pro",ENTERPRISE:"enterprise"};W.SUBSCRIPTION_TIERS=l;const d={SHORT_DATE:"MMM d",FULL_DATE:"MMM d, yyyy",DATE_TIME:"MMM d, yyyy h:mm a",RELATIVE:"relative"};W.TIME_FORMAT=d;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"};W.ERROR_MESSAGES=c;const g={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"};W.SUCCESS_MESSAGES=g;const h={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"};W.ROUTES=h;const w={SUPPORT_EMAIL:"support@sudobility.com",CONTACT_EMAIL:"info@sudobility.com"};W.CONTACT_INFO=w;const m={METAMASK:"MetaMask",WALLETCONNECT:"WalletConnect",COINBASE:"Coinbase Wallet",PHANTOM:"Phantom",SAFE:"Safe",ARGENT:"Argent",RAINBOW:"Rainbow",TRUST:"Trust Wallet",LEDGER:"Ledger",TREZOR:"Trezor"};W.WALLET_NAMES=m;const b={ETHEREUM_MAINNET:1,POLYGON:137,ARBITRUM:42161,OPTIMISM:10,BASE:8453,SOLANA_MAINNET:"mainnet-beta",SOLANA_DEVNET:"devnet"};W.NETWORK_IDS=b;const y={FAST:150,NORMAL:300,SLOW:500,VERY_SLOW:1e3};W.ANIMATION=y;const v={DROPDOWN:10,OVERLAY:20,MODAL:30,POPOVER:40,TOOLTIP:50,TOAST:60};return W.Z_INDEX=v,W}var Ve={},sa;function Os(){return sa||(sa=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.STATUS_VALUES=void 0,Ve.STATUS_VALUES={SUCCESS:"success",PENDING:"pending",FAILED:"failed",ERROR:"error"}),Ve}var ia;function Us(){return ia||(ia=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 r=Ps();Object.defineProperty(e,"API_TIMEOUT",{enumerable:!0,get:function(){return r.API_TIMEOUT}}),Object.defineProperty(e,"API_RETRY_ATTEMPTS",{enumerable:!0,get:function(){return r.API_RETRY_ATTEMPTS}}),Object.defineProperty(e,"API_RETRY_DELAY",{enumerable:!0,get:function(){return r.API_RETRY_DELAY}}),Object.defineProperty(e,"AUTH_STATUS",{enumerable:!0,get:function(){return r.AUTH_STATUS}}),Object.defineProperty(e,"CHAIN_TYPE",{enumerable:!0,get:function(){return r.CHAIN_TYPE}}),Object.defineProperty(e,"STORAGE_KEYS",{enumerable:!0,get:function(){return r.STORAGE_KEYS}}),Object.defineProperty(e,"EMAIL_CONFIG",{enumerable:!0,get:function(){return r.EMAIL_CONFIG}}),Object.defineProperty(e,"SUBSCRIPTION_TIERS",{enumerable:!0,get:function(){return r.SUBSCRIPTION_TIERS}}),Object.defineProperty(e,"TIME_FORMAT",{enumerable:!0,get:function(){return r.TIME_FORMAT}}),Object.defineProperty(e,"ERROR_MESSAGES",{enumerable:!0,get:function(){return r.ERROR_MESSAGES}}),Object.defineProperty(e,"SUCCESS_MESSAGES",{enumerable:!0,get:function(){return r.SUCCESS_MESSAGES}}),Object.defineProperty(e,"ROUTES",{enumerable:!0,get:function(){return r.ROUTES}}),Object.defineProperty(e,"CONTACT_INFO",{enumerable:!0,get:function(){return r.CONTACT_INFO}}),Object.defineProperty(e,"WALLET_NAMES",{enumerable:!0,get:function(){return r.WALLET_NAMES}}),Object.defineProperty(e,"NETWORK_IDS",{enumerable:!0,get:function(){return r.NETWORK_IDS}}),Object.defineProperty(e,"ANIMATION",{enumerable:!0,get:function(){return r.ANIMATION}}),Object.defineProperty(e,"Z_INDEX",{enumerable:!0,get:function(){return r.Z_INDEX}});var a=Os();Object.defineProperty(e,"STATUS_VALUES",{enumerable:!0,get:function(){return a.STATUS_VALUES}})})(Or)),Or}var Ur={},K={},la;function Ds(){if(la)return K;la=1,Object.defineProperty(K,"__esModule",{value:!0}),K.storageLogger=K.ensLogger=K.contractLogger=K.apiLogger=K.authLogger=K.logger=K.LogLevel=void 0;var e;(function(d){d.ERROR="error",d.WARN="warn",d.INFO="info",d.DEBUG="debug"})(e||(K.LogLevel=e={}));class r{constructor(){this.isDevelopment=process.env.NODE_ENV==="development"}formatTimestamp(){return new Date().toISOString()}formatMessage(c,g,h){const w=this.formatTimestamp(),m=h?` [${h}]`:"";return`[${w}]${m} ${g}`}shouldLog(c){return this.isDevelopment?!0:c===e.ERROR||c===e.WARN}error(c,g,h){this.shouldLog(e.ERROR)&&(console.error(this.formatMessage(e.ERROR,c,g)),h&&console.error(h))}warn(c,g,h){this.shouldLog(e.WARN)&&(console.warn(this.formatMessage(e.WARN,c,g)),h&&console.warn(h))}info(c,g,h){this.shouldLog(e.INFO)&&(console.log(this.formatMessage(e.INFO,c,g)),h&&console.log(h))}debug(c,g,h){this.shouldLog(e.DEBUG)&&(console.log(this.formatMessage(e.DEBUG,c,g)),h&&console.log(h))}withContext(c){return{error:(g,h)=>this.error(g,c,h),warn:(g,h)=>this.warn(g,c,h),info:(g,h)=>this.info(g,c,h),debug:(g,h)=>this.debug(g,c,h)}}}const a=new r;K.logger=a;const n=a.withContext("AUTH");K.authLogger=n;const o=a.withContext("API");K.apiLogger=o;const s=a.withContext("CONTRACT");K.contractLogger=s;const i=a.withContext("ENS");K.ensLogger=i;const l=a.withContext("STORAGE");return K.storageLogger=l,K}var ca;function da(){return ca||(ca=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 r=Ds();Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return r.LogLevel}}),Object.defineProperty(e,"logger",{enumerable:!0,get:function(){return r.logger}}),Object.defineProperty(e,"authLogger",{enumerable:!0,get:function(){return r.authLogger}}),Object.defineProperty(e,"apiLogger",{enumerable:!0,get:function(){return r.apiLogger}}),Object.defineProperty(e,"contractLogger",{enumerable:!0,get:function(){return r.contractLogger}}),Object.defineProperty(e,"ensLogger",{enumerable:!0,get:function(){return r.ensLogger}}),Object.defineProperty(e,"storageLogger",{enumerable:!0,get:function(){return r.storageLogger}})})(Ur)),Ur}var Dr={},Se={},ua;function js(){if(ua)return Se;ua=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.createURLSearchParams=r,Se.createSearchParams=a,Se.searchParamsToString=n,Se.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[l,d]of i)this.append(l,d);else for(const[l,d]of Object.entries(i))d!==void 0&&this.append(l,d)}parseString(i){const l=i.startsWith("?")?i.slice(1):i;if(l)for(const d of l.split("&")){const[c,g=""]=d.split("=");c&&this.append(decodeURIComponent(c),decodeURIComponent(g))}}append(i,l){this.params.has(i)||this.params.set(i,[]);const d=this.params.get(i);d&&d.push(l)}delete(i){this.params.delete(i)}get(i){const l=this.params.get(i);return l&&l.length>0?l[0]:null}getAll(i){return this.params.get(i)||[]}has(i){return this.params.has(i)}set(i,l){this.params.set(i,[l])}toString(){const i=[];return this.params.forEach((l,d)=>{for(const c of l)i.push(`${encodeURIComponent(d)}=${encodeURIComponent(c)}`)}),i.join("&")}forEach(i){this.params.forEach((l,d)=>{for(const c of l)i(c,d)})}}function r(s){return typeof URLSearchParams<"u"?new URLSearchParams(s):new e(s)}function a(s){const i=r(void 0);for(const[l,d]of Object.entries(s))d!=null&&i.append(l,String(d));return i}function n(s){return s.toString()}function o(s){const i=r(s),l={};return i.forEach((d,c)=>{l[c]=d}),l}return Se}var ga;function _s(){return ga||(ga=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseSearchParams=e.searchParamsToString=e.createSearchParams=e.createURLSearchParams=void 0;var r=js();Object.defineProperty(e,"createURLSearchParams",{enumerable:!0,get:function(){return r.createURLSearchParams}}),Object.defineProperty(e,"createSearchParams",{enumerable:!0,get:function(){return r.createSearchParams}}),Object.defineProperty(e,"searchParamsToString",{enumerable:!0,get:function(){return r.searchParamsToString}}),Object.defineProperty(e,"parseSearchParams",{enumerable:!0,get:function(){return r.parseSearchParams}})})(Dr)),Dr}var Z={},ha;function zs(){if(ha)return Z;ha=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.debounceAsync=Z.clearExpiredCache=Z.withCache=Z.withTimeout=Z.safeParallel=Z.withLoadingState=Z.safeAsync=void 0;const e=da(),r=async(g,h)=>{try{return{data:await g(),success:!0}}catch(w){const m=w instanceof Error?w:new Error(String(w));return e.logger.error(`Async operation failed: ${m.message}`,h,w),{error:m,success:!1}}};Z.safeAsync=r;const a=async(g,h,w,m)=>{h(!0),w(null);try{return await g()}catch(b){const y=b instanceof Error?b.message:String(b);w(y),e.logger.error(`Operation failed: ${y}`,m,b);return}finally{h(!1)}};Z.withLoadingState=a;const n=async(g,h)=>{try{return{data:await Promise.all(g.map(m=>m())),success:!0}}catch(w){const m=w instanceof Error?w:new Error(String(w));return e.logger.error(`Parallel operations failed: ${m.message}`,h,w),{error:m,success:!1}}};Z.safeParallel=n;const o=async(g,h,w)=>{const m=new Promise((b,y)=>setTimeout(()=>y(new Error(`Operation timed out after ${h}ms`)),h));try{return await Promise.race([g(),m])}catch(b){throw e.logger.error("Timeout operation failed",w,b),b}};Z.withTimeout=o;const s=new Map,i=async(g,h,w=300*1e3)=>{const m=s.get(g),b=Date.now();if(m&&b-m.timestamp<m.ttl)return m.data;const y=await h();return s.set(g,{data:y,timestamp:b,ttl:w}),y};Z.withCache=i;const l=()=>{const g=Date.now();for(const[h,w]of s.entries())g-w.timestamp>=w.ttl&&s.delete(h)};Z.clearExpiredCache=l;const d=new Map,c=(g,h,w)=>(...m)=>new Promise(b=>{const y=d.get(w);y&&clearTimeout(y);const v=setTimeout(async()=>{d.delete(w);try{const T=await g(...m);b(T)}catch(T){e.logger.error("Debounced operation failed",w,T),b(void 0)}},h);d.set(w,v)});return Z.debounceAsync=c,Z}var fa;function ba(){return fa||(fa=1,(function(e){var r=Ce&&Ce.__createBinding||(Object.create?(function(n,o,s,i){i===void 0&&(i=s);var l=Object.getOwnPropertyDescriptor(o,s);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,i,l)}):(function(n,o,s,i){i===void 0&&(i=s),n[i]=o[s]})),a=Ce&&Ce.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&r(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),a(Ns(),e),a(Ss(),e),a(Ts(),e),a(Ls(),e),a(Us(),e),a(da(),e),a(_s(),e),a(zs(),e)})(Ce)),Ce}var ma;function Bs(){return ma||(ma=1,(function(e){var r=me&&me.__createBinding||(Object.create?(function(s,i,l,d){d===void 0&&(d=l);var c=Object.getOwnPropertyDescriptor(i,l);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[l]}}),Object.defineProperty(s,d,c)}):(function(s,i,l,d){d===void 0&&(d=l),s[d]=i[l]})),a=me&&me.__exportStar||function(s,i){for(var l in s)l!=="default"&&!Object.prototype.hasOwnProperty.call(i,l)&&r(i,s,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.MailboxSpecialUse=e.ReviewRejectType=e.ApplicantType=e.SumsubReviewAnswer=e.SumsubReviewStatus=e.KYCApplicationStatus=e.KYCVerificationLevel=e.FeeType=e.ClaimType=e.ConfirmationStatus=e.ProcessedEventName=e.ContractType=e.StorageType=e.WalletType=e.ChainType=e.AnalyticsEvent=e.TransactionStatus=e.MessageType=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,a(Yt(),e),a(ba(),e);var n=ba();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=Yt();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,"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}}),Object.defineProperty(e,"ConfirmationStatus",{enumerable:!0,get:function(){return o.ConfirmationStatus}}),Object.defineProperty(e,"ClaimType",{enumerable:!0,get:function(){return o.ClaimType}}),Object.defineProperty(e,"FeeType",{enumerable:!0,get:function(){return o.FeeType}}),Object.defineProperty(e,"KYCVerificationLevel",{enumerable:!0,get:function(){return o.KYCVerificationLevel}}),Object.defineProperty(e,"KYCApplicationStatus",{enumerable:!0,get:function(){return o.KYCApplicationStatus}}),Object.defineProperty(e,"SumsubReviewStatus",{enumerable:!0,get:function(){return o.SumsubReviewStatus}}),Object.defineProperty(e,"SumsubReviewAnswer",{enumerable:!0,get:function(){return o.SumsubReviewAnswer}}),Object.defineProperty(e,"ApplicantType",{enumerable:!0,get:function(){return o.ApplicantType}}),Object.defineProperty(e,"ReviewRejectType",{enumerable:!0,get:function(){return o.ReviewRejectType}}),Object.defineProperty(e,"MailboxSpecialUse",{enumerable:!0,get:function(){return o.MailboxSpecialUse}})})(me)),me}var ya=Bs();const Ws=e=>{switch(e){case"verified":case"success":return Me("success");case"connected":case"warning":return Me("warning");case"disconnected":case"error":return Me("error");case"pending":return Me("info");default:return Me("neutral")}},Fs=e=>{switch(e){case"sm":return"w-1.5 h-1.5";case"lg":return"w-3 h-3";default:return"w-2 h-2"}},Vs=({status:e,label:r,showDot:a=!0,size:n="md"})=>{const s=r||{verified:"Verified",connected:"Connected",disconnected:"Disconnected",pending:"Pending",error:"Error",success:"Success",warning:"Warning"}[e],l=((g,h)=>{const w={sm:"small",md:"default",lg:"large"},b={verified:"success",success:"success",connected:"warning",warning:"warning",disconnected:"error",error:"error",pending:"primary"}[g]||"default",y=w[h];return y==="default"?_.badge[b]():_.badge[y](b)})(e,n),d=Ws(e),c=Fs(n);return t.jsxs("span",{className:l,children:[a&&t.jsx("span",{className:`inline-block ${c} rounded-full ${d} mr-1`}),s]})},qs=({chainType:e,size:r="md"})=>{if(!e)return null;const a=e===ya.ChainType.SOLANA?"SOL":"ETH",o={sm:"small",md:"default",lg:"large"}[r],s=()=>{const i=e===ya.ChainType.SOLANA?"solana":"ethereum";return o==="default"?_.badge[i]():_.badge[o](i)};return t.jsx("span",{className:s(),children:a})},$s={xs:"w-1.5 h-1.5",sm:"w-2 h-2",md:"w-3 h-3",lg:"w-4 h-4"},Hs=({status:e,size:r="sm",pulse:a=!1,className:n})=>t.jsx("div",{className:f("rounded-full flex-shrink-0",Me(e),$s[r],a&&"animate-pulse",n)}),Gs=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UstatusUpipeline",children:r||"UstatusUpipeline Component"}),Re=Y.forwardRef(({className:e,type:r,...a},n)=>t.jsx("input",{type:r,className:f(_.input.default(),e),ref:n,...a}));Re.displayName="Input";const Ys=({value:e,onChange:r,placeholder:a,rows:n=4,disabled:o=!1,readOnly:s=!1,showCount:i=!1,maxLength:l,resize:d="vertical",size:c="md",className:g,textareaProps:h})=>{const w={sm:"p-2 text-sm",md:"p-3 text-base",lg:"p-4 text-lg"},m={none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"},b=T=>{const N=T.target.value;l&&N.length>l||r(N)},y=e.length,v=i||l!==void 0;return t.jsxs("div",{className:f("w-full",g),children:[t.jsx("textarea",{value:e,onChange:b,placeholder:a,rows:n,disabled:o,readOnly:s,maxLength:l,className:f("w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",w[c],m[d],o&&"opacity-50 cursor-not-allowed",s&&"bg-gray-50 dark:bg-gray-900 cursor-default"),...h}),v&&t.jsx("div",{className:"flex justify-end mt-1",children:t.jsxs("span",{className:f("text-xs",l&&y>l*.9?"text-yellow-600 dark:text-yellow-400":"text-gray-500 dark:text-gray-400",l&&y>=l&&"text-red-600 dark:text-red-400"),children:[y,l&&` / ${l}`]})})]})},Ks=({value:e,onChange:r,min:a,max:n,step:o=1,disabled:s=!1,showSteppers:i=!1,stepperPosition:l="right",placeholder:d,size:c="md",className:g,inputProps:h})=>{const m={sm:{input:"py-1.5 px-3 text-sm",button:"w-6 h-6",icon:"h-3 w-3"},md:{input:"py-2 px-3 text-base",button:"w-8 h-8",icon:"h-4 w-4"},lg:{input:"py-3 px-4 text-lg",button:"w-10 h-10",icon:"h-5 w-5"}}[c],b=C=>{const I=parseFloat(C.target.value);if(isNaN(I))C.target.value===""&&r(a??0);else{const E=y(I);r(E)}},y=C=>{let I=C;return a!==void 0&&I<a&&(I=a),n!==void 0&&I>n&&(I=n),I},v=()=>{const C=y(e+o);r(C)},T=()=>{const C=y(e-o);r(C)},N=n===void 0||e<n,S=a===void 0||e>a,k=({onClick:C,icon:I,disabled:E,ariaLabel:M})=>t.jsx("button",{type:"button",onClick:C,disabled:s||E,"aria-label":M,className:f("inline-flex items-center justify-center","border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors",m.button,(s||E)&&"opacity-50 cursor-not-allowed"),children:I});return i&&l==="sides"?t.jsxs("div",{className:f("inline-flex items-stretch",g),children:[t.jsx(k,{onClick:T,disabled:!S,icon:t.jsx(L.MinusIcon,{className:m.icon}),ariaLabel:"Decrement"}),t.jsx("input",{type:"number",value:e,onChange:b,min:a,max:n,step:o,disabled:s,placeholder:d,className:f("border-x-0 text-center","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:z-10","transition-colors",m.input,s&&"opacity-50 cursor-not-allowed","[appearance:textfield]","[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:appearance-none"),...h}),t.jsx(k,{onClick:v,disabled:!N,icon:t.jsx(L.PlusIcon,{className:m.icon}),ariaLabel:"Increment"})]}):i&&l==="right"?t.jsxs("div",{className:f("inline-flex items-stretch gap-2",g),children:[t.jsx("input",{type:"number",value:e,onChange:b,min:a,max:n,step:o,disabled:s,placeholder:d,className:f("rounded-lg border","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors",m.input,s&&"opacity-50 cursor-not-allowed","[appearance:textfield]","[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:appearance-none"),...h}),t.jsxs("div",{className:"inline-flex flex-col gap-0.5",children:[t.jsx("button",{type:"button",onClick:v,disabled:s||!N,"aria-label":"Increment",className:f("inline-flex items-center justify-center","rounded border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors","flex-1",m.button.replace(/h-\d+/,"h-auto"),(s||!N)&&"opacity-50 cursor-not-allowed"),children:t.jsx(L.PlusIcon,{className:f(m.icon,"w-3 h-3")})}),t.jsx("button",{type:"button",onClick:T,disabled:s||!S,"aria-label":"Decrement",className:f("inline-flex items-center justify-center","rounded border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors","flex-1",m.button.replace(/h-\d+/,"h-auto"),(s||!S)&&"opacity-50 cursor-not-allowed"),children:t.jsx(L.MinusIcon,{className:f(m.icon,"w-3 h-3")})})]})]}):t.jsx("input",{type:"number",value:e,onChange:b,min:a,max:n,step:o,disabled:s,placeholder:d,className:f("rounded-lg border","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors",m.input,s&&"opacity-50 cursor-not-allowed",g),...h})},Zs=({value:e,onChange:r,placeholder:a="Search...",autoFocus:n=!1,disabled:o=!1,size:s="md",showIcon:i=!0,showClear:l=!0,loading:d=!1,className:c,inputProps:g})=>{const[h,w]=p.useState(""),m=e!==void 0?e:h,b=e!==void 0,v={sm:{input:"py-1.5 text-sm",icon:"h-4 w-4",padding:i?"pl-8 pr-8":"px-3",iconLeft:"left-0 pl-2.5",iconRight:"right-0 pr-2.5"},md:{input:"py-2 text-base",icon:"h-5 w-5",padding:i?"pl-10 pr-10":"px-3",iconLeft:"left-0 pl-3",iconRight:"right-0 pr-3"},lg:{input:"py-3 text-lg",icon:"h-6 w-6",padding:i?"pl-12 pr-12":"px-4",iconLeft:"left-0 pl-3.5",iconRight:"right-0 pr-3.5"}}[s],T=p.useCallback(S=>{const k=S.target.value;b||w(k),r?.(k)},[r,b]),N=p.useCallback(()=>{b||w(""),r?.("")},[r,b]);return t.jsxs("div",{className:f("relative w-full",c),children:[i&&t.jsx("div",{className:f("absolute inset-y-0 flex items-center pointer-events-none",v.iconLeft),children:t.jsx(L.MagnifyingGlassIcon,{className:f(v.icon,"text-gray-400 dark:text-gray-500")})}),t.jsx("input",{type:"text",value:m,onChange:T,placeholder:a,autoFocus:n,disabled:o||d,className:f("block w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",v.input,v.padding,o&&"opacity-50 cursor-not-allowed",d&&"opacity-60"),...g}),l&&m&&!d&&t.jsx("button",{type:"button",onClick:N,disabled:o,className:f("absolute inset-y-0 flex items-center","text-gray-400 hover:text-gray-600 dark:hover:text-gray-300","transition-colors",o?"cursor-not-allowed":"cursor-pointer",v.iconRight),"aria-label":"Clear search",children:t.jsx(L.XMarkIcon,{className:v.icon})}),d&&t.jsx("div",{className:f("absolute inset-y-0 flex items-center",v.iconRight),children:t.jsxs("svg",{className:f(v.icon,"animate-spin text-gray-400"),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[t.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),t.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})]})},Xs=({value:e,onChange:r,type:a="date",min:n,max:o,disabled:s=!1,showIcon:i=!1,placeholder:l,size:d="md",className:c,inputProps:g})=>{const w={sm:{input:"py-1.5 text-sm",icon:"h-4 w-4",padding:i?"pl-8 pr-3":"px-3",iconLeft:"left-0 pl-2.5"},md:{input:"py-2 text-base",icon:"h-5 w-5",padding:i?"pl-10 pr-4":"px-4",iconLeft:"left-0 pl-3"},lg:{input:"py-3 text-lg",icon:"h-6 w-6",padding:i?"pl-12 pr-4":"px-4",iconLeft:"left-0 pl-3.5"}}[d],m=e instanceof Date?Qs(e,a):e,b=y=>{r(y.target.value)};return t.jsxs("div",{className:f("relative",c),children:[i&&t.jsx("div",{className:f("absolute inset-y-0 flex items-center pointer-events-none",w.iconLeft),children:t.jsx(L.CalendarIcon,{className:f(w.icon,"text-gray-400 dark:text-gray-500")})}),t.jsx("input",{type:a,value:m,onChange:b,min:n,max:o,disabled:s,placeholder:l,className:f("block w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",w.input,w.padding,s&&"opacity-50 cursor-not-allowed","appearance-none","[&::-webkit-calendar-picker-indicator]:opacity-100","[&::-webkit-calendar-picker-indicator]:cursor-pointer"),...g})]})};function Qs(e,r){const a=d=>String(d).padStart(2,"0"),n=e.getFullYear(),o=a(e.getMonth()+1),s=a(e.getDate()),i=a(e.getHours()),l=a(e.getMinutes());switch(r){case"date":return`${n}-${o}-${s}`;case"time":return`${i}:${l}`;case"datetime-local":return`${n}-${o}-${s}T${i}:${l}`;case"month":return`${n}-${o}`;case"week":{const d=new Date(n,0,1),c=Math.floor((e.getTime()-d.getTime())/(1440*60*1e3)),g=Math.ceil((c+d.getDay()+1)/7);return`${n}-W${a(g)}`}default:return`${n}-${o}-${s}`}}const pa=({value:e,onChange:r,use12Hour:a=!1,minuteStep:n=1,disabled:o=!1,className:s})=>{const[i,l]=p.useState(!1),[d,c]=p.useState("12"),[g,h]=p.useState("00"),[w,m]=p.useState("AM"),b=p.useRef(null);p.useEffect(()=>{if(e){const[S,k]=e.split(":"),C=parseInt(S,10);if(a){const I=C>=12,E=C===0?12:C>12?C-12:C;c(E.toString().padStart(2,"0")),m(I?"PM":"AM")}else c(S);h(k)}},[e,a]),p.useEffect(()=>{const S=k=>{b.current&&!b.current.contains(k.target)&&l(!1)};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[]);const y=()=>{if(!e)return"";const[S,k]=e.split(":"),C=parseInt(S,10);if(a){const I=C===0?12:C>12?C-12:C,E=C>=12?"PM":"AM";return`${I}:${k} ${E}`}return`${S}:${k}`},v=(S,k,C)=>{let I=parseInt(S,10);const E=parseInt(k,10);a&&C&&(C==="PM"&&I!==12?I+=12:C==="AM"&&I===12&&(I=0));const M=`${I.toString().padStart(2,"0")}:${E.toString().padStart(2,"0")}`;r(M)},T=a?Array.from({length:12},(S,k)=>(k+1).toString().padStart(2,"0")):Array.from({length:24},(S,k)=>k.toString().padStart(2,"0")),N=Array.from({length:Math.ceil(60/n)},(S,k)=>(k*n).toString().padStart(2,"0"));return t.jsxs("div",{ref:b,className:f("relative w-full",s),children:[t.jsxs("button",{type:"button",onClick:()=>!o&&l(!i),disabled:o,className:f("w-full px-3 py-2 text-sm text-left flex items-center justify-between","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",i&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[t.jsx("span",{className:f(e?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:e?y():"Select time"}),t.jsx("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})]}),i&&t.jsx("div",{className:"absolute top-full left-0 mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:t.jsxs("div",{className:"flex gap-1 p-2",children:[t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:"Hour"}),t.jsx("div",{className:"h-48 overflow-y-auto w-16 border border-gray-200 dark:border-gray-700 rounded",children:T.map(S=>t.jsx("button",{onClick:()=>{c(S),v(S,g,a?w:void 0)},className:f("w-full px-3 py-1.5 text-sm text-center","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",S===d&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:S},S))})]}),t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:"Min"}),t.jsx("div",{className:"h-48 overflow-y-auto w-16 border border-gray-200 dark:border-gray-700 rounded",children:N.map(S=>t.jsx("button",{onClick:()=>{h(S),v(d,S,a?w:void 0)},className:f("w-full px-3 py-1.5 text-sm text-center","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",S===g&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:S},S))})]}),a&&t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:" "}),t.jsxs("div",{className:"h-48 flex flex-col justify-center gap-2 w-16",children:[t.jsx("button",{onClick:()=>{m("AM"),v(d,g,"AM")},className:f("px-3 py-2 text-sm text-center rounded","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",w==="AM"&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:"AM"}),t.jsx("button",{onClick:()=>{m("PM"),v(d,g,"PM")},className:f("px-3 py-2 text-sm text-center rounded","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",w==="PM"&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:"PM"})]})]})]})})]})},Js=[{code:"US",name:"United States",dialCode:"+1",flag:"🇺🇸"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"🇬🇧"},{code:"CA",name:"Canada",dialCode:"+1",flag:"🇨🇦"},{code:"AU",name:"Australia",dialCode:"+61",flag:"🇦🇺"},{code:"DE",name:"Germany",dialCode:"+49",flag:"🇩🇪"},{code:"FR",name:"France",dialCode:"+33",flag:"🇫🇷"},{code:"IT",name:"Italy",dialCode:"+39",flag:"🇮🇹"},{code:"ES",name:"Spain",dialCode:"+34",flag:"🇪🇸"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"🇲🇽"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"🇧🇷"},{code:"IN",name:"India",dialCode:"+91",flag:"🇮🇳"},{code:"CN",name:"China",dialCode:"+86",flag:"🇨🇳"},{code:"JP",name:"Japan",dialCode:"+81",flag:"🇯🇵"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"🇰🇷"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"🇸🇬"}],Rs=({value:e,onChange:r,country:a,onCountryChange:n,countries:o=Js,placeholder:s="Phone number",disabled:i=!1,className:l})=>{const[d,c]=p.useState(o[0]?.code||"US"),[g,h]=p.useState(!1),[w,m]=p.useState(""),b=a!==void 0?a:d,y=o.find(k=>k.code===b),v=k=>{a!==void 0&&n?n(k):c(k),h(!1),m("")},T=k=>{const C=k.replace(/\D/g,"");return y?.dialCode==="+1"?C.length<=3?C:C.length<=6?`(${C.slice(0,3)}) ${C.slice(3)}`:`(${C.slice(0,3)}) ${C.slice(3,6)}-${C.slice(6,10)}`:C},N=k=>{const C=T(k.target.value);r(C)},S=o.filter(k=>k.name.toLowerCase().includes(w.toLowerCase())||k.dialCode.includes(w)||k.code.toLowerCase().includes(w.toLowerCase()));return t.jsxs("div",{className:f("relative w-full",l),children:[t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("div",{className:"relative",children:[t.jsxs("button",{type:"button",onClick:()=>!i&&h(!g),disabled:i,className:f("flex items-center gap-2 px-3 py-2 min-w-[120px]","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",g&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[t.jsx("span",{className:"text-xl",children:y?.flag}),t.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:y?.dialCode}),t.jsx("svg",{className:f("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",g&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),g&&t.jsxs("div",{className:"absolute top-full left-0 mt-1 w-72 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:[t.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:t.jsx("input",{type:"text",value:w,onChange:k=>m(k.target.value),placeholder:"Search countries...",className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400",onClick:k=>k.stopPropagation()})}),t.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:S.length===0?t.jsx("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:"No countries found"}):S.map(k=>t.jsxs("button",{onClick:()=>v(k.code),className:f("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",k.code===b&&"bg-blue-50 dark:bg-blue-900/30"),children:[t.jsx("span",{className:"text-xl",children:k.flag}),t.jsx("span",{className:"flex-1 text-sm text-gray-900 dark:text-white",children:k.name}),t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:k.dialCode})]},k.code))})]})]}),t.jsx("input",{type:"tel",value:e,onChange:N,placeholder:s,disabled:i,className:f("flex-1 px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]}),e&&y&&t.jsxs("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:["Full number: ",y.dialCode," ",e]}),g&&t.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>h(!1)})]})},ei=({checked:e,defaultChecked:r=!1,onChange:a,label:n,description:o,disabled:s=!1,size:i="md",variant:l="primary",color:d,className:c,id:g,name:h,value:w,required:m=!1,indeterminate:b=!1,error:y=!1,errorMessage:v,icon:T})=>{const[N,S]=p.useState(r),k=e!==void 0,C=k?e:N,I={sm:{box:"w-4 h-4",check:"w-3 h-3",text:"text-sm",desc:"text-xs"},md:{box:"w-5 h-5",check:"w-4 h-4",text:"text-base",desc:"text-sm"},lg:{box:"w-6 h-6",check:"w-5 h-5",text:"text-lg",desc:"text-base"}},M=d?{blue:"primary",green:"success",yellow:"warning",red:"error"}[d]:l,x=()=>y?C?"bg-red-600 border-red-600":"border-red-600 dark:border-red-500":{primary:C?"bg-blue-600 border-blue-600":"border-gray-300 dark:border-gray-600",success:C?"bg-green-600 border-green-600":"border-gray-300 dark:border-gray-600",warning:C?"bg-yellow-600 border-yellow-600":"border-gray-300 dark:border-gray-600",error:C?"bg-red-600 border-red-600":"border-gray-300 dark:border-gray-600"}[M],P=B=>{if(s)return;const z=B.target.checked;k||S(z),a?.(z)},D=B=>{if(!s&&(B.key===" "||B.key==="Spacebar")){B.preventDefault();const z=!C;k||S(z),a?.(z)}},U=I[i];return t.jsxs("div",{className:f("inline-flex flex-col",c),children:[t.jsxs("label",{className:f("inline-flex items-start gap-2 cursor-pointer",s&&"opacity-50 cursor-not-allowed"),children:[t.jsxs("div",{className:"relative flex items-center",children:[t.jsx("input",{type:"checkbox",checked:C,defaultChecked:k?void 0:r,onChange:P,onKeyDown:D,disabled:s,id:g,name:h,value:w,required:m,className:"sr-only peer"}),t.jsx("div",{"data-indeterminate":b?"true":void 0,className:f("rounded border-2 flex items-center justify-center transition-colors bg-white dark:bg-gray-900",U.box,x(),!s&&"hover:border-opacity-75"),children:b?t.jsx(he.MinusIcon,{className:f("text-white",U.check)}):C?T||t.jsx(he.CheckIcon,{className:f("text-white",U.check)}):null})]}),(n||o)&&t.jsxs("div",{className:"flex flex-col",children:[n&&t.jsx("span",{className:f("text-gray-900 dark:text-white",U.text),children:n}),o&&t.jsx("span",{className:f("text-gray-600 dark:text-gray-400",U.desc),children:o})]})]}),v&&t.jsx("span",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:v})]})},va=Y.forwardRef(({className:e,...r},a)=>t.jsx(fr.Root,{className:f("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),...r,ref:a,children:t.jsx(fr.Thumb,{className:f("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")})}));va.displayName=fr.Root.displayName;const ri=({name:e="radio-group",value:r,onChange:a,options:n,label:o,orientation:s="vertical",disabled:i=!1,error:l=!1,errorMessage:d,required:c=!1,size:g="md",renderOption:h,className:w})=>{const m=p.useRef(null),y={sm:{radio:"w-4 h-4",label:"text-sm",description:"text-xs"},md:{radio:"w-5 h-5",label:"text-base",description:"text-sm"},lg:{radio:"w-6 h-6",label:"text-lg",description:"text-base"}}[g],v=(N,S)=>{!i&&!S&&a(N)},T=(N,S)=>{const k=n.filter(I=>!I.disabled&&!i),C=k.findIndex(I=>I.value===n[S].value);if(N.key==="ArrowDown"||N.key==="ArrowRight"){N.preventDefault();const I=(C+1)%k.length;a(k[I].value)}else if(N.key==="ArrowUp"||N.key==="ArrowLeft"){N.preventDefault();const I=(C-1+k.length)%k.length;a(k[I].value)}};return t.jsxs("div",{className:f("w-full",w),children:[o&&t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:[o,c&&t.jsx("span",{className:"text-red-600 ml-1",children:"*"})]})}),t.jsx("div",{ref:m,className:f(s==="horizontal"?"flex flex-row gap-4":"flex flex-col space-y-2"),role:"radiogroup",children:n.map((N,S)=>{const k=i||N.disabled,C=r===N.value;return t.jsxs("label",{className:f("flex items-start cursor-pointer",k&&"opacity-50 cursor-not-allowed",l&&"border-red-600 dark:border-red-500"),children:[t.jsx("input",{type:"radio",name:e,value:N.value,checked:C,onChange:()=>v(N.value,!!N.disabled),onKeyDown:I=>T(I,S),disabled:k,className:f("mt-0.5 mr-2",y.radio,"text-blue-600 bg-white dark:bg-gray-900","border-gray-300 dark:border-gray-600","focus:ring-blue-500 focus:ring-2","transition-colors",l&&"border-red-600 dark:border-red-500",k&&"cursor-not-allowed")}),t.jsx("div",{className:"flex-1 min-w-0",children:h?h(N):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:f("font-medium text-gray-700 dark:text-gray-300",y.label),children:N.label}),N.description&&t.jsx("p",{className:f("text-gray-500 dark:text-gray-400 mt-0.5",y.description),children:N.description})]})})]},N.value)})}),d&&t.jsx("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:d})]})},jr=q.Root,ti=q.Group,wa=q.Value,er=Y.forwardRef(({className:e,children:r,...a},n)=>t.jsxs(q.Trigger,{ref:n,className:f("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),...a,children:[r,t.jsx(q.Icon,{asChild:!0,children:t.jsx(Qe.ChevronDown,{className:"h-4 w-4 opacity-50 ml-2 flex-shrink-0"})})]}));er.displayName=q.Trigger.displayName;const _r=Y.forwardRef(({className:e,...r},a)=>t.jsx(q.ScrollUpButton,{ref:a,className:f("flex cursor-default items-center justify-center py-1",e),...r,children:t.jsx(Qe.ChevronUp,{className:"h-4 w-4"})}));_r.displayName=q.ScrollUpButton.displayName;const zr=Y.forwardRef(({className:e,...r},a)=>t.jsx(q.ScrollDownButton,{ref:a,className:f("flex cursor-default items-center justify-center py-1",e),...r,children:t.jsx(Qe.ChevronDown,{className:"h-4 w-4"})}));zr.displayName=q.ScrollDownButton.displayName;const rr=Y.forwardRef(({className:e,children:r,position:a="popper",...n},o)=>t.jsx(q.Portal,{children:t.jsxs(q.Content,{ref:o,className:f(_.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",a==="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:a,...n,children:[t.jsx(_r,{}),t.jsx(q.Viewport,{className:f(_.overlays.dropdown.itemContainer(),a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),t.jsx(zr,{})]})}));rr.displayName=q.Content.displayName;const ka=Y.forwardRef(({className:e,...r},a)=>t.jsx(q.Label,{ref:a,className:f(_.overlays.dropdown.header(),"py-1.5",e),...r}));ka.displayName=q.Label.displayName;const tr=Y.forwardRef(({className:e,children:r,...a},n)=>t.jsxs(q.Item,{ref:n,className:f(_.overlays.dropdown.item(),"relative select-none justify-between pr-8 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[t.jsx(q.ItemText,{children:r}),t.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:t.jsx(q.ItemIndicator,{children:t.jsx(Qe.Check,{className:"h-4 w-4"})})})]}));tr.displayName=q.Item.displayName;const xa=Y.forwardRef(({className:e,...r},a)=>t.jsx(q.Separator,{ref:a,className:f("my-1 h-px bg-gray-200 dark:bg-gray-700",e),...r}));xa.displayName=q.Separator.displayName;const ai=({options:e,value:r,onChange:a,placeholder:n="Select items...",searchPlaceholder:o="Search...",searchable:s=!0,maxDisplay:i=3,disabled:l=!1,className:d})=>{const[c,g]=p.useState(!1),[h,w]=p.useState(""),m=p.useRef(null),b=s?e.filter(k=>k.label.toLowerCase().includes(h.toLowerCase())):e,y=e.filter(k=>r.includes(k.value)),v=k=>{r.includes(k)?a(r.filter(C=>C!==k)):a([...r,k])},T=k=>{a(r.filter(C=>C!==k))};p.useEffect(()=>{const k=C=>{m.current&&!m.current.contains(C.target)&&(g(!1),w(""))};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[]);const N=y.length,S=N>i?N-i:0;return t.jsxs("div",{ref:m,className:f("relative w-full",d),children:[t.jsx("button",{type:"button",onClick:()=>!l&&g(!c),disabled:l,className:f("w-full min-h-[42px] px-3 py-2 text-sm text-left","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",c&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:t.jsx("div",{className:"flex flex-wrap gap-1.5",children:y.length===0?t.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:n}):t.jsxs(t.Fragment,{children:[y.slice(0,i).map(k=>t.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded text-xs font-medium",children:[k.label,t.jsx("button",{onClick:C=>{C.stopPropagation(),T(k.value)},className:"hover:text-blue-900 dark:hover:text-blue-100",children:t.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},k.value)),S>0&&t.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded text-xs font-medium",children:["+",S," more"]})]})})}),c&&t.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg",children:[s&&t.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:t.jsx("input",{type:"text",value:h,onChange:k=>w(k.target.value),placeholder:o,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400",onClick:k=>k.stopPropagation()})}),t.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:b.length===0?t.jsx("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:"No options found"}):b.map(k=>{const C=r.includes(k.value);return t.jsxs("button",{onClick:()=>!k.disabled&&v(k.value),disabled:k.disabled,className:f("w-full px-3 py-2 text-sm text-left flex items-center gap-2","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),children:[t.jsx("div",{className:f("w-4 h-4 border-2 rounded flex items-center justify-center",C?"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500":"border-gray-300 dark:border-gray-600"),children:C&&t.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),t.jsx("span",{className:"flex-1 text-gray-900 dark:text-white",children:k.label})]},k.value)})}),r.length>0&&t.jsxs("div",{className:"p-2 border-t border-gray-200 dark:border-gray-700 flex justify-between items-center",children:[t.jsxs("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:[r.length," selected"]}),t.jsx("button",{onClick:k=>{k.stopPropagation(),a([])},className:"text-xs text-blue-600 dark:text-blue-400 hover:underline",children:"Clear all"})]})]})]})},ni=({options:e,value:r,onChange:a,placeholder:n="Select option...",searchPlaceholder:o="Search...",emptyMessage:s="No results found.",disabled:i=!1,className:l})=>{const[d,c]=p.useState(!1),[g,h]=p.useState(""),[w,m]=p.useState(0),b=p.useRef(null),y=p.useRef(null),v=e.filter(k=>k.label.toLowerCase().includes(g.toLowerCase())),T=e.find(k=>k.value===r);p.useEffect(()=>{if(!d)return;const k=C=>{b.current&&!b.current.contains(C.target)&&(c(!1),h(""))};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[d]),p.useEffect(()=>{d&&y.current&&y.current.focus()},[d]),p.useEffect(()=>{m(0)},[g]);const N=k=>{if(!d){(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),c(!0));return}switch(k.key){case"ArrowDown":k.preventDefault(),m(C=>C<v.length-1?C+1:C);break;case"ArrowUp":k.preventDefault(),m(C=>C>0?C-1:C);break;case"Enter":k.preventDefault(),v[w]&&!v[w].disabled&&(a(v[w].value),c(!1),h(""));break;case"Escape":k.preventDefault(),c(!1),h("");break}},S=(k,C)=>{C||(a(k),c(!1),h(""))};return t.jsxs("div",{ref:b,className:f("relative w-full",l),children:[t.jsxs("button",{type:"button",onClick:()=>!i&&c(!d),onKeyDown:N,disabled:i,className:f("w-full flex items-center justify-between","px-3 py-2 text-sm text-left","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",d&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[t.jsx("span",{className:f("truncate",!T&&"text-gray-500 dark:text-gray-400"),children:T?T.label:n}),t.jsx("svg",{className:f("w-4 h-4 ml-2 transition-transform",d&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),d&&t.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg",children:[t.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:t.jsx("input",{ref:y,type:"text",value:g,onChange:k=>h(k.target.value),onKeyDown:N,placeholder:o,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"})}),t.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:v.length===0?t.jsx("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:s}):v.map((k,C)=>t.jsx("button",{onClick:()=>S(k.value,k.disabled),disabled:k.disabled,className:f("w-full px-3 py-2 text-sm text-left","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",k.value===r?"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":C===w?"bg-gray-100 dark:bg-gray-800":"hover:bg-gray-50 dark:hover:bg-gray-800"),children:k.label},k.value))})]})]})};function ar(e,r){p.useEffect(()=>{const a=n=>{const o=e?.current;!o||o.contains(n?.target||null)||r(n)};return document.addEventListener("mousedown",a),document.addEventListener("touchstart",a),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("touchstart",a)}},[e,r])}const oi=({trigger:e,items:r,align:a="right",className:n="",variant:o="default"})=>{const[s,i]=p.useState(!1),l=p.useRef(null);ar(l,()=>i(!1));const d=h=>{h.disabled||(h.onClick(),i(!1))},c=a==="left"?_.overlays.dropdown.menuRight():_.overlays.dropdown.menuLeft(),g=o==="bordered"?_.overlays.dropdown.triggerBordered():_.overlays.dropdown.trigger();return t.jsxs("div",{className:`${_.overlays.dropdown.container()} ${n}`,ref:l,children:[t.jsx("div",{className:g,onClick:()=>i(!s),children:e}),s&&t.jsx("div",{className:`${_.overlays.dropdown.menu()} ${c} ${_.overlays.dropdown.menuBottom()}`,children:t.jsx("div",{className:_.overlays.dropdown.itemContainer(),children:r.map(h=>h.separator?t.jsx("div",{className:"my-1 h-px bg-gray-200 dark:bg-gray-700",role:"separator"},h.id):t.jsxs("button",{onClick:()=>d(h),disabled:h.disabled,className:`${h.disabled?_.overlays.dropdown.itemDisabled():_.overlays.dropdown.item()} flex items-center gap-2`,children:[h.icon&&t.jsx(h.icon,{className:_.overlays.dropdown.itemIcon()}),t.jsx("span",{children:h.label})]},h.id))})})]})},si=({options:e,value:r,values:a=[],onChange:n,onValuesChange:o,multiple:s=!1,size:i="md",variant:l="default",className:d})=>{const c=(m,b)=>{if(!b)if(s){const y=a.includes(m)?a.filter(v=>v!==m):[...a,m];o?.(y)}else n?.(m)},g=m=>s?a.includes(m):r===m,h={sm:"text-xs px-2 py-1",md:"text-sm px-3 py-2",lg:"text-base px-4 py-2"},w={default:{base:"bg-gray-100 dark:bg-gray-800",button:"hover:bg-gray-200 dark:hover:bg-gray-700",selected:"bg-white dark:bg-gray-900 shadow-sm"},outline:{base:"border border-gray-200 dark:border-gray-700",button:"hover:bg-gray-50 dark:hover:bg-gray-800",selected:"bg-gray-100 dark:bg-gray-800 border-gray-300 dark:border-gray-600"}};return t.jsx("div",{className:f("inline-flex rounded-lg p-1 gap-1",w[l].base,d),role:"group",children:e.map(m=>{const b=g(m.value);return t.jsxs("button",{onClick:()=>c(m.value,m.disabled),disabled:m.disabled,className:f("inline-flex items-center justify-center gap-2","rounded-md font-medium","transition-all duration-150","disabled:opacity-50 disabled:cursor-not-allowed",h[i],b?w[l].selected:w[l].button,b?"text-gray-900 dark:text-white":"text-gray-600 dark:text-gray-400"),"aria-pressed":b,children:[m.icon&&t.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:m.icon}),m.label]},m.value)})})},ii=({value:e,onChange:r,min:a=0,max:n=100,step:o=1,disabled:s=!1,showValue:i=!1,formatValue:l=b=>String(b),showMinMax:d=!1,minLabel:c,maxLabel:g,variant:h="primary",size:w="md",className:m})=>{const b={sm:"h-1",md:"h-2",lg:"h-3"},y={primary:"accent-blue-600 dark:accent-blue-500",success:"accent-green-600 dark:accent-green-500",warning:"accent-yellow-600 dark:accent-yellow-500",danger:"accent-red-600 dark:accent-red-500"},v=N=>{r(Number(N.target.value))},T=(e-a)/(n-a)*100;return t.jsxs("div",{className:f("w-full",m),children:[i&&t.jsxs("div",{className:"flex justify-between items-center mb-2",children:[t.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:l(e)}),d&&t.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[c||a," - ",g||n]})]}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:f("absolute inset-0 rounded-full","bg-gray-200 dark:bg-gray-700",b[w])}),t.jsx("div",{className:f("absolute left-0 rounded-full transition-all","bg-current",y[h],b[w]),style:{width:`${T}%`}}),t.jsx("input",{type:"range",min:a,max:n,step:o,value:e,onChange:v,disabled:s,className:f("relative w-full appearance-none bg-transparent cursor-pointer","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500","rounded-lg",b[w],y[h],s&&"opacity-50 cursor-not-allowed","[&::-webkit-slider-thumb]:appearance-none","[&::-webkit-slider-thumb]:w-4","[&::-webkit-slider-thumb]:h-4","[&::-webkit-slider-thumb]:rounded-full","[&::-webkit-slider-thumb]:bg-white","[&::-webkit-slider-thumb]:border-2","[&::-webkit-slider-thumb]:border-current","[&::-webkit-slider-thumb]:shadow-md","[&::-webkit-slider-thumb]:transition-transform","[&::-webkit-slider-thumb]:hover:scale-110","[&::-moz-range-thumb]:w-4","[&::-moz-range-thumb]:h-4","[&::-moz-range-thumb]:rounded-full","[&::-moz-range-thumb]:bg-white","[&::-moz-range-thumb]:border-2","[&::-moz-range-thumb]:border-current","[&::-moz-range-thumb]:shadow-md","[&::-moz-range-thumb]:transition-transform","[&::-moz-range-thumb]:hover:scale-110")})]}),d&&!i&&t.jsxs("div",{className:"flex justify-between mt-1",children:[t.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:c||a}),t.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:g||n})]})]})},li=({value:e,onChange:r,min:a=0,max:n=100,step:o=1,showValue:s=!0,className:i})=>t.jsxs("div",{className:f("flex items-center gap-4",i),children:[t.jsx("input",{type:"range",min:a,max:n,step:o,value:e,onChange:l=>r(Number(l.target.value)),className:"flex-1 accent-blue-500"}),s&&t.jsx("span",{className:"w-12 text-center font-semibold text-gray-900 dark:text-white",children:e})]}),ci=({onChange:e,accept:r,multiple:a=!1,maxSize:n,maxFiles:o,disabled:s=!1,showDropZone:i=!1,showFileList:l=!0,files:d=[],onRemove:c,className:g,buttonText:h="Choose Files",dropZoneText:w="Drop files here or click to browse"})=>{const m=p.useRef(null),[b,y]=p.useState(!1),[v,T]=p.useState(null),N=P=>(T(null),o&&d.length+P.length>o?(T(`Maximum ${o} files allowed`),[]):P.filter(U=>n&&U.size>n?(T(`File "${U.name}" exceeds maximum size of ${Br(n)}`),!1):!0)),S=P=>{const D=Array.from(P.target.files||[]),U=N(D);U.length>0&&e(U),m.current&&(m.current.value="")},k=()=>{m.current?.click()},C=P=>{P.preventDefault(),P.stopPropagation(),s||y(!0)},I=P=>{P.preventDefault(),P.stopPropagation(),y(!1)},E=P=>{P.preventDefault(),P.stopPropagation()},M=P=>{if(P.preventDefault(),P.stopPropagation(),y(!1),s)return;const D=Array.from(P.dataTransfer.files),U=N(D);U.length>0&&e(U)},x=P=>{c&&c(P)};return i?t.jsxs("div",{className:f("w-full",g),children:[t.jsx("input",{ref:m,type:"file",onChange:S,accept:r,multiple:a,disabled:s,className:"hidden"}),t.jsx("div",{onClick:k,onDragEnter:C,onDragLeave:I,onDragOver:E,onDrop:M,className:f("relative border-2 border-dashed rounded-lg p-8","transition-colors duration-200","cursor-pointer",b?"border-blue-500 bg-blue-50 dark:bg-blue-900/10":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500",s&&"opacity-50 cursor-not-allowed"),children:t.jsxs("div",{className:"flex flex-col items-center justify-center space-y-3",children:[t.jsx(L.CloudArrowUpIcon,{className:"h-12 w-12 text-gray-400 dark:text-gray-500"}),t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 text-center",children:w}),n&&t.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-500",children:["Max file size: ",Br(n)]})]})}),v&&t.jsx("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:v}),l&&d.length>0&&t.jsx(Na,{files:d,onRemove:x})]}):t.jsxs("div",{className:f("w-full",g),children:[t.jsx("input",{ref:m,type:"file",onChange:S,accept:r,multiple:a,disabled:s,className:"hidden"}),t.jsxs("button",{type:"button",onClick:k,disabled:s,className:f("inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600","rounded-lg shadow-sm text-sm font-medium","text-gray-700 dark:text-gray-300","bg-white dark:bg-gray-800","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors",s&&"opacity-50 cursor-not-allowed"),children:[t.jsx(L.DocumentIcon,{className:"h-5 w-5 mr-2"}),h]}),v&&t.jsx("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:v}),l&&d.length>0&&t.jsx(Na,{files:d,onRemove:x})]})},Na=({files:e,onRemove:r})=>t.jsx("div",{className:"mt-3 space-y-2",children:e.map((a,n)=>t.jsxs("div",{className:"flex items-center justify-between p-2 bg-gray-50 dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700",children:[t.jsxs("div",{className:"flex items-center space-x-2 flex-1 min-w-0",children:[t.jsx(L.DocumentIcon,{className:"h-5 w-5 text-gray-400 flex-shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 truncate",children:a.name}),t.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:Br(a.size)})]})]}),t.jsx("button",{type:"button",onClick:()=>r(n),className:"flex-shrink-0 p-1 text-gray-400 hover:text-red-600 dark:hover:text-red-400 transition-colors","aria-label":"Remove file",children:t.jsx(L.XMarkIcon,{className:"h-5 w-5"})})]},`${a.name}-${n}`))});function Br(e){if(e===0)return"0 Bytes";const r=1024,a=["Bytes","KB","MB","GB"],n=Math.floor(Math.log(e)/Math.log(r));return Math.round(e/Math.pow(r,n)*100)/100+" "+a[n]}const di=({value:e,onChange:r,placeholder:a="Type and press Enter...",maxTags:n,validate:o,validator:s,separators:i=[],allowDuplicates:l=!1,disabled:d=!1,error:c=!1,errorMessage:g,variant:h="primary",renderTag:w,className:m})=>{const b=o||s,[y,v]=p.useState(""),T=p.useRef(null),N={primary:"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",secondary:"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300",success:"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300",warning:"bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300",error:"bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300"},S=M=>{const x=M.trim();x&&(n&&e.length>=n||!l&&e.includes(x)||b&&!b(x)||(r([...e,x]),v("")))},k=M=>{r(e.filter((x,P)=>P!==M))},C=M=>{v(M.target.value)},I=M=>{M.key==="Enter"&&(M.preventDefault(),y.trim()&&S(y)),M.key===","&&(M.preventDefault(),y.trim()&&S(y)),i.length>0&&i.includes(M.key)&&M.key!==","&&(M.preventDefault(),y.trim()&&S(y)),M.key==="Backspace"&&!y&&e.length>0&&k(e.length-1),M.key==="Escape"&&v("")},E=n!==void 0&&e.length>=n;return t.jsxs("div",{className:f("w-full",m),children:[t.jsxs("div",{className:f("min-h-[42px] px-3 py-2 flex flex-wrap gap-2 items-center","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus-within:ring-2 focus-within:ring-blue-500 dark:focus-within:ring-blue-400","transition-all",d&&"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-800",c&&"border-red-500 dark:border-red-400"),onClick:()=>!d&&T.current?.focus(),children:[e.map((M,x)=>w?t.jsx(p.Fragment,{children:w(M,x,()=>k(x))},x):t.jsxs("span",{className:f("inline-flex items-center gap-1.5 px-2.5 py-1",N[h],"text-sm font-medium","rounded-md","transition-colors"),children:[t.jsx("span",{className:"truncate max-w-[200px]",children:M}),t.jsx("button",{type:"button",onClick:P=>{P.stopPropagation(),k(x)},disabled:d,className:f("flex-shrink-0 hover:text-blue-900 dark:hover:text-blue-100","transition-colors","disabled:cursor-not-allowed"),"aria-label":`Remove ${M}`,children:t.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},x)),t.jsx("input",{ref:T,type:"text",value:y,onChange:C,onKeyDown:I,placeholder:e.length===0?a:E?`Max ${n} tags`:"",disabled:d,className:f("flex-1 min-w-[120px] outline-none bg-transparent","text-sm text-gray-900 dark:text-white","placeholder:text-gray-500 dark:placeholder:text-gray-400","disabled:cursor-not-allowed")})]}),g&&t.jsx("p",{className:"mt-1.5 text-xs text-red-600 dark:text-red-400",children:g}),n&&t.jsxs("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:[e.length," / ",n," tags"]})]})},ui=({value:e,onChange:r,mentions:a,trigger:n="@",placeholder:o="Type a message...",disabled:s=!1,className:i})=>{const[l,d]=p.useState(!1),[c,g]=p.useState([]),[h,w]=p.useState(0),[m,b]=p.useState(0),y=p.useRef(null),v=p.useRef(null),T=k=>{const C=k.target.value,I=k.target.selectionStart||0;r(C),b(I);const M=C.substring(0,I).split(/\s/),x=M[M.length-1];if(x.startsWith(n)){const P=x.substring(n.length),D=a.filter(U=>U.label.toLowerCase().includes(P.toLowerCase()));g(D),d(D.length>0),w(0)}else d(!1)},N=k=>{const C=e.substring(0,m),I=e.substring(m),E=C.split(/\s/),M=E[E.length-1],x=C.length-M.length,P=e.substring(0,x)+n+k.label+" "+I;if(r(P),d(!1),y.current){const D=x+n.length+k.label.length+1;setTimeout(()=>{y.current?.focus(),y.current?.setSelectionRange(D,D)},0)}},S=k=>{if(l)switch(k.key){case"ArrowDown":k.preventDefault(),w(C=>C<c.length-1?C+1:C);break;case"ArrowUp":k.preventDefault(),w(C=>C>0?C-1:C);break;case"Enter":k.preventDefault(),c[h]&&N(c[h]);break;case"Escape":k.preventDefault(),d(!1);break}};return p.useEffect(()=>{const k=C=>{v.current&&!v.current.contains(C.target)&&y.current&&!y.current.contains(C.target)&&d(!1)};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[]),t.jsxs("div",{className:f("relative w-full",i),children:[t.jsx("textarea",{ref:y,value:e,onChange:T,onKeyDown:S,placeholder:o,disabled:s,className:f("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed","resize-none","min-h-[100px]")}),l&&t.jsx("div",{ref:v,className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg max-h-60 overflow-y-auto",children:c.map((k,C)=>t.jsxs("button",{onClick:()=>N(k),className:f("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",C===h&&"bg-blue-50 dark:bg-blue-900/30"),children:[k.avatar&&t.jsx("img",{src:k.avatar,alt:k.label,className:"w-8 h-8 rounded-full"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:k.label}),k.metadata&&t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:k.metadata})]})]},k.id))})]})},gi=X.cva(`${O.label.default()} peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),Wr=Y.forwardRef(({className:e,...r},a)=>t.jsx(ft.Root,{ref:a,className:f(gi(),e),...r}));Wr.displayName=ft.Root.displayName;const hi=({id:e,label:r,type:a="text",value:n,onChange:o,placeholder:s,helperText:i,error:l,required:d=!1,disabled:c=!1,maxLength:g,autoFocus:h=!1,className:w,inputClassName:m})=>{const b=!!l,y=i||l?`${e}-helper`:void 0;return t.jsxs("div",{className:f("space-y-2",w),children:[t.jsxs(Wr,{htmlFor:e,children:[r,d&&t.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),t.jsx(Re,{type:a,id:e,value:n,onChange:o,placeholder:s,disabled:c,maxLength:g,autoFocus:h,required:d,"aria-invalid":b,"aria-describedby":y,className:m}),(i||l)&&t.jsx("p",{id:y,className:f(O.body.sm(),b?"text-red-600 dark:text-red-400":"text-gray-500 dark:text-gray-400"),role:b?"alert":void 0,children:l||i})]})},nr=({label:e,required:r=!1,error:a,helpText:n,children:o,layout:s="vertical",className:i="",labelClassName:l="",contentClassName:d=""})=>{const c=s==="horizontal";return t.jsxs("div",{className:`${c?"grid grid-cols-1 md:grid-cols-3 gap-4 items-start":"space-y-2"} ${i}`,children:[t.jsxs("div",{className:c?"md:col-span-1":"",children:[t.jsxs("label",{className:`block text-sm font-medium text-gray-700 dark:text-gray-300 ${l}`,children:[e,r&&t.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),n&&!a&&t.jsxs("div",{className:"mt-1 flex items-start",children:[t.jsx(L.InformationCircleIcon,{className:"h-4 w-4 text-gray-400 mr-1 mt-0.5 flex-shrink-0"}),t.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:n})]})]}),t.jsxs("div",{className:`${c?"md:col-span-2":""} ${d}`,children:[t.jsx("div",{className:a?"relative":"",children:o}),a&&t.jsxs("div",{className:"mt-1 flex items-start",children:[t.jsx(L.ExclamationCircleIcon,{className:"h-4 w-4 text-red-500 mr-1 mt-0.5 flex-shrink-0"}),t.jsx("p",{className:"text-xs text-red-600 dark:text-red-400",children:a})]})]})]})},fi=({label:e,value:r,onChange:a,placeholder:n,required:o=!1,error:s,helpText:i,type:l="text",layout:d="vertical",className:c=""})=>t.jsx(nr,{label:e,required:o,error:s,helpText:i,layout:d,className:c,children:t.jsx("input",{type:l,value:r,onChange:g=>a(g.target.value),placeholder:n,className:`
|
|
12
|
+
`})]})},Fo=({message:e="Loading...",size:r="default",fullScreen:a=!1,variant:n="default",className:o})=>{const i={small:{spinner:"small",text:"text-sm"},default:{spinner:"default",text:"text-base"},large:{spinner:"large",text:"text-lg"}}[r],l=a?"fixed inset-0 z-50 flex items-center justify-center bg-white/80 dark:bg-gray-900/80":"flex flex-col items-center justify-center p-8",d=t.jsxs("div",{className:f(l,o),children:[t.jsx(Be,{size:i.spinner,variant:n,className:"mb-4"}),e&&t.jsx("p",{className:f(i.text,"text-gray-600 dark:text-gray-400 text-center max-w-sm"),children:e})]});return a?t.jsx("div",{className:"fixed inset-0 z-50 bg-white/80 dark:bg-gray-900/80 backdrop-blur-sm",children:t.jsxs("div",{className:"flex items-center justify-center min-h-full p-4",children:[t.jsx(Be,{size:i.spinner,variant:n,className:"mb-4"}),e&&t.jsx("p",{className:"text-center text-gray-600 dark:text-gray-400 max-w-sm",children:e})]})}):d},Vo=({variant:e="text",width:r,height:a,className:n,count:o,lines:s=1,animate:i=!0,borderRadius:l,theme:d,spacing:c,gap:g="md"})=>{const h={text:"h-4 rounded",circle:"rounded-full",rectangle:"rounded-lg",avatar:"w-10 h-10 rounded-full",button:"h-10 rounded-lg"},w={light:"bg-gray-200",dark:"bg-gray-700"},m={sm:"space-y-1",md:"space-y-2",lg:"space-y-3"},b=o??s,y=p=>{const T={};return r&&(T.width=typeof r=="number"?`${r}px`:r),a&&(T.height=typeof a=="number"?`${a}px`:a),l&&(T.borderRadius=l),t.jsx("div",{className:f(i&&"animate-pulse",d?w[d]:"bg-gray-200 dark:bg-gray-700",h[e],n),style:T},p)};if(b>1){const p=c!==void 0?`space-y-${c}`:m[g];return t.jsx("div",{className:f(p),children:Array.from({length:b}).map((T,N)=>y(N))})}return y()},$o={info:L.InformationCircleIcon,success:L.CheckCircleIcon,warning:L.ExclamationTriangleIcon,attention:L.BellAlertIcon,error:L.XCircleIcon},qo=({children:e,className:r})=>t.jsx("div",{className:f("font-medium mb-1",r),children:e}),Ho=({children:e,className:r})=>t.jsx("div",{className:f("text-sm break-words",r),children:e}),pr=({variant:e="info",title:r,description:a,icon:n,children:o,className:s})=>{const i=$o[e],l=n||t.jsx(i,{className:"h-5 w-5"}),d=typeof _.alert[e]=="function"?_.alert[e]():"";return t.jsxs("div",{role:"alert",className:f(d,s),children:[l&&t.jsx("div",{className:"flex-shrink-0",children:l}),t.jsxs("div",{className:"flex-1 min-w-0",children:[r&&t.jsx("div",{className:"font-medium mb-1 break-words",children:r}),a&&t.jsx("div",{className:"text-sm break-words",children:a}),o]})]})},Go=({message:e,variant:r="info",dismissible:a=!1,onDismiss:n,className:o})=>{const s={info:"bg-blue-100 dark:bg-blue-900/20 text-blue-800 dark:text-blue-300 border-blue-300 dark:border-blue-700",success:"bg-green-100 dark:bg-green-900/20 text-green-800 dark:text-green-300 border-green-300 dark:border-green-700",warning:"bg-yellow-100 dark:bg-yellow-900/20 text-yellow-800 dark:text-yellow-300 border-yellow-300 dark:border-yellow-700",error:"bg-red-100 dark:bg-red-900/20 text-red-800 dark:text-red-300 border-red-300 dark:border-red-700"};return t.jsxs("div",{className:f("p-4 border rounded-lg flex items-center justify-between",s[r],o),children:[t.jsx("span",{children:e}),a&&t.jsx("button",{onClick:n,className:"ml-4 font-bold",children:"×"})]})},pt=v.createContext(void 0),Yo=()=>{const e=v.useContext(pt);if(!e)throw new Error("useToast must be used within ToastProvider");return e},vt=({toast:e,onRemove:r})=>{const{id:a,title:n,description:o,variant:s="default",action:i}=e,l={default:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",success:"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800",error:"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800",warning:"bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800",info:"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800"},d={default:"text-gray-600 dark:text-gray-400",success:"text-green-600 dark:text-green-400",error:"text-red-600 dark:text-red-400",warning:"text-yellow-600 dark:text-yellow-400",info:"text-blue-600 dark:text-blue-400"},c={default:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})}),success:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),error:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),warning:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),info:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})};return t.jsxs("div",{className:f("flex items-start gap-3 p-4 rounded-lg border shadow-lg","animate-in slide-in-from-top-2 fade-in duration-300","max-w-md w-full",l[s]),children:[t.jsx("div",{className:f("flex-shrink-0",d[s]),children:c[s]}),t.jsxs("div",{className:"flex-1 min-w-0",children:[n&&t.jsx("p",{className:"font-semibold text-gray-900 dark:text-white",children:n}),o&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 mt-1",children:o}),i&&t.jsx("button",{onClick:i.onClick,className:"text-sm font-medium text-blue-600 dark:text-blue-400 hover:underline mt-2",children:i.label})]}),t.jsx("button",{onClick:()=>r(a),className:"flex-shrink-0 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close notification",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},Ko=({toast:e,onRemove:r})=>(v.useEffect(()=>{const a=e.duration??5e3;if(a>0){const n=setTimeout(()=>{r(e.id)},a);return()=>clearTimeout(n)}},[e.id,e.duration,r]),t.jsx(vt,{toast:e,onRemove:r})),Zo=({children:e})=>{const[r,a]=v.useState([]),n=v.useCallback(s=>{a(i=>i.filter(l=>l.id!==s))},[]),o=v.useCallback(s=>{const i=Math.random().toString(36).substr(2,9);a(l=>[...l,{...s,id:i}])},[]);return t.jsxs(pt.Provider,{value:{toasts:r,addToast:o,removeToast:n},children:[e,t.jsx("div",{className:"fixed top-4 right-4 z-50 flex flex-col gap-2 pointer-events-none",children:t.jsx("div",{className:"pointer-events-auto",children:r.map(s=>t.jsx("div",{className:"mb-2",children:t.jsx(Ko,{toast:s,onRemove:n})},s.id))})})]})},Xo=({message:e,variant:r="info",onClose:a,className:n})=>{const o={info:"bg-blue-500",success:"bg-green-500",warning:"bg-yellow-500",error:"bg-red-500"};return t.jsxs("div",{className:f("fixed bottom-4 right-4 p-4 rounded-lg text-white shadow-lg flex items-center gap-3",o[r],n),children:[t.jsx("span",{children:e}),a&&t.jsx("button",{onClick:a,className:"ml-4",children:"×"})]})},Qo=({count:e,maxCount:r=99,variant:a="danger",className:n})=>{const o=e>r?`${r}+`:e,s={default:"bg-gray-500",primary:"bg-blue-500",danger:"bg-red-500"};return t.jsx("span",{className:f("inline-flex items-center justify-center px-2 py-1 text-xs font-bold text-white rounded-full",s[a],n),children:o})},Jo=({notifications:e,onMarkAsRead:r,className:a})=>t.jsx("div",{className:f("bg-white dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-700 p-4 max-h-96 overflow-y-auto",a),children:e.map(n=>t.jsxs("div",{className:f("p-3 rounded mb-2",n.read?"bg-transparent":"bg-blue-50 dark:bg-blue-900/20"),onClick:()=>r?.(n.id),children:[t.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white",children:n.title}),t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:n.message}),t.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:n.timestamp})]},n.id))}),Ro=({children:e,variant:r="default",size:a="sm",icon:n,dot:o=!1,pill:s=!1,outline:i=!1,onClick:l,dismissible:d=!1,onDismiss:c,count:g,maxCount:h,className:w})=>{const m={default:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",primary:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400",warning:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400",danger:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400",info:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",purple:"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-400"},b={default:"border border-gray-300 text-gray-700 dark:border-gray-600 dark:text-gray-300",primary:"border border-blue-600 text-blue-600 dark:border-blue-400 dark:text-blue-400",success:"border border-green-600 text-green-600 dark:border-green-400 dark:text-green-400",warning:"border border-yellow-600 text-yellow-600 dark:border-yellow-400 dark:text-yellow-400",danger:"border border-red-600 text-red-600 dark:border-red-400 dark:text-red-400",info:"border border-blue-600 text-blue-600 dark:border-blue-400 dark:text-blue-400",purple:"border border-purple-600 text-purple-600 dark:border-purple-400 dark:text-purple-400"},y={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},p={sm:"h-3 w-3",md:"h-3.5 w-3.5",lg:"h-4 w-4"},T={default:"bg-gray-600 dark:bg-gray-400",primary:"bg-blue-600 dark:bg-blue-400",success:"bg-green-600 dark:bg-green-400",warning:"bg-yellow-600 dark:bg-yellow-400",danger:"bg-red-600 dark:bg-red-400",info:"bg-blue-600 dark:bg-blue-400",purple:"bg-purple-600 dark:bg-purple-400"},N=g!==void 0?h!==void 0&&g>h?`${h}+`:g.toString():null,C=t.jsxs(t.Fragment,{children:[o&&t.jsx("span",{className:f("h-2 w-2 rounded-full mr-1.5",T[r])}),n&&t.jsx("span",{className:f(p[a],"mr-1"),children:n}),e,N&&t.jsx("span",{className:"ml-1",children:N}),d&&c&&t.jsx("button",{onClick:S=>{S.stopPropagation(),c()},className:"ml-1 hover:bg-black/10 dark:hover:bg-white/10 rounded-full p-0.5","aria-label":"Dismiss",children:t.jsx(fe.XMarkIcon,{className:f(p[a])})})]}),k=l?"button":"span";return t.jsx(k,{onClick:l,className:f("inline-flex items-center font-medium",i?b[r]:m[r],y[a],s?"rounded-full":"rounded",l&&"cursor-pointer hover:opacity-80",w),children:C})},es=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UbadgeUdesigner",children:r||"UbadgeUdesigner Component"});var ye={},pe={},vr={},wt;function rs(){return wt||(wt=1,Object.defineProperty(vr,"__esModule",{value:!0})),vr}var wr={},F={},kt;function ts(){if(kt)return F;kt=1,Object.defineProperty(F,"__esModule",{value:!0}),F.isIndexerErrorResponse=e,F.isIndexerSuccessResponse=r,F.isAddressValidationResponse=a,F.isEmailAccountsResponse=n,F.isRewardsResponse=o,F.isDelegatedToResponse=s,F.isDelegatedFromResponse=i,F.isNonceResponse=l,F.isEntitlementResponse=d,F.isSignInMessageResponse=c,F.isPointsResponse=g,F.isLeaderboardResponse=h,F.isSiteStatsResponse=w,F.isTemplateResponse=m,F.isTemplateListResponse=b,F.isTemplateDeleteResponse=y,F.isWebhookResponse=p,F.isWebhookListResponse=T,F.isWebhookDeleteResponse=N,F.isReferralCodeResponse=C,F.isReferralStatsResponse=k,F.isAuthenticationStatusResponse=S,F.isBlockStatusResponse=I,F.isNameServiceResponse=E,F.isNameResolutionResponse=M;function e(x){return!!(x&&typeof x=="object"&&"error"in x&&"success"in x&&!x.success)}function r(x){return!!(x&&typeof x=="object"&&"success"in x&&x.success===!0&&"data"in x)}function a(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&("name"in x.data||"wallet"in x.data))}function n(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"accounts"in x.data&&Array.isArray(x.data.accounts))}function o(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"rewards"in x.data&&"records"in x.data&&"points"in x.data)}function s(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"walletAddress"in x.data&&"chainType"in x.data)}function i(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"from"in x.data&&Array.isArray(x.data.from))}function l(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"nonce"in x.data)}function d(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"entitlement"in x.data&&"verified"in x.data)}function c(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"message"in x.data&&"walletAddress"in x.data)}function g(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"pointsEarned"in x.data&&"walletAddress"in x.data)}function h(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"leaderboard"in x.data)}function w(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"totalPoints"in x.data)}function m(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"template"in x.data&&"verified"in x.data&&x.data.template&&typeof x.data.template=="object"&&"id"in x.data.template&&"name"in x.data.template&&"subject"in x.data.template&&"body"in x.data.template)}function b(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"templates"in x.data&&"total"in x.data&&"hasMore"in x.data&&"verified"in x.data&&Array.isArray(x.data.templates))}function y(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"message"in x.data&&"verified"in x.data)}function p(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"webhook"in x.data&&"verified"in x.data&&x.data.webhook&&typeof x.data.webhook=="object"&&"id"in x.data.webhook&&"webhookUrl"in x.data.webhook)}function T(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"webhooks"in x.data&&"total"in x.data&&"hasMore"in x.data&&"verified"in x.data&&Array.isArray(x.data.webhooks))}function N(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"message"in x.data&&"verified"in x.data)}function C(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"walletAddress"in x.data&&"referralCode"in x.data&&"createdAt"in x.data)}function k(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"total"in x.data&&"consumptions"in x.data&&Array.isArray(x.data.consumptions))}function S(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"authenticated"in x.data&&typeof x.data.authenticated=="boolean")}function I(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"chains"in x.data&&"totalChains"in x.data&&"activeChains"in x.data&&"timestamp"in x.data&&Array.isArray(x.data.chains))}function E(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"names"in x.data&&Array.isArray(x.data.names))}function M(x){return!!(x&&typeof x=="object"&&"success"in x&&"data"in x&&x.data&&typeof x.data=="object"&&"walletAddress"in x.data&&"chainType"in x.data)}return F}var xt;function as(){return xt||(xt=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isIndexerSuccessResponse=e.isIndexerErrorResponse=e.isWebhookDeleteResponse=e.isWebhookListResponse=e.isWebhookResponse=e.isTemplateDeleteResponse=e.isTemplateListResponse=e.isTemplateResponse=e.isNameResolutionResponse=e.isNameServiceResponse=e.isBlockStatusResponse=e.isAuthenticationStatusResponse=e.isReferralStatsResponse=e.isReferralCodeResponse=e.isSiteStatsResponse=e.isLeaderboardResponse=e.isPointsResponse=e.isSignInMessageResponse=e.isEntitlementResponse=e.isNonceResponse=e.isDelegatedFromResponse=e.isDelegatedToResponse=e.isRewardsResponse=e.isEmailAccountsResponse=e.isAddressValidationResponse=void 0;var r=ts();Object.defineProperty(e,"isAddressValidationResponse",{enumerable:!0,get:function(){return r.isAddressValidationResponse}}),Object.defineProperty(e,"isEmailAccountsResponse",{enumerable:!0,get:function(){return r.isEmailAccountsResponse}}),Object.defineProperty(e,"isRewardsResponse",{enumerable:!0,get:function(){return r.isRewardsResponse}}),Object.defineProperty(e,"isDelegatedToResponse",{enumerable:!0,get:function(){return r.isDelegatedToResponse}}),Object.defineProperty(e,"isDelegatedFromResponse",{enumerable:!0,get:function(){return r.isDelegatedFromResponse}}),Object.defineProperty(e,"isNonceResponse",{enumerable:!0,get:function(){return r.isNonceResponse}}),Object.defineProperty(e,"isEntitlementResponse",{enumerable:!0,get:function(){return r.isEntitlementResponse}}),Object.defineProperty(e,"isSignInMessageResponse",{enumerable:!0,get:function(){return r.isSignInMessageResponse}}),Object.defineProperty(e,"isPointsResponse",{enumerable:!0,get:function(){return r.isPointsResponse}}),Object.defineProperty(e,"isLeaderboardResponse",{enumerable:!0,get:function(){return r.isLeaderboardResponse}}),Object.defineProperty(e,"isSiteStatsResponse",{enumerable:!0,get:function(){return r.isSiteStatsResponse}}),Object.defineProperty(e,"isReferralCodeResponse",{enumerable:!0,get:function(){return r.isReferralCodeResponse}}),Object.defineProperty(e,"isReferralStatsResponse",{enumerable:!0,get:function(){return r.isReferralStatsResponse}}),Object.defineProperty(e,"isAuthenticationStatusResponse",{enumerable:!0,get:function(){return r.isAuthenticationStatusResponse}}),Object.defineProperty(e,"isBlockStatusResponse",{enumerable:!0,get:function(){return r.isBlockStatusResponse}}),Object.defineProperty(e,"isNameServiceResponse",{enumerable:!0,get:function(){return r.isNameServiceResponse}}),Object.defineProperty(e,"isNameResolutionResponse",{enumerable:!0,get:function(){return r.isNameResolutionResponse}}),Object.defineProperty(e,"isTemplateResponse",{enumerable:!0,get:function(){return r.isTemplateResponse}}),Object.defineProperty(e,"isTemplateListResponse",{enumerable:!0,get:function(){return r.isTemplateListResponse}}),Object.defineProperty(e,"isTemplateDeleteResponse",{enumerable:!0,get:function(){return r.isTemplateDeleteResponse}}),Object.defineProperty(e,"isWebhookResponse",{enumerable:!0,get:function(){return r.isWebhookResponse}}),Object.defineProperty(e,"isWebhookListResponse",{enumerable:!0,get:function(){return r.isWebhookListResponse}}),Object.defineProperty(e,"isWebhookDeleteResponse",{enumerable:!0,get:function(){return r.isWebhookDeleteResponse}}),Object.defineProperty(e,"isIndexerErrorResponse",{enumerable:!0,get:function(){return r.isIndexerErrorResponse}}),Object.defineProperty(e,"isIndexerSuccessResponse",{enumerable:!0,get:function(){return r.isIndexerSuccessResponse}})})(wr)),wr}var kr={},j={},ae={},Nt;function Ct(){if(Nt)return ae;Nt=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.isWildduckMessage=ae.isWildduckAuthResponse=ae.MailboxSpecialUse=void 0,ae.createPreAuthRequest=e,ae.createAuthenticateRequest=r;function e(s,i){return{username:s,scope:"master",...i}}function r(s,i,l,d){return{username:s,...i&&{signature:i},...l&&{message:l},protocol:"API",scope:"master",token:!1,...d}}var a;(function(s){s.Inbox="\\Inbox",s.Sent="\\Sent",s.Trash="\\Trash",s.Drafts="\\Drafts",s.Junk="\\Junk",s.Settings="\\App.Settings",s.Developer="\\App.Developer"})(a||(ae.MailboxSpecialUse=a={}));const n=s=>typeof s=="object"&&s!==null&&"success"in s&&typeof s.success=="boolean";ae.isWildduckAuthResponse=n;const o=s=>typeof s=="object"&&s!==null&&"id"in s&&"subject"in s&&typeof s.id=="number"&&typeof s.subject=="string";return ae.isWildduckMessage=o,ae}var St;function ve(){if(St)return j;St=1,Object.defineProperty(j,"__esModule",{value:!0}),j.Currency=j.ErrorType=j.FeatureFlag=j.EmailValidationState=j.PlatformType=j.ConnectionState=j.ConnectionType=j.EmailSortCriteria=j.SortOrder=j.EmailAddressType=j.NotificationType=j.RequestStatus=j.SubscriptionAction=j.EmailAction=j.MediumView=j.MobileView=j.EmailComposeType=j.EmailFolderUtils=j.FontSize=j.Theme=j.Chain=j.ChainType=j.AuthStatus=void 0;const e=Ct();var r;(function(E){E.CONNECTED="connected",E.DISCONNECTED="disconnected",E.VERIFIED="verified"})(r||(j.AuthStatus=r={}));var a;(function(E){E.EVM="evm",E.SOLANA="solana"})(a||(j.ChainType=a={}));var n;(function(E){E.ETH_MAINNET="eth-mainnet",E.ETH_SEPOLIA="eth-sepolia",E.ETH_GOERLI="eth-goerli",E.POLYGON_MAINNET="polygon-mainnet",E.POLYGON_MUMBAI="polygon-mumbai",E.POLYGON_AMOY="polygon-amoy",E.OPTIMISM_MAINNET="optimism-mainnet",E.OPTIMISM_SEPOLIA="optimism-sepolia",E.OPTIMISM_GOERLI="optimism-goerli",E.ARBITRUM_MAINNET="arbitrum-mainnet",E.ARBITRUM_SEPOLIA="arbitrum-sepolia",E.ARBITRUM_GOERLI="arbitrum-goerli",E.BASE_MAINNET="base-mainnet",E.BASE_SEPOLIA="base-sepolia",E.BASE_GOERLI="base-goerli",E.AVALANCHE_MAINNET="avalanche-mainnet",E.AVALANCHE_FUJI="avalanche-fuji",E.BNB_MAINNET="bnb-mainnet",E.BNB_TESTNET="bnb-testnet",E.GNOSIS_MAINNET="gnosis-mainnet",E.GNOSIS_CHIADO="gnosis-chiado",E.CELO_MAINNET="celo-mainnet",E.CELO_ALFAJORES="celo-alfajores",E.ZKSYNC_MAINNET="zksync-mainnet",E.ZKSYNC_SEPOLIA="zksync-sepolia",E.LINEA_MAINNET="linea-mainnet",E.LINEA_SEPOLIA="linea-sepolia",E.SCROLL_MAINNET="scroll-mainnet",E.SCROLL_SEPOLIA="scroll-sepolia",E.MONAD_MAINNET="monad-mainnet",E.MONAD_TESTNET="monad-testnet",E.STORY_MAINNET="story-mainnet",E.STORY_TESTNET="story-testnet",E.PLUME_MAINNET="plume-mainnet",E.PLUME_TESTNET="plume-testnet",E.NEXUS_MAINNET="nexus-mainnet",E.NEXUS_TESTNET="nexus-testnet",E.HYPEREVM_MAINNET="hyperevm-mainnet",E.HYPEREVM_TESTNET="hyperevm-testnet",E.SONIC_MAINNET="sonic-mainnet",E.SONIC_TESTNET="sonic-testnet",E.SONIC_BLAZE="sonic-blaze",E.UNICHAIN_MAINNET="unichain-mainnet",E.UNICHAIN_SEPOLIA="unichain-sepolia",E.WORLD_MAINNET="world-mainnet",E.XDC_MAINNET="xdc-mainnet",E.INK_TESTNET="ink-testnet",E.FETCH_MAINNET="fetch-mainnet",E.FETCH_TESTNET="fetch-testnet",E.GENSYN_MAINNET="gensyn-mainnet",E.GENSYN_TESTNET="gensyn-testnet",E.RITUAL_MAINNET="ritual-mainnet",E.RITUAL_TESTNET="ritual-testnet",E.SOLANA_MAINNET="solana-mainnet",E.SOLANA_DEVNET="solana-devnet",E.SOLANA_TESTNET="solana-testnet",E.EVM_LOCAL="evm-local",E.SOLANA_LOCAL="solana-local"})(n||(j.Chain=n={}));var o;(function(E){E.LIGHT="light",E.DARK="dark",E.SYSTEM="system"})(o||(j.Theme=o={}));var s;(function(E){E.SMALL="small",E.MEDIUM="medium",E.LARGE="large"})(s||(j.FontSize=s={})),j.EmailFolderUtils={isStandardFolder(E){return Object.values(e.MailboxSpecialUse).includes(E)},getStandardFolders(){return Object.values(e.MailboxSpecialUse)},isCustomFolder(E){return!this.isStandardFolder(E)},displayName(E){return E.charAt(0).toUpperCase()+E.slice(1)}};var i;(function(E){E.NEW="new",E.REPLY="reply",E.REPLY_ALL="replyAll",E.FORWARD="forward"})(i||(j.EmailComposeType=i={}));var l;(function(E){E.EMAIL_ADDRESSES="emailAddresses",E.FOLDERS="folders",E.EMAILS="emails",E.EMAIL_BODY="emailBody"})(l||(j.MobileView=l={}));var d;(function(E){E.LEFT="left",E.RIGHT="right"})(d||(j.MediumView=d={}));var c;(function(E){E.OPEN="open",E.REPLY="reply",E.FORWARD="forward",E.DELETE="delete",E.STAR="star",E.UNSTAR="unstar",E.MARK_READ="mark_read",E.MARK_UNREAD="mark_unread"})(c||(j.EmailAction=c={}));var g;(function(E){E.VIEW="view",E.PURCHASE="purchase",E.CANCEL="cancel",E.RESTORE="restore"})(g||(j.SubscriptionAction=g={}));var h;(function(E){E.IDLE="idle",E.LOADING="loading",E.SUCCESS="success",E.ERROR="error"})(h||(j.RequestStatus=h={}));var w;(function(E){E.INFO="info",E.SUCCESS="success",E.WARNING="warning",E.ERROR="error"})(w||(j.NotificationType=w={}));var m;(function(E){E.DIRECT="direct",E.ENS="ens",E.SNS="sns",E.CUSTOM="custom"})(m||(j.EmailAddressType=m={}));var b;(function(E){E.ASC="asc",E.DESC="desc"})(b||(j.SortOrder=b={}));var y;(function(E){E.DATE="date",E.SUBJECT="subject",E.FROM="from",E.SIZE="size"})(y||(j.EmailSortCriteria=y={}));var p;(function(E){E.UNKNOWN="unknown",E.NONE="none",E.WIFI="wifi",E.CELLULAR_2G="2g",E.CELLULAR_3G="3g",E.CELLULAR_4G="4g",E.CELLULAR_5G="5g",E.ETHERNET="ethernet"})(p||(j.ConnectionType=p={}));var T;(function(E){E.UNKNOWN="unknown",E.DISCONNECTED="disconnected",E.CONNECTING="connecting",E.CONNECTED="connected",E.RECONNECTING="reconnecting",E.VERIFIED="verified",E.LIMITED="limited",E.ERROR="error"})(T||(j.ConnectionState=T={}));var N;(function(E){E.WEB="web",E.REACT_NATIVE="react_native",E.DESKTOP="desktop"})(N||(j.PlatformType=N={}));var C;(function(E){E.VALID="valid",E.INVALID="invalid",E.PENDING="pending",E.UNKNOWN="unknown"})(C||(j.EmailValidationState=C={}));var k;(function(E){E.AI_SEARCH="ai_search",E.SMART_COMPOSE="smart_compose",E.ADVANCED_FILTERS="advanced_filters",E.DARK_MODE="dark_mode",E.NOTIFICATIONS="notifications",E.ANALYTICS="analytics"})(k||(j.FeatureFlag=k={}));var S;(function(E){E.NETWORK="network",E.AUTH="auth",E.VALIDATION="validation",E.PERMISSION="permission",E.UNKNOWN="unknown"})(S||(j.ErrorType=S={}));var I;return(function(E){E.USD="USD",E.EUR="EUR",E.GBP="GBP",E.CAD="CAD",E.AUD="AUD"})(I||(j.Currency=I={})),j}var xr={},Et;function ns(){return Et||(Et=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getWalletConnectionState=e.isWalletVerified=e.isWalletConnected=void 0;const r=ve(),a=s=>s!=null&&!!s.walletAddress;e.isWalletConnected=a;const n=s=>(0,e.isWalletConnected)(s)&&!!s.message&&!!s.signature;e.isWalletVerified=n;const o=s=>(0,e.isWalletConnected)(s)?(0,e.isWalletVerified)(s)?r.ConnectionState.VERIFIED:r.ConnectionState.CONNECTED:r.ConnectionState.DISCONNECTED;e.getWalletConnectionState=o})(xr)),xr}var Tt;function os(){return Tt||(Tt=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.FontSize=e.FeatureFlag=e.ErrorType=e.EmailValidationState=e.EmailSortCriteria=e.EmailFolderUtils=e.EmailComposeType=e.EmailAddressType=e.EmailAction=e.Currency=e.ConnectionType=e.ConnectionState=e.ChainType=e.Chain=e.AuthStatus=void 0;var r=ve();Object.defineProperty(e,"AuthStatus",{enumerable:!0,get:function(){return r.AuthStatus}}),Object.defineProperty(e,"Chain",{enumerable:!0,get:function(){return r.Chain}}),Object.defineProperty(e,"ChainType",{enumerable:!0,get:function(){return r.ChainType}}),Object.defineProperty(e,"ConnectionState",{enumerable:!0,get:function(){return r.ConnectionState}}),Object.defineProperty(e,"ConnectionType",{enumerable:!0,get:function(){return r.ConnectionType}}),Object.defineProperty(e,"Currency",{enumerable:!0,get:function(){return r.Currency}}),Object.defineProperty(e,"EmailAction",{enumerable:!0,get:function(){return r.EmailAction}}),Object.defineProperty(e,"EmailAddressType",{enumerable:!0,get:function(){return r.EmailAddressType}}),Object.defineProperty(e,"EmailComposeType",{enumerable:!0,get:function(){return r.EmailComposeType}}),Object.defineProperty(e,"EmailFolderUtils",{enumerable:!0,get:function(){return r.EmailFolderUtils}}),Object.defineProperty(e,"EmailSortCriteria",{enumerable:!0,get:function(){return r.EmailSortCriteria}}),Object.defineProperty(e,"EmailValidationState",{enumerable:!0,get:function(){return r.EmailValidationState}}),Object.defineProperty(e,"ErrorType",{enumerable:!0,get:function(){return r.ErrorType}}),Object.defineProperty(e,"FeatureFlag",{enumerable:!0,get:function(){return r.FeatureFlag}}),Object.defineProperty(e,"FontSize",{enumerable:!0,get:function(){return r.FontSize}}),Object.defineProperty(e,"MediumView",{enumerable:!0,get:function(){return r.MediumView}}),Object.defineProperty(e,"MobileView",{enumerable:!0,get:function(){return r.MobileView}}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(e,"PlatformType",{enumerable:!0,get:function(){return r.PlatformType}}),Object.defineProperty(e,"RequestStatus",{enumerable:!0,get:function(){return r.RequestStatus}}),Object.defineProperty(e,"SortOrder",{enumerable:!0,get:function(){return r.SortOrder}}),Object.defineProperty(e,"SubscriptionAction",{enumerable:!0,get:function(){return r.SubscriptionAction}}),Object.defineProperty(e,"Theme",{enumerable:!0,get:function(){return r.Theme}});var a=ns();Object.defineProperty(e,"getWalletConnectionState",{enumerable:!0,get:function(){return a.getWalletConnectionState}}),Object.defineProperty(e,"isWalletConnected",{enumerable:!0,get:function(){return a.isWalletConnected}}),Object.defineProperty(e,"isWalletVerified",{enumerable:!0,get:function(){return a.isWalletVerified}})})(kr)),kr}var Nr={},J={},At;function Cr(){if(At)return J;At=1,Object.defineProperty(J,"__esModule",{value:!0}),J.PROTOCOL_CONSTANTS=J.TransactionStatus=J.MessageType=void 0,J.isSolanaAddress=a,J.isEvmAddress=n,J.isSolanaRecipient=o,J.isEvmRecipient=s;var e;(function(i){i.STANDARD="standard",i.PRIORITY="priority",i.PREPARED_STANDARD="prepared_standard",i.PREPARED_PRIORITY="prepared_priority"})(e||(J.MessageType=e={}));var r;(function(i){i.SUCCESS="success",i.FAILED="failed",i.PENDING="pending"})(r||(J.TransactionStatus=r={}));function a(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 a(i)}function s(i){return n(i)}return J.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}},J}var we={},R={},It;function Mt(){if(It)return R;It=1,Object.defineProperty(R,"__esModule",{value:!0}),R.AddressType=void 0,R.isENSName=n,R.isSNSName=o,R.getAddressType=s,R.isValidWalletAddress=i,R.isValidSignature=l,R.parseEmailAddress=d,R.formatWalletAddress=c,R.getChainDisplayName=g;const e=ve(),r=Cr();var a;(function(h){h.EVMAddress="EVMAddress",h.SolanaAddress="SolanaAddress",h.ENSName="ENSName",h.SNSName="SNSName"})(a||(R.AddressType=a={}));function n(h){const w=h.toLowerCase();if(!w.endsWith(".eth")&&!w.endsWith(".box"))return!1;const m=(w.endsWith(".eth"),w.slice(0,-4));if(m.length===0)return!1;const b=m.split("."),y=/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;for(const p of b)if(p.length===0||!y.test(p)||p.includes("--"))return!1;return!0}function o(h){const w=h.toLowerCase(),b=[".sol",".abc",".bonk",".poor",".gm",".dao",".defi",".web3"].find(N=>w.endsWith(N));if(!b)return!1;const y=w.slice(0,-b.length);if(y.length===0)return!1;const p=y.split("."),T=/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;for(const N of p)if(N.length===0||!T.test(N)||N.includes("--"))return!1;return!0}function s(h,w=void 0){if((0,r.isEvmAddress)(h))return a.EVMAddress;if((0,r.isSolanaAddress)(h))return a.SolanaAddress;if(w&&h.includes(".")){if(w===a.EVMAddress)return a.ENSName;if(w===a.SolanaAddress)return a.SNSName}}function i(h,w){if(!h||typeof h!="string")return!1;const m=s(h);switch(w){case e.ChainType.EVM:return m===a.EVMAddress||m===a.ENSName;case e.ChainType.SOLANA:return m===a.SolanaAddress||m===a.SNSName;default:return!!m}}function l(h,w){if(!h||typeof h!="string")return!1;switch(w){case e.ChainType.EVM:return/^0x[a-fA-F0-9]{130}$/.test(h);case e.ChainType.SOLANA:return/^[1-9A-HJ-NP-Za-km-z]{87,88}$/.test(h);default:return h.length>50}}function d(h){if(!h||typeof h!="string")return;const w=h.split("@");if(w.length!==2)return;const[m,b]=w;if(!m||!b)return;const y=s(m);return{address:m,domain:b,type:y}}function c(h){if(!h||h.length<10)return h;const w=s(h);return(w===a.ENSName||w===a.SNSName)&&h.length<=20?h:`${h.slice(0,6)}...${h.slice(-4)}`}function g(h){if(!h)return"Unknown Chain";switch(h){case e.ChainType.EVM:return"EVM Chain";case e.ChainType.SOLANA:return"Solana";default:return"Blockchain"}}return R}var Lt;function ss(){if(Lt)return we;Lt=1,Object.defineProperty(we,"__esModule",{value:!0}),we.validateDomain=r,we.validateMessage=a,we.validateAddress=n,we.validateAmount=o;const e=Mt();function r(s){if(!s||s.length===0)throw new Error("Domain cannot be empty");if(s.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(s))throw new Error("Invalid domain format");return!0}function a(s,i){if(!s||s.length===0)throw new Error("Message subject cannot be empty");if(s.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(s,i){if(!s||s.length===0)throw new Error("Address cannot be empty");if(!(0,e.isValidWalletAddress)(s,i))throw new Error(`Invalid ${i} address format`);return!0}function o(s){if(s==null||s===""||typeof s=="string"&&s.trim()==="")throw new Error("Invalid amount format");let i;try{if(typeof s=="string"){if(!/^-?\d+$/.test(s.trim()))throw new Error("Invalid amount format");i=BigInt(s)}else if(typeof s=="number"){if(!Number.isFinite(s))throw new Error("Invalid amount format");i=BigInt(Math.floor(s))}else if(typeof s=="bigint")i=s;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 we}var Pt;function is(){return Pt||(Pt=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 r=Cr();Object.defineProperty(e,"MessageType",{enumerable:!0,get:function(){return r.MessageType}}),Object.defineProperty(e,"PROTOCOL_CONSTANTS",{enumerable:!0,get:function(){return r.PROTOCOL_CONSTANTS}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return r.TransactionStatus}}),Object.defineProperty(e,"isEvmAddress",{enumerable:!0,get:function(){return r.isEvmAddress}}),Object.defineProperty(e,"isEvmRecipient",{enumerable:!0,get:function(){return r.isEvmRecipient}}),Object.defineProperty(e,"isSolanaAddress",{enumerable:!0,get:function(){return r.isSolanaAddress}}),Object.defineProperty(e,"isSolanaRecipient",{enumerable:!0,get:function(){return r.isSolanaRecipient}});var a=ss();Object.defineProperty(e,"validateAddress",{enumerable:!0,get:function(){return a.validateAddress}}),Object.defineProperty(e,"validateAmount",{enumerable:!0,get:function(){return a.validateAmount}}),Object.defineProperty(e,"validateDomain",{enumerable:!0,get:function(){return a.validateDomain}}),Object.defineProperty(e,"validateMessage",{enumerable:!0,get:function(){return a.validateMessage}})})(Nr)),Nr}var Sr={},We={},Ot;function ls(){if(Ot)return We;Ot=1,Object.defineProperty(We,"__esModule",{value:!0}),We.StorageType=void 0;var e;return(function(r){r.LOCAL_STORAGE="localStorage",r.SESSION_STORAGE="sessionStorage",r.ASYNC_STORAGE="asyncStorage",r.MEMORY="memory"})(e||(We.StorageType=e={})),We}var Ut;function cs(){return Ut||(Ut=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StorageType=void 0;var r=ls();Object.defineProperty(e,"StorageType",{enumerable:!0,get:function(){return r.StorageType}})})(Sr)),Sr}var Er={},ke={},Dt;function ds(){if(Dt)return ke;Dt=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.AnalyticsEventBuilder=ke.AnalyticsEvent=void 0;var e;(function(a){a.USER_LOGIN="user_login",a.USER_LOGOUT="user_logout",a.USER_SIGNUP="user_signup",a.EMAIL_SENT="email_sent",a.EMAIL_RECEIVED="email_received",a.EMAIL_OPENED="email_opened",a.EMAIL_REPLY="email_reply",a.EMAIL_FORWARD="email_forward",a.EMAIL_DELETE="email_delete",a.EMAIL_STAR="email_star",a.EMAIL_COMPOSE="email_compose",a.EMAIL_CLICKED="email_clicked",a.PAGE_VIEW="page_view",a.SCREEN_VIEW="screen_view",a.FOLDER_SWITCH="folder_switch",a.SUBSCRIPTION_VIEW="subscription_view",a.SUBSCRIPTION_PURCHASE="subscription_purchase",a.SUBSCRIPTION_CANCEL="subscription_cancel",a.SEARCH_PERFORMED="search_performed",a.SETTINGS_CHANGED="settings_changed",a.ERROR_OCCURRED="error_occurred",a.AB_TEST_VIEWED="ab_test_viewed",a.AB_TEST_CONVERTED="ab_test_converted",a.CUSTOM_EVENT="custom_event"})(e||(ke.AnalyticsEvent=e={}));class r{static emailAction(n,o,s){return{action:n,email_id:o,folder:s,timestamp:Date.now()}}static pageView(n,o){return{page_name:n,page_path:o,timestamp:Date.now()}}static error(n,o,s){return{error_type:n,error_message:o,page_name:s,timestamp:Date.now()}}static subscription(n,o,s,i){return{action:n,plan_type:o,amount:s,currency:i,timestamp:Date.now()}}static engagement(n,o,s){return{feature:n,interaction:o,duration:s,timestamp:Date.now()}}static performance(n,o,s){return{metric:n,value:o,context:s,timestamp:Date.now()}}}return ke.AnalyticsEventBuilder=r,ke}var Tr={},jt;function us(){return jt||(jt=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProcessedEventName=e.ContractType=e.ChainType=void 0;var r=ve();Object.defineProperty(e,"ChainType",{enumerable:!0,get:function(){return r.ChainType}});var a;(function(o){o.Mailer="Mailer",o.MailService="MailService"})(a||(e.ContractType=a={}));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={}))})(Tr)),Tr}var Fe={},_t;function gs(){if(_t)return Fe;_t=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.NetworkError=void 0;class e extends Error{constructor(a,n,o,s){super(a),this.name="NetworkError",this.status=n,this.statusText=o,this.response=s}}return Fe.NetworkError=e,Fe}var Ve={},zt;function hs(){if(zt)return Ve;zt=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.WalletType=void 0;var e;return(function(r){r.METAMASK="metamask",r.PHANTOM="phantom",r.COINBASE="coinbase",r.WALLETCONNECT="walletconnect",r.INJECTED="injected"})(e||(Ve.WalletType=e={})),Ve}var Bt;function fs(){return Bt||(Bt=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 r=ds();Object.defineProperty(e,"AnalyticsEvent",{enumerable:!0,get:function(){return r.AnalyticsEvent}}),Object.defineProperty(e,"AnalyticsEventBuilder",{enumerable:!0,get:function(){return r.AnalyticsEventBuilder}});var a=us();Object.defineProperty(e,"ChainType",{enumerable:!0,get:function(){return a.ChainType}}),Object.defineProperty(e,"ContractType",{enumerable:!0,get:function(){return a.ContractType}}),Object.defineProperty(e,"ProcessedEventName",{enumerable:!0,get:function(){return a.ProcessedEventName}});var n=gs();Object.defineProperty(e,"NetworkError",{enumerable:!0,get:function(){return n.NetworkError}});var o=hs();Object.defineProperty(e,"WalletType",{enumerable:!0,get:function(){return o.WalletType}})})(Er)),Er}var xe={},re={},Wt;function bs(){if(Wt)return re;Wt=1,Object.defineProperty(re,"__esModule",{value:!0}),re.FeeType=re.ClaimType=re.ConfirmationStatus=void 0,re.isEVMResponse=o,re.isSolanaResponse=s,re.isMailboxErrorResponse=i;const e=ve();var r;(function(l){l.Processed="processed",l.Confirmed="confirmed",l.Finalized="finalized"})(r||(re.ConfirmationStatus=r={}));var a;(function(l){l.Recipient="recipient",l.Owner="owner",l.Expired="expired"})(a||(re.ClaimType=a={}));var n;(function(l){l.Send="send",l.Delegation="delegation",l.Registration="registration"})(n||(re.FeeType=n={}));function o(l){return l.chainType===e.ChainType.EVM}function s(l){return l.chainType===e.ChainType.SOLANA}function i(l){return!l.success&&l.error!==void 0}return re}var Ft;function ms(){return Ft||(Ft=1,(function(e){var r=xe&&xe.__createBinding||(Object.create?(function(n,o,s,i){i===void 0&&(i=s);var l=Object.getOwnPropertyDescriptor(o,s);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,i,l)}):(function(n,o,s,i){i===void 0&&(i=s),n[i]=o[s]})),a=xe&&xe.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&r(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),a(bs(),e)})(xe)),xe}var Ne={},Q={},Vt;function ys(){if(Vt)return Q;Vt=1,Object.defineProperty(Q,"__esModule",{value:!0}),Q.ReviewRejectType=Q.ApplicantType=Q.SumsubReviewAnswer=Q.SumsubReviewStatus=Q.KYCApplicationStatus=Q.KYCVerificationLevel=void 0;var e;(function(i){i.Basic="basic",i.Enhanced="enhanced",i.Accredited="accredited"})(e||(Q.KYCVerificationLevel=e={}));var r;(function(i){i.Pending="PENDING",i.Initiated="INITIATED",i.InProgress="IN_PROGRESS",i.Submitted="SUBMITTED",i.Completed="COMPLETED",i.Rejected="REJECTED"})(r||(Q.KYCApplicationStatus=r={}));var a;(function(i){i.Init="init",i.Pending="pending",i.Prechecked="prechecked",i.Completed="completed"})(a||(Q.SumsubReviewStatus=a={}));var n;(function(i){i.Green="GREEN",i.Red="RED",i.Yellow="YELLOW"})(n||(Q.SumsubReviewAnswer=n={}));var o;(function(i){i.Individual="individual",i.Company="company"})(o||(Q.ApplicantType=o={}));var s;return(function(i){i.Final="FINAL",i.Retry="RETRY",i.External="EXTERNAL"})(s||(Q.ReviewRejectType=s={})),Q}var $t;function ps(){return $t||($t=1,(function(e){var r=Ne&&Ne.__createBinding||(Object.create?(function(n,o,s,i){i===void 0&&(i=s);var l=Object.getOwnPropertyDescriptor(o,s);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,i,l)}):(function(n,o,s,i){i===void 0&&(i=s),n[i]=o[s]})),a=Ne&&Ne.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&r(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),a(ys(),e)})(Ne)),Ne}var Ce={},q={},qt;function vs(){if(qt)return q;qt=1,Object.defineProperty(q,"__esModule",{value:!0}),q.isWildduckWebSocketErrorResponse=q.isWildduckDisconnectMessage=q.isWildduckUpdateMessage=q.isWildduckDataMessage=q.isWildduckFetchRequest=q.isWildduckUnsubscribeRequest=q.isWildduckSubscribeRequest=void 0,q.createWildduckSubscribeRequest=l,q.createWildduckUnsubscribeRequest=d,q.createWildduckFetchMessagesRequest=c;const e=g=>typeof g=="object"&&g!==null&&"type"in g&&g.type==="subscribe"&&"channel"in g&&"data"in g;q.isWildduckSubscribeRequest=e;const r=g=>typeof g=="object"&&g!==null&&"type"in g&&g.type==="unsubscribe"&&"channel"in g;q.isWildduckUnsubscribeRequest=r;const a=g=>typeof g=="object"&&g!==null&&"type"in g&&g.type==="fetch"&&"channel"in g&&g.channel==="messages";q.isWildduckFetchRequest=a;const n=g=>typeof g=="object"&&g!==null&&"type"in g&&g.type==="data"&&"channel"in g&&"data"in g;q.isWildduckDataMessage=n;const o=g=>typeof g=="object"&&g!==null&&"type"in g&&g.type==="update"&&"channel"in g&&"data"in g;q.isWildduckUpdateMessage=o;const s=g=>typeof g=="object"&&g!==null&&"type"in g&&g.type==="disconnect"&&"channel"in g&&g.channel==="system";q.isWildduckDisconnectMessage=s;const i=g=>typeof g=="object"&&g!==null&&"success"in g&&g.success===!1&&"error"in g&&"message"in g;q.isWildduckWebSocketErrorResponse=i;function l(g,h){return{type:"subscribe",channel:g,data:h}}function d(g){return{type:"unsubscribe",channel:g,data:{}}}function c(g,h){return{type:"fetch",channel:"messages",data:{mailboxId:g,...h&&{cursor:h}}}}return q}var Ht;function ws(){return Ht||(Ht=1,(function(e){var r=Ce&&Ce.__createBinding||(Object.create?(function(n,o,s,i){i===void 0&&(i=s);var l=Object.getOwnPropertyDescriptor(o,s);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,i,l)}):(function(n,o,s,i){i===void 0&&(i=s),n[i]=o[s]})),a=Ce&&Ce.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&r(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),a(Ct(),e),a(vs(),e)})(Ce)),Ce}var Gt;function Yt(){return Gt||(Gt=1,(function(e){var r=pe&&pe.__createBinding||(Object.create?(function(n,o,s,i){i===void 0&&(i=s);var l=Object.getOwnPropertyDescriptor(o,s);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,i,l)}):(function(n,o,s,i){i===void 0&&(i=s),n[i]=o[s]})),a=pe&&pe.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&r(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),a(rs(),e),a(as(),e),a(os(),e),a(is(),e),a(cs(),e),a(fs(),e),a(ms(),e),a(ps(),e),a(ws(),e)})(pe)),pe}var Se={},Ar={},$e={},Kt;function ks(){if(Kt)return $e;Kt=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.Web3UsernameValidator=void 0;const e=ve();class r{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[s,i]=o;if(this.VALID_SNS_TLDS.includes(i)&&this.SNS_NAME_REGEX.test(s)&&s.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[s,i]=o;return this.VALID_SNS_TLDS.includes(i)&&this.SNS_NAME_REGEX.test(s)&&s.length>=1}}return $e.Web3UsernameValidator=r,r.EVM_REGEX=/^0x[a-fA-F0-9]{40}$/,r.BASE58_REGEX=/^[1-9A-HJ-NP-Za-km-z]+$/,r.ENS_REGEX=/^[a-zA-Z0-9]([a-zA-Z0-9]|(-[a-zA-Z0-9]))*\.(eth|box)$/i,r.SNS_NAME_REGEX=/^[a-zA-Z0-9]([a-zA-Z0-9]|(-[a-zA-Z0-9]))*$/,r.VALID_SNS_TLDS=["sol","abc","backpack","bonk","coin","dao","defi","gm","poor","pump","shdw","stepn","web3"],$e}var Ir={},Zt;function xs(){return Zt||(Zt=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 r=(C,k)=>S=>{try{return C(S)?{isValid:!0,data:S}:{isValid:!1,error:`Invalid ${k}`,data:null}}catch(I){return{isValid:!1,error:`Validation error for ${k}: ${I instanceof Error?I.message:"Unknown error"}`,data:null}}};e.createValidator=r;const a=C=>typeof C=="string";e.isString=a;const n=C=>typeof C=="number"&&!isNaN(C);e.isNumber=n;const o=C=>typeof C=="boolean";e.isBoolean=o;const s=C=>typeof C=="object"&&C!==null&&!Array.isArray(C);e.isObject=s;const i=C=>Array.isArray(C);e.isArray=i;const l=C=>C==null;e.isNullish=l;const d=(C,k)=>(0,e.isObject)(C)?k.every(S=>S in C):!1;e.hasRequiredProperties=d;const c=(C,k)=>(0,e.isArray)(C)?C.every(k):!1;e.validateArray=c;const g=C=>k=>k===void 0||C(k);e.optional=g;const h=C=>(0,e.isObject)(C)&&(0,e.isBoolean)(C.success);e.isApiResponse=h;const w=(C,k)=>!(0,e.isApiResponse)(C)||!C.success?!1:k&&"data"in C?k(C.data):!0;e.isSuccessResponse=w;const m=C=>(0,e.isApiResponse)(C)&&!C.success&&"error"in C&&(0,e.isString)(C.error);e.isErrorResponse=m;const b=C=>{if(!(0,e.isString)(C))return!1;const k=new Date(C);return!isNaN(k.getTime())};e.isValidDate=b;const y=C=>(0,e.isString)(C)?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(C):!1;e.isEmail=y;const p=C=>{if(!(0,e.isString)(C))return!1;try{return new URL(C),!0}catch{return!1}};e.isUrl=p;const T=(C,k)=>(S,I=k)=>{if(!C(S))throw new TypeError(`Invalid ${I}: expected ${k}`)};e.createAssertion=T;const N=(C,k)=>{try{const S=JSON.parse(C);return k?k(S)?{isValid:!0,data:S}:{isValid:!1,error:"Parsed JSON does not match expected type",data:null}:{isValid:!0,data:S}}catch(S){return{isValid:!1,error:`JSON parse error: ${S instanceof Error?S.message:"Unknown error"}`,data:null}}};e.parseJson=N})(Ir)),Ir}var Xt;function Ns(){return Xt||(Xt=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 r=ks();Object.defineProperty(e,"Web3UsernameValidator",{enumerable:!0,get:function(){return r.Web3UsernameValidator}});var a=xs();Object.defineProperty(e,"createAssertion",{enumerable:!0,get:function(){return a.createAssertion}}),Object.defineProperty(e,"createValidator",{enumerable:!0,get:function(){return a.createValidator}}),Object.defineProperty(e,"hasRequiredProperties",{enumerable:!0,get:function(){return a.hasRequiredProperties}}),Object.defineProperty(e,"isApiResponse",{enumerable:!0,get:function(){return a.isApiResponse}}),Object.defineProperty(e,"isArray",{enumerable:!0,get:function(){return a.isArray}}),Object.defineProperty(e,"isBoolean",{enumerable:!0,get:function(){return a.isBoolean}}),Object.defineProperty(e,"isEmail",{enumerable:!0,get:function(){return a.isEmail}}),Object.defineProperty(e,"isErrorResponse",{enumerable:!0,get:function(){return a.isErrorResponse}}),Object.defineProperty(e,"isNullish",{enumerable:!0,get:function(){return a.isNullish}}),Object.defineProperty(e,"isNumber",{enumerable:!0,get:function(){return a.isNumber}}),Object.defineProperty(e,"isObject",{enumerable:!0,get:function(){return a.isObject}}),Object.defineProperty(e,"isString",{enumerable:!0,get:function(){return a.isString}}),Object.defineProperty(e,"isSuccessResponse",{enumerable:!0,get:function(){return a.isSuccessResponse}}),Object.defineProperty(e,"isUrl",{enumerable:!0,get:function(){return a.isUrl}}),Object.defineProperty(e,"isValidDate",{enumerable:!0,get:function(){return a.isValidDate}}),Object.defineProperty(e,"optional",{enumerable:!0,get:function(){return a.optional}}),Object.defineProperty(e,"parseJson",{enumerable:!0,get:function(){return a.parseJson}}),Object.defineProperty(e,"validateArray",{enumerable:!0,get:function(){return a.validateArray}})})(Ar)),Ar}var Mr={},te={},Qt;function Cs(){if(Qt)return te;Qt=1,Object.defineProperty(te,"__esModule",{value:!0}),te.createMultiChainId=e,te.createUserMultiChainId=r,te.createChainStatsId=a,te.createDelegationId=n,te.normalizeAddress=o,te.formatBigInt=s,te.isZeroAddress=i,te.isTestNet=l,te.validateEventArgs=d;function e(c,g,h){return`${c}-${g}-${h}`}function r(c,g){return`${c}-${g.toLowerCase()}`}function a(c){return`${c}-global`}function n(c,g){return`${c.toLowerCase()}-${g}`}function o(c){return c.toLowerCase()}function s(c,g=18){const h=BigInt(10**g),w=c/h,m=c%h;return m===0n?w.toString():`${w}.${m.toString().padStart(g,"0").replace(/0+$/,"")}`}function i(c){return c.toLowerCase()==="0x0000000000000000000000000000000000000000"}function l(c){const g=new Set([31337,11155111,80001,80002,421614,11155420,84532,43113]),h=new Set([-102,-103,-104]);return g.has(c)||h.has(c)}function d(c,g){for(const h of g)if(c[h]===void 0||c[h]===null)return console.error(`❌ Missing required field: ${String(h)}`),!1;return!0}return te}var Jt;function Ss(){return Jt||(Jt=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 r=Mt();Object.defineProperty(e,"AddressType",{enumerable:!0,get:function(){return r.AddressType}}),Object.defineProperty(e,"formatWalletAddress",{enumerable:!0,get:function(){return r.formatWalletAddress}}),Object.defineProperty(e,"getAddressType",{enumerable:!0,get:function(){return r.getAddressType}}),Object.defineProperty(e,"getChainDisplayName",{enumerable:!0,get:function(){return r.getChainDisplayName}}),Object.defineProperty(e,"isENSName",{enumerable:!0,get:function(){return r.isENSName}}),Object.defineProperty(e,"isSNSName",{enumerable:!0,get:function(){return r.isSNSName}}),Object.defineProperty(e,"isValidSignature",{enumerable:!0,get:function(){return r.isValidSignature}}),Object.defineProperty(e,"isValidWalletAddress",{enumerable:!0,get:function(){return r.isValidWalletAddress}}),Object.defineProperty(e,"parseEmailAddress",{enumerable:!0,get:function(){return r.parseEmailAddress}});var a=Cr();Object.defineProperty(e,"isEvmAddress",{enumerable:!0,get:function(){return a.isEvmAddress}}),Object.defineProperty(e,"isSolanaAddress",{enumerable:!0,get:function(){return a.isSolanaAddress}});var n=Cs();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}})})(Mr)),Mr}var Lr={},ne={},Rt;function Es(){if(Rt)return ne;Rt=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.generateAuthMessage=r,ne.isAuthExpired=a,ne.getAuthStatusText=n,ne.canAccessProtectedFeatures=o,ne.isAuthStatusConnected=s,ne.generateNonce=i,ne.extractNonceFromMessage=l,ne.isValidNonce=d;const e=ve();function r(c,g){const h=g||`${Date.now()}-${Math.random().toString(36).substr(2,9)}`;return`Authenticate with ${c}
|
|
13
|
+
Nonce: ${h}`}function a(c,g=24){const h=new Date(c.getTime()+g*60*60*1e3);return new Date>h}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 s(c){return c===e.AuthStatus.CONNECTED||c===e.AuthStatus.VERIFIED}function i(){return`${Date.now()}-${Math.random().toString(36).substr(2,9)}`}function l(c){const g=c.match(/Nonce:\s*(.+)$/m);return g?g[1].trim():void 0}function d(c){if(!c||typeof c!="string"||c.length<10)return!1;const g=c.split("-");if(g.length>=2){const h=parseInt(g[0],10);if(!isNaN(h)){const w=Date.now()-864e5;if(h<w)return!1}}return!0}return ne}var ea;function Ts(){return ea||(ea=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 r=Es();Object.defineProperty(e,"canAccessProtectedFeatures",{enumerable:!0,get:function(){return r.canAccessProtectedFeatures}}),Object.defineProperty(e,"extractNonceFromMessage",{enumerable:!0,get:function(){return r.extractNonceFromMessage}}),Object.defineProperty(e,"generateAuthMessage",{enumerable:!0,get:function(){return r.generateAuthMessage}}),Object.defineProperty(e,"generateNonce",{enumerable:!0,get:function(){return r.generateNonce}}),Object.defineProperty(e,"getAuthStatusText",{enumerable:!0,get:function(){return r.getAuthStatusText}}),Object.defineProperty(e,"isAuthExpired",{enumerable:!0,get:function(){return r.isAuthExpired}}),Object.defineProperty(e,"isAuthStatusConnected",{enumerable:!0,get:function(){return r.isAuthStatusConnected}}),Object.defineProperty(e,"isValidNonce",{enumerable:!0,get:function(){return r.isValidNonce}})})(Lr)),Lr}var Pr={},Or={},ra;function As(){return ra||(ra=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CLAIM_PERIOD_DAYS=e.USDC_DECIMALS=void 0,e.formatUSDC=r,e.parseUSDC=a,e.USDC_DECIMALS=6,e.CLAIM_PERIOD_DAYS=60;function r(n){return(n/Math.pow(10,e.USDC_DECIMALS)).toFixed(2)}function a(n){return Math.floor(parseFloat(n)*Math.pow(10,e.USDC_DECIMALS))}})(Or)),Or}var oe={},ta;function Is(){if(ta)return oe;ta=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.formatEmailDate=e,oe.formatTimestamp=r,oe.formatRelativeTime=a,oe.parseDate=n,oe.isDateInRange=o,oe.addDays=s,oe.addHours=i;function e(l){const d=typeof l=="string"?new Date(l):l;if(isNaN(d.getTime()))return"Invalid date";const c=new Date,g=c.getTime()-d.getTime(),h=Math.floor(g/(1e3*60*60*24));return h===0?d.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}):h===1?"Yesterday":h<7?d.toLocaleDateString("en-US",{weekday:"long"}):d.getFullYear()===c.getFullYear()?d.toLocaleDateString("en-US",{month:"short",day:"numeric"}):d.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function r(l){return new Date(l).toISOString()}function a(l){const d=typeof l=="string"||typeof l=="number"?new Date(l):l;if(isNaN(d.getTime()))return"Invalid date";const g=new Date().getTime()-d.getTime(),h=Math.floor(g/1e3),w=Math.floor(h/60),m=Math.floor(w/60),b=Math.floor(m/24),y=Math.floor(b/7),p=Math.floor(b/30),T=Math.floor(b/365);return h<60?"just now":w<60?w===1?"1 minute ago":`${w} minutes ago`:m<24?m===1?"1 hour ago":`${m} hours ago`:b<7?b===1?"1 day ago":`${b} days ago`:y<4?y===1?"1 week ago":`${y} weeks ago`:p<12?p===1?"1 month ago":`${p} months ago`:T===1?"1 year ago":`${T} years ago`}function n(l){try{const d=new Date(l);return isNaN(d.getTime())?null:d}catch{return null}}function o(l,d,c){return l>=d&&l<=c}function s(l,d){const c=new Date(l);return c.setDate(c.getDate()+d),c}function i(l,d){const c=new Date(l);return c.setHours(c.getHours()+d),c}return oe}var G={},aa;function Ms(){if(aa)return G;aa=1,Object.defineProperty(G,"__esModule",{value:!0}),G.truncate=e,G.capitalize=r,G.toTitleCase=a,G.toKebabCase=n,G.toCamelCase=o,G.toSnakeCase=s,G.normalizeWhitespace=i,G.isBlank=l,G.isNotBlank=d,G.escapeHtml=c,G.stripHtml=g,G.getInitials=h,G.formatBytes=w,G.randomString=m,G.pluralize=b,G.formatNumber=y;function e(p,T,N="..."){return!p||p.length<=T?p:p.slice(0,T-N.length)+N}function r(p){return p&&p.charAt(0).toUpperCase()+p.slice(1)}function a(p){return p&&p.toLowerCase().split(" ").map(T=>r(T)).join(" ")}function n(p){return p&&p.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function o(p){return p&&p.replace(/[-_\s]+(.)?/g,(T,N)=>N?N.toUpperCase():"").replace(/^./,T=>T.toLowerCase())}function s(p){return p&&p.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[\s-]+/g,"_").toLowerCase()}function i(p){return p&&p.replace(/\s+/g," ").trim()}function l(p){return!p||p.trim().length===0}function d(p){return!l(p)}function c(p){if(!p)return p;const T={"&":"&","<":"<",">":">",'"':""","'":"'"};return p.replace(/[&<>"']/g,N=>T[N])}function g(p){return p&&p.replace(/<[^>]*>/g,"")}function h(p,T=2){return p?p.trim().split(/\s+/).slice(0,T).map(k=>k.charAt(0).toUpperCase()).join(""):""}function w(p,T=2){if(p===0)return"0 Bytes";const N=1024,C=T<0?0:T,k=["Bytes","KB","MB","GB","TB","PB"],S=Math.floor(Math.log(p)/Math.log(N));return parseFloat((p/Math.pow(N,S)).toFixed(C))+" "+k[S]}function m(p,T="alphanumeric"){let N;switch(T){case"alpha":N="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";break;case"numeric":N="0123456789";break;case"alphanumeric":N="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";break;case"hex":N="0123456789abcdef";break;default:N=T}let C="";for(let k=0;k<p;k++)C+=N.charAt(Math.floor(Math.random()*N.length));return C}function b(p,T,N){return p===1?T:N||`${T}s`}function y(p){return p.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}return G}var na;function Ls(){return na||(na=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 r=As();Object.defineProperty(e,"CLAIM_PERIOD_DAYS",{enumerable:!0,get:function(){return r.CLAIM_PERIOD_DAYS}}),Object.defineProperty(e,"USDC_DECIMALS",{enumerable:!0,get:function(){return r.USDC_DECIMALS}}),Object.defineProperty(e,"formatUSDC",{enumerable:!0,get:function(){return r.formatUSDC}}),Object.defineProperty(e,"parseUSDC",{enumerable:!0,get:function(){return r.parseUSDC}});var a=Is();Object.defineProperty(e,"addDays",{enumerable:!0,get:function(){return a.addDays}}),Object.defineProperty(e,"addHours",{enumerable:!0,get:function(){return a.addHours}}),Object.defineProperty(e,"formatEmailDate",{enumerable:!0,get:function(){return a.formatEmailDate}}),Object.defineProperty(e,"formatRelativeTime",{enumerable:!0,get:function(){return a.formatRelativeTime}}),Object.defineProperty(e,"formatTimestamp",{enumerable:!0,get:function(){return a.formatTimestamp}}),Object.defineProperty(e,"isDateInRange",{enumerable:!0,get:function(){return a.isDateInRange}}),Object.defineProperty(e,"parseDate",{enumerable:!0,get:function(){return a.parseDate}});var n=Ms();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}})})(Pr)),Pr}var Ur={},W={},oa;function Ps(){if(oa)return W;oa=1,Object.defineProperty(W,"__esModule",{value:!0}),W.Z_INDEX=W.ANIMATION=W.NETWORK_IDS=W.WALLET_NAMES=W.CONTACT_INFO=W.ROUTES=W.SUCCESS_MESSAGES=W.ERROR_MESSAGES=W.TIME_FORMAT=W.SUBSCRIPTION_TIERS=W.EMAIL_CONFIG=W.STORAGE_KEYS=W.CHAIN_TYPE=W.AUTH_STATUS=W.API_RETRY_DELAY=W.API_RETRY_ATTEMPTS=W.API_TIMEOUT=void 0;const e=3e4;W.API_TIMEOUT=e;const r=3;W.API_RETRY_ATTEMPTS=r;const a=1e3;W.API_RETRY_DELAY=a;const n={DISCONNECTED:"disconnected",CONNECTED:"connected",VERIFIED:"verified"};W.AUTH_STATUS=n;const o={EVM:"evm",SOLANA:"solana",UNKNOWN:"unknown"};W.CHAIN_TYPE=o;const s={AUTH_TOKEN:"authToken",USER_DATA:"userData",THEME:"theme",EMAIL_CACHE:"emailCache",WALLET_ADDRESS:"walletAddress",CHAIN_TYPE:"chainType"};W.STORAGE_KEYS=s;const i={MAX_ATTACHMENT_SIZE:25*1024*1024,MAX_RECIPIENTS:100,ITEMS_PER_PAGE:50,REFRESH_INTERVAL:6e4,NOTIFICATION_COOLDOWN:3e5};W.EMAIL_CONFIG=i;const l={FREE:"free",BASIC:"basic",PRO:"pro",ENTERPRISE:"enterprise"};W.SUBSCRIPTION_TIERS=l;const d={SHORT_DATE:"MMM d",FULL_DATE:"MMM d, yyyy",DATE_TIME:"MMM d, yyyy h:mm a",RELATIVE:"relative"};W.TIME_FORMAT=d;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"};W.ERROR_MESSAGES=c;const g={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"};W.SUCCESS_MESSAGES=g;const h={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"};W.ROUTES=h;const w={SUPPORT_EMAIL:"support@sudobility.com",CONTACT_EMAIL:"info@sudobility.com"};W.CONTACT_INFO=w;const m={METAMASK:"MetaMask",WALLETCONNECT:"WalletConnect",COINBASE:"Coinbase Wallet",PHANTOM:"Phantom",SAFE:"Safe",ARGENT:"Argent",RAINBOW:"Rainbow",TRUST:"Trust Wallet",LEDGER:"Ledger",TREZOR:"Trezor"};W.WALLET_NAMES=m;const b={ETHEREUM_MAINNET:1,POLYGON:137,ARBITRUM:42161,OPTIMISM:10,BASE:8453,SOLANA_MAINNET:"mainnet-beta",SOLANA_DEVNET:"devnet"};W.NETWORK_IDS=b;const y={FAST:150,NORMAL:300,SLOW:500,VERY_SLOW:1e3};W.ANIMATION=y;const p={DROPDOWN:10,OVERLAY:20,MODAL:30,POPOVER:40,TOOLTIP:50,TOAST:60};return W.Z_INDEX=p,W}var qe={},sa;function Os(){return sa||(sa=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.STATUS_VALUES=void 0,qe.STATUS_VALUES={SUCCESS:"success",PENDING:"pending",FAILED:"failed",ERROR:"error"}),qe}var ia;function Us(){return ia||(ia=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 r=Ps();Object.defineProperty(e,"API_TIMEOUT",{enumerable:!0,get:function(){return r.API_TIMEOUT}}),Object.defineProperty(e,"API_RETRY_ATTEMPTS",{enumerable:!0,get:function(){return r.API_RETRY_ATTEMPTS}}),Object.defineProperty(e,"API_RETRY_DELAY",{enumerable:!0,get:function(){return r.API_RETRY_DELAY}}),Object.defineProperty(e,"AUTH_STATUS",{enumerable:!0,get:function(){return r.AUTH_STATUS}}),Object.defineProperty(e,"CHAIN_TYPE",{enumerable:!0,get:function(){return r.CHAIN_TYPE}}),Object.defineProperty(e,"STORAGE_KEYS",{enumerable:!0,get:function(){return r.STORAGE_KEYS}}),Object.defineProperty(e,"EMAIL_CONFIG",{enumerable:!0,get:function(){return r.EMAIL_CONFIG}}),Object.defineProperty(e,"SUBSCRIPTION_TIERS",{enumerable:!0,get:function(){return r.SUBSCRIPTION_TIERS}}),Object.defineProperty(e,"TIME_FORMAT",{enumerable:!0,get:function(){return r.TIME_FORMAT}}),Object.defineProperty(e,"ERROR_MESSAGES",{enumerable:!0,get:function(){return r.ERROR_MESSAGES}}),Object.defineProperty(e,"SUCCESS_MESSAGES",{enumerable:!0,get:function(){return r.SUCCESS_MESSAGES}}),Object.defineProperty(e,"ROUTES",{enumerable:!0,get:function(){return r.ROUTES}}),Object.defineProperty(e,"CONTACT_INFO",{enumerable:!0,get:function(){return r.CONTACT_INFO}}),Object.defineProperty(e,"WALLET_NAMES",{enumerable:!0,get:function(){return r.WALLET_NAMES}}),Object.defineProperty(e,"NETWORK_IDS",{enumerable:!0,get:function(){return r.NETWORK_IDS}}),Object.defineProperty(e,"ANIMATION",{enumerable:!0,get:function(){return r.ANIMATION}}),Object.defineProperty(e,"Z_INDEX",{enumerable:!0,get:function(){return r.Z_INDEX}});var a=Os();Object.defineProperty(e,"STATUS_VALUES",{enumerable:!0,get:function(){return a.STATUS_VALUES}})})(Ur)),Ur}var Dr={},K={},la;function Ds(){if(la)return K;la=1,Object.defineProperty(K,"__esModule",{value:!0}),K.storageLogger=K.ensLogger=K.contractLogger=K.apiLogger=K.authLogger=K.logger=K.LogLevel=void 0;var e;(function(d){d.ERROR="error",d.WARN="warn",d.INFO="info",d.DEBUG="debug"})(e||(K.LogLevel=e={}));class r{constructor(){this.isDevelopment=process.env.NODE_ENV==="development"}formatTimestamp(){return new Date().toISOString()}formatMessage(c,g,h){const w=this.formatTimestamp(),m=h?` [${h}]`:"";return`[${w}]${m} ${g}`}shouldLog(c){return this.isDevelopment?!0:c===e.ERROR||c===e.WARN}error(c,g,h){this.shouldLog(e.ERROR)&&(console.error(this.formatMessage(e.ERROR,c,g)),h&&console.error(h))}warn(c,g,h){this.shouldLog(e.WARN)&&(console.warn(this.formatMessage(e.WARN,c,g)),h&&console.warn(h))}info(c,g,h){this.shouldLog(e.INFO)&&(console.log(this.formatMessage(e.INFO,c,g)),h&&console.log(h))}debug(c,g,h){this.shouldLog(e.DEBUG)&&(console.log(this.formatMessage(e.DEBUG,c,g)),h&&console.log(h))}withContext(c){return{error:(g,h)=>this.error(g,c,h),warn:(g,h)=>this.warn(g,c,h),info:(g,h)=>this.info(g,c,h),debug:(g,h)=>this.debug(g,c,h)}}}const a=new r;K.logger=a;const n=a.withContext("AUTH");K.authLogger=n;const o=a.withContext("API");K.apiLogger=o;const s=a.withContext("CONTRACT");K.contractLogger=s;const i=a.withContext("ENS");K.ensLogger=i;const l=a.withContext("STORAGE");return K.storageLogger=l,K}var ca;function da(){return ca||(ca=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 r=Ds();Object.defineProperty(e,"LogLevel",{enumerable:!0,get:function(){return r.LogLevel}}),Object.defineProperty(e,"logger",{enumerable:!0,get:function(){return r.logger}}),Object.defineProperty(e,"authLogger",{enumerable:!0,get:function(){return r.authLogger}}),Object.defineProperty(e,"apiLogger",{enumerable:!0,get:function(){return r.apiLogger}}),Object.defineProperty(e,"contractLogger",{enumerable:!0,get:function(){return r.contractLogger}}),Object.defineProperty(e,"ensLogger",{enumerable:!0,get:function(){return r.ensLogger}}),Object.defineProperty(e,"storageLogger",{enumerable:!0,get:function(){return r.storageLogger}})})(Dr)),Dr}var jr={},Ee={},ua;function js(){if(ua)return Ee;ua=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.createURLSearchParams=r,Ee.createSearchParams=a,Ee.searchParamsToString=n,Ee.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[l,d]of i)this.append(l,d);else for(const[l,d]of Object.entries(i))d!==void 0&&this.append(l,d)}parseString(i){const l=i.startsWith("?")?i.slice(1):i;if(l)for(const d of l.split("&")){const[c,g=""]=d.split("=");c&&this.append(decodeURIComponent(c),decodeURIComponent(g))}}append(i,l){this.params.has(i)||this.params.set(i,[]);const d=this.params.get(i);d&&d.push(l)}delete(i){this.params.delete(i)}get(i){const l=this.params.get(i);return l&&l.length>0?l[0]:null}getAll(i){return this.params.get(i)||[]}has(i){return this.params.has(i)}set(i,l){this.params.set(i,[l])}toString(){const i=[];return this.params.forEach((l,d)=>{for(const c of l)i.push(`${encodeURIComponent(d)}=${encodeURIComponent(c)}`)}),i.join("&")}forEach(i){this.params.forEach((l,d)=>{for(const c of l)i(c,d)})}}function r(s){return typeof URLSearchParams<"u"?new URLSearchParams(s):new e(s)}function a(s){const i=r(void 0);for(const[l,d]of Object.entries(s))d!=null&&i.append(l,String(d));return i}function n(s){return s.toString()}function o(s){const i=r(s),l={};return i.forEach((d,c)=>{l[c]=d}),l}return Ee}var ga;function _s(){return ga||(ga=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseSearchParams=e.searchParamsToString=e.createSearchParams=e.createURLSearchParams=void 0;var r=js();Object.defineProperty(e,"createURLSearchParams",{enumerable:!0,get:function(){return r.createURLSearchParams}}),Object.defineProperty(e,"createSearchParams",{enumerable:!0,get:function(){return r.createSearchParams}}),Object.defineProperty(e,"searchParamsToString",{enumerable:!0,get:function(){return r.searchParamsToString}}),Object.defineProperty(e,"parseSearchParams",{enumerable:!0,get:function(){return r.parseSearchParams}})})(jr)),jr}var Z={},ha;function zs(){if(ha)return Z;ha=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.debounceAsync=Z.clearExpiredCache=Z.withCache=Z.withTimeout=Z.safeParallel=Z.withLoadingState=Z.safeAsync=void 0;const e=da(),r=async(g,h)=>{try{return{data:await g(),success:!0}}catch(w){const m=w instanceof Error?w:new Error(String(w));return e.logger.error(`Async operation failed: ${m.message}`,h,w),{error:m,success:!1}}};Z.safeAsync=r;const a=async(g,h,w,m)=>{h(!0),w(null);try{return await g()}catch(b){const y=b instanceof Error?b.message:String(b);w(y),e.logger.error(`Operation failed: ${y}`,m,b);return}finally{h(!1)}};Z.withLoadingState=a;const n=async(g,h)=>{try{return{data:await Promise.all(g.map(m=>m())),success:!0}}catch(w){const m=w instanceof Error?w:new Error(String(w));return e.logger.error(`Parallel operations failed: ${m.message}`,h,w),{error:m,success:!1}}};Z.safeParallel=n;const o=async(g,h,w)=>{const m=new Promise((b,y)=>setTimeout(()=>y(new Error(`Operation timed out after ${h}ms`)),h));try{return await Promise.race([g(),m])}catch(b){throw e.logger.error("Timeout operation failed",w,b),b}};Z.withTimeout=o;const s=new Map,i=async(g,h,w=300*1e3)=>{const m=s.get(g),b=Date.now();if(m&&b-m.timestamp<m.ttl)return m.data;const y=await h();return s.set(g,{data:y,timestamp:b,ttl:w}),y};Z.withCache=i;const l=()=>{const g=Date.now();for(const[h,w]of s.entries())g-w.timestamp>=w.ttl&&s.delete(h)};Z.clearExpiredCache=l;const d=new Map,c=(g,h,w)=>(...m)=>new Promise(b=>{const y=d.get(w);y&&clearTimeout(y);const p=setTimeout(async()=>{d.delete(w);try{const T=await g(...m);b(T)}catch(T){e.logger.error("Debounced operation failed",w,T),b(void 0)}},h);d.set(w,p)});return Z.debounceAsync=c,Z}var fa;function ba(){return fa||(fa=1,(function(e){var r=Se&&Se.__createBinding||(Object.create?(function(n,o,s,i){i===void 0&&(i=s);var l=Object.getOwnPropertyDescriptor(o,s);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,i,l)}):(function(n,o,s,i){i===void 0&&(i=s),n[i]=o[s]})),a=Se&&Se.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&r(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),a(Ns(),e),a(Ss(),e),a(Ts(),e),a(Ls(),e),a(Us(),e),a(da(),e),a(_s(),e),a(zs(),e)})(Se)),Se}var ma;function Bs(){return ma||(ma=1,(function(e){var r=ye&&ye.__createBinding||(Object.create?(function(s,i,l,d){d===void 0&&(d=l);var c=Object.getOwnPropertyDescriptor(i,l);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[l]}}),Object.defineProperty(s,d,c)}):(function(s,i,l,d){d===void 0&&(d=l),s[d]=i[l]})),a=ye&&ye.__exportStar||function(s,i){for(var l in s)l!=="default"&&!Object.prototype.hasOwnProperty.call(i,l)&&r(i,s,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.MailboxSpecialUse=e.ReviewRejectType=e.ApplicantType=e.SumsubReviewAnswer=e.SumsubReviewStatus=e.KYCApplicationStatus=e.KYCVerificationLevel=e.FeeType=e.ClaimType=e.ConfirmationStatus=e.ProcessedEventName=e.ContractType=e.StorageType=e.WalletType=e.ChainType=e.AnalyticsEvent=e.TransactionStatus=e.MessageType=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,a(Yt(),e),a(ba(),e);var n=ba();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=Yt();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,"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}}),Object.defineProperty(e,"ConfirmationStatus",{enumerable:!0,get:function(){return o.ConfirmationStatus}}),Object.defineProperty(e,"ClaimType",{enumerable:!0,get:function(){return o.ClaimType}}),Object.defineProperty(e,"FeeType",{enumerable:!0,get:function(){return o.FeeType}}),Object.defineProperty(e,"KYCVerificationLevel",{enumerable:!0,get:function(){return o.KYCVerificationLevel}}),Object.defineProperty(e,"KYCApplicationStatus",{enumerable:!0,get:function(){return o.KYCApplicationStatus}}),Object.defineProperty(e,"SumsubReviewStatus",{enumerable:!0,get:function(){return o.SumsubReviewStatus}}),Object.defineProperty(e,"SumsubReviewAnswer",{enumerable:!0,get:function(){return o.SumsubReviewAnswer}}),Object.defineProperty(e,"ApplicantType",{enumerable:!0,get:function(){return o.ApplicantType}}),Object.defineProperty(e,"ReviewRejectType",{enumerable:!0,get:function(){return o.ReviewRejectType}}),Object.defineProperty(e,"MailboxSpecialUse",{enumerable:!0,get:function(){return o.MailboxSpecialUse}})})(ye)),ye}var ya=Bs();const Ws=e=>{switch(e){case"verified":case"success":return Pe("success");case"connected":case"warning":return Pe("warning");case"disconnected":case"error":return Pe("error");case"pending":return Pe("info");default:return Pe("neutral")}},Fs=e=>{switch(e){case"sm":return"w-1.5 h-1.5";case"lg":return"w-3 h-3";default:return"w-2 h-2"}},Vs=({status:e,label:r,showDot:a=!0,size:n="md"})=>{const s=r||{verified:"Verified",connected:"Connected",disconnected:"Disconnected",pending:"Pending",error:"Error",success:"Success",warning:"Warning"}[e],l=((g,h)=>{const w={sm:"small",md:"default",lg:"large"},b={verified:"success",success:"success",connected:"warning",warning:"warning",disconnected:"error",error:"error",pending:"primary"}[g]||"default",y=w[h];return y==="default"?_.badge[b]():_.badge[y](b)})(e,n),d=Ws(e),c=Fs(n);return t.jsxs("span",{className:l,children:[a&&t.jsx("span",{className:`inline-block ${c} rounded-full ${d} mr-1`}),s]})},$s=({chainType:e,size:r="md"})=>{if(!e)return null;const a=e===ya.ChainType.SOLANA?"SOL":"ETH",o={sm:"small",md:"default",lg:"large"}[r],s=()=>{const i=e===ya.ChainType.SOLANA?"solana":"ethereum";return o==="default"?_.badge[i]():_.badge[o](i)};return t.jsx("span",{className:s(),children:a})},qs={xs:"w-1.5 h-1.5",sm:"w-2 h-2",md:"w-3 h-3",lg:"w-4 h-4"},Hs=({status:e,size:r="sm",pulse:a=!1,className:n})=>t.jsx("div",{className:f("rounded-full flex-shrink-0",Pe(e),qs[r],a&&"animate-pulse",n)}),Gs=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UstatusUpipeline",children:r||"UstatusUpipeline Component"}),rr=Y.forwardRef(({className:e,type:r,...a},n)=>t.jsx("input",{type:r,className:f(_.input.default(),e),ref:n,...a}));rr.displayName="Input";const Ys=({value:e,onChange:r,placeholder:a,rows:n=4,disabled:o=!1,readOnly:s=!1,showCount:i=!1,maxLength:l,resize:d="vertical",size:c="md",className:g,textareaProps:h})=>{const w={sm:"p-2 text-sm",md:"p-3 text-base",lg:"p-4 text-lg"},m={none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"},b=T=>{const N=T.target.value;l&&N.length>l||r(N)},y=e.length,p=i||l!==void 0;return t.jsxs("div",{className:f("w-full",g),children:[t.jsx("textarea",{value:e,onChange:b,placeholder:a,rows:n,disabled:o,readOnly:s,maxLength:l,className:f("w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",w[c],m[d],o&&"opacity-50 cursor-not-allowed",s&&"bg-gray-50 dark:bg-gray-900 cursor-default"),...h}),p&&t.jsx("div",{className:"flex justify-end mt-1",children:t.jsxs("span",{className:f("text-xs",l&&y>l*.9?"text-yellow-600 dark:text-yellow-400":"text-gray-500 dark:text-gray-400",l&&y>=l&&"text-red-600 dark:text-red-400"),children:[y,l&&` / ${l}`]})})]})},Ks=({value:e,onChange:r,min:a,max:n,step:o=1,disabled:s=!1,showSteppers:i=!1,stepperPosition:l="right",placeholder:d,size:c="md",className:g,inputProps:h})=>{const m={sm:{input:"py-1.5 px-3 text-sm",button:"w-6 h-6",icon:"h-3 w-3"},md:{input:"py-2 px-3 text-base",button:"w-8 h-8",icon:"h-4 w-4"},lg:{input:"py-3 px-4 text-lg",button:"w-10 h-10",icon:"h-5 w-5"}}[c],b=S=>{const I=parseFloat(S.target.value);if(isNaN(I))S.target.value===""&&r(a??0);else{const E=y(I);r(E)}},y=S=>{let I=S;return a!==void 0&&I<a&&(I=a),n!==void 0&&I>n&&(I=n),I},p=()=>{const S=y(e+o);r(S)},T=()=>{const S=y(e-o);r(S)},N=n===void 0||e<n,C=a===void 0||e>a,k=({onClick:S,icon:I,disabled:E,ariaLabel:M})=>t.jsx("button",{type:"button",onClick:S,disabled:s||E,"aria-label":M,className:f("inline-flex items-center justify-center","border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors",m.button,(s||E)&&"opacity-50 cursor-not-allowed"),children:I});return i&&l==="sides"?t.jsxs("div",{className:f("inline-flex items-stretch",g),children:[t.jsx(k,{onClick:T,disabled:!C,icon:t.jsx(L.MinusIcon,{className:m.icon}),ariaLabel:"Decrement"}),t.jsx("input",{type:"number",value:e,onChange:b,min:a,max:n,step:o,disabled:s,placeholder:d,className:f("border-x-0 text-center","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:z-10","transition-colors",m.input,s&&"opacity-50 cursor-not-allowed","[appearance:textfield]","[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:appearance-none"),...h}),t.jsx(k,{onClick:p,disabled:!N,icon:t.jsx(L.PlusIcon,{className:m.icon}),ariaLabel:"Increment"})]}):i&&l==="right"?t.jsxs("div",{className:f("inline-flex items-stretch gap-2",g),children:[t.jsx("input",{type:"number",value:e,onChange:b,min:a,max:n,step:o,disabled:s,placeholder:d,className:f("rounded-lg border","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors",m.input,s&&"opacity-50 cursor-not-allowed","[appearance:textfield]","[&::-webkit-outer-spin-button]:appearance-none","[&::-webkit-inner-spin-button]:appearance-none"),...h}),t.jsxs("div",{className:"inline-flex flex-col gap-0.5",children:[t.jsx("button",{type:"button",onClick:p,disabled:s||!N,"aria-label":"Increment",className:f("inline-flex items-center justify-center","rounded border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors","flex-1",m.button.replace(/h-\d+/,"h-auto"),(s||!N)&&"opacity-50 cursor-not-allowed"),children:t.jsx(L.PlusIcon,{className:f(m.icon,"w-3 h-3")})}),t.jsx("button",{type:"button",onClick:T,disabled:s||!C,"aria-label":"Decrement",className:f("inline-flex items-center justify-center","rounded border border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors","flex-1",m.button.replace(/h-\d+/,"h-auto"),(s||!C)&&"opacity-50 cursor-not-allowed"),children:t.jsx(L.MinusIcon,{className:f(m.icon,"w-3 h-3")})})]})]}):t.jsx("input",{type:"number",value:e,onChange:b,min:a,max:n,step:o,disabled:s,placeholder:d,className:f("rounded-lg border","border-gray-300 dark:border-gray-600","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors",m.input,s&&"opacity-50 cursor-not-allowed",g),...h})},Zs=({value:e,onChange:r,placeholder:a="Search...",autoFocus:n=!1,disabled:o=!1,size:s="md",showIcon:i=!0,showClear:l=!0,loading:d=!1,className:c,inputProps:g})=>{const[h,w]=v.useState(""),m=e!==void 0?e:h,b=e!==void 0,p={sm:{input:"py-1.5 text-sm",icon:"h-4 w-4",padding:i?"pl-8 pr-8":"px-3",iconLeft:"left-0 pl-2.5",iconRight:"right-0 pr-2.5"},md:{input:"py-2 text-base",icon:"h-5 w-5",padding:i?"pl-10 pr-10":"px-3",iconLeft:"left-0 pl-3",iconRight:"right-0 pr-3"},lg:{input:"py-3 text-lg",icon:"h-6 w-6",padding:i?"pl-12 pr-12":"px-4",iconLeft:"left-0 pl-3.5",iconRight:"right-0 pr-3.5"}}[s],T=v.useCallback(C=>{const k=C.target.value;b||w(k),r?.(k)},[r,b]),N=v.useCallback(()=>{b||w(""),r?.("")},[r,b]);return t.jsxs("div",{className:f("relative w-full",c),children:[i&&t.jsx("div",{className:f("absolute inset-y-0 flex items-center pointer-events-none",p.iconLeft),children:t.jsx(L.MagnifyingGlassIcon,{className:f(p.icon,"text-gray-400 dark:text-gray-500")})}),t.jsx("input",{type:"text",value:m,onChange:T,placeholder:a,autoFocus:n,disabled:o||d,className:f("block w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",p.input,p.padding,o&&"opacity-50 cursor-not-allowed",d&&"opacity-60"),...g}),l&&m&&!d&&t.jsx("button",{type:"button",onClick:N,disabled:o,className:f("absolute inset-y-0 flex items-center","text-gray-400 hover:text-gray-600 dark:hover:text-gray-300","transition-colors",o?"cursor-not-allowed":"cursor-pointer",p.iconRight),"aria-label":"Clear search",children:t.jsx(L.XMarkIcon,{className:p.icon})}),d&&t.jsx("div",{className:f("absolute inset-y-0 flex items-center",p.iconRight),children:t.jsxs("svg",{className:f(p.icon,"animate-spin text-gray-400"),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[t.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),t.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})]})},Xs=({value:e,onChange:r,type:a="date",min:n,max:o,disabled:s=!1,showIcon:i=!1,placeholder:l,size:d="md",className:c,inputProps:g})=>{const w={sm:{input:"py-1.5 text-sm",icon:"h-4 w-4",padding:i?"pl-8 pr-3":"px-3",iconLeft:"left-0 pl-2.5"},md:{input:"py-2 text-base",icon:"h-5 w-5",padding:i?"pl-10 pr-4":"px-4",iconLeft:"left-0 pl-3"},lg:{input:"py-3 text-lg",icon:"h-6 w-6",padding:i?"pl-12 pr-4":"px-4",iconLeft:"left-0 pl-3.5"}}[d],m=e instanceof Date?Qs(e,a):e,b=y=>{r(y.target.value)};return t.jsxs("div",{className:f("relative",c),children:[i&&t.jsx("div",{className:f("absolute inset-y-0 flex items-center pointer-events-none",w.iconLeft),children:t.jsx(L.CalendarIcon,{className:f(w.icon,"text-gray-400 dark:text-gray-500")})}),t.jsx("input",{type:a,value:m,onChange:b,min:n,max:o,disabled:s,placeholder:l,className:f("block w-full rounded-lg border","bg-white dark:bg-gray-800","text-gray-900 dark:text-gray-100","placeholder-gray-400 dark:placeholder-gray-500","border-gray-300 dark:border-gray-600","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent","transition-colors duration-200",w.input,w.padding,s&&"opacity-50 cursor-not-allowed","appearance-none","[&::-webkit-calendar-picker-indicator]:opacity-100","[&::-webkit-calendar-picker-indicator]:cursor-pointer"),...g})]})};function Qs(e,r){const a=d=>String(d).padStart(2,"0"),n=e.getFullYear(),o=a(e.getMonth()+1),s=a(e.getDate()),i=a(e.getHours()),l=a(e.getMinutes());switch(r){case"date":return`${n}-${o}-${s}`;case"time":return`${i}:${l}`;case"datetime-local":return`${n}-${o}-${s}T${i}:${l}`;case"month":return`${n}-${o}`;case"week":{const d=new Date(n,0,1),c=Math.floor((e.getTime()-d.getTime())/(1440*60*1e3)),g=Math.ceil((c+d.getDay()+1)/7);return`${n}-W${a(g)}`}default:return`${n}-${o}-${s}`}}const pa=({value:e,onChange:r,use12Hour:a=!1,minuteStep:n=1,disabled:o=!1,className:s})=>{const[i,l]=v.useState(!1),[d,c]=v.useState("12"),[g,h]=v.useState("00"),[w,m]=v.useState("AM"),b=v.useRef(null);v.useEffect(()=>{if(e){const[C,k]=e.split(":"),S=parseInt(C,10);if(a){const I=S>=12,E=S===0?12:S>12?S-12:S;c(E.toString().padStart(2,"0")),m(I?"PM":"AM")}else c(C);h(k)}},[e,a]),v.useEffect(()=>{const C=k=>{b.current&&!b.current.contains(k.target)&&l(!1)};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[]);const y=()=>{if(!e)return"";const[C,k]=e.split(":"),S=parseInt(C,10);if(a){const I=S===0?12:S>12?S-12:S,E=S>=12?"PM":"AM";return`${I}:${k} ${E}`}return`${C}:${k}`},p=(C,k,S)=>{let I=parseInt(C,10);const E=parseInt(k,10);a&&S&&(S==="PM"&&I!==12?I+=12:S==="AM"&&I===12&&(I=0));const M=`${I.toString().padStart(2,"0")}:${E.toString().padStart(2,"0")}`;r(M)},T=a?Array.from({length:12},(C,k)=>(k+1).toString().padStart(2,"0")):Array.from({length:24},(C,k)=>k.toString().padStart(2,"0")),N=Array.from({length:Math.ceil(60/n)},(C,k)=>(k*n).toString().padStart(2,"0"));return t.jsxs("div",{ref:b,className:f("relative w-full",s),children:[t.jsxs("button",{type:"button",onClick:()=>!o&&l(!i),disabled:o,className:f("w-full px-3 py-2 text-sm text-left flex items-center justify-between","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",i&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[t.jsx("span",{className:f(e?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:e?y():"Select time"}),t.jsx("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})]}),i&&t.jsx("div",{className:"absolute top-full left-0 mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:t.jsxs("div",{className:"flex gap-1 p-2",children:[t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:"Hour"}),t.jsx("div",{className:"h-48 overflow-y-auto w-16 border border-gray-200 dark:border-gray-700 rounded",children:T.map(C=>t.jsx("button",{onClick:()=>{c(C),p(C,g,a?w:void 0)},className:f("w-full px-3 py-1.5 text-sm text-center","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",C===d&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:C},C))})]}),t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:"Min"}),t.jsx("div",{className:"h-48 overflow-y-auto w-16 border border-gray-200 dark:border-gray-700 rounded",children:N.map(C=>t.jsx("button",{onClick:()=>{h(C),p(d,C,a?w:void 0)},className:f("w-full px-3 py-1.5 text-sm text-center","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",C===g&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:C},C))})]}),a&&t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 text-center mb-1 px-2",children:" "}),t.jsxs("div",{className:"h-48 flex flex-col justify-center gap-2 w-16",children:[t.jsx("button",{onClick:()=>{m("AM"),p(d,g,"AM")},className:f("px-3 py-2 text-sm text-center rounded","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",w==="AM"&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:"AM"}),t.jsx("button",{onClick:()=>{m("PM"),p(d,g,"PM")},className:f("px-3 py-2 text-sm text-center rounded","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",w==="PM"&&"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 font-medium"),children:"PM"})]})]})]})})]})},Js=[{code:"US",name:"United States",dialCode:"+1",flag:"🇺🇸"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"🇬🇧"},{code:"CA",name:"Canada",dialCode:"+1",flag:"🇨🇦"},{code:"AU",name:"Australia",dialCode:"+61",flag:"🇦🇺"},{code:"DE",name:"Germany",dialCode:"+49",flag:"🇩🇪"},{code:"FR",name:"France",dialCode:"+33",flag:"🇫🇷"},{code:"IT",name:"Italy",dialCode:"+39",flag:"🇮🇹"},{code:"ES",name:"Spain",dialCode:"+34",flag:"🇪🇸"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"🇲🇽"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"🇧🇷"},{code:"IN",name:"India",dialCode:"+91",flag:"🇮🇳"},{code:"CN",name:"China",dialCode:"+86",flag:"🇨🇳"},{code:"JP",name:"Japan",dialCode:"+81",flag:"🇯🇵"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"🇰🇷"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"🇸🇬"}],Rs=({value:e,onChange:r,country:a,onCountryChange:n,countries:o=Js,placeholder:s="Phone number",disabled:i=!1,className:l})=>{const[d,c]=v.useState(o[0]?.code||"US"),[g,h]=v.useState(!1),[w,m]=v.useState(""),b=a!==void 0?a:d,y=o.find(k=>k.code===b),p=k=>{a!==void 0&&n?n(k):c(k),h(!1),m("")},T=k=>{const S=k.replace(/\D/g,"");return y?.dialCode==="+1"?S.length<=3?S:S.length<=6?`(${S.slice(0,3)}) ${S.slice(3)}`:`(${S.slice(0,3)}) ${S.slice(3,6)}-${S.slice(6,10)}`:S},N=k=>{const S=T(k.target.value);r(S)},C=o.filter(k=>k.name.toLowerCase().includes(w.toLowerCase())||k.dialCode.includes(w)||k.code.toLowerCase().includes(w.toLowerCase()));return t.jsxs("div",{className:f("relative w-full",l),children:[t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("div",{className:"relative",children:[t.jsxs("button",{type:"button",onClick:()=>!i&&h(!g),disabled:i,className:f("flex items-center gap-2 px-3 py-2 min-w-[120px]","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",g&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[t.jsx("span",{className:"text-xl",children:y?.flag}),t.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:y?.dialCode}),t.jsx("svg",{className:f("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",g&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),g&&t.jsxs("div",{className:"absolute top-full left-0 mt-1 w-72 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:[t.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:t.jsx("input",{type:"text",value:w,onChange:k=>m(k.target.value),placeholder:"Search countries...",className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400",onClick:k=>k.stopPropagation()})}),t.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:C.length===0?t.jsx("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:"No countries found"}):C.map(k=>t.jsxs("button",{onClick:()=>p(k.code),className:f("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",k.code===b&&"bg-blue-50 dark:bg-blue-900/30"),children:[t.jsx("span",{className:"text-xl",children:k.flag}),t.jsx("span",{className:"flex-1 text-sm text-gray-900 dark:text-white",children:k.name}),t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:k.dialCode})]},k.code))})]})]}),t.jsx("input",{type:"tel",value:e,onChange:N,placeholder:s,disabled:i,className:f("flex-1 px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]}),e&&y&&t.jsxs("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:["Full number: ",y.dialCode," ",e]}),g&&t.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>h(!1)})]})},ei=({checked:e,defaultChecked:r=!1,onChange:a,label:n,description:o,disabled:s=!1,size:i="md",variant:l="primary",color:d,className:c,id:g,name:h,value:w,required:m=!1,indeterminate:b=!1,error:y=!1,errorMessage:p,icon:T})=>{const[N,C]=v.useState(r),k=e!==void 0,S=k?e:N,I={sm:{box:"w-4 h-4",check:"w-3 h-3",text:"text-sm",desc:"text-xs"},md:{box:"w-5 h-5",check:"w-4 h-4",text:"text-base",desc:"text-sm"},lg:{box:"w-6 h-6",check:"w-5 h-5",text:"text-lg",desc:"text-base"}},M=d?{blue:"primary",green:"success",yellow:"warning",red:"error"}[d]:l,x=()=>y?S?"bg-red-600 border-red-600":"border-red-600 dark:border-red-500":{primary:S?"bg-blue-600 border-blue-600":"border-gray-300 dark:border-gray-600",success:S?"bg-green-600 border-green-600":"border-gray-300 dark:border-gray-600",warning:S?"bg-yellow-600 border-yellow-600":"border-gray-300 dark:border-gray-600",error:S?"bg-red-600 border-red-600":"border-gray-300 dark:border-gray-600"}[M],O=B=>{if(s)return;const z=B.target.checked;k||C(z),a?.(z)},D=B=>{if(!s&&(B.key===" "||B.key==="Spacebar")){B.preventDefault();const z=!S;k||C(z),a?.(z)}},U=I[i];return t.jsxs("div",{className:f("inline-flex flex-col",c),children:[t.jsxs("label",{className:f("inline-flex items-start gap-2 cursor-pointer",s&&"opacity-50 cursor-not-allowed"),children:[t.jsxs("div",{className:"relative flex items-center",children:[t.jsx("input",{type:"checkbox",checked:S,defaultChecked:k?void 0:r,onChange:O,onKeyDown:D,disabled:s,id:g,name:h,value:w,required:m,className:"sr-only peer"}),t.jsx("div",{"data-indeterminate":b?"true":void 0,className:f("rounded border-2 flex items-center justify-center transition-colors bg-white dark:bg-gray-900",U.box,x(),!s&&"hover:border-opacity-75"),children:b?t.jsx(fe.MinusIcon,{className:f("text-white",U.check)}):S?T||t.jsx(fe.CheckIcon,{className:f("text-white",U.check)}):null})]}),(n||o)&&t.jsxs("div",{className:"flex flex-col",children:[n&&t.jsx("span",{className:f("text-gray-900 dark:text-white",U.text),children:n}),o&&t.jsx("span",{className:f("text-gray-600 dark:text-gray-400",U.desc),children:o})]})]}),p&&t.jsx("span",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:p})]})},va=Y.forwardRef(({className:e,...r},a)=>t.jsx(br.Root,{className:f("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),...r,ref:a,children:t.jsx(br.Thumb,{className:f("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")})}));va.displayName=br.Root.displayName;const ri=({name:e="radio-group",value:r,onChange:a,options:n,label:o,orientation:s="vertical",disabled:i=!1,error:l=!1,errorMessage:d,required:c=!1,size:g="md",renderOption:h,className:w})=>{const m=v.useRef(null),y={sm:{radio:"w-4 h-4",label:"text-sm",description:"text-xs"},md:{radio:"w-5 h-5",label:"text-base",description:"text-sm"},lg:{radio:"w-6 h-6",label:"text-lg",description:"text-base"}}[g],p=(N,C)=>{!i&&!C&&a(N)},T=(N,C)=>{const k=n.filter(I=>!I.disabled&&!i),S=k.findIndex(I=>I.value===n[C].value);if(N.key==="ArrowDown"||N.key==="ArrowRight"){N.preventDefault();const I=(S+1)%k.length;a(k[I].value)}else if(N.key==="ArrowUp"||N.key==="ArrowLeft"){N.preventDefault();const I=(S-1+k.length)%k.length;a(k[I].value)}};return t.jsxs("div",{className:f("w-full",w),children:[o&&t.jsx("div",{className:"mb-2",children:t.jsxs("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:[o,c&&t.jsx("span",{className:"text-red-600 ml-1",children:"*"})]})}),t.jsx("div",{ref:m,className:f(s==="horizontal"?"flex flex-row gap-4":"flex flex-col space-y-2"),role:"radiogroup",children:n.map((N,C)=>{const k=i||N.disabled,S=r===N.value;return t.jsxs("label",{className:f("flex items-start cursor-pointer",k&&"opacity-50 cursor-not-allowed",l&&"border-red-600 dark:border-red-500"),children:[t.jsx("input",{type:"radio",name:e,value:N.value,checked:S,onChange:()=>p(N.value,!!N.disabled),onKeyDown:I=>T(I,C),disabled:k,className:f("mt-0.5 mr-2",y.radio,"text-blue-600 bg-white dark:bg-gray-900","border-gray-300 dark:border-gray-600","focus:ring-blue-500 focus:ring-2","transition-colors",l&&"border-red-600 dark:border-red-500",k&&"cursor-not-allowed")}),t.jsx("div",{className:"flex-1 min-w-0",children:h?h(N):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:f("font-medium text-gray-700 dark:text-gray-300",y.label),children:N.label}),N.description&&t.jsx("p",{className:f("text-gray-500 dark:text-gray-400 mt-0.5",y.description),children:N.description})]})})]},N.value)})}),d&&t.jsx("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:d})]})},_r=$.Root,ti=$.Group,wa=$.Value,tr=Y.forwardRef(({className:e,children:r,...a},n)=>t.jsxs($.Trigger,{ref:n,className:f("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),...a,children:[r,t.jsx($.Icon,{asChild:!0,children:t.jsx(Re.ChevronDown,{className:"h-4 w-4 opacity-50 ml-2 flex-shrink-0"})})]}));tr.displayName=$.Trigger.displayName;const zr=Y.forwardRef(({className:e,...r},a)=>t.jsx($.ScrollUpButton,{ref:a,className:f("flex cursor-default items-center justify-center py-1",e),...r,children:t.jsx(Re.ChevronUp,{className:"h-4 w-4"})}));zr.displayName=$.ScrollUpButton.displayName;const Br=Y.forwardRef(({className:e,...r},a)=>t.jsx($.ScrollDownButton,{ref:a,className:f("flex cursor-default items-center justify-center py-1",e),...r,children:t.jsx(Re.ChevronDown,{className:"h-4 w-4"})}));Br.displayName=$.ScrollDownButton.displayName;const ar=Y.forwardRef(({className:e,children:r,position:a="popper",...n},o)=>t.jsx($.Portal,{children:t.jsxs($.Content,{ref:o,className:f(_.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",a==="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:a,...n,children:[t.jsx(zr,{}),t.jsx($.Viewport,{className:f(_.overlays.dropdown.itemContainer(),a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),t.jsx(Br,{})]})}));ar.displayName=$.Content.displayName;const ka=Y.forwardRef(({className:e,...r},a)=>t.jsx($.Label,{ref:a,className:f(_.overlays.dropdown.header(),"py-1.5",e),...r}));ka.displayName=$.Label.displayName;const nr=Y.forwardRef(({className:e,children:r,...a},n)=>t.jsxs($.Item,{ref:n,className:f(_.overlays.dropdown.item(),"relative select-none justify-between pr-8 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[t.jsx($.ItemText,{children:r}),t.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:t.jsx($.ItemIndicator,{children:t.jsx(Re.Check,{className:"h-4 w-4"})})})]}));nr.displayName=$.Item.displayName;const xa=Y.forwardRef(({className:e,...r},a)=>t.jsx($.Separator,{ref:a,className:f("my-1 h-px bg-gray-200 dark:bg-gray-700",e),...r}));xa.displayName=$.Separator.displayName;const ai=({options:e,value:r,onChange:a,placeholder:n="Select items...",searchPlaceholder:o="Search...",searchable:s=!0,maxDisplay:i=3,disabled:l=!1,className:d})=>{const[c,g]=v.useState(!1),[h,w]=v.useState(""),m=v.useRef(null),b=s?e.filter(k=>k.label.toLowerCase().includes(h.toLowerCase())):e,y=e.filter(k=>r.includes(k.value)),p=k=>{r.includes(k)?a(r.filter(S=>S!==k)):a([...r,k])},T=k=>{a(r.filter(S=>S!==k))};v.useEffect(()=>{const k=S=>{m.current&&!m.current.contains(S.target)&&(g(!1),w(""))};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[]);const N=y.length,C=N>i?N-i:0;return t.jsxs("div",{ref:m,className:f("relative w-full",d),children:[t.jsx("button",{type:"button",onClick:()=>!l&&g(!c),disabled:l,className:f("w-full min-h-[42px] px-3 py-2 text-sm text-left","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",c&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:t.jsx("div",{className:"flex flex-wrap gap-1.5",children:y.length===0?t.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:n}):t.jsxs(t.Fragment,{children:[y.slice(0,i).map(k=>t.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded text-xs font-medium",children:[k.label,t.jsx("button",{onClick:S=>{S.stopPropagation(),T(k.value)},className:"hover:text-blue-900 dark:hover:text-blue-100",children:t.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},k.value)),C>0&&t.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded text-xs font-medium",children:["+",C," more"]})]})})}),c&&t.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg",children:[s&&t.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:t.jsx("input",{type:"text",value:h,onChange:k=>w(k.target.value),placeholder:o,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400",onClick:k=>k.stopPropagation()})}),t.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:b.length===0?t.jsx("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:"No options found"}):b.map(k=>{const S=r.includes(k.value);return t.jsxs("button",{onClick:()=>!k.disabled&&p(k.value),disabled:k.disabled,className:f("w-full px-3 py-2 text-sm text-left flex items-center gap-2","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),children:[t.jsx("div",{className:f("w-4 h-4 border-2 rounded flex items-center justify-center",S?"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500":"border-gray-300 dark:border-gray-600"),children:S&&t.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),t.jsx("span",{className:"flex-1 text-gray-900 dark:text-white",children:k.label})]},k.value)})}),r.length>0&&t.jsxs("div",{className:"p-2 border-t border-gray-200 dark:border-gray-700 flex justify-between items-center",children:[t.jsxs("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:[r.length," selected"]}),t.jsx("button",{onClick:k=>{k.stopPropagation(),a([])},className:"text-xs text-blue-600 dark:text-blue-400 hover:underline",children:"Clear all"})]})]})]})},ni=({options:e,value:r,onChange:a,placeholder:n="Select option...",searchPlaceholder:o="Search...",emptyMessage:s="No results found.",disabled:i=!1,className:l})=>{const[d,c]=v.useState(!1),[g,h]=v.useState(""),[w,m]=v.useState(0),b=v.useRef(null),y=v.useRef(null),p=e.filter(k=>k.label.toLowerCase().includes(g.toLowerCase())),T=e.find(k=>k.value===r);v.useEffect(()=>{if(!d)return;const k=S=>{b.current&&!b.current.contains(S.target)&&(c(!1),h(""))};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[d]),v.useEffect(()=>{d&&y.current&&y.current.focus()},[d]),v.useEffect(()=>{m(0)},[g]);const N=k=>{if(!d){(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),c(!0));return}switch(k.key){case"ArrowDown":k.preventDefault(),m(S=>S<p.length-1?S+1:S);break;case"ArrowUp":k.preventDefault(),m(S=>S>0?S-1:S);break;case"Enter":k.preventDefault(),p[w]&&!p[w].disabled&&(a(p[w].value),c(!1),h(""));break;case"Escape":k.preventDefault(),c(!1),h("");break}},C=(k,S)=>{S||(a(k),c(!1),h(""))};return t.jsxs("div",{ref:b,className:f("relative w-full",l),children:[t.jsxs("button",{type:"button",onClick:()=>!i&&c(!d),onKeyDown:N,disabled:i,className:f("w-full flex items-center justify-between","px-3 py-2 text-sm text-left","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",d&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[t.jsx("span",{className:f("truncate",!T&&"text-gray-500 dark:text-gray-400"),children:T?T.label:n}),t.jsx("svg",{className:f("w-4 h-4 ml-2 transition-transform",d&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),d&&t.jsxs("div",{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg",children:[t.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:t.jsx("input",{ref:y,type:"text",value:g,onChange:k=>h(k.target.value),onKeyDown:N,placeholder:o,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border-none rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"})}),t.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:p.length===0?t.jsx("div",{className:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400 text-center",children:s}):p.map((k,S)=>t.jsx("button",{onClick:()=>C(k.value,k.disabled),disabled:k.disabled,className:f("w-full px-3 py-2 text-sm text-left","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",k.value===r?"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":S===w?"bg-gray-100 dark:bg-gray-800":"hover:bg-gray-50 dark:hover:bg-gray-800"),children:k.label},k.value))})]})]})};function or(e,r){v.useEffect(()=>{const a=n=>{const o=e?.current;!o||o.contains(n?.target||null)||r(n)};return document.addEventListener("mousedown",a),document.addEventListener("touchstart",a),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("touchstart",a)}},[e,r])}const oi=({trigger:e,items:r,align:a="right",className:n="",variant:o="default"})=>{const[s,i]=v.useState(!1),l=v.useRef(null);or(l,()=>i(!1));const d=h=>{h.disabled||(h.onClick(),i(!1))},c=a==="left"?_.overlays.dropdown.menuRight():_.overlays.dropdown.menuLeft(),g=o==="bordered"?_.overlays.dropdown.triggerBordered():_.overlays.dropdown.trigger();return t.jsxs("div",{className:`${_.overlays.dropdown.container()} ${n}`,ref:l,children:[t.jsx("div",{className:g,onClick:()=>i(!s),children:e}),s&&t.jsx("div",{className:`${_.overlays.dropdown.menu()} ${c} ${_.overlays.dropdown.menuBottom()}`,children:t.jsx("div",{className:_.overlays.dropdown.itemContainer(),children:r.map(h=>h.separator?t.jsx("div",{className:"my-1 h-px bg-gray-200 dark:bg-gray-700",role:"separator"},h.id):t.jsxs("button",{onClick:()=>d(h),disabled:h.disabled,className:`${h.disabled?_.overlays.dropdown.itemDisabled():_.overlays.dropdown.item()} flex items-center gap-2`,children:[h.icon&&t.jsx(h.icon,{className:_.overlays.dropdown.itemIcon()}),t.jsx("span",{children:h.label})]},h.id))})})]})},si=({options:e,value:r,values:a=[],onChange:n,onValuesChange:o,multiple:s=!1,size:i="md",variant:l="default",className:d})=>{const c=(m,b)=>{if(!b)if(s){const y=a.includes(m)?a.filter(p=>p!==m):[...a,m];o?.(y)}else n?.(m)},g=m=>s?a.includes(m):r===m,h={sm:"text-xs px-2 py-1",md:"text-sm px-3 py-2",lg:"text-base px-4 py-2"},w={default:{base:"bg-gray-100 dark:bg-gray-800",button:"hover:bg-gray-200 dark:hover:bg-gray-700",selected:"bg-white dark:bg-gray-900 shadow-sm"},outline:{base:"border border-gray-200 dark:border-gray-700",button:"hover:bg-gray-50 dark:hover:bg-gray-800",selected:"bg-gray-100 dark:bg-gray-800 border-gray-300 dark:border-gray-600"}};return t.jsx("div",{className:f("inline-flex rounded-lg p-1 gap-1",w[l].base,d),role:"group",children:e.map(m=>{const b=g(m.value);return t.jsxs("button",{onClick:()=>c(m.value,m.disabled),disabled:m.disabled,className:f("inline-flex items-center justify-center gap-2","rounded-md font-medium","transition-all duration-150","disabled:opacity-50 disabled:cursor-not-allowed",h[i],b?w[l].selected:w[l].button,b?"text-gray-900 dark:text-white":"text-gray-600 dark:text-gray-400"),"aria-pressed":b,children:[m.icon&&t.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:m.icon}),m.label]},m.value)})})},ii=({value:e,onChange:r,min:a=0,max:n=100,step:o=1,disabled:s=!1,showValue:i=!1,formatValue:l=b=>String(b),showMinMax:d=!1,minLabel:c,maxLabel:g,variant:h="primary",size:w="md",className:m})=>{const b={sm:"h-1",md:"h-2",lg:"h-3"},y={primary:"accent-blue-600 dark:accent-blue-500",success:"accent-green-600 dark:accent-green-500",warning:"accent-yellow-600 dark:accent-yellow-500",danger:"accent-red-600 dark:accent-red-500"},p=N=>{r(Number(N.target.value))},T=(e-a)/(n-a)*100;return t.jsxs("div",{className:f("w-full",m),children:[i&&t.jsxs("div",{className:"flex justify-between items-center mb-2",children:[t.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:l(e)}),d&&t.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[c||a," - ",g||n]})]}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:f("absolute inset-0 rounded-full","bg-gray-200 dark:bg-gray-700",b[w])}),t.jsx("div",{className:f("absolute left-0 rounded-full transition-all","bg-current",y[h],b[w]),style:{width:`${T}%`}}),t.jsx("input",{type:"range",min:a,max:n,step:o,value:e,onChange:p,disabled:s,className:f("relative w-full appearance-none bg-transparent cursor-pointer","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500","rounded-lg",b[w],y[h],s&&"opacity-50 cursor-not-allowed","[&::-webkit-slider-thumb]:appearance-none","[&::-webkit-slider-thumb]:w-4","[&::-webkit-slider-thumb]:h-4","[&::-webkit-slider-thumb]:rounded-full","[&::-webkit-slider-thumb]:bg-white","[&::-webkit-slider-thumb]:border-2","[&::-webkit-slider-thumb]:border-current","[&::-webkit-slider-thumb]:shadow-md","[&::-webkit-slider-thumb]:transition-transform","[&::-webkit-slider-thumb]:hover:scale-110","[&::-moz-range-thumb]:w-4","[&::-moz-range-thumb]:h-4","[&::-moz-range-thumb]:rounded-full","[&::-moz-range-thumb]:bg-white","[&::-moz-range-thumb]:border-2","[&::-moz-range-thumb]:border-current","[&::-moz-range-thumb]:shadow-md","[&::-moz-range-thumb]:transition-transform","[&::-moz-range-thumb]:hover:scale-110")})]}),d&&!i&&t.jsxs("div",{className:"flex justify-between mt-1",children:[t.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:c||a}),t.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:g||n})]})]})},li=({value:e,onChange:r,min:a=0,max:n=100,step:o=1,showValue:s=!0,className:i})=>t.jsxs("div",{className:f("flex items-center gap-4",i),children:[t.jsx("input",{type:"range",min:a,max:n,step:o,value:e,onChange:l=>r(Number(l.target.value)),className:"flex-1 accent-blue-500"}),s&&t.jsx("span",{className:"w-12 text-center font-semibold text-gray-900 dark:text-white",children:e})]}),ci=({onChange:e,accept:r,multiple:a=!1,maxSize:n,maxFiles:o,disabled:s=!1,showDropZone:i=!1,showFileList:l=!0,files:d=[],onRemove:c,className:g,buttonText:h="Choose Files",dropZoneText:w="Drop files here or click to browse"})=>{const m=v.useRef(null),[b,y]=v.useState(!1),[p,T]=v.useState(null),N=O=>(T(null),o&&d.length+O.length>o?(T(`Maximum ${o} files allowed`),[]):O.filter(U=>n&&U.size>n?(T(`File "${U.name}" exceeds maximum size of ${Wr(n)}`),!1):!0)),C=O=>{const D=Array.from(O.target.files||[]),U=N(D);U.length>0&&e(U),m.current&&(m.current.value="")},k=()=>{m.current?.click()},S=O=>{O.preventDefault(),O.stopPropagation(),s||y(!0)},I=O=>{O.preventDefault(),O.stopPropagation(),y(!1)},E=O=>{O.preventDefault(),O.stopPropagation()},M=O=>{if(O.preventDefault(),O.stopPropagation(),y(!1),s)return;const D=Array.from(O.dataTransfer.files),U=N(D);U.length>0&&e(U)},x=O=>{c&&c(O)};return i?t.jsxs("div",{className:f("w-full",g),children:[t.jsx("input",{ref:m,type:"file",onChange:C,accept:r,multiple:a,disabled:s,className:"hidden"}),t.jsx("div",{onClick:k,onDragEnter:S,onDragLeave:I,onDragOver:E,onDrop:M,className:f("relative border-2 border-dashed rounded-lg p-8","transition-colors duration-200","cursor-pointer",b?"border-blue-500 bg-blue-50 dark:bg-blue-900/10":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500",s&&"opacity-50 cursor-not-allowed"),children:t.jsxs("div",{className:"flex flex-col items-center justify-center space-y-3",children:[t.jsx(L.CloudArrowUpIcon,{className:"h-12 w-12 text-gray-400 dark:text-gray-500"}),t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 text-center",children:w}),n&&t.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-500",children:["Max file size: ",Wr(n)]})]})}),p&&t.jsx("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:p}),l&&d.length>0&&t.jsx(Na,{files:d,onRemove:x})]}):t.jsxs("div",{className:f("w-full",g),children:[t.jsx("input",{ref:m,type:"file",onChange:C,accept:r,multiple:a,disabled:s,className:"hidden"}),t.jsxs("button",{type:"button",onClick:k,disabled:s,className:f("inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600","rounded-lg shadow-sm text-sm font-medium","text-gray-700 dark:text-gray-300","bg-white dark:bg-gray-800","hover:bg-gray-50 dark:hover:bg-gray-700","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors",s&&"opacity-50 cursor-not-allowed"),children:[t.jsx(L.DocumentIcon,{className:"h-5 w-5 mr-2"}),h]}),p&&t.jsx("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:p}),l&&d.length>0&&t.jsx(Na,{files:d,onRemove:x})]})},Na=({files:e,onRemove:r})=>t.jsx("div",{className:"mt-3 space-y-2",children:e.map((a,n)=>t.jsxs("div",{className:"flex items-center justify-between p-2 bg-gray-50 dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700",children:[t.jsxs("div",{className:"flex items-center space-x-2 flex-1 min-w-0",children:[t.jsx(L.DocumentIcon,{className:"h-5 w-5 text-gray-400 flex-shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 truncate",children:a.name}),t.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:Wr(a.size)})]})]}),t.jsx("button",{type:"button",onClick:()=>r(n),className:"flex-shrink-0 p-1 text-gray-400 hover:text-red-600 dark:hover:text-red-400 transition-colors","aria-label":"Remove file",children:t.jsx(L.XMarkIcon,{className:"h-5 w-5"})})]},`${a.name}-${n}`))});function Wr(e){if(e===0)return"0 Bytes";const r=1024,a=["Bytes","KB","MB","GB"],n=Math.floor(Math.log(e)/Math.log(r));return Math.round(e/Math.pow(r,n)*100)/100+" "+a[n]}const di=({value:e,onChange:r,placeholder:a="Type and press Enter...",maxTags:n,validate:o,validator:s,separators:i=[],allowDuplicates:l=!1,disabled:d=!1,error:c=!1,errorMessage:g,variant:h="primary",renderTag:w,className:m})=>{const b=o||s,[y,p]=v.useState(""),T=v.useRef(null),N={primary:"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",secondary:"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300",success:"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300",warning:"bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-300",error:"bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300"},C=M=>{const x=M.trim();x&&(n&&e.length>=n||!l&&e.includes(x)||b&&!b(x)||(r([...e,x]),p("")))},k=M=>{r(e.filter((x,O)=>O!==M))},S=M=>{p(M.target.value)},I=M=>{M.key==="Enter"&&(M.preventDefault(),y.trim()&&C(y)),M.key===","&&(M.preventDefault(),y.trim()&&C(y)),i.length>0&&i.includes(M.key)&&M.key!==","&&(M.preventDefault(),y.trim()&&C(y)),M.key==="Backspace"&&!y&&e.length>0&&k(e.length-1),M.key==="Escape"&&p("")},E=n!==void 0&&e.length>=n;return t.jsxs("div",{className:f("w-full",m),children:[t.jsxs("div",{className:f("min-h-[42px] px-3 py-2 flex flex-wrap gap-2 items-center","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus-within:ring-2 focus-within:ring-blue-500 dark:focus-within:ring-blue-400","transition-all",d&&"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-800",c&&"border-red-500 dark:border-red-400"),onClick:()=>!d&&T.current?.focus(),children:[e.map((M,x)=>w?t.jsx(v.Fragment,{children:w(M,x,()=>k(x))},x):t.jsxs("span",{className:f("inline-flex items-center gap-1.5 px-2.5 py-1",N[h],"text-sm font-medium","rounded-md","transition-colors"),children:[t.jsx("span",{className:"truncate max-w-[200px]",children:M}),t.jsx("button",{type:"button",onClick:O=>{O.stopPropagation(),k(x)},disabled:d,className:f("flex-shrink-0 hover:text-blue-900 dark:hover:text-blue-100","transition-colors","disabled:cursor-not-allowed"),"aria-label":`Remove ${M}`,children:t.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},x)),t.jsx("input",{ref:T,type:"text",value:y,onChange:S,onKeyDown:I,placeholder:e.length===0?a:E?`Max ${n} tags`:"",disabled:d,className:f("flex-1 min-w-[120px] outline-none bg-transparent","text-sm text-gray-900 dark:text-white","placeholder:text-gray-500 dark:placeholder:text-gray-400","disabled:cursor-not-allowed")})]}),g&&t.jsx("p",{className:"mt-1.5 text-xs text-red-600 dark:text-red-400",children:g}),n&&t.jsxs("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:[e.length," / ",n," tags"]})]})},ui=({value:e,onChange:r,mentions:a,trigger:n="@",placeholder:o="Type a message...",disabled:s=!1,className:i})=>{const[l,d]=v.useState(!1),[c,g]=v.useState([]),[h,w]=v.useState(0),[m,b]=v.useState(0),y=v.useRef(null),p=v.useRef(null),T=k=>{const S=k.target.value,I=k.target.selectionStart||0;r(S),b(I);const M=S.substring(0,I).split(/\s/),x=M[M.length-1];if(x.startsWith(n)){const O=x.substring(n.length),D=a.filter(U=>U.label.toLowerCase().includes(O.toLowerCase()));g(D),d(D.length>0),w(0)}else d(!1)},N=k=>{const S=e.substring(0,m),I=e.substring(m),E=S.split(/\s/),M=E[E.length-1],x=S.length-M.length,O=e.substring(0,x)+n+k.label+" "+I;if(r(O),d(!1),y.current){const D=x+n.length+k.label.length+1;setTimeout(()=>{y.current?.focus(),y.current?.setSelectionRange(D,D)},0)}},C=k=>{if(l)switch(k.key){case"ArrowDown":k.preventDefault(),w(S=>S<c.length-1?S+1:S);break;case"ArrowUp":k.preventDefault(),w(S=>S>0?S-1:S);break;case"Enter":k.preventDefault(),c[h]&&N(c[h]);break;case"Escape":k.preventDefault(),d(!1);break}};return v.useEffect(()=>{const k=S=>{p.current&&!p.current.contains(S.target)&&y.current&&!y.current.contains(S.target)&&d(!1)};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[]),t.jsxs("div",{className:f("relative w-full",i),children:[t.jsx("textarea",{ref:y,value:e,onChange:T,onKeyDown:C,placeholder:o,disabled:s,className:f("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed","resize-none","min-h-[100px]")}),l&&t.jsx("div",{ref:p,className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg max-h-60 overflow-y-auto",children:c.map((k,S)=>t.jsxs("button",{onClick:()=>N(k),className:f("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",S===h&&"bg-blue-50 dark:bg-blue-900/30"),children:[k.avatar&&t.jsx("img",{src:k.avatar,alt:k.label,className:"w-8 h-8 rounded-full"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:k.label}),k.metadata&&t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:k.metadata})]})]},k.id))})]})},gi=X.cva(`${P.label.default()} peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),Fr=Y.forwardRef(({className:e,...r},a)=>t.jsx(ft.Root,{ref:a,className:f(gi(),e),...r}));Fr.displayName=ft.Root.displayName;const hi=({id:e,label:r,type:a="text",value:n,onChange:o,placeholder:s,helperText:i,error:l,required:d=!1,disabled:c=!1,maxLength:g,autoFocus:h=!1,className:w,inputClassName:m})=>{const b=!!l,y=i||l?`${e}-helper`:void 0;return t.jsxs("div",{className:f("space-y-2",w),children:[t.jsxs(Fr,{htmlFor:e,children:[r,d&&t.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),t.jsx(rr,{type:a,id:e,value:n,onChange:o,placeholder:s,disabled:c,maxLength:g,autoFocus:h,required:d,"aria-invalid":b,"aria-describedby":y,className:m}),(i||l)&&t.jsx("p",{id:y,className:f(P.body.sm(),b?"text-red-600 dark:text-red-400":"text-gray-500 dark:text-gray-400"),role:b?"alert":void 0,children:l||i})]})},sr=({label:e,required:r=!1,error:a,helpText:n,children:o,layout:s="vertical",className:i="",labelClassName:l="",contentClassName:d=""})=>{const c=s==="horizontal";return t.jsxs("div",{className:`${c?"grid grid-cols-1 md:grid-cols-3 gap-4 items-start":"space-y-2"} ${i}`,children:[t.jsxs("div",{className:c?"md:col-span-1":"",children:[t.jsxs("label",{className:`block text-sm font-medium text-gray-700 dark:text-gray-300 ${l}`,children:[e,r&&t.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),n&&!a&&t.jsxs("div",{className:"mt-1 flex items-start",children:[t.jsx(L.InformationCircleIcon,{className:"h-4 w-4 text-gray-400 mr-1 mt-0.5 flex-shrink-0"}),t.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:n})]})]}),t.jsxs("div",{className:`${c?"md:col-span-2":""} ${d}`,children:[t.jsx("div",{className:a?"relative":"",children:o}),a&&t.jsxs("div",{className:"mt-1 flex items-start",children:[t.jsx(L.ExclamationCircleIcon,{className:"h-4 w-4 text-red-500 mr-1 mt-0.5 flex-shrink-0"}),t.jsx("p",{className:"text-xs text-red-600 dark:text-red-400",children:a})]})]})]})},fi=({label:e,value:r,onChange:a,placeholder:n,required:o=!1,error:s,helpText:i,type:l="text",layout:d="vertical",className:c=""})=>t.jsx(sr,{label:e,required:o,error:s,helpText:i,layout:d,className:c,children:t.jsx("input",{type:l,value:r,onChange:g=>a(g.target.value),placeholder:n,className:`
|
|
14
14
|
block w-full px-3 py-2 border rounded-md shadow-sm
|
|
15
15
|
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500
|
|
16
16
|
dark:bg-gray-800 dark:border-gray-600 dark:text-white
|
|
17
17
|
transition-colors duration-200
|
|
18
18
|
${s?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
|
|
19
|
-
`})}),bi=({label:e,value:r,onChange:a,placeholder:n,required:o=!1,error:s,helpText:i,rows:l=4,layout:d="vertical",className:c=""})=>t.jsx(
|
|
19
|
+
`})}),bi=({label:e,value:r,onChange:a,placeholder:n,required:o=!1,error:s,helpText:i,rows:l=4,layout:d="vertical",className:c=""})=>t.jsx(sr,{label:e,required:o,error:s,helpText:i,layout:d,className:c,children:t.jsx("textarea",{value:r,onChange:g=>a(g.target.value),placeholder:n,rows:l,className:`
|
|
20
20
|
block w-full px-3 py-2 border rounded-md shadow-sm
|
|
21
21
|
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500
|
|
22
22
|
dark:bg-gray-800 dark:border-gray-600 dark:text-white
|
|
23
23
|
transition-colors duration-200 resize-vertical
|
|
24
24
|
${s?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
|
|
25
|
-
`})}),mi=({label:e,value:r,onChange:a,options:n,required:o=!1,error:s,helpText:i,placeholder:l="Select an option",layout:d="vertical",className:c=""})=>t.jsx(
|
|
25
|
+
`})}),mi=({label:e,value:r,onChange:a,options:n,required:o=!1,error:s,helpText:i,placeholder:l="Select an option",layout:d="vertical",className:c=""})=>t.jsx(sr,{label:e,required:o,error:s,helpText:i,layout:d,className:c,children:t.jsxs("select",{value:r,onChange:g=>a(g.target.value),className:`
|
|
26
26
|
block w-full px-3 py-2 border rounded-md shadow-sm
|
|
27
27
|
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500
|
|
28
28
|
dark:bg-gray-800 dark:border-gray-600 dark:text-white
|
|
29
29
|
transition-colors duration-200
|
|
30
30
|
${s?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
|
|
31
|
-
`,children:[l&&t.jsx("option",{value:"",disabled:!0,children:l}),n.map(g=>t.jsx("option",{value:g.value,disabled:g.disabled,children:g.label},g.value))]})}),yi=({successMessage:e,errorMessage:r,successTitle:a="Success",errorTitle:n="Error",autoDismissDelay:o=0,onSuccessDismiss:s,className:i=""})=>(p.useEffect(()=>{if(e&&o>0&&s){const l=setTimeout(()=>{s()},o);return()=>clearTimeout(l)}},[e,o,s]),!e&&!r?null:t.jsxs("div",{className:`space-y-3 ${i}`,children:[r&&t.jsx(yr,{variant:"error",title:n,description:r}),e&&t.jsx(yr,{variant:"success",title:a,description:e})]})),pi=({className:e,children:r,disabled:a})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"PhoneDirectory",children:r||"PhoneDirectory Component"}),Ca=X.cva("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"}}),se=Y.forwardRef(({className:e,variant:r,size:a,animation:n,asChild:o=!1,...s},i)=>{const l=o?zn.Slot:"button",d=r||"default",c=a&&a!=="default"&&a!=="icon"?a:void 0,g=m=>m?{sm:"small",lg:"large",default:"default"}[m]||m:"default",w=(()=>{if(d.startsWith("gradient")){const m=d.replace("gradient-","").replace("gradient","primary");return _.button.gradient[m]?.()||_.button.primary.default()}else{if(["wallet","connect","disconnect"].includes(d))return _.button.web3[d]?.()||_.button.primary.default();{const m=g(c);return _.button[d]?.[m]?.()||_.button.primary.default()}}})();return t.jsx(l,{className:f(Ca({size:a,animation:n}),w,e),ref:i,...s})});se.displayName="Button";const vi=({children:e,isLoading:r=!1,loadingText:a="Loading...",showSpinner:n=!0,disabled:o,...s})=>t.jsx(se,{...s,disabled:o||r,className:s.className,children:r?t.jsxs("span",{className:"flex items-center gap-2",children:[n&&t.jsx(_e,{size:"small"}),t.jsx("span",{children:a})]}):e}),Sa=({value:e,onChange:r,minDate:a,maxDate:n,disabledDates:o=[],showOutsideDays:s=!0,className:i})=>{const[l,d]=p.useState(e||new Date),c=k=>{const C=k.getFullYear(),I=k.getMonth();return new Date(C,I+1,0).getDate()},g=k=>{const C=k.getFullYear(),I=k.getMonth();return new Date(C,I,1).getDay()},h=(k,C)=>k.getFullYear()===C.getFullYear()&&k.getMonth()===C.getMonth()&&k.getDate()===C.getDate(),w=k=>a&&k<a||n&&k>n?!0:o.some(C=>h(k,C)),m=()=>{d(new Date(l.getFullYear(),l.getMonth()-1))},b=()=>{d(new Date(l.getFullYear(),l.getMonth()+1))},v=(()=>{const k=l.getFullYear(),C=l.getMonth(),I=c(l),E=g(l),M=[];if(s){const x=c(new Date(k,C-1));for(let P=E-1;P>=0;P--)M.push(new Date(k,C-1,x-P))}else for(let x=0;x<E;x++)M.push(null);for(let x=1;x<=I;x++)M.push(new Date(k,C,x));if(s){const x=42-M.length;for(let P=1;P<=x;P++)M.push(new Date(k,C+1,P))}return M})(),T=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],N=k=>{!k||w(k)||r(k)},S=l.toLocaleDateString("en-US",{month:"long",year:"numeric"});return t.jsxs("div",{className:f("bg-white dark:bg-gray-900 rounded-lg p-4",i),children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("button",{onClick:m,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Previous month",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),t.jsx("h2",{className:"text-base font-semibold text-gray-900 dark:text-white",children:S}),t.jsx("button",{onClick:b,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Next month",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),t.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:T.map(k=>t.jsx("div",{className:"text-center text-xs font-medium text-gray-600 dark:text-gray-400 py-2",children:k},k))}),t.jsx("div",{className:"grid grid-cols-7 gap-1",children:v.map((k,C)=>{if(!k)return t.jsx("div",{className:"aspect-square"},C);const I=k.getMonth()===l.getMonth(),E=e&&h(k,e),M=h(k,new Date),x=w(k);return t.jsx("button",{onClick:()=>N(k),disabled:x,className:f("aspect-square flex items-center justify-center rounded-md text-sm transition-colors","hover:bg-gray-100 dark:hover:bg-gray-800","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",I?"text-gray-900 dark:text-white":"text-gray-400 dark:text-gray-600",E&&"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",M&&!E&&"border-2 border-blue-600 dark:border-blue-400"),children:k.getDate()},C)})})]})},wi=({value:e,onChange:r,use12Hour:a=!1,minuteStep:n=1,minDate:o,maxDate:s,disabled:i=!1,className:l})=>{const[d,c]=p.useState(!1),[g,h]=p.useState(e),w=v=>{const T=v.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),N=v.getHours(),S=v.getMinutes();if(a){const k=N===0?12:N>12?N-12:N,C=N>=12?"PM":"AM";return`${T}, ${k}:${S.toString().padStart(2,"0")} ${C}`}return`${T}, ${N.toString().padStart(2,"0")}:${S.toString().padStart(2,"0")}`},m=v=>{const T=new Date(v);T.setHours(g.getHours()),T.setMinutes(g.getMinutes()),h(T),r(T)},b=v=>{const[T,N]=v.split(":").map(Number),S=new Date(g);S.setHours(T),S.setMinutes(N),h(S),r(S)},y=v=>{const T=v.getHours(),N=v.getMinutes();return`${T.toString().padStart(2,"0")}:${N.toString().padStart(2,"0")}`};return t.jsxs("div",{className:f("relative w-full",l),children:[t.jsxs("button",{type:"button",onClick:()=>!i&&c(!d),disabled:i,className:f("w-full px-3 py-2 text-sm text-left flex items-center justify-between","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",d&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[t.jsx("span",{className:"text-gray-900 dark:text-white",children:w(e)}),t.jsx("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})]}),d&&t.jsx("div",{className:"absolute top-full left-0 mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50 p-3",children:t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-xs font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Select Date"}),t.jsx(Sa,{value:g,onChange:m,minDate:o,maxDate:s})]}),t.jsx("div",{className:"h-px bg-gray-200 dark:bg-gray-700"}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-xs font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Select Time"}),t.jsx(pa,{value:y(g),onChange:b,use12Hour:a,minuteStep:n})]}),t.jsxs("div",{className:"flex gap-2 pt-2",children:[t.jsx("button",{onClick:()=>c(!1),className:f("flex-1 px-3 py-1.5 text-sm","bg-gray-100 dark:bg-gray-800","text-gray-700 dark:text-gray-300","rounded-md","hover:bg-gray-200 dark:hover:bg-gray-700","transition-colors"),children:"Cancel"}),t.jsx("button",{onClick:()=>{r(g),c(!1)},className:f("flex-1 px-3 py-1.5 text-sm","bg-blue-600 dark:bg-blue-500","text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"OK"})]})]})}),d&&t.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>c(!1)})]})},ki=({value:e,onChange:r,minDate:a,maxDate:n,disabledDates:o=[],months:s=2,className:i})=>{const[l,d]=p.useState(new Date),[c,g]=p.useState(null),h=(E,M)=>E.getFullYear()===M.getFullYear()&&E.getMonth()===M.getMonth()&&E.getDate()===M.getDate(),w=E=>a&&E<a||n&&E>n?!0:o.some(M=>h(E,M)),m=E=>{if(!e.start||!e.end&&!c)return!1;const M=e.end||c;return M?E>e.start&&E<M:!1},b=E=>e.start?h(E,e.start):!1,y=E=>e.end?h(E,e.end):!1,v=E=>{w(E)||(!e.start||e.start&&e.end?r({start:E,end:null}):E<e.start?r({start:E,end:e.start}):r({start:e.start,end:E}))},T=E=>{const M=E.getFullYear(),x=E.getMonth();return new Date(M,x+1,0).getDate()},N=E=>{const M=E.getFullYear(),x=E.getMonth();return new Date(M,x,1).getDay()},S=E=>{const M=new Date(l.getFullYear(),l.getMonth()+E),x=M.getFullYear(),P=M.getMonth(),D=T(M),U=N(M),B=[];for(let z=0;z<U;z++)B.push(null);for(let z=1;z<=D;z++)B.push(new Date(x,P,z));return{days:B,monthName:M.toLocaleDateString("en-US",{month:"long",year:"numeric"})}},k=()=>{d(new Date(l.getFullYear(),l.getMonth()-1))},C=()=>{d(new Date(l.getFullYear(),l.getMonth()+1))},I=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];return t.jsxs("div",{className:f("bg-white dark:bg-gray-900 rounded-lg p-4",i),children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("button",{onClick:k,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Previous month",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),t.jsx("button",{onClick:C,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Next month",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),t.jsx("div",{className:"grid gap-4",style:{gridTemplateColumns:`repeat(${s}, 1fr)`},children:Array.from({length:s},(E,M)=>{const{days:x,monthName:P}=S(M);return t.jsxs("div",{children:[t.jsx("h3",{className:"text-base font-semibold text-gray-900 dark:text-white mb-4 text-center",children:P}),t.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:I.map(D=>t.jsx("div",{className:"text-center text-xs font-medium text-gray-600 dark:text-gray-400 py-2",children:D},D))}),t.jsx("div",{className:"grid grid-cols-7 gap-1",children:x.map((D,U)=>{if(!D)return t.jsx("div",{className:"aspect-square"},U);const B=w(D),z=b(D),F=y(D),ne=m(D),ut=h(D,new Date);return t.jsx("button",{onClick:()=>v(D),onMouseEnter:()=>g(D),onMouseLeave:()=>g(null),disabled:B,className:f("aspect-square flex items-center justify-center rounded-md text-sm transition-colors relative","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",ne&&"bg-blue-100 dark:bg-blue-900/30",(z||F)&&"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",!z&&!F&&!ne&&"hover:bg-gray-100 dark:hover:bg-gray-800",ut&&!z&&!F&&"border-2 border-blue-600 dark:border-blue-400"),children:D.getDate()},U)})})]},M)})}),(e.start||e.end)&&t.jsx("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:t.jsxs("div",{className:"flex items-center justify-between text-sm",children:[t.jsxs("div",{children:[t.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Start: "}),t.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:e.start?.toLocaleDateString()||"Not selected"})]}),t.jsxs("div",{children:[t.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"End: "}),t.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:e.end?.toLocaleDateString()||"Not selected"})]})]})})]})},xi=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UtimeUslotUpicker",children:r||"UtimeUslotUpicker Component"}),Ni=({value:e,onChange:r,presets:a=["#000000","#FFFFFF","#FF6B6B","#4ECDC4","#45B7D1","#FFA07A","#F7DC6F","#BB8FCE","#85C1E2","#F8B500","#52B788","#E63946","#1D3557","#457B9D","#A8DADC","#F4A261","#264653","#2A9D8F"],showInput:n=!0,showOpacity:o=!1,className:s})=>{const[i,l]=p.useState(e),[d,c]=p.useState(100),g=y=>{r(y),l(y)},h=y=>{const v=y.target.value;l(v),/^#[0-9A-F]{6}$/i.test(v)&&r(v)},w=y=>{c(Number(y.target.value))},b=o?((y,v)=>{const T=parseInt(y.slice(1,3),16),N=parseInt(y.slice(3,5),16),S=parseInt(y.slice(5,7),16);return`rgba(${T}, ${N}, ${S}, ${v/100})`})(e,d):e;return t.jsxs("div",{className:f("bg-white dark:bg-gray-900 rounded-lg p-4",s),children:[t.jsx("div",{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{className:"w-16 h-16 rounded-lg border-2 border-gray-200 dark:border-gray-700 shadow-sm",style:{backgroundColor:b}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:"Selected Color"}),t.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400 mt-1 font-mono",children:[e,o&&` (${d}%)`]})]})]})}),t.jsxs("div",{className:"mb-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Preset Colors"}),t.jsx("div",{className:"grid grid-cols-6 gap-2",children:a.map(y=>t.jsx("button",{onClick:()=>g(y),className:f("w-full aspect-square rounded-md border-2 transition-all hover:scale-110",y===e?"border-blue-500 dark:border-blue-400 ring-2 ring-blue-200 dark:ring-blue-800":"border-gray-200 dark:border-gray-700"),style:{backgroundColor:y},"aria-label":`Select color ${y}`},y))})]}),n&&t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Custom Color (Hex)"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("input",{type:"text",value:i,onChange:h,placeholder:"#000000",className:"flex-1 px-3 py-2 text-sm font-mono bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"}),t.jsx("input",{type:"color",value:e,onChange:y=>g(y.target.value),className:"w-12 h-10 rounded-md cursor-pointer"})]})]}),o&&t.jsxs("div",{children:[t.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:["Opacity: ",d,"%"]}),t.jsx("input",{type:"range",min:"0",max:"100",value:d,onChange:w,className:"w-full h-2 bg-gray-200 dark:bg-gray-700 rounded-lg appearance-none cursor-pointer"})]})]})},Ci=({value:e,onChange:r,presets:a,className:n})=>{const s=a||["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff"];return t.jsxs("div",{className:f("space-y-3",n),children:[t.jsx("input",{type:"color",value:e,onChange:i=>r(i.target.value),className:"w-full h-12 rounded cursor-pointer"}),t.jsx("div",{className:"grid grid-cols-8 gap-2",children:s.map(i=>t.jsx("button",{onClick:()=>r(i),className:f("w-8 h-8 rounded border-2",e===i?"border-blue-500":"border-transparent"),style:{backgroundColor:i}},i))})]})},Si=({colors:e,selectedColor:r,onColorSelect:a,size:n="md",showNames:o=!1,showCopy:s=!1,className:i})=>{const[l,d]=p.useState(null),c={sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16"},g=()=>e.map(m=>typeof m=="string"?{hex:m}:m),h=async(m,b)=>{b.stopPropagation(),await navigator.clipboard.writeText(m),d(m),setTimeout(()=>d(null),2e3)},w=g();return t.jsx("div",{className:f("flex flex-wrap gap-3",i),children:w.map((m,b)=>{const y=r===m.hex,v=l===m.hex;return t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[t.jsx("button",{onClick:()=>a?.(m.hex),className:f("rounded-lg transition-all relative group",c[n],y&&"ring-2 ring-blue-500 ring-offset-2 dark:ring-offset-gray-900",!y&&"hover:scale-110"),style:{backgroundColor:m.hex},"aria-label":m.name||m.hex,children:s&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/50 rounded-lg",onClick:T=>h(m.hex,T),children:v?t.jsx("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):t.jsx("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})})}),o&&t.jsxs("div",{className:"text-center",children:[m.name&&t.jsx("p",{className:"text-xs font-medium text-gray-900 dark:text-white",children:m.name}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 font-mono",children:m.hex})]})]},b)})})},Ei=({onSave:e,width:r=400,height:a=200,className:n})=>t.jsxs("div",{className:f("border border-gray-300 dark:border-gray-700 rounded-lg",n),children:[t.jsx("canvas",{width:r,height:a,className:"bg-white dark:bg-gray-900"}),t.jsxs("div",{className:"flex gap-2 p-2",children:[t.jsx("button",{className:"px-3 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Clear"}),t.jsx("button",{onClick:()=>e?.(""),className:"px-3 py-1 bg-green-500 text-white rounded hover:bg-green-600",children:"Save"})]})]}),Ti=({className:e,children:r,disabled:a})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"SignatureRequest",children:r||"SignatureRequest Component"}),Ai=({value:e,onChange:r,placeholder:a,className:n})=>t.jsxs("div",{className:f("border border-gray-300 dark:border-gray-700 rounded-lg",n),children:[t.jsx("div",{className:"flex gap-1 p-2 border-b border-gray-300 dark:border-gray-700",children:["B","I","U","H1","H2","List","Link"].map(o=>t.jsx("button",{className:"px-3 py-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded text-sm font-semibold",children:o},o))}),t.jsx("textarea",{value:e,onChange:o=>r(o.target.value),placeholder:a,className:"w-full p-4 bg-white dark:bg-gray-900 text-gray-900 dark:text-white resize-none focus:outline-none",rows:10})]}),Ii=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UmarkdownUrenderer",children:r||"UmarkdownUrenderer Component"}),Mi=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UcodeUhighlighter",children:r||"UcodeUhighlighter Component"}),Li=({cardNumber:e,onCardNumberChange:r,expiryDate:a="",onExpiryDateChange:n,cvv:o="",onCVVChange:s,cardholderName:i="",onCardholderNameChange:l,showAllFields:d=!1,disabled:c=!1,className:g})=>{const h=k=>{const C=k.replace(/\s/g,"");return/^4/.test(C)?"visa":/^5[1-5]/.test(C)?"mastercard":/^3[47]/.test(C)?"amex":/^6(?:011|5)/.test(C)?"discover":"unknown"},w=h(e),m=k=>{const C=k.replace(/\D/g,"");if(h(C)==="amex"){const D=C.slice(0,15);return[D.slice(0,4),D.slice(4,10),D.slice(10,15)].filter(Boolean).join(" ")}return(C.slice(0,16).match(/.{1,4}/g)||[]).join(" ")},b=k=>{const E=k.replace(/\D/g,"").slice(0,4);return E.length>=2?`${E.slice(0,2)}/${E.slice(2)}`:E},y=k=>{const C=k.replace(/\D/g,""),I=w==="amex"?4:3;return C.slice(0,I)},v=k=>{const C=m(k.target.value);r(C)},T=k=>{if(!n)return;const C=b(k.target.value);n(C)},N=k=>{if(!s)return;const C=y(k.target.value);s(C)},S=()=>{switch(w){case"visa":return t.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[t.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#1434CB"}),t.jsx("path",{d:"M20 11l-2 10h2l2-10h-2zm8 0l-3.5 7-1.5-7h-2l2.5 10h2l5.5-10h-3zm-12 0c-1.5 0-2.5.5-2.5 1.5 0 1.5 3 1.5 3 3.5s-2.5 2-4 2l-.5-2c1 0 2-.5 2-1.5s-3-1.5-3-3.5 2.5-2 4-2l.5 2z",fill:"white"})]});case"mastercard":return t.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[t.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#EB001B"}),t.jsx("circle",{cx:"18",cy:"16",r:"8",fill:"#F79E1B"}),t.jsx("circle",{cx:"30",cy:"16",r:"8",fill:"#FF5F00"})]});case"amex":return t.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[t.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#006FCF"}),t.jsx("path",{d:"M10 12h8l2 8-2 8h-8l-2-8 2-8z",fill:"white"})]});case"discover":return t.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[t.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#FF6000"}),t.jsx("circle",{cx:"38",cy:"16",r:"6",fill:"#FFA500"})]});default:return t.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"})})}};return t.jsxs("div",{className:f("w-full space-y-3",g),children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Card number"}),t.jsxs("div",{className:"relative",children:[t.jsx("input",{type:"text",value:e,onChange:v,placeholder:"1234 5678 9012 3456",disabled:c,className:f("w-full px-3 py-2 pr-12 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")}),t.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:S()})]})]}),d&&t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Expiry date"}),t.jsx("input",{type:"text",value:a,onChange:T,placeholder:"MM/YY",disabled:c,className:f("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"CVV"}),t.jsx("input",{type:"text",value:o,onChange:N,placeholder:w==="amex"?"1234":"123",disabled:c,className:f("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]})]}),d&&t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Cardholder name"}),t.jsx("input",{type:"text",value:i,onChange:k=>l?.(k.target.value),placeholder:"John Doe",disabled:c,className:f("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]})]})},Ea=[{code:"USD",symbol:"$",name:"US Dollar",decimals:2},{code:"EUR",symbol:"€",name:"Euro",decimals:2},{code:"GBP",symbol:"£",name:"British Pound",decimals:2},{code:"JPY",symbol:"¥",name:"Japanese Yen",decimals:0},{code:"CNY",symbol:"¥",name:"Chinese Yuan",decimals:2},{code:"AUD",symbol:"A$",name:"Australian Dollar",decimals:2},{code:"CAD",symbol:"C$",name:"Canadian Dollar",decimals:2},{code:"CHF",symbol:"Fr",name:"Swiss Franc",decimals:2},{code:"INR",symbol:"₹",name:"Indian Rupee",decimals:2},{code:"BRL",symbol:"R$",name:"Brazilian Real",decimals:2}],Pi=({value:e,onChange:r,currency:a="USD",onCurrencyChange:n,currencies:o=Ea,showCurrencySelector:s=!1,placeholder:i="0.00",min:l,max:d,disabled:c=!1,className:g})=>{const[h,w]=p.useState(""),[m,b]=p.useState(!1),[y,v]=p.useState(!1),N=typeof a=="string"?o.find(M=>M.code===a)||Ea[0]:a,S=p.useCallback(M=>{const x=N.decimals??2;return M.toLocaleString("en-US",{minimumFractionDigits:x,maximumFractionDigits:x})},[N]);p.useEffect(()=>{m||w(S(e||0))},[e,S,m]);const k=M=>{const P=M.target.value.replace(/[^\d.]/g,""),D=P.split("."),U=D.length>2?`${D[0]}.${D.slice(1).join("")}`:P;w(U);let z=parseFloat(U)||0;l!==void 0&&z<l&&(z=l),d!==void 0&&z>d&&(z=d),r(z)},C=()=>{b(!0),w(e?e.toString():"")},I=()=>{b(!1),w(S(e||0))},E=M=>{n?.(M),v(!1)};return t.jsxs("div",{className:f("relative w-full",g),children:[t.jsxs("div",{className:"flex gap-2",children:[s&&t.jsxs("div",{className:"relative",children:[t.jsxs("button",{type:"button",onClick:()=>!c&&v(!y),disabled:c,className:f("flex items-center gap-2 px-3 py-2 min-w-[100px]","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",y&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[t.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:N.code}),t.jsx("svg",{className:f("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",y&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),y&&t.jsx("div",{className:"absolute top-full left-0 mt-1 w-64 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:t.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:o.map(M=>t.jsxs("button",{onClick:()=>E(M.code),className:f("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",M.code===N.code&&"bg-blue-50 dark:bg-blue-900/30"),children:[t.jsx("span",{className:"text-lg font-semibold w-8",children:M.symbol}),t.jsxs("div",{className:"flex-1",children:[t.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:M.code}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:M.name})]})]},M.code))})})]}),t.jsxs("div",{className:"relative flex-1",children:[t.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-600 dark:text-gray-400 text-sm font-medium",children:N.symbol}),t.jsx("input",{type:"text",value:h,onChange:k,onFocus:C,onBlur:I,placeholder:i,disabled:c,className:f("w-full pl-8 pr-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]})]}),(l!==void 0||d!==void 0)&&t.jsx("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:l!==void 0&&d!==void 0?`Range: ${N.symbol}${S(l)} - ${N.symbol}${S(d)}`:l!==void 0?`Minimum: ${N.symbol}${S(l)}`:`Maximum: ${N.symbol}${S(d)}`}),y&&t.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>v(!1)})]})},Oi=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UcurrencyUconverter",children:r||"UcurrencyUconverter Component"}),Ui=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UcurrencyUrates",children:r||"UcurrencyUrates Component"}),Di=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UformUbuilder",children:r||"UformUbuilder Component"}),ji=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UformUvalidator",children:r||"UformUvalidator Component"}),_i=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UformUtemplate",children:r||"UformUtemplate Component"}),zi=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UschemaUvalidator",children:r||"UschemaUvalidator Component"}),Bi=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UfieldUmapper",children:r||"UfieldUmapper Component"}),Wi=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UsurveyUbuilder",children:r||"UsurveyUbuilder Component"}),Fi=({className:e,children:r,disabled:a})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"QuizBuilder",children:r||"QuizBuilder Component"}),Vi=(e,r,a)=>{if(a)return`${a}/address/${e}`;if(!r)return null;if(r<0)return`https://explorer.solana.com/address/${e}${r===-101?"":r===-102?"?cluster=devnet":"?cluster=testnet"}`;const o={1:"https://etherscan.io",11155111:"https://sepolia.etherscan.io",5:"https://goerli.etherscan.io",137:"https://polygonscan.com",80002:"https://amoy.polygonscan.com",42161:"https://arbiscan.io",421614:"https://sepolia.arbiscan.io",10:"https://optimistic.etherscan.io",11155420:"https://sepolia-optimism.etherscan.io",8453:"https://basescan.org",84532:"https://sepolia.basescan.org"}[r];return o?`${o}/address/${e}`:null},qi=(e,r)=>r==="full"?e:r==="medium"?`${e.substring(0,10)}...${e.substring(e.length-8)}`:`${e.substring(0,6)}...${e.substring(e.length-4)}`,$i=({address:e,chainId:r,explorerUrl:a,label:n,format:o="short",showCopy:s=!0,showExplorer:i=!0,className:l="",textClassName:d=""})=>{const[c,g]=p.useState(!1),h=qi(e,o),w=Vi(e,r,a),m=async()=>{try{await navigator.clipboard.writeText(e),g(!0),setTimeout(()=>g(!1),2e3)}catch{}};return t.jsxs("div",{className:f("flex items-center gap-2",l),children:[n&&t.jsxs("span",{className:O.label.default(),children:[n,":"]}),t.jsx("span",{className:f("font-mono text-sm",o==="full"&&"break-all",d),children:h}),t.jsxs("div",{className:"flex items-center gap-1",children:[s&&t.jsx("button",{onClick:m,className:f("p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors","text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"),title:c?"Copied!":"Copy address","aria-label":"Copy address",children:c?t.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):t.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}),i&&w&&t.jsx("a",{href:w,target:"_blank",rel:"noopener noreferrer",className:f("p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors","text-gray-500 hover:text-blue-600 dark:text-gray-400 dark:hover:text-blue-400"),title:"View on block explorer","aria-label":"View on block explorer",children:t.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})})]})]})},Hi=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UanimatedUcounter",children:r||"UanimatedUcounter Component"}),Ta=()=>typeof document<"u"&&typeof document.createElement=="function"&&typeof document.getElementById=="function",Gi=e=>{if(typeof document<"u"&&document.getElementById)try{return document.getElementById(e)}catch{}return null},Yi=e=>{if(typeof document<"u"&&document.createElement)try{return document.createElement(e)}catch{}return null},Ki=e=>{const r=typeof document<"u"?document.head:null;if(r&&e)try{return r.appendChild(e),!0}catch{}return!1},or=({animation:e="fade-in-up",delay:r=0,duration:a=600,once:n=!0,children:o,className:s="",threshold:i=.1})=>{const[l,d]=p.useState(!1),[c,g]=p.useState(!1),h=p.useRef(null);p.useEffect(()=>{if(!Ta()||typeof IntersectionObserver>"u"){d(!0),n&&g(!0);return}const m=new IntersectionObserver(([y])=>{y.isIntersecting&&(!c||!n)?(d(!0),n&&g(!0)):n||d(!1)},{threshold:i}),b=h.current;return b&&m.observe(b),()=>{b&&m.unobserve(b)}},[i,n,c]);const w=()=>{if(e==="none")return"";const m=`transition-all duration-${a} ease-out`,b=r>0?`delay-${r}`:"",y={"fade-in-up":l?`opacity-100 translate-y-0 ${m} ${b}`:`opacity-0 translate-y-8 ${m} ${b}`,"fade-in-scale":l?`opacity-100 scale-100 ${m} ${b}`:`opacity-0 scale-95 ${m} ${b}`,"fade-in-left":l?`opacity-100 translate-x-0 ${m} ${b}`:`opacity-0 -translate-x-8 ${m} ${b}`,"fade-in-right":l?`opacity-100 translate-x-0 ${m} ${b}`:`opacity-0 translate-x-8 ${m} ${b}`,"slide-in-bottom":l?`translate-y-0 ${m} ${b}`:`translate-y-full ${m} ${b}`,"zoom-in":l?`opacity-100 scale-100 ${m} ${b}`:`opacity-0 scale-50 ${m} ${b}`,float:"animate-float","bounce-slow":"animate-bounce-slow"};return y[e]||y["fade-in-up"]};return p.useEffect(()=>{if(Ta()&&(e==="float"||e==="bounce-slow")){const m="animated-section-keyframes";if(!Gi(m)){const b=Yi("style");b&&(b.id=m,b.textContent=`
|
|
31
|
+
`,children:[l&&t.jsx("option",{value:"",disabled:!0,children:l}),n.map(g=>t.jsx("option",{value:g.value,disabled:g.disabled,children:g.label},g.value))]})}),yi=({successMessage:e,errorMessage:r,successTitle:a="Success",errorTitle:n="Error",autoDismissDelay:o=0,onSuccessDismiss:s,className:i=""})=>(v.useEffect(()=>{if(e&&o>0&&s){const l=setTimeout(()=>{s()},o);return()=>clearTimeout(l)}},[e,o,s]),!e&&!r?null:t.jsxs("div",{className:`space-y-3 ${i}`,children:[r&&t.jsx(pr,{variant:"error",title:n,description:r}),e&&t.jsx(pr,{variant:"success",title:a,description:e})]})),pi=({className:e,children:r,disabled:a})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"PhoneDirectory",children:r||"PhoneDirectory Component"}),Ca=X.cva("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"}}),se=Y.forwardRef(({className:e,variant:r,size:a,animation:n,asChild:o=!1,...s},i)=>{const l=o?zn.Slot:"button",d=r||"default",c=a&&a!=="default"&&a!=="icon"?a:void 0,g=m=>m?{sm:"small",lg:"large",default:"default"}[m]||m:"default",w=(()=>{if(d.startsWith("gradient")){const m=d.replace("gradient-","").replace("gradient","primary");return _.button.gradient[m]?.()||_.button.primary.default()}else{if(["wallet","connect","disconnect"].includes(d))return _.button.web3[d]?.()||_.button.primary.default();{const m=g(c);return _.button[d]?.[m]?.()||_.button.primary.default()}}})();return t.jsx(l,{className:f(Ca({size:a,animation:n}),w,e),ref:i,...s})});se.displayName="Button";const vi=({children:e,isLoading:r=!1,loadingText:a="Loading...",showSpinner:n=!0,disabled:o,...s})=>t.jsx(se,{...s,disabled:o||r,className:s.className,children:r?t.jsxs("span",{className:"flex items-center gap-2",children:[n&&t.jsx(Be,{size:"small"}),t.jsx("span",{children:a})]}):e}),Sa=({value:e,onChange:r,minDate:a,maxDate:n,disabledDates:o=[],showOutsideDays:s=!0,className:i})=>{const[l,d]=v.useState(e||new Date),c=k=>{const S=k.getFullYear(),I=k.getMonth();return new Date(S,I+1,0).getDate()},g=k=>{const S=k.getFullYear(),I=k.getMonth();return new Date(S,I,1).getDay()},h=(k,S)=>k.getFullYear()===S.getFullYear()&&k.getMonth()===S.getMonth()&&k.getDate()===S.getDate(),w=k=>a&&k<a||n&&k>n?!0:o.some(S=>h(k,S)),m=()=>{d(new Date(l.getFullYear(),l.getMonth()-1))},b=()=>{d(new Date(l.getFullYear(),l.getMonth()+1))},p=(()=>{const k=l.getFullYear(),S=l.getMonth(),I=c(l),E=g(l),M=[];if(s){const x=c(new Date(k,S-1));for(let O=E-1;O>=0;O--)M.push(new Date(k,S-1,x-O))}else for(let x=0;x<E;x++)M.push(null);for(let x=1;x<=I;x++)M.push(new Date(k,S,x));if(s){const x=42-M.length;for(let O=1;O<=x;O++)M.push(new Date(k,S+1,O))}return M})(),T=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],N=k=>{!k||w(k)||r(k)},C=l.toLocaleDateString("en-US",{month:"long",year:"numeric"});return t.jsxs("div",{className:f("bg-white dark:bg-gray-900 rounded-lg p-4",i),children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("button",{onClick:m,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Previous month",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),t.jsx("h2",{className:"text-base font-semibold text-gray-900 dark:text-white",children:C}),t.jsx("button",{onClick:b,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Next month",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),t.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:T.map(k=>t.jsx("div",{className:"text-center text-xs font-medium text-gray-600 dark:text-gray-400 py-2",children:k},k))}),t.jsx("div",{className:"grid grid-cols-7 gap-1",children:p.map((k,S)=>{if(!k)return t.jsx("div",{className:"aspect-square"},S);const I=k.getMonth()===l.getMonth(),E=e&&h(k,e),M=h(k,new Date),x=w(k);return t.jsx("button",{onClick:()=>N(k),disabled:x,className:f("aspect-square flex items-center justify-center rounded-md text-sm transition-colors","hover:bg-gray-100 dark:hover:bg-gray-800","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",I?"text-gray-900 dark:text-white":"text-gray-400 dark:text-gray-600",E&&"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",M&&!E&&"border-2 border-blue-600 dark:border-blue-400"),children:k.getDate()},S)})})]})},wi=({value:e,onChange:r,use12Hour:a=!1,minuteStep:n=1,minDate:o,maxDate:s,disabled:i=!1,className:l})=>{const[d,c]=v.useState(!1),[g,h]=v.useState(e),w=p=>{const T=p.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),N=p.getHours(),C=p.getMinutes();if(a){const k=N===0?12:N>12?N-12:N,S=N>=12?"PM":"AM";return`${T}, ${k}:${C.toString().padStart(2,"0")} ${S}`}return`${T}, ${N.toString().padStart(2,"0")}:${C.toString().padStart(2,"0")}`},m=p=>{const T=new Date(p);T.setHours(g.getHours()),T.setMinutes(g.getMinutes()),h(T),r(T)},b=p=>{const[T,N]=p.split(":").map(Number),C=new Date(g);C.setHours(T),C.setMinutes(N),h(C),r(C)},y=p=>{const T=p.getHours(),N=p.getMinutes();return`${T.toString().padStart(2,"0")}:${N.toString().padStart(2,"0")}`};return t.jsxs("div",{className:f("relative w-full",l),children:[t.jsxs("button",{type:"button",onClick:()=>!i&&c(!d),disabled:i,className:f("w-full px-3 py-2 text-sm text-left flex items-center justify-between","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",d&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[t.jsx("span",{className:"text-gray-900 dark:text-white",children:w(e)}),t.jsx("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})]}),d&&t.jsx("div",{className:"absolute top-full left-0 mt-1 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50 p-3",children:t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-xs font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Select Date"}),t.jsx(Sa,{value:g,onChange:m,minDate:o,maxDate:s})]}),t.jsx("div",{className:"h-px bg-gray-200 dark:bg-gray-700"}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-xs font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Select Time"}),t.jsx(pa,{value:y(g),onChange:b,use12Hour:a,minuteStep:n})]}),t.jsxs("div",{className:"flex gap-2 pt-2",children:[t.jsx("button",{onClick:()=>c(!1),className:f("flex-1 px-3 py-1.5 text-sm","bg-gray-100 dark:bg-gray-800","text-gray-700 dark:text-gray-300","rounded-md","hover:bg-gray-200 dark:hover:bg-gray-700","transition-colors"),children:"Cancel"}),t.jsx("button",{onClick:()=>{r(g),c(!1)},className:f("flex-1 px-3 py-1.5 text-sm","bg-blue-600 dark:bg-blue-500","text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"OK"})]})]})}),d&&t.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>c(!1)})]})},ki=({value:e,onChange:r,minDate:a,maxDate:n,disabledDates:o=[],months:s=2,className:i})=>{const[l,d]=v.useState(new Date),[c,g]=v.useState(null),h=(E,M)=>E.getFullYear()===M.getFullYear()&&E.getMonth()===M.getMonth()&&E.getDate()===M.getDate(),w=E=>a&&E<a||n&&E>n?!0:o.some(M=>h(E,M)),m=E=>{if(!e.start||!e.end&&!c)return!1;const M=e.end||c;return M?E>e.start&&E<M:!1},b=E=>e.start?h(E,e.start):!1,y=E=>e.end?h(E,e.end):!1,p=E=>{w(E)||(!e.start||e.start&&e.end?r({start:E,end:null}):E<e.start?r({start:E,end:e.start}):r({start:e.start,end:E}))},T=E=>{const M=E.getFullYear(),x=E.getMonth();return new Date(M,x+1,0).getDate()},N=E=>{const M=E.getFullYear(),x=E.getMonth();return new Date(M,x,1).getDay()},C=E=>{const M=new Date(l.getFullYear(),l.getMonth()+E),x=M.getFullYear(),O=M.getMonth(),D=T(M),U=N(M),B=[];for(let z=0;z<U;z++)B.push(null);for(let z=1;z<=D;z++)B.push(new Date(x,O,z));return{days:B,monthName:M.toLocaleDateString("en-US",{month:"long",year:"numeric"})}},k=()=>{d(new Date(l.getFullYear(),l.getMonth()-1))},S=()=>{d(new Date(l.getFullYear(),l.getMonth()+1))},I=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];return t.jsxs("div",{className:f("bg-white dark:bg-gray-900 rounded-lg p-4",i),children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("button",{onClick:k,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Previous month",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),t.jsx("button",{onClick:S,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-md transition-colors","aria-label":"Next month",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),t.jsx("div",{className:"grid gap-4",style:{gridTemplateColumns:`repeat(${s}, 1fr)`},children:Array.from({length:s},(E,M)=>{const{days:x,monthName:O}=C(M);return t.jsxs("div",{children:[t.jsx("h3",{className:"text-base font-semibold text-gray-900 dark:text-white mb-4 text-center",children:O}),t.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:I.map(D=>t.jsx("div",{className:"text-center text-xs font-medium text-gray-600 dark:text-gray-400 py-2",children:D},D))}),t.jsx("div",{className:"grid grid-cols-7 gap-1",children:x.map((D,U)=>{if(!D)return t.jsx("div",{className:"aspect-square"},U);const B=w(D),z=b(D),V=y(D),ee=m(D),Le=h(D,new Date);return t.jsx("button",{onClick:()=>p(D),onMouseEnter:()=>g(D),onMouseLeave:()=>g(null),disabled:B,className:f("aspect-square flex items-center justify-center rounded-md text-sm transition-colors relative","disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent",ee&&"bg-blue-100 dark:bg-blue-900/30",(z||V)&&"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600",!z&&!V&&!ee&&"hover:bg-gray-100 dark:hover:bg-gray-800",Le&&!z&&!V&&"border-2 border-blue-600 dark:border-blue-400"),children:D.getDate()},U)})})]},M)})}),(e.start||e.end)&&t.jsx("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:t.jsxs("div",{className:"flex items-center justify-between text-sm",children:[t.jsxs("div",{children:[t.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Start: "}),t.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:e.start?.toLocaleDateString()||"Not selected"})]}),t.jsxs("div",{children:[t.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"End: "}),t.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:e.end?.toLocaleDateString()||"Not selected"})]})]})})]})},xi=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UtimeUslotUpicker",children:r||"UtimeUslotUpicker Component"}),Ni=({value:e,onChange:r,presets:a=["#000000","#FFFFFF","#FF6B6B","#4ECDC4","#45B7D1","#FFA07A","#F7DC6F","#BB8FCE","#85C1E2","#F8B500","#52B788","#E63946","#1D3557","#457B9D","#A8DADC","#F4A261","#264653","#2A9D8F"],showInput:n=!0,showOpacity:o=!1,className:s})=>{const[i,l]=v.useState(e),[d,c]=v.useState(100),g=y=>{r(y),l(y)},h=y=>{const p=y.target.value;l(p),/^#[0-9A-F]{6}$/i.test(p)&&r(p)},w=y=>{c(Number(y.target.value))},b=o?((y,p)=>{const T=parseInt(y.slice(1,3),16),N=parseInt(y.slice(3,5),16),C=parseInt(y.slice(5,7),16);return`rgba(${T}, ${N}, ${C}, ${p/100})`})(e,d):e;return t.jsxs("div",{className:f("bg-white dark:bg-gray-900 rounded-lg p-4",s),children:[t.jsx("div",{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{className:"w-16 h-16 rounded-lg border-2 border-gray-200 dark:border-gray-700 shadow-sm",style:{backgroundColor:b}}),t.jsxs("div",{className:"flex-1",children:[t.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:"Selected Color"}),t.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400 mt-1 font-mono",children:[e,o&&` (${d}%)`]})]})]})}),t.jsxs("div",{className:"mb-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Preset Colors"}),t.jsx("div",{className:"grid grid-cols-6 gap-2",children:a.map(y=>t.jsx("button",{onClick:()=>g(y),className:f("w-full aspect-square rounded-md border-2 transition-all hover:scale-110",y===e?"border-blue-500 dark:border-blue-400 ring-2 ring-blue-200 dark:ring-blue-800":"border-gray-200 dark:border-gray-700"),style:{backgroundColor:y},"aria-label":`Select color ${y}`},y))})]}),n&&t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Custom Color (Hex)"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("input",{type:"text",value:i,onChange:h,placeholder:"#000000",className:"flex-1 px-3 py-2 text-sm font-mono bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"}),t.jsx("input",{type:"color",value:e,onChange:y=>g(y.target.value),className:"w-12 h-10 rounded-md cursor-pointer"})]})]}),o&&t.jsxs("div",{children:[t.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:["Opacity: ",d,"%"]}),t.jsx("input",{type:"range",min:"0",max:"100",value:d,onChange:w,className:"w-full h-2 bg-gray-200 dark:bg-gray-700 rounded-lg appearance-none cursor-pointer"})]})]})},Ci=({value:e,onChange:r,presets:a,className:n})=>{const s=a||["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff"];return t.jsxs("div",{className:f("space-y-3",n),children:[t.jsx("input",{type:"color",value:e,onChange:i=>r(i.target.value),className:"w-full h-12 rounded cursor-pointer"}),t.jsx("div",{className:"grid grid-cols-8 gap-2",children:s.map(i=>t.jsx("button",{onClick:()=>r(i),className:f("w-8 h-8 rounded border-2",e===i?"border-blue-500":"border-transparent"),style:{backgroundColor:i}},i))})]})},Si=({colors:e,selectedColor:r,onColorSelect:a,size:n="md",showNames:o=!1,showCopy:s=!1,className:i})=>{const[l,d]=v.useState(null),c={sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16"},g=()=>e.map(m=>typeof m=="string"?{hex:m}:m),h=async(m,b)=>{b.stopPropagation(),await navigator.clipboard.writeText(m),d(m),setTimeout(()=>d(null),2e3)},w=g();return t.jsx("div",{className:f("flex flex-wrap gap-3",i),children:w.map((m,b)=>{const y=r===m.hex,p=l===m.hex;return t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[t.jsx("button",{onClick:()=>a?.(m.hex),className:f("rounded-lg transition-all relative group",c[n],y&&"ring-2 ring-blue-500 ring-offset-2 dark:ring-offset-gray-900",!y&&"hover:scale-110"),style:{backgroundColor:m.hex},"aria-label":m.name||m.hex,children:s&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/50 rounded-lg",onClick:T=>h(m.hex,T),children:p?t.jsx("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):t.jsx("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})})}),o&&t.jsxs("div",{className:"text-center",children:[m.name&&t.jsx("p",{className:"text-xs font-medium text-gray-900 dark:text-white",children:m.name}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 font-mono",children:m.hex})]})]},b)})})},Ei=({onSave:e,width:r=400,height:a=200,className:n})=>t.jsxs("div",{className:f("border border-gray-300 dark:border-gray-700 rounded-lg",n),children:[t.jsx("canvas",{width:r,height:a,className:"bg-white dark:bg-gray-900"}),t.jsxs("div",{className:"flex gap-2 p-2",children:[t.jsx("button",{className:"px-3 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Clear"}),t.jsx("button",{onClick:()=>e?.(""),className:"px-3 py-1 bg-green-500 text-white rounded hover:bg-green-600",children:"Save"})]})]}),Ti=({className:e,children:r,disabled:a})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"SignatureRequest",children:r||"SignatureRequest Component"}),Ai=({value:e,onChange:r,placeholder:a,className:n})=>t.jsxs("div",{className:f("border border-gray-300 dark:border-gray-700 rounded-lg",n),children:[t.jsx("div",{className:"flex gap-1 p-2 border-b border-gray-300 dark:border-gray-700",children:["B","I","U","H1","H2","List","Link"].map(o=>t.jsx("button",{className:"px-3 py-1 hover:bg-gray-100 dark:hover:bg-gray-800 rounded text-sm font-semibold",children:o},o))}),t.jsx("textarea",{value:e,onChange:o=>r(o.target.value),placeholder:a,className:"w-full p-4 bg-white dark:bg-gray-900 text-gray-900 dark:text-white resize-none focus:outline-none",rows:10})]}),Ii=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UmarkdownUrenderer",children:r||"UmarkdownUrenderer Component"}),Mi=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UcodeUhighlighter",children:r||"UcodeUhighlighter Component"}),Li=({cardNumber:e,onCardNumberChange:r,expiryDate:a="",onExpiryDateChange:n,cvv:o="",onCVVChange:s,cardholderName:i="",onCardholderNameChange:l,showAllFields:d=!1,disabled:c=!1,className:g})=>{const h=k=>{const S=k.replace(/\s/g,"");return/^4/.test(S)?"visa":/^5[1-5]/.test(S)?"mastercard":/^3[47]/.test(S)?"amex":/^6(?:011|5)/.test(S)?"discover":"unknown"},w=h(e),m=k=>{const S=k.replace(/\D/g,"");if(h(S)==="amex"){const D=S.slice(0,15);return[D.slice(0,4),D.slice(4,10),D.slice(10,15)].filter(Boolean).join(" ")}return(S.slice(0,16).match(/.{1,4}/g)||[]).join(" ")},b=k=>{const E=k.replace(/\D/g,"").slice(0,4);return E.length>=2?`${E.slice(0,2)}/${E.slice(2)}`:E},y=k=>{const S=k.replace(/\D/g,""),I=w==="amex"?4:3;return S.slice(0,I)},p=k=>{const S=m(k.target.value);r(S)},T=k=>{if(!n)return;const S=b(k.target.value);n(S)},N=k=>{if(!s)return;const S=y(k.target.value);s(S)},C=()=>{switch(w){case"visa":return t.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[t.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#1434CB"}),t.jsx("path",{d:"M20 11l-2 10h2l2-10h-2zm8 0l-3.5 7-1.5-7h-2l2.5 10h2l5.5-10h-3zm-12 0c-1.5 0-2.5.5-2.5 1.5 0 1.5 3 1.5 3 3.5s-2.5 2-4 2l-.5-2c1 0 2-.5 2-1.5s-3-1.5-3-3.5 2.5-2 4-2l.5 2z",fill:"white"})]});case"mastercard":return t.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[t.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#EB001B"}),t.jsx("circle",{cx:"18",cy:"16",r:"8",fill:"#F79E1B"}),t.jsx("circle",{cx:"30",cy:"16",r:"8",fill:"#FF5F00"})]});case"amex":return t.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[t.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#006FCF"}),t.jsx("path",{d:"M10 12h8l2 8-2 8h-8l-2-8 2-8z",fill:"white"})]});case"discover":return t.jsxs("svg",{className:"w-8 h-5",viewBox:"0 0 48 32",fill:"none",children:[t.jsx("rect",{width:"48",height:"32",rx:"4",fill:"#FF6000"}),t.jsx("circle",{cx:"38",cy:"16",r:"6",fill:"#FFA500"})]});default:return t.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"})})}};return t.jsxs("div",{className:f("w-full space-y-3",g),children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Card number"}),t.jsxs("div",{className:"relative",children:[t.jsx("input",{type:"text",value:e,onChange:p,placeholder:"1234 5678 9012 3456",disabled:c,className:f("w-full px-3 py-2 pr-12 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")}),t.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:C()})]})]}),d&&t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Expiry date"}),t.jsx("input",{type:"text",value:a,onChange:T,placeholder:"MM/YY",disabled:c,className:f("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"CVV"}),t.jsx("input",{type:"text",value:o,onChange:N,placeholder:w==="amex"?"1234":"123",disabled:c,className:f("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]})]}),d&&t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Cardholder name"}),t.jsx("input",{type:"text",value:i,onChange:k=>l?.(k.target.value),placeholder:"John Doe",disabled:c,className:f("w-full px-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]})]})},Ea=[{code:"USD",symbol:"$",name:"US Dollar",decimals:2},{code:"EUR",symbol:"€",name:"Euro",decimals:2},{code:"GBP",symbol:"£",name:"British Pound",decimals:2},{code:"JPY",symbol:"¥",name:"Japanese Yen",decimals:0},{code:"CNY",symbol:"¥",name:"Chinese Yuan",decimals:2},{code:"AUD",symbol:"A$",name:"Australian Dollar",decimals:2},{code:"CAD",symbol:"C$",name:"Canadian Dollar",decimals:2},{code:"CHF",symbol:"Fr",name:"Swiss Franc",decimals:2},{code:"INR",symbol:"₹",name:"Indian Rupee",decimals:2},{code:"BRL",symbol:"R$",name:"Brazilian Real",decimals:2}],Pi=({value:e,onChange:r,currency:a="USD",onCurrencyChange:n,currencies:o=Ea,showCurrencySelector:s=!1,placeholder:i="0.00",min:l,max:d,disabled:c=!1,className:g})=>{const[h,w]=v.useState(""),[m,b]=v.useState(!1),[y,p]=v.useState(!1),N=typeof a=="string"?o.find(M=>M.code===a)||Ea[0]:a,C=v.useCallback(M=>{const x=N.decimals??2;return M.toLocaleString("en-US",{minimumFractionDigits:x,maximumFractionDigits:x})},[N]);v.useEffect(()=>{m||w(C(e||0))},[e,C,m]);const k=M=>{const O=M.target.value.replace(/[^\d.]/g,""),D=O.split("."),U=D.length>2?`${D[0]}.${D.slice(1).join("")}`:O;w(U);let z=parseFloat(U)||0;l!==void 0&&z<l&&(z=l),d!==void 0&&z>d&&(z=d),r(z)},S=()=>{b(!0),w(e?e.toString():"")},I=()=>{b(!1),w(C(e||0))},E=M=>{n?.(M),p(!1)};return t.jsxs("div",{className:f("relative w-full",g),children:[t.jsxs("div",{className:"flex gap-2",children:[s&&t.jsxs("div",{className:"relative",children:[t.jsxs("button",{type:"button",onClick:()=>!c&&p(!y),disabled:c,className:f("flex items-center gap-2 px-3 py-2 min-w-[100px]","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",y&&"ring-2 ring-blue-500 dark:ring-blue-400"),children:[t.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:N.code}),t.jsx("svg",{className:f("w-4 h-4 text-gray-600 dark:text-gray-400 transition-transform",y&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),y&&t.jsx("div",{className:"absolute top-full left-0 mt-1 w-64 bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-md shadow-lg z-50",children:t.jsx("div",{className:"max-h-60 overflow-y-auto py-1",children:o.map(M=>t.jsxs("button",{onClick:()=>E(M.code),className:f("w-full px-3 py-2 text-left flex items-center gap-3","hover:bg-gray-100 dark:hover:bg-gray-800","transition-colors",M.code===N.code&&"bg-blue-50 dark:bg-blue-900/30"),children:[t.jsx("span",{className:"text-lg font-semibold w-8",children:M.symbol}),t.jsxs("div",{className:"flex-1",children:[t.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:M.code}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:M.name})]})]},M.code))})})]}),t.jsxs("div",{className:"relative flex-1",children:[t.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-600 dark:text-gray-400 text-sm font-medium",children:N.symbol}),t.jsx("input",{type:"text",value:h,onChange:k,onFocus:S,onBlur:I,placeholder:i,disabled:c,className:f("w-full pl-8 pr-3 py-2 text-sm","bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400","disabled:opacity-50 disabled:cursor-not-allowed")})]})]}),(l!==void 0||d!==void 0)&&t.jsx("p",{className:"mt-1.5 text-xs text-gray-600 dark:text-gray-400",children:l!==void 0&&d!==void 0?`Range: ${N.symbol}${C(l)} - ${N.symbol}${C(d)}`:l!==void 0?`Minimum: ${N.symbol}${C(l)}`:`Maximum: ${N.symbol}${C(d)}`}),y&&t.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>p(!1)})]})},Oi=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UcurrencyUconverter",children:r||"UcurrencyUconverter Component"}),Ui=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UcurrencyUrates",children:r||"UcurrencyUrates Component"}),Di=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UformUbuilder",children:r||"UformUbuilder Component"}),ji=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UformUvalidator",children:r||"UformUvalidator Component"}),_i=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UformUtemplate",children:r||"UformUtemplate Component"}),zi=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UschemaUvalidator",children:r||"UschemaUvalidator Component"}),Bi=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UfieldUmapper",children:r||"UfieldUmapper Component"}),Wi=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UsurveyUbuilder",children:r||"UsurveyUbuilder Component"}),Fi=({className:e,children:r,disabled:a})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"QuizBuilder",children:r||"QuizBuilder Component"}),Vi=(e,r,a)=>{if(a)return`${a}/address/${e}`;if(!r)return null;if(r<0)return`https://explorer.solana.com/address/${e}${r===-101?"":r===-102?"?cluster=devnet":"?cluster=testnet"}`;const o={1:"https://etherscan.io",11155111:"https://sepolia.etherscan.io",5:"https://goerli.etherscan.io",137:"https://polygonscan.com",80002:"https://amoy.polygonscan.com",42161:"https://arbiscan.io",421614:"https://sepolia.arbiscan.io",10:"https://optimistic.etherscan.io",11155420:"https://sepolia-optimism.etherscan.io",8453:"https://basescan.org",84532:"https://sepolia.basescan.org"}[r];return o?`${o}/address/${e}`:null},$i=(e,r)=>r==="full"?e:r==="medium"?`${e.substring(0,10)}...${e.substring(e.length-8)}`:`${e.substring(0,6)}...${e.substring(e.length-4)}`,qi=({address:e,chainId:r,explorerUrl:a,label:n,format:o="short",showCopy:s=!0,showExplorer:i=!0,className:l="",textClassName:d=""})=>{const[c,g]=v.useState(!1),h=$i(e,o),w=Vi(e,r,a),m=async()=>{try{await navigator.clipboard.writeText(e),g(!0),setTimeout(()=>g(!1),2e3)}catch{}};return t.jsxs("div",{className:f("flex items-center gap-2",l),children:[n&&t.jsxs("span",{className:P.label.default(),children:[n,":"]}),t.jsx("span",{className:f("font-mono text-sm",o==="full"&&"break-all",d),children:h}),t.jsxs("div",{className:"flex items-center gap-1",children:[s&&t.jsx("button",{onClick:m,className:f("p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors","text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"),title:c?"Copied!":"Copy address","aria-label":"Copy address",children:c?t.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):t.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}),i&&w&&t.jsx("a",{href:w,target:"_blank",rel:"noopener noreferrer",className:f("p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors","text-gray-500 hover:text-blue-600 dark:text-gray-400 dark:hover:text-blue-400"),title:"View on block explorer","aria-label":"View on block explorer",children:t.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})})]})]})},Hi=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UanimatedUcounter",children:r||"UanimatedUcounter Component"}),Ta=()=>typeof document<"u"&&typeof document.createElement=="function"&&typeof document.getElementById=="function",Gi=e=>{if(typeof document<"u"&&document.getElementById)try{return document.getElementById(e)}catch{}return null},Yi=e=>{if(typeof document<"u"&&document.createElement)try{return document.createElement(e)}catch{}return null},Ki=e=>{const r=typeof document<"u"?document.head:null;if(r&&e)try{return r.appendChild(e),!0}catch{}return!1},ir=({animation:e="fade-in-up",delay:r=0,duration:a=600,once:n=!0,children:o,className:s="",threshold:i=.1})=>{const[l,d]=v.useState(!1),[c,g]=v.useState(!1),h=v.useRef(null);v.useEffect(()=>{if(!Ta()||typeof IntersectionObserver>"u"){d(!0),n&&g(!0);return}const m=new IntersectionObserver(([y])=>{y.isIntersecting&&(!c||!n)?(d(!0),n&&g(!0)):n||d(!1)},{threshold:i}),b=h.current;return b&&m.observe(b),()=>{b&&m.unobserve(b)}},[i,n,c]);const w=()=>{if(e==="none")return"";const m=`transition-all duration-${a} ease-out`,b=r>0?`delay-${r}`:"",y={"fade-in-up":l?`opacity-100 translate-y-0 ${m} ${b}`:`opacity-0 translate-y-8 ${m} ${b}`,"fade-in-scale":l?`opacity-100 scale-100 ${m} ${b}`:`opacity-0 scale-95 ${m} ${b}`,"fade-in-left":l?`opacity-100 translate-x-0 ${m} ${b}`:`opacity-0 -translate-x-8 ${m} ${b}`,"fade-in-right":l?`opacity-100 translate-x-0 ${m} ${b}`:`opacity-0 translate-x-8 ${m} ${b}`,"slide-in-bottom":l?`translate-y-0 ${m} ${b}`:`translate-y-full ${m} ${b}`,"zoom-in":l?`opacity-100 scale-100 ${m} ${b}`:`opacity-0 scale-50 ${m} ${b}`,float:"animate-float","bounce-slow":"animate-bounce-slow"};return y[e]||y["fade-in-up"]};return v.useEffect(()=>{if(Ta()&&(e==="float"||e==="bounce-slow")){const m="animated-section-keyframes";if(!Gi(m)){const b=Yi("style");b&&(b.id=m,b.textContent=`
|
|
32
32
|
@keyframes float {
|
|
33
33
|
0%, 100% { transform: translateY(0px); }
|
|
34
34
|
50% { transform: translateY(-20px); }
|
|
@@ -43,17 +43,17 @@ Nonce: ${h}`}function a(c,g=24){const h=new Date(c.getTime()+g*60*60*1e3);return
|
|
|
43
43
|
.animate-bounce-slow {
|
|
44
44
|
animation: bounce-slow 4s ease-in-out infinite;
|
|
45
45
|
}
|
|
46
|
-
`,Ki(b))}}},[e]),t.jsx("div",{ref:h,className:`${w()} ${s}`,children:o})},Zi=({children:e,delay:r=0,className:a=""})=>t.jsx(or,{animation:"fade-in-up",delay:r,className:a,children:e}),Xi=({children:e,delay:r=0,className:a=""})=>t.jsx(or,{animation:"fade-in-scale",delay:r,className:a,children:e}),Qi=({children:e,className:r=""})=>t.jsx(or,{animation:"float",className:r,children:e}),Ji=({isOpen:e,onClick:r,opacity:a="medium",blur:n=!1,zIndex:o=50,className:s,children:i})=>{const l={light:"bg-black/20 dark:bg-black/30",medium:"bg-black/50 dark:bg-black/60",dark:"bg-black/75 dark:bg-black/80"};return e?t.jsx("div",{onClick:r,className:f("fixed inset-0","transition-all duration-200",l[a],n&&"backdrop-blur-sm",s),style:{zIndex:o},role:"presentation","aria-hidden":"true",children:i}):null},Aa=({isOpen:e,onClose:r,children:a,size:n="md",showCloseButton:o=!0,closeOnOutsideClick:s=!0,closeOnEscape:i=!0,className:l})=>{if(p.useEffect(()=>{if(!i||!e||!r)return;const g=h=>{h.key==="Escape"&&r()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[e,r,i]),!e)return null;const d={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-full mx-4"},c=()=>{s&&r&&r()};return t.jsxs(be,{children:[t.jsx(Je,{isOpen:e,onClose:c,opacity:"dark",blur:!0}),t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:t.jsxs("div",{className:f("relative w-full",d[n],"bg-white dark:bg-gray-900","rounded-lg shadow-xl","animate-in fade-in zoom-in-95 duration-200",l),onClick:g=>g.stopPropagation(),children:[o&&r&&t.jsx("button",{onClick:r,className:"absolute top-4 right-4 z-10 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close dialog",children:t.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),a]})})]})},Ri=({isOpen:e,onClose:r,items:a,placeholder:n="Type a command or search...",emptyMessage:o="No results found.",className:s})=>{const[i,l]=p.useState(""),[d,c]=p.useState(0),g=p.useRef(null),h=a.filter(y=>{const v=i.toLowerCase();return y.label.toLowerCase().includes(v)||y.keywords?.some(T=>T.toLowerCase().includes(v))||y.group?.toLowerCase().includes(v)}),w=h.reduce((y,v)=>{const T=v.group||"Commands";return y[T]||(y[T]=[]),y[T].push(v),y},{});p.useEffect(()=>{e||(l(""),c(0))},[e]),p.useEffect(()=>{e&&g.current&&g.current.focus()},[e]),p.useEffect(()=>{c(0)},[i]);const m=y=>{switch(y.key){case"ArrowDown":y.preventDefault(),c(v=>v<h.length-1?v+1:v);break;case"ArrowUp":y.preventDefault(),c(v=>v>0?v-1:v);break;case"Enter":y.preventDefault(),h[d]&&(h[d].onSelect(),r());break;case"Escape":y.preventDefault(),r();break}},b=y=>{y.onSelect(),r()};return t.jsxs(Aa,{isOpen:e,onClose:r,size:"lg",showCloseButton:!1,className:f("overflow-hidden p-0",s),children:[t.jsx("div",{className:"border-b border-gray-200 dark:border-gray-700 p-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),t.jsx("input",{ref:g,type:"text",value:i,onChange:y=>l(y.target.value),onKeyDown:m,placeholder:n,className:"flex-1 bg-transparent border-none outline-none text-gray-900 dark:text-white placeholder-gray-500"})]})}),t.jsx("div",{className:"max-h-96 overflow-y-auto p-2",children:Object.keys(w).length===0?t.jsx("div",{className:"px-4 py-8 text-sm text-gray-500 dark:text-gray-400 text-center",children:o}):Object.entries(w).map(([y,v])=>t.jsxs("div",{className:"mb-4 last:mb-0",children:[t.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:y}),t.jsx("div",{className:"space-y-1",children:v.map(T=>{const S=h.indexOf(T)===d;return t.jsxs("button",{onClick:()=>b(T),className:f("w-full flex items-center gap-3 px-3 py-2 rounded-md","text-sm text-left transition-colors",S?"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-900 dark:text-white"),children:[T.icon&&t.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:T.icon}),t.jsx("span",{className:"flex-1 truncate",children:T.label}),T.shortcut&&t.jsx("span",{className:"flex-shrink-0 text-xs text-gray-500 dark:text-gray-400 font-mono",children:T.shortcut})]},T.id)})})]},y))}),t.jsxs("div",{className:"border-t border-gray-200 dark:border-gray-700 px-4 py-2 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"↑"}),t.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"↓"}),"to navigate"]}),t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"↵"}),"to select"]})]}),t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"esc"}),"to close"]})]})]})},el=X.cva("bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 transition-all duration-200",{variants:{variant:{default:"border-gray-200 dark:border-gray-700 border hover:shadow-lg",elevated:"shadow-lg hover:shadow-xl",minimal:"bg-transparent shadow-none border-none p-4"},trend:{none:"",up:"border-l-4 border-green-500",down:"border-l-4 border-red-500",neutral:"border-l-4 border-gray-400"}},defaultVariants:{variant:"default",trend:"none"}}),rl=({label:e,value:r,change:a,trend:n="none",icon:o,variant:s="default",className:i})=>{const l={up:"text-green-600 dark:text-green-400",down:"text-red-600 dark:text-red-400",neutral:"text-gray-600 dark:text-gray-400",none:"text-gray-600 dark:text-gray-400"},d={up:"↗",down:"↘",neutral:"→",none:""};return t.jsx("div",{className:f(el({variant:s,trend:n}),i),children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-1",children:e}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:r}),a&&t.jsxs("p",{className:f("text-sm font-medium flex items-center gap-1 mt-1",l[n||"none"]),children:[t.jsx("span",{children:d[n||"none"]}),a]})]}),o&&t.jsx("div",{className:"text-3xl opacity-80",children:o})]})})},tl=X.cva("space-y-6",{variants:{variant:{default:"",card:"bg-white dark:bg-gray-800 rounded-lg border-gray-200 dark:border-gray-700 border p-6",minimal:"space-y-4"},spacing:{tight:"space-y-3",normal:"space-y-4",relaxed:"space-y-6",loose:"space-y-8"}},defaultVariants:{variant:"default",spacing:"normal"}}),al=({title:e,description:r,children:a,variant:n="default",spacing:o="normal",className:s})=>t.jsxs("div",{className:f(tl({variant:n,spacing:o}),s),children:[(e||r)&&t.jsxs("div",{className:"space-y-1",children:[e&&t.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white",children:e}),r&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:r})]}),a]}),nl=X.cva("flex flex-col items-center text-center space-y-4",{variants:{layout:{vertical:"flex-col items-center text-center",horizontal:"flex-row items-start text-left space-y-0 space-x-4",minimal:"flex-col space-y-2"},spacing:{tight:"space-y-2",normal:"space-y-4",relaxed:"space-y-6"},interactive:{true:"transition-all duration-200 hover:transform hover:scale-105 cursor-pointer",false:""}},defaultVariants:{layout:"vertical",spacing:"normal",interactive:!1}}),ol=({icon:e,title:r,description:a,layout:n="vertical",spacing:o="normal",interactive:s=!1,className:i,onClick:l})=>t.jsxs("div",{className:f(nl({layout:n,spacing:o,interactive:s}),i),onClick:l,children:[t.jsx("div",{className:"text-4xl mb-4 flex-shrink-0",children:e}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white",children:r}),t.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:a})]})]}),sl=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UfocusUindicator",children:r||"UfocusUindicator Component"}),il=({icon:e,size:r="md",shape:a="rounded",variant:n="blue-purple",gradientClasses:o,className:s,iconClassName:i})=>{const l={sm:{container:"w-10 h-10",icon:"h-5 w-5"},md:{container:"w-12 h-12",icon:"h-6 w-6"},lg:{container:"w-16 h-16",icon:"h-8 w-8"},xl:{container:"w-20 h-20",icon:"h-10 w-10"}},d={square:"rounded-lg",rounded:"rounded-xl",circle:"rounded-full"},c={"blue-purple":"bg-gradient-to-r from-blue-600 to-purple-600","green-blue":"bg-gradient-to-r from-green-600 to-blue-600","orange-red":"bg-gradient-to-r from-orange-600 to-red-600",gray:"bg-gradient-to-r from-gray-600 to-gray-800 dark:from-gray-700 dark:to-gray-900",custom:o||"bg-gradient-to-r from-blue-600 to-purple-600"},g=l[r];return t.jsx("div",{className:f("flex items-center justify-center flex-shrink-0",g.container,d[a],c[n],s),children:t.jsx(e,{className:f("text-white",g.icon,i)})})},ll={sm:"w-12 h-12",md:"w-16 h-16",lg:"w-20 h-20",xl:"w-24 h-24"},cl={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},dl={primary:"bg-gradient-to-br from-blue-100 to-blue-200 text-blue-600 shadow-lg hover:shadow-blue-200",secondary:"bg-gradient-to-br from-purple-100 to-purple-200 text-purple-600 shadow-lg hover:shadow-purple-200",success:"bg-gradient-to-br from-green-100 to-green-200 text-green-600 shadow-lg hover:shadow-green-200",warning:"bg-gradient-to-br from-yellow-100 to-yellow-200 text-yellow-600 shadow-lg hover:shadow-yellow-200",error:"bg-gradient-to-br from-red-100 to-red-200 text-red-600 shadow-lg hover:shadow-red-200",neutral:"bg-gradient-to-br from-gray-100 to-gray-200 text-gray-600 shadow-lg hover:shadow-gray-200"},ul={square:"rounded-none",rounded:"rounded-2xl",circle:"rounded-full"},gl={none:"",float:"animate-float",pulse:"animate-pulse",bounce:"animate-bounce-slow"},hl=({children:e,size:r="lg",variant:a="primary",shape:n="rounded",animation:o="float",className:s})=>t.jsx("div",{className:f("flex items-center justify-center mx-auto mb-6 transition-all duration-300 group-hover:scale-105",ll[r],dl[a],ul[n],gl[o],s),children:t.jsx("div",{className:f(cl[r]),children:e})}),fl=({icon:e,children:r,iconPosition:a="left",gap:n="md",iconSize:o="md",align:s="left",variant:i="default",className:l,iconClassName:d,textClassName:c})=>{const g={xs:"gap-1",sm:"gap-2",md:"gap-3",lg:"gap-4"},h={xs:"h-3 w-3",sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-8 w-8"},w={left:"text-left",center:"text-center items-center",right:"text-right items-end"},m={default:"text-gray-700 dark:text-gray-300",primary:"text-blue-600 dark:text-blue-400",success:"text-green-600 dark:text-green-400",warning:"text-yellow-600 dark:text-yellow-400",danger:"text-red-600 dark:text-red-400",muted:"text-gray-500 dark:text-gray-400"},b={left:"flex items-center",right:"flex flex-row-reverse items-center",top:"flex flex-col"};return t.jsxs("div",{className:f(b[a],g[n],a==="top"&&w[s],m[i],l),children:[t.jsx(e,{className:f(h[o],"flex-shrink-0",d)}),t.jsx("span",{className:f(c),children:r})]})},bl=({children:e,title:r,variant:a="info",size:n="md",icon:o,bordered:s=!0,className:i})=>{const l={info:{bg:"bg-blue-50 dark:bg-blue-900/20",border:"border-blue-200 dark:border-blue-800",title:"text-blue-900 dark:text-blue-300",text:"text-blue-800 dark:text-blue-400",icon:"text-blue-600 dark:text-blue-400"},success:{bg:"bg-green-50 dark:bg-green-900/20",border:"border-green-200 dark:border-green-800",title:"text-green-900 dark:text-green-300",text:"text-green-800 dark:text-green-400",icon:"text-green-600 dark:text-green-400"},warning:{bg:"bg-yellow-50 dark:bg-yellow-900/20",border:"border-yellow-200 dark:border-yellow-800",title:"text-yellow-900 dark:text-yellow-300",text:"text-yellow-800 dark:text-yellow-400",icon:"text-yellow-600 dark:text-yellow-400"},danger:{bg:"bg-red-50 dark:bg-red-900/20",border:"border-red-200 dark:border-red-800",title:"text-red-900 dark:text-red-300",text:"text-red-800 dark:text-red-400",icon:"text-red-600 dark:text-red-400"},neutral:{bg:"bg-gray-50 dark:bg-gray-800",border:"border-gray-200 dark:border-gray-700",title:"text-gray-900 dark:text-gray-100",text:"text-gray-700 dark:text-gray-300",icon:"text-gray-600 dark:text-gray-400"}},d={sm:"p-3",md:"p-4",lg:"p-6"},c=l[a];return t.jsxs("div",{className:f("rounded-lg",c.bg,s&&`border ${c.border}`,d[n],i),children:[(r||o)&&t.jsxs("div",{className:"flex items-start gap-3 mb-2",children:[o&&t.jsx(o,{className:f("h-5 w-5 flex-shrink-0 mt-0.5",c.icon)}),r&&t.jsx("h3",{className:f(O.body.strong.md(),c.title),children:r})]}),t.jsx("div",{className:f(!r&&!o&&c.text),children:e})]})},ml=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UkeyboardUshortcut",children:r||"UkeyboardUshortcut Component"}),yl=({size:e="md",className:r="",showText:a=!0,onClick:n,logoSrc:o="/logo.png",logoAlt:s="Logo",logoText:i,fontFamily:l="Dancing Script, cursive"})=>{const c=(()=>{switch(e){case"sm":return{container:"space-x-2",image:"h-6 w-6",text:"text-lg"};case"md":return{container:"space-x-2",image:"h-8 w-8",text:"text-2xl"};case"lg":return{container:"space-x-3",image:"h-10 w-10",text:"text-3xl"};case"xl":return{container:"space-x-4",image:"h-12 w-12",text:"text-4xl"};default:return{container:"space-x-2",image:"h-8 w-8",text:"text-2xl"}}})(),g=t.jsxs(t.Fragment,{children:[t.jsx("img",{src:o,alt:s,className:c.image}),a&&t.jsx("div",{className:`${c.text} font-bold text-gray-900 dark:text-gray-100`,style:{fontFamily:l,fontWeight:"700"},children:i})]});return n?t.jsx("button",{onClick:n,className:`flex items-center ${c.container} ${r} hover:opacity-80 transition-opacity`,children:g}):t.jsx("div",{className:`flex items-center ${c.container} ${r}`,children:g})},pl=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UmorphUtransition",children:r||"UmorphUtransition Component"}),vl=({title:e,description:r,count:a,countLabel:n,action:o,loading:s=!1,loadingText:i="Loading...",size:l="md",className:d})=>{const g={sm:{title:O.heading.h4(),description:O.body.sm(),count:O.caption.default()},md:{title:O.heading.h3(),description:O.body.md(),count:O.body.sm()},lg:{title:O.heading.h2(),description:O.body.lg(),count:O.body.md()}}[l];return t.jsxs("div",{className:f("flex items-start justify-between gap-4",d),children:[t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[t.jsx("h2",{className:f(g.title,"text-gray-900 dark:text-gray-100"),children:e}),a!==void 0&&t.jsxs("span",{className:f(g.count,"text-gray-500 dark:text-gray-400"),children:["(",a,n&&` ${n}`,")"]}),s&&t.jsxs("span",{className:f(g.count,"text-gray-500 dark:text-gray-400 flex items-center gap-2"),children:[t.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600"}),i]})]}),r&&t.jsx("p",{className:f(g.description,"mt-1 text-gray-600 dark:text-gray-400"),children:r})]}),o&&t.jsx("div",{className:"flex-shrink-0",children:o})]})},wl=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UparallaxUscroll",children:r||"UparallaxUscroll Component"}),kl=({actions:e,orientation:r="horizontal",columns:a=3,className:n})=>{const o={default:"bg-white dark:bg-gray-900 hover:bg-gray-50 dark:hover:bg-gray-800 text-gray-900 dark:text-white border-gray-200 dark:border-gray-700",primary:"bg-blue-500 hover:bg-blue-600 text-white border-blue-500",success:"bg-green-500 hover:bg-green-600 text-white border-green-500",warning:"bg-yellow-500 hover:bg-yellow-600 text-white border-yellow-500",danger:"bg-red-500 hover:bg-red-600 text-white border-red-500"},s={horizontal:"flex flex-wrap gap-2",vertical:"flex flex-col gap-2",grid:"grid gap-2"};return t.jsx("div",{className:f(s[r],r==="grid"&&`grid-cols-${a}`,n),style:r==="grid"?{gridTemplateColumns:`repeat(${a}, 1fr)`}:void 0,children:e.map(i=>t.jsxs("button",{onClick:i.onClick,disabled:i.disabled,className:f("flex items-center justify-center gap-2 px-4 py-3 rounded-lg border transition-colors font-medium",o[i.variant||"default"],i.disabled&&"opacity-50 cursor-not-allowed"),children:[i.icon&&t.jsx("span",{className:"w-5 h-5",children:i.icon}),t.jsx("span",{children:i.label})]},i.id))})},xl=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UrevealUonUscroll",children:r||"UrevealUonUscroll Component"}),Nl={sm:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"},md:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"},lg:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"}},Cl=({icon:e,text:r,variant:a="default",size:n="md",className:o})=>{const{container:s,icon:i}=lo(a),l=Nl[n];return t.jsxs("div",{className:f("inline-flex items-center rounded-full mb-6",s,l.container,o),children:[t.jsx("div",{className:f("animate-float-icon",i,l.icon),children:e}),t.jsx("span",{className:l.text,children:r})]})},Sl=({title:e,onAdd:r,addButtonTooltip:a,loading:n,className:o=""})=>t.jsx("div",{className:`p-4 border-b border-gray-200 dark:border-gray-700 ${o}`,children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:e}),t.jsxs("div",{className:"flex items-center space-x-2",children:[n&&t.jsx("div",{className:"w-5 h-5 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"}),r&&t.jsx("button",{onClick:r,className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors",title:a,"aria-label":a||"Add",children:t.jsx("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})})]})]})}),El=e=>{switch(e){case"cog":return L.Cog6ToothIcon;case"arrow-right":return L.ArrowRightIcon;case"shield":return L.ShieldCheckIcon;case"reply":case"chat":return L.ChatBubbleLeftRightIcon;case"filter":return L.FunnelIcon;case"plug":return L.LinkIcon;case"adjustments":return L.AdjustmentsHorizontalIcon;case"currency-dollar":return L.CurrencyDollarIcon;default:return L.Cog6ToothIcon}},Tl=({settings:e,selectedSetting:r,onSettingSelect:a,className:n=""})=>t.jsx("nav",{className:f("space-y-1",n),"aria-label":"Settings navigation",children:t.jsx("ul",{className:"space-y-1",role:"list",children:e.map(o=>{const s=El(o.icon),i=r===o.id;return t.jsx("li",{children:t.jsx("button",{onClick:()=>a(o.id),className:f("w-full flex items-center text-left px-3 py-2 rounded-lg transition-colors h-[44px]",O.body.sm(),i?"bg-orange-100 dark:bg-orange-900/30 text-orange-700 dark:text-orange-300":"hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300"),"aria-current":i?"page":void 0,title:o.description,children:t.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[t.jsx(s,{className:"h-5 w-5 mr-3 flex-shrink-0","aria-hidden":"true"}),t.jsx("span",{className:"truncate",children:o.title})]})})},o.id)})})}),Al=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UskipUnavigation",children:r||"UskipUnavigation Component"}),Il=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UsortUdropdown",children:r||"UsortUdropdown Component"}),Ml=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UversionUbadge",children:r||"UversionUbadge Component"}),Ll=({children:e,as:r="span"})=>t.jsx(r,{className:"sr-only",children:e}),sr=X.cva("transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-sm",{variants:{variant:{subtle:O.link.subtle(),default:O.link.default(),muted:O.link.muted(),external:O.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"}}),Fr=Y.forwardRef(({className:e,variant:r,size:a,to:n,href:o,external:s,children:i,...l},d)=>{const c=n||o;return c?s||c.startsWith("http")||c.startsWith("mailto:")?t.jsx("a",{className:f(sr({variant:r==="subtle"?"external":r,size:a,className:e})),href:c,target:"_blank",rel:"noopener noreferrer",ref:d,...l,children:i}):t.jsx(br.Link,{className:f(sr({variant:r,size:a,className:e})),to:c,ref:d,...l,children:i}):t.jsx("span",{className:f(sr({variant:r,size:a,className:e})),...l,children:i})});Fr.displayName="SmartLink";const Pl=(e,r)=>Y.useMemo(()=>{let a=e;return Object.entries(r).forEach(([n,o])=>{const s=new RegExp(`\\b${n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");a=a.replace(s,i=>`<SmartLink to="${o}" variant="subtle">${i}</SmartLink>`)}),a},[e,r]),Ol={documentation:"/document",settings:"/settings",about:"/about",contact:"/contact","privacy policy":"/privacy",privacy:"/privacy","terms of service":"/terms",terms:"/terms","cookie policy":"/cookies",cookies:"/cookies",points:"/points","earn points":"/how-to-earn-points","how to earn points":"/how-to-earn-points","connect wallet":"/connect","connect your wallet":"/connect","wallet connection":"/connect",wallet:"/connect",compose:"/compose","compose email":"/compose","send email":"/compose",mail:"/mail",email:"/mail",inbox:"/mail",dashboard:"/mail",delegate:"/delegate",delegation:"/delegate",manage:"/manage","manage preferences":"/preferences",profile:"/settings",account:"/settings",preferences:"/preferences",token:"/token","web3 users":"/web3-users","web3 projects":"/web3-projects","get started":"/connect","start here":"/connect","learn more":"/document","read more":"/document","our features":"/document",support:"/contact",help:"/document","contact us":"/contact"},Ul=({children:e,mappings:r=Ol,className:a,variant:n="subtle"})=>{const o=Y.useMemo(()=>{if(!e||typeof e!="string")return e||"";let i=e;return Object.entries(r).sort(([d],[c])=>c.length-d.length).forEach(([d,c])=>{if(d&&c){const g=new RegExp(`\\b${d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");i=i.replace(g,h=>`__LINK_START__${c}__LINK_MID__${h}__LINK_END__`)}}),i},[e,r]);if(!o||typeof o!="string")return t.jsx("span",{className:a,children:e});const s=o.split(/(__LINK_START__.*?__LINK_END__)/);return t.jsx("span",{className:a,children:s.map((i,l)=>{const d=i.match(/__LINK_START__(.*?)__LINK_MID__(.*?)__LINK_END__/);if(d){const[,c,g]=d;return t.jsx(Fr,{to:c,variant:n,children:g},l)}return i})})},Dl=({href:e,children:r,variant:a="default",external:n=!1,showExternalIcon:o=!1,disabled:s=!1,className:i,...l})=>{const d=n||e.startsWith("http://")||e.startsWith("https://"),c={default:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",primary:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium",secondary:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100",muted:"text-gray-500 dark:text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",underline:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 underline"},g=d?{target:"_blank",rel:"noopener noreferrer"}:{};return s?t.jsxs("span",{className:f("cursor-not-allowed opacity-50",c[a],i),children:[r,o&&d&&t.jsx(L.ArrowTopRightOnSquareIcon,{className:"inline-block h-4 w-4 ml-1"})]}):t.jsxs("a",{href:e,className:f("inline-flex items-center transition-colors",c[a],i),...g,...l,children:[r,o&&d&&t.jsx(L.ArrowTopRightOnSquareIcon,{className:"inline-block h-4 w-4 ml-1 flex-shrink-0"})]})},jl=({href:e,children:r,showIcon:a=!0,iconPosition:n="right",size:o="md",variant:s="default",className:i,onClick:l})=>{const d={sm:{text:O.body.sm(),icon:"h-3 w-3",gap:"gap-1"},md:{text:O.body.md(),icon:"h-4 w-4",gap:"gap-1.5"},lg:{text:O.body.lg(),icon:"h-5 w-5",gap:"gap-2"}},c={default:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",primary:"text-blue-700 dark:text-blue-300 hover:text-blue-800 dark:hover:text-blue-200 font-semibold",muted:"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"},g=d[o];return t.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",onClick:l,className:f("inline-flex items-center",g.gap,g.text,c[s],"underline decoration-1 underline-offset-2","hover:decoration-2","transition-all duration-200",i),children:[a&&n==="left"&&t.jsx(L.ArrowTopRightOnSquareIcon,{className:f(g.icon,"flex-shrink-0")}),t.jsx("span",{children:r}),a&&n==="right"&&t.jsx(L.ArrowTopRightOnSquareIcon,{className:f(g.icon,"flex-shrink-0")})]})},_l=({items:e,separator:r="/",className:a})=>t.jsx("nav",{className:f("flex items-center gap-2 text-sm",a),children:e.map((n,o)=>t.jsxs(p.Fragment,{children:[o>0&&t.jsx("span",{className:"text-gray-400 dark:text-gray-600",children:r}),o===e.length-1?t.jsx("span",{className:"text-gray-900 dark:text-white font-medium",children:n.label}):t.jsx("button",{onClick:n.onClick,className:"text-blue-600 dark:text-blue-400 hover:underline",children:n.label})]},o))}),zl=fe.Root,Ia=Y.forwardRef(({className:e,...r},a)=>t.jsx(fe.List,{ref:a,className:f(_.navigation.tabs.list(),e),...r}));Ia.displayName=fe.List.displayName;const Ma=Y.forwardRef(({className:e,...r},a)=>t.jsx(fe.Trigger,{ref:a,className:f(_.navigation.tabs.trigger(),e),...r}));Ma.displayName=fe.Trigger.displayName;const La=Y.forwardRef(({className:e,...r},a)=>t.jsx(fe.Content,{ref:a,className:f(_.navigation.tabs.content(),e),...r}));La.displayName=fe.Content.displayName;const Bl=({items:e,orientation:r="horizontal",className:a})=>{const[n,o]=p.useState(new Set),s=l=>{o(d=>{const c=new Set(d);return c.has(l)?c.delete(l):c.add(l),c})},i=(l,d)=>{const c=l.children&&l.children.length>0,g=n.has(d),h=t.jsxs(t.Fragment,{children:[l.icon&&t.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:l.icon}),t.jsx("span",{className:"flex-1",children:l.label}),c&&t.jsx("svg",{className:f("w-4 h-4 transition-transform",r==="horizontal"&&!g&&"-rotate-90",g&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),w=f("flex items-center gap-2 px-4 py-2 text-sm font-medium","transition-colors",l.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800");return t.jsxs("div",{children:[c?t.jsx("button",{onClick:()=>s(d),className:f(w,"w-full"),children:h}):l.href?t.jsx("a",{href:l.href,className:w,onClick:l.onClick,children:h}):t.jsx("button",{onClick:l.onClick,className:f(w,"w-full"),children:h}),c&&g&&t.jsx("div",{className:f("bg-gray-50 dark:bg-gray-800/50",r==="horizontal"?"pl-4":"border-l-2 border-gray-200 dark:border-gray-700 ml-4"),children:l.children.map((m,b)=>t.jsx("div",{children:m.href?t.jsxs("a",{href:m.href,onClick:m.onClick,className:f("flex items-center gap-2 px-4 py-2 text-sm","transition-colors",m.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"),children:[m.icon&&t.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:m.icon}),m.label]}):t.jsxs("button",{onClick:m.onClick,className:f("w-full flex items-center gap-2 px-4 py-2 text-sm","transition-colors",m.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"),children:[m.icon&&t.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:m.icon}),m.label]})},b))})]},d)};return t.jsx("nav",{className:f("bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg",r==="horizontal"?"flex flex-wrap":"flex flex-col",a),children:e.map((l,d)=>i(l,d))})},Wl=({items:e,selectedPath:r,onSelect:a,variant:n="default",className:o})=>{const s=n==="compact"?"space-y-1":"space-y-0";return t.jsx("div",{className:f(s,o),children:e.map(i=>{const l=i.icon,d=r===i.path,c=i.disabled,g=f("flex items-start cursor-pointer transition-colors",n==="compact"?"p-3 rounded-lg":"p-4 border-b border-gray-200 dark:border-gray-700 last:border-b-0",c&&"opacity-50 cursor-not-allowed"),h=d?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300";return t.jsxs("div",{onClick:()=>!c&&a(i.path),className:f(g,!c&&h),role:"button",tabIndex:c?-1:0,"aria-current":d?"page":void 0,"aria-disabled":c,onKeyDown:w=>{!c&&(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),a(i.path))},children:[t.jsx(l,{className:"h-5 w-5 mt-0.5 mr-3 flex-shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:f("font-medium",O.body.md()),children:[i.label,i.badge!==void 0&&i.badge>0&&t.jsx("span",{className:"ml-2 inline-flex items-center justify-center px-2 py-0.5 text-xs font-medium bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 rounded-full",children:i.badge})]}),i.description&&t.jsx("div",{className:f("text-xs text-gray-500 dark:text-gray-400 mt-0.5"),children:i.description})]})]},i.id)})})},Fl=({items:e,className:r})=>t.jsx("nav",{className:f("flex flex-col gap-1",r),children:e.map(a=>t.jsxs("button",{onClick:a.onClick,className:f("flex items-center gap-3 px-4 py-3 rounded-lg transition-colors",a.active?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"),children:[a.icon&&t.jsx("span",{className:"w-5 h-5",children:a.icon}),t.jsx("span",{className:"flex-1 text-left font-medium",children:a.label}),a.badge&&t.jsx("span",{className:"px-2 py-0.5 bg-gray-200 dark:bg-gray-700 rounded text-xs",children:a.badge})]},a.id))}),Vl=({currentPage:e,totalPages:r,onPageChange:a,siblingCount:n=1,showFirstLast:o=!1,size:s="md",className:i})=>{const d={sm:{button:"h-8 w-8 text-xs",icon:"h-3 w-3",text:O.body.sm()},md:{button:"h-10 w-10 text-sm",icon:"h-4 w-4",text:O.body.md()},lg:{button:"h-12 w-12 text-base",icon:"h-5 w-5",text:O.body.lg()}}[s],g=(()=>{const N=[];N.push(1);const S=Math.max(e-n,2),k=Math.min(e+n,r-1);S>2&&N.push("ellipsis");for(let C=S;C<=k;C++)N.push(C);return k<r-1&&N.push("ellipsis"),r>1&&N.push(r),N})(),h=()=>{e>1&&a(e-1)},w=()=>{e<r&&a(e+1)},m=()=>{a(1)},b=()=>{a(r)},y=f("inline-flex items-center justify-center","rounded-md border border-gray-300 dark:border-gray-600","transition-all duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500","disabled:opacity-50 disabled:cursor-not-allowed"),v=N=>f(y,d.button,d.text,N?"bg-blue-600 text-white border-blue-600 dark:bg-blue-500 dark:border-blue-500":"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700"),T=f(y,d.button,"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700");return t.jsxs("nav",{className:f("flex items-center gap-1",i),"aria-label":"Pagination",children:[o&&t.jsx("button",{onClick:m,disabled:e===1,className:T,"aria-label":"Go to first page",children:t.jsx("span",{className:d.text,children:"First"})}),t.jsx("button",{onClick:h,disabled:e===1,className:T,"aria-label":"Go to previous page",children:t.jsx(L.ChevronLeftIcon,{className:d.icon})}),g.map((N,S)=>N==="ellipsis"?t.jsx("span",{className:f("inline-flex items-center justify-center",d.button,"text-gray-400 dark:text-gray-500"),children:"..."},`ellipsis-${S}`):t.jsx("button",{onClick:()=>a(N),className:v(N===e),"aria-label":`Go to page ${N}`,"aria-current":N===e?"page":void 0,children:N},N)),t.jsx("button",{onClick:w,disabled:e===r,className:T,"aria-label":"Go to next page",children:t.jsx(L.ChevronRightIcon,{className:d.icon})}),o&&t.jsx("button",{onClick:b,disabled:e===r,className:T,"aria-label":"Go to last page",children:t.jsx("span",{className:d.text,children:"Last"})})]})},ql=({currentPage:e,totalPages:r,onPageChange:a,maxVisible:n=7,className:o})=>{const s=[];if(r<=n)for(let i=1;i<=r;i++)s.push(i);else{s.push(1),e>3&&s.push("...");const i=Math.max(2,e-1),l=Math.min(r-1,e+1);for(let d=i;d<=l;d++)s.push(d);e<r-2&&s.push("..."),s.push(r)}return t.jsxs("nav",{className:f("flex items-center gap-1",o),children:[t.jsx("button",{onClick:()=>a(e-1),disabled:e===1,className:"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),s.map((i,l)=>i==="..."?t.jsx("span",{className:"px-3 py-2",children:"..."},`ellipsis-${l}`):t.jsx("button",{onClick:()=>a(i),className:f("px-3 py-2 rounded",i===e?"bg-blue-500 text-white":"hover:bg-gray-100 dark:hover:bg-gray-800"),children:i},i)),t.jsx("button",{onClick:()=>a(e+1),disabled:e===r,className:"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})},$l=({steps:e,currentStep:r,orientation:a="horizontal",clickable:n=!1,onStepClick:o,className:s})=>{const i=d=>{n&&o&&o(d)},l=d=>d<r?"completed":d===r?"active":"upcoming";return a==="horizontal"?t.jsx("div",{className:f("w-full",s),children:t.jsx("div",{className:"flex items-center justify-between",children:e.map((d,c)=>{const g=l(c),h=c===e.length-1;return t.jsxs(p.Fragment,{children:[t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("button",{onClick:()=>i(c),disabled:!n,className:f("flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all","disabled:cursor-default",n&&"hover:scale-110",g==="completed"&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500",g==="active"&&"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500",g==="upcoming"&&"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700"),children:g==="completed"?t.jsx("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}):d.icon?t.jsx("span",{className:f("w-5 h-5",g==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:d.icon}):t.jsx("span",{className:f("text-sm font-semibold",g==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:c+1})}),t.jsxs("div",{className:"mt-2 text-center",children:[t.jsx("p",{className:f("text-sm font-medium",g==="active"?"text-blue-600 dark:text-blue-500":g==="completed"?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:d.label}),d.description&&t.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:d.description})]})]}),!h&&t.jsx("div",{className:"flex-1 h-0.5 mx-2 bg-gray-300 dark:bg-gray-700 relative",children:t.jsx("div",{className:f("absolute left-0 top-0 h-full bg-blue-600 dark:bg-blue-500 transition-all duration-300",c<r?"w-full":"w-0")})})]},d.id)})})}):t.jsx("div",{className:f("w-full",s),children:t.jsx("div",{className:"space-y-4",children:e.map((d,c)=>{const g=l(c),h=c===e.length-1;return t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("button",{onClick:()=>i(c),disabled:!n,className:f("flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all","disabled:cursor-default flex-shrink-0",n&&"hover:scale-110",g==="completed"&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500",g==="active"&&"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500",g==="upcoming"&&"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700"),children:g==="completed"?t.jsx("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}):d.icon?t.jsx("span",{className:f("w-5 h-5",g==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:d.icon}):t.jsx("span",{className:f("text-sm font-semibold",g==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:c+1})}),!h&&t.jsx("div",{className:"w-0.5 flex-1 min-h-[32px] bg-gray-300 dark:bg-gray-700 relative mt-2",children:t.jsx("div",{className:f("absolute top-0 left-0 w-full bg-blue-600 dark:bg-blue-500 transition-all duration-300",c<r?"h-full":"h-0")})})]}),t.jsxs("div",{className:"flex-1 pb-4",children:[t.jsx("p",{className:f("text-sm font-medium",g==="active"?"text-blue-600 dark:text-blue-500":g==="completed"?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:d.label}),d.description&&t.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:d.description})]})]},d.id)})})})},Hl=({steps:e,currentStep:r,onStepClick:a,orientation:n="horizontal",className:o})=>t.jsx("nav",{className:f(n==="horizontal"?"flex items-center":"flex flex-col",o),children:e.map((s,i)=>t.jsxs("div",{className:f("flex items-center",n==="vertical"&&"flex-col items-start"),children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("button",{onClick:()=>a?.(i),disabled:i>r,className:f("w-10 h-10 rounded-full flex items-center justify-center font-semibold transition-colors",i<r&&"bg-green-500 text-white",i===r&&"bg-blue-500 text-white",i>r&&"bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400"),children:i<r?"✓":i+1}),t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:s.label}),s.description&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:s.description})]})]}),i<e.length-1&&t.jsx("div",{className:f(n==="horizontal"?"w-full h-0.5 mx-4":"h-8 w-0.5 ml-5 my-2","bg-gray-300 dark:bg-gray-700")})]},s.id))}),Gl=({subsections:e,isExpanded:r,selectedSubsection:a,parentSectionId:n,onSubsectionSelect:o})=>{const s=p.useRef(null),[i,l]=p.useState(void 0);return p.useEffect(()=>{if(s.current){const d=s.current.scrollHeight;l(r?d+8:0)}},[r,e]),t.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:i!==void 0?`${i}px`:"auto"},children:t.jsx("div",{ref:s,className:"ml-6 mt-2 space-y-1",children:e.map(d=>t.jsx("button",{onClick:()=>o?.(d.id,n),className:`block w-full text-left px-3 py-2 rounded-md text-sm transition-all duration-200 hover:scale-[1.02] ${a===d.id?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-800 dark:hover:text-gray-200"}`,children:d.title},d.id))})})},Yl=({sections:e,selectedSection:r,selectedSubsection:a,expandedSections:n,onSectionSelect:o,onSubsectionSelect:s,onToggleSection:i,className:l=""})=>t.jsx("nav",{className:`space-y-2 ${l}`,children:e.map(d=>t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center",children:[t.jsx("button",{onClick:()=>o(d.id),className:`flex-1 text-left px-3 py-2 rounded-md text-sm font-medium transition-all duration-200 hover:scale-[1.02] ${r===d.id&&!a?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-900 dark:hover:text-gray-100"}`,children:d.title}),d.subsections&&d.subsections.length>0&&t.jsx("button",{onClick:()=>i(d.id),className:"p-1 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200",children:t.jsx(L.ChevronRightIcon,{className:`h-4 w-4 text-gray-500 transition-transform duration-300 ease-in-out ${n.includes(d.id)?"rotate-90":"rotate-0"}`})})]}),d.subsections&&t.jsx(Gl,{subsections:d.subsections,isExpanded:n.includes(d.id),selectedSubsection:a,parentSectionId:d.id,onSubsectionSelect:s})]},d.id))});function Kl({columns:e,data:r,keyExtractor:a,sort:n,onSort:o,onRowClick:s,striped:i=!1,hoverable:l=!1,compact:d=!1,bordered:c=!1,emptyMessage:g="No data available",className:h}){const w=b=>{b.sortable&&o&&o(b.key)},m={left:"text-left",center:"text-center",right:"text-right"};return t.jsx("div",{className:f("w-full overflow-x-auto",h),children:t.jsxs("table",{className:"w-full",children:[t.jsx("thead",{className:"bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:t.jsx("tr",{children:e.map(b=>t.jsx("th",{className:f(d?"px-3 py-2":"px-6 py-3","text-xs font-medium text-gray-700 dark:text-gray-300 uppercase tracking-wider",m[b.align||"left"],b.sortable&&"cursor-pointer select-none hover:bg-gray-100 dark:hover:bg-gray-700",c&&"border-r border-gray-200 dark:border-gray-700 last:border-r-0"),style:{width:b.width},onClick:()=>b.sortable&&w(b),children:t.jsxs("div",{className:"flex items-center gap-2",children:[b.label,b.sortable&&t.jsx("span",{className:"flex flex-col",children:n?.column===b.key?n.direction==="asc"?t.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{d:"M5 10l5-5 5 5H5z"})}):t.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{d:"M15 10l-5 5-5-5h10z"})}):t.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{d:"M5 10l5-5 5 5H5z"})})})]})},b.key))})}),t.jsx("tbody",{className:"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700",children:r.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:e.length,className:"px-6 py-8 text-center text-sm text-gray-500 dark:text-gray-400",children:g})}):r.map((b,y)=>t.jsx("tr",{className:f(i&&y%2===1&&"bg-gray-50 dark:bg-gray-800/50",l&&"hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors",s&&"cursor-pointer"),onClick:()=>s?.(b,y),children:e.map(v=>t.jsx("td",{className:f(d?"px-3 py-2":"px-6 py-4","text-sm text-gray-900 dark:text-white",m[v.align||"left"],c&&"border-r border-gray-200 dark:border-gray-700 last:border-r-0"),children:v.render?v.render(b,y):b[v.key]},v.key))},a(b,y)))})]})})}const Zl=({data:e,columns:r,hasActions:a=!1,renderCell:n,renderAction:o,emptyMessage:s="No data available",getRowKey:i=(d,c)=>String(c),className:l=""})=>!e||e.length===0?t.jsx("div",{className:`text-center py-8 bg-gray-50 dark:bg-gray-800 rounded-lg ${l}`,children:t.jsx("p",{className:`${O.body.sm()} text-gray-500 dark:text-gray-400`,children:s})}):t.jsx("div",{className:`relative ${l}`,children:t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[r.map((d,c)=>t.jsx("th",{className:`${O.label.default()} text-left py-3 px-4 whitespace-nowrap`,children:d},c)),a&&t.jsx("th",{className:`${O.label.default()} text-right py-3 px-4 sticky right-0 bg-white dark:bg-gray-900 whitespace-nowrap`})]})}),t.jsx("tbody",{children:e.map((d,c)=>t.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[r.map((g,h)=>{const w=n(d,h);return t.jsx("td",{className:"py-3 px-4",children:typeof w=="string"?t.jsx("span",{className:O.body.sm(),children:w}):w},h)}),a&&t.jsx("td",{className:"py-3 px-4 text-right sticky right-0 bg-white dark:bg-gray-900",children:o?.(d)})]},i(d,c)))})]})})}),Xl=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UdataUgrid",children:r||"UdataUgrid Component"}),Ql=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UpivotUtable",children:r||"UpivotUtable Component"}),Jl=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UspreadsheetUgrid",children:r||"UspreadsheetUgrid Component"}),Rl=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UcolumnUresize",children:r||"UcolumnUresize Component"}),ec=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UcellUeditor",children:r||"UcellUeditor Component"}),rc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UtableUreservation",children:r||"UtableUreservation Component"}),tc=({children:e,type:r="unordered",spacing:a="sm",marker:n,size:o="md",className:s})=>{const i=r==="ordered"?"ol":"ul",l={none:"space-y-0",sm:"space-y-1",md:"space-y-2",lg:"space-y-4"},d={sm:"text-sm",md:"text-base",lg:"text-lg"},c=()=>n==="none"?"list-none":r==="unordered"?{disc:"list-disc",circle:"list-circle",square:"list-square",decimal:"list-disc",alpha:"list-disc",roman:"list-disc",none:"list-none"}[n||"disc"]:{decimal:"list-decimal",alpha:"list-alpha",roman:"list-roman",disc:"list-decimal",circle:"list-decimal",square:"list-decimal",none:"list-none"}[n||"decimal"];return t.jsx(i,{className:f("ml-6",c(),l[a],d[o],"text-gray-900 dark:text-gray-100",s),children:e})},ac=({children:e,className:r})=>t.jsx("li",{className:f("leading-relaxed",r),children:e}),nc=({children:e,onAction:r,actionText:a="Remove",actionIcon:n=L.TrashIcon,destructive:o=!0,isProcessing:s=!1,variant:i="default",className:l})=>{const d="flex items-center justify-between p-4 rounded-lg transition-colors",c={default:"bg-gray-50 dark:bg-gray-700",compact:"bg-gray-50 dark:bg-gray-700 py-2 px-3",elevated:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 shadow-sm hover:shadow-md"};return t.jsxs("div",{className:f(d,c[i],l),children:[t.jsx("div",{className:"flex-1 text-sm text-gray-900 dark:text-white",children:e}),t.jsxs(se,{variant:o?"ghost":"outline",size:"sm",onClick:r,disabled:s,className:f("ml-4",o&&"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 hover:bg-red-50 dark:hover:bg-red-900/20"),children:[t.jsx(n,{className:"h-4 w-4 mr-1"}),a]})]})},oc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UuserUtable",children:r||"UuserUtable Component"}),sc=({source:e,target:r,onChange:a,sourceTitle:n="Available",targetTitle:o="Selected",searchable:s=!0,sourceSearchPlaceholder:i="Search available...",targetSearchPlaceholder:l="Search selected...",height:d=300,disabled:c=!1,className:g})=>{const[h,w]=p.useState(""),[m,b]=p.useState(""),[y,v]=p.useState(new Set),[T,N]=p.useState(new Set),S=s?e.filter(U=>U.label.toLowerCase().includes(h.toLowerCase())):e,k=s?r.filter(U=>U.label.toLowerCase().includes(m.toLowerCase())):r,C=U=>{const B=new Set(y);B.has(U)?B.delete(U):B.add(U),v(B)},I=U=>{const B=new Set(T);B.has(U)?B.delete(U):B.add(U),N(B)},E=()=>{const U=e.filter(F=>y.has(F.id)),B=e.filter(F=>!y.has(F.id)),z=[...r,...U];a(B,z),v(new Set)},M=()=>{const U=r.filter(F=>T.has(F.id)),B=r.filter(F=>!T.has(F.id)),z=[...e,...U];a(z,B),N(new Set)},x=()=>{const U=[...r,...e];a([],U),v(new Set)},P=()=>{const U=[...e,...r];a(U,[]),N(new Set)},D=(U,B,z,F,ne,ut,nf)=>t.jsxs("div",{className:"flex flex-col flex-1 border border-gray-300 dark:border-gray-700 rounded-md bg-white dark:bg-gray-900",children:[t.jsxs("div",{className:"px-3 py-2 border-b border-gray-300 dark:border-gray-700 bg-gray-50 dark:bg-gray-800",children:[t.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:B}),t.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:[U.length," item",U.length!==1?"s":""]})]}),s&&t.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:t.jsx("input",{type:"text",value:ne,onChange:ce=>ut(ce.target.value),placeholder:nf,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"})}),t.jsx("div",{className:"overflow-y-auto p-2 space-y-1",style:{height:s?d-120:d-60},children:U.length===0?t.jsx("div",{className:"flex items-center justify-center h-full text-sm text-gray-500 dark:text-gray-400",children:"No items"}):U.map(ce=>{const gt=z.has(ce.id);return t.jsx("button",{onClick:()=>!ce.disabled&&F(ce.id),disabled:ce.disabled||c,className:f("w-full px-3 py-2 text-left rounded-md transition-colors","hover:bg-gray-100 dark:hover:bg-gray-800","disabled:opacity-50 disabled:cursor-not-allowed",gt&&"bg-blue-50 dark:bg-blue-900/30 border border-blue-200 dark:border-blue-700"),children:t.jsxs("div",{className:"flex items-start gap-2",children:[t.jsx("div",{className:f("w-4 h-4 border-2 rounded flex items-center justify-center flex-shrink-0 mt-0.5",gt?"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500":"border-gray-300 dark:border-gray-600"),children:gt&&t.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:ce.label}),ce.description&&t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:ce.description})]})]})},ce.id)})})]});return t.jsxs("div",{className:f("flex gap-4",g),children:[D(S,n,y,C,h,w,i),t.jsxs("div",{className:"flex flex-col justify-center gap-2",children:[t.jsx("button",{onClick:x,disabled:c||e.length===0,className:f("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move all to selected",children:t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 5l7 7-7 7M5 5l7 7-7 7"})})}),t.jsx("button",{onClick:E,disabled:c||y.size===0,className:f("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move selected to target",children:t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),t.jsx("button",{onClick:M,disabled:c||T.size===0,className:f("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move selected to source",children:t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),t.jsx("button",{onClick:P,disabled:c||r.length===0,className:f("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move all to available",children:t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 19l-7-7 7-7M19 19l-7-7 7-7"})})})]}),D(k,o,T,I,m,b,l)]})};function ic({items:e,itemHeight:r,height:a,renderItem:n,keyExtractor:o,overscan:s=3,className:i}){const[l,d]=p.useState(0),c=p.useRef(null),g=y=>{d(y.currentTarget.scrollTop)},h=e.length*r,w=Math.max(0,Math.floor(l/r)-s),m=Math.min(e.length-1,Math.ceil((l+a)/r)+s),b=e.slice(w,m+1);return t.jsx("div",{ref:c,className:f("overflow-auto",i),style:{height:a},onScroll:g,children:t.jsx("div",{style:{height:h,position:"relative"},children:b.map((y,v)=>{const T=w+v;return t.jsx("div",{style:{position:"absolute",top:T*r,height:r,width:"100%"},children:n(y,T)},o(y,T))})})})}const lc=({data:e,selectedId:r,onSelect:a,expandedIds:n,onExpand:o,defaultExpanded:s=!1,showLines:i=!1,className:l})=>{const[d,c]=p.useState(new Set(s?e.map(b=>b.id):[])),g=n!==void 0?new Set(n):d,h=b=>{n!==void 0&&o?o(b):c(y=>{const v=new Set(y);return v.has(b)?v.delete(b):v.add(b),v})},w=b=>{!b.disabled&&a&&a(b)},m=(b,y=0)=>{const v=b.children&&b.children.length>0,T=g.has(b.id),N=r===b.id;return t.jsxs("div",{children:[t.jsxs("div",{className:f("flex items-center gap-2 px-2 py-1.5 rounded-md transition-colors",!b.disabled&&"hover:bg-gray-100 dark:hover:bg-gray-800",N&&"bg-blue-50 dark:bg-blue-900/30",b.disabled&&"opacity-50 cursor-not-allowed",!b.disabled&&"cursor-pointer"),style:{paddingLeft:`${y*1.5+.5}rem`},onClick:()=>w(b),children:[v?t.jsx("button",{onClick:S=>{S.stopPropagation(),h(b.id)},className:"flex-shrink-0 w-4 h-4 flex items-center justify-center hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",children:t.jsx("svg",{className:f("w-3 h-3 transition-transform",T&&"rotate-90"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}):t.jsx("div",{className:"w-4 h-4 flex-shrink-0"}),b.icon&&t.jsx("span",{className:"flex-shrink-0 w-4 h-4 text-gray-600 dark:text-gray-400",children:b.icon}),t.jsx("span",{className:f("flex-1 text-sm",N?"text-blue-700 dark:text-blue-300 font-medium":"text-gray-900 dark:text-white"),children:b.label})]}),v&&T&&t.jsx("div",{className:f(i&&"border-l-2 border-gray-200 dark:border-gray-700 ml-2"),children:b.children.map(S=>m(S,y+1))})]},b.id)};return t.jsx("div",{className:f("w-full",l),children:e.map(b=>m(b,0))})},cc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UlistingUform",children:r||"UlistingUform Component"}),dc="bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-900/20 dark:to-indigo-900/20 border border-blue-200 dark:border-blue-800",uc={none:"",sm:"p-3",md:"p-6",lg:"p-8"},Vr=({variant:e="elevated",padding:r="md",icon:a,onClose:n,className:o,children:s,...i})=>{const d=["info","success","warning","error"].includes(e)&&(a||n),c=e==="callout"?dc:so(e);return t.jsx("div",{className:f("rounded-lg",c,uc[r],o),...i,children:d?t.jsxs("div",{className:"flex items-start gap-3",children:[a&&t.jsx("div",{className:"flex-shrink-0 text-lg",children:a}),t.jsx("div",{className:"flex-1 min-w-0",children:s}),n&&t.jsx("button",{onClick:n,className:"flex-shrink-0 text-current hover:opacity-70 transition-opacity","aria-label":"Close",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):s})},gc=({title:e,description:r,className:a,children:n,...o})=>t.jsxs("div",{className:f("space-y-1.5",a),...o,children:[e&&t.jsx("h3",{className:O.heading.h4(),children:e}),r&&t.jsx("p",{className:O.body.sm(),children:r}),n]}),hc=({className:e,children:r,...a})=>t.jsx("div",{className:f("",e),...a,children:r}),fc=({className:e,children:r,...a})=>t.jsx("div",{className:f("flex items-center pt-4",e),...a,children:r}),bc=({title:e,children:r,variant:a="info",size:n="default",className:o})=>{const s={sm:"sm",default:"md",lg:"lg"},i=a==="neutral"?"bordered":a;return t.jsxs(Vr,{variant:i,padding:s[n],className:o,children:[e&&t.jsx("h3",{className:f("font-semibold mb-2",n==="sm"?"text-base":n==="lg"?"text-xl":"text-lg"),children:e}),r]})},mc=({title:e,icon:r,children:a,variant:n="gradient",size:o="default",centered:s=!1,className:i})=>{const l={sm:"sm",default:"md",lg:"lg"},d=n==="gradient"||n==="neutral"?"callout":n;return t.jsx(Vr,{variant:d,padding:l[o],className:i,children:t.jsxs("div",{className:f("space-y-4",s&&"text-center"),children:[r&&t.jsx("div",{className:f("font-bold",o==="sm"?"text-2xl":o==="lg"?"text-5xl":"text-4xl",s?"text-center":"text-left"),children:r}),e&&t.jsx("h3",{className:f("font-bold mb-4",o==="sm"?"text-lg":o==="lg"?"text-3xl":"text-2xl"),children:e}),t.jsx("div",{className:f("text-gray-600 dark:text-gray-400",o==="sm"?"text-sm":o==="lg"?"text-lg":"text-base"),children:a})]})})},yc=({title:e,value:r,change:a,changePeriod:n="vs last period",icon:o,variant:s="default",className:i})=>{const l={default:"bg-white dark:bg-gray-900",primary:"bg-blue-50 dark:bg-blue-900/20",success:"bg-green-50 dark:bg-green-900/20",warning:"bg-yellow-50 dark:bg-yellow-900/20",danger:"bg-red-50 dark:bg-red-900/20"};return t.jsxs("div",{className:f("rounded-lg border border-gray-200 dark:border-gray-700 p-6",l[s],i),children:[t.jsxs("div",{className:"flex items-start justify-between mb-2",children:[t.jsx("h3",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:e}),o&&t.jsx("div",{className:"text-gray-400 dark:text-gray-600",children:o})]}),t.jsx("div",{className:"flex items-end justify-between",children:t.jsxs("div",{children:[t.jsx("p",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:r}),a!==void 0&&t.jsxs("div",{className:"flex items-center gap-1 mt-2",children:[t.jsxs("span",{className:f("text-sm font-medium",a>=0?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:[a>=0?"↑":"↓"," ",Math.abs(a),"%"]}),t.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:n})]})]})})]})},pc=({src:e,alt:r="Avatar",fallback:a,name:n,size:o="md",status:s,className:i,onClick:l})=>{const[d,c]=p.useState(!1),g={sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-12 h-12 text-base"},h={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},w={online:"bg-green-500",offline:"bg-gray-400",away:"bg-yellow-500",busy:"bg-red-500"},b=a||(n?(T=>{const N=T.trim().split(/\s+/);return N.length===1?N[0].charAt(0).toUpperCase():N[0].charAt(0).toUpperCase()+N[N.length-1].charAt(0).toUpperCase()})(n):""),y=e&&!d,v=()=>{c(!0)};return t.jsxs("div",{className:"relative inline-block flex-shrink-0",children:[t.jsx("div",{className:f("flex items-center justify-center overflow-hidden rounded-full",g[o],!y&&"bg-gray-300 dark:bg-gray-600 text-gray-700 dark:text-gray-200",l&&"cursor-pointer hover:opacity-80 transition-opacity",i),onClick:l,role:l?"button":void 0,tabIndex:l?0:void 0,children:y?t.jsx("img",{src:e,alt:r,className:"w-full h-full object-cover",onError:v}):t.jsx("span",{className:"font-semibold",children:b})}),s&&t.jsx("span",{className:f("absolute bottom-0 right-0 rounded-full border-2 border-white dark:border-gray-800",w[s],h[o]),"aria-label":s})]})},vc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UavatarUgroup",children:r||"UavatarUgroup Component"}),wc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UprofileUheader",children:r||"UprofileUheader Component"}),kc=({label:e,value:r,orientation:a="vertical",align:n="start",labelWidth:o="auto",size:s="md",separator:i=!1,labelVariant:l="muted",valueVariant:d="default",className:c,labelClassName:g,valueClassName:h})=>{const w={sm:{label:O.body.sm(),value:O.body.sm(),gap:"gap-1"},md:{label:O.body.md(),value:O.body.md(),gap:"gap-2"},lg:{label:O.body.lg(),value:O.body.lg(),gap:"gap-3"}},m={auto:"",sm:"w-24",md:"w-32",lg:"w-40"},b={start:"justify-start",center:"justify-center",between:"justify-between"},y={default:"text-gray-700 dark:text-gray-300",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold"},v={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold",primary:"text-blue-600 dark:text-blue-400"},T=w[s];return t.jsxs("div",{className:f(a==="horizontal"?"flex items-center":"flex flex-col",a==="horizontal"&&b[n],T.gap,i&&"pb-3 mb-3 border-b border-gray-200 dark:border-gray-700",c),children:[t.jsx("dt",{className:f(T.label,y[l],a==="horizontal"&&m[o],a==="horizontal"&&"flex-shrink-0",g),children:e}),t.jsx("dd",{className:f(T.value,v[d],a==="horizontal"&&"flex-1",h),children:r})]})},xc=({value:e,label:r,variant:a="neutral",size:n="md",align:o="center",icon:s,iconPosition:i="top",className:l,valueClassName:d,labelClassName:c})=>{const g={primary:{value:"text-blue-600 dark:text-blue-400",label:"text-blue-600/70 dark:text-blue-400/70",icon:"text-blue-600 dark:text-blue-400"},success:{value:"text-green-600 dark:text-green-400",label:"text-green-600/70 dark:text-green-400/70",icon:"text-green-600 dark:text-green-400"},warning:{value:"text-yellow-600 dark:text-yellow-400",label:"text-yellow-600/70 dark:text-yellow-400/70",icon:"text-yellow-600 dark:text-yellow-400"},danger:{value:"text-red-600 dark:text-red-400",label:"text-red-600/70 dark:text-red-400/70",icon:"text-red-600 dark:text-red-400"},neutral:{value:"text-gray-900 dark:text-gray-100",label:"text-gray-600 dark:text-gray-400",icon:"text-gray-600 dark:text-gray-400"},white:{value:"text-white",label:"text-white/70",icon:"text-white"}},h={sm:{value:O.heading.h5(),label:O.caption.default(),icon:"h-4 w-4"},md:{value:O.heading.h4(),label:O.body.sm(),icon:"h-5 w-5"},lg:{value:O.heading.h3(),label:O.body.md(),icon:"h-6 w-6"},xl:{value:O.heading.h2(),label:O.body.lg(),icon:"h-8 w-8"}},w={left:"text-left",center:"text-center",right:"text-right"},m=g[a],b=h[n];return t.jsxs("div",{className:f(w[o],l),children:[s&&i==="top"&&t.jsx(s,{className:f(b.icon,m.icon,"mb-2",o==="center"&&"mx-auto")}),t.jsxs("div",{className:f(i==="left"&&s&&"flex items-center gap-3",o==="center"&&i==="left"&&"justify-center"),children:[s&&i==="left"&&t.jsx(s,{className:f(b.icon,m.icon)}),t.jsxs("div",{children:[t.jsx("div",{className:f("font-bold",b.value,m.value,d),children:e}),t.jsx("div",{className:f(b.label,m.label,c),children:r})]})]})]})},Pa=({icon:e,title:r="No data",description:a,action:n,className:o})=>t.jsxs("div",{className:f("flex flex-col items-center justify-center py-12 px-4 text-center",o),children:[e&&t.jsx("div",{className:"mb-4 text-gray-400 dark:text-gray-600",children:e}),t.jsx("h3",{className:f(O.heading.h3(),"mb-2"),children:r}),a&&t.jsx("p",{className:f(O.body.sm(),"text-gray-600 dark:text-gray-400 max-w-sm mb-6"),children:a}),n&&t.jsx("div",{className:"mt-4",children:n})]}),Nc=({title:e,subtext:r,className:a})=>t.jsx(Pa,{title:e,description:r,className:a}),Cc=({data:e,orientation:r="vertical",showValues:a=!1,showGrid:n=!0,barWidth:o=40,height:s=300,className:i})=>{const l=Math.max(...e.map(c=>c.value)),d="#3b82f6";return t.jsx("div",{className:f("w-full",i),children:t.jsxs("div",{className:"relative bg-white dark:bg-gray-900 rounded-lg p-6",style:{height:`${s}px`},children:[n&&t.jsx("div",{className:"absolute inset-6 flex flex-col justify-between",children:[...Array(5)].map((c,g)=>t.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700"},g))}),r==="vertical"?t.jsx("div",{className:"relative h-full flex items-end justify-around gap-2",children:e.map((c,g)=>{const h=c.value/l*100;return t.jsxs("div",{className:"flex flex-col items-center gap-2",style:{width:`${o}px`},children:[a&&t.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:c.value}),t.jsx("div",{className:"w-full rounded-t transition-all hover:opacity-80",style:{height:`${h}%`,backgroundColor:c.color||d}}),t.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:c.label})]},g)})}):t.jsx("div",{className:"relative h-full flex flex-col justify-around gap-2",children:e.map((c,g)=>{const h=c.value/l*100;return t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 w-16 text-right",children:c.label}),t.jsxs("div",{className:"flex-1 flex items-center gap-2",children:[t.jsx("div",{className:"h-8 rounded transition-all hover:opacity-80",style:{width:`${h}%`,backgroundColor:c.color||d}}),a&&t.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:c.value})]})]},g)})})]})})},Sc=({series:e,showLegend:r=!0,showGrid:a=!0,showPoints:n=!0,height:o=300,xLabels:s,className:i})=>{const l=e.flatMap(m=>m.data),d=Math.max(...l.map(m=>m.y)),c=Math.min(...l.map(m=>m.y)),g=Math.max(...l.map(m=>m.x)),h=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],w=m=>m.length===0?"":`M ${m.map(y=>{const v=y.x/g*100,T=100-(y.y-c)/(d-c)*100;return`${v},${T}`}).join(" L ")}`;return t.jsxs("div",{className:f("w-full",i),children:[r&&t.jsx("div",{className:"flex flex-wrap gap-4 mb-4",children:e.map((m,b)=>t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:m.color||h[b%h.length]}}),t.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:m.name})]},b))}),t.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-lg p-6",children:[t.jsxs("div",{className:"relative",style:{height:`${o}px`},children:[a&&t.jsx("div",{className:"absolute inset-0",children:[...Array(5)].map((m,b)=>t.jsx("div",{className:"absolute w-full border-t border-gray-200 dark:border-gray-700",style:{top:`${b*25}%`}},b))}),t.jsx("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"absolute inset-0 w-full h-full",children:e.map((m,b)=>{const y=m.color||h[b%h.length];return t.jsxs("g",{children:[t.jsx("path",{d:w(m.data),fill:"none",stroke:y,strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),n&&m.data.map((v,T)=>{const N=v.x/g*100,S=100-(v.y-c)/(d-c)*100;return t.jsx("circle",{cx:N,cy:S,r:"1",fill:y,vectorEffect:"non-scaling-stroke"},T)})]},b)})})]}),s&&t.jsx("div",{className:"flex justify-between mt-2",children:s.map((m,b)=>t.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:m},b))})]})]})},Ec=({data:e,variant:r="pie",showLegend:a=!0,showPercentages:n=!1,size:o=200,donutHoleSize:s=40,className:i})=>{const l=e.reduce((b,y)=>b+y.value,0),d=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6","#ec4899"],c=e.reduce((b,y,v)=>{const T=y.value/l*100,N=T/100*360,S=b.length>0?b[b.length-1].endAngle:-90,k=S+N;return b.push({...y,percentage:T,startAngle:S,endAngle:k,color:y.color||d[v%d.length]}),b},[]),g=(b,y,v,T)=>{const N=(T-90)*Math.PI/180;return{x:b+v*Math.cos(N),y:y+v*Math.sin(N)}},h=(b,y,v,T,N)=>{const S=g(b,y,v,N),k=g(b,y,v,T),C=N-T<=180?"0":"1";if(r==="donut"){const I=v*s/100,E=g(b,y,I,N),M=g(b,y,I,T);return["M",S.x,S.y,"A",v,v,0,C,0,k.x,k.y,"L",M.x,M.y,"A",I,I,0,C,1,E.x,E.y,"Z"].join(" ")}return["M",b,y,"L",S.x,S.y,"A",v,v,0,C,0,k.x,k.y,"Z"].join(" ")},w=o/2,m=o/2-10;return t.jsxs("div",{className:f("flex flex-col items-center gap-4",i),children:[t.jsx("svg",{width:o,height:o,className:"transform rotate-0",children:c.map((b,y)=>t.jsx("path",{d:h(w,w,m,b.startAngle,b.endAngle),fill:b.color,className:"transition-opacity hover:opacity-80"},y))}),a&&t.jsx("div",{className:"flex flex-col gap-2",children:c.map((b,y)=>t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"w-3 h-3 rounded-sm",style:{backgroundColor:b.color}}),t.jsxs("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:[b.label,n&&t.jsxs("span",{className:"text-gray-500 dark:text-gray-400 ml-1",children:["(",Math.round(b.percentage),"%)"]})]})]},y))})]})},Tc=({series:e,showLegend:r=!0,showGrid:a=!0,fillOpacity:n=.2,height:o=300,xLabels:s,className:i})=>{const l=e.flatMap(b=>b.data),d=Math.max(...l.map(b=>b.y)),c=Math.min(...l.map(b=>b.y)),g=Math.max(...l.map(b=>b.x)),h=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],w=b=>{if(b.length===0)return"";const y=b.map(N=>{const S=N.x/g*100,k=100-(N.y-c)/(d-c)*100;return`${S},${k}`}),v=b[0].x/g*100,T=b[b.length-1].x/g*100;return`M ${v},100 L ${y.join(" L ")} L ${T},100 Z`},m=b=>b.length===0?"":`M ${b.map(v=>{const T=v.x/g*100,N=100-(v.y-c)/(d-c)*100;return`${T},${N}`}).join(" L ")}`;return t.jsxs("div",{className:f("w-full",i),children:[r&&t.jsx("div",{className:"flex flex-wrap gap-4 mb-4",children:e.map((b,y)=>t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:b.color||h[y%h.length]}}),t.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:b.name})]},y))}),t.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-lg p-6",children:[t.jsxs("div",{className:"relative",style:{height:`${o}px`},children:[a&&t.jsx("div",{className:"absolute inset-0",children:[...Array(5)].map((b,y)=>t.jsx("div",{className:"absolute w-full border-t border-gray-200 dark:border-gray-700",style:{top:`${y*25}%`}},y))}),t.jsx("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"absolute inset-0 w-full h-full",children:e.map((b,y)=>{const v=b.color||h[y%h.length];return t.jsxs("g",{children:[t.jsx("path",{d:w(b.data),fill:v,fillOpacity:n}),t.jsx("path",{d:m(b.data),fill:"none",stroke:v,strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"})]},y)})})]}),s&&t.jsx("div",{className:"flex justify-between mt-2",children:s.map((b,y)=>t.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:b},y))})]})]})},Ac=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UradarUchart",children:r||"UradarUchart Component"}),Ic=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UbubbleUchart",children:r||"UbubbleUchart Component"}),Mc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UscatterUplot",children:r||"UscatterUplot Component"}),Lc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UtreeUmap",children:r||"UtreeUmap Component"}),Pc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UsankeyUdiagram",children:r||"UsankeyUdiagram Component"}),Oc=({data:e,width:r=100,height:a=30,color:n="#3b82f6",fill:o=!1,className:s})=>{if(e.length===0)return null;const i=Math.max(...e),l=Math.min(...e),d=i-l||1,c=e.map((g,h)=>{const w=h/(e.length-1)*r,m=a-(g-l)/d*a;return`${w},${m}`}).join(" ");return t.jsxs("svg",{width:r,height:a,className:f("inline-block",s),children:[o&&t.jsx("polygon",{points:`0,${a} ${c} ${r},${a}`,fill:n,opacity:"0.2"}),t.jsx("polyline",{points:c,fill:"none",stroke:n,strokeWidth:"2",strokeLinejoin:"round",strokeLinecap:"round"})]})},Uc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"Uheatmap",children:r||"Uheatmap Component"}),Dc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UfunnelUchart",children:r||"UfunnelUchart Component"}),jc=({className:e,children:r,disabled:a})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"BurndownChart",children:r||"BurndownChart Component"}),_c=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UperformanceUchart",children:r||"UperformanceUchart Component"}),zc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UmetricUcomparison",children:r||"UmetricUcomparison Component"}),Bc=({value:e,min:r=0,max:a=100,size:n=120,strokeWidth:o=10,showValue:s=!0,label:i,variant:l="primary",className:d})=>{const c=Math.min(a,Math.max(r,e)),g=(c-r)/(a-r)*100,h=n/2,w=(n-o)/2,m=Math.PI*w,b=m-g/100*m,y={primary:"stroke-blue-600 dark:stroke-blue-500",success:"stroke-green-600 dark:stroke-green-500",warning:"stroke-yellow-600 dark:stroke-yellow-500",danger:"stroke-red-600 dark:stroke-red-500"};return t.jsxs("div",{className:f("inline-flex flex-col items-center gap-2",d),children:[t.jsxs("svg",{width:n,height:n*.65,className:"transform rotate-180",children:[t.jsx("path",{d:`M ${o/2} ${h} A ${w} ${w} 0 0 1 ${n-o/2} ${h}`,fill:"none",className:"stroke-gray-200 dark:stroke-gray-700",strokeWidth:o,strokeLinecap:"round"}),t.jsx("path",{d:`M ${o/2} ${h} A ${w} ${w} 0 0 1 ${n-o/2} ${h}`,fill:"none",className:f(y[l],"transition-all duration-500"),strokeWidth:o,strokeDasharray:m,strokeDashoffset:b,strokeLinecap:"round"})]}),s&&t.jsxs("div",{className:"text-center -mt-8",children:[t.jsx("div",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:Math.round(c)}),i&&t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:i})]})]})},Wc=({value:e=0,max:r=100,variant:a="default",size:n="md",showLabel:o=!1,label:s,indeterminate:i=!1,striped:l=!1,animated:d=!1,className:c})=>{const g=Math.min(Math.max(e/r*100,0),100),h={default:"bg-blue-600 dark:bg-blue-500",success:"bg-green-600 dark:bg-green-500",warning:"bg-yellow-600 dark:bg-yellow-500",danger:"bg-red-600 dark:bg-red-500"},w={sm:"h-1",md:"h-2",lg:"h-4"};return t.jsxs("div",{className:f("w-full",c),children:[t.jsx("div",{className:f("w-full bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden",w[n]),role:"progressbar","aria-valuenow":i?void 0:g,"aria-valuemin":0,"aria-valuemax":100,children:i?t.jsx("div",{className:f("h-full rounded-full animate-pulse",h[a]),style:{width:"100%"}}):t.jsx("div",{className:f("h-full rounded-full transition-all duration-300",h[a],l&&"bg-stripe",l&&d&&"animate-stripe"),style:{width:`${g}%`}})}),(o||s)&&t.jsx("div",{className:"mt-1 text-xs text-gray-600 dark:text-gray-400 text-right",children:s||`${Math.round(g)}%`})]})},Fc=({value:e,size:r=100,strokeWidth:a=8,showValue:n=!0,label:o,variant:s="primary",color:i,trackColor:l,className:d})=>{const c=Math.min(100,Math.max(0,e)),g=r/2,h=(r-a)/2,w=2*Math.PI*h,m=w-c/100*w,b={primary:"stroke-blue-600 dark:stroke-blue-500",success:"stroke-green-600 dark:stroke-green-500",warning:"stroke-yellow-600 dark:stroke-yellow-500",danger:"stroke-red-600 dark:stroke-red-500"},y=l||"stroke-gray-200 dark:stroke-gray-700";return t.jsx("div",{className:f("inline-flex items-center justify-center",d),children:t.jsxs("div",{className:"relative",style:{width:r,height:r},children:[t.jsxs("svg",{width:r,height:r,className:"transform -rotate-90",children:[t.jsx("circle",{cx:g,cy:g,r:h,className:y,strokeWidth:a,fill:"none"}),t.jsx("circle",{cx:g,cy:g,r:h,className:f(i?"":b[s],"transition-all duration-300 ease-in-out"),stroke:i,strokeWidth:a,strokeDasharray:w,strokeDashoffset:m,strokeLinecap:"round",fill:"none"})]}),(n||o)&&t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[n&&!o&&t.jsxs("span",{className:"text-gray-900 dark:text-white font-bold",style:{fontSize:r*.2},children:[Math.round(c),"%"]}),o&&t.jsx("span",{className:"text-gray-900 dark:text-white font-medium text-center px-2",style:{fontSize:r*.15},children:o})]})]})})},Vc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UprogressUtracker",children:r||"UprogressUtracker Component"}),qc=({src:e,alt:r,fallback:a,width:n,height:o,objectFit:s="cover",loading:i="lazy",showLoader:l=!0,rounded:d="none",border:c=!1,className:g,onLoad:h,onError:w})=>{const[m,b]=p.useState(!0),[y,v]=p.useState(!1),[T,N]=p.useState(e);p.useEffect(()=>{b(!0),v(!1),N(e)},[e]);const S=()=>{b(!1),h?.()},k=()=>{b(!1),v(!0),a&&T!==a&&(N(a),v(!1),b(!0)),w?.()},C={none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},I={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"},E={width:typeof n=="number"?`${n}px`:n,height:typeof o=="number"?`${o}px`:o};return t.jsxs("div",{className:f("relative inline-block overflow-hidden bg-gray-100 dark:bg-gray-800",C[d],c&&"border border-gray-200 dark:border-gray-700",g),style:E,children:[l&&m&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:t.jsx("div",{className:"animate-pulse",children:t.jsx(L.PhotoIcon,{className:"h-8 w-8 text-gray-400"})})}),y&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:t.jsx(L.PhotoIcon,{className:"h-8 w-8 text-gray-400"})}),!y&&t.jsx("img",{src:T,alt:r,loading:i,onLoad:S,onError:k,className:f("w-full h-full",I[s],m&&l&&"opacity-0")})]})},$c=({images:e,columns:r=3,gap:a=16,lightbox:n=!0,className:o})=>{const[s,i]=p.useState(null),l=h=>{n&&i(h)},d=()=>{i(null)},c=()=>{if(!s)return;const h=e.findIndex(m=>m.id===s.id),w=h>0?h-1:e.length-1;i(e[w])},g=()=>{if(!s)return;const h=e.findIndex(m=>m.id===s.id),w=h<e.length-1?h+1:0;i(e[w])};return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:f("grid",o),style:{gridTemplateColumns:`repeat(${r}, 1fr)`,gap:`${a}px`},children:e.map(h=>t.jsxs("div",{className:f("relative aspect-square overflow-hidden rounded-lg bg-gray-200 dark:bg-gray-700",n&&"cursor-pointer hover:opacity-90 transition-opacity"),onClick:()=>l(h),children:[t.jsx("img",{src:h.thumbnail||h.src,alt:h.alt||"",className:"w-full h-full object-cover"}),h.caption&&t.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/50 text-white text-sm p-2",children:h.caption})]},h.id))}),n&&s&&t.jsxs("div",{className:"fixed inset-0 z-50 bg-black/90 flex items-center justify-center p-4",onClick:d,children:[t.jsx("button",{onClick:d,className:"absolute top-4 right-4 text-white hover:text-gray-300 transition-colors",children:t.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),t.jsx("button",{onClick:h=>{h.stopPropagation(),c()},className:"absolute left-4 text-white hover:text-gray-300 transition-colors",children:t.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),t.jsx("button",{onClick:h=>{h.stopPropagation(),g()},className:"absolute right-4 text-white hover:text-gray-300 transition-colors",children:t.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),t.jsxs("div",{className:"max-w-4xl max-h-full",onClick:h=>h.stopPropagation(),children:[t.jsx("img",{src:s.src,alt:s.alt||"",className:"max-w-full max-h-[80vh] object-contain"}),s.caption&&t.jsx("p",{className:"text-white text-center mt-4",children:s.caption})]})]})]})},Hc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UimageUcomparison",children:r||"UimageUcomparison Component"}),Gc=({src:e,onCropComplete:r,initialCrop:a,className:n})=>{const[o,s]=p.useState(a||{x:50,y:50,width:200,height:200}),i=p.useRef(null),l=async()=>{if(!i.current||!r)return;const d=document.createElement("canvas"),c=d.getContext("2d");if(!c)return;const g=i.current,h=g.naturalWidth/g.width,w=g.naturalHeight/g.height;d.width=o.width*h,d.height=o.height*w,c.drawImage(g,o.x*h,o.y*w,o.width*h,o.height*w,0,0,d.width,d.height);const m=d.toDataURL("image/png");r(m,o)};return t.jsxs("div",{className:f("inline-flex flex-col gap-4",n),children:[t.jsxs("div",{className:"relative inline-block",children:[t.jsx("img",{ref:i,src:e,alt:"Crop preview",className:"max-w-full h-auto",crossOrigin:"anonymous"}),t.jsxs("div",{className:"absolute border-2 border-blue-500 bg-blue-500/20",style:{left:`${o.x}px`,top:`${o.y}px`,width:`${o.width}px`,height:`${o.height}px`,cursor:"move"},children:[t.jsx("div",{className:"absolute -top-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-nw-resize"}),t.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-ne-resize"}),t.jsx("div",{className:"absolute -bottom-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-sw-resize"}),t.jsx("div",{className:"absolute -bottom-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-se-resize"})]})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:l,className:f("px-4 py-2 text-sm font-medium","bg-blue-600 dark:bg-blue-500 text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"Crop Image"}),t.jsx("button",{onClick:()=>s(a||{x:50,y:50,width:200,height:200}),className:f("px-4 py-2 text-sm font-medium","bg-gray-200 dark:bg-gray-700 text-gray-900 dark:text-white","rounded-md","hover:bg-gray-300 dark:hover:bg-gray-600","transition-colors"),children:"Reset"})]}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:'Drag to adjust crop area. Click "Crop Image" to export.'})]})},Yc=({images:e,index:r,isOpen:a,onClose:n,onIndexChange:o,showThumbnails:s=!1,showDownload:i=!1,showZoom:l=!0,className:d})=>{const[c,g]=p.useState(1),h=e[r],w=r>0,m=r<e.length-1,b=p.useCallback(()=>{if(w){const k=r-1;o?.(k),g(1)}},[w,r,o]),y=p.useCallback(()=>{if(m){const k=r+1;o?.(k),g(1)}},[m,r,o]),v=()=>{g(k=>Math.min(k+.5,3))},T=()=>{g(k=>Math.max(k-.5,.5))},N=()=>{g(1)},S=()=>{const k=document.createElement("a");k.href=h.src,k.download=h.alt||"image",k.click()};return p.useEffect(()=>{if(!a)return;const k=C=>{switch(C.key){case"Escape":n();break;case"ArrowLeft":b();break;case"ArrowRight":y();break;case"+":case"=":v();break;case"-":case"_":T();break;case"0":N();break}};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[a,r,e.length,n,b,y]),p.useEffect(()=>(a?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[a]),p.useEffect(()=>{g(1)},[r]),!a||!h?null:t.jsx(be,{children:t.jsxs("div",{className:f("fixed inset-0 z-50 flex items-center justify-center","bg-black/95",d),children:[t.jsx("div",{className:"absolute inset-0",onClick:n,"aria-label":"Close lightbox"}),t.jsx("button",{onClick:n,className:"absolute top-4 right-4 z-10 p-2 text-white hover:text-gray-300 transition-colors","aria-label":"Close",children:t.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),w&&t.jsx("button",{onClick:b,className:"absolute left-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all","aria-label":"Previous image",children:t.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),m&&t.jsx("button",{onClick:y,className:"absolute right-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all","aria-label":"Next image",children:t.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),t.jsxs("div",{className:"absolute top-4 left-4 z-10 flex gap-2",children:[t.jsxs("div",{className:"px-3 py-1.5 bg-black/50 text-white text-sm rounded-md",children:[r+1," / ",e.length]}),l&&t.jsxs("div",{className:"flex gap-1 bg-black/50 rounded-md p-1",children:[t.jsx("button",{onClick:T,className:"p-1.5 text-white hover:text-gray-300 transition-colors","aria-label":"Zoom out",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7"})})}),t.jsxs("button",{onClick:N,className:"px-2 text-white text-sm hover:text-gray-300 transition-colors","aria-label":"Reset zoom",children:[Math.round(c*100),"%"]}),t.jsx("button",{onClick:v,className:"p-1.5 text-white hover:text-gray-300 transition-colors","aria-label":"Zoom in",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v3m0 0v3m0-3h3m-3 0H7"})})})]}),i&&t.jsx("button",{onClick:S,className:"p-1.5 bg-black/50 text-white hover:text-gray-300 rounded-md transition-colors","aria-label":"Download image",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})})})]}),t.jsx("div",{className:"relative z-0 flex items-center justify-center max-w-7xl max-h-screen p-20",children:t.jsx("img",{src:h.src,alt:h.alt||"",className:"max-w-full max-h-full object-contain transition-transform",style:{transform:`scale(${c})`}})}),h.caption&&t.jsx("div",{className:"absolute bottom-20 left-0 right-0 z-10 text-center",children:t.jsx("p",{className:"px-4 py-2 bg-black/50 text-white text-sm inline-block rounded-md max-w-2xl",children:h.caption})}),s&&e.length>1&&t.jsx("div",{className:"absolute bottom-4 left-0 right-0 z-10 flex justify-center gap-2 px-4 overflow-x-auto",children:e.map((k,C)=>t.jsx("button",{onClick:()=>{o?.(C),g(1)},className:f("flex-shrink-0 w-16 h-16 rounded-md overflow-hidden","border-2 transition-all",C===r?"border-white scale-110":"border-transparent opacity-60 hover:opacity-100 hover:border-gray-400"),children:t.jsx("img",{src:k.thumbnail||k.src,alt:k.alt||"",className:"w-full h-full object-cover"})},C))})]})})},Kc=({src:e,poster:r,autoPlay:a=!1,loop:n=!1,muted:o=!1,controls:s=!0,className:i})=>{const l=p.useRef(null),[d,c]=p.useState(a),[g,h]=p.useState(1),[w,m]=p.useState(0),[b,y]=p.useState(0);p.useEffect(()=>{const C=l.current;if(!C)return;const I=()=>m(C.currentTime),E=()=>y(C.duration),M=()=>c(!0),x=()=>c(!1);return C.addEventListener("timeupdate",I),C.addEventListener("loadedmetadata",E),C.addEventListener("play",M),C.addEventListener("pause",x),()=>{C.removeEventListener("timeupdate",I),C.removeEventListener("loadedmetadata",E),C.removeEventListener("play",M),C.removeEventListener("pause",x)}},[]);const v=()=>{l.current&&(d?l.current.pause():l.current.play())},T=C=>{const I=parseFloat(C.target.value);h(I),l.current&&(l.current.volume=I)},N=C=>{const I=parseFloat(C.target.value);m(I),l.current&&(l.current.currentTime=I)},S=()=>{l.current&&(document.fullscreenElement?document.exitFullscreen():l.current.requestFullscreen())},k=C=>{const I=Math.floor(C/60),E=Math.floor(C%60);return`${I}:${E.toString().padStart(2,"0")}`};return t.jsxs("div",{className:f("relative group",i),children:[t.jsx("video",{ref:l,src:e,poster:r,autoPlay:a,loop:n,muted:o,className:"w-full rounded-lg",onClick:v}),s&&t.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4 opacity-0 group-hover:opacity-100 transition-opacity",children:[t.jsx("input",{type:"range",min:"0",max:b||0,value:w,onChange:N,className:"w-full mb-2 accent-white"}),t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("button",{onClick:v,className:"text-white hover:text-gray-300 transition-colors",children:d?t.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})}):t.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M8 5v14l11-7z"})})}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"})}),t.jsx("input",{type:"range",min:"0",max:"1",step:"0.1",value:g,onChange:T,className:"w-20 accent-white"})]}),t.jsxs("span",{className:"text-white text-sm",children:[k(w)," / ",k(b)]})]}),t.jsx("button",{onClick:S,className:"text-white hover:text-gray-300 transition-colors",children:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"})})})]})]})]})},Zc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UvideoUthumbnail",children:r||"UvideoUthumbnail Component"}),Xc=({className:e,children:r,disabled:a})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"VideoEditor",children:r||"VideoEditor Component"}),Qc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UvideoUcall",children:r||"UvideoUcall Component"}),Jc=({className:e,children:r,disabled:a})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"LiveStream",children:r||"LiveStream Component"}),Rc=({src:e,title:r,artist:a,artwork:n,autoPlay:o=!1,loop:s=!1,className:i})=>{const l=p.useRef(null),[d,c]=p.useState(o),[g,h]=p.useState(0),[w,m]=p.useState(0),[b,y]=p.useState(1);p.useEffect(()=>{const C=l.current;if(!C)return;const I=()=>h(C.currentTime),E=()=>m(C.duration),M=()=>c(!0),x=()=>c(!1),P=()=>c(!1);return C.addEventListener("timeupdate",I),C.addEventListener("loadedmetadata",E),C.addEventListener("play",M),C.addEventListener("pause",x),C.addEventListener("ended",P),()=>{C.removeEventListener("timeupdate",I),C.removeEventListener("loadedmetadata",E),C.removeEventListener("play",M),C.removeEventListener("pause",x),C.removeEventListener("ended",P)}},[]);const v=()=>{l.current&&(d?l.current.pause():l.current.play())},T=C=>{const I=parseFloat(C.target.value);h(I),l.current&&(l.current.currentTime=I)},N=C=>{const I=parseFloat(C.target.value);y(I),l.current&&(l.current.volume=I)},S=C=>{const I=Math.floor(C/60),E=Math.floor(C%60);return`${I}:${E.toString().padStart(2,"0")}`},k=w>0?g/w*100:0;return t.jsxs("div",{className:f("bg-white dark:bg-gray-900 rounded-lg p-6 shadow-lg",i),children:[t.jsx("audio",{ref:l,src:e,autoPlay:o,loop:s}),t.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[n&&t.jsx("div",{className:"w-16 h-16 rounded-lg overflow-hidden flex-shrink-0 bg-gray-200 dark:bg-gray-700",children:t.jsx("img",{src:n,alt:r||"Album artwork",className:"w-full h-full object-cover"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[r&&t.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white truncate",children:r}),a&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 truncate",children:a})]})]}),t.jsxs("div",{className:"mb-4",children:[t.jsx("input",{type:"range",min:"0",max:w||0,value:g,onChange:T,className:"w-full accent-blue-500"}),t.jsxs("div",{className:"flex justify-between text-xs text-gray-600 dark:text-gray-400 mt-1",children:[t.jsx("span",{children:S(g)}),t.jsx("span",{children:S(w)})]})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("button",{onClick:v,className:"w-10 h-10 rounded-full bg-blue-500 text-white flex items-center justify-center hover:bg-blue-600 transition-colors",children:d?t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})}):t.jsx("svg",{className:"w-5 h-5 ml-0.5",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M8 5v14l11-7z"})})}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"})}),t.jsx("input",{type:"range",min:"0",max:"1",step:"0.1",value:b,onChange:N,className:"w-24 accent-blue-500"})]})]}),t.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:[k.toFixed(0),"%"]})]})]})},ed=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UaudioUwaveform",children:r||"UaudioUwaveform Component"}),rd=({data:e,width:r=200,height:a=40,color:n="#3b82f6",gap:o=2,className:s})=>{if(e.length===0)return null;const i=(r-(e.length-1)*o)/e.length;return t.jsx("svg",{width:r,height:a,className:f("inline-block",s),children:e.map((l,d)=>{const c=Math.max(2,l*a),g=d*(i+o),h=(a-c)/2;return t.jsx("rect",{x:g,y:h,width:i,height:c,fill:n,rx:i/2},d)})})},td=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UvoiceUrecorder",children:r||"UvoiceUrecorder Component"}),ad=({className:e,children:r,disabled:a})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"PodcastPlayer",children:r||"PodcastPlayer Component"}),nd=({accept:e=["image/*","video/*","audio/*"],maxSize:r=50*1024*1024,maxFiles:a=10,multiple:n=!0,onUpload:o,onRemove:s,className:i})=>{const[l,d]=p.useState([]),[c,g]=p.useState(!1),h=p.useRef(null),w=S=>{S.preventDefault(),g(!0)},m=S=>{S.preventDefault(),g(!1)},b=S=>{S.preventDefault(),g(!1);const k=Array.from(S.dataTransfer.files);v(k)},y=S=>{if(S.target.files){const k=Array.from(S.target.files);v(k)}},v=S=>{const k=S.filter(M=>{const x=e.some(D=>{if(D.endsWith("/*")){const U=D.split("/")[0];return M.type.startsWith(U)}return M.type===D}),P=M.size<=r;return x&&P}),C=a-l.length,I=k.slice(0,C),E=I.map(M=>({id:`${Date.now()}-${Math.random()}`,file:M,preview:M.type.startsWith("image/")?URL.createObjectURL(M):void 0,status:"pending"}));d(M=>[...M,...E]),o&&o(I)},T=S=>{d(k=>k.filter(C=>C.id!==S)),s&&s(S)},N=S=>S<1024?`${S} B`:S<1024*1024?`${(S/1024).toFixed(1)} KB`:`${(S/(1024*1024)).toFixed(1)} MB`;return t.jsxs("div",{className:f("space-y-4",i),children:[t.jsxs("div",{onDragEnter:w,onDragOver:S=>S.preventDefault(),onDragLeave:m,onDrop:b,onClick:()=>h.current?.click(),className:f("border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-colors",c?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 dark:border-gray-700 hover:border-gray-400 dark:hover:border-gray-600"),children:[t.jsx("svg",{className:"w-12 h-12 mx-auto mb-4 text-gray-400 dark:text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),t.jsx("p",{className:"text-gray-700 dark:text-gray-300 mb-2",children:"Drag and drop files here, or click to browse"}),t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Max ",a," files, ",N(r)," each"]}),t.jsx("input",{ref:h,type:"file",multiple:n,accept:e.join(","),onChange:y,className:"hidden"})]}),l.length>0&&t.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:l.map(S=>t.jsxs("div",{className:"relative aspect-square rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-800",children:[S.preview?t.jsx("img",{src:S.preview,alt:S.file.name,className:"w-full h-full object-cover"}):t.jsx("div",{className:"w-full h-full flex items-center justify-center",children:t.jsx("svg",{className:"w-12 h-12 text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6zm4 18H6V4h7v5h5v11z"})})}),t.jsx("button",{onClick:()=>T(S.id),className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-red-500 text-white flex items-center justify-center hover:bg-red-600 transition-colors",children:t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),t.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-black/70 text-white text-xs p-2",children:[t.jsx("p",{className:"truncate",children:S.file.name}),t.jsx("p",{className:"text-gray-300",children:N(S.file.size)})]})]},S.id))})]})},od=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UmediaUplaylist",children:r||"UmediaUplaylist Component"}),sd=({className:e,children:r,disabled:a})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"PlaylistManager",children:r||"PlaylistManager Component"}),id=({value:e,size:r=200,fgColor:a="#000000",bgColor:n="#ffffff",showDownload:o=!1,className:s})=>{const i=p.useRef(null);p.useEffect(()=>{const d=i.current;if(!d)return;const c=d.getContext("2d");if(!c)return;c.fillStyle=n,c.fillRect(0,0,r,r),c.fillStyle=a;const g=8,h=r/g,w=e.split("").reduce((b,y)=>b+y.charCodeAt(0),0);for(let b=0;b<g;b++)for(let y=0;y<g;y++)(w+b*g+y)%3!==0&&c.fillRect(y*h,b*h,h,h);const m=h*3;[[0,0],[r-m,0],[0,r-m]].forEach(([b,y])=>{c.strokeStyle=a,c.lineWidth=h,c.strokeRect(b+h/2,y+h/2,m-h,m-h)})},[e,r,a,n]);const l=()=>{const d=i.current;if(!d)return;const c=d.toDataURL("image/png"),g=document.createElement("a");g.download="qrcode.png",g.href=c,g.click()};return t.jsxs("div",{className:f("inline-flex flex-col items-center gap-3",s),children:[t.jsx("canvas",{ref:i,width:r,height:r,className:"border-2 border-gray-200 dark:border-gray-700 rounded-lg"}),o&&t.jsx("button",{onClick:l,className:f("px-4 py-2 text-sm font-medium","bg-blue-600 dark:bg-blue-500 text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"Download QR Code"}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 max-w-[200px] text-center break-all",children:e})]})},qr=({isOpen:e,onClose:r,title:a,size:n="medium",variant:o="default",overlay:s="default",showCloseButton:i=!0,closeOnOverlayClick:l=!0,closeOnEscape:d=!0,children:c,className:g,"aria-labelledby":h,"aria-describedby":w,closeAriaLabel:m="Close modal"})=>{const b=p.useRef(null),y=p.useRef(null);if(p.useEffect(()=>{if(!e||!d)return;const S=k=>{k.key==="Escape"&&r()};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[e,d,r]),p.useEffect(()=>{if(e)return y.current=document.activeElement,b.current&&b.current.focus(),document.body.style.overflow="hidden",()=>{document.body.style.overflow="unset",y.current&&y.current.focus()}},[e]),!e)return null;const v=()=>{const S=_.overlays.modal.content(),k=_.overlays.modal[n]();return f(S,k)},T=S=>{l&&S.target===S.currentTarget&&r()},N=t.jsxs(t.Fragment,{children:[t.jsx("div",{className:_.overlays.modal.backdrop(),onClick:T}),t.jsx("div",{className:_.overlays.modal.container(),role:"dialog","aria-modal":"true","aria-labelledby":h,"aria-describedby":w,children:t.jsxs("div",{ref:b,"data-testid":"modal-content",className:f(v(),g),tabIndex:-1,onClick:S=>S.stopPropagation(),children:[a&&t.jsxs("div",{className:_.overlays.modal.header(),children:[t.jsx("h2",{id:h,className:_.overlays.modal.title(),children:a}),i&&t.jsx("button",{onClick:r,className:_.overlays.modal.closeButton(),"aria-label":m,children:t.jsx(L.XMarkIcon,{className:_.icon.variant.muted.md()})})]}),c]})})]});return ht.createPortal(N,document.body)},ld=({children:e,variant:r="default",className:a})=>t.jsx("div",{"data-testid":"modal-header",className:f(_.overlays.modal.header(),a),children:e}),$r=({children:e,variant:r="default",className:a})=>t.jsx("div",{"data-testid":"modal-body",className:f(_.overlays.modal.body(),a),children:e}),Hr=({children:e,variant:r="default",className:a})=>t.jsx("div",{"data-testid":"modal-footer",className:f(_.overlays.modal.footer(),a),children:e}),cd=({isOpen:e,onClose:r,children:a,side:n="right",size:o="md",showCloseButton:s=!0,title:i,footer:l,className:d})=>{if(p.useEffect(()=>{const w=m=>{m.key==="Escape"&&e&&r()};if(e)return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[e,r]),!e)return null;const c={left:{sm:"w-64",md:"w-80",lg:"w-96",full:"w-full"},right:{sm:"w-64",md:"w-80",lg:"w-96",full:"w-full"},top:{sm:"h-64",md:"h-80",lg:"h-96",full:"h-full"},bottom:{sm:"h-64",md:"h-80",lg:"h-96",full:"h-full"}},g={left:"left-0 top-0 h-full",right:"right-0 top-0 h-full",top:"top-0 left-0 w-full",bottom:"bottom-0 left-0 w-full"},h={left:e?"translate-x-0":"-translate-x-full",right:e?"translate-x-0":"translate-x-full",top:e?"translate-y-0":"-translate-y-full",bottom:e?"translate-y-0":"translate-y-full"};return t.jsxs(be,{children:[t.jsx(Je,{isOpen:e,onClose:r,opacity:"medium"}),t.jsxs("div",{className:f("fixed z-50","bg-white dark:bg-gray-900","shadow-xl","transition-transform duration-300 ease-in-out",g[n],c[n][o],h[n],d),children:[(i||s)&&t.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:[i&&t.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:i}),s&&t.jsx("button",{onClick:r,className:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 transition-colors","aria-label":"Close drawer",children:t.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),t.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:a}),l&&t.jsx("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:l})]})]})},dd=({children:e,active:r=!0,initialFocus:a,returnFocus:n=!0,className:o})=>{const s=p.useRef(null),i=p.useRef(null);return p.useEffect(()=>{if(!r)return;n&&(i.current=document.activeElement);const l=()=>{if(!s.current)return[];const h=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(s.current.querySelectorAll(h))},d=()=>{if(a){const w=s.current?.querySelector(a);if(w){w.focus();return}}const h=l();h.length>0&&h[0].focus()},c=h=>{if(h.key!=="Tab")return;const w=l();if(w.length===0){h.preventDefault();return}const m=w[0],b=w[w.length-1];h.shiftKey?document.activeElement===m&&(h.preventDefault(),b.focus()):document.activeElement===b&&(h.preventDefault(),m.focus())},g=setTimeout(d,0);return document.addEventListener("keydown",c),()=>{clearTimeout(g),document.removeEventListener("keydown",c),n&&i.current&&i.current.focus()}},[r,a,n]),r?t.jsx("div",{ref:s,className:f(o),children:e}):t.jsx(t.Fragment,{children:e})},ud=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UhoverUtooltip",children:r||"UhoverUtooltip Component"}),gd=({children:e,onLoadMore:r,loading:a=!1,hasMore:n=!0,threshold:o=100,loader:s,endMessage:i,height:l,scrollDirection:d="vertical",reverse:c=!1,className:g})=>{const h=p.useRef(null),[w,m]=p.useState(!1);p.useEffect(()=>{const T=h.current;if(!T||a||!n)return;const N=()=>{const{scrollTop:S,scrollHeight:k,clientHeight:C,scrollLeft:I,scrollWidth:E,clientWidth:M}=T;d==="vertical"&&m(S>300);let x;d==="vertical"?c?x=S:x=k-S-C:c?x=I:x=E-I-M,x<o&&r()};return T.addEventListener("scroll",N),()=>T.removeEventListener("scroll",N)},[a,n,o,r,d,c]);const b=()=>{h.current?.scrollTo({top:0,behavior:"smooth"})},y=t.jsxs("div",{className:"flex justify-center items-center py-4",children:[t.jsx("div",{className:"w-6 h-6 border-2 border-blue-600 dark:border-blue-400 border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:"Loading..."})]}),v=t.jsx("div",{className:"flex justify-center items-center py-4",children:t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"No more items to load"})});return t.jsxs("div",{className:f("relative",g),children:[t.jsxs("div",{ref:h,className:f(d==="vertical"?"overflow-y-auto":"overflow-x-auto","overflow-auto"),style:{height:d==="vertical"?l:void 0,width:d==="horizontal"?"100%":void 0,display:d==="horizontal"?"flex":void 0,flexDirection:c&&d==="vertical"?"column-reverse":void 0},children:[c&&a&&(s||y),c&&!a&&!n&&i,t.jsx("div",{className:f(d==="horizontal"&&"flex",d==="horizontal"&&c&&"flex-row-reverse"),children:e}),!c&&a&&(s||y),!c&&!a&&!n&&(i||v)]}),d==="vertical"&&!c&&w&&t.jsx("button",{onClick:b,className:f("absolute bottom-4 right-4","p-3 rounded-full","bg-blue-600 dark:bg-blue-500","text-white","shadow-lg","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"),"aria-label":"Scroll to top",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 10l7-7m0 0l7 7m-7-7v18"})})})]})},hd=({trigger:e,children:r,placement:a="bottom",isOpen:n,onOpenChange:o,trigger_action:s="click",showArrow:i=!0,className:l})=>{const[d,c]=p.useState(!1),g=n!==void 0?n:d,h=p.useCallback(C=>{n===void 0&&c(C),o?.(C)},[n,o]),w=p.useRef(null),m=p.useRef(null),[b,y]=p.useState({top:0,left:0});p.useEffect(()=>{if(!g||!w.current)return;const C=()=>{const I=w.current.getBoundingClientRect(),E=8;let M=0,x=0;switch(a){case"top":M=I.top-E,x=I.left+I.width/2;break;case"top-start":M=I.top-E,x=I.left;break;case"top-end":M=I.top-E,x=I.right;break;case"bottom":M=I.bottom+E,x=I.left+I.width/2;break;case"bottom-start":M=I.bottom+E,x=I.left;break;case"bottom-end":M=I.bottom+E,x=I.right;break;case"left":M=I.top+I.height/2,x=I.left-E;break;case"right":M=I.top+I.height/2,x=I.right+E;break}y({top:M,left:x})};return C(),window.addEventListener("scroll",C),window.addEventListener("resize",C),()=>{window.removeEventListener("scroll",C),window.removeEventListener("resize",C)}},[g,a]),p.useEffect(()=>{if(!g)return;const C=I=>{w.current&&!w.current.contains(I.target)&&m.current&&!m.current.contains(I.target)&&h(!1)};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[g,h]),p.useEffect(()=>{if(!g)return;const C=I=>{I.key==="Escape"&&h(!1)};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[g,h]);const v=()=>{s==="click"&&h(!g)},T=()=>{s==="hover"&&h(!0)},N=()=>{s==="hover"&&h(!1)},S={top:"origin-bottom","top-start":"origin-bottom-left","top-end":"origin-bottom-right",bottom:"origin-top","bottom-start":"origin-top-left","bottom-end":"origin-top-right",left:"origin-right",right:"origin-left"},k={top:"-translate-x-1/2 -translate-y-full","top-start":"-translate-y-full","top-end":"-translate-x-full -translate-y-full",bottom:"-translate-x-1/2","bottom-start":"","bottom-end":"-translate-x-full",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"};return t.jsxs("div",{className:f("relative inline-block",l),children:[t.jsx("div",{ref:w,onClick:v,onMouseEnter:T,onMouseLeave:N,className:"inline-block",children:e}),g&&t.jsxs("div",{ref:m,className:f("fixed z-50","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","rounded-lg shadow-lg","transition-all duration-200","animate-in fade-in zoom-in-95",S[a],k[a]),style:{position:"fixed",top:b.top+"px",left:b.left+"px"},onMouseEnter:s==="hover"?()=>h(!0):void 0,onMouseLeave:s==="hover"?()=>h(!1):void 0,children:[r,i&&t.jsx("div",{className:f("arrow absolute w-2 h-2 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 transform rotate-45",a.startsWith("top")&&"bottom-[-5px] border-t-0 border-l-0",a.startsWith("bottom")&&"top-[-5px] border-b-0 border-r-0",a==="left"&&"right-[-5px] border-l-0 border-b-0",a==="right"&&"left-[-5px] border-r-0 border-t-0",(a==="top"||a==="bottom")&&"left-1/2 -translate-x-1/2",(a==="left"||a==="right")&&"top-1/2 -translate-y-1/2")})]})]})},fd=({sections:e,activeId:r,onActiveChange:a,offset:n=80,container:o,smoothScroll:s=!0,showSubsections:i=!0,className:l})=>{const[d,c]=p.useState(""),g=p.useRef(null),h=r!==void 0?r:d;p.useEffect(()=>{const b=o?document.querySelector(o):window;if(!b)return;const y=N=>N.flatMap(S=>[S.id,...S.subsections?y(S.subsections):[]]),T=y(e).map(N=>document.getElementById(N)).filter(Boolean);if(T.length!==0)return g.current=new IntersectionObserver(N=>{N.forEach(S=>{if(S.isIntersecting){const k=S.target.id;r!==void 0&&a?a(k):c(k)}})},{root:o?b:null,rootMargin:`-${n}px 0px -50% 0px`,threshold:0}),T.forEach(N=>{g.current?.observe(N)}),()=>{g.current?.disconnect()}},[e,o,n,r,a]);const w=b=>{const y=document.getElementById(b);if(!y)return;const v=o?document.querySelector(o):window;if(!v)return;const N=y.offsetTop-n;s?v===window?window.scrollTo({top:N,behavior:"smooth"}):v.scrollTo({top:N,behavior:"smooth"}):v===window?window.scrollTo(0,N):v.scrollTop=N},m=(b,y=0)=>{const v=h===b.id,T=b.subsections?.some(N=>h===N.id)||!1;return t.jsxs("div",{children:[t.jsx("button",{onClick:()=>w(b.id),className:f("w-full text-left px-3 py-1.5 text-sm rounded-md transition-colors",y===0?"font-medium":"pl-6 text-sm",v?"text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/30":T?"text-gray-700 dark:text-gray-300":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800"),style:{paddingLeft:`${y*.75+.75}rem`},children:b.label}),i&&b.subsections&&b.subsections.length>0&&t.jsx("div",{className:"ml-2 border-l-2 border-gray-200 dark:border-gray-700",children:b.subsections.map(N=>m(N,y+1))})]},b.id)};return t.jsx("nav",{className:f("space-y-1",l),children:e.map(b=>m(b,0))})},bd=({isOpen:e,onClose:r,children:a,title:n,description:o,footer:s,side:i="bottom",size:l="md",showHandle:d=!0,showCloseButton:c=!0,className:g})=>{if(p.useEffect(()=>{if(!e)return;const b=y=>{y.key==="Escape"&&r()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[e,r]),!e)return null;const h={bottom:{sm:"h-1/3",md:"h-1/2",lg:"h-2/3",full:"h-full"},top:{sm:"h-1/3",md:"h-1/2",lg:"h-2/3",full:"h-full"},left:{sm:"w-80",md:"w-96",lg:"w-[32rem]",full:"w-full"},right:{sm:"w-80",md:"w-96",lg:"w-[32rem]",full:"w-full"}},w={bottom:"bottom-0 left-0 right-0 rounded-t-2xl",top:"top-0 left-0 right-0 rounded-b-2xl",left:"left-0 top-0 bottom-0 rounded-r-2xl",right:"right-0 top-0 bottom-0 rounded-l-2xl"},m={bottom:"animate-in slide-in-from-bottom duration-300",top:"animate-in slide-in-from-top duration-300",left:"animate-in slide-in-from-left duration-300",right:"animate-in slide-in-from-right duration-300"};return t.jsxs(be,{children:[t.jsx(Je,{isOpen:e,onClose:r,opacity:"dark"}),t.jsxs("div",{className:f("fixed z-50","bg-white dark:bg-gray-900","shadow-xl","flex flex-col",w[i],h[i][l],m[i],g),children:[d&&(i==="bottom"||i==="top")&&t.jsx("div",{className:f("flex items-center justify-center",i==="bottom"?"pt-3 pb-2":"pb-3 pt-2"),children:t.jsx("div",{className:"w-12 h-1.5 bg-gray-300 dark:bg-gray-700 rounded-full"})}),(n||o||c)&&t.jsx("div",{className:"px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsxs("div",{className:"flex-1",children:[n&&t.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:n}),o&&t.jsx("p",{className:"mt-1 text-sm text-gray-600 dark:text-gray-400",children:o})]}),c&&t.jsx("button",{onClick:r,className:"ml-4 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close sheet",children:t.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),t.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:a}),s&&t.jsx("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:s})]})]})},md=({isOpen:e,onClose:r,onSubmit:a,title:n,description:o,placeholder:s="",initialValue:i="",cancelText:l="Cancel",confirmText:d="Confirm",isLoading:c=!1,loadingText:g="Processing...",maxLength:h,required:w=!0,validate:m})=>{const[b,y]=p.useState(i),[v,T]=p.useState(null);p.useEffect(()=>{e&&(y(i),T(null))},[e,i]);const N=async C=>{if(C.preventDefault(),T(null),w&&!b.trim()){T("This field is required");return}if(m){const I=m(b);if(I){T(I);return}}try{await a(b.trim())}catch(I){T(I instanceof Error?I.message:"An error occurred")}},S=()=>{y(i),T(null),r()},k=w?b.trim().length>0:!0;return t.jsx(qr,{isOpen:e,onClose:S,size:"small","aria-labelledby":"text-input-modal-title","aria-describedby":"text-input-modal-description",closeOnEscape:!c,closeOnOverlayClick:!c,children:t.jsxs("form",{onSubmit:N,children:[t.jsxs($r,{variant:"padded",children:[t.jsx("h3",{id:"text-input-modal-title",className:O.heading.h4(),children:n}),t.jsx("p",{id:"text-input-modal-description",className:`${O.body.md()} mt-2 mb-4`,children:o}),t.jsx(Re,{type:"text",value:b,onChange:C=>y(C.target.value),placeholder:s,maxLength:h,disabled:c,autoFocus:!0,"aria-invalid":!!v,"aria-describedby":v?"text-input-error":void 0}),v&&t.jsx("p",{id:"text-input-error",className:`${O.body.sm()} text-red-600 dark:text-red-400 mt-2`,role:"alert",children:v})]}),t.jsxs(Hr,{children:[t.jsx(se,{type:"button",variant:"outline",onClick:S,disabled:c,children:l}),t.jsx(se,{type:"submit",variant:"default",disabled:!k||c,children:c?g:d})]})]})})},yd=({content:e,children:r,placement:a="top",delayShow:n=0,delayHide:o=0,className:s,disabled:i=!1,showArrow:l=!0,variant:d="default",trigger:c="hover",isOpen:g,onVisibilityChange:h})=>{const[w,m]=p.useState(!1),b=p.useRef(void 0),y=p.useRef(void 0),v=p.useRef(null),T=p.useRef(null),N=g!==void 0,S=N?g:w,k=p.useCallback(()=>{i||N||(y.current&&(clearTimeout(y.current),y.current=void 0),n>0?b.current=setTimeout(()=>{m(!0),h?.(!0)},n):(m(!0),h?.(!0)))},[i,N,n,h]),C=p.useCallback(()=>{N||(b.current&&(clearTimeout(b.current),b.current=void 0),o>0?y.current=setTimeout(()=>{m(!1),h?.(!1)},o):(m(!1),h?.(!1)))},[N,o,h]);p.useEffect(()=>()=>{b.current&&clearTimeout(b.current),y.current&&clearTimeout(y.current)},[]),p.useEffect(()=>{if(c!=="click"||!S)return;const F=ne=>{v.current&&!v.current.contains(ne.target)&&T.current&&!T.current.contains(ne.target)&&C()};return document.addEventListener("mousedown",F),()=>{document.removeEventListener("mousedown",F)}},[c,S,C]);const I=()=>{c==="hover"&&k()},E=()=>{c==="hover"&&C()},M=()=>{c==="hover"&&k()},x=()=>{c==="hover"&&C()},P=()=>{c==="click"&&!N&&(S?(m(!1),h?.(!1)):(m(!0),h?.(!0)))},D={top:"bottom-full left-1/2 -translate-x-1/2 -translate-y-2",bottom:"top-full left-1/2 -translate-x-1/2 translate-y-2",left:"right-full top-1/2 -translate-x-2 -translate-y-1/2",right:"left-full top-1/2 translate-x-2 -translate-y-1/2"},U={top:"top-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-b-transparent",bottom:"bottom-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-t-transparent",left:"left-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-r-transparent",right:"right-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-l-transparent"},B={default:"bg-gray-900 dark:bg-gray-700 text-white",info:"bg-blue-600 dark:bg-blue-500 text-white",success:"bg-green-600 dark:bg-green-500 text-white",warning:"bg-yellow-600 dark:bg-yellow-500 text-white",error:"bg-red-600 dark:bg-red-500 text-white"},z={default:{top:"border-t-gray-900 dark:border-t-gray-700",bottom:"border-b-gray-900 dark:border-b-gray-700",left:"border-l-gray-900 dark:border-l-gray-700",right:"border-r-gray-900 dark:border-r-gray-700"},info:{top:"border-t-blue-600 dark:border-t-blue-500",bottom:"border-b-blue-600 dark:border-b-blue-500",left:"border-l-blue-600 dark:border-l-blue-500",right:"border-r-blue-600 dark:border-r-blue-500"},success:{top:"border-t-green-600 dark:border-t-green-500",bottom:"border-b-green-600 dark:border-b-green-500",left:"border-l-green-600 dark:border-l-green-500",right:"border-r-green-600 dark:border-r-green-500"},warning:{top:"border-t-yellow-600 dark:border-t-yellow-500",bottom:"border-b-yellow-600 dark:border-b-yellow-500",left:"border-l-yellow-600 dark:border-l-yellow-500",right:"border-r-yellow-600 dark:border-r-yellow-500"},error:{top:"border-t-red-600 dark:border-t-red-500",bottom:"border-b-red-600 dark:border-b-red-500",left:"border-l-red-600 dark:border-l-red-500",right:"border-r-red-600 dark:border-r-red-500"}};return t.jsxs("div",{ref:T,className:"relative inline-block",onMouseEnter:I,onMouseLeave:E,onFocus:M,onBlur:x,onClick:P,children:[r,S&&!i&&t.jsxs("div",{ref:v,className:f("absolute z-50 px-2 py-1 text-xs font-medium rounded shadow-lg whitespace-nowrap pointer-events-none",D[a],B[d],s),role:"tooltip",children:[e,l&&t.jsx("div",{className:f("absolute w-0 h-0 border-4 arrow",U[a],z[d][a])})]})]})},pd={default:L.InformationCircleIcon,warning:L.ExclamationTriangleIcon,danger:L.XCircleIcon,success:L.CheckCircleIcon,info:L.InformationCircleIcon},vd={default:()=>_.icon.variant.default.lg(),warning:()=>_.icon.variant.warning.lg(),danger:()=>_.icon.variant.error.lg(),success:()=>_.icon.variant.success.lg(),info:()=>_.icon.variant.default.lg()},wd={default:"default",warning:"default",danger:"destructive",success:"default",info:"default"},kd=({isOpen:e,onClose:r,onConfirm:a,title:n,message:o,confirmText:s="Confirm",cancelText:i="Cancel",loadingText:l="Processing...",variant:d="default",isLoading:c=!1})=>{const g=pd[d],h=vd[d],w=wd[d];return t.jsxs(qr,{isOpen:e,onClose:r,size:"small",variant:"web3confirmation","aria-labelledby":"confirmation-dialog-title","aria-describedby":"confirmation-dialog-description",children:[t.jsxs($r,{variant:"padded",children:[t.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[t.jsx(g,{className:h()}),t.jsx("h3",{id:"confirmation-dialog-title",className:O.heading.h4(),children:n})]}),t.jsx("p",{id:"confirmation-dialog-description",className:O.body.md(),children:o})]}),t.jsxs(Hr,{children:[t.jsx(se,{variant:"outline",onClick:r,disabled:c,children:i}),t.jsx(se,{variant:w,onClick:a,disabled:c,children:c?l:s})]})]})},xd=({trigger:e,children:r,placement:a="bottom",openDelay:n=200,closeDelay:o=300,className:s})=>{const[i,l]=p.useState(!1),[d,c]=p.useState({top:0,left:0}),g=p.useRef(null),h=p.useRef(null),w=p.useRef(void 0),m=p.useRef(void 0);p.useEffect(()=>{if(!i||!g.current)return;const N=()=>{const S=g.current.getBoundingClientRect(),k=8;let C=0,I=0;switch(a){case"top":C=S.top-k,I=S.left+S.width/2;break;case"bottom":C=S.bottom+k,I=S.left+S.width/2;break;case"left":C=S.top+S.height/2,I=S.left-k;break;case"right":C=S.top+S.height/2,I=S.right+k;break}c({top:C,left:I})};return N(),window.addEventListener("scroll",N),window.addEventListener("resize",N),()=>{window.removeEventListener("scroll",N),window.removeEventListener("resize",N)}},[i,a]);const b=()=>{m.current&&clearTimeout(m.current),w.current=setTimeout(()=>{l(!0)},n)},y=()=>{w.current&&clearTimeout(w.current),m.current=setTimeout(()=>{l(!1)},o)},v={top:"origin-bottom",bottom:"origin-top",left:"origin-right",right:"origin-left"},T={top:"-translate-x-1/2 -translate-y-full",bottom:"-translate-x-1/2",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"};return t.jsxs(t.Fragment,{children:[t.jsx("div",{ref:g,onMouseEnter:b,onMouseLeave:y,className:"inline-block",children:e}),i&&t.jsx(be,{children:t.jsx("div",{ref:h,className:f("fixed z-50","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","rounded-lg shadow-lg","transition-all duration-200","animate-in fade-in zoom-in-95",v[a],T[a],s),style:{top:d.top+"px",left:d.left+"px"},onMouseEnter:()=>{m.current&&clearTimeout(m.current)},onMouseLeave:y,children:r})})]})},Nd=({children:e,onDrop:r,onDragOver:a,accept:n,showIndicator:o=!0,indicator:s,disabled:i=!1,className:l})=>{const[d,c]=p.useState(!1),[g,h]=p.useState(0),w=T=>{T.preventDefault(),T.stopPropagation(),!i&&(h(N=>N+1),T.dataTransfer.items&&T.dataTransfer.items.length>0&&c(!0))},m=T=>{T.preventDefault(),T.stopPropagation(),!i&&h(N=>{const S=N-1;return S===0&&c(!1),S})},b=T=>{T.preventDefault(),T.stopPropagation(),!i&&a&&a(T)},y=T=>{if(T.preventDefault(),T.stopPropagation(),i)return;if(c(!1),h(0),T.dataTransfer.files&&T.dataTransfer.files.length>0){const S=Array.from(T.dataTransfer.files);let k=S;n&&n.length>0&&(k=S.filter(C=>n.some(I=>{if(I.endsWith("/*")){const E=I.split("/")[0];return C.type.startsWith(E)}return C.type===I}))),r(k);return}const N=T.dataTransfer.getData("text/plain");if(N)try{const S=JSON.parse(N);r(S)}catch{r(N)}},v=t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-blue-50 dark:bg-blue-900/30 border-2 border-dashed border-blue-500 dark:border-blue-400 rounded-lg z-10",children:[t.jsx("svg",{className:"w-12 h-12 text-blue-600 dark:text-blue-400 mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),t.jsx("p",{className:"text-blue-700 dark:text-blue-300 font-medium",children:"Drop here"})]});return t.jsxs("div",{onDragEnter:w,onDragLeave:m,onDragOver:b,onDrop:y,className:f("relative",i&&"opacity-50 cursor-not-allowed",l),children:[e,o&&d&&!i&&(s||v)]})},Cd=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UdragUdropUlist",children:r||"UdragUdropUlist Component"}),Sd=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UsortableUgrid",children:r||"UsortableUgrid Component"}),Ed=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UnestedUdrag",children:r||"UnestedUdrag Component"}),Td=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UgestureUdetector",children:r||"UgestureUdetector Component"}),Ad=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UswipeUactions",children:r||"UswipeUactions Component"}),Id=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UpinchUzoom",children:r||"UpinchUzoom Component"}),Md=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UdoubleUtap",children:r||"UdoubleUtap Component"}),Ld=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UlongUpress",children:r||"UlongUpress Component"}),Pd=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UradialUmenu",children:r||"UradialUmenu Component"}),Od=({children:e,onRefresh:r,disabled:a=!1,refreshingText:n="Refreshing...",pullDownText:o="Pull down to refresh",releaseText:s="Release to refresh",threshold:i=80,maxPullDistance:l=120,className:d=""})=>{const[c,g]=p.useState(0),[h,w]=p.useState(!1),[m,b]=p.useState(!1),y=p.useRef(0),v=p.useRef(null);p.useEffect(()=>{const C=v.current;if(!C)return;const I=x=>{if(a||h)return;C.scrollTop<=0&&(y.current=x.touches[0].clientY,b(!0))},E=x=>{if(!m)return;const D=x.touches[0].clientY-y.current;if(D>0&&C.scrollTop<=0){const U=Math.min(D/l,1),B=Math.min(D*(1-U*.5),l);g(B),D>10&&x.preventDefault()}},M=async()=>{if(m)if(b(!1),c>=i&&!h){w(!0);try{await r()}catch{}finally{w(!1),g(0)}}else g(0)};return C.addEventListener("touchstart",I,{passive:!0}),C.addEventListener("touchmove",E,{passive:!1}),C.addEventListener("touchend",M),()=>{C.removeEventListener("touchstart",I),C.removeEventListener("touchmove",E),C.removeEventListener("touchend",M)}},[a,h,m,c,i,l,r]);const T=Math.min(c/i,1),N=m||h,S=m?c:h?i:0,k=()=>h?n:c>=i?s:o;return t.jsxs("div",{ref:v,className:`relative ${d}`,style:{height:"100%",overflowY:"auto",WebkitOverflowScrolling:"touch"},children:[t.jsx("div",{className:"sticky top-0 left-0 right-0 flex items-center justify-center bg-gradient-to-b from-blue-50/90 to-transparent dark:from-blue-900/20 dark:to-transparent backdrop-blur-sm z-10 transition-all duration-300 ease-out",style:{height:`${S}px`,marginTop:m?0:`-${S}px`,opacity:N?1:0,pointerEvents:"none"},children:t.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[t.jsx(L.ArrowPathIcon,{className:`w-6 h-6 text-blue-600 dark:text-blue-400 transition-transform duration-200 ${h?"animate-spin":""}`,style:{transform:`rotate(${T*360}deg)`}}),c>20&&t.jsx("span",{className:"text-xs font-medium text-blue-600 dark:text-blue-400",children:k()})]})}),t.jsx("div",{style:{paddingTop:m?`${c}px`:0,transition:m?"none":"padding-top 200ms ease-out"},children:e})]})},de={twitter:(e,r,a)=>{const n=a.length>0?`&hashtags=${a.join(",")}`:"";return`https://twitter.com/intent/tweet?url=${encodeURIComponent(e)}&text=${encodeURIComponent(r)}${n}`},facebook:e=>`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(e)}`,linkedin:(e,r,a)=>`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(e)}`,reddit:(e,r)=>`https://reddit.com/submit?url=${encodeURIComponent(e)}&title=${encodeURIComponent(r)}`,telegram:(e,r)=>`https://t.me/share/url?url=${encodeURIComponent(e)}&text=${encodeURIComponent(r)}`,whatsapp:(e,r)=>`https://wa.me/?text=${encodeURIComponent(r+" "+e)}`,email:(e,r,a)=>`mailto:?subject=${encodeURIComponent(r)}&body=${encodeURIComponent(a+`
|
|
46
|
+
`,Ki(b))}}},[e]),t.jsx("div",{ref:h,className:`${w()} ${s}`,children:o})},Zi=({children:e,delay:r=0,className:a=""})=>t.jsx(ir,{animation:"fade-in-up",delay:r,className:a,children:e}),Xi=({children:e,delay:r=0,className:a=""})=>t.jsx(ir,{animation:"fade-in-scale",delay:r,className:a,children:e}),Qi=({children:e,className:r=""})=>t.jsx(ir,{animation:"float",className:r,children:e}),Ji=({isOpen:e,onClick:r,opacity:a="medium",blur:n=!1,zIndex:o=50,className:s,children:i})=>{const l={light:"bg-black/20 dark:bg-black/30",medium:"bg-black/50 dark:bg-black/60",dark:"bg-black/75 dark:bg-black/80"};return e?t.jsx("div",{onClick:r,className:f("fixed inset-0","transition-all duration-200",l[a],n&&"backdrop-blur-sm",s),style:{zIndex:o},role:"presentation","aria-hidden":"true",children:i}):null},Aa=({isOpen:e,onClose:r,children:a,size:n="md",showCloseButton:o=!0,closeOnOutsideClick:s=!0,closeOnEscape:i=!0,className:l})=>{if(v.useEffect(()=>{if(!i||!e||!r)return;const g=h=>{h.key==="Escape"&&r()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[e,r,i]),!e)return null;const d={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-full mx-4"},c=()=>{s&&r&&r()};return t.jsxs(me,{children:[t.jsx(er,{isOpen:e,onClose:c,opacity:"dark",blur:!0}),t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:t.jsxs("div",{className:f("relative w-full",d[n],"bg-white dark:bg-gray-900","rounded-lg shadow-xl","animate-in fade-in zoom-in-95 duration-200",l),onClick:g=>g.stopPropagation(),children:[o&&r&&t.jsx("button",{onClick:r,className:"absolute top-4 right-4 z-10 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close dialog",children:t.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),a]})})]})},Ri=({isOpen:e,onClose:r,items:a,placeholder:n="Type a command or search...",emptyMessage:o="No results found.",className:s})=>{const[i,l]=v.useState(""),[d,c]=v.useState(0),g=v.useRef(null),h=a.filter(y=>{const p=i.toLowerCase();return y.label.toLowerCase().includes(p)||y.keywords?.some(T=>T.toLowerCase().includes(p))||y.group?.toLowerCase().includes(p)}),w=h.reduce((y,p)=>{const T=p.group||"Commands";return y[T]||(y[T]=[]),y[T].push(p),y},{});v.useEffect(()=>{e||(l(""),c(0))},[e]),v.useEffect(()=>{e&&g.current&&g.current.focus()},[e]),v.useEffect(()=>{c(0)},[i]);const m=y=>{switch(y.key){case"ArrowDown":y.preventDefault(),c(p=>p<h.length-1?p+1:p);break;case"ArrowUp":y.preventDefault(),c(p=>p>0?p-1:p);break;case"Enter":y.preventDefault(),h[d]&&(h[d].onSelect(),r());break;case"Escape":y.preventDefault(),r();break}},b=y=>{y.onSelect(),r()};return t.jsxs(Aa,{isOpen:e,onClose:r,size:"lg",showCloseButton:!1,className:f("overflow-hidden p-0",s),children:[t.jsx("div",{className:"border-b border-gray-200 dark:border-gray-700 p-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),t.jsx("input",{ref:g,type:"text",value:i,onChange:y=>l(y.target.value),onKeyDown:m,placeholder:n,className:"flex-1 bg-transparent border-none outline-none text-gray-900 dark:text-white placeholder-gray-500"})]})}),t.jsx("div",{className:"max-h-96 overflow-y-auto p-2",children:Object.keys(w).length===0?t.jsx("div",{className:"px-4 py-8 text-sm text-gray-500 dark:text-gray-400 text-center",children:o}):Object.entries(w).map(([y,p])=>t.jsxs("div",{className:"mb-4 last:mb-0",children:[t.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:y}),t.jsx("div",{className:"space-y-1",children:p.map(T=>{const C=h.indexOf(T)===d;return t.jsxs("button",{onClick:()=>b(T),className:f("w-full flex items-center gap-3 px-3 py-2 rounded-md","text-sm text-left transition-colors",C?"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-900 dark:text-white"),children:[T.icon&&t.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:T.icon}),t.jsx("span",{className:"flex-1 truncate",children:T.label}),T.shortcut&&t.jsx("span",{className:"flex-shrink-0 text-xs text-gray-500 dark:text-gray-400 font-mono",children:T.shortcut})]},T.id)})})]},y))}),t.jsxs("div",{className:"border-t border-gray-200 dark:border-gray-700 px-4 py-2 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"↑"}),t.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"↓"}),"to navigate"]}),t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"↵"}),"to select"]})]}),t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("kbd",{className:"px-1.5 py-0.5 bg-gray-100 dark:bg-gray-800 rounded",children:"esc"}),"to close"]})]})]})},el=X.cva("bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 transition-all duration-200",{variants:{variant:{default:"border-gray-200 dark:border-gray-700 border hover:shadow-lg",elevated:"shadow-lg hover:shadow-xl",minimal:"bg-transparent shadow-none border-none p-4"},trend:{none:"",up:"border-l-4 border-green-500",down:"border-l-4 border-red-500",neutral:"border-l-4 border-gray-400"}},defaultVariants:{variant:"default",trend:"none"}}),rl=({label:e,value:r,change:a,trend:n="none",icon:o,variant:s="default",className:i})=>{const l={up:"text-green-600 dark:text-green-400",down:"text-red-600 dark:text-red-400",neutral:"text-gray-600 dark:text-gray-400",none:"text-gray-600 dark:text-gray-400"},d={up:"↗",down:"↘",neutral:"→",none:""};return t.jsx("div",{className:f(el({variant:s,trend:n}),i),children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-1",children:e}),t.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:r}),a&&t.jsxs("p",{className:f("text-sm font-medium flex items-center gap-1 mt-1",l[n||"none"]),children:[t.jsx("span",{children:d[n||"none"]}),a]})]}),o&&t.jsx("div",{className:"text-3xl opacity-80",children:o})]})})},tl=X.cva("space-y-6",{variants:{variant:{default:"",card:"bg-white dark:bg-gray-800 rounded-lg border-gray-200 dark:border-gray-700 border p-6",minimal:"space-y-4"},spacing:{tight:"space-y-3",normal:"space-y-4",relaxed:"space-y-6",loose:"space-y-8"}},defaultVariants:{variant:"default",spacing:"normal"}}),al=({title:e,description:r,children:a,variant:n="default",spacing:o="normal",className:s})=>t.jsxs("div",{className:f(tl({variant:n,spacing:o}),s),children:[(e||r)&&t.jsxs("div",{className:"space-y-1",children:[e&&t.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white",children:e}),r&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:r})]}),a]}),nl=X.cva("flex flex-col items-center text-center space-y-4",{variants:{layout:{vertical:"flex-col items-center text-center",horizontal:"flex-row items-start text-left space-y-0 space-x-4",minimal:"flex-col space-y-2"},spacing:{tight:"space-y-2",normal:"space-y-4",relaxed:"space-y-6"},interactive:{true:"transition-all duration-200 hover:transform hover:scale-105 cursor-pointer",false:""}},defaultVariants:{layout:"vertical",spacing:"normal",interactive:!1}}),ol=({icon:e,title:r,description:a,layout:n="vertical",spacing:o="normal",interactive:s=!1,className:i,onClick:l})=>t.jsxs("div",{className:f(nl({layout:n,spacing:o,interactive:s}),i),onClick:l,children:[t.jsx("div",{className:"text-4xl mb-4 flex-shrink-0",children:e}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white",children:r}),t.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:a})]})]}),sl=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UfocusUindicator",children:r||"UfocusUindicator Component"}),il=({icon:e,size:r="md",shape:a="rounded",variant:n="blue-purple",gradientClasses:o,className:s,iconClassName:i})=>{const l={sm:{container:"w-10 h-10",icon:"h-5 w-5"},md:{container:"w-12 h-12",icon:"h-6 w-6"},lg:{container:"w-16 h-16",icon:"h-8 w-8"},xl:{container:"w-20 h-20",icon:"h-10 w-10"}},d={square:"rounded-lg",rounded:"rounded-xl",circle:"rounded-full"},c={"blue-purple":"bg-gradient-to-r from-blue-600 to-purple-600","green-blue":"bg-gradient-to-r from-green-600 to-blue-600","orange-red":"bg-gradient-to-r from-orange-600 to-red-600",gray:"bg-gradient-to-r from-gray-600 to-gray-800 dark:from-gray-700 dark:to-gray-900",custom:o||"bg-gradient-to-r from-blue-600 to-purple-600"},g=l[r];return t.jsx("div",{className:f("flex items-center justify-center flex-shrink-0",g.container,d[a],c[n],s),children:t.jsx(e,{className:f("text-white",g.icon,i)})})},ll={sm:"w-12 h-12",md:"w-16 h-16",lg:"w-20 h-20",xl:"w-24 h-24"},cl={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},dl={primary:"bg-gradient-to-br from-blue-100 to-blue-200 text-blue-600 shadow-lg hover:shadow-blue-200",secondary:"bg-gradient-to-br from-purple-100 to-purple-200 text-purple-600 shadow-lg hover:shadow-purple-200",success:"bg-gradient-to-br from-green-100 to-green-200 text-green-600 shadow-lg hover:shadow-green-200",warning:"bg-gradient-to-br from-yellow-100 to-yellow-200 text-yellow-600 shadow-lg hover:shadow-yellow-200",error:"bg-gradient-to-br from-red-100 to-red-200 text-red-600 shadow-lg hover:shadow-red-200",neutral:"bg-gradient-to-br from-gray-100 to-gray-200 text-gray-600 shadow-lg hover:shadow-gray-200"},ul={square:"rounded-none",rounded:"rounded-2xl",circle:"rounded-full"},gl={none:"",float:"animate-float",pulse:"animate-pulse",bounce:"animate-bounce-slow"},hl=({children:e,size:r="lg",variant:a="primary",shape:n="rounded",animation:o="float",className:s})=>t.jsx("div",{className:f("flex items-center justify-center mx-auto mb-6 transition-all duration-300 group-hover:scale-105",ll[r],dl[a],ul[n],gl[o],s),children:t.jsx("div",{className:f(cl[r]),children:e})}),fl=({icon:e,children:r,iconPosition:a="left",gap:n="md",iconSize:o="md",align:s="left",variant:i="default",className:l,iconClassName:d,textClassName:c})=>{const g={xs:"gap-1",sm:"gap-2",md:"gap-3",lg:"gap-4"},h={xs:"h-3 w-3",sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-8 w-8"},w={left:"text-left",center:"text-center items-center",right:"text-right items-end"},m={default:"text-gray-700 dark:text-gray-300",primary:"text-blue-600 dark:text-blue-400",success:"text-green-600 dark:text-green-400",warning:"text-yellow-600 dark:text-yellow-400",danger:"text-red-600 dark:text-red-400",muted:"text-gray-500 dark:text-gray-400"},b={left:"flex items-center",right:"flex flex-row-reverse items-center",top:"flex flex-col"};return t.jsxs("div",{className:f(b[a],g[n],a==="top"&&w[s],m[i],l),children:[t.jsx(e,{className:f(h[o],"flex-shrink-0",d)}),t.jsx("span",{className:f(c),children:r})]})},bl=({children:e,title:r,variant:a="info",size:n="md",icon:o,bordered:s=!0,className:i})=>{const l={info:{bg:"bg-blue-50 dark:bg-blue-900/20",border:"border-blue-200 dark:border-blue-800",title:"text-blue-900 dark:text-blue-300",text:"text-blue-800 dark:text-blue-400",icon:"text-blue-600 dark:text-blue-400"},success:{bg:"bg-green-50 dark:bg-green-900/20",border:"border-green-200 dark:border-green-800",title:"text-green-900 dark:text-green-300",text:"text-green-800 dark:text-green-400",icon:"text-green-600 dark:text-green-400"},warning:{bg:"bg-yellow-50 dark:bg-yellow-900/20",border:"border-yellow-200 dark:border-yellow-800",title:"text-yellow-900 dark:text-yellow-300",text:"text-yellow-800 dark:text-yellow-400",icon:"text-yellow-600 dark:text-yellow-400"},danger:{bg:"bg-red-50 dark:bg-red-900/20",border:"border-red-200 dark:border-red-800",title:"text-red-900 dark:text-red-300",text:"text-red-800 dark:text-red-400",icon:"text-red-600 dark:text-red-400"},neutral:{bg:"bg-gray-50 dark:bg-gray-800",border:"border-gray-200 dark:border-gray-700",title:"text-gray-900 dark:text-gray-100",text:"text-gray-700 dark:text-gray-300",icon:"text-gray-600 dark:text-gray-400"}},d={sm:"p-3",md:"p-4",lg:"p-6"},c=l[a];return t.jsxs("div",{className:f("rounded-lg",c.bg,s&&`border ${c.border}`,d[n],i),children:[(r||o)&&t.jsxs("div",{className:"flex items-start gap-3 mb-2",children:[o&&t.jsx(o,{className:f("h-5 w-5 flex-shrink-0 mt-0.5",c.icon)}),r&&t.jsx("h3",{className:f(P.body.strong.md(),c.title),children:r})]}),t.jsx("div",{className:f(!r&&!o&&c.text),children:e})]})},ml=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UkeyboardUshortcut",children:r||"UkeyboardUshortcut Component"}),yl=({size:e="md",className:r="",showText:a=!0,onClick:n,logoSrc:o="/logo.png",logoAlt:s="Logo",logoText:i,fontFamily:l="Dancing Script, cursive"})=>{const c=(()=>{switch(e){case"sm":return{container:"space-x-2",image:"h-6 w-6",text:"text-lg"};case"md":return{container:"space-x-2",image:"h-8 w-8",text:"text-2xl"};case"lg":return{container:"space-x-3",image:"h-10 w-10",text:"text-3xl"};case"xl":return{container:"space-x-4",image:"h-12 w-12",text:"text-4xl"};default:return{container:"space-x-2",image:"h-8 w-8",text:"text-2xl"}}})(),g=t.jsxs(t.Fragment,{children:[t.jsx("img",{src:o,alt:s,className:c.image}),a&&t.jsx("div",{className:`${c.text} font-bold text-gray-900 dark:text-gray-100`,style:{fontFamily:l,fontWeight:"700"},children:i})]});return n?t.jsx("button",{onClick:n,className:`flex items-center ${c.container} ${r} hover:opacity-80 transition-opacity`,children:g}):t.jsx("div",{className:`flex items-center ${c.container} ${r}`,children:g})},pl=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UmorphUtransition",children:r||"UmorphUtransition Component"}),vl=({title:e,description:r,count:a,countLabel:n,action:o,loading:s=!1,loadingText:i="Loading...",size:l="md",className:d})=>{const g={sm:{title:P.heading.h4(),description:P.body.sm(),count:P.caption.default()},md:{title:P.heading.h3(),description:P.body.md(),count:P.body.sm()},lg:{title:P.heading.h2(),description:P.body.lg(),count:P.body.md()}}[l];return t.jsxs("div",{className:f("flex items-start justify-between gap-4",d),children:[t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[t.jsx("h2",{className:f(g.title,"text-gray-900 dark:text-gray-100"),children:e}),a!==void 0&&t.jsxs("span",{className:f(g.count,"text-gray-500 dark:text-gray-400"),children:["(",a,n&&` ${n}`,")"]}),s&&t.jsxs("span",{className:f(g.count,"text-gray-500 dark:text-gray-400 flex items-center gap-2"),children:[t.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600"}),i]})]}),r&&t.jsx("p",{className:f(g.description,"mt-1 text-gray-600 dark:text-gray-400"),children:r})]}),o&&t.jsx("div",{className:"flex-shrink-0",children:o})]})},wl=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UparallaxUscroll",children:r||"UparallaxUscroll Component"}),kl=({actions:e,orientation:r="horizontal",columns:a=3,className:n})=>{const o={default:"bg-white dark:bg-gray-900 hover:bg-gray-50 dark:hover:bg-gray-800 text-gray-900 dark:text-white border-gray-200 dark:border-gray-700",primary:"bg-blue-500 hover:bg-blue-600 text-white border-blue-500",success:"bg-green-500 hover:bg-green-600 text-white border-green-500",warning:"bg-yellow-500 hover:bg-yellow-600 text-white border-yellow-500",danger:"bg-red-500 hover:bg-red-600 text-white border-red-500"},s={horizontal:"flex flex-wrap gap-2",vertical:"flex flex-col gap-2",grid:"grid gap-2"};return t.jsx("div",{className:f(s[r],r==="grid"&&`grid-cols-${a}`,n),style:r==="grid"?{gridTemplateColumns:`repeat(${a}, 1fr)`}:void 0,children:e.map(i=>t.jsxs("button",{onClick:i.onClick,disabled:i.disabled,className:f("flex items-center justify-center gap-2 px-4 py-3 rounded-lg border transition-colors font-medium",o[i.variant||"default"],i.disabled&&"opacity-50 cursor-not-allowed"),children:[i.icon&&t.jsx("span",{className:"w-5 h-5",children:i.icon}),t.jsx("span",{children:i.label})]},i.id))})},xl=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UrevealUonUscroll",children:r||"UrevealUonUscroll Component"}),Nl={sm:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"},md:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"},lg:{container:"px-6 py-3",icon:"h-5 w-5 mr-2",text:"font-semibold"}},Cl=({icon:e,text:r,variant:a="default",size:n="md",className:o})=>{const{container:s,icon:i}=lo(a),l=Nl[n];return t.jsxs("div",{className:f("inline-flex items-center rounded-full mb-6",s,l.container,o),children:[t.jsx("div",{className:f("animate-float-icon",i,l.icon),children:e}),t.jsx("span",{className:l.text,children:r})]})},Sl=({title:e,onAdd:r,addButtonTooltip:a,loading:n,className:o=""})=>t.jsx("div",{className:`p-4 border-b border-gray-200 dark:border-gray-700 ${o}`,children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:e}),t.jsxs("div",{className:"flex items-center space-x-2",children:[n&&t.jsx("div",{className:"w-5 h-5 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"}),r&&t.jsx("button",{onClick:r,className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors",title:a,"aria-label":a||"Add",children:t.jsx("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})})]})]})}),El=e=>{switch(e){case"cog":return L.Cog6ToothIcon;case"arrow-right":return L.ArrowRightIcon;case"shield":return L.ShieldCheckIcon;case"reply":case"chat":return L.ChatBubbleLeftRightIcon;case"filter":return L.FunnelIcon;case"plug":return L.LinkIcon;case"adjustments":return L.AdjustmentsHorizontalIcon;case"currency-dollar":return L.CurrencyDollarIcon;default:return L.Cog6ToothIcon}},Tl=({settings:e,selectedSetting:r,onSettingSelect:a,className:n=""})=>t.jsx("nav",{className:f("space-y-1",n),"aria-label":"Settings navigation",children:t.jsx("ul",{className:"space-y-1",role:"list",children:e.map(o=>{const s=El(o.icon),i=r===o.id;return t.jsx("li",{children:t.jsx("button",{onClick:()=>a(o.id),className:f("w-full flex items-center text-left px-3 py-2 rounded-lg transition-colors h-[44px]",P.body.sm(),i?"bg-orange-100 dark:bg-orange-900/30 text-orange-700 dark:text-orange-300":"hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300"),"aria-current":i?"page":void 0,title:o.description,children:t.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[t.jsx(s,{className:"h-5 w-5 mr-3 flex-shrink-0","aria-hidden":"true"}),t.jsx("span",{className:"truncate",children:o.title})]})})},o.id)})})}),Al=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UskipUnavigation",children:r||"UskipUnavigation Component"}),Il=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UsortUdropdown",children:r||"UsortUdropdown Component"}),Ml=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UversionUbadge",children:r||"UversionUbadge Component"}),Ll=({children:e,as:r="span"})=>t.jsx(r,{className:"sr-only",children:e}),lr=X.cva("transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-sm",{variants:{variant:{subtle:P.link.subtle(),default:P.link.default(),muted:P.link.muted(),external:P.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"}}),Vr=Y.forwardRef(({className:e,variant:r,size:a,to:n,href:o,external:s,children:i,...l},d)=>{const c=n||o;return c?s||c.startsWith("http")||c.startsWith("mailto:")?t.jsx("a",{className:f(lr({variant:r==="subtle"?"external":r,size:a,className:e})),href:c,target:"_blank",rel:"noopener noreferrer",ref:d,...l,children:i}):t.jsx(mr.Link,{className:f(lr({variant:r,size:a,className:e})),to:c,ref:d,...l,children:i}):t.jsx("span",{className:f(lr({variant:r,size:a,className:e})),...l,children:i})});Vr.displayName="SmartLink";const Pl=(e,r)=>Y.useMemo(()=>{let a=e;return Object.entries(r).forEach(([n,o])=>{const s=new RegExp(`\\b${n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");a=a.replace(s,i=>`<SmartLink to="${o}" variant="subtle">${i}</SmartLink>`)}),a},[e,r]),Ol={documentation:"/document",settings:"/settings",about:"/about",contact:"/contact","privacy policy":"/privacy",privacy:"/privacy","terms of service":"/terms",terms:"/terms","cookie policy":"/cookies",cookies:"/cookies",points:"/points","earn points":"/how-to-earn-points","how to earn points":"/how-to-earn-points","connect wallet":"/connect","connect your wallet":"/connect","wallet connection":"/connect",wallet:"/connect",compose:"/compose","compose email":"/compose","send email":"/compose",mail:"/mail",email:"/mail",inbox:"/mail",dashboard:"/mail",delegate:"/delegate",delegation:"/delegate",manage:"/manage","manage preferences":"/preferences",profile:"/settings",account:"/settings",preferences:"/preferences",token:"/token","web3 users":"/web3-users","web3 projects":"/web3-projects","get started":"/connect","start here":"/connect","learn more":"/document","read more":"/document","our features":"/document",support:"/contact",help:"/document","contact us":"/contact"},Ul=({children:e,mappings:r=Ol,className:a,variant:n="subtle"})=>{const o=Y.useMemo(()=>{if(!e||typeof e!="string")return e||"";let i=e;return Object.entries(r).sort(([d],[c])=>c.length-d.length).forEach(([d,c])=>{if(d&&c){const g=new RegExp(`\\b${d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");i=i.replace(g,h=>`__LINK_START__${c}__LINK_MID__${h}__LINK_END__`)}}),i},[e,r]);if(!o||typeof o!="string")return t.jsx("span",{className:a,children:e});const s=o.split(/(__LINK_START__.*?__LINK_END__)/);return t.jsx("span",{className:a,children:s.map((i,l)=>{const d=i.match(/__LINK_START__(.*?)__LINK_MID__(.*?)__LINK_END__/);if(d){const[,c,g]=d;return t.jsx(Vr,{to:c,variant:n,children:g},l)}return i})})},Dl=({href:e,children:r,variant:a="default",external:n=!1,showExternalIcon:o=!1,disabled:s=!1,className:i,...l})=>{const d=n||e.startsWith("http://")||e.startsWith("https://"),c={default:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",primary:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium",secondary:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100",muted:"text-gray-500 dark:text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",underline:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 underline"},g=d?{target:"_blank",rel:"noopener noreferrer"}:{};return s?t.jsxs("span",{className:f("cursor-not-allowed opacity-50",c[a],i),children:[r,o&&d&&t.jsx(L.ArrowTopRightOnSquareIcon,{className:"inline-block h-4 w-4 ml-1"})]}):t.jsxs("a",{href:e,className:f("inline-flex items-center transition-colors",c[a],i),...g,...l,children:[r,o&&d&&t.jsx(L.ArrowTopRightOnSquareIcon,{className:"inline-block h-4 w-4 ml-1 flex-shrink-0"})]})},jl=({href:e,children:r,showIcon:a=!0,iconPosition:n="right",size:o="md",variant:s="default",className:i,onClick:l})=>{const d={sm:{text:P.body.sm(),icon:"h-3 w-3",gap:"gap-1"},md:{text:P.body.md(),icon:"h-4 w-4",gap:"gap-1.5"},lg:{text:P.body.lg(),icon:"h-5 w-5",gap:"gap-2"}},c={default:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300",primary:"text-blue-700 dark:text-blue-300 hover:text-blue-800 dark:hover:text-blue-200 font-semibold",muted:"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"},g=d[o];return t.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",onClick:l,className:f("inline-flex items-center",g.gap,g.text,c[s],"underline decoration-1 underline-offset-2","hover:decoration-2","transition-all duration-200",i),children:[a&&n==="left"&&t.jsx(L.ArrowTopRightOnSquareIcon,{className:f(g.icon,"flex-shrink-0")}),t.jsx("span",{children:r}),a&&n==="right"&&t.jsx(L.ArrowTopRightOnSquareIcon,{className:f(g.icon,"flex-shrink-0")})]})},_l=({items:e,separator:r="/",className:a})=>t.jsx("nav",{className:f("flex items-center gap-2 text-sm",a),children:e.map((n,o)=>t.jsxs(v.Fragment,{children:[o>0&&t.jsx("span",{className:"text-gray-400 dark:text-gray-600",children:r}),o===e.length-1?t.jsx("span",{className:"text-gray-900 dark:text-white font-medium",children:n.label}):t.jsx("button",{onClick:n.onClick,className:"text-blue-600 dark:text-blue-400 hover:underline",children:n.label})]},o))}),zl=be.Root,Ia=Y.forwardRef(({className:e,...r},a)=>t.jsx(be.List,{ref:a,className:f(_.navigation.tabs.list(),e),...r}));Ia.displayName=be.List.displayName;const Ma=Y.forwardRef(({className:e,...r},a)=>t.jsx(be.Trigger,{ref:a,className:f(_.navigation.tabs.trigger(),e),...r}));Ma.displayName=be.Trigger.displayName;const La=Y.forwardRef(({className:e,...r},a)=>t.jsx(be.Content,{ref:a,className:f(_.navigation.tabs.content(),e),...r}));La.displayName=be.Content.displayName;const Bl=({items:e,orientation:r="horizontal",className:a})=>{const[n,o]=v.useState(new Set),s=l=>{o(d=>{const c=new Set(d);return c.has(l)?c.delete(l):c.add(l),c})},i=(l,d)=>{const c=l.children&&l.children.length>0,g=n.has(d),h=t.jsxs(t.Fragment,{children:[l.icon&&t.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:l.icon}),t.jsx("span",{className:"flex-1",children:l.label}),c&&t.jsx("svg",{className:f("w-4 h-4 transition-transform",r==="horizontal"&&!g&&"-rotate-90",g&&"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),w=f("flex items-center gap-2 px-4 py-2 text-sm font-medium","transition-colors",l.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800");return t.jsxs("div",{children:[c?t.jsx("button",{onClick:()=>s(d),className:f(w,"w-full"),children:h}):l.href?t.jsx("a",{href:l.href,className:w,onClick:l.onClick,children:h}):t.jsx("button",{onClick:l.onClick,className:f(w,"w-full"),children:h}),c&&g&&t.jsx("div",{className:f("bg-gray-50 dark:bg-gray-800/50",r==="horizontal"?"pl-4":"border-l-2 border-gray-200 dark:border-gray-700 ml-4"),children:l.children.map((m,b)=>t.jsx("div",{children:m.href?t.jsxs("a",{href:m.href,onClick:m.onClick,className:f("flex items-center gap-2 px-4 py-2 text-sm","transition-colors",m.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"),children:[m.icon&&t.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:m.icon}),m.label]}):t.jsxs("button",{onClick:m.onClick,className:f("w-full flex items-center gap-2 px-4 py-2 text-sm","transition-colors",m.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"),children:[m.icon&&t.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:m.icon}),m.label]})},b))})]},d)};return t.jsx("nav",{className:f("bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg",r==="horizontal"?"flex flex-wrap":"flex flex-col",a),children:e.map((l,d)=>i(l,d))})},Wl=({items:e,selectedPath:r,onSelect:a,variant:n="default",className:o})=>{const s=n==="compact"?"space-y-1":"space-y-0";return t.jsx("div",{className:f(s,o),children:e.map(i=>{const l=i.icon,d=r===i.path,c=i.disabled,g=f("flex items-start cursor-pointer transition-colors",n==="compact"?"p-3 rounded-lg":"p-4 border-b border-gray-200 dark:border-gray-700 last:border-b-0",c&&"opacity-50 cursor-not-allowed"),h=d?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"hover:bg-gray-50 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300";return t.jsxs("div",{onClick:()=>!c&&a(i.path),className:f(g,!c&&h),role:"button",tabIndex:c?-1:0,"aria-current":d?"page":void 0,"aria-disabled":c,onKeyDown:w=>{!c&&(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),a(i.path))},children:[t.jsx(l,{className:"h-5 w-5 mt-0.5 mr-3 flex-shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:f("font-medium",P.body.md()),children:[i.label,i.badge!==void 0&&i.badge>0&&t.jsx("span",{className:"ml-2 inline-flex items-center justify-center px-2 py-0.5 text-xs font-medium bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 rounded-full",children:i.badge})]}),i.description&&t.jsx("div",{className:f("text-xs text-gray-500 dark:text-gray-400 mt-0.5"),children:i.description})]})]},i.id)})})},Fl=({items:e,className:r})=>t.jsx("nav",{className:f("flex flex-col gap-1",r),children:e.map(a=>t.jsxs("button",{onClick:a.onClick,className:f("flex items-center gap-3 px-4 py-3 rounded-lg transition-colors",a.active?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"),children:[a.icon&&t.jsx("span",{className:"w-5 h-5",children:a.icon}),t.jsx("span",{className:"flex-1 text-left font-medium",children:a.label}),a.badge&&t.jsx("span",{className:"px-2 py-0.5 bg-gray-200 dark:bg-gray-700 rounded text-xs",children:a.badge})]},a.id))}),Vl=({currentPage:e,totalPages:r,onPageChange:a,siblingCount:n=1,showFirstLast:o=!1,size:s="md",className:i})=>{const d={sm:{button:"h-8 w-8 text-xs",icon:"h-3 w-3",text:P.body.sm()},md:{button:"h-10 w-10 text-sm",icon:"h-4 w-4",text:P.body.md()},lg:{button:"h-12 w-12 text-base",icon:"h-5 w-5",text:P.body.lg()}}[s],g=(()=>{const N=[];N.push(1);const C=Math.max(e-n,2),k=Math.min(e+n,r-1);C>2&&N.push("ellipsis");for(let S=C;S<=k;S++)N.push(S);return k<r-1&&N.push("ellipsis"),r>1&&N.push(r),N})(),h=()=>{e>1&&a(e-1)},w=()=>{e<r&&a(e+1)},m=()=>{a(1)},b=()=>{a(r)},y=f("inline-flex items-center justify-center","rounded-md border border-gray-300 dark:border-gray-600","transition-all duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500","disabled:opacity-50 disabled:cursor-not-allowed"),p=N=>f(y,d.button,d.text,N?"bg-blue-600 text-white border-blue-600 dark:bg-blue-500 dark:border-blue-500":"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700"),T=f(y,d.button,"bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300","hover:bg-gray-50 dark:hover:bg-gray-700");return t.jsxs("nav",{className:f("flex items-center gap-1",i),"aria-label":"Pagination",children:[o&&t.jsx("button",{onClick:m,disabled:e===1,className:T,"aria-label":"Go to first page",children:t.jsx("span",{className:d.text,children:"First"})}),t.jsx("button",{onClick:h,disabled:e===1,className:T,"aria-label":"Go to previous page",children:t.jsx(L.ChevronLeftIcon,{className:d.icon})}),g.map((N,C)=>N==="ellipsis"?t.jsx("span",{className:f("inline-flex items-center justify-center",d.button,"text-gray-400 dark:text-gray-500"),children:"..."},`ellipsis-${C}`):t.jsx("button",{onClick:()=>a(N),className:p(N===e),"aria-label":`Go to page ${N}`,"aria-current":N===e?"page":void 0,children:N},N)),t.jsx("button",{onClick:w,disabled:e===r,className:T,"aria-label":"Go to next page",children:t.jsx(L.ChevronRightIcon,{className:d.icon})}),o&&t.jsx("button",{onClick:b,disabled:e===r,className:T,"aria-label":"Go to last page",children:t.jsx("span",{className:d.text,children:"Last"})})]})},$l=({currentPage:e,totalPages:r,onPageChange:a,maxVisible:n=7,className:o})=>{const s=[];if(r<=n)for(let i=1;i<=r;i++)s.push(i);else{s.push(1),e>3&&s.push("...");const i=Math.max(2,e-1),l=Math.min(r-1,e+1);for(let d=i;d<=l;d++)s.push(d);e<r-2&&s.push("..."),s.push(r)}return t.jsxs("nav",{className:f("flex items-center gap-1",o),children:[t.jsx("button",{onClick:()=>a(e-1),disabled:e===1,className:"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),s.map((i,l)=>i==="..."?t.jsx("span",{className:"px-3 py-2",children:"..."},`ellipsis-${l}`):t.jsx("button",{onClick:()=>a(i),className:f("px-3 py-2 rounded",i===e?"bg-blue-500 text-white":"hover:bg-gray-100 dark:hover:bg-gray-800"),children:i},i)),t.jsx("button",{onClick:()=>a(e+1),disabled:e===r,className:"px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})},ql=({steps:e,currentStep:r,orientation:a="horizontal",clickable:n=!1,onStepClick:o,className:s})=>{const i=d=>{n&&o&&o(d)},l=d=>d<r?"completed":d===r?"active":"upcoming";return a==="horizontal"?t.jsx("div",{className:f("w-full",s),children:t.jsx("div",{className:"flex items-center justify-between",children:e.map((d,c)=>{const g=l(c),h=c===e.length-1;return t.jsxs(v.Fragment,{children:[t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("button",{onClick:()=>i(c),disabled:!n,className:f("flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all","disabled:cursor-default",n&&"hover:scale-110",g==="completed"&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500",g==="active"&&"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500",g==="upcoming"&&"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700"),children:g==="completed"?t.jsx("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}):d.icon?t.jsx("span",{className:f("w-5 h-5",g==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:d.icon}):t.jsx("span",{className:f("text-sm font-semibold",g==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:c+1})}),t.jsxs("div",{className:"mt-2 text-center",children:[t.jsx("p",{className:f("text-sm font-medium",g==="active"?"text-blue-600 dark:text-blue-500":g==="completed"?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:d.label}),d.description&&t.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:d.description})]})]}),!h&&t.jsx("div",{className:"flex-1 h-0.5 mx-2 bg-gray-300 dark:bg-gray-700 relative",children:t.jsx("div",{className:f("absolute left-0 top-0 h-full bg-blue-600 dark:bg-blue-500 transition-all duration-300",c<r?"w-full":"w-0")})})]},d.id)})})}):t.jsx("div",{className:f("w-full",s),children:t.jsx("div",{className:"space-y-4",children:e.map((d,c)=>{const g=l(c),h=c===e.length-1;return t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("button",{onClick:()=>i(c),disabled:!n,className:f("flex items-center justify-center w-10 h-10 rounded-full border-2 transition-all","disabled:cursor-default flex-shrink-0",n&&"hover:scale-110",g==="completed"&&"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500",g==="active"&&"bg-white dark:bg-gray-900 border-blue-600 dark:border-blue-500",g==="upcoming"&&"bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700"),children:g==="completed"?t.jsx("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}):d.icon?t.jsx("span",{className:f("w-5 h-5",g==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:d.icon}):t.jsx("span",{className:f("text-sm font-semibold",g==="active"?"text-blue-600 dark:text-blue-500":"text-gray-400 dark:text-gray-600"),children:c+1})}),!h&&t.jsx("div",{className:"w-0.5 flex-1 min-h-[32px] bg-gray-300 dark:bg-gray-700 relative mt-2",children:t.jsx("div",{className:f("absolute top-0 left-0 w-full bg-blue-600 dark:bg-blue-500 transition-all duration-300",c<r?"h-full":"h-0")})})]}),t.jsxs("div",{className:"flex-1 pb-4",children:[t.jsx("p",{className:f("text-sm font-medium",g==="active"?"text-blue-600 dark:text-blue-500":g==="completed"?"text-gray-900 dark:text-white":"text-gray-500 dark:text-gray-400"),children:d.label}),d.description&&t.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:d.description})]})]},d.id)})})})},Hl=({steps:e,currentStep:r,onStepClick:a,orientation:n="horizontal",className:o})=>t.jsx("nav",{className:f(n==="horizontal"?"flex items-center":"flex flex-col",o),children:e.map((s,i)=>t.jsxs("div",{className:f("flex items-center",n==="vertical"&&"flex-col items-start"),children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("button",{onClick:()=>a?.(i),disabled:i>r,className:f("w-10 h-10 rounded-full flex items-center justify-center font-semibold transition-colors",i<r&&"bg-green-500 text-white",i===r&&"bg-blue-500 text-white",i>r&&"bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400"),children:i<r?"✓":i+1}),t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:s.label}),s.description&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:s.description})]})]}),i<e.length-1&&t.jsx("div",{className:f(n==="horizontal"?"w-full h-0.5 mx-4":"h-8 w-0.5 ml-5 my-2","bg-gray-300 dark:bg-gray-700")})]},s.id))}),Gl=({subsections:e,isExpanded:r,selectedSubsection:a,parentSectionId:n,onSubsectionSelect:o})=>{const s=v.useRef(null),[i,l]=v.useState(void 0);return v.useEffect(()=>{if(s.current){const d=s.current.scrollHeight;l(r?d+8:0)}},[r,e]),t.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:i!==void 0?`${i}px`:"auto"},children:t.jsx("div",{ref:s,className:"ml-6 mt-2 space-y-1",children:e.map(d=>t.jsx("button",{onClick:()=>o?.(d.id,n),className:`block w-full text-left px-3 py-2 rounded-md text-sm transition-all duration-200 hover:scale-[1.02] ${a===d.id?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-800 dark:hover:text-gray-200"}`,children:d.title},d.id))})})},Yl=({sections:e,selectedSection:r,selectedSubsection:a,expandedSections:n,onSectionSelect:o,onSubsectionSelect:s,onToggleSection:i,className:l=""})=>t.jsx("nav",{className:`space-y-2 ${l}`,children:e.map(d=>t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center",children:[t.jsx("button",{onClick:()=>o(d.id),className:`flex-1 text-left px-3 py-2 rounded-md text-sm font-medium transition-all duration-200 hover:scale-[1.02] ${r===d.id&&!a?"bg-blue-100 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 shadow-sm":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-900 dark:hover:text-gray-100"}`,children:d.title}),d.subsections&&d.subsections.length>0&&t.jsx("button",{onClick:()=>i(d.id),className:"p-1 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200",children:t.jsx(L.ChevronRightIcon,{className:`h-4 w-4 text-gray-500 transition-transform duration-300 ease-in-out ${n.includes(d.id)?"rotate-90":"rotate-0"}`})})]}),d.subsections&&t.jsx(Gl,{subsections:d.subsections,isExpanded:n.includes(d.id),selectedSubsection:a,parentSectionId:d.id,onSubsectionSelect:s})]},d.id))});function Kl({columns:e,data:r,keyExtractor:a,sort:n,onSort:o,onRowClick:s,striped:i=!1,hoverable:l=!1,compact:d=!1,bordered:c=!1,emptyMessage:g="No data available",className:h}){const w=b=>{b.sortable&&o&&o(b.key)},m={left:"text-left",center:"text-center",right:"text-right"};return t.jsx("div",{className:f("w-full overflow-x-auto",h),children:t.jsxs("table",{className:"w-full",children:[t.jsx("thead",{className:"bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:t.jsx("tr",{children:e.map(b=>t.jsx("th",{className:f(d?"px-3 py-2":"px-6 py-3","text-xs font-medium text-gray-700 dark:text-gray-300 uppercase tracking-wider",m[b.align||"left"],b.sortable&&"cursor-pointer select-none hover:bg-gray-100 dark:hover:bg-gray-700",c&&"border-r border-gray-200 dark:border-gray-700 last:border-r-0"),style:{width:b.width},onClick:()=>b.sortable&&w(b),children:t.jsxs("div",{className:"flex items-center gap-2",children:[b.label,b.sortable&&t.jsx("span",{className:"flex flex-col",children:n?.column===b.key?n.direction==="asc"?t.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{d:"M5 10l5-5 5 5H5z"})}):t.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{d:"M15 10l-5 5-5-5h10z"})}):t.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{d:"M5 10l5-5 5 5H5z"})})})]})},b.key))})}),t.jsx("tbody",{className:"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700",children:r.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:e.length,className:"px-6 py-8 text-center text-sm text-gray-500 dark:text-gray-400",children:g})}):r.map((b,y)=>t.jsx("tr",{className:f(i&&y%2===1&&"bg-gray-50 dark:bg-gray-800/50",l&&"hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors",s&&"cursor-pointer"),onClick:()=>s?.(b,y),children:e.map(p=>t.jsx("td",{className:f(d?"px-3 py-2":"px-6 py-4","text-sm text-gray-900 dark:text-white",m[p.align||"left"],c&&"border-r border-gray-200 dark:border-gray-700 last:border-r-0"),children:p.render?p.render(b,y):b[p.key]},p.key))},a(b,y)))})]})})}const Zl=({data:e,columns:r,hasActions:a=!1,renderCell:n,renderAction:o,emptyMessage:s="No data available",getRowKey:i=(d,c)=>String(c),className:l=""})=>!e||e.length===0?t.jsx("div",{className:`text-center py-8 bg-gray-50 dark:bg-gray-800 rounded-lg ${l}`,children:t.jsx("p",{className:`${P.body.sm()} text-gray-500 dark:text-gray-400`,children:s})}):t.jsx("div",{className:`relative ${l}`,children:t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[r.map((d,c)=>t.jsx("th",{className:`${P.label.default()} text-left py-3 px-4 whitespace-nowrap`,children:d},c)),a&&t.jsx("th",{className:`${P.label.default()} text-right py-3 px-4 sticky right-0 bg-white dark:bg-gray-900 whitespace-nowrap`})]})}),t.jsx("tbody",{children:e.map((d,c)=>t.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800 hover:bg-gray-50 dark:hover:bg-gray-800/50",children:[r.map((g,h)=>{const w=n(d,h);return t.jsx("td",{className:"py-3 px-4",children:typeof w=="string"?t.jsx("span",{className:P.body.sm(),children:w}):w},h)}),a&&t.jsx("td",{className:"py-3 px-4 text-right sticky right-0 bg-white dark:bg-gray-900",children:o?.(d)})]},i(d,c)))})]})})}),Xl=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UdataUgrid",children:r||"UdataUgrid Component"}),Ql=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UpivotUtable",children:r||"UpivotUtable Component"}),Jl=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UspreadsheetUgrid",children:r||"UspreadsheetUgrid Component"}),Rl=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UcolumnUresize",children:r||"UcolumnUresize Component"}),ec=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UcellUeditor",children:r||"UcellUeditor Component"}),rc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UtableUreservation",children:r||"UtableUreservation Component"}),tc=({children:e,type:r="unordered",spacing:a="sm",marker:n,size:o="md",className:s})=>{const i=r==="ordered"?"ol":"ul",l={none:"space-y-0",sm:"space-y-1",md:"space-y-2",lg:"space-y-4"},d={sm:"text-sm",md:"text-base",lg:"text-lg"},c=()=>n==="none"?"list-none":r==="unordered"?{disc:"list-disc",circle:"list-circle",square:"list-square",decimal:"list-disc",alpha:"list-disc",roman:"list-disc",none:"list-none"}[n||"disc"]:{decimal:"list-decimal",alpha:"list-alpha",roman:"list-roman",disc:"list-decimal",circle:"list-decimal",square:"list-decimal",none:"list-none"}[n||"decimal"];return t.jsx(i,{className:f("ml-6",c(),l[a],d[o],"text-gray-900 dark:text-gray-100",s),children:e})},ac=({children:e,className:r})=>t.jsx("li",{className:f("leading-relaxed",r),children:e}),nc=({children:e,onAction:r,actionText:a="Remove",actionIcon:n=L.TrashIcon,destructive:o=!0,isProcessing:s=!1,variant:i="default",className:l})=>{const d="flex items-center justify-between p-4 rounded-lg transition-colors",c={default:"bg-gray-50 dark:bg-gray-700",compact:"bg-gray-50 dark:bg-gray-700 py-2 px-3",elevated:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 shadow-sm hover:shadow-md"};return t.jsxs("div",{className:f(d,c[i],l),children:[t.jsx("div",{className:"flex-1 text-sm text-gray-900 dark:text-white",children:e}),t.jsxs(se,{variant:o?"ghost":"outline",size:"sm",onClick:r,disabled:s,className:f("ml-4",o&&"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 hover:bg-red-50 dark:hover:bg-red-900/20"),children:[t.jsx(n,{className:"h-4 w-4 mr-1"}),a]})]})},oc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UuserUtable",children:r||"UuserUtable Component"}),sc=({source:e,target:r,onChange:a,sourceTitle:n="Available",targetTitle:o="Selected",searchable:s=!0,sourceSearchPlaceholder:i="Search available...",targetSearchPlaceholder:l="Search selected...",height:d=300,disabled:c=!1,className:g})=>{const[h,w]=v.useState(""),[m,b]=v.useState(""),[y,p]=v.useState(new Set),[T,N]=v.useState(new Set),C=s?e.filter(U=>U.label.toLowerCase().includes(h.toLowerCase())):e,k=s?r.filter(U=>U.label.toLowerCase().includes(m.toLowerCase())):r,S=U=>{const B=new Set(y);B.has(U)?B.delete(U):B.add(U),p(B)},I=U=>{const B=new Set(T);B.has(U)?B.delete(U):B.add(U),N(B)},E=()=>{const U=e.filter(V=>y.has(V.id)),B=e.filter(V=>!y.has(V.id)),z=[...r,...U];a(B,z),p(new Set)},M=()=>{const U=r.filter(V=>T.has(V.id)),B=r.filter(V=>!T.has(V.id)),z=[...e,...U];a(z,B),N(new Set)},x=()=>{const U=[...r,...e];a([],U),p(new Set)},O=()=>{const U=[...e,...r];a(U,[]),N(new Set)},D=(U,B,z,V,ee,Le,nf)=>t.jsxs("div",{className:"flex flex-col flex-1 border border-gray-300 dark:border-gray-700 rounded-md bg-white dark:bg-gray-900",children:[t.jsxs("div",{className:"px-3 py-2 border-b border-gray-300 dark:border-gray-700 bg-gray-50 dark:bg-gray-800",children:[t.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:B}),t.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:[U.length," item",U.length!==1?"s":""]})]}),s&&t.jsx("div",{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:t.jsx("input",{type:"text",value:ee,onChange:ce=>Le(ce.target.value),placeholder:nf,className:"w-full px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"})}),t.jsx("div",{className:"overflow-y-auto p-2 space-y-1",style:{height:s?d-120:d-60},children:U.length===0?t.jsx("div",{className:"flex items-center justify-center h-full text-sm text-gray-500 dark:text-gray-400",children:"No items"}):U.map(ce=>{const gt=z.has(ce.id);return t.jsx("button",{onClick:()=>!ce.disabled&&V(ce.id),disabled:ce.disabled||c,className:f("w-full px-3 py-2 text-left rounded-md transition-colors","hover:bg-gray-100 dark:hover:bg-gray-800","disabled:opacity-50 disabled:cursor-not-allowed",gt&&"bg-blue-50 dark:bg-blue-900/30 border border-blue-200 dark:border-blue-700"),children:t.jsxs("div",{className:"flex items-start gap-2",children:[t.jsx("div",{className:f("w-4 h-4 border-2 rounded flex items-center justify-center flex-shrink-0 mt-0.5",gt?"bg-blue-600 border-blue-600 dark:bg-blue-500 dark:border-blue-500":"border-gray-300 dark:border-gray-600"),children:gt&&t.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white truncate",children:ce.label}),ce.description&&t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:ce.description})]})]})},ce.id)})})]});return t.jsxs("div",{className:f("flex gap-4",g),children:[D(C,n,y,S,h,w,i),t.jsxs("div",{className:"flex flex-col justify-center gap-2",children:[t.jsx("button",{onClick:x,disabled:c||e.length===0,className:f("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move all to selected",children:t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 5l7 7-7 7M5 5l7 7-7 7"})})}),t.jsx("button",{onClick:E,disabled:c||y.size===0,className:f("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move selected to target",children:t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),t.jsx("button",{onClick:M,disabled:c||T.size===0,className:f("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move selected to source",children:t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),t.jsx("button",{onClick:O,disabled:c||r.length===0,className:f("px-3 py-2 text-sm bg-white dark:bg-gray-900","border border-gray-300 dark:border-gray-700","rounded-md","hover:bg-gray-50 dark:hover:bg-gray-800","transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),title:"Move all to available",children:t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 19l-7-7 7-7M19 19l-7-7 7-7"})})})]}),D(k,o,T,I,m,b,l)]})};function ic({items:e,itemHeight:r,height:a,renderItem:n,keyExtractor:o,overscan:s=3,className:i}){const[l,d]=v.useState(0),c=v.useRef(null),g=y=>{d(y.currentTarget.scrollTop)},h=e.length*r,w=Math.max(0,Math.floor(l/r)-s),m=Math.min(e.length-1,Math.ceil((l+a)/r)+s),b=e.slice(w,m+1);return t.jsx("div",{ref:c,className:f("overflow-auto",i),style:{height:a},onScroll:g,children:t.jsx("div",{style:{height:h,position:"relative"},children:b.map((y,p)=>{const T=w+p;return t.jsx("div",{style:{position:"absolute",top:T*r,height:r,width:"100%"},children:n(y,T)},o(y,T))})})})}const lc=({data:e,selectedId:r,onSelect:a,expandedIds:n,onExpand:o,defaultExpanded:s=!1,showLines:i=!1,className:l})=>{const[d,c]=v.useState(new Set(s?e.map(b=>b.id):[])),g=n!==void 0?new Set(n):d,h=b=>{n!==void 0&&o?o(b):c(y=>{const p=new Set(y);return p.has(b)?p.delete(b):p.add(b),p})},w=b=>{!b.disabled&&a&&a(b)},m=(b,y=0)=>{const p=b.children&&b.children.length>0,T=g.has(b.id),N=r===b.id;return t.jsxs("div",{children:[t.jsxs("div",{className:f("flex items-center gap-2 px-2 py-1.5 rounded-md transition-colors",!b.disabled&&"hover:bg-gray-100 dark:hover:bg-gray-800",N&&"bg-blue-50 dark:bg-blue-900/30",b.disabled&&"opacity-50 cursor-not-allowed",!b.disabled&&"cursor-pointer"),style:{paddingLeft:`${y*1.5+.5}rem`},onClick:()=>w(b),children:[p?t.jsx("button",{onClick:C=>{C.stopPropagation(),h(b.id)},className:"flex-shrink-0 w-4 h-4 flex items-center justify-center hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",children:t.jsx("svg",{className:f("w-3 h-3 transition-transform",T&&"rotate-90"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}):t.jsx("div",{className:"w-4 h-4 flex-shrink-0"}),b.icon&&t.jsx("span",{className:"flex-shrink-0 w-4 h-4 text-gray-600 dark:text-gray-400",children:b.icon}),t.jsx("span",{className:f("flex-1 text-sm",N?"text-blue-700 dark:text-blue-300 font-medium":"text-gray-900 dark:text-white"),children:b.label})]}),p&&T&&t.jsx("div",{className:f(i&&"border-l-2 border-gray-200 dark:border-gray-700 ml-2"),children:b.children.map(C=>m(C,y+1))})]},b.id)};return t.jsx("div",{className:f("w-full",l),children:e.map(b=>m(b,0))})},cc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UlistingUform",children:r||"UlistingUform Component"}),dc="bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-900/20 dark:to-indigo-900/20 border border-blue-200 dark:border-blue-800",uc={none:"",sm:"p-3",md:"p-6",lg:"p-8"},$r=({variant:e="elevated",padding:r="md",icon:a,onClose:n,className:o,children:s,...i})=>{const d=["info","success","warning","error"].includes(e)&&(a||n),c=e==="callout"?dc:so(e);return t.jsx("div",{className:f("rounded-lg",c,uc[r],o),...i,children:d?t.jsxs("div",{className:"flex items-start gap-3",children:[a&&t.jsx("div",{className:"flex-shrink-0 text-lg",children:a}),t.jsx("div",{className:"flex-1 min-w-0",children:s}),n&&t.jsx("button",{onClick:n,className:"flex-shrink-0 text-current hover:opacity-70 transition-opacity","aria-label":"Close",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):s})},gc=({title:e,description:r,className:a,children:n,...o})=>t.jsxs("div",{className:f("space-y-1.5",a),...o,children:[e&&t.jsx("h3",{className:P.heading.h4(),children:e}),r&&t.jsx("p",{className:P.body.sm(),children:r}),n]}),hc=({className:e,children:r,...a})=>t.jsx("div",{className:f("",e),...a,children:r}),fc=({className:e,children:r,...a})=>t.jsx("div",{className:f("flex items-center pt-4",e),...a,children:r}),bc=({title:e,children:r,variant:a="info",size:n="default",className:o})=>{const s={sm:"sm",default:"md",lg:"lg"},i=a==="neutral"?"bordered":a;return t.jsxs($r,{variant:i,padding:s[n],className:o,children:[e&&t.jsx("h3",{className:f("font-semibold mb-2",n==="sm"?"text-base":n==="lg"?"text-xl":"text-lg"),children:e}),r]})},mc=({title:e,icon:r,children:a,variant:n="gradient",size:o="default",centered:s=!1,className:i})=>{const l={sm:"sm",default:"md",lg:"lg"},d=n==="gradient"||n==="neutral"?"callout":n;return t.jsx($r,{variant:d,padding:l[o],className:i,children:t.jsxs("div",{className:f("space-y-4",s&&"text-center"),children:[r&&t.jsx("div",{className:f("font-bold",o==="sm"?"text-2xl":o==="lg"?"text-5xl":"text-4xl",s?"text-center":"text-left"),children:r}),e&&t.jsx("h3",{className:f("font-bold mb-4",o==="sm"?"text-lg":o==="lg"?"text-3xl":"text-2xl"),children:e}),t.jsx("div",{className:f("text-gray-600 dark:text-gray-400",o==="sm"?"text-sm":o==="lg"?"text-lg":"text-base"),children:a})]})})},yc=({title:e,value:r,change:a,changePeriod:n="vs last period",icon:o,variant:s="default",className:i})=>{const l={default:"bg-white dark:bg-gray-900",primary:"bg-blue-50 dark:bg-blue-900/20",success:"bg-green-50 dark:bg-green-900/20",warning:"bg-yellow-50 dark:bg-yellow-900/20",danger:"bg-red-50 dark:bg-red-900/20"};return t.jsxs("div",{className:f("rounded-lg border border-gray-200 dark:border-gray-700 p-6",l[s],i),children:[t.jsxs("div",{className:"flex items-start justify-between mb-2",children:[t.jsx("h3",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:e}),o&&t.jsx("div",{className:"text-gray-400 dark:text-gray-600",children:o})]}),t.jsx("div",{className:"flex items-end justify-between",children:t.jsxs("div",{children:[t.jsx("p",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:r}),a!==void 0&&t.jsxs("div",{className:"flex items-center gap-1 mt-2",children:[t.jsxs("span",{className:f("text-sm font-medium",a>=0?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:[a>=0?"↑":"↓"," ",Math.abs(a),"%"]}),t.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:n})]})]})})]})},pc=({src:e,alt:r="Avatar",fallback:a,name:n,size:o="md",status:s,className:i,onClick:l})=>{const[d,c]=v.useState(!1),g={sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-12 h-12 text-base"},h={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},w={online:"bg-green-500",offline:"bg-gray-400",away:"bg-yellow-500",busy:"bg-red-500"},b=a||(n?(T=>{const N=T.trim().split(/\s+/);return N.length===1?N[0].charAt(0).toUpperCase():N[0].charAt(0).toUpperCase()+N[N.length-1].charAt(0).toUpperCase()})(n):""),y=e&&!d,p=()=>{c(!0)};return t.jsxs("div",{className:"relative inline-block flex-shrink-0",children:[t.jsx("div",{className:f("flex items-center justify-center overflow-hidden rounded-full",g[o],!y&&"bg-gray-300 dark:bg-gray-600 text-gray-700 dark:text-gray-200",l&&"cursor-pointer hover:opacity-80 transition-opacity",i),onClick:l,role:l?"button":void 0,tabIndex:l?0:void 0,children:y?t.jsx("img",{src:e,alt:r,className:"w-full h-full object-cover",onError:p}):t.jsx("span",{className:"font-semibold",children:b})}),s&&t.jsx("span",{className:f("absolute bottom-0 right-0 rounded-full border-2 border-white dark:border-gray-800",w[s],h[o]),"aria-label":s})]})},vc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UavatarUgroup",children:r||"UavatarUgroup Component"}),wc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UprofileUheader",children:r||"UprofileUheader Component"}),kc=({label:e,value:r,orientation:a="vertical",align:n="start",labelWidth:o="auto",size:s="md",separator:i=!1,labelVariant:l="muted",valueVariant:d="default",className:c,labelClassName:g,valueClassName:h})=>{const w={sm:{label:P.body.sm(),value:P.body.sm(),gap:"gap-1"},md:{label:P.body.md(),value:P.body.md(),gap:"gap-2"},lg:{label:P.body.lg(),value:P.body.lg(),gap:"gap-3"}},m={auto:"",sm:"w-24",md:"w-32",lg:"w-40"},b={start:"justify-start",center:"justify-center",between:"justify-between"},y={default:"text-gray-700 dark:text-gray-300",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold"},p={default:"text-gray-900 dark:text-gray-100",muted:"text-gray-600 dark:text-gray-400",strong:"text-gray-900 dark:text-gray-100 font-semibold",primary:"text-blue-600 dark:text-blue-400"},T=w[s];return t.jsxs("div",{className:f(a==="horizontal"?"flex items-center":"flex flex-col",a==="horizontal"&&b[n],T.gap,i&&"pb-3 mb-3 border-b border-gray-200 dark:border-gray-700",c),children:[t.jsx("dt",{className:f(T.label,y[l],a==="horizontal"&&m[o],a==="horizontal"&&"flex-shrink-0",g),children:e}),t.jsx("dd",{className:f(T.value,p[d],a==="horizontal"&&"flex-1",h),children:r})]})},xc=({value:e,label:r,variant:a="neutral",size:n="md",align:o="center",icon:s,iconPosition:i="top",className:l,valueClassName:d,labelClassName:c})=>{const g={primary:{value:"text-blue-600 dark:text-blue-400",label:"text-blue-600/70 dark:text-blue-400/70",icon:"text-blue-600 dark:text-blue-400"},success:{value:"text-green-600 dark:text-green-400",label:"text-green-600/70 dark:text-green-400/70",icon:"text-green-600 dark:text-green-400"},warning:{value:"text-yellow-600 dark:text-yellow-400",label:"text-yellow-600/70 dark:text-yellow-400/70",icon:"text-yellow-600 dark:text-yellow-400"},danger:{value:"text-red-600 dark:text-red-400",label:"text-red-600/70 dark:text-red-400/70",icon:"text-red-600 dark:text-red-400"},neutral:{value:"text-gray-900 dark:text-gray-100",label:"text-gray-600 dark:text-gray-400",icon:"text-gray-600 dark:text-gray-400"},white:{value:"text-white",label:"text-white/70",icon:"text-white"}},h={sm:{value:P.heading.h5(),label:P.caption.default(),icon:"h-4 w-4"},md:{value:P.heading.h4(),label:P.body.sm(),icon:"h-5 w-5"},lg:{value:P.heading.h3(),label:P.body.md(),icon:"h-6 w-6"},xl:{value:P.heading.h2(),label:P.body.lg(),icon:"h-8 w-8"}},w={left:"text-left",center:"text-center",right:"text-right"},m=g[a],b=h[n];return t.jsxs("div",{className:f(w[o],l),children:[s&&i==="top"&&t.jsx(s,{className:f(b.icon,m.icon,"mb-2",o==="center"&&"mx-auto")}),t.jsxs("div",{className:f(i==="left"&&s&&"flex items-center gap-3",o==="center"&&i==="left"&&"justify-center"),children:[s&&i==="left"&&t.jsx(s,{className:f(b.icon,m.icon)}),t.jsxs("div",{children:[t.jsx("div",{className:f("font-bold",b.value,m.value,d),children:e}),t.jsx("div",{className:f(b.label,m.label,c),children:r})]})]})]})},Pa=({icon:e,title:r="No data",description:a,action:n,className:o})=>t.jsxs("div",{className:f("flex flex-col items-center justify-center py-12 px-4 text-center",o),children:[e&&t.jsx("div",{className:"mb-4 text-gray-400 dark:text-gray-600",children:e}),t.jsx("h3",{className:f(P.heading.h3(),"mb-2"),children:r}),a&&t.jsx("p",{className:f(P.body.sm(),"text-gray-600 dark:text-gray-400 max-w-sm mb-6"),children:a}),n&&t.jsx("div",{className:"mt-4",children:n})]}),Nc=({title:e,subtext:r,className:a})=>t.jsx(Pa,{title:e,description:r,className:a}),Cc=({data:e,orientation:r="vertical",showValues:a=!1,showGrid:n=!0,barWidth:o=40,height:s=300,className:i})=>{const l=Math.max(...e.map(c=>c.value)),d="#3b82f6";return t.jsx("div",{className:f("w-full",i),children:t.jsxs("div",{className:"relative bg-white dark:bg-gray-900 rounded-lg p-6",style:{height:`${s}px`},children:[n&&t.jsx("div",{className:"absolute inset-6 flex flex-col justify-between",children:[...Array(5)].map((c,g)=>t.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700"},g))}),r==="vertical"?t.jsx("div",{className:"relative h-full flex items-end justify-around gap-2",children:e.map((c,g)=>{const h=c.value/l*100;return t.jsxs("div",{className:"flex flex-col items-center gap-2",style:{width:`${o}px`},children:[a&&t.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:c.value}),t.jsx("div",{className:"w-full rounded-t transition-all hover:opacity-80",style:{height:`${h}%`,backgroundColor:c.color||d}}),t.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:c.label})]},g)})}):t.jsx("div",{className:"relative h-full flex flex-col justify-around gap-2",children:e.map((c,g)=>{const h=c.value/l*100;return t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 w-16 text-right",children:c.label}),t.jsxs("div",{className:"flex-1 flex items-center gap-2",children:[t.jsx("div",{className:"h-8 rounded transition-all hover:opacity-80",style:{width:`${h}%`,backgroundColor:c.color||d}}),a&&t.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:c.value})]})]},g)})})]})})},Sc=({series:e,showLegend:r=!0,showGrid:a=!0,showPoints:n=!0,height:o=300,xLabels:s,className:i})=>{const l=e.flatMap(m=>m.data),d=Math.max(...l.map(m=>m.y)),c=Math.min(...l.map(m=>m.y)),g=Math.max(...l.map(m=>m.x)),h=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],w=m=>m.length===0?"":`M ${m.map(y=>{const p=y.x/g*100,T=100-(y.y-c)/(d-c)*100;return`${p},${T}`}).join(" L ")}`;return t.jsxs("div",{className:f("w-full",i),children:[r&&t.jsx("div",{className:"flex flex-wrap gap-4 mb-4",children:e.map((m,b)=>t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:m.color||h[b%h.length]}}),t.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:m.name})]},b))}),t.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-lg p-6",children:[t.jsxs("div",{className:"relative",style:{height:`${o}px`},children:[a&&t.jsx("div",{className:"absolute inset-0",children:[...Array(5)].map((m,b)=>t.jsx("div",{className:"absolute w-full border-t border-gray-200 dark:border-gray-700",style:{top:`${b*25}%`}},b))}),t.jsx("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"absolute inset-0 w-full h-full",children:e.map((m,b)=>{const y=m.color||h[b%h.length];return t.jsxs("g",{children:[t.jsx("path",{d:w(m.data),fill:"none",stroke:y,strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),n&&m.data.map((p,T)=>{const N=p.x/g*100,C=100-(p.y-c)/(d-c)*100;return t.jsx("circle",{cx:N,cy:C,r:"1",fill:y,vectorEffect:"non-scaling-stroke"},T)})]},b)})})]}),s&&t.jsx("div",{className:"flex justify-between mt-2",children:s.map((m,b)=>t.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:m},b))})]})]})},Ec=({data:e,variant:r="pie",showLegend:a=!0,showPercentages:n=!1,size:o=200,donutHoleSize:s=40,className:i})=>{const l=e.reduce((b,y)=>b+y.value,0),d=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6","#ec4899"],c=e.reduce((b,y,p)=>{const T=y.value/l*100,N=T/100*360,C=b.length>0?b[b.length-1].endAngle:-90,k=C+N;return b.push({...y,percentage:T,startAngle:C,endAngle:k,color:y.color||d[p%d.length]}),b},[]),g=(b,y,p,T)=>{const N=(T-90)*Math.PI/180;return{x:b+p*Math.cos(N),y:y+p*Math.sin(N)}},h=(b,y,p,T,N)=>{const C=g(b,y,p,N),k=g(b,y,p,T),S=N-T<=180?"0":"1";if(r==="donut"){const I=p*s/100,E=g(b,y,I,N),M=g(b,y,I,T);return["M",C.x,C.y,"A",p,p,0,S,0,k.x,k.y,"L",M.x,M.y,"A",I,I,0,S,1,E.x,E.y,"Z"].join(" ")}return["M",b,y,"L",C.x,C.y,"A",p,p,0,S,0,k.x,k.y,"Z"].join(" ")},w=o/2,m=o/2-10;return t.jsxs("div",{className:f("flex flex-col items-center gap-4",i),children:[t.jsx("svg",{width:o,height:o,className:"transform rotate-0",children:c.map((b,y)=>t.jsx("path",{d:h(w,w,m,b.startAngle,b.endAngle),fill:b.color,className:"transition-opacity hover:opacity-80"},y))}),a&&t.jsx("div",{className:"flex flex-col gap-2",children:c.map((b,y)=>t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"w-3 h-3 rounded-sm",style:{backgroundColor:b.color}}),t.jsxs("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:[b.label,n&&t.jsxs("span",{className:"text-gray-500 dark:text-gray-400 ml-1",children:["(",Math.round(b.percentage),"%)"]})]})]},y))})]})},Tc=({series:e,showLegend:r=!0,showGrid:a=!0,fillOpacity:n=.2,height:o=300,xLabels:s,className:i})=>{const l=e.flatMap(b=>b.data),d=Math.max(...l.map(b=>b.y)),c=Math.min(...l.map(b=>b.y)),g=Math.max(...l.map(b=>b.x)),h=["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6"],w=b=>{if(b.length===0)return"";const y=b.map(N=>{const C=N.x/g*100,k=100-(N.y-c)/(d-c)*100;return`${C},${k}`}),p=b[0].x/g*100,T=b[b.length-1].x/g*100;return`M ${p},100 L ${y.join(" L ")} L ${T},100 Z`},m=b=>b.length===0?"":`M ${b.map(p=>{const T=p.x/g*100,N=100-(p.y-c)/(d-c)*100;return`${T},${N}`}).join(" L ")}`;return t.jsxs("div",{className:f("w-full",i),children:[r&&t.jsx("div",{className:"flex flex-wrap gap-4 mb-4",children:e.map((b,y)=>t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:b.color||h[y%h.length]}}),t.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:b.name})]},y))}),t.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-lg p-6",children:[t.jsxs("div",{className:"relative",style:{height:`${o}px`},children:[a&&t.jsx("div",{className:"absolute inset-0",children:[...Array(5)].map((b,y)=>t.jsx("div",{className:"absolute w-full border-t border-gray-200 dark:border-gray-700",style:{top:`${y*25}%`}},y))}),t.jsx("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"absolute inset-0 w-full h-full",children:e.map((b,y)=>{const p=b.color||h[y%h.length];return t.jsxs("g",{children:[t.jsx("path",{d:w(b.data),fill:p,fillOpacity:n}),t.jsx("path",{d:m(b.data),fill:"none",stroke:p,strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"})]},y)})})]}),s&&t.jsx("div",{className:"flex justify-between mt-2",children:s.map((b,y)=>t.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:b},y))})]})]})},Ac=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UradarUchart",children:r||"UradarUchart Component"}),Ic=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UbubbleUchart",children:r||"UbubbleUchart Component"}),Mc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UscatterUplot",children:r||"UscatterUplot Component"}),Lc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UtreeUmap",children:r||"UtreeUmap Component"}),Pc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UsankeyUdiagram",children:r||"UsankeyUdiagram Component"}),Oc=({data:e,width:r=100,height:a=30,color:n="#3b82f6",fill:o=!1,className:s})=>{if(e.length===0)return null;const i=Math.max(...e),l=Math.min(...e),d=i-l||1,c=e.map((g,h)=>{const w=h/(e.length-1)*r,m=a-(g-l)/d*a;return`${w},${m}`}).join(" ");return t.jsxs("svg",{width:r,height:a,className:f("inline-block",s),children:[o&&t.jsx("polygon",{points:`0,${a} ${c} ${r},${a}`,fill:n,opacity:"0.2"}),t.jsx("polyline",{points:c,fill:"none",stroke:n,strokeWidth:"2",strokeLinejoin:"round",strokeLinecap:"round"})]})},Uc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"Uheatmap",children:r||"Uheatmap Component"}),Dc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UfunnelUchart",children:r||"UfunnelUchart Component"}),jc=({className:e,children:r,disabled:a})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"BurndownChart",children:r||"BurndownChart Component"}),_c=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UperformanceUchart",children:r||"UperformanceUchart Component"}),zc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UmetricUcomparison",children:r||"UmetricUcomparison Component"}),Bc=({value:e,min:r=0,max:a=100,size:n=120,strokeWidth:o=10,showValue:s=!0,label:i,variant:l="primary",className:d})=>{const c=Math.min(a,Math.max(r,e)),g=(c-r)/(a-r)*100,h=n/2,w=(n-o)/2,m=Math.PI*w,b=m-g/100*m,y={primary:"stroke-blue-600 dark:stroke-blue-500",success:"stroke-green-600 dark:stroke-green-500",warning:"stroke-yellow-600 dark:stroke-yellow-500",danger:"stroke-red-600 dark:stroke-red-500"};return t.jsxs("div",{className:f("inline-flex flex-col items-center gap-2",d),children:[t.jsxs("svg",{width:n,height:n*.65,className:"transform rotate-180",children:[t.jsx("path",{d:`M ${o/2} ${h} A ${w} ${w} 0 0 1 ${n-o/2} ${h}`,fill:"none",className:"stroke-gray-200 dark:stroke-gray-700",strokeWidth:o,strokeLinecap:"round"}),t.jsx("path",{d:`M ${o/2} ${h} A ${w} ${w} 0 0 1 ${n-o/2} ${h}`,fill:"none",className:f(y[l],"transition-all duration-500"),strokeWidth:o,strokeDasharray:m,strokeDashoffset:b,strokeLinecap:"round"})]}),s&&t.jsxs("div",{className:"text-center -mt-8",children:[t.jsx("div",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:Math.round(c)}),i&&t.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:i})]})]})},Wc=({value:e=0,max:r=100,variant:a="default",size:n="md",showLabel:o=!1,label:s,indeterminate:i=!1,striped:l=!1,animated:d=!1,className:c})=>{const g=Math.min(Math.max(e/r*100,0),100),h={default:"bg-blue-600 dark:bg-blue-500",success:"bg-green-600 dark:bg-green-500",warning:"bg-yellow-600 dark:bg-yellow-500",danger:"bg-red-600 dark:bg-red-500"},w={sm:"h-1",md:"h-2",lg:"h-4"};return t.jsxs("div",{className:f("w-full",c),children:[t.jsx("div",{className:f("w-full bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden",w[n]),role:"progressbar","aria-valuenow":i?void 0:g,"aria-valuemin":0,"aria-valuemax":100,children:i?t.jsx("div",{className:f("h-full rounded-full animate-pulse",h[a]),style:{width:"100%"}}):t.jsx("div",{className:f("h-full rounded-full transition-all duration-300",h[a],l&&"bg-stripe",l&&d&&"animate-stripe"),style:{width:`${g}%`}})}),(o||s)&&t.jsx("div",{className:"mt-1 text-xs text-gray-600 dark:text-gray-400 text-right",children:s||`${Math.round(g)}%`})]})},Fc=({value:e,size:r=100,strokeWidth:a=8,showValue:n=!0,label:o,variant:s="primary",color:i,trackColor:l,className:d})=>{const c=Math.min(100,Math.max(0,e)),g=r/2,h=(r-a)/2,w=2*Math.PI*h,m=w-c/100*w,b={primary:"stroke-blue-600 dark:stroke-blue-500",success:"stroke-green-600 dark:stroke-green-500",warning:"stroke-yellow-600 dark:stroke-yellow-500",danger:"stroke-red-600 dark:stroke-red-500"},y=l||"stroke-gray-200 dark:stroke-gray-700";return t.jsx("div",{className:f("inline-flex items-center justify-center",d),children:t.jsxs("div",{className:"relative",style:{width:r,height:r},children:[t.jsxs("svg",{width:r,height:r,className:"transform -rotate-90",children:[t.jsx("circle",{cx:g,cy:g,r:h,className:y,strokeWidth:a,fill:"none"}),t.jsx("circle",{cx:g,cy:g,r:h,className:f(i?"":b[s],"transition-all duration-300 ease-in-out"),stroke:i,strokeWidth:a,strokeDasharray:w,strokeDashoffset:m,strokeLinecap:"round",fill:"none"})]}),(n||o)&&t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[n&&!o&&t.jsxs("span",{className:"text-gray-900 dark:text-white font-bold",style:{fontSize:r*.2},children:[Math.round(c),"%"]}),o&&t.jsx("span",{className:"text-gray-900 dark:text-white font-medium text-center px-2",style:{fontSize:r*.15},children:o})]})]})})},Vc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UprogressUtracker",children:r||"UprogressUtracker Component"}),$c=({src:e,alt:r,fallback:a,width:n,height:o,objectFit:s="cover",loading:i="lazy",showLoader:l=!0,rounded:d="none",border:c=!1,className:g,onLoad:h,onError:w})=>{const[m,b]=v.useState(!0),[y,p]=v.useState(!1),[T,N]=v.useState(e);v.useEffect(()=>{b(!0),p(!1),N(e)},[e]);const C=()=>{b(!1),h?.()},k=()=>{b(!1),p(!0),a&&T!==a&&(N(a),p(!1),b(!0)),w?.()},S={none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},I={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"},E={width:typeof n=="number"?`${n}px`:n,height:typeof o=="number"?`${o}px`:o};return t.jsxs("div",{className:f("relative inline-block overflow-hidden bg-gray-100 dark:bg-gray-800",S[d],c&&"border border-gray-200 dark:border-gray-700",g),style:E,children:[l&&m&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:t.jsx("div",{className:"animate-pulse",children:t.jsx(L.PhotoIcon,{className:"h-8 w-8 text-gray-400"})})}),y&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:t.jsx(L.PhotoIcon,{className:"h-8 w-8 text-gray-400"})}),!y&&t.jsx("img",{src:T,alt:r,loading:i,onLoad:C,onError:k,className:f("w-full h-full",I[s],m&&l&&"opacity-0")})]})},qc=({images:e,columns:r=3,gap:a=16,lightbox:n=!0,className:o})=>{const[s,i]=v.useState(null),l=h=>{n&&i(h)},d=()=>{i(null)},c=()=>{if(!s)return;const h=e.findIndex(m=>m.id===s.id),w=h>0?h-1:e.length-1;i(e[w])},g=()=>{if(!s)return;const h=e.findIndex(m=>m.id===s.id),w=h<e.length-1?h+1:0;i(e[w])};return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:f("grid",o),style:{gridTemplateColumns:`repeat(${r}, 1fr)`,gap:`${a}px`},children:e.map(h=>t.jsxs("div",{className:f("relative aspect-square overflow-hidden rounded-lg bg-gray-200 dark:bg-gray-700",n&&"cursor-pointer hover:opacity-90 transition-opacity"),onClick:()=>l(h),children:[t.jsx("img",{src:h.thumbnail||h.src,alt:h.alt||"",className:"w-full h-full object-cover"}),h.caption&&t.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black/50 text-white text-sm p-2",children:h.caption})]},h.id))}),n&&s&&t.jsxs("div",{className:"fixed inset-0 z-50 bg-black/90 flex items-center justify-center p-4",onClick:d,children:[t.jsx("button",{onClick:d,className:"absolute top-4 right-4 text-white hover:text-gray-300 transition-colors",children:t.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),t.jsx("button",{onClick:h=>{h.stopPropagation(),c()},className:"absolute left-4 text-white hover:text-gray-300 transition-colors",children:t.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),t.jsx("button",{onClick:h=>{h.stopPropagation(),g()},className:"absolute right-4 text-white hover:text-gray-300 transition-colors",children:t.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),t.jsxs("div",{className:"max-w-4xl max-h-full",onClick:h=>h.stopPropagation(),children:[t.jsx("img",{src:s.src,alt:s.alt||"",className:"max-w-full max-h-[80vh] object-contain"}),s.caption&&t.jsx("p",{className:"text-white text-center mt-4",children:s.caption})]})]})]})},Hc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UimageUcomparison",children:r||"UimageUcomparison Component"}),Gc=({src:e,onCropComplete:r,initialCrop:a,className:n})=>{const[o,s]=v.useState(a||{x:50,y:50,width:200,height:200}),i=v.useRef(null),l=async()=>{if(!i.current||!r)return;const d=document.createElement("canvas"),c=d.getContext("2d");if(!c)return;const g=i.current,h=g.naturalWidth/g.width,w=g.naturalHeight/g.height;d.width=o.width*h,d.height=o.height*w,c.drawImage(g,o.x*h,o.y*w,o.width*h,o.height*w,0,0,d.width,d.height);const m=d.toDataURL("image/png");r(m,o)};return t.jsxs("div",{className:f("inline-flex flex-col gap-4",n),children:[t.jsxs("div",{className:"relative inline-block",children:[t.jsx("img",{ref:i,src:e,alt:"Crop preview",className:"max-w-full h-auto",crossOrigin:"anonymous"}),t.jsxs("div",{className:"absolute border-2 border-blue-500 bg-blue-500/20",style:{left:`${o.x}px`,top:`${o.y}px`,width:`${o.width}px`,height:`${o.height}px`,cursor:"move"},children:[t.jsx("div",{className:"absolute -top-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-nw-resize"}),t.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-ne-resize"}),t.jsx("div",{className:"absolute -bottom-1 -left-1 w-3 h-3 bg-blue-500 rounded-full cursor-sw-resize"}),t.jsx("div",{className:"absolute -bottom-1 -right-1 w-3 h-3 bg-blue-500 rounded-full cursor-se-resize"})]})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:l,className:f("px-4 py-2 text-sm font-medium","bg-blue-600 dark:bg-blue-500 text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"Crop Image"}),t.jsx("button",{onClick:()=>s(a||{x:50,y:50,width:200,height:200}),className:f("px-4 py-2 text-sm font-medium","bg-gray-200 dark:bg-gray-700 text-gray-900 dark:text-white","rounded-md","hover:bg-gray-300 dark:hover:bg-gray-600","transition-colors"),children:"Reset"})]}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:'Drag to adjust crop area. Click "Crop Image" to export.'})]})},Yc=({images:e,index:r,isOpen:a,onClose:n,onIndexChange:o,showThumbnails:s=!1,showDownload:i=!1,showZoom:l=!0,className:d})=>{const[c,g]=v.useState(1),h=e[r],w=r>0,m=r<e.length-1,b=v.useCallback(()=>{if(w){const k=r-1;o?.(k),g(1)}},[w,r,o]),y=v.useCallback(()=>{if(m){const k=r+1;o?.(k),g(1)}},[m,r,o]),p=()=>{g(k=>Math.min(k+.5,3))},T=()=>{g(k=>Math.max(k-.5,.5))},N=()=>{g(1)},C=()=>{const k=document.createElement("a");k.href=h.src,k.download=h.alt||"image",k.click()};return v.useEffect(()=>{if(!a)return;const k=S=>{switch(S.key){case"Escape":n();break;case"ArrowLeft":b();break;case"ArrowRight":y();break;case"+":case"=":p();break;case"-":case"_":T();break;case"0":N();break}};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[a,r,e.length,n,b,y]),v.useEffect(()=>(a?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[a]),v.useEffect(()=>{g(1)},[r]),!a||!h?null:t.jsx(me,{children:t.jsxs("div",{className:f("fixed inset-0 z-50 flex items-center justify-center","bg-black/95",d),children:[t.jsx("div",{className:"absolute inset-0",onClick:n,"aria-label":"Close lightbox"}),t.jsx("button",{onClick:n,className:"absolute top-4 right-4 z-10 p-2 text-white hover:text-gray-300 transition-colors","aria-label":"Close",children:t.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),w&&t.jsx("button",{onClick:b,className:"absolute left-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all","aria-label":"Previous image",children:t.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),m&&t.jsx("button",{onClick:y,className:"absolute right-4 top-1/2 -translate-y-1/2 z-10 p-3 text-white hover:text-gray-300 bg-black/50 hover:bg-black/70 rounded-full transition-all","aria-label":"Next image",children:t.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),t.jsxs("div",{className:"absolute top-4 left-4 z-10 flex gap-2",children:[t.jsxs("div",{className:"px-3 py-1.5 bg-black/50 text-white text-sm rounded-md",children:[r+1," / ",e.length]}),l&&t.jsxs("div",{className:"flex gap-1 bg-black/50 rounded-md p-1",children:[t.jsx("button",{onClick:T,className:"p-1.5 text-white hover:text-gray-300 transition-colors","aria-label":"Zoom out",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7"})})}),t.jsxs("button",{onClick:N,className:"px-2 text-white text-sm hover:text-gray-300 transition-colors","aria-label":"Reset zoom",children:[Math.round(c*100),"%"]}),t.jsx("button",{onClick:p,className:"p-1.5 text-white hover:text-gray-300 transition-colors","aria-label":"Zoom in",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v3m0 0v3m0-3h3m-3 0H7"})})})]}),i&&t.jsx("button",{onClick:C,className:"p-1.5 bg-black/50 text-white hover:text-gray-300 rounded-md transition-colors","aria-label":"Download image",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})})})]}),t.jsx("div",{className:"relative z-0 flex items-center justify-center max-w-7xl max-h-screen p-20",children:t.jsx("img",{src:h.src,alt:h.alt||"",className:"max-w-full max-h-full object-contain transition-transform",style:{transform:`scale(${c})`}})}),h.caption&&t.jsx("div",{className:"absolute bottom-20 left-0 right-0 z-10 text-center",children:t.jsx("p",{className:"px-4 py-2 bg-black/50 text-white text-sm inline-block rounded-md max-w-2xl",children:h.caption})}),s&&e.length>1&&t.jsx("div",{className:"absolute bottom-4 left-0 right-0 z-10 flex justify-center gap-2 px-4 overflow-x-auto",children:e.map((k,S)=>t.jsx("button",{onClick:()=>{o?.(S),g(1)},className:f("flex-shrink-0 w-16 h-16 rounded-md overflow-hidden","border-2 transition-all",S===r?"border-white scale-110":"border-transparent opacity-60 hover:opacity-100 hover:border-gray-400"),children:t.jsx("img",{src:k.thumbnail||k.src,alt:k.alt||"",className:"w-full h-full object-cover"})},S))})]})})},Kc=({src:e,poster:r,autoPlay:a=!1,loop:n=!1,muted:o=!1,controls:s=!0,className:i})=>{const l=v.useRef(null),[d,c]=v.useState(a),[g,h]=v.useState(1),[w,m]=v.useState(0),[b,y]=v.useState(0);v.useEffect(()=>{const S=l.current;if(!S)return;const I=()=>m(S.currentTime),E=()=>y(S.duration),M=()=>c(!0),x=()=>c(!1);return S.addEventListener("timeupdate",I),S.addEventListener("loadedmetadata",E),S.addEventListener("play",M),S.addEventListener("pause",x),()=>{S.removeEventListener("timeupdate",I),S.removeEventListener("loadedmetadata",E),S.removeEventListener("play",M),S.removeEventListener("pause",x)}},[]);const p=()=>{l.current&&(d?l.current.pause():l.current.play())},T=S=>{const I=parseFloat(S.target.value);h(I),l.current&&(l.current.volume=I)},N=S=>{const I=parseFloat(S.target.value);m(I),l.current&&(l.current.currentTime=I)},C=()=>{l.current&&(document.fullscreenElement?document.exitFullscreen():l.current.requestFullscreen())},k=S=>{const I=Math.floor(S/60),E=Math.floor(S%60);return`${I}:${E.toString().padStart(2,"0")}`};return t.jsxs("div",{className:f("relative group",i),children:[t.jsx("video",{ref:l,src:e,poster:r,autoPlay:a,loop:n,muted:o,className:"w-full rounded-lg",onClick:p}),s&&t.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-4 opacity-0 group-hover:opacity-100 transition-opacity",children:[t.jsx("input",{type:"range",min:"0",max:b||0,value:w,onChange:N,className:"w-full mb-2 accent-white"}),t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("button",{onClick:p,className:"text-white hover:text-gray-300 transition-colors",children:d?t.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})}):t.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M8 5v14l11-7z"})})}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("svg",{className:"w-4 h-4 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"})}),t.jsx("input",{type:"range",min:"0",max:"1",step:"0.1",value:g,onChange:T,className:"w-20 accent-white"})]}),t.jsxs("span",{className:"text-white text-sm",children:[k(w)," / ",k(b)]})]}),t.jsx("button",{onClick:C,className:"text-white hover:text-gray-300 transition-colors",children:t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"})})})]})]})]})},Zc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UvideoUthumbnail",children:r||"UvideoUthumbnail Component"}),Xc=({className:e,children:r,disabled:a})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"VideoEditor",children:r||"VideoEditor Component"}),Qc=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UvideoUcall",children:r||"UvideoUcall Component"}),Jc=({className:e,children:r,disabled:a})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"LiveStream",children:r||"LiveStream Component"}),Rc=({src:e,title:r,artist:a,artwork:n,autoPlay:o=!1,loop:s=!1,className:i})=>{const l=v.useRef(null),[d,c]=v.useState(o),[g,h]=v.useState(0),[w,m]=v.useState(0),[b,y]=v.useState(1);v.useEffect(()=>{const S=l.current;if(!S)return;const I=()=>h(S.currentTime),E=()=>m(S.duration),M=()=>c(!0),x=()=>c(!1),O=()=>c(!1);return S.addEventListener("timeupdate",I),S.addEventListener("loadedmetadata",E),S.addEventListener("play",M),S.addEventListener("pause",x),S.addEventListener("ended",O),()=>{S.removeEventListener("timeupdate",I),S.removeEventListener("loadedmetadata",E),S.removeEventListener("play",M),S.removeEventListener("pause",x),S.removeEventListener("ended",O)}},[]);const p=()=>{l.current&&(d?l.current.pause():l.current.play())},T=S=>{const I=parseFloat(S.target.value);h(I),l.current&&(l.current.currentTime=I)},N=S=>{const I=parseFloat(S.target.value);y(I),l.current&&(l.current.volume=I)},C=S=>{const I=Math.floor(S/60),E=Math.floor(S%60);return`${I}:${E.toString().padStart(2,"0")}`},k=w>0?g/w*100:0;return t.jsxs("div",{className:f("bg-white dark:bg-gray-900 rounded-lg p-6 shadow-lg",i),children:[t.jsx("audio",{ref:l,src:e,autoPlay:o,loop:s}),t.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[n&&t.jsx("div",{className:"w-16 h-16 rounded-lg overflow-hidden flex-shrink-0 bg-gray-200 dark:bg-gray-700",children:t.jsx("img",{src:n,alt:r||"Album artwork",className:"w-full h-full object-cover"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[r&&t.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white truncate",children:r}),a&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 truncate",children:a})]})]}),t.jsxs("div",{className:"mb-4",children:[t.jsx("input",{type:"range",min:"0",max:w||0,value:g,onChange:T,className:"w-full accent-blue-500"}),t.jsxs("div",{className:"flex justify-between text-xs text-gray-600 dark:text-gray-400 mt-1",children:[t.jsx("span",{children:C(g)}),t.jsx("span",{children:C(w)})]})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("button",{onClick:p,className:"w-10 h-10 rounded-full bg-blue-500 text-white flex items-center justify-center hover:bg-blue-600 transition-colors",children:d?t.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})}):t.jsx("svg",{className:"w-5 h-5 ml-0.5",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M8 5v14l11-7z"})})}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("svg",{className:"w-4 h-4 text-gray-600 dark:text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"})}),t.jsx("input",{type:"range",min:"0",max:"1",step:"0.1",value:b,onChange:N,className:"w-24 accent-blue-500"})]})]}),t.jsxs("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:[k.toFixed(0),"%"]})]})]})},ed=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UaudioUwaveform",children:r||"UaudioUwaveform Component"}),rd=({data:e,width:r=200,height:a=40,color:n="#3b82f6",gap:o=2,className:s})=>{if(e.length===0)return null;const i=(r-(e.length-1)*o)/e.length;return t.jsx("svg",{width:r,height:a,className:f("inline-block",s),children:e.map((l,d)=>{const c=Math.max(2,l*a),g=d*(i+o),h=(a-c)/2;return t.jsx("rect",{x:g,y:h,width:i,height:c,fill:n,rx:i/2},d)})})},td=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UvoiceUrecorder",children:r||"UvoiceUrecorder Component"}),ad=({className:e,children:r,disabled:a})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"PodcastPlayer",children:r||"PodcastPlayer Component"}),nd=({accept:e=["image/*","video/*","audio/*"],maxSize:r=50*1024*1024,maxFiles:a=10,multiple:n=!0,onUpload:o,onRemove:s,className:i})=>{const[l,d]=v.useState([]),[c,g]=v.useState(!1),h=v.useRef(null),w=C=>{C.preventDefault(),g(!0)},m=C=>{C.preventDefault(),g(!1)},b=C=>{C.preventDefault(),g(!1);const k=Array.from(C.dataTransfer.files);p(k)},y=C=>{if(C.target.files){const k=Array.from(C.target.files);p(k)}},p=C=>{const k=C.filter(M=>{const x=e.some(D=>{if(D.endsWith("/*")){const U=D.split("/")[0];return M.type.startsWith(U)}return M.type===D}),O=M.size<=r;return x&&O}),S=a-l.length,I=k.slice(0,S),E=I.map(M=>({id:`${Date.now()}-${Math.random()}`,file:M,preview:M.type.startsWith("image/")?URL.createObjectURL(M):void 0,status:"pending"}));d(M=>[...M,...E]),o&&o(I)},T=C=>{d(k=>k.filter(S=>S.id!==C)),s&&s(C)},N=C=>C<1024?`${C} B`:C<1024*1024?`${(C/1024).toFixed(1)} KB`:`${(C/(1024*1024)).toFixed(1)} MB`;return t.jsxs("div",{className:f("space-y-4",i),children:[t.jsxs("div",{onDragEnter:w,onDragOver:C=>C.preventDefault(),onDragLeave:m,onDrop:b,onClick:()=>h.current?.click(),className:f("border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-colors",c?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 dark:border-gray-700 hover:border-gray-400 dark:hover:border-gray-600"),children:[t.jsx("svg",{className:"w-12 h-12 mx-auto mb-4 text-gray-400 dark:text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),t.jsx("p",{className:"text-gray-700 dark:text-gray-300 mb-2",children:"Drag and drop files here, or click to browse"}),t.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Max ",a," files, ",N(r)," each"]}),t.jsx("input",{ref:h,type:"file",multiple:n,accept:e.join(","),onChange:y,className:"hidden"})]}),l.length>0&&t.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:l.map(C=>t.jsxs("div",{className:"relative aspect-square rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-800",children:[C.preview?t.jsx("img",{src:C.preview,alt:C.file.name,className:"w-full h-full object-cover"}):t.jsx("div",{className:"w-full h-full flex items-center justify-center",children:t.jsx("svg",{className:"w-12 h-12 text-gray-400",fill:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6zm4 18H6V4h7v5h5v11z"})})}),t.jsx("button",{onClick:()=>T(C.id),className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-red-500 text-white flex items-center justify-center hover:bg-red-600 transition-colors",children:t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),t.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-black/70 text-white text-xs p-2",children:[t.jsx("p",{className:"truncate",children:C.file.name}),t.jsx("p",{className:"text-gray-300",children:N(C.file.size)})]})]},C.id))})]})},od=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UmediaUplaylist",children:r||"UmediaUplaylist Component"}),sd=({className:e,children:r,disabled:a})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed",e),role:"region","aria-label":"PlaylistManager",children:r||"PlaylistManager Component"}),id=({value:e,size:r=200,fgColor:a="#000000",bgColor:n="#ffffff",showDownload:o=!1,className:s})=>{const i=v.useRef(null);v.useEffect(()=>{const d=i.current;if(!d)return;const c=d.getContext("2d");if(!c)return;c.fillStyle=n,c.fillRect(0,0,r,r),c.fillStyle=a;const g=8,h=r/g,w=e.split("").reduce((b,y)=>b+y.charCodeAt(0),0);for(let b=0;b<g;b++)for(let y=0;y<g;y++)(w+b*g+y)%3!==0&&c.fillRect(y*h,b*h,h,h);const m=h*3;[[0,0],[r-m,0],[0,r-m]].forEach(([b,y])=>{c.strokeStyle=a,c.lineWidth=h,c.strokeRect(b+h/2,y+h/2,m-h,m-h)})},[e,r,a,n]);const l=()=>{const d=i.current;if(!d)return;const c=d.toDataURL("image/png"),g=document.createElement("a");g.download="qrcode.png",g.href=c,g.click()};return t.jsxs("div",{className:f("inline-flex flex-col items-center gap-3",s),children:[t.jsx("canvas",{ref:i,width:r,height:r,className:"border-2 border-gray-200 dark:border-gray-700 rounded-lg"}),o&&t.jsx("button",{onClick:l,className:f("px-4 py-2 text-sm font-medium","bg-blue-600 dark:bg-blue-500 text-white","rounded-md","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors"),children:"Download QR Code"}),t.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 max-w-[200px] text-center break-all",children:e})]})},qr=({isOpen:e,onClose:r,title:a,size:n="medium",variant:o="default",overlay:s="default",showCloseButton:i=!0,closeOnOverlayClick:l=!0,closeOnEscape:d=!0,children:c,className:g,"aria-labelledby":h,"aria-describedby":w,closeAriaLabel:m="Close modal"})=>{const b=v.useRef(null),y=v.useRef(null);if(v.useEffect(()=>{if(!e||!d)return;const C=k=>{k.key==="Escape"&&r()};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[e,d,r]),v.useEffect(()=>{if(e)return y.current=document.activeElement,b.current&&b.current.focus(),document.body.style.overflow="hidden",()=>{document.body.style.overflow="unset",y.current&&y.current.focus()}},[e]),!e)return null;const p=()=>{const C=_.overlays.modal.content(),k=_.overlays.modal[n]();return f(C,k)},T=C=>{l&&C.target===C.currentTarget&&r()},N=t.jsxs(t.Fragment,{children:[t.jsx("div",{className:_.overlays.modal.backdrop(),onClick:T}),t.jsx("div",{className:_.overlays.modal.container(),role:"dialog","aria-modal":"true","aria-labelledby":h,"aria-describedby":w,children:t.jsxs("div",{ref:b,"data-testid":"modal-content",className:f(p(),g),tabIndex:-1,onClick:C=>C.stopPropagation(),children:[a&&t.jsxs("div",{className:_.overlays.modal.header(),children:[t.jsx("h2",{id:h,className:_.overlays.modal.title(),children:a}),i&&t.jsx("button",{onClick:r,className:_.overlays.modal.closeButton(),"aria-label":m,children:t.jsx(L.XMarkIcon,{className:_.icon.variant.muted.md()})})]}),c]})})]});return ht.createPortal(N,document.body)},ld=({children:e,variant:r="default",className:a})=>t.jsx("div",{"data-testid":"modal-header",className:f(_.overlays.modal.header(),a),children:e}),Hr=({children:e,variant:r="default",className:a})=>t.jsx("div",{"data-testid":"modal-body",className:f(_.overlays.modal.body(),a),children:e}),Gr=({children:e,variant:r="default",className:a})=>t.jsx("div",{"data-testid":"modal-footer",className:f(_.overlays.modal.footer(),a),children:e}),cd=({isOpen:e,onClose:r,children:a,side:n="right",size:o="md",showCloseButton:s=!0,title:i,footer:l,className:d})=>{if(v.useEffect(()=>{const w=m=>{m.key==="Escape"&&e&&r()};if(e)return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[e,r]),!e)return null;const c={left:{sm:"w-64",md:"w-80",lg:"w-96",full:"w-full"},right:{sm:"w-64",md:"w-80",lg:"w-96",full:"w-full"},top:{sm:"h-64",md:"h-80",lg:"h-96",full:"h-full"},bottom:{sm:"h-64",md:"h-80",lg:"h-96",full:"h-full"}},g={left:"left-0 top-0 h-full",right:"right-0 top-0 h-full",top:"top-0 left-0 w-full",bottom:"bottom-0 left-0 w-full"},h={left:e?"translate-x-0":"-translate-x-full",right:e?"translate-x-0":"translate-x-full",top:e?"translate-y-0":"-translate-y-full",bottom:e?"translate-y-0":"translate-y-full"};return t.jsxs(me,{children:[t.jsx(er,{isOpen:e,onClose:r,opacity:"medium"}),t.jsxs("div",{className:f("fixed z-50","bg-white dark:bg-gray-900","shadow-xl","transition-transform duration-300 ease-in-out",g[n],c[n][o],h[n],d),children:[(i||s)&&t.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:[i&&t.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:i}),s&&t.jsx("button",{onClick:r,className:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 transition-colors","aria-label":"Close drawer",children:t.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),t.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:a}),l&&t.jsx("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:l})]})]})},dd=({children:e,active:r=!0,initialFocus:a,returnFocus:n=!0,className:o})=>{const s=v.useRef(null),i=v.useRef(null);return v.useEffect(()=>{if(!r)return;n&&(i.current=document.activeElement);const l=()=>{if(!s.current)return[];const h=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return Array.from(s.current.querySelectorAll(h))},d=()=>{if(a){const w=s.current?.querySelector(a);if(w){w.focus();return}}const h=l();h.length>0&&h[0].focus()},c=h=>{if(h.key!=="Tab")return;const w=l();if(w.length===0){h.preventDefault();return}const m=w[0],b=w[w.length-1];h.shiftKey?document.activeElement===m&&(h.preventDefault(),b.focus()):document.activeElement===b&&(h.preventDefault(),m.focus())},g=setTimeout(d,0);return document.addEventListener("keydown",c),()=>{clearTimeout(g),document.removeEventListener("keydown",c),n&&i.current&&i.current.focus()}},[r,a,n]),r?t.jsx("div",{ref:s,className:f(o),children:e}):t.jsx(t.Fragment,{children:e})},ud=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UhoverUtooltip",children:r||"UhoverUtooltip Component"}),gd=({children:e,onLoadMore:r,loading:a=!1,hasMore:n=!0,threshold:o=100,loader:s,endMessage:i,height:l,scrollDirection:d="vertical",reverse:c=!1,className:g})=>{const h=v.useRef(null),[w,m]=v.useState(!1);v.useEffect(()=>{const T=h.current;if(!T||a||!n)return;const N=()=>{const{scrollTop:C,scrollHeight:k,clientHeight:S,scrollLeft:I,scrollWidth:E,clientWidth:M}=T;d==="vertical"&&m(C>300);let x;d==="vertical"?c?x=C:x=k-C-S:c?x=I:x=E-I-M,x<o&&r()};return T.addEventListener("scroll",N),()=>T.removeEventListener("scroll",N)},[a,n,o,r,d,c]);const b=()=>{h.current?.scrollTo({top:0,behavior:"smooth"})},y=t.jsxs("div",{className:"flex justify-center items-center py-4",children:[t.jsx("div",{className:"w-6 h-6 border-2 border-blue-600 dark:border-blue-400 border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:"Loading..."})]}),p=t.jsx("div",{className:"flex justify-center items-center py-4",children:t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"No more items to load"})});return t.jsxs("div",{className:f("relative",g),children:[t.jsxs("div",{ref:h,className:f(d==="vertical"?"overflow-y-auto":"overflow-x-auto","overflow-auto"),style:{height:d==="vertical"?l:void 0,width:d==="horizontal"?"100%":void 0,display:d==="horizontal"?"flex":void 0,flexDirection:c&&d==="vertical"?"column-reverse":void 0},children:[c&&a&&(s||y),c&&!a&&!n&&i,t.jsx("div",{className:f(d==="horizontal"&&"flex",d==="horizontal"&&c&&"flex-row-reverse"),children:e}),!c&&a&&(s||y),!c&&!a&&!n&&(i||p)]}),d==="vertical"&&!c&&w&&t.jsx("button",{onClick:b,className:f("absolute bottom-4 right-4","p-3 rounded-full","bg-blue-600 dark:bg-blue-500","text-white","shadow-lg","hover:bg-blue-700 dark:hover:bg-blue-600","transition-colors","focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400"),"aria-label":"Scroll to top",children:t.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 10l7-7m0 0l7 7m-7-7v18"})})})]})},hd=({trigger:e,children:r,placement:a="bottom",isOpen:n,onOpenChange:o,trigger_action:s="click",showArrow:i=!0,className:l})=>{const[d,c]=v.useState(!1),g=n!==void 0?n:d,h=v.useCallback(S=>{n===void 0&&c(S),o?.(S)},[n,o]),w=v.useRef(null),m=v.useRef(null),[b,y]=v.useState({top:0,left:0});v.useEffect(()=>{if(!g||!w.current)return;const S=()=>{const I=w.current.getBoundingClientRect(),E=8;let M=0,x=0;switch(a){case"top":M=I.top-E,x=I.left+I.width/2;break;case"top-start":M=I.top-E,x=I.left;break;case"top-end":M=I.top-E,x=I.right;break;case"bottom":M=I.bottom+E,x=I.left+I.width/2;break;case"bottom-start":M=I.bottom+E,x=I.left;break;case"bottom-end":M=I.bottom+E,x=I.right;break;case"left":M=I.top+I.height/2,x=I.left-E;break;case"right":M=I.top+I.height/2,x=I.right+E;break}y({top:M,left:x})};return S(),window.addEventListener("scroll",S),window.addEventListener("resize",S),()=>{window.removeEventListener("scroll",S),window.removeEventListener("resize",S)}},[g,a]),v.useEffect(()=>{if(!g)return;const S=I=>{w.current&&!w.current.contains(I.target)&&m.current&&!m.current.contains(I.target)&&h(!1)};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[g,h]),v.useEffect(()=>{if(!g)return;const S=I=>{I.key==="Escape"&&h(!1)};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[g,h]);const p=()=>{s==="click"&&h(!g)},T=()=>{s==="hover"&&h(!0)},N=()=>{s==="hover"&&h(!1)},C={top:"origin-bottom","top-start":"origin-bottom-left","top-end":"origin-bottom-right",bottom:"origin-top","bottom-start":"origin-top-left","bottom-end":"origin-top-right",left:"origin-right",right:"origin-left"},k={top:"-translate-x-1/2 -translate-y-full","top-start":"-translate-y-full","top-end":"-translate-x-full -translate-y-full",bottom:"-translate-x-1/2","bottom-start":"","bottom-end":"-translate-x-full",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"};return t.jsxs("div",{className:f("relative inline-block",l),children:[t.jsx("div",{ref:w,onClick:p,onMouseEnter:T,onMouseLeave:N,className:"inline-block",children:e}),g&&t.jsxs("div",{ref:m,className:f("fixed z-50","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","rounded-lg shadow-lg","transition-all duration-200","animate-in fade-in zoom-in-95",C[a],k[a]),style:{position:"fixed",top:b.top+"px",left:b.left+"px"},onMouseEnter:s==="hover"?()=>h(!0):void 0,onMouseLeave:s==="hover"?()=>h(!1):void 0,children:[r,i&&t.jsx("div",{className:f("arrow absolute w-2 h-2 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 transform rotate-45",a.startsWith("top")&&"bottom-[-5px] border-t-0 border-l-0",a.startsWith("bottom")&&"top-[-5px] border-b-0 border-r-0",a==="left"&&"right-[-5px] border-l-0 border-b-0",a==="right"&&"left-[-5px] border-r-0 border-t-0",(a==="top"||a==="bottom")&&"left-1/2 -translate-x-1/2",(a==="left"||a==="right")&&"top-1/2 -translate-y-1/2")})]})]})},fd=({sections:e,activeId:r,onActiveChange:a,offset:n=80,container:o,smoothScroll:s=!0,showSubsections:i=!0,className:l})=>{const[d,c]=v.useState(""),g=v.useRef(null),h=r!==void 0?r:d;v.useEffect(()=>{const b=o?document.querySelector(o):window;if(!b)return;const y=N=>N.flatMap(C=>[C.id,...C.subsections?y(C.subsections):[]]),T=y(e).map(N=>document.getElementById(N)).filter(Boolean);if(T.length!==0)return g.current=new IntersectionObserver(N=>{N.forEach(C=>{if(C.isIntersecting){const k=C.target.id;r!==void 0&&a?a(k):c(k)}})},{root:o?b:null,rootMargin:`-${n}px 0px -50% 0px`,threshold:0}),T.forEach(N=>{g.current?.observe(N)}),()=>{g.current?.disconnect()}},[e,o,n,r,a]);const w=b=>{const y=document.getElementById(b);if(!y)return;const p=o?document.querySelector(o):window;if(!p)return;const N=y.offsetTop-n;s?p===window?window.scrollTo({top:N,behavior:"smooth"}):p.scrollTo({top:N,behavior:"smooth"}):p===window?window.scrollTo(0,N):p.scrollTop=N},m=(b,y=0)=>{const p=h===b.id,T=b.subsections?.some(N=>h===N.id)||!1;return t.jsxs("div",{children:[t.jsx("button",{onClick:()=>w(b.id),className:f("w-full text-left px-3 py-1.5 text-sm rounded-md transition-colors",y===0?"font-medium":"pl-6 text-sm",p?"text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/30":T?"text-gray-700 dark:text-gray-300":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800"),style:{paddingLeft:`${y*.75+.75}rem`},children:b.label}),i&&b.subsections&&b.subsections.length>0&&t.jsx("div",{className:"ml-2 border-l-2 border-gray-200 dark:border-gray-700",children:b.subsections.map(N=>m(N,y+1))})]},b.id)};return t.jsx("nav",{className:f("space-y-1",l),children:e.map(b=>m(b,0))})},bd=({isOpen:e,onClose:r,children:a,title:n,description:o,footer:s,side:i="bottom",size:l="md",showHandle:d=!0,showCloseButton:c=!0,className:g})=>{if(v.useEffect(()=>{if(!e)return;const b=y=>{y.key==="Escape"&&r()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[e,r]),!e)return null;const h={bottom:{sm:"h-1/3",md:"h-1/2",lg:"h-2/3",full:"h-full"},top:{sm:"h-1/3",md:"h-1/2",lg:"h-2/3",full:"h-full"},left:{sm:"w-80",md:"w-96",lg:"w-[32rem]",full:"w-full"},right:{sm:"w-80",md:"w-96",lg:"w-[32rem]",full:"w-full"}},w={bottom:"bottom-0 left-0 right-0 rounded-t-2xl",top:"top-0 left-0 right-0 rounded-b-2xl",left:"left-0 top-0 bottom-0 rounded-r-2xl",right:"right-0 top-0 bottom-0 rounded-l-2xl"},m={bottom:"animate-in slide-in-from-bottom duration-300",top:"animate-in slide-in-from-top duration-300",left:"animate-in slide-in-from-left duration-300",right:"animate-in slide-in-from-right duration-300"};return t.jsxs(me,{children:[t.jsx(er,{isOpen:e,onClose:r,opacity:"dark"}),t.jsxs("div",{className:f("fixed z-50","bg-white dark:bg-gray-900","shadow-xl","flex flex-col",w[i],h[i][l],m[i],g),children:[d&&(i==="bottom"||i==="top")&&t.jsx("div",{className:f("flex items-center justify-center",i==="bottom"?"pt-3 pb-2":"pb-3 pt-2"),children:t.jsx("div",{className:"w-12 h-1.5 bg-gray-300 dark:bg-gray-700 rounded-full"})}),(n||o||c)&&t.jsx("div",{className:"px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsxs("div",{className:"flex-1",children:[n&&t.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:n}),o&&t.jsx("p",{className:"mt-1 text-sm text-gray-600 dark:text-gray-400",children:o})]}),c&&t.jsx("button",{onClick:r,className:"ml-4 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors","aria-label":"Close sheet",children:t.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),t.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:a}),s&&t.jsx("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:s})]})]})},md=({isOpen:e,onClose:r,onSubmit:a,title:n,description:o,placeholder:s="",initialValue:i="",cancelText:l="Cancel",confirmText:d="Confirm",isLoading:c=!1,loadingText:g="Processing...",maxLength:h,required:w=!0,validate:m})=>{const[b,y]=v.useState(i),[p,T]=v.useState(null);v.useEffect(()=>{e&&(y(i),T(null))},[e,i]);const N=async S=>{if(S.preventDefault(),T(null),w&&!b.trim()){T("This field is required");return}if(m){const I=m(b);if(I){T(I);return}}try{await a(b.trim())}catch(I){T(I instanceof Error?I.message:"An error occurred")}},C=()=>{y(i),T(null),r()},k=w?b.trim().length>0:!0;return t.jsx(qr,{isOpen:e,onClose:C,size:"small","aria-labelledby":"text-input-modal-title","aria-describedby":"text-input-modal-description",closeOnEscape:!c,closeOnOverlayClick:!c,children:t.jsxs("form",{onSubmit:N,children:[t.jsxs(Hr,{variant:"padded",children:[t.jsx("h3",{id:"text-input-modal-title",className:P.heading.h4(),children:n}),t.jsx("p",{id:"text-input-modal-description",className:`${P.body.md()} mt-2 mb-4`,children:o}),t.jsx(rr,{type:"text",value:b,onChange:S=>y(S.target.value),placeholder:s,maxLength:h,disabled:c,autoFocus:!0,"aria-invalid":!!p,"aria-describedby":p?"text-input-error":void 0}),p&&t.jsx("p",{id:"text-input-error",className:`${P.body.sm()} text-red-600 dark:text-red-400 mt-2`,role:"alert",children:p})]}),t.jsxs(Gr,{children:[t.jsx(se,{type:"button",variant:"outline",onClick:C,disabled:c,children:l}),t.jsx(se,{type:"submit",variant:"default",disabled:!k||c,children:c?g:d})]})]})})},yd=({content:e,children:r,placement:a="top",delayShow:n=0,delayHide:o=0,className:s,disabled:i=!1,showArrow:l=!0,variant:d="default",trigger:c="hover",isOpen:g,onVisibilityChange:h})=>{const[w,m]=v.useState(!1),b=v.useRef(void 0),y=v.useRef(void 0),p=v.useRef(null),T=v.useRef(null),N=g!==void 0,C=N?g:w,k=v.useCallback(()=>{i||N||(y.current&&(clearTimeout(y.current),y.current=void 0),n>0?b.current=setTimeout(()=>{m(!0),h?.(!0)},n):(m(!0),h?.(!0)))},[i,N,n,h]),S=v.useCallback(()=>{N||(b.current&&(clearTimeout(b.current),b.current=void 0),o>0?y.current=setTimeout(()=>{m(!1),h?.(!1)},o):(m(!1),h?.(!1)))},[N,o,h]);v.useEffect(()=>()=>{b.current&&clearTimeout(b.current),y.current&&clearTimeout(y.current)},[]),v.useEffect(()=>{if(c!=="click"||!C)return;const V=ee=>{p.current&&!p.current.contains(ee.target)&&T.current&&!T.current.contains(ee.target)&&S()};return document.addEventListener("mousedown",V),()=>{document.removeEventListener("mousedown",V)}},[c,C,S]);const I=()=>{c==="hover"&&k()},E=()=>{c==="hover"&&S()},M=()=>{c==="hover"&&k()},x=()=>{c==="hover"&&S()},O=()=>{c==="click"&&!N&&(C?(m(!1),h?.(!1)):(m(!0),h?.(!0)))},D={top:"bottom-full left-1/2 -translate-x-1/2 -translate-y-2",bottom:"top-full left-1/2 -translate-x-1/2 translate-y-2",left:"right-full top-1/2 -translate-x-2 -translate-y-1/2",right:"left-full top-1/2 translate-x-2 -translate-y-1/2"},U={top:"top-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-b-transparent",bottom:"bottom-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-t-transparent",left:"left-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-r-transparent",right:"right-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-l-transparent"},B={default:"bg-gray-900 dark:bg-gray-700 text-white",info:"bg-blue-600 dark:bg-blue-500 text-white",success:"bg-green-600 dark:bg-green-500 text-white",warning:"bg-yellow-600 dark:bg-yellow-500 text-white",error:"bg-red-600 dark:bg-red-500 text-white"},z={default:{top:"border-t-gray-900 dark:border-t-gray-700",bottom:"border-b-gray-900 dark:border-b-gray-700",left:"border-l-gray-900 dark:border-l-gray-700",right:"border-r-gray-900 dark:border-r-gray-700"},info:{top:"border-t-blue-600 dark:border-t-blue-500",bottom:"border-b-blue-600 dark:border-b-blue-500",left:"border-l-blue-600 dark:border-l-blue-500",right:"border-r-blue-600 dark:border-r-blue-500"},success:{top:"border-t-green-600 dark:border-t-green-500",bottom:"border-b-green-600 dark:border-b-green-500",left:"border-l-green-600 dark:border-l-green-500",right:"border-r-green-600 dark:border-r-green-500"},warning:{top:"border-t-yellow-600 dark:border-t-yellow-500",bottom:"border-b-yellow-600 dark:border-b-yellow-500",left:"border-l-yellow-600 dark:border-l-yellow-500",right:"border-r-yellow-600 dark:border-r-yellow-500"},error:{top:"border-t-red-600 dark:border-t-red-500",bottom:"border-b-red-600 dark:border-b-red-500",left:"border-l-red-600 dark:border-l-red-500",right:"border-r-red-600 dark:border-r-red-500"}};return t.jsxs("div",{ref:T,className:"relative inline-block",onMouseEnter:I,onMouseLeave:E,onFocus:M,onBlur:x,onClick:O,children:[r,C&&!i&&t.jsxs("div",{ref:p,className:f("absolute z-50 px-2 py-1 text-xs font-medium rounded shadow-lg whitespace-nowrap pointer-events-none",D[a],B[d],s),role:"tooltip",children:[e,l&&t.jsx("div",{className:f("absolute w-0 h-0 border-4 arrow",U[a],z[d][a])})]})]})},pd={default:L.InformationCircleIcon,warning:L.ExclamationTriangleIcon,danger:L.XCircleIcon,success:L.CheckCircleIcon,info:L.InformationCircleIcon},vd={default:()=>_.icon.variant.default.lg(),warning:()=>_.icon.variant.warning.lg(),danger:()=>_.icon.variant.error.lg(),success:()=>_.icon.variant.success.lg(),info:()=>_.icon.variant.default.lg()},wd={default:"default",warning:"default",danger:"destructive",success:"default",info:"default"},kd=({isOpen:e,onClose:r,onConfirm:a,title:n,message:o,confirmText:s="Confirm",cancelText:i="Cancel",loadingText:l="Processing...",variant:d="default",isLoading:c=!1})=>{const g=pd[d],h=vd[d],w=wd[d];return t.jsxs(qr,{isOpen:e,onClose:r,size:"small",variant:"web3confirmation","aria-labelledby":"confirmation-dialog-title","aria-describedby":"confirmation-dialog-description",children:[t.jsxs(Hr,{variant:"padded",children:[t.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[t.jsx(g,{className:h()}),t.jsx("h3",{id:"confirmation-dialog-title",className:P.heading.h4(),children:n})]}),t.jsx("p",{id:"confirmation-dialog-description",className:P.body.md(),children:o})]}),t.jsxs(Gr,{children:[t.jsx(se,{variant:"outline",onClick:r,disabled:c,children:i}),t.jsx(se,{variant:w,onClick:a,disabled:c,children:c?l:s})]})]})},xd=({trigger:e,children:r,placement:a="bottom",openDelay:n=200,closeDelay:o=300,className:s})=>{const[i,l]=v.useState(!1),[d,c]=v.useState({top:0,left:0}),g=v.useRef(null),h=v.useRef(null),w=v.useRef(void 0),m=v.useRef(void 0);v.useEffect(()=>{if(!i||!g.current)return;const N=()=>{const C=g.current.getBoundingClientRect(),k=8;let S=0,I=0;switch(a){case"top":S=C.top-k,I=C.left+C.width/2;break;case"bottom":S=C.bottom+k,I=C.left+C.width/2;break;case"left":S=C.top+C.height/2,I=C.left-k;break;case"right":S=C.top+C.height/2,I=C.right+k;break}c({top:S,left:I})};return N(),window.addEventListener("scroll",N),window.addEventListener("resize",N),()=>{window.removeEventListener("scroll",N),window.removeEventListener("resize",N)}},[i,a]);const b=()=>{m.current&&clearTimeout(m.current),w.current=setTimeout(()=>{l(!0)},n)},y=()=>{w.current&&clearTimeout(w.current),m.current=setTimeout(()=>{l(!1)},o)},p={top:"origin-bottom",bottom:"origin-top",left:"origin-right",right:"origin-left"},T={top:"-translate-x-1/2 -translate-y-full",bottom:"-translate-x-1/2",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"};return t.jsxs(t.Fragment,{children:[t.jsx("div",{ref:g,onMouseEnter:b,onMouseLeave:y,className:"inline-block",children:e}),i&&t.jsx(me,{children:t.jsx("div",{ref:h,className:f("fixed z-50","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","rounded-lg shadow-lg","transition-all duration-200","animate-in fade-in zoom-in-95",p[a],T[a],s),style:{top:d.top+"px",left:d.left+"px"},onMouseEnter:()=>{m.current&&clearTimeout(m.current)},onMouseLeave:y,children:r})})]})},Nd=({children:e,onDrop:r,onDragOver:a,accept:n,showIndicator:o=!0,indicator:s,disabled:i=!1,className:l})=>{const[d,c]=v.useState(!1),[g,h]=v.useState(0),w=T=>{T.preventDefault(),T.stopPropagation(),!i&&(h(N=>N+1),T.dataTransfer.items&&T.dataTransfer.items.length>0&&c(!0))},m=T=>{T.preventDefault(),T.stopPropagation(),!i&&h(N=>{const C=N-1;return C===0&&c(!1),C})},b=T=>{T.preventDefault(),T.stopPropagation(),!i&&a&&a(T)},y=T=>{if(T.preventDefault(),T.stopPropagation(),i)return;if(c(!1),h(0),T.dataTransfer.files&&T.dataTransfer.files.length>0){const C=Array.from(T.dataTransfer.files);let k=C;n&&n.length>0&&(k=C.filter(S=>n.some(I=>{if(I.endsWith("/*")){const E=I.split("/")[0];return S.type.startsWith(E)}return S.type===I}))),r(k);return}const N=T.dataTransfer.getData("text/plain");if(N)try{const C=JSON.parse(N);r(C)}catch{r(N)}},p=t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-blue-50 dark:bg-blue-900/30 border-2 border-dashed border-blue-500 dark:border-blue-400 rounded-lg z-10",children:[t.jsx("svg",{className:"w-12 h-12 text-blue-600 dark:text-blue-400 mb-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),t.jsx("p",{className:"text-blue-700 dark:text-blue-300 font-medium",children:"Drop here"})]});return t.jsxs("div",{onDragEnter:w,onDragLeave:m,onDragOver:b,onDrop:y,className:f("relative",i&&"opacity-50 cursor-not-allowed",l),children:[e,o&&d&&!i&&(s||p)]})},Cd=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UdragUdropUlist",children:r||"UdragUdropUlist Component"}),Sd=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UsortableUgrid",children:r||"UsortableUgrid Component"}),Ed=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UnestedUdrag",children:r||"UnestedUdrag Component"}),Td=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UgestureUdetector",children:r||"UgestureUdetector Component"}),Ad=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UswipeUactions",children:r||"UswipeUactions Component"}),Id=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UpinchUzoom",children:r||"UpinchUzoom Component"}),Md=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UdoubleUtap",children:r||"UdoubleUtap Component"}),Ld=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UlongUpress",children:r||"UlongUpress Component"}),Pd=({className:e,children:r,disabled:a=!1,onClick:n})=>t.jsx("div",{className:f("p-4 rounded-lg border transition-colors","bg-white dark:bg-gray-900","border-gray-200 dark:border-gray-700","text-gray-900 dark:text-white",a&&"opacity-50 cursor-not-allowed","hover:bg-gray-50 dark:hover:bg-gray-800",e),onClick:a?void 0:n,role:"region","aria-label":"UradialUmenu",children:r||"UradialUmenu Component"}),Od=({children:e,onRefresh:r,disabled:a=!1,refreshingText:n="Refreshing...",pullDownText:o="Pull down to refresh",releaseText:s="Release to refresh",threshold:i=80,maxPullDistance:l=120,className:d=""})=>{const[c,g]=v.useState(0),[h,w]=v.useState(!1),[m,b]=v.useState(!1),y=v.useRef(0),p=v.useRef(null);v.useEffect(()=>{const S=p.current;if(!S)return;const I=x=>{if(a||h)return;S.scrollTop<=0&&(y.current=x.touches[0].clientY,b(!0))},E=x=>{if(!m)return;const D=x.touches[0].clientY-y.current;if(D>0&&S.scrollTop<=0){const U=Math.min(D/l,1),B=Math.min(D*(1-U*.5),l);g(B),D>10&&x.preventDefault()}},M=async()=>{if(m)if(b(!1),c>=i&&!h){w(!0);try{await r()}catch{}finally{w(!1),g(0)}}else g(0)};return S.addEventListener("touchstart",I,{passive:!0}),S.addEventListener("touchmove",E,{passive:!1}),S.addEventListener("touchend",M),()=>{S.removeEventListener("touchstart",I),S.removeEventListener("touchmove",E),S.removeEventListener("touchend",M)}},[a,h,m,c,i,l,r]);const T=Math.min(c/i,1),N=m||h,C=m?c:h?i:0,k=()=>h?n:c>=i?s:o;return t.jsxs("div",{ref:p,className:`relative ${d}`,style:{height:"100%",overflowY:"auto",WebkitOverflowScrolling:"touch"},children:[t.jsx("div",{className:"sticky top-0 left-0 right-0 flex items-center justify-center bg-gradient-to-b from-blue-50/90 to-transparent dark:from-blue-900/20 dark:to-transparent backdrop-blur-sm z-10 transition-all duration-300 ease-out",style:{height:`${C}px`,marginTop:m?0:`-${C}px`,opacity:N?1:0,pointerEvents:"none"},children:t.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[t.jsx(L.ArrowPathIcon,{className:`w-6 h-6 text-blue-600 dark:text-blue-400 transition-transform duration-200 ${h?"animate-spin":""}`,style:{transform:`rotate(${T*360}deg)`}}),c>20&&t.jsx("span",{className:"text-xs font-medium text-blue-600 dark:text-blue-400",children:k()})]})}),t.jsx("div",{style:{paddingTop:m?`${c}px`:0,transition:m?"none":"padding-top 200ms ease-out"},children:e})]})},de={twitter:(e,r,a)=>{const n=a.length>0?`&hashtags=${a.join(",")}`:"";return`https://twitter.com/intent/tweet?url=${encodeURIComponent(e)}&text=${encodeURIComponent(r)}${n}`},facebook:e=>`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(e)}`,linkedin:(e,r,a)=>`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(e)}`,reddit:(e,r)=>`https://reddit.com/submit?url=${encodeURIComponent(e)}&title=${encodeURIComponent(r)}`,telegram:(e,r)=>`https://t.me/share/url?url=${encodeURIComponent(e)}&text=${encodeURIComponent(r)}`,whatsapp:(e,r)=>`https://wa.me/?text=${encodeURIComponent(r+" "+e)}`,email:(e,r,a)=>`mailto:?subject=${encodeURIComponent(r)}&body=${encodeURIComponent(a+`
|
|
47
47
|
|
|
48
48
|
`+e)}`,discord:(e,r)=>`https://discord.com/channels/@me?message=${encodeURIComponent(r+`
|
|
49
|
-
`+e)}`,messages:(e,r)=>`sms:?&body=${encodeURIComponent(r+" "+e)}`},Ud=({shareConfig:e})=>{const[r,a]=p.useState(!1),[n,o]=p.useState(""),[s,i]=p.useState(!1),[l,d]=p.useState(!1),[c,g]=p.useState(!1);p.useEffect(()=>{const N=e.onBeforeShare;N&&!n&&(async()=>{i(!0);try{const k=typeof window<"u"?window.location.href:"",C=await N(k);o(C)}catch{const k=typeof window<"u"?window.location.href:"";o(k)}finally{i(!1)}})()},[e,n]);const h=n||(typeof window<"u"?window.location.href:""),w=typeof navigator<"u"&&navigator.share!==void 0,m=async()=>{if(!(!w||c)){g(!0);try{await navigator.share({title:e.title,text:e.description,url:h}),a(!1)}catch(N){N instanceof Error&&N.name!=="AbortError"&&(console.error("Share failed:",N),N.name!=="InvalidStateError"&&a(!0))}finally{g(!1)}}},b=async()=>{try{await navigator.clipboard.writeText(h),d(!0),setTimeout(()=>{d(!1),a(!1)},1500)}catch{}},y=()=>{a(!r)},v=N=>{window.open(N,"_blank","noopener,noreferrer,width=600,height=400"),a(!1)},T=[{name:"Twitter",url:de.twitter(h,e.title,e.hashtags),color:"text-blue-400",svg:t.jsx("path",{d:"M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84"})},{name:"Facebook",url:de.facebook(h),color:"text-blue-600",svg:t.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})},{name:"LinkedIn",url:de.linkedin(h,e.title,e.description),color:"text-blue-700",svg:t.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})},{name:"Reddit",url:de.reddit(h,e.title),color:"text-orange-600",svg:t.jsx("path",{d:"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"})},{name:"Telegram",url:de.telegram(h,e.title),color:"text-blue-500",svg:t.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})},{name:"WhatsApp",url:de.whatsapp(h,e.title),color:"text-green-600",svg:t.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"})},{name:"Discord",url:de.discord(h,e.title),color:"text-indigo-500",svg:t.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})},{name:"Messages",url:de.messages(h,e.title),color:"text-green-500",svg:t.jsx("path",{d:"M.05 3.555A3 3 0 013 0h18a3 3 0 012.95 3.555L22 11v8a3 3 0 01-3 3H5a3 3 0 01-3-3v-8l-1.95-7.445zM2 10.938V19a1 1 0 001 1h18a1 1 0 001-1v-8.062L20 19H4l-2-8.062zM3.38 2L5 8h14l1.62-6H3.38z"})},{name:"Email",url:de.email(h,e.title,e.description),color:"text-gray-600",svg:t.jsx("path",{d:"M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z"})}];return t.jsxs("div",{className:"relative",children:[t.jsx("button",{onClick:y,disabled:s||c,className:"flex items-center justify-center w-8 h-8 bg-blue-50 hover:bg-blue-100 dark:bg-blue-900/30 dark:hover:bg-blue-900/50 text-blue-600 dark:text-blue-400 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Share this page",children:s||c?t.jsx("div",{className:"w-4 h-4 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"}):t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z"})})}),r&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"fixed inset-0 z-[999998]",onClick:()=>a(!1)}),t.jsxs("div",{className:"absolute right-0 top-10 z-[999999] w-40 bg-white dark:bg-gray-800 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 py-1",children:[T.map(N=>t.jsxs("button",{onClick:()=>v(N.url),className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors",children:[t.jsx("svg",{className:`w-4 h-4 mr-2 ${N.color}`,fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:N.svg}),t.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:N.name})]},N.name)),t.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),w&&t.jsxs("button",{onClick:()=>{a(!1),m()},disabled:c,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors disabled:opacity-50",children:[t.jsx("svg",{className:"w-4 h-4 mr-2 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z"})}),t.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"More..."})]}),t.jsxs("button",{onClick:b,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors",children:[t.jsx("svg",{className:"w-4 h-4 mr-2 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})}),t.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:l?"Copied!":"Copy Link"})]})]})]})]})},Oa=({items:e,shareConfig:r,className:a,showHome:n})=>t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("nav",{"aria-label":"Breadcrumb",children:t.jsx("ol",{className:"flex items-center text-sm space-x-2",children:e.map((o,s)=>t.jsxs(p.Fragment,{children:[t.jsx("li",{children:o.current?t.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:o.label}):t.jsx(br.Link,{to:o.href||"#",className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 transition-colors",children:o.label})}),s<e.length-1&&t.jsx("li",{children:t.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"/"})})]},s))})}),r&&t.jsx(Ud,{shareConfig:r})]}),Dd=({items:e,shareConfig:r})=>t.jsx("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 relative z-50",children:t.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3 relative",children:t.jsx(Oa,{items:e,shareConfig:r})})}),Ua=e=>{const[r,a]=p.useState(""),[n,o]=p.useState(!0),[s,i]=p.useState(null);return p.useEffect(()=>{e&&(async()=>{try{o(!0),i(null);const d=await fetch(`/code/${e}`);if(!d.ok)throw new Error(`Failed to load code file: ${e}`);const c=await d.text();a(c)}catch(d){i(d instanceof Error?d.message:"Unknown error"),a("// Error loading code file")}finally{o(!1)}})()},[e]),{code:r,loading:n,error:s}},jd=({filename:e,code:r,language:a,title:n,className:o="",showCopy:s=!0,showHeader:i=!0})=>{const{t:l}=bt.useTranslation("codeBlock"),{code:d,loading:c,error:g}=Ua(e||""),[h,w]=p.useState(!1),m=r||d,y=a||(e?(T=>{switch(T.split(".").pop()?.toLowerCase()){case"sol":return"solidity";case"js":case"mjs":return"javascript";case"ts":return"typescript";case"sh":return"bash";case"graphql":return"graphql";case"json":return"json";case"css":return"css";case"html":return"html";case"jsx":return"jsx";case"tsx":return"tsx";case"py":return"python";case"java":return"java";case"cpp":case"c":return"cpp";case"go":return"go";case"rs":return"rust";case"php":return"php";case"rb":return"ruby";default:return"text"}})(e):"text"),v=async()=>{if(m)try{await navigator.clipboard.writeText(m),w(!0),setTimeout(()=>w(!1),2e3)}catch{}};return e&&c?t.jsx("div",{className:`bg-gray-900 text-green-400 rounded-lg p-4 font-mono text-sm ${o}`,children:t.jsx("div",{className:"animate-pulse text-gray-500",children:l("loadingCode","Loading code...")})}):e&&g?t.jsxs("div",{className:`bg-gray-900 text-red-400 rounded-lg p-4 font-mono text-sm ${o}`,children:[l("error","Error"),": ",g]}):m?t.jsxs("div",{className:`bg-gray-900 rounded-lg border border-green-500/20 shadow-lg shadow-green-500/10 ${o}`,children:[i&&t.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-green-500/20 bg-gray-800/50",children:[t.jsx("span",{className:"text-sm text-green-400 font-mono",children:n||e||`${y} code`}),s&&t.jsx("button",{onClick:v,className:"p-2 text-gray-400 hover:text-green-400 hover:bg-gray-800 rounded-lg transition-all duration-200 group",title:l("copyCode","Copy code"),children:h?t.jsx(L.CheckIcon,{className:"h-4 w-4 text-green-400"}):t.jsx(L.ClipboardDocumentIcon,{className:"h-4 w-4 group-hover:scale-110 transition-transform"})})]}),t.jsx("div",{className:"p-4 overflow-x-auto text-left",children:t.jsx("pre",{className:`text-sm language-${y}`,children:t.jsx("code",{className:"text-gray-100",children:m})})})]}):t.jsx("div",{className:`bg-gray-900 text-gray-400 rounded-lg p-4 font-mono text-sm ${o}`,children:l("noCode","No code to display")})},_d=({subsections:e,isExpanded:r,selectedSubsection:a,parentSectionId:n,onSubsectionSelect:o})=>{const s=p.useRef(null),[i,l]=p.useState(void 0);return p.useLayoutEffect(()=>{if(s.current){const d=s.current.scrollHeight;l(r?d+16:0)}},[r,e]),t.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:i!==void 0?`${i}px`:"auto"},children:t.jsx("div",{ref:s,className:"ml-6 mt-1 mb-1 space-y-1",children:e.map(d=>t.jsxs("div",{className:"relative group",children:[a===d.id&&t.jsx("div",{className:"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none"}),a!==d.id&&t.jsx("div",{className:"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200"}),t.jsx("button",{onClick:()=>o?.(d.id,n),className:`relative z-10 block w-full text-left pl-4 pr-3 py-2 rounded-md text-sm transition-all duration-200 ${a===d.id?"text-blue-700 dark:text-blue-300":"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"}`,children:d.title})]},d.id))})})},zd=({id:e,title:r,content:a,subsections:n,isSelected:o=!1,selectedSubsection:s=null,onSectionSelect:i,onSubsectionSelect:l,className:d=""})=>{const[c,g]=p.useState(!1),h=()=>{g(!c)},w=()=>{i?.(e)},m=n&&n.length>0;return t.jsxs("div",{className:d,children:[t.jsxs("div",{className:"relative flex items-center group",children:[o&&!s&&t.jsx("div",{className:"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none"}),!(o&&!s)&&t.jsx("div",{className:"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200"}),t.jsx("button",{onClick:w,className:`relative z-10 flex-1 text-left pl-5 pr-3 py-4 text-base font-medium transition-all duration-200 ${o&&!s?"text-blue-700 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100"}`,children:r}),m&&t.jsx("button",{onClick:h,className:"p-2 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200","aria-label":c?"Collapse section":"Expand section",children:t.jsx(L.ChevronRightIcon,{className:`h-5 w-5 text-gray-500 transition-transform duration-300 ease-in-out ${c?"rotate-90":"rotate-0"}`})})]}),m&&t.jsx(_d,{subsections:n,isExpanded:c,selectedSubsection:s,parentSectionId:e,onSubsectionSelect:l})]})},Bd=({title:e,subtitle:r,buttonText:a,buttonIcon:n="envelope",variant:o="default",badgeText:s="FREE",prominentBadgeText:i="100% Free",onButtonClick:l,className:d=""})=>{const c=()=>n==="envelope"||n==="both"?t.jsx(L.EnvelopeIcon,{className:o==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1"}):n==="none"?null:t.jsx("svg",{className:o==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"})}),g=()=>n==="arrow"||n==="both"?t.jsx(L.ArrowRightIcon,{className:"h-4 w-4 ml-2"}):null,h=()=>o==="prominent"?"border-b-2 border-green-200 dark:border-green-700":"border-b border-green-200 dark:border-green-700",w=()=>{const y="bg-gradient-to-r from-green-600 to-blue-600 hover:from-green-700 hover:to-blue-700 text-white rounded-lg font-bold transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-green-500/25 inline-flex items-center whitespace-nowrap cursor-pointer";return o==="prominent"?`${y} px-8 py-3 text-base`:`${y} px-6 py-2 text-sm`},m=()=>o==="prominent"?"text-green-800 dark:text-green-200 font-semibold text-lg":"text-green-800 dark:text-green-200 font-semibold",b=o==="prominent"?i:s;return t.jsx("div",{className:`bg-gradient-to-r from-green-100 to-blue-100 dark:from-green-900/20 dark:to-blue-900/20 ${h()} ${d}`,children:t.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:t.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4",children:[t.jsxs("div",{className:`flex items-center ${o==="prominent"?"text-center sm:text-left":""}`,children:[t.jsx("div",{className:"bg-green-500 text-white text-xs font-bold px-3 py-1 rounded-full mr-3 animate-pulse",children:b}),t.jsxs("div",{children:[t.jsx("span",{className:m(),children:e}),r&&t.jsx("span",{className:"text-green-700 dark:text-green-300 text-sm block",children:r})]})]}),t.jsxs("button",{onClick:l,className:w(),children:[c(),a,g()]})]})})})},Wd=({children:e,onClick:r,variant:a,size:n,disabled:o,className:s,type:i,trackingLabel:l,actionType:d,componentName:c,onTrack:g,trackingParams:h={},...w})=>{const m=b=>{if(g){const y=l||(typeof e=="string"?e:"")||"Unknown Button",T=a&&["default","primary","secondary","outline","ghost","destructive","link"].includes(a)?a:"default";g({button_text:y,button_type:T,component_name:c,action_type:d,...h})}r&&r(b)};return t.jsx(se,{...w,variant:a,size:n,disabled:o,className:s,type:i,onClick:m,children:e})},Fd=({children:e,onClick:r,to:a,href:n,trackingLabel:o,componentName:s,onTrack:i,trackingParams:l={},LinkComponent:d,linkProps:c={},...g})=>{const h=m=>{if(i){const b=o||(typeof e=="string"?e:"")||"Unknown Link",y=a?typeof a=="string"?a:a.pathname||"":n||"";i({link_text:b,link_url:y,to_page:y,navigation_type:d?"router_link":"anchor_link",component_name:s,...l})}r&&r(m)};if(d&&a!==void 0)return t.jsx(d,{...c,to:a,onClick:h,...g,children:e});const w=a?typeof a=="string"?a:a.pathname||"#":n;return t.jsx("a",{...g,href:w,onClick:h,children:e})},Da={en:{name:"English",flag:"🇺🇸"},ar:{name:"العربية",flag:"🇸🇦"},de:{name:"Deutsch",flag:"🇩🇪"},es:{name:"Español",flag:"🇪🇸"},fr:{name:"Français",flag:"🇫🇷"},it:{name:"Italiano",flag:"🇮🇹"},ja:{name:"日本語",flag:"🇯🇵"},ko:{name:"한국어",flag:"🇰🇷"},pt:{name:"Português",flag:"🇵🇹"},ru:{name:"Русский",flag:"🇷🇺"},sv:{name:"Svenska",flag:"🇸🇪"},th:{name:"ไทย",flag:"🇹🇭"},uk:{name:"Українська",flag:"🇺🇦"},vi:{name:"Tiếng Việt",flag:"🇻🇳"},zh:{name:"简体中文",flag:"🇨🇳"}},Vd=({variant:e="compact",className:r=""})=>{const{i18n:a,t:n}=bt.useTranslation("languageSelector"),[o,s]=p.useState(a.language),i=p.useMemo(()=>a.options.supportedLngs?a.options.supportedLngs.filter(c=>c!=="cimode").map(c=>({code:c,name:Da[c]?.name||c.toUpperCase(),flag:Da[c]?.flag||"🌐"})).sort((c,g)=>c.name.localeCompare(g.name)):[],[a.options.supportedLngs]),l=i.find(c=>c.code===o||c.code.toLowerCase()===o.toLowerCase());p.useEffect(()=>{s(a.language)},[a.language]);const d=c=>{localStorage.setItem("language",c),a.changeLanguage(c).then(()=>{s(a.language),setTimeout(()=>{window.dispatchEvent(new Event("languagechange"))},100)}).catch(()=>{})};return e==="compact"?t.jsx("div",{className:`relative ${r}`,children:t.jsxs(jr,{value:o,onValueChange:d,children:[t.jsx(er,{className:"h-10 w-auto px-3 border-0 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-0 focus:ring-offset-0",children:t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-lg leading-none",children:l?.flag}),t.jsx("span",{className:"hidden sm:block text-sm font-medium text-gray-700 dark:text-gray-300",children:l?.name})]})}),t.jsx(rr,{children:i.map(c=>t.jsx(tr,{value:c.code,className:"cursor-pointer",children:t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-lg leading-none",children:c.flag}),t.jsx("span",{className:"text-sm",children:c.name})]})},c.code))})]})}):t.jsxs("div",{className:`space-y-2 ${r}`,children:[t.jsxs("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 flex items-center space-x-2",children:[t.jsx(L.LanguageIcon,{className:"h-4 w-4 text-gray-500 dark:text-gray-400"}),t.jsx("span",{children:n("language","Language")})]}),t.jsxs(jr,{value:o,onValueChange:d,children:[t.jsx(er,{children:t.jsx(wa,{placeholder:n("selectLanguage","Select language")})}),t.jsx(rr,{children:i.map(c=>t.jsx(tr,{value:c.code,className:"cursor-pointer",children:t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-lg leading-none",children:c.flag}),t.jsx("span",{children:c.name})]})},c.code))})]}),t.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:n("selectPreferredLanguage","Select your preferred language")})]})},qd=({items:e,type:r="ordered",variant:a="default",className:n,itemClassName:o})=>{const s=()=>{const c="space-y-2",g={ordered:r==="ordered"?"list-decimal":"",unordered:r==="unordered"?"list-disc":""},h={default:"list-inside",enhanced:"list-inside space-y-3",minimal:"list-none space-y-1"};return f(c,g[r],h[a])},i=c=>{const g="text-gray-600 dark:text-gray-400";return a==="enhanced"?f(g,"relative pl-8 pb-2 border-l-2 border-gray-200 dark:border-gray-700",c===e.length-1&&"border-l-transparent"):a==="minimal"?f(g,"flex items-start"):g},l=c=>a==="enhanced"&&r==="ordered"?t.jsx("div",{className:"absolute -left-4 -top-1 w-6 h-6 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-medium",children:c+1}):null,d=(c,g)=>{const h=typeof c=="object",w=h?c.content:c,m=h?c.subItems:void 0;return t.jsxs("li",{className:f(i(g),o),children:[l(g),a==="minimal"&&r==="ordered"&&t.jsx("span",{className:"inline-block w-6 h-6 bg-blue-100 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 rounded-full text-sm font-medium text-center leading-6 mr-3 flex-shrink-0",children:g+1}),a==="minimal"&&r==="unordered"&&t.jsx("span",{className:"inline-block w-2 h-2 bg-blue-600 rounded-full mt-2 mr-3 flex-shrink-0"}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{children:w}),m&&m.length>0&&t.jsx("ul",{className:"mt-2 ml-4 space-y-1 list-disc list-inside text-sm text-gray-500 dark:text-gray-500",children:m.map((b,y)=>t.jsx("li",{children:b},y))})]})]},g)};return t.jsx("ul",{className:f(s(),n),children:e.map(d)})};class $d extends p.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,a){console.error("ErrorBoundary caught an error:",r,a),this.props.onError?.(r,a)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:t.jsxs("div",{style:{padding:"20px",border:"1px solid red",margin:"10px"},children:[t.jsx("h2",{children:"Something went wrong"}),t.jsxs("p",{children:["Error: ",this.state.error?.message||"Unknown error"]}),t.jsx("button",{onClick:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}}class ir extends p.Component{constructor(r){super(r),this.retryTimer=null,this.sendErrorToMonitoring=(a,n)=>{try{typeof window<"u"&&window.Sentry&&window.Sentry?.captureException(a,{contexts:{react:{componentStack:n.componentStack}},tags:{errorBoundary:!0,componentName:this.props.componentName||"unknown",lazyLoading:!0}}),typeof window<"u"&&window.gtag&&window.gtag?.("event","exception",{description:a.message,fatal:!1,custom_map:{component:this.props.componentName||"unknown"}})}catch{}},this.handleRetry=()=>{const{maxRetries:a=3,retryDelay:n=1e3}=this.props,{retryCount:o}=this.state;if(o>=a)return;this.setState({isRetrying:!0}),this.retryTimer&&clearTimeout(this.retryTimer);const s=n*Math.pow(2,o);this.retryTimer=setTimeout(()=>{this.setState({hasError:!1,error:null,errorInfo:null,retryCount:o+1,isRetrying:!1})},s)},this.handleReload=()=>{window.location.reload()},this.state={hasError:!1,error:null,errorInfo:null,retryCount:0,isRetrying:!1,lastErrorTime:0}}static getDerivedStateFromError(r){return{hasError:!0,error:r,lastErrorTime:Date.now()}}componentDidCatch(r,a){const{onError:n,componentName:o}=this.props;this.setState({error:r,errorInfo:a}),console.error(`LazyErrorBoundary caught an error in ${o||"Unknown Component"}:`,r,a),n?.(r,a),this.sendErrorToMonitoring(r,a)}componentWillUnmount(){this.retryTimer&&clearTimeout(this.retryTimer)}render(){const{children:r,fallback:a,componentName:n,showRetryButton:o=!0,maxRetries:s=3}=this.props,{hasError:i,error:l,isRetrying:d,retryCount:c}=this.state;return i&&l?a||t.jsx("div",{className:"lazy-error-boundary error-boundary-container",children:t.jsxs("div",{className:"error-content",children:[t.jsx("div",{className:"error-icon",children:"⚠️"}),t.jsxs("h3",{className:"error-title",children:["Something went wrong loading ",n||"this component"]}),t.jsxs("div",{className:"error-details",children:[t.jsx("p",{className:"error-message",children:l.message}),process.env.NODE_ENV==="development"&&t.jsxs("details",{className:"error-stack",children:[t.jsx("summary",{children:"Error Details (Development)"}),t.jsx("pre",{children:l.stack})]})]}),t.jsxs("div",{className:"error-actions",children:[o&&c<s&&t.jsx("button",{onClick:this.handleRetry,disabled:d,className:"retry-button",children:d?"Retrying...":`Retry (${c}/${s})`}),c>=s&&t.jsx("button",{onClick:this.handleReload,className:"reload-button",children:"Reload Page"})]}),t.jsxs("div",{className:"error-help",children:[t.jsx("p",{children:"This might be a temporary issue. Try refreshing the page."}),navigator.onLine===!1&&t.jsx("p",{className:"offline-notice",children:"You appear to be offline. Check your connection and try again."})]})]})}):r}}function Hd(e,r){const a=n=>t.jsx(ir,{...r,children:t.jsx(e,{...n})});return a.displayName=`withLazyErrorBoundary(${e.displayName||e.name})`,a}class Gd extends ir{static getDerivedStateFromError(r){return r.message.includes("Loading chunk")||r.message.includes("Loading CSS chunk")||r.message.includes("ChunkLoadError")||r.name==="ChunkLoadError"?{hasError:!0,error:new Error("Network error while loading component. Please check your connection and try again."),lastErrorTime:Date.now()}:super.getDerivedStateFromError(r)}}function Yd(){const[e,r]=p.useState(0),a=p.useCallback(()=>{r(n=>n+1)},[]);return{errorRecoveryCount:e,triggerErrorRecovery:a}}function Kd({children:e}){const r=(a,n)=>{console.error("Global lazy loading error:",a,n),typeof window<"u"&&window.Sentry&&window.Sentry?.captureException(a,{level:"error",tags:{globalErrorBoundary:!0,lazyLoading:!0}})};return t.jsx(ir,{onError:r,componentName:"Application",maxRetries:1,showRetryButton:!0,fallback:t.jsxs("div",{className:"global-error-fallback",children:[t.jsx("h1",{children:"Application Error"}),t.jsx("p",{children:"Something went wrong with the application. Please refresh the page."}),t.jsx("button",{onClick:()=>window.location.reload(),children:"Refresh Page"})]}),children:e})}const Zd=({children:e})=>t.jsx(t.Fragment,{children:e}),Xd=({children:e})=>t.jsx(t.Fragment,{children:e}),Qd=(e,r,a)=>{const n=p.memo(e,r);return a&&(n.displayName=`Memo(${a})`),process.env.NODE_ENV==="development"?o=>(p.useMemo(()=>{let i=0;return()=>++i},[])(),t.jsx(n,{...o})):n},Jd=(e,r)=>p.memo(e,(a,n)=>r.every(o=>a[o]===n[o])),Rd=p.memo(({children:e,compute:r,deps:a})=>{const n=p.useRef(a),o=p.useRef(r),s=p.useRef(void 0),i=p.useMemo(()=>{const l=a.length!==n.current.length||a.some((c,g)=>c!==n.current[g]),d=r!==o.current;if(l||d||s.current===void 0){let c;return process.env.NODE_ENV==="development"?(performance.now(),c=r(),performance.now()):c=r(),n.current=a,o.current=r,s.current=c,c}return s.current},[r,a]);return t.jsx(t.Fragment,{children:e(i)})}),e0=p.memo(({item:e,index:r,style:a,renderItem:n})=>t.jsx("div",{style:a,children:n(e,r)}),(e,r)=>e.index===r.index&&e.item===r.item&&e.style.height===r.style.height&&e.style.top===r.style.top),r0=p.memo(({condition:e,children:r,fallback:a=null})=>e?t.jsx(t.Fragment,{children:r}):t.jsx(t.Fragment,{children:a})),t0=({children:e,threshold:r=.1,rootMargin:a="50px",fallback:n=null})=>{const[o,s]=p.useState(!1),i=p.useRef(null);return p.useEffect(()=>{const l=new IntersectionObserver(([d])=>{d.isIntersecting&&(s(!0),l.disconnect())},{threshold:r,rootMargin:a});return i.current&&l.observe(i.current),()=>l.disconnect()},[r,a]),t.jsx("div",{ref:i,children:o?e:n})},a0=({children:e,maxRenderTime:r=16,onSlowRender:a})=>{const n=p.useRef(0);return p.useLayoutEffect(()=>{n.current=performance.now()}),p.useEffect(()=>{const o=performance.now()-n.current;o>r&&a?.(o)}),t.jsx(t.Fragment,{children:e})},n0=({children:e,batchSize:r=5,delay:a=0})=>{const[n,o]=p.useState(r);return p.useEffect(()=>{if(n<e.length){const s=setTimeout(()=>{o(i=>Math.min(i+r,e.length))},a);return()=>clearTimeout(s)}},[n,e.length,r,a]),t.jsx(t.Fragment,{children:e.slice(0,n)})},o0=({src:e,alt:r,placeholder:a,lowQualitySrc:n,aspectRatio:o="16/9",eager:s=!1,className:i="",...l})=>{const[d,c]=p.useState(!1),[g,h]=p.useState(s),[w,m]=p.useState(!1),b=p.useRef(null),y=p.useRef(null);p.useEffect(()=>{if(s){h(!0);return}return y.current=new IntersectionObserver(N=>{N.forEach(S=>{S.isIntersecting&&(h(!0),y.current&&b.current&&y.current.unobserve(b.current))})},{rootMargin:"50px",threshold:.01}),b.current&&y.current.observe(b.current),()=>{y.current&&y.current.disconnect()}},[s]);const v=()=>{c(!0)},T=()=>{m(!0)};return t.jsxs("div",{className:`relative overflow-hidden ${i}`,style:{aspectRatio:o},children:[n&&!d&&t.jsx("img",{src:n,alt:"",className:"absolute inset-0 w-full h-full object-cover blur-sm","aria-hidden":"true"}),!n&&!d&&t.jsx("div",{className:"absolute inset-0 bg-gray-200 dark:bg-gray-700 animate-pulse","aria-hidden":"true"}),g&&!w&&t.jsx("img",{ref:b,src:e,alt:r,onLoad:v,onError:T,className:`absolute inset-0 w-full h-full object-cover transition-opacity duration-500 ${d?"opacity-100":"opacity-0"}`,loading:s?"eager":"lazy",...l}),w&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-100 dark:bg-gray-800",children:t.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400",children:[t.jsx("svg",{className:"mx-auto h-12 w-12 mb-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),t.jsx("p",{className:"text-sm",children:"Failed to load image"})]})})]})},s0=({icon:e,title:r,description:a,benefits:n,metrics:o,color:s="blue",isHighlight:i=!1,learnMoreUrl:l,cta:d,onClick:c,interactive:g=!1,borderColor:h=!1,className:w})=>{const m={blue:"text-blue-600 dark:text-blue-400",green:"text-green-600 dark:text-green-400",purple:"text-purple-600 dark:text-purple-400",orange:"text-orange-600 dark:text-orange-400",pink:"text-pink-600 dark:text-pink-400",gray:"text-gray-600 dark:text-gray-400",red:"text-red-600 dark:text-red-400",indigo:"text-indigo-600 dark:text-indigo-400",cyan:"text-cyan-600 dark:text-cyan-400",emerald:"text-emerald-600 dark:text-emerald-400"},b={green:"border-l-4 border-green-500",blue:"border-l-4 border-blue-500",purple:"border-l-4 border-purple-500",orange:"border-l-4 border-orange-500",red:"border-l-4 border-red-500",indigo:"border-l-4 border-indigo-500",cyan:"border-l-4 border-cyan-500",emerald:"border-l-4 border-emerald-500",pink:"border-l-4 border-pink-500",gray:"border-l-4 border-gray-500"},y={green:"bg-green-100 dark:bg-green-900/20",blue:"bg-blue-100 dark:bg-blue-900/20",purple:"bg-purple-100 dark:bg-purple-900/20",orange:"bg-orange-100 dark:bg-orange-900/20",red:"bg-red-100 dark:bg-red-900/20",indigo:"bg-indigo-100 dark:bg-indigo-900/20",cyan:"bg-cyan-100 dark:bg-cyan-900/20",emerald:"bg-emerald-100 dark:bg-emerald-900/20",pink:"bg-pink-100 dark:bg-pink-900/20",gray:"bg-gray-100 dark:bg-gray-900/20"},v=m[s],T=typeof e=="string",N=()=>t.jsxs(t.Fragment,{children:[T?t.jsx("div",{className:"text-4xl mb-4",children:e}):h?t.jsx("div",{className:f("w-12 h-12","rounded-lg","flex items-center justify-center","mb-4",y[s],v),children:e}):t.jsx("div",{className:f("flex-shrink-0 mb-4",v),children:e}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-3",children:r}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-4 leading-relaxed",children:a}),d&&t.jsx("div",{className:"mt-3 mb-4",children:d}),n&&n.length>0&&t.jsx("ul",{className:"space-y-2 mb-4",children:n.map((C,I)=>t.jsxs("li",{className:"flex items-start",children:[t.jsx("div",{className:f("w-2 h-2 rounded-full mt-2 mr-3 flex-shrink-0",`bg-${s}-500`)}),t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:C})]},I))}),o&&Object.keys(o).length>0&&t.jsx("div",{className:"grid grid-cols-2 gap-4 mt-4",children:Object.entries(o).map(([C,I],E)=>t.jsxs("div",{className:"text-center p-3 bg-gray-50 dark:bg-gray-700/50 rounded-lg",children:[t.jsx("div",{className:f("text-lg font-bold",v),children:I}),t.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:C})]},E))})]})]}),S=f("p-6 rounded-xl shadow-lg hover:shadow-xl transition-all duration-200",h&&b[s],(g||c)&&"cursor-pointer hover:scale-[1.02]",i?"bg-gradient-to-br from-blue-50 to-indigo-50 dark:from-blue-900/20 dark:to-indigo-900/20 border-blue-200 dark:border-blue-800 border":"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 border",w),k=C=>{c&&("key"in C?(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),c()):c())};return l?t.jsx("a",{href:l,className:f(S,"block group"),onClick:c?C=>{C.preventDefault(),k(C)}:void 0,children:t.jsx(N,{})}):c?t.jsx("div",{className:S,onClick:k,onKeyDown:k,role:"button",tabIndex:0,"aria-label":r,children:t.jsx(N,{})}):t.jsx("div",{className:S,children:t.jsx(N,{})})},i0=X.cva("grid gap-8",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"},spacing:{sm:"gap-4",md:"gap-8",lg:"gap-12"}},defaultVariants:{columns:3,spacing:"md"}}),l0=X.cva("group transition-all duration-300",{variants:{variant:{default:"text-center",left:"text-left",hoverable:"text-center hover:transform hover:scale-105 cursor-pointer",card:"bg-white dark:bg-gray-800 rounded-2xl p-8 shadow-lg hover:shadow-xl text-center",minimal:"text-center space-y-4"},animation:{none:"",hover:"hover:transform hover:scale-105",float:"hover:-translate-y-2"}},defaultVariants:{variant:"default",animation:"hover"}}),c0=X.cva("flex items-center justify-center rounded-2xl mb-6 transition-all duration-300",{variants:{size:{sm:"w-16 h-16",md:"w-20 h-20",lg:"w-24 h-24"},style:{gradient:"bg-gradient-to-br from-blue-100 to-blue-200 dark:from-blue-900/30 dark:to-blue-800/30 group-hover:from-blue-200 group-hover:to-blue-300 dark:group-hover:from-blue-800/40 dark:group-hover:to-blue-700/40",solid:"bg-blue-100 dark:bg-blue-900/30 group-hover:bg-blue-200 dark:group-hover:bg-blue-800/40",outline:"border-2 border-blue-200 dark:border-blue-800 group-hover:border-blue-300 dark:group-hover:border-blue-700",colorful:"group-hover:scale-110"},position:{center:"mx-auto",left:"",right:"ml-auto"}},defaultVariants:{size:"md",style:"gradient",position:"center"}}),d0={success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",info:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300"},u0=({className:e,features:r,columns:a=3,spacing:n="md",cardVariant:o="default",cardAnimation:s="hover",iconSize:i="md",iconStyle:l="gradient",iconPosition:d="center",titleClass:c,descriptionClass:g,animate:h=!0,animationDelay:w=0,staggerDelay:m=100,onFeatureClick:b,defaultLinkText:y="Learn more"})=>{const v=(N,S)=>{if(l==="colorful"&&N.gradient)return{background:`linear-gradient(135deg, ${N.gradient.from}, ${N.gradient.to})`};if(l==="colorful"){const k=[{from:"#3B82F6",to:"#1D4ED8"},{from:"#10B981",to:"#059669"},{from:"#8B5CF6",to:"#7C3AED"},{from:"#F59E0B",to:"#D97706"},{from:"#EF4444",to:"#DC2626"},{from:"#06B6D4",to:"#0891B2"}],C=k[S%k.length];return{background:`linear-gradient(135deg, ${C.from}, ${C.to})`}}},T=(N,S)=>{const k=t.jsxs("div",{className:f(l0({variant:o,animation:s})),onClick:()=>b?.(N),role:b?"button":void 0,tabIndex:b?0:void 0,children:[N.badge&&t.jsx("div",{className:"mb-4",children:t.jsx("span",{className:f("inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",d0[N.badge.variant||"default"]),children:N.badge.text})}),t.jsx("div",{className:f(c0({size:i,style:l,position:d})),style:v(N,S),children:t.jsx("div",{className:f("flex items-center justify-center",l==="colorful"?"text-white":"text-blue-600 dark:text-blue-400"),children:N.icon})}),t.jsx("h3",{className:f("text-xl font-bold text-gray-900 dark:text-white mb-4",c),children:N.title}),t.jsx("div",{className:f("text-gray-600 dark:text-gray-300 leading-relaxed",g),children:N.description}),N.link&&t.jsx("div",{className:"mt-6",children:t.jsxs("a",{href:N.link.href,className:"inline-flex items-center text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium transition-colors duration-200",children:[N.link.text||y,t.jsx("svg",{className:"w-4 h-4 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})})]});return t.jsx("div",{children:k},N.id||S)};return t.jsx("div",{className:f(i0({columns:a,spacing:n}),e),children:r.map(T)})},Gr=(e,r,a,n)=>({icon:e,title:r,description:a,...n}),g0=e=>[Gr(t.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})}),e?.passwordlessTitle||"Passwordless Security",e?.passwordlessDescription||"Authenticate using your Web3 wallet - no passwords to remember or lose."),Gr(t.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.40A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})}),e?.encryptionTitle||"End-to-End Encryption",e?.encryptionDescription||"Your emails are encrypted and only you can read them.")],h0=({title:e,description:r,primaryButton:a,secondaryButton:n,gradient:o={from:"blue-600",to:"purple-600"},textColor:s="light",className:i="",size:l="lg"})=>{const c=(()=>{const y=o.via?`${o.from}-${o.via}-${o.to}`:`${o.from}-${o.to}`;return{"blue-600-purple-600":"bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700","orange-900-red-900":"bg-gradient-to-r from-orange-600 to-red-600 dark:from-orange-700 dark:to-red-700","green-600-blue-600":"bg-gradient-to-r from-green-600 to-blue-600 dark:from-green-700 dark:to-blue-700","purple-600-pink-600":"bg-gradient-to-r from-purple-600 to-pink-600 dark:from-purple-700 dark:to-pink-700"}[y]||"bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700"})(),g=s==="light"?"text-white":"text-gray-900 dark:text-gray-100",h={sm:"py-12",md:"py-16",lg:"py-20"},w={sm:"text-2xl md:text-3xl",md:"text-3xl md:text-4xl",lg:"text-4xl md:text-5xl"},m={sm:"text-base md:text-lg",md:"text-lg md:text-xl",lg:"text-xl md:text-2xl"},b=(y,v=!1)=>{const T=()=>y.variant==="primary"||v?"gradient":(y.variant==="secondary","outline"),N=t.jsx(se,{variant:T(),size:"lg",className:v?"":"bg-white/10 hover:bg-white/20 backdrop-blur-sm border-white/30",children:y.label});return y.external?t.jsx("a",{href:y.href,target:"_blank",rel:"noopener noreferrer",children:N}):t.jsx(br.Link,{to:y.href,children:N})};return t.jsxs("section",{className:`${c} ${h[l]} relative overflow-hidden ${i}`,children:[t.jsx("div",{className:"absolute inset-0 bg-black/20"}),t.jsxs("div",{className:"absolute top-0 left-1/2 transform -translate-x-1/2 w-full h-full",children:[t.jsx("div",{className:"absolute top-10 left-10 w-72 h-72 bg-white/10 rounded-full blur-3xl"}),t.jsx("div",{className:"absolute bottom-10 right-10 w-72 h-72 bg-white/10 rounded-full blur-3xl"})]}),t.jsxs("div",{className:"relative z-10 max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[t.jsx("h2",{className:`${w[l]} font-bold ${g} mb-6`,children:e}),t.jsx("p",{className:`${m[l]} ${g}/90 mb-8 max-w-2xl mx-auto`,children:r}),t.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[b(a,!0),n&&b(n,!1)]})]})]})},f0={pending:{label:"Pending",color:"bg-gray-500",textColor:"text-white"},in_progress:{label:"In Progress",color:"bg-blue-500",textColor:"text-white"},verified:{label:"Verified",color:"bg-green-500",textColor:"text-white"},rejected:{label:"Rejected",color:"bg-red-500",textColor:"text-white"}},b0={basic:"Basic KYC",enhanced:"Enhanced KYC",accredited:"Accredited Investor"},m0=({status:e,level:r,className:a=""})=>{const n=f0[e],o=b0[r];return t.jsx("div",{className:`inline-flex items-center gap-2 ${a}`,children:t.jsxs("span",{className:`px-3 py-1 rounded-full text-sm font-medium ${n.color} ${n.textColor}`,children:[o,": ",n.label]})})},y0=({accessToken:e,onComplete:r,onError:a,className:n=""})=>{const o=p.useRef(null),s=p.useRef(null);return p.useEffect(()=>{if(!e)return;const i=document.createElement("script");return i.src="https://static.sumsub.com/idensic/static/sns-websdk-builder.js",i.async=!0,i.onload=()=>{if(o.current&&window.snsWebSdk)try{const l=window.snsWebSdk.init(e,()=>e).withConf({lang:"en"}).withOptions({addViewportTag:!1,adaptIframeHeight:!0}).on("idCheck.onStepCompleted",d=>{}).on("idCheck.onApplicantSubmitted",d=>{r?.()}).on("idCheck.onError",d=>{console.error("SumsubWebSDK: Error",d),a?.(d)}).build();s.current=l,l.launch("#sumsub-websdk-container")}catch(l){console.error("Failed to initialize Sumsub SDK:",l),a?.(l)}else console.error("SumsubWebSDK: Missing requirements - containerRef:",!!o.current,"snsWebSdk:",!!window.snsWebSdk)},i.onerror=()=>{const l=new Error("Failed to load Sumsub Web SDK script");console.error(l),a?.(l)},document.body.appendChild(i),()=>{document.body.contains(i)&&document.body.removeChild(i),s.current&&typeof s.current.destroy=="function"&&s.current.destroy()}},[e,r,a]),t.jsx("div",{className:`sumsub-sdk-container ${n}`,children:t.jsx("div",{ref:o,id:"sumsub-websdk-container"})})},p0={basic:{title:"Basic KYC",description:"Age & Identity Verification",color:"border-blue-200",activeColor:"border-blue-500 bg-blue-50"},enhanced:{title:"Enhanced KYC",description:"Basic + Country & Compliance",color:"border-purple-200",activeColor:"border-purple-500 bg-purple-50"},accredited:{title:"Accredited Investor",description:"Enhanced + Financial Verification",color:"border-gold-200",activeColor:"border-gold-500 bg-gold-50"}},v0=({level:e,price:r,features:a,isActive:n=!1,isVerified:o=!1,onSelect:s,className:i=""})=>{const l=p0[e];return t.jsxs("div",{className:`
|
|
49
|
+
`+e)}`,messages:(e,r)=>`sms:?&body=${encodeURIComponent(r+" "+e)}`},Ud=({shareConfig:e})=>{const[r,a]=v.useState(!1),[n,o]=v.useState(""),[s,i]=v.useState(!1),[l,d]=v.useState(!1),[c,g]=v.useState(!1);v.useEffect(()=>{const N=e.onBeforeShare;N&&!n&&(async()=>{i(!0);try{const k=typeof window<"u"?window.location.href:"",S=await N(k);o(S)}catch{const k=typeof window<"u"?window.location.href:"";o(k)}finally{i(!1)}})()},[e,n]);const h=n||(typeof window<"u"?window.location.href:""),w=typeof navigator<"u"&&navigator.share!==void 0,m=async()=>{if(!(!w||c)){g(!0);try{await navigator.share({title:e.title,text:e.description,url:h}),a(!1)}catch(N){N instanceof Error&&N.name!=="AbortError"&&(console.error("Share failed:",N),N.name!=="InvalidStateError"&&a(!0))}finally{g(!1)}}},b=async()=>{try{await navigator.clipboard.writeText(h),d(!0),setTimeout(()=>{d(!1),a(!1)},1500)}catch{}},y=()=>{a(!r)},p=N=>{window.open(N,"_blank","noopener,noreferrer,width=600,height=400"),a(!1)},T=[{name:"Twitter",url:de.twitter(h,e.title,e.hashtags),color:"text-blue-400",svg:t.jsx("path",{d:"M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84"})},{name:"Facebook",url:de.facebook(h),color:"text-blue-600",svg:t.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})},{name:"LinkedIn",url:de.linkedin(h,e.title,e.description),color:"text-blue-700",svg:t.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})},{name:"Reddit",url:de.reddit(h,e.title),color:"text-orange-600",svg:t.jsx("path",{d:"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"})},{name:"Telegram",url:de.telegram(h,e.title),color:"text-blue-500",svg:t.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})},{name:"WhatsApp",url:de.whatsapp(h,e.title),color:"text-green-600",svg:t.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"})},{name:"Discord",url:de.discord(h,e.title),color:"text-indigo-500",svg:t.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})},{name:"Messages",url:de.messages(h,e.title),color:"text-green-500",svg:t.jsx("path",{d:"M.05 3.555A3 3 0 013 0h18a3 3 0 012.95 3.555L22 11v8a3 3 0 01-3 3H5a3 3 0 01-3-3v-8l-1.95-7.445zM2 10.938V19a1 1 0 001 1h18a1 1 0 001-1v-8.062L20 19H4l-2-8.062zM3.38 2L5 8h14l1.62-6H3.38z"})},{name:"Email",url:de.email(h,e.title,e.description),color:"text-gray-600",svg:t.jsx("path",{d:"M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z"})}];return t.jsxs("div",{className:"relative",children:[t.jsx("button",{onClick:y,disabled:s||c,className:"flex items-center justify-center w-8 h-8 bg-blue-50 hover:bg-blue-100 dark:bg-blue-900/30 dark:hover:bg-blue-900/50 text-blue-600 dark:text-blue-400 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Share this page",children:s||c?t.jsx("div",{className:"w-4 h-4 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"}):t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z"})})}),r&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"fixed inset-0 z-[999998]",onClick:()=>a(!1)}),t.jsxs("div",{className:"absolute right-0 top-10 z-[999999] w-40 bg-white dark:bg-gray-800 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 py-1",children:[T.map(N=>t.jsxs("button",{onClick:()=>p(N.url),className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors",children:[t.jsx("svg",{className:`w-4 h-4 mr-2 ${N.color}`,fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:N.svg}),t.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:N.name})]},N.name)),t.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),w&&t.jsxs("button",{onClick:()=>{a(!1),m()},disabled:c,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors disabled:opacity-50",children:[t.jsx("svg",{className:"w-4 h-4 mr-2 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z"})}),t.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"More..."})]}),t.jsxs("button",{onClick:b,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer transition-colors",children:[t.jsx("svg",{className:"w-4 h-4 mr-2 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})}),t.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:l?"Copied!":"Copy Link"})]})]})]})]})},Oa=({items:e,shareConfig:r,className:a,showHome:n})=>t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("nav",{"aria-label":"Breadcrumb",children:t.jsx("ol",{className:"flex items-center text-sm space-x-2",children:e.map((o,s)=>t.jsxs(v.Fragment,{children:[t.jsx("li",{children:o.current?t.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:o.label}):t.jsx(mr.Link,{to:o.href||"#",className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 transition-colors",children:o.label})}),s<e.length-1&&t.jsx("li",{children:t.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"/"})})]},s))})}),r&&t.jsx(Ud,{shareConfig:r})]}),Ua={standard:"max-w-7xl mx-auto px-4",wide:"max-w-[1920px] mx-auto px-4",full:"w-full px-4"},Da={standard:"max-w-7xl mx-auto",wide:"max-w-[1920px] mx-auto",full:"w-full"},ja="px-4",Yr=v.createContext(void 0),Dd=({mode:e="standard",children:r})=>{const a={mode:e,containerClass:Ua[e],maxWidthClass:Da[e],paddingClass:ja};return t.jsx(Yr.Provider,{value:a,children:r})},he=()=>{const e=v.useContext(Yr);return e||{mode:"standard",containerClass:Ua.standard,maxWidthClass:Da.standard,paddingClass:ja}},jd=({items:e,shareConfig:r})=>{const{containerClass:a}=he();return t.jsx("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 relative z-50",children:t.jsx("div",{className:`${a} py-3 relative`,children:t.jsx(Oa,{items:e,shareConfig:r})})})},_a=e=>{const[r,a]=v.useState(""),[n,o]=v.useState(!0),[s,i]=v.useState(null);return v.useEffect(()=>{e&&(async()=>{try{o(!0),i(null);const d=await fetch(`/code/${e}`);if(!d.ok)throw new Error(`Failed to load code file: ${e}`);const c=await d.text();a(c)}catch(d){i(d instanceof Error?d.message:"Unknown error"),a("// Error loading code file")}finally{o(!1)}})()},[e]),{code:r,loading:n,error:s}},_d=({filename:e,code:r,language:a,title:n,className:o="",showCopy:s=!0,showHeader:i=!0})=>{const{t:l}=bt.useTranslation("codeBlock"),{code:d,loading:c,error:g}=_a(e||""),[h,w]=v.useState(!1),m=r||d,y=a||(e?(T=>{switch(T.split(".").pop()?.toLowerCase()){case"sol":return"solidity";case"js":case"mjs":return"javascript";case"ts":return"typescript";case"sh":return"bash";case"graphql":return"graphql";case"json":return"json";case"css":return"css";case"html":return"html";case"jsx":return"jsx";case"tsx":return"tsx";case"py":return"python";case"java":return"java";case"cpp":case"c":return"cpp";case"go":return"go";case"rs":return"rust";case"php":return"php";case"rb":return"ruby";default:return"text"}})(e):"text"),p=async()=>{if(m)try{await navigator.clipboard.writeText(m),w(!0),setTimeout(()=>w(!1),2e3)}catch{}};return e&&c?t.jsx("div",{className:`bg-gray-900 text-green-400 rounded-lg p-4 font-mono text-sm ${o}`,children:t.jsx("div",{className:"animate-pulse text-gray-500",children:l("loadingCode","Loading code...")})}):e&&g?t.jsxs("div",{className:`bg-gray-900 text-red-400 rounded-lg p-4 font-mono text-sm ${o}`,children:[l("error","Error"),": ",g]}):m?t.jsxs("div",{className:`bg-gray-900 rounded-lg border border-green-500/20 shadow-lg shadow-green-500/10 ${o}`,children:[i&&t.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-green-500/20 bg-gray-800/50",children:[t.jsx("span",{className:"text-sm text-green-400 font-mono",children:n||e||`${y} code`}),s&&t.jsx("button",{onClick:p,className:"p-2 text-gray-400 hover:text-green-400 hover:bg-gray-800 rounded-lg transition-all duration-200 group",title:l("copyCode","Copy code"),children:h?t.jsx(L.CheckIcon,{className:"h-4 w-4 text-green-400"}):t.jsx(L.ClipboardDocumentIcon,{className:"h-4 w-4 group-hover:scale-110 transition-transform"})})]}),t.jsx("div",{className:"p-4 overflow-x-auto text-left",children:t.jsx("pre",{className:`text-sm language-${y}`,children:t.jsx("code",{className:"text-gray-100",children:m})})})]}):t.jsx("div",{className:`bg-gray-900 text-gray-400 rounded-lg p-4 font-mono text-sm ${o}`,children:l("noCode","No code to display")})},zd=({subsections:e,isExpanded:r,selectedSubsection:a,parentSectionId:n,onSubsectionSelect:o})=>{const s=v.useRef(null),[i,l]=v.useState(void 0);return v.useLayoutEffect(()=>{if(s.current){const d=s.current.scrollHeight;l(r?d+16:0)}},[r,e]),t.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:i!==void 0?`${i}px`:"auto"},children:t.jsx("div",{ref:s,className:"ml-6 mt-1 mb-1 space-y-1",children:e.map(d=>t.jsxs("div",{className:"relative group",children:[a===d.id&&t.jsx("div",{className:"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none"}),a!==d.id&&t.jsx("div",{className:"absolute top-0.5 bottom-0.5 left-1 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200"}),t.jsx("button",{onClick:()=>o?.(d.id,n),className:`relative z-10 block w-full text-left pl-4 pr-3 py-2 rounded-md text-sm transition-all duration-200 ${a===d.id?"text-blue-700 dark:text-blue-300":"text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200"}`,children:d.title})]},d.id))})})},Bd=({id:e,title:r,content:a,subsections:n,isSelected:o=!1,selectedSubsection:s=null,onSectionSelect:i,onSubsectionSelect:l,className:d=""})=>{const[c,g]=v.useState(!1),h=()=>{g(!c)},w=()=>{i?.(e)},m=n&&n.length>0;return t.jsxs("div",{className:d,children:[t.jsxs("div",{className:"relative flex items-center group",children:[o&&!s&&t.jsx("div",{className:"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/20 dark:bg-blue-400/20 rounded-lg pointer-events-none"}),!(o&&!s)&&t.jsx("div",{className:"absolute top-2 bottom-2 left-2 right-12 bg-blue-500/0 group-hover:bg-blue-500/10 dark:group-hover:bg-blue-400/10 rounded-lg pointer-events-none transition-colors duration-200"}),t.jsx("button",{onClick:w,className:`relative z-10 flex-1 text-left pl-5 pr-3 py-4 text-base font-medium transition-all duration-200 ${o&&!s?"text-blue-700 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100"}`,children:r}),m&&t.jsx("button",{onClick:h,className:"p-2 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200","aria-label":c?"Collapse section":"Expand section",children:t.jsx(L.ChevronRightIcon,{className:`h-5 w-5 text-gray-500 transition-transform duration-300 ease-in-out ${c?"rotate-90":"rotate-0"}`})})]}),m&&t.jsx(zd,{subsections:n,isExpanded:c,selectedSubsection:s,parentSectionId:e,onSubsectionSelect:l})]})},Wd=({title:e,subtitle:r,buttonText:a,buttonIcon:n="envelope",variant:o="default",badgeText:s="FREE",prominentBadgeText:i="100% Free",onButtonClick:l,className:d=""})=>{const c=()=>n==="envelope"||n==="both"?t.jsx(L.EnvelopeIcon,{className:o==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1"}):n==="none"?null:t.jsx("svg",{className:o==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207"})}),g=()=>n==="arrow"||n==="both"?t.jsx(L.ArrowRightIcon,{className:"h-4 w-4 ml-2"}):null,h=()=>o==="prominent"?"border-b-2 border-green-200 dark:border-green-700":"border-b border-green-200 dark:border-green-700",w=()=>{const p="bg-gradient-to-r from-green-600 to-blue-600 hover:from-green-700 hover:to-blue-700 text-white rounded-lg font-bold transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-green-500/25 inline-flex items-center whitespace-nowrap cursor-pointer";return o==="prominent"?`${p} px-8 py-3 text-base`:`${p} px-6 py-2 text-sm`},m=()=>o==="prominent"?"text-green-800 dark:text-green-200 font-semibold text-lg":"text-green-800 dark:text-green-200 font-semibold",b=o==="prominent"?i:s,{containerClass:y}=he();return t.jsx("div",{className:`bg-gradient-to-r from-green-100 to-blue-100 dark:from-green-900/20 dark:to-blue-900/20 ${h()} ${d}`,children:t.jsx("div",{className:`${y} py-4`,children:t.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4",children:[t.jsxs("div",{className:`flex items-center ${o==="prominent"?"text-center sm:text-left":""}`,children:[t.jsx("div",{className:"bg-green-500 text-white text-xs font-bold px-3 py-1 rounded-full mr-3 animate-pulse",children:b}),t.jsxs("div",{children:[t.jsx("span",{className:m(),children:e}),r&&t.jsx("span",{className:"text-green-700 dark:text-green-300 text-sm block",children:r})]})]}),t.jsxs("button",{onClick:l,className:w(),children:[c(),a,g()]})]})})})},Fd=({children:e,onClick:r,variant:a,size:n,disabled:o,className:s,type:i,trackingLabel:l,actionType:d,componentName:c,onTrack:g,trackingParams:h={},...w})=>{const m=b=>{if(g){const y=l||(typeof e=="string"?e:"")||"Unknown Button",T=a&&["default","primary","secondary","outline","ghost","destructive","link"].includes(a)?a:"default";g({button_text:y,button_type:T,component_name:c,action_type:d,...h})}r&&r(b)};return t.jsx(se,{...w,variant:a,size:n,disabled:o,className:s,type:i,onClick:m,children:e})},Vd=({children:e,onClick:r,to:a,href:n,trackingLabel:o,componentName:s,onTrack:i,trackingParams:l={},LinkComponent:d,linkProps:c={},...g})=>{const h=m=>{if(i){const b=o||(typeof e=="string"?e:"")||"Unknown Link",y=a?typeof a=="string"?a:a.pathname||"":n||"";i({link_text:b,link_url:y,to_page:y,navigation_type:d?"router_link":"anchor_link",component_name:s,...l})}r&&r(m)};if(d&&a!==void 0)return t.jsx(d,{...c,to:a,onClick:h,...g,children:e});const w=a?typeof a=="string"?a:a.pathname||"#":n;return t.jsx("a",{...g,href:w,onClick:h,children:e})},za={en:{name:"English",flag:"🇺🇸"},ar:{name:"العربية",flag:"🇸🇦"},de:{name:"Deutsch",flag:"🇩🇪"},es:{name:"Español",flag:"🇪🇸"},fr:{name:"Français",flag:"🇫🇷"},it:{name:"Italiano",flag:"🇮🇹"},ja:{name:"日本語",flag:"🇯🇵"},ko:{name:"한국어",flag:"🇰🇷"},pt:{name:"Português",flag:"🇵🇹"},ru:{name:"Русский",flag:"🇷🇺"},sv:{name:"Svenska",flag:"🇸🇪"},th:{name:"ไทย",flag:"🇹🇭"},uk:{name:"Українська",flag:"🇺🇦"},vi:{name:"Tiếng Việt",flag:"🇻🇳"},zh:{name:"简体中文",flag:"🇨🇳"}},$d=({variant:e="compact",className:r=""})=>{const{i18n:a,t:n}=bt.useTranslation("languageSelector"),[o,s]=v.useState(a.language),i=v.useMemo(()=>a.options.supportedLngs?a.options.supportedLngs.filter(c=>c!=="cimode").map(c=>({code:c,name:za[c]?.name||c.toUpperCase(),flag:za[c]?.flag||"🌐"})).sort((c,g)=>c.name.localeCompare(g.name)):[],[a.options.supportedLngs]),l=i.find(c=>c.code===o||c.code.toLowerCase()===o.toLowerCase());v.useEffect(()=>{s(a.language)},[a.language]);const d=c=>{localStorage.setItem("language",c),a.changeLanguage(c).then(()=>{s(a.language),setTimeout(()=>{window.dispatchEvent(new Event("languagechange"))},100)}).catch(()=>{})};return e==="compact"?t.jsx("div",{className:`relative ${r}`,children:t.jsxs(_r,{value:o,onValueChange:d,children:[t.jsx(tr,{className:"h-10 w-auto px-3 border-0 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-0 focus:ring-offset-0",children:t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-lg leading-none",children:l?.flag}),t.jsx("span",{className:"hidden sm:block text-sm font-medium text-gray-700 dark:text-gray-300",children:l?.name})]})}),t.jsx(ar,{children:i.map(c=>t.jsx(nr,{value:c.code,className:"cursor-pointer",children:t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-lg leading-none",children:c.flag}),t.jsx("span",{className:"text-sm",children:c.name})]})},c.code))})]})}):t.jsxs("div",{className:`space-y-2 ${r}`,children:[t.jsxs("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 flex items-center space-x-2",children:[t.jsx(L.LanguageIcon,{className:"h-4 w-4 text-gray-500 dark:text-gray-400"}),t.jsx("span",{children:n("language","Language")})]}),t.jsxs(_r,{value:o,onValueChange:d,children:[t.jsx(tr,{children:t.jsx(wa,{placeholder:n("selectLanguage","Select language")})}),t.jsx(ar,{children:i.map(c=>t.jsx(nr,{value:c.code,className:"cursor-pointer",children:t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-lg leading-none",children:c.flag}),t.jsx("span",{children:c.name})]})},c.code))})]}),t.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:n("selectPreferredLanguage","Select your preferred language")})]})},qd=({items:e,type:r="ordered",variant:a="default",className:n,itemClassName:o})=>{const s=()=>{const c="space-y-2",g={ordered:r==="ordered"?"list-decimal":"",unordered:r==="unordered"?"list-disc":""},h={default:"list-inside",enhanced:"list-inside space-y-3",minimal:"list-none space-y-1"};return f(c,g[r],h[a])},i=c=>{const g="text-gray-600 dark:text-gray-400";return a==="enhanced"?f(g,"relative pl-8 pb-2 border-l-2 border-gray-200 dark:border-gray-700",c===e.length-1&&"border-l-transparent"):a==="minimal"?f(g,"flex items-start"):g},l=c=>a==="enhanced"&&r==="ordered"?t.jsx("div",{className:"absolute -left-4 -top-1 w-6 h-6 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-medium",children:c+1}):null,d=(c,g)=>{const h=typeof c=="object",w=h?c.content:c,m=h?c.subItems:void 0;return t.jsxs("li",{className:f(i(g),o),children:[l(g),a==="minimal"&&r==="ordered"&&t.jsx("span",{className:"inline-block w-6 h-6 bg-blue-100 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 rounded-full text-sm font-medium text-center leading-6 mr-3 flex-shrink-0",children:g+1}),a==="minimal"&&r==="unordered"&&t.jsx("span",{className:"inline-block w-2 h-2 bg-blue-600 rounded-full mt-2 mr-3 flex-shrink-0"}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{children:w}),m&&m.length>0&&t.jsx("ul",{className:"mt-2 ml-4 space-y-1 list-disc list-inside text-sm text-gray-500 dark:text-gray-500",children:m.map((b,y)=>t.jsx("li",{children:b},y))})]})]},g)};return t.jsx("ul",{className:f(s(),n),children:e.map(d)})};class Hd extends v.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,a){console.error("ErrorBoundary caught an error:",r,a),this.props.onError?.(r,a)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:t.jsxs("div",{style:{padding:"20px",border:"1px solid red",margin:"10px"},children:[t.jsx("h2",{children:"Something went wrong"}),t.jsxs("p",{children:["Error: ",this.state.error?.message||"Unknown error"]}),t.jsx("button",{onClick:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}}class cr extends v.Component{constructor(r){super(r),this.retryTimer=null,this.sendErrorToMonitoring=(a,n)=>{try{typeof window<"u"&&window.Sentry&&window.Sentry?.captureException(a,{contexts:{react:{componentStack:n.componentStack}},tags:{errorBoundary:!0,componentName:this.props.componentName||"unknown",lazyLoading:!0}}),typeof window<"u"&&window.gtag&&window.gtag?.("event","exception",{description:a.message,fatal:!1,custom_map:{component:this.props.componentName||"unknown"}})}catch{}},this.handleRetry=()=>{const{maxRetries:a=3,retryDelay:n=1e3}=this.props,{retryCount:o}=this.state;if(o>=a)return;this.setState({isRetrying:!0}),this.retryTimer&&clearTimeout(this.retryTimer);const s=n*Math.pow(2,o);this.retryTimer=setTimeout(()=>{this.setState({hasError:!1,error:null,errorInfo:null,retryCount:o+1,isRetrying:!1})},s)},this.handleReload=()=>{window.location.reload()},this.state={hasError:!1,error:null,errorInfo:null,retryCount:0,isRetrying:!1,lastErrorTime:0}}static getDerivedStateFromError(r){return{hasError:!0,error:r,lastErrorTime:Date.now()}}componentDidCatch(r,a){const{onError:n,componentName:o}=this.props;this.setState({error:r,errorInfo:a}),console.error(`LazyErrorBoundary caught an error in ${o||"Unknown Component"}:`,r,a),n?.(r,a),this.sendErrorToMonitoring(r,a)}componentWillUnmount(){this.retryTimer&&clearTimeout(this.retryTimer)}render(){const{children:r,fallback:a,componentName:n,showRetryButton:o=!0,maxRetries:s=3}=this.props,{hasError:i,error:l,isRetrying:d,retryCount:c}=this.state;return i&&l?a||t.jsx("div",{className:"lazy-error-boundary error-boundary-container",children:t.jsxs("div",{className:"error-content",children:[t.jsx("div",{className:"error-icon",children:"⚠️"}),t.jsxs("h3",{className:"error-title",children:["Something went wrong loading ",n||"this component"]}),t.jsxs("div",{className:"error-details",children:[t.jsx("p",{className:"error-message",children:l.message}),process.env.NODE_ENV==="development"&&t.jsxs("details",{className:"error-stack",children:[t.jsx("summary",{children:"Error Details (Development)"}),t.jsx("pre",{children:l.stack})]})]}),t.jsxs("div",{className:"error-actions",children:[o&&c<s&&t.jsx("button",{onClick:this.handleRetry,disabled:d,className:"retry-button",children:d?"Retrying...":`Retry (${c}/${s})`}),c>=s&&t.jsx("button",{onClick:this.handleReload,className:"reload-button",children:"Reload Page"})]}),t.jsxs("div",{className:"error-help",children:[t.jsx("p",{children:"This might be a temporary issue. Try refreshing the page."}),navigator.onLine===!1&&t.jsx("p",{className:"offline-notice",children:"You appear to be offline. Check your connection and try again."})]})]})}):r}}function Gd(e,r){const a=n=>t.jsx(cr,{...r,children:t.jsx(e,{...n})});return a.displayName=`withLazyErrorBoundary(${e.displayName||e.name})`,a}class Yd extends cr{static getDerivedStateFromError(r){return r.message.includes("Loading chunk")||r.message.includes("Loading CSS chunk")||r.message.includes("ChunkLoadError")||r.name==="ChunkLoadError"?{hasError:!0,error:new Error("Network error while loading component. Please check your connection and try again."),lastErrorTime:Date.now()}:super.getDerivedStateFromError(r)}}function Kd(){const[e,r]=v.useState(0),a=v.useCallback(()=>{r(n=>n+1)},[]);return{errorRecoveryCount:e,triggerErrorRecovery:a}}function Zd({children:e}){const r=(a,n)=>{console.error("Global lazy loading error:",a,n),typeof window<"u"&&window.Sentry&&window.Sentry?.captureException(a,{level:"error",tags:{globalErrorBoundary:!0,lazyLoading:!0}})};return t.jsx(cr,{onError:r,componentName:"Application",maxRetries:1,showRetryButton:!0,fallback:t.jsxs("div",{className:"global-error-fallback",children:[t.jsx("h1",{children:"Application Error"}),t.jsx("p",{children:"Something went wrong with the application. Please refresh the page."}),t.jsx("button",{onClick:()=>window.location.reload(),children:"Refresh Page"})]}),children:e})}const Xd=({children:e})=>t.jsx(t.Fragment,{children:e}),Qd=({children:e})=>t.jsx(t.Fragment,{children:e}),Jd=(e,r,a)=>{const n=v.memo(e,r);return a&&(n.displayName=`Memo(${a})`),process.env.NODE_ENV==="development"?o=>(v.useMemo(()=>{let i=0;return()=>++i},[])(),t.jsx(n,{...o})):n},Rd=(e,r)=>v.memo(e,(a,n)=>r.every(o=>a[o]===n[o])),e0=v.memo(({children:e,compute:r,deps:a})=>{const n=v.useRef(a),o=v.useRef(r),s=v.useRef(void 0),i=v.useMemo(()=>{const l=a.length!==n.current.length||a.some((c,g)=>c!==n.current[g]),d=r!==o.current;if(l||d||s.current===void 0){let c;return process.env.NODE_ENV==="development"?(performance.now(),c=r(),performance.now()):c=r(),n.current=a,o.current=r,s.current=c,c}return s.current},[r,a]);return t.jsx(t.Fragment,{children:e(i)})}),r0=v.memo(({item:e,index:r,style:a,renderItem:n})=>t.jsx("div",{style:a,children:n(e,r)}),(e,r)=>e.index===r.index&&e.item===r.item&&e.style.height===r.style.height&&e.style.top===r.style.top),t0=v.memo(({condition:e,children:r,fallback:a=null})=>e?t.jsx(t.Fragment,{children:r}):t.jsx(t.Fragment,{children:a})),a0=({children:e,threshold:r=.1,rootMargin:a="50px",fallback:n=null})=>{const[o,s]=v.useState(!1),i=v.useRef(null);return v.useEffect(()=>{const l=new IntersectionObserver(([d])=>{d.isIntersecting&&(s(!0),l.disconnect())},{threshold:r,rootMargin:a});return i.current&&l.observe(i.current),()=>l.disconnect()},[r,a]),t.jsx("div",{ref:i,children:o?e:n})},n0=({children:e,maxRenderTime:r=16,onSlowRender:a})=>{const n=v.useRef(0);return v.useLayoutEffect(()=>{n.current=performance.now()}),v.useEffect(()=>{const o=performance.now()-n.current;o>r&&a?.(o)}),t.jsx(t.Fragment,{children:e})},o0=({children:e,batchSize:r=5,delay:a=0})=>{const[n,o]=v.useState(r);return v.useEffect(()=>{if(n<e.length){const s=setTimeout(()=>{o(i=>Math.min(i+r,e.length))},a);return()=>clearTimeout(s)}},[n,e.length,r,a]),t.jsx(t.Fragment,{children:e.slice(0,n)})},s0=({src:e,alt:r,placeholder:a,lowQualitySrc:n,aspectRatio:o="16/9",eager:s=!1,className:i="",...l})=>{const[d,c]=v.useState(!1),[g,h]=v.useState(s),[w,m]=v.useState(!1),b=v.useRef(null),y=v.useRef(null);v.useEffect(()=>{if(s){h(!0);return}return y.current=new IntersectionObserver(N=>{N.forEach(C=>{C.isIntersecting&&(h(!0),y.current&&b.current&&y.current.unobserve(b.current))})},{rootMargin:"50px",threshold:.01}),b.current&&y.current.observe(b.current),()=>{y.current&&y.current.disconnect()}},[s]);const p=()=>{c(!0)},T=()=>{m(!0)};return t.jsxs("div",{className:`relative overflow-hidden ${i}`,style:{aspectRatio:o},children:[n&&!d&&t.jsx("img",{src:n,alt:"",className:"absolute inset-0 w-full h-full object-cover blur-sm","aria-hidden":"true"}),!n&&!d&&t.jsx("div",{className:"absolute inset-0 bg-gray-200 dark:bg-gray-700 animate-pulse","aria-hidden":"true"}),g&&!w&&t.jsx("img",{ref:b,src:e,alt:r,onLoad:p,onError:T,className:`absolute inset-0 w-full h-full object-cover transition-opacity duration-500 ${d?"opacity-100":"opacity-0"}`,loading:s?"eager":"lazy",...l}),w&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-100 dark:bg-gray-800",children:t.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400",children:[t.jsx("svg",{className:"mx-auto h-12 w-12 mb-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),t.jsx("p",{className:"text-sm",children:"Failed to load image"})]})})]})},i0=({icon:e,title:r,description:a,benefits:n,metrics:o,color:s="blue",isHighlight:i=!1,learnMoreUrl:l,cta:d,onClick:c,interactive:g=!1,borderColor:h=!1,className:w})=>{const m={blue:"text-blue-600 dark:text-blue-400",green:"text-green-600 dark:text-green-400",purple:"text-purple-600 dark:text-purple-400",orange:"text-orange-600 dark:text-orange-400",pink:"text-pink-600 dark:text-pink-400",gray:"text-gray-600 dark:text-gray-400",red:"text-red-600 dark:text-red-400",indigo:"text-indigo-600 dark:text-indigo-400",cyan:"text-cyan-600 dark:text-cyan-400",emerald:"text-emerald-600 dark:text-emerald-400"},b={green:"border-l-4 border-green-500",blue:"border-l-4 border-blue-500",purple:"border-l-4 border-purple-500",orange:"border-l-4 border-orange-500",red:"border-l-4 border-red-500",indigo:"border-l-4 border-indigo-500",cyan:"border-l-4 border-cyan-500",emerald:"border-l-4 border-emerald-500",pink:"border-l-4 border-pink-500",gray:"border-l-4 border-gray-500"},y={green:"bg-green-100 dark:bg-green-900/20",blue:"bg-blue-100 dark:bg-blue-900/20",purple:"bg-purple-100 dark:bg-purple-900/20",orange:"bg-orange-100 dark:bg-orange-900/20",red:"bg-red-100 dark:bg-red-900/20",indigo:"bg-indigo-100 dark:bg-indigo-900/20",cyan:"bg-cyan-100 dark:bg-cyan-900/20",emerald:"bg-emerald-100 dark:bg-emerald-900/20",pink:"bg-pink-100 dark:bg-pink-900/20",gray:"bg-gray-100 dark:bg-gray-900/20"},p=m[s],T=typeof e=="string",N=()=>t.jsxs(t.Fragment,{children:[T?t.jsx("div",{className:"text-4xl mb-4",children:e}):h?t.jsx("div",{className:f("w-12 h-12","rounded-lg","flex items-center justify-center","mb-4",y[s],p),children:e}):t.jsx("div",{className:f("flex-shrink-0 mb-4",p),children:e}),t.jsxs("div",{className:"flex-1",children:[t.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-3",children:r}),t.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-4 leading-relaxed",children:a}),d&&t.jsx("div",{className:"mt-3 mb-4",children:d}),n&&n.length>0&&t.jsx("ul",{className:"space-y-2 mb-4",children:n.map((S,I)=>t.jsxs("li",{className:"flex items-start",children:[t.jsx("div",{className:f("w-2 h-2 rounded-full mt-2 mr-3 flex-shrink-0",`bg-${s}-500`)}),t.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:S})]},I))}),o&&Object.keys(o).length>0&&t.jsx("div",{className:"grid grid-cols-2 gap-4 mt-4",children:Object.entries(o).map(([S,I],E)=>t.jsxs("div",{className:"text-center p-3 bg-gray-50 dark:bg-gray-700/50 rounded-lg",children:[t.jsx("div",{className:f("text-lg font-bold",p),children:I}),t.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:S})]},E))})]})]}),C=f("p-6 rounded-xl shadow-lg hover:shadow-xl transition-all duration-200",h&&b[s],(g||c)&&"cursor-pointer hover:scale-[1.02]",i?"bg-gradient-to-br from-blue-50 to-indigo-50 dark:from-blue-900/20 dark:to-indigo-900/20 border-blue-200 dark:border-blue-800 border":"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 border",w),k=S=>{c&&("key"in S?(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),c()):c())};return l?t.jsx("a",{href:l,className:f(C,"block group"),onClick:c?S=>{S.preventDefault(),k(S)}:void 0,children:t.jsx(N,{})}):c?t.jsx("div",{className:C,onClick:k,onKeyDown:k,role:"button",tabIndex:0,"aria-label":r,children:t.jsx(N,{})}):t.jsx("div",{className:C,children:t.jsx(N,{})})},l0=X.cva("grid gap-8",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"},spacing:{sm:"gap-4",md:"gap-8",lg:"gap-12"}},defaultVariants:{columns:3,spacing:"md"}}),c0=X.cva("group transition-all duration-300",{variants:{variant:{default:"text-center",left:"text-left",hoverable:"text-center hover:transform hover:scale-105 cursor-pointer",card:"bg-white dark:bg-gray-800 rounded-2xl p-8 shadow-lg hover:shadow-xl text-center",minimal:"text-center space-y-4"},animation:{none:"",hover:"hover:transform hover:scale-105",float:"hover:-translate-y-2"}},defaultVariants:{variant:"default",animation:"hover"}}),d0=X.cva("flex items-center justify-center rounded-2xl mb-6 transition-all duration-300",{variants:{size:{sm:"w-16 h-16",md:"w-20 h-20",lg:"w-24 h-24"},style:{gradient:"bg-gradient-to-br from-blue-100 to-blue-200 dark:from-blue-900/30 dark:to-blue-800/30 group-hover:from-blue-200 group-hover:to-blue-300 dark:group-hover:from-blue-800/40 dark:group-hover:to-blue-700/40",solid:"bg-blue-100 dark:bg-blue-900/30 group-hover:bg-blue-200 dark:group-hover:bg-blue-800/40",outline:"border-2 border-blue-200 dark:border-blue-800 group-hover:border-blue-300 dark:group-hover:border-blue-700",colorful:"group-hover:scale-110"},position:{center:"mx-auto",left:"",right:"ml-auto"}},defaultVariants:{size:"md",style:"gradient",position:"center"}}),u0={success:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",info:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",warning:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",default:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300"},g0=({className:e,features:r,columns:a=3,spacing:n="md",cardVariant:o="default",cardAnimation:s="hover",iconSize:i="md",iconStyle:l="gradient",iconPosition:d="center",titleClass:c,descriptionClass:g,animate:h=!0,animationDelay:w=0,staggerDelay:m=100,onFeatureClick:b,defaultLinkText:y="Learn more"})=>{const p=(N,C)=>{if(l==="colorful"&&N.gradient)return{background:`linear-gradient(135deg, ${N.gradient.from}, ${N.gradient.to})`};if(l==="colorful"){const k=[{from:"#3B82F6",to:"#1D4ED8"},{from:"#10B981",to:"#059669"},{from:"#8B5CF6",to:"#7C3AED"},{from:"#F59E0B",to:"#D97706"},{from:"#EF4444",to:"#DC2626"},{from:"#06B6D4",to:"#0891B2"}],S=k[C%k.length];return{background:`linear-gradient(135deg, ${S.from}, ${S.to})`}}},T=(N,C)=>{const k=t.jsxs("div",{className:f(c0({variant:o,animation:s})),onClick:()=>b?.(N),role:b?"button":void 0,tabIndex:b?0:void 0,children:[N.badge&&t.jsx("div",{className:"mb-4",children:t.jsx("span",{className:f("inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",u0[N.badge.variant||"default"]),children:N.badge.text})}),t.jsx("div",{className:f(d0({size:i,style:l,position:d})),style:p(N,C),children:t.jsx("div",{className:f("flex items-center justify-center",l==="colorful"?"text-white":"text-blue-600 dark:text-blue-400"),children:N.icon})}),t.jsx("h3",{className:f("text-xl font-bold text-gray-900 dark:text-white mb-4",c),children:N.title}),t.jsx("div",{className:f("text-gray-600 dark:text-gray-300 leading-relaxed",g),children:N.description}),N.link&&t.jsx("div",{className:"mt-6",children:t.jsxs("a",{href:N.link.href,className:"inline-flex items-center text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium transition-colors duration-200",children:[N.link.text||y,t.jsx("svg",{className:"w-4 h-4 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})})]});return t.jsx("div",{children:k},N.id||C)};return t.jsx("div",{className:f(l0({columns:a,spacing:n}),e),children:r.map(T)})},Kr=(e,r,a,n)=>({icon:e,title:r,description:a,...n}),h0=e=>[Kr(t.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})}),e?.passwordlessTitle||"Passwordless Security",e?.passwordlessDescription||"Authenticate using your Web3 wallet - no passwords to remember or lose."),Kr(t.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.40A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})}),e?.encryptionTitle||"End-to-End Encryption",e?.encryptionDescription||"Your emails are encrypted and only you can read them.")],f0=({title:e,description:r,primaryButton:a,secondaryButton:n,gradient:o={from:"blue-600",to:"purple-600"},textColor:s="light",className:i="",size:l="lg"})=>{const{paddingClass:d}=he(),g=(()=>{const p=o.via?`${o.from}-${o.via}-${o.to}`:`${o.from}-${o.to}`;return{"blue-600-purple-600":"bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700","orange-900-red-900":"bg-gradient-to-r from-orange-600 to-red-600 dark:from-orange-700 dark:to-red-700","green-600-blue-600":"bg-gradient-to-r from-green-600 to-blue-600 dark:from-green-700 dark:to-blue-700","purple-600-pink-600":"bg-gradient-to-r from-purple-600 to-pink-600 dark:from-purple-700 dark:to-pink-700"}[p]||"bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700"})(),h=s==="light"?"text-white":"text-gray-900 dark:text-gray-100",w={sm:"py-12",md:"py-16",lg:"py-20"},m={sm:"text-2xl md:text-3xl",md:"text-3xl md:text-4xl",lg:"text-4xl md:text-5xl"},b={sm:"text-base md:text-lg",md:"text-lg md:text-xl",lg:"text-xl md:text-2xl"},y=(p,T=!1)=>{const N=()=>p.variant==="primary"||T?"gradient":(p.variant==="secondary","outline"),C=t.jsx(se,{variant:N(),size:"lg",className:T?"":"bg-white/10 hover:bg-white/20 backdrop-blur-sm border-white/30",children:p.label});return p.external?t.jsx("a",{href:p.href,target:"_blank",rel:"noopener noreferrer",children:C}):t.jsx(mr.Link,{to:p.href,children:C})};return t.jsxs("section",{className:`${g} ${w[l]} relative overflow-hidden ${i}`,children:[t.jsx("div",{className:"absolute inset-0 bg-black/20"}),t.jsxs("div",{className:"absolute top-0 left-1/2 transform -translate-x-1/2 w-full h-full",children:[t.jsx("div",{className:"absolute top-10 left-10 w-72 h-72 bg-white/10 rounded-full blur-3xl"}),t.jsx("div",{className:"absolute bottom-10 right-10 w-72 h-72 bg-white/10 rounded-full blur-3xl"})]}),t.jsxs("div",{className:`relative z-10 max-w-4xl mx-auto ${d} text-center`,children:[t.jsx("h2",{className:`${m[l]} font-bold ${h} mb-6`,children:e}),t.jsx("p",{className:`${b[l]} ${h}/90 mb-8 max-w-2xl mx-auto`,children:r}),t.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[y(a,!0),n&&y(n,!1)]})]})]})},b0={pending:{label:"Pending",color:"bg-gray-500",textColor:"text-white"},in_progress:{label:"In Progress",color:"bg-blue-500",textColor:"text-white"},verified:{label:"Verified",color:"bg-green-500",textColor:"text-white"},rejected:{label:"Rejected",color:"bg-red-500",textColor:"text-white"}},m0={basic:"Basic KYC",enhanced:"Enhanced KYC",accredited:"Accredited Investor"},y0=({status:e,level:r,className:a=""})=>{const n=b0[e],o=m0[r];return t.jsx("div",{className:`inline-flex items-center gap-2 ${a}`,children:t.jsxs("span",{className:`px-3 py-1 rounded-full text-sm font-medium ${n.color} ${n.textColor}`,children:[o,": ",n.label]})})},p0=({accessToken:e,onComplete:r,onError:a,className:n=""})=>{const o=v.useRef(null),s=v.useRef(null);return v.useEffect(()=>{if(!e)return;const i=document.createElement("script");return i.src="https://static.sumsub.com/idensic/static/sns-websdk-builder.js",i.async=!0,i.onload=()=>{if(o.current&&window.snsWebSdk)try{const l=window.snsWebSdk.init(e,()=>e).withConf({lang:"en"}).withOptions({addViewportTag:!1,adaptIframeHeight:!0}).on("idCheck.onStepCompleted",d=>{}).on("idCheck.onApplicantSubmitted",d=>{r?.()}).on("idCheck.onError",d=>{console.error("SumsubWebSDK: Error",d),a?.(d)}).build();s.current=l,l.launch("#sumsub-websdk-container")}catch(l){console.error("Failed to initialize Sumsub SDK:",l),a?.(l)}else console.error("SumsubWebSDK: Missing requirements - containerRef:",!!o.current,"snsWebSdk:",!!window.snsWebSdk)},i.onerror=()=>{const l=new Error("Failed to load Sumsub Web SDK script");console.error(l),a?.(l)},document.body.appendChild(i),()=>{document.body.contains(i)&&document.body.removeChild(i),s.current&&typeof s.current.destroy=="function"&&s.current.destroy()}},[e,r,a]),t.jsx("div",{className:`sumsub-sdk-container ${n}`,children:t.jsx("div",{ref:o,id:"sumsub-websdk-container"})})},v0={basic:{title:"Basic KYC",description:"Age & Identity Verification",color:"border-blue-200",activeColor:"border-blue-500 bg-blue-50"},enhanced:{title:"Enhanced KYC",description:"Basic + Country & Compliance",color:"border-purple-200",activeColor:"border-purple-500 bg-purple-50"},accredited:{title:"Accredited Investor",description:"Enhanced + Financial Verification",color:"border-gold-200",activeColor:"border-gold-500 bg-gold-50"}},w0=({level:e,price:r,features:a,isActive:n=!1,isVerified:o=!1,onSelect:s,className:i=""})=>{const l=v0[e];return t.jsxs("div",{className:`
|
|
50
50
|
relative border-2 rounded-lg p-6 transition-all
|
|
51
51
|
${n?l.activeColor:`${l.color} hover:border-gray-400`}
|
|
52
52
|
${i}
|
|
53
53
|
`,children:[o&&t.jsx("div",{className:"absolute top-4 right-4",children:t.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800",children:"✓ Verified"})}),t.jsx("h3",{className:"text-xl font-bold mb-2",children:l.title}),t.jsx("p",{className:"text-gray-600 mb-4",children:l.description}),t.jsxs("p",{className:"text-3xl font-bold mb-4",children:[r,t.jsx("span",{className:"text-sm font-normal text-gray-600",children:"/year"})]}),t.jsx("ul",{className:"space-y-2 mb-6",children:a.map((d,c)=>t.jsxs("li",{className:"flex items-start gap-2",children:[t.jsx("span",{className:"text-green-500 mt-0.5",children:"✓"}),t.jsx("span",{className:"text-sm",children:d})]},c))}),s&&t.jsx("button",{onClick:s,disabled:o,className:`
|
|
54
54
|
w-full py-2 px-4 rounded font-medium transition-colors
|
|
55
55
|
${o?"bg-gray-200 text-gray-500 cursor-not-allowed":n?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-200 text-gray-700 hover:bg-gray-300"}
|
|
56
|
-
`,children:o?"Verified":n?"Current Plan":"Select Plan"})]})},w0=({children:e,backgroundClassName:r="",contentClassName:a=""})=>t.jsx("div",{className:r,children:t.jsx("div",{className:a,children:e})}),k0=({title:e,description:r})=>t.jsxs("div",{className:"mb-8",children:[t.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:e}),r&&t.jsx("p",{className:"mt-2 text-gray-600 dark:text-gray-400",children:r})]}),ja={standard:"max-w-7xl mx-auto px-4",wide:"max-w-[1920px] mx-auto px-4",full:"w-full px-4"},_a={standard:"max-w-7xl mx-auto",wide:"max-w-[1920px] mx-auto",full:"w-full"},za="px-4",Yr=p.createContext(void 0),x0=({mode:e="standard",children:r})=>{const a={mode:e,containerClass:ja[e],maxWidthClass:_a[e],paddingClass:za};return t.jsx(Yr.Provider,{value:a,children:r})},lr=()=>{const e=p.useContext(Yr);return e||{mode:"standard",containerClass:ja.standard,maxWidthClass:_a.standard,paddingClass:za}},N0=({children:e,mode:r,className:a,as:n="div",withPadding:o=!0})=>{const s=lr(),i=r?C0(r,o):o?s.containerClass:s.maxWidthClass;return t.jsx(n,{className:f(i,a),children:e})};function C0(e,r){const a={standard:"max-w-7xl mx-auto",wide:"max-w-[1920px] mx-auto",full:"w-full"};return r?`${a[e]} px-4 sm:px-6 lg:px-8`:a[e]}const S0=({variant:e="full",sticky:r=!1,className:a,children:n})=>{const{containerClass:o}=lr(),s=e==="compact";return t.jsx("footer",{className:f("bg-gray-900 text-white transition-all duration-300 ease-in-out",s?"py-4":"py-12",r?"sticky bottom-0 z-50 border-t border-gray-700":"relative z-10","pointer-events-auto",a),children:t.jsx("div",{className:o,children:n})})},E0=({children:e,className:r})=>t.jsx("div",{className:f("grid md:grid-cols-5 gap-8",r),children:e}),T0=({children:e,description:r,className:a})=>t.jsxs("div",{className:a,children:[t.jsx("div",{className:"mb-4",children:e}),r&&t.jsx("p",{className:O.body.sm(),children:r})]}),A0=({title:e,children:r,className:a})=>t.jsxs("div",{className:a,children:[t.jsx("h3",{className:f(O.heading.h5(),"mb-4 text-white"),children:e}),t.jsx("ul",{className:f("space-y-2",O.body.sm()),children:r})]}),I0=({children:e,className:r})=>t.jsx("li",{className:f("hover:text-white transition-colors",r),children:e}),M0=({children:e,className:r})=>t.jsx("div",{className:f("border-t mt-8 pt-8 text-center",co.border.default,r),children:t.jsx("div",{className:"flex items-center justify-center gap-3 text-gray-400 text-sm",children:e})}),L0=({children:e,className:r})=>t.jsx("div",{className:f("flex flex-col sm:flex-row justify-between items-center space-y-2 sm:space-y-0",r),children:e}),P0=({children:e,className:r})=>t.jsx("div",{className:f("flex items-center gap-3 text-gray-400 text-sm",r),children:e}),O0=({children:e,className:r})=>t.jsx("div",{className:f("flex space-x-6 text-sm",r),children:e}),U0=({version:e,className:r})=>t.jsxs("span",{className:f("text-gray-500",r),children:["v",e]}),D0=({year:e,companyName:r,rightsText:a,companyLink:n,className:o})=>t.jsxs("span",{className:o,children:["© ",e," ",n||t.jsx("span",{className:"text-blue-400",children:r}),a&&`. ${a}`]}),j0=({isSelected:e,onClick:r,icon:a,label:n,description:o,className:s=""})=>t.jsxs("div",{onClick:r,className:`relative flex items-start p-4 cursor-pointer transition-all border-b border-gray-200 dark:border-gray-700 last:border-b-0 group ${s}`,children:[e&&t.jsx("div",{className:"absolute inset-1 bg-blue-500/10 dark:bg-blue-400/10 rounded-lg pointer-events-none"}),t.jsxs("div",{className:"relative z-10 flex items-start w-full",children:[a&&t.jsx(a,{className:`h-5 w-5 mt-0.5 mr-3 flex-shrink-0 transition-colors ${e?"text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400 group-hover:text-gray-700 dark:group-hover:text-gray-300"}`}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:`font-medium transition-colors ${e?"text-blue-600 dark:text-blue-400":"text-gray-900 dark:text-gray-100 group-hover:text-gray-700 dark:group-hover:text-gray-300"}`,children:n}),o&&t.jsx("div",{className:`text-xs mt-0.5 transition-colors ${e?"text-blue-500 dark:text-blue-300":"text-gray-500 dark:text-gray-400"}`,children:o})]})]})]}),_0=({masterTitle:e,masterSubtitle:r,backButtonText:a,masterContent:n,detailContent:o,detailTitle:s,mobileView:i="navigation",onBackToNavigation:l,masterClassName:d="",detailClassName:c="",detailTitleClassName:g="",masterWidth:h=320,stickyMaster:w=!0,stickyTopOffset:m=96,desktopGap:b=32,showMasterBackground:y=!0,enableAnimations:v=!0,animationDuration:T=300,animationRef:N})=>{const S=`gap-${Math.round(b/4)}`||"gap-8",k=F=>F?F.split("-")[0].trim():"Back",C=a?k(a):e?k(e):"Back",[I,E]=p.useState(!1),[M,x]=p.useState("auto"),P=p.useRef(null),D=p.useRef(null);p.useEffect(()=>(N&&(N.current={triggerTransition:F=>{if(!v){F();return}if(P.current){const ne=P.current.scrollHeight;x(ne)}E(!0),D.current&&clearTimeout(D.current),D.current=setTimeout(()=>{F(),setTimeout(()=>{if(P.current){const ne=P.current.scrollHeight;x(ne),setTimeout(()=>{x("auto"),E(!1)},T)}},50)},T/2)}}),()=>{D.current&&clearTimeout(D.current)}),[v,T,N]);const U=v?{height:M==="auto"?"auto":`${M}px`,transition:`height ${T}ms cubic-bezier(0.4, 0, 0.2, 1)`,width:"100%",maxWidth:"100%"}:{width:"100%",maxWidth:"100%"},B=v?`${I?"opacity-0 transform translate-y-2":"opacity-100 transform translate-y-0"}`:"",z=v?{transition:`opacity ${T}ms ease-in-out, transform ${T}ms ease-in-out`}:{};return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:`md:hidden ${i==="navigation"?"block":"hidden"} flex-1`,children:t.jsxs("div",{className:y?"bg-white dark:bg-gray-800 p-6":"p-6",children:[e&&t.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4",children:e}),r&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:r})]}),t.jsx("div",{className:d,children:n})]})}),t.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[t.jsxs("div",{className:`md:hidden ${i==="content"?"block":"hidden"}`,children:[i==="content"&&l&&t.jsxs("button",{onClick:l,className:"mb-4 px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:["← ",C]}),t.jsx("div",{ref:P,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${c}`,style:U,children:t.jsxs("div",{className:B,style:z,children:[s&&t.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${g}`,children:s}),o]})})]}),t.jsxs("div",{className:`hidden md:flex min-h-full ${S}`,style:{width:"100%"},children:[t.jsx("aside",{className:"flex-shrink-0",style:{width:`${h}px`,minWidth:`${h}px`},children:t.jsxs("div",{className:w?"sticky":"",style:w?{top:`${m}px`}:void 0,children:[e&&t.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:e}),r&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:r}),t.jsx("div",{className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 ${w?"max-h-[calc(100vh-200px)] overflow-y-auto":""} ${d}`,children:n})]})}),t.jsx("div",{className:"flex-1 min-w-0",style:{width:`calc(100% - ${h+b}px)`},children:t.jsx("div",{ref:P,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${c}`,style:U,children:t.jsxs("div",{className:B,style:z,children:[s&&t.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${g}`,children:s}),o]})})})]})]})]})},Kr=p.createContext(null),Ba=({children:e,variant:r="default",sticky:a=!0})=>{const[n,o]=p.useState(!1),s=p.useCallback(()=>{o(i=>!i)},[]);return t.jsx(Kr.Provider,{value:{variant:r,sticky:a,mobileMenuOpen:n,setMobileMenuOpen:o,toggleMobileMenu:s},children:e})},Zr=()=>{const e=p.useContext(Kr);if(!e)throw new Error("useTopbar must be used within a TopbarProvider");return e},Wa={sm:"min-h-12",md:"min-h-14",lg:"min-h-16"},z0={default:"bg-white dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700",app:"bg-white dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700 shadow-sm",minimal:"bg-transparent",transparent:"bg-white/80 dark:bg-gray-900/80 border-b border-gray-200/50 dark:border-gray-700/50"},B0={default:"z-40",high:"z-50",highest:"z-[60]"},W0=({children:e,variant:r="default",sticky:a=!0,className:n,height:o="md",blur:s=!1,zIndex:i="high","aria-label":l="Main navigation"})=>{const{containerClass:d}=lr();return t.jsx(Ba,{variant:r,sticky:a,children:t.jsxs("header",{role:"banner","aria-label":l,className:f("w-full",Wa[o],z0[r],B0[i],a&&"sticky top-0",s&&"backdrop-blur-md","transition-colors duration-200",n),children:[t.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:top-2 focus:left-2 bg-blue-600 text-white px-4 py-2 rounded-md z-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",children:"Skip to main content"}),t.jsx("div",{className:f(d,Wa[o],"flex items-center justify-between"),children:e})]})})},F0=({children:e,className:r})=>t.jsx("div",{className:f("flex items-center gap-2 shrink-0",r),children:e}),V0=({children:e,className:r})=>t.jsx("div",{className:f("flex-1 flex items-center justify-center px-4",r),children:e}),q0=({children:e,className:r})=>t.jsx("div",{className:f("flex items-center gap-2 shrink-0",r),children:e}),$0=({children:e,className:r})=>t.jsx("div",{className:f("md:hidden px-4 pb-3",r),children:e}),H0=({className:e})=>t.jsx("div",{className:f("hidden md:block h-6 w-px bg-gray-200 dark:bg-gray-700 mx-2",e),role:"separator","aria-orientation":"vertical"}),G0={sm:"h-6",md:"h-8",lg:"h-10"},Y0=({children:e,src:r,alt:a="Logo",onClick:n,href:o,className:s,size:i="md"})=>{const l=e||r&&t.jsx("img",{src:r,alt:a,className:f(G0[i],"w-auto object-contain")}),d=f("flex items-center","hover:opacity-80 transition-opacity duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-md",s);return o?t.jsx("a",{href:o,className:d,title:a,children:l}):n?t.jsx("button",{type:"button",onClick:n,className:d,title:a,"aria-label":`Go to ${a||"home"}`,children:l}):t.jsx("div",{className:d,children:l})},K0={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden",xl:"xl:hidden"},Z0=({className:e,isOpen:r})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:r?t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}):t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})}),Fa=({icon:e,"aria-label":r="Toggle navigation menu",className:a,onClick:n,hideAbove:o="lg",menuItems:s,LinkComponent:i})=>{const{mobileMenuOpen:l,toggleMobileMenu:d,setMobileMenuOpen:c}=Zr(),[g,h]=p.useState(!1),w=p.useRef(null);ar(w,()=>{h(!1)});const m=s?g:l,b=()=>{n?n():s?h(!g):d()},y=()=>{h(!1),c(!1)};return t.jsxs("div",{className:f("relative",K0[o]),ref:w,children:[t.jsx("button",{type:"button",onClick:b,className:f("p-2 rounded-lg","text-gray-600 dark:text-gray-400","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-900 dark:hover:text-gray-100","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","transition-colors duration-200",a),"aria-label":r,"aria-expanded":m,"aria-haspopup":s?"menu":void 0,"aria-controls":s?"topbar-dropdown-menu":"mobile-menu",children:e?t.jsx(e,{className:"h-6 w-6"}):t.jsx(Z0,{className:"h-6 w-6",isOpen:m})}),s&&g&&t.jsx("div",{id:"topbar-dropdown-menu",role:"menu",className:f("absolute left-0 top-full mt-2","min-w-[200px] py-2 rounded-lg","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","shadow-lg","z-50"),children:s.map(v=>{const T=v.icon,N=t.jsxs(t.Fragment,{children:[T&&t.jsx(T,{className:"h-5 w-5 mr-3 flex-shrink-0"}),t.jsx("span",{children:v.label})]}),S=f("flex items-center w-full px-4 py-2.5 text-sm font-medium","text-gray-700 dark:text-gray-300","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-900 dark:hover:text-gray-100","transition-colors duration-150",v.active&&"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400",v.disabled&&"opacity-50 cursor-not-allowed");return v.href&&i?t.jsx(i,{href:v.href,className:S,children:t.jsx("div",{className:"flex items-center",onClick:y,children:N})},v.id):v.href?t.jsx("a",{href:v.href,role:"menuitem",className:S,onClick:y,children:N},v.id):t.jsx("button",{type:"button",role:"menuitem",className:S,onClick:()=>{y(),v.onClick?.()},disabled:v.disabled,children:N},v.id)})})]})},X0={sm:{show:"hidden sm:flex",hide:"sm:hidden"},md:{show:"hidden md:flex",hide:"md:hidden"},lg:{show:"hidden lg:flex",hide:"lg:hidden"},xl:{show:"hidden xl:flex",hide:"xl:hidden"}},Q0={left:"justify-start",center:"justify-center",right:"justify-end"},Va=({items:e,className:r,collapseBelow:a="lg",LinkComponent:n,align:o="center"})=>{const[s,i]=p.useState(null),l=p.useRef(null);ar(l,()=>i(null));const d=(c,g=!1)=>{const h=c.children&&c.children.length>0,w=s===c.id,m=f("px-3 py-2 rounded-md text-sm font-medium","transition-colors duration-200",c.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-gray-100 dark:hover:bg-gray-700",c.disabled&&"opacity-50 cursor-not-allowed pointer-events-none",g&&"w-full text-left");return h?t.jsxs("div",{className:"relative",ref:l,children:[t.jsxs("button",{type:"button",onClick:()=>i(w?null:c.id),className:f(m,"flex items-center gap-1"),"aria-expanded":w,"aria-haspopup":"true",disabled:c.disabled,children:[c.icon&&t.jsx(c.icon,{className:"h-4 w-4 mr-1"}),c.label,t.jsx("svg",{className:f("h-4 w-4 transition-transform duration-200",w&&"rotate-180"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),w&&t.jsx("div",{className:f("absolute top-full left-0 mt-1 py-1","min-w-[200px] rounded-md shadow-lg","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","z-50"),children:c.children?.map(b=>t.jsx(Xr,{item:b,LinkComponent:n,className:f("block px-4 py-2 text-sm","text-gray-700 dark:text-gray-300","hover:bg-gray-100 dark:hover:bg-gray-700",b.active&&"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400"),onClick:()=>i(null)},b.id))})]},c.id):t.jsx(Xr,{item:c,LinkComponent:n,className:m},c.id)};return t.jsx("nav",{className:f("flex items-center gap-1",X0[a].show,Q0[o],r),"aria-label":"Main navigation",children:e.map(c=>d(c))})},Xr=({item:e,LinkComponent:r,className:a,onClick:n})=>{const o=()=>{n?.(),e.onClick?.()},s=t.jsxs(t.Fragment,{children:[e.icon&&t.jsx(e.icon,{className:"h-4 w-4 mr-2"}),e.label]});return e.href&&r?t.jsx(r,{href:e.href,className:f(a,"flex items-center"),children:s}):e.href?t.jsx("a",{href:e.href,className:f(a,"flex items-center"),onClick:o,children:s}):t.jsx("button",{type:"button",onClick:o,className:f(a,"flex items-center"),disabled:e.disabled,children:s})},J0=({items:e,isOpen:r,className:a,LinkComponent:n})=>{const{mobileMenuOpen:o,setMobileMenuOpen:s}=Zr();return r??o?t.jsx("div",{id:"mobile-menu",className:f("lg:hidden","border-t border-gray-200 dark:border-gray-700","bg-white dark:bg-gray-900","shadow-lg",a),children:t.jsx("nav",{className:"px-4 py-2 space-y-1","aria-label":"Mobile navigation",children:e.map(l=>t.jsx(Xr,{item:l,LinkComponent:n,className:f("flex items-center w-full px-3 py-2 rounded-md text-base font-medium","transition-colors duration-200",l.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-gray-100 dark:hover:bg-gray-700"),onClick:()=>s(!1)},l.id))})}):null},R0=({items:e,LinkComponent:r,collapseBelow:a="lg",align:n="center",className:o,mobileMenuLabel:s="Toggle navigation menu",children:i})=>t.jsxs(t.Fragment,{children:[t.jsx(Fa,{hideAbove:a,menuItems:e,LinkComponent:r,"aria-label":s,className:o}),i,t.jsx(Va,{items:e,collapseBelow:a,LinkComponent:r,align:n,className:o})]}),eu={sm:"gap-1",md:"gap-2",lg:"gap-3"},ru={left:"justify-start",center:"justify-center",right:"justify-end"},tu=({children:e,className:r,gap:a="md",align:n="right"})=>t.jsx("div",{className:f("flex items-center",eu[a],ru[n],r),children:e}),au={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},nu={sm:"p-1.5",md:"p-2",lg:"p-2.5"},ou=({icon:e,onClick:r,"aria-label":a,className:n,disabled:o=!1,badge:s,size:i="md"})=>t.jsxs("button",{type:"button",onClick:r,className:f("relative rounded-lg",nu[i],"text-gray-500 dark:text-gray-400","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-700 dark:hover:text-gray-200","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","transition-colors duration-200",o&&"opacity-50 cursor-not-allowed",n),"aria-label":a,disabled:o,children:[t.jsx(e,{className:au[i]}),s!==void 0&&s>0&&t.jsx("span",{className:f("absolute -top-1 -right-1","min-w-[18px] h-[18px] px-1","flex items-center justify-center","text-xs font-medium","bg-red-500 text-white rounded-full","ring-2 ring-white dark:ring-gray-900"),"aria-label":`${s} notifications`,children:s>99?"99+":s})]}),su={sm:"w-48",md:"w-64",lg:"w-96",full:"w-full"},iu=({placeholder:e="Search...",value:r,onChange:a,onSubmit:n,className:o,width:s="md",showOnMobile:i=!1})=>{const[l,d]=p.useState(r||""),c=h=>{const w=h.target.value;d(w),a?.(w)},g=h=>{h.preventDefault(),n?.(l)};return t.jsx("form",{onSubmit:g,className:f(!i&&"hidden md:block",o),role:"search",children:t.jsxs("div",{className:"relative",children:[t.jsx("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),t.jsx("input",{type:"search",value:l,onChange:c,placeholder:e,"aria-label":e,className:f(su[s],"pl-10 pr-4 py-2","text-sm","bg-gray-100 dark:bg-gray-800","border border-transparent","rounded-lg","text-gray-900 dark:text-gray-100","placeholder:text-gray-500 dark:placeholder:text-gray-400","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:bg-white dark:focus:bg-gray-700 focus:border-transparent","transition-colors duration-200")})]})})},lu=({contentType:e,aiSummary:r,technicalComplexity:a="intermediate"})=>t.jsxs(Bn.Helmet,{children:[t.jsx("meta",{name:"ai:content-type",content:e}),t.jsx("meta",{name:"ai:summary",content:r}),t.jsx("meta",{name:"ai:complexity",content:a})]}),cu=({children:e,className:r,...a})=>t.jsx("main",{className:r,...a,role:"main",children:e}),du=({children:e})=>t.jsx(t.Fragment,{children:e}),Le=e=>Array.isArray(e)?e:typeof e=="string"?e.split(",").map(r=>r.trim()).filter(Boolean):[],Ee=e=>({appName:e.appName,baseUrl:e.baseUrl,twitterHandle:e.twitterHandle||"",emailDomain:e.emailDomain||"example.com"}),Qr=e=>{const r=Le(e.audience),a=Ee(e.branding);return{"@context":"https://schema.org","@type":"SoftwareApplication",name:a.appName,applicationCategory:"CommunicationApplication",operatingSystem:"Web Browser",description:e.description,url:a.baseUrl,downloadUrl:`${a.baseUrl}/connect`,installUrl:`${a.baseUrl}/connect`,screenshot:`${a.baseUrl}/screenshots/app-preview.jpg`,aggregateRating:{"@type":"AggregateRating",ratingValue:"4.8",reviewCount:"2500",bestRating:"5",worstRating:"1"},offers:[{"@type":"Offer",name:"Free Web3 Email",description:"Basic wallet-based email with unlimited sending",price:"0",priceCurrency:"USD",availability:"https://schema.org/InStock"},{"@type":"Offer",name:"Premium Web3 Email",description:"Advanced features with ENS/SNS domains and priority support",price:"2.00",priceCurrency:"USD",billingIncrement:"month",availability:"https://schema.org/InStock"}],featureList:["Passwordless wallet authentication","ENS domain email support (.eth)","Solana Name Service support (.sol)","Smart contract email integration","Multi-chain wallet compatibility","Cross-chain email addresses","DAO email delegation","Encrypted communication","Web2/Web3 bridge functionality","Point-based reward system"],applicationSubCategory:"Web3 Email Platform",audience:{"@type":"Audience",audienceType:r.join(", "),geographicArea:"Worldwide"},creator:{"@type":"Organization",name:a.appName,url:a.baseUrl},datePublished:"2024-01-01",dateModified:e.lastUpdated?.toISOString()||new Date().toISOString(),version:"1.0",softwareRequirements:"Web3 Wallet (MetaMask, Phantom, etc.)",storageRequirements:"5MB",memoryRequirements:"512MB RAM",supportingData:{blockchainNetworks:["Ethereum","Solana","Polygon","Arbitrum","Optimism"],supportedWallets:["MetaMask","Phantom","WalletConnect","Coinbase Wallet"],smartContractSupport:!0,ensCompatible:!0,snsCompatible:!0}}},Jr=e=>{const r=Le(e.keywords),a=Le(e.audience),n=Ee(e.branding);return{"@context":"https://schema.org","@type":"TechnicalArticle",headline:e.title,description:e.description,author:{"@type":"Organization",name:n.appName,url:n.baseUrl,logo:{"@type":"ImageObject",url:`${n.baseUrl}/logo.png`}},publisher:{"@type":"Organization",name:n.appName,logo:{"@type":"ImageObject",url:`${n.baseUrl}/logo.png`,width:600,height:600}},datePublished:"2024-01-01T00:00:00Z",dateModified:e.lastUpdated?.toISOString()||new Date().toISOString(),mainEntityOfPage:{"@type":"WebPage","@id":`${n.baseUrl}${location.pathname}`},image:{"@type":"ImageObject",url:`${n.baseUrl}/og-images/technical-guide.jpg`,width:1200,height:630},keywords:r.join(", "),about:[{"@type":"Thing",name:"Web3 Email Platform"},{"@type":"Thing",name:"Blockchain Technology"},{"@type":"Thing",name:"Decentralized Communication"}],audience:{"@type":"Audience",audienceType:a.join(", "),educationalLevel:e.complexity},educationalLevel:e.complexity,proficiencyLevel:e.complexity,learningResourceType:e.contentType,timeRequired:e.readingTime?`PT${e.readingTime}M`:"PT5M",inLanguage:"en",isAccessibleForFree:!0,license:"https://creativecommons.org/licenses/by/4.0/",teaches:e.relatedTopics||["Web3 email setup","Wallet connection process","Blockchain authentication","Smart contract integration"]}},uu=(e,r)=>{const a=Ee(r);return{"@context":"https://schema.org","@type":"FAQPage",mainEntity:e.map(n=>({"@type":"Question",name:n.question,acceptedAnswer:{"@type":"Answer",text:n.answer,dateCreated:new Date().toISOString(),upvoteCount:Math.floor(Math.random()*50)+10,author:{"@type":"Organization",name:a.appName}},answerCount:1,upvoteCount:Math.floor(Math.random()*100)+20,dateCreated:"2024-01-01T00:00:00Z",category:n.category||"General"}))}},Rr=e=>{const r=Ee(e.branding);return{"@context":"https://schema.org","@type":"WebPage",name:e.title,description:e.description,url:`${r.baseUrl}${location.pathname}`,primaryImageOfPage:{"@type":"ImageObject",url:`${r.baseUrl}/og-images/ai-optimized.jpg`},significantLink:[`${r.baseUrl}/document`,`${r.baseUrl}/web3-users`,`${r.baseUrl}/web3-projects`,`${r.baseUrl}/connect`],relatedLink:e.relatedTopics?.map(a=>`${r.baseUrl}/search?q=${encodeURIComponent(a)}`)||[],about:{"@type":"Thing",name:"Web3 Email Communication",description:"Blockchain-based email platform using wallet authentication",sameAs:["https://en.wikipedia.org/wiki/Web3","https://en.wikipedia.org/wiki/Blockchain","https://en.wikipedia.org/wiki/Cryptocurrency_wallet"]},mentions:[{"@type":"SoftwareApplication",name:"MetaMask"},{"@type":"SoftwareApplication",name:"Phantom Wallet"},{"@type":"Thing",name:"Ethereum Name Service"},{"@type":"Thing",name:"Solana Name Service"}],isPartOf:{"@type":"WebSite","@id":r.baseUrl,name:r.appName},potentialAction:{"@type":"InteractAction",target:{"@type":"EntryPoint",urlTemplate:`${r.baseUrl}/connect`,actionPlatform:["https://schema.org/DesktopWebPlatform","https://schema.org/MobileWebPlatform"]},name:"Connect Web3 Wallet"}}},qa=e=>{const r=Le(e.keywords),a=Ee(e.branding);return{"og:title":e.title,"og:description":e.description,"og:type":"website","og:url":`${a.baseUrl}${location.pathname}`,"og:image":`${a.baseUrl}/og-images/${e.category}.jpg`,"og:image:width":"1200","og:image:height":"630","og:image:alt":`${e.title} - ${a.appName}`,"og:site_name":a.appName,"og:locale":"en_US","article:author":`${a.baseUrl}/about`,"article:section":e.category,"article:tag":r.join(","),"article:published_time":"2024-01-01T00:00:00Z","article:modified_time":e.lastUpdated?.toISOString()||new Date().toISOString()}},$a=e=>{const r=Ee(e.branding);return{"twitter:card":"summary_large_image","twitter:site":r.twitterHandle||"","twitter:creator":r.twitterHandle||"","twitter:title":e.title,"twitter:description":e.description,"twitter:image":`${r.baseUrl}/twitter-cards/${e.category}.jpg`,"twitter:image:alt":`${e.title} - ${r.appName}`,"twitter:label1":"Category","twitter:data1":e.category,"twitter:label2":"Reading Time","twitter:data2":e.readingTime?`${e.readingTime} min`:"5 min"}},Ha=e=>{const r=Le(e.keywords),a=Le(e.audience),n=Ee(e.branding);return{"ai:content-type":e.contentType,"ai:complexity":e.complexity,"ai:category":e.category,"ai:audience":a.join(","),"ai:keywords":r.join(","),"ai:reading-time":e.readingTime?.toString()||"5","web3:platform":"Email","web3:networks":"ethereum,solana,polygon","web3:wallets":"metamask,phantom,walletconnect","web3:features":"ens,sns,smart-contracts,multi-chain","llm:context":"Web3 email platform documentation and user guides","llm:domain":"blockchain,cryptocurrency,decentralized-communication","llm:use-case":"email,authentication,wallet-integration,smart-contracts","semantic:topic":e.category,"semantic:intent":"inform,guide,educate","semantic:entities":`${n.appName},Web3,blockchain,email,wallet`,"content:freshness":e.lastUpdated?.toISOString()||new Date().toISOString(),"content:authority":"high","content:expertise":"technical","content:trustworthiness":"verified"}},gu=e=>({structuredData:{product:Qr(e),article:Jr(e),aiOptimized:Rr(e)},openGraph:qa(e),twitterCard:$a(e),aiMetaTags:Ha(e),jsonLD:[Qr(e),Jr(e),Rr(e)]}),hu={homepage:{title:"Revolutionary Web3 Email Platform | Wallet-Based Authentication",description:"Transform your email experience - the first Web3 email platform using wallet authentication. No passwords, enhanced security, ENS/SNS domain support, and smart contract integration.",keywords:["Web3 email","blockchain email","wallet authentication","ENS email","SNS email","decentralized email","smart contract integration"],category:"Web3 Platform",audience:["Crypto Users","Web3 Developers","DeFi Users","DAO Members"],complexity:"beginner",contentType:"overview",readingTime:3,relatedTopics:["Web3 authentication","Blockchain communication","Decentralized identity"]},documentation:{title:"Documentation - Complete Web3 Email Setup Guide",description:"Comprehensive documentation for Web3 email platform. Learn wallet connection, ENS/SNS setup, smart contract integration, and advanced features.",keywords:["Web3 email guide","wallet connection","ENS setup","SNS configuration","smart contract email","blockchain documentation"],category:"Technical Documentation",audience:["Developers","Technical Users","Web3 Enthusiasts"],complexity:"intermediate",contentType:"guide",readingTime:15,relatedTopics:["Wallet integration","Blockchain protocols","Email security"]},earnPoints:{title:"How to Earn Points - Web3 Email Rewards Guide",description:"Master the points system. Earn rewards through email activities, referrals, smart contract interactions, and prepare for future token distribution.",keywords:["Web3 rewards","email points","blockchain rewards","referral program","token preparation","crypto incentives"],category:"Rewards Guide",audience:["Token Farmers","Crypto Users","Web3 Users"],complexity:"beginner",contentType:"tutorial",readingTime:8,relatedTopics:["Token economics","Reward systems","Referral marketing"]}},fu=e=>{const{level:r,text:a,className:n="",id:o,semanticContext:s="section"}=e,i=`h${r}`,l={1:"text-4xl md:text-5xl lg:text-6xl font-bold leading-tight",2:"text-3xl md:text-4xl font-bold leading-tight",3:"text-2xl md:text-3xl font-bold leading-tight",4:"text-xl md:text-2xl font-semibold leading-tight",5:"text-lg md:text-xl font-semibold leading-tight",6:"text-base md:text-lg font-medium leading-tight"},d={"page-title":"text-gray-900 dark:text-white mb-6",section:"text-gray-900 dark:text-white mb-4",subsection:"text-gray-900 dark:text-white mb-3",feature:"text-gray-900 dark:text-white mb-2",benefit:"text-blue-600 dark:text-blue-400 mb-2",step:"text-green-600 dark:text-green-400 mb-2"},c=[l[r],d[s],n].filter(Boolean).join(" "),g=o||a.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");return p.createElement(i,{id:g,className:c,"aria-level":r},a)},ie={pageTitle:(e,r)=>({level:1,text:e,className:r,semanticContext:"page-title"}),majorSection:(e,r)=>({level:2,text:e,className:r,semanticContext:"section"}),feature:(e,r)=>({level:3,text:e,className:r,semanticContext:"feature"}),benefit:(e,r)=>({level:3,text:e,className:r,semanticContext:"benefit"}),step:(e,r,a)=>({level:3,text:r?`Step ${r}: ${e}`:e,className:a,semanticContext:"step"}),subFeature:(e,r)=>({level:4,text:e,className:r,semanticContext:"feature"})},bu=e=>{const r=[],a=[],n=e.filter(o=>o.level===1).length;n===0?r.push("Missing H1 tag - every page should have exactly one H1"):n>1&&r.push(`Multiple H1 tags found (${n}) - use only one H1 per page`);for(let o=1;o<e.length;o++){const s=e[o],i=e[o-1];s.level>i.level+1&&r.push(`Heading level jump from H${i.level} to H${s.level} - avoid skipping levels`)}return e.forEach((o,s)=>{o.text.length<3&&r.push(`Heading ${s+1} is too short - use descriptive text`),o.text.length>70&&a.push(`Heading "${o.text.substring(0,30)}..." is long - consider shortening for better SEO`)}),{isValid:r.length===0,errors:r,suggestions:a}},mu={walletConnection:ie.pageTitle("Connect Your Web3 Wallet"),emailBenefits:ie.majorSection("Why Choose Web3 Email?"),securityFeature:ie.feature("Secure & Private"),ensIntegration:ie.feature("ENS Domain Support"),multiChain:ie.feature("Multi-Chain Compatibility"),passwordless:ie.benefit("No Passwords Required"),setupStep1:ie.step("Connect Your Wallet",1),setupStep2:ie.step("Verify Your Identity",2),setupStep3:ie.step("Access Your Emails",3)},yu=[{term:"Web3 Email",definition:"Email system that uses blockchain wallet addresses as authentication instead of traditional passwords",category:"Web3 Communication",synonyms:["blockchain email","decentralized email","crypto email"],relatedTerms:["wallet authentication","ENS email","SNS email"],examples:["vitalik.eth@example.com","alice.sol@example.com"],context:"Web3 email revolutionizes digital communication by eliminating passwords and using cryptographic signatures for authentication"},{term:"Wallet Authentication",definition:"Authentication method using cryptographic signatures from blockchain wallets instead of passwords",category:"Security",synonyms:["wallet-based auth","signature authentication","passwordless authentication"],relatedTerms:["EIP-712","SIWE","message signing"],examples:["MetaMask signature","Phantom wallet auth","WalletConnect login"],context:"Wallet authentication provides superior security through cryptographic proofs that cannot be phished or stolen like passwords"},{term:"ENS Email",definition:"Email addresses using Ethereum Name Service domains (.eth) as identifiers",category:"Naming Systems",synonyms:["Ethereum name email",".eth email"],relatedTerms:["ENS","Ethereum domains","blockchain domains"],examples:["vitalik.eth","ethereum.eth"],context:"ENS emails provide human-readable addresses that resolve to Ethereum wallet addresses"},{term:"SNS Email",definition:"Email addresses using Solana Name Service domains (.sol) as identifiers",category:"Naming Systems",synonyms:["Solana name email",".sol email"],relatedTerms:["SNS","Solana domains","SPL domains"],examples:["anatoly.sol","solana.sol"],context:"SNS emails provide human-readable addresses for Solana ecosystem users"},{term:"Smart Contract Integration",definition:"Ability to send and receive emails triggered by blockchain smart contract events",category:"Blockchain Integration",synonyms:["contract notifications","on-chain email triggers"],relatedTerms:["event listeners","webhooks","contract automation"],examples:["DAO proposal notifications","DeFi alert emails","NFT sale confirmations"],context:"Smart contract integration enables automated communication based on blockchain events"},{term:"Multi-Chain Support",definition:"Compatibility with multiple blockchain networks for wallet authentication and email services",category:"Interoperability",synonyms:["cross-chain support","blockchain agnostic"],relatedTerms:["EVM chains","Solana","Layer 2"],examples:["Ethereum, Polygon, Arbitrum, Solana support"],context:"Multi-chain support ensures users from any blockchain ecosystem can use the email service"},{term:"DAO Email Delegation",definition:"System allowing DAOs to manage email communications through delegated authorities",category:"Governance",synonyms:["governance email","multi-sig email"],relatedTerms:["DAO governance","multi-signature","delegation"],examples:["Treasury notifications","Proposal alerts","Voting reminders"],context:"DAO email delegation enables decentralized organizations to manage communications efficiently"},{term:"Web2/Web3 Bridge",definition:"Technology enabling communication between traditional email systems and blockchain-based email",category:"Interoperability",synonyms:["email bridge","legacy integration"],relatedTerms:["SMTP gateway","email forwarding","protocol bridge"],examples:["Gmail to Web3 email","Outlook integration"],context:"Web2/Web3 bridge ensures compatibility with existing email infrastructure"}],pu=e=>({"@context":"https://schema.org","@type":"LearningResource",educationalLevel:e.difficulty,learningResourceType:"Technical Documentation",timeRequired:e.estimatedTime?`PT${e.estimatedTime}M`:void 0,teaches:e.learningObjectives,requires:e.prerequisites,about:{"@type":"Thing",name:e.domain,category:e.category,subcategory:e.subcategory},keywords:e.concepts,applicationExample:e.practicalApplications,isRelatedTo:e.relatedConcepts}),vu=e=>{const r={nodes:e.map(a=>({id:a.term,label:a.term,category:a.category,definition:a.definition})),edges:[]};return e.forEach(a=>{a.relatedTerms?.forEach(n=>{e.find(s=>s.term===n)&&r.edges.push({source:a.term,target:n,relationship:"related_to"})}),a.synonyms?.forEach(n=>{r.edges.push({source:a.term,target:n,relationship:"synonym_of"})})}),r},wu=e=>{const r=[];return e.examples?.forEach(a=>{r.push({text:a,label:e.term,type:"positive",confidence:1})}),e.context&&r.push({text:e.context,label:e.term,type:"contextual",confidence:.8}),r.push({text:`${e.term} is ${e.definition}`,label:e.term,type:"definition",confidence:1}),r},ku=e=>{const r=[];return e.forEach(a=>{r.push({question:`What is ${a.term}?`,answer:a.definition,category:a.category,difficulty:"basic"}),a.context&&r.push({question:`How does ${a.term} work?`,answer:a.context,category:a.category,difficulty:"intermediate"}),a.examples&&a.examples.length>0&&r.push({question:`What are examples of ${a.term}?`,answer:a.examples.join(", "),category:a.category,difficulty:"basic"}),a.relatedTerms&&a.relatedTerms.length>0&&r.push({question:`What is ${a.term} related to?`,answer:`${a.term} is related to ${a.relatedTerms.join(", ")}`,category:a.category,difficulty:"intermediate"})}),r},xu={homepage:{domain:"Web3 Email Platform",category:"Web3 Communication",concepts:["Web3 email","wallet authentication","passwordless login","blockchain messaging"],prerequisites:["Basic blockchain knowledge","Understanding of crypto wallets"],learningObjectives:["Understand Web3 email concepts","Learn wallet authentication","Explore blockchain communication"],difficulty:"beginner",estimatedTime:5,practicalApplications:["Secure email communication","DAO governance","DeFi notifications"]},documentation:{domain:"Web3 Email Technical Documentation",category:"Technical Guide",concepts:["API integration","smart contracts","wallet connection","email protocols"],prerequisites:["JavaScript/TypeScript","Web3 development basics","REST APIs"],learningObjectives:["Implement Web3 email","Integrate wallet authentication","Build on email API"],difficulty:"intermediate",estimatedTime:30,practicalApplications:["dApp integration","Email automation","Smart contract notifications"]},governance:{domain:"DAO Governance Communication",category:"Governance Tools",concepts:["DAO email","voting notifications","proposal tracking","multi-sig coordination"],prerequisites:["DAO basics","Governance understanding","Multi-signature wallets"],learningObjectives:["Setup DAO email","Configure voting alerts","Manage team communication"],difficulty:"advanced",estimatedTime:20,practicalApplications:["DAO operations","Treasury management","Governance participation"]}},Nu=({children:e,appName:r,appUrl:a,apiUrl:n})=>(p.useEffect(()=>{const o=()=>{[].forEach(b=>{const y=document.createElement("link");y.rel="preload",y.href=b.href,y.as=b.as,b.type&&(y.type=b.type),b.crossorigin&&(y.crossOrigin=""),document.head.appendChild(y)})},s=()=>{document.querySelectorAll('img[data-priority="high"]').forEach(y=>{y.fetchPriority="high"});const b=document.querySelector("[data-hero]");if(b){const y=b.getAttribute("data-bg-image");if(y){const v=document.createElement("link");v.rel="preload",v.href=y,v.as="image",document.head.appendChild(v)}}},i=()=>{document.querySelectorAll("img:not([width]):not([height])").forEach(y=>{const v=y;v.naturalWidth&&v.naturalHeight&&(v.width=v.naturalWidth,v.height=v.naturalHeight)}),document.querySelectorAll("[data-dynamic]").forEach(y=>{y.getAttribute("style")?.includes("min-height")||(y.style.minHeight="200px")})},l=()=>{const m=()=>{document.querySelectorAll("script[data-defer]").forEach(v=>{v.setAttribute("defer","")})};"requestIdleCallback"in window?requestIdleCallback(()=>{m()}):setTimeout(m,1),(()=>{["scroll","touchstart","touchmove","wheel"].forEach(v=>{document.addEventListener(v,()=>{},{passive:!0})})})()},d=()=>{},c=()=>{[{rel:"dns-prefetch",href:"//fonts.googleapis.com"},...n?[{rel:"dns-prefetch",href:`//${n.replace(/^https?:\/\//,"")}`}]:[],{rel:"preconnect",href:"https://fonts.gstatic.com",crossorigin:!0},...n?[{rel:"preconnect",href:n}]:[]].forEach(b=>{const y=document.createElement("link");y.rel=b.rel,y.href=b.href,b.crossorigin&&(y.crossOrigin=""),document.head.appendChild(y)})},g=()=>{if(document.querySelectorAll("img[data-lazy]").forEach(b=>{b.loading="lazy"}),"IntersectionObserver"in window){const b=new IntersectionObserver(v=>{v.forEach(T=>{if(T.isIntersecting){const N=T.target;N.dataset.src&&(N.src=N.dataset.src,N.removeAttribute("data-src")),b.unobserve(N)}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(v=>b.observe(v))}},h=()=>{[{name:"ai-content-type",content:"web3-email-platform"},{name:"ai-primary-function",content:"wallet-based-email"},{name:"ai-supported-chains",content:"ethereum,solana,polygon,arbitrum,optimism"},{name:"ai-complexity-level",content:"beginner-to-advanced"},{name:"ai-target-users",content:"web3-users,crypto-enthusiasts,developers"},{name:"machine-readable",content:"true"},{name:"structured-data",content:"json-ld"},{name:"content-category",content:"technology,blockchain,communication"},{name:"interaction-model",content:"wallet-authentication"}].forEach(({name:v,content:T})=>{if(!document.querySelector(`meta[name="${v}"]`)){const N=document.createElement("meta");N.name=v,N.content=T,document.head.appendChild(N)}});const b={"@context":"https://schema.org","@type":"WebApplication",name:r,description:"Web3 email platform using blockchain wallet authentication",url:a,applicationCategory:"CommunicationApplication",operatingSystem:"Web Browser",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},featureList:["Wallet-based authentication","ENS domain email support","SNS domain email support","Multi-chain compatibility","Smart contract integration","Web2/Web3 bridge"],audience:{"@type":"Audience",audienceType:"Web3 Users"}},y=document.createElement("script");y.type="application/ld+json",y.textContent=JSON.stringify(b),document.head.appendChild(y)},w=()=>{document.querySelectorAll('link[rel="stylesheet"][data-non-critical]').forEach(b=>{const y=b.cloneNode(!0);y.rel="preload",y.as="style",y.onload=()=>{y.onload=null,y.rel="stylesheet"},document.head.appendChild(y),b.remove()})};return o(),s(),i(),l(),c(),g(),h(),w(),setTimeout(d,2e3),()=>{}},[n,r,a]),t.jsx(t.Fragment,{children:e})),Cu=()=>(p.useEffect(()=>{if(typeof window>"u"||typeof document>"u"||!document.documentElement)return;const e=()=>{if("IntersectionObserver"in window){const l=new IntersectionObserver(d=>{d.forEach(c=>{if(c.isIntersecting){const g=c.target;g.dataset.src&&(g.src=g.dataset.src,g.removeAttribute("data-src"),l.unobserve(g))}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(d=>{l.observe(d)})}const o=()=>{["/connect","/mail","/settings"].forEach(d=>{const c=document.createElement("link");c.rel="prefetch",c.href=d,document.head.appendChild(c)})},s=()=>{if(!document.querySelector("script[data-wallet-detection]")){const l=document.createElement("script");l.dataset.walletDetection="true",l.innerHTML='(function() { window.walletPreload = { hasMetaMask: typeof window.ethereum !== "undefined", hasPhantom: typeof window.solana !== "undefined", hasWalletConnect: true }; })();',document.head.appendChild(l)}},i=()=>{document.querySelectorAll("img[data-hero]").forEach(l=>{const d=l;d.loading="eager","fetchPriority"in d&&(d.fetchPriority="high")}),document.querySelectorAll('img[data-priority="low"]').forEach(l=>{const d=l;d.loading="lazy","fetchPriority"in d&&(d.fetchPriority="low")})};requestIdleCallback(()=>{o(),s(),i()},{timeout:2e3})},r=()=>{if("PerformanceObserver"in window){const o=new PerformanceObserver(i=>{const l=i.getEntries(),d=l[l.length-1];d&&d.startTime>2500&&(document.documentElement.style.setProperty("--animation-duration","0s"),localStorage.setItem("reduce-image-quality","true"))});try{o.observe({entryTypes:["largest-contentful-paint"]})}catch{}const s=new PerformanceObserver(i=>{let l=0;for(const d of i.getEntries())d.hadRecentInput||(l+=d.value);l>.1&&document.querySelectorAll("img:not([width]):not([height])").forEach(d=>{const c=d;c.style.aspectRatio="16/9"})});try{s.observe({entryTypes:["layout-shift"]})}catch{}}},a=()=>{if("connection"in navigator&&typeof document<"u"&&document.documentElement){const o=navigator.connection;if(o){const s=o.effectiveType;s==="slow-2g"||s==="2g"?(document.documentElement.classList.add("slow-connection"),document.querySelectorAll('link[rel="prefetch"]').forEach(i=>{i.getAttribute("data-critical")||i.remove()}),localStorage.setItem("use-low-quality-images","true")):s==="3g"?document.documentElement.classList.add("moderate-connection"):document.documentElement.classList.add("fast-connection")}}};return(()=>{e(),r(),a()})(),()=>{if("PerformanceObserver"in window)try{PerformanceObserver.supportedEntryTypes.forEach(()=>{})}catch{}}},[]),null),Su=({children:e})=>t.jsx(t.Fragment,{children:e}),Ga={user:{duration:300*1e3,maxSize:100,staleWhileRevalidate:!0},mailboxes:{duration:120*1e3,maxSize:50,staleWhileRevalidate:!0},addresses:{duration:600*1e3,maxSize:50,staleWhileRevalidate:!0},messages:{duration:30*1e3,maxSize:200,staleWhileRevalidate:!0},messageDetails:{duration:120*1e3,maxSize:100,staleWhileRevalidate:!1},messageCount:{duration:10*1e3,maxSize:20,staleWhileRevalidate:!0}};class Eu{constructor(){this.cache=new Map}set(r,a,n){if(this.cache.size>=n.maxSize){const o=this.cache.keys().next().value;o&&this.cache.delete(o)}this.cache.set(r,{data:a,timestamp:Date.now(),isStale:!1})}get(r,a){const n=this.cache.get(r);if(!n)return null;const s=Date.now()-n.timestamp>a.duration;return s&&!a.staleWhileRevalidate?(this.cache.delete(r),null):{data:n.data,isStale:s}}invalidate(r){for(const a of this.cache.keys())a.includes(r)&&this.cache.delete(a)}clear(){this.cache.clear()}getStats(){return{size:this.cache.size,keys:Array.from(this.cache.keys()),memory:this.estimateMemoryUsage()}}estimateMemoryUsage(){return Array.from(this.cache.values()).reduce((r,a)=>r+JSON.stringify(a).length*2,0)}}const Pe=new Eu,Te=new Map,Ya=async(e,r,a="messages")=>{const n=Ga[a],o=Pe.get(e,n);if(o&&!o.isStale)return o.data;const s=Te.get(e);if(s)return s;if(o&&o.isStale&&n.staleWhileRevalidate){const l=r().then(d=>(Pe.set(e,d,n),Te.delete(e),d)).catch(d=>{throw Te.delete(e),d});return Te.set(e,l),o.data}const i=r().then(l=>(Pe.set(e,l,n),Te.delete(e),l)).catch(l=>{throw Te.delete(e),l});return Te.set(e,i),i};class Tu{constructor(){this.queue=[],this.timer=null,this.batchDelay=10}add(r,a){return new Promise((n,o)=>{this.queue.push({key:r,fetcher:a,resolve:n,reject:o}),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.processBatch()},this.batchDelay)})}async processBatch(){const r=[...this.queue];this.queue.length=0,this.timer=null;const a=this.groupRequests(r);for(const n of a)await Promise.allSettled(n.map(async o=>{try{const s=await o.fetcher();o.resolve(s)}catch(s){o.reject(s)}}))}groupRequests(r){const a=[];for(let o=0;o<r.length;o+=5)a.push(r.slice(o,o+5));return a}}const Au=new Tu;class Iu{constructor(r,a={}){this.requestInterceptors=[],this.responseInterceptors=[],this.baseURL=r,this.defaultHeaders=a}addRequestInterceptor(r){this.requestInterceptors.push(r)}addResponseInterceptor(r){this.responseInterceptors.push(r)}async request(r,a={},n,o="messages"){const s=`${this.baseURL}${r}`,i=n||`${a.method||"GET"}:${s}`,l=async()=>{let d={...a,headers:{...this.defaultHeaders,...a.headers}};for(const g of this.requestInterceptors)d=g(d);let c=await fetch(s,d);for(const g of this.responseInterceptors)c=await g(c);if(!c.ok)throw new Error(`API Error: ${c.status} ${c.statusText}`);return c.json()};return a.method==="GET"&&this.shouldBatch(r)?Au.add(i,l):Ya(i,l,o)}shouldBatch(r){return r.includes("/messages/")&&!r.includes("/messages?")}async get(r,a){return this.request(r,{method:"GET"},void 0,a)}async post(r,a){return this.request(r,{method:"POST",body:JSON.stringify(a)})}async put(r,a){return this.request(r,{method:"PUT",body:JSON.stringify(a)})}async delete(r){return this.request(r,{method:"DELETE"})}}const Mu=async(e,r=3,a=1e3)=>{let n;for(let o=0;o<=r;o++)try{return await e()}catch(s){if(n=s,o===r)throw n;const i=a*Math.pow(2,o)+Math.random()*1e3;await new Promise(l=>setTimeout(l,i))}throw n};class Lu{constructor(){this.abortController=new AbortController}async request(r,a={}){const n=await fetch(r,{...a,signal:this.abortController.signal});if(!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);return n.json()}cancel(){this.abortController.abort()}}const Pu={invalidate:e=>Pe.invalidate(e),clear:()=>Pe.clear(),getStats:()=>Pe.getStats(),warmUp:async e=>{await Promise.allSettled(e.map(r=>r()))},prefetch:async e=>{"requestIdleCallback"in window?window.requestIdleCallback(async()=>{await Promise.allSettled(e.map(r=>r()))}):setTimeout(async()=>{await Promise.allSettled(e.map(r=>r()))},100)}};function Ka(){if(typeof window>"u")return!1;const e=window.navigator.userAgent.toLowerCase();return["metamask","trustwallet","coinbase","rainbow","phantom","solflare","exodus","ledger","binance","okx"].some(a=>e.includes(a))}function Za(){return typeof window>"u"?!1:window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"}function Xa(){if(typeof window>"u")return!1;const e=window.location.hostname;return/^\d+\.\d+\.\d+\.\d+$/.test(e)}function Qa(){return Za()?"localhost":Ka()?"wallet-browser":Xa()?"network":"production"}function Ou(){const e=Qa();return e==="localhost"||e==="wallet-browser"}function Uu(e){}function Ja(){return typeof window<"u"}function Du(){return typeof window<"u"}function ju(e,r){if(Ja())e();else return r}const et=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'",...e?.apiUrls||[],...e?.appUrls||[],"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'"]}),_u=et(),Ra=e=>{const r=et(e);return Object.entries(r).map(([a,n])=>`${a} ${n.join(" ")}`).join("; ")},en=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":Ra(e)}),zu=en(),Bu={fonts:"public, max-age=31536000, immutable",images:"public, max-age=31536000, immutable",js:"public, max-age=31536000, immutable",css:"public, max-age=31536000, immutable",serviceWorker:"public, max-age=0, must-revalidate",manifest:"public, max-age=86400",api:"no-cache, no-store, must-revalidate"},Wu=()=>{typeof window<"u"&&document.addEventListener("securitypolicyviolation",()=>{})},Fu={walletConnections:"Always verify wallet signatures and never trust client-side data",rpcEndpoints:"Use reputable RPC providers and consider rate limiting",contractInteractions:"Validate all smart contract interactions on the backend",userInput:"Sanitize all user inputs, especially wallet addresses and transaction data",privateKeys:"Never log, store, or transmit private keys - they should remain in wallets only",phishing:"Implement strict CSP to prevent injection of malicious scripts that could steal wallet access"},ue=new Map,qe=new Map,cr=new Set;let $e="medium",rt=!1;function Vu(){if("connection"in navigator){const a=navigator.connection;a&&($e=a.effectiveType==="4g"?"fast":a.effectiveType==="3g"?"medium":"slow")}const e=navigator.deviceMemory,r=navigator.hardwareConcurrency;rt=e&&e<4||r&&r<4}Vu();function qu(e,r,a={}){const{retries:n=3,timeout:o=1e4,fallback:s,preloadCondition:i,cacheStrategy:l="memory",priority:d="medium",onLoad:c,onError:g}=a;if(ue.has(r))return ue.get(r).component;const h=p.lazy(async()=>{const m=performance.now();if(qe.has(r))return qe.get(r).then(y=>({default:y}));const b=$u(e,n,o);qe.set(r,b.then(y=>y.default));try{const y=await b,v=performance.now()-m;if(l!=="none"){const T={component:y.default,timestamp:Date.now(),loadTime:v};if(ue.set(r,T),l==="session")try{sessionStorage.setItem(`lazy_${r}`,JSON.stringify({timestamp:T.timestamp,loadTime:v}))}catch{}}return qe.delete(r),c?.(y.default),y}catch(y){throw qe.delete(r),g?.(y),y}}),w=m=>{const[b,y]=p.useState(!0);p.useEffect(()=>{if(i&&!ue.has(r)&&i()&&!cr.has(r)){cr.add(r);const N=Hu(d,$e);setTimeout(()=>{e().catch(()=>{})},N)}},[]);const v=s||t.jsxs("div",{className:"flex items-center justify-center p-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsxs("span",{className:"ml-2 text-sm text-gray-600",children:["Loading ",r.replace(/([A-Z])/g," $1").trim(),"..."]})]});return!b&&rt&&$e==="slow"?t.jsx("div",{className:"lazy-placeholder",children:t.jsxs("button",{onClick:()=>y(!0),className:"load-component-btn",children:["Load ",r]})}):t.jsx(p.Suspense,{fallback:v,children:t.jsx(h,{...m})})};return w.displayName=`AdvancedLazy(${r})`,w}async function $u(e,r,a){let n;for(let o=0;o<r;o++)try{const s=new Promise((l,d)=>{setTimeout(()=>d(new Error("Load timeout")),a)});return await Promise.race([e(),s])}catch(s){if(n=s,o<r-1){const i=Math.pow(2,o)*1e3,l=Math.random()*1e3;await new Promise(d=>setTimeout(d,i+l))}}throw n}function Hu(e,r){const a={critical:0,high:500,medium:2e3,low:5e3},n={fast:.5,medium:1,slow:2},o=a[e]||2e3,s=n[r]||1;return o*s}const Ze=class Ze{static registerRoute(r,a){this.routeMap.set(r,a),this.routeUsageStats.set(r,0)}static setCurrentRoute(r){this.currentRoute=r;const a=this.routeUsageStats.get(r)||0;this.routeUsageStats.set(r,a+1),this.preloadLikelyRoutes(r)}static preloadLikelyRoutes(r){this.getRouteTransitionProbability(r).forEach(({route:n,probability:o})=>{o>.3&&!ue.has(n)&&setTimeout(()=>{this.routeMap.get(n)},$e==="fast"?1e3:3e3)})}static getRouteTransitionProbability(r){const a=[];switch(r){case"/":a.push({route:"/connect",probability:.7},{route:"/about",probability:.2},{route:"/document",probability:.1});break;case"/connect":a.push({route:"/mail",probability:.8},{route:"/settings",probability:.1});break;case"/mail":a.push({route:"/compose",probability:.4},{route:"/settings",probability:.2});break;default:a.push({route:"/",probability:.1})}return a}static getStats(){return{routeCount:this.routeMap.size,cacheSize:ue.size,currentRoute:this.currentRoute,usageStats:Object.fromEntries(this.routeUsageStats)}}};Ze.routeMap=new Map,Ze.routeUsageStats=new Map,Ze.currentRoute="";let tt=Ze;const Gu=({src:e,alt:r,className:a,placeholder:n,priority:o="medium"})=>{const[s,i]=p.useState(!1),[l,d]=p.useState(!1),c=p.useRef(null);p.useEffect(()=>{if(!c.current)return;if(o==="high"){d(!0);return}const h=new IntersectionObserver(([w])=>{w.isIntersecting&&(d(!0),h.unobserve(w.target))},{rootMargin:o==="low"?"100px":"200px",threshold:.1});return h.observe(c.current),()=>h.disconnect()},[o]);const g=()=>{i(!0)};return t.jsxs("div",{className:`lazy-image-container ${a}`,children:[t.jsx("img",{ref:c,src:l?e:n||"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB2aWV3Qm94PSIwIDAgMSAxIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiNGM0Y0RjYiLz48L3N2Zz4=",alt:r,className:`transition-opacity duration-300 ${s?"opacity-100":"opacity-0"}`,onLoad:g,loading:o==="high"?"eager":"lazy",fetchPriority:o==="high"?"high":"low"}),!s&&l&&t.jsx("div",{className:"absolute inset-0 bg-gray-200 animate-pulse rounded"})]})};function Yu(){ue.clear(),cr.clear()}function Ku(){return{cachedComponents:ue.size,preloadQueue:cr.size,networkSpeed:$e,isLowEndDevice:rt,cacheEntries:Array.from(ue.entries()).map(([e,r])=>({name:e,loadTime:r.loadTime,age:Date.now()-r.timestamp}))}}const Zu=({message:e})=>t.jsxs("div",{className:"flex items-center justify-center p-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:"ml-2 text-sm text-gray-600",children:e})]}),Xu=e=>{if(typeof e=="function"||typeof e=="object")return e;switch(e){case"minimal":return()=>t.jsx("div",{className:"flex justify-center items-center p-4",children:"Loading..."});case"skeleton":return()=>t.jsxs("div",{className:"animate-pulse",children:[t.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4 mb-2"}),t.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/2"})]});case"default":default:return()=>t.jsx(Zu,{message:"Loading component..."})}},rn=(e,r="default",a=3)=>{const n=p.lazy(async()=>{let s=null;for(let i=0;i<a;i++)try{return await e()}catch(l){s=l,i<a-1&&await new Promise(d=>setTimeout(d,Math.pow(2,i)*1e3))}throw s}),o=Xu(r);return s=>t.jsx(p.Suspense,{fallback:t.jsx(o,{}),children:t.jsx(n,{...s})})},Qu=async e=>{try{await e()}catch{}},Ju=e=>{const r={};return Object.entries(e).forEach(([a,n])=>{r[a]=rn(n,"skeleton")}),r},Ru=e=>e,tn={critical:["/","/connect","/mail"],secondary:["/settings","/compose","/points"],optional:["/document","/about","/terms","/privacy"]},Xe=class Xe{static add(r,a){this.preloadedComponents.has(r)||(this.preloadQueue.push({name:r,loader:a}),this.processQueue())}static async processQueue(){this.isPreloading||this.preloadQueue.length===0||(this.isPreloading=!0,"requestIdleCallback"in window?window.requestIdleCallback(async()=>{const r=this.preloadQueue.shift();if(r)try{await r.loader(),this.preloadedComponents.add(r.name)}catch{}this.isPreloading=!1,this.processQueue()}):setTimeout(async()=>{const r=this.preloadQueue.shift();if(r)try{await r.loader(),this.preloadedComponents.add(r.name)}catch{}this.isPreloading=!1,this.processQueue()},100))}static isPreloaded(r){return this.preloadedComponents.has(r)}static clear(){this.preloadedComponents.clear(),this.preloadQueue=[],this.isPreloading=!1}};Xe.preloadedComponents=new Set,Xe.preloadQueue=[],Xe.isPreloading=!1;let at=Xe;const eg=()=>{"requestIdleCallback"in window&&window.requestIdleCallback(()=>{tn.secondary.forEach(e=>{})})},an=({message:e})=>t.jsxs("div",{className:"flex items-center justify-center p-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:"ml-2 text-sm text-gray-600",children:e})]}),He=new Map;function rg(e,r){const{condition:a,fallback:n,retries:o=3,timeout:s=1e4,priority:i="medium",cacheKey:l=`conditional-${Math.random()}`}=r,d=c=>{const[g,h]=p.useState(!1),[w,m]=p.useState(null);return p.useEffect(()=>{const v=setTimeout(async()=>{const T=He.get(l);if(T&&T.isValid&&Date.now()-T.lastCheck<3e5)try{if(await T.condition()){m(()=>T.component),h(!0);return}}catch{}try{if(await a()){const S=await ng(e,o,s);He.set(l,{component:S.default,condition:a,lastCheck:Date.now(),isValid:!0}),m(()=>S.default),h(!0)}}catch{}},i==="high"?0:i==="medium"?100:500);return()=>clearTimeout(v)},[]),g?w?t.jsx(p.Suspense,{fallback:n||t.jsx(an,{message:"Loading component..."}),children:t.jsx(w,{...c})}):null:n||t.jsx(an,{message:"Checking conditions..."})};return d.displayName=`ConditionalLazy(${l})`,d}const tg={},ag={};async function ng(e,r,a){let n;for(let o=0;o<r;o++)try{const s=new Promise((i,l)=>{setTimeout(()=>l(new Error("Import timeout")),a)});return await Promise.race([e(),s])}catch(s){if(n=s,o<r-1){const i=Math.pow(2,o)*1e3;await new Promise(l=>setTimeout(l,i))}}throw n}function og(){He.clear()}function sg(){return{cachedComponents:He.size,cacheEntries:Array.from(He.entries()).map(([e,r])=>({key:e,lastCheck:r.lastCheck,isValid:r.isValid,age:Date.now()-r.lastCheck}))}}const nn=[{name:"react-router",path:"/assets/react-router-*.js",size:12,config:{priority:"critical",condition:()=>!0}},{name:"app-core",path:"/assets/app-core-*.js",size:25,config:{priority:"high",condition:()=>window.location.pathname==="/",delay:1e3,onIdle:!0}},{name:"wagmi",path:"/assets/wagmi-*.js",size:15,config:{priority:"high",condition:()=>!!(window.ethereum||localStorage.getItem("walletconnect")),onIdle:!0}},{name:"wc-ethereum",path:"/assets/wc-ethereum-*.js",size:273,config:{priority:"medium",condition:()=>!!window.ethereum,delay:2e3,onHover:!0}},{name:"solana-core",path:"/assets/solana-core-*.js",size:29,config:{priority:"medium",condition:()=>!!(window.solana||window.phantom),delay:1500}},{name:"mail-features",path:"/assets/mail-features-*.js",size:10,config:{priority:"medium",condition:()=>window.location.pathname.includes("/connect")||localStorage.getItem("wallet-connected")==="true",onScroll:20}},{name:"coinbase",path:"/assets/coinbase-*.js",size:75,config:{priority:"low",condition:()=>!!window.ethereum,delay:5e3,onIdle:!0}},{name:"design-system",path:"/assets/design-system-*.js",size:112,config:{priority:"low",condition:()=>window.location.pathname.includes("/internal"),delay:3e3}}];class ig{constructor(){this.preloaded=new Set,this.networkSpeedEstimate="medium",this.isLowEndDevice=!1,this.userActivityScore=0,this.detectNetworkSpeed(),this.detectDeviceCapability(),this.startUserActivityTracking()}detectNetworkSpeed(){if("connection"in navigator){const a=navigator.connection;if(a){const n=a.effectiveType;n==="4g"?this.networkSpeedEstimate="fast":n==="3g"?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}}const r=performance.now();fetch("/favicon.ico",{method:"HEAD"}).then(()=>{const a=performance.now()-r;a<100?this.networkSpeedEstimate="fast":a<300?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}).catch(()=>{this.networkSpeedEstimate="slow"})}detectDeviceCapability(){const r=navigator.deviceMemory,a=navigator.hardwareConcurrency;r&&r<4&&(this.isLowEndDevice=!0),a&&a<4&&(this.isLowEndDevice=!0),"getBattery"in navigator&&navigator.getBattery?.().then(n=>{n.level&&n.level<.2&&(this.isLowEndDevice=!0)})}startUserActivityTracking(){let r;const a=()=>{this.userActivityScore=Math.min(this.userActivityScore+1,100),clearTimeout(r),r=setTimeout(()=>{this.userActivityScore=Math.max(this.userActivityScore-1,0)},5e3)};["click","scroll","keydown","mousemove"].forEach(n=>{document.addEventListener(n,a,{passive:!0})})}shouldPreload(r){return this.networkSpeedEstimate==="slow"&&r.size>50||this.isLowEndDevice&&r.size>30?!1:r.config.condition()}async preloadChunk(r){if(!this.preloaded.has(r.name))try{if(document.querySelectorAll('script[src*="'+r.name+'"]').length===0&&document.querySelectorAll('link[href*="'+r.name+'"]').length>0)return;const n=document.createElement("link");n.rel="modulepreload",n.href=r.path.replace("*",this.getChunkHash(r.name)),n.crossOrigin="","fetchPriority"in n&&(n.fetchPriority=r.config.priority==="critical"?"high":"low"),document.head.appendChild(n),this.preloaded.add(r.name)}catch{}}getChunkHash(r){const a=Array.from(document.querySelectorAll("script[src]"));for(const n of a){const o=n.src;if(o.includes(r)){const s=o.match(new RegExp(`${r}-([A-Za-z0-9_-]+)\\.js`));if(s)return s[1]}}return"unknown"}async schedulePreload(r){const a=r.config;return a.delay&&await new Promise(n=>setTimeout(n,a.delay)),a.onIdle&&"requestIdleCallback"in window?new Promise(n=>{window.requestIdleCallback(()=>{this.preloadChunk(r).then(n)})}):this.preloadChunk(r)}initializePreloading(){nn.sort((a,n)=>{const o={critical:0,high:1,medium:2,low:3};return o[a.config.priority]-o[n.config.priority]}).forEach(a=>{this.shouldPreload(a)&&(a.config.priority==="critical"?this.preloadChunk(a):this.schedulePreload(a),a.config.onHover&&this.setupHoverPreloading(a),a.config.onScroll&&this.setupScrollPreloading(a,a.config.onScroll))}),this.startIntelligentPreloading()}setupHoverPreloading(r){document.querySelectorAll("[data-preload-on-hover]").forEach(n=>{let o=!1;n.addEventListener("mouseenter",()=>{!o&&this.userActivityScore>30&&(this.preloadChunk(r),o=!0)},{passive:!0})})}setupScrollPreloading(r,a){let n=!1;const o=()=>{if(n)return;window.scrollY/(document.body.scrollHeight-window.innerHeight)*100>=a&&(this.preloadChunk(r),n=!0,window.removeEventListener("scroll",o))};window.addEventListener("scroll",o,{passive:!0})}startIntelligentPreloading(){setTimeout(()=>{this.userActivityScore>50&&this.networkSpeedEstimate!=="slow"&&nn.filter(a=>a.config.priority==="medium"&&this.shouldPreload(a)).forEach(a=>{Math.random()>.5&&this.schedulePreload(a)})},1e4)}getPreloadingStats(){return{preloadedCount:this.preloaded.size,networkSpeed:this.networkSpeedEstimate,isLowEndDevice:this.isLowEndDevice,userActivity:this.userActivityScore}}}let Ge=null;function lg(){Ge||(Ge=new ig,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Ge?.initializePreloading()}):Ge.initializePreloading())}function cg(){return Ge?.getPreloadingStats()}function dg(e){const r={"ai-content-type":e.contentType,"ai-primary-topic":e.primaryTopic,"ai-complexity-level":e.complexityLevel,"ai-content-purpose":e.contentPurpose,"ai-industry-vertical":e.industryVertical,"ai-semantic-keywords":e.semanticKeywords.join(","),"ai-target-audience":e.targetAudience.join(","),"ai-technical-tags":e.technicalTags.join(","),"ai-user-intent":e.userIntent.join(","),"ai-conversion-goals":e.conversionGoals.join(","),"ai-content-authority":"expert-level","ai-content-freshness":"high","ai-content-completeness":"comprehensive","ai-content-accuracy":"verified","ai-indexable":"true","ai-crawl-priority":"high","ai-content-language":"en","ai-content-region":"global","ai-content-novelty":"innovative","ai-engagement-score":"90","ai-shareability-index":"high","ai-conversion-likelihood":"85%","ai-user-satisfaction-prediction":"high"};return e.contentType==="governance-page"&&(r["ai-governance-features"]="voting-notifications,multi-sig-coordination,proposal-tracking",r["ai-dao-platforms"]="snapshot,tally,aragon,safe,decentdao",r["ai-participation-boost"]="85%",r["ai-treasury-management"]="enabled"),r}function on(e){const r={"@context":"https://schema.org","@type":hg(e.contentType),name:e.primaryTopic,description:`Comprehensive ${e.primaryTopic} resource for ${e.targetAudience.join(", ")}`,about:e.semanticKeywords.map(a=>({"@type":"Thing",name:a})),audience:{"@type":"Audience",audienceType:e.targetAudience.join(", ")},educationalLevel:e.complexityLevel,inLanguage:"en",isAccessibleForFree:!0};return e.contentType==="governance-page"?{...r,"@type":"SoftwareApplication",applicationCategory:"GovernanceApplication",operatingSystem:"Web Browser",featureList:["Smart voting notifications","Multi-signature wallet coordination","Automated proposal tracking","Cross-platform DAO integration","Treasury management tools"],isRelatedTo:[{"@type":"SoftwareApplication",name:"Snapshot"},{"@type":"SoftwareApplication",name:"Tally"},{"@type":"SoftwareApplication",name:"Aragon"},{"@type":"SoftwareApplication",name:"Safe"}]}:r}function ug(e,r){return r.map(a=>({type:"related-content",target:a.url,strength:a.relevance}))}function sn(e){const r=["Web3 Email Platform","Web3","blockchain","email","wallet","cryptocurrency"],a=["DAO","governance","voting","multi-sig","Snapshot","Tally","Aragon","Safe","proposal","community"];return e.contentType==="governance-page"?[...r,...a]:r}function ln(e){const r=["web3-infrastructure","email-technology","blockchain-applications"],a=["dao-governance-tools","voting-notification-systems","community-management-platforms","multi-signature-coordination","treasury-management-solutions"];return e.contentType==="governance-page"?[...r,...a]:r}function gg(e,r){return{contentClassification:{type:e.contentType,topic:e.primaryTopic,audience:e.targetAudience.join(","),complexity:e.complexityLevel,purpose:e.contentPurpose,vertical:e.industryVertical},semanticMarkup:on(e),entityRecognition:sn(e),topicClustering:ln(e),contentRelationships:r?.contentRelationships||[],...r}}function hg(e){return{article:"Article","landing-page":"WebPage","product-page":"Product","governance-page":"SoftwareApplication",documentation:"TechArticle"}[e]||"WebPage"}function fg(e){return{"@context":"https://schema.org","@type":"MonitorAction",name:`AI Performance Tracking - ${e}`,instrument:{"@type":"SoftwareApplication",name:"AI Analytics Platform"},measurementTechnique:["User Engagement Metrics","AI Content Understanding Score","Semantic Relevance Analysis","Conversion Optimization Tracking"],result:{"@type":"Dataset",name:`${e} Performance Data`,description:"AI-optimized performance metrics and user interaction data"}}}const bg={governancePage:{contentType:"governance-page",primaryTopic:"DAO Governance Communication Platform",semanticKeywords:["DAO governance","voting notifications","multi-sig coordination","proposal tracking","community engagement","treasury management"],targetAudience:["DAO members","governance participants","multi-sig signers","protocol teams","community managers"],complexityLevel:"intermediate",contentPurpose:"commercial",industryVertical:"blockchain-governance",technicalTags:["snapshot","tally","aragon","safe","multi-sig","voting","proposals","treasury"],userIntent:["improve-governance","increase-participation","coordinate-multi-sig","track-proposals","engage-community"],conversionGoals:["dao-integration","governance-setup","multi-sig-connection","notification-activation"]},landingPage:{contentType:"landing-page",primaryTopic:"Web3 Email Platform",semanticKeywords:["Web3 email","wallet authentication","ENS email","SNS email","blockchain email","decentralized communication"],targetAudience:["Web3 users","crypto enthusiasts","blockchain developers","DeFi users"],complexityLevel:"beginner",contentPurpose:"commercial",industryVertical:"web3-communication",technicalTags:["ethereum","solana","ens","sns","wallet-connect","metamask","phantom"],userIntent:["create-web3-email","connect-wallet","secure-communication","eliminate-passwords"],conversionGoals:["wallet-connection","email-creation","first-email-sent","premium-upgrade"]}},mg=({message:e,className:r})=>t.jsxs("div",{className:`flex items-center justify-center p-4 ${r||""}`,children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:"ml-2 text-sm text-gray-600",children:e})]}),nt=new Map,Ye=new Set;function ot(){const e=[];return!!window.ethereum?.isMetaMask&&(Ye.add("metamask"),e.push({name:"MetaMask",detected:!0,priority:1})),!!window.ethereum?.isCoinbaseWallet&&(Ye.add("coinbase"),e.push({name:"Coinbase Wallet",detected:!0,priority:2})),!!window.solana?.isPhantom&&(Ye.add("phantom"),e.push({name:"Phantom",detected:!0,priority:3})),e.push({name:"WalletConnect",detected:!0,priority:4}),e.sort((o,s)=>o.priority-s.priority)}function st(e){const r=`wallet-${e.toLowerCase()}`;if(nt.has(r))return nt.get(r);const a=()=>Promise.resolve({default:()=>p.createElement("div",{},`${e} Provider Placeholder`)}),n=p.lazy(a),o=s=>t.jsx(p.Suspense,{fallback:t.jsx(mg,{message:`Loading ${e} wallet...`,className:"wallet-loading"}),children:t.jsx(n,{...s})});return o.displayName=`Lazy${e}Provider`,nt.set(r,o),o}function yg({children:e}){const r=ot();return r.filter(a=>a.priority<=2&&a.detected).forEach(a=>{setTimeout(()=>{},1e3)}),t.jsxs(t.Fragment,{children:[r.map(a=>{const n=st(a.name);return t.jsx(n,{},a.name)}),e]})}const dt=class dt{static preloadWallet(r){const a=r.toLowerCase();this.preloadedWallets.has(a)||(this.preloadedWallets.add(a),setTimeout(()=>{st(r)},500))}static preloadCommonWallets(){["metamask","walletconnect","coinbase"].forEach((a,n)=>{setTimeout(()=>{this.preloadWallet(a)},n*1e3)})}static getPreloadedWallets(){return Array.from(this.preloadedWallets)}};dt.preloadedWallets=new Set;let Ke=dt;function pg(){return{availableWallets:ot(),preloadWallet:n=>{Ke.preloadWallet(n)},getDetectedWallets:()=>Array.from(Ye),hasWallet:n=>Ye.has(n.toLowerCase())}}function vg({walletName:e,onConnect:r,disabled:a=!1}){const n=()=>{Ke.preloadWallet(e),setTimeout(r,100)};return t.jsxs("button",{onClick:n,disabled:a,className:"wallet-connect-btn","data-wallet":e.toLowerCase(),children:["Connect ",e]})}class wg{constructor(){this.criticalResources=[],this.observedMetrics={fcp:0,lcp:0,fid:0,cls:0,ttfb:0},this.defineCriticalResources(),this.startPerformanceObservation()}defineCriticalResources(){this.criticalResources=[{url:"/assets/index-*.css",type:"style",priority:"critical",preload:!0},{url:"/assets/index-*.js",type:"script",priority:"critical"},{url:"/assets/react-core-*.js",type:"script",priority:"high",preload:!0},{url:"https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2",type:"font",priority:"critical",preload:!0},{url:"/logo.png",type:"image",priority:"high",preload:!0}]}startPerformanceObservation(){if("PerformanceObserver"in window)try{new PerformanceObserver(s=>{for(const i of s.getEntries())i.name==="first-contentful-paint"&&(this.observedMetrics.fcp=i.startTime,this.optimizeBasedOnFCP(i.startTime))}).observe({entryTypes:["paint"]}),new PerformanceObserver(s=>{for(const i of s.getEntries())this.observedMetrics.lcp=i.startTime,this.optimizeBasedOnLCP(i.startTime)}).observe({entryTypes:["largest-contentful-paint"]});let n=0;new PerformanceObserver(s=>{for(const i of s.getEntries())i.hadRecentInput||(n+=i.value);this.observedMetrics.cls=n}).observe({entryTypes:["layout-shift"]})}catch{}window.addEventListener("load",()=>{setTimeout(()=>{const r=performance.getEntriesByType("navigation")[0];r&&(this.observedMetrics.ttfb=r.responseStart-r.requestStart,this.optimizeBasedOnTTFB(this.observedMetrics.ttfb))},0)})}optimizeBasedOnFCP(r){r>2e3?this.applyEmergencyOptimizations():r>1500&&this.applyMediumOptimizations()}optimizeBasedOnLCP(r){r>2500&&this.optimizeLCPElements()}optimizeBasedOnTTFB(r){r>600&&this.enableAggressiveCaching()}applyEmergencyOptimizations(){document.querySelectorAll('img[data-priority="low"]').forEach(n=>{n.loading="lazy",n.style.display="none",setTimeout(()=>{n.style.display=""},3e3)}),document.querySelectorAll('script[data-priority="low"]').forEach(n=>{n.setAttribute("defer","")})}applyMediumOptimizations(){["/assets/app-core-*.js","/assets/react-router-*.js"].forEach(a=>{this.preloadResource(a,"script")})}optimizeLCPElements(){document.querySelectorAll("img[data-hero], [data-lcp-element]").forEach(n=>{n instanceof HTMLImageElement&&(n.fetchPriority="high",n.loading="eager")});const a=document.querySelector("img[data-hero]")?.getAttribute("src");a&&this.preloadResource(a,"image")}enableAggressiveCaching(){const r=document.createElement("meta");r.httpEquiv="Cache-Control",r.content="public, max-age=31536000, immutable",document.head.appendChild(r)}preloadResource(r,a){if(document.querySelector(`link[href*="${r}"]`))return;const o=document.createElement("link");switch(o.rel="preload",o.href=r,a){case"script":o.as="script";break;case"style":o.as="style";break;case"font":o.as="font",o.type="font/woff2",o.crossOrigin="";break;case"image":o.as="image";break}document.head.appendChild(o)}optimizeCriticalPath(){this.criticalResources.filter(r=>r.priority==="critical"&&r.preload).forEach(r=>{this.preloadResource(r.url,r.type)}),this.inlineCriticalCSS(),this.optimizeFontLoading(),this.removeRenderBlocking(),this.setupProgressiveLoading()}inlineCriticalCSS(){const r=document.querySelector('link[rel="stylesheet"][data-critical]');r&&this.isSmallResource(r.getAttribute("href")||"")&&fetch(r.getAttribute("href")||"").then(a=>a.text()).then(a=>{if(a.length<1e4){const n=document.createElement("style");n.textContent=a,document.head.appendChild(n),r.remove()}}).catch(()=>{})}optimizeFontLoading(){document.querySelectorAll('link[href*="fonts.googleapis.com"]').forEach(a=>{const n=a.getAttribute("href")||"";if(!n.includes("display=swap")){const o=n.includes("?")?"&":"?";a.setAttribute("href",`${n}${o}display=swap`)}})}removeRenderBlocking(){document.querySelectorAll('link[rel="stylesheet"]:not([data-critical])').forEach(a=>{const n=a.cloneNode(!0);n.rel="preload",n.as="style",n.onload=()=>{n.onload=null,n.rel="stylesheet"};const o=document.createElement("noscript"),s=a.cloneNode(!0);o.appendChild(s),document.head.appendChild(n),document.head.appendChild(o),a.remove()})}setupProgressiveLoading(){const r=document.querySelectorAll("img[data-src]");if("IntersectionObserver"in window){const a=new IntersectionObserver(n=>{n.forEach(o=>{if(o.isIntersecting){const s=o.target;s.src=s.dataset.src||"",s.removeAttribute("data-src"),a.unobserve(s)}})},{rootMargin:"50px 0px",threshold:.01});r.forEach(n=>a.observe(n))}else r.forEach(a=>{const n=a;n.src=n.dataset.src||""})}isSmallResource(r){return r.includes("critical")||r.includes("inline")}getPerformanceMetrics(){return{...this.observedMetrics,score:this.calculatePerformanceScore()}}calculatePerformanceScore(){let r=100;return this.observedMetrics.fcp>2e3?r-=20:this.observedMetrics.fcp>1500&&(r-=10),this.observedMetrics.lcp>2500?r-=25:this.observedMetrics.lcp>2e3&&(r-=15),this.observedMetrics.cls>.1?r-=15:this.observedMetrics.cls>.05&&(r-=8),this.observedMetrics.ttfb>600?r-=10:this.observedMetrics.ttfb>400&&(r-=5),Math.max(r,0)}}const dr={mark:e=>{typeof performance<"u"&&performance.mark&&performance.mark(e)},measure:(e,r,a)=>{if(typeof performance<"u"&&performance.measure)try{performance.measure(e,r,a);const n=performance.getEntriesByName(e);return n[n.length-1]?.duration||0}catch{return 0}return 0},getEntries:e=>typeof performance<"u"&&performance.getEntriesByName?e?performance.getEntriesByName(e):performance.getEntries():[],clearEntries:e=>{typeof performance<"u"&&(e?(performance.clearMeasures?.(e),performance.clearMarks?.(e)):(performance.clearMeasures?.(),performance.clearMarks?.()))}},kg=(e,r=[])=>{p.useEffect(()=>(dr.mark(`${e}-start`),()=>{dr.mark(`${e}-end`),dr.measure(e,`${e}-start`,`${e}-end`)}),[e,r])},xg=e=>{const r=p.useRef(e);return r.current=e,p.useCallback((...a)=>r.current(...a),[])},Ng=(e,r,a)=>{const n=p.useRef(r),o=p.useRef(void 0);return p.useMemo(()=>(a&&process.env.NODE_ENV==="development"&&r.some((s,i)=>s!==n.current[i]),n.current=r,o.current=e(),o.current),[e,a,r])},ur=new Map,Cg=e=>{const r=ur.get(e)||0;ur.set(e,r+1),p.useEffect(()=>{process.env.NODE_ENV})},Sg=()=>Object.fromEntries(ur),Eg=()=>ur.clear(),Tg=e=>p.lazy(e),Ag=(e=.1)=>{const[r,a]=p.useState(new Set),n=p.useRef(null);p.useEffect(()=>(n.current=new IntersectionObserver(s=>{s.forEach(i=>{if(i.isIntersecting){const l=i.target,d=l.dataset.src;d&&(l.src=d,l.onload=()=>{a(c=>new Set(c).add(d))},n.current?.unobserve(l))}})},{threshold:e}),()=>n.current?.disconnect()),[e]);const o=p.useCallback(s=>{s&&n.current&&n.current.observe(s)},[]);return{loadedImages:r,observeImage:o}},Ig=e=>{typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(()=>{e().catch(()=>{})}):setTimeout(()=>{e().catch(()=>{})},100)},cn={},Mg=e=>{cn[e.name]=e.value,process.env.NODE_ENV},Lg=()=>cn,Pg=(e,r="script")=>{if(typeof document<"u"){const a=document.createElement("link");a.rel="prefetch",a.href=e,a.as=r,document.head.appendChild(a)}},Og=(e,r="script",a)=>{if(typeof document<"u"){const n=document.createElement("link");n.rel="preload",n.href=e,n.as=r,a&&(n.crossOrigin="anonymous"),document.head.appendChild(n)}},Ug=e=>{const r=p.useRef(new Set),a=p.useRef(new Set),n=p.useCallback((s,i)=>{const l=setTimeout(()=>{r.current.delete(l),s()},i);return r.current.add(l),l},[]),o=p.useCallback((s,i)=>{const l=setInterval(s,i);return a.current.add(l),l},[]);return p.useEffect(()=>{const s=r.current,i=a.current;return()=>{s.forEach(l=>clearTimeout(l)),i.forEach(l=>clearInterval(l)),process.env.NODE_ENV}},[e]),{createTimer:n,createInterval:o}},ge={maxBundleSize:500,maxChunkSize:200,maxImageSize:100,maxFCP:1800,maxLCP:2500,maxFID:100,maxCLS:.1,check:e=>{const r=[];return e.FCP&&e.FCP>ge.maxFCP&&r.push(`FCP (${e.FCP}ms) exceeds budget (${ge.maxFCP}ms)`),e.LCP&&e.LCP>ge.maxLCP&&r.push(`LCP (${e.LCP}ms) exceeds budget (${ge.maxLCP}ms)`),e.FID&&e.FID>ge.maxFID&&r.push(`FID (${e.FID}ms) exceeds budget (${ge.maxFID}ms)`),e.CLS&&e.CLS>ge.maxCLS&&r.push(`CLS (${e.CLS}) exceeds budget (${ge.maxCLS})`),r}};class Dg{constructor(r){this.metrics={timestamp:Date.now()},this.observers=[],this.performanceMarks=new Map,this.reportCallback=r,this.initializeWebVitals(),this.initializeCustomObservers(),this.collectDeviceInfo()}initializeWebVitals(){je.onCLS(r=>{this.metrics.CLS=r.value,this.reportMetric("CLS",r.value)}),je.onINP(r=>{this.metrics.INP=r.value,this.reportMetric("INP",r.value)}),je.onFCP(r=>{this.metrics.FCP=r.value,this.reportMetric("FCP",r.value)}),je.onLCP(r=>{this.metrics.LCP=r.value,this.reportMetric("LCP",r.value)}),je.onTTFB(r=>{this.metrics.TTFB=r.value,this.reportMetric("TTFB",r.value)})}initializeCustomObservers(){if("PerformanceObserver"in window){const r=new PerformanceObserver(n=>{n.getEntries().forEach(s=>{if(s.entryType==="navigation"){const i=s;this.metrics.bundleLoadTime=i.loadEventEnd-i.fetchStart}})});try{r.observe({entryTypes:["navigation"]}),this.observers.push(r)}catch{}const a=new PerformanceObserver(n=>{n.getEntries().forEach(s=>{(s.name.includes(".js")||s.name.includes(".css"))&&this.trackResourceLoad(s.name,s.duration)})});try{a.observe({entryTypes:["resource"]}),this.observers.push(a)}catch{}}}collectDeviceInfo(){if(typeof window<"u"){const r=navigator;r.connection&&(this.metrics.connection=r.connection.effectiveType||r.connection.type),r.deviceMemory&&(this.metrics.deviceMemory=r.deviceMemory),r.hardwareConcurrency&&(this.metrics.hardwareConcurrency=r.hardwareConcurrency),this.metrics.viewport={width:window.innerWidth,height:window.innerHeight}}}reportMetric(r,a){this.reportCallback&&this.reportCallback({...this.metrics,timestamp:Date.now()}),process.env.NODE_ENV}trackResourceLoad(r,a){const n=r.includes(".js"),o=r.includes(".css");if(n||o){const s=n?"JavaScript":"CSS";this.reportMetric(`${s} Load`,a)}}measureComponentRender(r,a){this.metrics.componentRenderTime=a,this.reportMetric(`Component Render (${r})`,a)}measureAPICall(r,a){this.metrics.apiResponseTime=a,this.reportMetric(`API Call (${r})`,a)}measureRouteChange(r,a){this.metrics.routeChangeTime=a,this.reportMetric(`Route Change (${r})`,a)}markStart(r){this.performanceMarks.set(r,performance.now())}markEnd(r){const a=this.performanceMarks.get(r);if(a){const n=performance.now()-a;this.reportMetric(`Mark (${r})`,n),this.performanceMarks.delete(r)}}trackRouteChange(r,a,n){typeof a=="string"?this.measureRouteChange(a,n||performance.now()):this.measureRouteChange(r,a)}getSummary(){return{coreWebVitals:{score:this.calculateScore(),LCP:this.metrics.LCP,INP:this.metrics.INP,CLS:this.metrics.CLS},loadingPerformance:{FCP:this.metrics.FCP,TTFB:this.metrics.TTFB,bundleLoadTime:this.metrics.bundleLoadTime},runtime:{routeChangeTime:this.metrics.routeChangeTime,apiResponseTime:this.metrics.apiResponseTime,componentRenderTime:this.metrics.componentRenderTime},device:{connection:this.metrics.connection,deviceMemory:this.metrics.deviceMemory,hardwareConcurrency:this.metrics.hardwareConcurrency}}}calculateScore(){let r=100;return this.metrics.LCP&&this.metrics.LCP>2500?r-=25:this.metrics.LCP&&this.metrics.LCP>2e3&&(r-=15),this.metrics.INP&&this.metrics.INP>200?r-=20:this.metrics.INP&&this.metrics.INP>100&&(r-=10),this.metrics.CLS&&this.metrics.CLS>.1?r-=15:this.metrics.CLS&&this.metrics.CLS>.05&&(r-=8),Math.max(r,0)}getMetrics(){return{...this.metrics}}cleanup(){this.observers.forEach(r=>r.disconnect()),this.observers=[]}}let gr=null;const jg=e=>(gr||(gr=new Dg(e)),gr),hr=()=>gr,dn=e=>{const r=p.useRef(performance.now());p.useEffect(()=>{const a=performance.now()-r.current,n=hr();n&&n.measureComponentRender(e,a)},[e])},_g=(e,r)=>p.forwardRef((a,n)=>(dn(r),p.createElement(e,{...a,ref:n}))),zg=async(e,r)=>{const a=performance.now(),n=await e(),o=performance.now()-a,s=hr();return s&&s.measureAPICall(r,o),n},un={LCP:2500,INP:200,CLS:.1,FCP:1800,TTFB:800,bundleSize:17e4},Bg=(e,r=un)=>{const a=[];return r.LCP&&e.LCP&&e.LCP>r.LCP&&a.push(`LCP: ${e.LCP.toFixed(0)}ms (budget: ${r.LCP}ms)`),r.INP&&e.INP&&e.INP>r.INP&&a.push(`INP: ${e.INP.toFixed(0)}ms (budget: ${r.INP}ms)`),r.CLS&&e.CLS&&e.CLS>r.CLS&&a.push(`CLS: ${e.CLS.toFixed(3)} (budget: ${r.CLS})`),r.FCP&&e.FCP&&e.FCP>r.FCP&&a.push(`FCP: ${e.FCP.toFixed(0)}ms (budget: ${r.FCP}ms)`),r.TTFB&&e.TTFB&&e.TTFB>r.TTFB&&a.push(`TTFB: ${e.TTFB.toFixed(0)}ms (budget: ${r.TTFB}ms)`),{passed:a.length===0,violations:a}},Wg=e=>{const r=e||hr()?.getMetrics()||{timestamp:Date.now()},a={timestamp:new Date().toISOString(),metrics:r,environment:{userAgent:typeof window<"u"?window.navigator.userAgent:"unknown",url:typeof window<"u"?window.location.href:"unknown",referrer:typeof document<"u"?document.referrer:"unknown",viewport:r.viewport,connection:r.connection,deviceMemory:r.deviceMemory,hardwareConcurrency:r.hardwareConcurrency}};return JSON.stringify(a,null,2)},Fg=({direction:e,className:r})=>t.jsx("svg",{className:f("w-4 h-4",r),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e==="up"?"M5 15l7-7 7 7":"M19 9l-7 7-7-7"})}),Vg=({className:e})=>t.jsx("svg",{className:f("w-4 h-4",e),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),gn=({title:e="Performance Monitor",isCollapsed:r,onToggleCollapse:a,onClose:n,onMouseDown:o,isDragging:s,className:i})=>t.jsxs("div",{className:f("bg-gray-900 text-white rounded-t-lg px-3 py-2","flex items-center justify-between","shadow-lg border border-gray-700","select-none",o&&"cursor-grab",s&&"cursor-grabbing",i),onMouseDown:o,children:[t.jsxs("span",{className:"font-semibold text-sm flex items-center gap-2",children:[t.jsx("span",{children:"🚀"}),e]}),t.jsxs("div",{className:"flex gap-1",children:[t.jsx("button",{onClick:a,className:"hover:bg-gray-700 rounded p-1 transition-colors","aria-label":r?"Expand":"Collapse",type:"button",children:t.jsx(Fg,{direction:r?"up":"down"})}),n&&t.jsx("button",{onClick:n,className:"hover:bg-gray-700 rounded p-1 transition-colors","aria-label":"Close",type:"button",children:t.jsx(Vg,{})})]})]}),qg={sm:"w-2 h-2",md:"w-3 h-3",lg:"w-4 h-4"},$g={good:"bg-green-500","needs-improvement":"bg-yellow-500",poor:"bg-red-500",unknown:"bg-gray-400",neutral:"bg-gray-500"},Hg={good:"Good","needs-improvement":"Needs Improvement",poor:"Poor",unknown:"Unknown",neutral:"Neutral"},Gg=({rating:e,size:r="sm",showLabel:a=!1,className:n})=>t.jsxs("div",{className:f("flex items-center gap-1",n),children:[t.jsx("span",{className:f("rounded-full",qg[r],$g[e])}),a&&t.jsx("span",{className:"text-xs text-gray-400",children:Hg[e]})]}),hn=({className:e})=>t.jsxs("div",{className:f("flex gap-3 text-[10px] text-gray-400",e),children:[t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"w-2 h-2 rounded-full bg-green-500"}),"Good"]}),t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"w-2 h-2 rounded-full bg-yellow-500"}),"Needs Improvement"]}),t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"w-2 h-2 rounded-full bg-red-500"}),"Poor"]})]}),Yg={good:"text-green-500","needs-improvement":"text-yellow-500",poor:"text-red-500",unknown:"text-gray-400",neutral:"text-gray-300"},H=({label:e,value:r,unit:a="",rating:n="neutral",description:o,className:s})=>{const i=typeof r=="number"?Number.isInteger(r)?r.toString():r.toFixed(r<1?3:0):r;return t.jsxs("div",{className:f("flex justify-between items-center",s),children:[t.jsxs("div",{className:"flex flex-col",children:[t.jsx("span",{className:"text-gray-300",children:e}),o&&t.jsx("span",{className:"text-[10px] text-gray-500",children:o})]}),t.jsxs("span",{className:f("font-medium",Yg[n]),children:[i,a]})]})},Kg=(e,r="ms",a=0)=>e===void 0?"N/A":`${e.toFixed(a)}${r}`,fn=(e={})=>{const{enabled:r=!0,onUpdate:a}=e,[n,o]=p.useState({}),[s,i]=p.useState(!0),l=p.useRef(a);p.useEffect(()=>{l.current=a},[a]);const d=p.useCallback(c=>{o(g=>{const h={...g,...c};return l.current?.(h),h})},[]);return p.useEffect(()=>{if(!r)return;if(typeof PerformanceObserver>"u"){i(!1);return}const c=[];try{const g=new PerformanceObserver(h=>{const w=h.getEntries(),m=w[w.length-1];d({lcp:m.renderTime||m.loadTime})});g.observe({type:"largest-contentful-paint",buffered:!0}),c.push(g)}catch{}try{const g=new PerformanceObserver(h=>{h.getEntries().forEach(m=>{m.processingStart&&d({fid:m.processingStart-m.startTime})})});g.observe({type:"first-input",buffered:!0}),c.push(g)}catch{}try{let g=0;const h=new PerformanceObserver(w=>{for(const m of w.getEntries())!m.hadRecentInput&&m.value&&(g+=m.value,d({cls:g}))});h.observe({type:"layout-shift",buffered:!0}),c.push(h)}catch{}try{const g=new PerformanceObserver(h=>{h.getEntries().forEach(m=>{m.name==="first-contentful-paint"&&d({fcp:m.startTime})})});g.observe({type:"paint",buffered:!0}),c.push(g)}catch{}try{const g=new PerformanceObserver(h=>{h.getEntries().forEach(m=>{m.duration&&d({inp:m.duration})})});g.observe({type:"event",buffered:!0}),c.push(g)}catch{}try{const g=performance.getEntriesByType("navigation")[0];g&&d({ttfb:g.responseStart-g.requestStart})}catch{}return()=>{c.forEach(g=>g.disconnect())}},[r,d]),{metrics:n,isSupported:s}},Ae=(e,r)=>{if(r===void 0)return"unknown";const n={lcp:{good:2500,poor:4e3},fid:{good:100,poor:300},cls:{good:.1,poor:.25},fcp:{good:1800,poor:3e3},ttfb:{good:800,poor:1800},inp:{good:200,poor:500}}[e];return n?r<=n.good?"good":r<=n.poor?"needs-improvement":"poor":"unknown"},bn=({metrics:e,className:r})=>{const a=(n,o=0)=>n===void 0?"N/A":n.toFixed(o);return t.jsxs("div",{className:f("space-y-1",r),children:[t.jsx("h3",{className:"font-semibold text-yellow-400 mb-2 text-xs",children:"Web Vitals"}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(H,{label:"LCP",value:a(e.lcp),unit:"ms",rating:Ae("lcp",e.lcp),description:"Largest Contentful Paint"}),t.jsx(H,{label:"FID",value:a(e.fid),unit:"ms",rating:Ae("fid",e.fid),description:"First Input Delay"}),t.jsx(H,{label:"CLS",value:a(e.cls,3),rating:Ae("cls",e.cls),description:"Cumulative Layout Shift"}),t.jsx(H,{label:"FCP",value:a(e.fcp),unit:"ms",rating:Ae("fcp",e.fcp),description:"First Contentful Paint"}),t.jsx(H,{label:"TTFB",value:a(e.ttfb),unit:"ms",rating:Ae("ttfb",e.ttfb),description:"Time to First Byte"}),e.inp!==void 0&&t.jsx(H,{label:"INP",value:a(e.inp),unit:"ms",rating:Ae("inp",e.inp),description:"Interaction to Next Paint"})]})]})},mn=(e={})=>{const{enabled:r=!0,refreshInterval:a=5e3,onUpdate:n}=e,[o,s]=p.useState({}),i=p.useRef(n);p.useEffect(()=>{i.current=n},[n]);const l=p.useCallback(()=>{if(!(typeof performance>"u"))try{const c=performance.getEntriesByType("resource"),g=c.filter(v=>v.name.endsWith(".js")||v.initiatorType==="script"),h=g.reduce((v,T)=>v+T.duration,0),w=c.filter(v=>v.name.endsWith(".css")||v.initiatorType==="link"),m=w.reduce((v,T)=>v+T.duration,0),b=c.reduce((v,T)=>v+(T.transferSize||0),0),y={jsLoadTime:h,cssLoadTime:m,jsCount:g.length,cssCount:w.length,totalTransferSize:b};s(y),i.current?.(y)}catch{}},[]),d=p.useCallback(()=>{l()},[l]);return p.useEffect(()=>{if(!r)return;l();const c=setInterval(l,a);return()=>clearInterval(c)},[r,a,l]),{metrics:o,refresh:d}},yn=e=>e===void 0?"N/A":e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`,pn=({metrics:e,className:r})=>{const a=n=>n===void 0?"N/A":n.toFixed(0);return t.jsxs("div",{className:f("space-y-1",r),children:[t.jsx("h3",{className:"font-semibold text-blue-400 mb-2 text-xs",children:"Bundle Performance"}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(H,{label:"JS Load",value:a(e.jsLoadTime),unit:"ms",rating:"neutral"}),t.jsx(H,{label:"CSS Load",value:a(e.cssLoadTime),unit:"ms",rating:"neutral"}),t.jsx(H,{label:"JS Files",value:e.jsCount??"N/A",rating:"neutral"}),t.jsx(H,{label:"Transfer Size",value:yn(e.totalTransferSize),rating:"neutral"})]})]})},Zg=e=>e===void 0?"unknown":e<=200?"good":e<=500?"needs-improvement":"poor",vn=({metrics:e,className:r})=>{const a=n=>n===void 0||isNaN(n)?"N/A":n.toFixed(0);return e.callCount===0?null:t.jsxs("div",{className:f("space-y-1",r),children:[t.jsx("h3",{className:"font-semibold text-purple-400 mb-2 text-xs",children:"API Calls"}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(H,{label:"Count",value:e.callCount,rating:"neutral"}),t.jsx(H,{label:"Total Time",value:a(e.totalTime),unit:"ms",rating:"neutral"}),t.jsx(H,{label:"Avg Time",value:a(e.averageTime),unit:"ms",rating:Zg(e.averageTime)}),e.slowestCall!==void 0&&t.jsx(H,{label:"Slowest",value:a(e.slowestCall),unit:"ms",rating:e.slowestCall>1e3?"poor":"neutral"}),e.failedCalls>0&&t.jsx(H,{label:"Failed",value:e.failedCalls,rating:"poor"})]})]})},wn=e=>e===void 0?"N/A":(e/(1024*1024)).toFixed(1),kn=(e,r)=>{if(e===void 0||r===void 0)return"unknown";const a=e/r;return a<=.5?"good":a<=.75?"needs-improvement":"poor"},xn=({refreshInterval:e=2e3,className:r})=>{const[a,n]=p.useState({}),[o,s]=p.useState(!0);if(p.useEffect(()=>{const l=performance;if(!l.memory){s(!1);return}const d=()=>{l.memory&&n({usedJSHeapSize:l.memory.usedJSHeapSize,totalJSHeapSize:l.memory.totalJSHeapSize,jsHeapSizeLimit:l.memory.jsHeapSizeLimit})};d();const c=setInterval(d,e);return()=>clearInterval(c)},[e]),!o)return null;const i=a.usedJSHeapSize&&a.jsHeapSizeLimit?(a.usedJSHeapSize/a.jsHeapSizeLimit*100).toFixed(0):"N/A";return t.jsxs("div",{className:f("space-y-1",r),children:[t.jsx("h3",{className:"font-semibold text-cyan-400 mb-2 text-xs",children:"Memory"}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(H,{label:"Used Heap",value:wn(a.usedJSHeapSize),unit:"MB",rating:kn(a.usedJSHeapSize,a.jsHeapSizeLimit)}),t.jsx(H,{label:"Total Heap",value:wn(a.totalJSHeapSize),unit:"MB",rating:"neutral"}),t.jsx(H,{label:"Usage",value:i,unit:"%",rating:kn(a.usedJSHeapSize,a.jsHeapSizeLimit)})]})]})},Xg=e=>{if(e.rating)return e.rating;if(typeof e.value=="number"&&e.thresholds){const{good:r,poor:a}=e.thresholds;return e.value<=r?"good":e.value<=a?"needs-improvement":"poor"}return"neutral"},Nn=({title:e="Custom Metrics",titleColor:r="text-orange-400",metrics:a,className:n})=>a.length===0?null:t.jsxs("div",{className:f("space-y-1",n),children:[t.jsx("h3",{className:f("font-semibold mb-2 text-xs",r),children:e}),t.jsx("div",{className:"space-y-1.5",children:a.map(o=>t.jsx(H,{label:o.label,value:o.value,unit:o.unit,rating:Xg(o),description:o.description},o.id))})]}),Qg=["/api/","graphql",".json"],Cn=(e={})=>{const{enabled:r=!0,patterns:a=Qg,refreshInterval:n=5e3,onUpdate:o}=e,[s,i]=p.useState({callCount:0,totalTime:0,averageTime:0,failedCalls:0}),l=p.useRef(a),d=p.useRef(o);p.useEffect(()=>{l.current=a},[a]),p.useEffect(()=>{d.current=o},[o]);const c=p.useCallback(()=>{if(!(typeof performance>"u"))try{const h=performance.getEntriesByType("resource"),w=l.current,m=h.filter(N=>w.some(S=>N.name.includes(S)));if(m.length===0)return;const b=m.reduce((N,S)=>N+S.duration,0),y=Math.max(...m.map(N=>N.duration)),v=m.filter(N=>{const S=N.responseStatus;return S!==void 0&&S>=400}).length,T={callCount:m.length,totalTime:b,averageTime:b/m.length,slowestCall:y,failedCalls:v};i(T),d.current?.(T)}catch{}},[]),g=p.useCallback(()=>{c()},[c]);return p.useEffect(()=>{if(!r)return;c();const h=setInterval(c,n);return()=>clearInterval(h)},[r,n,c]),{metrics:s,refresh:g}},Sn=(e={})=>{const{enabled:r=!0,constrainToViewport:a=!0,horizontalOnly:n=!1,verticalOnly:o=!1,initialPosition:s}=e,i=p.useRef(null),[l,d]=p.useState({x:s?.x??null,y:s?.y??null}),[c,g]=p.useState(!1),[h,w]=p.useState({x:0,y:0}),m=p.useCallback(y=>{if(!r||!i.current)return;const v=i.current.getBoundingClientRect();g(!0),w({x:y.clientX-v.left,y:y.clientY-v.top}),(l.x===null||l.y===null)&&d({x:n?v.left:l.x??v.left,y:o?v.top:l.y??v.top}),y.preventDefault()},[r,l,n,o]),b=p.useCallback(()=>{d({x:s?.x??null,y:s?.y??null})},[s]);return p.useEffect(()=>{if(!c)return;const y=T=>{if(!i.current)return;let N=T.clientX-h.x,S=T.clientY-h.y;if(a){const k=window.innerWidth-i.current.offsetWidth,C=window.innerHeight-i.current.offsetHeight;N=Math.max(0,Math.min(N,k)),S=Math.max(0,Math.min(S,C))}d({x:n?N:o?l.x:N,y:o?S:n?l.y:S})},v=()=>{g(!1)};return document.addEventListener("mousemove",y),document.addEventListener("mouseup",v),()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",v)}},[c,h,a,n,o,l.x,l.y]),{position:l,isDragging:c,handleMouseDown:m,resetPosition:b,ref:i}},En={"bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-right":"top-4 right-4","top-left":"top-4 left-4"},Jg=["webVitals","bundle","api","memory"],Rg=({enabled:e,defaultCollapsed:r=!0,defaultVisible:a=!0,position:n="bottom-right",draggable:o=!0,sections:s=Jg,customMetrics:i=[],customSectionTitle:l="Custom Metrics",apiPatterns:d,onMetricsUpdate:c,className:g})=>{const h=e??(typeof process<"u"&&process.env?.NODE_ENV!=="production"),[w,m]=p.useState(r),[b,y]=p.useState(a),v=p.useMemo(()=>d,[JSON.stringify(d)]),T=p.useRef(c);p.useEffect(()=>{T.current=c},[c]);const{metrics:N}=fn({enabled:h&&s.includes("webVitals")}),{metrics:S}=mn({enabled:h&&s.includes("bundle")}),{metrics:k}=Cn({enabled:h&&s.includes("api"),patterns:v});p.useEffect(()=>{T.current&&T.current({webVitals:N,bundle:S,api:k})},[N,S,k]);const{position:C,isDragging:I,handleMouseDown:E,ref:M}=Sn({enabled:o,horizontalOnly:n.includes("bottom")||n.includes("top")}),x=p.useCallback(()=>{m(z=>!z)},[]),P=p.useCallback(()=>{y(!1)},[]),D=p.useCallback(()=>{y(!0)},[]);if(!h)return null;if(!b)return t.jsx("button",{onClick:D,className:f("fixed z-[9999]",En[n],"bg-gray-900 text-white px-3 py-2 rounded-lg","shadow-lg border border-gray-700","hover:bg-gray-800 transition-colors","text-xs font-mono"),type:"button",children:"🚀 Performance"});const U=C.x!==null?{left:`${C.x}px`,bottom:n.includes("bottom")?"1rem":void 0,top:n.includes("top")?"1rem":void 0,position:"fixed",transition:I?"none":"height 0.2s ease-in-out"}:{transition:"height 0.2s ease-in-out"},B=i.length>0||s.includes("custom");return t.jsxs("div",{ref:M,className:f(C.x!==null?"":`fixed ${En[n]}`,"z-[9999] font-mono text-xs",I&&"cursor-grabbing",g),style:{maxWidth:"320px",...U},children:[t.jsx(gn,{isCollapsed:w,onToggleCollapse:x,onClose:P,onMouseDown:o?E:void 0,isDragging:I}),t.jsx("div",{className:f("bg-gray-800 text-gray-100 rounded-b-lg","shadow-lg border-x border-b border-gray-700","overflow-hidden transition-all duration-300 ease-in-out",w?"max-h-0 opacity-0":"max-h-[70vh] opacity-100 py-2 px-3"),children:t.jsxs("div",{className:"overflow-y-auto max-h-full space-y-3",children:[s.includes("webVitals")&&t.jsx(bn,{metrics:N}),s.includes("bundle")&&t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(pn,{metrics:S})}),s.includes("api")&&k.callCount>0&&t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(vn,{metrics:k})}),s.includes("memory")&&t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(xn,{})}),B&&i.length>0&&t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(Nn,{title:l,metrics:i})}),t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(hn,{})})]})})]})},eh=(e={})=>{const{successMessage:r="",successDuration:a=3e3,errorPrefix:n="",onSuccess:o,onError:s}=e,[i,l]=p.useState(!1),[d,c]=p.useState(""),[g,h]=p.useState(""),w=p.useCallback(()=>{c(""),h("")},[]),m=p.useCallback(()=>{c("")},[]),b=p.useCallback(()=>{h("")},[]),y=p.useCallback(async v=>{l(!0),w();try{await v(),r&&(c(r),a>0&&setTimeout(()=>{c("")},a)),o&&o()}catch(T){const N=T instanceof Error?T.message:"An error occurred";throw h(n?`${n}: ${N}`:N),s&&T instanceof Error&&s(T),T}finally{l(!1)}},[r,a,n,o,s,w]);return{isSubmitting:i,successMessage:d,errorMessage:g,submit:y,clearMessages:w,clearSuccess:m,clearError:b}},rh=(e=!1)=>{const[r,a]=p.useState(e),n=p.useCallback(()=>a(!0),[]),o=p.useCallback(()=>a(!1),[]),s=p.useCallback(()=>a(i=>!i),[]);return{value:r,setTrue:n,setFalse:o,toggle:s,setValue:a}},th=(e={})=>{const{successDuration:r=2e3,onSuccess:a,onError:n}=e,[o,s]=p.useState(null),i=p.useCallback(async c=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(c);else{const g=document.createElement("textarea");g.value=c,g.style.position="fixed",g.style.left="-999999px",g.style.top="-999999px",document.body.appendChild(g),g.focus(),g.select();const h=document.execCommand("copy");if(document.body.removeChild(g),!h)throw new Error("Copy command was unsuccessful")}return s(c),a?.(c),setTimeout(()=>{s(null)},r),!0}catch(g){const h=g instanceof Error?g:new Error("Copy failed");return n?.(h),!1}},[r,a,n]),l=p.useCallback(c=>o===c,[o]),d=p.useCallback(()=>{s(null)},[]);return{copiedValue:o,copyToClipboard:i,isCopied:l,resetCopiedState:d}},ah=(e={})=>{const{successDuration:r=2e3,onSuccess:a,onError:n}=e,[o,s]=p.useState({}),i=p.useCallback(async(c,g)=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(c);else{const h=document.createElement("textarea");h.value=c,h.style.position="fixed",h.style.left="-999999px",h.style.top="-999999px",document.body.appendChild(h),h.focus(),h.select();const w=document.execCommand("copy");if(document.body.removeChild(h),!w)throw new Error("Copy command was unsuccessful")}return s(h=>({...h,[g]:!0})),a?.(c),setTimeout(()=>{s(h=>({...h,[g]:!1}))},r),!0}catch(h){const w=h instanceof Error?h:new Error("Copy failed");return n?.(w),!1}},[r,a,n]),l=p.useCallback(c=>o[c]||!1,[o]),d=p.useCallback(c=>{s(c?g=>({...g,[c]:!1}):{})},[]);return{copiedStates:o,copyToClipboard:i,isCopied:l,resetCopiedState:d}},nh=e=>{if(e===0)return"0 Bytes";const r=1024,a=["Bytes","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(r)),o=Math.min(n,a.length-1);return parseFloat((e/Math.pow(r,o)).toFixed(2))+" "+a[o]},oh=(e,r,a)=>{const n={bytes:0,kb:1,mb:2,gb:3,tb:4},o=1024,i=e*Math.pow(o,n[r])/Math.pow(o,n[a]);return Math.round(i*100)/100},sh=e=>{const r=e.match(/^(\d+(?:\.\d+)?)\s*(bytes?|kb|mb|gb|tb)$/i);if(!r)return null;const a=parseFloat(r[1]),n=r[2].toLowerCase(),s={bytes:1,byte:1,kb:1024,mb:1024*1024,gb:1024*1024*1024,tb:1024*1024*1024*1024}[n];return s?Math.round(a*s):null},ih=e=>e,lh=e=>{if(typeof document>"u")return;const r=document.createElement("style");r.textContent=e,r.setAttribute("data-critical","true"),document.head.appendChild(r)},ch=e=>{if(typeof document>"u")return;const r=document.createElement("link");r.rel="preload",r.as="style",r.href=e,r.onload=()=>{r.rel="stylesheet"},document.head.appendChild(r);const a=document.createElement("noscript");a.innerHTML=`<link rel="stylesheet" href="${e}">`,document.head.appendChild(a)},dh=e=>{const r={};return Object.entries(e).forEach(([a,n])=>{r[`--${a}`]=typeof n=="number"?`${n}px`:n}),r},uh={xs:475,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},gh=(e,r=uh)=>{const[a,n]=p.useState("base");return p.useEffect(()=>{const o=()=>{const s=window.innerWidth;s>=r["2xl"]?n("2xl"):s>=r.xl?n("xl"):s>=r.lg?n("lg"):s>=r.md?n("md"):s>=r.sm?n("sm"):s>=r.xs?n("xs"):n("base")};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[r]),e[a]||e.base||{}},Tn=()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,hh=()=>{const[e,r]=p.useState(Tn);return p.useEffect(()=>{const a=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>{r(a.matches)};return a.addEventListener?a.addEventListener("change",n):a.addListener(n),()=>{a.removeEventListener?a.removeEventListener("change",n):a.removeListener(n)}},[]),e},fh=(e,r=["layout","paint"])=>{e&&(e.style.contain=r.join(" "))},bh=(e,r)=>e?(e.style.willChange=r.join(", "),()=>{e.style.willChange="auto"}):void 0,mh=e=>{typeof window>"u"||requestAnimationFrame(()=>{e.forEach(r=>r())})},yh=(...e)=>e.filter(Boolean).join(" "),ph=e=>{const r={},a=["display","position","width","height","margin","padding","fontSize","fontFamily","color","backgroundColor"];return Object.entries(e).forEach(([n,o])=>{a.includes(n)&&(r[n]=o)}),r},vh=(e,r=[])=>{const[a,n]=p.useState(null),[o,s]=p.useState(!0);return p.useEffect(()=>{let i=!0;return e().then(l=>{i&&(n(l.default),s(!1))}),()=>{i=!1}},[e,...r]),{styles:a,loading:o}},wh=(e,r="1rem")=>({display:"grid",gridTemplateColumns:`repeat(${e}, minmax(0, 1fr))`,gap:r,contain:"layout",willChange:"transform"}),kh=(e="row",r="center",a="flex-start")=>({display:"flex",flexDirection:e,alignItems:r,justifyContent:a,contain:"layout"}),xh=e=>{const[r,a]=p.useState(!1);return p.useEffect(()=>{const n=window.matchMedia(e);a(n.matches);const o=()=>a(n.matches);return n.addEventListener?n.addEventListener("change",o):n.addListener(o),()=>{n.removeEventListener?n.removeEventListener("change",o):n.removeListener(o)}},[e]),r},Nh=(e,r)=>{const[a,n]=p.useState("light");return p.useEffect(()=>{const o=window.matchMedia("(prefers-color-scheme: dark)");n(o.matches?"dark":"light");const s=()=>{n(o.matches?"dark":"light")};return o.addEventListener?o.addEventListener("change",s):o.addListener(s),()=>{o.removeEventListener?o.removeEventListener("change",s):o.removeListener(s)}},[]),a==="dark"?r:e},Ch=e=>{const r={src:e.src,alt:e.alt,loading:e.loading||"lazy"};return e.title&&(r.title=e.title),e.width&&(r.width=e.width),e.height&&(r.height=e.height),e.sizes&&(r.sizes=e.sizes),e.srcSet&&(r.srcSet=e.srcSet),r.itemProp="image",r},Sh=(e,r=[320,640,768,1024,1280,1920])=>r.map(a=>`${e.replace(/\{width\}/g,a.toString())} ${a}w`).join(", "),Eh=e=>e.map(r=>r.maxWidth?`(max-width: ${r.maxWidth}px) ${r.size}`:r.size).join(", "),Th=(e,r="openGraph")=>{const a={};return r==="openGraph"?(a["og:image"]=e.url,e.width&&(a["og:image:width"]=e.width.toString()),e.height&&(a["og:image:height"]=e.height.toString()),e.alt&&(a["og:image:alt"]=e.alt),e.type&&(a["og:image:type"]=e.type)):(a["twitter:image"]=e.url,e.alt&&(a["twitter:image:alt"]=e.alt)),a},Ah=(e='img[loading="lazy"]')=>{if(typeof window>"u"||!("IntersectionObserver"in window))return;const r=document.querySelectorAll(e);if("loading"in HTMLImageElement.prototype){r.forEach(n=>{n.dataset.src&&(n.src=n.dataset.src)});return}const a=new IntersectionObserver(n=>{n.forEach(o=>{if(o.isIntersecting){const s=o.target;s.dataset.src&&(s.src=s.dataset.src,s.removeAttribute("data-src")),s.dataset.srcset&&(s.srcset=s.dataset.srcset,s.removeAttribute("data-srcset")),a.unobserve(s)}})},{rootMargin:"50px 0px",threshold:.01});return r.forEach(n=>a.observe(n)),()=>{r.forEach(n=>a.unobserve(n))}},An=()=>typeof window>"u"?Promise.resolve(!1):new Promise(e=>{const r=new Image;r.onload=r.onerror=function(){e(r.height===2)},r.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"}),In=()=>typeof window>"u"?Promise.resolve(!1):new Promise(e=>{const r=new Image;r.onload=()=>e(!0),r.onerror=()=>e(!1),r.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="}),Ih=async(e="jpg")=>{const[r,a]=await Promise.all([An(),In()]);return a?"avif":r?"webp":e},Mh=(e,r,a,n)=>`
|
|
56
|
+
`,children:o?"Verified":n?"Current Plan":"Select Plan"})]})},k0=({children:e,backgroundClassName:r="",contentClassName:a=""})=>t.jsx("div",{className:r,children:t.jsx("div",{className:a,children:e})}),x0=({title:e,description:r})=>t.jsxs("div",{className:"mb-8",children:[t.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:e}),r&&t.jsx("p",{className:"mt-2 text-gray-600 dark:text-gray-400",children:r})]}),N0=({children:e,mode:r,className:a,as:n="div",withPadding:o=!0})=>{const s=he(),i=r?C0(r,o):o?s.containerClass:s.maxWidthClass;return t.jsx(n,{className:f(i,a),children:e})};function C0(e,r){const a={standard:"max-w-7xl mx-auto",wide:"max-w-[1920px] mx-auto",full:"w-full"};return r?`${a[e]} px-4`:a[e]}const S0=({variant:e="full",sticky:r=!1,className:a,children:n})=>{const{containerClass:o}=he(),s=e==="compact";return t.jsx("footer",{className:f("bg-gray-900 text-white transition-all duration-300 ease-in-out",s?"py-4":"py-12",r?"sticky bottom-0 z-50 border-t border-gray-700":"relative z-10","pointer-events-auto",a),children:t.jsx("div",{className:o,children:n})})},E0=({children:e,className:r})=>t.jsx("div",{className:f("grid md:grid-cols-5 gap-8",r),children:e}),T0=({children:e,description:r,className:a})=>t.jsxs("div",{className:a,children:[t.jsx("div",{className:"mb-4",children:e}),r&&t.jsx("p",{className:P.body.sm(),children:r})]}),A0=({title:e,children:r,className:a})=>t.jsxs("div",{className:a,children:[t.jsx("h3",{className:f(P.heading.h5(),"mb-4 text-white"),children:e}),t.jsx("ul",{className:f("space-y-2",P.body.sm()),children:r})]}),I0=({children:e,className:r})=>t.jsx("li",{className:f("hover:text-white transition-colors",r),children:e}),M0=({children:e,className:r})=>t.jsx("div",{className:f("border-t mt-8 pt-8 text-center",co.border.default,r),children:t.jsx("div",{className:"flex items-center justify-center gap-3 text-gray-400 text-sm",children:e})}),L0=({children:e,className:r})=>t.jsx("div",{className:f("flex flex-col sm:flex-row justify-between items-center space-y-2 sm:space-y-0",r),children:e}),P0=({children:e,className:r})=>t.jsx("div",{className:f("flex items-center gap-3 text-gray-400 text-sm",r),children:e}),O0=({children:e,className:r})=>t.jsx("div",{className:f("flex space-x-6 text-sm",r),children:e}),U0=({version:e,className:r})=>t.jsxs("span",{className:f("text-gray-500",r),children:["v",e]}),D0=({year:e,companyName:r,rightsText:a,companyLink:n,className:o})=>t.jsxs("span",{className:o,children:["© ",e," ",n||t.jsx("span",{className:"text-blue-400",children:r}),a&&`. ${a}`]}),j0=({isSelected:e,onClick:r,icon:a,label:n,description:o,className:s=""})=>t.jsxs("div",{onClick:r,className:`relative flex items-start p-4 cursor-pointer transition-all border-b border-gray-200 dark:border-gray-700 last:border-b-0 group ${s}`,children:[e&&t.jsx("div",{className:"absolute inset-1 bg-blue-500/10 dark:bg-blue-400/10 rounded-lg pointer-events-none"}),t.jsxs("div",{className:"relative z-10 flex items-start w-full",children:[a&&t.jsx(a,{className:`h-5 w-5 mt-0.5 mr-3 flex-shrink-0 transition-colors ${e?"text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400 group-hover:text-gray-700 dark:group-hover:text-gray-300"}`}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:`font-medium transition-colors ${e?"text-blue-600 dark:text-blue-400":"text-gray-900 dark:text-gray-100 group-hover:text-gray-700 dark:group-hover:text-gray-300"}`,children:n}),o&&t.jsx("div",{className:`text-xs mt-0.5 transition-colors ${e?"text-blue-500 dark:text-blue-300":"text-gray-500 dark:text-gray-400"}`,children:o})]})]})]}),_0=({masterTitle:e,masterSubtitle:r,backButtonText:a,masterContent:n,detailContent:o,detailTitle:s,mobileView:i="navigation",onBackToNavigation:l,masterClassName:d="",detailClassName:c="",detailTitleClassName:g="",masterWidth:h=320,stickyMaster:w=!0,stickyTopOffset:m=96,desktopGap:b=32,showMasterBackground:y=!0,enableAnimations:p=!0,animationDuration:T=300,animationRef:N})=>{const{containerClass:C}=he(),k=`gap-${Math.round(b/4)}`||"gap-8",S=ee=>ee?ee.split("-")[0].trim():"Back",I=a?S(a):e?S(e):"Back",[E,M]=v.useState(!1),[x,O]=v.useState("auto"),D=v.useRef(null),U=v.useRef(null);v.useEffect(()=>(N&&(N.current={triggerTransition:ee=>{if(!p){ee();return}if(D.current){const Le=D.current.scrollHeight;O(Le)}M(!0),U.current&&clearTimeout(U.current),U.current=setTimeout(()=>{ee(),setTimeout(()=>{if(D.current){const Le=D.current.scrollHeight;O(Le),setTimeout(()=>{O("auto"),M(!1)},T)}},50)},T/2)}}),()=>{U.current&&clearTimeout(U.current)}),[p,T,N]);const B=p?{height:x==="auto"?"auto":`${x}px`,transition:`height ${T}ms cubic-bezier(0.4, 0, 0.2, 1)`,width:"100%",maxWidth:"100%"}:{width:"100%",maxWidth:"100%"},z=p?`${E?"opacity-0 transform translate-y-2":"opacity-100 transform translate-y-0"}`:"",V=p?{transition:`opacity ${T}ms ease-in-out, transform ${T}ms ease-in-out`}:{};return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:`md:hidden ${i==="navigation"?"block":"hidden"} flex-1`,children:t.jsxs("div",{className:y?"bg-white dark:bg-gray-800 p-6":"p-6",children:[e&&t.jsxs("div",{className:C,children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4",children:e}),r&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:r})]}),t.jsx("div",{className:d,children:n})]})}),t.jsxs("div",{className:`${C} py-8`,children:[t.jsxs("div",{className:`md:hidden ${i==="content"?"block":"hidden"}`,children:[i==="content"&&l&&t.jsxs("button",{onClick:l,className:"mb-4 px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:["← ",I]}),t.jsx("div",{ref:D,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${c}`,style:B,children:t.jsxs("div",{className:z,style:V,children:[s&&t.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${g}`,children:s}),o]})})]}),t.jsxs("div",{className:`hidden md:flex min-h-full ${k}`,style:{width:"100%"},children:[t.jsx("aside",{className:"flex-shrink-0",style:{width:`${h}px`,minWidth:`${h}px`},children:t.jsxs("div",{className:w?"sticky":"",style:w?{top:`${m}px`}:void 0,children:[e&&t.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:e}),r&&t.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:r}),t.jsx("div",{className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 ${w?"max-h-[calc(100vh-200px)] overflow-y-auto":""} ${d}`,children:n})]})}),t.jsx("div",{className:"flex-1 min-w-0",style:{width:`calc(100% - ${h+b}px)`},children:t.jsx("div",{ref:D,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${c}`,style:B,children:t.jsxs("div",{className:z,style:V,children:[s&&t.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${g}`,children:s}),o]})})})]})]})]})},Zr=v.createContext(null),Ba=({children:e,variant:r="default",sticky:a=!0})=>{const[n,o]=v.useState(!1),s=v.useCallback(()=>{o(i=>!i)},[]);return t.jsx(Zr.Provider,{value:{variant:r,sticky:a,mobileMenuOpen:n,setMobileMenuOpen:o,toggleMobileMenu:s},children:e})},Xr=()=>{const e=v.useContext(Zr);if(!e)throw new Error("useTopbar must be used within a TopbarProvider");return e},Wa={sm:"min-h-12",md:"min-h-14",lg:"min-h-16"},z0={default:"bg-white dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700",app:"bg-white dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700 shadow-sm",minimal:"bg-transparent",transparent:"bg-white/80 dark:bg-gray-900/80 border-b border-gray-200/50 dark:border-gray-700/50"},B0={default:"z-40",high:"z-50",highest:"z-[60]"},W0=({children:e,variant:r="default",sticky:a=!0,className:n,height:o="md",blur:s=!1,zIndex:i="high","aria-label":l="Main navigation"})=>{const{containerClass:d}=he();return t.jsx(Ba,{variant:r,sticky:a,children:t.jsxs("header",{role:"banner","aria-label":l,className:f("w-full",Wa[o],z0[r],B0[i],a&&"sticky top-0",s&&"backdrop-blur-md","transition-colors duration-200",n),children:[t.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:top-2 focus:left-2 bg-blue-600 text-white px-4 py-2 rounded-md z-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",children:"Skip to main content"}),t.jsx("div",{className:f(d,Wa[o],"flex items-center justify-between"),children:e})]})})},F0=({children:e,className:r})=>t.jsx("div",{className:f("flex items-center gap-2 shrink-0",r),children:e}),V0=({children:e,className:r})=>t.jsx("div",{className:f("flex-1 flex items-center justify-center px-4",r),children:e}),$0=({children:e,className:r})=>t.jsx("div",{className:f("flex items-center gap-2 shrink-0",r),children:e}),q0=({children:e,className:r})=>t.jsx("div",{className:f("md:hidden px-4 pb-3",r),children:e}),H0=({className:e})=>t.jsx("div",{className:f("hidden md:block h-6 w-px bg-gray-200 dark:bg-gray-700 mx-2",e),role:"separator","aria-orientation":"vertical"}),G0={sm:"h-6",md:"h-8",lg:"h-10"},Y0=({children:e,src:r,alt:a="Logo",onClick:n,href:o,className:s,size:i="md"})=>{const l=e||r&&t.jsx("img",{src:r,alt:a,className:f(G0[i],"w-auto object-contain")}),d=f("flex items-center","hover:opacity-80 transition-opacity duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-md",s);return o?t.jsx("a",{href:o,className:d,title:a,children:l}):n?t.jsx("button",{type:"button",onClick:n,className:d,title:a,"aria-label":`Go to ${a||"home"}`,children:l}):t.jsx("div",{className:d,children:l})},K0={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden",xl:"xl:hidden"},Z0=({className:e,isOpen:r})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:r?t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}):t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})}),Fa=({icon:e,"aria-label":r="Toggle navigation menu",className:a,onClick:n,hideAbove:o="lg",menuItems:s,LinkComponent:i})=>{const{mobileMenuOpen:l,toggleMobileMenu:d,setMobileMenuOpen:c}=Xr(),[g,h]=v.useState(!1),w=v.useRef(null);or(w,()=>{h(!1)});const m=s?g:l,b=()=>{n?n():s?h(!g):d()},y=()=>{h(!1),c(!1)};return t.jsxs("div",{className:f("relative",K0[o]),ref:w,children:[t.jsx("button",{type:"button",onClick:b,className:f("p-2 rounded-lg","text-gray-600 dark:text-gray-400","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-900 dark:hover:text-gray-100","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","transition-colors duration-200",a),"aria-label":r,"aria-expanded":m,"aria-haspopup":s?"menu":void 0,"aria-controls":s?"topbar-dropdown-menu":"mobile-menu",children:e?t.jsx(e,{className:"h-6 w-6"}):t.jsx(Z0,{className:"h-6 w-6",isOpen:m})}),s&&g&&t.jsx("div",{id:"topbar-dropdown-menu",role:"menu",className:f("absolute left-0 top-full mt-2","min-w-[200px] py-2 rounded-lg","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","shadow-lg","z-50"),children:s.map(p=>{const T=p.icon,N=t.jsxs(t.Fragment,{children:[T&&t.jsx(T,{className:"h-5 w-5 mr-3 flex-shrink-0"}),t.jsx("span",{children:p.label})]}),C=f("flex items-center w-full px-4 py-2.5 text-sm font-medium","text-gray-700 dark:text-gray-300","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-900 dark:hover:text-gray-100","transition-colors duration-150",p.active&&"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400",p.disabled&&"opacity-50 cursor-not-allowed");return p.href&&i?t.jsx(i,{href:p.href,className:C,children:t.jsx("div",{className:"flex items-center",onClick:y,children:N})},p.id):p.href?t.jsx("a",{href:p.href,role:"menuitem",className:C,onClick:y,children:N},p.id):t.jsx("button",{type:"button",role:"menuitem",className:C,onClick:()=>{y(),p.onClick?.()},disabled:p.disabled,children:N},p.id)})})]})},X0={sm:{show:"hidden sm:flex",hide:"sm:hidden"},md:{show:"hidden md:flex",hide:"md:hidden"},lg:{show:"hidden lg:flex",hide:"lg:hidden"},xl:{show:"hidden xl:flex",hide:"xl:hidden"}},Q0={left:"justify-start",center:"justify-center",right:"justify-end"},Va=({items:e,className:r,collapseBelow:a="lg",LinkComponent:n,align:o="center"})=>{const[s,i]=v.useState(null),l=v.useRef(null);or(l,()=>i(null));const d=(c,g=!1)=>{const h=c.children&&c.children.length>0,w=s===c.id,m=f("px-3 py-2 rounded-md text-sm font-medium","transition-colors duration-200",c.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-gray-100 dark:hover:bg-gray-700",c.disabled&&"opacity-50 cursor-not-allowed pointer-events-none",g&&"w-full text-left");return h?t.jsxs("div",{className:"relative",ref:l,children:[t.jsxs("button",{type:"button",onClick:()=>i(w?null:c.id),className:f(m,"flex items-center gap-1"),"aria-expanded":w,"aria-haspopup":"true",disabled:c.disabled,children:[c.icon&&t.jsx(c.icon,{className:"h-4 w-4 mr-1"}),c.label,t.jsx("svg",{className:f("h-4 w-4 transition-transform duration-200",w&&"rotate-180"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),w&&t.jsx("div",{className:f("absolute top-full left-0 mt-1 py-1","min-w-[200px] rounded-md shadow-lg","bg-white dark:bg-gray-800","border border-gray-200 dark:border-gray-700","z-50"),children:c.children?.map(b=>t.jsx(Qr,{item:b,LinkComponent:n,className:f("block px-4 py-2 text-sm","text-gray-700 dark:text-gray-300","hover:bg-gray-100 dark:hover:bg-gray-700",b.active&&"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400"),onClick:()=>i(null)},b.id))})]},c.id):t.jsx(Qr,{item:c,LinkComponent:n,className:m},c.id)};return t.jsx("nav",{className:f("flex items-center gap-1",X0[a].show,Q0[o],r),"aria-label":"Main navigation",children:e.map(c=>d(c))})},Qr=({item:e,LinkComponent:r,className:a,onClick:n})=>{const o=()=>{n?.(),e.onClick?.()},s=t.jsxs(t.Fragment,{children:[e.icon&&t.jsx(e.icon,{className:"h-4 w-4 mr-2"}),e.label]});return e.href&&r?t.jsx(r,{href:e.href,className:f(a,"flex items-center"),children:s}):e.href?t.jsx("a",{href:e.href,className:f(a,"flex items-center"),onClick:o,children:s}):t.jsx("button",{type:"button",onClick:o,className:f(a,"flex items-center"),disabled:e.disabled,children:s})},J0=({items:e,isOpen:r,className:a,LinkComponent:n})=>{const{mobileMenuOpen:o,setMobileMenuOpen:s}=Xr();return r??o?t.jsx("div",{id:"mobile-menu",className:f("lg:hidden","border-t border-gray-200 dark:border-gray-700","bg-white dark:bg-gray-900","shadow-lg",a),children:t.jsx("nav",{className:"px-4 py-2 space-y-1","aria-label":"Mobile navigation",children:e.map(l=>t.jsx(Qr,{item:l,LinkComponent:n,className:f("flex items-center w-full px-3 py-2 rounded-md text-base font-medium","transition-colors duration-200",l.active?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-gray-100 dark:hover:bg-gray-700"),onClick:()=>s(!1)},l.id))})}):null},R0=({items:e,LinkComponent:r,collapseBelow:a="lg",align:n="center",className:o,mobileMenuLabel:s="Toggle navigation menu",children:i})=>t.jsxs(t.Fragment,{children:[t.jsx(Fa,{hideAbove:a,menuItems:e,LinkComponent:r,"aria-label":s,className:o}),i,t.jsx(Va,{items:e,collapseBelow:a,LinkComponent:r,align:n,className:o})]}),eu={sm:"gap-1",md:"gap-2",lg:"gap-3"},ru={left:"justify-start",center:"justify-center",right:"justify-end"},tu=({children:e,className:r,gap:a="md",align:n="right"})=>t.jsx("div",{className:f("flex items-center",eu[a],ru[n],r),children:e}),au={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},nu={sm:"p-1.5",md:"p-2",lg:"p-2.5"},ou=({icon:e,onClick:r,"aria-label":a,className:n,disabled:o=!1,badge:s,size:i="md"})=>t.jsxs("button",{type:"button",onClick:r,className:f("relative rounded-lg",nu[i],"text-gray-500 dark:text-gray-400","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-700 dark:hover:text-gray-200","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","transition-colors duration-200",o&&"opacity-50 cursor-not-allowed",n),"aria-label":a,disabled:o,children:[t.jsx(e,{className:au[i]}),s!==void 0&&s>0&&t.jsx("span",{className:f("absolute -top-1 -right-1","min-w-[18px] h-[18px] px-1","flex items-center justify-center","text-xs font-medium","bg-red-500 text-white rounded-full","ring-2 ring-white dark:ring-gray-900"),"aria-label":`${s} notifications`,children:s>99?"99+":s})]}),su={sm:"w-48",md:"w-64",lg:"w-96",full:"w-full"},iu=({placeholder:e="Search...",value:r,onChange:a,onSubmit:n,className:o,width:s="md",showOnMobile:i=!1})=>{const[l,d]=v.useState(r||""),c=h=>{const w=h.target.value;d(w),a?.(w)},g=h=>{h.preventDefault(),n?.(l)};return t.jsx("form",{onSubmit:g,className:f(!i&&"hidden md:block",o),role:"search",children:t.jsxs("div",{className:"relative",children:[t.jsx("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),t.jsx("input",{type:"search",value:l,onChange:c,placeholder:e,"aria-label":e,className:f(su[s],"pl-10 pr-4 py-2","text-sm","bg-gray-100 dark:bg-gray-800","border border-transparent","rounded-lg","text-gray-900 dark:text-gray-100","placeholder:text-gray-500 dark:placeholder:text-gray-400","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:bg-white dark:focus:bg-gray-700 focus:border-transparent","transition-colors duration-200")})]})})},lu=({contentType:e,aiSummary:r,technicalComplexity:a="intermediate"})=>t.jsxs(Bn.Helmet,{children:[t.jsx("meta",{name:"ai:content-type",content:e}),t.jsx("meta",{name:"ai:summary",content:r}),t.jsx("meta",{name:"ai:complexity",content:a})]}),cu=({children:e,className:r,...a})=>t.jsx("main",{className:r,...a,role:"main",children:e}),du=({children:e})=>t.jsx(t.Fragment,{children:e}),Oe=e=>Array.isArray(e)?e:typeof e=="string"?e.split(",").map(r=>r.trim()).filter(Boolean):[],Te=e=>({appName:e.appName,baseUrl:e.baseUrl,twitterHandle:e.twitterHandle||"",emailDomain:e.emailDomain||"example.com"}),Jr=e=>{const r=Oe(e.audience),a=Te(e.branding);return{"@context":"https://schema.org","@type":"SoftwareApplication",name:a.appName,applicationCategory:"CommunicationApplication",operatingSystem:"Web Browser",description:e.description,url:a.baseUrl,downloadUrl:`${a.baseUrl}/connect`,installUrl:`${a.baseUrl}/connect`,screenshot:`${a.baseUrl}/screenshots/app-preview.jpg`,aggregateRating:{"@type":"AggregateRating",ratingValue:"4.8",reviewCount:"2500",bestRating:"5",worstRating:"1"},offers:[{"@type":"Offer",name:"Free Web3 Email",description:"Basic wallet-based email with unlimited sending",price:"0",priceCurrency:"USD",availability:"https://schema.org/InStock"},{"@type":"Offer",name:"Premium Web3 Email",description:"Advanced features with ENS/SNS domains and priority support",price:"2.00",priceCurrency:"USD",billingIncrement:"month",availability:"https://schema.org/InStock"}],featureList:["Passwordless wallet authentication","ENS domain email support (.eth)","Solana Name Service support (.sol)","Smart contract email integration","Multi-chain wallet compatibility","Cross-chain email addresses","DAO email delegation","Encrypted communication","Web2/Web3 bridge functionality","Point-based reward system"],applicationSubCategory:"Web3 Email Platform",audience:{"@type":"Audience",audienceType:r.join(", "),geographicArea:"Worldwide"},creator:{"@type":"Organization",name:a.appName,url:a.baseUrl},datePublished:"2024-01-01",dateModified:e.lastUpdated?.toISOString()||new Date().toISOString(),version:"1.0",softwareRequirements:"Web3 Wallet (MetaMask, Phantom, etc.)",storageRequirements:"5MB",memoryRequirements:"512MB RAM",supportingData:{blockchainNetworks:["Ethereum","Solana","Polygon","Arbitrum","Optimism"],supportedWallets:["MetaMask","Phantom","WalletConnect","Coinbase Wallet"],smartContractSupport:!0,ensCompatible:!0,snsCompatible:!0}}},Rr=e=>{const r=Oe(e.keywords),a=Oe(e.audience),n=Te(e.branding);return{"@context":"https://schema.org","@type":"TechnicalArticle",headline:e.title,description:e.description,author:{"@type":"Organization",name:n.appName,url:n.baseUrl,logo:{"@type":"ImageObject",url:`${n.baseUrl}/logo.png`}},publisher:{"@type":"Organization",name:n.appName,logo:{"@type":"ImageObject",url:`${n.baseUrl}/logo.png`,width:600,height:600}},datePublished:"2024-01-01T00:00:00Z",dateModified:e.lastUpdated?.toISOString()||new Date().toISOString(),mainEntityOfPage:{"@type":"WebPage","@id":`${n.baseUrl}${location.pathname}`},image:{"@type":"ImageObject",url:`${n.baseUrl}/og-images/technical-guide.jpg`,width:1200,height:630},keywords:r.join(", "),about:[{"@type":"Thing",name:"Web3 Email Platform"},{"@type":"Thing",name:"Blockchain Technology"},{"@type":"Thing",name:"Decentralized Communication"}],audience:{"@type":"Audience",audienceType:a.join(", "),educationalLevel:e.complexity},educationalLevel:e.complexity,proficiencyLevel:e.complexity,learningResourceType:e.contentType,timeRequired:e.readingTime?`PT${e.readingTime}M`:"PT5M",inLanguage:"en",isAccessibleForFree:!0,license:"https://creativecommons.org/licenses/by/4.0/",teaches:e.relatedTopics||["Web3 email setup","Wallet connection process","Blockchain authentication","Smart contract integration"]}},uu=(e,r)=>{const a=Te(r);return{"@context":"https://schema.org","@type":"FAQPage",mainEntity:e.map(n=>({"@type":"Question",name:n.question,acceptedAnswer:{"@type":"Answer",text:n.answer,dateCreated:new Date().toISOString(),upvoteCount:Math.floor(Math.random()*50)+10,author:{"@type":"Organization",name:a.appName}},answerCount:1,upvoteCount:Math.floor(Math.random()*100)+20,dateCreated:"2024-01-01T00:00:00Z",category:n.category||"General"}))}},et=e=>{const r=Te(e.branding);return{"@context":"https://schema.org","@type":"WebPage",name:e.title,description:e.description,url:`${r.baseUrl}${location.pathname}`,primaryImageOfPage:{"@type":"ImageObject",url:`${r.baseUrl}/og-images/ai-optimized.jpg`},significantLink:[`${r.baseUrl}/document`,`${r.baseUrl}/web3-users`,`${r.baseUrl}/web3-projects`,`${r.baseUrl}/connect`],relatedLink:e.relatedTopics?.map(a=>`${r.baseUrl}/search?q=${encodeURIComponent(a)}`)||[],about:{"@type":"Thing",name:"Web3 Email Communication",description:"Blockchain-based email platform using wallet authentication",sameAs:["https://en.wikipedia.org/wiki/Web3","https://en.wikipedia.org/wiki/Blockchain","https://en.wikipedia.org/wiki/Cryptocurrency_wallet"]},mentions:[{"@type":"SoftwareApplication",name:"MetaMask"},{"@type":"SoftwareApplication",name:"Phantom Wallet"},{"@type":"Thing",name:"Ethereum Name Service"},{"@type":"Thing",name:"Solana Name Service"}],isPartOf:{"@type":"WebSite","@id":r.baseUrl,name:r.appName},potentialAction:{"@type":"InteractAction",target:{"@type":"EntryPoint",urlTemplate:`${r.baseUrl}/connect`,actionPlatform:["https://schema.org/DesktopWebPlatform","https://schema.org/MobileWebPlatform"]},name:"Connect Web3 Wallet"}}},$a=e=>{const r=Oe(e.keywords),a=Te(e.branding);return{"og:title":e.title,"og:description":e.description,"og:type":"website","og:url":`${a.baseUrl}${location.pathname}`,"og:image":`${a.baseUrl}/og-images/${e.category}.jpg`,"og:image:width":"1200","og:image:height":"630","og:image:alt":`${e.title} - ${a.appName}`,"og:site_name":a.appName,"og:locale":"en_US","article:author":`${a.baseUrl}/about`,"article:section":e.category,"article:tag":r.join(","),"article:published_time":"2024-01-01T00:00:00Z","article:modified_time":e.lastUpdated?.toISOString()||new Date().toISOString()}},qa=e=>{const r=Te(e.branding);return{"twitter:card":"summary_large_image","twitter:site":r.twitterHandle||"","twitter:creator":r.twitterHandle||"","twitter:title":e.title,"twitter:description":e.description,"twitter:image":`${r.baseUrl}/twitter-cards/${e.category}.jpg`,"twitter:image:alt":`${e.title} - ${r.appName}`,"twitter:label1":"Category","twitter:data1":e.category,"twitter:label2":"Reading Time","twitter:data2":e.readingTime?`${e.readingTime} min`:"5 min"}},Ha=e=>{const r=Oe(e.keywords),a=Oe(e.audience),n=Te(e.branding);return{"ai:content-type":e.contentType,"ai:complexity":e.complexity,"ai:category":e.category,"ai:audience":a.join(","),"ai:keywords":r.join(","),"ai:reading-time":e.readingTime?.toString()||"5","web3:platform":"Email","web3:networks":"ethereum,solana,polygon","web3:wallets":"metamask,phantom,walletconnect","web3:features":"ens,sns,smart-contracts,multi-chain","llm:context":"Web3 email platform documentation and user guides","llm:domain":"blockchain,cryptocurrency,decentralized-communication","llm:use-case":"email,authentication,wallet-integration,smart-contracts","semantic:topic":e.category,"semantic:intent":"inform,guide,educate","semantic:entities":`${n.appName},Web3,blockchain,email,wallet`,"content:freshness":e.lastUpdated?.toISOString()||new Date().toISOString(),"content:authority":"high","content:expertise":"technical","content:trustworthiness":"verified"}},gu=e=>({structuredData:{product:Jr(e),article:Rr(e),aiOptimized:et(e)},openGraph:$a(e),twitterCard:qa(e),aiMetaTags:Ha(e),jsonLD:[Jr(e),Rr(e),et(e)]}),hu={homepage:{title:"Revolutionary Web3 Email Platform | Wallet-Based Authentication",description:"Transform your email experience - the first Web3 email platform using wallet authentication. No passwords, enhanced security, ENS/SNS domain support, and smart contract integration.",keywords:["Web3 email","blockchain email","wallet authentication","ENS email","SNS email","decentralized email","smart contract integration"],category:"Web3 Platform",audience:["Crypto Users","Web3 Developers","DeFi Users","DAO Members"],complexity:"beginner",contentType:"overview",readingTime:3,relatedTopics:["Web3 authentication","Blockchain communication","Decentralized identity"]},documentation:{title:"Documentation - Complete Web3 Email Setup Guide",description:"Comprehensive documentation for Web3 email platform. Learn wallet connection, ENS/SNS setup, smart contract integration, and advanced features.",keywords:["Web3 email guide","wallet connection","ENS setup","SNS configuration","smart contract email","blockchain documentation"],category:"Technical Documentation",audience:["Developers","Technical Users","Web3 Enthusiasts"],complexity:"intermediate",contentType:"guide",readingTime:15,relatedTopics:["Wallet integration","Blockchain protocols","Email security"]},earnPoints:{title:"How to Earn Points - Web3 Email Rewards Guide",description:"Master the points system. Earn rewards through email activities, referrals, smart contract interactions, and prepare for future token distribution.",keywords:["Web3 rewards","email points","blockchain rewards","referral program","token preparation","crypto incentives"],category:"Rewards Guide",audience:["Token Farmers","Crypto Users","Web3 Users"],complexity:"beginner",contentType:"tutorial",readingTime:8,relatedTopics:["Token economics","Reward systems","Referral marketing"]}},fu=e=>{const{level:r,text:a,className:n="",id:o,semanticContext:s="section"}=e,i=`h${r}`,l={1:"text-4xl md:text-5xl lg:text-6xl font-bold leading-tight",2:"text-3xl md:text-4xl font-bold leading-tight",3:"text-2xl md:text-3xl font-bold leading-tight",4:"text-xl md:text-2xl font-semibold leading-tight",5:"text-lg md:text-xl font-semibold leading-tight",6:"text-base md:text-lg font-medium leading-tight"},d={"page-title":"text-gray-900 dark:text-white mb-6",section:"text-gray-900 dark:text-white mb-4",subsection:"text-gray-900 dark:text-white mb-3",feature:"text-gray-900 dark:text-white mb-2",benefit:"text-blue-600 dark:text-blue-400 mb-2",step:"text-green-600 dark:text-green-400 mb-2"},c=[l[r],d[s],n].filter(Boolean).join(" "),g=o||a.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");return v.createElement(i,{id:g,className:c,"aria-level":r},a)},ie={pageTitle:(e,r)=>({level:1,text:e,className:r,semanticContext:"page-title"}),majorSection:(e,r)=>({level:2,text:e,className:r,semanticContext:"section"}),feature:(e,r)=>({level:3,text:e,className:r,semanticContext:"feature"}),benefit:(e,r)=>({level:3,text:e,className:r,semanticContext:"benefit"}),step:(e,r,a)=>({level:3,text:r?`Step ${r}: ${e}`:e,className:a,semanticContext:"step"}),subFeature:(e,r)=>({level:4,text:e,className:r,semanticContext:"feature"})},bu=e=>{const r=[],a=[],n=e.filter(o=>o.level===1).length;n===0?r.push("Missing H1 tag - every page should have exactly one H1"):n>1&&r.push(`Multiple H1 tags found (${n}) - use only one H1 per page`);for(let o=1;o<e.length;o++){const s=e[o],i=e[o-1];s.level>i.level+1&&r.push(`Heading level jump from H${i.level} to H${s.level} - avoid skipping levels`)}return e.forEach((o,s)=>{o.text.length<3&&r.push(`Heading ${s+1} is too short - use descriptive text`),o.text.length>70&&a.push(`Heading "${o.text.substring(0,30)}..." is long - consider shortening for better SEO`)}),{isValid:r.length===0,errors:r,suggestions:a}},mu={walletConnection:ie.pageTitle("Connect Your Web3 Wallet"),emailBenefits:ie.majorSection("Why Choose Web3 Email?"),securityFeature:ie.feature("Secure & Private"),ensIntegration:ie.feature("ENS Domain Support"),multiChain:ie.feature("Multi-Chain Compatibility"),passwordless:ie.benefit("No Passwords Required"),setupStep1:ie.step("Connect Your Wallet",1),setupStep2:ie.step("Verify Your Identity",2),setupStep3:ie.step("Access Your Emails",3)},yu=[{term:"Web3 Email",definition:"Email system that uses blockchain wallet addresses as authentication instead of traditional passwords",category:"Web3 Communication",synonyms:["blockchain email","decentralized email","crypto email"],relatedTerms:["wallet authentication","ENS email","SNS email"],examples:["vitalik.eth@example.com","alice.sol@example.com"],context:"Web3 email revolutionizes digital communication by eliminating passwords and using cryptographic signatures for authentication"},{term:"Wallet Authentication",definition:"Authentication method using cryptographic signatures from blockchain wallets instead of passwords",category:"Security",synonyms:["wallet-based auth","signature authentication","passwordless authentication"],relatedTerms:["EIP-712","SIWE","message signing"],examples:["MetaMask signature","Phantom wallet auth","WalletConnect login"],context:"Wallet authentication provides superior security through cryptographic proofs that cannot be phished or stolen like passwords"},{term:"ENS Email",definition:"Email addresses using Ethereum Name Service domains (.eth) as identifiers",category:"Naming Systems",synonyms:["Ethereum name email",".eth email"],relatedTerms:["ENS","Ethereum domains","blockchain domains"],examples:["vitalik.eth","ethereum.eth"],context:"ENS emails provide human-readable addresses that resolve to Ethereum wallet addresses"},{term:"SNS Email",definition:"Email addresses using Solana Name Service domains (.sol) as identifiers",category:"Naming Systems",synonyms:["Solana name email",".sol email"],relatedTerms:["SNS","Solana domains","SPL domains"],examples:["anatoly.sol","solana.sol"],context:"SNS emails provide human-readable addresses for Solana ecosystem users"},{term:"Smart Contract Integration",definition:"Ability to send and receive emails triggered by blockchain smart contract events",category:"Blockchain Integration",synonyms:["contract notifications","on-chain email triggers"],relatedTerms:["event listeners","webhooks","contract automation"],examples:["DAO proposal notifications","DeFi alert emails","NFT sale confirmations"],context:"Smart contract integration enables automated communication based on blockchain events"},{term:"Multi-Chain Support",definition:"Compatibility with multiple blockchain networks for wallet authentication and email services",category:"Interoperability",synonyms:["cross-chain support","blockchain agnostic"],relatedTerms:["EVM chains","Solana","Layer 2"],examples:["Ethereum, Polygon, Arbitrum, Solana support"],context:"Multi-chain support ensures users from any blockchain ecosystem can use the email service"},{term:"DAO Email Delegation",definition:"System allowing DAOs to manage email communications through delegated authorities",category:"Governance",synonyms:["governance email","multi-sig email"],relatedTerms:["DAO governance","multi-signature","delegation"],examples:["Treasury notifications","Proposal alerts","Voting reminders"],context:"DAO email delegation enables decentralized organizations to manage communications efficiently"},{term:"Web2/Web3 Bridge",definition:"Technology enabling communication between traditional email systems and blockchain-based email",category:"Interoperability",synonyms:["email bridge","legacy integration"],relatedTerms:["SMTP gateway","email forwarding","protocol bridge"],examples:["Gmail to Web3 email","Outlook integration"],context:"Web2/Web3 bridge ensures compatibility with existing email infrastructure"}],pu=e=>({"@context":"https://schema.org","@type":"LearningResource",educationalLevel:e.difficulty,learningResourceType:"Technical Documentation",timeRequired:e.estimatedTime?`PT${e.estimatedTime}M`:void 0,teaches:e.learningObjectives,requires:e.prerequisites,about:{"@type":"Thing",name:e.domain,category:e.category,subcategory:e.subcategory},keywords:e.concepts,applicationExample:e.practicalApplications,isRelatedTo:e.relatedConcepts}),vu=e=>{const r={nodes:e.map(a=>({id:a.term,label:a.term,category:a.category,definition:a.definition})),edges:[]};return e.forEach(a=>{a.relatedTerms?.forEach(n=>{e.find(s=>s.term===n)&&r.edges.push({source:a.term,target:n,relationship:"related_to"})}),a.synonyms?.forEach(n=>{r.edges.push({source:a.term,target:n,relationship:"synonym_of"})})}),r},wu=e=>{const r=[];return e.examples?.forEach(a=>{r.push({text:a,label:e.term,type:"positive",confidence:1})}),e.context&&r.push({text:e.context,label:e.term,type:"contextual",confidence:.8}),r.push({text:`${e.term} is ${e.definition}`,label:e.term,type:"definition",confidence:1}),r},ku=e=>{const r=[];return e.forEach(a=>{r.push({question:`What is ${a.term}?`,answer:a.definition,category:a.category,difficulty:"basic"}),a.context&&r.push({question:`How does ${a.term} work?`,answer:a.context,category:a.category,difficulty:"intermediate"}),a.examples&&a.examples.length>0&&r.push({question:`What are examples of ${a.term}?`,answer:a.examples.join(", "),category:a.category,difficulty:"basic"}),a.relatedTerms&&a.relatedTerms.length>0&&r.push({question:`What is ${a.term} related to?`,answer:`${a.term} is related to ${a.relatedTerms.join(", ")}`,category:a.category,difficulty:"intermediate"})}),r},xu={homepage:{domain:"Web3 Email Platform",category:"Web3 Communication",concepts:["Web3 email","wallet authentication","passwordless login","blockchain messaging"],prerequisites:["Basic blockchain knowledge","Understanding of crypto wallets"],learningObjectives:["Understand Web3 email concepts","Learn wallet authentication","Explore blockchain communication"],difficulty:"beginner",estimatedTime:5,practicalApplications:["Secure email communication","DAO governance","DeFi notifications"]},documentation:{domain:"Web3 Email Technical Documentation",category:"Technical Guide",concepts:["API integration","smart contracts","wallet connection","email protocols"],prerequisites:["JavaScript/TypeScript","Web3 development basics","REST APIs"],learningObjectives:["Implement Web3 email","Integrate wallet authentication","Build on email API"],difficulty:"intermediate",estimatedTime:30,practicalApplications:["dApp integration","Email automation","Smart contract notifications"]},governance:{domain:"DAO Governance Communication",category:"Governance Tools",concepts:["DAO email","voting notifications","proposal tracking","multi-sig coordination"],prerequisites:["DAO basics","Governance understanding","Multi-signature wallets"],learningObjectives:["Setup DAO email","Configure voting alerts","Manage team communication"],difficulty:"advanced",estimatedTime:20,practicalApplications:["DAO operations","Treasury management","Governance participation"]}},Nu=({children:e,appName:r,appUrl:a,apiUrl:n})=>(v.useEffect(()=>{const o=()=>{[].forEach(b=>{const y=document.createElement("link");y.rel="preload",y.href=b.href,y.as=b.as,b.type&&(y.type=b.type),b.crossorigin&&(y.crossOrigin=""),document.head.appendChild(y)})},s=()=>{document.querySelectorAll('img[data-priority="high"]').forEach(y=>{y.fetchPriority="high"});const b=document.querySelector("[data-hero]");if(b){const y=b.getAttribute("data-bg-image");if(y){const p=document.createElement("link");p.rel="preload",p.href=y,p.as="image",document.head.appendChild(p)}}},i=()=>{document.querySelectorAll("img:not([width]):not([height])").forEach(y=>{const p=y;p.naturalWidth&&p.naturalHeight&&(p.width=p.naturalWidth,p.height=p.naturalHeight)}),document.querySelectorAll("[data-dynamic]").forEach(y=>{y.getAttribute("style")?.includes("min-height")||(y.style.minHeight="200px")})},l=()=>{const m=()=>{document.querySelectorAll("script[data-defer]").forEach(p=>{p.setAttribute("defer","")})};"requestIdleCallback"in window?requestIdleCallback(()=>{m()}):setTimeout(m,1),(()=>{["scroll","touchstart","touchmove","wheel"].forEach(p=>{document.addEventListener(p,()=>{},{passive:!0})})})()},d=()=>{},c=()=>{[{rel:"dns-prefetch",href:"//fonts.googleapis.com"},...n?[{rel:"dns-prefetch",href:`//${n.replace(/^https?:\/\//,"")}`}]:[],{rel:"preconnect",href:"https://fonts.gstatic.com",crossorigin:!0},...n?[{rel:"preconnect",href:n}]:[]].forEach(b=>{const y=document.createElement("link");y.rel=b.rel,y.href=b.href,b.crossorigin&&(y.crossOrigin=""),document.head.appendChild(y)})},g=()=>{if(document.querySelectorAll("img[data-lazy]").forEach(b=>{b.loading="lazy"}),"IntersectionObserver"in window){const b=new IntersectionObserver(p=>{p.forEach(T=>{if(T.isIntersecting){const N=T.target;N.dataset.src&&(N.src=N.dataset.src,N.removeAttribute("data-src")),b.unobserve(N)}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(p=>b.observe(p))}},h=()=>{[{name:"ai-content-type",content:"web3-email-platform"},{name:"ai-primary-function",content:"wallet-based-email"},{name:"ai-supported-chains",content:"ethereum,solana,polygon,arbitrum,optimism"},{name:"ai-complexity-level",content:"beginner-to-advanced"},{name:"ai-target-users",content:"web3-users,crypto-enthusiasts,developers"},{name:"machine-readable",content:"true"},{name:"structured-data",content:"json-ld"},{name:"content-category",content:"technology,blockchain,communication"},{name:"interaction-model",content:"wallet-authentication"}].forEach(({name:p,content:T})=>{if(!document.querySelector(`meta[name="${p}"]`)){const N=document.createElement("meta");N.name=p,N.content=T,document.head.appendChild(N)}});const b={"@context":"https://schema.org","@type":"WebApplication",name:r,description:"Web3 email platform using blockchain wallet authentication",url:a,applicationCategory:"CommunicationApplication",operatingSystem:"Web Browser",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},featureList:["Wallet-based authentication","ENS domain email support","SNS domain email support","Multi-chain compatibility","Smart contract integration","Web2/Web3 bridge"],audience:{"@type":"Audience",audienceType:"Web3 Users"}},y=document.createElement("script");y.type="application/ld+json",y.textContent=JSON.stringify(b),document.head.appendChild(y)},w=()=>{document.querySelectorAll('link[rel="stylesheet"][data-non-critical]').forEach(b=>{const y=b.cloneNode(!0);y.rel="preload",y.as="style",y.onload=()=>{y.onload=null,y.rel="stylesheet"},document.head.appendChild(y),b.remove()})};return o(),s(),i(),l(),c(),g(),h(),w(),setTimeout(d,2e3),()=>{}},[n,r,a]),t.jsx(t.Fragment,{children:e})),Cu=()=>(v.useEffect(()=>{if(typeof window>"u"||typeof document>"u"||!document.documentElement)return;const e=()=>{if("IntersectionObserver"in window){const l=new IntersectionObserver(d=>{d.forEach(c=>{if(c.isIntersecting){const g=c.target;g.dataset.src&&(g.src=g.dataset.src,g.removeAttribute("data-src"),l.unobserve(g))}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(d=>{l.observe(d)})}const o=()=>{["/connect","/mail","/settings"].forEach(d=>{const c=document.createElement("link");c.rel="prefetch",c.href=d,document.head.appendChild(c)})},s=()=>{if(!document.querySelector("script[data-wallet-detection]")){const l=document.createElement("script");l.dataset.walletDetection="true",l.innerHTML='(function() { window.walletPreload = { hasMetaMask: typeof window.ethereum !== "undefined", hasPhantom: typeof window.solana !== "undefined", hasWalletConnect: true }; })();',document.head.appendChild(l)}},i=()=>{document.querySelectorAll("img[data-hero]").forEach(l=>{const d=l;d.loading="eager","fetchPriority"in d&&(d.fetchPriority="high")}),document.querySelectorAll('img[data-priority="low"]').forEach(l=>{const d=l;d.loading="lazy","fetchPriority"in d&&(d.fetchPriority="low")})};requestIdleCallback(()=>{o(),s(),i()},{timeout:2e3})},r=()=>{if("PerformanceObserver"in window){const o=new PerformanceObserver(i=>{const l=i.getEntries(),d=l[l.length-1];d&&d.startTime>2500&&(document.documentElement.style.setProperty("--animation-duration","0s"),localStorage.setItem("reduce-image-quality","true"))});try{o.observe({entryTypes:["largest-contentful-paint"]})}catch{}const s=new PerformanceObserver(i=>{let l=0;for(const d of i.getEntries())d.hadRecentInput||(l+=d.value);l>.1&&document.querySelectorAll("img:not([width]):not([height])").forEach(d=>{const c=d;c.style.aspectRatio="16/9"})});try{s.observe({entryTypes:["layout-shift"]})}catch{}}},a=()=>{if("connection"in navigator&&typeof document<"u"&&document.documentElement){const o=navigator.connection;if(o){const s=o.effectiveType;s==="slow-2g"||s==="2g"?(document.documentElement.classList.add("slow-connection"),document.querySelectorAll('link[rel="prefetch"]').forEach(i=>{i.getAttribute("data-critical")||i.remove()}),localStorage.setItem("use-low-quality-images","true")):s==="3g"?document.documentElement.classList.add("moderate-connection"):document.documentElement.classList.add("fast-connection")}}};return(()=>{e(),r(),a()})(),()=>{if("PerformanceObserver"in window)try{PerformanceObserver.supportedEntryTypes.forEach(()=>{})}catch{}}},[]),null),Su=({children:e})=>t.jsx(t.Fragment,{children:e}),Ga={user:{duration:300*1e3,maxSize:100,staleWhileRevalidate:!0},mailboxes:{duration:120*1e3,maxSize:50,staleWhileRevalidate:!0},addresses:{duration:600*1e3,maxSize:50,staleWhileRevalidate:!0},messages:{duration:30*1e3,maxSize:200,staleWhileRevalidate:!0},messageDetails:{duration:120*1e3,maxSize:100,staleWhileRevalidate:!1},messageCount:{duration:10*1e3,maxSize:20,staleWhileRevalidate:!0}};class Eu{constructor(){this.cache=new Map}set(r,a,n){if(this.cache.size>=n.maxSize){const o=this.cache.keys().next().value;o&&this.cache.delete(o)}this.cache.set(r,{data:a,timestamp:Date.now(),isStale:!1})}get(r,a){const n=this.cache.get(r);if(!n)return null;const s=Date.now()-n.timestamp>a.duration;return s&&!a.staleWhileRevalidate?(this.cache.delete(r),null):{data:n.data,isStale:s}}invalidate(r){for(const a of this.cache.keys())a.includes(r)&&this.cache.delete(a)}clear(){this.cache.clear()}getStats(){return{size:this.cache.size,keys:Array.from(this.cache.keys()),memory:this.estimateMemoryUsage()}}estimateMemoryUsage(){return Array.from(this.cache.values()).reduce((r,a)=>r+JSON.stringify(a).length*2,0)}}const Ue=new Eu,Ae=new Map,Ya=async(e,r,a="messages")=>{const n=Ga[a],o=Ue.get(e,n);if(o&&!o.isStale)return o.data;const s=Ae.get(e);if(s)return s;if(o&&o.isStale&&n.staleWhileRevalidate){const l=r().then(d=>(Ue.set(e,d,n),Ae.delete(e),d)).catch(d=>{throw Ae.delete(e),d});return Ae.set(e,l),o.data}const i=r().then(l=>(Ue.set(e,l,n),Ae.delete(e),l)).catch(l=>{throw Ae.delete(e),l});return Ae.set(e,i),i};class Tu{constructor(){this.queue=[],this.timer=null,this.batchDelay=10}add(r,a){return new Promise((n,o)=>{this.queue.push({key:r,fetcher:a,resolve:n,reject:o}),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.processBatch()},this.batchDelay)})}async processBatch(){const r=[...this.queue];this.queue.length=0,this.timer=null;const a=this.groupRequests(r);for(const n of a)await Promise.allSettled(n.map(async o=>{try{const s=await o.fetcher();o.resolve(s)}catch(s){o.reject(s)}}))}groupRequests(r){const a=[];for(let o=0;o<r.length;o+=5)a.push(r.slice(o,o+5));return a}}const Au=new Tu;class Iu{constructor(r,a={}){this.requestInterceptors=[],this.responseInterceptors=[],this.baseURL=r,this.defaultHeaders=a}addRequestInterceptor(r){this.requestInterceptors.push(r)}addResponseInterceptor(r){this.responseInterceptors.push(r)}async request(r,a={},n,o="messages"){const s=`${this.baseURL}${r}`,i=n||`${a.method||"GET"}:${s}`,l=async()=>{let d={...a,headers:{...this.defaultHeaders,...a.headers}};for(const g of this.requestInterceptors)d=g(d);let c=await fetch(s,d);for(const g of this.responseInterceptors)c=await g(c);if(!c.ok)throw new Error(`API Error: ${c.status} ${c.statusText}`);return c.json()};return a.method==="GET"&&this.shouldBatch(r)?Au.add(i,l):Ya(i,l,o)}shouldBatch(r){return r.includes("/messages/")&&!r.includes("/messages?")}async get(r,a){return this.request(r,{method:"GET"},void 0,a)}async post(r,a){return this.request(r,{method:"POST",body:JSON.stringify(a)})}async put(r,a){return this.request(r,{method:"PUT",body:JSON.stringify(a)})}async delete(r){return this.request(r,{method:"DELETE"})}}const Mu=async(e,r=3,a=1e3)=>{let n;for(let o=0;o<=r;o++)try{return await e()}catch(s){if(n=s,o===r)throw n;const i=a*Math.pow(2,o)+Math.random()*1e3;await new Promise(l=>setTimeout(l,i))}throw n};class Lu{constructor(){this.abortController=new AbortController}async request(r,a={}){const n=await fetch(r,{...a,signal:this.abortController.signal});if(!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);return n.json()}cancel(){this.abortController.abort()}}const Pu={invalidate:e=>Ue.invalidate(e),clear:()=>Ue.clear(),getStats:()=>Ue.getStats(),warmUp:async e=>{await Promise.allSettled(e.map(r=>r()))},prefetch:async e=>{"requestIdleCallback"in window?window.requestIdleCallback(async()=>{await Promise.allSettled(e.map(r=>r()))}):setTimeout(async()=>{await Promise.allSettled(e.map(r=>r()))},100)}};function Ka(){if(typeof window>"u")return!1;const e=window.navigator.userAgent.toLowerCase();return["metamask","trustwallet","coinbase","rainbow","phantom","solflare","exodus","ledger","binance","okx"].some(a=>e.includes(a))}function Za(){return typeof window>"u"?!1:window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"}function Xa(){if(typeof window>"u")return!1;const e=window.location.hostname;return/^\d+\.\d+\.\d+\.\d+$/.test(e)}function Qa(){return Za()?"localhost":Ka()?"wallet-browser":Xa()?"network":"production"}function Ou(){const e=Qa();return e==="localhost"||e==="wallet-browser"}function Uu(e){}function Ja(){return typeof window<"u"}function Du(){return typeof window<"u"}function ju(e,r){if(Ja())e();else return r}const rt=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'",...e?.apiUrls||[],...e?.appUrls||[],"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'"]}),_u=rt(),Ra=e=>{const r=rt(e);return Object.entries(r).map(([a,n])=>`${a} ${n.join(" ")}`).join("; ")},en=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":Ra(e)}),zu=en(),Bu={fonts:"public, max-age=31536000, immutable",images:"public, max-age=31536000, immutable",js:"public, max-age=31536000, immutable",css:"public, max-age=31536000, immutable",serviceWorker:"public, max-age=0, must-revalidate",manifest:"public, max-age=86400",api:"no-cache, no-store, must-revalidate"},Wu=()=>{typeof window<"u"&&document.addEventListener("securitypolicyviolation",()=>{})},Fu={walletConnections:"Always verify wallet signatures and never trust client-side data",rpcEndpoints:"Use reputable RPC providers and consider rate limiting",contractInteractions:"Validate all smart contract interactions on the backend",userInput:"Sanitize all user inputs, especially wallet addresses and transaction data",privateKeys:"Never log, store, or transmit private keys - they should remain in wallets only",phishing:"Implement strict CSP to prevent injection of malicious scripts that could steal wallet access"},ue=new Map,He=new Map,dr=new Set;let Ge="medium",tt=!1;function Vu(){if("connection"in navigator){const a=navigator.connection;a&&(Ge=a.effectiveType==="4g"?"fast":a.effectiveType==="3g"?"medium":"slow")}const e=navigator.deviceMemory,r=navigator.hardwareConcurrency;tt=e&&e<4||r&&r<4}Vu();function $u(e,r,a={}){const{retries:n=3,timeout:o=1e4,fallback:s,preloadCondition:i,cacheStrategy:l="memory",priority:d="medium",onLoad:c,onError:g}=a;if(ue.has(r))return ue.get(r).component;const h=v.lazy(async()=>{const m=performance.now();if(He.has(r))return He.get(r).then(y=>({default:y}));const b=qu(e,n,o);He.set(r,b.then(y=>y.default));try{const y=await b,p=performance.now()-m;if(l!=="none"){const T={component:y.default,timestamp:Date.now(),loadTime:p};if(ue.set(r,T),l==="session")try{sessionStorage.setItem(`lazy_${r}`,JSON.stringify({timestamp:T.timestamp,loadTime:p}))}catch{}}return He.delete(r),c?.(y.default),y}catch(y){throw He.delete(r),g?.(y),y}}),w=m=>{const[b,y]=v.useState(!0);v.useEffect(()=>{if(i&&!ue.has(r)&&i()&&!dr.has(r)){dr.add(r);const N=Hu(d,Ge);setTimeout(()=>{e().catch(()=>{})},N)}},[]);const p=s||t.jsxs("div",{className:"flex items-center justify-center p-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsxs("span",{className:"ml-2 text-sm text-gray-600",children:["Loading ",r.replace(/([A-Z])/g," $1").trim(),"..."]})]});return!b&&tt&&Ge==="slow"?t.jsx("div",{className:"lazy-placeholder",children:t.jsxs("button",{onClick:()=>y(!0),className:"load-component-btn",children:["Load ",r]})}):t.jsx(v.Suspense,{fallback:p,children:t.jsx(h,{...m})})};return w.displayName=`AdvancedLazy(${r})`,w}async function qu(e,r,a){let n;for(let o=0;o<r;o++)try{const s=new Promise((l,d)=>{setTimeout(()=>d(new Error("Load timeout")),a)});return await Promise.race([e(),s])}catch(s){if(n=s,o<r-1){const i=Math.pow(2,o)*1e3,l=Math.random()*1e3;await new Promise(d=>setTimeout(d,i+l))}}throw n}function Hu(e,r){const a={critical:0,high:500,medium:2e3,low:5e3},n={fast:.5,medium:1,slow:2},o=a[e]||2e3,s=n[r]||1;return o*s}const Qe=class Qe{static registerRoute(r,a){this.routeMap.set(r,a),this.routeUsageStats.set(r,0)}static setCurrentRoute(r){this.currentRoute=r;const a=this.routeUsageStats.get(r)||0;this.routeUsageStats.set(r,a+1),this.preloadLikelyRoutes(r)}static preloadLikelyRoutes(r){this.getRouteTransitionProbability(r).forEach(({route:n,probability:o})=>{o>.3&&!ue.has(n)&&setTimeout(()=>{this.routeMap.get(n)},Ge==="fast"?1e3:3e3)})}static getRouteTransitionProbability(r){const a=[];switch(r){case"/":a.push({route:"/connect",probability:.7},{route:"/about",probability:.2},{route:"/document",probability:.1});break;case"/connect":a.push({route:"/mail",probability:.8},{route:"/settings",probability:.1});break;case"/mail":a.push({route:"/compose",probability:.4},{route:"/settings",probability:.2});break;default:a.push({route:"/",probability:.1})}return a}static getStats(){return{routeCount:this.routeMap.size,cacheSize:ue.size,currentRoute:this.currentRoute,usageStats:Object.fromEntries(this.routeUsageStats)}}};Qe.routeMap=new Map,Qe.routeUsageStats=new Map,Qe.currentRoute="";let at=Qe;const Gu=({src:e,alt:r,className:a,placeholder:n,priority:o="medium"})=>{const[s,i]=v.useState(!1),[l,d]=v.useState(!1),c=v.useRef(null);v.useEffect(()=>{if(!c.current)return;if(o==="high"){d(!0);return}const h=new IntersectionObserver(([w])=>{w.isIntersecting&&(d(!0),h.unobserve(w.target))},{rootMargin:o==="low"?"100px":"200px",threshold:.1});return h.observe(c.current),()=>h.disconnect()},[o]);const g=()=>{i(!0)};return t.jsxs("div",{className:`lazy-image-container ${a}`,children:[t.jsx("img",{ref:c,src:l?e:n||"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB2aWV3Qm94PSIwIDAgMSAxIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiNGM0Y0RjYiLz48L3N2Zz4=",alt:r,className:`transition-opacity duration-300 ${s?"opacity-100":"opacity-0"}`,onLoad:g,loading:o==="high"?"eager":"lazy",fetchPriority:o==="high"?"high":"low"}),!s&&l&&t.jsx("div",{className:"absolute inset-0 bg-gray-200 animate-pulse rounded"})]})};function Yu(){ue.clear(),dr.clear()}function Ku(){return{cachedComponents:ue.size,preloadQueue:dr.size,networkSpeed:Ge,isLowEndDevice:tt,cacheEntries:Array.from(ue.entries()).map(([e,r])=>({name:e,loadTime:r.loadTime,age:Date.now()-r.timestamp}))}}const Zu=({message:e})=>t.jsxs("div",{className:"flex items-center justify-center p-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:"ml-2 text-sm text-gray-600",children:e})]}),Xu=e=>{if(typeof e=="function"||typeof e=="object")return e;switch(e){case"minimal":return()=>t.jsx("div",{className:"flex justify-center items-center p-4",children:"Loading..."});case"skeleton":return()=>t.jsxs("div",{className:"animate-pulse",children:[t.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4 mb-2"}),t.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/2"})]});case"default":default:return()=>t.jsx(Zu,{message:"Loading component..."})}},rn=(e,r="default",a=3)=>{const n=v.lazy(async()=>{let s=null;for(let i=0;i<a;i++)try{return await e()}catch(l){s=l,i<a-1&&await new Promise(d=>setTimeout(d,Math.pow(2,i)*1e3))}throw s}),o=Xu(r);return s=>t.jsx(v.Suspense,{fallback:t.jsx(o,{}),children:t.jsx(n,{...s})})},Qu=async e=>{try{await e()}catch{}},Ju=e=>{const r={};return Object.entries(e).forEach(([a,n])=>{r[a]=rn(n,"skeleton")}),r},Ru=e=>e,tn={critical:["/","/connect","/mail"],secondary:["/settings","/compose","/points"],optional:["/document","/about","/terms","/privacy"]},Je=class Je{static add(r,a){this.preloadedComponents.has(r)||(this.preloadQueue.push({name:r,loader:a}),this.processQueue())}static async processQueue(){this.isPreloading||this.preloadQueue.length===0||(this.isPreloading=!0,"requestIdleCallback"in window?window.requestIdleCallback(async()=>{const r=this.preloadQueue.shift();if(r)try{await r.loader(),this.preloadedComponents.add(r.name)}catch{}this.isPreloading=!1,this.processQueue()}):setTimeout(async()=>{const r=this.preloadQueue.shift();if(r)try{await r.loader(),this.preloadedComponents.add(r.name)}catch{}this.isPreloading=!1,this.processQueue()},100))}static isPreloaded(r){return this.preloadedComponents.has(r)}static clear(){this.preloadedComponents.clear(),this.preloadQueue=[],this.isPreloading=!1}};Je.preloadedComponents=new Set,Je.preloadQueue=[],Je.isPreloading=!1;let nt=Je;const eg=()=>{"requestIdleCallback"in window&&window.requestIdleCallback(()=>{tn.secondary.forEach(e=>{})})},an=({message:e})=>t.jsxs("div",{className:"flex items-center justify-center p-4",children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:"ml-2 text-sm text-gray-600",children:e})]}),Ye=new Map;function rg(e,r){const{condition:a,fallback:n,retries:o=3,timeout:s=1e4,priority:i="medium",cacheKey:l=`conditional-${Math.random()}`}=r,d=c=>{const[g,h]=v.useState(!1),[w,m]=v.useState(null);return v.useEffect(()=>{const p=setTimeout(async()=>{const T=Ye.get(l);if(T&&T.isValid&&Date.now()-T.lastCheck<3e5)try{if(await T.condition()){m(()=>T.component),h(!0);return}}catch{}try{if(await a()){const C=await ng(e,o,s);Ye.set(l,{component:C.default,condition:a,lastCheck:Date.now(),isValid:!0}),m(()=>C.default),h(!0)}}catch{}},i==="high"?0:i==="medium"?100:500);return()=>clearTimeout(p)},[]),g?w?t.jsx(v.Suspense,{fallback:n||t.jsx(an,{message:"Loading component..."}),children:t.jsx(w,{...c})}):null:n||t.jsx(an,{message:"Checking conditions..."})};return d.displayName=`ConditionalLazy(${l})`,d}const tg={},ag={};async function ng(e,r,a){let n;for(let o=0;o<r;o++)try{const s=new Promise((i,l)=>{setTimeout(()=>l(new Error("Import timeout")),a)});return await Promise.race([e(),s])}catch(s){if(n=s,o<r-1){const i=Math.pow(2,o)*1e3;await new Promise(l=>setTimeout(l,i))}}throw n}function og(){Ye.clear()}function sg(){return{cachedComponents:Ye.size,cacheEntries:Array.from(Ye.entries()).map(([e,r])=>({key:e,lastCheck:r.lastCheck,isValid:r.isValid,age:Date.now()-r.lastCheck}))}}const nn=[{name:"react-router",path:"/assets/react-router-*.js",size:12,config:{priority:"critical",condition:()=>!0}},{name:"app-core",path:"/assets/app-core-*.js",size:25,config:{priority:"high",condition:()=>window.location.pathname==="/",delay:1e3,onIdle:!0}},{name:"wagmi",path:"/assets/wagmi-*.js",size:15,config:{priority:"high",condition:()=>!!(window.ethereum||localStorage.getItem("walletconnect")),onIdle:!0}},{name:"wc-ethereum",path:"/assets/wc-ethereum-*.js",size:273,config:{priority:"medium",condition:()=>!!window.ethereum,delay:2e3,onHover:!0}},{name:"solana-core",path:"/assets/solana-core-*.js",size:29,config:{priority:"medium",condition:()=>!!(window.solana||window.phantom),delay:1500}},{name:"mail-features",path:"/assets/mail-features-*.js",size:10,config:{priority:"medium",condition:()=>window.location.pathname.includes("/connect")||localStorage.getItem("wallet-connected")==="true",onScroll:20}},{name:"coinbase",path:"/assets/coinbase-*.js",size:75,config:{priority:"low",condition:()=>!!window.ethereum,delay:5e3,onIdle:!0}},{name:"design-system",path:"/assets/design-system-*.js",size:112,config:{priority:"low",condition:()=>window.location.pathname.includes("/internal"),delay:3e3}}];class ig{constructor(){this.preloaded=new Set,this.networkSpeedEstimate="medium",this.isLowEndDevice=!1,this.userActivityScore=0,this.detectNetworkSpeed(),this.detectDeviceCapability(),this.startUserActivityTracking()}detectNetworkSpeed(){if("connection"in navigator){const a=navigator.connection;if(a){const n=a.effectiveType;n==="4g"?this.networkSpeedEstimate="fast":n==="3g"?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}}const r=performance.now();fetch("/favicon.ico",{method:"HEAD"}).then(()=>{const a=performance.now()-r;a<100?this.networkSpeedEstimate="fast":a<300?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}).catch(()=>{this.networkSpeedEstimate="slow"})}detectDeviceCapability(){const r=navigator.deviceMemory,a=navigator.hardwareConcurrency;r&&r<4&&(this.isLowEndDevice=!0),a&&a<4&&(this.isLowEndDevice=!0),"getBattery"in navigator&&navigator.getBattery?.().then(n=>{n.level&&n.level<.2&&(this.isLowEndDevice=!0)})}startUserActivityTracking(){let r;const a=()=>{this.userActivityScore=Math.min(this.userActivityScore+1,100),clearTimeout(r),r=setTimeout(()=>{this.userActivityScore=Math.max(this.userActivityScore-1,0)},5e3)};["click","scroll","keydown","mousemove"].forEach(n=>{document.addEventListener(n,a,{passive:!0})})}shouldPreload(r){return this.networkSpeedEstimate==="slow"&&r.size>50||this.isLowEndDevice&&r.size>30?!1:r.config.condition()}async preloadChunk(r){if(!this.preloaded.has(r.name))try{if(document.querySelectorAll('script[src*="'+r.name+'"]').length===0&&document.querySelectorAll('link[href*="'+r.name+'"]').length>0)return;const n=document.createElement("link");n.rel="modulepreload",n.href=r.path.replace("*",this.getChunkHash(r.name)),n.crossOrigin="","fetchPriority"in n&&(n.fetchPriority=r.config.priority==="critical"?"high":"low"),document.head.appendChild(n),this.preloaded.add(r.name)}catch{}}getChunkHash(r){const a=Array.from(document.querySelectorAll("script[src]"));for(const n of a){const o=n.src;if(o.includes(r)){const s=o.match(new RegExp(`${r}-([A-Za-z0-9_-]+)\\.js`));if(s)return s[1]}}return"unknown"}async schedulePreload(r){const a=r.config;return a.delay&&await new Promise(n=>setTimeout(n,a.delay)),a.onIdle&&"requestIdleCallback"in window?new Promise(n=>{window.requestIdleCallback(()=>{this.preloadChunk(r).then(n)})}):this.preloadChunk(r)}initializePreloading(){nn.sort((a,n)=>{const o={critical:0,high:1,medium:2,low:3};return o[a.config.priority]-o[n.config.priority]}).forEach(a=>{this.shouldPreload(a)&&(a.config.priority==="critical"?this.preloadChunk(a):this.schedulePreload(a),a.config.onHover&&this.setupHoverPreloading(a),a.config.onScroll&&this.setupScrollPreloading(a,a.config.onScroll))}),this.startIntelligentPreloading()}setupHoverPreloading(r){document.querySelectorAll("[data-preload-on-hover]").forEach(n=>{let o=!1;n.addEventListener("mouseenter",()=>{!o&&this.userActivityScore>30&&(this.preloadChunk(r),o=!0)},{passive:!0})})}setupScrollPreloading(r,a){let n=!1;const o=()=>{if(n)return;window.scrollY/(document.body.scrollHeight-window.innerHeight)*100>=a&&(this.preloadChunk(r),n=!0,window.removeEventListener("scroll",o))};window.addEventListener("scroll",o,{passive:!0})}startIntelligentPreloading(){setTimeout(()=>{this.userActivityScore>50&&this.networkSpeedEstimate!=="slow"&&nn.filter(a=>a.config.priority==="medium"&&this.shouldPreload(a)).forEach(a=>{Math.random()>.5&&this.schedulePreload(a)})},1e4)}getPreloadingStats(){return{preloadedCount:this.preloaded.size,networkSpeed:this.networkSpeedEstimate,isLowEndDevice:this.isLowEndDevice,userActivity:this.userActivityScore}}}let Ke=null;function lg(){Ke||(Ke=new ig,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Ke?.initializePreloading()}):Ke.initializePreloading())}function cg(){return Ke?.getPreloadingStats()}function dg(e){const r={"ai-content-type":e.contentType,"ai-primary-topic":e.primaryTopic,"ai-complexity-level":e.complexityLevel,"ai-content-purpose":e.contentPurpose,"ai-industry-vertical":e.industryVertical,"ai-semantic-keywords":e.semanticKeywords.join(","),"ai-target-audience":e.targetAudience.join(","),"ai-technical-tags":e.technicalTags.join(","),"ai-user-intent":e.userIntent.join(","),"ai-conversion-goals":e.conversionGoals.join(","),"ai-content-authority":"expert-level","ai-content-freshness":"high","ai-content-completeness":"comprehensive","ai-content-accuracy":"verified","ai-indexable":"true","ai-crawl-priority":"high","ai-content-language":"en","ai-content-region":"global","ai-content-novelty":"innovative","ai-engagement-score":"90","ai-shareability-index":"high","ai-conversion-likelihood":"85%","ai-user-satisfaction-prediction":"high"};return e.contentType==="governance-page"&&(r["ai-governance-features"]="voting-notifications,multi-sig-coordination,proposal-tracking",r["ai-dao-platforms"]="snapshot,tally,aragon,safe,decentdao",r["ai-participation-boost"]="85%",r["ai-treasury-management"]="enabled"),r}function on(e){const r={"@context":"https://schema.org","@type":hg(e.contentType),name:e.primaryTopic,description:`Comprehensive ${e.primaryTopic} resource for ${e.targetAudience.join(", ")}`,about:e.semanticKeywords.map(a=>({"@type":"Thing",name:a})),audience:{"@type":"Audience",audienceType:e.targetAudience.join(", ")},educationalLevel:e.complexityLevel,inLanguage:"en",isAccessibleForFree:!0};return e.contentType==="governance-page"?{...r,"@type":"SoftwareApplication",applicationCategory:"GovernanceApplication",operatingSystem:"Web Browser",featureList:["Smart voting notifications","Multi-signature wallet coordination","Automated proposal tracking","Cross-platform DAO integration","Treasury management tools"],isRelatedTo:[{"@type":"SoftwareApplication",name:"Snapshot"},{"@type":"SoftwareApplication",name:"Tally"},{"@type":"SoftwareApplication",name:"Aragon"},{"@type":"SoftwareApplication",name:"Safe"}]}:r}function ug(e,r){return r.map(a=>({type:"related-content",target:a.url,strength:a.relevance}))}function sn(e){const r=["Web3 Email Platform","Web3","blockchain","email","wallet","cryptocurrency"],a=["DAO","governance","voting","multi-sig","Snapshot","Tally","Aragon","Safe","proposal","community"];return e.contentType==="governance-page"?[...r,...a]:r}function ln(e){const r=["web3-infrastructure","email-technology","blockchain-applications"],a=["dao-governance-tools","voting-notification-systems","community-management-platforms","multi-signature-coordination","treasury-management-solutions"];return e.contentType==="governance-page"?[...r,...a]:r}function gg(e,r){return{contentClassification:{type:e.contentType,topic:e.primaryTopic,audience:e.targetAudience.join(","),complexity:e.complexityLevel,purpose:e.contentPurpose,vertical:e.industryVertical},semanticMarkup:on(e),entityRecognition:sn(e),topicClustering:ln(e),contentRelationships:r?.contentRelationships||[],...r}}function hg(e){return{article:"Article","landing-page":"WebPage","product-page":"Product","governance-page":"SoftwareApplication",documentation:"TechArticle"}[e]||"WebPage"}function fg(e){return{"@context":"https://schema.org","@type":"MonitorAction",name:`AI Performance Tracking - ${e}`,instrument:{"@type":"SoftwareApplication",name:"AI Analytics Platform"},measurementTechnique:["User Engagement Metrics","AI Content Understanding Score","Semantic Relevance Analysis","Conversion Optimization Tracking"],result:{"@type":"Dataset",name:`${e} Performance Data`,description:"AI-optimized performance metrics and user interaction data"}}}const bg={governancePage:{contentType:"governance-page",primaryTopic:"DAO Governance Communication Platform",semanticKeywords:["DAO governance","voting notifications","multi-sig coordination","proposal tracking","community engagement","treasury management"],targetAudience:["DAO members","governance participants","multi-sig signers","protocol teams","community managers"],complexityLevel:"intermediate",contentPurpose:"commercial",industryVertical:"blockchain-governance",technicalTags:["snapshot","tally","aragon","safe","multi-sig","voting","proposals","treasury"],userIntent:["improve-governance","increase-participation","coordinate-multi-sig","track-proposals","engage-community"],conversionGoals:["dao-integration","governance-setup","multi-sig-connection","notification-activation"]},landingPage:{contentType:"landing-page",primaryTopic:"Web3 Email Platform",semanticKeywords:["Web3 email","wallet authentication","ENS email","SNS email","blockchain email","decentralized communication"],targetAudience:["Web3 users","crypto enthusiasts","blockchain developers","DeFi users"],complexityLevel:"beginner",contentPurpose:"commercial",industryVertical:"web3-communication",technicalTags:["ethereum","solana","ens","sns","wallet-connect","metamask","phantom"],userIntent:["create-web3-email","connect-wallet","secure-communication","eliminate-passwords"],conversionGoals:["wallet-connection","email-creation","first-email-sent","premium-upgrade"]}},mg=({message:e,className:r})=>t.jsxs("div",{className:`flex items-center justify-center p-4 ${r||""}`,children:[t.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),t.jsx("span",{className:"ml-2 text-sm text-gray-600",children:e})]}),ot=new Map,Ze=new Set;function st(){const e=[];return!!window.ethereum?.isMetaMask&&(Ze.add("metamask"),e.push({name:"MetaMask",detected:!0,priority:1})),!!window.ethereum?.isCoinbaseWallet&&(Ze.add("coinbase"),e.push({name:"Coinbase Wallet",detected:!0,priority:2})),!!window.solana?.isPhantom&&(Ze.add("phantom"),e.push({name:"Phantom",detected:!0,priority:3})),e.push({name:"WalletConnect",detected:!0,priority:4}),e.sort((o,s)=>o.priority-s.priority)}function it(e){const r=`wallet-${e.toLowerCase()}`;if(ot.has(r))return ot.get(r);const a=()=>Promise.resolve({default:()=>v.createElement("div",{},`${e} Provider Placeholder`)}),n=v.lazy(a),o=s=>t.jsx(v.Suspense,{fallback:t.jsx(mg,{message:`Loading ${e} wallet...`,className:"wallet-loading"}),children:t.jsx(n,{...s})});return o.displayName=`Lazy${e}Provider`,ot.set(r,o),o}function yg({children:e}){const r=st();return r.filter(a=>a.priority<=2&&a.detected).forEach(a=>{setTimeout(()=>{},1e3)}),t.jsxs(t.Fragment,{children:[r.map(a=>{const n=it(a.name);return t.jsx(n,{},a.name)}),e]})}const ut=class ut{static preloadWallet(r){const a=r.toLowerCase();this.preloadedWallets.has(a)||(this.preloadedWallets.add(a),setTimeout(()=>{it(r)},500))}static preloadCommonWallets(){["metamask","walletconnect","coinbase"].forEach((a,n)=>{setTimeout(()=>{this.preloadWallet(a)},n*1e3)})}static getPreloadedWallets(){return Array.from(this.preloadedWallets)}};ut.preloadedWallets=new Set;let Xe=ut;function pg(){return{availableWallets:st(),preloadWallet:n=>{Xe.preloadWallet(n)},getDetectedWallets:()=>Array.from(Ze),hasWallet:n=>Ze.has(n.toLowerCase())}}function vg({walletName:e,onConnect:r,disabled:a=!1}){const n=()=>{Xe.preloadWallet(e),setTimeout(r,100)};return t.jsxs("button",{onClick:n,disabled:a,className:"wallet-connect-btn","data-wallet":e.toLowerCase(),children:["Connect ",e]})}class wg{constructor(){this.criticalResources=[],this.observedMetrics={fcp:0,lcp:0,fid:0,cls:0,ttfb:0},this.defineCriticalResources(),this.startPerformanceObservation()}defineCriticalResources(){this.criticalResources=[{url:"/assets/index-*.css",type:"style",priority:"critical",preload:!0},{url:"/assets/index-*.js",type:"script",priority:"critical"},{url:"/assets/react-core-*.js",type:"script",priority:"high",preload:!0},{url:"https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2",type:"font",priority:"critical",preload:!0},{url:"/logo.png",type:"image",priority:"high",preload:!0}]}startPerformanceObservation(){if("PerformanceObserver"in window)try{new PerformanceObserver(s=>{for(const i of s.getEntries())i.name==="first-contentful-paint"&&(this.observedMetrics.fcp=i.startTime,this.optimizeBasedOnFCP(i.startTime))}).observe({entryTypes:["paint"]}),new PerformanceObserver(s=>{for(const i of s.getEntries())this.observedMetrics.lcp=i.startTime,this.optimizeBasedOnLCP(i.startTime)}).observe({entryTypes:["largest-contentful-paint"]});let n=0;new PerformanceObserver(s=>{for(const i of s.getEntries())i.hadRecentInput||(n+=i.value);this.observedMetrics.cls=n}).observe({entryTypes:["layout-shift"]})}catch{}window.addEventListener("load",()=>{setTimeout(()=>{const r=performance.getEntriesByType("navigation")[0];r&&(this.observedMetrics.ttfb=r.responseStart-r.requestStart,this.optimizeBasedOnTTFB(this.observedMetrics.ttfb))},0)})}optimizeBasedOnFCP(r){r>2e3?this.applyEmergencyOptimizations():r>1500&&this.applyMediumOptimizations()}optimizeBasedOnLCP(r){r>2500&&this.optimizeLCPElements()}optimizeBasedOnTTFB(r){r>600&&this.enableAggressiveCaching()}applyEmergencyOptimizations(){document.querySelectorAll('img[data-priority="low"]').forEach(n=>{n.loading="lazy",n.style.display="none",setTimeout(()=>{n.style.display=""},3e3)}),document.querySelectorAll('script[data-priority="low"]').forEach(n=>{n.setAttribute("defer","")})}applyMediumOptimizations(){["/assets/app-core-*.js","/assets/react-router-*.js"].forEach(a=>{this.preloadResource(a,"script")})}optimizeLCPElements(){document.querySelectorAll("img[data-hero], [data-lcp-element]").forEach(n=>{n instanceof HTMLImageElement&&(n.fetchPriority="high",n.loading="eager")});const a=document.querySelector("img[data-hero]")?.getAttribute("src");a&&this.preloadResource(a,"image")}enableAggressiveCaching(){const r=document.createElement("meta");r.httpEquiv="Cache-Control",r.content="public, max-age=31536000, immutable",document.head.appendChild(r)}preloadResource(r,a){if(document.querySelector(`link[href*="${r}"]`))return;const o=document.createElement("link");switch(o.rel="preload",o.href=r,a){case"script":o.as="script";break;case"style":o.as="style";break;case"font":o.as="font",o.type="font/woff2",o.crossOrigin="";break;case"image":o.as="image";break}document.head.appendChild(o)}optimizeCriticalPath(){this.criticalResources.filter(r=>r.priority==="critical"&&r.preload).forEach(r=>{this.preloadResource(r.url,r.type)}),this.inlineCriticalCSS(),this.optimizeFontLoading(),this.removeRenderBlocking(),this.setupProgressiveLoading()}inlineCriticalCSS(){const r=document.querySelector('link[rel="stylesheet"][data-critical]');r&&this.isSmallResource(r.getAttribute("href")||"")&&fetch(r.getAttribute("href")||"").then(a=>a.text()).then(a=>{if(a.length<1e4){const n=document.createElement("style");n.textContent=a,document.head.appendChild(n),r.remove()}}).catch(()=>{})}optimizeFontLoading(){document.querySelectorAll('link[href*="fonts.googleapis.com"]').forEach(a=>{const n=a.getAttribute("href")||"";if(!n.includes("display=swap")){const o=n.includes("?")?"&":"?";a.setAttribute("href",`${n}${o}display=swap`)}})}removeRenderBlocking(){document.querySelectorAll('link[rel="stylesheet"]:not([data-critical])').forEach(a=>{const n=a.cloneNode(!0);n.rel="preload",n.as="style",n.onload=()=>{n.onload=null,n.rel="stylesheet"};const o=document.createElement("noscript"),s=a.cloneNode(!0);o.appendChild(s),document.head.appendChild(n),document.head.appendChild(o),a.remove()})}setupProgressiveLoading(){const r=document.querySelectorAll("img[data-src]");if("IntersectionObserver"in window){const a=new IntersectionObserver(n=>{n.forEach(o=>{if(o.isIntersecting){const s=o.target;s.src=s.dataset.src||"",s.removeAttribute("data-src"),a.unobserve(s)}})},{rootMargin:"50px 0px",threshold:.01});r.forEach(n=>a.observe(n))}else r.forEach(a=>{const n=a;n.src=n.dataset.src||""})}isSmallResource(r){return r.includes("critical")||r.includes("inline")}getPerformanceMetrics(){return{...this.observedMetrics,score:this.calculatePerformanceScore()}}calculatePerformanceScore(){let r=100;return this.observedMetrics.fcp>2e3?r-=20:this.observedMetrics.fcp>1500&&(r-=10),this.observedMetrics.lcp>2500?r-=25:this.observedMetrics.lcp>2e3&&(r-=15),this.observedMetrics.cls>.1?r-=15:this.observedMetrics.cls>.05&&(r-=8),this.observedMetrics.ttfb>600?r-=10:this.observedMetrics.ttfb>400&&(r-=5),Math.max(r,0)}}const ur={mark:e=>{typeof performance<"u"&&performance.mark&&performance.mark(e)},measure:(e,r,a)=>{if(typeof performance<"u"&&performance.measure)try{performance.measure(e,r,a);const n=performance.getEntriesByName(e);return n[n.length-1]?.duration||0}catch{return 0}return 0},getEntries:e=>typeof performance<"u"&&performance.getEntriesByName?e?performance.getEntriesByName(e):performance.getEntries():[],clearEntries:e=>{typeof performance<"u"&&(e?(performance.clearMeasures?.(e),performance.clearMarks?.(e)):(performance.clearMeasures?.(),performance.clearMarks?.()))}},kg=(e,r=[])=>{v.useEffect(()=>(ur.mark(`${e}-start`),()=>{ur.mark(`${e}-end`),ur.measure(e,`${e}-start`,`${e}-end`)}),[e,r])},xg=e=>{const r=v.useRef(e);return r.current=e,v.useCallback((...a)=>r.current(...a),[])},Ng=(e,r,a)=>{const n=v.useRef(r),o=v.useRef(void 0);return v.useMemo(()=>(a&&process.env.NODE_ENV==="development"&&r.some((s,i)=>s!==n.current[i]),n.current=r,o.current=e(),o.current),[e,a,r])},gr=new Map,Cg=e=>{const r=gr.get(e)||0;gr.set(e,r+1),v.useEffect(()=>{process.env.NODE_ENV})},Sg=()=>Object.fromEntries(gr),Eg=()=>gr.clear(),Tg=e=>v.lazy(e),Ag=(e=.1)=>{const[r,a]=v.useState(new Set),n=v.useRef(null);v.useEffect(()=>(n.current=new IntersectionObserver(s=>{s.forEach(i=>{if(i.isIntersecting){const l=i.target,d=l.dataset.src;d&&(l.src=d,l.onload=()=>{a(c=>new Set(c).add(d))},n.current?.unobserve(l))}})},{threshold:e}),()=>n.current?.disconnect()),[e]);const o=v.useCallback(s=>{s&&n.current&&n.current.observe(s)},[]);return{loadedImages:r,observeImage:o}},Ig=e=>{typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(()=>{e().catch(()=>{})}):setTimeout(()=>{e().catch(()=>{})},100)},cn={},Mg=e=>{cn[e.name]=e.value,process.env.NODE_ENV},Lg=()=>cn,Pg=(e,r="script")=>{if(typeof document<"u"){const a=document.createElement("link");a.rel="prefetch",a.href=e,a.as=r,document.head.appendChild(a)}},Og=(e,r="script",a)=>{if(typeof document<"u"){const n=document.createElement("link");n.rel="preload",n.href=e,n.as=r,a&&(n.crossOrigin="anonymous"),document.head.appendChild(n)}},Ug=e=>{const r=v.useRef(new Set),a=v.useRef(new Set),n=v.useCallback((s,i)=>{const l=setTimeout(()=>{r.current.delete(l),s()},i);return r.current.add(l),l},[]),o=v.useCallback((s,i)=>{const l=setInterval(s,i);return a.current.add(l),l},[]);return v.useEffect(()=>{const s=r.current,i=a.current;return()=>{s.forEach(l=>clearTimeout(l)),i.forEach(l=>clearInterval(l)),process.env.NODE_ENV}},[e]),{createTimer:n,createInterval:o}},ge={maxBundleSize:500,maxChunkSize:200,maxImageSize:100,maxFCP:1800,maxLCP:2500,maxFID:100,maxCLS:.1,check:e=>{const r=[];return e.FCP&&e.FCP>ge.maxFCP&&r.push(`FCP (${e.FCP}ms) exceeds budget (${ge.maxFCP}ms)`),e.LCP&&e.LCP>ge.maxLCP&&r.push(`LCP (${e.LCP}ms) exceeds budget (${ge.maxLCP}ms)`),e.FID&&e.FID>ge.maxFID&&r.push(`FID (${e.FID}ms) exceeds budget (${ge.maxFID}ms)`),e.CLS&&e.CLS>ge.maxCLS&&r.push(`CLS (${e.CLS}) exceeds budget (${ge.maxCLS})`),r}};class Dg{constructor(r){this.metrics={timestamp:Date.now()},this.observers=[],this.performanceMarks=new Map,this.reportCallback=r,this.initializeWebVitals(),this.initializeCustomObservers(),this.collectDeviceInfo()}initializeWebVitals(){ze.onCLS(r=>{this.metrics.CLS=r.value,this.reportMetric("CLS",r.value)}),ze.onINP(r=>{this.metrics.INP=r.value,this.reportMetric("INP",r.value)}),ze.onFCP(r=>{this.metrics.FCP=r.value,this.reportMetric("FCP",r.value)}),ze.onLCP(r=>{this.metrics.LCP=r.value,this.reportMetric("LCP",r.value)}),ze.onTTFB(r=>{this.metrics.TTFB=r.value,this.reportMetric("TTFB",r.value)})}initializeCustomObservers(){if("PerformanceObserver"in window){const r=new PerformanceObserver(n=>{n.getEntries().forEach(s=>{if(s.entryType==="navigation"){const i=s;this.metrics.bundleLoadTime=i.loadEventEnd-i.fetchStart}})});try{r.observe({entryTypes:["navigation"]}),this.observers.push(r)}catch{}const a=new PerformanceObserver(n=>{n.getEntries().forEach(s=>{(s.name.includes(".js")||s.name.includes(".css"))&&this.trackResourceLoad(s.name,s.duration)})});try{a.observe({entryTypes:["resource"]}),this.observers.push(a)}catch{}}}collectDeviceInfo(){if(typeof window<"u"){const r=navigator;r.connection&&(this.metrics.connection=r.connection.effectiveType||r.connection.type),r.deviceMemory&&(this.metrics.deviceMemory=r.deviceMemory),r.hardwareConcurrency&&(this.metrics.hardwareConcurrency=r.hardwareConcurrency),this.metrics.viewport={width:window.innerWidth,height:window.innerHeight}}}reportMetric(r,a){this.reportCallback&&this.reportCallback({...this.metrics,timestamp:Date.now()}),process.env.NODE_ENV}trackResourceLoad(r,a){const n=r.includes(".js"),o=r.includes(".css");if(n||o){const s=n?"JavaScript":"CSS";this.reportMetric(`${s} Load`,a)}}measureComponentRender(r,a){this.metrics.componentRenderTime=a,this.reportMetric(`Component Render (${r})`,a)}measureAPICall(r,a){this.metrics.apiResponseTime=a,this.reportMetric(`API Call (${r})`,a)}measureRouteChange(r,a){this.metrics.routeChangeTime=a,this.reportMetric(`Route Change (${r})`,a)}markStart(r){this.performanceMarks.set(r,performance.now())}markEnd(r){const a=this.performanceMarks.get(r);if(a){const n=performance.now()-a;this.reportMetric(`Mark (${r})`,n),this.performanceMarks.delete(r)}}trackRouteChange(r,a,n){typeof a=="string"?this.measureRouteChange(a,n||performance.now()):this.measureRouteChange(r,a)}getSummary(){return{coreWebVitals:{score:this.calculateScore(),LCP:this.metrics.LCP,INP:this.metrics.INP,CLS:this.metrics.CLS},loadingPerformance:{FCP:this.metrics.FCP,TTFB:this.metrics.TTFB,bundleLoadTime:this.metrics.bundleLoadTime},runtime:{routeChangeTime:this.metrics.routeChangeTime,apiResponseTime:this.metrics.apiResponseTime,componentRenderTime:this.metrics.componentRenderTime},device:{connection:this.metrics.connection,deviceMemory:this.metrics.deviceMemory,hardwareConcurrency:this.metrics.hardwareConcurrency}}}calculateScore(){let r=100;return this.metrics.LCP&&this.metrics.LCP>2500?r-=25:this.metrics.LCP&&this.metrics.LCP>2e3&&(r-=15),this.metrics.INP&&this.metrics.INP>200?r-=20:this.metrics.INP&&this.metrics.INP>100&&(r-=10),this.metrics.CLS&&this.metrics.CLS>.1?r-=15:this.metrics.CLS&&this.metrics.CLS>.05&&(r-=8),Math.max(r,0)}getMetrics(){return{...this.metrics}}cleanup(){this.observers.forEach(r=>r.disconnect()),this.observers=[]}}let hr=null;const jg=e=>(hr||(hr=new Dg(e)),hr),fr=()=>hr,dn=e=>{const r=v.useRef(performance.now());v.useEffect(()=>{const a=performance.now()-r.current,n=fr();n&&n.measureComponentRender(e,a)},[e])},_g=(e,r)=>v.forwardRef((a,n)=>(dn(r),v.createElement(e,{...a,ref:n}))),zg=async(e,r)=>{const a=performance.now(),n=await e(),o=performance.now()-a,s=fr();return s&&s.measureAPICall(r,o),n},un={LCP:2500,INP:200,CLS:.1,FCP:1800,TTFB:800,bundleSize:17e4},Bg=(e,r=un)=>{const a=[];return r.LCP&&e.LCP&&e.LCP>r.LCP&&a.push(`LCP: ${e.LCP.toFixed(0)}ms (budget: ${r.LCP}ms)`),r.INP&&e.INP&&e.INP>r.INP&&a.push(`INP: ${e.INP.toFixed(0)}ms (budget: ${r.INP}ms)`),r.CLS&&e.CLS&&e.CLS>r.CLS&&a.push(`CLS: ${e.CLS.toFixed(3)} (budget: ${r.CLS})`),r.FCP&&e.FCP&&e.FCP>r.FCP&&a.push(`FCP: ${e.FCP.toFixed(0)}ms (budget: ${r.FCP}ms)`),r.TTFB&&e.TTFB&&e.TTFB>r.TTFB&&a.push(`TTFB: ${e.TTFB.toFixed(0)}ms (budget: ${r.TTFB}ms)`),{passed:a.length===0,violations:a}},Wg=e=>{const r=e||fr()?.getMetrics()||{timestamp:Date.now()},a={timestamp:new Date().toISOString(),metrics:r,environment:{userAgent:typeof window<"u"?window.navigator.userAgent:"unknown",url:typeof window<"u"?window.location.href:"unknown",referrer:typeof document<"u"?document.referrer:"unknown",viewport:r.viewport,connection:r.connection,deviceMemory:r.deviceMemory,hardwareConcurrency:r.hardwareConcurrency}};return JSON.stringify(a,null,2)},Fg=({direction:e,className:r})=>t.jsx("svg",{className:f("w-4 h-4",r),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e==="up"?"M5 15l7-7 7 7":"M19 9l-7 7-7-7"})}),Vg=({className:e})=>t.jsx("svg",{className:f("w-4 h-4",e),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),gn=({title:e="Performance Monitor",isCollapsed:r,onToggleCollapse:a,onClose:n,onMouseDown:o,isDragging:s,className:i})=>t.jsxs("div",{className:f("bg-gray-900 text-white rounded-t-lg px-3 py-2","flex items-center justify-between","shadow-lg border border-gray-700","select-none",o&&"cursor-grab",s&&"cursor-grabbing",i),onMouseDown:o,children:[t.jsxs("span",{className:"font-semibold text-sm flex items-center gap-2",children:[t.jsx("span",{children:"🚀"}),e]}),t.jsxs("div",{className:"flex gap-1",children:[t.jsx("button",{onClick:a,className:"hover:bg-gray-700 rounded p-1 transition-colors","aria-label":r?"Expand":"Collapse",type:"button",children:t.jsx(Fg,{direction:r?"up":"down"})}),n&&t.jsx("button",{onClick:n,className:"hover:bg-gray-700 rounded p-1 transition-colors","aria-label":"Close",type:"button",children:t.jsx(Vg,{})})]})]}),$g={sm:"w-2 h-2",md:"w-3 h-3",lg:"w-4 h-4"},qg={good:"bg-green-500","needs-improvement":"bg-yellow-500",poor:"bg-red-500",unknown:"bg-gray-400",neutral:"bg-gray-500"},Hg={good:"Good","needs-improvement":"Needs Improvement",poor:"Poor",unknown:"Unknown",neutral:"Neutral"},Gg=({rating:e,size:r="sm",showLabel:a=!1,className:n})=>t.jsxs("div",{className:f("flex items-center gap-1",n),children:[t.jsx("span",{className:f("rounded-full",$g[r],qg[e])}),a&&t.jsx("span",{className:"text-xs text-gray-400",children:Hg[e]})]}),hn=({className:e})=>t.jsxs("div",{className:f("flex gap-3 text-[10px] text-gray-400",e),children:[t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"w-2 h-2 rounded-full bg-green-500"}),"Good"]}),t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"w-2 h-2 rounded-full bg-yellow-500"}),"Needs Improvement"]}),t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"w-2 h-2 rounded-full bg-red-500"}),"Poor"]})]}),Yg={good:"text-green-500","needs-improvement":"text-yellow-500",poor:"text-red-500",unknown:"text-gray-400",neutral:"text-gray-300"},H=({label:e,value:r,unit:a="",rating:n="neutral",description:o,className:s})=>{const i=typeof r=="number"?Number.isInteger(r)?r.toString():r.toFixed(r<1?3:0):r;return t.jsxs("div",{className:f("flex justify-between items-center",s),children:[t.jsxs("div",{className:"flex flex-col",children:[t.jsx("span",{className:"text-gray-300",children:e}),o&&t.jsx("span",{className:"text-[10px] text-gray-500",children:o})]}),t.jsxs("span",{className:f("font-medium",Yg[n]),children:[i,a]})]})},Kg=(e,r="ms",a=0)=>e===void 0?"N/A":`${e.toFixed(a)}${r}`,fn=(e={})=>{const{enabled:r=!0,onUpdate:a}=e,[n,o]=v.useState({}),[s,i]=v.useState(!0),l=v.useRef(a);v.useEffect(()=>{l.current=a},[a]);const d=v.useCallback(c=>{o(g=>{const h={...g,...c};return l.current?.(h),h})},[]);return v.useEffect(()=>{if(!r)return;if(typeof PerformanceObserver>"u"){i(!1);return}const c=[];try{const g=new PerformanceObserver(h=>{const w=h.getEntries(),m=w[w.length-1];d({lcp:m.renderTime||m.loadTime})});g.observe({type:"largest-contentful-paint",buffered:!0}),c.push(g)}catch{}try{const g=new PerformanceObserver(h=>{h.getEntries().forEach(m=>{m.processingStart&&d({fid:m.processingStart-m.startTime})})});g.observe({type:"first-input",buffered:!0}),c.push(g)}catch{}try{let g=0;const h=new PerformanceObserver(w=>{for(const m of w.getEntries())!m.hadRecentInput&&m.value&&(g+=m.value,d({cls:g}))});h.observe({type:"layout-shift",buffered:!0}),c.push(h)}catch{}try{const g=new PerformanceObserver(h=>{h.getEntries().forEach(m=>{m.name==="first-contentful-paint"&&d({fcp:m.startTime})})});g.observe({type:"paint",buffered:!0}),c.push(g)}catch{}try{const g=new PerformanceObserver(h=>{h.getEntries().forEach(m=>{m.duration&&d({inp:m.duration})})});g.observe({type:"event",buffered:!0}),c.push(g)}catch{}try{const g=performance.getEntriesByType("navigation")[0];g&&d({ttfb:g.responseStart-g.requestStart})}catch{}return()=>{c.forEach(g=>g.disconnect())}},[r,d]),{metrics:n,isSupported:s}},Ie=(e,r)=>{if(r===void 0)return"unknown";const n={lcp:{good:2500,poor:4e3},fid:{good:100,poor:300},cls:{good:.1,poor:.25},fcp:{good:1800,poor:3e3},ttfb:{good:800,poor:1800},inp:{good:200,poor:500}}[e];return n?r<=n.good?"good":r<=n.poor?"needs-improvement":"poor":"unknown"},bn=({metrics:e,className:r})=>{const a=(n,o=0)=>n===void 0?"N/A":n.toFixed(o);return t.jsxs("div",{className:f("space-y-1",r),children:[t.jsx("h3",{className:"font-semibold text-yellow-400 mb-2 text-xs",children:"Web Vitals"}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(H,{label:"LCP",value:a(e.lcp),unit:"ms",rating:Ie("lcp",e.lcp),description:"Largest Contentful Paint"}),t.jsx(H,{label:"FID",value:a(e.fid),unit:"ms",rating:Ie("fid",e.fid),description:"First Input Delay"}),t.jsx(H,{label:"CLS",value:a(e.cls,3),rating:Ie("cls",e.cls),description:"Cumulative Layout Shift"}),t.jsx(H,{label:"FCP",value:a(e.fcp),unit:"ms",rating:Ie("fcp",e.fcp),description:"First Contentful Paint"}),t.jsx(H,{label:"TTFB",value:a(e.ttfb),unit:"ms",rating:Ie("ttfb",e.ttfb),description:"Time to First Byte"}),e.inp!==void 0&&t.jsx(H,{label:"INP",value:a(e.inp),unit:"ms",rating:Ie("inp",e.inp),description:"Interaction to Next Paint"})]})]})},mn=(e={})=>{const{enabled:r=!0,refreshInterval:a=5e3,onUpdate:n}=e,[o,s]=v.useState({}),i=v.useRef(n);v.useEffect(()=>{i.current=n},[n]);const l=v.useCallback(()=>{if(!(typeof performance>"u"))try{const c=performance.getEntriesByType("resource"),g=c.filter(p=>p.name.endsWith(".js")||p.initiatorType==="script"),h=g.reduce((p,T)=>p+T.duration,0),w=c.filter(p=>p.name.endsWith(".css")||p.initiatorType==="link"),m=w.reduce((p,T)=>p+T.duration,0),b=c.reduce((p,T)=>p+(T.transferSize||0),0),y={jsLoadTime:h,cssLoadTime:m,jsCount:g.length,cssCount:w.length,totalTransferSize:b};s(y),i.current?.(y)}catch{}},[]),d=v.useCallback(()=>{l()},[l]);return v.useEffect(()=>{if(!r)return;l();const c=setInterval(l,a);return()=>clearInterval(c)},[r,a,l]),{metrics:o,refresh:d}},yn=e=>e===void 0?"N/A":e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`,pn=({metrics:e,className:r})=>{const a=n=>n===void 0?"N/A":n.toFixed(0);return t.jsxs("div",{className:f("space-y-1",r),children:[t.jsx("h3",{className:"font-semibold text-blue-400 mb-2 text-xs",children:"Bundle Performance"}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(H,{label:"JS Load",value:a(e.jsLoadTime),unit:"ms",rating:"neutral"}),t.jsx(H,{label:"CSS Load",value:a(e.cssLoadTime),unit:"ms",rating:"neutral"}),t.jsx(H,{label:"JS Files",value:e.jsCount??"N/A",rating:"neutral"}),t.jsx(H,{label:"Transfer Size",value:yn(e.totalTransferSize),rating:"neutral"})]})]})},Zg=e=>e===void 0?"unknown":e<=200?"good":e<=500?"needs-improvement":"poor",vn=({metrics:e,className:r})=>{const a=n=>n===void 0||isNaN(n)?"N/A":n.toFixed(0);return e.callCount===0?null:t.jsxs("div",{className:f("space-y-1",r),children:[t.jsx("h3",{className:"font-semibold text-purple-400 mb-2 text-xs",children:"API Calls"}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(H,{label:"Count",value:e.callCount,rating:"neutral"}),t.jsx(H,{label:"Total Time",value:a(e.totalTime),unit:"ms",rating:"neutral"}),t.jsx(H,{label:"Avg Time",value:a(e.averageTime),unit:"ms",rating:Zg(e.averageTime)}),e.slowestCall!==void 0&&t.jsx(H,{label:"Slowest",value:a(e.slowestCall),unit:"ms",rating:e.slowestCall>1e3?"poor":"neutral"}),e.failedCalls>0&&t.jsx(H,{label:"Failed",value:e.failedCalls,rating:"poor"})]})]})},wn=e=>e===void 0?"N/A":(e/(1024*1024)).toFixed(1),kn=(e,r)=>{if(e===void 0||r===void 0)return"unknown";const a=e/r;return a<=.5?"good":a<=.75?"needs-improvement":"poor"},xn=({refreshInterval:e=2e3,className:r})=>{const[a,n]=v.useState({}),[o,s]=v.useState(!0);if(v.useEffect(()=>{const l=performance;if(!l.memory){s(!1);return}const d=()=>{l.memory&&n({usedJSHeapSize:l.memory.usedJSHeapSize,totalJSHeapSize:l.memory.totalJSHeapSize,jsHeapSizeLimit:l.memory.jsHeapSizeLimit})};d();const c=setInterval(d,e);return()=>clearInterval(c)},[e]),!o)return null;const i=a.usedJSHeapSize&&a.jsHeapSizeLimit?(a.usedJSHeapSize/a.jsHeapSizeLimit*100).toFixed(0):"N/A";return t.jsxs("div",{className:f("space-y-1",r),children:[t.jsx("h3",{className:"font-semibold text-cyan-400 mb-2 text-xs",children:"Memory"}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(H,{label:"Used Heap",value:wn(a.usedJSHeapSize),unit:"MB",rating:kn(a.usedJSHeapSize,a.jsHeapSizeLimit)}),t.jsx(H,{label:"Total Heap",value:wn(a.totalJSHeapSize),unit:"MB",rating:"neutral"}),t.jsx(H,{label:"Usage",value:i,unit:"%",rating:kn(a.usedJSHeapSize,a.jsHeapSizeLimit)})]})]})},Xg=e=>{if(e.rating)return e.rating;if(typeof e.value=="number"&&e.thresholds){const{good:r,poor:a}=e.thresholds;return e.value<=r?"good":e.value<=a?"needs-improvement":"poor"}return"neutral"},Nn=({title:e="Custom Metrics",titleColor:r="text-orange-400",metrics:a,className:n})=>a.length===0?null:t.jsxs("div",{className:f("space-y-1",n),children:[t.jsx("h3",{className:f("font-semibold mb-2 text-xs",r),children:e}),t.jsx("div",{className:"space-y-1.5",children:a.map(o=>t.jsx(H,{label:o.label,value:o.value,unit:o.unit,rating:Xg(o),description:o.description},o.id))})]}),Qg=["/api/","graphql",".json"],Cn=(e={})=>{const{enabled:r=!0,patterns:a=Qg,refreshInterval:n=5e3,onUpdate:o}=e,[s,i]=v.useState({callCount:0,totalTime:0,averageTime:0,failedCalls:0}),l=v.useRef(a),d=v.useRef(o);v.useEffect(()=>{l.current=a},[a]),v.useEffect(()=>{d.current=o},[o]);const c=v.useCallback(()=>{if(!(typeof performance>"u"))try{const h=performance.getEntriesByType("resource"),w=l.current,m=h.filter(N=>w.some(C=>N.name.includes(C)));if(m.length===0)return;const b=m.reduce((N,C)=>N+C.duration,0),y=Math.max(...m.map(N=>N.duration)),p=m.filter(N=>{const C=N.responseStatus;return C!==void 0&&C>=400}).length,T={callCount:m.length,totalTime:b,averageTime:b/m.length,slowestCall:y,failedCalls:p};i(T),d.current?.(T)}catch{}},[]),g=v.useCallback(()=>{c()},[c]);return v.useEffect(()=>{if(!r)return;c();const h=setInterval(c,n);return()=>clearInterval(h)},[r,n,c]),{metrics:s,refresh:g}},Sn=(e={})=>{const{enabled:r=!0,constrainToViewport:a=!0,horizontalOnly:n=!1,verticalOnly:o=!1,initialPosition:s}=e,i=v.useRef(null),[l,d]=v.useState({x:s?.x??null,y:s?.y??null}),[c,g]=v.useState(!1),[h,w]=v.useState({x:0,y:0}),m=v.useCallback(y=>{if(!r||!i.current)return;const p=i.current.getBoundingClientRect();g(!0),w({x:y.clientX-p.left,y:y.clientY-p.top}),(l.x===null||l.y===null)&&d({x:n?p.left:l.x??p.left,y:o?p.top:l.y??p.top}),y.preventDefault()},[r,l,n,o]),b=v.useCallback(()=>{d({x:s?.x??null,y:s?.y??null})},[s]);return v.useEffect(()=>{if(!c)return;const y=T=>{if(!i.current)return;let N=T.clientX-h.x,C=T.clientY-h.y;if(a){const k=window.innerWidth-i.current.offsetWidth,S=window.innerHeight-i.current.offsetHeight;N=Math.max(0,Math.min(N,k)),C=Math.max(0,Math.min(C,S))}d({x:n?N:o?l.x:N,y:o?C:n?l.y:C})},p=()=>{g(!1)};return document.addEventListener("mousemove",y),document.addEventListener("mouseup",p),()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",p)}},[c,h,a,n,o,l.x,l.y]),{position:l,isDragging:c,handleMouseDown:m,resetPosition:b,ref:i}},En={"bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-right":"top-4 right-4","top-left":"top-4 left-4"},Jg=["webVitals","bundle","api","memory"],Rg=({enabled:e,defaultCollapsed:r=!0,defaultVisible:a=!0,position:n="bottom-right",draggable:o=!0,sections:s=Jg,customMetrics:i=[],customSectionTitle:l="Custom Metrics",apiPatterns:d,onMetricsUpdate:c,className:g})=>{const h=e??(typeof process<"u"&&process.env?.NODE_ENV!=="production"),[w,m]=v.useState(r),[b,y]=v.useState(a),p=v.useMemo(()=>d,[JSON.stringify(d)]),T=v.useRef(c);v.useEffect(()=>{T.current=c},[c]);const{metrics:N}=fn({enabled:h&&s.includes("webVitals")}),{metrics:C}=mn({enabled:h&&s.includes("bundle")}),{metrics:k}=Cn({enabled:h&&s.includes("api"),patterns:p});v.useEffect(()=>{T.current&&T.current({webVitals:N,bundle:C,api:k})},[N,C,k]);const{position:S,isDragging:I,handleMouseDown:E,ref:M}=Sn({enabled:o,horizontalOnly:n.includes("bottom")||n.includes("top")}),x=v.useCallback(()=>{m(z=>!z)},[]),O=v.useCallback(()=>{y(!1)},[]),D=v.useCallback(()=>{y(!0)},[]);if(!h)return null;if(!b)return t.jsx("button",{onClick:D,className:f("fixed z-[9999]",En[n],"bg-gray-900 text-white px-3 py-2 rounded-lg","shadow-lg border border-gray-700","hover:bg-gray-800 transition-colors","text-xs font-mono"),type:"button",children:"🚀 Performance"});const U=S.x!==null?{left:`${S.x}px`,bottom:n.includes("bottom")?"1rem":void 0,top:n.includes("top")?"1rem":void 0,position:"fixed",transition:I?"none":"height 0.2s ease-in-out"}:{transition:"height 0.2s ease-in-out"},B=i.length>0||s.includes("custom");return t.jsxs("div",{ref:M,className:f(S.x!==null?"":`fixed ${En[n]}`,"z-[9999] font-mono text-xs",I&&"cursor-grabbing",g),style:{maxWidth:"320px",...U},children:[t.jsx(gn,{isCollapsed:w,onToggleCollapse:x,onClose:O,onMouseDown:o?E:void 0,isDragging:I}),t.jsx("div",{className:f("bg-gray-800 text-gray-100 rounded-b-lg","shadow-lg border-x border-b border-gray-700","overflow-hidden transition-all duration-300 ease-in-out",w?"max-h-0 opacity-0":"max-h-[70vh] opacity-100 py-2 px-3"),children:t.jsxs("div",{className:"overflow-y-auto max-h-full space-y-3",children:[s.includes("webVitals")&&t.jsx(bn,{metrics:N}),s.includes("bundle")&&t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(pn,{metrics:C})}),s.includes("api")&&k.callCount>0&&t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(vn,{metrics:k})}),s.includes("memory")&&t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(xn,{})}),B&&i.length>0&&t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(Nn,{title:l,metrics:i})}),t.jsx("div",{className:"pt-3 border-t border-gray-700",children:t.jsx(hn,{})})]})})]})},eh=(e={})=>{const{successMessage:r="",successDuration:a=3e3,errorPrefix:n="",onSuccess:o,onError:s}=e,[i,l]=v.useState(!1),[d,c]=v.useState(""),[g,h]=v.useState(""),w=v.useCallback(()=>{c(""),h("")},[]),m=v.useCallback(()=>{c("")},[]),b=v.useCallback(()=>{h("")},[]),y=v.useCallback(async p=>{l(!0),w();try{await p(),r&&(c(r),a>0&&setTimeout(()=>{c("")},a)),o&&o()}catch(T){const N=T instanceof Error?T.message:"An error occurred";throw h(n?`${n}: ${N}`:N),s&&T instanceof Error&&s(T),T}finally{l(!1)}},[r,a,n,o,s,w]);return{isSubmitting:i,successMessage:d,errorMessage:g,submit:y,clearMessages:w,clearSuccess:m,clearError:b}},rh=(e=!1)=>{const[r,a]=v.useState(e),n=v.useCallback(()=>a(!0),[]),o=v.useCallback(()=>a(!1),[]),s=v.useCallback(()=>a(i=>!i),[]);return{value:r,setTrue:n,setFalse:o,toggle:s,setValue:a}},th=(e={})=>{const{successDuration:r=2e3,onSuccess:a,onError:n}=e,[o,s]=v.useState(null),i=v.useCallback(async c=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(c);else{const g=document.createElement("textarea");g.value=c,g.style.position="fixed",g.style.left="-999999px",g.style.top="-999999px",document.body.appendChild(g),g.focus(),g.select();const h=document.execCommand("copy");if(document.body.removeChild(g),!h)throw new Error("Copy command was unsuccessful")}return s(c),a?.(c),setTimeout(()=>{s(null)},r),!0}catch(g){const h=g instanceof Error?g:new Error("Copy failed");return n?.(h),!1}},[r,a,n]),l=v.useCallback(c=>o===c,[o]),d=v.useCallback(()=>{s(null)},[]);return{copiedValue:o,copyToClipboard:i,isCopied:l,resetCopiedState:d}},ah=(e={})=>{const{successDuration:r=2e3,onSuccess:a,onError:n}=e,[o,s]=v.useState({}),i=v.useCallback(async(c,g)=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(c);else{const h=document.createElement("textarea");h.value=c,h.style.position="fixed",h.style.left="-999999px",h.style.top="-999999px",document.body.appendChild(h),h.focus(),h.select();const w=document.execCommand("copy");if(document.body.removeChild(h),!w)throw new Error("Copy command was unsuccessful")}return s(h=>({...h,[g]:!0})),a?.(c),setTimeout(()=>{s(h=>({...h,[g]:!1}))},r),!0}catch(h){const w=h instanceof Error?h:new Error("Copy failed");return n?.(w),!1}},[r,a,n]),l=v.useCallback(c=>o[c]||!1,[o]),d=v.useCallback(c=>{s(c?g=>({...g,[c]:!1}):{})},[]);return{copiedStates:o,copyToClipboard:i,isCopied:l,resetCopiedState:d}},nh=e=>{if(e===0)return"0 Bytes";const r=1024,a=["Bytes","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(r)),o=Math.min(n,a.length-1);return parseFloat((e/Math.pow(r,o)).toFixed(2))+" "+a[o]},oh=(e,r,a)=>{const n={bytes:0,kb:1,mb:2,gb:3,tb:4},o=1024,i=e*Math.pow(o,n[r])/Math.pow(o,n[a]);return Math.round(i*100)/100},sh=e=>{const r=e.match(/^(\d+(?:\.\d+)?)\s*(bytes?|kb|mb|gb|tb)$/i);if(!r)return null;const a=parseFloat(r[1]),n=r[2].toLowerCase(),s={bytes:1,byte:1,kb:1024,mb:1024*1024,gb:1024*1024*1024,tb:1024*1024*1024*1024}[n];return s?Math.round(a*s):null},ih=e=>e,lh=e=>{if(typeof document>"u")return;const r=document.createElement("style");r.textContent=e,r.setAttribute("data-critical","true"),document.head.appendChild(r)},ch=e=>{if(typeof document>"u")return;const r=document.createElement("link");r.rel="preload",r.as="style",r.href=e,r.onload=()=>{r.rel="stylesheet"},document.head.appendChild(r);const a=document.createElement("noscript");a.innerHTML=`<link rel="stylesheet" href="${e}">`,document.head.appendChild(a)},dh=e=>{const r={};return Object.entries(e).forEach(([a,n])=>{r[`--${a}`]=typeof n=="number"?`${n}px`:n}),r},uh={xs:475,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},gh=(e,r=uh)=>{const[a,n]=v.useState("base");return v.useEffect(()=>{const o=()=>{const s=window.innerWidth;s>=r["2xl"]?n("2xl"):s>=r.xl?n("xl"):s>=r.lg?n("lg"):s>=r.md?n("md"):s>=r.sm?n("sm"):s>=r.xs?n("xs"):n("base")};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[r]),e[a]||e.base||{}},Tn=()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,hh=()=>{const[e,r]=v.useState(Tn);return v.useEffect(()=>{const a=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>{r(a.matches)};return a.addEventListener?a.addEventListener("change",n):a.addListener(n),()=>{a.removeEventListener?a.removeEventListener("change",n):a.removeListener(n)}},[]),e},fh=(e,r=["layout","paint"])=>{e&&(e.style.contain=r.join(" "))},bh=(e,r)=>e?(e.style.willChange=r.join(", "),()=>{e.style.willChange="auto"}):void 0,mh=e=>{typeof window>"u"||requestAnimationFrame(()=>{e.forEach(r=>r())})},yh=(...e)=>e.filter(Boolean).join(" "),ph=e=>{const r={},a=["display","position","width","height","margin","padding","fontSize","fontFamily","color","backgroundColor"];return Object.entries(e).forEach(([n,o])=>{a.includes(n)&&(r[n]=o)}),r},vh=(e,r=[])=>{const[a,n]=v.useState(null),[o,s]=v.useState(!0);return v.useEffect(()=>{let i=!0;return e().then(l=>{i&&(n(l.default),s(!1))}),()=>{i=!1}},[e,...r]),{styles:a,loading:o}},wh=(e,r="1rem")=>({display:"grid",gridTemplateColumns:`repeat(${e}, minmax(0, 1fr))`,gap:r,contain:"layout",willChange:"transform"}),kh=(e="row",r="center",a="flex-start")=>({display:"flex",flexDirection:e,alignItems:r,justifyContent:a,contain:"layout"}),xh=e=>{const[r,a]=v.useState(!1);return v.useEffect(()=>{const n=window.matchMedia(e);a(n.matches);const o=()=>a(n.matches);return n.addEventListener?n.addEventListener("change",o):n.addListener(o),()=>{n.removeEventListener?n.removeEventListener("change",o):n.removeListener(o)}},[e]),r},Nh=(e,r)=>{const[a,n]=v.useState("light");return v.useEffect(()=>{const o=window.matchMedia("(prefers-color-scheme: dark)");n(o.matches?"dark":"light");const s=()=>{n(o.matches?"dark":"light")};return o.addEventListener?o.addEventListener("change",s):o.addListener(s),()=>{o.removeEventListener?o.removeEventListener("change",s):o.removeListener(s)}},[]),a==="dark"?r:e},Ch=e=>{const r={src:e.src,alt:e.alt,loading:e.loading||"lazy"};return e.title&&(r.title=e.title),e.width&&(r.width=e.width),e.height&&(r.height=e.height),e.sizes&&(r.sizes=e.sizes),e.srcSet&&(r.srcSet=e.srcSet),r.itemProp="image",r},Sh=(e,r=[320,640,768,1024,1280,1920])=>r.map(a=>`${e.replace(/\{width\}/g,a.toString())} ${a}w`).join(", "),Eh=e=>e.map(r=>r.maxWidth?`(max-width: ${r.maxWidth}px) ${r.size}`:r.size).join(", "),Th=(e,r="openGraph")=>{const a={};return r==="openGraph"?(a["og:image"]=e.url,e.width&&(a["og:image:width"]=e.width.toString()),e.height&&(a["og:image:height"]=e.height.toString()),e.alt&&(a["og:image:alt"]=e.alt),e.type&&(a["og:image:type"]=e.type)):(a["twitter:image"]=e.url,e.alt&&(a["twitter:image:alt"]=e.alt)),a},Ah=(e='img[loading="lazy"]')=>{if(typeof window>"u"||!("IntersectionObserver"in window))return;const r=document.querySelectorAll(e);if("loading"in HTMLImageElement.prototype){r.forEach(n=>{n.dataset.src&&(n.src=n.dataset.src)});return}const a=new IntersectionObserver(n=>{n.forEach(o=>{if(o.isIntersecting){const s=o.target;s.dataset.src&&(s.src=s.dataset.src,s.removeAttribute("data-src")),s.dataset.srcset&&(s.srcset=s.dataset.srcset,s.removeAttribute("data-srcset")),a.unobserve(s)}})},{rootMargin:"50px 0px",threshold:.01});return r.forEach(n=>a.observe(n)),()=>{r.forEach(n=>a.unobserve(n))}},An=()=>typeof window>"u"?Promise.resolve(!1):new Promise(e=>{const r=new Image;r.onload=r.onerror=function(){e(r.height===2)},r.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"}),In=()=>typeof window>"u"?Promise.resolve(!1):new Promise(e=>{const r=new Image;r.onload=()=>e(!0),r.onerror=()=>e(!1),r.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="}),Ih=async(e="jpg")=>{const[r,a]=await Promise.all([An(),In()]);return a?"avif":r?"webp":e},Mh=(e,r,a,n)=>`
|
|
57
57
|
<picture>
|
|
58
58
|
${e.map(s=>{const i=[`srcset="${s.srcSet}"`];return s.type&&i.push(`type="${s.type}"`),s.media&&i.push(`media="${s.media}"`),s.sizes&&i.push(`sizes="${s.sizes}"`),`<source ${i.join(" ")}>`}).join(`
|
|
59
59
|
`)}
|
|
@@ -62,4 +62,4 @@ Nonce: ${h}`}function a(c,g=24){const h=new Date(c.getTime()+g*60*60*1e3);return
|
|
|
62
62
|
<svg width="${e}" height="${r}" xmlns="http://www.w3.org/2000/svg">
|
|
63
63
|
<rect width="100%" height="100%" fill="${a}"/>
|
|
64
64
|
</svg>
|
|
65
|
-
`;return`data:image/svg+xml;base64,${btoa(n)}`},Dh=(e,r)=>{const a=1/r*100;e.style.position="relative",e.style.paddingTop=`${a}%`;const n=e.querySelector("img");n&&(n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="100%",n.style.height="100%",n.style.objectFit="cover")},Oe={createPureFunction:e=>e,isDevelopment:process.env.NODE_ENV==="development",isProduction:process.env.NODE_ENV==="production",isTest:process.env.NODE_ENV==="test",createFeatureFlags:(e={})=>({enableAnalytics:process.env.VITE_ENABLE_ANALYTICS==="true",enableDebugTools:process.env.NODE_ENV==="development",enablePerformanceMonitoring:process.env.VITE_ENABLE_PERF_MONITORING!=="false",...e})},jh=e=>{const r={};return Object.entries(e).forEach(([a,n])=>{r[a]=()=>{try{return n()}catch{return Promise.resolve({default:null})}}}),r},Mn={createDebounce:e=>r=>{let a;return((...n)=>{clearTimeout(a),a=setTimeout(()=>r(...n),e)})},memoize:e=>{const r=new Map;return((...a)=>{const n=JSON.stringify(a);if(r.has(n))return r.get(n);const o=e(...a);return r.set(n,o),o})},isDeepEqual:(e,r)=>{if(e===r)return!0;if(e==null||r==null||typeof e!="object"||typeof r!="object")return!1;const a=Object.keys(e),n=Object.keys(r);if(a.length!==n.length)return!1;for(const o of a)if(!n.includes(o)||!Mn.isDeepEqual(e[o],r[o]))return!1;return!0},createThrottle:e=>r=>{let a=0;return((...n)=>{const o=Date.now();if(o-a>=e)return a=o,r(...n)})}},_h=e=>{const r={};return Object.entries(e).forEach(([a,n])=>{r[a]={},Object.entries(n).forEach(([o,s])=>{r[a][o]=()=>import(s).then(i=>({[o]:i[o]}))})}),r},Ue={getModuleSize:e=>new Promise(r=>{if(typeof window<"u"&&"performance"in window){const n=performance.getEntriesByType("resource").find(o=>o.name.includes(e));r(n?.transferSize||0)}else r(0)}),usageTracker:new Set,trackUsage:e=>{Oe.isDevelopment&&Ue.usageTracker.add(e)},getUsageReport:()=>Oe.isDevelopment?Array.from(Ue.usageTracker).sort():[],estimateImpact:e=>{const r=e.map(a=>Ue.getModuleSize(a).then(n=>[a,n]));return Promise.all(r).then(a=>{const n={};let o=0;return a.forEach(([s,i])=>{n[s]=i,o+=i}),{total:o,modules:n}})}},Ln={inlineCriticalCSS:e=>{if(typeof document<"u"){const r=document.createElement("style");r.textContent=e,document.head.appendChild(r)}},loadAsyncCSS:e=>{if(typeof document<"u"){const r=document.createElement("link");r.rel="stylesheet",r.href=e,r.media="print",r.onload=()=>{r.media="all"},document.head.appendChild(r)}},removeUnusedCSS:e=>{if(typeof document>"u")return;const r=new Set;return e.forEach(a=>{try{document.querySelector(a)&&r.add(a)}catch{}}),{used:Array.from(r),unused:e.filter(a=>!r.has(a))}}},zh=(e={})=>{const{features:r={},criticalCSS:a="",enableUsageTracking:n=Oe.isDevelopment}=e;return{features:Oe.createFeatureFlags(r),initialize:()=>{a&&typeof document<"u"&&Ln.inlineCriticalCSS(a)},cleanup:()=>{Ue.usageTracker.clear()},getReport:()=>({usage:Ue.getUsageReport(),features:Oe.createFeatureFlags(r)})}};let it;function Bh(e){throw typeof window<"u"?new Error("Web navigation service not implemented in shared library"):new Error("React Native navigation service not implemented in shared library")}function le(e){return it||(it=Bh()),it}function Wh(){const e=le(),r=e.getCurrentState();return{navigate:(a,n)=>{e.navigate(a,n)},goBack:a=>{e.goBack(a)},replace:(a,n)=>{e.replace(a,n)},currentPath:r.currentPath,searchParams:r.searchParams,params:r.params,canGoBack:e.canGoBack(),isSupported:e.isSupported()}}function Fh(){const r=le().getCurrentState(),a=Object.keys(r.searchParams).length>0?"?"+new URLSearchParams(r.searchParams).toString():"";return{pathname:r.currentPath,search:a,searchParams:r.searchParams,hash:"",state:{},key:r.currentPath}}function Vh(){const e=le(),r=e.getCurrentState();return[new URLSearchParams(r.searchParams),o=>{const s=o instanceof URLSearchParams?Object.fromEntries(o.entries()):o,i=new URLSearchParams(s).toString(),l=r.currentPath+(i?`?${i}`:"");e.replace(l)}]}const Ie={navigate:(e,r)=>{le().navigate(e,r)},goBack:e=>{le().goBack(e)},replace:(e,r)=>{le().replace(e,r)},getCurrentPath:()=>le().getCurrentPath(),getSearchParams:()=>le().getSearchParams(),goToMail:()=>{Ie.navigate("/mail")},goToPreferences:()=>{Ie.navigate("/preferences")},goToCompose:(e,r)=>{const a=new URLSearchParams;e&&a.set("type",e),r&&Object.entries(r).forEach(([o,s])=>{a.set(o,s)});const n=a.toString();Ie.navigate(`/mail/compose${n?`?${n}`:""}`)},goToConnect:()=>{Ie.navigate("/connect")},goToDelegate:()=>{Ie.navigate("/admin/delegate")},goToHome:()=>{Ie.navigate("/")},canGoBack:()=>le().canGoBack()};function qh(e,r=3,a=1e3){return p.lazy(()=>new Promise((n,o)=>{const s=i=>{e().then(n).catch(l=>{i>0?setTimeout(()=>{s(i-1)},a):o(l)})};s(r)}))}function $h(e){let r=null;const a=()=>(r||(r=e()),r.then(()=>{}));return{Component:p.lazy(()=>r||e()),preload:a}}function Hh(e,r={}){const{fallback:a=t.jsx("div",{children:"Loading..."}),errorFallback:n=t.jsx("div",{children:"Failed to load component"}),loadingDelay:o=200,minimumLoadingTime:s=500}=r,i=p.lazy(async()=>{const d=Date.now();try{const c=await e(),g=Date.now()-d;return g<s&&await new Promise(h=>setTimeout(h,s-g)),c}catch{return{default:(()=>n)}}}),l=()=>{const[d,c]=p.useState(!1);return p.useEffect(()=>{const g=setTimeout(()=>{c(!0)},o);return()=>clearTimeout(g)},[]),d?t.jsx(t.Fragment,{children:a}):null};return p.forwardRef((d,c)=>t.jsx(p.Suspense,{fallback:t.jsx(l,{}),children:t.jsx(i,{...d,ref:c})}))}function Pn(e,r={}){const[a,n]=p.useState(!1),[o,s]=p.useState(!1);return p.useEffect(()=>{const i=e.current;if(!i||o)return;const l=new IntersectionObserver(([d])=>{d.isIntersecting&&(n(!0),s(!0),l.disconnect())},{rootMargin:"50px",threshold:.01,...r});return l.observe(i),()=>{l.disconnect()}},[e,r,o]),a}const Gh=({children:e,fallback:r=t.jsx("div",{children:"Loading..."}),threshold:a=.01,rootMargin:n="50px",placeholder:o})=>{const s=p.useRef(null),i=Pn(s,{threshold:a,rootMargin:n});return t.jsx("div",{ref:s,children:i?e:o||r})};function Yh(e){const{importFn:r,preloadOnHover:a=!0,preloadOnFocus:n=!0,prefetchDelay:o=50}=e;let s=null,i=null;const l=()=>(i||(i=r()),i),d=()=>{s&&clearTimeout(s),s=setTimeout(()=>{l()},o)};return{Component:p.lazy(()=>i||r()),preload:l,linkProps:{...a&&{onMouseEnter:d,onMouseLeave:()=>{s&&clearTimeout(s)}},...n&&{onFocus:d}}}}function Kh(e,r=[]){const[a,n]=p.useState(null),[o,s]=p.useState(!0),[i,l]=p.useState(null);return p.useEffect(()=>{let d=!0;return s(!0),l(null),e().then(c=>{d&&(n(c),s(!1))}).catch(c=>{d&&(l(c),s(!1))}),()=>{d=!1}},[e,...r]),{module:a,loading:o,error:i}}class On{constructor(r=3,a=100){this.queue=new Set,this.isProcessing=!1,this.batchSize=r,this.delay=a}add(r){this.queue.add(r),this.process()}async process(){if(this.isProcessing||this.queue.size===0)return;this.isProcessing=!0;const r=Array.from(this.queue).slice(0,this.batchSize);r.forEach(a=>this.queue.delete(a)),await Promise.all(r.map(a=>a().catch(()=>{}))),this.queue.size>0&&await new Promise(a=>setTimeout(a,this.delay)),this.isProcessing=!1,this.queue.size>0&&this.process()}}function Zh(e,r,a){if(typeof document>"u")return;const n=document.createElement("link");n.rel=r,n.href=e,a&&(r==="preload"||r==="prefetch")&&(n.as=a),document.head.appendChild(n)}var lt=(e=>(e[e.HIGH=0]="HIGH",e[e.MEDIUM=1]="MEDIUM",e[e.LOW=2]="LOW",e[e.IDLE=3]="IDLE",e))(lt||{});class Un{constructor(){this.queues=new Map,this.isProcessing=!1,Object.values(lt).filter(r=>typeof r=="number").forEach(r=>{this.queues.set(r,[])})}load(r,a=1){const n=this.queues.get(a);n&&n.push(r),this.process()}async process(){if(!this.isProcessing){this.isProcessing=!0;for(const[r,a]of this.queues)for(;a.length>0;){const n=a.shift();if(n)try{await n()}catch{}r>=2&&await new Promise(o=>setTimeout(o,50))}this.isProcessing=!1}}}const Xh=new On,Qh=new Un;class ct{constructor(r={}){this.prefix=r.prefix||"mailbox",this.defaultTTL=r.ttl,this.platformStorage=r.platformStorage||this.createFallbackStorage()}createFallbackStorage(){const r=new Map;return{getItem:a=>r.get(a)||null,setItem:(a,n)=>{r.set(a,n)},removeItem:a=>{r.delete(a)},clear:()=>{r.clear()},getAllKeys:()=>Array.from(r.keys())}}getKey(r){return`${this.prefix}-${r}`}isExpired(r){return r.ttl?Date.now()-r.timestamp>r.ttl:!1}set(r,a,n){try{const o={value:a,timestamp:Date.now(),ttl:n||this.defaultTTL};this.platformStorage.setItem(this.getKey(r),JSON.stringify(o))}catch{}}get(r,a){try{const n=this.platformStorage.getItem(this.getKey(r));if(!n)return a;const o=JSON.parse(n);return this.isExpired(o)?(this.remove(r),a):o.value}catch{return a}}remove(r){try{this.platformStorage.removeItem(this.getKey(r))}catch{}}clear(r){try{if(this.platformStorage.getAllKeys){const a=this.platformStorage.getAllKeys(),n=this.getKey(r||""),o=a.filter(s=>s.startsWith(n));for(const s of o)this.platformStorage.removeItem(s)}else this.platformStorage.clear?.()}catch(a){console.error("Failed to clear storage:",a)}}has(r){try{return this.platformStorage.getItem(this.getKey(r))!==null}catch(a){return console.error(`Failed to check item ${r}:`,a),!1}}getAllKeys(){try{if(this.platformStorage.getAllKeys){const r=this.platformStorage.getAllKeys(),a=`${this.prefix}-`;return r.filter(n=>n.startsWith(a)).map(n=>n.substring(a.length))}return[]}catch(r){return console.error("Failed to get all keys:",r),[]}}}const Jh=new ct,Rh=new ct({prefix:"mailbox-theme"}),ef=new ct({prefix:"walletUser",ttl:10080*60*1e3}),rf=e=>{if(!e)throw new Error("PlatformStorage must be provided to createSimpleStorage");return{setItem:(r,a)=>{try{e.setItem(r,a)}catch{}},getItem:r=>{try{return e.getItem(r)}catch{return null}},removeItem:r=>{try{e.removeItem(r)}catch{}}}};function Dn(){const e={isWalletBrowser:!1,walletType:"unknown",hasEthereum:!1,hasSolana:!1,provider:null};if(typeof window>"u")return e;try{const r=navigator.userAgent.toLowerCase();let a="unknown",n=!1;r.includes("metamask")?(a="metamask",n=!0):r.includes("trustwallet")?(a="trustwallet",n=!0):r.includes("coinbase")?(a="coinbase",n=!0):r.includes("rainbow")?(a="rainbow",n=!0):r.includes("phantom")?(a="phantom",n=!0):r.includes("solflare")?(a="solflare",n=!0):r.includes("exodus")&&(a="exodus",n=!0);const o=!!window.ethereum,s=!!window.solana||!!window.phantom?.solana;(o||s)&&!n&&(n=!0,window.ethereum?.isMetaMask?a="metamask":window.ethereum?.isCoinbaseWallet?a="coinbase":window.ethereum?.isRainbow?a="rainbow":window.phantom?a="phantom":window.solflare&&(a="solflare"));const i=o?window.ethereum:s?window.solana||window.phantom?.solana:null;return{isWalletBrowser:n,walletType:a,hasEthereum:o,hasSolana:s,provider:i}}catch{return e}}async function tf(){const e=Dn();if(!e.isWalletBrowser)return{success:!1,error:"Not running in a wallet browser"};try{if(e.hasEthereum&&e.provider)try{const r=await e.provider.request({method:"eth_requestAccounts"});if(r&&r.length>0)return{success:!0,address:r[0]}}catch{}if(e.hasSolana&&e.provider)try{const r=await e.provider.connect();if(r.publicKey)return{success:!0,address:r.publicKey.toString()}}catch{}return{success:!1,error:"Failed to connect to wallet provider"}}catch(r){return{success:!1,error:r instanceof Error?r.message:"Unknown connection error"}}}const af={utils:{cn:f}};Object.defineProperty(u,"ArrowLeftIcon",{enumerable:!0,get:()=>L.ArrowLeftIcon}),Object.defineProperty(u,"ArrowRightIcon",{enumerable:!0,get:()=>L.ArrowRightIcon}),Object.defineProperty(u,"Bars3Icon",{enumerable:!0,get:()=>L.Bars3Icon}),Object.defineProperty(u,"BellIcon",{enumerable:!0,get:()=>L.BellIcon}),Object.defineProperty(u,"BellSlashIcon",{enumerable:!0,get:()=>L.BellSlashIcon}),Object.defineProperty(u,"ChartBarIcon",{enumerable:!0,get:()=>L.ChartBarIcon}),Object.defineProperty(u,"CheckCircleIcon",{enumerable:!0,get:()=>L.CheckCircleIcon}),Object.defineProperty(u,"CheckIcon",{enumerable:!0,get:()=>L.CheckIcon}),Object.defineProperty(u,"ChevronDownIcon",{enumerable:!0,get:()=>L.ChevronDownIcon}),Object.defineProperty(u,"ChevronLeftIcon",{enumerable:!0,get:()=>L.ChevronLeftIcon}),Object.defineProperty(u,"ChevronRightIcon",{enumerable:!0,get:()=>L.ChevronRightIcon}),Object.defineProperty(u,"ChevronUpIcon",{enumerable:!0,get:()=>L.ChevronUpIcon}),Object.defineProperty(u,"ClockIcon",{enumerable:!0,get:()=>L.ClockIcon}),Object.defineProperty(u,"CodeBracketIcon",{enumerable:!0,get:()=>L.CodeBracketIcon}),Object.defineProperty(u,"Cog6ToothIcon",{enumerable:!0,get:()=>L.Cog6ToothIcon}),Object.defineProperty(u,"CreditCardIcon",{enumerable:!0,get:()=>L.CreditCardIcon}),Object.defineProperty(u,"DocumentTextIcon",{enumerable:!0,get:()=>L.DocumentTextIcon}),Object.defineProperty(u,"EnvelopeIcon",{enumerable:!0,get:()=>L.EnvelopeIcon}),Object.defineProperty(u,"ExclamationTriangleIcon",{enumerable:!0,get:()=>L.ExclamationTriangleIcon}),Object.defineProperty(u,"EyeSlashIcon",{enumerable:!0,get:()=>L.EyeSlashIcon}),Object.defineProperty(u,"GlobeAltIcon",{enumerable:!0,get:()=>L.GlobeAltIcon}),Object.defineProperty(u,"HomeIcon",{enumerable:!0,get:()=>L.HomeIcon}),Object.defineProperty(u,"InboxIcon",{enumerable:!0,get:()=>L.InboxIcon}),Object.defineProperty(u,"InformationCircleIcon",{enumerable:!0,get:()=>L.InformationCircleIcon}),Object.defineProperty(u,"KeyIcon",{enumerable:!0,get:()=>L.KeyIcon}),Object.defineProperty(u,"MegaphoneIcon",{enumerable:!0,get:()=>L.MegaphoneIcon}),Object.defineProperty(u,"MinusIcon",{enumerable:!0,get:()=>L.MinusIcon}),Object.defineProperty(u,"PaperAirplaneIcon",{enumerable:!0,get:()=>L.PaperAirplaneIcon}),Object.defineProperty(u,"PaperClipIcon",{enumerable:!0,get:()=>L.PaperClipIcon}),Object.defineProperty(u,"PlusIcon",{enumerable:!0,get:()=>L.PlusIcon}),Object.defineProperty(u,"RocketLaunchIcon",{enumerable:!0,get:()=>L.RocketLaunchIcon}),Object.defineProperty(u,"ShieldCheckIcon",{enumerable:!0,get:()=>L.ShieldCheckIcon}),Object.defineProperty(u,"SparklesIcon",{enumerable:!0,get:()=>L.SparklesIcon}),Object.defineProperty(u,"StarIcon",{enumerable:!0,get:()=>L.StarIcon}),Object.defineProperty(u,"TrashIcon",{enumerable:!0,get:()=>L.TrashIcon}),Object.defineProperty(u,"UserGroupIcon",{enumerable:!0,get:()=>L.UserGroupIcon}),Object.defineProperty(u,"XMarkIcon",{enumerable:!0,get:()=>L.XMarkIcon}),Object.defineProperty(u,"CheckCircleIconSolid",{enumerable:!0,get:()=>he.CheckCircleIcon}),Object.defineProperty(u,"CheckIconSolid",{enumerable:!0,get:()=>he.CheckIcon}),Object.defineProperty(u,"ExclamationTriangleIconSolid",{enumerable:!0,get:()=>he.ExclamationTriangleIcon}),Object.defineProperty(u,"StarIconSolid",{enumerable:!0,get:()=>he.StarIcon}),u.AIMeta=lu,u.AITrainingEnhancer=du,u.AI_TRAINING_CONFIGS=xu,u.ActionButton=vi,u.AddressLink=$i,u.Alert=yr,u.AlertBanner=Go,u.AlertDescription=Ho,u.AlertTitle=$o,u.AnimatedSection=or,u.ApiSection=vn,u.AreaChart=Tc,u.AspectRatio=ao,u.AudioPlayer=Rc,u.Avatar=pc,u.Backdrop=Ji,u.Badge=Ro,u.BarChart=Cc,u.BatchRender=n0,u.Blockquote=Oo,u.BodyText=To,u.BorderAccent=ho,u.Box=yt,u.Breadcrumb=Oa,u.BreadcrumbNav=_l,u.BreadcrumbSection=Dd,u.BundleSection=pn,u.BurndownChart=jc,u.Button=se,u.CACHE_CONFIGS=Ga,u.CTASection=h0,u.Calendar=Sa,u.CalloutBox=mc,u.CancellableRequest=Lu,u.Card=Vr,u.CardContent=hc,u.CardFooter=fc,u.CardHeader=gc,u.Center=Qn,u.ChainBadge=qs,u.Checkbox=ei,u.Code=Mo,u.CodeBlock=jd,u.CodeDisplay=Lo,u.CollapsibleDocumentationTopic=zd,u.ColorPicker=Ni,u.ColorPickerAdvanced=Ci,u.ColorSwatch=Si,u.Combobox=ni,u.Command=Ri,u.ComponentPreloader=at,u.ConditionalRender=r0,u.ConfirmationDialog=kd,u.Container=Yn,u.ContentContainer=N0,u.CreditCardInput=Li,u.CriticalPathOptimizer=wg,u.CurrencyInput=Pi,u.CustomSection=Nn,u.DashboardStatCard=yc,u.DataTable=Zl,u.DateInput=Xs,u.DateRangePicker=ki,u.DateTimePicker=wi,u.Dialog=Aa,u.Divider=uo,u.DragDrop=Nd,u.Drawer=cd,u.Dropdown=oi,u.EmptyState=Pa,u.ErrorBoundary=$d,u.ExpensiveComponent=Rd,u.ExternalLink=jl,u.FadeInScale=Xi,u.FadeInUp=Zi,u.FeatureBlock=ol,u.FeatureCard=s0,u.FeatureGrid=u0,u.FileInput=ci,u.Flex=Wn,u.FlexContainer=Gn,u.FloatingElement=Qi,u.FloatingPanel=fo,u.FocusTrap=dd,u.Footer=S0,u.FooterBottom=M0,u.FooterBrand=T0,u.FooterCompact=L0,u.FooterCompactLeft=P0,u.FooterCompactRight=O0,u.FooterCopyright=D0,u.FooterGrid=E0,u.FooterLink=I0,u.FooterLinkSection=A0,u.FooterVersion=U0,u.FormAlerts=yi,u.FormField=hi,u.FormFieldGroup=nr,u.FormSection=al,u.FormattedNumber=_o,u.Gauge=Bc,u.GlobalLazyErrorBoundary=Kd,u.GradientIconContainer=il,u.Grid=Kn,u.HStack=Xn,u.Heading=ko,u.HelperText=Uo,u.HoverCard=xd,u.IconContainer=hl,u.IconText=fl,u.Image=qc,u.ImageCropper=Gc,u.ImageGallery=$c,u.InfiniteScroll=gd,u.InfoBox=bl,u.InfoCard=bc,u.Input=Re,u.KYCLevelCard=v0,u.KYCStatusBadge=m0,u.Kbd=Po,u.KeyValuePair=kc,u.Label=Wr,u.LanguageSelector=Vd,u.LayoutContext=Yr,u.LayoutProvider=x0,u.LazyComponent=t0,u.LazyErrorBoundary=ir,u.LazyImage=Gu,u.LazyLoadQueue=On,u.LazyWalletButton=vg,u.LazyWrapper=Gh,u.Lightbox=Yc,u.LineChart=Sc,u.Link=Dl,u.List=tc,u.ListItem=ac,u.ListItemWithAction=nc,u.LiveStream=Jc,u.LoadPriority=lt,u.LoadingDots=Wo,u.LoadingOptimizer=Cu,u.LoadingOverlay=Bo,u.LoadingState=Fo,u.Logo=yl,u.Main=cu,u.Masonry=vo,u.MasterDetailLayout=_0,u.MasterListItem=j0,u.MediaUploader=nd,u.MemorySection=xn,u.MentionInput=ui,u.MetricRow=H,u.Modal=qr,u.ModalContent=$r,u.ModalFooter=Hr,u.ModalHeader=ld,u.MultiSelect=ai,u.NavigationList=Wl,u.NavigationMenu=Bl,u.NetworkErrorBoundary=Gd,u.NoContent=Nc,u.NotificationBadge=Qo,u.NotificationPanel=Jo,u.NumberInput=Ks,u.OptimizedAPIClient=Iu,u.OptimizedImage=o0,u.OptimizedRoutePreloader=Su,u.Overlay=Je,u.PageContainer=to,u.PageHeader=k0,u.PageSectionHeader=vl,u.PageTitle=No,u.Pagination=Vl,u.PaginationNav=ql,u.PanelHeader=gn,u.PerformanceBoundary=a0,u.PerformanceOptimizer=Nu,u.PerformancePanel=Rg,u.PhoneDirectory=pi,u.PhoneInput=Rs,u.PieChart=Ec,u.PlatformSpecificComponents=ag,u.PlaylistManager=sd,u.PodcastPlayer=ad,u.Popover=hd,u.Portal=be,u.PriorityLoader=Un,u.Progress=Wc,u.ProgressCircle=Fc,u.PromotionalBanner=Bd,u.PullToRefresh=Od,u.QRCodeDisplay=id,u.QuickActions=kl,u.QuizBuilder=Fi,u.RadioGroup=ri,u.RelativeTime=zo,u.Resizable=mo,u.RouteBasedLazyLoader=tt,u.SafeAppWrapper=Zd,u.ScoreIndicator=Gg,u.ScoreLegend=hn,u.ScrollArea=po,u.ScrollSpy=fd,u.SearchInput=Zs,u.Section=eo,u.SectionBadge=Cl,u.SectionHeader=Sl,u.SectionTitle=So,u.SecurityProvider=Xd,u.Select=jr,u.SelectContent=rr,u.SelectField=mi,u.SelectGroup=ti,u.SelectItem=tr,u.SelectLabel=ka,u.SelectScrollDownButton=zr,u.SelectScrollUpButton=_r,u.SelectSeparator=xa,u.SelectTrigger=er,u.SelectValue=wa,u.Separator=go,u.SettingsList=Tl,u.Sheet=bd,u.SideNav=Fl,u.SignaturePad=Ei,u.SignatureRequest=Ti,u.SkeletonLoader=Vo,u.Slider=ii,u.SliderInput=li,u.SmartContent=Ul,u.SmartLink=Fr,u.SmartWalletProviders=yg,u.Spacer=Jn,u.Sparkline=Oc,u.Spinner=_e,u.SplitPane=bo,u.Stack=mr,u.StandardPageLayout=w0,u.StatCard=rl,u.StatDisplay=xc,u.StatusBadge=Vs,u.StatusIndicator=Hs,u.StepList=qd,u.Stepper=$l,u.StepperNav=Hl,u.SubscriptionGatedComponents=tg,u.SumsubWebSDK=y0,u.Switch=va,u.Table=Kl,u.TableOfContents=Yl,u.Tabs=zl,u.TabsContent=La,u.TabsList=Ia,u.TabsTrigger=Ma,u.TagInput=di,u.Text=wo,u.TextArea=Ys,u.TextAreaField=bi,u.TextField=fi,u.TextInputModal=md,u.TextLink=Io,u.TimePicker=pa,u.Toast=vt,u.ToastNotification=Xo,u.ToastProvider=Zo,u.ToggleGroup=si,u.Tooltip=yd,u.Topbar=W0,u.TopbarActions=tu,u.TopbarCenter=V0,u.TopbarContext=Kr,u.TopbarDivider=H0,u.TopbarIconButton=ou,u.TopbarLeft=F0,u.TopbarLogo=Y0,u.TopbarMenuToggle=Fa,u.TopbarMobileContent=$0,u.TopbarMobileNav=J0,u.TopbarNav=Va,u.TopbarNavigation=R0,u.TopbarProvider=Ba,u.TopbarRight=q0,u.TopbarSearch=iu,u.TrackedButton=Wd,u.TrackedLink=Fd,u.TransferList=sc,u.TreeView=lc,u.TruncatedText=jo,u.UanimatedUcounter=Hi,u.UaudioUwaveform=ed,u.UavatarUgroup=vc,u.UbadgeUdesigner=es,u.UbubbleUchart=Ic,u.UcellUeditor=ec,u.UcodeUhighlighter=Mi,u.UcolumnUresize=Rl,u.UcurrencyUconverter=Oi,u.UcurrencyUrates=Ui,u.UdataUgrid=Xl,u.UdoubleUtap=Md,u.UdragUdropUlist=Cd,u.UfieldUmapper=Bi,u.UfocusUindicator=sl,u.UformUbuilder=Di,u.UformUtemplate=_i,u.UformUvalidator=ji,u.UfunnelUchart=Dc,u.UgestureUdetector=Td,u.Uheatmap=Uc,u.UhoverUtooltip=ud,u.UimageUcomparison=Hc,u.UkeyboardUshortcut=ml,u.UlistingUform=cc,u.UlongUpress=Ld,u.UmarkdownUrenderer=Ii,u.UmediaUplaylist=od,u.UmetricUcomparison=zc,u.UmorphUtransition=pl,u.UnestedUdrag=Ed,u.UparallaxUscroll=wl,u.UperformanceUchart=_c,u.UpinchUzoom=Id,u.UpivotUtable=Ql,u.UprofileUheader=wc,u.UprogressUtracker=Vc,u.UradarUchart=Ac,u.UradialUmenu=Pd,u.UresizableUpanels=yo,u.UrevealUonUscroll=xl,u.UsankeyUdiagram=Pc,u.UscatterUplot=Mc,u.UschemaUvalidator=zi,u.UscreenUreaderUtext=Do,u.UskipUnavigation=Al,u.UsortUdropdown=Il,u.UsortableUgrid=Sd,u.UspreadsheetUgrid=Jl,u.UstatusUpipeline=Gs,u.UsurveyUbuilder=Wi,u.UswipeUactions=Ad,u.UtableUreservation=rc,u.UtimeUslotUpicker=xi,u.UtreeUmap=Lc,u.UuserUtable=oc,u.UversionUbadge=Ml,u.UvideoUcall=Qc,u.UvideoUthumbnail=Zc,u.UvoiceUrecorder=td,u.VStack=Zn,u.VideoEditor=Xc,u.VideoPlayer=Kc,u.VirtualList=ic,u.VirtualListItem=e0,u.VisuallyHidden=Ll,u.WEB3_CONCEPTS=yu,u.WEB3_EMAIL_HEADINGS=mu,u.WEB3_HEADING_PATTERNS=ie,u.WalletPreloader=Ke,u.WaveForm=rd,u.WebVitalsSection=bn,u.WysiwygEditor=Ai,u.addResourceHint=Zh,u.aiOptimizationPresets=bg,u.appStorage=Jh,u.autoConnectWalletBrowser=tf,u.batchDOMUpdates=mh,u.bundleAnalysis=Ue,u.buttonVariants=Ca,u.cacheHeaders=Bu,u.cacheUtils=Pu,u.checkPerformanceBudget=Bg,u.clearComponentCache=Yu,u.clearConditionalCache=og,u.clearRenderCounts=Eg,u.cn=f,u.conditionalCSS=ju,u.convertFileSize=oh,u.createAIMetaTags=Ha,u.createAIOptimizedSchema=Rr,u.createAdvancedLazyComponent=qu,u.createCSSVariables=dh,u.createConditionalImports=jh,u.createConditionalLazyComponent=rg,u.createEnhancedFAQSchema=uu,u.createEnhancedOpenGraph=qa,u.createEnhancedTwitterCard=$a,u.createFeature=Gr,u.createLazyComponent=rn,u.createLazyComponentFactory=Tg,u.createLazyRoute=Yh,u.createLazyWalletProvider=st,u.createLibraryImports=Ru,u.createMemoComponent=Qd,u.createOptimizedStyles=ih,u.createProgressiveComponent=Hh,u.createSecurityFeatures=g0,u.createSelectiveExports=_h,u.createSelectiveMemoComponent=Jd,u.createSemanticHeading=fu,u.createSimpleStorage=rf,u.createTechnicalArticleSchema=Jr,u.createTreeShakingConfig=zh,u.createUIComponents=Ju,u.createWeb3ProductSchema=Qr,u.cspDirectives=_u,u.cssOptimization=Ln,u.deadCodeElimination=Oe,u.default=af,u.defaultPerformanceBudget=un,u.detectAvailableWallets=ot,u.detectWalletBrowser=Dn,u.exportPerformanceData=Wg,u.formatBytes=yn,u.formatFileSize=nh,u.formatMetricValue=Kg,u.generateAIMetaTags=dg,u.generateAIMetadata=pu,u.generateAIStructuredData=gg,u.generateAdvancedSEO=gu,u.generateCSP=Ra,u.generateCSPDirectives=et,u.generateConceptGraph=vu,u.generateContentRelationships=ug,u.generateEntityRecognition=sn,u.generateImageSEO=Ch,u.generatePerformanceTrackingSchema=fg,u.generatePictureElement=Mh,u.generatePlaceholder=Uh,u.generateQAPairs=ku,u.generateSemanticMarkup=on,u.generateSizes=Eh,u.generateSocialImageMeta=Th,u.generateSrcSet=Sh,u.generateTopicClustering=ln,u.generateTrainingExamples=wu,u.getConditionalStats=sg,u.getEnvironmentType=Qa,u.getLazyLoadingStats=Ku,u.getOptimalImageFormat=Ih,u.getPerformanceMonitor=hr,u.getPreloadingStats=cg,u.getRenderCounts=Sg,u.getSecurityHeaders=en,u.getUINavigationService=le,u.getWebVitalRating=Ae,u.getWebVitals=Lg,u.initializeAdvancedPreloading=lg,u.initializePerformanceMonitoring=jg,u.initializePreloading=eg,u.inlineCriticalStyles=ph,u.isLocalhost=Za,u.isNetworkAccess=Xa,u.isWalletBrowser=Ka,u.isWebEnvironment=Ja,u.lazyLoadQueue=Xh,u.lazyWithPreload=$h,u.lazyWithRetry=qh,u.loadCSS=Uu,u.loadCriticalCSS=lh,u.loadNonCriticalCSS=ch,u.measureAsyncOperation=zg,u.measureImagePerformance=Oh,u.navigationHelper=Ie,u.optimizeClassNames=yh,u.optimizeContainment=fh,u.optimizeFlex=kh,u.optimizeGrid=wh,u.optimizeWillChange=bh,u.optimizedFetch=Ya,u.pageSEOConfigs=hu,u.parseFileSize=sh,u.performanceBudget=ge,u.performanceUtils=dr,u.prefersReducedMotion=Tn,u.prefetchResource=Pg,u.preloadComponent=Qu,u.preloadImage=Lh,u.preloadResource=Og,u.preloadRoute=Ig,u.preserveAspectRatio=Dh,u.priorityLoader=Qh,u.reportWebVitals=Mg,u.routeConfig=tn,u.securityHeaders=zu,u.setupCSPReporting=Wu,u.setupLazyLoading=Ah,u.setupProgressiveLoading=Ph,u.shouldEnableWallet=Ou,u.smartLinkVariants=sr,u.supportsAVIF=In,u.supportsCSSImports=Du,u.supportsWebP=An,u.themeStorage=Rh,u.useApiMetrics=Cn,u.useBundleMetrics=mn,u.useClickOutside=ar,u.useCodeLoader=Ua,u.useComponentPerformance=dn,u.useCopyToClipboard=th,u.useDebugMemo=Ng,u.useDraggable=Sn,u.useDynamicImport=Kh,u.useErrorRecovery=Yd,u.useFormSubmission=eh,u.useImageLazyLoading=Ag,u.useLayout=lr,u.useLazyLoad=Pn,u.useLazyStyles=vh,u.useLocation=Fh,u.useMediaQuery=xh,u.useMemoryLeakDetection=Ug,u.useMultipleCopyToClipboard=ah,u.useNavigation=Wh,u.useOptimizedTheme=Nh,u.useOptimizedWallets=pg,u.usePerformanceMark=kg,u.useReducedMotion=hh,u.useRenderCount=Cg,u.useResponsiveStyles=gh,u.useSearchParams=Vh,u.useSmartLinks=Pl,u.useStableCallback=xg,u.useToast=Yo,u.useToggle=rh,u.useTopbar=Zr,u.useWebVitals=fn,u.utils=Mn,u.validateHeadingStructure=bu,u.walletStorage=ef,u.web3SecurityNotes=Fu,u.withLazyErrorBoundary=Hd,u.withPerformanceTracking=_g,u.withRetry=Mu,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
65
|
+
`;return`data:image/svg+xml;base64,${btoa(n)}`},Dh=(e,r)=>{const a=1/r*100;e.style.position="relative",e.style.paddingTop=`${a}%`;const n=e.querySelector("img");n&&(n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="100%",n.style.height="100%",n.style.objectFit="cover")},De={createPureFunction:e=>e,isDevelopment:process.env.NODE_ENV==="development",isProduction:process.env.NODE_ENV==="production",isTest:process.env.NODE_ENV==="test",createFeatureFlags:(e={})=>({enableAnalytics:process.env.VITE_ENABLE_ANALYTICS==="true",enableDebugTools:process.env.NODE_ENV==="development",enablePerformanceMonitoring:process.env.VITE_ENABLE_PERF_MONITORING!=="false",...e})},jh=e=>{const r={};return Object.entries(e).forEach(([a,n])=>{r[a]=()=>{try{return n()}catch{return Promise.resolve({default:null})}}}),r},Mn={createDebounce:e=>r=>{let a;return((...n)=>{clearTimeout(a),a=setTimeout(()=>r(...n),e)})},memoize:e=>{const r=new Map;return((...a)=>{const n=JSON.stringify(a);if(r.has(n))return r.get(n);const o=e(...a);return r.set(n,o),o})},isDeepEqual:(e,r)=>{if(e===r)return!0;if(e==null||r==null||typeof e!="object"||typeof r!="object")return!1;const a=Object.keys(e),n=Object.keys(r);if(a.length!==n.length)return!1;for(const o of a)if(!n.includes(o)||!Mn.isDeepEqual(e[o],r[o]))return!1;return!0},createThrottle:e=>r=>{let a=0;return((...n)=>{const o=Date.now();if(o-a>=e)return a=o,r(...n)})}},_h=e=>{const r={};return Object.entries(e).forEach(([a,n])=>{r[a]={},Object.entries(n).forEach(([o,s])=>{r[a][o]=()=>import(s).then(i=>({[o]:i[o]}))})}),r},je={getModuleSize:e=>new Promise(r=>{if(typeof window<"u"&&"performance"in window){const n=performance.getEntriesByType("resource").find(o=>o.name.includes(e));r(n?.transferSize||0)}else r(0)}),usageTracker:new Set,trackUsage:e=>{De.isDevelopment&&je.usageTracker.add(e)},getUsageReport:()=>De.isDevelopment?Array.from(je.usageTracker).sort():[],estimateImpact:e=>{const r=e.map(a=>je.getModuleSize(a).then(n=>[a,n]));return Promise.all(r).then(a=>{const n={};let o=0;return a.forEach(([s,i])=>{n[s]=i,o+=i}),{total:o,modules:n}})}},Ln={inlineCriticalCSS:e=>{if(typeof document<"u"){const r=document.createElement("style");r.textContent=e,document.head.appendChild(r)}},loadAsyncCSS:e=>{if(typeof document<"u"){const r=document.createElement("link");r.rel="stylesheet",r.href=e,r.media="print",r.onload=()=>{r.media="all"},document.head.appendChild(r)}},removeUnusedCSS:e=>{if(typeof document>"u")return;const r=new Set;return e.forEach(a=>{try{document.querySelector(a)&&r.add(a)}catch{}}),{used:Array.from(r),unused:e.filter(a=>!r.has(a))}}},zh=(e={})=>{const{features:r={},criticalCSS:a="",enableUsageTracking:n=De.isDevelopment}=e;return{features:De.createFeatureFlags(r),initialize:()=>{a&&typeof document<"u"&&Ln.inlineCriticalCSS(a)},cleanup:()=>{je.usageTracker.clear()},getReport:()=>({usage:je.getUsageReport(),features:De.createFeatureFlags(r)})}};let lt;function Bh(e){throw typeof window<"u"?new Error("Web navigation service not implemented in shared library"):new Error("React Native navigation service not implemented in shared library")}function le(e){return lt||(lt=Bh()),lt}function Wh(){const e=le(),r=e.getCurrentState();return{navigate:(a,n)=>{e.navigate(a,n)},goBack:a=>{e.goBack(a)},replace:(a,n)=>{e.replace(a,n)},currentPath:r.currentPath,searchParams:r.searchParams,params:r.params,canGoBack:e.canGoBack(),isSupported:e.isSupported()}}function Fh(){const r=le().getCurrentState(),a=Object.keys(r.searchParams).length>0?"?"+new URLSearchParams(r.searchParams).toString():"";return{pathname:r.currentPath,search:a,searchParams:r.searchParams,hash:"",state:{},key:r.currentPath}}function Vh(){const e=le(),r=e.getCurrentState();return[new URLSearchParams(r.searchParams),o=>{const s=o instanceof URLSearchParams?Object.fromEntries(o.entries()):o,i=new URLSearchParams(s).toString(),l=r.currentPath+(i?`?${i}`:"");e.replace(l)}]}const Me={navigate:(e,r)=>{le().navigate(e,r)},goBack:e=>{le().goBack(e)},replace:(e,r)=>{le().replace(e,r)},getCurrentPath:()=>le().getCurrentPath(),getSearchParams:()=>le().getSearchParams(),goToMail:()=>{Me.navigate("/mail")},goToPreferences:()=>{Me.navigate("/preferences")},goToCompose:(e,r)=>{const a=new URLSearchParams;e&&a.set("type",e),r&&Object.entries(r).forEach(([o,s])=>{a.set(o,s)});const n=a.toString();Me.navigate(`/mail/compose${n?`?${n}`:""}`)},goToConnect:()=>{Me.navigate("/connect")},goToDelegate:()=>{Me.navigate("/admin/delegate")},goToHome:()=>{Me.navigate("/")},canGoBack:()=>le().canGoBack()};function $h(e,r=3,a=1e3){return v.lazy(()=>new Promise((n,o)=>{const s=i=>{e().then(n).catch(l=>{i>0?setTimeout(()=>{s(i-1)},a):o(l)})};s(r)}))}function qh(e){let r=null;const a=()=>(r||(r=e()),r.then(()=>{}));return{Component:v.lazy(()=>r||e()),preload:a}}function Hh(e,r={}){const{fallback:a=t.jsx("div",{children:"Loading..."}),errorFallback:n=t.jsx("div",{children:"Failed to load component"}),loadingDelay:o=200,minimumLoadingTime:s=500}=r,i=v.lazy(async()=>{const d=Date.now();try{const c=await e(),g=Date.now()-d;return g<s&&await new Promise(h=>setTimeout(h,s-g)),c}catch{return{default:(()=>n)}}}),l=()=>{const[d,c]=v.useState(!1);return v.useEffect(()=>{const g=setTimeout(()=>{c(!0)},o);return()=>clearTimeout(g)},[]),d?t.jsx(t.Fragment,{children:a}):null};return v.forwardRef((d,c)=>t.jsx(v.Suspense,{fallback:t.jsx(l,{}),children:t.jsx(i,{...d,ref:c})}))}function Pn(e,r={}){const[a,n]=v.useState(!1),[o,s]=v.useState(!1);return v.useEffect(()=>{const i=e.current;if(!i||o)return;const l=new IntersectionObserver(([d])=>{d.isIntersecting&&(n(!0),s(!0),l.disconnect())},{rootMargin:"50px",threshold:.01,...r});return l.observe(i),()=>{l.disconnect()}},[e,r,o]),a}const Gh=({children:e,fallback:r=t.jsx("div",{children:"Loading..."}),threshold:a=.01,rootMargin:n="50px",placeholder:o})=>{const s=v.useRef(null),i=Pn(s,{threshold:a,rootMargin:n});return t.jsx("div",{ref:s,children:i?e:o||r})};function Yh(e){const{importFn:r,preloadOnHover:a=!0,preloadOnFocus:n=!0,prefetchDelay:o=50}=e;let s=null,i=null;const l=()=>(i||(i=r()),i),d=()=>{s&&clearTimeout(s),s=setTimeout(()=>{l()},o)};return{Component:v.lazy(()=>i||r()),preload:l,linkProps:{...a&&{onMouseEnter:d,onMouseLeave:()=>{s&&clearTimeout(s)}},...n&&{onFocus:d}}}}function Kh(e,r=[]){const[a,n]=v.useState(null),[o,s]=v.useState(!0),[i,l]=v.useState(null);return v.useEffect(()=>{let d=!0;return s(!0),l(null),e().then(c=>{d&&(n(c),s(!1))}).catch(c=>{d&&(l(c),s(!1))}),()=>{d=!1}},[e,...r]),{module:a,loading:o,error:i}}class On{constructor(r=3,a=100){this.queue=new Set,this.isProcessing=!1,this.batchSize=r,this.delay=a}add(r){this.queue.add(r),this.process()}async process(){if(this.isProcessing||this.queue.size===0)return;this.isProcessing=!0;const r=Array.from(this.queue).slice(0,this.batchSize);r.forEach(a=>this.queue.delete(a)),await Promise.all(r.map(a=>a().catch(()=>{}))),this.queue.size>0&&await new Promise(a=>setTimeout(a,this.delay)),this.isProcessing=!1,this.queue.size>0&&this.process()}}function Zh(e,r,a){if(typeof document>"u")return;const n=document.createElement("link");n.rel=r,n.href=e,a&&(r==="preload"||r==="prefetch")&&(n.as=a),document.head.appendChild(n)}var ct=(e=>(e[e.HIGH=0]="HIGH",e[e.MEDIUM=1]="MEDIUM",e[e.LOW=2]="LOW",e[e.IDLE=3]="IDLE",e))(ct||{});class Un{constructor(){this.queues=new Map,this.isProcessing=!1,Object.values(ct).filter(r=>typeof r=="number").forEach(r=>{this.queues.set(r,[])})}load(r,a=1){const n=this.queues.get(a);n&&n.push(r),this.process()}async process(){if(!this.isProcessing){this.isProcessing=!0;for(const[r,a]of this.queues)for(;a.length>0;){const n=a.shift();if(n)try{await n()}catch{}r>=2&&await new Promise(o=>setTimeout(o,50))}this.isProcessing=!1}}}const Xh=new On,Qh=new Un;class dt{constructor(r={}){this.prefix=r.prefix||"mailbox",this.defaultTTL=r.ttl,this.platformStorage=r.platformStorage||this.createFallbackStorage()}createFallbackStorage(){const r=new Map;return{getItem:a=>r.get(a)||null,setItem:(a,n)=>{r.set(a,n)},removeItem:a=>{r.delete(a)},clear:()=>{r.clear()},getAllKeys:()=>Array.from(r.keys())}}getKey(r){return`${this.prefix}-${r}`}isExpired(r){return r.ttl?Date.now()-r.timestamp>r.ttl:!1}set(r,a,n){try{const o={value:a,timestamp:Date.now(),ttl:n||this.defaultTTL};this.platformStorage.setItem(this.getKey(r),JSON.stringify(o))}catch{}}get(r,a){try{const n=this.platformStorage.getItem(this.getKey(r));if(!n)return a;const o=JSON.parse(n);return this.isExpired(o)?(this.remove(r),a):o.value}catch{return a}}remove(r){try{this.platformStorage.removeItem(this.getKey(r))}catch{}}clear(r){try{if(this.platformStorage.getAllKeys){const a=this.platformStorage.getAllKeys(),n=this.getKey(r||""),o=a.filter(s=>s.startsWith(n));for(const s of o)this.platformStorage.removeItem(s)}else this.platformStorage.clear?.()}catch(a){console.error("Failed to clear storage:",a)}}has(r){try{return this.platformStorage.getItem(this.getKey(r))!==null}catch(a){return console.error(`Failed to check item ${r}:`,a),!1}}getAllKeys(){try{if(this.platformStorage.getAllKeys){const r=this.platformStorage.getAllKeys(),a=`${this.prefix}-`;return r.filter(n=>n.startsWith(a)).map(n=>n.substring(a.length))}return[]}catch(r){return console.error("Failed to get all keys:",r),[]}}}const Jh=new dt,Rh=new dt({prefix:"mailbox-theme"}),ef=new dt({prefix:"walletUser",ttl:10080*60*1e3}),rf=e=>{if(!e)throw new Error("PlatformStorage must be provided to createSimpleStorage");return{setItem:(r,a)=>{try{e.setItem(r,a)}catch{}},getItem:r=>{try{return e.getItem(r)}catch{return null}},removeItem:r=>{try{e.removeItem(r)}catch{}}}};function Dn(){const e={isWalletBrowser:!1,walletType:"unknown",hasEthereum:!1,hasSolana:!1,provider:null};if(typeof window>"u")return e;try{const r=navigator.userAgent.toLowerCase();let a="unknown",n=!1;r.includes("metamask")?(a="metamask",n=!0):r.includes("trustwallet")?(a="trustwallet",n=!0):r.includes("coinbase")?(a="coinbase",n=!0):r.includes("rainbow")?(a="rainbow",n=!0):r.includes("phantom")?(a="phantom",n=!0):r.includes("solflare")?(a="solflare",n=!0):r.includes("exodus")&&(a="exodus",n=!0);const o=!!window.ethereum,s=!!window.solana||!!window.phantom?.solana;(o||s)&&!n&&(n=!0,window.ethereum?.isMetaMask?a="metamask":window.ethereum?.isCoinbaseWallet?a="coinbase":window.ethereum?.isRainbow?a="rainbow":window.phantom?a="phantom":window.solflare&&(a="solflare"));const i=o?window.ethereum:s?window.solana||window.phantom?.solana:null;return{isWalletBrowser:n,walletType:a,hasEthereum:o,hasSolana:s,provider:i}}catch{return e}}async function tf(){const e=Dn();if(!e.isWalletBrowser)return{success:!1,error:"Not running in a wallet browser"};try{if(e.hasEthereum&&e.provider)try{const r=await e.provider.request({method:"eth_requestAccounts"});if(r&&r.length>0)return{success:!0,address:r[0]}}catch{}if(e.hasSolana&&e.provider)try{const r=await e.provider.connect();if(r.publicKey)return{success:!0,address:r.publicKey.toString()}}catch{}return{success:!1,error:"Failed to connect to wallet provider"}}catch(r){return{success:!1,error:r instanceof Error?r.message:"Unknown connection error"}}}const af={utils:{cn:f}};Object.defineProperty(u,"ArrowLeftIcon",{enumerable:!0,get:()=>L.ArrowLeftIcon}),Object.defineProperty(u,"ArrowRightIcon",{enumerable:!0,get:()=>L.ArrowRightIcon}),Object.defineProperty(u,"Bars3Icon",{enumerable:!0,get:()=>L.Bars3Icon}),Object.defineProperty(u,"BellIcon",{enumerable:!0,get:()=>L.BellIcon}),Object.defineProperty(u,"BellSlashIcon",{enumerable:!0,get:()=>L.BellSlashIcon}),Object.defineProperty(u,"ChartBarIcon",{enumerable:!0,get:()=>L.ChartBarIcon}),Object.defineProperty(u,"CheckCircleIcon",{enumerable:!0,get:()=>L.CheckCircleIcon}),Object.defineProperty(u,"CheckIcon",{enumerable:!0,get:()=>L.CheckIcon}),Object.defineProperty(u,"ChevronDownIcon",{enumerable:!0,get:()=>L.ChevronDownIcon}),Object.defineProperty(u,"ChevronLeftIcon",{enumerable:!0,get:()=>L.ChevronLeftIcon}),Object.defineProperty(u,"ChevronRightIcon",{enumerable:!0,get:()=>L.ChevronRightIcon}),Object.defineProperty(u,"ChevronUpIcon",{enumerable:!0,get:()=>L.ChevronUpIcon}),Object.defineProperty(u,"ClockIcon",{enumerable:!0,get:()=>L.ClockIcon}),Object.defineProperty(u,"CodeBracketIcon",{enumerable:!0,get:()=>L.CodeBracketIcon}),Object.defineProperty(u,"Cog6ToothIcon",{enumerable:!0,get:()=>L.Cog6ToothIcon}),Object.defineProperty(u,"CreditCardIcon",{enumerable:!0,get:()=>L.CreditCardIcon}),Object.defineProperty(u,"DocumentTextIcon",{enumerable:!0,get:()=>L.DocumentTextIcon}),Object.defineProperty(u,"EnvelopeIcon",{enumerable:!0,get:()=>L.EnvelopeIcon}),Object.defineProperty(u,"ExclamationTriangleIcon",{enumerable:!0,get:()=>L.ExclamationTriangleIcon}),Object.defineProperty(u,"EyeSlashIcon",{enumerable:!0,get:()=>L.EyeSlashIcon}),Object.defineProperty(u,"GlobeAltIcon",{enumerable:!0,get:()=>L.GlobeAltIcon}),Object.defineProperty(u,"HomeIcon",{enumerable:!0,get:()=>L.HomeIcon}),Object.defineProperty(u,"InboxIcon",{enumerable:!0,get:()=>L.InboxIcon}),Object.defineProperty(u,"InformationCircleIcon",{enumerable:!0,get:()=>L.InformationCircleIcon}),Object.defineProperty(u,"KeyIcon",{enumerable:!0,get:()=>L.KeyIcon}),Object.defineProperty(u,"MegaphoneIcon",{enumerable:!0,get:()=>L.MegaphoneIcon}),Object.defineProperty(u,"MinusIcon",{enumerable:!0,get:()=>L.MinusIcon}),Object.defineProperty(u,"PaperAirplaneIcon",{enumerable:!0,get:()=>L.PaperAirplaneIcon}),Object.defineProperty(u,"PaperClipIcon",{enumerable:!0,get:()=>L.PaperClipIcon}),Object.defineProperty(u,"PlusIcon",{enumerable:!0,get:()=>L.PlusIcon}),Object.defineProperty(u,"RocketLaunchIcon",{enumerable:!0,get:()=>L.RocketLaunchIcon}),Object.defineProperty(u,"ShieldCheckIcon",{enumerable:!0,get:()=>L.ShieldCheckIcon}),Object.defineProperty(u,"SparklesIcon",{enumerable:!0,get:()=>L.SparklesIcon}),Object.defineProperty(u,"StarIcon",{enumerable:!0,get:()=>L.StarIcon}),Object.defineProperty(u,"TrashIcon",{enumerable:!0,get:()=>L.TrashIcon}),Object.defineProperty(u,"UserGroupIcon",{enumerable:!0,get:()=>L.UserGroupIcon}),Object.defineProperty(u,"XMarkIcon",{enumerable:!0,get:()=>L.XMarkIcon}),Object.defineProperty(u,"CheckCircleIconSolid",{enumerable:!0,get:()=>fe.CheckCircleIcon}),Object.defineProperty(u,"CheckIconSolid",{enumerable:!0,get:()=>fe.CheckIcon}),Object.defineProperty(u,"ExclamationTriangleIconSolid",{enumerable:!0,get:()=>fe.ExclamationTriangleIcon}),Object.defineProperty(u,"StarIconSolid",{enumerable:!0,get:()=>fe.StarIcon}),u.AIMeta=lu,u.AITrainingEnhancer=du,u.AI_TRAINING_CONFIGS=xu,u.ActionButton=vi,u.AddressLink=qi,u.Alert=pr,u.AlertBanner=Go,u.AlertDescription=Ho,u.AlertTitle=qo,u.AnimatedSection=ir,u.ApiSection=vn,u.AreaChart=Tc,u.AspectRatio=ao,u.AudioPlayer=Rc,u.Avatar=pc,u.Backdrop=Ji,u.Badge=Ro,u.BarChart=Cc,u.BatchRender=o0,u.Blockquote=Oo,u.BodyText=To,u.BorderAccent=ho,u.Box=yt,u.Breadcrumb=Oa,u.BreadcrumbNav=_l,u.BreadcrumbSection=jd,u.BundleSection=pn,u.BurndownChart=jc,u.Button=se,u.CACHE_CONFIGS=Ga,u.CTASection=f0,u.Calendar=Sa,u.CalloutBox=mc,u.CancellableRequest=Lu,u.Card=$r,u.CardContent=hc,u.CardFooter=fc,u.CardHeader=gc,u.Center=Qn,u.ChainBadge=$s,u.Checkbox=ei,u.Code=Mo,u.CodeBlock=_d,u.CodeDisplay=Lo,u.CollapsibleDocumentationTopic=Bd,u.ColorPicker=Ni,u.ColorPickerAdvanced=Ci,u.ColorSwatch=Si,u.Combobox=ni,u.Command=Ri,u.ComponentPreloader=nt,u.ConditionalRender=t0,u.ConfirmationDialog=kd,u.Container=Yn,u.ContentContainer=N0,u.CreditCardInput=Li,u.CriticalPathOptimizer=wg,u.CurrencyInput=Pi,u.CustomSection=Nn,u.DashboardStatCard=yc,u.DataTable=Zl,u.DateInput=Xs,u.DateRangePicker=ki,u.DateTimePicker=wi,u.Dialog=Aa,u.Divider=uo,u.DragDrop=Nd,u.Drawer=cd,u.Dropdown=oi,u.EmptyState=Pa,u.ErrorBoundary=Hd,u.ExpensiveComponent=e0,u.ExternalLink=jl,u.FadeInScale=Xi,u.FadeInUp=Zi,u.FeatureBlock=ol,u.FeatureCard=i0,u.FeatureGrid=g0,u.FileInput=ci,u.Flex=Wn,u.FlexContainer=Gn,u.FloatingElement=Qi,u.FloatingPanel=fo,u.FocusTrap=dd,u.Footer=S0,u.FooterBottom=M0,u.FooterBrand=T0,u.FooterCompact=L0,u.FooterCompactLeft=P0,u.FooterCompactRight=O0,u.FooterCopyright=D0,u.FooterGrid=E0,u.FooterLink=I0,u.FooterLinkSection=A0,u.FooterVersion=U0,u.FormAlerts=yi,u.FormField=hi,u.FormFieldGroup=sr,u.FormSection=al,u.FormattedNumber=_o,u.Gauge=Bc,u.GlobalLazyErrorBoundary=Zd,u.GradientIconContainer=il,u.Grid=Kn,u.HStack=Xn,u.Heading=ko,u.HelperText=Uo,u.HoverCard=xd,u.IconContainer=hl,u.IconText=fl,u.Image=$c,u.ImageCropper=Gc,u.ImageGallery=qc,u.InfiniteScroll=gd,u.InfoBox=bl,u.InfoCard=bc,u.Input=rr,u.KYCLevelCard=w0,u.KYCStatusBadge=y0,u.Kbd=Po,u.KeyValuePair=kc,u.Label=Fr,u.LanguageSelector=$d,u.LayoutContext=Yr,u.LayoutProvider=Dd,u.LazyComponent=a0,u.LazyErrorBoundary=cr,u.LazyImage=Gu,u.LazyLoadQueue=On,u.LazyWalletButton=vg,u.LazyWrapper=Gh,u.Lightbox=Yc,u.LineChart=Sc,u.Link=Dl,u.List=tc,u.ListItem=ac,u.ListItemWithAction=nc,u.LiveStream=Jc,u.LoadPriority=ct,u.LoadingDots=Wo,u.LoadingOptimizer=Cu,u.LoadingOverlay=Bo,u.LoadingState=Fo,u.Logo=yl,u.Main=cu,u.Masonry=vo,u.MasterDetailLayout=_0,u.MasterListItem=j0,u.MediaUploader=nd,u.MemorySection=xn,u.MentionInput=ui,u.MetricRow=H,u.Modal=qr,u.ModalContent=Hr,u.ModalFooter=Gr,u.ModalHeader=ld,u.MultiSelect=ai,u.NavigationList=Wl,u.NavigationMenu=Bl,u.NetworkErrorBoundary=Yd,u.NoContent=Nc,u.NotificationBadge=Qo,u.NotificationPanel=Jo,u.NumberInput=Ks,u.OptimizedAPIClient=Iu,u.OptimizedImage=s0,u.OptimizedRoutePreloader=Su,u.Overlay=er,u.PageContainer=to,u.PageHeader=x0,u.PageSectionHeader=vl,u.PageTitle=No,u.Pagination=Vl,u.PaginationNav=$l,u.PanelHeader=gn,u.PerformanceBoundary=n0,u.PerformanceOptimizer=Nu,u.PerformancePanel=Rg,u.PhoneDirectory=pi,u.PhoneInput=Rs,u.PieChart=Ec,u.PlatformSpecificComponents=ag,u.PlaylistManager=sd,u.PodcastPlayer=ad,u.Popover=hd,u.Portal=me,u.PriorityLoader=Un,u.Progress=Wc,u.ProgressCircle=Fc,u.PromotionalBanner=Wd,u.PullToRefresh=Od,u.QRCodeDisplay=id,u.QuickActions=kl,u.QuizBuilder=Fi,u.RadioGroup=ri,u.RelativeTime=zo,u.Resizable=mo,u.RouteBasedLazyLoader=at,u.SafeAppWrapper=Xd,u.ScoreIndicator=Gg,u.ScoreLegend=hn,u.ScrollArea=po,u.ScrollSpy=fd,u.SearchInput=Zs,u.Section=eo,u.SectionBadge=Cl,u.SectionHeader=Sl,u.SectionTitle=So,u.SecurityProvider=Qd,u.Select=_r,u.SelectContent=ar,u.SelectField=mi,u.SelectGroup=ti,u.SelectItem=nr,u.SelectLabel=ka,u.SelectScrollDownButton=Br,u.SelectScrollUpButton=zr,u.SelectSeparator=xa,u.SelectTrigger=tr,u.SelectValue=wa,u.Separator=go,u.SettingsList=Tl,u.Sheet=bd,u.SideNav=Fl,u.SignaturePad=Ei,u.SignatureRequest=Ti,u.SkeletonLoader=Vo,u.Slider=ii,u.SliderInput=li,u.SmartContent=Ul,u.SmartLink=Vr,u.SmartWalletProviders=yg,u.Spacer=Jn,u.Sparkline=Oc,u.Spinner=Be,u.SplitPane=bo,u.Stack=yr,u.StandardPageLayout=k0,u.StatCard=rl,u.StatDisplay=xc,u.StatusBadge=Vs,u.StatusIndicator=Hs,u.StepList=qd,u.Stepper=ql,u.StepperNav=Hl,u.SubscriptionGatedComponents=tg,u.SumsubWebSDK=p0,u.Switch=va,u.Table=Kl,u.TableOfContents=Yl,u.Tabs=zl,u.TabsContent=La,u.TabsList=Ia,u.TabsTrigger=Ma,u.TagInput=di,u.Text=wo,u.TextArea=Ys,u.TextAreaField=bi,u.TextField=fi,u.TextInputModal=md,u.TextLink=Io,u.TimePicker=pa,u.Toast=vt,u.ToastNotification=Xo,u.ToastProvider=Zo,u.ToggleGroup=si,u.Tooltip=yd,u.Topbar=W0,u.TopbarActions=tu,u.TopbarCenter=V0,u.TopbarContext=Zr,u.TopbarDivider=H0,u.TopbarIconButton=ou,u.TopbarLeft=F0,u.TopbarLogo=Y0,u.TopbarMenuToggle=Fa,u.TopbarMobileContent=q0,u.TopbarMobileNav=J0,u.TopbarNav=Va,u.TopbarNavigation=R0,u.TopbarProvider=Ba,u.TopbarRight=$0,u.TopbarSearch=iu,u.TrackedButton=Fd,u.TrackedLink=Vd,u.TransferList=sc,u.TreeView=lc,u.TruncatedText=jo,u.UanimatedUcounter=Hi,u.UaudioUwaveform=ed,u.UavatarUgroup=vc,u.UbadgeUdesigner=es,u.UbubbleUchart=Ic,u.UcellUeditor=ec,u.UcodeUhighlighter=Mi,u.UcolumnUresize=Rl,u.UcurrencyUconverter=Oi,u.UcurrencyUrates=Ui,u.UdataUgrid=Xl,u.UdoubleUtap=Md,u.UdragUdropUlist=Cd,u.UfieldUmapper=Bi,u.UfocusUindicator=sl,u.UformUbuilder=Di,u.UformUtemplate=_i,u.UformUvalidator=ji,u.UfunnelUchart=Dc,u.UgestureUdetector=Td,u.Uheatmap=Uc,u.UhoverUtooltip=ud,u.UimageUcomparison=Hc,u.UkeyboardUshortcut=ml,u.UlistingUform=cc,u.UlongUpress=Ld,u.UmarkdownUrenderer=Ii,u.UmediaUplaylist=od,u.UmetricUcomparison=zc,u.UmorphUtransition=pl,u.UnestedUdrag=Ed,u.UparallaxUscroll=wl,u.UperformanceUchart=_c,u.UpinchUzoom=Id,u.UpivotUtable=Ql,u.UprofileUheader=wc,u.UprogressUtracker=Vc,u.UradarUchart=Ac,u.UradialUmenu=Pd,u.UresizableUpanels=yo,u.UrevealUonUscroll=xl,u.UsankeyUdiagram=Pc,u.UscatterUplot=Mc,u.UschemaUvalidator=zi,u.UscreenUreaderUtext=Do,u.UskipUnavigation=Al,u.UsortUdropdown=Il,u.UsortableUgrid=Sd,u.UspreadsheetUgrid=Jl,u.UstatusUpipeline=Gs,u.UsurveyUbuilder=Wi,u.UswipeUactions=Ad,u.UtableUreservation=rc,u.UtimeUslotUpicker=xi,u.UtreeUmap=Lc,u.UuserUtable=oc,u.UversionUbadge=Ml,u.UvideoUcall=Qc,u.UvideoUthumbnail=Zc,u.UvoiceUrecorder=td,u.VStack=Zn,u.VideoEditor=Xc,u.VideoPlayer=Kc,u.VirtualList=ic,u.VirtualListItem=r0,u.VisuallyHidden=Ll,u.WEB3_CONCEPTS=yu,u.WEB3_EMAIL_HEADINGS=mu,u.WEB3_HEADING_PATTERNS=ie,u.WalletPreloader=Xe,u.WaveForm=rd,u.WebVitalsSection=bn,u.WysiwygEditor=Ai,u.addResourceHint=Zh,u.aiOptimizationPresets=bg,u.appStorage=Jh,u.autoConnectWalletBrowser=tf,u.batchDOMUpdates=mh,u.bundleAnalysis=je,u.buttonVariants=Ca,u.cacheHeaders=Bu,u.cacheUtils=Pu,u.checkPerformanceBudget=Bg,u.clearComponentCache=Yu,u.clearConditionalCache=og,u.clearRenderCounts=Eg,u.cn=f,u.conditionalCSS=ju,u.convertFileSize=oh,u.createAIMetaTags=Ha,u.createAIOptimizedSchema=et,u.createAdvancedLazyComponent=$u,u.createCSSVariables=dh,u.createConditionalImports=jh,u.createConditionalLazyComponent=rg,u.createEnhancedFAQSchema=uu,u.createEnhancedOpenGraph=$a,u.createEnhancedTwitterCard=qa,u.createFeature=Kr,u.createLazyComponent=rn,u.createLazyComponentFactory=Tg,u.createLazyRoute=Yh,u.createLazyWalletProvider=it,u.createLibraryImports=Ru,u.createMemoComponent=Jd,u.createOptimizedStyles=ih,u.createProgressiveComponent=Hh,u.createSecurityFeatures=h0,u.createSelectiveExports=_h,u.createSelectiveMemoComponent=Rd,u.createSemanticHeading=fu,u.createSimpleStorage=rf,u.createTechnicalArticleSchema=Rr,u.createTreeShakingConfig=zh,u.createUIComponents=Ju,u.createWeb3ProductSchema=Jr,u.cspDirectives=_u,u.cssOptimization=Ln,u.deadCodeElimination=De,u.default=af,u.defaultPerformanceBudget=un,u.detectAvailableWallets=st,u.detectWalletBrowser=Dn,u.exportPerformanceData=Wg,u.formatBytes=yn,u.formatFileSize=nh,u.formatMetricValue=Kg,u.generateAIMetaTags=dg,u.generateAIMetadata=pu,u.generateAIStructuredData=gg,u.generateAdvancedSEO=gu,u.generateCSP=Ra,u.generateCSPDirectives=rt,u.generateConceptGraph=vu,u.generateContentRelationships=ug,u.generateEntityRecognition=sn,u.generateImageSEO=Ch,u.generatePerformanceTrackingSchema=fg,u.generatePictureElement=Mh,u.generatePlaceholder=Uh,u.generateQAPairs=ku,u.generateSemanticMarkup=on,u.generateSizes=Eh,u.generateSocialImageMeta=Th,u.generateSrcSet=Sh,u.generateTopicClustering=ln,u.generateTrainingExamples=wu,u.getConditionalStats=sg,u.getEnvironmentType=Qa,u.getLazyLoadingStats=Ku,u.getOptimalImageFormat=Ih,u.getPerformanceMonitor=fr,u.getPreloadingStats=cg,u.getRenderCounts=Sg,u.getSecurityHeaders=en,u.getUINavigationService=le,u.getWebVitalRating=Ie,u.getWebVitals=Lg,u.initializeAdvancedPreloading=lg,u.initializePerformanceMonitoring=jg,u.initializePreloading=eg,u.inlineCriticalStyles=ph,u.isLocalhost=Za,u.isNetworkAccess=Xa,u.isWalletBrowser=Ka,u.isWebEnvironment=Ja,u.lazyLoadQueue=Xh,u.lazyWithPreload=qh,u.lazyWithRetry=$h,u.loadCSS=Uu,u.loadCriticalCSS=lh,u.loadNonCriticalCSS=ch,u.measureAsyncOperation=zg,u.measureImagePerformance=Oh,u.navigationHelper=Me,u.optimizeClassNames=yh,u.optimizeContainment=fh,u.optimizeFlex=kh,u.optimizeGrid=wh,u.optimizeWillChange=bh,u.optimizedFetch=Ya,u.pageSEOConfigs=hu,u.parseFileSize=sh,u.performanceBudget=ge,u.performanceUtils=ur,u.prefersReducedMotion=Tn,u.prefetchResource=Pg,u.preloadComponent=Qu,u.preloadImage=Lh,u.preloadResource=Og,u.preloadRoute=Ig,u.preserveAspectRatio=Dh,u.priorityLoader=Qh,u.reportWebVitals=Mg,u.routeConfig=tn,u.securityHeaders=zu,u.setupCSPReporting=Wu,u.setupLazyLoading=Ah,u.setupProgressiveLoading=Ph,u.shouldEnableWallet=Ou,u.smartLinkVariants=lr,u.supportsAVIF=In,u.supportsCSSImports=Du,u.supportsWebP=An,u.themeStorage=Rh,u.useApiMetrics=Cn,u.useBundleMetrics=mn,u.useClickOutside=or,u.useCodeLoader=_a,u.useComponentPerformance=dn,u.useCopyToClipboard=th,u.useDebugMemo=Ng,u.useDraggable=Sn,u.useDynamicImport=Kh,u.useErrorRecovery=Kd,u.useFormSubmission=eh,u.useImageLazyLoading=Ag,u.useLayout=he,u.useLazyLoad=Pn,u.useLazyStyles=vh,u.useLocation=Fh,u.useMediaQuery=xh,u.useMemoryLeakDetection=Ug,u.useMultipleCopyToClipboard=ah,u.useNavigation=Wh,u.useOptimizedTheme=Nh,u.useOptimizedWallets=pg,u.usePerformanceMark=kg,u.useReducedMotion=hh,u.useRenderCount=Cg,u.useResponsiveStyles=gh,u.useSearchParams=Vh,u.useSmartLinks=Pl,u.useStableCallback=xg,u.useToast=Yo,u.useToggle=rh,u.useTopbar=Xr,u.useWebVitals=fn,u.utils=Mn,u.validateHeadingStructure=bu,u.walletStorage=ef,u.web3SecurityNotes=Fu,u.withLazyErrorBoundary=Gd,u.withPerformanceTracking=_g,u.withRetry=Mu,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|