@sudobility/components 2.0.10 → 2.0.12
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/hooks/useCodeLoader.d.ts.map +1 -1
- package/dist/hooks/useCopyToClipboard.d.ts +0 -1
- package/dist/hooks/useCopyToClipboard.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +6703 -4226
- package/dist/index.umd.js +19 -19
- package/dist/ui/address-link.d.ts +27 -0
- package/dist/ui/address-link.d.ts.map +1 -0
- package/dist/ui/index.d.ts +8 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/settings-list.d.ts +48 -0
- package/dist/ui/settings-list.d.ts.map +1 -0
- package/dist/ui/system-status-indicator.d.ts +20 -0
- package/dist/ui/system-status-indicator.d.ts.map +1 -0
- package/dist/utils/lazy-loading.d.ts.map +1 -1
- package/dist/utils/storage.d.ts +0 -4
- package/dist/utils/storage.d.ts.map +1 -1
- package/dist/utils/treeShaking.d.ts.map +1 -1
- package/dist/utils/walletBrowserDetection.d.ts.map +1 -1
- package/package.json +5 -3
package/dist/index.umd.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(d,Ie){typeof exports=="object"&&typeof module<"u"?Ie(exports,require("clsx"),require("tailwind-merge"),require("react"),require("react/jsx-runtime"),require("web-vitals"),require("@heroicons/react/24/outline"),require("@radix-ui/react-slot"),require("class-variance-authority"),require("@radix-ui/react-label"),require("@radix-ui/react-select"),require("lucide-react"),require("@radix-ui/react-switch"),require("@radix-ui/react-tabs"),require("react-dom"),require("react-router-dom"),require("react-share"),require("react-i18next"),require("@heroicons/react/24/solid"),require("react-helmet-async")):typeof define=="function"&&define.amd?define(["exports","clsx","tailwind-merge","react","react/jsx-runtime","web-vitals","@heroicons/react/24/outline","@radix-ui/react-slot","class-variance-authority","@radix-ui/react-label","@radix-ui/react-select","lucide-react","@radix-ui/react-switch","@radix-ui/react-tabs","react-dom","react-router-dom","react-share","react-i18next","@heroicons/react/24/solid","react-helmet-async"],Ie):(d=typeof globalThis<"u"?globalThis:d||self,Ie(d.MailBoxComponents={},d.clsx,d.tailwindMerge,d.React,d.ReactJSXRuntime,d.WebVitals,d.HeroiconsOutline,d.RadixSlot,d.cva,d.RadixLabel,d.RadixSelect,d.LucideReact,d.RadixSwitch,d.RadixTabs,d.ReactDOM,d.ReactRouterDOM,d.ReactShare,d.ReactI18next,d.HeroiconsSolid,d.ReactHelmetAsync))})(this,(function(d,Ie,gn,b,o,Le,A,vt,F,mr,mn,Ge,wt,he,kt,Ke,Q,fr,Ye,fn){"use strict";function Ct(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const v=Ct(b),H=Ct(mn),hr=Ct(kt);function w(...e){return gn.twMerge(Ie.clsx(e))}const hn=e=>e,pn=e=>{if(typeof document>"u")return;const t=document.createElement("style");t.textContent=e,t.setAttribute("data-critical","true"),document.head.appendChild(t)},yn=e=>{if(typeof document>"u")return;const t=document.createElement("link");t.rel="preload",t.as="style",t.href=e,t.onload=()=>{t.rel="stylesheet"},document.head.appendChild(t);const r=document.createElement("noscript");r.innerHTML=`<link rel="stylesheet" href="${e}">`,document.head.appendChild(r)},bn=e=>{const t={};return Object.entries(e).forEach(([r,a])=>{t[`--${r}`]=typeof a=="number"?`${a}px`:a}),t},xn={xs:475,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},vn=(e,t=xn)=>{const[r,a]=b.useState("base");return b.useEffect(()=>{const n=()=>{const s=window.innerWidth;s>=t["2xl"]?a("2xl"):s>=t.xl?a("xl"):s>=t.lg?a("lg"):s>=t.md?a("md"):s>=t.sm?a("sm"):s>=t.xs?a("xs"):a("base")};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[t]),e[r]||e.base||{}},pr=()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,wn=()=>{const[e,t]=b.useState(pr);return b.useEffect(()=>{const r=window.matchMedia("(prefers-reduced-motion: reduce)"),a=()=>{t(r.matches)};return r.addEventListener?r.addEventListener("change",a):r.addListener(a),()=>{r.removeEventListener?r.removeEventListener("change",a):r.removeListener(a)}},[]),e},kn=(e,t=["layout","paint"])=>{e&&(e.style.contain=t.join(" "))},Cn=(e,t)=>e?(e.style.willChange=t.join(", "),()=>{e.style.willChange="auto"}):void 0,Sn=e=>{typeof window>"u"||requestAnimationFrame(()=>{e.forEach(t=>t())})},Nn=(...e)=>e.filter(Boolean).join(" "),En=e=>{const t={},r=["display","position","width","height","margin","padding","fontSize","fontFamily","color","backgroundColor"];return Object.entries(e).forEach(([a,n])=>{r.includes(a)&&(t[a]=n)}),t},An=(e,t=[])=>{const[r,a]=b.useState(null),[n,s]=b.useState(!0);return b.useEffect(()=>{let i=!0;return e().then(l=>{i&&(a(l.default),s(!1))}),()=>{i=!1}},[e,...t]),{styles:r,loading:n}},Pn=(e,t="1rem")=>({display:"grid",gridTemplateColumns:`repeat(${e}, minmax(0, 1fr))`,gap:t,contain:"layout",willChange:"transform"}),Tn=(e="row",t="center",r="flex-start")=>({display:"flex",flexDirection:e,alignItems:t,justifyContent:r,contain:"layout"}),In=e=>{const[t,r]=b.useState(!1);return b.useEffect(()=>{const a=window.matchMedia(e);r(a.matches);const n=()=>r(a.matches);return a.addEventListener?a.addEventListener("change",n):a.addListener(n),()=>{a.removeEventListener?a.removeEventListener("change",n):a.removeListener(n)}},[e]),t},Ln=(e,t)=>{const[r,a]=b.useState("light");return b.useEffect(()=>{const n=window.matchMedia("(prefers-color-scheme: dark)");a(n.matches?"dark":"light");const s=()=>{a(n.matches?"dark":"light")};return n.addEventListener?n.addEventListener("change",s):n.addListener(s),()=>{n.removeEventListener?n.removeEventListener("change",s):n.removeListener(s)}},[]),r==="dark"?t:e},$n=e=>{const t={src:e.src,alt:e.alt,loading:e.loading||"lazy"};return e.title&&(t.title=e.title),e.width&&(t.width=e.width),e.height&&(t.height=e.height),e.sizes&&(t.sizes=e.sizes),e.srcSet&&(t.srcSet=e.srcSet),t.itemProp="image",t},On=(e,t=[320,640,768,1024,1280,1920])=>t.map(r=>`${e.replace(/\{width\}/g,r.toString())} ${r}w`).join(", "),Mn=e=>e.map(t=>t.maxWidth?`(max-width: ${t.maxWidth}px) ${t.size}`:t.size).join(", "),Dn=(e,t="openGraph")=>{const r={};return t==="openGraph"?(r["og:image"]=e.url,e.width&&(r["og:image:width"]=e.width.toString()),e.height&&(r["og:image:height"]=e.height.toString()),e.alt&&(r["og:image:alt"]=e.alt),e.type&&(r["og:image:type"]=e.type)):(r["twitter:image"]=e.url,e.alt&&(r["twitter:image:alt"]=e.alt)),r},zn=(e='img[loading="lazy"]')=>{if(typeof window>"u"||!("IntersectionObserver"in window))return;const t=document.querySelectorAll(e);if("loading"in HTMLImageElement.prototype){t.forEach(a=>{a.dataset.src&&(a.src=a.dataset.src)});return}const r=new IntersectionObserver(a=>{a.forEach(n=>{if(n.isIntersecting){const s=n.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")),r.unobserve(s)}})},{rootMargin:"50px 0px",threshold:.01});return t.forEach(a=>r.observe(a)),()=>{t.forEach(a=>r.unobserve(a))}},yr=()=>typeof window>"u"?Promise.resolve(!1):new Promise(e=>{const t=new Image;t.onload=t.onerror=function(){e(t.height===2)},t.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"}),br=()=>typeof window>"u"?Promise.resolve(!1):new Promise(e=>{const t=new Image;t.onload=()=>e(!0),t.onerror=()=>e(!1),t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="}),Wn=async(e="jpg")=>{const[t,r]=await Promise.all([yr(),br()]);return r?"avif":t?"webp":e},Bn=(e,t,r,a)=>`
|
|
2
2
|
<picture>
|
|
3
|
-
${
|
|
3
|
+
${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(`
|
|
4
4
|
`)}
|
|
5
|
-
<img src="${
|
|
6
|
-
</picture>`.trim(),
|
|
7
|
-
<svg width="${
|
|
5
|
+
<img src="${t}" alt="${r}"${a?` class="${a}"`:""} loading="lazy">
|
|
6
|
+
</picture>`.trim(),jn=(e,t="image")=>{if(typeof document>"u")return;const r=document.createElement("link");r.rel="preload",r.as=t,r.href=e,e.includes(".webp")?r.type="image/webp":e.includes(".avif")&&(r.type="image/avif"),document.head.appendChild(r)},Fn=(e,t,r)=>{if(typeof window>"u")return;const a=new Image;a.src=e,a.classList.add("progressive-image-placeholder"),r.appendChild(a);const n=new Image;n.src=t,n.classList.add("progressive-image-main"),n.style.opacity="0",n.onload=()=>{r.appendChild(n),requestAnimationFrame(()=>{n.style.transition="opacity 0.3s",n.style.opacity="1",setTimeout(()=>{a.remove()},300)})}},_n=e=>new Promise(t=>{const r=performance.now();e.complete?t({loadTime:0,size:0,format:e.src.split(".").pop()||"unknown",dimensions:{width:e.naturalWidth,height:e.naturalHeight},isLazyLoaded:e.loading==="lazy",isOptimized:e.srcset!==""||e.sizes!==""}):e.addEventListener("load",()=>{const a=performance.now()-r;t({loadTime:a,size:0,format:e.src.split(".").pop()||"unknown",dimensions:{width:e.naturalWidth,height:e.naturalHeight},isLazyLoaded:e.loading==="lazy",isOptimized:e.srcset!==""||e.sizes!==""})})}),Hn=(e,t,r="#e0e0e0")=>{const a=`
|
|
7
|
+
<svg width="${e}" height="${t}" xmlns="http://www.w3.org/2000/svg">
|
|
8
8
|
<rect width="100%" height="100%" fill="${r}"/>
|
|
9
9
|
</svg>
|
|
10
|
-
`;return`data:image/svg+xml;base64,${btoa(n)}`},Ar=(t,e)=>{const r=1/e*100;t.style.position="relative",t.style.paddingTop=`${r}%`;const n=t.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")},Q={createPureFunction:t=>t,isDevelopment:process.env.NODE_ENV==="development",isProduction:process.env.NODE_ENV==="production",isTest:process.env.NODE_ENV==="test",createFeatureFlags:(t={})=>({enableAnalytics:process.env.VITE_ENABLE_ANALYTICS==="true",enableDebugTools:process.env.NODE_ENV==="development",enablePerformanceMonitoring:process.env.VITE_ENABLE_PERF_MONITORING!=="false",...t})},Tr=t=>{const e={};return Object.entries(t).forEach(([r,n])=>{e[r]=()=>{try{return n()}catch(o){return console.warn(`Failed to load ${r}:`,o),Promise.resolve({default:null})}}}),e},at={createDebounce:t=>e=>{let r;return((...n)=>{clearTimeout(r),r=setTimeout(()=>e(...n),t)})},memoize:t=>{const e=new Map;return((...r)=>{const n=JSON.stringify(r);if(e.has(n))return e.get(n);const o=t(...r);return e.set(n,o),o})},isDeepEqual:(t,e)=>{if(t===e)return!0;if(t==null||e==null||typeof t!="object"||typeof e!="object")return!1;const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const o of r)if(!n.includes(o)||!at.isDeepEqual(t[o],e[o]))return!1;return!0},createThrottle:t=>e=>{let r=0;return((...n)=>{const o=Date.now();if(o-r>=t)return r=o,e(...n)})}},Lr=t=>{const e={};return Object.entries(t).forEach(([r,n])=>{e[r]={},Object.entries(n).forEach(([o,s])=>{e[r][o]=()=>import(s).then(c=>({[o]:c[o]}))})}),e},Y={getModuleSize:t=>new Promise(e=>{if(typeof window<"u"&&"performance"in window){const n=performance.getEntriesByType("resource").find(o=>o.name.includes(t));e(n?.transferSize||0)}else e(0)}),usageTracker:new Set,trackUsage:t=>{Q.isDevelopment&&Y.usageTracker.add(t)},getUsageReport:()=>Q.isDevelopment?Array.from(Y.usageTracker).sort():[],estimateImpact:t=>{const e=t.map(r=>Y.getModuleSize(r).then(n=>[r,n]));return Promise.all(e).then(r=>{const n={};let o=0;return r.forEach(([s,c])=>{n[s]=c,o+=c}),{total:o,modules:n}})}},nt={inlineCriticalCSS:t=>{if(typeof document<"u"){const e=document.createElement("style");e.textContent=t,document.head.appendChild(e)}},loadAsyncCSS:t=>{if(typeof document<"u"){const e=document.createElement("link");e.rel="stylesheet",e.href=t,e.media="print",e.onload=()=>{e.media="all"},document.head.appendChild(e)}},removeUnusedCSS:t=>{if(typeof document>"u")return;const e=new Set;return t.forEach(r=>{try{document.querySelector(r)&&e.add(r)}catch{}}),{used:Array.from(e),unused:t.filter(r=>!e.has(r))}}},Mr=(t={})=>{const{features:e={},criticalCSS:r="",enableUsageTracking:n=Q.isDevelopment}=t;return{features:Q.createFeatureFlags(e),initialize:()=>{r&&typeof document<"u"&&nt.inlineCriticalCSS(r)},cleanup:()=>{Y.usageTracker.clear()},getReport:()=>({usage:Y.getUsageReport(),features:Q.createFeatureFlags(e)})}};let Ee;function zr(t){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 z(t){return Ee||(Ee=zr()),Ee}function Or(){const t=z(),e=t.getCurrentState();return{navigate:(r,n)=>{t.navigate(r,n)},goBack:r=>{t.goBack(r)},replace:(r,n)=>{t.replace(r,n)},currentPath:e.currentPath,searchParams:e.searchParams,params:e.params,canGoBack:t.canGoBack(),isSupported:t.isSupported()}}function Wr(){const e=z().getCurrentState(),r=Object.keys(e.searchParams).length>0?"?"+new URLSearchParams(e.searchParams).toString():"";return{pathname:e.currentPath,search:r,searchParams:e.searchParams,hash:"",state:{},key:e.currentPath}}function jr(){const t=z(),e=t.getCurrentState();return[new URLSearchParams(e.searchParams),o=>{const s=o instanceof URLSearchParams?Object.fromEntries(o.entries()):o,c=new URLSearchParams(s).toString(),l=e.currentPath+(c?`?${c}`:"");t.replace(l)}]}const V={navigate:(t,e)=>{z().navigate(t,e)},goBack:t=>{z().goBack(t)},replace:(t,e)=>{z().replace(t,e)},getCurrentPath:()=>z().getCurrentPath(),getSearchParams:()=>z().getSearchParams(),goToMail:()=>{V.navigate("/mail")},goToPreferences:()=>{V.navigate("/preferences")},goToCompose:(t,e)=>{const r=new URLSearchParams;t&&r.set("type",t),e&&Object.entries(e).forEach(([o,s])=>{r.set(o,s)});const n=r.toString();V.navigate(`/mail/compose${n?`?${n}`:""}`)},goToConnect:()=>{V.navigate("/connect")},goToDelegate:()=>{V.navigate("/admin/delegate")},goToHome:()=>{V.navigate("/")},canGoBack:()=>z().canGoBack()},Br=(t,e)=>e.find(r=>r.href===t)||null,Dr=(t,e,r)=>{const n=t.split("/").filter(Boolean);if(n.length===0)return[{label:"Home",current:!0}];const o=[{label:"Home",href:"/"}],c={...{docs:"Documentation",about:"About",connect:"Connect",settings:"Settings",preferences:"Preferences",profile:"Profile",help:"Help",support:"Support",contact:"Contact",terms:"Terms of Service",privacy:"Privacy Policy"},...r||{}};return n.forEach((l,d)=>{const g=d===n.length-1,m="/"+n.slice(0,d+1).join("/"),p=e&&g?e:c[l]||l;o.push({label:p,href:g?void 0:m,current:g})}),o},Fr={isActivePath:(t,e,r=!0)=>r?t===e:t.startsWith(e),getParentPath:t=>{const e=t.split("/").filter(Boolean);return e.length<=1?"/":"/"+e.slice(0,-1).join("/")},extractParams:(t,e)=>{const r=t.split("/").filter(Boolean),n=e.split("/").filter(Boolean),o={};return r.forEach((s,c)=>{if(s.startsWith(":")&&n[c]){const l=s.substring(1);o[l]=n[c]}}),o},buildUrlWithParams:(t,e)=>{const r=new URL(t,"http://localhost");return Object.entries(e).forEach(([n,o])=>{r.searchParams.set(n,String(o))}),r.pathname+r.search},parseQueryParams:t=>{const e=new URLSearchParams(t.startsWith("?")?t:`?${t}`),r={};return e.forEach((n,o)=>{r[o]=n}),r},normalizePath:t=>{if(!t||t==="/")return"/";let e=t.startsWith("/")?t:`/${t}`;return e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e},isExternalUrl:t=>{try{return new URL(t,window?.location?.origin||"http://localhost").origin!==(window?.location?.origin||"http://localhost")}catch{return!1}}};function _r(t,e=3,r=1e3){return h.lazy(()=>new Promise((n,o)=>{const s=c=>{t().then(n).catch(l=>{c>0?setTimeout(()=>{s(c-1)},r):o(l)})};s(e)}))}function qr(t){let e=null;const r=()=>(e||(e=t()),e.then(()=>{}));return{Component:h.lazy(()=>e||t()),preload:r}}function Hr(t,e={}){const{fallback:r=a.jsx("div",{children:"Loading..."}),errorFallback:n=a.jsx("div",{children:"Failed to load component"}),loadingDelay:o=200,minimumLoadingTime:s=500}=e,c=h.lazy(async()=>{const d=Date.now();try{const g=await t(),m=Date.now()-d;return m<s&&await new Promise(p=>setTimeout(p,s-m)),g}catch(g){return console.error("Failed to load component:",g),{default:(()=>n)}}}),l=()=>{const[d,g]=h.useState(!1);return h.useEffect(()=>{const m=setTimeout(()=>{g(!0)},o);return()=>clearTimeout(m)},[]),d?a.jsx(a.Fragment,{children:r}):null};return h.forwardRef((d,g)=>a.jsx(h.Suspense,{fallback:a.jsx(l,{}),children:a.jsx(c,{...d,ref:g})}))}function ot(t,e={}){const[r,n]=h.useState(!1),[o,s]=h.useState(!1);return h.useEffect(()=>{const c=t.current;if(!c||o)return;const l=new IntersectionObserver(([d])=>{d.isIntersecting&&(n(!0),s(!0),l.disconnect())},{rootMargin:"50px",threshold:.01,...e});return l.observe(c),()=>{l.disconnect()}},[t,e,o]),r}const Vr=({children:t,fallback:e=a.jsx("div",{children:"Loading..."}),threshold:r=.01,rootMargin:n="50px",placeholder:o})=>{const s=h.useRef(null),c=ot(s,{threshold:r,rootMargin:n});return a.jsx("div",{ref:s,children:c?t:o||e})};function Ur(t){const{importFn:e,preloadOnHover:r=!0,preloadOnFocus:n=!0,prefetchDelay:o=50}=t;let s=null,c=null;const l=()=>(c||(c=e()),c),d=()=>{s&&clearTimeout(s),s=setTimeout(()=>{l()},o)};return{Component:h.lazy(()=>c||e()),preload:l,linkProps:{...r&&{onMouseEnter:d,onMouseLeave:()=>{s&&clearTimeout(s)}},...n&&{onFocus:d}}}}function Gr(t,e=[]){const[r,n]=h.useState(null),[o,s]=h.useState(!0),[c,l]=h.useState(null);return h.useEffect(()=>{let d=!0;return s(!0),l(null),t().then(g=>{d&&(n(g),s(!1))}).catch(g=>{d&&(l(g),s(!1))}),()=>{d=!1}},[t,...e]),{module:r,loading:o,error:c}}class st{constructor(e=3,r=100){this.queue=new Set,this.isProcessing=!1,this.batchSize=e,this.delay=r}add(e){this.queue.add(e),this.process()}async process(){if(this.isProcessing||this.queue.size===0)return;this.isProcessing=!0;const e=Array.from(this.queue).slice(0,this.batchSize);e.forEach(r=>this.queue.delete(r)),await Promise.all(e.map(r=>r().catch(console.error))),this.queue.size>0&&await new Promise(r=>setTimeout(r,this.delay)),this.isProcessing=!1,this.queue.size>0&&this.process()}}function Kr(t,e,r){if(typeof document>"u")return;const n=document.createElement("link");n.rel=e,n.href=t,r&&(e==="preload"||e==="prefetch")&&(n.as=r),document.head.appendChild(n)}var Ie=(t=>(t[t.HIGH=0]="HIGH",t[t.MEDIUM=1]="MEDIUM",t[t.LOW=2]="LOW",t[t.IDLE=3]="IDLE",t))(Ie||{});class it{constructor(){this.queues=new Map,this.isProcessing=!1,Object.values(Ie).filter(e=>typeof e=="number").forEach(e=>{this.queues.set(e,[])})}load(e,r=1){const n=this.queues.get(r);n&&n.push(e),this.process()}async process(){if(!this.isProcessing){this.isProcessing=!0;for(const[e,r]of this.queues)for(;r.length>0;){const n=r.shift();if(n)try{await n()}catch(o){console.error(`Failed to load resource with priority ${e}:`,o)}e>=2&&await new Promise(o=>setTimeout(o,50))}this.isProcessing=!1}}}const Qr=new st,Yr=new it;class Pe{constructor(e={}){this.prefix=e.prefix||"mailbox",this.defaultTTL=e.ttl,this.platformStorage=e.platformStorage||this.createFallbackStorage()}createFallbackStorage(){const e=new Map;return{getItem:r=>e.get(r)||null,setItem:(r,n)=>{e.set(r,n)},removeItem:r=>{e.delete(r)},clear:()=>{e.clear()},getAllKeys:()=>Array.from(e.keys())}}getKey(e){return`${this.prefix}-${e}`}isExpired(e){return e.ttl?Date.now()-e.timestamp>e.ttl:!1}set(e,r,n){try{const o={value:r,timestamp:Date.now(),ttl:n||this.defaultTTL};this.platformStorage.setItem(this.getKey(e),JSON.stringify(o))}catch(o){console.error(`Failed to store item ${e}:`,o)}}get(e,r){try{const n=this.platformStorage.getItem(this.getKey(e));if(!n)return r;const o=JSON.parse(n);return this.isExpired(o)?(this.remove(e),r):o.value}catch(n){return console.error(`Failed to retrieve item ${e}:`,n),r}}remove(e){try{this.platformStorage.removeItem(this.getKey(e))}catch(r){console.error(`Failed to remove item ${e}:`,r)}}clear(e){try{if(this.platformStorage.getAllKeys){const r=this.platformStorage.getAllKeys(),n=this.getKey(e||""),o=r.filter(s=>s.startsWith(n));for(const s of o)this.platformStorage.removeItem(s)}else this.platformStorage.clear?.()}catch(r){console.error("Failed to clear storage:",r)}}has(e){try{return this.platformStorage.getItem(this.getKey(e))!==null}catch(r){return console.error(`Failed to check item ${e}:`,r),!1}}getAllKeys(){try{if(this.platformStorage.getAllKeys){const e=this.platformStorage.getAllKeys(),r=`${this.prefix}-`;return e.filter(n=>n.startsWith(r)).map(n=>n.substring(r.length))}return[]}catch(e){return console.error("Failed to get all keys:",e),[]}}}const Zr=new Pe,Jr=new Pe({prefix:"mailbox-theme"}),Xr=new Pe({prefix:"walletUser",ttl:10080*60*1e3}),Rr=t=>{if(!t)throw new Error("PlatformStorage must be provided to createSimpleStorage");return{setItem:(e,r)=>{try{t.setItem(e,r)}catch(n){console.error(`Failed to store ${e}:`,n)}},getItem:e=>{try{return t.getItem(e)}catch(r){return console.error(`Failed to retrieve ${e}:`,r),null}},removeItem:e=>{try{t.removeItem(e)}catch(r){console.error(`Failed to remove ${e}:`,r)}}}};function lt(){const t={isWalletBrowser:!1,walletType:"unknown",hasEthereum:!1,hasSolana:!1,provider:null};if(typeof window>"u")return t;try{const e=navigator.userAgent.toLowerCase();let r="unknown",n=!1;e.includes("metamask")?(r="metamask",n=!0):e.includes("trustwallet")?(r="trustwallet",n=!0):e.includes("coinbase")?(r="coinbase",n=!0):e.includes("rainbow")?(r="rainbow",n=!0):e.includes("phantom")?(r="phantom",n=!0):e.includes("solflare")?(r="solflare",n=!0):e.includes("exodus")&&(r="exodus",n=!0);const o=!!window.ethereum,s=!!window.solana||!!window.phantom?.solana;(o||s)&&!n&&(n=!0,window.ethereum?.isMetaMask?r="metamask":window.ethereum?.isCoinbaseWallet?r="coinbase":window.ethereum?.isRainbow?r="rainbow":window.phantom?r="phantom":window.solflare&&(r="solflare"));const c=o?window.ethereum:s?window.solana||window.phantom?.solana:null;return{isWalletBrowser:n,walletType:r,hasEthereum:o,hasSolana:s,provider:c}}catch(e){return console.warn("Error detecting wallet browser:",e),t}}async function ea(){const t=lt();if(!t.isWalletBrowser)return{success:!1,error:"Not running in a wallet browser"};try{if(t.hasEthereum&&t.provider)try{const e=await t.provider.request({method:"eth_requestAccounts"});if(e&&e.length>0)return{success:!0,address:e[0]}}catch(e){console.warn("Ethereum connection failed:",e)}if(t.hasSolana&&t.provider)try{const e=await t.provider.connect();if(e.publicKey)return{success:!0,address:e.publicKey.toString()}}catch(e){console.warn("Solana connection failed:",e)}return{success:!1,error:"Failed to connect to wallet provider"}}catch(e){return console.error("Auto-connect failed:",e),{success:!1,error:e instanceof Error?e.message:"Unknown connection error"}}}class ta{constructor(e){this.metrics={timestamp:Date.now()},this.observers=[],this.performanceMarks=new Map,this.reportCallback=e,this.initializeWebVitals(),this.initializeCustomObservers(),this.collectDeviceInfo()}initializeWebVitals(){R.onCLS(e=>{this.metrics.CLS=e.value,this.reportMetric("CLS",e.value)}),R.onINP(e=>{this.metrics.INP=e.value,this.reportMetric("INP",e.value)}),R.onFCP(e=>{this.metrics.FCP=e.value,this.reportMetric("FCP",e.value)}),R.onLCP(e=>{this.metrics.LCP=e.value,this.reportMetric("LCP",e.value)}),R.onTTFB(e=>{this.metrics.TTFB=e.value,this.reportMetric("TTFB",e.value)})}initializeCustomObservers(){if("PerformanceObserver"in window){const e=new PerformanceObserver(n=>{n.getEntries().forEach(s=>{if(s.entryType==="navigation"){const c=s;this.metrics.bundleLoadTime=c.loadEventEnd-c.fetchStart}})});try{e.observe({entryTypes:["navigation"]}),this.observers.push(e)}catch{console.warn("Navigation timing observer not supported")}const r=new PerformanceObserver(n=>{n.getEntries().forEach(s=>{(s.name.includes(".js")||s.name.includes(".css"))&&this.trackResourceLoad(s.name,s.duration)})});try{r.observe({entryTypes:["resource"]}),this.observers.push(r)}catch{console.warn("Resource timing observer not supported")}}}collectDeviceInfo(){if(typeof window<"u"){const e=navigator;e.connection&&(this.metrics.connection=e.connection.effectiveType||e.connection.type),e.deviceMemory&&(this.metrics.deviceMemory=e.deviceMemory),e.hardwareConcurrency&&(this.metrics.hardwareConcurrency=e.hardwareConcurrency),this.metrics.viewport={width:window.innerWidth,height:window.innerHeight}}}reportMetric(e,r){this.reportCallback&&this.reportCallback({...this.metrics,timestamp:Date.now()}),process.env.NODE_ENV}trackResourceLoad(e,r){const n=e.includes(".js"),o=e.includes(".css");if(n||o){const s=n?"JavaScript":"CSS";this.reportMetric(`${s} Load`,r)}}measureComponentRender(e,r){this.metrics.componentRenderTime=r,this.reportMetric(`Component Render (${e})`,r)}measureAPICall(e,r){this.metrics.apiResponseTime=r,this.reportMetric(`API Call (${e})`,r)}measureRouteChange(e,r){this.metrics.routeChangeTime=r,this.reportMetric(`Route Change (${e})`,r)}markStart(e){this.performanceMarks.set(e,performance.now())}markEnd(e){const r=this.performanceMarks.get(e);if(r){const n=performance.now()-r;this.reportMetric(`Mark (${e})`,n),this.performanceMarks.delete(e)}}trackRouteChange(e,r,n){typeof r=="string"?this.measureRouteChange(r,n||performance.now()):this.measureRouteChange(e,r)}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 e=100;return this.metrics.LCP&&this.metrics.LCP>2500?e-=25:this.metrics.LCP&&this.metrics.LCP>2e3&&(e-=15),this.metrics.INP&&this.metrics.INP>200?e-=20:this.metrics.INP&&this.metrics.INP>100&&(e-=10),this.metrics.CLS&&this.metrics.CLS>.1?e-=15:this.metrics.CLS&&this.metrics.CLS>.05&&(e-=8),Math.max(e,0)}getMetrics(){return{...this.metrics}}cleanup(){this.observers.forEach(e=>e.disconnect()),this.observers=[]}}let me=null;const ra=t=>(me||(me=new ta(t)),me),he=()=>me,ct=t=>{const e=h.useRef(performance.now());h.useEffect(()=>{const r=performance.now()-e.current,n=he();n&&n.measureComponentRender(t,r)},[t])},aa=(t,e)=>h.forwardRef((r,n)=>(ct(e),h.createElement(t,{...r,ref:n}))),na=async(t,e)=>{const r=performance.now();try{const n=await t(),o=performance.now()-r,s=he();return s&&s.measureAPICall(e,o),n}catch(n){const o=performance.now()-r;throw console.error(`[Performance] ${e} failed after ${o.toFixed(2)}ms`),n}},dt={LCP:2500,INP:200,CLS:.1,FCP:1800,TTFB:800,bundleSize:17e4},oa=(t,e=dt)=>{const r=[];return e.LCP&&t.LCP&&t.LCP>e.LCP&&r.push(`LCP: ${t.LCP.toFixed(0)}ms (budget: ${e.LCP}ms)`),e.INP&&t.INP&&t.INP>e.INP&&r.push(`INP: ${t.INP.toFixed(0)}ms (budget: ${e.INP}ms)`),e.CLS&&t.CLS&&t.CLS>e.CLS&&r.push(`CLS: ${t.CLS.toFixed(3)} (budget: ${e.CLS})`),e.FCP&&t.FCP&&t.FCP>e.FCP&&r.push(`FCP: ${t.FCP.toFixed(0)}ms (budget: ${e.FCP}ms)`),e.TTFB&&t.TTFB&&t.TTFB>e.TTFB&&r.push(`TTFB: ${t.TTFB.toFixed(0)}ms (budget: ${e.TTFB}ms)`),{passed:r.length===0,violations:r}},sa=t=>{const e=t||he()?.getMetrics()||{timestamp:Date.now()},r={timestamp:new Date().toISOString(),metrics:e,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:e.viewport,connection:e.connection,deviceMemory:e.deviceMemory,hardwareConcurrency:e.hardwareConcurrency}};return JSON.stringify(r,null,2)},ia=t=>{if(t===0)return"0 Bytes";const e=1024,r=["Bytes","KB","MB","GB","TB"],n=Math.floor(Math.log(t)/Math.log(e)),o=Math.min(n,r.length-1);return parseFloat((t/Math.pow(e,o)).toFixed(2))+" "+r[o]},la=(t,e,r)=>{const n={bytes:0,kb:1,mb:2,gb:3,tb:4},o=1024,c=t*Math.pow(o,n[e])/Math.pow(o,n[r]);return Math.round(c*100)/100},ca=t=>{const e=t.match(/^(\d+(?:\.\d+)?)\s*(bytes?|kb|mb|gb|tb)$/i);if(!e)return null;const r=parseFloat(e[1]),n=e[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(r*s):null};function gt(t,e){h.useEffect(()=>{const r=n=>{const o=t?.current;!o||o.contains(n?.target||null)||e(n)};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[t,e])}const ut=t=>{const[e,r]=h.useState(""),[n,o]=h.useState(!0),[s,c]=h.useState(null);return h.useEffect(()=>{t&&(async()=>{try{o(!0),c(null);const d=await fetch(`/code/${t}`);if(!d.ok)throw new Error(`Failed to load code file: ${t}`);const g=await d.text();r(g)}catch(d){console.error("Error loading code:",d),c(d instanceof Error?d.message:"Unknown error"),r("// Error loading code file")}finally{o(!1)}})()},[t]),{code:e,loading:n,error:s}},da=(t={})=>{const{successDuration:e=2e3,onSuccess:r,onError:n}=t,[o,s]=h.useState(null),c=h.useCallback(async g=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(g);else{const m=document.createElement("textarea");m.value=g,m.style.position="fixed",m.style.left="-999999px",m.style.top="-999999px",document.body.appendChild(m),m.focus(),m.select();const p=document.execCommand("copy");if(document.body.removeChild(m),!p)throw new Error("Copy command was unsuccessful")}return s(g),r?.(g),setTimeout(()=>{s(null)},e),!0}catch(m){const p=m instanceof Error?m:new Error("Copy failed");return n?.(p),!1}},[e,r,n]),l=h.useCallback(g=>o===g,[o]),d=h.useCallback(()=>{s(null)},[]);return{copiedValue:o,copyToClipboard:c,isCopied:l,resetCopiedState:d}},ga=(t={})=>{const{successDuration:e=2e3,onSuccess:r,onError:n}=t,[o,s]=h.useState({}),c=h.useCallback(async(g,m)=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(g);else{const p=document.createElement("textarea");p.value=g,p.style.position="fixed",p.style.left="-999999px",p.style.top="-999999px",document.body.appendChild(p),p.focus(),p.select();const b=document.execCommand("copy");if(document.body.removeChild(p),!b)throw new Error("Copy command was unsuccessful")}return s(p=>({...p,[m]:!0})),r?.(g),setTimeout(()=>{s(p=>({...p,[m]:!1}))},e),!0}catch(p){const b=p instanceof Error?p:new Error("Copy failed");return n?.(b),!1}},[e,r,n]),l=h.useCallback(g=>o[g]||!1,[o]),d=h.useCallback(g=>{s(g?m=>({...m,[g]:!1}):{})},[]);return{copiedStates:o,copyToClipboard:c,isCopied:l,resetCopiedState:d}},ua={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"}},ma={basic:"Basic KYC",enhanced:"Enhanced KYC",accredited:"Accredited Investor"},ha=({status:t,level:e,className:r=""})=>{const n=ua[t],o=ma[e];return a.jsx("div",{className:`inline-flex items-center gap-2 ${r}`,children:a.jsxs("span",{className:`px-3 py-1 rounded-full text-sm font-medium ${n.color} ${n.textColor}`,children:[o,": ",n.label]})})},pa=({accessToken:t,onComplete:e,onError:r,className:n=""})=>{const o=h.useRef(null),s=h.useRef(null);return h.useEffect(()=>{if(!t){console.warn("No access token provided to SumsubWebSDK");return}const c=document.createElement("script");return c.src="https://static.sumsub.com/idensic/static/sns-websdk-builder.js",c.async=!0,c.onload=()=>{if(o.current&&window.snsWebSdk)try{const l=window.snsWebSdk.init(t,()=>t).withConf({lang:"en"}).withOptions({addViewportTag:!1,adaptIframeHeight:!0}).on("idCheck.onStepCompleted",d=>{}).on("idCheck.onApplicantSubmitted",d=>{e?.()}).on("idCheck.onError",d=>{console.error("SumsubWebSDK: Error",d),r?.(d)}).build();s.current=l,l.launch("#sumsub-websdk-container")}catch(l){console.error("Failed to initialize Sumsub SDK:",l),r?.(l)}else console.error("SumsubWebSDK: Missing requirements - containerRef:",!!o.current,"snsWebSdk:",!!window.snsWebSdk)},c.onerror=()=>{const l=new Error("Failed to load Sumsub Web SDK script");console.error(l),r?.(l)},document.body.appendChild(c),()=>{document.body.contains(c)&&document.body.removeChild(c),s.current&&typeof s.current.destroy=="function"&&s.current.destroy()}},[t,e,r]),a.jsx("div",{className:`sumsub-sdk-container ${n}`,children:a.jsx("div",{ref:o,id:"sumsub-websdk-container"})})},fa={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"}},ba=({level:t,price:e,features:r,isActive:n=!1,isVerified:o=!1,onSelect:s,className:c=""})=>{const l=fa[t];return a.jsxs("div",{className:`
|
|
10
|
+
`;return`data:image/svg+xml;base64,${btoa(a)}`},Vn=(e,t)=>{const r=1/t*100;e.style.position="relative",e.style.paddingTop=`${r}%`;const a=e.querySelector("img");a&&(a.style.position="absolute",a.style.top="0",a.style.left="0",a.style.width="100%",a.style.height="100%",a.style.objectFit="cover")},we={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})},Un=e=>{const t={};return Object.entries(e).forEach(([r,a])=>{t[r]=()=>{try{return a()}catch{return Promise.resolve({default:null})}}}),t},xr={createDebounce:e=>t=>{let r;return((...a)=>{clearTimeout(r),r=setTimeout(()=>t(...a),e)})},memoize:e=>{const t=new Map;return((...r)=>{const a=JSON.stringify(r);if(t.has(a))return t.get(a);const n=e(...r);return t.set(a,n),n})},isDeepEqual:(e,t)=>{if(e===t)return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(const n of r)if(!a.includes(n)||!xr.isDeepEqual(e[n],t[n]))return!1;return!0},createThrottle:e=>t=>{let r=0;return((...a)=>{const n=Date.now();if(n-r>=e)return r=n,t(...a)})}},qn=e=>{const t={};return Object.entries(e).forEach(([r,a])=>{t[r]={},Object.entries(a).forEach(([n,s])=>{t[r][n]=()=>import(s).then(i=>({[n]:i[n]}))})}),t},ke={getModuleSize:e=>new Promise(t=>{if(typeof window<"u"&&"performance"in window){const a=performance.getEntriesByType("resource").find(n=>n.name.includes(e));t(a?.transferSize||0)}else t(0)}),usageTracker:new Set,trackUsage:e=>{we.isDevelopment&&ke.usageTracker.add(e)},getUsageReport:()=>we.isDevelopment?Array.from(ke.usageTracker).sort():[],estimateImpact:e=>{const t=e.map(r=>ke.getModuleSize(r).then(a=>[r,a]));return Promise.all(t).then(r=>{const a={};let n=0;return r.forEach(([s,i])=>{a[s]=i,n+=i}),{total:n,modules:a}})}},vr={inlineCriticalCSS:e=>{if(typeof document<"u"){const t=document.createElement("style");t.textContent=e,document.head.appendChild(t)}},loadAsyncCSS:e=>{if(typeof document<"u"){const t=document.createElement("link");t.rel="stylesheet",t.href=e,t.media="print",t.onload=()=>{t.media="all"},document.head.appendChild(t)}},removeUnusedCSS:e=>{if(typeof document>"u")return;const t=new Set;return e.forEach(r=>{try{document.querySelector(r)&&t.add(r)}catch{}}),{used:Array.from(t),unused:e.filter(r=>!t.has(r))}}},Gn=(e={})=>{const{features:t={},criticalCSS:r="",enableUsageTracking:a=we.isDevelopment}=e;return{features:we.createFeatureFlags(t),initialize:()=>{r&&typeof document<"u"&&vr.inlineCriticalCSS(r)},cleanup:()=>{ke.usageTracker.clear()},getReport:()=>({usage:ke.getUsageReport(),features:we.createFeatureFlags(t)})}};let St;function Kn(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 J(e){return St||(St=Kn()),St}function Yn(){const e=J(),t=e.getCurrentState();return{navigate:(r,a)=>{e.navigate(r,a)},goBack:r=>{e.goBack(r)},replace:(r,a)=>{e.replace(r,a)},currentPath:t.currentPath,searchParams:t.searchParams,params:t.params,canGoBack:e.canGoBack(),isSupported:e.isSupported()}}function Qn(){const t=J().getCurrentState(),r=Object.keys(t.searchParams).length>0?"?"+new URLSearchParams(t.searchParams).toString():"";return{pathname:t.currentPath,search:r,searchParams:t.searchParams,hash:"",state:{},key:t.currentPath}}function Xn(){const e=J(),t=e.getCurrentState();return[new URLSearchParams(t.searchParams),n=>{const s=n instanceof URLSearchParams?Object.fromEntries(n.entries()):n,i=new URLSearchParams(s).toString(),l=t.currentPath+(i?`?${i}`:"");e.replace(l)}]}const pe={navigate:(e,t)=>{J().navigate(e,t)},goBack:e=>{J().goBack(e)},replace:(e,t)=>{J().replace(e,t)},getCurrentPath:()=>J().getCurrentPath(),getSearchParams:()=>J().getSearchParams(),goToMail:()=>{pe.navigate("/mail")},goToPreferences:()=>{pe.navigate("/preferences")},goToCompose:(e,t)=>{const r=new URLSearchParams;e&&r.set("type",e),t&&Object.entries(t).forEach(([n,s])=>{r.set(n,s)});const a=r.toString();pe.navigate(`/mail/compose${a?`?${a}`:""}`)},goToConnect:()=>{pe.navigate("/connect")},goToDelegate:()=>{pe.navigate("/admin/delegate")},goToHome:()=>{pe.navigate("/")},canGoBack:()=>J().canGoBack()},Zn=(e,t)=>t.find(r=>r.href===e)||null,Jn=(e,t,r)=>{const a=e.split("/").filter(Boolean);if(a.length===0)return[{label:"Home",current:!0}];const n=[{label:"Home",href:"/"}],i={...{docs:"Documentation",about:"About",connect:"Connect",settings:"Settings",preferences:"Preferences",profile:"Profile",help:"Help",support:"Support",contact:"Contact",terms:"Terms of Service",privacy:"Privacy Policy"},...r||{}};return a.forEach((l,c)=>{const u=c===a.length-1,g="/"+a.slice(0,c+1).join("/"),m=t&&u?t:i[l]||l;n.push({label:m,href:u?void 0:g,current:u})}),n},Rn={isActivePath:(e,t,r=!0)=>r?e===t:e.startsWith(t),getParentPath:e=>{const t=e.split("/").filter(Boolean);return t.length<=1?"/":"/"+t.slice(0,-1).join("/")},extractParams:(e,t)=>{const r=e.split("/").filter(Boolean),a=t.split("/").filter(Boolean),n={};return r.forEach((s,i)=>{if(s.startsWith(":")&&a[i]){const l=s.substring(1);n[l]=a[i]}}),n},buildUrlWithParams:(e,t)=>{const r=new URL(e,"http://localhost");return Object.entries(t).forEach(([a,n])=>{r.searchParams.set(a,String(n))}),r.pathname+r.search},parseQueryParams:e=>{const t=new URLSearchParams(e.startsWith("?")?e:`?${e}`),r={};return t.forEach((a,n)=>{r[n]=a}),r},normalizePath:e=>{if(!e||e==="/")return"/";let t=e.startsWith("/")?e:`/${e}`;return t.length>1&&t.endsWith("/")&&(t=t.slice(0,-1)),t},isExternalUrl:e=>{try{return new URL(e,window?.location?.origin||"http://localhost").origin!==(window?.location?.origin||"http://localhost")}catch{return!1}}};function eo(e,t=3,r=1e3){return b.lazy(()=>new Promise((a,n)=>{const s=i=>{e().then(a).catch(l=>{i>0?setTimeout(()=>{s(i-1)},r):n(l)})};s(t)}))}function to(e){let t=null;const r=()=>(t||(t=e()),t.then(()=>{}));return{Component:b.lazy(()=>t||e()),preload:r}}function ro(e,t={}){const{fallback:r=o.jsx("div",{children:"Loading..."}),errorFallback:a=o.jsx("div",{children:"Failed to load component"}),loadingDelay:n=200,minimumLoadingTime:s=500}=t,i=b.lazy(async()=>{const c=Date.now();try{const u=await e(),g=Date.now()-c;return g<s&&await new Promise(m=>setTimeout(m,s-g)),u}catch{return{default:(()=>a)}}}),l=()=>{const[c,u]=b.useState(!1);return b.useEffect(()=>{const g=setTimeout(()=>{u(!0)},n);return()=>clearTimeout(g)},[]),c?o.jsx(o.Fragment,{children:r}):null};return b.forwardRef((c,u)=>o.jsx(b.Suspense,{fallback:o.jsx(l,{}),children:o.jsx(i,{...c,ref:u})}))}function wr(e,t={}){const[r,a]=b.useState(!1),[n,s]=b.useState(!1);return b.useEffect(()=>{const i=e.current;if(!i||n)return;const l=new IntersectionObserver(([c])=>{c.isIntersecting&&(a(!0),s(!0),l.disconnect())},{rootMargin:"50px",threshold:.01,...t});return l.observe(i),()=>{l.disconnect()}},[e,t,n]),r}const ao=({children:e,fallback:t=o.jsx("div",{children:"Loading..."}),threshold:r=.01,rootMargin:a="50px",placeholder:n})=>{const s=b.useRef(null),i=wr(s,{threshold:r,rootMargin:a});return o.jsx("div",{ref:s,children:i?e:n||t})};function no(e){const{importFn:t,preloadOnHover:r=!0,preloadOnFocus:a=!0,prefetchDelay:n=50}=e;let s=null,i=null;const l=()=>(i||(i=t()),i),c=()=>{s&&clearTimeout(s),s=setTimeout(()=>{l()},n)};return{Component:b.lazy(()=>i||t()),preload:l,linkProps:{...r&&{onMouseEnter:c,onMouseLeave:()=>{s&&clearTimeout(s)}},...a&&{onFocus:c}}}}function oo(e,t=[]){const[r,a]=b.useState(null),[n,s]=b.useState(!0),[i,l]=b.useState(null);return b.useEffect(()=>{let c=!0;return s(!0),l(null),e().then(u=>{c&&(a(u),s(!1))}).catch(u=>{c&&(l(u),s(!1))}),()=>{c=!1}},[e,...t]),{module:r,loading:n,error:i}}class kr{constructor(t=3,r=100){this.queue=new Set,this.isProcessing=!1,this.batchSize=t,this.delay=r}add(t){this.queue.add(t),this.process()}async process(){if(this.isProcessing||this.queue.size===0)return;this.isProcessing=!0;const t=Array.from(this.queue).slice(0,this.batchSize);t.forEach(r=>this.queue.delete(r)),await Promise.all(t.map(r=>r().catch(()=>{}))),this.queue.size>0&&await new Promise(r=>setTimeout(r,this.delay)),this.isProcessing=!1,this.queue.size>0&&this.process()}}function so(e,t,r){if(typeof document>"u")return;const a=document.createElement("link");a.rel=t,a.href=e,r&&(t==="preload"||t==="prefetch")&&(a.as=r),document.head.appendChild(a)}var Nt=(e=>(e[e.HIGH=0]="HIGH",e[e.MEDIUM=1]="MEDIUM",e[e.LOW=2]="LOW",e[e.IDLE=3]="IDLE",e))(Nt||{});class Cr{constructor(){this.queues=new Map,this.isProcessing=!1,Object.values(Nt).filter(t=>typeof t=="number").forEach(t=>{this.queues.set(t,[])})}load(t,r=1){const a=this.queues.get(r);a&&a.push(t),this.process()}async process(){if(!this.isProcessing){this.isProcessing=!0;for(const[t,r]of this.queues)for(;r.length>0;){const a=r.shift();if(a)try{await a()}catch{}t>=2&&await new Promise(n=>setTimeout(n,50))}this.isProcessing=!1}}}const io=new kr,lo=new Cr;class Et{constructor(t={}){this.prefix=t.prefix||"mailbox",this.defaultTTL=t.ttl,this.platformStorage=t.platformStorage||this.createFallbackStorage()}createFallbackStorage(){const t=new Map;return{getItem:r=>t.get(r)||null,setItem:(r,a)=>{t.set(r,a)},removeItem:r=>{t.delete(r)},clear:()=>{t.clear()},getAllKeys:()=>Array.from(t.keys())}}getKey(t){return`${this.prefix}-${t}`}isExpired(t){return t.ttl?Date.now()-t.timestamp>t.ttl:!1}set(t,r,a){try{const n={value:r,timestamp:Date.now(),ttl:a||this.defaultTTL};this.platformStorage.setItem(this.getKey(t),JSON.stringify(n))}catch{}}get(t,r){try{const a=this.platformStorage.getItem(this.getKey(t));if(!a)return r;const n=JSON.parse(a);return this.isExpired(n)?(this.remove(t),r):n.value}catch{return r}}remove(t){try{this.platformStorage.removeItem(this.getKey(t))}catch{}}clear(t){try{if(this.platformStorage.getAllKeys){const r=this.platformStorage.getAllKeys(),a=this.getKey(t||""),n=r.filter(s=>s.startsWith(a));for(const s of n)this.platformStorage.removeItem(s)}else this.platformStorage.clear?.()}catch(r){console.error("Failed to clear storage:",r)}}has(t){try{return this.platformStorage.getItem(this.getKey(t))!==null}catch(r){return console.error(`Failed to check item ${t}:`,r),!1}}getAllKeys(){try{if(this.platformStorage.getAllKeys){const t=this.platformStorage.getAllKeys(),r=`${this.prefix}-`;return t.filter(a=>a.startsWith(r)).map(a=>a.substring(r.length))}return[]}catch(t){return console.error("Failed to get all keys:",t),[]}}}const co=new Et,uo=new Et({prefix:"mailbox-theme"}),go=new Et({prefix:"walletUser",ttl:10080*60*1e3}),mo=e=>{if(!e)throw new Error("PlatformStorage must be provided to createSimpleStorage");return{setItem:(t,r)=>{try{e.setItem(t,r)}catch{}},getItem:t=>{try{return e.getItem(t)}catch{return null}},removeItem:t=>{try{e.removeItem(t)}catch{}}}};function Sr(){const e={isWalletBrowser:!1,walletType:"unknown",hasEthereum:!1,hasSolana:!1,provider:null};if(typeof window>"u")return e;try{const t=navigator.userAgent.toLowerCase();let r="unknown",a=!1;t.includes("metamask")?(r="metamask",a=!0):t.includes("trustwallet")?(r="trustwallet",a=!0):t.includes("coinbase")?(r="coinbase",a=!0):t.includes("rainbow")?(r="rainbow",a=!0):t.includes("phantom")?(r="phantom",a=!0):t.includes("solflare")?(r="solflare",a=!0):t.includes("exodus")&&(r="exodus",a=!0);const n=!!window.ethereum,s=!!window.solana||!!window.phantom?.solana;(n||s)&&!a&&(a=!0,window.ethereum?.isMetaMask?r="metamask":window.ethereum?.isCoinbaseWallet?r="coinbase":window.ethereum?.isRainbow?r="rainbow":window.phantom?r="phantom":window.solflare&&(r="solflare"));const i=n?window.ethereum:s?window.solana||window.phantom?.solana:null;return{isWalletBrowser:a,walletType:r,hasEthereum:n,hasSolana:s,provider:i}}catch{return e}}async function fo(){const e=Sr();if(!e.isWalletBrowser)return{success:!1,error:"Not running in a wallet browser"};try{if(e.hasEthereum&&e.provider)try{const t=await e.provider.request({method:"eth_requestAccounts"});if(t&&t.length>0)return{success:!0,address:t[0]}}catch{}if(e.hasSolana&&e.provider)try{const t=await e.provider.connect();if(t.publicKey)return{success:!0,address:t.publicKey.toString()}}catch{}return{success:!1,error:"Failed to connect to wallet provider"}}catch(t){return{success:!1,error:t instanceof Error?t.message:"Unknown connection error"}}}class ho{constructor(t){this.metrics={timestamp:Date.now()},this.observers=[],this.performanceMarks=new Map,this.reportCallback=t,this.initializeWebVitals(),this.initializeCustomObservers(),this.collectDeviceInfo()}initializeWebVitals(){Le.onCLS(t=>{this.metrics.CLS=t.value,this.reportMetric("CLS",t.value)}),Le.onINP(t=>{this.metrics.INP=t.value,this.reportMetric("INP",t.value)}),Le.onFCP(t=>{this.metrics.FCP=t.value,this.reportMetric("FCP",t.value)}),Le.onLCP(t=>{this.metrics.LCP=t.value,this.reportMetric("LCP",t.value)}),Le.onTTFB(t=>{this.metrics.TTFB=t.value,this.reportMetric("TTFB",t.value)})}initializeCustomObservers(){if("PerformanceObserver"in window){const t=new PerformanceObserver(a=>{a.getEntries().forEach(s=>{if(s.entryType==="navigation"){const i=s;this.metrics.bundleLoadTime=i.loadEventEnd-i.fetchStart}})});try{t.observe({entryTypes:["navigation"]}),this.observers.push(t)}catch{}const r=new PerformanceObserver(a=>{a.getEntries().forEach(s=>{(s.name.includes(".js")||s.name.includes(".css"))&&this.trackResourceLoad(s.name,s.duration)})});try{r.observe({entryTypes:["resource"]}),this.observers.push(r)}catch{}}}collectDeviceInfo(){if(typeof window<"u"){const t=navigator;t.connection&&(this.metrics.connection=t.connection.effectiveType||t.connection.type),t.deviceMemory&&(this.metrics.deviceMemory=t.deviceMemory),t.hardwareConcurrency&&(this.metrics.hardwareConcurrency=t.hardwareConcurrency),this.metrics.viewport={width:window.innerWidth,height:window.innerHeight}}}reportMetric(t,r){this.reportCallback&&this.reportCallback({...this.metrics,timestamp:Date.now()}),process.env.NODE_ENV}trackResourceLoad(t,r){const a=t.includes(".js"),n=t.includes(".css");if(a||n){const s=a?"JavaScript":"CSS";this.reportMetric(`${s} Load`,r)}}measureComponentRender(t,r){this.metrics.componentRenderTime=r,this.reportMetric(`Component Render (${t})`,r)}measureAPICall(t,r){this.metrics.apiResponseTime=r,this.reportMetric(`API Call (${t})`,r)}measureRouteChange(t,r){this.metrics.routeChangeTime=r,this.reportMetric(`Route Change (${t})`,r)}markStart(t){this.performanceMarks.set(t,performance.now())}markEnd(t){const r=this.performanceMarks.get(t);if(r){const a=performance.now()-r;this.reportMetric(`Mark (${t})`,a),this.performanceMarks.delete(t)}}trackRouteChange(t,r,a){typeof r=="string"?this.measureRouteChange(r,a||performance.now()):this.measureRouteChange(t,r)}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 t=100;return this.metrics.LCP&&this.metrics.LCP>2500?t-=25:this.metrics.LCP&&this.metrics.LCP>2e3&&(t-=15),this.metrics.INP&&this.metrics.INP>200?t-=20:this.metrics.INP&&this.metrics.INP>100&&(t-=10),this.metrics.CLS&&this.metrics.CLS>.1?t-=15:this.metrics.CLS&&this.metrics.CLS>.05&&(t-=8),Math.max(t,0)}getMetrics(){return{...this.metrics}}cleanup(){this.observers.forEach(t=>t.disconnect()),this.observers=[]}}let Qe=null;const po=e=>(Qe||(Qe=new ho(e)),Qe),Xe=()=>Qe,Nr=e=>{const t=b.useRef(performance.now());b.useEffect(()=>{const r=performance.now()-t.current,a=Xe();a&&a.measureComponentRender(e,r)},[e])},yo=(e,t)=>b.forwardRef((r,a)=>(Nr(t),b.createElement(e,{...r,ref:a}))),bo=async(e,t)=>{const r=performance.now(),a=await e(),n=performance.now()-r,s=Xe();return s&&s.measureAPICall(t,n),a},Er={LCP:2500,INP:200,CLS:.1,FCP:1800,TTFB:800,bundleSize:17e4},xo=(e,t=Er)=>{const r=[];return t.LCP&&e.LCP&&e.LCP>t.LCP&&r.push(`LCP: ${e.LCP.toFixed(0)}ms (budget: ${t.LCP}ms)`),t.INP&&e.INP&&e.INP>t.INP&&r.push(`INP: ${e.INP.toFixed(0)}ms (budget: ${t.INP}ms)`),t.CLS&&e.CLS&&e.CLS>t.CLS&&r.push(`CLS: ${e.CLS.toFixed(3)} (budget: ${t.CLS})`),t.FCP&&e.FCP&&e.FCP>t.FCP&&r.push(`FCP: ${e.FCP.toFixed(0)}ms (budget: ${t.FCP}ms)`),t.TTFB&&e.TTFB&&e.TTFB>t.TTFB&&r.push(`TTFB: ${e.TTFB.toFixed(0)}ms (budget: ${t.TTFB}ms)`),{passed:r.length===0,violations:r}},vo=e=>{const t=e||Xe()?.getMetrics()||{timestamp:Date.now()},r={timestamp:new Date().toISOString(),metrics:t,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:t.viewport,connection:t.connection,deviceMemory:t.deviceMemory,hardwareConcurrency:t.hardwareConcurrency}};return JSON.stringify(r,null,2)},wo=e=>{if(e===0)return"0 Bytes";const t=1024,r=["Bytes","KB","MB","GB","TB"],a=Math.floor(Math.log(e)/Math.log(t)),n=Math.min(a,r.length-1);return parseFloat((e/Math.pow(t,n)).toFixed(2))+" "+r[n]},ko=(e,t,r)=>{const a={bytes:0,kb:1,mb:2,gb:3,tb:4},n=1024,i=e*Math.pow(n,a[t])/Math.pow(n,a[r]);return Math.round(i*100)/100},Co=e=>{const t=e.match(/^(\d+(?:\.\d+)?)\s*(bytes?|kb|mb|gb|tb)$/i);if(!t)return null;const r=parseFloat(t[1]),a=t[2].toLowerCase(),s={bytes:1,byte:1,kb:1024,mb:1024*1024,gb:1024*1024*1024,tb:1024*1024*1024*1024}[a];return s?Math.round(r*s):null};function Ar(e,t){b.useEffect(()=>{const r=a=>{const n=e?.current;!n||n.contains(a?.target||null)||t(a)};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e,t])}const Pr=e=>{const[t,r]=b.useState(""),[a,n]=b.useState(!0),[s,i]=b.useState(null);return b.useEffect(()=>{e&&(async()=>{try{n(!0),i(null);const c=await fetch(`/code/${e}`);if(!c.ok)throw new Error(`Failed to load code file: ${e}`);const u=await c.text();r(u)}catch(c){i(c instanceof Error?c.message:"Unknown error"),r("// Error loading code file")}finally{n(!1)}})()},[e]),{code:t,loading:a,error:s}},So=(e={})=>{const{successDuration:t=2e3,onSuccess:r,onError:a}=e,[n,s]=b.useState(null),i=b.useCallback(async u=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(u);else{const g=document.createElement("textarea");g.value=u,g.style.position="fixed",g.style.left="-999999px",g.style.top="-999999px",document.body.appendChild(g),g.focus(),g.select();const m=document.execCommand("copy");if(document.body.removeChild(g),!m)throw new Error("Copy command was unsuccessful")}return s(u),r?.(u),setTimeout(()=>{s(null)},t),!0}catch(g){const m=g instanceof Error?g:new Error("Copy failed");return a?.(m),!1}},[t,r,a]),l=b.useCallback(u=>n===u,[n]),c=b.useCallback(()=>{s(null)},[]);return{copiedValue:n,copyToClipboard:i,isCopied:l,resetCopiedState:c}},No=(e={})=>{const{successDuration:t=2e3,onSuccess:r,onError:a}=e,[n,s]=b.useState({}),i=b.useCallback(async(u,g)=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(u);else{const m=document.createElement("textarea");m.value=u,m.style.position="fixed",m.style.left="-999999px",m.style.top="-999999px",document.body.appendChild(m),m.focus(),m.select();const h=document.execCommand("copy");if(document.body.removeChild(m),!h)throw new Error("Copy command was unsuccessful")}return s(m=>({...m,[g]:!0})),r?.(u),setTimeout(()=>{s(m=>({...m,[g]:!1}))},t),!0}catch(m){const h=m instanceof Error?m:new Error("Copy failed");return a?.(h),!1}},[t,r,a]),l=b.useCallback(u=>n[u]||!1,[n]),c=b.useCallback(u=>{s(u?g=>({...g,[u]:!1}):{})},[]);return{copiedStates:n,copyToClipboard:i,isCopied:l,resetCopiedState:c}},Eo={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"}},Ao={basic:"Basic KYC",enhanced:"Enhanced KYC",accredited:"Accredited Investor"},Po=({status:e,level:t,className:r=""})=>{const a=Eo[e],n=Ao[t];return o.jsx("div",{className:`inline-flex items-center gap-2 ${r}`,children:o.jsxs("span",{className:`px-3 py-1 rounded-full text-sm font-medium ${a.color} ${a.textColor}`,children:[n,": ",a.label]})})},To=({accessToken:e,onComplete:t,onError:r,className:a=""})=>{const n=b.useRef(null),s=b.useRef(null);return b.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(n.current&&window.snsWebSdk)try{const l=window.snsWebSdk.init(e,()=>e).withConf({lang:"en"}).withOptions({addViewportTag:!1,adaptIframeHeight:!0}).on("idCheck.onStepCompleted",c=>{}).on("idCheck.onApplicantSubmitted",c=>{t?.()}).on("idCheck.onError",c=>{console.error("SumsubWebSDK: Error",c),r?.(c)}).build();s.current=l,l.launch("#sumsub-websdk-container")}catch(l){console.error("Failed to initialize Sumsub SDK:",l),r?.(l)}else console.error("SumsubWebSDK: Missing requirements - containerRef:",!!n.current,"snsWebSdk:",!!window.snsWebSdk)},i.onerror=()=>{const l=new Error("Failed to load Sumsub Web SDK script");console.error(l),r?.(l)},document.body.appendChild(i),()=>{document.body.contains(i)&&document.body.removeChild(i),s.current&&typeof s.current.destroy=="function"&&s.current.destroy()}},[e,t,r]),o.jsx("div",{className:`sumsub-sdk-container ${a}`,children:o.jsx("div",{ref:n,id:"sumsub-websdk-container"})})},Io={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"}},Lo=({level:e,price:t,features:r,isActive:a=!1,isVerified:n=!1,onSelect:s,className:i=""})=>{const l=Io[e];return o.jsxs("div",{className:`
|
|
11
11
|
relative border-2 rounded-lg p-6 transition-all
|
|
12
|
-
${
|
|
13
|
-
${
|
|
14
|
-
`,children:[o
|
|
12
|
+
${a?l.activeColor:`${l.color} hover:border-gray-400`}
|
|
13
|
+
${i}
|
|
14
|
+
`,children:[n&&o.jsx("div",{className:"absolute top-4 right-4",children:o.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"})}),o.jsx("h3",{className:"text-xl font-bold mb-2",children:l.title}),o.jsx("p",{className:"text-gray-600 mb-4",children:l.description}),o.jsxs("p",{className:"text-3xl font-bold mb-4",children:[t,o.jsx("span",{className:"text-sm font-normal text-gray-600",children:"/year"})]}),o.jsx("ul",{className:"space-y-2 mb-6",children:r.map((c,u)=>o.jsxs("li",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"text-green-500 mt-0.5",children:"✓"}),o.jsx("span",{className:"text-sm",children:c})]},u))}),s&&o.jsx("button",{onClick:s,disabled:n,className:`
|
|
15
15
|
w-full py-2 px-4 rounded font-medium transition-colors
|
|
16
|
-
${
|
|
17
|
-
`,children:o?"Verified":n?"Current Plan":"Select Plan"})]})},u={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",display:"leading-none"},tracking:{heading:"tracking-tight",body:"tracking-normal"}}},E={heading:{display:{hero:()=>`${u.typography.family.display} ${u.typography.semantic.hero} ${u.typography.weight.display} ${u.typography.leading.display} ${u.typography.tracking.heading} text-gray-900 dark:text-white`,xl:()=>`${u.typography.family.display} text-7xl ${u.typography.weight.display} ${u.typography.leading.display} ${u.typography.tracking.heading} text-gray-900 dark:text-white`,lg:()=>`${u.typography.family.display} text-6xl ${u.typography.weight.bold} ${u.typography.leading.display} ${u.typography.tracking.heading} text-gray-900 dark:text-white`,md:()=>`${u.typography.family.display} text-5xl ${u.typography.weight.bold} ${u.typography.leading.tight} ${u.typography.tracking.heading} text-gray-900 dark:text-white`,sm:()=>`${u.typography.family.display} text-4xl ${u.typography.weight.bold} ${u.typography.leading.tight} ${u.typography.tracking.heading} text-gray-900 dark:text-white`},h1:()=>`${u.typography.family.sans} ${u.typography.semantic.h1} ${u.typography.weight.heading} ${u.typography.leading.heading} ${u.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${u.typography.family.sans} ${u.typography.semantic.h2} ${u.typography.weight.heading} ${u.typography.leading.heading} ${u.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${u.typography.family.sans} ${u.typography.semantic.h3} ${u.typography.weight.heading} ${u.typography.leading.heading} ${u.typography.tracking.heading} text-gray-900 dark:text-white`,h4:()=>`${u.typography.family.sans} ${u.typography.semantic.h4} ${u.typography.weight.semibold} ${u.typography.leading.heading} ${u.typography.tracking.heading} text-gray-900 dark:text-white`,h5:()=>`${u.typography.family.sans} ${u.typography.semantic.h5} ${u.typography.weight.semibold} ${u.typography.leading.heading} ${u.typography.tracking.heading} text-gray-900 dark:text-white`,h6:()=>`${u.typography.family.sans} ${u.typography.semantic.h6} ${u.typography.weight.semibold} ${u.typography.leading.heading} ${u.typography.tracking.heading} text-gray-900 dark:text-white`,responsive:{h1:()=>`${u.typography.family.sans} text-2xl sm:text-3xl md:text-4xl lg:text-5xl ${u.typography.weight.heading} ${u.typography.leading.heading} ${u.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${u.typography.family.sans} text-xl sm:text-2xl md:text-3xl lg:text-4xl ${u.typography.weight.heading} ${u.typography.leading.heading} ${u.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${u.typography.family.sans} text-lg sm:text-xl md:text-2xl lg:text-3xl ${u.typography.weight.semibold} ${u.typography.leading.heading} ${u.typography.tracking.heading} text-gray-900 dark:text-white`,display:()=>`${u.typography.family.display} text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl ${u.typography.weight.display} ${u.typography.leading.display} ${u.typography.tracking.heading} text-gray-900 dark:text-white`}},body:{xl:()=>`${u.typography.family.body} ${u.typography.semantic.bodyLarge} ${u.typography.weight.body} ${u.typography.leading.body} ${u.typography.tracking.body} text-gray-700 dark:text-gray-300`,lg:()=>`${u.typography.family.body} ${u.typography.semantic.body} ${u.typography.weight.body} ${u.typography.leading.body} ${u.typography.tracking.body} text-gray-700 dark:text-gray-300`,md:()=>`${u.typography.family.body} ${u.typography.semantic.body} ${u.typography.weight.body} ${u.typography.leading.body} ${u.typography.tracking.body} text-gray-700 dark:text-gray-300`,sm:()=>`${u.typography.family.body} ${u.typography.semantic.small} ${u.typography.weight.body} ${u.typography.leading.body} ${u.typography.tracking.body} text-gray-600 dark:text-gray-400`,xs:()=>`${u.typography.family.body} ${u.typography.semantic.caption} ${u.typography.weight.body} ${u.typography.leading.body} ${u.typography.tracking.body} text-gray-600 dark:text-gray-400`,strong:{xl:()=>`${u.typography.family.body} ${u.typography.semantic.bodyLarge} ${u.typography.weight.strong} ${u.typography.leading.body} ${u.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${u.typography.family.body} ${u.typography.semantic.body} ${u.typography.weight.strong} ${u.typography.leading.body} ${u.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${u.typography.family.body} ${u.typography.semantic.body} ${u.typography.weight.strong} ${u.typography.leading.body} ${u.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${u.typography.family.body} ${u.typography.semantic.small} ${u.typography.weight.strong} ${u.typography.leading.body} ${u.typography.tracking.body} text-gray-900 dark:text-white`},emphasis:{xl:()=>`${u.typography.family.body} ${u.typography.semantic.bodyLarge} ${u.typography.weight.emphasis} ${u.typography.leading.body} ${u.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${u.typography.family.body} ${u.typography.semantic.body} ${u.typography.weight.emphasis} ${u.typography.leading.body} ${u.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${u.typography.family.body} ${u.typography.semantic.body} ${u.typography.weight.emphasis} ${u.typography.leading.body} ${u.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${u.typography.family.body} ${u.typography.semantic.small} ${u.typography.weight.emphasis} ${u.typography.leading.body} ${u.typography.tracking.body} text-gray-900 dark:text-white`},muted:{xl:()=>`${u.typography.family.body} ${u.typography.semantic.bodyLarge} ${u.typography.weight.body} ${u.typography.leading.body} ${u.typography.tracking.body} text-gray-600 dark:text-gray-400`,lg:()=>`${u.typography.family.body} ${u.typography.semantic.body} ${u.typography.weight.body} ${u.typography.leading.body} ${u.typography.tracking.body} text-gray-600 dark:text-gray-400`,md:()=>`${u.typography.family.body} ${u.typography.semantic.body} ${u.typography.weight.body} ${u.typography.leading.body} ${u.typography.tracking.body} text-gray-600 dark:text-gray-400`,sm:()=>`${u.typography.family.body} ${u.typography.semantic.small} ${u.typography.weight.body} ${u.typography.leading.body} ${u.typography.tracking.body} text-gray-600 dark:text-gray-400`}},link:{default:()=>`${u.typography.decoration.underline} ${u.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150`,subtle:()=>`${u.typography.decoration.none} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 hover:${u.typography.decoration.underline} hover:${u.typography.underlineOffset.medium} transition-all duration-150`,muted:()=>`${u.typography.decoration.underline} ${u.typography.underlineOffset.medium} text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 transition-colors duration-150`,external:()=>`${u.typography.decoration.underline} ${u.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:()=>`${u.typography.family.body} text-sm ${u.typography.weight.emphasis} text-gray-900 dark:text-white`,required:()=>`${u.typography.family.body} text-sm ${u.typography.weight.emphasis} text-gray-900 dark:text-white after:content-['*'] after:ml-0.5 after:text-red-500`,optional:()=>`${u.typography.family.body} text-sm ${u.typography.weight.body} text-gray-600 dark:text-gray-400`,helper:()=>`${u.typography.family.body} text-sm ${u.typography.weight.body} text-gray-500 dark:text-gray-500`,error:()=>`${u.typography.family.body} text-sm ${u.typography.weight.body} text-red-600 dark:text-red-400`,success:()=>`${u.typography.family.body} text-sm ${u.typography.weight.body} text-green-600 dark:text-green-400`}},k={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:(t="default")=>{const e={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`${e[t]||e.default} inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium`},large:(t="default")=>{const e={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`${e[t]||e.default} inline-flex items-center px-3 py-1 rounded-full text-sm font-medium`}},input:{default:()=>"bg-white dark:bg-gray-900 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-white dark:bg-gray-900 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-white dark:bg-gray-900 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-white dark:bg-gray-900 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-white dark:bg-gray-900 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-white dark:bg-gray-900 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",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",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"}}},ya={section:{gradient:"py-20 bg-gradient-to-r from-purple-50 to-blue-50 dark:from-purple-900 dark:to-blue-900"}},xa={info:w.InformationCircleIcon,success:w.CheckCircleIcon,warning:w.ExclamationTriangleIcon,error:w.XCircleIcon},va=({children:t,className:e})=>a.jsx("div",{className:f("font-medium mb-1",e),children:t}),wa=({children:t,className:e})=>a.jsx("div",{className:f("text-sm",e),children:t}),ka=({variant:t="info",title:e,description:r,icon:n,children:o,className:s})=>{const c=xa[t],l=n||a.jsx(c,{className:"h-5 w-5"}),d=typeof k.alert[t]=="function"?k.alert[t]():"";return a.jsxs("div",{role:"alert",className:f(d,s),children:[l&&a.jsx("div",{className:"flex-shrink-0",children:l}),a.jsxs("div",{className:"flex-1",children:[e&&a.jsx("div",{className:"font-medium mb-1",children:e}),r&&a.jsx("div",{className:"text-sm",children:r}),o]})]})},mt=()=>typeof document<"u"&&typeof document.createElement=="function"&&typeof document.getElementById=="function",Ca=t=>{if(typeof document<"u"&&document.getElementById)try{return document.getElementById(t)}catch(e){console.warn("Failed to get element by ID:",e)}return null},Sa=t=>{if(typeof document<"u"&&document.createElement)try{return document.createElement(t)}catch(e){console.warn("Failed to create element:",e)}return null},Na=t=>{const e=typeof document<"u"?document.head:null;if(e&&t)try{return e.appendChild(t),!0}catch(r){console.warn("Failed to append to document head:",r)}return!1},U=({animation:t="fade-in-up",delay:e=0,duration:r=600,once:n=!0,children:o,className:s="",threshold:c=.1})=>{const[l,d]=h.useState(!1),[g,m]=h.useState(!1),p=h.useRef(null);h.useEffect(()=>{if(!mt()||typeof IntersectionObserver>"u"){d(!0),n&&m(!0);return}const y=new IntersectionObserver(([v])=>{v.isIntersecting&&(!g||!n)?(d(!0),n&&m(!0)):n||d(!1)},{threshold:c}),x=p.current;return x&&y.observe(x),()=>{x&&y.unobserve(x)}},[c,n,g]);const b=()=>{if(t==="none")return"";const y=`transition-all duration-${r} ease-out`,x=e>0?`delay-${e}`:"",v={"fade-in-up":l?`opacity-100 translate-y-0 ${y} ${x}`:`opacity-0 translate-y-8 ${y} ${x}`,"fade-in-scale":l?`opacity-100 scale-100 ${y} ${x}`:`opacity-0 scale-95 ${y} ${x}`,"fade-in-left":l?`opacity-100 translate-x-0 ${y} ${x}`:`opacity-0 -translate-x-8 ${y} ${x}`,"fade-in-right":l?`opacity-100 translate-x-0 ${y} ${x}`:`opacity-0 translate-x-8 ${y} ${x}`,"slide-in-bottom":l?`translate-y-0 ${y} ${x}`:`translate-y-full ${y} ${x}`,"zoom-in":l?`opacity-100 scale-100 ${y} ${x}`:`opacity-0 scale-50 ${y} ${x}`,float:"animate-float","bounce-slow":"animate-bounce-slow"};return v[t]||v["fade-in-up"]};return h.useEffect(()=>{if(mt()&&(t==="float"||t==="bounce-slow")){const y="animated-section-keyframes";if(!Ca(y)){const x=Sa("style");x&&(x.id=y,x.textContent=`
|
|
16
|
+
${n?"bg-gray-200 text-gray-500 cursor-not-allowed":a?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-200 text-gray-700 hover:bg-gray-300"}
|
|
17
|
+
`,children:n?"Verified":a?"Current Plan":"Select Plan"})]})},y={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",display:"leading-none"},tracking:{heading:"tracking-tight",body:"tracking-normal"}}},$={heading:{display:{hero:()=>`${y.typography.family.display} ${y.typography.semantic.hero} ${y.typography.weight.display} ${y.typography.leading.display} ${y.typography.tracking.heading} text-gray-900 dark:text-white`,xl:()=>`${y.typography.family.display} text-7xl ${y.typography.weight.display} ${y.typography.leading.display} ${y.typography.tracking.heading} text-gray-900 dark:text-white`,lg:()=>`${y.typography.family.display} text-6xl ${y.typography.weight.bold} ${y.typography.leading.display} ${y.typography.tracking.heading} text-gray-900 dark:text-white`,md:()=>`${y.typography.family.display} text-5xl ${y.typography.weight.bold} ${y.typography.leading.tight} ${y.typography.tracking.heading} text-gray-900 dark:text-white`,sm:()=>`${y.typography.family.display} text-4xl ${y.typography.weight.bold} ${y.typography.leading.tight} ${y.typography.tracking.heading} text-gray-900 dark:text-white`},h1:()=>`${y.typography.family.sans} ${y.typography.semantic.h1} ${y.typography.weight.heading} ${y.typography.leading.heading} ${y.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${y.typography.family.sans} ${y.typography.semantic.h2} ${y.typography.weight.heading} ${y.typography.leading.heading} ${y.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${y.typography.family.sans} ${y.typography.semantic.h3} ${y.typography.weight.heading} ${y.typography.leading.heading} ${y.typography.tracking.heading} text-gray-900 dark:text-white`,h4:()=>`${y.typography.family.sans} ${y.typography.semantic.h4} ${y.typography.weight.semibold} ${y.typography.leading.heading} ${y.typography.tracking.heading} text-gray-900 dark:text-white`,h5:()=>`${y.typography.family.sans} ${y.typography.semantic.h5} ${y.typography.weight.semibold} ${y.typography.leading.heading} ${y.typography.tracking.heading} text-gray-900 dark:text-white`,h6:()=>`${y.typography.family.sans} ${y.typography.semantic.h6} ${y.typography.weight.semibold} ${y.typography.leading.heading} ${y.typography.tracking.heading} text-gray-900 dark:text-white`,responsive:{h1:()=>`${y.typography.family.sans} text-2xl sm:text-3xl md:text-4xl lg:text-5xl ${y.typography.weight.heading} ${y.typography.leading.heading} ${y.typography.tracking.heading} text-gray-900 dark:text-white`,h2:()=>`${y.typography.family.sans} text-xl sm:text-2xl md:text-3xl lg:text-4xl ${y.typography.weight.heading} ${y.typography.leading.heading} ${y.typography.tracking.heading} text-gray-900 dark:text-white`,h3:()=>`${y.typography.family.sans} text-lg sm:text-xl md:text-2xl lg:text-3xl ${y.typography.weight.semibold} ${y.typography.leading.heading} ${y.typography.tracking.heading} text-gray-900 dark:text-white`,display:()=>`${y.typography.family.display} text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl ${y.typography.weight.display} ${y.typography.leading.display} ${y.typography.tracking.heading} text-gray-900 dark:text-white`}},body:{xl:()=>`${y.typography.family.body} ${y.typography.semantic.bodyLarge} ${y.typography.weight.body} ${y.typography.leading.body} ${y.typography.tracking.body} text-gray-700 dark:text-gray-300`,lg:()=>`${y.typography.family.body} ${y.typography.semantic.body} ${y.typography.weight.body} ${y.typography.leading.body} ${y.typography.tracking.body} text-gray-700 dark:text-gray-300`,md:()=>`${y.typography.family.body} ${y.typography.semantic.body} ${y.typography.weight.body} ${y.typography.leading.body} ${y.typography.tracking.body} text-gray-700 dark:text-gray-300`,sm:()=>`${y.typography.family.body} ${y.typography.semantic.small} ${y.typography.weight.body} ${y.typography.leading.body} ${y.typography.tracking.body} text-gray-600 dark:text-gray-400`,xs:()=>`${y.typography.family.body} ${y.typography.semantic.caption} ${y.typography.weight.body} ${y.typography.leading.body} ${y.typography.tracking.body} text-gray-600 dark:text-gray-400`,strong:{xl:()=>`${y.typography.family.body} ${y.typography.semantic.bodyLarge} ${y.typography.weight.strong} ${y.typography.leading.body} ${y.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${y.typography.family.body} ${y.typography.semantic.body} ${y.typography.weight.strong} ${y.typography.leading.body} ${y.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${y.typography.family.body} ${y.typography.semantic.body} ${y.typography.weight.strong} ${y.typography.leading.body} ${y.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${y.typography.family.body} ${y.typography.semantic.small} ${y.typography.weight.strong} ${y.typography.leading.body} ${y.typography.tracking.body} text-gray-900 dark:text-white`},emphasis:{xl:()=>`${y.typography.family.body} ${y.typography.semantic.bodyLarge} ${y.typography.weight.emphasis} ${y.typography.leading.body} ${y.typography.tracking.body} text-gray-900 dark:text-white`,lg:()=>`${y.typography.family.body} ${y.typography.semantic.body} ${y.typography.weight.emphasis} ${y.typography.leading.body} ${y.typography.tracking.body} text-gray-900 dark:text-white`,md:()=>`${y.typography.family.body} ${y.typography.semantic.body} ${y.typography.weight.emphasis} ${y.typography.leading.body} ${y.typography.tracking.body} text-gray-900 dark:text-white`,sm:()=>`${y.typography.family.body} ${y.typography.semantic.small} ${y.typography.weight.emphasis} ${y.typography.leading.body} ${y.typography.tracking.body} text-gray-900 dark:text-white`},muted:{xl:()=>`${y.typography.family.body} ${y.typography.semantic.bodyLarge} ${y.typography.weight.body} ${y.typography.leading.body} ${y.typography.tracking.body} text-gray-600 dark:text-gray-400`,lg:()=>`${y.typography.family.body} ${y.typography.semantic.body} ${y.typography.weight.body} ${y.typography.leading.body} ${y.typography.tracking.body} text-gray-600 dark:text-gray-400`,md:()=>`${y.typography.family.body} ${y.typography.semantic.body} ${y.typography.weight.body} ${y.typography.leading.body} ${y.typography.tracking.body} text-gray-600 dark:text-gray-400`,sm:()=>`${y.typography.family.body} ${y.typography.semantic.small} ${y.typography.weight.body} ${y.typography.leading.body} ${y.typography.tracking.body} text-gray-600 dark:text-gray-400`}},link:{default:()=>`${y.typography.decoration.underline} ${y.typography.underlineOffset.medium} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-150`,subtle:()=>`${y.typography.decoration.none} text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 hover:${y.typography.decoration.underline} hover:${y.typography.underlineOffset.medium} transition-all duration-150`,muted:()=>`${y.typography.decoration.underline} ${y.typography.underlineOffset.medium} text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 transition-colors duration-150`,external:()=>`${y.typography.decoration.underline} ${y.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:()=>`${y.typography.family.body} text-sm ${y.typography.weight.emphasis} text-gray-900 dark:text-white`,required:()=>`${y.typography.family.body} text-sm ${y.typography.weight.emphasis} text-gray-900 dark:text-white after:content-['*'] after:ml-0.5 after:text-red-500`,optional:()=>`${y.typography.family.body} text-sm ${y.typography.weight.body} text-gray-600 dark:text-gray-400`,helper:()=>`${y.typography.family.body} text-sm ${y.typography.weight.body} text-gray-500 dark:text-gray-500`,error:()=>`${y.typography.family.body} text-sm ${y.typography.weight.body} text-red-600 dark:text-red-400`,success:()=>`${y.typography.family.body} text-sm ${y.typography.weight.body} text-green-600 dark:text-green-400`}},I={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 t={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`${t[e]||t.default} inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium`},large:(e="default")=>{const t={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`${t[e]||t.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",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",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"}}},$o={section:{gradient:"py-20 bg-gradient-to-r from-purple-50 to-blue-50 dark:from-purple-900 dark:to-blue-900"}},Oo=(e,t,r)=>{if(r)return`${r}/address/${e}`;if(!t)return null;if(t<0)return`https://explorer.solana.com/address/${e}${t===-101?"":t===-102?"?cluster=devnet":"?cluster=testnet"}`;const n={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"}[t];return n?`${n}/address/${e}`:null},Mo=(e,t)=>t==="full"?e:t==="medium"?`${e.substring(0,10)}...${e.substring(e.length-8)}`:`${e.substring(0,6)}...${e.substring(e.length-4)}`,Do=({address:e,chainId:t,explorerUrl:r,label:a,format:n="short",showCopy:s=!0,showExplorer:i=!0,className:l="",textClassName:c=""})=>{const[u,g]=b.useState(!1),m=Mo(e,n),h=Oo(e,t,r),f=async()=>{try{await navigator.clipboard.writeText(e),g(!0),setTimeout(()=>g(!1),2e3)}catch{}};return o.jsxs("div",{className:w("flex items-center gap-2",l),children:[a&&o.jsxs("span",{className:$.label.default(),children:[a,":"]}),o.jsx("span",{className:w("font-mono text-sm",c),children:m}),o.jsxs("div",{className:"flex items-center gap-1",children:[s&&o.jsx("button",{onClick:f,className:w("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:u?"Copied!":"Copy address","aria-label":"Copy address",children:u?o.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):o.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.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&&h&&o.jsx("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:w("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:o.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.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"})})})]})]})},zo={info:A.InformationCircleIcon,success:A.CheckCircleIcon,warning:A.ExclamationTriangleIcon,error:A.XCircleIcon},Wo=({children:e,className:t})=>o.jsx("div",{className:w("font-medium mb-1",t),children:e}),Bo=({children:e,className:t})=>o.jsx("div",{className:w("text-sm",t),children:e}),jo=({variant:e="info",title:t,description:r,icon:a,children:n,className:s})=>{const i=zo[e],l=a||o.jsx(i,{className:"h-5 w-5"}),c=typeof I.alert[e]=="function"?I.alert[e]():"";return o.jsxs("div",{role:"alert",className:w(c,s),children:[l&&o.jsx("div",{className:"flex-shrink-0",children:l}),o.jsxs("div",{className:"flex-1",children:[t&&o.jsx("div",{className:"font-medium mb-1",children:t}),r&&o.jsx("div",{className:"text-sm",children:r}),n]})]})},Tr=()=>typeof document<"u"&&typeof document.createElement=="function"&&typeof document.getElementById=="function",Fo=e=>{if(typeof document<"u"&&document.getElementById)try{return document.getElementById(e)}catch{}return null},_o=e=>{if(typeof document<"u"&&document.createElement)try{return document.createElement(e)}catch{}return null},Ho=e=>{const t=typeof document<"u"?document.head:null;if(t&&e)try{return t.appendChild(e),!0}catch{}return!1},ye=({animation:e="fade-in-up",delay:t=0,duration:r=600,once:a=!0,children:n,className:s="",threshold:i=.1})=>{const[l,c]=b.useState(!1),[u,g]=b.useState(!1),m=b.useRef(null);b.useEffect(()=>{if(!Tr()||typeof IntersectionObserver>"u"){c(!0),a&&g(!0);return}const f=new IntersectionObserver(([x])=>{x.isIntersecting&&(!u||!a)?(c(!0),a&&g(!0)):a||c(!1)},{threshold:i}),p=m.current;return p&&f.observe(p),()=>{p&&f.unobserve(p)}},[i,a,u]);const h=()=>{if(e==="none")return"";const f=`transition-all duration-${r} ease-out`,p=t>0?`delay-${t}`:"",x={"fade-in-up":l?`opacity-100 translate-y-0 ${f} ${p}`:`opacity-0 translate-y-8 ${f} ${p}`,"fade-in-scale":l?`opacity-100 scale-100 ${f} ${p}`:`opacity-0 scale-95 ${f} ${p}`,"fade-in-left":l?`opacity-100 translate-x-0 ${f} ${p}`:`opacity-0 -translate-x-8 ${f} ${p}`,"fade-in-right":l?`opacity-100 translate-x-0 ${f} ${p}`:`opacity-0 translate-x-8 ${f} ${p}`,"slide-in-bottom":l?`translate-y-0 ${f} ${p}`:`translate-y-full ${f} ${p}`,"zoom-in":l?`opacity-100 scale-100 ${f} ${p}`:`opacity-0 scale-50 ${f} ${p}`,float:"animate-float","bounce-slow":"animate-bounce-slow"};return x[e]||x["fade-in-up"]};return b.useEffect(()=>{if(Tr()&&(e==="float"||e==="bounce-slow")){const f="animated-section-keyframes";if(!Fo(f)){const p=_o("style");p&&(p.id=f,p.textContent=`
|
|
18
18
|
@keyframes float {
|
|
19
19
|
0%, 100% { transform: translateY(0px); }
|
|
20
20
|
50% { transform: translateY(-20px); }
|
|
@@ -29,34 +29,34 @@
|
|
|
29
29
|
.animate-bounce-slow {
|
|
30
30
|
animation: bounce-slow 4s ease-in-out infinite;
|
|
31
31
|
}
|
|
32
|
-
`,Na(x))}}},[t]),a.jsx("div",{ref:p,className:`${b()} ${s}`,children:o})},Ea=({children:t,delay:e=0,className:r=""})=>a.jsx(U,{animation:"fade-in-up",delay:e,className:r,children:t}),Ia=({children:t,delay:e=0,className:r=""})=>a.jsx(U,{animation:"fade-in-scale",delay:e,className:r,children:t}),Pa=({children:t,className:e=""})=>a.jsx(U,{animation:"float",className:e,children:t}),ht=$.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"}}),F=L.forwardRef(({className:t,variant:e,size:r,animation:n,asChild:o=!1,...s},c)=>{const l=o?Xt.Slot:"button",d=e||"default",g=r&&r!=="default"&&r!=="icon"?r:void 0,m=y=>y?{sm:"small",lg:"large",default:"default"}[y]||y:"default",b=(()=>{if(d.startsWith("gradient")){const y=d.replace("gradient-","").replace("gradient","primary");return k.button.gradient[y]?.()||k.button.primary.default()}else{if(["wallet","connect","disconnect"].includes(d))return k.button.web3[d]?.()||k.button.primary.default();{const y=m(g);return k.button[d]?.[y]?.()||k.button.primary.default()}}})();return a.jsx(l,{className:f(ht({size:r,animation:n}),b,t),ref:c,...s})});F.displayName="Button";const $a={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-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 text-yellow-900 dark:text-yellow-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",callout:"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"},Aa={none:"",sm:"p-3",md:"p-6",lg:"p-8"},$e=({variant:t="elevated",padding:e="md",icon:r,onClose:n,className:o,children:s,...c})=>{const d=["info","success","warning","error"].includes(t)&&(r||n);return a.jsx("div",{className:f("rounded-lg",$a[t],Aa[e],o),...c,children:d?a.jsxs("div",{className:"flex items-start gap-3",children:[r&&a.jsx("div",{className:"flex-shrink-0 text-lg",children:r}),a.jsx("div",{className:"flex-1 min-w-0",children:s}),n&&a.jsx("button",{onClick:n,className:"flex-shrink-0 text-current hover:opacity-70 transition-opacity","aria-label":"Close",children:a.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):s})},Ta=({title:t,description:e,className:r,children:n,...o})=>a.jsxs("div",{className:f("space-y-1.5",r),...o,children:[t&&a.jsx("h3",{className:E.heading.h4(),children:t}),e&&a.jsx("p",{className:E.body.sm(),children:e}),n]}),La=({className:t,children:e,...r})=>a.jsx("div",{className:f("",t),...r,children:e}),Ma=({className:t,children:e,...r})=>a.jsx("div",{className:f("flex items-center pt-4",t),...r,children:e}),za=({title:t,children:e,variant:r="info",size:n="default",className:o})=>{const s={sm:"sm",default:"md",lg:"lg"},c=r==="neutral"?"bordered":r;return a.jsxs($e,{variant:c,padding:s[n],className:o,children:[t&&a.jsx("h3",{className:f("font-semibold mb-2",n==="sm"?"text-base":n==="lg"?"text-xl":"text-lg"),children:t}),e]})},Oa=({title:t,icon:e,children:r,variant:n="gradient",size:o="default",centered:s=!1,className:c})=>{const l={sm:"sm",default:"md",lg:"lg"},d=n==="gradient"||n==="neutral"?"callout":n;return a.jsx($e,{variant:d,padding:l[o],className:c,children:a.jsxs("div",{className:f("space-y-4",s&&"text-center"),children:[e&&a.jsx("div",{className:f("font-bold",o==="sm"?"text-2xl":o==="lg"?"text-5xl":"text-4xl",s?"text-center":"text-left"),children:e}),t&&a.jsx("h3",{className:f("font-bold mb-4",o==="sm"?"text-lg":o==="lg"?"text-3xl":"text-2xl"),children:t}),a.jsx("div",{className:f("text-gray-600 dark:text-gray-400",o==="sm"?"text-sm":o==="lg"?"text-lg":"text-base"),children:r})]})})},Wa=$.cva("grid gap-8",{variants:{layout:{grid:"grid-cols-1 md:grid-cols-2",stacked:"grid-cols-1 space-y-8",cards:"grid-cols-1 md:grid-cols-2 gap-6"},spacing:{sm:"gap-4",md:"gap-8",lg:"gap-12"}},defaultVariants:{layout:"grid",spacing:"md"}}),ja=$.cva("rounded-xl p-6 transition-all duration-300",{variants:{variant:{traditional:"bg-red-50 dark:bg-red-900/20 border-2 border-red-100 dark:border-red-800/30 hover:border-red-200 dark:hover:border-red-700/50",web3:"bg-green-50 dark:bg-green-900/20 border-2 border-green-100 dark:border-green-800/30 hover:border-green-200 dark:hover:border-green-700/50",neutral:"bg-gray-50 dark:bg-gray-800/50 border-2 border-gray-100 dark:border-gray-700/30 hover:border-gray-200 dark:hover:border-gray-600/50",elevated:"bg-white dark:bg-gray-800 shadow-lg hover:shadow-xl border border-gray-200 dark:border-gray-700"},animation:{none:"",hover:"hover:transform hover:scale-[1.02]",float:"hover:-translate-y-1"}},defaultVariants:{variant:"traditional",animation:"hover"}}),Ba=$.cva("text-lg font-bold mb-4 flex items-center gap-3",{variants:{variant:{traditional:"text-red-600 dark:text-red-400",web3:"text-green-600 dark:text-green-400",neutral:"text-gray-900 dark:text-white",elevated:"text-gray-900 dark:text-white"}},defaultVariants:{variant:"traditional"}}),Da={traditional:"❌",web3:"✅",neutral:"ℹ️",elevated:"⭐"},Fa={red:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300",green:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",blue:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",gray:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300"},_a=({className:t,layout:e="grid",spacing:r="md",title:n,subtitle:o,traditional:s,web3:c,cardAnimation:l="hover",animate:d=!0,animationDelay:g=0,traditionalIcon:m,web3Icon:p})=>{const b=(x,v)=>{const N=a.jsxs("div",{className:f(ja({variant:x.variant,animation:l})),children:[a.jsxs("div",{className:f(Ba({variant:x.variant})),children:[a.jsx("span",{className:"text-2xl",children:x.icon||(v===0?m:p)||Da[x.variant]}),a.jsx("div",{className:"flex-1",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{children:x.title}),x.badge&&a.jsx("span",{className:f("text-xs font-medium px-2 py-1 rounded-full",Fa[x.badge.color||"gray"]),children:x.badge.text})]})})]}),a.jsx("ul",{className:"space-y-3",children:x.items.map((C,S)=>a.jsxs("li",{className:f("flex items-start gap-3 text-sm leading-relaxed",C.highlight&&"font-medium"),children:[C.icon&&a.jsx("span",{className:"flex-shrink-0 mt-0.5 text-base",children:C.icon}),a.jsxs("div",{className:"flex-1",children:[a.jsx("span",{className:f(x.variant==="traditional"||x.variant==="web3"?"text-gray-700 dark:text-gray-300":"text-gray-600 dark:text-gray-400"),children:C.text}),C.subtext&&a.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-500 mt-1",children:C.subtext})]})]},S))})]});return d?a.jsx(U,{animation:"fade-in-up",delay:g+v*200,children:N},x.title):a.jsx("div",{children:N},x.title)},y=a.jsxs("div",{className:f("space-y-8",t),children:[(n||o)&&a.jsxs("div",{className:"text-center space-y-4",children:[n&&a.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-gray-900 dark:text-white",children:n}),o&&a.jsx("p",{className:"text-lg text-gray-600 dark:text-gray-400 max-w-2xl mx-auto",children:o})]}),a.jsxs("div",{className:f(Wa({layout:e,spacing:r})),children:[b(s,0),b(c,1)]})]});return d?a.jsx(U,{animation:"fade-in-up",delay:g,children:y}):y},Ae=(t,e,r,n)=>({title:t,variant:r,items:e.map(o=>typeof o=="string"?{text:o}:o),...n}),qa=t=>{const e=[{text:"Create account with email/password",icon:"🔑"},{text:"Remember multiple passwords",icon:"🧠"},{text:"Verify email address",icon:"📧"},{text:"Risk of password theft",icon:"⚠️"},{text:"Data stored on company servers",icon:"🏢"},{text:"Account can be locked/suspended",icon:"🔒"}],r=[{text:"Connect your wallet",icon:"🔗"},{text:"No passwords needed",icon:"🚫"},{text:"Instant authentication",icon:"⚡"},{text:"Cryptographically secure",icon:"🔐"},{text:"You own your data",icon:"👑"},{text:"Censorship resistant",icon:"🛡️"}];return{traditional:Ae(t?.traditionalTitle||"Traditional Email",t?.traditionalItems||e,"traditional",{badge:{text:t?.traditionalBadge||"Old Way",color:"red"}}),web3:Ae(t?.web3Title||"Web3 Email",t?.web3Items||r,"web3",{badge:{text:t?.web3Badge||"New Way",color:"green"}})}},Ha=$.cva("mx-auto px-4 sm:px-6",{variants:{size:{sm:"max-w-2xl",md:"max-w-4xl",lg:"max-w-6xl",xl:"max-w-7xl lg:px-8",full:"max-w-full",prose:"max-w-prose"},spacing:{none:"",xs:"py-2",sm:"py-3",md:"py-4",lg:"py-6",xl:"py-8","2xl":"py-12","3xl":"py-16"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:"xl",spacing:"md",align:"left"}}),Va=({children:t,size:e="xl",spacing:r="md",align:n="left",className:o,as:s="div"})=>h.createElement(s,{className:f(Ha({size:e,spacing:r,align:n}),o)},t),Ua=({trigger:t,items:e,align:r="right",className:n="",variant:o="default"})=>{const[s,c]=h.useState(!1),l=h.useRef(null);gt(l,()=>c(!1));const d=p=>{p.disabled||(p.onClick(),c(!1))},g=r==="left"?k.overlays.dropdown.menuRight():k.overlays.dropdown.menuLeft(),m=o==="bordered"?k.overlays.dropdown.triggerBordered():k.overlays.dropdown.trigger();return a.jsxs("div",{className:`${k.overlays.dropdown.container()} ${n}`,ref:l,children:[a.jsx("div",{className:m,onClick:()=>c(!s),children:t}),s&&a.jsx("div",{className:`${k.overlays.dropdown.menu()} ${g} ${k.overlays.dropdown.menuBottom()}`,children:a.jsx("div",{className:k.overlays.dropdown.itemContainer(),children:e.map(p=>p.separator?a.jsx("div",{className:"my-1 h-px bg-gray-200 dark:bg-gray-700",role:"separator"},p.id):a.jsxs("button",{onClick:()=>d(p),disabled:p.disabled,className:`${p.disabled?k.overlays.dropdown.itemDisabled():k.overlays.dropdown.item()} flex items-center gap-2`,children:[p.icon&&a.jsx(p.icon,{className:k.overlays.dropdown.itemIcon()}),a.jsx("span",{children:p.label})]},p.id))})})]})},Ga=({icon:t,title:e,description:r,benefits:n,metrics:o,color:s="blue",isHighlight:c=!1,learnMoreUrl:l,cta:d,onClick:g,interactive:m=!1,borderColor:p=!1,className:b})=>{const y={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"},x={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"},v={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"},N=y[s],C=typeof t=="string",S=()=>a.jsxs(a.Fragment,{children:[C?a.jsx("div",{className:"text-4xl mb-4",children:t}):p?a.jsx("div",{className:f("w-12 h-12","rounded-lg","flex items-center justify-center","mb-4",v[s],N),children:t}):a.jsx("div",{className:f("flex-shrink-0 mb-4",N),children:t}),a.jsxs("div",{className:"flex-1",children:[a.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-3",children:e}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-4 leading-relaxed",children:r}),d&&a.jsx("div",{className:"mt-3 mb-4",children:d}),n&&n.length>0&&a.jsx("ul",{className:"space-y-2 mb-4",children:n.map((P,_)=>a.jsxs("li",{className:"flex items-start",children:[a.jsx("div",{className:f("w-2 h-2 rounded-full mt-2 mr-3 flex-shrink-0",`bg-${s}-500`)}),a.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:P})]},_))}),o&&Object.keys(o).length>0&&a.jsx("div",{className:"grid grid-cols-2 gap-4 mt-4",children:Object.entries(o).map(([P,_],K)=>a.jsxs("div",{className:"text-center p-3 bg-gray-50 dark:bg-gray-700/50 rounded-lg",children:[a.jsx("div",{className:f("text-lg font-bold",N),children:_}),a.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:P})]},K))})]})]}),I=f("p-6 rounded-xl shadow-lg hover:shadow-xl transition-all duration-200",p&&x[s],(m||g)&&"cursor-pointer hover:scale-[1.02]",c?"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",b),T=P=>{g&&("key"in P?(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),g()):g())};return l?a.jsx("a",{href:l,className:f(I,"block group"),onClick:g?P=>{P.preventDefault(),T(P)}:void 0,children:a.jsx(S,{})}):g?a.jsx("div",{className:I,onClick:T,onKeyDown:T,role:"button",tabIndex:0,"aria-label":e,children:a.jsx(S,{})}):a.jsx("div",{className:I,children:a.jsx(S,{})})},Ka=$.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"}}),Qa=$.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"}}),Ya=$.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"}}),Za={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"},Ja=({className:t,features:e,columns:r=3,spacing:n="md",cardVariant:o="default",cardAnimation:s="hover",iconSize:c="md",iconStyle:l="gradient",iconPosition:d="center",titleClass:g,descriptionClass:m,animate:p=!0,animationDelay:b=0,staggerDelay:y=100,onFeatureClick:x,defaultLinkText:v="Learn more"})=>{const N=(S,I)=>{if(l==="colorful"&&S.gradient)return{background:`linear-gradient(135deg, ${S.gradient.from}, ${S.gradient.to})`};if(l==="colorful"){const T=[{from:"#3B82F6",to:"#1D4ED8"},{from:"#10B981",to:"#059669"},{from:"#8B5CF6",to:"#7C3AED"},{from:"#F59E0B",to:"#D97706"},{from:"#EF4444",to:"#DC2626"},{from:"#06B6D4",to:"#0891B2"}],P=T[I%T.length];return{background:`linear-gradient(135deg, ${P.from}, ${P.to})`}}},C=(S,I)=>{const T=a.jsxs("div",{className:f(Qa({variant:o,animation:s})),onClick:()=>x?.(S),role:x?"button":void 0,tabIndex:x?0:void 0,children:[S.badge&&a.jsx("div",{className:"mb-4",children:a.jsx("span",{className:f("inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",Za[S.badge.variant||"default"]),children:S.badge.text})}),a.jsx("div",{className:f(Ya({size:c,style:l,position:d})),style:N(S,I),children:a.jsx("div",{className:f("flex items-center justify-center",l==="colorful"?"text-white":"text-blue-600 dark:text-blue-400"),children:S.icon})}),a.jsx("h3",{className:f("text-xl font-bold text-gray-900 dark:text-white mb-4",g),children:S.title}),a.jsx("div",{className:f("text-gray-600 dark:text-gray-300 leading-relaxed",m),children:S.description}),S.link&&a.jsx("div",{className:"mt-6",children:a.jsxs("a",{href:S.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:[S.link.text||v,a.jsx("svg",{className:"w-4 h-4 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})})]});return p?a.jsx(U,{animation:"fade-in-up",delay:b+I*y,children:T},S.id||I):a.jsx("div",{children:T},S.id||I)};return a.jsx("div",{className:f(Ka({columns:r,spacing:n}),t),children:e.map(C)})},Te=(t,e,r,n)=>({icon:t,title:e,description:r,...n}),Xa=t=>[Te(a.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.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"})}),t?.passwordlessTitle||"Passwordless Security",t?.passwordlessDescription||"Authenticate using your Web3 wallet - no passwords to remember or lose."),Te(a.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.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"})}),t?.encryptionTitle||"End-to-End Encryption",t?.encryptionDescription||"Your emails are encrypted and only you can read them.")],Ra=({badgeIcon:t,badgeText:e,badgeColor:r="blue",title:n,subtitle:o,description:s,primaryButton:c,secondaryButton:l,className:d,children:g})=>{const p={blue:"bg-blue-100 dark:bg-blue-900/30 border-blue-300 dark:border-blue-700 text-blue-800 dark:text-blue-200",green:"bg-green-100 dark:bg-green-900/30 border-green-300 dark:border-green-700 text-green-800 dark:text-green-200",purple:"bg-purple-100 dark:bg-purple-900/30 border-purple-300 dark:border-purple-700 text-purple-800 dark:text-purple-200",orange:"bg-orange-100 dark:bg-orange-900/30 border-orange-300 dark:border-orange-700 text-orange-800 dark:text-orange-200",pink:"bg-pink-100 dark:bg-pink-900/30 border-pink-300 dark:border-pink-700 text-pink-800 dark:text-pink-200",gray:"bg-gray-100 dark:bg-gray-900/30 border-gray-300 dark:border-gray-700 text-gray-800 dark:text-gray-200"}[r];return a.jsx("section",{className:f("py-20",d),children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[a.jsxs("div",{className:f("inline-flex items-center border px-6 py-3 rounded-full mb-6",p),children:[t&&a.jsx("span",{className:"mr-3",children:t}),a.jsx("span",{className:"font-semibold",children:e})]}),a.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 dark:text-gray-100 mb-6",children:[typeof n=="string"?a.jsx("span",{dangerouslySetInnerHTML:{__html:n}}):n,o&&a.jsx("span",{className:"text-blue-600 dark:text-blue-400 block",children:o})]}),a.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 mb-8 max-w-4xl mx-auto leading-relaxed",children:s}),(c||l)&&a.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center mb-8",children:[c&&a.jsx(F,{size:"lg",...c,className:f("px-8 py-3",c.className),children:c.text}),l&&a.jsx(F,{variant:"outline",size:"lg",...l,className:f("px-8 py-3",l.className),children:l.text})]}),g]})})},pt=L.forwardRef(({className:t,type:e,...r},n)=>a.jsx("input",{type:e,className:f(k.input.default(),t),ref:n,...r}));pt.displayName="Input";const en=$.cva(`${E.label.default()} peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),Le=L.forwardRef(({className:t,...e},r)=>a.jsx(Je.Root,{ref:r,className:f(en(),t),...e}));Le.displayName=Je.Root.displayName;const tn=({title:t,description:e,metrics:r,columns:n=3,className:o})=>{const s={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"},c={2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"};return a.jsx("section",{className:f("py-16",o),children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[(t||e)&&a.jsxs("div",{className:"text-center mb-12",children:[t&&a.jsx("h2",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-4",children:t}),e&&a.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:e})]}),a.jsx("div",{className:f("grid gap-8",c[n]),children:r.map((l,d)=>{const g=l.color?s[l.color]:s.blue;return a.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl p-6 border border-gray-200 dark:border-gray-700 text-center hover:shadow-lg transition-shadow",children:[l.icon&&a.jsx("div",{className:f("flex justify-center mb-4",g),children:l.icon}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:f("text-3xl font-bold",g),children:l.value}),a.jsx("div",{className:"text-gray-600 dark:text-gray-400 font-medium",children:l.label}),l.trend&&a.jsxs("div",{className:f("text-sm font-semibold",l.trend.direction==="up"?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:[l.trend.direction==="up"?"↑":"↓"," ",l.trend.value]})]})]},d)})})]})})},rn=({title:t,description:e,steps:r,orientation:n="vertical",color:o="blue",className:s})=>{const l={blue:{bg:"bg-blue-600",text:"text-blue-600 dark:text-blue-400",border:"border-blue-200 dark:border-blue-800"},green:{bg:"bg-green-600",text:"text-green-600 dark:text-green-400",border:"border-green-200 dark:border-green-800"},purple:{bg:"bg-purple-600",text:"text-purple-600 dark:text-purple-400",border:"border-purple-200 dark:border-purple-800"},orange:{bg:"bg-orange-600",text:"text-orange-600 dark:text-orange-400",border:"border-orange-200 dark:border-orange-800"},pink:{bg:"bg-pink-600",text:"text-pink-600 dark:text-pink-400",border:"border-pink-200 dark:border-pink-800"},gray:{bg:"bg-gray-600",text:"text-gray-600 dark:text-gray-400",border:"border-gray-200 dark:border-gray-800"}}[o];return a.jsx("section",{className:f("py-16",s),children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[(t||e)&&a.jsxs("div",{className:"text-center mb-12",children:[t&&a.jsx("h2",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-4",children:t}),e&&a.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:e})]}),a.jsx("div",{className:f(n==="horizontal"?"flex flex-col lg:flex-row justify-center items-center lg:items-start space-y-8 lg:space-y-0 lg:space-x-8":"space-y-8 max-w-4xl mx-auto"),children:r.map((d,g)=>a.jsxs("div",{className:f("relative",n==="horizontal"?"flex-1 text-center lg:text-left":"flex items-start"),children:[a.jsx("div",{className:f("flex-shrink-0 flex items-center justify-center rounded-full text-white font-bold",l.bg,n==="horizontal"?"w-12 h-12 mx-auto lg:mx-0 mb-4":"w-10 h-10 mr-4 mt-1"),children:d.icon?d.icon:d.step}),g<r.length-1&&n==="vertical"&&a.jsx("div",{className:f("absolute left-5 top-12 w-px h-8 -ml-px",l.bg.replace("bg-","bg-").replace("-600","-200"),"dark:"+l.bg.replace("bg-","bg-").replace("-600","-800"))}),a.jsxs("div",{className:f(n==="horizontal"?"flex-1":"flex-1 min-w-0"),children:[a.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:d.title}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-3",children:d.description}),d.details&&d.details.length>0&&a.jsx("ul",{className:"space-y-1",children:d.details.map((m,p)=>a.jsxs("li",{className:"flex items-start",children:[a.jsx("div",{className:f("w-1.5 h-1.5 rounded-full mt-2 mr-2 flex-shrink-0",l.bg)}),a.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:m})]},p))})]})]},g))})]})})},an=({children:t,onRefresh:e,disabled:r=!1,refreshingText:n="Refreshing...",pullDownText:o="Pull down to refresh",releaseText:s="Release to refresh",threshold:c=80,maxPullDistance:l=120,className:d=""})=>{const[g,m]=h.useState(0),[p,b]=h.useState(!1),[y,x]=h.useState(!1),v=h.useRef(0),N=h.useRef(null);h.useEffect(()=>{const P=N.current;if(!P)return;const _=W=>{if(r||p)return;P.scrollTop<=0&&(v.current=W.touches[0].clientY,x(!0))},K=W=>{if(!y)return;const j=W.touches[0].clientY-v.current;if(j>0&&P.scrollTop<=0){const Ce=Math.min(j/l,1),Se=Math.min(j*(1-Ce*.5),l);m(Se),j>10&&W.preventDefault()}},le=async()=>{if(y)if(x(!1),g>=c&&!p){b(!0);try{await e()}catch(W){console.error("Refresh error:",W)}finally{b(!1),m(0)}}else m(0)};return P.addEventListener("touchstart",_,{passive:!0}),P.addEventListener("touchmove",K,{passive:!1}),P.addEventListener("touchend",le),()=>{P.removeEventListener("touchstart",_),P.removeEventListener("touchmove",K),P.removeEventListener("touchend",le)}},[r,p,y,g,c,l,e]);const C=Math.min(g/c,1),S=y||p,I=y?g:p?c:0,T=()=>p?n:g>=c?s:o;return a.jsxs("div",{ref:N,className:`relative ${d}`,style:{height:"100%",overflowY:"auto",WebkitOverflowScrolling:"touch"},children:[a.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:`${I}px`,marginTop:y?0:`-${I}px`,opacity:S?1:0,pointerEvents:"none"},children:a.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[a.jsx(w.ArrowPathIcon,{className:`w-6 h-6 text-blue-600 dark:text-blue-400 transition-transform duration-200 ${p?"animate-spin":""}`,style:{transform:`rotate(${C*360}deg)`}}),g>20&&a.jsx("span",{className:"text-xs font-medium text-blue-600 dark:text-blue-400",children:T()})]})}),a.jsx("div",{style:{paddingTop:y?`${g}px`:0,transition:y?"none":"padding-top 200ms ease-out"},children:t})]})},Me=A.Root,nn=A.Group,ft=A.Value,pe=L.forwardRef(({className:t,children:e,...r},n)=>a.jsxs(A.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",t),...r,children:[e,a.jsx(A.Icon,{asChild:!0,children:a.jsx(de.ChevronDown,{className:"h-4 w-4 opacity-50 ml-2 flex-shrink-0"})})]}));pe.displayName=A.Trigger.displayName;const ze=L.forwardRef(({className:t,...e},r)=>a.jsx(A.ScrollUpButton,{ref:r,className:f("flex cursor-default items-center justify-center py-1",t),...e,children:a.jsx(de.ChevronUp,{className:"h-4 w-4"})}));ze.displayName=A.ScrollUpButton.displayName;const Oe=L.forwardRef(({className:t,...e},r)=>a.jsx(A.ScrollDownButton,{ref:r,className:f("flex cursor-default items-center justify-center py-1",t),...e,children:a.jsx(de.ChevronDown,{className:"h-4 w-4"})}));Oe.displayName=A.ScrollDownButton.displayName;const fe=L.forwardRef(({className:t,children:e,position:r="popper",...n},o)=>a.jsx(A.Portal,{children:a.jsxs(A.Content,{ref:o,className:f(k.overlays.dropdown.menu(),"z-[1000000] max-h-96 min-w-[8rem] overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,...n,children:[a.jsx(ze,{}),a.jsx(A.Viewport,{className:f(k.overlays.dropdown.itemContainer(),r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),a.jsx(Oe,{})]})}));fe.displayName=A.Content.displayName;const bt=L.forwardRef(({className:t,...e},r)=>a.jsx(A.Label,{ref:r,className:f(k.overlays.dropdown.header(),"py-1.5",t),...e}));bt.displayName=A.Label.displayName;const be=L.forwardRef(({className:t,children:e,...r},n)=>a.jsxs(A.Item,{ref:n,className:f(k.overlays.dropdown.item(),"relative select-none justify-between pr-8 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[a.jsx(A.ItemText,{children:e}),a.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(A.ItemIndicator,{children:a.jsx(de.Check,{className:"h-4 w-4"})})})]}));be.displayName=A.Item.displayName;const yt=L.forwardRef(({className:t,...e},r)=>a.jsx(A.Separator,{ref:r,className:f("my-1 h-px bg-gray-200 dark:bg-gray-700",t),...e}));yt.displayName=A.Separator.displayName;const We=({size:t="default",variant:e="default",className:r,ariaLabel:n="Loading",loadingText:o="Loading..."})=>{const s=()=>{const c={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 ${c[t]} ${l[e]}`};return a.jsx("div",{className:f(s(),r),role:"status","aria-label":n,children:a.jsx("span",{className:"sr-only",children:o})})},xt=L.forwardRef(({className:t,...e},r)=>a.jsx(Ne.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",t),...e,ref:r,children:a.jsx(Ne.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")})}));xt.displayName=Ne.Root.displayName;const on=({title:t,onAdd:e,addButtonTooltip:r,loading:n,className:o=""})=>a.jsx("div",{className:`p-4 border-b border-gray-200 dark:border-gray-700 ${o}`,children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:t}),a.jsxs("div",{className:"flex items-center space-x-2",children:[n&&a.jsx("div",{className:"w-5 h-5 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"}),e&&a.jsx("button",{onClick:e,className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors",title:r,"aria-label":r||"Add",children:a.jsx("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})})]})]})}),sn=({subsections:t,isExpanded:e,selectedSubsection:r,parentSectionId:n,onSubsectionSelect:o})=>{const s=h.useRef(null),[c,l]=h.useState(void 0);return h.useEffect(()=>{if(s.current){const d=s.current.scrollHeight;l(e?d+8:0)}},[e,t]),a.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:c!==void 0?`${c}px`:"auto"},children:a.jsx("div",{ref:s,className:"ml-6 mt-2 space-y-1",children:t.map(d=>a.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] ${r===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))})})},ln=({sections:t,selectedSection:e,selectedSubsection:r,expandedSections:n,onSectionSelect:o,onSubsectionSelect:s,onToggleSection:c,className:l=""})=>a.jsx("nav",{className:`space-y-2 ${l}`,children:t.map(d=>a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center",children:[a.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] ${e===d.id&&!r?"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&&a.jsx("button",{onClick:()=>c(d.id),className:"p-1 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200",children:a.jsx(w.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&&a.jsx(sn,{subsections:d.subsections,isExpanded:n.includes(d.id),selectedSubsection:r,parentSectionId:d.id,onSubsectionSelect:s})]},d.id))}),cn=t=>{switch(t){case"verified":case"success":return"bg-green-500";case"connected":case"warning":return"bg-amber-500";case"disconnected":case"error":return"bg-red-500";case"pending":return"bg-blue-500";default:return"bg-gray-500"}},dn=t=>{switch(t){case"sm":return"w-1.5 h-1.5";case"lg":return"w-3 h-3";default:return"w-2 h-2"}},gn=({status:t,label:e,showDot:r=!0,size:n="md"})=>{const s=e||{verified:"Verified",connected:"Connected",disconnected:"Disconnected",pending:"Pending",error:"Error",success:"Success",warning:"Warning"}[t],l=((m,p)=>{const b={sm:"small",md:"default",lg:"large"},x={verified:"success",success:"success",connected:"warning",warning:"warning",disconnected:"error",error:"error",pending:"primary"}[m]||"default",v=b[p];return v==="default"?k.badge[x]():k.badge[v](x)})(t,n),d=cn(t),g=dn(n);return a.jsxs("span",{className:l,children:[r&&a.jsx("span",{className:`inline-block ${g} rounded-full ${d} mr-1`}),s]})},vt=({chainType:t,size:e="md"})=>{if(t==="unknown")return null;const r=t==="solana"?"SOL":"ETH",o={sm:"small",md:"default",lg:"large"}[e],s=()=>{const c=t==="solana"?"solana":"ethereum";return o==="default"?k.badge[c]():k.badge[o](c)};return a.jsx("span",{className:s(),children:r})},un=t=>t?t.length<=10?t:`${t.slice(0,6)}...${t.slice(-4)}`:"",wt=({type:t,addressType:e})=>{if(t==="primary")return a.jsx(vt,{chainType:e==="solana"?"solana":"evm",size:"sm"});const r=()=>t.toUpperCase(),n=()=>{switch(t){case"ens":return"bg-green-50 text-green-700 border-green-200 dark:bg-green-900/10 dark:text-green-300 dark:border-green-800";case"sns":return"bg-orange-50 text-orange-700 border-orange-200 dark:bg-orange-900/10 dark:text-orange-300 dark:border-orange-800";default:return"bg-gray-50 text-gray-700 border-gray-200 dark:bg-gray-900/10 dark:text-gray-300 dark:border-gray-800"}};return a.jsx("span",{className:f("inline-flex items-center px-2.5 py-0.5 rounded-md text-xs font-medium border",n()),children:r()})},mn=({domainEmails:t,isExpanded:e,selectedAccount:r,onAccountSelect:n,onAccountSettings:o})=>{const s=h.useRef(null),[c,l]=h.useState(void 0);return h.useEffect(()=>{if(s.current){const d=s.current.scrollHeight;l(e?d+8:0)}},[e,t]),a.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:c!==void 0?`${c}px`:"auto"},children:a.jsx("div",{ref:s,className:"ml-6 mt-2 space-y-1",children:t.map(d=>a.jsxs("button",{onClick:()=>n(d.address),className:f("w-full flex items-center justify-between text-left px-3 py-2 rounded-lg transition-colors h-[44px]",E.body.sm(),r===d.address?"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"hover:bg-gray-100 dark:hover:bg-gray-700"),children:[a.jsx("span",{className:"truncate flex-1",children:d.name}),a.jsx(wt,{type:d.type,addressType:d.addressType})]},d.address))})})},hn=({walletGroups:t,selectedAccount:e,expandedWallets:r,onAccountSelect:n,onToggleWallet:o,onAccountSettings:s,className:c=""})=>a.jsx("nav",{className:f("space-y-1",c),children:t.map(l=>a.jsxs("div",{children:[a.jsxs("button",{onClick:()=>n(l.primaryEmail.address),className:f("w-full flex items-center justify-between text-left px-3 py-2 rounded-lg transition-colors h-[44px]",E.body.sm(),e===l.primaryEmail.address&&l.domainEmails.length===0?"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"hover:bg-gray-100 dark:hover:bg-gray-700"),style:l.customColor?{backgroundColor:l.customColor}:void 0,children:[a.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[a.jsx("span",{className:"truncate flex-1",children:un(l.walletAddress)}),a.jsx(wt,{type:l.primaryEmail.type,addressType:l.addressType})]}),l.domainEmails.length>0&&a.jsx("div",{onClick:d=>{d.stopPropagation(),o(l.walletAddress)},className:"p-1 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors cursor-pointer",role:"button",tabIndex:0,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),d.stopPropagation(),o(l.walletAddress))},children:a.jsx(w.ChevronRightIcon,{className:f("h-4 w-4 text-gray-500 transition-transform duration-300 ease-in-out",r.includes(l.walletAddress)?"rotate-90":"rotate-0")})})]}),l.domainEmails.length>0&&a.jsx(mn,{domainEmails:l.domainEmails,isExpanded:r.includes(l.walletAddress),selectedAccount:e,onAccountSelect:n,onAccountSettings:s})]},l.walletAddress))}),pn=H.Root,kt=L.forwardRef(({className:t,...e},r)=>a.jsx(H.List,{ref:r,className:f(k.navigation.tabs.list(),t),...e}));kt.displayName=H.List.displayName;const Ct=L.forwardRef(({className:t,...e},r)=>a.jsx(H.Trigger,{ref:r,className:f(k.navigation.tabs.trigger(),t),...e}));Ct.displayName=H.Trigger.displayName;const St=L.forwardRef(({className:t,...e},r)=>a.jsx(H.Content,{ref:r,className:f(k.navigation.tabs.content(),t),...e}));St.displayName=H.Content.displayName;const fn=({title:t,description:e,useCases:r,columns:n=3,className:o})=>{const s={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"},c={2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"};return a.jsx("section",{className:f(ya.section.gradient,o),children:a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[(t||e)&&a.jsxs("div",{className:"text-center mb-12",children:[t&&a.jsx("h2",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-4",children:t}),e&&a.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:e})]}),a.jsx("div",{className:f("grid gap-8",c[n]),children:r.map((l,d)=>{const g=l.color?s[l.color]:s.blue;return a.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl p-6 border border-gray-200 dark:border-gray-700 hover:shadow-lg transition-shadow",children:[a.jsx("div",{className:f("flex-shrink-0 mb-4",g),children:l.icon}),a.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-3",children:l.title}),a.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-4",children:l.description}),l.examples&&l.examples.length>0&&a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:"Examples:"}),a.jsx("ul",{className:"space-y-1",children:l.examples.map((m,p)=>a.jsxs("li",{className:"flex items-start",children:[a.jsx("div",{className:f("w-1.5 h-1.5 rounded-full mt-2 mr-2 flex-shrink-0",l.color?`bg-${l.color}-500`:"bg-blue-500")}),a.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:m})]},p))})]})]},d)})})]})})},bn={row:"flex-row","row-reverse":"flex-row-reverse",col:"flex-col","col-reverse":"flex-col-reverse"},yn={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},xn={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},vn={wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},wn={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"},kn=({children:t,direction:e="row",align:r="start",justify:n="start",wrap:o="nowrap",gap:s="0",className:c})=>a.jsx("div",{className:f("flex",bn[e],yn[r],xn[n],vn[o],wn[s],c),children:t}),Cn=$.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"}}),Sn=({children:t,background:e="default",overflow:r="visible",className:n})=>a.jsx("div",{className:f(Cn({background:e,overflow:r}),n),children:t}),Nn=$.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-600 to-purple-600 dark:from-blue-700 dark:to-purple-700"}},defaultVariants:{variant:"default",spacing:"3xl",background:"none"}}),En=({children:t,variant:e="default",spacing:r="3xl",background:n="none",className:o,as:s="section",id:c})=>h.createElement(s,{id:c,className:f(Nn({variant:e,spacing:r,background:n}),o)},t),Nt=({icon:t,title:e="No data",description:r,action:n,className:o})=>a.jsxs("div",{className:f("flex flex-col items-center justify-center py-12 px-4 text-center",o),children:[t&&a.jsx("div",{className:"mb-4 text-gray-400 dark:text-gray-600",children:t}),a.jsx("h3",{className:f(E.heading.h3(),"mb-2"),children:e}),r&&a.jsx("p",{className:f(E.body.sm(),"text-gray-600 dark:text-gray-400 max-w-sm mb-6"),children:r}),n&&a.jsx("div",{className:"mt-4",children:n})]}),In=({message:t="Loading...",size:e="default",fullScreen:r=!1,variant:n="default",className:o})=>{const c={small:{spinner:"small",text:"text-sm"},default:{spinner:"default",text:"text-base"},large:{spinner:"large",text:"text-lg"}}[e],l=r?"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=a.jsxs("div",{className:f(l,o),children:[a.jsx(We,{size:c.spinner,variant:n,className:"mb-4"}),t&&a.jsx("p",{className:f(c.text,"text-gray-600 dark:text-gray-400 text-center max-w-sm"),children:t})]});return r?a.jsx("div",{className:"fixed inset-0 z-50 bg-white/80 dark:bg-gray-900/80 backdrop-blur-sm",children:a.jsxs("div",{className:"flex items-center justify-center min-h-full p-4",children:[a.jsx(We,{size:c.spinner,variant:n,className:"mb-4"}),t&&a.jsx("p",{className:"text-center text-gray-600 dark:text-gray-400 max-w-sm",children:t})]})}):d},Pn=({title:t,subtext:e,className:r})=>a.jsx(Nt,{title:t,description:e,className:r}),je=({label:t,value:e,onChange:r,placeholder:n,required:o=!1,error:s,className:c=""})=>a.jsxs("div",{className:c,children:[a.jsxs(Le,{htmlFor:t.toLowerCase(),className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:[t," ",o&&a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx("input",{id:t.toLowerCase(),type:"email",value:e,onChange:l=>r(l.target.value),placeholder:n,className:`
|
|
32
|
+
`,Ho(p))}}},[e]),o.jsx("div",{ref:m,className:`${h()} ${s}`,children:n})},Vo=({children:e,delay:t=0,className:r=""})=>o.jsx(ye,{animation:"fade-in-up",delay:t,className:r,children:e}),Uo=({children:e,delay:t=0,className:r=""})=>o.jsx(ye,{animation:"fade-in-scale",delay:t,className:r,children:e}),qo=({children:e,className:t=""})=>o.jsx(ye,{animation:"float",className:t,children:e}),Ir=F.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"}}),de=v.forwardRef(({className:e,variant:t,size:r,animation:a,asChild:n=!1,...s},i)=>{const l=n?vt.Slot:"button",c=t||"default",u=r&&r!=="default"&&r!=="icon"?r:void 0,g=f=>f?{sm:"small",lg:"large",default:"default"}[f]||f:"default",h=(()=>{if(c.startsWith("gradient")){const f=c.replace("gradient-","").replace("gradient","primary");return I.button.gradient[f]?.()||I.button.primary.default()}else{if(["wallet","connect","disconnect"].includes(c))return I.button.web3[c]?.()||I.button.primary.default();{const f=g(u);return I.button[c]?.[f]?.()||I.button.primary.default()}}})();return o.jsx(l,{className:w(Ir({size:r,animation:a}),h,e),ref:i,...s})});de.displayName="Button";const Go={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-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 text-yellow-900 dark:text-yellow-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",callout:"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"},Ko={none:"",sm:"p-3",md:"p-6",lg:"p-8"},At=({variant:e="elevated",padding:t="md",icon:r,onClose:a,className:n,children:s,...i})=>{const c=["info","success","warning","error"].includes(e)&&(r||a);return o.jsx("div",{className:w("rounded-lg",Go[e],Ko[t],n),...i,children:c?o.jsxs("div",{className:"flex items-start gap-3",children:[r&&o.jsx("div",{className:"flex-shrink-0 text-lg",children:r}),o.jsx("div",{className:"flex-1 min-w-0",children:s}),a&&o.jsx("button",{onClick:a,className:"flex-shrink-0 text-current hover:opacity-70 transition-opacity","aria-label":"Close",children:o.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):s})},Yo=({title:e,description:t,className:r,children:a,...n})=>o.jsxs("div",{className:w("space-y-1.5",r),...n,children:[e&&o.jsx("h3",{className:$.heading.h4(),children:e}),t&&o.jsx("p",{className:$.body.sm(),children:t}),a]}),Qo=({className:e,children:t,...r})=>o.jsx("div",{className:w("",e),...r,children:t}),Xo=({className:e,children:t,...r})=>o.jsx("div",{className:w("flex items-center pt-4",e),...r,children:t}),Zo=({title:e,children:t,variant:r="info",size:a="default",className:n})=>{const s={sm:"sm",default:"md",lg:"lg"},i=r==="neutral"?"bordered":r;return o.jsxs(At,{variant:i,padding:s[a],className:n,children:[e&&o.jsx("h3",{className:w("font-semibold mb-2",a==="sm"?"text-base":a==="lg"?"text-xl":"text-lg"),children:e}),t]})},Jo=({title:e,icon:t,children:r,variant:a="gradient",size:n="default",centered:s=!1,className:i})=>{const l={sm:"sm",default:"md",lg:"lg"},c=a==="gradient"||a==="neutral"?"callout":a;return o.jsx(At,{variant:c,padding:l[n],className:i,children:o.jsxs("div",{className:w("space-y-4",s&&"text-center"),children:[t&&o.jsx("div",{className:w("font-bold",n==="sm"?"text-2xl":n==="lg"?"text-5xl":"text-4xl",s?"text-center":"text-left"),children:t}),e&&o.jsx("h3",{className:w("font-bold mb-4",n==="sm"?"text-lg":n==="lg"?"text-3xl":"text-2xl"),children:e}),o.jsx("div",{className:w("text-gray-600 dark:text-gray-400",n==="sm"?"text-sm":n==="lg"?"text-lg":"text-base"),children:r})]})})},Ro=F.cva("grid gap-8",{variants:{layout:{grid:"grid-cols-1 md:grid-cols-2",stacked:"grid-cols-1 space-y-8",cards:"grid-cols-1 md:grid-cols-2 gap-6"},spacing:{sm:"gap-4",md:"gap-8",lg:"gap-12"}},defaultVariants:{layout:"grid",spacing:"md"}}),es=F.cva("rounded-xl p-6 transition-all duration-300",{variants:{variant:{traditional:"bg-red-50 dark:bg-red-900/20 border-2 border-red-100 dark:border-red-800/30 hover:border-red-200 dark:hover:border-red-700/50",web3:"bg-green-50 dark:bg-green-900/20 border-2 border-green-100 dark:border-green-800/30 hover:border-green-200 dark:hover:border-green-700/50",neutral:"bg-gray-50 dark:bg-gray-800/50 border-2 border-gray-100 dark:border-gray-700/30 hover:border-gray-200 dark:hover:border-gray-600/50",elevated:"bg-white dark:bg-gray-800 shadow-lg hover:shadow-xl border border-gray-200 dark:border-gray-700"},animation:{none:"",hover:"hover:transform hover:scale-[1.02]",float:"hover:-translate-y-1"}},defaultVariants:{variant:"traditional",animation:"hover"}}),ts=F.cva("text-lg font-bold mb-4 flex items-center gap-3",{variants:{variant:{traditional:"text-red-600 dark:text-red-400",web3:"text-green-600 dark:text-green-400",neutral:"text-gray-900 dark:text-white",elevated:"text-gray-900 dark:text-white"}},defaultVariants:{variant:"traditional"}}),rs={traditional:"❌",web3:"✅",neutral:"ℹ️",elevated:"⭐"},as={red:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300",green:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",blue:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",gray:"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-300"},ns=({className:e,layout:t="grid",spacing:r="md",title:a,subtitle:n,traditional:s,web3:i,cardAnimation:l="hover",animate:c=!0,animationDelay:u=0,traditionalIcon:g,web3Icon:m})=>{const h=(p,x)=>{const k=o.jsxs("div",{className:w(es({variant:p.variant,animation:l})),children:[o.jsxs("div",{className:w(ts({variant:p.variant})),children:[o.jsx("span",{className:"text-2xl",children:p.icon||(x===0?g:m)||rs[p.variant]}),o.jsx("div",{className:"flex-1",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{children:p.title}),p.badge&&o.jsx("span",{className:w("text-xs font-medium px-2 py-1 rounded-full",as[p.badge.color||"gray"]),children:p.badge.text})]})})]}),o.jsx("ul",{className:"space-y-3",children:p.items.map((C,S)=>o.jsxs("li",{className:w("flex items-start gap-3 text-sm leading-relaxed",C.highlight&&"font-medium"),children:[C.icon&&o.jsx("span",{className:"flex-shrink-0 mt-0.5 text-base",children:C.icon}),o.jsxs("div",{className:"flex-1",children:[o.jsx("span",{className:w(p.variant==="traditional"||p.variant==="web3"?"text-gray-700 dark:text-gray-300":"text-gray-600 dark:text-gray-400"),children:C.text}),C.subtext&&o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-500 mt-1",children:C.subtext})]})]},S))})]});return c?o.jsx(ye,{animation:"fade-in-up",delay:u+x*200,children:k},p.title):o.jsx("div",{children:k},p.title)},f=o.jsxs("div",{className:w("space-y-8",e),children:[(a||n)&&o.jsxs("div",{className:"text-center space-y-4",children:[a&&o.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-gray-900 dark:text-white",children:a}),n&&o.jsx("p",{className:"text-lg text-gray-600 dark:text-gray-400 max-w-2xl mx-auto",children:n})]}),o.jsxs("div",{className:w(Ro({layout:t,spacing:r})),children:[h(s,0),h(i,1)]})]});return c?o.jsx(ye,{animation:"fade-in-up",delay:u,children:f}):f},Pt=(e,t,r,a)=>({title:e,variant:r,items:t.map(n=>typeof n=="string"?{text:n}:n),...a}),os=e=>{const t=[{text:"Create account with email/password",icon:"🔑"},{text:"Remember multiple passwords",icon:"🧠"},{text:"Verify email address",icon:"📧"},{text:"Risk of password theft",icon:"⚠️"},{text:"Data stored on company servers",icon:"🏢"},{text:"Account can be locked/suspended",icon:"🔒"}],r=[{text:"Connect your wallet",icon:"🔗"},{text:"No passwords needed",icon:"🚫"},{text:"Instant authentication",icon:"⚡"},{text:"Cryptographically secure",icon:"🔐"},{text:"You own your data",icon:"👑"},{text:"Censorship resistant",icon:"🛡️"}];return{traditional:Pt(e?.traditionalTitle||"Traditional Email",e?.traditionalItems||t,"traditional",{badge:{text:e?.traditionalBadge||"Old Way",color:"red"}}),web3:Pt(e?.web3Title||"Web3 Email",e?.web3Items||r,"web3",{badge:{text:e?.web3Badge||"New Way",color:"green"}})}},ss=F.cva("mx-auto px-4 sm:px-6",{variants:{size:{sm:"max-w-2xl",md:"max-w-4xl",lg:"max-w-6xl",xl:"max-w-7xl lg:px-8",full:"max-w-full",prose:"max-w-prose"},spacing:{none:"",xs:"py-2",sm:"py-3",md:"py-4",lg:"py-6",xl:"py-8","2xl":"py-12","3xl":"py-16"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:"xl",spacing:"md",align:"left"}}),is=({children:e,size:t="xl",spacing:r="md",align:a="left",className:n,as:s="div"})=>b.createElement(s,{className:w(ss({size:t,spacing:r,align:a}),n)},e),ls=({trigger:e,items:t,align:r="right",className:a="",variant:n="default"})=>{const[s,i]=b.useState(!1),l=b.useRef(null);Ar(l,()=>i(!1));const c=m=>{m.disabled||(m.onClick(),i(!1))},u=r==="left"?I.overlays.dropdown.menuRight():I.overlays.dropdown.menuLeft(),g=n==="bordered"?I.overlays.dropdown.triggerBordered():I.overlays.dropdown.trigger();return o.jsxs("div",{className:`${I.overlays.dropdown.container()} ${a}`,ref:l,children:[o.jsx("div",{className:g,onClick:()=>i(!s),children:e}),s&&o.jsx("div",{className:`${I.overlays.dropdown.menu()} ${u} ${I.overlays.dropdown.menuBottom()}`,children:o.jsx("div",{className:I.overlays.dropdown.itemContainer(),children:t.map(m=>m.separator?o.jsx("div",{className:"my-1 h-px bg-gray-200 dark:bg-gray-700",role:"separator"},m.id):o.jsxs("button",{onClick:()=>c(m),disabled:m.disabled,className:`${m.disabled?I.overlays.dropdown.itemDisabled():I.overlays.dropdown.item()} flex items-center gap-2`,children:[m.icon&&o.jsx(m.icon,{className:I.overlays.dropdown.itemIcon()}),o.jsx("span",{children:m.label})]},m.id))})})]})},cs=({icon:e,title:t,description:r,benefits:a,metrics:n,color:s="blue",isHighlight:i=!1,learnMoreUrl:l,cta:c,onClick:u,interactive:g=!1,borderColor:m=!1,className:h})=>{const f={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"},p={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"},x={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"},k=f[s],C=typeof e=="string",S=()=>o.jsxs(o.Fragment,{children:[C?o.jsx("div",{className:"text-4xl mb-4",children:e}):m?o.jsx("div",{className:w("w-12 h-12","rounded-lg","flex items-center justify-center","mb-4",x[s],k),children:e}):o.jsx("div",{className:w("flex-shrink-0 mb-4",k),children:e}),o.jsxs("div",{className:"flex-1",children:[o.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-3",children:t}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-4 leading-relaxed",children:r}),c&&o.jsx("div",{className:"mt-3 mb-4",children:c}),a&&a.length>0&&o.jsx("ul",{className:"space-y-2 mb-4",children:a.map((E,L)=>o.jsxs("li",{className:"flex items-start",children:[o.jsx("div",{className:w("w-2 h-2 rounded-full mt-2 mr-3 flex-shrink-0",`bg-${s}-500`)}),o.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:E})]},L))}),n&&Object.keys(n).length>0&&o.jsx("div",{className:"grid grid-cols-2 gap-4 mt-4",children:Object.entries(n).map(([E,L],T)=>o.jsxs("div",{className:"text-center p-3 bg-gray-50 dark:bg-gray-700/50 rounded-lg",children:[o.jsx("div",{className:w("text-lg font-bold",k),children:L}),o.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:E})]},T))})]})]}),N=w("p-6 rounded-xl shadow-lg hover:shadow-xl transition-all duration-200",m&&p[s],(g||u)&&"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",h),P=E=>{u&&("key"in E?(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),u()):u())};return l?o.jsx("a",{href:l,className:w(N,"block group"),onClick:u?E=>{E.preventDefault(),P(E)}:void 0,children:o.jsx(S,{})}):u?o.jsx("div",{className:N,onClick:P,onKeyDown:P,role:"button",tabIndex:0,"aria-label":t,children:o.jsx(S,{})}):o.jsx("div",{className:N,children:o.jsx(S,{})})},ds=F.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"}}),us=F.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"}}),gs=F.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"}}),ms={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"},fs=({className:e,features:t,columns:r=3,spacing:a="md",cardVariant:n="default",cardAnimation:s="hover",iconSize:i="md",iconStyle:l="gradient",iconPosition:c="center",titleClass:u,descriptionClass:g,animate:m=!0,animationDelay:h=0,staggerDelay:f=100,onFeatureClick:p,defaultLinkText:x="Learn more"})=>{const k=(S,N)=>{if(l==="colorful"&&S.gradient)return{background:`linear-gradient(135deg, ${S.gradient.from}, ${S.gradient.to})`};if(l==="colorful"){const P=[{from:"#3B82F6",to:"#1D4ED8"},{from:"#10B981",to:"#059669"},{from:"#8B5CF6",to:"#7C3AED"},{from:"#F59E0B",to:"#D97706"},{from:"#EF4444",to:"#DC2626"},{from:"#06B6D4",to:"#0891B2"}],E=P[N%P.length];return{background:`linear-gradient(135deg, ${E.from}, ${E.to})`}}},C=(S,N)=>{const P=o.jsxs("div",{className:w(us({variant:n,animation:s})),onClick:()=>p?.(S),role:p?"button":void 0,tabIndex:p?0:void 0,children:[S.badge&&o.jsx("div",{className:"mb-4",children:o.jsx("span",{className:w("inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",ms[S.badge.variant||"default"]),children:S.badge.text})}),o.jsx("div",{className:w(gs({size:i,style:l,position:c})),style:k(S,N),children:o.jsx("div",{className:w("flex items-center justify-center",l==="colorful"?"text-white":"text-blue-600 dark:text-blue-400"),children:S.icon})}),o.jsx("h3",{className:w("text-xl font-bold text-gray-900 dark:text-white mb-4",u),children:S.title}),o.jsx("div",{className:w("text-gray-600 dark:text-gray-300 leading-relaxed",g),children:S.description}),S.link&&o.jsx("div",{className:"mt-6",children:o.jsxs("a",{href:S.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:[S.link.text||x,o.jsx("svg",{className:"w-4 h-4 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})})]});return m?o.jsx(ye,{animation:"fade-in-up",delay:h+N*f,children:P},S.id||N):o.jsx("div",{children:P},S.id||N)};return o.jsx("div",{className:w(ds({columns:r,spacing:a}),e),children:t.map(C)})},Tt=(e,t,r,a)=>({icon:e,title:t,description:r,...a}),hs=e=>[Tt(o.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.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."),Tt(o.jsx("svg",{className:"w-8 h-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.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.")],ps=({badgeIcon:e,badgeText:t,badgeColor:r="blue",title:a,subtitle:n,description:s,primaryButton:i,secondaryButton:l,className:c,children:u})=>{const m={blue:"bg-blue-100 dark:bg-blue-900/30 border-blue-300 dark:border-blue-700 text-blue-800 dark:text-blue-200",green:"bg-green-100 dark:bg-green-900/30 border-green-300 dark:border-green-700 text-green-800 dark:text-green-200",purple:"bg-purple-100 dark:bg-purple-900/30 border-purple-300 dark:border-purple-700 text-purple-800 dark:text-purple-200",orange:"bg-orange-100 dark:bg-orange-900/30 border-orange-300 dark:border-orange-700 text-orange-800 dark:text-orange-200",pink:"bg-pink-100 dark:bg-pink-900/30 border-pink-300 dark:border-pink-700 text-pink-800 dark:text-pink-200",gray:"bg-gray-100 dark:bg-gray-900/30 border-gray-300 dark:border-gray-700 text-gray-800 dark:text-gray-200"}[r];return o.jsx("section",{className:w("py-20",c),children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[o.jsxs("div",{className:w("inline-flex items-center border px-6 py-3 rounded-full mb-6",m),children:[e&&o.jsx("span",{className:"mr-3",children:e}),o.jsx("span",{className:"font-semibold",children:t})]}),o.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-gray-900 dark:text-gray-100 mb-6",children:[typeof a=="string"?o.jsx("span",{dangerouslySetInnerHTML:{__html:a}}):a,n&&o.jsx("span",{className:"text-blue-600 dark:text-blue-400 block",children:n})]}),o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 mb-8 max-w-4xl mx-auto leading-relaxed",children:s}),(i||l)&&o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center mb-8",children:[i&&o.jsx(de,{size:"lg",...i,className:w("px-8 py-3",i.className),children:i.text}),l&&o.jsx(de,{variant:"outline",size:"lg",...l,className:w("px-8 py-3",l.className),children:l.text})]}),u]})})},Lr=v.forwardRef(({className:e,type:t,...r},a)=>o.jsx("input",{type:t,className:w(I.input.default(),e),ref:a,...r}));Lr.displayName="Input";const ys=F.cva(`${$.label.default()} peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),It=v.forwardRef(({className:e,...t},r)=>o.jsx(mr.Root,{ref:r,className:w(ys(),e),...t}));It.displayName=mr.Root.displayName;const bs=({title:e,description:t,metrics:r,columns:a=3,className:n})=>{const s={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"},i={2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"};return o.jsx("section",{className:w("py-16",n),children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[(e||t)&&o.jsxs("div",{className:"text-center mb-12",children:[e&&o.jsx("h2",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-4",children:e}),t&&o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t})]}),o.jsx("div",{className:w("grid gap-8",i[a]),children:r.map((l,c)=>{const u=l.color?s[l.color]:s.blue;return o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl p-6 border border-gray-200 dark:border-gray-700 text-center hover:shadow-lg transition-shadow",children:[l.icon&&o.jsx("div",{className:w("flex justify-center mb-4",u),children:l.icon}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("div",{className:w("text-3xl font-bold",u),children:l.value}),o.jsx("div",{className:"text-gray-600 dark:text-gray-400 font-medium",children:l.label}),l.trend&&o.jsxs("div",{className:w("text-sm font-semibold",l.trend.direction==="up"?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:[l.trend.direction==="up"?"↑":"↓"," ",l.trend.value]})]})]},c)})})]})})},xs=({title:e,description:t,steps:r,orientation:a="vertical",color:n="blue",className:s})=>{const l={blue:{bg:"bg-blue-600",text:"text-blue-600 dark:text-blue-400",border:"border-blue-200 dark:border-blue-800"},green:{bg:"bg-green-600",text:"text-green-600 dark:text-green-400",border:"border-green-200 dark:border-green-800"},purple:{bg:"bg-purple-600",text:"text-purple-600 dark:text-purple-400",border:"border-purple-200 dark:border-purple-800"},orange:{bg:"bg-orange-600",text:"text-orange-600 dark:text-orange-400",border:"border-orange-200 dark:border-orange-800"},pink:{bg:"bg-pink-600",text:"text-pink-600 dark:text-pink-400",border:"border-pink-200 dark:border-pink-800"},gray:{bg:"bg-gray-600",text:"text-gray-600 dark:text-gray-400",border:"border-gray-200 dark:border-gray-800"}}[n];return o.jsx("section",{className:w("py-16",s),children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[(e||t)&&o.jsxs("div",{className:"text-center mb-12",children:[e&&o.jsx("h2",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-4",children:e}),t&&o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t})]}),o.jsx("div",{className:w(a==="horizontal"?"flex flex-col lg:flex-row justify-center items-center lg:items-start space-y-8 lg:space-y-0 lg:space-x-8":"space-y-8 max-w-4xl mx-auto"),children:r.map((c,u)=>o.jsxs("div",{className:w("relative",a==="horizontal"?"flex-1 text-center lg:text-left":"flex items-start"),children:[o.jsx("div",{className:w("flex-shrink-0 flex items-center justify-center rounded-full text-white font-bold",l.bg,a==="horizontal"?"w-12 h-12 mx-auto lg:mx-0 mb-4":"w-10 h-10 mr-4 mt-1"),children:c.icon?c.icon:c.step}),u<r.length-1&&a==="vertical"&&o.jsx("div",{className:w("absolute left-5 top-12 w-px h-8 -ml-px",l.bg.replace("bg-","bg-").replace("-600","-200"),"dark:"+l.bg.replace("bg-","bg-").replace("-600","-800"))}),o.jsxs("div",{className:w(a==="horizontal"?"flex-1":"flex-1 min-w-0"),children:[o.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:c.title}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-3",children:c.description}),c.details&&c.details.length>0&&o.jsx("ul",{className:"space-y-1",children:c.details.map((g,m)=>o.jsxs("li",{className:"flex items-start",children:[o.jsx("div",{className:w("w-1.5 h-1.5 rounded-full mt-2 mr-2 flex-shrink-0",l.bg)}),o.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:g})]},m))})]})]},u))})]})})},vs=({children:e,onRefresh:t,disabled:r=!1,refreshingText:a="Refreshing...",pullDownText:n="Pull down to refresh",releaseText:s="Release to refresh",threshold:i=80,maxPullDistance:l=120,className:c=""})=>{const[u,g]=b.useState(0),[m,h]=b.useState(!1),[f,p]=b.useState(!1),x=b.useRef(0),k=b.useRef(null);b.useEffect(()=>{const E=k.current;if(!E)return;const L=z=>{if(r||m)return;E.scrollTop<=0&&(x.current=z.touches[0].clientY,p(!0))},T=z=>{if(!f)return;const W=z.touches[0].clientY-x.current;if(W>0&&E.scrollTop<=0){const V=Math.min(W/l,1),B=Math.min(W*(1-V*.5),l);g(B),W>10&&z.preventDefault()}},D=async()=>{if(f)if(p(!1),u>=i&&!m){h(!0);try{await t()}catch{}finally{h(!1),g(0)}}else g(0)};return E.addEventListener("touchstart",L,{passive:!0}),E.addEventListener("touchmove",T,{passive:!1}),E.addEventListener("touchend",D),()=>{E.removeEventListener("touchstart",L),E.removeEventListener("touchmove",T),E.removeEventListener("touchend",D)}},[r,m,f,u,i,l,t]);const C=Math.min(u/i,1),S=f||m,N=f?u:m?i:0,P=()=>m?a:u>=i?s:n;return o.jsxs("div",{ref:k,className:`relative ${c}`,style:{height:"100%",overflowY:"auto",WebkitOverflowScrolling:"touch"},children:[o.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:`${N}px`,marginTop:f?0:`-${N}px`,opacity:S?1:0,pointerEvents:"none"},children:o.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[o.jsx(A.ArrowPathIcon,{className:`w-6 h-6 text-blue-600 dark:text-blue-400 transition-transform duration-200 ${m?"animate-spin":""}`,style:{transform:`rotate(${C*360}deg)`}}),u>20&&o.jsx("span",{className:"text-xs font-medium text-blue-600 dark:text-blue-400",children:P()})]})}),o.jsx("div",{style:{paddingTop:f?`${u}px`:0,transition:f?"none":"padding-top 200ms ease-out"},children:e})]})},Lt=H.Root,ws=H.Group,$r=H.Value,Ze=v.forwardRef(({className:e,children:t,...r},a)=>o.jsxs(H.Trigger,{ref:a,className:w("flex h-9 w-full items-center justify-between rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:ring-offset-gray-950 transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,o.jsx(H.Icon,{asChild:!0,children:o.jsx(Ge.ChevronDown,{className:"h-4 w-4 opacity-50 ml-2 flex-shrink-0"})})]}));Ze.displayName=H.Trigger.displayName;const $t=v.forwardRef(({className:e,...t},r)=>o.jsx(H.ScrollUpButton,{ref:r,className:w("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(Ge.ChevronUp,{className:"h-4 w-4"})}));$t.displayName=H.ScrollUpButton.displayName;const Ot=v.forwardRef(({className:e,...t},r)=>o.jsx(H.ScrollDownButton,{ref:r,className:w("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(Ge.ChevronDown,{className:"h-4 w-4"})}));Ot.displayName=H.ScrollDownButton.displayName;const Je=v.forwardRef(({className:e,children:t,position:r="popper",...a},n)=>o.jsx(H.Portal,{children:o.jsxs(H.Content,{ref:n,className:w(I.overlays.dropdown.menu(),"z-[1000000] max-h-96 min-w-[8rem] overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...a,children:[o.jsx($t,{}),o.jsx(H.Viewport,{className:w(I.overlays.dropdown.itemContainer(),r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),o.jsx(Ot,{})]})}));Je.displayName=H.Content.displayName;const Or=v.forwardRef(({className:e,...t},r)=>o.jsx(H.Label,{ref:r,className:w(I.overlays.dropdown.header(),"py-1.5",e),...t}));Or.displayName=H.Label.displayName;const Re=v.forwardRef(({className:e,children:t,...r},a)=>o.jsxs(H.Item,{ref:a,className:w(I.overlays.dropdown.item(),"relative select-none justify-between pr-8 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[o.jsx(H.ItemText,{children:t}),o.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(H.ItemIndicator,{children:o.jsx(Ge.Check,{className:"h-4 w-4"})})})]}));Re.displayName=H.Item.displayName;const Mr=v.forwardRef(({className:e,...t},r)=>o.jsx(H.Separator,{ref:r,className:w("my-1 h-px bg-gray-200 dark:bg-gray-700",e),...t}));Mr.displayName=H.Separator.displayName;const Mt=({size:e="default",variant:t="default",className:r,ariaLabel:a="Loading",loadingText:n="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[t]}`};return o.jsx("div",{className:w(s(),r),role:"status","aria-label":a,children:o.jsx("span",{className:"sr-only",children:n})})},Dr=v.forwardRef(({className:e,...t},r)=>o.jsx(wt.Root,{className:w("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),...t,ref:r,children:o.jsx(wt.Thumb,{className:w("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")})}));Dr.displayName=wt.Root.displayName;const ks=({title:e,onAdd:t,addButtonTooltip:r,loading:a,className:n=""})=>o.jsx("div",{className:`p-4 border-b border-gray-200 dark:border-gray-700 ${n}`,children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:e}),o.jsxs("div",{className:"flex items-center space-x-2",children:[a&&o.jsx("div",{className:"w-5 h-5 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"}),t&&o.jsx("button",{onClick:t,className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors",title:r,"aria-label":r||"Add",children:o.jsx("svg",{className:"w-5 h-5 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})})]})]})}),Cs=({subsections:e,isExpanded:t,selectedSubsection:r,parentSectionId:a,onSubsectionSelect:n})=>{const s=b.useRef(null),[i,l]=b.useState(void 0);return b.useEffect(()=>{if(s.current){const c=s.current.scrollHeight;l(t?c+8:0)}},[t,e]),o.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:i!==void 0?`${i}px`:"auto"},children:o.jsx("div",{ref:s,className:"ml-6 mt-2 space-y-1",children:e.map(c=>o.jsx("button",{onClick:()=>n?.(c.id,a),className:`block w-full text-left px-3 py-2 rounded-md text-sm transition-all duration-200 hover:scale-[1.02] ${r===c.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:c.title},c.id))})})},Ss=({sections:e,selectedSection:t,selectedSubsection:r,expandedSections:a,onSectionSelect:n,onSubsectionSelect:s,onToggleSection:i,className:l=""})=>o.jsx("nav",{className:`space-y-2 ${l}`,children:e.map(c=>o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center",children:[o.jsx("button",{onClick:()=>n(c.id),className:`flex-1 text-left px-3 py-2 rounded-md text-sm font-medium transition-all duration-200 hover:scale-[1.02] ${t===c.id&&!r?"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:c.title}),c.subsections&&c.subsections.length>0&&o.jsx("button",{onClick:()=>i(c.id),className:"p-1 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200",children:o.jsx(A.ChevronRightIcon,{className:`h-4 w-4 text-gray-500 transition-transform duration-300 ease-in-out ${a.includes(c.id)?"rotate-90":"rotate-0"}`})})]}),c.subsections&&o.jsx(Cs,{subsections:c.subsections,isExpanded:a.includes(c.id),selectedSubsection:r,parentSectionId:c.id,onSubsectionSelect:s})]},c.id))}),Ns=e=>{switch(e){case"verified":case"success":return"bg-green-500";case"connected":case"warning":return"bg-amber-500";case"disconnected":case"error":return"bg-red-500";case"pending":return"bg-blue-500";default:return"bg-gray-500"}},Es=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"}},As=({status:e,label:t,showDot:r=!0,size:a="md"})=>{const s=t||{verified:"Verified",connected:"Connected",disconnected:"Disconnected",pending:"Pending",error:"Error",success:"Success",warning:"Warning"}[e],l=((g,m)=>{const h={sm:"small",md:"default",lg:"large"},p={verified:"success",success:"success",connected:"warning",warning:"warning",disconnected:"error",error:"error",pending:"primary"}[g]||"default",x=h[m];return x==="default"?I.badge[p]():I.badge[x](p)})(e,a),c=Ns(e),u=Es(a);return o.jsxs("span",{className:l,children:[r&&o.jsx("span",{className:`inline-block ${u} rounded-full ${c} mr-1`}),s]})},zr=({chainType:e,size:t="md"})=>{if(e==="unknown")return null;const r=e==="solana"?"SOL":"ETH",n={sm:"small",md:"default",lg:"large"}[t],s=()=>{const i=e==="solana"?"solana":"ethereum";return n==="default"?I.badge[i]():I.badge[n](i)};return o.jsx("span",{className:s(),children:r})},Ps=e=>e?e.length<=10?e:`${e.slice(0,6)}...${e.slice(-4)}`:"",Wr=({type:e,addressType:t})=>{if(e==="primary")return o.jsx(zr,{chainType:t==="solana"?"solana":"evm",size:"sm"});const r=()=>e.toUpperCase(),a=()=>{switch(e){case"ens":return"bg-green-50 text-green-700 border-green-200 dark:bg-green-900/10 dark:text-green-300 dark:border-green-800";case"sns":return"bg-orange-50 text-orange-700 border-orange-200 dark:bg-orange-900/10 dark:text-orange-300 dark:border-orange-800";default:return"bg-gray-50 text-gray-700 border-gray-200 dark:bg-gray-900/10 dark:text-gray-300 dark:border-gray-800"}};return o.jsx("span",{className:w("inline-flex items-center px-2.5 py-0.5 rounded-md text-xs font-medium border",a()),children:r()})},Ts=({domainEmails:e,isExpanded:t,selectedAccount:r,onAccountSelect:a,onAccountSettings:n})=>{const s=b.useRef(null),[i,l]=b.useState(void 0);return b.useEffect(()=>{if(s.current){const c=s.current.scrollHeight;l(t?c+8:0)}},[t,e]),o.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:i!==void 0?`${i}px`:"auto"},children:o.jsx("div",{ref:s,className:"ml-6 mt-2 space-y-1",children:e.map(c=>o.jsxs("button",{onClick:()=>a(c.address),className:w("w-full flex items-center justify-between text-left px-3 py-2 rounded-lg transition-colors h-[44px]",$.body.sm(),r===c.address?"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"hover:bg-gray-100 dark:hover:bg-gray-700"),children:[o.jsx("span",{className:"truncate flex-1",children:c.name}),o.jsx(Wr,{type:c.type,addressType:c.addressType})]},c.address))})})},Is=({walletGroups:e,selectedAccount:t,expandedWallets:r,onAccountSelect:a,onToggleWallet:n,onAccountSettings:s,className:i=""})=>o.jsx("nav",{className:w("space-y-1",i),children:e.map(l=>o.jsxs("div",{children:[o.jsxs("button",{onClick:()=>a(l.primaryEmail.address),className:w("w-full flex items-center justify-between text-left px-3 py-2 rounded-lg transition-colors h-[44px]",$.body.sm(),t===l.primaryEmail.address&&l.domainEmails.length===0?"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"hover:bg-gray-100 dark:hover:bg-gray-700"),style:l.customColor?{backgroundColor:l.customColor}:void 0,children:[o.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[o.jsx("span",{className:"truncate flex-1",children:Ps(l.walletAddress)}),o.jsx(Wr,{type:l.primaryEmail.type,addressType:l.addressType})]}),l.domainEmails.length>0&&o.jsx("div",{onClick:c=>{c.stopPropagation(),n(l.walletAddress)},className:"p-1 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors cursor-pointer",role:"button",tabIndex:0,onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),c.stopPropagation(),n(l.walletAddress))},children:o.jsx(A.ChevronRightIcon,{className:w("h-4 w-4 text-gray-500 transition-transform duration-300 ease-in-out",r.includes(l.walletAddress)?"rotate-90":"rotate-0")})})]}),l.domainEmails.length>0&&o.jsx(Ts,{domainEmails:l.domainEmails,isExpanded:r.includes(l.walletAddress),selectedAccount:t,onAccountSelect:a,onAccountSettings:s})]},l.walletAddress))}),Ls=e=>{switch(e){case"cog":return A.Cog6ToothIcon;case"arrow-right":return A.ArrowRightIcon;case"shield":return A.ShieldCheckIcon;case"reply":case"chat":return A.ChatBubbleLeftRightIcon;case"filter":return A.FunnelIcon;case"plug":return A.LinkIcon;case"adjustments":return A.AdjustmentsHorizontalIcon;case"currency-dollar":return A.CurrencyDollarIcon;default:return A.Cog6ToothIcon}},$s=({settings:e,selectedSetting:t,onSettingSelect:r,className:a=""})=>o.jsx("nav",{className:w("space-y-1",a),"aria-label":"Settings navigation",children:o.jsx("ul",{className:"space-y-1",role:"list",children:e.map(n=>{const s=Ls(n.icon),i=t===n.id;return o.jsx("li",{children:o.jsx("button",{onClick:()=>r(n.id),className:w("w-full flex items-center text-left px-3 py-2 rounded-lg transition-colors h-[44px]",$.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:n.description,children:o.jsxs("div",{className:"flex items-center flex-1 min-w-0",children:[o.jsx(s,{className:"h-5 w-5 mr-3 flex-shrink-0","aria-hidden":"true"}),o.jsx("span",{className:"truncate",children:n.title})]})})},n.id)})})}),Os=he.Root,Br=v.forwardRef(({className:e,...t},r)=>o.jsx(he.List,{ref:r,className:w(I.navigation.tabs.list(),e),...t}));Br.displayName=he.List.displayName;const jr=v.forwardRef(({className:e,...t},r)=>o.jsx(he.Trigger,{ref:r,className:w(I.navigation.tabs.trigger(),e),...t}));jr.displayName=he.Trigger.displayName;const Fr=v.forwardRef(({className:e,...t},r)=>o.jsx(he.Content,{ref:r,className:w(I.navigation.tabs.content(),e),...t}));Fr.displayName=he.Content.displayName;const Ms=({title:e,description:t,useCases:r,columns:a=3,className:n})=>{const s={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"},i={2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"};return o.jsx("section",{className:w($o.section.gradient,n),children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[(e||t)&&o.jsxs("div",{className:"text-center mb-12",children:[e&&o.jsx("h2",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-4",children:e}),t&&o.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300 max-w-3xl mx-auto",children:t})]}),o.jsx("div",{className:w("grid gap-8",i[a]),children:r.map((l,c)=>{const u=l.color?s[l.color]:s.blue;return o.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl p-6 border border-gray-200 dark:border-gray-700 hover:shadow-lg transition-shadow",children:[o.jsx("div",{className:w("flex-shrink-0 mb-4",u),children:l.icon}),o.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-3",children:l.title}),o.jsx("p",{className:"text-gray-600 dark:text-gray-300 mb-4",children:l.description}),l.examples&&l.examples.length>0&&o.jsxs("div",{children:[o.jsx("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:"Examples:"}),o.jsx("ul",{className:"space-y-1",children:l.examples.map((g,m)=>o.jsxs("li",{className:"flex items-start",children:[o.jsx("div",{className:w("w-1.5 h-1.5 rounded-full mt-2 mr-2 flex-shrink-0",l.color?`bg-${l.color}-500`:"bg-blue-500")}),o.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:g})]},m))})]})]},c)})})]})})},Ds={row:"flex-row","row-reverse":"flex-row-reverse",col:"flex-col","col-reverse":"flex-col-reverse"},zs={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},Ws={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},Bs={wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},js={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"},Fs=({children:e,direction:t="row",align:r="start",justify:a="start",wrap:n="nowrap",gap:s="0",className:i})=>o.jsx("div",{className:w("flex",Ds[t],zs[r],Ws[a],Bs[n],js[s],i),children:e}),_s=F.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"}}),Hs=({children:e,background:t="default",overflow:r="visible",className:a})=>o.jsx("div",{className:w(_s({background:t,overflow:r}),a),children:e}),Vs=F.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-600 to-purple-600 dark:from-blue-700 dark:to-purple-700"}},defaultVariants:{variant:"default",spacing:"3xl",background:"none"}}),Us=({children:e,variant:t="default",spacing:r="3xl",background:a="none",className:n,as:s="section",id:i})=>b.createElement(s,{id:i,className:w(Vs({variant:t,spacing:r,background:a}),n)},e),_r=({icon:e,title:t="No data",description:r,action:a,className:n})=>o.jsxs("div",{className:w("flex flex-col items-center justify-center py-12 px-4 text-center",n),children:[e&&o.jsx("div",{className:"mb-4 text-gray-400 dark:text-gray-600",children:e}),o.jsx("h3",{className:w($.heading.h3(),"mb-2"),children:t}),r&&o.jsx("p",{className:w($.body.sm(),"text-gray-600 dark:text-gray-400 max-w-sm mb-6"),children:r}),a&&o.jsx("div",{className:"mt-4",children:a})]}),qs=({message:e="Loading...",size:t="default",fullScreen:r=!1,variant:a="default",className:n})=>{const i={small:{spinner:"small",text:"text-sm"},default:{spinner:"default",text:"text-base"},large:{spinner:"large",text:"text-lg"}}[t],l=r?"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",c=o.jsxs("div",{className:w(l,n),children:[o.jsx(Mt,{size:i.spinner,variant:a,className:"mb-4"}),e&&o.jsx("p",{className:w(i.text,"text-gray-600 dark:text-gray-400 text-center max-w-sm"),children:e})]});return r?o.jsx("div",{className:"fixed inset-0 z-50 bg-white/80 dark:bg-gray-900/80 backdrop-blur-sm",children:o.jsxs("div",{className:"flex items-center justify-center min-h-full p-4",children:[o.jsx(Mt,{size:i.spinner,variant:a,className:"mb-4"}),e&&o.jsx("p",{className:"text-center text-gray-600 dark:text-gray-400 max-w-sm",children:e})]})}):c},Gs=({title:e,subtext:t,className:r})=>o.jsx(_r,{title:e,description:t,className:r}),Dt=({label:e,value:t,onChange:r,placeholder:a,required:n=!1,error:s,className:i=""})=>o.jsxs("div",{className:i,children:[o.jsxs(It,{htmlFor:e.toLowerCase(),className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:[e," ",n&&o.jsx("span",{className:"text-red-500",children:"*"})]}),o.jsx("input",{id:e.toLowerCase(),type:"email",value:t,onChange:l=>r(l.target.value),placeholder:a,className:`
|
|
33
33
|
mt-1 block w-full px-3 py-2 border rounded-md shadow-sm
|
|
34
34
|
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500
|
|
35
35
|
dark:bg-gray-800 dark:border-gray-600 dark:text-white
|
|
36
36
|
${s?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
|
|
37
|
-
`}),s&&
|
|
37
|
+
`}),s&&o.jsx("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400",children:s})]}),zt=({isVisible:e,onToggle:t,showLabel:r,hideLabel:a,...n})=>{const s=e?a:r;return o.jsxs("div",{children:[o.jsxs("button",{type:"button",onClick:t,className:"flex items-center text-sm text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 mb-2",children:[e?o.jsx(A.ChevronUpIcon,{className:"h-4 w-4 mr-1"}):o.jsx(A.ChevronDownIcon,{className:"h-4 w-4 mr-1"}),s]}),e&&o.jsx(Dt,{...n})]})},Ks=({to:e,onToChange:t,cc:r="",onCcChange:a,bcc:n="",onBccChange:s,showCc:i=!1,showBcc:l=!1,onToggleCc:c,onToggleBcc:u,errors:g={},className:m="",labels:h={},placeholders:f={}})=>{const p={to:"To",cc:"CC",bcc:"BCC",addCc:"Add CC",removeCc:"Remove CC",addBcc:"Add BCC",removeBcc:"Remove BCC"},x={to:"recipient@example.com",cc:"cc@example.com",bcc:"bcc@example.com"},k={...p,...h},C={...x,...f};return o.jsxs("div",{className:`space-y-4 ${m}`,children:[o.jsx(Dt,{label:k.to,value:e,onChange:t,placeholder:C.to,required:!0,error:g.to}),c&&a&&o.jsx(zt,{label:k.cc,value:r,onChange:a,placeholder:C.cc,error:g.cc,isVisible:i,onToggle:c,showLabel:k.addCc,hideLabel:k.removeCc}),u&&s&&o.jsx(zt,{label:k.bcc,value:n,onChange:s,placeholder:C.bcc,error:g.bcc,isVisible:l,onToggle:u,showLabel:k.addBcc,hideLabel:k.removeBcc})]})},et=({label:e,required:t=!1,error:r,helpText:a,children:n,layout:s="vertical",className:i="",labelClassName:l="",contentClassName:c=""})=>{const u=s==="horizontal";return o.jsxs("div",{className:`${u?"grid grid-cols-1 md:grid-cols-3 gap-4 items-start":"space-y-2"} ${i}`,children:[o.jsxs("div",{className:u?"md:col-span-1":"",children:[o.jsxs("label",{className:`block text-sm font-medium text-gray-700 dark:text-gray-300 ${l}`,children:[e,t&&o.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),a&&!r&&o.jsxs("div",{className:"mt-1 flex items-start",children:[o.jsx(A.InformationCircleIcon,{className:"h-4 w-4 text-gray-400 mr-1 mt-0.5 flex-shrink-0"}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:a})]})]}),o.jsxs("div",{className:`${u?"md:col-span-2":""} ${c}`,children:[o.jsx("div",{className:r?"relative":"",children:n}),r&&o.jsxs("div",{className:"mt-1 flex items-start",children:[o.jsx(A.ExclamationCircleIcon,{className:"h-4 w-4 text-red-500 mr-1 mt-0.5 flex-shrink-0"}),o.jsx("p",{className:"text-xs text-red-600 dark:text-red-400",children:r})]})]})]})},Ys=({label:e,value:t,onChange:r,placeholder:a,required:n=!1,error:s,helpText:i,type:l="text",layout:c="vertical",className:u=""})=>o.jsx(et,{label:e,required:n,error:s,helpText:i,layout:c,className:u,children:o.jsx("input",{type:l,value:t,onChange:g=>r(g.target.value),placeholder:a,className:`
|
|
38
38
|
block w-full px-3 py-2 border rounded-md shadow-sm
|
|
39
39
|
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500
|
|
40
40
|
dark:bg-gray-800 dark:border-gray-600 dark:text-white
|
|
41
41
|
transition-colors duration-200
|
|
42
42
|
${s?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
|
|
43
|
-
`})}),
|
|
43
|
+
`})}),Qs=({label:e,value:t,onChange:r,placeholder:a,required:n=!1,error:s,helpText:i,rows:l=4,layout:c="vertical",className:u=""})=>o.jsx(et,{label:e,required:n,error:s,helpText:i,layout:c,className:u,children:o.jsx("textarea",{value:t,onChange:g=>r(g.target.value),placeholder:a,rows:l,className:`
|
|
44
44
|
block w-full px-3 py-2 border rounded-md shadow-sm
|
|
45
45
|
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500
|
|
46
46
|
dark:bg-gray-800 dark:border-gray-600 dark:text-white
|
|
47
47
|
transition-colors duration-200 resize-vertical
|
|
48
48
|
${s?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
|
|
49
|
-
`})}),
|
|
49
|
+
`})}),Xs=({label:e,value:t,onChange:r,options:a,required:n=!1,error:s,helpText:i,placeholder:l="Select an option",layout:c="vertical",className:u=""})=>o.jsx(et,{label:e,required:n,error:s,helpText:i,layout:c,className:u,children:o.jsxs("select",{value:t,onChange:g=>r(g.target.value),className:`
|
|
50
50
|
block w-full px-3 py-2 border rounded-md shadow-sm
|
|
51
51
|
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500
|
|
52
52
|
dark:bg-gray-800 dark:border-gray-600 dark:text-white
|
|
53
53
|
transition-colors duration-200
|
|
54
54
|
${s?"border-red-300 focus:ring-red-500 focus:border-red-500":"border-gray-300 dark:border-gray-600"}
|
|
55
|
-
`,children:[l&&a.jsx("option",{value:"",disabled:!0,children:l}),n.map(m=>a.jsx("option",{value:m.value,disabled:m.disabled,children:m.label},m.value))]})}),Mn={success:"bg-green-500",error:"bg-red-500",warning:"bg-yellow-500",info:"bg-blue-500",neutral:"bg-gray-500"},zn={xs:"w-1.5 h-1.5",sm:"w-2 h-2",md:"w-3 h-3",lg:"w-4 h-4"},On=({status:t,size:e="sm",pulse:r=!1,className:n})=>a.jsx("div",{className:f("rounded-full flex-shrink-0",Mn[t],zn[e],r&&"animate-pulse",n)}),Wn={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"}},jn={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"}},Bn=({icon:t,text:e,variant:r="default",size:n="md",className:o})=>{const s=Wn[r],c=jn[n];return a.jsxs("div",{className:f("inline-flex items-center rounded-full mb-6",s.container,c.container,o),children:[a.jsx("div",{className:f("animate-float-icon",s.icon,c.icon),children:t}),a.jsx("span",{className:c.text,children:e})]})},Dn=$.cva("",{variants:{variant:{hero:E.heading.display.hero(),display:E.heading.display.lg(),h1:E.heading.h1(),h2:E.heading.h2(),h3:E.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"}}),Fn=({children:t,variant:e="h1",responsive:r=!0,align:n="left",color:o="default",className:s,as:c})=>{const l=c||(e==="hero"||e==="display"||e==="h1"?"h1":e==="h2"?"h2":"h3");return a.jsx(l,{className:f(Dn({variant:e,responsive:r,align:n,color:o}),s),children:t})},_n=$.cva("",{variants:{variant:{h2:E.heading.h2(),h3:E.heading.h3(),h4:E.heading.h4(),h5:E.heading.h5(),h6:E.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"}}),qn=({children:t,variant:e="h2",spacing:r="md",align:n="left",className:o,as:s})=>{const c=s||e;return h.createElement(c,{className:f(_n({variant:e,spacing:r,align:n}),o)},t)},Hn=$.cva("",{variants:{variant:{body:E.body.md(),lead:E.body.lg(),large:E.body.lg(),small:E.body.sm(),caption:E.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"}}),Vn=({children:t,variant:e="body",color:r="default",align:n="left",className:o,as:s="p"})=>h.createElement(s,{className:f(Hn({variant:e,color:r,align:n}),o)},t),Un=$.cva(E.link.default(),{variants:{variant:{default:E.link.default(),subtle:E.link.subtle(),muted:E.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}}),Gn=({children:t,href:e,variant:r="default",external:n=!1,className:o,target:s,rel:c})=>a.jsxs("a",{href:e,target:s||(n?"_blank":void 0),rel:c||(n?"noopener noreferrer":void 0),className:f(Un({variant:r,external:n}),o),children:[t,n&&a.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.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"})})]}),xe=$.cva("transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-sm",{variants:{variant:{subtle:E.link.subtle(),default:E.link.default(),muted:E.link.muted(),external:E.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"}}),De=L.forwardRef(({className:t,variant:e,size:r,to:n,href:o,external:s,children:c,...l},d)=>{const g=n||o;return g?s||g.startsWith("http")||g.startsWith("mailto:")?a.jsx("a",{className:f(xe({variant:e==="subtle"?"external":e,size:r,className:t})),href:g,target:"_blank",rel:"noopener noreferrer",ref:d,...l,children:c}):a.jsx(ge.Link,{className:f(xe({variant:e,size:r,className:t})),to:g,ref:d,...l,children:c}):a.jsx("span",{className:f(xe({variant:e,size:r,className:t})),...l,children:c})});De.displayName="SmartLink";const Kn=(t,e)=>L.useMemo(()=>{let r=t;return Object.entries(e).forEach(([n,o])=>{const s=new RegExp(`\\b${n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");r=r.replace(s,c=>`<SmartLink to="${o}" variant="subtle">${c}</SmartLink>`)}),r},[t,e]),Qn={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"},Yn=({children:t,mappings:e=Qn,className:r,variant:n="subtle"})=>{const o=L.useMemo(()=>{if(!t||typeof t!="string")return t||"";let c=t;return Object.entries(e).sort(([d],[g])=>g.length-d.length).forEach(([d,g])=>{if(d&&g){const m=new RegExp(`\\b${d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");c=c.replace(m,p=>`__LINK_START__${g}__LINK_MID__${p}__LINK_END__`)}}),c},[t,e]);if(!o||typeof o!="string")return a.jsx("span",{className:r,children:t});const s=o.split(/(__LINK_START__.*?__LINK_END__)/);return a.jsx("span",{className:r,children:s.map((c,l)=>{const d=c.match(/__LINK_START__(.*?)__LINK_MID__(.*?)__LINK_END__/);if(d){const[,g,m]=d;return a.jsx(De,{to:g,variant:n,children:m},l)}return c})})},Et=({isOpen:t,onClose:e,title:r,size:n="medium",variant:o="default",overlay:s="default",showCloseButton:c=!0,closeOnOverlayClick:l=!0,closeOnEscape:d=!0,children:g,className:m,"aria-labelledby":p,"aria-describedby":b,closeAriaLabel:y="Close modal"})=>{const x=h.useRef(null),v=h.useRef(null);if(h.useEffect(()=>{if(!t||!d)return;const I=T=>{T.key==="Escape"&&e()};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[t,d,e]),h.useEffect(()=>{if(t)return v.current=document.activeElement,x.current&&x.current.focus(),document.body.style.overflow="hidden",()=>{document.body.style.overflow="unset",v.current&&v.current.focus()}},[t]),!t)return null;const N=()=>{const I=k.overlays.modal.content(),T=k.overlays.modal[n]();return f(I,T)},C=I=>{l&&I.target===I.currentTarget&&e()},S=a.jsxs(a.Fragment,{children:[a.jsx("div",{className:k.overlays.modal.backdrop(),onClick:C}),a.jsx("div",{className:k.overlays.modal.container(),role:"dialog","aria-modal":"true","aria-labelledby":p,"aria-describedby":b,children:a.jsxs("div",{ref:x,"data-testid":"modal-content",className:f(N(),m),tabIndex:-1,onClick:I=>I.stopPropagation(),children:[r&&a.jsxs("div",{className:k.overlays.modal.header(),children:[a.jsx("h2",{id:p,className:k.overlays.modal.title(),children:r}),c&&a.jsx("button",{onClick:e,className:k.overlays.modal.closeButton(),"aria-label":y,children:a.jsx(w.XMarkIcon,{className:k.icon.variant.muted.md()})})]}),g]})})]});return er.createPortal(S,document.body)},Zn=({children:t,variant:e="default",className:r})=>a.jsx("div",{"data-testid":"modal-header",className:f(k.overlays.modal.header(),r),children:t}),It=({children:t,variant:e="default",className:r})=>a.jsx("div",{"data-testid":"modal-body",className:f(k.overlays.modal.body(),r),children:t}),Pt=({children:t,variant:e="default",className:r})=>a.jsx("div",{"data-testid":"modal-footer",className:f(k.overlays.modal.footer(),r),children:t}),Jn={default:w.InformationCircleIcon,warning:w.ExclamationTriangleIcon,danger:w.XCircleIcon,success:w.CheckCircleIcon,info:w.InformationCircleIcon},Xn={default:()=>k.icon.variant.default.lg(),warning:()=>k.icon.variant.warning.lg(),danger:()=>k.icon.variant.error.lg(),success:()=>k.icon.variant.success.lg(),info:()=>k.icon.variant.default.lg()},Rn={default:"default",warning:"default",danger:"destructive",success:"default",info:"default"},eo=({isOpen:t,onClose:e,onConfirm:r,title:n,message:o,confirmText:s="Confirm",cancelText:c="Cancel",loadingText:l="Processing...",variant:d="default",isLoading:g=!1})=>{const m=Jn[d],p=Xn[d],b=Rn[d];return a.jsxs(Et,{isOpen:t,onClose:e,size:"small",variant:"web3confirmation","aria-labelledby":"confirmation-dialog-title","aria-describedby":"confirmation-dialog-description",children:[a.jsxs(It,{variant:"padded",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[a.jsx(m,{className:p()}),a.jsx("h3",{id:"confirmation-dialog-title",className:E.heading.h4(),children:n})]}),a.jsx("p",{id:"confirmation-dialog-description",className:E.body.md(),children:o})]}),a.jsxs(Pt,{children:[a.jsx(F,{variant:"outline",onClick:e,disabled:g,children:c}),a.jsx(F,{variant:b,onClick:r,disabled:g,children:g?l:s})]})]})},to={sm:"w-12 h-12",md:"w-16 h-16",lg:"w-20 h-20",xl:"w-24 h-24"},ro={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},ao={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"},no={square:"rounded-none",rounded:"rounded-2xl",circle:"rounded-full"},oo={none:"",float:"animate-float",pulse:"animate-pulse",bounce:"animate-bounce-slow"},so=({children:t,size:e="lg",variant:r="primary",shape:n="rounded",animation:o="float",className:s})=>a.jsx("div",{className:f("flex items-center justify-center mx-auto mb-6 transition-all duration-300 group-hover:scale-105",to[e],ao[r],no[n],oo[o],s),children:a.jsx("div",{className:f(ro[e]),children:t})}),io=$.cva("border-b transition-all duration-200",{variants:{variant:{default:"bg-gradient-to-r from-green-100 to-blue-100 dark:from-green-900/20 dark:to-blue-900/20 border-green-200 dark:border-green-700",compact:"bg-green-50 dark:bg-green-900/10 border-green-200 dark:border-green-800",minimal:"bg-gray-50 dark:bg-gray-900/50 border-gray-200 dark:border-gray-700",vibrant:"bg-gradient-to-r from-blue-600 to-purple-600 border-blue-700"},size:{default:"py-4",compact:"py-3",large:"py-6"}},defaultVariants:{variant:"default",size:"default"}}),lo=$.cva("font-semibold",{variants:{variant:{default:"text-green-800 dark:text-green-200",compact:"text-green-700 dark:text-green-300",minimal:"text-gray-700 dark:text-gray-300",vibrant:"text-white"}},defaultVariants:{variant:"default"}}),co=$.cva("inline-flex items-center justify-center px-6 py-2 rounded-lg font-medium transition-all duration-200 hover:transform hover:scale-105 focus:outline-none focus:ring-2 focus:ring-offset-2",{variants:{variant:{default:"bg-gradient-to-r from-green-600 to-blue-600 hover:from-green-700 hover:to-blue-700 text-white focus:ring-green-500",compact:"bg-green-600 hover:bg-green-700 text-white focus:ring-green-500",minimal:"bg-blue-600 hover:bg-blue-700 text-white focus:ring-blue-500",vibrant:"bg-white hover:bg-gray-100 text-blue-600 hover:text-blue-700 focus:ring-white"}},defaultVariants:{variant:"default"}}),go=({className:t,variant:e="default",size:r="default",message:n="Get Your Free Email Address - Start Using 0xmail.box Today",ctaText:o="Get Free Email",ctaLink:s="/connect",showBadge:c=!0,badgeText:l="FREE",onDismiss:d,isDismissible:g=!1,dismissAriaLabel:m="Dismiss banner"})=>a.jsx("div",{className:f(io({variant:e,size:r}),t),children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4 text-center relative",children:[g&&d&&a.jsx("button",{onClick:d,className:"absolute right-0 top-1/2 -translate-y-1/2 p-1 rounded-full hover:bg-black/10 dark:hover:bg-white/10 transition-colors","aria-label":m,children:a.jsx("svg",{className:"w-4 h-4 text-current opacity-60",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),a.jsxs("div",{className:"flex items-center",children:[c&&a.jsx("div",{className:f("text-xs font-bold px-3 py-1 rounded-full mr-3 transition-colors",e==="vibrant"?"bg-white text-blue-600":"bg-green-500 text-white"),children:l}),a.jsx("span",{className:f(lo({variant:e})),children:n})]}),a.jsx(ge.Link,{to:s,className:f(co({variant:e})),children:o})]})})}),uo=$.cva("rounded-lg border p-4 flex items-start gap-3",{variants:{variant:{info:"bg-blue-50 border-blue-200 text-blue-800 dark:bg-blue-900/20 dark:border-blue-800/50 dark:text-blue-200",success:"bg-green-50 border-green-200 text-green-800 dark:bg-green-900/20 dark:border-green-800/50 dark:text-green-200",warning:"bg-amber-50 border-amber-200 text-amber-800 dark:bg-amber-900/20 dark:border-amber-800/50 dark:text-amber-200",error:"bg-red-50 border-red-200 text-red-800 dark:bg-red-900/20 dark:border-red-800/50 dark:text-red-200",neutral:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700"},size:{sm:"p-3 text-sm",md:"p-4",lg:"p-6 text-lg"}},defaultVariants:{variant:"info",size:"md"}}),mo=({title:t,icon:e,children:r,variant:n="info",size:o="md",className:s,onClose:c})=>{const l={info:"🛈",success:"✓",warning:"⚠",error:"✗",neutral:"💡"};return a.jsxs("div",{className:f(uo({variant:n,size:o}),s),children:[a.jsx("div",{className:"flex-shrink-0 text-lg",children:e||l[n||"info"]}),a.jsxs("div",{className:"flex-1 min-w-0",children:[t&&a.jsx("h4",{className:"font-semibold mb-2",children:t}),a.jsx("div",{children:r})]}),c&&a.jsx("button",{onClick:c,className:"flex-shrink-0 text-current hover:opacity-70 transition-opacity",children:a.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},ho=$.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"}}),po=({label:t,value:e,change:r,trend:n="none",icon:o,variant:s="default",className:c})=>{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 a.jsx("div",{className:f(ho({variant:s,trend:n}),c),children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-1",children:t}),a.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:e}),r&&a.jsxs("p",{className:f("text-sm font-medium flex items-center gap-1 mt-1",l[n||"none"]),children:[a.jsx("span",{children:d[n||"none"]}),r]})]}),o&&a.jsx("div",{className:"text-3xl opacity-80",children:o})]})})},fo=$.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"}}),bo=({title:t,description:e,children:r,variant:n="default",spacing:o="normal",className:s})=>a.jsxs("div",{className:f(fo({variant:n,spacing:o}),s),children:[(t||e)&&a.jsxs("div",{className:"space-y-1",children:[t&&a.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white",children:t}),e&&a.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:e})]}),r]}),yo=$.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}}),xo=({icon:t,title:e,description:r,layout:n="vertical",spacing:o="normal",interactive:s=!1,className:c,onClick:l})=>a.jsxs("div",{className:f(yo({layout:n,spacing:o,interactive:s}),c),onClick:l,children:[a.jsx("div",{className:"text-4xl mb-4 flex-shrink-0",children:t}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white",children:e}),a.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:r})]})]}),vo=({wallet:t,connector:e,className:r="w-8 h-8",iconBasePath:n="/wallet-icons"})=>{const o=t.toLowerCase(),s=l=>{const d={metamask:"metamask.svg",walletconnect:"walletconnect.svg",coinbase:"coinbase.svg",phantom:"phantom.svg",solflare:"solflare.svg",keplr:"keplr.svg",browser:"browser-wallet.svg",injected:"browser-wallet.svg"};for(const[g,m]of Object.entries(d))if(l.includes(g))return`${n}/${m}`;return`${n}/default.svg`};if(e?.icon)return a.jsx("img",{src:e.icon,alt:`${t} wallet`,className:`${r} rounded-lg`,onError:l=>{const d=l.target;d.src=s(o)}});const c=s(o);return a.jsx("img",{src:c,alt:`${t} wallet`,className:`${r} rounded-lg`,onError:l=>{const d=l.target;d.src=`${n}/default.svg`}})},wo=({size:t="md",className:e="",showText:r=!0,onClick:n,logoSrc:o="/logo.png",logoAlt:s="Logo",logoText:c="0xmail.box",fontFamily:l="Dancing Script, cursive"})=>{const g=(()=>{switch(t){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"}}})(),m=a.jsxs(a.Fragment,{children:[a.jsx("img",{src:o,alt:s,className:g.image}),r&&a.jsx("div",{className:`${g.text} font-bold text-gray-900 dark:text-gray-100`,style:{fontFamily:l,fontWeight:"700"},children:c})]});return n?a.jsx("button",{onClick:n,className:`flex items-center ${g.container} ${e} hover:opacity-80 transition-opacity`,children:m}):a.jsx("div",{className:`flex items-center ${g.container} ${e}`,children:m})},ko=({shareConfig:t})=>{const[e,r]=h.useState(!1),[n,o]=h.useState(""),[s,c]=h.useState(!1);h.useEffect(()=>{const m=t.onBeforeShare;m&&!n&&(async()=>{c(!0);try{const b=typeof window<"u"?window.location.href:"",y=await m(b);o(y)}catch(b){console.error("[ShareDropdown] Failed to prepare share URL:",b);const y=typeof window<"u"?window.location.href:"";o(y)}finally{c(!1)}})()},[t,n]);const l=n||(typeof window<"u"?window.location.href:""),d=[{component:M.TwitterShareButton,icon:M.TwitterIcon,props:{url:l,title:t.title,hashtags:t.hashtags},label:"Twitter"},{component:M.FacebookShareButton,icon:M.FacebookIcon,props:{url:l,quote:`${t.title}
|
|
55
|
+
`,children:[l&&o.jsx("option",{value:"",disabled:!0,children:l}),a.map(g=>o.jsx("option",{value:g.value,disabled:g.disabled,children:g.label},g.value))]})}),Zs={success:"bg-green-500",error:"bg-red-500",warning:"bg-yellow-500",info:"bg-blue-500",neutral:"bg-gray-500"},Js={xs:"w-1.5 h-1.5",sm:"w-2 h-2",md:"w-3 h-3",lg:"w-4 h-4"},Rs=({status:e,size:t="sm",pulse:r=!1,className:a})=>o.jsx("div",{className:w("rounded-full flex-shrink-0",Zs[e],Js[t],r&&"animate-pulse",a)});function oe(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n.defaultPrevented)return t?.(n)}}function Hr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ei(...e){return t=>{let r=!1;const a=e.map(n=>{const s=Hr(n,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let n=0;n<a.length;n++){const s=a[n];typeof s=="function"?s():Hr(e[n],null)}}}}function be(...e){return v.useCallback(ei(...e),e)}function Vr(e,t=[]){let r=[];function a(s,i){const l=v.createContext(i),c=r.length;r=[...r,i];const u=m=>{const{scope:h,children:f,...p}=m,x=h?.[e]?.[c]||l,k=v.useMemo(()=>p,Object.values(p));return o.jsx(x.Provider,{value:k,children:f})};u.displayName=s+"Provider";function g(m,h){const f=h?.[e]?.[c]||l,p=v.useContext(f);if(p)return p;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[u,g]}const n=()=>{const s=r.map(i=>v.createContext(i));return function(l){const c=l?.[e]||s;return v.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return n.scopeName=e,[a,ti(n,...t)]}function ti(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const a=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(s){const i=a.reduce((l,{useScope:c,scopeName:u})=>{const m=c(s)[`__scope${u}`];return{...l,...m}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var ri=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ue=ri.reduce((e,t)=>{const r=vt.createSlot(`Primitive.${t}`),a=v.forwardRef((n,s)=>{const{asChild:i,...l}=n,c=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(c,{...l,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function ai(e,t){e&&hr.flushSync(()=>e.dispatchEvent(t))}function tt(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...r)=>t.current?.(...r),[])}function ni(e,t=globalThis?.document){const r=tt(e);v.useEffect(()=>{const a=n=>{n.key==="Escape"&&r(n)};return t.addEventListener("keydown",a,{capture:!0}),()=>t.removeEventListener("keydown",a,{capture:!0})},[r,t])}var oi="DismissableLayer",Wt="dismissableLayer.update",si="dismissableLayer.pointerDownOutside",ii="dismissableLayer.focusOutside",Ur,qr=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gr=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:a,onPointerDownOutside:n,onFocusOutside:s,onInteractOutside:i,onDismiss:l,...c}=e,u=v.useContext(qr),[g,m]=v.useState(null),h=g?.ownerDocument??globalThis?.document,[,f]=v.useState({}),p=be(t,T=>m(T)),x=Array.from(u.layers),[k]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),C=x.indexOf(k),S=g?x.indexOf(g):-1,N=u.layersWithOutsidePointerEventsDisabled.size>0,P=S>=C,E=di(T=>{const D=T.target,z=[...u.branches].some(M=>M.contains(D));!P||z||(n?.(T),i?.(T),T.defaultPrevented||l?.())},h),L=ui(T=>{const D=T.target;[...u.branches].some(M=>M.contains(D))||(s?.(T),i?.(T),T.defaultPrevented||l?.())},h);return ni(T=>{S===u.layers.size-1&&(a?.(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},h),v.useEffect(()=>{if(g)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ur=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(g)),u.layers.add(g),Kr(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ur)}},[g,h,r,u]),v.useEffect(()=>()=>{g&&(u.layers.delete(g),u.layersWithOutsidePointerEventsDisabled.delete(g),Kr())},[g,u]),v.useEffect(()=>{const T=()=>f({});return document.addEventListener(Wt,T),()=>document.removeEventListener(Wt,T)},[]),o.jsx(ue.div,{...c,ref:p,style:{pointerEvents:N?P?"auto":"none":void 0,...e.style},onFocusCapture:oe(e.onFocusCapture,L.onFocusCapture),onBlurCapture:oe(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:oe(e.onPointerDownCapture,E.onPointerDownCapture)})});Gr.displayName=oi;var li="DismissableLayerBranch",ci=v.forwardRef((e,t)=>{const r=v.useContext(qr),a=v.useRef(null),n=be(t,a);return v.useEffect(()=>{const s=a.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),o.jsx(ue.div,{...e,ref:n})});ci.displayName=li;function di(e,t=globalThis?.document){const r=tt(e),a=v.useRef(!1),n=v.useRef(()=>{});return v.useEffect(()=>{const s=l=>{if(l.target&&!a.current){let c=function(){Yr(si,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",n.current),n.current=c,t.addEventListener("click",n.current,{once:!0})):c()}else t.removeEventListener("click",n.current);a.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",n.current)}},[t,r]),{onPointerDownCapture:()=>a.current=!0}}function ui(e,t=globalThis?.document){const r=tt(e),a=v.useRef(!1);return v.useEffect(()=>{const n=s=>{s.target&&!a.current&&Yr(ii,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,r]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function Kr(){const e=new CustomEvent(Wt);document.dispatchEvent(e)}function Yr(e,t,r,{discrete:a}){const n=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),a?ai(n,s):n.dispatchEvent(s)}var ge=globalThis?.document?v.useLayoutEffect:()=>{},gi=v[" useId ".trim().toString()]||(()=>{}),mi=0;function fi(e){const[t,r]=v.useState(gi());return ge(()=>{r(a=>a??String(mi++))},[e]),t?`radix-${t}`:""}const hi=["top","right","bottom","left"],me=Math.min,K=Math.max,rt=Math.round,at=Math.floor,R=e=>({x:e,y:e}),pi={left:"right",right:"left",bottom:"top",top:"bottom"},yi={start:"end",end:"start"};function Bt(e,t,r){return K(e,me(t,r))}function se(e,t){return typeof e=="function"?e(t):e}function ie(e){return e.split("-")[0]}function Ce(e){return e.split("-")[1]}function jt(e){return e==="x"?"y":"x"}function Ft(e){return e==="y"?"height":"width"}const bi=new Set(["top","bottom"]);function ee(e){return bi.has(ie(e))?"y":"x"}function _t(e){return jt(ee(e))}function xi(e,t,r){r===void 0&&(r=!1);const a=Ce(e),n=_t(e),s=Ft(n);let i=n==="x"?a===(r?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=nt(i)),[i,nt(i)]}function vi(e){const t=nt(e);return[Ht(e),t,Ht(t)]}function Ht(e){return e.replace(/start|end/g,t=>yi[t])}const Qr=["left","right"],Xr=["right","left"],wi=["top","bottom"],ki=["bottom","top"];function Ci(e,t,r){switch(e){case"top":case"bottom":return r?t?Xr:Qr:t?Qr:Xr;case"left":case"right":return t?wi:ki;default:return[]}}function Si(e,t,r,a){const n=Ce(e);let s=Ci(ie(e),r==="start",a);return n&&(s=s.map(i=>i+"-"+n),t&&(s=s.concat(s.map(Ht)))),s}function nt(e){return e.replace(/left|right|bottom|top/g,t=>pi[t])}function Ni(e){return{top:0,right:0,bottom:0,left:0,...e}}function Zr(e){return typeof e!="number"?Ni(e):{top:e,right:e,bottom:e,left:e}}function ot(e){const{x:t,y:r,width:a,height:n}=e;return{width:a,height:n,top:r,left:t,right:t+a,bottom:r+n,x:t,y:r}}function Jr(e,t,r){let{reference:a,floating:n}=e;const s=ee(t),i=_t(t),l=Ft(i),c=ie(t),u=s==="y",g=a.x+a.width/2-n.width/2,m=a.y+a.height/2-n.height/2,h=a[l]/2-n[l]/2;let f;switch(c){case"top":f={x:g,y:a.y-n.height};break;case"bottom":f={x:g,y:a.y+a.height};break;case"right":f={x:a.x+a.width,y:m};break;case"left":f={x:a.x-n.width,y:m};break;default:f={x:a.x,y:a.y}}switch(Ce(t)){case"start":f[i]-=h*(r&&u?-1:1);break;case"end":f[i]+=h*(r&&u?-1:1);break}return f}const Ei=async(e,t,r)=>{const{placement:a="bottom",strategy:n="absolute",middleware:s=[],platform:i}=r,l=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:n}),{x:g,y:m}=Jr(u,a,c),h=a,f={},p=0;for(let x=0;x<l.length;x++){const{name:k,fn:C}=l[x],{x:S,y:N,data:P,reset:E}=await C({x:g,y:m,initialPlacement:a,placement:h,strategy:n,middlewareData:f,rects:u,platform:i,elements:{reference:e,floating:t}});g=S??g,m=N??m,f={...f,[k]:{...f[k],...P}},E&&p<=50&&(p++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(u=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:n}):E.rects),{x:g,y:m}=Jr(u,h,c)),x=-1)}return{x:g,y:m,placement:h,strategy:n,middlewareData:f}};async function $e(e,t){var r;t===void 0&&(t={});const{x:a,y:n,platform:s,rects:i,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:g="viewport",elementContext:m="floating",altBoundary:h=!1,padding:f=0}=se(t,e),p=Zr(f),k=l[h?m==="floating"?"reference":"floating":m],C=ot(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(k)))==null||r?k:k.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:g,strategy:c})),S=m==="floating"?{x:a,y:n,width:i.floating.width,height:i.floating.height}:i.reference,N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),P=await(s.isElement==null?void 0:s.isElement(N))?await(s.getScale==null?void 0:s.getScale(N))||{x:1,y:1}:{x:1,y:1},E=ot(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:S,offsetParent:N,strategy:c}):S);return{top:(C.top-E.top+p.top)/P.y,bottom:(E.bottom-C.bottom+p.bottom)/P.y,left:(C.left-E.left+p.left)/P.x,right:(E.right-C.right+p.right)/P.x}}const Ai=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:a,placement:n,rects:s,platform:i,elements:l,middlewareData:c}=t,{element:u,padding:g=0}=se(e,t)||{};if(u==null)return{};const m=Zr(g),h={x:r,y:a},f=_t(n),p=Ft(f),x=await i.getDimensions(u),k=f==="y",C=k?"top":"left",S=k?"bottom":"right",N=k?"clientHeight":"clientWidth",P=s.reference[p]+s.reference[f]-h[f]-s.floating[p],E=h[f]-s.reference[f],L=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let T=L?L[N]:0;(!T||!await(i.isElement==null?void 0:i.isElement(L)))&&(T=l.floating[N]||s.floating[p]);const D=P/2-E/2,z=T/2-x[p]/2-1,M=me(m[C],z),W=me(m[S],z),V=M,B=T-x[p]-W,j=T/2-x[p]/2+D,U=Bt(V,j,B),_=!c.arrow&&Ce(n)!=null&&j!==U&&s.reference[p]/2-(j<V?M:W)-x[p]/2<0,q=_?j<V?j-V:j-B:0;return{[f]:h[f]+q,data:{[f]:U,centerOffset:j-U-q,..._&&{alignmentOffset:q}},reset:_}}}),Pi=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,a;const{placement:n,middlewareData:s,rects:i,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:g=!0,crossAxis:m=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:x=!0,...k}=se(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const C=ie(n),S=ee(l),N=ie(l)===l,P=await(c.isRTL==null?void 0:c.isRTL(u.floating)),E=h||(N||!x?[nt(l)]:vi(l)),L=p!=="none";!h&&L&&E.push(...Si(l,x,p,P));const T=[l,...E],D=await $e(t,k),z=[];let M=((a=s.flip)==null?void 0:a.overflows)||[];if(g&&z.push(D[C]),m){const j=xi(n,i,P);z.push(D[j[0]],D[j[1]])}if(M=[...M,{placement:n,overflows:z}],!z.every(j=>j<=0)){var W,V;const j=(((W=s.flip)==null?void 0:W.index)||0)+1,U=T[j];if(U&&(!(m==="alignment"?S!==ee(U):!1)||M.every(O=>ee(O.placement)===S?O.overflows[0]>0:!0)))return{data:{index:j,overflows:M},reset:{placement:U}};let _=(V=M.filter(q=>q.overflows[0]<=0).sort((q,O)=>q.overflows[1]-O.overflows[1])[0])==null?void 0:V.placement;if(!_)switch(f){case"bestFit":{var B;const q=(B=M.filter(O=>{if(L){const G=ee(O.placement);return G===S||G==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(G=>G>0).reduce((G,ne)=>G+ne,0)]).sort((O,G)=>O[1]-G[1])[0])==null?void 0:B[0];q&&(_=q);break}case"initialPlacement":_=l;break}if(n!==_)return{reset:{placement:_}}}return{}}}};function Rr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ea(e){return hi.some(t=>e[t]>=0)}const Ti=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:a="referenceHidden",...n}=se(e,t);switch(a){case"referenceHidden":{const s=await $e(t,{...n,elementContext:"reference"}),i=Rr(s,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ea(i)}}}case"escaped":{const s=await $e(t,{...n,altBoundary:!0}),i=Rr(s,r.floating);return{data:{escapedOffsets:i,escaped:ea(i)}}}default:return{}}}}},ta=new Set(["left","top"]);async function Ii(e,t){const{placement:r,platform:a,elements:n}=e,s=await(a.isRTL==null?void 0:a.isRTL(n.floating)),i=ie(r),l=Ce(r),c=ee(r)==="y",u=ta.has(i)?-1:1,g=s&&c?-1:1,m=se(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:p}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof p=="number"&&(f=l==="end"?p*-1:p),c?{x:f*g,y:h*u}:{x:h*u,y:f*g}}const Li=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,a;const{x:n,y:s,placement:i,middlewareData:l}=t,c=await Ii(t,e);return i===((r=l.offset)==null?void 0:r.placement)&&(a=l.arrow)!=null&&a.alignmentOffset?{}:{x:n+c.x,y:s+c.y,data:{...c,placement:i}}}}},$i=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:a,placement:n}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:k=>{let{x:C,y:S}=k;return{x:C,y:S}}},...c}=se(e,t),u={x:r,y:a},g=await $e(t,c),m=ee(ie(n)),h=jt(m);let f=u[h],p=u[m];if(s){const k=h==="y"?"top":"left",C=h==="y"?"bottom":"right",S=f+g[k],N=f-g[C];f=Bt(S,f,N)}if(i){const k=m==="y"?"top":"left",C=m==="y"?"bottom":"right",S=p+g[k],N=p-g[C];p=Bt(S,p,N)}const x=l.fn({...t,[h]:f,[m]:p});return{...x,data:{x:x.x-r,y:x.y-a,enabled:{[h]:s,[m]:i}}}}}},Oi=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:a,placement:n,rects:s,middlewareData:i}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=se(e,t),g={x:r,y:a},m=ee(n),h=jt(m);let f=g[h],p=g[m];const x=se(l,t),k=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(c){const N=h==="y"?"height":"width",P=s.reference[h]-s.floating[N]+k.mainAxis,E=s.reference[h]+s.reference[N]-k.mainAxis;f<P?f=P:f>E&&(f=E)}if(u){var C,S;const N=h==="y"?"width":"height",P=ta.has(ie(n)),E=s.reference[m]-s.floating[N]+(P&&((C=i.offset)==null?void 0:C[m])||0)+(P?0:k.crossAxis),L=s.reference[m]+s.reference[N]+(P?0:((S=i.offset)==null?void 0:S[m])||0)-(P?k.crossAxis:0);p<E?p=E:p>L&&(p=L)}return{[h]:f,[m]:p}}}},Mi=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,a;const{placement:n,rects:s,platform:i,elements:l}=t,{apply:c=()=>{},...u}=se(e,t),g=await $e(t,u),m=ie(n),h=Ce(n),f=ee(n)==="y",{width:p,height:x}=s.floating;let k,C;m==="top"||m==="bottom"?(k=m,C=h===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(C=m,k=h==="end"?"top":"bottom");const S=x-g.top-g.bottom,N=p-g.left-g.right,P=me(x-g[k],S),E=me(p-g[C],N),L=!t.middlewareData.shift;let T=P,D=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(D=N),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(T=S),L&&!h){const M=K(g.left,0),W=K(g.right,0),V=K(g.top,0),B=K(g.bottom,0);f?D=p-2*(M!==0||W!==0?M+W:K(g.left,g.right)):T=x-2*(V!==0||B!==0?V+B:K(g.top,g.bottom))}await c({...t,availableWidth:D,availableHeight:T});const z=await i.getDimensions(l.floating);return p!==z.width||x!==z.height?{reset:{rects:!0}}:{}}}};function st(){return typeof window<"u"}function Se(e){return ra(e)?(e.nodeName||"").toLowerCase():"#document"}function Y(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function te(e){var t;return(t=(ra(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ra(e){return st()?e instanceof Node||e instanceof Y(e).Node:!1}function X(e){return st()?e instanceof Element||e instanceof Y(e).Element:!1}function re(e){return st()?e instanceof HTMLElement||e instanceof Y(e).HTMLElement:!1}function aa(e){return!st()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Y(e).ShadowRoot}const Di=new Set(["inline","contents"]);function Oe(e){const{overflow:t,overflowX:r,overflowY:a,display:n}=Z(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+r)&&!Di.has(n)}const zi=new Set(["table","td","th"]);function Wi(e){return zi.has(Se(e))}const Bi=[":popover-open",":modal"];function it(e){return Bi.some(t=>{try{return e.matches(t)}catch{return!1}})}const ji=["transform","translate","scale","rotate","perspective"],Fi=["transform","translate","scale","rotate","perspective","filter"],_i=["paint","layout","strict","content"];function Vt(e){const t=Ut(),r=X(e)?Z(e):e;return ji.some(a=>r[a]?r[a]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Fi.some(a=>(r.willChange||"").includes(a))||_i.some(a=>(r.contain||"").includes(a))}function Hi(e){let t=fe(e);for(;re(t)&&!Ne(t);){if(Vt(t))return t;if(it(t))return null;t=fe(t)}return null}function Ut(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Vi=new Set(["html","body","#document"]);function Ne(e){return Vi.has(Se(e))}function Z(e){return Y(e).getComputedStyle(e)}function lt(e){return X(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fe(e){if(Se(e)==="html")return e;const t=e.assignedSlot||e.parentNode||aa(e)&&e.host||te(e);return aa(t)?t.host:t}function na(e){const t=fe(e);return Ne(t)?e.ownerDocument?e.ownerDocument.body:e.body:re(t)&&Oe(t)?t:na(t)}function Me(e,t,r){var a;t===void 0&&(t=[]),r===void 0&&(r=!0);const n=na(e),s=n===((a=e.ownerDocument)==null?void 0:a.body),i=Y(n);if(s){const l=qt(i);return t.concat(i,i.visualViewport||[],Oe(n)?n:[],l&&r?Me(l):[])}return t.concat(n,Me(n,[],r))}function qt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oa(e){const t=Z(e);let r=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const n=re(e),s=n?e.offsetWidth:r,i=n?e.offsetHeight:a,l=rt(r)!==s||rt(a)!==i;return l&&(r=s,a=i),{width:r,height:a,$:l}}function Gt(e){return X(e)?e:e.contextElement}function Ee(e){const t=Gt(e);if(!re(t))return R(1);const r=t.getBoundingClientRect(),{width:a,height:n,$:s}=oa(t);let i=(s?rt(r.width):r.width)/a,l=(s?rt(r.height):r.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Ui=R(0);function sa(e){const t=Y(e);return!Ut()||!t.visualViewport?Ui:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function qi(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Y(e)?!1:t}function xe(e,t,r,a){t===void 0&&(t=!1),r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=Gt(e);let i=R(1);t&&(a?X(a)&&(i=Ee(a)):i=Ee(e));const l=qi(s,r,a)?sa(s):R(0);let c=(n.left+l.x)/i.x,u=(n.top+l.y)/i.y,g=n.width/i.x,m=n.height/i.y;if(s){const h=Y(s),f=a&&X(a)?Y(a):a;let p=h,x=qt(p);for(;x&&a&&f!==p;){const k=Ee(x),C=x.getBoundingClientRect(),S=Z(x),N=C.left+(x.clientLeft+parseFloat(S.paddingLeft))*k.x,P=C.top+(x.clientTop+parseFloat(S.paddingTop))*k.y;c*=k.x,u*=k.y,g*=k.x,m*=k.y,c+=N,u+=P,p=Y(x),x=qt(p)}}return ot({width:g,height:m,x:c,y:u})}function ct(e,t){const r=lt(e).scrollLeft;return t?t.left+r:xe(te(e)).left+r}function ia(e,t){const r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-ct(e,r),n=r.top+t.scrollTop;return{x:a,y:n}}function Gi(e){let{elements:t,rect:r,offsetParent:a,strategy:n}=e;const s=n==="fixed",i=te(a),l=t?it(t.floating):!1;if(a===i||l&&s)return r;let c={scrollLeft:0,scrollTop:0},u=R(1);const g=R(0),m=re(a);if((m||!m&&!s)&&((Se(a)!=="body"||Oe(i))&&(c=lt(a)),re(a))){const f=xe(a);u=Ee(a),g.x=f.x+a.clientLeft,g.y=f.y+a.clientTop}const h=i&&!m&&!s?ia(i,c):R(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+g.x+h.x,y:r.y*u.y-c.scrollTop*u.y+g.y+h.y}}function Ki(e){return Array.from(e.getClientRects())}function Yi(e){const t=te(e),r=lt(e),a=e.ownerDocument.body,n=K(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),s=K(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let i=-r.scrollLeft+ct(e);const l=-r.scrollTop;return Z(a).direction==="rtl"&&(i+=K(t.clientWidth,a.clientWidth)-n),{width:n,height:s,x:i,y:l}}const la=25;function Qi(e,t){const r=Y(e),a=te(e),n=r.visualViewport;let s=a.clientWidth,i=a.clientHeight,l=0,c=0;if(n){s=n.width,i=n.height;const g=Ut();(!g||g&&t==="fixed")&&(l=n.offsetLeft,c=n.offsetTop)}const u=ct(a);if(u<=0){const g=a.ownerDocument,m=g.body,h=getComputedStyle(m),f=g.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(a.clientWidth-m.clientWidth-f);p<=la&&(s-=p)}else u<=la&&(s+=u);return{width:s,height:i,x:l,y:c}}const Xi=new Set(["absolute","fixed"]);function Zi(e,t){const r=xe(e,!0,t==="fixed"),a=r.top+e.clientTop,n=r.left+e.clientLeft,s=re(e)?Ee(e):R(1),i=e.clientWidth*s.x,l=e.clientHeight*s.y,c=n*s.x,u=a*s.y;return{width:i,height:l,x:c,y:u}}function ca(e,t,r){let a;if(t==="viewport")a=Qi(e,r);else if(t==="document")a=Yi(te(e));else if(X(t))a=Zi(t,r);else{const n=sa(e);a={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ot(a)}function da(e,t){const r=fe(e);return r===t||!X(r)||Ne(r)?!1:Z(r).position==="fixed"||da(r,t)}function Ji(e,t){const r=t.get(e);if(r)return r;let a=Me(e,[],!1).filter(l=>X(l)&&Se(l)!=="body"),n=null;const s=Z(e).position==="fixed";let i=s?fe(e):e;for(;X(i)&&!Ne(i);){const l=Z(i),c=Vt(i);!c&&l.position==="fixed"&&(n=null),(s?!c&&!n:!c&&l.position==="static"&&!!n&&Xi.has(n.position)||Oe(i)&&!c&&da(e,i))?a=a.filter(g=>g!==i):n=l,i=fe(i)}return t.set(e,a),a}function Ri(e){let{element:t,boundary:r,rootBoundary:a,strategy:n}=e;const i=[...r==="clippingAncestors"?it(t)?[]:Ji(t,this._c):[].concat(r),a],l=i[0],c=i.reduce((u,g)=>{const m=ca(t,g,n);return u.top=K(m.top,u.top),u.right=me(m.right,u.right),u.bottom=me(m.bottom,u.bottom),u.left=K(m.left,u.left),u},ca(t,l,n));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function el(e){const{width:t,height:r}=oa(e);return{width:t,height:r}}function tl(e,t,r){const a=re(t),n=te(t),s=r==="fixed",i=xe(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const c=R(0);function u(){c.x=ct(n)}if(a||!a&&!s)if((Se(t)!=="body"||Oe(n))&&(l=lt(t)),a){const f=xe(t,!0,s,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else n&&u();s&&!a&&n&&u();const g=n&&!a&&!s?ia(n,l):R(0),m=i.left+l.scrollLeft-c.x-g.x,h=i.top+l.scrollTop-c.y-g.y;return{x:m,y:h,width:i.width,height:i.height}}function Kt(e){return Z(e).position==="static"}function ua(e,t){if(!re(e)||Z(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return te(e)===r&&(r=r.ownerDocument.body),r}function ga(e,t){const r=Y(e);if(it(e))return r;if(!re(e)){let n=fe(e);for(;n&&!Ne(n);){if(X(n)&&!Kt(n))return n;n=fe(n)}return r}let a=ua(e,t);for(;a&&Wi(a)&&Kt(a);)a=ua(a,t);return a&&Ne(a)&&Kt(a)&&!Vt(a)?r:a||Hi(e)||r}const rl=async function(e){const t=this.getOffsetParent||ga,r=this.getDimensions,a=await r(e.floating);return{reference:tl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function al(e){return Z(e).direction==="rtl"}const nl={convertOffsetParentRelativeRectToViewportRelativeRect:Gi,getDocumentElement:te,getClippingRect:Ri,getOffsetParent:ga,getElementRects:rl,getClientRects:Ki,getDimensions:el,getScale:Ee,isElement:X,isRTL:al};function ma(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ol(e,t){let r=null,a;const n=te(e);function s(){var l;clearTimeout(a),(l=r)==null||l.disconnect(),r=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:g,top:m,width:h,height:f}=u;if(l||t(),!h||!f)return;const p=at(m),x=at(n.clientWidth-(g+h)),k=at(n.clientHeight-(m+f)),C=at(g),N={rootMargin:-p+"px "+-x+"px "+-k+"px "+-C+"px",threshold:K(0,me(1,c))||1};let P=!0;function E(L){const T=L[0].intersectionRatio;if(T!==c){if(!P)return i();T?i(!1,T):a=setTimeout(()=>{i(!1,1e-7)},1e3)}T===1&&!ma(u,e.getBoundingClientRect())&&i(),P=!1}try{r=new IntersectionObserver(E,{...N,root:n.ownerDocument})}catch{r=new IntersectionObserver(E,N)}r.observe(e)}return i(!0),s}function sl(e,t,r,a){a===void 0&&(a={});const{ancestorScroll:n=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=a,u=Gt(e),g=n||s?[...u?Me(u):[],...Me(t)]:[];g.forEach(C=>{n&&C.addEventListener("scroll",r,{passive:!0}),s&&C.addEventListener("resize",r)});const m=u&&l?ol(u,r):null;let h=-1,f=null;i&&(f=new ResizeObserver(C=>{let[S]=C;S&&S.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var N;(N=f)==null||N.observe(t)})),r()}),u&&!c&&f.observe(u),f.observe(t));let p,x=c?xe(e):null;c&&k();function k(){const C=xe(e);x&&!ma(x,C)&&r(),x=C,p=requestAnimationFrame(k)}return r(),()=>{var C;g.forEach(S=>{n&&S.removeEventListener("scroll",r),s&&S.removeEventListener("resize",r)}),m?.(),(C=f)==null||C.disconnect(),f=null,c&&cancelAnimationFrame(p)}}const il=Li,ll=$i,cl=Pi,dl=Mi,ul=Ti,fa=Ai,gl=Oi,ml=(e,t,r)=>{const a=new Map,n={platform:nl,...r},s={...n.platform,_c:a};return Ei(e,t,{...n,platform:s})};var fl=typeof document<"u",hl=function(){},dt=fl?b.useLayoutEffect:hl;function ut(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,a,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(a=r;a--!==0;)if(!ut(e[a],t[a]))return!1;return!0}if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return!1;for(a=r;a--!==0;)if(!{}.hasOwnProperty.call(t,n[a]))return!1;for(a=r;a--!==0;){const s=n[a];if(!(s==="_owner"&&e.$$typeof)&&!ut(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ha(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pa(e,t){const r=ha(e);return Math.round(t*r)/r}function Yt(e){const t=v.useRef(e);return dt(()=>{t.current=e}),t}function pl(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:a=[],platform:n,elements:{reference:s,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[g,m]=v.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=v.useState(a);ut(h,a)||f(a);const[p,x]=v.useState(null),[k,C]=v.useState(null),S=v.useCallback(O=>{O!==L.current&&(L.current=O,x(O))},[]),N=v.useCallback(O=>{O!==T.current&&(T.current=O,C(O))},[]),P=s||p,E=i||k,L=v.useRef(null),T=v.useRef(null),D=v.useRef(g),z=c!=null,M=Yt(c),W=Yt(n),V=Yt(u),B=v.useCallback(()=>{if(!L.current||!T.current)return;const O={placement:t,strategy:r,middleware:h};W.current&&(O.platform=W.current),ml(L.current,T.current,O).then(G=>{const ne={...G,isPositioned:V.current!==!1};j.current&&!ut(D.current,ne)&&(D.current=ne,hr.flushSync(()=>{m(ne)}))})},[h,t,r,W,V]);dt(()=>{u===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,m(O=>({...O,isPositioned:!1})))},[u]);const j=v.useRef(!1);dt(()=>(j.current=!0,()=>{j.current=!1}),[]),dt(()=>{if(P&&(L.current=P),E&&(T.current=E),P&&E){if(M.current)return M.current(P,E,B);B()}},[P,E,B,M,z]);const U=v.useMemo(()=>({reference:L,floating:T,setReference:S,setFloating:N}),[S,N]),_=v.useMemo(()=>({reference:P,floating:E}),[P,E]),q=v.useMemo(()=>{const O={position:r,left:0,top:0};if(!_.floating)return O;const G=pa(_.floating,g.x),ne=pa(_.floating,g.y);return l?{...O,transform:"translate("+G+"px, "+ne+"px)",...ha(_.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:G,top:ne}},[r,l,_.floating,g.x,g.y]);return v.useMemo(()=>({...g,update:B,refs:U,elements:_,floatingStyles:q}),[g,B,U,_,q])}const yl=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:a,padding:n}=typeof e=="function"?e(r):e;return a&&t(a)?a.current!=null?fa({element:a.current,padding:n}).fn(r):{}:a?fa({element:a,padding:n}).fn(r):{}}}},bl=(e,t)=>({...il(e),options:[e,t]}),xl=(e,t)=>({...ll(e),options:[e,t]}),vl=(e,t)=>({...gl(e),options:[e,t]}),wl=(e,t)=>({...cl(e),options:[e,t]}),kl=(e,t)=>({...dl(e),options:[e,t]}),Cl=(e,t)=>({...ul(e),options:[e,t]}),Sl=(e,t)=>({...yl(e),options:[e,t]});var Nl="Arrow",ya=v.forwardRef((e,t)=>{const{children:r,width:a=10,height:n=5,...s}=e;return o.jsx(ue.svg,{...s,ref:t,width:a,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:o.jsx("polygon",{points:"0,0 30,0 15,10"})})});ya.displayName=Nl;var El=ya;function Al(e){const[t,r]=v.useState(void 0);return ge(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;const s=n[0];let i,l;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,l=u.blockSize}else i=e.offsetWidth,l=e.offsetHeight;r({width:i,height:l})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else r(void 0)},[e]),t}var Qt="Popper",[ba,xa]=Vr(Qt),[Pl,va]=ba(Qt),wa=e=>{const{__scopePopper:t,children:r}=e,[a,n]=v.useState(null);return o.jsx(Pl,{scope:t,anchor:a,onAnchorChange:n,children:r})};wa.displayName=Qt;var ka="PopperAnchor",Ca=v.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:a,...n}=e,s=va(ka,r),i=v.useRef(null),l=be(t,i),c=v.useRef(null);return v.useEffect(()=>{const u=c.current;c.current=a?.current||i.current,u!==c.current&&s.onAnchorChange(c.current)}),a?null:o.jsx(ue.div,{...n,ref:l})});Ca.displayName=ka;var Xt="PopperContent",[Tl,Il]=ba(Xt),Sa=v.forwardRef((e,t)=>{const{__scopePopper:r,side:a="bottom",sideOffset:n=0,align:s="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:g=0,sticky:m="partial",hideWhenDetached:h=!1,updatePositionStrategy:f="optimized",onPlaced:p,...x}=e,k=va(Xt,r),[C,S]=v.useState(null),N=be(t,qe=>S(qe)),[P,E]=v.useState(null),L=Al(P),T=L?.width??0,D=L?.height??0,z=a+(s!=="center"?"-"+s:""),M=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},W=Array.isArray(u)?u:[u],V=W.length>0,B={padding:M,boundary:W.filter($l),altBoundary:V},{refs:j,floatingStyles:U,placement:_,isPositioned:q,middlewareData:O}=pl({strategy:"fixed",placement:z,whileElementsMounted:(...qe)=>sl(...qe,{animationFrame:f==="always"}),elements:{reference:k.anchor},middleware:[bl({mainAxis:n+D,alignmentAxis:i}),c&&xl({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?vl():void 0,...B}),c&&wl({...B}),kl({...B,apply:({elements:qe,rects:un,availableWidth:ug,availableHeight:gg})=>{const{width:mg,height:fg}=un.reference,xt=qe.floating.style;xt.setProperty("--radix-popper-available-width",`${ug}px`),xt.setProperty("--radix-popper-available-height",`${gg}px`),xt.setProperty("--radix-popper-anchor-width",`${mg}px`),xt.setProperty("--radix-popper-anchor-height",`${fg}px`)}}),P&&Sl({element:P,padding:l}),Ol({arrowWidth:T,arrowHeight:D}),h&&Cl({strategy:"referenceHidden",...B})]}),[G,ne]=Aa(_),dn=tt(p);ge(()=>{q&&dn?.()},[q,dn]);const sg=O.arrow?.x,ig=O.arrow?.y,lg=O.arrow?.centerOffset!==0,[cg,dg]=v.useState();return ge(()=>{C&&dg(window.getComputedStyle(C).zIndex)},[C]),o.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:q?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:cg,"--radix-popper-transform-origin":[O.transformOrigin?.x,O.transformOrigin?.y].join(" "),...O.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:o.jsx(Tl,{scope:r,placedSide:G,onArrowChange:E,arrowX:sg,arrowY:ig,shouldHideArrow:lg,children:o.jsx(ue.div,{"data-side":G,"data-align":ne,...x,ref:N,style:{...x.style,animation:q?void 0:"none"}})})})});Sa.displayName=Xt;var Na="PopperArrow",Ll={top:"bottom",right:"left",bottom:"top",left:"right"},Ea=v.forwardRef(function(t,r){const{__scopePopper:a,...n}=t,s=Il(Na,a),i=Ll[s.placedSide];return o.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:o.jsx(El,{...n,ref:r,style:{...n.style,display:"block"}})})});Ea.displayName=Na;function $l(e){return e!==null}var Ol=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:a,middlewareData:n}=t,i=n.arrow?.centerOffset!==0,l=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,g]=Aa(r),m={start:"0%",center:"50%",end:"100%"}[g],h=(n.arrow?.x??0)+l/2,f=(n.arrow?.y??0)+c/2;let p="",x="";return u==="bottom"?(p=i?m:`${h}px`,x=`${-c}px`):u==="top"?(p=i?m:`${h}px`,x=`${a.floating.height+c}px`):u==="right"?(p=`${-c}px`,x=i?m:`${f}px`):u==="left"&&(p=`${a.floating.width+c}px`,x=i?m:`${f}px`),{data:{x:p,y:x}}}});function Aa(e){const[t,r="center"]=e.split("-");return[t,r]}var Ml=wa,Dl=Ca,zl=Sa,Wl=Ea,Bl="Portal",Pa=v.forwardRef((e,t)=>{const{container:r,...a}=e,[n,s]=v.useState(!1);ge(()=>s(!0),[]);const i=r||n&&globalThis?.document?.body;return i?kt.createPortal(o.jsx(ue.div,{...a,ref:t}),i):null});Pa.displayName=Bl;function jl(e,t){return v.useReducer((r,a)=>t[r][a]??r,e)}var Zt=e=>{const{present:t,children:r}=e,a=Fl(t),n=typeof r=="function"?r({present:a.isPresent}):v.Children.only(r),s=be(a.ref,_l(n));return typeof r=="function"||a.isPresent?v.cloneElement(n,{ref:s}):null};Zt.displayName="Presence";function Fl(e){const[t,r]=v.useState(),a=v.useRef(null),n=v.useRef(e),s=v.useRef("none"),i=e?"mounted":"unmounted",[l,c]=jl(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const u=gt(a.current);s.current=l==="mounted"?u:"none"},[l]),ge(()=>{const u=a.current,g=n.current;if(g!==e){const h=s.current,f=gt(u);e?c("MOUNT"):f==="none"||u?.display==="none"?c("UNMOUNT"):c(g&&h!==f?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,c]),ge(()=>{if(t){let u;const g=t.ownerDocument.defaultView??window,m=f=>{const x=gt(a.current).includes(CSS.escape(f.animationName));if(f.target===t&&x&&(c("ANIMATION_END"),!n.current)){const k=t.style.animationFillMode;t.style.animationFillMode="forwards",u=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=k)})}},h=f=>{f.target===t&&(s.current=gt(a.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{g.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:v.useCallback(u=>{a.current=u?getComputedStyle(u):null,r(u)},[])}}function gt(e){return e?.animationName||"none"}function _l(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Hl=v[" useInsertionEffect ".trim().toString()]||ge;function Vl({prop:e,defaultProp:t,onChange:r=()=>{},caller:a}){const[n,s,i]=Ul({defaultProp:t,onChange:r}),l=e!==void 0,c=l?e:n;{const g=v.useRef(e!==void 0);v.useEffect(()=>{const m=g.current;m!==l&&console.warn(`${a} is changing from ${m?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=l},[l,a])}const u=v.useCallback(g=>{if(l){const m=ql(g)?g(e):g;m!==e&&i.current?.(m)}else s(g)},[l,e,s,i]);return[c,u]}function Ul({defaultProp:e,onChange:t}){const[r,a]=v.useState(e),n=v.useRef(r),s=v.useRef(t);return Hl(()=>{s.current=t},[t]),v.useEffect(()=>{n.current!==r&&(s.current?.(r),n.current=r)},[r,n]),[r,a,s]}function ql(e){return typeof e=="function"}var Gl=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Kl="VisuallyHidden",Ta=v.forwardRef((e,t)=>o.jsx(ue.span,{...e,ref:t,style:{...Gl,...e.style}}));Ta.displayName=Kl;var Yl=Ta,[mt]=Vr("Tooltip",[xa]),ft=xa(),Ia="TooltipProvider",Ql=700,Jt="tooltip.open",[Xl,Rt]=mt(Ia),La=e=>{const{__scopeTooltip:t,delayDuration:r=Ql,skipDelayDuration:a=300,disableHoverableContent:n=!1,children:s}=e,i=v.useRef(!0),l=v.useRef(!1),c=v.useRef(0);return v.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),o.jsx(Xl,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:v.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,a)},[a]),isPointerInTransitRef:l,onPointerInTransitChange:v.useCallback(u=>{l.current=u},[]),disableHoverableContent:n,children:s})};La.displayName=Ia;var De="Tooltip",[Zl,ze]=mt(De),$a=e=>{const{__scopeTooltip:t,children:r,open:a,defaultOpen:n,onOpenChange:s,disableHoverableContent:i,delayDuration:l}=e,c=Rt(De,e.__scopeTooltip),u=ft(t),[g,m]=v.useState(null),h=fi(),f=v.useRef(0),p=i??c.disableHoverableContent,x=l??c.delayDuration,k=v.useRef(!1),[C,S]=Vl({prop:a,defaultProp:n??!1,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(Jt))):c.onClose(),s?.(T)},caller:De}),N=v.useMemo(()=>C?k.current?"delayed-open":"instant-open":"closed",[C]),P=v.useCallback(()=>{window.clearTimeout(f.current),f.current=0,k.current=!1,S(!0)},[S]),E=v.useCallback(()=>{window.clearTimeout(f.current),f.current=0,S(!1)},[S]),L=v.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{k.current=!0,S(!0),f.current=0},x)},[x,S]);return v.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),o.jsx(Ml,{...u,children:o.jsx(Zl,{scope:t,contentId:h,open:C,stateAttribute:N,trigger:g,onTriggerChange:m,onTriggerEnter:v.useCallback(()=>{c.isOpenDelayedRef.current?L():P()},[c.isOpenDelayedRef,L,P]),onTriggerLeave:v.useCallback(()=>{p?E():(window.clearTimeout(f.current),f.current=0)},[E,p]),onOpen:P,onClose:E,disableHoverableContent:p,children:r})})};$a.displayName=De;var er="TooltipTrigger",Oa=v.forwardRef((e,t)=>{const{__scopeTooltip:r,...a}=e,n=ze(er,r),s=Rt(er,r),i=ft(r),l=v.useRef(null),c=be(t,l,n.onTriggerChange),u=v.useRef(!1),g=v.useRef(!1),m=v.useCallback(()=>u.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),o.jsx(Dl,{asChild:!0,...i,children:o.jsx(ue.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...a,ref:c,onPointerMove:oe(e.onPointerMove,h=>{h.pointerType!=="touch"&&!g.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),g.current=!0)}),onPointerLeave:oe(e.onPointerLeave,()=>{n.onTriggerLeave(),g.current=!1}),onPointerDown:oe(e.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:oe(e.onFocus,()=>{u.current||n.onOpen()}),onBlur:oe(e.onBlur,n.onClose),onClick:oe(e.onClick,n.onClose)})})});Oa.displayName=er;var tr="TooltipPortal",[Jl,Rl]=mt(tr,{forceMount:void 0}),Ma=e=>{const{__scopeTooltip:t,forceMount:r,children:a,container:n}=e,s=ze(tr,t);return o.jsx(Jl,{scope:t,forceMount:r,children:o.jsx(Zt,{present:r||s.open,children:o.jsx(Pa,{asChild:!0,container:n,children:a})})})};Ma.displayName=tr;var Ae="TooltipContent",Da=v.forwardRef((e,t)=>{const r=Rl(Ae,e.__scopeTooltip),{forceMount:a=r.forceMount,side:n="top",...s}=e,i=ze(Ae,e.__scopeTooltip);return o.jsx(Zt,{present:a||i.open,children:i.disableHoverableContent?o.jsx(za,{side:n,...s,ref:t}):o.jsx(ec,{side:n,...s,ref:t})})}),ec=v.forwardRef((e,t)=>{const r=ze(Ae,e.__scopeTooltip),a=Rt(Ae,e.__scopeTooltip),n=v.useRef(null),s=be(t,n),[i,l]=v.useState(null),{trigger:c,onClose:u}=r,g=n.current,{onPointerInTransitChange:m}=a,h=v.useCallback(()=>{l(null),m(!1)},[m]),f=v.useCallback((p,x)=>{const k=p.currentTarget,C={x:p.clientX,y:p.clientY},S=nc(C,k.getBoundingClientRect()),N=oc(C,S),P=sc(x.getBoundingClientRect()),E=lc([...N,...P]);l(E),m(!0)},[m]);return v.useEffect(()=>()=>h(),[h]),v.useEffect(()=>{if(c&&g){const p=k=>f(k,g),x=k=>f(k,c);return c.addEventListener("pointerleave",p),g.addEventListener("pointerleave",x),()=>{c.removeEventListener("pointerleave",p),g.removeEventListener("pointerleave",x)}}},[c,g,f,h]),v.useEffect(()=>{if(i){const p=x=>{const k=x.target,C={x:x.clientX,y:x.clientY},S=c?.contains(k)||g?.contains(k),N=!ic(C,i);S?h():N&&(h(),u())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[c,g,i,u,h]),o.jsx(za,{...e,ref:s})}),[tc,rc]=mt(De,{isInside:!1}),ac=vt.createSlottable("TooltipContent"),za=v.forwardRef((e,t)=>{const{__scopeTooltip:r,children:a,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:i,...l}=e,c=ze(Ae,r),u=ft(r),{onClose:g}=c;return v.useEffect(()=>(document.addEventListener(Jt,g),()=>document.removeEventListener(Jt,g)),[g]),v.useEffect(()=>{if(c.trigger){const m=h=>{h.target?.contains(c.trigger)&&g()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[c.trigger,g]),o.jsx(Gr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:m=>m.preventDefault(),onDismiss:g,children:o.jsxs(zl,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[o.jsx(ac,{children:a}),o.jsx(tc,{scope:r,isInside:!0,children:o.jsx(Yl,{id:c.contentId,role:"tooltip",children:n||a})})]})})});Da.displayName=Ae;var Wa="TooltipArrow",Ba=v.forwardRef((e,t)=>{const{__scopeTooltip:r,...a}=e,n=ft(r);return rc(Wa,r).isInside?null:o.jsx(Wl,{...n,...a,ref:t})});Ba.displayName=Wa;function nc(e,t){const r=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,a,n,s)){case s:return"left";case n:return"right";case r:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function oc(e,t,r=5){const a=[];switch(t){case"top":a.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":a.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":a.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":a.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return a}function sc(e){const{top:t,right:r,bottom:a,left:n}=e;return[{x:n,y:t},{x:r,y:t},{x:r,y:a},{x:n,y:a}]}function ic(e,t){const{x:r,y:a}=e;let n=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const l=t[s],c=t[i],u=l.x,g=l.y,m=c.x,h=c.y;g>a!=h>a&&r<(m-u)*(a-g)/(h-g)+u&&(n=!n)}return n}function lc(e){const t=e.slice();return t.sort((r,a)=>r.x<a.x?-1:r.x>a.x?1:r.y<a.y?-1:r.y>a.y?1:0),cc(t)}function cc(e){if(e.length<=1)return e.slice();const t=[];for(let a=0;a<e.length;a++){const n=e[a];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(n.y-i.y)>=(s.y-i.y)*(n.x-i.x))t.pop();else break}t.push(n)}t.pop();const r=[];for(let a=e.length-1;a>=0;a--){const n=e[a];for(;r.length>=2;){const s=r[r.length-1],i=r[r.length-2];if((s.x-i.x)*(n.y-i.y)>=(s.y-i.y)*(n.x-i.x))r.pop();else break}r.push(n)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var dc=La,uc=$a,gc=Oa,mc=Ma,fc=Da,hc=Ba;const pc={operational:{color:"bg-green-500/80",hoverColor:"hover:bg-green-500",label:"All systems operational"},degraded:{color:"bg-yellow-500/80",hoverColor:"hover:bg-yellow-500",label:"Degraded performance"},"major-outage":{color:"bg-red-500/80",hoverColor:"hover:bg-red-500",label:"Major outage"}},yc={xs:"w-1.5 h-1.5",sm:"w-2 h-2",md:"w-3 h-3",lg:"w-4 h-4"},bc=({statusPageUrl:e="/status",apiEndpoint:t,refreshInterval:r=6e4,size:a="sm",className:n,version:s,onStatusChange:i})=>{const[l,c]=b.useState({status:"operational",version:s||"1.0.0",message:"All systems operational"}),[u,g]=b.useState(!1);b.useEffect(()=>{const p=async()=>{if(t){g(!0);try{const x=await fetch(t);if(x.ok){const k=await x.json();let C;k.status?.indicator?C={status:{none:"operational",minor:"degraded",major:"major-outage",critical:"major-outage"}[k.status.indicator]||"operational",version:s,message:k.status.description}:C=k,c(C),i?.(C)}}catch{}finally{g(!1)}}};if(p(),r>0){const x=setInterval(p,r);return()=>clearInterval(x)}},[t,r,i,s]);const m=pc[l.status],h=p=>{p.preventDefault(),window.open(e,"_blank","noopener,noreferrer")},f=o.jsxs("div",{className:"text-xs",children:[l.version&&o.jsxs("div",{className:"font-semibold mb-1",children:["Version ",l.version]}),o.jsx("div",{children:l.message||m.label}),l.incidents&&l.incidents.length>0&&o.jsxs("div",{className:"mt-2 text-[10px] opacity-90",children:[o.jsx("div",{className:"font-medium",children:"Current incidents:"}),o.jsx("ul",{className:"list-disc list-inside",children:l.incidents.map((p,x)=>o.jsx("li",{children:p},x))})]})]});return o.jsx(dc,{delayDuration:200,children:o.jsxs(uc,{children:[o.jsx(gc,{asChild:!0,children:o.jsx("button",{onClick:h,className:w("rounded-full flex-shrink-0 transition-all duration-200 cursor-pointer","ring-offset-2 focus:outline-none focus:ring-2 focus:ring-offset-2",m.color,m.hoverColor,yc[a],u&&"animate-pulse",n),"aria-label":`System status: ${m.label}`})}),o.jsx(mc,{children:o.jsxs(fc,{className:"z-50 overflow-hidden rounded-md bg-gray-900 dark:bg-gray-800 px-3 py-2 text-white shadow-md animate-in fade-in-0 zoom-in-95",sideOffset:5,children:[f,o.jsx(hc,{className:"fill-gray-900 dark:fill-gray-800"})]})})]})})},xc={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"}},vc={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"}},wc=({icon:e,text:t,variant:r="default",size:a="md",className:n})=>{const s=xc[r],i=vc[a];return o.jsxs("div",{className:w("inline-flex items-center rounded-full mb-6",s.container,i.container,n),children:[o.jsx("div",{className:w("animate-float-icon",s.icon,i.icon),children:e}),o.jsx("span",{className:i.text,children:t})]})},kc=F.cva("",{variants:{variant:{hero:$.heading.display.hero(),display:$.heading.display.lg(),h1:$.heading.h1(),h2:$.heading.h2(),h3:$.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"}}),Cc=({children:e,variant:t="h1",responsive:r=!0,align:a="left",color:n="default",className:s,as:i})=>{const l=i||(t==="hero"||t==="display"||t==="h1"?"h1":t==="h2"?"h2":"h3");return o.jsx(l,{className:w(kc({variant:t,responsive:r,align:a,color:n}),s),children:e})},Sc=F.cva("",{variants:{variant:{h2:$.heading.h2(),h3:$.heading.h3(),h4:$.heading.h4(),h5:$.heading.h5(),h6:$.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"}}),Nc=({children:e,variant:t="h2",spacing:r="md",align:a="left",className:n,as:s})=>{const i=s||t;return b.createElement(i,{className:w(Sc({variant:t,spacing:r,align:a}),n)},e)},Ec=F.cva("",{variants:{variant:{body:$.body.md(),lead:$.body.lg(),large:$.body.lg(),small:$.body.sm(),caption:$.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"}}),Ac=({children:e,variant:t="body",color:r="default",align:a="left",className:n,as:s="p"})=>b.createElement(s,{className:w(Ec({variant:t,color:r,align:a}),n)},e),Pc=F.cva($.link.default(),{variants:{variant:{default:$.link.default(),subtle:$.link.subtle(),muted:$.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}}),Tc=({children:e,href:t,variant:r="default",external:a=!1,className:n,target:s,rel:i})=>o.jsxs("a",{href:t,target:s||(a?"_blank":void 0),rel:i||(a?"noopener noreferrer":void 0),className:w(Pc({variant:r,external:a}),n),children:[e,a&&o.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.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"})})]}),ht=F.cva("transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded-sm",{variants:{variant:{subtle:$.link.subtle(),default:$.link.default(),muted:$.link.muted(),external:$.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"}}),rr=v.forwardRef(({className:e,variant:t,size:r,to:a,href:n,external:s,children:i,...l},c)=>{const u=a||n;return u?s||u.startsWith("http")||u.startsWith("mailto:")?o.jsx("a",{className:w(ht({variant:t==="subtle"?"external":t,size:r,className:e})),href:u,target:"_blank",rel:"noopener noreferrer",ref:c,...l,children:i}):o.jsx(Ke.Link,{className:w(ht({variant:t,size:r,className:e})),to:u,ref:c,...l,children:i}):o.jsx("span",{className:w(ht({variant:t,size:r,className:e})),...l,children:i})});rr.displayName="SmartLink";const Ic=(e,t)=>v.useMemo(()=>{let r=e;return Object.entries(t).forEach(([a,n])=>{const s=new RegExp(`\\b${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");r=r.replace(s,i=>`<SmartLink to="${n}" variant="subtle">${i}</SmartLink>`)}),r},[e,t]),Lc={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"},$c=({children:e,mappings:t=Lc,className:r,variant:a="subtle"})=>{const n=v.useMemo(()=>{if(!e||typeof e!="string")return e||"";let i=e;return Object.entries(t).sort(([c],[u])=>u.length-c.length).forEach(([c,u])=>{if(c&&u){const g=new RegExp(`\\b${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"gi");i=i.replace(g,m=>`__LINK_START__${u}__LINK_MID__${m}__LINK_END__`)}}),i},[e,t]);if(!n||typeof n!="string")return o.jsx("span",{className:r,children:e});const s=n.split(/(__LINK_START__.*?__LINK_END__)/);return o.jsx("span",{className:r,children:s.map((i,l)=>{const c=i.match(/__LINK_START__(.*?)__LINK_MID__(.*?)__LINK_END__/);if(c){const[,u,g]=c;return o.jsx(rr,{to:u,variant:a,children:g},l)}return i})})},ja=({isOpen:e,onClose:t,title:r,size:a="medium",variant:n="default",overlay:s="default",showCloseButton:i=!0,closeOnOverlayClick:l=!0,closeOnEscape:c=!0,children:u,className:g,"aria-labelledby":m,"aria-describedby":h,closeAriaLabel:f="Close modal"})=>{const p=b.useRef(null),x=b.useRef(null);if(b.useEffect(()=>{if(!e||!c)return;const N=P=>{P.key==="Escape"&&t()};return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[e,c,t]),b.useEffect(()=>{if(e)return x.current=document.activeElement,p.current&&p.current.focus(),document.body.style.overflow="hidden",()=>{document.body.style.overflow="unset",x.current&&x.current.focus()}},[e]),!e)return null;const k=()=>{const N=I.overlays.modal.content(),P=I.overlays.modal[a]();return w(N,P)},C=N=>{l&&N.target===N.currentTarget&&t()},S=o.jsxs(o.Fragment,{children:[o.jsx("div",{className:I.overlays.modal.backdrop(),onClick:C}),o.jsx("div",{className:I.overlays.modal.container(),role:"dialog","aria-modal":"true","aria-labelledby":m,"aria-describedby":h,children:o.jsxs("div",{ref:p,"data-testid":"modal-content",className:w(k(),g),tabIndex:-1,onClick:N=>N.stopPropagation(),children:[r&&o.jsxs("div",{className:I.overlays.modal.header(),children:[o.jsx("h2",{id:m,className:I.overlays.modal.title(),children:r}),i&&o.jsx("button",{onClick:t,className:I.overlays.modal.closeButton(),"aria-label":f,children:o.jsx(A.XMarkIcon,{className:I.icon.variant.muted.md()})})]}),u]})})]});return kt.createPortal(S,document.body)},Oc=({children:e,variant:t="default",className:r})=>o.jsx("div",{"data-testid":"modal-header",className:w(I.overlays.modal.header(),r),children:e}),Fa=({children:e,variant:t="default",className:r})=>o.jsx("div",{"data-testid":"modal-body",className:w(I.overlays.modal.body(),r),children:e}),_a=({children:e,variant:t="default",className:r})=>o.jsx("div",{"data-testid":"modal-footer",className:w(I.overlays.modal.footer(),r),children:e}),Mc={default:A.InformationCircleIcon,warning:A.ExclamationTriangleIcon,danger:A.XCircleIcon,success:A.CheckCircleIcon,info:A.InformationCircleIcon},Dc={default:()=>I.icon.variant.default.lg(),warning:()=>I.icon.variant.warning.lg(),danger:()=>I.icon.variant.error.lg(),success:()=>I.icon.variant.success.lg(),info:()=>I.icon.variant.default.lg()},zc={default:"default",warning:"default",danger:"destructive",success:"default",info:"default"},Wc=({isOpen:e,onClose:t,onConfirm:r,title:a,message:n,confirmText:s="Confirm",cancelText:i="Cancel",loadingText:l="Processing...",variant:c="default",isLoading:u=!1})=>{const g=Mc[c],m=Dc[c],h=zc[c];return o.jsxs(ja,{isOpen:e,onClose:t,size:"small",variant:"web3confirmation","aria-labelledby":"confirmation-dialog-title","aria-describedby":"confirmation-dialog-description",children:[o.jsxs(Fa,{variant:"padded",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[o.jsx(g,{className:m()}),o.jsx("h3",{id:"confirmation-dialog-title",className:$.heading.h4(),children:a})]}),o.jsx("p",{id:"confirmation-dialog-description",className:$.body.md(),children:n})]}),o.jsxs(_a,{children:[o.jsx(de,{variant:"outline",onClick:t,disabled:u,children:i}),o.jsx(de,{variant:h,onClick:r,disabled:u,children:u?l:s})]})]})},Bc={sm:"w-12 h-12",md:"w-16 h-16",lg:"w-20 h-20",xl:"w-24 h-24"},jc={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},Fc={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"},_c={square:"rounded-none",rounded:"rounded-2xl",circle:"rounded-full"},Hc={none:"",float:"animate-float",pulse:"animate-pulse",bounce:"animate-bounce-slow"},Vc=({children:e,size:t="lg",variant:r="primary",shape:a="rounded",animation:n="float",className:s})=>o.jsx("div",{className:w("flex items-center justify-center mx-auto mb-6 transition-all duration-300 group-hover:scale-105",Bc[t],Fc[r],_c[a],Hc[n],s),children:o.jsx("div",{className:w(jc[t]),children:e})}),Uc=F.cva("border-b transition-all duration-200",{variants:{variant:{default:"bg-gradient-to-r from-green-100 to-blue-100 dark:from-green-900/20 dark:to-blue-900/20 border-green-200 dark:border-green-700",compact:"bg-green-50 dark:bg-green-900/10 border-green-200 dark:border-green-800",minimal:"bg-gray-50 dark:bg-gray-900/50 border-gray-200 dark:border-gray-700",vibrant:"bg-gradient-to-r from-blue-600 to-purple-600 border-blue-700"},size:{default:"py-4",compact:"py-3",large:"py-6"}},defaultVariants:{variant:"default",size:"default"}}),qc=F.cva("font-semibold",{variants:{variant:{default:"text-green-800 dark:text-green-200",compact:"text-green-700 dark:text-green-300",minimal:"text-gray-700 dark:text-gray-300",vibrant:"text-white"}},defaultVariants:{variant:"default"}}),Gc=F.cva("inline-flex items-center justify-center px-6 py-2 rounded-lg font-medium transition-all duration-200 hover:transform hover:scale-105 focus:outline-none focus:ring-2 focus:ring-offset-2",{variants:{variant:{default:"bg-gradient-to-r from-green-600 to-blue-600 hover:from-green-700 hover:to-blue-700 text-white focus:ring-green-500",compact:"bg-green-600 hover:bg-green-700 text-white focus:ring-green-500",minimal:"bg-blue-600 hover:bg-blue-700 text-white focus:ring-blue-500",vibrant:"bg-white hover:bg-gray-100 text-blue-600 hover:text-blue-700 focus:ring-white"}},defaultVariants:{variant:"default"}}),Kc=({className:e,variant:t="default",size:r="default",message:a="Get Your Free Email Address - Start Using 0xmail.box Today",ctaText:n="Get Free Email",ctaLink:s="/connect",showBadge:i=!0,badgeText:l="FREE",onDismiss:c,isDismissible:u=!1,dismissAriaLabel:g="Dismiss banner"})=>o.jsx("div",{className:w(Uc({variant:t,size:r}),e),children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:o.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4 text-center relative",children:[u&&c&&o.jsx("button",{onClick:c,className:"absolute right-0 top-1/2 -translate-y-1/2 p-1 rounded-full hover:bg-black/10 dark:hover:bg-white/10 transition-colors","aria-label":g,children:o.jsx("svg",{className:"w-4 h-4 text-current opacity-60",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),o.jsxs("div",{className:"flex items-center",children:[i&&o.jsx("div",{className:w("text-xs font-bold px-3 py-1 rounded-full mr-3 transition-colors",t==="vibrant"?"bg-white text-blue-600":"bg-green-500 text-white"),children:l}),o.jsx("span",{className:w(qc({variant:t})),children:a})]}),o.jsx(Ke.Link,{to:s,className:w(Gc({variant:t})),children:n})]})})}),Yc=F.cva("rounded-lg border p-4 flex items-start gap-3",{variants:{variant:{info:"bg-blue-50 border-blue-200 text-blue-800 dark:bg-blue-900/20 dark:border-blue-800/50 dark:text-blue-200",success:"bg-green-50 border-green-200 text-green-800 dark:bg-green-900/20 dark:border-green-800/50 dark:text-green-200",warning:"bg-amber-50 border-amber-200 text-amber-800 dark:bg-amber-900/20 dark:border-amber-800/50 dark:text-amber-200",error:"bg-red-50 border-red-200 text-red-800 dark:bg-red-900/20 dark:border-red-800/50 dark:text-red-200",neutral:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700"},size:{sm:"p-3 text-sm",md:"p-4",lg:"p-6 text-lg"}},defaultVariants:{variant:"info",size:"md"}}),Qc=({title:e,icon:t,children:r,variant:a="info",size:n="md",className:s,onClose:i})=>{const l={info:"🛈",success:"✓",warning:"⚠",error:"✗",neutral:"💡"};return o.jsxs("div",{className:w(Yc({variant:a,size:n}),s),children:[o.jsx("div",{className:"flex-shrink-0 text-lg",children:t||l[a||"info"]}),o.jsxs("div",{className:"flex-1 min-w-0",children:[e&&o.jsx("h4",{className:"font-semibold mb-2",children:e}),o.jsx("div",{children:r})]}),i&&o.jsx("button",{onClick:i,className:"flex-shrink-0 text-current hover:opacity-70 transition-opacity",children:o.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},Xc=F.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"}}),Zc=({label:e,value:t,change:r,trend:a="none",icon:n,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"},c={up:"↗",down:"↘",neutral:"→",none:""};return o.jsx("div",{className:w(Xc({variant:s,trend:a}),i),children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-1",children:e}),o.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:t}),r&&o.jsxs("p",{className:w("text-sm font-medium flex items-center gap-1 mt-1",l[a||"none"]),children:[o.jsx("span",{children:c[a||"none"]}),r]})]}),n&&o.jsx("div",{className:"text-3xl opacity-80",children:n})]})})},Jc=F.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"}}),Rc=({title:e,description:t,children:r,variant:a="default",spacing:n="normal",className:s})=>o.jsxs("div",{className:w(Jc({variant:a,spacing:n}),s),children:[(e||t)&&o.jsxs("div",{className:"space-y-1",children:[e&&o.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white",children:e}),t&&o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:t})]}),r]}),ed=F.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}}),td=({icon:e,title:t,description:r,layout:a="vertical",spacing:n="normal",interactive:s=!1,className:i,onClick:l})=>o.jsxs("div",{className:w(ed({layout:a,spacing:n,interactive:s}),i),onClick:l,children:[o.jsx("div",{className:"text-4xl mb-4 flex-shrink-0",children:e}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white",children:t}),o.jsx("div",{className:"text-gray-600 dark:text-gray-300 leading-relaxed",children:r})]})]}),rd=({wallet:e,connector:t,className:r="w-8 h-8",iconBasePath:a="/wallet-icons"})=>{const n=e.toLowerCase(),s=l=>{const c={metamask:"metamask.svg",walletconnect:"walletconnect.svg",coinbase:"coinbase.svg",phantom:"phantom.svg",solflare:"solflare.svg",keplr:"keplr.svg",browser:"browser-wallet.svg",injected:"browser-wallet.svg"};for(const[u,g]of Object.entries(c))if(l.includes(u))return`${a}/${g}`;return`${a}/default.svg`};if(t?.icon)return o.jsx("img",{src:t.icon,alt:`${e} wallet`,className:`${r} rounded-lg`,onError:l=>{const c=l.target;c.src=s(n)}});const i=s(n);return o.jsx("img",{src:i,alt:`${e} wallet`,className:`${r} rounded-lg`,onError:l=>{const c=l.target;c.src=`${a}/default.svg`}})},ad=({size:e="md",className:t="",showText:r=!0,onClick:a,logoSrc:n="/logo.png",logoAlt:s="Logo",logoText:i="0xmail.box",fontFamily:l="Dancing Script, cursive"})=>{const u=(()=>{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=o.jsxs(o.Fragment,{children:[o.jsx("img",{src:n,alt:s,className:u.image}),r&&o.jsx("div",{className:`${u.text} font-bold text-gray-900 dark:text-gray-100`,style:{fontFamily:l,fontWeight:"700"},children:i})]});return a?o.jsx("button",{onClick:a,className:`flex items-center ${u.container} ${t} hover:opacity-80 transition-opacity`,children:g}):o.jsx("div",{className:`flex items-center ${u.container} ${t}`,children:g})},nd=({shareConfig:e})=>{const[t,r]=b.useState(!1),[a,n]=b.useState(""),[s,i]=b.useState(!1);b.useEffect(()=>{const g=e.onBeforeShare;g&&!a&&(async()=>{i(!0);try{const h=typeof window<"u"?window.location.href:"",f=await g(h);n(f)}catch{const h=typeof window<"u"?window.location.href:"";n(h)}finally{i(!1)}})()},[e,a]);const l=a||(typeof window<"u"?window.location.href:""),c=[{component:Q.TwitterShareButton,icon:Q.TwitterIcon,props:{url:l,title:e.title,hashtags:e.hashtags},label:"Twitter"},{component:Q.FacebookShareButton,icon:Q.FacebookIcon,props:{url:l,quote:`${e.title}
|
|
56
56
|
|
|
57
|
-
${
|
|
57
|
+
${e.description}`},label:"Facebook"},{component:Q.LinkedinShareButton,icon:Q.LinkedinIcon,props:{url:l,title:e.title,summary:e.description},label:"LinkedIn"},{component:Q.RedditShareButton,icon:Q.RedditIcon,props:{url:l,title:e.title},label:"Reddit"},{component:Q.TelegramShareButton,icon:Q.TelegramIcon,props:{url:l,title:e.title},label:"Telegram"},{component:Q.WhatsappShareButton,icon:Q.WhatsappIcon,props:{url:l,title:e.title,separator:`
|
|
58
58
|
|
|
59
|
-
`},label:"WhatsApp"}],g=async()=>{try{await navigator.clipboard.writeText(l),r(!1)}catch(m){console.error("Failed to copy:",m)}};return a.jsxs("div",{className:"relative",children:[a.jsx("button",{onClick:()=>r(!e),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",title:"Share this page",children:a.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.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"})})}),e&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fixed inset-0 z-[999998]",onClick:()=>r(!1)}),a.jsx("div",{className:"absolute right-0 top-10 z-[999999] w-32 bg-white dark:bg-gray-800 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 py-1",children:s?a.jsx("div",{className:"flex items-center justify-center px-3 py-2",children:a.jsx("div",{className:"w-4 h-4 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"})}):a.jsxs(a.Fragment,{children:[d.map((m,p)=>{const b=m.component,y=m.icon;return a.jsx(b,{...m.props,className:"w-full",children:a.jsxs("div",{className:"flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer",children:[a.jsx(y,{size:16,round:!0,className:"mr-2"}),a.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:m.label})]})},p)}),a.jsxs("button",{onClick:g,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer",children:[a.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:a.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"})}),a.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Copy Link"})]})]})})]})]})},$t=({items:t,shareConfig:e,className:r,showHome:n})=>a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("nav",{"aria-label":"Breadcrumb",children:a.jsx("ol",{className:"flex items-center text-sm space-x-2",children:t.map((o,s)=>a.jsxs(h.Fragment,{children:[a.jsx("li",{children:o.current?a.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:o.label}):a.jsx(ge.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<t.length-1&&a.jsx("li",{children:a.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"/"})})]},s))})}),e&&a.jsx(ko,{shareConfig:e})]}),Co=({items:t,shareConfig:e})=>a.jsx("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 relative z-50",children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3 relative",children:a.jsx($t,{items:t,shareConfig:e})})}),So=({filename:t,code:e,language:r,title:n,className:o="",showCopy:s=!0,showHeader:c=!0})=>{const{t:l}=Xe.useTranslation("codeBlock"),{code:d,loading:g,error:m}=ut(t||""),[p,b]=h.useState(!1),y=e||d,v=r||(t?(C=>{switch(C.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"}})(t):"text"),N=async()=>{if(y)try{await navigator.clipboard.writeText(y),b(!0),setTimeout(()=>b(!1),2e3)}catch(C){console.error("Failed to copy code:",C)}};return t&&g?a.jsx("div",{className:`bg-gray-900 text-green-400 rounded-lg p-4 font-mono text-sm ${o}`,children:a.jsx("div",{className:"animate-pulse text-gray-500",children:l("loadingCode","Loading code...")})}):t&&m?a.jsxs("div",{className:`bg-gray-900 text-red-400 rounded-lg p-4 font-mono text-sm ${o}`,children:[l("error","Error"),": ",m]}):y?a.jsxs("div",{className:`bg-gray-900 rounded-lg border border-green-500/20 shadow-lg shadow-green-500/10 ${o}`,children:[c&&a.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-green-500/20 bg-gray-800/50",children:[a.jsx("span",{className:"text-sm text-green-400 font-mono",children:n||t||`${v} code`}),s&&a.jsx("button",{onClick:N,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:p?a.jsx(w.CheckIcon,{className:"h-4 w-4 text-green-400"}):a.jsx(w.ClipboardDocumentIcon,{className:"h-4 w-4 group-hover:scale-110 transition-transform"})})]}),a.jsx("div",{className:"p-4 overflow-x-auto text-left",children:a.jsx("pre",{className:`text-sm language-${v}`,children:a.jsx("code",{className:"text-gray-100",children:y})})})]}):a.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")})},No=({title:t,description:e,code:r,preview:n,language:o="tsx",showBrowserChrome:s=!0,copyKey:c})=>{const[l,d]=h.useState({}),g=(b,y)=>{navigator.clipboard.writeText(b).then(()=>{d(x=>({...x,[y]:!0})),setTimeout(()=>{d(x=>({...x,[y]:!1}))},2e3)})},m=c||`${t}-code`,p=l[m];return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:t}),e&&a.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:e})]}),n&&a.jsxs("div",{className:"relative",children:[s&&a.jsxs("div",{className:"bg-gray-200 dark:bg-gray-700 rounded-t-lg px-4 py-3 flex items-center space-x-2",children:[a.jsxs("div",{className:"flex space-x-2",children:[a.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500"}),a.jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-500"}),a.jsx("div",{className:"w-3 h-3 rounded-full bg-green-500"})]}),a.jsx("div",{className:"flex-1 text-center",children:a.jsx("div",{className:"bg-white dark:bg-gray-600 rounded px-3 py-1 text-xs text-gray-600 dark:text-gray-300 inline-block",children:"Preview"})})]}),a.jsx("div",{className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 p-6 ${s?"rounded-b-lg":"rounded-lg"}`,children:n})]}),a.jsx("div",{className:"relative",children:a.jsxs("div",{className:"bg-gray-900 rounded-lg overflow-hidden",children:[a.jsxs("div",{className:"bg-gray-800 px-4 py-2 flex justify-between items-center",children:[a.jsx("span",{className:"text-gray-300 text-sm font-mono",children:o}),a.jsx("button",{onClick:()=>g(r,m),className:"flex items-center space-x-1 text-gray-300 hover:text-white transition-colors text-sm","aria-label":p?"Copied!":"Copy code",children:p?a.jsxs(a.Fragment,{children:[a.jsx(w.CheckIcon,{className:"h-4 w-4"}),a.jsx("span",{children:"Copied!"})]}):a.jsxs(a.Fragment,{children:[a.jsx(w.ClipboardIcon,{className:"h-4 w-4"}),a.jsx("span",{children:"Copy"})]})})]}),a.jsx("div",{className:"p-4 overflow-x-auto",children:a.jsx("pre",{className:"text-gray-100 text-sm leading-relaxed",children:a.jsx("code",{children:r})})})]})})]})},Eo=({subsections:t,isExpanded:e,selectedSubsection:r,parentSectionId:n,onSubsectionSelect:o})=>{const s=h.useRef(null),[c,l]=h.useState(void 0);return h.useLayoutEffect(()=>{if(s.current){const d=s.current.scrollHeight;l(e?d+16:0)}},[e,t]),a.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:c!==void 0?`${c}px`:"auto"},children:a.jsx("div",{ref:s,className:"ml-6 mt-2 space-y-1",children:t.map(d=>a.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] ${r===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))})})},Io=({id:t,title:e,content:r,subsections:n,isSelected:o=!1,selectedSubsection:s=null,onSectionSelect:c,onSubsectionSelect:l,className:d=""})=>{const[g,m]=h.useState(!1),p=()=>{m(!g)},b=()=>{c?.(t)},y=n&&n.length>0;return a.jsxs("div",{className:d,children:[a.jsxs("div",{className:"flex items-center",children:[a.jsx("button",{onClick:b,className:`flex-1 text-left px-3 py-4 text-base font-medium transition-all duration-200 hover:bg-gray-50 dark:hover:bg-gray-800 ${o&&!s?"bg-blue-50 dark:bg-blue-900/10 text-blue-700 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100"}`,children:e}),y&&a.jsx("button",{onClick:p,className:"p-2 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200","aria-label":g?"Collapse section":"Expand section",children:a.jsx(w.ChevronRightIcon,{className:`h-5 w-5 text-gray-500 transition-transform duration-300 ease-in-out ${g?"rotate-90":"rotate-0"}`})})]}),y&&a.jsx(Eo,{subsections:n,isExpanded:g,selectedSubsection:s,parentSectionId:t,onSubsectionSelect:l})]})},Po=({title:t,subtitle:e,buttonText:r,buttonIcon:n="envelope",variant:o="default",badgeText:s="FREE",prominentBadgeText:c="100% Free",onButtonClick:l,className:d=""})=>{const g=()=>n==="envelope"||n==="both"?a.jsx(w.EnvelopeIcon,{className:o==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1"}):n==="none"?null:a.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:a.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"})}),m=()=>n==="arrow"||n==="both"?a.jsx(w.ArrowRightIcon,{className:"h-4 w-4 ml-2"}):null,p=()=>o==="prominent"?"border-b-2 border-green-200 dark:border-green-700":"border-b border-green-200 dark:border-green-700",b=()=>{const v="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"?`${v} px-8 py-3 text-base`:`${v} px-6 py-2 text-sm`},y=()=>o==="prominent"?"text-green-800 dark:text-green-200 font-semibold text-lg":"text-green-800 dark:text-green-200 font-semibold",x=o==="prominent"?c:s;return a.jsx("div",{className:`bg-gradient-to-r from-green-100 to-blue-100 dark:from-green-900/20 dark:to-blue-900/20 ${p()} ${d}`,children:a.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:a.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4",children:[a.jsxs("div",{className:`flex items-center ${o==="prominent"?"text-center sm:text-left":""}`,children:[a.jsx("div",{className:"bg-green-500 text-white text-xs font-bold px-3 py-1 rounded-full mr-3 animate-pulse",children:x}),a.jsxs("div",{children:[a.jsx("span",{className:y(),children:t}),e&&a.jsx("span",{className:"text-green-700 dark:text-green-300 text-sm block",children:e})]})]}),a.jsxs("button",{onClick:l,className:b(),children:[g(),r,m()]})]})})})},$o=({children:t,onClick:e,variant:r,size:n,disabled:o,className:s,type:c,trackingLabel:l,actionType:d,componentName:g,onTrack:m,trackingParams:p={},...b})=>{const y=x=>{if(m){const v=l||(typeof t=="string"?t:"")||"Unknown Button",C=r&&["default","primary","secondary","outline","ghost","destructive","link"].includes(r)?r:"default";m({button_text:v,button_type:C,component_name:g,action_type:d,...p})}e&&e(x)};return a.jsx(F,{...b,variant:r,size:n,disabled:o,className:s,type:c,onClick:y,children:t})},Ao=({children:t,onClick:e,to:r,href:n,trackingLabel:o,componentName:s,onTrack:c,trackingParams:l={},LinkComponent:d,linkProps:g={},...m})=>{const p=y=>{if(c){const x=o||(typeof t=="string"?t:"")||"Unknown Link",v=r?typeof r=="string"?r:r.pathname||"":n||"";c({link_text:x,link_url:v,to_page:v,navigation_type:d?"router_link":"anchor_link",component_name:s,...l})}e&&e(y)};if(d&&r!==void 0)return a.jsx(d,{...g,to:r,onClick:p,...m,children:t});const b=r?typeof r=="string"?r:r.pathname||"#":n;return a.jsx("a",{...m,href:b,onClick:p,children:t})},At={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:"🇨🇳"}},To=({variant:t="compact",className:e=""})=>{const{i18n:r,t:n}=Xe.useTranslation("languageSelector"),[o,s]=h.useState(r.language),c=h.useMemo(()=>r.options.supportedLngs?r.options.supportedLngs.filter(g=>g!=="cimode").map(g=>({code:g,name:At[g]?.name||g.toUpperCase(),flag:At[g]?.flag||"🌐"})).sort((g,m)=>g.name.localeCompare(m.name)):[],[r.options.supportedLngs]),l=c.find(g=>g.code===o||g.code.toLowerCase()===o.toLowerCase());h.useEffect(()=>{s(r.language)},[r.language]);const d=g=>{localStorage.setItem("language",g),r.changeLanguage(g).then(()=>{s(r.language),setTimeout(()=>{window.dispatchEvent(new Event("languagechange"))},100)}).catch(m=>{console.error("Failed to change language:",m)})};return t==="compact"?a.jsx("div",{className:`relative ${e}`,children:a.jsxs(Me,{value:o,onValueChange:d,children:[a.jsx(pe,{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:a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("span",{className:"text-lg leading-none",children:l?.flag}),a.jsx("span",{className:"hidden sm:block text-sm font-medium text-gray-700 dark:text-gray-300",children:l?.name})]})}),a.jsx(fe,{children:c.map(g=>a.jsx(be,{value:g.code,className:"cursor-pointer",children:a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("span",{className:"text-lg leading-none",children:g.flag}),a.jsx("span",{className:"text-sm",children:g.name})]})},g.code))})]})}):a.jsxs("div",{className:`space-y-2 ${e}`,children:[a.jsxs("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 flex items-center space-x-2",children:[a.jsx(w.LanguageIcon,{className:"h-4 w-4 text-gray-500 dark:text-gray-400"}),a.jsx("span",{children:n("language","Language")})]}),a.jsxs(Me,{value:o,onValueChange:d,children:[a.jsx(pe,{children:a.jsx(ft,{placeholder:n("selectLanguage","Select language")})}),a.jsx(fe,{children:c.map(g=>a.jsx(be,{value:g.code,className:"cursor-pointer",children:a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("span",{className:"text-lg leading-none",children:g.flag}),a.jsx("span",{children:g.name})]})},g.code))})]}),a.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:n("selectPreferredLanguage","Select your preferred language")})]})},Lo=({items:t,type:e="ordered",variant:r="default",className:n,itemClassName:o})=>{const s=()=>{const g="space-y-2",m={ordered:e==="ordered"?"list-decimal":"",unordered:e==="unordered"?"list-disc":""},p={default:"list-inside",enhanced:"list-inside space-y-3",minimal:"list-none space-y-1"};return f(g,m[e],p[r])},c=g=>{const m="text-gray-600 dark:text-gray-400";return r==="enhanced"?f(m,"relative pl-8 pb-2 border-l-2 border-gray-200 dark:border-gray-700",g===t.length-1&&"border-l-transparent"):r==="minimal"?f(m,"flex items-start"):m},l=g=>r==="enhanced"&&e==="ordered"?a.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:g+1}):null,d=(g,m)=>{const p=typeof g=="object",b=p?g.content:g,y=p?g.subItems:void 0;return a.jsxs("li",{className:f(c(m),o),children:[l(m),r==="minimal"&&e==="ordered"&&a.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:m+1}),r==="minimal"&&e==="unordered"&&a.jsx("span",{className:"inline-block w-2 h-2 bg-blue-600 rounded-full mt-2 mr-3 flex-shrink-0"}),a.jsxs("div",{className:"flex-1",children:[a.jsx("div",{children:b}),y&&y.length>0&&a.jsx("ul",{className:"mt-2 ml-4 space-y-1 list-disc list-inside text-sm text-gray-500 dark:text-gray-500",children:y.map((x,v)=>a.jsx("li",{children:x},v))})]})]},m)};return a.jsx("ul",{className:f(s(),n),children:t.map(d)})};class Mo extends h.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,r){console.error("ErrorBoundary caught an error:",e,r),this.props.onError?.(e,r)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:a.jsxs("div",{style:{padding:"20px",border:"1px solid red",margin:"10px"},children:[a.jsx("h2",{children:"Something went wrong"}),a.jsxs("p",{children:["Error: ",this.state.error?.message||"Unknown error"]}),a.jsx("button",{onClick:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}}class zo extends h.Component{constructor(e){super(e),this.retryTimer=null,this.sendErrorToMonitoring=(r,n)=>{try{typeof window<"u"&&window.Sentry&&window.Sentry?.captureException(r,{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:r.message,fatal:!1,custom_map:{component:this.props.componentName||"unknown"}})}catch(o){console.warn("Failed to send error to monitoring:",o)}},this.handleRetry=()=>{const{maxRetries:r=3,retryDelay:n=1e3}=this.props,{retryCount:o}=this.state;if(o>=r){console.warn(`Max retries (${r}) exceeded for ${this.props.componentName}`);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(e){return{hasError:!0,error:e,lastErrorTime:Date.now()}}componentDidCatch(e,r){const{onError:n,componentName:o}=this.props;this.setState({error:e,errorInfo:r}),console.error(`LazyErrorBoundary caught an error in ${o||"Unknown Component"}:`,e,r),n?.(e,r),this.sendErrorToMonitoring(e,r)}componentWillUnmount(){this.retryTimer&&clearTimeout(this.retryTimer)}render(){const{children:e,fallback:r,componentName:n,showRetryButton:o=!0,maxRetries:s=3}=this.props,{hasError:c,error:l,isRetrying:d,retryCount:g}=this.state;return c&&l?r||a.jsx("div",{className:"lazy-error-boundary error-boundary-container",children:a.jsxs("div",{className:"error-content",children:[a.jsx("div",{className:"error-icon",children:"⚠️"}),a.jsxs("h3",{className:"error-title",children:["Something went wrong loading ",n||"this component"]}),a.jsxs("div",{className:"error-details",children:[a.jsx("p",{className:"error-message",children:l.message}),process.env.NODE_ENV==="development"&&a.jsxs("details",{className:"error-stack",children:[a.jsx("summary",{children:"Error Details (Development)"}),a.jsx("pre",{children:l.stack})]})]}),a.jsxs("div",{className:"error-actions",children:[o&&g<s&&a.jsx("button",{onClick:this.handleRetry,disabled:d,className:"retry-button",children:d?"Retrying...":`Retry (${g}/${s})`}),g>=s&&a.jsx("button",{onClick:this.handleReload,className:"reload-button",children:"Reload Page"})]}),a.jsxs("div",{className:"error-help",children:[a.jsx("p",{children:"This might be a temporary issue. Try refreshing the page."}),navigator.onLine===!1&&a.jsx("p",{className:"offline-notice",children:"You appear to be offline. Check your connection and try again."})]})]})}):e}}const Oo=({children:t})=>a.jsx(a.Fragment,{children:t}),Wo=({children:t})=>a.jsx(a.Fragment,{children:t}),jo=(t,e,r)=>{const n=h.memo(t,e);return r&&(n.displayName=`Memo(${r})`),process.env.NODE_ENV==="development"?o=>(h.useMemo(()=>{let c=0;return()=>++c},[])(),a.jsx(n,{...o})):n},Bo=(t,e)=>h.memo(t,(r,n)=>e.every(o=>r[o]===n[o])),Do=h.memo(({children:t,compute:e,deps:r})=>{const n=h.useRef(r),o=h.useRef(e),s=h.useRef(void 0),c=h.useMemo(()=>{const l=r.length!==n.current.length||r.some((g,m)=>g!==n.current[m]),d=e!==o.current;if(l||d||s.current===void 0){let g;if(process.env.NODE_ENV==="development"){const m=performance.now();g=e();const p=performance.now();p-m>16&&console.warn(`Expensive computation took ${p-m}ms`)}else g=e();return n.current=r,o.current=e,s.current=g,g}return s.current},[e,r]);return a.jsx(a.Fragment,{children:t(c)})}),Fo=h.memo(({item:t,index:e,style:r,renderItem:n})=>a.jsx("div",{style:r,children:n(t,e)}),(t,e)=>t.index===e.index&&t.item===e.item&&t.style.height===e.style.height&&t.style.top===e.style.top),_o=h.memo(({condition:t,children:e,fallback:r=null})=>t?a.jsx(a.Fragment,{children:e}):a.jsx(a.Fragment,{children:r})),qo=({children:t,threshold:e=.1,rootMargin:r="50px",fallback:n=null})=>{const[o,s]=h.useState(!1),c=h.useRef(null);return h.useEffect(()=>{const l=new IntersectionObserver(([d])=>{d.isIntersecting&&(s(!0),l.disconnect())},{threshold:e,rootMargin:r});return c.current&&l.observe(c.current),()=>l.disconnect()},[e,r]),a.jsx("div",{ref:c,children:o?t:n})},Ho=({children:t,maxRenderTime:e=16,onSlowRender:r})=>{const n=h.useRef(0);return h.useLayoutEffect(()=>{n.current=performance.now()}),h.useEffect(()=>{const o=performance.now()-n.current;o>e&&(r?.(o),process.env.NODE_ENV==="development"&&console.warn(`Slow render detected: ${o}ms (threshold: ${e}ms)`))}),a.jsx(a.Fragment,{children:t})},Vo=({children:t,batchSize:e=5,delay:r=0})=>{const[n,o]=h.useState(e);return h.useEffect(()=>{if(n<t.length){const s=setTimeout(()=>{o(c=>Math.min(c+e,t.length))},r);return()=>clearTimeout(s)}},[n,t.length,e,r]),a.jsx(a.Fragment,{children:t.slice(0,n)})},Uo=({src:t,alt:e,placeholder:r,lowQualitySrc:n,aspectRatio:o="16/9",eager:s=!1,className:c="",...l})=>{const[d,g]=h.useState(!1),[m,p]=h.useState(s),[b,y]=h.useState(!1),x=h.useRef(null),v=h.useRef(null);h.useEffect(()=>{if(s){p(!0);return}return v.current=new IntersectionObserver(S=>{S.forEach(I=>{I.isIntersecting&&(p(!0),v.current&&x.current&&v.current.unobserve(x.current))})},{rootMargin:"50px",threshold:.01}),x.current&&v.current.observe(x.current),()=>{v.current&&v.current.disconnect()}},[s]);const N=()=>{g(!0)},C=()=>{y(!0),console.warn(`Failed to load image: ${t}`)};return a.jsxs("div",{className:`relative overflow-hidden ${c}`,style:{aspectRatio:o},children:[n&&!d&&a.jsx("img",{src:n,alt:"",className:"absolute inset-0 w-full h-full object-cover blur-sm","aria-hidden":"true"}),!n&&!d&&a.jsx("div",{className:"absolute inset-0 bg-gray-200 dark:bg-gray-700 animate-pulse","aria-hidden":"true"}),m&&!b&&a.jsx("img",{ref:x,src:t,alt:e,onLoad:N,onError:C,className:`absolute inset-0 w-full h-full object-cover transition-opacity duration-500 ${d?"opacity-100":"opacity-0"}`,loading:s?"eager":"lazy",...l}),b&&a.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-100 dark:bg-gray-800",children:a.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400",children:[a.jsx("svg",{className:"mx-auto h-12 w-12 mb-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:a.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"})}),a.jsx("p",{className:"text-sm",children:"Failed to load image"})]})})]})},Go=({title:t,description:e,primaryButton:r,secondaryButton:n,gradient:o={from:"blue-600",to:"purple-600"},textColor:s="light",className:c="",size:l="lg"})=>{const g=(()=>{const v=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"}[v]||"bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700"})(),m=s==="light"?"text-white":"text-gray-900 dark:text-gray-100",p={sm:"py-12",md:"py-16",lg:"py-20"},b={sm:"text-2xl md:text-3xl",md:"text-3xl md:text-4xl",lg:"text-4xl md:text-5xl"},y={sm:"text-base md:text-lg",md:"text-lg md:text-xl",lg:"text-xl md:text-2xl"},x=(v,N=!1)=>{const C=()=>v.variant==="primary"||N?"gradient":(v.variant==="secondary","outline"),S=a.jsx(F,{variant:C(),size:"lg",className:N?"":"bg-white/10 hover:bg-white/20 backdrop-blur-sm border-white/30",children:v.label});return v.external?a.jsx("a",{href:v.href,target:"_blank",rel:"noopener noreferrer",children:S}):a.jsx(ge.Link,{to:v.href,children:S})};return a.jsxs("section",{className:`${g} ${p[l]} relative overflow-hidden ${c}`,children:[a.jsx("div",{className:"absolute inset-0 bg-black/20"}),a.jsxs("div",{className:"absolute top-0 left-1/2 transform -translate-x-1/2 w-full h-full",children:[a.jsx("div",{className:"absolute top-10 left-10 w-72 h-72 bg-white/10 rounded-full blur-3xl"}),a.jsx("div",{className:"absolute bottom-10 right-10 w-72 h-72 bg-white/10 rounded-full blur-3xl"})]}),a.jsxs("div",{className:"relative z-10 max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[a.jsx("h2",{className:`${b[l]} font-bold ${m} mb-6`,children:t}),a.jsx("p",{className:`${y[l]} ${m}/90 mb-8 max-w-2xl mx-auto`,children:e}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[x(r,!0),n&&x(n,!1)]})]})]})},Ko=({children:t,backgroundClassName:e="",contentClassName:r=""})=>a.jsx("div",{className:e,children:a.jsx("div",{className:r,children:t})}),Qo=({title:t,description:e})=>a.jsxs("div",{className:"mb-8",children:[a.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:t}),e&&a.jsx("p",{className:"mt-2 text-gray-600 dark:text-gray-400",children:e})]}),Yo=({masterTitle:t,masterSubtitle:e,backButtonText:r,masterContent:n,detailContent:o,detailTitle:s,mobileView:c="navigation",onBackToNavigation:l,masterClassName:d="",detailClassName:g="",detailTitleClassName:m="",masterWidth:p=320,stickyMaster:b=!0,stickyTopOffset:y=96,desktopGap:x=32,showMasterBackground:v=!0,enableAnimations:N=!0,animationDuration:C=300,animationRef:S})=>{const I=`gap-${Math.round(x/4)}`||"gap-8",T=ce=>ce?ce.split("-")[0].trim():"Back",P=r?T(r):t?T(t):"Back",[_,K]=h.useState(!1),[le,W]=h.useState("auto"),q=h.useRef(null),j=h.useRef(null);h.useEffect(()=>(S&&(S.current={triggerTransition:ce=>{if(!N){ce();return}if(q.current){const Ze=q.current.scrollHeight;W(Ze)}K(!0),j.current&&clearTimeout(j.current),j.current=setTimeout(()=>{ce(),setTimeout(()=>{if(q.current){const Ze=q.current.scrollHeight;W(Ze),setTimeout(()=>{W("auto"),K(!1)},C)}},50)},C/2)}}),()=>{j.current&&clearTimeout(j.current)}),[N,C,S]);const Ce=N?{height:le==="auto"?"auto":`${le}px`,transition:`height ${C}ms cubic-bezier(0.4, 0, 0.2, 1)`,width:"100%",maxWidth:"100%"}:{width:"100%",maxWidth:"100%"},Se=N?`${_?"opacity-0 transform translate-y-2":"opacity-100 transform translate-y-0"}`:"",Zt=N?{transition:`opacity ${C}ms ease-in-out, transform ${C}ms ease-in-out`}:{};return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:`md:hidden ${c==="navigation"?"block":"hidden"} flex-1`,children:a.jsxs("div",{className:v?"bg-white dark:bg-gray-800 p-6":"p-6",children:[t&&a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[a.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4",children:t}),e&&a.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:e})]}),a.jsx("div",{className:d,children:n})]})}),a.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[a.jsxs("div",{className:`md:hidden ${c==="content"?"block":"hidden"}`,children:[c==="content"&&l&&a.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:["← ",P]}),a.jsx("div",{ref:q,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${g}`,style:Ce,children:a.jsxs("div",{className:Se,style:Zt,children:[s&&a.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${m}`,children:s}),o]})})]}),a.jsxs("div",{className:`hidden md:flex min-h-full ${I}`,style:{width:"100%"},children:[a.jsx("aside",{className:"flex-shrink-0",style:{width:`${p}px`,minWidth:`${p}px`},children:a.jsxs("div",{className:b?"sticky":"",style:b?{top:`${y}px`}:void 0,children:[t&&a.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:t}),e&&a.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:e}),a.jsx("div",{className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 ${b?"max-h-[calc(100vh-200px)] overflow-y-auto":""} ${d}`,children:n})]})}),a.jsx("div",{className:"flex-1 min-w-0",style:{width:`calc(100% - ${p+x}px)`},children:a.jsx("div",{ref:q,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${g}`,style:Ce,children:a.jsxs("div",{className:Se,style:Zt,children:[s&&a.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${m}`,children:s}),o]})})})]})]})]})},Zo=({children:t})=>(h.useEffect(()=>{const e=()=>{[{href:"/fonts/inter-var.woff2",as:"font",type:"font/woff2",crossorigin:!0},{href:"/images/hero-background.webp",as:"image",type:"image/webp"},{href:"/images/logo.svg",as:"image",type:"image/svg+xml"}].forEach(p=>{const b=document.createElement("link");b.rel="preload",b.href=p.href,b.as=p.as,p.type&&(b.type=p.type),p.crossorigin&&(b.crossOrigin=""),document.head.appendChild(b)})},r=()=>{if(document.querySelectorAll('img[data-priority="high"]').forEach(b=>{b.fetchPriority="high"}),document.querySelector("[data-hero]")){const b=document.createElement("link");b.rel="preload",b.href="/images/hero-background.webp",b.as="image",b.type="image/webp",document.head.appendChild(b)}},n=()=>{document.querySelectorAll("img:not([width]):not([height])").forEach(b=>{const y=b;y.naturalWidth&&y.naturalHeight&&(y.width=y.naturalWidth,y.height=y.naturalHeight)}),document.querySelectorAll("[data-dynamic]").forEach(b=>{b.getAttribute("style")?.includes("min-height")||(b.style.minHeight="200px")})},o=()=>{const m=()=>{document.querySelectorAll("script[data-defer]").forEach(y=>{y.setAttribute("defer","")})};"requestIdleCallback"in window?requestIdleCallback(()=>{m()}):setTimeout(m,1),(()=>{["scroll","touchstart","touchmove","wheel"].forEach(y=>{document.addEventListener(y,()=>{},{passive:!0})})})()},s=()=>{},c=()=>{[{rel:"dns-prefetch",href:"//fonts.googleapis.com"},{rel:"dns-prefetch",href:"//api.0xmail.box"},{rel:"preconnect",href:"https://fonts.gstatic.com",crossorigin:!0},{rel:"preconnect",href:"https://api.0xmail.box"}].forEach(p=>{const b=document.createElement("link");b.rel=p.rel,b.href=p.href,p.crossorigin&&(b.crossOrigin=""),document.head.appendChild(b)})},l=()=>{if(document.querySelectorAll("img[data-lazy]").forEach(p=>{p.loading="lazy"}),"IntersectionObserver"in window){const p=new IntersectionObserver(y=>{y.forEach(x=>{if(x.isIntersecting){const v=x.target;v.dataset.src&&(v.src=v.dataset.src,v.removeAttribute("data-src")),p.unobserve(v)}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(y=>p.observe(y))}},d=()=>{[{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:y,content:x})=>{if(!document.querySelector(`meta[name="${y}"]`)){const v=document.createElement("meta");v.name=y,v.content=x,document.head.appendChild(v)}});const p={"@context":"https://schema.org","@type":"WebApplication",name:"0xmail.box",description:"Web3 email platform using blockchain wallet authentication",url:"https://0xmail.box",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"}},b=document.createElement("script");b.type="application/ld+json",b.textContent=JSON.stringify(p),document.head.appendChild(b)},g=()=>{document.querySelectorAll('link[rel="stylesheet"][data-non-critical]').forEach(p=>{const b=p.cloneNode(!0);b.rel="preload",b.as="style",b.onload=()=>{b.onload=null,b.rel="stylesheet"},document.head.appendChild(b),p.remove()})};return e(),r(),n(),o(),c(),l(),d(),g(),setTimeout(s,2e3),()=>{}},[]),a.jsx(a.Fragment,{children:t})),Jo=()=>(h.useEffect(()=>{if(typeof window>"u"||typeof document>"u"||!document.documentElement)return;const t=()=>{if("IntersectionObserver"in window){const l=new IntersectionObserver(d=>{d.forEach(g=>{if(g.isIntersecting){const m=g.target;m.dataset.src&&(m.src=m.dataset.src,m.removeAttribute("data-src"),l.unobserve(m))}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(d=>{l.observe(d)})}const o=()=>{["/connect","/mail","/settings"].forEach(d=>{const g=document.createElement("link");g.rel="prefetch",g.href=d,document.head.appendChild(g)})},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)}},c=()=>{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(),c()},{timeout:2e3})},e=()=>{if("PerformanceObserver"in window){const o=new PerformanceObserver(c=>{const l=c.getEntries(),d=l[l.length-1];d&&d.startTime>2500&&(console.warn("Poor LCP detected, implementing aggressive optimizations"),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(c=>{let l=0;for(const d of c.getEntries())d.hadRecentInput||(l+=d.value);l>.1&&(console.warn("High CLS detected:",l),document.querySelectorAll("img:not([width]):not([height])").forEach(d=>{const g=d;g.style.aspectRatio="16/9"}))});try{s.observe({entryTypes:["layout-shift"]})}catch{}}},r=()=>{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(c=>{c.getAttribute("data-critical")||c.remove()}),localStorage.setItem("use-low-quality-images","true")):s==="3g"?document.documentElement.classList.add("moderate-connection"):document.documentElement.classList.add("fast-connection")}}};return(()=>{t(),e(),r()})(),()=>{if("PerformanceObserver"in window)try{PerformanceObserver.supportedEntryTypes.forEach(()=>{})}catch{}}},[]),null),Xo=({children:t})=>a.jsx(a.Fragment,{children:t}),Ro={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 es{constructor(){this.cache=new Map}set(e,r,n){if(this.cache.size>=n.maxSize){const o=this.cache.keys().next().value;o&&this.cache.delete(o)}this.cache.set(e,{data:r,timestamp:Date.now(),isStale:!1})}get(e,r){const n=this.cache.get(e);if(!n)return null;const s=Date.now()-n.timestamp>r.duration;return s&&!r.staleWhileRevalidate?(this.cache.delete(e),null):{data:n.data,isStale:s}}invalidate(e){for(const r of this.cache.keys())r.includes(e)&&this.cache.delete(r)}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((e,r)=>e+JSON.stringify(r).length*2,0)}}const Z=new es,G=new Map,Tt=async(t,e,r="messages")=>{const n=Ro[r],o=Z.get(t,n);if(o&&!o.isStale)return o.data;const s=G.get(t);if(s)return s;if(o&&o.isStale&&n.staleWhileRevalidate){const l=e().then(d=>(Z.set(t,d,n),G.delete(t),d)).catch(d=>{throw G.delete(t),d});return G.set(t,l),o.data}const c=e().then(l=>(Z.set(t,l,n),G.delete(t),l)).catch(l=>{throw G.delete(t),l});return G.set(t,c),c};class ts{constructor(){this.queue=[],this.timer=null,this.batchDelay=10}add(e,r){return new Promise((n,o)=>{this.queue.push({key:e,fetcher:r,resolve:n,reject:o}),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.processBatch()},this.batchDelay)})}async processBatch(){const e=[...this.queue];this.queue.length=0,this.timer=null;const r=this.groupRequests(e);for(const n of r)await Promise.allSettled(n.map(async o=>{try{const s=await o.fetcher();o.resolve(s)}catch(s){o.reject(s)}}))}groupRequests(e){const r=[];for(let o=0;o<e.length;o+=5)r.push(e.slice(o,o+5));return r}}const rs=new ts;class as{constructor(e,r={}){this.requestInterceptors=[],this.responseInterceptors=[],this.baseURL=e,this.defaultHeaders=r}addRequestInterceptor(e){this.requestInterceptors.push(e)}addResponseInterceptor(e){this.responseInterceptors.push(e)}async request(e,r={},n,o="messages"){const s=`${this.baseURL}${e}`,c=n||`${r.method||"GET"}:${s}`,l=async()=>{let d={...r,headers:{...this.defaultHeaders,...r.headers}};for(const b of this.requestInterceptors)d=b(d);const g=performance.now();let m=await fetch(s,d);for(const b of this.responseInterceptors)m=await b(m);const p=performance.now();if(process.env.NODE_ENV==="development"&&p-g>1e3&&console.warn(`Slow API request: ${s} took ${p-g}ms`),!m.ok)throw new Error(`API Error: ${m.status} ${m.statusText}`);return m.json()};return r.method==="GET"&&this.shouldBatch(e)?rs.add(c,l):Tt(c,l,o)}shouldBatch(e){return e.includes("/messages/")&&!e.includes("/messages?")}async get(e,r){return this.request(e,{method:"GET"},void 0,r)}async post(e,r){return this.request(e,{method:"POST",body:JSON.stringify(r)})}async put(e,r){return this.request(e,{method:"PUT",body:JSON.stringify(r)})}async delete(e){return this.request(e,{method:"DELETE"})}}const ns=async(t,e=3,r=1e3)=>{let n;for(let o=0;o<=e;o++)try{return await t()}catch(s){if(n=s,o===e)throw n;const c=r*Math.pow(2,o)+Math.random()*1e3;await new Promise(l=>setTimeout(l,c))}throw n};class os{constructor(){this.abortController=new AbortController}async request(e,r={}){const n=await fetch(e,{...r,signal:this.abortController.signal});if(!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);return n.json()}cancel(){this.abortController.abort()}}const ss={invalidate:t=>Z.invalidate(t),clear:()=>Z.clear(),getStats:()=>Z.getStats(),warmUp:async t=>{await Promise.allSettled(t.map(e=>e()))},prefetch:async t=>{"requestIdleCallback"in window?window.requestIdleCallback(async()=>{await Promise.allSettled(t.map(e=>e()))}):setTimeout(async()=>{await Promise.allSettled(t.map(e=>e()))},100)}};function Lt(){if(typeof window>"u")return!1;const t=window.navigator.userAgent.toLowerCase();return["metamask","trustwallet","coinbase","rainbow","phantom","solflare","exodus","ledger","binance","okx"].some(r=>t.includes(r))}function Mt(){return typeof window>"u"?!1:window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"}function zt(){if(typeof window>"u")return!1;const t=window.location.hostname;return/^\d+\.\d+\.\d+\.\d+$/.test(t)}function Ot(){return Mt()?"localhost":Lt()?"wallet-browser":zt()?"network":"production"}function is(){const t=Ot();return t==="localhost"||t==="wallet-browser"}function ls(t){}function Wt(){return typeof window<"u"}function cs(){return typeof window<"u"}function ds(t,e){if(Wt())t();else return e}const jt={"default-src":["'self'"],"script-src":["'self'","'unsafe-inline'","'unsafe-eval'","https://fonts.googleapis.com","https://www.googletagmanager.com","https://www.google-analytics.com"],"style-src":["'self'","'unsafe-inline'","https://fonts.googleapis.com","https://fonts.gstatic.com"],"font-src":["'self'","https://fonts.gstatic.com","data:"],"img-src":["'self'","data:","https:","blob:"],"connect-src":["'self'","https://api.0xmail.box","https://0xmail.box","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'"]},Bt=()=>Object.entries(jt).map(([t,e])=>`${t} ${e.join(" ")}`).join("; "),gs={"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":Bt()},us={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"},ms=()=>{typeof window<"u"&&document.addEventListener("securitypolicyviolation",t=>{console.warn("CSP Violation:",{blockedURI:t.blockedURI,violatedDirective:t.violatedDirective,originalPolicy:t.originalPolicy,sourceFile:t.sourceFile,lineNumber:t.lineNumber})})},hs={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"},B=new Map,ee=new Map,ve=new Set;let te="medium",Fe=!1;function ps(){if("connection"in navigator){const r=navigator.connection;r&&(te=r.effectiveType==="4g"?"fast":r.effectiveType==="3g"?"medium":"slow")}const t=navigator.deviceMemory,e=navigator.hardwareConcurrency;Fe=t&&t<4||e&&e<4}ps();function fs(t,e,r={}){const{retries:n=3,timeout:o=1e4,fallback:s,preloadCondition:c,cacheStrategy:l="memory",priority:d="medium",onLoad:g,onError:m}=r;if(B.has(e))return B.get(e).component;const p=h.lazy(async()=>{const y=performance.now();if(ee.has(e))return ee.get(e).then(v=>({default:v}));const x=bs(t,n,o);ee.set(e,x.then(v=>v.default));try{const v=await x,N=performance.now()-y;if(l!=="none"){const C={component:v.default,timestamp:Date.now(),loadTime:N};if(B.set(e,C),l==="session")try{sessionStorage.setItem(`lazy_${e}`,JSON.stringify({timestamp:C.timestamp,loadTime:N}))}catch{console.warn("Session storage failed for lazy component cache")}}return ee.delete(e),g?.(v.default),v}catch(v){throw ee.delete(e),m?.(v),v}}),b=y=>{const[x,v]=h.useState(!0);h.useEffect(()=>{if(c&&!B.has(e)&&c()&&!ve.has(e)){ve.add(e);const S=ys(d,te);setTimeout(()=>{t().catch(console.warn)},S)}},[]);const N=s||a.jsxs("div",{className:"flex items-center justify-center p-4",children:[a.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),a.jsxs("span",{className:"ml-2 text-sm text-gray-600",children:["Loading ",e.replace(/([A-Z])/g," $1").trim(),"..."]})]});return!x&&Fe&&te==="slow"?a.jsx("div",{className:"lazy-placeholder",children:a.jsxs("button",{onClick:()=>v(!0),className:"load-component-btn",children:["Load ",e]})}):a.jsx(h.Suspense,{fallback:N,children:a.jsx(p,{...y})})};return b.displayName=`AdvancedLazy(${e})`,b}async function bs(t,e,r){let n;for(let o=0;o<e;o++)try{const s=new Promise((l,d)=>{setTimeout(()=>d(new Error("Load timeout")),r)});return await Promise.race([t(),s])}catch(s){if(n=s,o<e-1){const c=Math.pow(2,o)*1e3,l=Math.random()*1e3;await new Promise(d=>setTimeout(d,c+l)),console.warn(`Retry ${o+1}/${e} for component load:`,s)}}throw n}function ys(t,e){const r={critical:0,high:500,medium:2e3,low:5e3},n={fast:.5,medium:1,slow:2},o=r[t]||2e3,s=n[e]||1;return o*s}const se=class se{static registerRoute(e,r){this.routeMap.set(e,r),this.routeUsageStats.set(e,0)}static setCurrentRoute(e){this.currentRoute=e;const r=this.routeUsageStats.get(e)||0;this.routeUsageStats.set(e,r+1),this.preloadLikelyRoutes(e)}static preloadLikelyRoutes(e){this.getRouteTransitionProbability(e).forEach(({route:n,probability:o})=>{o>.3&&!B.has(n)&&setTimeout(()=>{this.routeMap.get(n)},te==="fast"?1e3:3e3)})}static getRouteTransitionProbability(e){const r=[];switch(e){case"/":r.push({route:"/connect",probability:.7},{route:"/about",probability:.2},{route:"/document",probability:.1});break;case"/connect":r.push({route:"/mail",probability:.8},{route:"/settings",probability:.1});break;case"/mail":r.push({route:"/compose",probability:.4},{route:"/settings",probability:.2});break;default:r.push({route:"/",probability:.1})}return r}static getStats(){return{routeCount:this.routeMap.size,cacheSize:B.size,currentRoute:this.currentRoute,usageStats:Object.fromEntries(this.routeUsageStats)}}};se.routeMap=new Map,se.routeUsageStats=new Map,se.currentRoute="";let _e=se;const xs=({src:t,alt:e,className:r,placeholder:n,priority:o="medium"})=>{const[s,c]=h.useState(!1),[l,d]=h.useState(!1),g=h.useRef(null);h.useEffect(()=>{if(!g.current)return;if(o==="high"){d(!0);return}const p=new IntersectionObserver(([b])=>{b.isIntersecting&&(d(!0),p.unobserve(b.target))},{rootMargin:o==="low"?"100px":"200px",threshold:.1});return p.observe(g.current),()=>p.disconnect()},[o]);const m=()=>{c(!0)};return a.jsxs("div",{className:`lazy-image-container ${r}`,children:[a.jsx("img",{ref:g,src:l?t:n||"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB2aWV3Qm94PSIwIDAgMSAxIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiNGM0Y0RjYiLz48L3N2Zz4=",alt:e,className:`transition-opacity duration-300 ${s?"opacity-100":"opacity-0"}`,onLoad:m,loading:o==="high"?"eager":"lazy",fetchPriority:o==="high"?"high":"low"}),!s&&l&&a.jsx("div",{className:"absolute inset-0 bg-gray-200 animate-pulse rounded"})]})};function vs(){B.clear(),ve.clear()}function ws(){return{cachedComponents:B.size,preloadQueue:ve.size,networkSpeed:te,isLowEndDevice:Fe,cacheEntries:Array.from(B.entries()).map(([t,e])=>({name:t,loadTime:e.loadTime,age:Date.now()-e.timestamp}))}}const ks=({message:t})=>a.jsxs("div",{className:"flex items-center justify-center p-4",children:[a.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),a.jsx("span",{className:"ml-2 text-sm text-gray-600",children:t})]}),Cs=t=>{if(typeof t=="function"||typeof t=="object")return t;switch(t){case"minimal":return()=>a.jsx("div",{className:"flex justify-center items-center p-4",children:"Loading..."});case"skeleton":return()=>a.jsxs("div",{className:"animate-pulse",children:[a.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4 mb-2"}),a.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/2"})]});case"default":default:return()=>a.jsx(ks,{message:"Loading component..."})}},Dt=(t,e="default",r=3)=>{const n=h.lazy(async()=>{let s=null;for(let c=0;c<r;c++)try{return await t()}catch(l){s=l,console.warn(`Failed to load component (attempt ${c+1}/${r}):`,l),c<r-1&&await new Promise(d=>setTimeout(d,Math.pow(2,c)*1e3))}throw s}),o=Cs(e);return s=>a.jsx(h.Suspense,{fallback:a.jsx(o,{}),children:a.jsx(n,{...s})})},Ss=async t=>{try{await t()}catch(e){console.warn("Failed to preload component:",e)}},Ns=t=>{const e={};return Object.entries(t).forEach(([r,n])=>{e[r]=Dt(n,"skeleton")}),e},Es=t=>t,Ft={critical:["/","/connect","/mail"],secondary:["/settings","/compose","/points"],optional:["/document","/about","/terms","/privacy"]},ie=class ie{static add(e,r){this.preloadedComponents.has(e)||(this.preloadQueue.push({name:e,loader:r}),this.processQueue())}static async processQueue(){this.isPreloading||this.preloadQueue.length===0||(this.isPreloading=!0,"requestIdleCallback"in window?window.requestIdleCallback(async()=>{const e=this.preloadQueue.shift();if(e)try{await e.loader(),this.preloadedComponents.add(e.name)}catch(r){console.warn(`Failed to preload ${e.name}:`,r)}this.isPreloading=!1,this.processQueue()}):setTimeout(async()=>{const e=this.preloadQueue.shift();if(e)try{await e.loader(),this.preloadedComponents.add(e.name)}catch(r){console.warn(`Failed to preload ${e.name}:`,r)}this.isPreloading=!1,this.processQueue()},100))}static isPreloaded(e){return this.preloadedComponents.has(e)}static clear(){this.preloadedComponents.clear(),this.preloadQueue=[],this.isPreloading=!1}};ie.preloadedComponents=new Set,ie.preloadQueue=[],ie.isPreloading=!1;let qe=ie;const Is=()=>{"requestIdleCallback"in window&&window.requestIdleCallback(()=>{Ft.secondary.forEach(t=>{})})},_t=({message:t})=>a.jsxs("div",{className:"flex items-center justify-center p-4",children:[a.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),a.jsx("span",{className:"ml-2 text-sm text-gray-600",children:t})]}),re=new Map;function Ps(t,e){const{condition:r,fallback:n,retries:o=3,timeout:s=1e4,priority:c="medium",cacheKey:l=`conditional-${Math.random()}`}=e,d=g=>{const[m,p]=h.useState(!1),[b,y]=h.useState(null);return h.useEffect(()=>{const N=setTimeout(async()=>{const C=re.get(l);if(C&&C.isValid&&Date.now()-C.lastCheck<3e5)try{if(await C.condition()){y(()=>C.component),p(!0);return}}catch(S){console.warn("Cached condition check failed:",S)}try{if(await r()){const I=await Ts(t,o,s);re.set(l,{component:I.default,condition:r,lastCheck:Date.now(),isValid:!0}),y(()=>I.default),p(!0)}}catch(S){console.error("Failed to load conditional component:",S)}},c==="high"?0:c==="medium"?100:500);return()=>clearTimeout(N)},[]),m?b?a.jsx(h.Suspense,{fallback:n||a.jsx(_t,{message:"Loading component..."}),children:a.jsx(b,{...g})}):null:n||a.jsx(_t,{message:"Checking conditions..."})};return d.displayName=`ConditionalLazy(${l})`,d}const $s={},As={};async function Ts(t,e,r){let n;for(let o=0;o<e;o++)try{const s=new Promise((c,l)=>{setTimeout(()=>l(new Error("Import timeout")),r)});return await Promise.race([t(),s])}catch(s){if(n=s,o<e-1){const c=Math.pow(2,o)*1e3;await new Promise(l=>setTimeout(l,c))}}throw n}function Ls(){re.clear()}function Ms(){return{cachedComponents:re.size,cacheEntries:Array.from(re.entries()).map(([t,e])=>({key:t,lastCheck:e.lastCheck,isValid:e.isValid,age:Date.now()-e.lastCheck}))}}const qt=[{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 zs{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 r=navigator.connection;if(r){const n=r.effectiveType;n==="4g"?this.networkSpeedEstimate="fast":n==="3g"?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}}const e=performance.now();fetch("/favicon.ico",{method:"HEAD"}).then(()=>{const r=performance.now()-e;r<100?this.networkSpeedEstimate="fast":r<300?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}).catch(()=>{this.networkSpeedEstimate="slow"})}detectDeviceCapability(){const e=navigator.deviceMemory,r=navigator.hardwareConcurrency;e&&e<4&&(this.isLowEndDevice=!0),r&&r<4&&(this.isLowEndDevice=!0),"getBattery"in navigator&&navigator.getBattery?.().then(n=>{n.level&&n.level<.2&&(this.isLowEndDevice=!0)})}startUserActivityTracking(){let e;const r=()=>{this.userActivityScore=Math.min(this.userActivityScore+1,100),clearTimeout(e),e=setTimeout(()=>{this.userActivityScore=Math.max(this.userActivityScore-1,0)},5e3)};["click","scroll","keydown","mousemove"].forEach(n=>{document.addEventListener(n,r,{passive:!0})})}shouldPreload(e){return this.networkSpeedEstimate==="slow"&&e.size>50||this.isLowEndDevice&&e.size>30?!1:e.config.condition()}async preloadChunk(e){if(!this.preloaded.has(e.name))try{if(document.querySelectorAll('script[src*="'+e.name+'"]').length===0&&document.querySelectorAll('link[href*="'+e.name+'"]').length>0)return;const n=document.createElement("link");n.rel="modulepreload",n.href=e.path.replace("*",this.getChunkHash(e.name)),n.crossOrigin="","fetchPriority"in n&&(n.fetchPriority=e.config.priority==="critical"?"high":"low"),document.head.appendChild(n),this.preloaded.add(e.name)}catch(r){console.warn(`Failed to preload chunk ${e.name}:`,r)}}getChunkHash(e){const r=Array.from(document.querySelectorAll("script[src]"));for(const n of r){const o=n.src;if(o.includes(e)){const s=o.match(new RegExp(`${e}-([A-Za-z0-9_-]+)\\.js`));if(s)return s[1]}}return"unknown"}async schedulePreload(e){const r=e.config;return r.delay&&await new Promise(n=>setTimeout(n,r.delay)),r.onIdle&&"requestIdleCallback"in window?new Promise(n=>{window.requestIdleCallback(()=>{this.preloadChunk(e).then(n)})}):this.preloadChunk(e)}initializePreloading(){qt.sort((r,n)=>{const o={critical:0,high:1,medium:2,low:3};return o[r.config.priority]-o[n.config.priority]}).forEach(r=>{this.shouldPreload(r)&&(r.config.priority==="critical"?this.preloadChunk(r):this.schedulePreload(r),r.config.onHover&&this.setupHoverPreloading(r),r.config.onScroll&&this.setupScrollPreloading(r,r.config.onScroll))}),this.startIntelligentPreloading()}setupHoverPreloading(e){document.querySelectorAll("[data-preload-on-hover]").forEach(n=>{let o=!1;n.addEventListener("mouseenter",()=>{!o&&this.userActivityScore>30&&(this.preloadChunk(e),o=!0)},{passive:!0})})}setupScrollPreloading(e,r){let n=!1;const o=()=>{if(n)return;window.scrollY/(document.body.scrollHeight-window.innerHeight)*100>=r&&(this.preloadChunk(e),n=!0,window.removeEventListener("scroll",o))};window.addEventListener("scroll",o,{passive:!0})}startIntelligentPreloading(){setTimeout(()=>{this.userActivityScore>50&&this.networkSpeedEstimate!=="slow"&&qt.filter(r=>r.config.priority==="medium"&&this.shouldPreload(r)).forEach(r=>{Math.random()>.5&&this.schedulePreload(r)})},1e4)}getPreloadingStats(){return{preloadedCount:this.preloaded.size,networkSpeed:this.networkSpeedEstimate,isLowEndDevice:this.isLowEndDevice,userActivity:this.userActivityScore}}}let ae=null;function Os(){ae||(ae=new zs,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{ae?.initializePreloading()}):ae.initializePreloading())}function Ws(){return ae?.getPreloadingStats()}function js(t){const e={"ai-content-type":t.contentType,"ai-primary-topic":t.primaryTopic,"ai-complexity-level":t.complexityLevel,"ai-content-purpose":t.contentPurpose,"ai-industry-vertical":t.industryVertical,"ai-semantic-keywords":t.semanticKeywords.join(","),"ai-target-audience":t.targetAudience.join(","),"ai-technical-tags":t.technicalTags.join(","),"ai-user-intent":t.userIntent.join(","),"ai-conversion-goals":t.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 t.contentType==="governance-page"&&(e["ai-governance-features"]="voting-notifications,multi-sig-coordination,proposal-tracking",e["ai-dao-platforms"]="snapshot,tally,aragon,safe,decentdao",e["ai-participation-boost"]="85%",e["ai-treasury-management"]="enabled"),e}function Ht(t){const e={"@context":"https://schema.org","@type":Fs(t.contentType),name:t.primaryTopic,description:`Comprehensive ${t.primaryTopic} resource for ${t.targetAudience.join(", ")}`,about:t.semanticKeywords.map(r=>({"@type":"Thing",name:r})),audience:{"@type":"Audience",audienceType:t.targetAudience.join(", ")},educationalLevel:t.complexityLevel,inLanguage:"en",isAccessibleForFree:!0};return t.contentType==="governance-page"?{...e,"@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"}]}:e}function Bs(t,e){return e.map(r=>({type:"related-content",target:r.url,strength:r.relevance}))}function Vt(t){const e=["0xmail.box","Web3","blockchain","email","wallet","cryptocurrency"],r=["DAO","governance","voting","multi-sig","Snapshot","Tally","Aragon","Safe","proposal","community"];return t.contentType==="governance-page"?[...e,...r]:e}function Ut(t){const e=["web3-infrastructure","email-technology","blockchain-applications"],r=["dao-governance-tools","voting-notification-systems","community-management-platforms","multi-signature-coordination","treasury-management-solutions"];return t.contentType==="governance-page"?[...e,...r]:e}function Ds(t,e){return{contentClassification:{type:t.contentType,topic:t.primaryTopic,audience:t.targetAudience.join(","),complexity:t.complexityLevel,purpose:t.contentPurpose,vertical:t.industryVertical},semanticMarkup:Ht(t),entityRecognition:Vt(t),topicClustering:Ut(t),contentRelationships:e?.contentRelationships||[],...e}}function Fs(t){return{article:"Article","landing-page":"WebPage","product-page":"Product","governance-page":"SoftwareApplication",documentation:"TechArticle"}[t]||"WebPage"}function _s(t){return{"@context":"https://schema.org","@type":"MonitorAction",name:`AI Performance Tracking - ${t}`,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:`${t} Performance Data`,description:"AI-optimized performance metrics and user interaction data"}}}const qs={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"]}},Hs=({message:t,className:e})=>a.jsxs("div",{className:`flex items-center justify-center p-4 ${e||""}`,children:[a.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),a.jsx("span",{className:"ml-2 text-sm text-gray-600",children:t})]}),He=new Map,ne=new Set;function Ve(){const t=[];return!!window.ethereum?.isMetaMask&&(ne.add("metamask"),t.push({name:"MetaMask",detected:!0,priority:1})),!!window.ethereum?.isCoinbaseWallet&&(ne.add("coinbase"),t.push({name:"Coinbase Wallet",detected:!0,priority:2})),!!window.solana?.isPhantom&&(ne.add("phantom"),t.push({name:"Phantom",detected:!0,priority:3})),t.push({name:"WalletConnect",detected:!0,priority:4}),t.sort((o,s)=>o.priority-s.priority)}function Ue(t){const e=`wallet-${t.toLowerCase()}`;if(He.has(e))return He.get(e);const r=()=>Promise.resolve({default:()=>h.createElement("div",{},`${t} Provider Placeholder`)}),n=h.lazy(r),o=s=>a.jsx(h.Suspense,{fallback:a.jsx(Hs,{message:`Loading ${t} wallet...`,className:"wallet-loading"}),children:a.jsx(n,{...s})});return o.displayName=`Lazy${t}Provider`,He.set(e,o),o}function Vs({children:t}){const e=Ve();return e.filter(r=>r.priority<=2&&r.detected).forEach(r=>{setTimeout(()=>{},1e3)}),a.jsxs(a.Fragment,{children:[e.map(r=>{const n=Ue(r.name);return a.jsx(n,{},r.name)}),t]})}const Ye=class Ye{static preloadWallet(e){const r=e.toLowerCase();this.preloadedWallets.has(r)||(this.preloadedWallets.add(r),setTimeout(()=>{Ue(e)},500))}static preloadCommonWallets(){["metamask","walletconnect","coinbase"].forEach((r,n)=>{setTimeout(()=>{this.preloadWallet(r)},n*1e3)})}static getPreloadedWallets(){return Array.from(this.preloadedWallets)}};Ye.preloadedWallets=new Set;let oe=Ye;function Us(){return{availableWallets:Ve(),preloadWallet:n=>{oe.preloadWallet(n)},getDetectedWallets:()=>Array.from(ne),hasWallet:n=>ne.has(n.toLowerCase())}}function Gs({walletName:t,onConnect:e,disabled:r=!1}){const n=()=>{oe.preloadWallet(t),setTimeout(e,100)};return a.jsxs("button",{onClick:n,disabled:r,className:"wallet-connect-btn","data-wallet":t.toLowerCase(),children:["Connect ",t]})}class Ks{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 c of s.getEntries())c.name==="first-contentful-paint"&&(this.observedMetrics.fcp=c.startTime,this.optimizeBasedOnFCP(c.startTime))}).observe({entryTypes:["paint"]}),new PerformanceObserver(s=>{for(const c of s.getEntries())this.observedMetrics.lcp=c.startTime,this.optimizeBasedOnLCP(c.startTime)}).observe({entryTypes:["largest-contentful-paint"]});let n=0;new PerformanceObserver(s=>{for(const c of s.getEntries())c.hadRecentInput||(n+=c.value);this.observedMetrics.cls=n}).observe({entryTypes:["layout-shift"]})}catch(e){console.warn("Performance observation setup failed:",e)}window.addEventListener("load",()=>{setTimeout(()=>{const e=performance.getEntriesByType("navigation")[0];e&&(this.observedMetrics.ttfb=e.responseStart-e.requestStart,this.optimizeBasedOnTTFB(this.observedMetrics.ttfb))},0)})}optimizeBasedOnFCP(e){e>2e3?this.applyEmergencyOptimizations():e>1500&&this.applyMediumOptimizations()}optimizeBasedOnLCP(e){e>2500&&this.optimizeLCPElements()}optimizeBasedOnTTFB(e){e>600&&(console.warn("Slow server response, enabling aggressive caching"),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(r=>{this.preloadResource(r,"script")})}optimizeLCPElements(){document.querySelectorAll("img[data-hero], [data-lcp-element]").forEach(n=>{n instanceof HTMLImageElement&&(n.fetchPriority="high",n.loading="eager")});const r=document.querySelector("img[data-hero]")?.getAttribute("src");r&&this.preloadResource(r,"image")}enableAggressiveCaching(){const e=document.createElement("meta");e.httpEquiv="Cache-Control",e.content="public, max-age=31536000, immutable",document.head.appendChild(e)}preloadResource(e,r){if(document.querySelector(`link[href*="${e}"]`))return;const o=document.createElement("link");switch(o.rel="preload",o.href=e,r){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(e=>e.priority==="critical"&&e.preload).forEach(e=>{this.preloadResource(e.url,e.type)}),this.inlineCriticalCSS(),this.optimizeFontLoading(),this.removeRenderBlocking(),this.setupProgressiveLoading()}inlineCriticalCSS(){const e=document.querySelector('link[rel="stylesheet"][data-critical]');e&&this.isSmallResource(e.getAttribute("href")||"")&&fetch(e.getAttribute("href")||"").then(r=>r.text()).then(r=>{if(r.length<1e4){const n=document.createElement("style");n.textContent=r,document.head.appendChild(n),e.remove()}}).catch(console.warn)}optimizeFontLoading(){document.querySelectorAll('link[href*="fonts.googleapis.com"]').forEach(r=>{const n=r.getAttribute("href")||"";if(!n.includes("display=swap")){const o=n.includes("?")?"&":"?";r.setAttribute("href",`${n}${o}display=swap`)}})}removeRenderBlocking(){document.querySelectorAll('link[rel="stylesheet"]:not([data-critical])').forEach(r=>{const n=r.cloneNode(!0);n.rel="preload",n.as="style",n.onload=()=>{n.onload=null,n.rel="stylesheet"};const o=document.createElement("noscript"),s=r.cloneNode(!0);o.appendChild(s),document.head.appendChild(n),document.head.appendChild(o),r.remove()})}setupProgressiveLoading(){const e=document.querySelectorAll("img[data-src]");if("IntersectionObserver"in window){const r=new IntersectionObserver(n=>{n.forEach(o=>{if(o.isIntersecting){const s=o.target;s.src=s.dataset.src||"",s.removeAttribute("data-src"),r.unobserve(s)}})},{rootMargin:"50px 0px",threshold:.01});e.forEach(n=>r.observe(n))}else e.forEach(r=>{const n=r;n.src=n.dataset.src||""})}isSmallResource(e){return e.includes("critical")||e.includes("inline")}getPerformanceMetrics(){return{...this.observedMetrics,score:this.calculatePerformanceScore()}}calculatePerformanceScore(){let e=100;return this.observedMetrics.fcp>2e3?e-=20:this.observedMetrics.fcp>1500&&(e-=10),this.observedMetrics.lcp>2500?e-=25:this.observedMetrics.lcp>2e3&&(e-=15),this.observedMetrics.cls>.1?e-=15:this.observedMetrics.cls>.05&&(e-=8),this.observedMetrics.ttfb>600?e-=10:this.observedMetrics.ttfb>400&&(e-=5),Math.max(e,0)}}const we={mark:t=>{typeof performance<"u"&&performance.mark&&performance.mark(t)},measure:(t,e,r)=>{if(typeof performance<"u"&&performance.measure)try{performance.measure(t,e,r);const n=performance.getEntriesByName(t);return n[n.length-1]?.duration||0}catch(n){return console.warn("Performance measurement failed:",n),0}return 0},getEntries:t=>typeof performance<"u"&&performance.getEntriesByName?t?performance.getEntriesByName(t):performance.getEntries():[],clearEntries:t=>{typeof performance<"u"&&(t?(performance.clearMeasures?.(t),performance.clearMarks?.(t)):(performance.clearMeasures?.(),performance.clearMarks?.()))}},Qs=(t,e=[])=>{h.useEffect(()=>(we.mark(`${t}-start`),()=>{we.mark(`${t}-end`),we.measure(t,`${t}-start`,`${t}-end`)}),[t,e])},Ys=t=>{const e=h.useRef(t);return e.current=t,h.useCallback((...r)=>e.current(...r),[])},Zs=(t,e,r)=>{const n=h.useRef(e),o=h.useRef(void 0);return h.useMemo(()=>(r&&process.env.NODE_ENV==="development"&&e.some((s,c)=>s!==n.current[c]),n.current=e,o.current=t(),o.current),[t,r,e])},ke=new Map,Js=t=>{const e=ke.get(t)||0;ke.set(t,e+1),h.useEffect(()=>{process.env.NODE_ENV})},Xs=()=>Object.fromEntries(ke),Rs=()=>ke.clear(),ei=t=>h.lazy(t),ti=(t=.1)=>{const[e,r]=h.useState(new Set),n=h.useRef(null);h.useEffect(()=>(n.current=new IntersectionObserver(s=>{s.forEach(c=>{if(c.isIntersecting){const l=c.target,d=l.dataset.src;d&&(l.src=d,l.onload=()=>{r(g=>new Set(g).add(d))},n.current?.unobserve(l))}})},{threshold:t}),()=>n.current?.disconnect()),[t]);const o=h.useCallback(s=>{s&&n.current&&n.current.observe(s)},[]);return{loadedImages:e,observeImage:o}},ri=t=>{typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(()=>{t().catch(()=>{})}):setTimeout(()=>{t().catch(()=>{})},100)},Gt={},ai=t=>{Gt[t.name]=t.value,process.env.NODE_ENV},ni=()=>Gt,oi=(t,e="script")=>{if(typeof document<"u"){const r=document.createElement("link");r.rel="prefetch",r.href=t,r.as=e,document.head.appendChild(r)}},si=(t,e="script",r)=>{if(typeof document<"u"){const n=document.createElement("link");n.rel="preload",n.href=t,n.as=e,r&&(n.crossOrigin="anonymous"),document.head.appendChild(n)}},ii=t=>{const e=h.useRef(new Set),r=h.useRef(new Set),n=h.useCallback((s,c)=>{const l=setTimeout(()=>{e.current.delete(l),s()},c);return e.current.add(l),l},[]),o=h.useCallback((s,c)=>{const l=setInterval(s,c);return r.current.add(l),l},[]);return h.useEffect(()=>{const s=e.current,c=r.current;return()=>{s.forEach(l=>clearTimeout(l)),c.forEach(l=>clearInterval(l)),process.env.NODE_ENV}},[t]),{createTimer:n,createInterval:o}},D={maxBundleSize:500,maxChunkSize:200,maxImageSize:100,maxFCP:1800,maxLCP:2500,maxFID:100,maxCLS:.1,check:t=>{const e=[];return t.FCP&&t.FCP>D.maxFCP&&e.push(`FCP (${t.FCP}ms) exceeds budget (${D.maxFCP}ms)`),t.LCP&&t.LCP>D.maxLCP&&e.push(`LCP (${t.LCP}ms) exceeds budget (${D.maxLCP}ms)`),t.FID&&t.FID>D.maxFID&&e.push(`FID (${t.FID}ms) exceeds budget (${D.maxFID}ms)`),t.CLS&&t.CLS>D.maxCLS&&e.push(`CLS (${t.CLS}) exceeds budget (${D.maxCLS})`),e}},li=({contentType:t,aiSummary:e,technicalComplexity:r="intermediate"})=>a.jsxs(tr.Helmet,{children:[a.jsx("meta",{name:"ai:content-type",content:t}),a.jsx("meta",{name:"ai:summary",content:e}),a.jsx("meta",{name:"ai:complexity",content:r})]}),ci=({children:t,className:e,...r})=>a.jsx("main",{className:e,...r,role:"main",children:t}),di=({children:t})=>a.jsx(a.Fragment,{children:t}),J=t=>Array.isArray(t)?t:typeof t=="string"?t.split(",").map(e=>e.trim()).filter(Boolean):[],Ge=t=>{const e=J(t.audience);return{"@context":"https://schema.org","@type":"SoftwareApplication",name:"0xmail.box",applicationCategory:"CommunicationApplication",operatingSystem:"Web Browser",description:t.description,url:"https://0xmail.box",downloadUrl:"https://0xmail.box/connect",installUrl:"https://0xmail.box/connect",screenshot:"https://0xmail.box/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:e.join(", "),geographicArea:"Worldwide"},creator:{"@type":"Organization",name:"0xmail.box",url:"https://0xmail.box"},datePublished:"2024-01-01",dateModified:t.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}}},Ke=t=>{const e=J(t.keywords),r=J(t.audience);return{"@context":"https://schema.org","@type":"TechnicalArticle",headline:t.title,description:t.description,author:{"@type":"Organization",name:"0xmail.box",url:"https://0xmail.box",logo:{"@type":"ImageObject",url:"https://0xmail.box/logo.png"}},publisher:{"@type":"Organization",name:"0xmail.box",logo:{"@type":"ImageObject",url:"https://0xmail.box/logo.png",width:600,height:600}},datePublished:"2024-01-01T00:00:00Z",dateModified:t.lastUpdated?.toISOString()||new Date().toISOString(),mainEntityOfPage:{"@type":"WebPage","@id":`https://0xmail.box${location.pathname}`},image:{"@type":"ImageObject",url:"https://0xmail.box/og-images/technical-guide.jpg",width:1200,height:630},keywords:e.join(", "),about:[{"@type":"Thing",name:"Web3 Email Platform"},{"@type":"Thing",name:"Blockchain Technology"},{"@type":"Thing",name:"Decentralized Communication"}],audience:{"@type":"Audience",audienceType:r.join(", "),educationalLevel:t.complexity},educationalLevel:t.complexity,proficiencyLevel:t.complexity,learningResourceType:t.contentType,timeRequired:t.readingTime?`PT${t.readingTime}M`:"PT5M",inLanguage:"en",isAccessibleForFree:!0,license:"https://creativecommons.org/licenses/by/4.0/",teaches:t.relatedTopics||["Web3 email setup","Wallet connection process","Blockchain authentication","Smart contract integration"]}},gi=t=>({"@context":"https://schema.org","@type":"FAQPage",mainEntity:t.map(e=>({"@type":"Question",name:e.question,acceptedAnswer:{"@type":"Answer",text:e.answer,dateCreated:new Date().toISOString(),upvoteCount:Math.floor(Math.random()*50)+10,author:{"@type":"Organization",name:"0xmail.box"}},answerCount:1,upvoteCount:Math.floor(Math.random()*100)+20,dateCreated:"2024-01-01T00:00:00Z",category:e.category||"Web3 Email"}))}),Qe=t=>({"@context":"https://schema.org","@type":"WebPage",name:t.title,description:t.description,url:`https://0xmail.box${location.pathname}`,primaryImageOfPage:{"@type":"ImageObject",url:"https://0xmail.box/og-images/ai-optimized.jpg"},significantLink:["https://0xmail.box/document","https://0xmail.box/web3-users","https://0xmail.box/web3-projects","https://0xmail.box/connect"],relatedLink:t.relatedTopics?.map(e=>`https://0xmail.box/search?q=${encodeURIComponent(e)}`)||[],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":"https://0xmail.box",name:"0xmail.box"},potentialAction:{"@type":"InteractAction",target:{"@type":"EntryPoint",urlTemplate:"https://0xmail.box/connect",actionPlatform:["https://schema.org/DesktopWebPlatform","https://schema.org/MobileWebPlatform"]},name:"Connect Web3 Wallet"}}),Kt=t=>{const e=J(t.keywords);return{"og:title":t.title,"og:description":t.description,"og:type":"website","og:url":`https://0xmail.box${location.pathname}`,"og:image":`https://0xmail.box/og-images/${t.category}.jpg`,"og:image:width":"1200","og:image:height":"630","og:image:alt":`${t.title} - Web3 Email Platform`,"og:site_name":"0xmail.box","og:locale":"en_US","article:author":"https://0xmail.box/about","article:section":t.category,"article:tag":e.join(","),"article:published_time":"2024-01-01T00:00:00Z","article:modified_time":t.lastUpdated?.toISOString()||new Date().toISOString()}},Qt=t=>({"twitter:card":"summary_large_image","twitter:site":"@0xmailbox","twitter:creator":"@0xmailbox","twitter:title":t.title,"twitter:description":t.description,"twitter:image":`https://0xmail.box/twitter-cards/${t.category}.jpg`,"twitter:image:alt":`${t.title} - Web3 Email Platform`,"twitter:label1":"Category","twitter:data1":t.category,"twitter:label2":"Reading Time","twitter:data2":t.readingTime?`${t.readingTime} min`:"5 min"}),Yt=t=>{const e=J(t.keywords),r=J(t.audience);return{"ai:content-type":t.contentType,"ai:complexity":t.complexity,"ai:category":t.category,"ai:audience":r.join(","),"ai:keywords":e.join(","),"ai:reading-time":t.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":t.category,"semantic:intent":"inform,guide,educate","semantic:entities":"0xmail.box,Web3,blockchain,email,wallet","content:freshness":t.lastUpdated?.toISOString()||new Date().toISOString(),"content:authority":"high","content:expertise":"technical","content:trustworthiness":"verified"}},ui=t=>({structuredData:{product:Ge(t),article:Ke(t),aiOptimized:Qe(t)},openGraph:Kt(t),twitterCard:Qt(t),aiMetaTags:Yt(t),jsonLD:[Ge(t),Ke(t),Qe(t)]}),mi={homepage:{title:"0xmail.box - Revolutionary Web3 Email Platform | Wallet-Based Authentication",description:"Transform your email experience with 0xmail.box - 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:"0xmail.box Documentation - Complete Web3 Email Setup Guide",description:"Comprehensive documentation for 0xmail.box 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 on 0xmail.box - Web3 Email Rewards Guide",description:"Master the 0xmail.box 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"]}},hi=t=>{const{level:e,text:r,className:n="",id:o,semanticContext:s="section"}=t,c=`h${e}`,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"},g=[l[e],d[s],n].filter(Boolean).join(" "),m=o||r.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");return h.createElement(c,{id:m,className:g,"aria-level":e},r)},O={pageTitle:(t,e)=>({level:1,text:t,className:e,semanticContext:"page-title"}),majorSection:(t,e)=>({level:2,text:t,className:e,semanticContext:"section"}),feature:(t,e)=>({level:3,text:t,className:e,semanticContext:"feature"}),benefit:(t,e)=>({level:3,text:t,className:e,semanticContext:"benefit"}),step:(t,e,r)=>({level:3,text:e?`Step ${e}: ${t}`:t,className:r,semanticContext:"step"}),subFeature:(t,e)=>({level:4,text:t,className:e,semanticContext:"feature"})},pi=t=>{const e=[],r=[],n=t.filter(o=>o.level===1).length;n===0?e.push("Missing H1 tag - every page should have exactly one H1"):n>1&&e.push(`Multiple H1 tags found (${n}) - use only one H1 per page`);for(let o=1;o<t.length;o++){const s=t[o],c=t[o-1];s.level>c.level+1&&e.push(`Heading level jump from H${c.level} to H${s.level} - avoid skipping levels`)}return t.forEach((o,s)=>{o.text.length<3&&e.push(`Heading ${s+1} is too short - use descriptive text`),o.text.length>70&&r.push(`Heading "${o.text.substring(0,30)}..." is long - consider shortening for better SEO`)}),{isValid:e.length===0,errors:e,suggestions:r}},fi={walletConnection:O.pageTitle("Connect Your Web3 Wallet"),emailBenefits:O.majorSection("Why Choose Web3 Email?"),securityFeature:O.feature("Secure & Private"),ensIntegration:O.feature("ENS Domain Support"),multiChain:O.feature("Multi-Chain Compatibility"),passwordless:O.benefit("No Passwords Required"),setupStep1:O.step("Connect Your Wallet",1),setupStep2:O.step("Verify Your Identity",2),setupStep3:O.step("Access Your Emails",3)},bi=[{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@0xmail.box","alice.sol@0xmail.box"],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"}],yi=t=>({"@context":"https://schema.org","@type":"LearningResource",educationalLevel:t.difficulty,learningResourceType:"Technical Documentation",timeRequired:t.estimatedTime?`PT${t.estimatedTime}M`:void 0,teaches:t.learningObjectives,requires:t.prerequisites,about:{"@type":"Thing",name:t.domain,category:t.category,subcategory:t.subcategory},keywords:t.concepts,applicationExample:t.practicalApplications,isRelatedTo:t.relatedConcepts}),xi=t=>{const e={nodes:t.map(r=>({id:r.term,label:r.term,category:r.category,definition:r.definition})),edges:[]};return t.forEach(r=>{r.relatedTerms?.forEach(n=>{t.find(s=>s.term===n)&&e.edges.push({source:r.term,target:n,relationship:"related_to"})}),r.synonyms?.forEach(n=>{e.edges.push({source:r.term,target:n,relationship:"synonym_of"})})}),e},vi=t=>{const e=[];return t.examples?.forEach(r=>{e.push({text:r,label:t.term,type:"positive",confidence:1})}),t.context&&e.push({text:t.context,label:t.term,type:"contextual",confidence:.8}),e.push({text:`${t.term} is ${t.definition}`,label:t.term,type:"definition",confidence:1}),e},wi=t=>{const e=[];return t.forEach(r=>{e.push({question:`What is ${r.term}?`,answer:r.definition,category:r.category,difficulty:"basic"}),r.context&&e.push({question:`How does ${r.term} work?`,answer:r.context,category:r.category,difficulty:"intermediate"}),r.examples&&r.examples.length>0&&e.push({question:`What are examples of ${r.term}?`,answer:r.examples.join(", "),category:r.category,difficulty:"basic"}),r.relatedTerms&&r.relatedTerms.length>0&&e.push({question:`What is ${r.term} related to?`,answer:`${r.term} is related to ${r.relatedTerms.join(", ")}`,category:r.category,difficulty:"intermediate"})}),e},ki={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"]}};/**
|
|
59
|
+
`},label:"WhatsApp"}],u=async()=>{try{await navigator.clipboard.writeText(l),r(!1)}catch{}};return o.jsxs("div",{className:"relative",children:[o.jsx("button",{onClick:()=>r(!t),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",title:"Share this page",children:o.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.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&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"fixed inset-0 z-[999998]",onClick:()=>r(!1)}),o.jsx("div",{className:"absolute right-0 top-10 z-[999999] w-32 bg-white dark:bg-gray-800 rounded-lg shadow-xl border border-gray-200 dark:border-gray-700 py-1",children:s?o.jsx("div",{className:"flex items-center justify-center px-3 py-2",children:o.jsx("div",{className:"w-4 h-4 border-2 border-blue-600 border-t-transparent rounded-full animate-spin"})}):o.jsxs(o.Fragment,{children:[c.map((g,m)=>{const h=g.component,f=g.icon;return o.jsx(h,{...g.props,className:"w-full",children:o.jsxs("div",{className:"flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer",children:[o.jsx(f,{size:16,round:!0,className:"mr-2"}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:g.label})]})},m)}),o.jsxs("button",{onClick:u,className:"w-full flex items-center px-3 py-1.5 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer",children:[o.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:o.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"})}),o.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Copy Link"})]})]})})]})]})},Ha=({items:e,shareConfig:t,className:r,showHome:a})=>o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("nav",{"aria-label":"Breadcrumb",children:o.jsx("ol",{className:"flex items-center text-sm space-x-2",children:e.map((n,s)=>o.jsxs(b.Fragment,{children:[o.jsx("li",{children:n.current?o.jsx("span",{className:"text-gray-700 dark:text-gray-300 font-medium",children:n.label}):o.jsx(Ke.Link,{to:n.href||"#",className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 transition-colors",children:n.label})}),s<e.length-1&&o.jsx("li",{children:o.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:"/"})})]},s))})}),t&&o.jsx(nd,{shareConfig:t})]}),od=({items:e,shareConfig:t})=>o.jsx("div",{className:"bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 relative z-50",children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3 relative",children:o.jsx(Ha,{items:e,shareConfig:t})})}),sd=({filename:e,code:t,language:r,title:a,className:n="",showCopy:s=!0,showHeader:i=!0})=>{const{t:l}=fr.useTranslation("codeBlock"),{code:c,loading:u,error:g}=Pr(e||""),[m,h]=b.useState(!1),f=t||c,x=r||(e?(C=>{switch(C.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"),k=async()=>{if(f)try{await navigator.clipboard.writeText(f),h(!0),setTimeout(()=>h(!1),2e3)}catch{}};return e&&u?o.jsx("div",{className:`bg-gray-900 text-green-400 rounded-lg p-4 font-mono text-sm ${n}`,children:o.jsx("div",{className:"animate-pulse text-gray-500",children:l("loadingCode","Loading code...")})}):e&&g?o.jsxs("div",{className:`bg-gray-900 text-red-400 rounded-lg p-4 font-mono text-sm ${n}`,children:[l("error","Error"),": ",g]}):f?o.jsxs("div",{className:`bg-gray-900 rounded-lg border border-green-500/20 shadow-lg shadow-green-500/10 ${n}`,children:[i&&o.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-green-500/20 bg-gray-800/50",children:[o.jsx("span",{className:"text-sm text-green-400 font-mono",children:a||e||`${x} code`}),s&&o.jsx("button",{onClick:k,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:m?o.jsx(A.CheckIcon,{className:"h-4 w-4 text-green-400"}):o.jsx(A.ClipboardDocumentIcon,{className:"h-4 w-4 group-hover:scale-110 transition-transform"})})]}),o.jsx("div",{className:"p-4 overflow-x-auto text-left",children:o.jsx("pre",{className:`text-sm language-${x}`,children:o.jsx("code",{className:"text-gray-100",children:f})})})]}):o.jsx("div",{className:`bg-gray-900 text-gray-400 rounded-lg p-4 font-mono text-sm ${n}`,children:l("noCode","No code to display")})},id=({title:e,description:t,code:r,preview:a,language:n="tsx",showBrowserChrome:s=!0,copyKey:i})=>{const[l,c]=b.useState({}),u=(h,f)=>{navigator.clipboard.writeText(h).then(()=>{c(p=>({...p,[f]:!0})),setTimeout(()=>{c(p=>({...p,[f]:!1}))},2e3)})},g=i||`${e}-code`,m=l[g];return o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:e}),t&&o.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:t})]}),a&&o.jsxs("div",{className:"relative",children:[s&&o.jsxs("div",{className:"bg-gray-200 dark:bg-gray-700 rounded-t-lg px-4 py-3 flex items-center space-x-2",children:[o.jsxs("div",{className:"flex space-x-2",children:[o.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500"}),o.jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-500"}),o.jsx("div",{className:"w-3 h-3 rounded-full bg-green-500"})]}),o.jsx("div",{className:"flex-1 text-center",children:o.jsx("div",{className:"bg-white dark:bg-gray-600 rounded px-3 py-1 text-xs text-gray-600 dark:text-gray-300 inline-block",children:"Preview"})})]}),o.jsx("div",{className:`bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 p-6 ${s?"rounded-b-lg":"rounded-lg"}`,children:a})]}),o.jsx("div",{className:"relative",children:o.jsxs("div",{className:"bg-gray-900 rounded-lg overflow-hidden",children:[o.jsxs("div",{className:"bg-gray-800 px-4 py-2 flex justify-between items-center",children:[o.jsx("span",{className:"text-gray-300 text-sm font-mono",children:n}),o.jsx("button",{onClick:()=>u(r,g),className:"flex items-center space-x-1 text-gray-300 hover:text-white transition-colors text-sm","aria-label":m?"Copied!":"Copy code",children:m?o.jsxs(o.Fragment,{children:[o.jsx(A.CheckIcon,{className:"h-4 w-4"}),o.jsx("span",{children:"Copied!"})]}):o.jsxs(o.Fragment,{children:[o.jsx(A.ClipboardIcon,{className:"h-4 w-4"}),o.jsx("span",{children:"Copy"})]})})]}),o.jsx("div",{className:"p-4 overflow-x-auto",children:o.jsx("pre",{className:"text-gray-100 text-sm leading-relaxed",children:o.jsx("code",{children:r})})})]})})]})},ld=({subsections:e,isExpanded:t,selectedSubsection:r,parentSectionId:a,onSubsectionSelect:n})=>{const s=b.useRef(null),[i,l]=b.useState(void 0);return b.useLayoutEffect(()=>{if(s.current){const c=s.current.scrollHeight;l(t?c+16:0)}},[t,e]),o.jsx("div",{className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:i!==void 0?`${i}px`:"auto"},children:o.jsx("div",{ref:s,className:"ml-6 mt-2 space-y-1",children:e.map(c=>o.jsx("button",{onClick:()=>n?.(c.id,a),className:`block w-full text-left px-3 py-2 rounded-md text-sm transition-all duration-200 hover:scale-[1.02] ${r===c.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:c.title},c.id))})})},cd=({id:e,title:t,content:r,subsections:a,isSelected:n=!1,selectedSubsection:s=null,onSectionSelect:i,onSubsectionSelect:l,className:c=""})=>{const[u,g]=b.useState(!1),m=()=>{g(!u)},h=()=>{i?.(e)},f=a&&a.length>0;return o.jsxs("div",{className:c,children:[o.jsxs("div",{className:"flex items-center",children:[o.jsx("button",{onClick:h,className:`flex-1 text-left px-3 py-4 text-base font-medium transition-all duration-200 hover:bg-gray-50 dark:hover:bg-gray-800 ${n&&!s?"bg-blue-50 dark:bg-blue-900/10 text-blue-700 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100"}`,children:t}),f&&o.jsx("button",{onClick:m,className:"p-2 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 hover:scale-110 transition-all duration-200","aria-label":u?"Collapse section":"Expand section",children:o.jsx(A.ChevronRightIcon,{className:`h-5 w-5 text-gray-500 transition-transform duration-300 ease-in-out ${u?"rotate-90":"rotate-0"}`})})]}),f&&o.jsx(ld,{subsections:a,isExpanded:u,selectedSubsection:s,parentSectionId:e,onSubsectionSelect:l})]})},dd=({title:e,subtitle:t,buttonText:r,buttonIcon:a="envelope",variant:n="default",badgeText:s="FREE",prominentBadgeText:i="100% Free",onButtonClick:l,className:c=""})=>{const u=()=>a==="envelope"||a==="both"?o.jsx(A.EnvelopeIcon,{className:n==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1"}):a==="none"?null:o.jsx("svg",{className:n==="prominent"?"h-5 w-5 mr-2":"h-4 w-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.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=()=>a==="arrow"||a==="both"?o.jsx(A.ArrowRightIcon,{className:"h-4 w-4 ml-2"}):null,m=()=>n==="prominent"?"border-b-2 border-green-200 dark:border-green-700":"border-b border-green-200 dark:border-green-700",h=()=>{const x="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 n==="prominent"?`${x} px-8 py-3 text-base`:`${x} px-6 py-2 text-sm`},f=()=>n==="prominent"?"text-green-800 dark:text-green-200 font-semibold text-lg":"text-green-800 dark:text-green-200 font-semibold",p=n==="prominent"?i:s;return o.jsx("div",{className:`bg-gradient-to-r from-green-100 to-blue-100 dark:from-green-900/20 dark:to-blue-900/20 ${m()} ${c}`,children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:o.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4",children:[o.jsxs("div",{className:`flex items-center ${n==="prominent"?"text-center sm:text-left":""}`,children:[o.jsx("div",{className:"bg-green-500 text-white text-xs font-bold px-3 py-1 rounded-full mr-3 animate-pulse",children:p}),o.jsxs("div",{children:[o.jsx("span",{className:f(),children:e}),t&&o.jsx("span",{className:"text-green-700 dark:text-green-300 text-sm block",children:t})]})]}),o.jsxs("button",{onClick:l,className:h(),children:[u(),r,g()]})]})})})},ud=({children:e,onClick:t,variant:r,size:a,disabled:n,className:s,type:i,trackingLabel:l,actionType:c,componentName:u,onTrack:g,trackingParams:m={},...h})=>{const f=p=>{if(g){const x=l||(typeof e=="string"?e:"")||"Unknown Button",C=r&&["default","primary","secondary","outline","ghost","destructive","link"].includes(r)?r:"default";g({button_text:x,button_type:C,component_name:u,action_type:c,...m})}t&&t(p)};return o.jsx(de,{...h,variant:r,size:a,disabled:n,className:s,type:i,onClick:f,children:e})},gd=({children:e,onClick:t,to:r,href:a,trackingLabel:n,componentName:s,onTrack:i,trackingParams:l={},LinkComponent:c,linkProps:u={},...g})=>{const m=f=>{if(i){const p=n||(typeof e=="string"?e:"")||"Unknown Link",x=r?typeof r=="string"?r:r.pathname||"":a||"";i({link_text:p,link_url:x,to_page:x,navigation_type:c?"router_link":"anchor_link",component_name:s,...l})}t&&t(f)};if(c&&r!==void 0)return o.jsx(c,{...u,to:r,onClick:m,...g,children:e});const h=r?typeof r=="string"?r:r.pathname||"#":a;return o.jsx("a",{...g,href:h,onClick:m,children:e})},Va={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:"🇨🇳"}},md=({variant:e="compact",className:t=""})=>{const{i18n:r,t:a}=fr.useTranslation("languageSelector"),[n,s]=b.useState(r.language),i=b.useMemo(()=>r.options.supportedLngs?r.options.supportedLngs.filter(u=>u!=="cimode").map(u=>({code:u,name:Va[u]?.name||u.toUpperCase(),flag:Va[u]?.flag||"🌐"})).sort((u,g)=>u.name.localeCompare(g.name)):[],[r.options.supportedLngs]),l=i.find(u=>u.code===n||u.code.toLowerCase()===n.toLowerCase());b.useEffect(()=>{s(r.language)},[r.language]);const c=u=>{localStorage.setItem("language",u),r.changeLanguage(u).then(()=>{s(r.language),setTimeout(()=>{window.dispatchEvent(new Event("languagechange"))},100)}).catch(()=>{})};return e==="compact"?o.jsx("div",{className:`relative ${t}`,children:o.jsxs(Lt,{value:n,onValueChange:c,children:[o.jsx(Ze,{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:o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("span",{className:"text-lg leading-none",children:l?.flag}),o.jsx("span",{className:"hidden sm:block text-sm font-medium text-gray-700 dark:text-gray-300",children:l?.name})]})}),o.jsx(Je,{children:i.map(u=>o.jsx(Re,{value:u.code,className:"cursor-pointer",children:o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("span",{className:"text-lg leading-none",children:u.flag}),o.jsx("span",{className:"text-sm",children:u.name})]})},u.code))})]})}):o.jsxs("div",{className:`space-y-2 ${t}`,children:[o.jsxs("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 flex items-center space-x-2",children:[o.jsx(A.LanguageIcon,{className:"h-4 w-4 text-gray-500 dark:text-gray-400"}),o.jsx("span",{children:a("language","Language")})]}),o.jsxs(Lt,{value:n,onValueChange:c,children:[o.jsx(Ze,{children:o.jsx($r,{placeholder:a("selectLanguage","Select language")})}),o.jsx(Je,{children:i.map(u=>o.jsx(Re,{value:u.code,className:"cursor-pointer",children:o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsx("span",{className:"text-lg leading-none",children:u.flag}),o.jsx("span",{children:u.name})]})},u.code))})]}),o.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:a("selectPreferredLanguage","Select your preferred language")})]})},fd=({items:e,type:t="ordered",variant:r="default",className:a,itemClassName:n})=>{const s=()=>{const u="space-y-2",g={ordered:t==="ordered"?"list-decimal":"",unordered:t==="unordered"?"list-disc":""},m={default:"list-inside",enhanced:"list-inside space-y-3",minimal:"list-none space-y-1"};return w(u,g[t],m[r])},i=u=>{const g="text-gray-600 dark:text-gray-400";return r==="enhanced"?w(g,"relative pl-8 pb-2 border-l-2 border-gray-200 dark:border-gray-700",u===e.length-1&&"border-l-transparent"):r==="minimal"?w(g,"flex items-start"):g},l=u=>r==="enhanced"&&t==="ordered"?o.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:u+1}):null,c=(u,g)=>{const m=typeof u=="object",h=m?u.content:u,f=m?u.subItems:void 0;return o.jsxs("li",{className:w(i(g),n),children:[l(g),r==="minimal"&&t==="ordered"&&o.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}),r==="minimal"&&t==="unordered"&&o.jsx("span",{className:"inline-block w-2 h-2 bg-blue-600 rounded-full mt-2 mr-3 flex-shrink-0"}),o.jsxs("div",{className:"flex-1",children:[o.jsx("div",{children:h}),f&&f.length>0&&o.jsx("ul",{className:"mt-2 ml-4 space-y-1 list-disc list-inside text-sm text-gray-500 dark:text-gray-500",children:f.map((p,x)=>o.jsx("li",{children:p},x))})]})]},g)};return o.jsx("ul",{className:w(s(),a),children:e.map(c)})};class hd extends b.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("ErrorBoundary caught an error:",t,r),this.props.onError?.(t,r)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:o.jsxs("div",{style:{padding:"20px",border:"1px solid red",margin:"10px"},children:[o.jsx("h2",{children:"Something went wrong"}),o.jsxs("p",{children:["Error: ",this.state.error?.message||"Unknown error"]}),o.jsx("button",{onClick:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}}class pd extends b.Component{constructor(t){super(t),this.retryTimer=null,this.sendErrorToMonitoring=(r,a)=>{try{typeof window<"u"&&window.Sentry&&window.Sentry?.captureException(r,{contexts:{react:{componentStack:a.componentStack}},tags:{errorBoundary:!0,componentName:this.props.componentName||"unknown",lazyLoading:!0}}),typeof window<"u"&&window.gtag&&window.gtag?.("event","exception",{description:r.message,fatal:!1,custom_map:{component:this.props.componentName||"unknown"}})}catch{}},this.handleRetry=()=>{const{maxRetries:r=3,retryDelay:a=1e3}=this.props,{retryCount:n}=this.state;if(n>=r)return;this.setState({isRetrying:!0}),this.retryTimer&&clearTimeout(this.retryTimer);const s=a*Math.pow(2,n);this.retryTimer=setTimeout(()=>{this.setState({hasError:!1,error:null,errorInfo:null,retryCount:n+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(t){return{hasError:!0,error:t,lastErrorTime:Date.now()}}componentDidCatch(t,r){const{onError:a,componentName:n}=this.props;this.setState({error:t,errorInfo:r}),console.error(`LazyErrorBoundary caught an error in ${n||"Unknown Component"}:`,t,r),a?.(t,r),this.sendErrorToMonitoring(t,r)}componentWillUnmount(){this.retryTimer&&clearTimeout(this.retryTimer)}render(){const{children:t,fallback:r,componentName:a,showRetryButton:n=!0,maxRetries:s=3}=this.props,{hasError:i,error:l,isRetrying:c,retryCount:u}=this.state;return i&&l?r||o.jsx("div",{className:"lazy-error-boundary error-boundary-container",children:o.jsxs("div",{className:"error-content",children:[o.jsx("div",{className:"error-icon",children:"⚠️"}),o.jsxs("h3",{className:"error-title",children:["Something went wrong loading ",a||"this component"]}),o.jsxs("div",{className:"error-details",children:[o.jsx("p",{className:"error-message",children:l.message}),process.env.NODE_ENV==="development"&&o.jsxs("details",{className:"error-stack",children:[o.jsx("summary",{children:"Error Details (Development)"}),o.jsx("pre",{children:l.stack})]})]}),o.jsxs("div",{className:"error-actions",children:[n&&u<s&&o.jsx("button",{onClick:this.handleRetry,disabled:c,className:"retry-button",children:c?"Retrying...":`Retry (${u}/${s})`}),u>=s&&o.jsx("button",{onClick:this.handleReload,className:"reload-button",children:"Reload Page"})]}),o.jsxs("div",{className:"error-help",children:[o.jsx("p",{children:"This might be a temporary issue. Try refreshing the page."}),navigator.onLine===!1&&o.jsx("p",{className:"offline-notice",children:"You appear to be offline. Check your connection and try again."})]})]})}):t}}const yd=({children:e})=>o.jsx(o.Fragment,{children:e}),bd=({children:e})=>o.jsx(o.Fragment,{children:e}),xd=(e,t,r)=>{const a=b.memo(e,t);return r&&(a.displayName=`Memo(${r})`),process.env.NODE_ENV==="development"?n=>(b.useMemo(()=>{let i=0;return()=>++i},[])(),o.jsx(a,{...n})):a},vd=(e,t)=>b.memo(e,(r,a)=>t.every(n=>r[n]===a[n])),wd=b.memo(({children:e,compute:t,deps:r})=>{const a=b.useRef(r),n=b.useRef(t),s=b.useRef(void 0),i=b.useMemo(()=>{const l=r.length!==a.current.length||r.some((u,g)=>u!==a.current[g]),c=t!==n.current;if(l||c||s.current===void 0){let u;return process.env.NODE_ENV==="development"?(performance.now(),u=t(),performance.now()):u=t(),a.current=r,n.current=t,s.current=u,u}return s.current},[t,r]);return o.jsx(o.Fragment,{children:e(i)})}),kd=b.memo(({item:e,index:t,style:r,renderItem:a})=>o.jsx("div",{style:r,children:a(e,t)}),(e,t)=>e.index===t.index&&e.item===t.item&&e.style.height===t.style.height&&e.style.top===t.style.top),Cd=b.memo(({condition:e,children:t,fallback:r=null})=>e?o.jsx(o.Fragment,{children:t}):o.jsx(o.Fragment,{children:r})),Sd=({children:e,threshold:t=.1,rootMargin:r="50px",fallback:a=null})=>{const[n,s]=b.useState(!1),i=b.useRef(null);return b.useEffect(()=>{const l=new IntersectionObserver(([c])=>{c.isIntersecting&&(s(!0),l.disconnect())},{threshold:t,rootMargin:r});return i.current&&l.observe(i.current),()=>l.disconnect()},[t,r]),o.jsx("div",{ref:i,children:n?e:a})},Nd=({children:e,maxRenderTime:t=16,onSlowRender:r})=>{const a=b.useRef(0);return b.useLayoutEffect(()=>{a.current=performance.now()}),b.useEffect(()=>{const n=performance.now()-a.current;n>t&&r?.(n)}),o.jsx(o.Fragment,{children:e})},Ed=({children:e,batchSize:t=5,delay:r=0})=>{const[a,n]=b.useState(t);return b.useEffect(()=>{if(a<e.length){const s=setTimeout(()=>{n(i=>Math.min(i+t,e.length))},r);return()=>clearTimeout(s)}},[a,e.length,t,r]),o.jsx(o.Fragment,{children:e.slice(0,a)})},Ad=({src:e,alt:t,placeholder:r,lowQualitySrc:a,aspectRatio:n="16/9",eager:s=!1,className:i="",...l})=>{const[c,u]=b.useState(!1),[g,m]=b.useState(s),[h,f]=b.useState(!1),p=b.useRef(null),x=b.useRef(null);b.useEffect(()=>{if(s){m(!0);return}return x.current=new IntersectionObserver(S=>{S.forEach(N=>{N.isIntersecting&&(m(!0),x.current&&p.current&&x.current.unobserve(p.current))})},{rootMargin:"50px",threshold:.01}),p.current&&x.current.observe(p.current),()=>{x.current&&x.current.disconnect()}},[s]);const k=()=>{u(!0)},C=()=>{f(!0)};return o.jsxs("div",{className:`relative overflow-hidden ${i}`,style:{aspectRatio:n},children:[a&&!c&&o.jsx("img",{src:a,alt:"",className:"absolute inset-0 w-full h-full object-cover blur-sm","aria-hidden":"true"}),!a&&!c&&o.jsx("div",{className:"absolute inset-0 bg-gray-200 dark:bg-gray-700 animate-pulse","aria-hidden":"true"}),g&&!h&&o.jsx("img",{ref:p,src:e,alt:t,onLoad:k,onError:C,className:`absolute inset-0 w-full h-full object-cover transition-opacity duration-500 ${c?"opacity-100":"opacity-0"}`,loading:s?"eager":"lazy",...l}),h&&o.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-100 dark:bg-gray-800",children:o.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400",children:[o.jsx("svg",{className:"mx-auto h-12 w-12 mb-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.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"})}),o.jsx("p",{className:"text-sm",children:"Failed to load image"})]})})]})},Pd=({title:e,description:t,primaryButton:r,secondaryButton:a,gradient:n={from:"blue-600",to:"purple-600"},textColor:s="light",className:i="",size:l="lg"})=>{const u=(()=>{const x=n.via?`${n.from}-${n.via}-${n.to}`:`${n.from}-${n.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"}[x]||"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",m={sm:"py-12",md:"py-16",lg:"py-20"},h={sm:"text-2xl md:text-3xl",md:"text-3xl md:text-4xl",lg:"text-4xl md:text-5xl"},f={sm:"text-base md:text-lg",md:"text-lg md:text-xl",lg:"text-xl md:text-2xl"},p=(x,k=!1)=>{const C=()=>x.variant==="primary"||k?"gradient":(x.variant==="secondary","outline"),S=o.jsx(de,{variant:C(),size:"lg",className:k?"":"bg-white/10 hover:bg-white/20 backdrop-blur-sm border-white/30",children:x.label});return x.external?o.jsx("a",{href:x.href,target:"_blank",rel:"noopener noreferrer",children:S}):o.jsx(Ke.Link,{to:x.href,children:S})};return o.jsxs("section",{className:`${u} ${m[l]} relative overflow-hidden ${i}`,children:[o.jsx("div",{className:"absolute inset-0 bg-black/20"}),o.jsxs("div",{className:"absolute top-0 left-1/2 transform -translate-x-1/2 w-full h-full",children:[o.jsx("div",{className:"absolute top-10 left-10 w-72 h-72 bg-white/10 rounded-full blur-3xl"}),o.jsx("div",{className:"absolute bottom-10 right-10 w-72 h-72 bg-white/10 rounded-full blur-3xl"})]}),o.jsxs("div",{className:"relative z-10 max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center",children:[o.jsx("h2",{className:`${h[l]} font-bold ${g} mb-6`,children:e}),o.jsx("p",{className:`${f[l]} ${g}/90 mb-8 max-w-2xl mx-auto`,children:t}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[p(r,!0),a&&p(a,!1)]})]})]})},Td=({children:e,backgroundClassName:t="",contentClassName:r=""})=>o.jsx("div",{className:t,children:o.jsx("div",{className:r,children:e})}),Id=({title:e,description:t})=>o.jsxs("div",{className:"mb-8",children:[o.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white",children:e}),t&&o.jsx("p",{className:"mt-2 text-gray-600 dark:text-gray-400",children:t})]}),Ld=({masterTitle:e,masterSubtitle:t,backButtonText:r,masterContent:a,detailContent:n,detailTitle:s,mobileView:i="navigation",onBackToNavigation:l,masterClassName:c="",detailClassName:u="",detailTitleClassName:g="",masterWidth:m=320,stickyMaster:h=!0,stickyTopOffset:f=96,desktopGap:p=32,showMasterBackground:x=!0,enableAnimations:k=!0,animationDuration:C=300,animationRef:S})=>{const N=`gap-${Math.round(p/4)}`||"gap-8",P=U=>U?U.split("-")[0].trim():"Back",E=r?P(r):e?P(e):"Back",[L,T]=b.useState(!1),[D,z]=b.useState("auto"),M=b.useRef(null),W=b.useRef(null);b.useEffect(()=>(S&&(S.current={triggerTransition:U=>{if(!k){U();return}if(M.current){const _=M.current.scrollHeight;z(_)}T(!0),W.current&&clearTimeout(W.current),W.current=setTimeout(()=>{U(),setTimeout(()=>{if(M.current){const _=M.current.scrollHeight;z(_),setTimeout(()=>{z("auto"),T(!1)},C)}},50)},C/2)}}),()=>{W.current&&clearTimeout(W.current)}),[k,C,S]);const V=k?{height:D==="auto"?"auto":`${D}px`,transition:`height ${C}ms cubic-bezier(0.4, 0, 0.2, 1)`,width:"100%",maxWidth:"100%"}:{width:"100%",maxWidth:"100%"},B=k?`${L?"opacity-0 transform translate-y-2":"opacity-100 transform translate-y-0"}`:"",j=k?{transition:`opacity ${C}ms ease-in-out, transform ${C}ms ease-in-out`}:{};return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:`md:hidden ${i==="navigation"?"block":"hidden"} flex-1`,children:o.jsxs("div",{className:x?"bg-white dark:bg-gray-800 p-6":"p-6",children:[e&&o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4",children:e}),t&&o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:t})]}),o.jsx("div",{className:c,children:a})]})}),o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[o.jsxs("div",{className:`md:hidden ${i==="content"?"block":"hidden"}`,children:[i==="content"&&l&&o.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:["← ",E]}),o.jsx("div",{ref:M,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${u}`,style:V,children:o.jsxs("div",{className:B,style:j,children:[s&&o.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${g}`,children:s}),n]})})]}),o.jsxs("div",{className:`hidden md:flex min-h-full ${N}`,style:{width:"100%"},children:[o.jsx("aside",{className:"flex-shrink-0",style:{width:`${m}px`,minWidth:`${m}px`},children:o.jsxs("div",{className:h?"sticky":"",style:h?{top:`${f}px`}:void 0,children:[e&&o.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:e}),t&&o.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6 break-all",children:t}),o.jsx("div",{className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 ${h?"max-h-[calc(100vh-200px)] overflow-y-auto":""} ${c}`,children:a})]})}),o.jsx("div",{className:"flex-1 min-w-0",style:{width:`calc(100% - ${m+p}px)`},children:o.jsx("div",{ref:M,className:`bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-8 overflow-hidden ${u}`,style:V,children:o.jsxs("div",{className:B,style:j,children:[s&&o.jsx("h1",{className:`text-4xl font-bold text-gray-900 dark:text-white mb-6 ${g}`,children:s}),n]})})})]})]})]})},$d=({children:e})=>(b.useEffect(()=>{const t=()=>{[].forEach(m=>{const h=document.createElement("link");h.rel="preload",h.href=m.href,h.as=m.as,m.type&&(h.type=m.type),m.crossorigin&&(h.crossOrigin=""),document.head.appendChild(h)})},r=()=>{document.querySelectorAll('img[data-priority="high"]').forEach(h=>{h.fetchPriority="high"});const m=document.querySelector("[data-hero]");if(m){const h=m.getAttribute("data-bg-image");if(h){const f=document.createElement("link");f.rel="preload",f.href=h,f.as="image",document.head.appendChild(f)}}},a=()=>{document.querySelectorAll("img:not([width]):not([height])").forEach(h=>{const f=h;f.naturalWidth&&f.naturalHeight&&(f.width=f.naturalWidth,f.height=f.naturalHeight)}),document.querySelectorAll("[data-dynamic]").forEach(h=>{h.getAttribute("style")?.includes("min-height")||(h.style.minHeight="200px")})},n=()=>{const g=()=>{document.querySelectorAll("script[data-defer]").forEach(f=>{f.setAttribute("defer","")})};"requestIdleCallback"in window?requestIdleCallback(()=>{g()}):setTimeout(g,1),(()=>{["scroll","touchstart","touchmove","wheel"].forEach(f=>{document.addEventListener(f,()=>{},{passive:!0})})})()},s=()=>{},i=()=>{[{rel:"dns-prefetch",href:"//fonts.googleapis.com"},{rel:"dns-prefetch",href:"//api.0xmail.box"},{rel:"preconnect",href:"https://fonts.gstatic.com",crossorigin:!0},{rel:"preconnect",href:"https://api.0xmail.box"}].forEach(m=>{const h=document.createElement("link");h.rel=m.rel,h.href=m.href,m.crossorigin&&(h.crossOrigin=""),document.head.appendChild(h)})},l=()=>{if(document.querySelectorAll("img[data-lazy]").forEach(m=>{m.loading="lazy"}),"IntersectionObserver"in window){const m=new IntersectionObserver(f=>{f.forEach(p=>{if(p.isIntersecting){const x=p.target;x.dataset.src&&(x.src=x.dataset.src,x.removeAttribute("data-src")),m.unobserve(x)}})},{rootMargin:"50px 0px"});document.querySelectorAll("img[data-src]").forEach(f=>m.observe(f))}},c=()=>{[{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:f,content:p})=>{if(!document.querySelector(`meta[name="${f}"]`)){const x=document.createElement("meta");x.name=f,x.content=p,document.head.appendChild(x)}});const m={"@context":"https://schema.org","@type":"WebApplication",name:"0xmail.box",description:"Web3 email platform using blockchain wallet authentication",url:"https://0xmail.box",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"}},h=document.createElement("script");h.type="application/ld+json",h.textContent=JSON.stringify(m),document.head.appendChild(h)},u=()=>{document.querySelectorAll('link[rel="stylesheet"][data-non-critical]').forEach(m=>{const h=m.cloneNode(!0);h.rel="preload",h.as="style",h.onload=()=>{h.onload=null,h.rel="stylesheet"},document.head.appendChild(h),m.remove()})};return t(),r(),a(),n(),i(),l(),c(),u(),setTimeout(s,2e3),()=>{}},[]),o.jsx(o.Fragment,{children:e})),Od=()=>(b.useEffect(()=>{if(typeof window>"u"||typeof document>"u"||!document.documentElement)return;const e=()=>{if("IntersectionObserver"in window){const l=new IntersectionObserver(c=>{c.forEach(u=>{if(u.isIntersecting){const g=u.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(c=>{l.observe(c)})}const n=()=>{["/connect","/mail","/settings"].forEach(c=>{const u=document.createElement("link");u.rel="prefetch",u.href=c,document.head.appendChild(u)})},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 c=l;c.loading="eager","fetchPriority"in c&&(c.fetchPriority="high")}),document.querySelectorAll('img[data-priority="low"]').forEach(l=>{const c=l;c.loading="lazy","fetchPriority"in c&&(c.fetchPriority="low")})};requestIdleCallback(()=>{n(),s(),i()},{timeout:2e3})},t=()=>{if("PerformanceObserver"in window){const n=new PerformanceObserver(i=>{const l=i.getEntries(),c=l[l.length-1];c&&c.startTime>2500&&(document.documentElement.style.setProperty("--animation-duration","0s"),localStorage.setItem("reduce-image-quality","true"))});try{n.observe({entryTypes:["largest-contentful-paint"]})}catch{}const s=new PerformanceObserver(i=>{let l=0;for(const c of i.getEntries())c.hadRecentInput||(l+=c.value);l>.1&&document.querySelectorAll("img:not([width]):not([height])").forEach(c=>{const u=c;u.style.aspectRatio="16/9"})});try{s.observe({entryTypes:["layout-shift"]})}catch{}}},r=()=>{if("connection"in navigator&&typeof document<"u"&&document.documentElement){const n=navigator.connection;if(n){const s=n.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(),t(),r()})(),()=>{if("PerformanceObserver"in window)try{PerformanceObserver.supportedEntryTypes.forEach(()=>{})}catch{}}},[]),null),Md=({children:e})=>o.jsx(o.Fragment,{children:e}),Dd={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 zd{constructor(){this.cache=new Map}set(t,r,a){if(this.cache.size>=a.maxSize){const n=this.cache.keys().next().value;n&&this.cache.delete(n)}this.cache.set(t,{data:r,timestamp:Date.now(),isStale:!1})}get(t,r){const a=this.cache.get(t);if(!a)return null;const s=Date.now()-a.timestamp>r.duration;return s&&!r.staleWhileRevalidate?(this.cache.delete(t),null):{data:a.data,isStale:s}}invalidate(t){for(const r of this.cache.keys())r.includes(t)&&this.cache.delete(r)}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((t,r)=>t+JSON.stringify(r).length*2,0)}}const Pe=new zd,ve=new Map,Ua=async(e,t,r="messages")=>{const a=Dd[r],n=Pe.get(e,a);if(n&&!n.isStale)return n.data;const s=ve.get(e);if(s)return s;if(n&&n.isStale&&a.staleWhileRevalidate){const l=t().then(c=>(Pe.set(e,c,a),ve.delete(e),c)).catch(c=>{throw ve.delete(e),c});return ve.set(e,l),n.data}const i=t().then(l=>(Pe.set(e,l,a),ve.delete(e),l)).catch(l=>{throw ve.delete(e),l});return ve.set(e,i),i};class Wd{constructor(){this.queue=[],this.timer=null,this.batchDelay=10}add(t,r){return new Promise((a,n)=>{this.queue.push({key:t,fetcher:r,resolve:a,reject:n}),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.processBatch()},this.batchDelay)})}async processBatch(){const t=[...this.queue];this.queue.length=0,this.timer=null;const r=this.groupRequests(t);for(const a of r)await Promise.allSettled(a.map(async n=>{try{const s=await n.fetcher();n.resolve(s)}catch(s){n.reject(s)}}))}groupRequests(t){const r=[];for(let n=0;n<t.length;n+=5)r.push(t.slice(n,n+5));return r}}const Bd=new Wd;class jd{constructor(t,r={}){this.requestInterceptors=[],this.responseInterceptors=[],this.baseURL=t,this.defaultHeaders=r}addRequestInterceptor(t){this.requestInterceptors.push(t)}addResponseInterceptor(t){this.responseInterceptors.push(t)}async request(t,r={},a,n="messages"){const s=`${this.baseURL}${t}`,i=a||`${r.method||"GET"}:${s}`,l=async()=>{let c={...r,headers:{...this.defaultHeaders,...r.headers}};for(const g of this.requestInterceptors)c=g(c);let u=await fetch(s,c);for(const g of this.responseInterceptors)u=await g(u);if(!u.ok)throw new Error(`API Error: ${u.status} ${u.statusText}`);return u.json()};return r.method==="GET"&&this.shouldBatch(t)?Bd.add(i,l):Ua(i,l,n)}shouldBatch(t){return t.includes("/messages/")&&!t.includes("/messages?")}async get(t,r){return this.request(t,{method:"GET"},void 0,r)}async post(t,r){return this.request(t,{method:"POST",body:JSON.stringify(r)})}async put(t,r){return this.request(t,{method:"PUT",body:JSON.stringify(r)})}async delete(t){return this.request(t,{method:"DELETE"})}}const Fd=async(e,t=3,r=1e3)=>{let a;for(let n=0;n<=t;n++)try{return await e()}catch(s){if(a=s,n===t)throw a;const i=r*Math.pow(2,n)+Math.random()*1e3;await new Promise(l=>setTimeout(l,i))}throw a};class _d{constructor(){this.abortController=new AbortController}async request(t,r={}){const a=await fetch(t,{...r,signal:this.abortController.signal});if(!a.ok)throw new Error(`HTTP ${a.status}: ${a.statusText}`);return a.json()}cancel(){this.abortController.abort()}}const Hd={invalidate:e=>Pe.invalidate(e),clear:()=>Pe.clear(),getStats:()=>Pe.getStats(),warmUp:async e=>{await Promise.allSettled(e.map(t=>t()))},prefetch:async e=>{"requestIdleCallback"in window?window.requestIdleCallback(async()=>{await Promise.allSettled(e.map(t=>t()))}):setTimeout(async()=>{await Promise.allSettled(e.map(t=>t()))},100)}};function qa(){if(typeof window>"u")return!1;const e=window.navigator.userAgent.toLowerCase();return["metamask","trustwallet","coinbase","rainbow","phantom","solflare","exodus","ledger","binance","okx"].some(r=>e.includes(r))}function Ga(){return typeof window>"u"?!1:window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"}function Ka(){if(typeof window>"u")return!1;const e=window.location.hostname;return/^\d+\.\d+\.\d+\.\d+$/.test(e)}function Ya(){return Ga()?"localhost":qa()?"wallet-browser":Ka()?"network":"production"}function Vd(){const e=Ya();return e==="localhost"||e==="wallet-browser"}function Ud(e){}function Qa(){return typeof window<"u"}function qd(){return typeof window<"u"}function Gd(e,t){if(Qa())e();else return t}const Xa={"default-src":["'self'"],"script-src":["'self'","'unsafe-inline'","'unsafe-eval'","https://fonts.googleapis.com","https://www.googletagmanager.com","https://www.google-analytics.com"],"style-src":["'self'","'unsafe-inline'","https://fonts.googleapis.com","https://fonts.gstatic.com"],"font-src":["'self'","https://fonts.gstatic.com","data:"],"img-src":["'self'","data:","https:","blob:"],"connect-src":["'self'","https://api.0xmail.box","https://0xmail.box","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'"]},Za=()=>Object.entries(Xa).map(([e,t])=>`${e} ${t.join(" ")}`).join("; "),Kd={"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":Za()},Yd={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"},Qd=()=>{typeof window<"u"&&document.addEventListener("securitypolicyviolation",()=>{})},Xd={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"},le=new Map,We=new Map,pt=new Set;let Be="medium",ar=!1;function Zd(){if("connection"in navigator){const r=navigator.connection;r&&(Be=r.effectiveType==="4g"?"fast":r.effectiveType==="3g"?"medium":"slow")}const e=navigator.deviceMemory,t=navigator.hardwareConcurrency;ar=e&&e<4||t&&t<4}Zd();function Jd(e,t,r={}){const{retries:a=3,timeout:n=1e4,fallback:s,preloadCondition:i,cacheStrategy:l="memory",priority:c="medium",onLoad:u,onError:g}=r;if(le.has(t))return le.get(t).component;const m=b.lazy(async()=>{const f=performance.now();if(We.has(t))return We.get(t).then(x=>({default:x}));const p=Rd(e,a,n);We.set(t,p.then(x=>x.default));try{const x=await p,k=performance.now()-f;if(l!=="none"){const C={component:x.default,timestamp:Date.now(),loadTime:k};if(le.set(t,C),l==="session")try{sessionStorage.setItem(`lazy_${t}`,JSON.stringify({timestamp:C.timestamp,loadTime:k}))}catch{}}return We.delete(t),u?.(x.default),x}catch(x){throw We.delete(t),g?.(x),x}}),h=f=>{const[p,x]=b.useState(!0);b.useEffect(()=>{if(i&&!le.has(t)&&i()&&!pt.has(t)){pt.add(t);const S=eu(c,Be);setTimeout(()=>{e().catch(()=>{})},S)}},[]);const k=s||o.jsxs("div",{className:"flex items-center justify-center p-4",children:[o.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),o.jsxs("span",{className:"ml-2 text-sm text-gray-600",children:["Loading ",t.replace(/([A-Z])/g," $1").trim(),"..."]})]});return!p&&ar&&Be==="slow"?o.jsx("div",{className:"lazy-placeholder",children:o.jsxs("button",{onClick:()=>x(!0),className:"load-component-btn",children:["Load ",t]})}):o.jsx(b.Suspense,{fallback:k,children:o.jsx(m,{...f})})};return h.displayName=`AdvancedLazy(${t})`,h}async function Rd(e,t,r){let a;for(let n=0;n<t;n++)try{const s=new Promise((l,c)=>{setTimeout(()=>c(new Error("Load timeout")),r)});return await Promise.race([e(),s])}catch(s){if(a=s,n<t-1){const i=Math.pow(2,n)*1e3,l=Math.random()*1e3;await new Promise(c=>setTimeout(c,i+l))}}throw a}function eu(e,t){const r={critical:0,high:500,medium:2e3,low:5e3},a={fast:.5,medium:1,slow:2},n=r[e]||2e3,s=a[t]||1;return n*s}const Ve=class Ve{static registerRoute(t,r){this.routeMap.set(t,r),this.routeUsageStats.set(t,0)}static setCurrentRoute(t){this.currentRoute=t;const r=this.routeUsageStats.get(t)||0;this.routeUsageStats.set(t,r+1),this.preloadLikelyRoutes(t)}static preloadLikelyRoutes(t){this.getRouteTransitionProbability(t).forEach(({route:a,probability:n})=>{n>.3&&!le.has(a)&&setTimeout(()=>{this.routeMap.get(a)},Be==="fast"?1e3:3e3)})}static getRouteTransitionProbability(t){const r=[];switch(t){case"/":r.push({route:"/connect",probability:.7},{route:"/about",probability:.2},{route:"/document",probability:.1});break;case"/connect":r.push({route:"/mail",probability:.8},{route:"/settings",probability:.1});break;case"/mail":r.push({route:"/compose",probability:.4},{route:"/settings",probability:.2});break;default:r.push({route:"/",probability:.1})}return r}static getStats(){return{routeCount:this.routeMap.size,cacheSize:le.size,currentRoute:this.currentRoute,usageStats:Object.fromEntries(this.routeUsageStats)}}};Ve.routeMap=new Map,Ve.routeUsageStats=new Map,Ve.currentRoute="";let nr=Ve;const tu=({src:e,alt:t,className:r,placeholder:a,priority:n="medium"})=>{const[s,i]=b.useState(!1),[l,c]=b.useState(!1),u=b.useRef(null);b.useEffect(()=>{if(!u.current)return;if(n==="high"){c(!0);return}const m=new IntersectionObserver(([h])=>{h.isIntersecting&&(c(!0),m.unobserve(h.target))},{rootMargin:n==="low"?"100px":"200px",threshold:.1});return m.observe(u.current),()=>m.disconnect()},[n]);const g=()=>{i(!0)};return o.jsxs("div",{className:`lazy-image-container ${r}`,children:[o.jsx("img",{ref:u,src:l?e:a||"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB2aWV3Qm94PSIwIDAgMSAxIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiNGM0Y0RjYiLz48L3N2Zz4=",alt:t,className:`transition-opacity duration-300 ${s?"opacity-100":"opacity-0"}`,onLoad:g,loading:n==="high"?"eager":"lazy",fetchPriority:n==="high"?"high":"low"}),!s&&l&&o.jsx("div",{className:"absolute inset-0 bg-gray-200 animate-pulse rounded"})]})};function ru(){le.clear(),pt.clear()}function au(){return{cachedComponents:le.size,preloadQueue:pt.size,networkSpeed:Be,isLowEndDevice:ar,cacheEntries:Array.from(le.entries()).map(([e,t])=>({name:e,loadTime:t.loadTime,age:Date.now()-t.timestamp}))}}const nu=({message:e})=>o.jsxs("div",{className:"flex items-center justify-center p-4",children:[o.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),o.jsx("span",{className:"ml-2 text-sm text-gray-600",children:e})]}),ou=e=>{if(typeof e=="function"||typeof e=="object")return e;switch(e){case"minimal":return()=>o.jsx("div",{className:"flex justify-center items-center p-4",children:"Loading..."});case"skeleton":return()=>o.jsxs("div",{className:"animate-pulse",children:[o.jsx("div",{className:"h-4 bg-gray-200 rounded w-3/4 mb-2"}),o.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/2"})]});case"default":default:return()=>o.jsx(nu,{message:"Loading component..."})}},Ja=(e,t="default",r=3)=>{const a=b.lazy(async()=>{let s=null;for(let i=0;i<r;i++)try{return await e()}catch(l){s=l,i<r-1&&await new Promise(c=>setTimeout(c,Math.pow(2,i)*1e3))}throw s}),n=ou(t);return s=>o.jsx(b.Suspense,{fallback:o.jsx(n,{}),children:o.jsx(a,{...s})})},su=async e=>{try{await e()}catch{}},iu=e=>{const t={};return Object.entries(e).forEach(([r,a])=>{t[r]=Ja(a,"skeleton")}),t},lu=e=>e,Ra={critical:["/","/connect","/mail"],secondary:["/settings","/compose","/points"],optional:["/document","/about","/terms","/privacy"]},Ue=class Ue{static add(t,r){this.preloadedComponents.has(t)||(this.preloadQueue.push({name:t,loader:r}),this.processQueue())}static async processQueue(){this.isPreloading||this.preloadQueue.length===0||(this.isPreloading=!0,"requestIdleCallback"in window?window.requestIdleCallback(async()=>{const t=this.preloadQueue.shift();if(t)try{await t.loader(),this.preloadedComponents.add(t.name)}catch{}this.isPreloading=!1,this.processQueue()}):setTimeout(async()=>{const t=this.preloadQueue.shift();if(t)try{await t.loader(),this.preloadedComponents.add(t.name)}catch{}this.isPreloading=!1,this.processQueue()},100))}static isPreloaded(t){return this.preloadedComponents.has(t)}static clear(){this.preloadedComponents.clear(),this.preloadQueue=[],this.isPreloading=!1}};Ue.preloadedComponents=new Set,Ue.preloadQueue=[],Ue.isPreloading=!1;let or=Ue;const cu=()=>{"requestIdleCallback"in window&&window.requestIdleCallback(()=>{Ra.secondary.forEach(e=>{})})},en=({message:e})=>o.jsxs("div",{className:"flex items-center justify-center p-4",children:[o.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),o.jsx("span",{className:"ml-2 text-sm text-gray-600",children:e})]}),je=new Map;function du(e,t){const{condition:r,fallback:a,retries:n=3,timeout:s=1e4,priority:i="medium",cacheKey:l=`conditional-${Math.random()}`}=t,c=u=>{const[g,m]=b.useState(!1),[h,f]=b.useState(null);return b.useEffect(()=>{const k=setTimeout(async()=>{const C=je.get(l);if(C&&C.isValid&&Date.now()-C.lastCheck<3e5)try{if(await C.condition()){f(()=>C.component),m(!0);return}}catch{}try{if(await r()){const N=await mu(e,n,s);je.set(l,{component:N.default,condition:r,lastCheck:Date.now(),isValid:!0}),f(()=>N.default),m(!0)}}catch{}},i==="high"?0:i==="medium"?100:500);return()=>clearTimeout(k)},[]),g?h?o.jsx(b.Suspense,{fallback:a||o.jsx(en,{message:"Loading component..."}),children:o.jsx(h,{...u})}):null:a||o.jsx(en,{message:"Checking conditions..."})};return c.displayName=`ConditionalLazy(${l})`,c}const uu={},gu={};async function mu(e,t,r){let a;for(let n=0;n<t;n++)try{const s=new Promise((i,l)=>{setTimeout(()=>l(new Error("Import timeout")),r)});return await Promise.race([e(),s])}catch(s){if(a=s,n<t-1){const i=Math.pow(2,n)*1e3;await new Promise(l=>setTimeout(l,i))}}throw a}function fu(){je.clear()}function hu(){return{cachedComponents:je.size,cacheEntries:Array.from(je.entries()).map(([e,t])=>({key:e,lastCheck:t.lastCheck,isValid:t.isValid,age:Date.now()-t.lastCheck}))}}const tn=[{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 pu{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 r=navigator.connection;if(r){const a=r.effectiveType;a==="4g"?this.networkSpeedEstimate="fast":a==="3g"?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}}const t=performance.now();fetch("/favicon.ico",{method:"HEAD"}).then(()=>{const r=performance.now()-t;r<100?this.networkSpeedEstimate="fast":r<300?this.networkSpeedEstimate="medium":this.networkSpeedEstimate="slow"}).catch(()=>{this.networkSpeedEstimate="slow"})}detectDeviceCapability(){const t=navigator.deviceMemory,r=navigator.hardwareConcurrency;t&&t<4&&(this.isLowEndDevice=!0),r&&r<4&&(this.isLowEndDevice=!0),"getBattery"in navigator&&navigator.getBattery?.().then(a=>{a.level&&a.level<.2&&(this.isLowEndDevice=!0)})}startUserActivityTracking(){let t;const r=()=>{this.userActivityScore=Math.min(this.userActivityScore+1,100),clearTimeout(t),t=setTimeout(()=>{this.userActivityScore=Math.max(this.userActivityScore-1,0)},5e3)};["click","scroll","keydown","mousemove"].forEach(a=>{document.addEventListener(a,r,{passive:!0})})}shouldPreload(t){return this.networkSpeedEstimate==="slow"&&t.size>50||this.isLowEndDevice&&t.size>30?!1:t.config.condition()}async preloadChunk(t){if(!this.preloaded.has(t.name))try{if(document.querySelectorAll('script[src*="'+t.name+'"]').length===0&&document.querySelectorAll('link[href*="'+t.name+'"]').length>0)return;const a=document.createElement("link");a.rel="modulepreload",a.href=t.path.replace("*",this.getChunkHash(t.name)),a.crossOrigin="","fetchPriority"in a&&(a.fetchPriority=t.config.priority==="critical"?"high":"low"),document.head.appendChild(a),this.preloaded.add(t.name)}catch{}}getChunkHash(t){const r=Array.from(document.querySelectorAll("script[src]"));for(const a of r){const n=a.src;if(n.includes(t)){const s=n.match(new RegExp(`${t}-([A-Za-z0-9_-]+)\\.js`));if(s)return s[1]}}return"unknown"}async schedulePreload(t){const r=t.config;return r.delay&&await new Promise(a=>setTimeout(a,r.delay)),r.onIdle&&"requestIdleCallback"in window?new Promise(a=>{window.requestIdleCallback(()=>{this.preloadChunk(t).then(a)})}):this.preloadChunk(t)}initializePreloading(){tn.sort((r,a)=>{const n={critical:0,high:1,medium:2,low:3};return n[r.config.priority]-n[a.config.priority]}).forEach(r=>{this.shouldPreload(r)&&(r.config.priority==="critical"?this.preloadChunk(r):this.schedulePreload(r),r.config.onHover&&this.setupHoverPreloading(r),r.config.onScroll&&this.setupScrollPreloading(r,r.config.onScroll))}),this.startIntelligentPreloading()}setupHoverPreloading(t){document.querySelectorAll("[data-preload-on-hover]").forEach(a=>{let n=!1;a.addEventListener("mouseenter",()=>{!n&&this.userActivityScore>30&&(this.preloadChunk(t),n=!0)},{passive:!0})})}setupScrollPreloading(t,r){let a=!1;const n=()=>{if(a)return;window.scrollY/(document.body.scrollHeight-window.innerHeight)*100>=r&&(this.preloadChunk(t),a=!0,window.removeEventListener("scroll",n))};window.addEventListener("scroll",n,{passive:!0})}startIntelligentPreloading(){setTimeout(()=>{this.userActivityScore>50&&this.networkSpeedEstimate!=="slow"&&tn.filter(r=>r.config.priority==="medium"&&this.shouldPreload(r)).forEach(r=>{Math.random()>.5&&this.schedulePreload(r)})},1e4)}getPreloadingStats(){return{preloadedCount:this.preloaded.size,networkSpeed:this.networkSpeedEstimate,isLowEndDevice:this.isLowEndDevice,userActivity:this.userActivityScore}}}let Fe=null;function yu(){Fe||(Fe=new pu,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Fe?.initializePreloading()}):Fe.initializePreloading())}function bu(){return Fe?.getPreloadingStats()}function xu(e){const t={"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"&&(t["ai-governance-features"]="voting-notifications,multi-sig-coordination,proposal-tracking",t["ai-dao-platforms"]="snapshot,tally,aragon,safe,decentdao",t["ai-participation-boost"]="85%",t["ai-treasury-management"]="enabled"),t}function rn(e){const t={"@context":"https://schema.org","@type":ku(e.contentType),name:e.primaryTopic,description:`Comprehensive ${e.primaryTopic} resource for ${e.targetAudience.join(", ")}`,about:e.semanticKeywords.map(r=>({"@type":"Thing",name:r})),audience:{"@type":"Audience",audienceType:e.targetAudience.join(", ")},educationalLevel:e.complexityLevel,inLanguage:"en",isAccessibleForFree:!0};return e.contentType==="governance-page"?{...t,"@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"}]}:t}function vu(e,t){return t.map(r=>({type:"related-content",target:r.url,strength:r.relevance}))}function an(e){const t=["0xmail.box","Web3","blockchain","email","wallet","cryptocurrency"],r=["DAO","governance","voting","multi-sig","Snapshot","Tally","Aragon","Safe","proposal","community"];return e.contentType==="governance-page"?[...t,...r]:t}function nn(e){const t=["web3-infrastructure","email-technology","blockchain-applications"],r=["dao-governance-tools","voting-notification-systems","community-management-platforms","multi-signature-coordination","treasury-management-solutions"];return e.contentType==="governance-page"?[...t,...r]:t}function wu(e,t){return{contentClassification:{type:e.contentType,topic:e.primaryTopic,audience:e.targetAudience.join(","),complexity:e.complexityLevel,purpose:e.contentPurpose,vertical:e.industryVertical},semanticMarkup:rn(e),entityRecognition:an(e),topicClustering:nn(e),contentRelationships:t?.contentRelationships||[],...t}}function ku(e){return{article:"Article","landing-page":"WebPage","product-page":"Product","governance-page":"SoftwareApplication",documentation:"TechArticle"}[e]||"WebPage"}function Cu(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 Su={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"]}},Nu=({message:e,className:t})=>o.jsxs("div",{className:`flex items-center justify-center p-4 ${t||""}`,children:[o.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-500"}),o.jsx("span",{className:"ml-2 text-sm text-gray-600",children:e})]}),sr=new Map,_e=new Set;function ir(){const e=[];return!!window.ethereum?.isMetaMask&&(_e.add("metamask"),e.push({name:"MetaMask",detected:!0,priority:1})),!!window.ethereum?.isCoinbaseWallet&&(_e.add("coinbase"),e.push({name:"Coinbase Wallet",detected:!0,priority:2})),!!window.solana?.isPhantom&&(_e.add("phantom"),e.push({name:"Phantom",detected:!0,priority:3})),e.push({name:"WalletConnect",detected:!0,priority:4}),e.sort((n,s)=>n.priority-s.priority)}function lr(e){const t=`wallet-${e.toLowerCase()}`;if(sr.has(t))return sr.get(t);const r=()=>Promise.resolve({default:()=>b.createElement("div",{},`${e} Provider Placeholder`)}),a=b.lazy(r),n=s=>o.jsx(b.Suspense,{fallback:o.jsx(Nu,{message:`Loading ${e} wallet...`,className:"wallet-loading"}),children:o.jsx(a,{...s})});return n.displayName=`Lazy${e}Provider`,sr.set(t,n),n}function Eu({children:e}){const t=ir();return t.filter(r=>r.priority<=2&&r.detected).forEach(r=>{setTimeout(()=>{},1e3)}),o.jsxs(o.Fragment,{children:[t.map(r=>{const a=lr(r.name);return o.jsx(a,{},r.name)}),e]})}const gr=class gr{static preloadWallet(t){const r=t.toLowerCase();this.preloadedWallets.has(r)||(this.preloadedWallets.add(r),setTimeout(()=>{lr(t)},500))}static preloadCommonWallets(){["metamask","walletconnect","coinbase"].forEach((r,a)=>{setTimeout(()=>{this.preloadWallet(r)},a*1e3)})}static getPreloadedWallets(){return Array.from(this.preloadedWallets)}};gr.preloadedWallets=new Set;let He=gr;function Au(){return{availableWallets:ir(),preloadWallet:a=>{He.preloadWallet(a)},getDetectedWallets:()=>Array.from(_e),hasWallet:a=>_e.has(a.toLowerCase())}}function Pu({walletName:e,onConnect:t,disabled:r=!1}){const a=()=>{He.preloadWallet(e),setTimeout(t,100)};return o.jsxs("button",{onClick:a,disabled:r,className:"wallet-connect-btn","data-wallet":e.toLowerCase(),children:["Connect ",e]})}class Tu{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 a=0;new PerformanceObserver(s=>{for(const i of s.getEntries())i.hadRecentInput||(a+=i.value);this.observedMetrics.cls=a}).observe({entryTypes:["layout-shift"]})}catch{}window.addEventListener("load",()=>{setTimeout(()=>{const t=performance.getEntriesByType("navigation")[0];t&&(this.observedMetrics.ttfb=t.responseStart-t.requestStart,this.optimizeBasedOnTTFB(this.observedMetrics.ttfb))},0)})}optimizeBasedOnFCP(t){t>2e3?this.applyEmergencyOptimizations():t>1500&&this.applyMediumOptimizations()}optimizeBasedOnLCP(t){t>2500&&this.optimizeLCPElements()}optimizeBasedOnTTFB(t){t>600&&this.enableAggressiveCaching()}applyEmergencyOptimizations(){document.querySelectorAll('img[data-priority="low"]').forEach(a=>{a.loading="lazy",a.style.display="none",setTimeout(()=>{a.style.display=""},3e3)}),document.querySelectorAll('script[data-priority="low"]').forEach(a=>{a.setAttribute("defer","")})}applyMediumOptimizations(){["/assets/app-core-*.js","/assets/react-router-*.js"].forEach(r=>{this.preloadResource(r,"script")})}optimizeLCPElements(){document.querySelectorAll("img[data-hero], [data-lcp-element]").forEach(a=>{a instanceof HTMLImageElement&&(a.fetchPriority="high",a.loading="eager")});const r=document.querySelector("img[data-hero]")?.getAttribute("src");r&&this.preloadResource(r,"image")}enableAggressiveCaching(){const t=document.createElement("meta");t.httpEquiv="Cache-Control",t.content="public, max-age=31536000, immutable",document.head.appendChild(t)}preloadResource(t,r){if(document.querySelector(`link[href*="${t}"]`))return;const n=document.createElement("link");switch(n.rel="preload",n.href=t,r){case"script":n.as="script";break;case"style":n.as="style";break;case"font":n.as="font",n.type="font/woff2",n.crossOrigin="";break;case"image":n.as="image";break}document.head.appendChild(n)}optimizeCriticalPath(){this.criticalResources.filter(t=>t.priority==="critical"&&t.preload).forEach(t=>{this.preloadResource(t.url,t.type)}),this.inlineCriticalCSS(),this.optimizeFontLoading(),this.removeRenderBlocking(),this.setupProgressiveLoading()}inlineCriticalCSS(){const t=document.querySelector('link[rel="stylesheet"][data-critical]');t&&this.isSmallResource(t.getAttribute("href")||"")&&fetch(t.getAttribute("href")||"").then(r=>r.text()).then(r=>{if(r.length<1e4){const a=document.createElement("style");a.textContent=r,document.head.appendChild(a),t.remove()}}).catch(()=>{})}optimizeFontLoading(){document.querySelectorAll('link[href*="fonts.googleapis.com"]').forEach(r=>{const a=r.getAttribute("href")||"";if(!a.includes("display=swap")){const n=a.includes("?")?"&":"?";r.setAttribute("href",`${a}${n}display=swap`)}})}removeRenderBlocking(){document.querySelectorAll('link[rel="stylesheet"]:not([data-critical])').forEach(r=>{const a=r.cloneNode(!0);a.rel="preload",a.as="style",a.onload=()=>{a.onload=null,a.rel="stylesheet"};const n=document.createElement("noscript"),s=r.cloneNode(!0);n.appendChild(s),document.head.appendChild(a),document.head.appendChild(n),r.remove()})}setupProgressiveLoading(){const t=document.querySelectorAll("img[data-src]");if("IntersectionObserver"in window){const r=new IntersectionObserver(a=>{a.forEach(n=>{if(n.isIntersecting){const s=n.target;s.src=s.dataset.src||"",s.removeAttribute("data-src"),r.unobserve(s)}})},{rootMargin:"50px 0px",threshold:.01});t.forEach(a=>r.observe(a))}else t.forEach(r=>{const a=r;a.src=a.dataset.src||""})}isSmallResource(t){return t.includes("critical")||t.includes("inline")}getPerformanceMetrics(){return{...this.observedMetrics,score:this.calculatePerformanceScore()}}calculatePerformanceScore(){let t=100;return this.observedMetrics.fcp>2e3?t-=20:this.observedMetrics.fcp>1500&&(t-=10),this.observedMetrics.lcp>2500?t-=25:this.observedMetrics.lcp>2e3&&(t-=15),this.observedMetrics.cls>.1?t-=15:this.observedMetrics.cls>.05&&(t-=8),this.observedMetrics.ttfb>600?t-=10:this.observedMetrics.ttfb>400&&(t-=5),Math.max(t,0)}}const yt={mark:e=>{typeof performance<"u"&&performance.mark&&performance.mark(e)},measure:(e,t,r)=>{if(typeof performance<"u"&&performance.measure)try{performance.measure(e,t,r);const a=performance.getEntriesByName(e);return a[a.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?.()))}},Iu=(e,t=[])=>{b.useEffect(()=>(yt.mark(`${e}-start`),()=>{yt.mark(`${e}-end`),yt.measure(e,`${e}-start`,`${e}-end`)}),[e,t])},Lu=e=>{const t=b.useRef(e);return t.current=e,b.useCallback((...r)=>t.current(...r),[])},$u=(e,t,r)=>{const a=b.useRef(t),n=b.useRef(void 0);return b.useMemo(()=>(r&&process.env.NODE_ENV==="development"&&t.some((s,i)=>s!==a.current[i]),a.current=t,n.current=e(),n.current),[e,r,t])},bt=new Map,Ou=e=>{const t=bt.get(e)||0;bt.set(e,t+1),b.useEffect(()=>{process.env.NODE_ENV})},Mu=()=>Object.fromEntries(bt),Du=()=>bt.clear(),zu=e=>b.lazy(e),Wu=(e=.1)=>{const[t,r]=b.useState(new Set),a=b.useRef(null);b.useEffect(()=>(a.current=new IntersectionObserver(s=>{s.forEach(i=>{if(i.isIntersecting){const l=i.target,c=l.dataset.src;c&&(l.src=c,l.onload=()=>{r(u=>new Set(u).add(c))},a.current?.unobserve(l))}})},{threshold:e}),()=>a.current?.disconnect()),[e]);const n=b.useCallback(s=>{s&&a.current&&a.current.observe(s)},[]);return{loadedImages:t,observeImage:n}},Bu=e=>{typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(()=>{e().catch(()=>{})}):setTimeout(()=>{e().catch(()=>{})},100)},on={},ju=e=>{on[e.name]=e.value,process.env.NODE_ENV},Fu=()=>on,_u=(e,t="script")=>{if(typeof document<"u"){const r=document.createElement("link");r.rel="prefetch",r.href=e,r.as=t,document.head.appendChild(r)}},Hu=(e,t="script",r)=>{if(typeof document<"u"){const a=document.createElement("link");a.rel="preload",a.href=e,a.as=t,r&&(a.crossOrigin="anonymous"),document.head.appendChild(a)}},Vu=e=>{const t=b.useRef(new Set),r=b.useRef(new Set),a=b.useCallback((s,i)=>{const l=setTimeout(()=>{t.current.delete(l),s()},i);return t.current.add(l),l},[]),n=b.useCallback((s,i)=>{const l=setInterval(s,i);return r.current.add(l),l},[]);return b.useEffect(()=>{const s=t.current,i=r.current;return()=>{s.forEach(l=>clearTimeout(l)),i.forEach(l=>clearInterval(l)),process.env.NODE_ENV}},[e]),{createTimer:a,createInterval:n}},ce={maxBundleSize:500,maxChunkSize:200,maxImageSize:100,maxFCP:1800,maxLCP:2500,maxFID:100,maxCLS:.1,check:e=>{const t=[];return e.FCP&&e.FCP>ce.maxFCP&&t.push(`FCP (${e.FCP}ms) exceeds budget (${ce.maxFCP}ms)`),e.LCP&&e.LCP>ce.maxLCP&&t.push(`LCP (${e.LCP}ms) exceeds budget (${ce.maxLCP}ms)`),e.FID&&e.FID>ce.maxFID&&t.push(`FID (${e.FID}ms) exceeds budget (${ce.maxFID}ms)`),e.CLS&&e.CLS>ce.maxCLS&&t.push(`CLS (${e.CLS}) exceeds budget (${ce.maxCLS})`),t}},Uu=({contentType:e,aiSummary:t,technicalComplexity:r="intermediate"})=>o.jsxs(fn.Helmet,{children:[o.jsx("meta",{name:"ai:content-type",content:e}),o.jsx("meta",{name:"ai:summary",content:t}),o.jsx("meta",{name:"ai:complexity",content:r})]}),qu=({children:e,className:t,...r})=>o.jsx("main",{className:t,...r,role:"main",children:e}),Gu=({children:e})=>o.jsx(o.Fragment,{children:e}),Te=e=>Array.isArray(e)?e:typeof e=="string"?e.split(",").map(t=>t.trim()).filter(Boolean):[],cr=e=>{const t=Te(e.audience);return{"@context":"https://schema.org","@type":"SoftwareApplication",name:"0xmail.box",applicationCategory:"CommunicationApplication",operatingSystem:"Web Browser",description:e.description,url:"https://0xmail.box",downloadUrl:"https://0xmail.box/connect",installUrl:"https://0xmail.box/connect",screenshot:"https://0xmail.box/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:t.join(", "),geographicArea:"Worldwide"},creator:{"@type":"Organization",name:"0xmail.box",url:"https://0xmail.box"},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}}},dr=e=>{const t=Te(e.keywords),r=Te(e.audience);return{"@context":"https://schema.org","@type":"TechnicalArticle",headline:e.title,description:e.description,author:{"@type":"Organization",name:"0xmail.box",url:"https://0xmail.box",logo:{"@type":"ImageObject",url:"https://0xmail.box/logo.png"}},publisher:{"@type":"Organization",name:"0xmail.box",logo:{"@type":"ImageObject",url:"https://0xmail.box/logo.png",width:600,height:600}},datePublished:"2024-01-01T00:00:00Z",dateModified:e.lastUpdated?.toISOString()||new Date().toISOString(),mainEntityOfPage:{"@type":"WebPage","@id":`https://0xmail.box${location.pathname}`},image:{"@type":"ImageObject",url:"https://0xmail.box/og-images/technical-guide.jpg",width:1200,height:630},keywords:t.join(", "),about:[{"@type":"Thing",name:"Web3 Email Platform"},{"@type":"Thing",name:"Blockchain Technology"},{"@type":"Thing",name:"Decentralized Communication"}],audience:{"@type":"Audience",audienceType:r.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"]}},Ku=e=>({"@context":"https://schema.org","@type":"FAQPage",mainEntity:e.map(t=>({"@type":"Question",name:t.question,acceptedAnswer:{"@type":"Answer",text:t.answer,dateCreated:new Date().toISOString(),upvoteCount:Math.floor(Math.random()*50)+10,author:{"@type":"Organization",name:"0xmail.box"}},answerCount:1,upvoteCount:Math.floor(Math.random()*100)+20,dateCreated:"2024-01-01T00:00:00Z",category:t.category||"Web3 Email"}))}),ur=e=>({"@context":"https://schema.org","@type":"WebPage",name:e.title,description:e.description,url:`https://0xmail.box${location.pathname}`,primaryImageOfPage:{"@type":"ImageObject",url:"https://0xmail.box/og-images/ai-optimized.jpg"},significantLink:["https://0xmail.box/document","https://0xmail.box/web3-users","https://0xmail.box/web3-projects","https://0xmail.box/connect"],relatedLink:e.relatedTopics?.map(t=>`https://0xmail.box/search?q=${encodeURIComponent(t)}`)||[],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":"https://0xmail.box",name:"0xmail.box"},potentialAction:{"@type":"InteractAction",target:{"@type":"EntryPoint",urlTemplate:"https://0xmail.box/connect",actionPlatform:["https://schema.org/DesktopWebPlatform","https://schema.org/MobileWebPlatform"]},name:"Connect Web3 Wallet"}}),sn=e=>{const t=Te(e.keywords);return{"og:title":e.title,"og:description":e.description,"og:type":"website","og:url":`https://0xmail.box${location.pathname}`,"og:image":`https://0xmail.box/og-images/${e.category}.jpg`,"og:image:width":"1200","og:image:height":"630","og:image:alt":`${e.title} - Web3 Email Platform`,"og:site_name":"0xmail.box","og:locale":"en_US","article:author":"https://0xmail.box/about","article:section":e.category,"article:tag":t.join(","),"article:published_time":"2024-01-01T00:00:00Z","article:modified_time":e.lastUpdated?.toISOString()||new Date().toISOString()}},ln=e=>({"twitter:card":"summary_large_image","twitter:site":"@0xmailbox","twitter:creator":"@0xmailbox","twitter:title":e.title,"twitter:description":e.description,"twitter:image":`https://0xmail.box/twitter-cards/${e.category}.jpg`,"twitter:image:alt":`${e.title} - Web3 Email Platform`,"twitter:label1":"Category","twitter:data1":e.category,"twitter:label2":"Reading Time","twitter:data2":e.readingTime?`${e.readingTime} min`:"5 min"}),cn=e=>{const t=Te(e.keywords),r=Te(e.audience);return{"ai:content-type":e.contentType,"ai:complexity":e.complexity,"ai:category":e.category,"ai:audience":r.join(","),"ai:keywords":t.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":"0xmail.box,Web3,blockchain,email,wallet","content:freshness":e.lastUpdated?.toISOString()||new Date().toISOString(),"content:authority":"high","content:expertise":"technical","content:trustworthiness":"verified"}},Yu=e=>({structuredData:{product:cr(e),article:dr(e),aiOptimized:ur(e)},openGraph:sn(e),twitterCard:ln(e),aiMetaTags:cn(e),jsonLD:[cr(e),dr(e),ur(e)]}),Qu={homepage:{title:"0xmail.box - Revolutionary Web3 Email Platform | Wallet-Based Authentication",description:"Transform your email experience with 0xmail.box - 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:"0xmail.box Documentation - Complete Web3 Email Setup Guide",description:"Comprehensive documentation for 0xmail.box 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 on 0xmail.box - Web3 Email Rewards Guide",description:"Master the 0xmail.box 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"]}},Xu=e=>{const{level:t,text:r,className:a="",id:n,semanticContext:s="section"}=e,i=`h${t}`,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"},c={"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"},u=[l[t],c[s],a].filter(Boolean).join(" "),g=n||r.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");return b.createElement(i,{id:g,className:u,"aria-level":t},r)},ae={pageTitle:(e,t)=>({level:1,text:e,className:t,semanticContext:"page-title"}),majorSection:(e,t)=>({level:2,text:e,className:t,semanticContext:"section"}),feature:(e,t)=>({level:3,text:e,className:t,semanticContext:"feature"}),benefit:(e,t)=>({level:3,text:e,className:t,semanticContext:"benefit"}),step:(e,t,r)=>({level:3,text:t?`Step ${t}: ${e}`:e,className:r,semanticContext:"step"}),subFeature:(e,t)=>({level:4,text:e,className:t,semanticContext:"feature"})},Zu=e=>{const t=[],r=[],a=e.filter(n=>n.level===1).length;a===0?t.push("Missing H1 tag - every page should have exactly one H1"):a>1&&t.push(`Multiple H1 tags found (${a}) - use only one H1 per page`);for(let n=1;n<e.length;n++){const s=e[n],i=e[n-1];s.level>i.level+1&&t.push(`Heading level jump from H${i.level} to H${s.level} - avoid skipping levels`)}return e.forEach((n,s)=>{n.text.length<3&&t.push(`Heading ${s+1} is too short - use descriptive text`),n.text.length>70&&r.push(`Heading "${n.text.substring(0,30)}..." is long - consider shortening for better SEO`)}),{isValid:t.length===0,errors:t,suggestions:r}},Ju={walletConnection:ae.pageTitle("Connect Your Web3 Wallet"),emailBenefits:ae.majorSection("Why Choose Web3 Email?"),securityFeature:ae.feature("Secure & Private"),ensIntegration:ae.feature("ENS Domain Support"),multiChain:ae.feature("Multi-Chain Compatibility"),passwordless:ae.benefit("No Passwords Required"),setupStep1:ae.step("Connect Your Wallet",1),setupStep2:ae.step("Verify Your Identity",2),setupStep3:ae.step("Access Your Emails",3)},Ru=[{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@0xmail.box","alice.sol@0xmail.box"],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"}],eg=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}),tg=e=>{const t={nodes:e.map(r=>({id:r.term,label:r.term,category:r.category,definition:r.definition})),edges:[]};return e.forEach(r=>{r.relatedTerms?.forEach(a=>{e.find(s=>s.term===a)&&t.edges.push({source:r.term,target:a,relationship:"related_to"})}),r.synonyms?.forEach(a=>{t.edges.push({source:r.term,target:a,relationship:"synonym_of"})})}),t},rg=e=>{const t=[];return e.examples?.forEach(r=>{t.push({text:r,label:e.term,type:"positive",confidence:1})}),e.context&&t.push({text:e.context,label:e.term,type:"contextual",confidence:.8}),t.push({text:`${e.term} is ${e.definition}`,label:e.term,type:"definition",confidence:1}),t},ag=e=>{const t=[];return e.forEach(r=>{t.push({question:`What is ${r.term}?`,answer:r.definition,category:r.category,difficulty:"basic"}),r.context&&t.push({question:`How does ${r.term} work?`,answer:r.context,category:r.category,difficulty:"intermediate"}),r.examples&&r.examples.length>0&&t.push({question:`What are examples of ${r.term}?`,answer:r.examples.join(", "),category:r.category,difficulty:"basic"}),r.relatedTerms&&r.relatedTerms.length>0&&t.push({question:`What is ${r.term} related to?`,answer:`${r.term} is related to ${r.relatedTerms.join(", ")}`,category:r.category,difficulty:"intermediate"})}),t},ng={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"]}};/**
|
|
60
60
|
* @johnqh/mail-box-components
|
|
61
61
|
*
|
|
62
62
|
* A comprehensive React component library and design system.
|
|
@@ -64,4 +64,4 @@ ${t.description}`},label:"Facebook"},{component:M.LinkedinShareButton,icon:M.Lin
|
|
|
64
64
|
* @version 1.4.0
|
|
65
65
|
* @author John Qiu Huang
|
|
66
66
|
* @license MIT
|
|
67
|
-
*/const
|
|
67
|
+
*/const og={utils:{cn:w}};Object.defineProperty(d,"ArrowLeftIcon",{enumerable:!0,get:()=>A.ArrowLeftIcon}),Object.defineProperty(d,"ArrowRightIcon",{enumerable:!0,get:()=>A.ArrowRightIcon}),Object.defineProperty(d,"Bars3Icon",{enumerable:!0,get:()=>A.Bars3Icon}),Object.defineProperty(d,"BellIcon",{enumerable:!0,get:()=>A.BellIcon}),Object.defineProperty(d,"BellSlashIcon",{enumerable:!0,get:()=>A.BellSlashIcon}),Object.defineProperty(d,"ChartBarIcon",{enumerable:!0,get:()=>A.ChartBarIcon}),Object.defineProperty(d,"CheckCircleIcon",{enumerable:!0,get:()=>A.CheckCircleIcon}),Object.defineProperty(d,"CheckIcon",{enumerable:!0,get:()=>A.CheckIcon}),Object.defineProperty(d,"ChevronDownIcon",{enumerable:!0,get:()=>A.ChevronDownIcon}),Object.defineProperty(d,"ChevronLeftIcon",{enumerable:!0,get:()=>A.ChevronLeftIcon}),Object.defineProperty(d,"ChevronRightIcon",{enumerable:!0,get:()=>A.ChevronRightIcon}),Object.defineProperty(d,"ChevronUpIcon",{enumerable:!0,get:()=>A.ChevronUpIcon}),Object.defineProperty(d,"ClockIcon",{enumerable:!0,get:()=>A.ClockIcon}),Object.defineProperty(d,"CodeBracketIcon",{enumerable:!0,get:()=>A.CodeBracketIcon}),Object.defineProperty(d,"Cog6ToothIcon",{enumerable:!0,get:()=>A.Cog6ToothIcon}),Object.defineProperty(d,"CreditCardIcon",{enumerable:!0,get:()=>A.CreditCardIcon}),Object.defineProperty(d,"DocumentTextIcon",{enumerable:!0,get:()=>A.DocumentTextIcon}),Object.defineProperty(d,"EnvelopeIcon",{enumerable:!0,get:()=>A.EnvelopeIcon}),Object.defineProperty(d,"ExclamationTriangleIcon",{enumerable:!0,get:()=>A.ExclamationTriangleIcon}),Object.defineProperty(d,"EyeSlashIcon",{enumerable:!0,get:()=>A.EyeSlashIcon}),Object.defineProperty(d,"GlobeAltIcon",{enumerable:!0,get:()=>A.GlobeAltIcon}),Object.defineProperty(d,"HomeIcon",{enumerable:!0,get:()=>A.HomeIcon}),Object.defineProperty(d,"InboxIcon",{enumerable:!0,get:()=>A.InboxIcon}),Object.defineProperty(d,"InformationCircleIcon",{enumerable:!0,get:()=>A.InformationCircleIcon}),Object.defineProperty(d,"KeyIcon",{enumerable:!0,get:()=>A.KeyIcon}),Object.defineProperty(d,"MegaphoneIcon",{enumerable:!0,get:()=>A.MegaphoneIcon}),Object.defineProperty(d,"MinusIcon",{enumerable:!0,get:()=>A.MinusIcon}),Object.defineProperty(d,"PaperAirplaneIcon",{enumerable:!0,get:()=>A.PaperAirplaneIcon}),Object.defineProperty(d,"PaperClipIcon",{enumerable:!0,get:()=>A.PaperClipIcon}),Object.defineProperty(d,"PlusIcon",{enumerable:!0,get:()=>A.PlusIcon}),Object.defineProperty(d,"RocketLaunchIcon",{enumerable:!0,get:()=>A.RocketLaunchIcon}),Object.defineProperty(d,"ShieldCheckIcon",{enumerable:!0,get:()=>A.ShieldCheckIcon}),Object.defineProperty(d,"SparklesIcon",{enumerable:!0,get:()=>A.SparklesIcon}),Object.defineProperty(d,"StarIcon",{enumerable:!0,get:()=>A.StarIcon}),Object.defineProperty(d,"TrashIcon",{enumerable:!0,get:()=>A.TrashIcon}),Object.defineProperty(d,"UserGroupIcon",{enumerable:!0,get:()=>A.UserGroupIcon}),Object.defineProperty(d,"XMarkIcon",{enumerable:!0,get:()=>A.XMarkIcon}),Object.defineProperty(d,"CheckCircleIconSolid",{enumerable:!0,get:()=>Ye.CheckCircleIcon}),Object.defineProperty(d,"CheckIconSolid",{enumerable:!0,get:()=>Ye.CheckIcon}),Object.defineProperty(d,"ExclamationTriangleIconSolid",{enumerable:!0,get:()=>Ye.ExclamationTriangleIcon}),Object.defineProperty(d,"StarIconSolid",{enumerable:!0,get:()=>Ye.StarIcon}),d.AIMeta=Uu,d.AITrainingEnhancer=Gu,d.AI_TRAINING_CONFIGS=ng,d.AddressLink=Do,d.Alert=jo,d.AlertDescription=Bo,d.AlertTitle=Wo,d.AnimatedSection=ye,d.BatchRender=Ed,d.BodyText=Ac,d.Breadcrumb=Ha,d.BreadcrumbSection=od,d.Button=de,d.CTASection=Pd,d.CalloutBox=Jo,d.CancellableRequest=_d,d.Card=At,d.CardContent=Qo,d.CardFooter=Xo,d.CardHeader=Yo,d.ChainBadge=zr,d.CodeBlock=sd,d.CodeExampleBlock=id,d.CollapsibleDocumentationTopic=cd,d.CollapsibleEmailField=zt,d.ComparisonSection=ns,d.ComponentPreloader=or,d.ConditionalRender=Cd,d.ConfirmationDialog=Wc,d.ContentContainer=is,d.Dropdown=ls,d.EmailAccountsList=Is,d.EmailInputField=Dt,d.EmailInputGroup=Ks,d.EmptyState=_r,d.ErrorBoundary=hd,d.ErrorBoundaryLazy=pd,d.ExpensiveComponent=wd,d.FadeInScale=Uo,d.FadeInUp=Vo,d.FeatureBlock=td,d.FeatureCard=cs,d.FeatureGrid=fs,d.FlexContainer=Fs,d.FloatingElement=qo,d.FormFieldGroup=et,d.FormSection=Rc,d.FreeEmailBanner=Kc,d.HeroBannerWithBadge=ps,d.IconContainer=Vc,d.InfoCard=Zo,d.InfoPanel=Qc,d.Input=Lr,d.KYCLevelCard=Lo,d.KYCStatusBadge=Po,d.Label=It,d.LanguageSelector=md,d.LazyComponent=Sd,d.LazyImage=tu,d.LazyLoadQueue=kr,d.LazyWalletButton=Pu,d.LazyWrapper=ao,d.LoadPriority=Nt,d.LoadingOptimizer=Od,d.LoadingState=qs,d.Logo=ad,d.MasterDetailLayout=Ld,d.MetricsGrid=bs,d.Modal=ja,d.ModalContent=Fa,d.ModalFooter=_a,d.ModalHeader=Oc,d.NoContent=Gs,d.OptimizedAPIClient=jd,d.OptimizedImage=Ad,d.OptimizedRoutePreloader=Md,d.PageContainer=Hs,d.PageHeader=Id,d.PageTitle=Cc,d.PerformanceBoundary=Nd,d.PerformanceOptimizer=$d,d.PlatformSpecificComponents=gu,d.PriorityLoader=Cr,d.ProcessSteps=xs,d.PromotionalBanner=dd,d.PullToRefresh=vs,d.RouteBasedLazyLoader=nr,d.SafeAppWrapper=yd,d.Section=Us,d.SectionBadge=wc,d.SectionHeader=ks,d.SectionTitle=Nc,d.SecurityProvider=bd,d.Select=Lt,d.SelectContent=Je,d.SelectField=Xs,d.SelectGroup=ws,d.SelectItem=Re,d.SelectLabel=Or,d.SelectScrollDownButton=Ot,d.SelectScrollUpButton=$t,d.SelectSeparator=Mr,d.SelectTrigger=Ze,d.SelectValue=$r,d.SemanticHTML=qu,d.SettingsList=$s,d.SmartContent=$c,d.SmartLink=rr,d.SmartWalletProviders=Eu,d.Spinner=Mt,d.StandardPageLayout=Td,d.StatCard=Zc,d.StatusBadge=As,d.StatusIndicator=Rs,d.StepList=fd,d.SubscriptionGatedComponents=uu,d.SumsubWebSDK=To,d.Switch=Dr,d.SystemStatusIndicator=bc,d.TableOfContents=Ss,d.Tabs=Os,d.TabsContent=Fr,d.TabsList=Br,d.TabsTrigger=jr,d.TextAreaField=Qs,d.TextField=Ys,d.TextLink=Tc,d.TrackedButton=ud,d.TrackedLink=gd,d.UseCaseGrid=Ms,d.VirtualListItem=kd,d.WEB3_CONCEPTS=Ru,d.WEB3_EMAIL_HEADINGS=Ju,d.WEB3_HEADING_PATTERNS=ae,d.WalletIcon=rd,d.WalletPreloader=He,d.addResourceHint=so,d.aiOptimizationPresets=Su,d.appStorage=co,d.autoConnectWalletBrowser=fo,d.batchDOMUpdates=Sn,d.bundleAnalysis=ke,d.buttonVariants=Ir,d.cacheHeaders=Yd,d.cacheUtils=Hd,d.checkPerformanceBudget=xo,d.clearComponentCache=ru,d.clearConditionalCache=fu,d.clearRenderCounts=Du,d.cn=w,d.combineClassNames=w,d.conditionalCSS=Gd,d.convertFileSize=ko,d.createAIMetaTags=cn,d.createAIOptimizedSchema=ur,d.createAdvancedLazyComponent=Jd,d.createBreadcrumb=Jn,d.createCSSVariables=bn,d.createComparisonData=Pt,d.createConditionalImports=Un,d.createConditionalLazyComponent=du,d.createEmailComparisonData=os,d.createEnhancedFAQSchema=Ku,d.createEnhancedOpenGraph=sn,d.createEnhancedTwitterCard=ln,d.createFeature=Tt,d.createLazyComponent=Ja,d.createLazyComponentFactory=zu,d.createLazyRoute=no,d.createLazyWalletProvider=lr,d.createLibraryImports=lu,d.createMemoComponent=xd,d.createOptimizedStyles=hn,d.createProgressiveComponent=ro,d.createSecurityFeatures=hs,d.createSelectiveExports=qn,d.createSelectiveMemoComponent=vd,d.createSemanticHeading=Xu,d.createSimpleStorage=mo,d.createTechnicalArticleSchema=dr,d.createTreeShakingConfig=Gn,d.createUIComponents=iu,d.createWeb3ProductSchema=cr,d.criticalPathOptimizer=Tu,d.cspDirectives=Xa,d.cssOptimization=vr,d.deadCodeElimination=we,d.default=og,d.defaultPerformanceBudget=Er,d.detectAvailableWallets=ir,d.detectWalletBrowser=Sr,d.exportPerformanceData=vo,d.formatFileSize=wo,d.generateAIMetaTags=xu,d.generateAIMetadata=eg,d.generateAIStructuredData=wu,d.generateAdvancedSEO=Yu,d.generateCSP=Za,d.generateConceptGraph=tg,d.generateContentRelationships=vu,d.generateEntityRecognition=an,d.generateImageSEO=$n,d.generatePerformanceTrackingSchema=Cu,d.generatePictureElement=Bn,d.generatePlaceholder=Hn,d.generateQAPairs=ag,d.generateSemanticMarkup=rn,d.generateSizes=Mn,d.generateSocialImageMeta=Dn,d.generateSrcSet=On,d.generateTopicClustering=nn,d.generateTrainingExamples=rg,d.getActiveNavItem=Zn,d.getConditionalStats=hu,d.getEnvironmentType=Ya,d.getLazyLoadingStats=au,d.getOptimalImageFormat=Wn,d.getPerformanceMonitor=Xe,d.getPreloadingStats=bu,d.getRenderCounts=Mu,d.getUINavigationService=J,d.getWebVitals=Fu,d.initializeAdvancedPreloading=yu,d.initializePerformanceMonitoring=po,d.initializePreloading=cu,d.inlineCriticalStyles=En,d.isLocalhost=Ga,d.isNetworkAccess=Ka,d.isWalletBrowser=qa,d.isWebEnvironment=Qa,d.lazyLoadQueue=io,d.lazyWithPreload=to,d.lazyWithRetry=eo,d.loadCSS=Ud,d.loadCriticalCSS=pn,d.loadNonCriticalCSS=yn,d.measureAsyncOperation=bo,d.measureImagePerformance=_n,d.navigationHelper=pe,d.navigationUtils=Rn,d.optimizeClassNames=Nn,d.optimizeContainment=kn,d.optimizeFlex=Tn,d.optimizeGrid=Pn,d.optimizeWillChange=Cn,d.optimizedFetch=Ua,d.pageSEOConfigs=Qu,d.parseFileSize=Co,d.performanceBudget=ce,d.performanceUtils=yt,d.prefersReducedMotion=pr,d.prefetchResource=_u,d.preloadComponent=su,d.preloadImage=jn,d.preloadResource=Hu,d.preloadRoute=Bu,d.preserveAspectRatio=Vn,d.priorityLoader=lo,d.reportWebVitals=ju,d.routeConfig=Ra,d.securityHeaders=Kd,d.setupCSPReporting=Qd,d.setupLazyLoading=zn,d.setupProgressiveLoading=Fn,d.shouldEnableWallet=Vd,d.smartLinkVariants=ht,d.supportsAVIF=br,d.supportsCSSImports=qd,d.supportsWebP=yr,d.themeStorage=uo,d.useClickOutside=Ar,d.useCodeLoader=Pr,d.useComponentPerformance=Nr,d.useCopyToClipboard=So,d.useDebugMemo=$u,d.useDynamicImport=oo,d.useImageLazyLoading=Wu,d.useLazyLoad=wr,d.useLazyStyles=An,d.useLocation=Qn,d.useMediaQuery=In,d.useMemoryLeakDetection=Vu,d.useMultipleCopyToClipboard=No,d.useNavigation=Yn,d.useOptimizedTheme=Ln,d.useOptimizedWallets=Au,d.usePerformanceMark=Iu,d.useReducedMotion=wn,d.useRenderCount=Ou,d.useResponsiveStyles=vn,d.useSearchParams=Xn,d.useSmartLinks=Ic,d.useStableCallback=Lu,d.utils=xr,d.validateHeadingStructure=Zu,d.walletStorage=go,d.web3SecurityNotes=Xd,d.withPerformanceTracking=yo,d.withRetry=Fd,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|