@pixonui/react 0.5.19 → 0.5.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var we=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),classVarianceAuthority=require('class-variance-authority'),reactDom=require('react-dom'),lucideReact=require('lucide-react'),socket_ioClient=require('socket.io-client');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var we__namespace=/*#__PURE__*/_interopNamespace(we);function l(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var Bi=we__namespace.default.forwardRef(({children:e,className:t,leftIcon:r,rightIcon:o,...n},a)=>jsxRuntime.jsxs("button",{ref:a,type:n.type??"button",className:l("group relative inline-flex items-center justify-center gap-2 rounded-2xl px-5 py-3","bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600","text-white font-semibold tracking-tight","shadow-[0_12px_40px_rgba(99,102,241,.45)]","transition-all duration-300","hover:scale-[1.03] hover:shadow-[0_18px_60px_rgba(99,102,241,.6)]","active:scale-[0.98]","disabled:opacity-50 disabled:cursor-not-allowed","focus:outline-none focus:ring-2 focus:ring-purple-400/40",t),...n,children:[jsxRuntime.jsx("span",{className:"pointer-events-none absolute inset-0 rounded-2xl bg-gradient-to-r from-white/18 via-white/5 to-white/18 opacity-0 blur-lg transition-opacity duration-300 group-hover:opacity-100"}),jsxRuntime.jsxs("span",{className:"relative inline-flex items-center gap-2",children:[r,e,o]})]}));Bi.displayName="PrimaryButton";var yt=we__namespace.forwardRef(({children:e,...t},r)=>{if(!we__namespace.isValidElement(e))return null;let o=e;return we__namespace.cloneElement(o,{...t,...o.props,ref:n=>{typeof r=="function"?r(n):r&&(r.current=n);let{ref:a}=o;typeof a=="function"?a(n):a&&"current"in a&&(a.current=n);},className:l(t.className,o.props.className)})});yt.displayName="Slot";var Ki=classVarianceAuthority.cva("group relative inline-flex items-center justify-center font-semibold tracking-tight transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-purple-400/40 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 disabled:active:scale-100 hover:scale-[1.02] active:scale-[0.98]",{variants:{variant:{primary:"bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600 text-white border-transparent",secondary:"bg-zinc-100 text-zinc-900 border border-zinc-200 hover:bg-zinc-200 dark:bg-white/[0.05] dark:text-white dark:border-white/10 dark:hover:bg-white/[0.10] dark:hover:border-white/20",outline:"bg-transparent text-zinc-900 border border-zinc-300 hover:bg-zinc-100 dark:text-white dark:border-white/20 dark:hover:bg-white/[0.05] dark:hover:border-white/30",ghost:"bg-transparent text-zinc-600 hover:text-zinc-900 hover:bg-zinc-100 dark:text-white/80 dark:hover:text-white dark:hover:bg-white/[0.05] border-transparent",danger:"bg-rose-500/10 text-rose-600 border border-rose-500/20 hover:bg-rose-500/20 hover:border-rose-500/30 hover:text-rose-700 dark:text-rose-400 dark:hover:text-rose-300",success:"bg-emerald-500/10 text-emerald-600 border border-emerald-500/20 hover:bg-emerald-500/20 hover:border-emerald-500/30 hover:text-emerald-700 dark:text-emerald-400 dark:hover:text-emerald-300",alert:"bg-amber-500/10 text-amber-600 border border-amber-500/20 hover:bg-amber-500/20 hover:border-amber-500/30 hover:text-amber-700 dark:text-amber-400 dark:hover:text-amber-300"},size:{sm:"h-9 px-3 text-xs gap-1.5",md:"h-11 px-5 text-sm gap-2",lg:"h-14 px-8 text-base gap-3",icon:"h-10 w-10 p-0 flex items-center justify-center"},shape:{default:"rounded-2xl",pill:"rounded-full",square:"rounded-lg"},shadow:{true:"",false:""}},compoundVariants:[{variant:"primary",shadow:true,class:"shadow-[0_12px_40px_rgba(99,102,241,.45)] hover:shadow-[0_18px_60px_rgba(99,102,241,.6)]"},{variant:"secondary",shadow:true,class:"shadow-sm"}],defaultVariants:{variant:"primary",size:"md",shape:"default",shadow:true}}),L=we__namespace.default.forwardRef(({className:e,variant:t,size:r,shape:o,shadow:n,asChild:a=false,leftIcon:s,rightIcon:i,isLoading:c,children:d,disabled:m,...u},p)=>jsxRuntime.jsxs(a?yt:"button",{ref:p,disabled:m||c,className:l(Ki({variant:t,size:r,shape:o,shadow:n,className:e})),...u,children:[t==="primary"&&!a&&jsxRuntime.jsx("span",{className:"pointer-events-none absolute inset-0 rounded-[inherit] bg-gradient-to-r from-white/18 via-white/5 to-white/18 opacity-0 blur-lg transition-opacity duration-300 group-hover:opacity-100"}),jsxRuntime.jsxs("span",{className:"relative inline-flex items-center justify-center",children:[c&&jsxRuntime.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-current",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),!c&&s&&jsxRuntime.jsx("span",{className:l("mr-2",r==="sm"&&"mr-1.5"),children:s}),d,!c&&i&&jsxRuntime.jsx("span",{className:l("ml-2",r==="sm"&&"ml-1.5"),children:i})]})]}));L.displayName="Button";var $i=we__namespace.default.forwardRef(({children:e,className:t,leftIcon:r,rightIcon:o,...n},a)=>{let s=we.useRef(null),i=c=>{let d=s.current;if(!d)return;let m=d.getBoundingClientRect(),u=c.clientX-m.left,p=c.clientY-m.top;d.style.setProperty("--mouse-x",`${u}px`),d.style.setProperty("--mouse-y",`${p}px`);};return we__namespace.default.useImperativeHandle(a,()=>s.current),jsxRuntime.jsxs("button",{ref:s,onMouseMove:i,type:n.type??"button",className:l("group relative inline-flex items-center justify-center gap-2 rounded-2xl px-6 py-3","bg-zinc-100 border border-zinc-200 text-zinc-900","dark:bg-white/[0.03] dark:border-white/10 dark:text-white","font-semibold tracking-tight overflow-hidden","transition-all duration-300","hover:bg-zinc-200 dark:hover:bg-white/[0.05] hover:scale-[1.02]","active:scale-[0.98]","focus:outline-none focus:ring-2 focus:ring-purple-400/40",t),...n,children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute -inset-px opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.4), transparent 40%)"}}),jsxRuntime.jsx("div",{className:"pointer-events-none absolute -inset-px rounded-2xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(300px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.6), transparent 40%)",maskImage:"linear-gradient(#fff, #fff), linear-gradient(#fff, #fff)",maskClip:"content-box, border-box",maskComposite:"exclude",WebkitMaskComposite:"xor",padding:"1px"}}),jsxRuntime.jsxs("span",{className:"relative inline-flex items-center gap-2 z-10",children:[r,e,o]})]})});$i.displayName="GlowButton";function Yi({accent:e="teal",children:t}){let r={teal:"bg-teal-500/90",amber:"bg-amber-400/95",violet:"bg-violet-500/90",blue:"bg-blue-500/90",rose:"bg-rose-500/90",emerald:"bg-emerald-500/90",indigo:"bg-indigo-500/90"};return jsxRuntime.jsx("div",{className:l("flex h-11 w-11 items-center justify-center rounded-2xl",r[e]??r.teal),children:t})}function _i({accent:e="teal"}){let t={teal:"from-teal-400/25 via-teal-400/10 to-transparent",amber:"from-amber-300/25 via-amber-300/10 to-transparent",violet:"from-violet-400/25 via-violet-400/10 to-transparent",blue:"from-blue-400/25 via-blue-400/10 to-transparent",rose:"from-rose-400/25 via-rose-400/10 to-transparent",emerald:"from-emerald-400/25 via-emerald-400/10 to-transparent",indigo:"from-indigo-400/25 via-indigo-400/10 to-transparent"};return jsxRuntime.jsx("div",{className:l("pointer-events-none absolute -right-12 top-1/2 h-40 w-48 -translate-y-1/2 rotate-12","bg-gradient-to-l blur-2xl",t[e]??t.teal)})}function Xi({color:e="currentColor"}){return jsxRuntime.jsx("svg",{viewBox:"0 0 120 40",className:"h-6 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"M2 22c10 0 10-10 20-10s10 10 20 10 10-10 20-10 10 10 20 10 10-10 20-10",stroke:e,strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",opacity:"0.95"})})}var qi=we__namespace.default.forwardRef(({accent:e="teal",icon:t,title:r,value:o,subtext:n,showWave:a=false,onClick:s,className:i,...c},d)=>{let m=we.useRef(null),u=()=>{let x=m.current;if(!x)return;let h=x.getBoundingClientRect();x.style.setProperty("--x",`${Math.round(h.width/2)}px`),x.style.setProperty("--y",`${Math.round(h.height/2)}px`);},p=x=>{let h=m.current;if(!h)return;let f=h.getBoundingClientRect();h.style.setProperty("--x",`${x.clientX-f.left}px`),h.style.setProperty("--y",`${x.clientY-f.top}px`);},g={teal:"rgba(45,212,191,.95)",amber:"rgba(251,191,36,.95)",violet:"rgba(167,139,250,.95)",blue:"rgba(96,165,250,.95)",rose:"rgba(251,113,133,.95)",emerald:"rgba(52,211,153,.95)",indigo:"rgba(129,140,248,.95)"},b=g[e]??g.teal;return jsxRuntime.jsxs("div",{ref:x=>{m.current=x,typeof d=="function"?d(x):d&&(d.current=x);},onMouseEnter:u,onMouseMove:p,onClick:s,className:l("group relative overflow-hidden rounded-2xl","bg-white border border-gray-200 shadow-sm","dark:bg-transparent dark:bg-gradient-to-b dark:from-white/[0.06] dark:to-white/[0.03]","dark:border-white/[0.10]","dark:shadow-[0_18px_55px_rgba(0,0,0,.55)]","transition-transform duration-300 hover:scale-[1.015]",s&&"cursor-pointer",i),...c,children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(180px at var(--x, 50%) var(--y, 50%), rgba(255,255,255,.16), transparent 60%)"}}),jsxRuntime.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(220px_140px_at_18%_18%,rgba(255,255,255,.08),transparent_60%)]"}),jsxRuntime.jsx(_i,{accent:e}),jsxRuntime.jsxs("div",{className:"relative p-5",children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between gap-4",children:[jsxRuntime.jsx(Yi,{accent:e,children:t}),r&&jsxRuntime.jsx("div",{className:"text-xs font-bold uppercase tracking-widest text-gray-500 dark:text-white/40",children:r})]}),jsxRuntime.jsxs("div",{className:"mt-4 flex items-end justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("div",{className:"truncate text-2xl font-semibold tracking-tight text-gray-900 dark:text-white",children:o}),n?jsxRuntime.jsx("div",{className:"mt-1 text-sm text-gray-500 dark:text-white/45",children:n}):null]}),a?jsxRuntime.jsx(Xi,{color:b}):null]})]})]})});qi.displayName="MetricCard";var Ji=classVarianceAuthority.cva("rounded-2xl backdrop-blur-xl transition-all duration-300 bg-white/90 border border-zinc-200/80 shadow-sm text-zinc-900 dark:bg-white/[0.03] dark:border-white/10 dark:shadow-[0_18px_55px_rgba(0,0,0,.45)] dark:text-white",{variants:{variant:{default:"",ghost:"bg-transparent border-transparent shadow-none"}},defaultVariants:{variant:"default"}}),ie=we__namespace.default.forwardRef(({className:e,variant:t,asChild:r=false,...o},n)=>jsxRuntime.jsx(r?yt:"div",{ref:n,className:l(Ji({variant:t,className:e})),...o}));ie.displayName="Surface";var Zi=we__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx(ie,{ref:r,className:e,...t}));Zi.displayName="Card";var el=we__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:l("flex flex-col space-y-1.5 p-6",e),...t}));el.displayName="CardHeader";var tl=we__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("h3",{ref:r,className:l("text-2xl font-semibold leading-none tracking-tight",e),...t}));tl.displayName="CardTitle";var rl=we__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("p",{ref:r,className:l("text-sm text-gray-500 dark:text-white/50",e),...t}));rl.displayName="CardDescription";var ol=we__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:l("p-6 pt-0",e),...t}));ol.displayName="CardContent";var al=we__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:l("flex items-center p-6 pt-0",e),...t}));al.displayName="CardFooter";var ve=we__namespace.default.forwardRef(({as:e="p",variant:t="default",size:r="base",weight:o="normal",code:n=false,className:a,children:s,...i},c)=>jsxRuntime.jsx(e,{ref:c,className:l("leading-relaxed transition-colors duration-200",n&&"font-mono bg-zinc-100 dark:bg-white/[0.03] px-1.5 py-0.5 rounded text-[0.9em]",{"text-zinc-900 dark:text-white":t==="default","text-zinc-500 dark:text-zinc-400":t==="muted","text-zinc-400 dark:text-zinc-500":t==="subtle","text-lg md:text-xl text-zinc-600 dark:text-zinc-300 font-light":t==="lead","text-rose-600 dark:text-rose-400":t==="error","text-emerald-600 dark:text-emerald-400":t==="success","text-amber-600 dark:text-amber-400":t==="warning","text-sky-600 dark:text-sky-400":t==="info","text-xs":r==="xs","text-sm":r==="sm","text-base":r==="base","text-lg":r==="lg","text-xl":r==="xl","text-2xl":r==="2xl","font-light":o==="light","font-normal":o==="normal","font-medium":o==="medium","font-semibold":o==="semibold","font-bold":o==="bold"},a),...i,children:s}));ve.displayName="Text";var Qe=we__namespace.default.forwardRef(({as:e="h2",weight:t="bold",className:r,children:o,...n},a)=>jsxRuntime.jsx(e,{ref:a,className:l("tracking-tight text-zinc-900 dark:text-white transition-colors duration-200",{"text-4xl md:text-5xl lg:text-6xl":e==="h1","text-3xl md:text-4xl":e==="h2","text-2xl md:text-3xl":e==="h3","text-xl md:text-2xl":e==="h4","text-lg md:text-xl":e==="h5","text-base md:text-lg":e==="h6"},{"font-normal":t==="normal","font-medium":t==="medium","font-semibold":t==="semibold","font-bold":t==="bold","font-extrabold":t==="extrabold","font-black":t==="black"},r),...n,children:o}));Qe.displayName="Heading";var dl=we__namespace.default.forwardRef(({from:e="from-blue-500",to:t="to-purple-500",via:r,direction:o="r",animate:n=false,className:a,children:s,...i},c)=>jsxRuntime.jsx("span",{ref:c,className:l("bg-clip-text text-transparent bg-gradient-to-"+o,e,t,r,n&&"animate-gradient bg-[length:200%_auto]",a),...i,children:s}));dl.displayName="TextGradient";var pl=we__namespace.default.forwardRef(({shimmerColor:e="rgba(255,255,255,0.3)",duration:t="2s",baseColor:r="currentColor",className:o,children:n,...a},s)=>jsxRuntime.jsx("span",{ref:s,className:l("inline-block bg-clip-text text-transparent animate-shimmer will-change-[background-position]",o),style:{backgroundImage:`linear-gradient(90deg, ${r} 0%, ${r} 40%, ${e} 50%, ${r} 60%, ${r} 100%)`,backgroundSize:"200% 100%",animationDuration:t,animationIterationCount:"infinite",animationTimingFunction:"linear"},...a,children:n}));pl.displayName="ShinyText";function $e(e={threshold:.1,rootMargin:"0px",enabled:true}){let t=we.useRef(null),[r,o]=we.useState(false),[n,a]=we.useState(false),{enabled:s=true}=e;return we.useEffect(()=>{if(!s)return;let i=t.current;if(!i)return;let c=new IntersectionObserver(([d])=>{d&&d.isIntersecting?(o(true),a(true)):o(false);},e);return c.observe(i),()=>{c.disconnect();}},[e.threshold,e.rootMargin,e.root,s]),{ref:t,isInView:r,hasAnimated:n}}function en({children:e,direction:t="up",duration:r=.5,delay:o=0,boxColor:n="bg-blue-500",className:a,...s}){let{ref:i,hasAnimated:c}=$e({threshold:.2}),d={up:"translate-y-full",down:"-translate-y-full",left:"translate-x-full",right:"-translate-x-full"};return jsxRuntime.jsxs("div",{ref:i,className:l("relative overflow-hidden inline-block",a),...s,children:[jsxRuntime.jsx("div",{className:l("transition-all ease-out",c?"translate-x-0 translate-y-0 opacity-100":l("opacity-0",d[t])),style:{transitionDuration:`${r}s`,transitionDelay:`${o}s`},children:e}),jsxRuntime.jsx("div",{className:l("absolute inset-0 z-10 transition-transform ease-in-out",n,c?t==="left"||t==="right"?"scale-x-0":"scale-y-0":"scale-100"),style:{transitionDuration:`${r}s`,transitionDelay:`${o}s`,transformOrigin:t==="up"?"top":t==="down"?"bottom":t==="left"?"left":"right"}})]})}var xl=({title:e,highlight:t,subtitle:r,gradient:o="from-blue-400 via-indigo-500 to-purple-600",animate:n=true,glow:a=true,className:s,...i})=>{let c=jsxRuntime.jsxs("div",{className:l("flex flex-col items-center text-center space-y-6",s),...i,children:[jsxRuntime.jsxs("h1",{className:"text-5xl md:text-7xl font-bold tracking-tight text-white leading-tight",children:[e," ",t&&jsxRuntime.jsxs("span",{className:"relative inline-block",children:[jsxRuntime.jsx("span",{className:l("bg-clip-text text-transparent bg-gradient-to-r",o),children:t}),a&&jsxRuntime.jsx("span",{className:l("absolute inset-0 blur-3xl opacity-40 -z-10 bg-gradient-to-r",o),"aria-hidden":"true",children:t})]})]}),r&&jsxRuntime.jsx("p",{className:"text-lg md:text-xl text-white/50 max-w-2xl mx-auto leading-relaxed",children:r})]});return n?jsxRuntime.jsx(en,{direction:"up",duration:1,children:c}):c};xl.displayName="HeroText";var vl=({text:e,delay:t=.05,className:r,...o})=>{let n=e.split("");return jsxRuntime.jsxs("div",{className:l("flex flex-wrap justify-center overflow-hidden py-2",r),...o,children:[n.map((a,s)=>jsxRuntime.jsx("span",{className:"inline-block animate-pullup opacity-0",style:{animation:"pullup 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards",animationDelay:`${s*t}s`,whiteSpace:a===" "?"pre":"normal"},children:a},s)),jsxRuntime.jsx("style",{children:`
|
|
1
|
+
'use strict';var ye=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),classVarianceAuthority=require('class-variance-authority'),reactDom=require('react-dom'),lucideReact=require('lucide-react'),socket_ioClient=require('socket.io-client');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var ye__namespace=/*#__PURE__*/_interopNamespace(ye);function l(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var zi=ye__namespace.default.forwardRef(({children:e,className:t,leftIcon:r,rightIcon:o,...n},a)=>jsxRuntime.jsxs("button",{ref:a,type:n.type??"button",className:l("group relative inline-flex items-center justify-center gap-2 rounded-2xl px-5 py-3","bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600","text-white font-semibold tracking-tight","shadow-[0_12px_40px_rgba(99,102,241,.45)]","transition-all duration-300","hover:scale-[1.03] hover:shadow-[0_18px_60px_rgba(99,102,241,.6)]","active:scale-[0.98]","disabled:opacity-50 disabled:cursor-not-allowed","focus:outline-none focus:ring-2 focus:ring-purple-400/40",t),...n,children:[jsxRuntime.jsx("span",{className:"pointer-events-none absolute inset-0 rounded-2xl bg-gradient-to-r from-white/18 via-white/5 to-white/18 opacity-0 blur-lg transition-opacity duration-300 group-hover:opacity-100"}),jsxRuntime.jsxs("span",{className:"relative inline-flex items-center gap-2",children:[r,e,o]})]}));zi.displayName="PrimaryButton";var yt=ye__namespace.forwardRef(({children:e,...t},r)=>{if(!ye__namespace.isValidElement(e))return null;let o=e;return ye__namespace.cloneElement(o,{...t,...o.props,ref:n=>{typeof r=="function"?r(n):r&&(r.current=n);let{ref:a}=o;typeof a=="function"?a(n):a&&"current"in a&&(a.current=n);},className:l(t.className,o.props.className)})});yt.displayName="Slot";var Ui=classVarianceAuthority.cva("group relative inline-flex items-center justify-center font-semibold tracking-tight transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-purple-400/40 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 disabled:active:scale-100 hover:scale-[1.02] active:scale-[0.98]",{variants:{variant:{primary:"bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600 text-white border-transparent",secondary:"bg-zinc-100 text-zinc-900 border border-zinc-200 hover:bg-zinc-200 dark:bg-white/[0.05] dark:text-white dark:border-white/10 dark:hover:bg-white/[0.10] dark:hover:border-white/20",outline:"bg-transparent text-zinc-900 border border-zinc-300 hover:bg-zinc-100 dark:text-white dark:border-white/20 dark:hover:bg-white/[0.05] dark:hover:border-white/30",ghost:"bg-transparent text-zinc-600 hover:text-zinc-900 hover:bg-zinc-100 dark:text-white/80 dark:hover:text-white dark:hover:bg-white/[0.05] border-transparent",danger:"bg-rose-500/10 text-rose-600 border border-rose-500/20 hover:bg-rose-500/20 hover:border-rose-500/30 hover:text-rose-700 dark:text-rose-400 dark:hover:text-rose-300",success:"bg-emerald-500/10 text-emerald-600 border border-emerald-500/20 hover:bg-emerald-500/20 hover:border-emerald-500/30 hover:text-emerald-700 dark:text-emerald-400 dark:hover:text-emerald-300",alert:"bg-amber-500/10 text-amber-600 border border-amber-500/20 hover:bg-amber-500/20 hover:border-amber-500/30 hover:text-amber-700 dark:text-amber-400 dark:hover:text-amber-300"},size:{sm:"h-9 px-3 text-xs gap-1.5",md:"h-11 px-5 text-sm gap-2",lg:"h-14 px-8 text-base gap-3",icon:"h-10 w-10 p-0 flex items-center justify-center"},shape:{default:"rounded-2xl",pill:"rounded-full",square:"rounded-lg"},shadow:{true:"",false:""}},compoundVariants:[{variant:"primary",shadow:true,class:"shadow-[0_12px_40px_rgba(99,102,241,.45)] hover:shadow-[0_18px_60px_rgba(99,102,241,.6)]"},{variant:"secondary",shadow:true,class:"shadow-sm"}],defaultVariants:{variant:"primary",size:"md",shape:"default",shadow:true}}),L=ye__namespace.default.forwardRef(({className:e,variant:t,size:r,shape:o,shadow:n,asChild:a=false,leftIcon:s,rightIcon:i,isLoading:c,children:d,disabled:m,...u},p)=>jsxRuntime.jsxs(a?yt:"button",{ref:p,disabled:m||c,className:l(Ui({variant:t,size:r,shape:o,shadow:n,className:e})),...u,children:[t==="primary"&&!a&&jsxRuntime.jsx("span",{className:"pointer-events-none absolute inset-0 rounded-[inherit] bg-gradient-to-r from-white/18 via-white/5 to-white/18 opacity-0 blur-lg transition-opacity duration-300 group-hover:opacity-100"}),jsxRuntime.jsxs("span",{className:"relative inline-flex items-center justify-center",children:[c&&jsxRuntime.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-current",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),!c&&s&&jsxRuntime.jsx("span",{className:l("mr-2",r==="sm"&&"mr-1.5"),children:s}),d,!c&&i&&jsxRuntime.jsx("span",{className:l("ml-2",r==="sm"&&"ml-1.5"),children:i})]})]}));L.displayName="Button";var _i=ye__namespace.default.forwardRef(({children:e,className:t,leftIcon:r,rightIcon:o,...n},a)=>{let s=ye.useRef(null),i=c=>{let d=s.current;if(!d)return;let m=d.getBoundingClientRect(),u=c.clientX-m.left,p=c.clientY-m.top;d.style.setProperty("--mouse-x",`${u}px`),d.style.setProperty("--mouse-y",`${p}px`);};return ye__namespace.default.useImperativeHandle(a,()=>s.current),jsxRuntime.jsxs("button",{ref:s,onMouseMove:i,type:n.type??"button",className:l("group relative inline-flex items-center justify-center gap-2 rounded-2xl px-6 py-3","bg-zinc-100 border border-zinc-200 text-zinc-900","dark:bg-white/[0.03] dark:border-white/10 dark:text-white","font-semibold tracking-tight overflow-hidden","transition-all duration-300","hover:bg-zinc-200 dark:hover:bg-white/[0.05] hover:scale-[1.02]","active:scale-[0.98]","focus:outline-none focus:ring-2 focus:ring-purple-400/40",t),...n,children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute -inset-px opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.4), transparent 40%)"}}),jsxRuntime.jsx("div",{className:"pointer-events-none absolute -inset-px rounded-2xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(300px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.6), transparent 40%)",maskImage:"linear-gradient(#fff, #fff), linear-gradient(#fff, #fff)",maskClip:"content-box, border-box",maskComposite:"exclude",WebkitMaskComposite:"xor",padding:"1px"}}),jsxRuntime.jsxs("span",{className:"relative inline-flex items-center gap-2 z-10",children:[r,e,o]})]})});_i.displayName="GlowButton";function qi({accent:e="teal",children:t}){let r={teal:"bg-teal-500/90",amber:"bg-amber-400/95",violet:"bg-violet-500/90",blue:"bg-blue-500/90",rose:"bg-rose-500/90",emerald:"bg-emerald-500/90",indigo:"bg-indigo-500/90"};return jsxRuntime.jsx("div",{className:l("flex h-11 w-11 items-center justify-center rounded-2xl",r[e]??r.teal),children:t})}function ji({accent:e="teal"}){let t={teal:"from-teal-400/25 via-teal-400/10 to-transparent",amber:"from-amber-300/25 via-amber-300/10 to-transparent",violet:"from-violet-400/25 via-violet-400/10 to-transparent",blue:"from-blue-400/25 via-blue-400/10 to-transparent",rose:"from-rose-400/25 via-rose-400/10 to-transparent",emerald:"from-emerald-400/25 via-emerald-400/10 to-transparent",indigo:"from-indigo-400/25 via-indigo-400/10 to-transparent"};return jsxRuntime.jsx("div",{className:l("pointer-events-none absolute -right-12 top-1/2 h-40 w-48 -translate-y-1/2 rotate-12","bg-gradient-to-l blur-2xl",t[e]??t.teal)})}function Gi({color:e="currentColor"}){return jsxRuntime.jsx("svg",{viewBox:"0 0 120 40",className:"h-6 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"M2 22c10 0 10-10 20-10s10 10 20 10 10-10 20-10 10 10 20 10 10-10 20-10",stroke:e,strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",opacity:"0.95"})})}var Ji=ye__namespace.default.forwardRef(({accent:e="teal",icon:t,title:r,value:o,subtext:n,showWave:a=false,onClick:s,className:i,...c},d)=>{let m=ye.useRef(null),u=()=>{let x=m.current;if(!x)return;let h=x.getBoundingClientRect();x.style.setProperty("--x",`${Math.round(h.width/2)}px`),x.style.setProperty("--y",`${Math.round(h.height/2)}px`);},p=x=>{let h=m.current;if(!h)return;let f=h.getBoundingClientRect();h.style.setProperty("--x",`${x.clientX-f.left}px`),h.style.setProperty("--y",`${x.clientY-f.top}px`);},g={teal:"rgba(45,212,191,.95)",amber:"rgba(251,191,36,.95)",violet:"rgba(167,139,250,.95)",blue:"rgba(96,165,250,.95)",rose:"rgba(251,113,133,.95)",emerald:"rgba(52,211,153,.95)",indigo:"rgba(129,140,248,.95)"},b=g[e]??g.teal;return jsxRuntime.jsxs("div",{ref:x=>{m.current=x,typeof d=="function"?d(x):d&&(d.current=x);},onMouseEnter:u,onMouseMove:p,onClick:s,className:l("group relative overflow-hidden rounded-2xl","bg-white border border-gray-200 shadow-sm","dark:bg-transparent dark:bg-gradient-to-b dark:from-white/[0.06] dark:to-white/[0.03]","dark:border-white/[0.10]","dark:shadow-[0_18px_55px_rgba(0,0,0,.55)]","transition-transform duration-300 hover:scale-[1.015]",s&&"cursor-pointer",i),...c,children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute inset-0 opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(180px at var(--x, 50%) var(--y, 50%), rgba(255,255,255,.16), transparent 60%)"}}),jsxRuntime.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(220px_140px_at_18%_18%,rgba(255,255,255,.08),transparent_60%)]"}),jsxRuntime.jsx(ji,{accent:e}),jsxRuntime.jsxs("div",{className:"relative p-5",children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between gap-4",children:[jsxRuntime.jsx(qi,{accent:e,children:t}),r&&jsxRuntime.jsx("div",{className:"text-xs font-bold uppercase tracking-widest text-gray-500 dark:text-white/40",children:r})]}),jsxRuntime.jsxs("div",{className:"mt-4 flex items-end justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("div",{className:"truncate text-2xl font-semibold tracking-tight text-gray-900 dark:text-white",children:o}),n?jsxRuntime.jsx("div",{className:"mt-1 text-sm text-gray-500 dark:text-white/45",children:n}):null]}),a?jsxRuntime.jsx(Gi,{color:b}):null]})]})]})});Ji.displayName="MetricCard";var el=classVarianceAuthority.cva("rounded-2xl backdrop-blur-xl transition-all duration-300 bg-white/90 border border-zinc-200/80 shadow-sm text-zinc-900 dark:bg-white/[0.03] dark:border-white/10 dark:shadow-[0_18px_55px_rgba(0,0,0,.45)] dark:text-white",{variants:{variant:{default:"",ghost:"bg-transparent border-transparent shadow-none"}},defaultVariants:{variant:"default"}}),ie=ye__namespace.default.forwardRef(({className:e,variant:t,asChild:r=false,...o},n)=>jsxRuntime.jsx(r?yt:"div",{ref:n,className:l(el({variant:t,className:e})),...o}));ie.displayName="Surface";var rl=ye__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx(ie,{ref:r,className:e,...t}));rl.displayName="Card";var ol=ye__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:l("flex flex-col space-y-1.5 p-6",e),...t}));ol.displayName="CardHeader";var al=ye__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("h3",{ref:r,className:l("text-2xl font-semibold leading-none tracking-tight",e),...t}));al.displayName="CardTitle";var nl=ye__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("p",{ref:r,className:l("text-sm text-gray-500 dark:text-white/50",e),...t}));nl.displayName="CardDescription";var sl=ye__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:l("p-6 pt-0",e),...t}));sl.displayName="CardContent";var il=ye__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:l("flex items-center p-6 pt-0",e),...t}));il.displayName="CardFooter";var we=ye__namespace.default.forwardRef(({as:e="p",variant:t="default",size:r="base",weight:o="normal",code:n=false,className:a,children:s,...i},c)=>jsxRuntime.jsx(e,{ref:c,className:l("leading-relaxed transition-colors duration-200",n&&"font-mono bg-zinc-100 dark:bg-white/[0.03] px-1.5 py-0.5 rounded text-[0.9em]",{"text-zinc-900 dark:text-white":t==="default","text-zinc-500 dark:text-zinc-400":t==="muted","text-zinc-400 dark:text-zinc-500":t==="subtle","text-lg md:text-xl text-zinc-600 dark:text-zinc-300 font-light":t==="lead","text-rose-600 dark:text-rose-400":t==="error","text-emerald-600 dark:text-emerald-400":t==="success","text-amber-600 dark:text-amber-400":t==="warning","text-sky-600 dark:text-sky-400":t==="info","text-xs":r==="xs","text-sm":r==="sm","text-base":r==="base","text-lg":r==="lg","text-xl":r==="xl","text-2xl":r==="2xl","font-light":o==="light","font-normal":o==="normal","font-medium":o==="medium","font-semibold":o==="semibold","font-bold":o==="bold"},a),...i,children:s}));we.displayName="Text";var Qe=ye__namespace.default.forwardRef(({as:e="h2",weight:t="bold",className:r,children:o,...n},a)=>jsxRuntime.jsx(e,{ref:a,className:l("tracking-tight text-zinc-900 dark:text-white transition-colors duration-200",{"text-4xl md:text-5xl lg:text-6xl":e==="h1","text-3xl md:text-4xl":e==="h2","text-2xl md:text-3xl":e==="h3","text-xl md:text-2xl":e==="h4","text-lg md:text-xl":e==="h5","text-base md:text-lg":e==="h6"},{"font-normal":t==="normal","font-medium":t==="medium","font-semibold":t==="semibold","font-bold":t==="bold","font-extrabold":t==="extrabold","font-black":t==="black"},r),...n,children:o}));Qe.displayName="Heading";var pl=ye__namespace.default.forwardRef(({from:e="from-blue-500",to:t="to-purple-500",via:r,direction:o="r",animate:n=false,className:a,children:s,...i},c)=>jsxRuntime.jsx("span",{ref:c,className:l("bg-clip-text text-transparent bg-gradient-to-"+o,e,t,r,n&&"animate-gradient bg-[length:200%_auto]",a),...i,children:s}));pl.displayName="TextGradient";var hl=ye__namespace.default.forwardRef(({shimmerColor:e="rgba(255,255,255,0.3)",duration:t="2s",baseColor:r="currentColor",className:o,children:n,...a},s)=>jsxRuntime.jsx("span",{ref:s,className:l("inline-block bg-clip-text text-transparent animate-shimmer will-change-[background-position]",o),style:{backgroundImage:`linear-gradient(90deg, ${r} 0%, ${r} 40%, ${e} 50%, ${r} 60%, ${r} 100%)`,backgroundSize:"200% 100%",animationDuration:t,animationIterationCount:"infinite",animationTimingFunction:"linear"},...a,children:n}));hl.displayName="ShinyText";function $e(e={threshold:.1,rootMargin:"0px",enabled:true}){let t=ye.useRef(null),[r,o]=ye.useState(false),[n,a]=ye.useState(false),{enabled:s=true}=e;return ye.useEffect(()=>{if(!s)return;let i=t.current;if(!i)return;let c=new IntersectionObserver(([d])=>{d&&d.isIntersecting?(o(true),a(true)):o(false);},e);return c.observe(i),()=>{c.disconnect();}},[e.threshold,e.rootMargin,e.root,s]),{ref:t,isInView:r,hasAnimated:n}}function en({children:e,direction:t="up",duration:r=.5,delay:o=0,boxColor:n="bg-blue-500",className:a,...s}){let{ref:i,hasAnimated:c}=$e({threshold:.2}),d={up:"translate-y-full",down:"-translate-y-full",left:"translate-x-full",right:"-translate-x-full"};return jsxRuntime.jsxs("div",{ref:i,className:l("relative overflow-hidden inline-block",a),...s,children:[jsxRuntime.jsx("div",{className:l("transition-all ease-out",c?"translate-x-0 translate-y-0 opacity-100":l("opacity-0",d[t])),style:{transitionDuration:`${r}s`,transitionDelay:`${o}s`},children:e}),jsxRuntime.jsx("div",{className:l("absolute inset-0 z-10 transition-transform ease-in-out",n,c?t==="left"||t==="right"?"scale-x-0":"scale-y-0":"scale-100"),style:{transitionDuration:`${r}s`,transitionDelay:`${o}s`,transformOrigin:t==="up"?"top":t==="down"?"bottom":t==="left"?"left":"right"}})]})}var yl=({title:e,highlight:t,subtitle:r,gradient:o="from-blue-400 via-indigo-500 to-purple-600",animate:n=true,glow:a=true,className:s,...i})=>{let c=jsxRuntime.jsxs("div",{className:l("flex flex-col items-center text-center space-y-6",s),...i,children:[jsxRuntime.jsxs("h1",{className:"text-5xl md:text-7xl font-bold tracking-tight text-white leading-tight",children:[e," ",t&&jsxRuntime.jsxs("span",{className:"relative inline-block",children:[jsxRuntime.jsx("span",{className:l("bg-clip-text text-transparent bg-gradient-to-r",o),children:t}),a&&jsxRuntime.jsx("span",{className:l("absolute inset-0 blur-3xl opacity-40 -z-10 bg-gradient-to-r",o),"aria-hidden":"true",children:t})]})]}),r&&jsxRuntime.jsx("p",{className:"text-lg md:text-xl text-white/50 max-w-2xl mx-auto leading-relaxed",children:r})]});return n?jsxRuntime.jsx(en,{direction:"up",duration:1,children:c}):c};yl.displayName="HeroText";var kl=({text:e,delay:t=.05,className:r,...o})=>{let n=e.split("");return jsxRuntime.jsxs("div",{className:l("flex flex-wrap justify-center overflow-hidden py-2",r),...o,children:[n.map((a,s)=>jsxRuntime.jsx("span",{className:"inline-block animate-pullup opacity-0",style:{animation:"pullup 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards",animationDelay:`${s*t}s`,whiteSpace:a===" "?"pre":"normal"},children:a},s)),jsxRuntime.jsx("style",{children:`
|
|
2
2
|
@keyframes pullup {
|
|
3
3
|
from {
|
|
4
4
|
opacity: 0;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
transform: translateY(0);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
`})]})};vl.displayName="LetterPullup";var X=we__namespace.default.forwardRef(({className:e,children:t,required:r,...o},n)=>jsxRuntime.jsxs("label",{ref:n,className:l("text-sm font-medium leading-none text-gray-700 dark:text-white/80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...o,children:[t,r&&jsxRuntime.jsx("span",{className:"ml-1 text-rose-500",children:"*"})]}));X.displayName="Label";var Cl=classVarianceAuthority.cva("w-full rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-3 border border-gray-200 dark:border-white/[0.10] text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-white/30 focus:outline-none focus:ring-2 focus:ring-purple-400/30 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-200",{variants:{hasError:{true:"border-rose-400/25 focus:ring-rose-300/25",false:""},hasLeftIcon:{true:"pl-10",false:""},hasRightIcon:{true:"pr-10",false:""}},defaultVariants:{hasError:false,hasLeftIcon:false,hasRightIcon:false}}),kt=we__namespace.default.forwardRef(({className:e,containerClassName:t,label:r,error:o,leftIcon:n,rightIcon:a,id:s,...i},c)=>{let d=s||we__namespace.default.useId(),m=!!o;return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",t),children:[r&&jsxRuntime.jsx(X,{htmlFor:d,required:i.required,children:r}),jsxRuntime.jsxs("div",{className:"relative flex items-center",children:[n&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 dark:text-white/35",children:n}),jsxRuntime.jsx("input",{ref:c,id:d,className:l(Cl({hasError:m,hasLeftIcon:!!n,hasRightIcon:!!a,className:e})),...i}),a&&jsxRuntime.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2",children:a})]}),o&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:o})]})});kt.displayName="TextInput";var Po=we__namespace.default.forwardRef(({className:e,label:t,error:r,id:o,disabled:n,checked:a,defaultChecked:s,onChange:i,...c},d)=>{let m=o||we__namespace.default.useId(),[u,p]=we__namespace.default.useState(s||a||false);we__namespace.default.useEffect(()=>{a!==void 0&&p(a);},[a]);let g=()=>{if(n)return;let b=!u;p(b),i&&i({target:{checked:b}});};return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",e),children:[jsxRuntime.jsxs("button",{ref:d,type:"button",id:m,role:"checkbox","aria-checked":u,"aria-label":t,onClick:g,disabled:n,className:l("flex items-center gap-3 rounded-2xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.03] px-4 py-3","hover:bg-gray-100 dark:hover:bg-white/[0.04] transition-colors",n&&"opacity-50 cursor-not-allowed"),...c,children:[jsxRuntime.jsx("span",{"aria-hidden":"true",className:l("grid h-6 w-6 place-items-center rounded-lg border",u?"border-emerald-400/30 bg-emerald-400/15":"border-gray-300 dark:border-white/10 bg-white dark:bg-white/[0.02]"),children:u?jsxRuntime.jsx("svg",{className:"h-4 w-4 text-emerald-200",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}):null}),t&&jsxRuntime.jsx("span",{className:"text-sm text-gray-700 dark:text-white/70",children:t})]}),r&&jsxRuntime.jsx("p",{className:"text-xs text-rose-500 mt-1 ml-1",children:r})]})});Po.displayName="Checkbox";var Eo=we__namespace.default.forwardRef(({className:e,label:t,error:r,id:o,disabled:n,checked:a,defaultChecked:s,onChange:i,...c},d)=>{let m=o||we__namespace.default.useId(),[u,p]=we__namespace.default.useState(s||a||false);we__namespace.default.useEffect(()=>{a!==void 0&&p(a);},[a]);let g=()=>{if(n)return;let b=!u;p(b),i&&i({target:{checked:b}});};return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",e),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("button",{type:"button",id:m,role:"switch","aria-checked":u,onClick:g,disabled:n,className:l("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 dark:focus-visible:ring-offset-black disabled:cursor-not-allowed disabled:opacity-50",u?"bg-emerald-500":"bg-gray-200 dark:bg-white/[0.06]"),...c,children:jsxRuntime.jsx("span",{className:l("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform",u?"translate-x-5":"translate-x-0")})}),t&&jsxRuntime.jsx(X,{htmlFor:m,className:"cursor-pointer select-none text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",onClick:g,children:t})]}),r&&jsxRuntime.jsx("p",{className:"text-xs text-rose-500 mt-1 ml-1",children:r})]})});Eo.displayName="Switch";var _r=we__namespace.default.forwardRef(({label:e,name:t,options:r,value:o,defaultValue:n,onChange:a,placeholder:s="Select an option",error:i,disabled:c,className:d},m)=>{let[u,p]=we.useState(false),[g,b]=we.useState(n),[x,h]=we.useState(-1),f=we.useRef(null),w=we__namespace.default.useId(),v=o!==void 0,y=v?o:g,k=r.find(T=>T.value===y);we.useEffect(()=>{if(u){let T=r.findIndex(E=>E.value===y);h(T!==-1?T:0);}else h(-1);},[u,y,r]),we.useEffect(()=>{let T=E=>{f.current&&!f.current.contains(E.target)&&p(false);};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);let N=T=>{c||(v||b(T),a?.(T),p(false));},C=T=>{c||(T.key==="Enter"||T.key===" "?(T.preventDefault(),u&&x!==-1?N(r[x].value):p(true)):T.key==="Escape"?p(false):T.key==="ArrowDown"?(T.preventDefault(),u?h(E=>(E+1)%r.length):p(true)):T.key==="ArrowUp"?(T.preventDefault(),u?h(E=>(E-1+r.length)%r.length):p(true)):T.key==="Home"?(T.preventDefault(),u&&h(0)):T.key==="End"&&(T.preventDefault(),u&&h(r.length-1)));};return jsxRuntime.jsxs("div",{ref:f,className:l("flex flex-col gap-1.5 relative",d),children:[e&&jsxRuntime.jsx(X,{htmlFor:w,className:l(c&&"opacity-50 cursor-not-allowed"),children:e}),jsxRuntime.jsxs("div",{ref:m,id:w,role:"combobox","aria-expanded":u,"aria-haspopup":"listbox","aria-controls":`${w}-listbox`,"aria-disabled":c,tabIndex:c?-1:0,onClick:()=>!c&&p(!u),onKeyDown:C,className:l("w-full appearance-none rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-3","border border-gray-200 dark:border-white/[0.10]","text-gray-900 dark:text-white flex items-center","focus:outline-none focus:ring-2 focus:ring-purple-400/30","hover:bg-gray-100 dark:hover:bg-white/[0.05] cursor-pointer",c&&"cursor-not-allowed opacity-50 hover:bg-gray-50 dark:hover:bg-white/[0.04]",u&&"border-gray-300 dark:border-white/20 ring-2 ring-purple-400/20",i&&"border-rose-400/25 focus:ring-rose-300/25"),children:[jsxRuntime.jsx("span",{className:l("block truncate",!k&&"text-gray-400 dark:text-white/20"),children:k?k.label:s}),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:l("absolute right-4 top-1/2 -translate-y-1/2 text-gray-400 dark:text-white/40 transition-transform duration-200",u&&"rotate-180"),children:jsxRuntime.jsx("path",{d:"m6 9 6 6 6-6"})})]}),u&&jsxRuntime.jsx("div",{className:"absolute top-full left-0 z-[110] mt-1 w-full overflow-hidden rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A] p-1 shadow-xl animate-in fade-in zoom-in-95 duration-100",children:jsxRuntime.jsx("ul",{id:`${w}-listbox`,role:"listbox","aria-activedescendant":x!==-1?`${w}-option-${x}`:void 0,className:"max-h-60 overflow-auto p-1 flex flex-col gap-2",children:r.map((T,E)=>jsxRuntime.jsx("li",{id:`${w}-option-${E}`,role:"option","aria-selected":y===T.value,onClick:()=>N(T.value),onMouseEnter:()=>h(E),className:l("w-full rounded-2xl px-3 py-2 text-left text-sm transition-colors cursor-pointer","hover:bg-gray-100 dark:hover:bg-white/[0.06] hover:text-gray-900 dark:hover:text-white",y===T.value||x===E?"bg-gray-100 dark:bg-white/[0.06] text-gray-900 dark:text-white/90":"text-gray-700 dark:text-white/80"),children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxRuntime.jsx("span",{className:"flex-1 truncate",children:T.label}),y===T.value&&jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-900 dark:text-white",children:jsxRuntime.jsx("polyline",{points:"20 6 9 17 4 12"})})]})},T.value))})}),i&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:i}),jsxRuntime.jsx("input",{type:"hidden",name:t,value:y||""})]})});_r.displayName="Select";function Kt(e,t,r={}){let{side:o="bottom",align:n="center",sideOffset:a=4,alignOffset:s=0,isOpen:i=false}=r,[c,d]=we.useState({top:0,left:0}),[m,u]=we.useState(false),p=we.useCallback(()=>{if(!e.current||!t.current||!i)return;let g=e.current.getBoundingClientRect(),b=t.current.getBoundingClientRect(),x=0,h=0;switch(o){case "top":x=g.top-b.height-a;break;case "bottom":x=g.bottom+a;break;case "left":h=g.left-b.width-a;break;case "right":h=g.right+a;break}if(o==="top"||o==="bottom")switch(n){case "start":h=g.left+s;break;case "center":h=g.left+g.width/2-b.width/2+s;break;case "end":h=g.right-b.width+s;break}else switch(n){case "start":x=g.top+s;break;case "center":x=g.top+g.height/2-b.height/2+s;break;case "end":x=g.bottom-b.height+s;break}let f=8,w=window.innerWidth,v=window.innerHeight;h<f&&(h=f),h+b.width>w-f&&(h=w-b.width-f),x<f&&(x=f),x+b.height>v-f&&(x=v-b.height-f),d({top:x,left:h}),u(true);},[e,t,o,n,a,s,i]);return we.useLayoutEffect(()=>{if(!i){m&&u(false);return}p();let g=new ResizeObserver(()=>p());return e.current&&g.observe(e.current),t.current&&g.observe(t.current),window.addEventListener("resize",p),window.addEventListener("scroll",p,true),()=>{g.disconnect(),window.removeEventListener("resize",p),window.removeEventListener("scroll",p,true);}},[i,p,e,t]),{position:c,isPositioned:m,updatePosition:p}}var Ho=we.createContext(void 0);function Ze({children:e,open:t,onOpenChange:r}){let[o,n]=we.useState(false),a=we.useRef(null),s=t!==void 0,i=s?t:o,c=d=>{s||n(d),r?.(d);};return jsxRuntime.jsx(Ho.Provider,{value:{isOpen:i,setIsOpen:c,triggerRef:a},children:jsxRuntime.jsx("div",{className:"relative inline-block",children:e})})}function et({className:e,children:t,...r}){let o=we.useContext(Ho);if(!o)throw new Error("PopoverTrigger must be used within Popover");let n=a=>{o.setIsOpen(!o.isOpen),r.onClick?.(a);};return jsxRuntime.jsx("button",{ref:o.triggerRef,type:"button","aria-haspopup":"dialog","aria-expanded":o.isOpen?"true":"false",onClick:n,className:l("inline-flex items-center justify-center",e),...r,children:t})}function tt({className:e,children:t,align:r="center",sideOffset:o=4,...n}){let a=we.useContext(Ho);if(!a)throw new Error("PopoverContent must be used within Popover");let s=we.useRef(null),{position:i,isPositioned:c}=Kt(a.triggerRef,s,{side:"bottom",align:r,sideOffset:o,isOpen:a.isOpen});if(we.useEffect(()=>{if(a.isOpen){let m=u=>{s.current&&!s.current.contains(u.target)&&a.triggerRef.current&&!a.triggerRef.current.contains(u.target)&&a.setIsOpen(false);};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m);}}},[a.isOpen,a.setIsOpen,a.triggerRef]),!a.isOpen)return null;let d=()=>{let m=i.top>(a.triggerRef.current?.getBoundingClientRect().top||0)?"bottom":"top";return m==="bottom"?r==="start"?"top left":r==="end"?"top right":"top center":m==="top"?r==="start"?"bottom left":r==="end"?"bottom right":"bottom center":"center center"};return reactDom.createPortal(jsxRuntime.jsx("div",{ref:s,style:{top:i.top,left:i.left,transformOrigin:d()},className:l("fixed z-[110] min-w-[12rem] rounded-2xl border border-gray-200 dark:border-white/10 bg-white/80 dark:bg-white/[0.03] backdrop-blur-xl p-4 shadow-xl outline-none duration-200",c?"animate-in fade-in zoom-in-95 opacity-100":"opacity-0",e),...n,children:t}),document.body)}var fr=we.createContext(void 0);function Io({children:e,value:t,defaultValue:r="",onValueChange:o,filter:n=(s,i)=>s.toLowerCase().includes(i.toLowerCase()),usePopover:a=true}){let[s,i]=we.useState(r),[c,d]=we.useState(""),[m,u]=we.useState(false),[p,g]=we.useState(new Map),[b,x]=we.useState(-1),h=t!==void 0,f=h?t:s,w=N=>{h||i(N),o?.(N),u(false),d("");},v=we__namespace.default.useCallback((N,C,T)=>(g(E=>{let A=new Map(E);return A.set(N,{text:C,value:T}),A}),()=>{g(E=>{let A=new Map(E);return A.delete(N),A});}),[]),y=we.useMemo(()=>Array.from(p.entries()).filter(([N,C])=>n(C.text,c)).map(([N,C])=>({id:N,value:C.value})),[p,c,n]),k=y.length>0;return we.useEffect(()=>{x(m?0:-1);},[m]),jsxRuntime.jsx(fr.Provider,{value:{value:f,onValueChange:w,searchTerm:c,setSearchTerm:d,isOpen:m,setIsOpen:u,registerItem:v,isItemVisible:(N,C)=>n(C,c),hasVisibleItems:k,activeIndex:b,setActiveIndex:x,visibleItems:y},children:a?jsxRuntime.jsx(Ze,{open:m,onOpenChange:u,children:e}):e})}function _x({className:e,children:t,...r}){let o=we.useContext(fr);return jsxRuntime.jsxs(et,{role:"combobox","aria-expanded":o?.isOpen,"aria-haspopup":"listbox",className:l("flex h-10 w-full items-center justify-between rounded-2xl border border-gray-200 bg-gray-50 px-3 py-2 text-sm text-gray-900 placeholder:text-gray-500 focus:border-purple-500 focus:outline-none focus:ring-2 focus:ring-purple-500/20 disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:bg-white/[0.03] dark:text-white dark:placeholder:text-white/40 dark:focus:border-white/20 dark:focus:ring-white/10",e),...r,children:[t,jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"ml-2 opacity-50",children:jsxRuntime.jsx("path",{d:"m6 9 6 6 6-6"})})]})}function Xx({className:e,children:t,...r}){return jsxRuntime.jsx(tt,{className:l("p-0 w-[200px]",e),align:"start",...r,children:t})}function fn({className:e,placeholder:t="Search...",...r}){let o=we.useContext(fr);if(!o)throw new Error("ComboboxInput must be used within Combobox");let n=a=>{a.key==="ArrowDown"?(a.preventDefault(),o.setActiveIndex(s=>(s+1)%o.visibleItems.length)):a.key==="ArrowUp"?(a.preventDefault(),o.setActiveIndex(s=>(s-1+o.visibleItems.length)%o.visibleItems.length)):a.key==="Enter"?(a.preventDefault(),o.activeIndex!==-1&&o.visibleItems[o.activeIndex]&&o.onValueChange(o.visibleItems[o.activeIndex].value)):a.key==="Escape"&&o.setIsOpen(false),r.onKeyDown?.(a);};return jsxRuntime.jsxs("div",{className:"flex items-center border-b border-gray-200 dark:border-white/10 px-3",children:[jsxRuntime.jsxs("svg",{className:"mr-2 h-4 w-4 shrink-0 opacity-50",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("circle",{cx:"11",cy:"11",r:"8"}),jsxRuntime.jsx("path",{d:"m21 21-4.3-4.3"})]}),jsxRuntime.jsx("input",{className:l("flex h-10 w-full rounded-md bg-transparent py-3 text-sm text-gray-900 dark:text-white outline-none placeholder:text-gray-400 dark:placeholder:text-white/40 disabled:cursor-not-allowed disabled:opacity-50",e),placeholder:t,value:o.searchTerm,onChange:a=>o.setSearchTerm(a.target.value),onKeyDown:n,"aria-autocomplete":"list","aria-activedescendant":o.activeIndex!==-1?o.visibleItems[o.activeIndex]?.id:void 0,...r})]})}function gn({className:e,children:t,...r}){return jsxRuntime.jsx("div",{role:"listbox",className:l("max-h-[300px] overflow-y-auto overflow-x-hidden p-1",e),...r,children:t})}function hn({className:e,children:t,...r}){let o=we.useContext(fr);if(!o)throw new Error("ComboboxEmpty must be used within Combobox");return o.hasVisibleItems?null:jsxRuntime.jsx("div",{className:l("py-6 text-center text-sm text-gray-500 dark:text-white/40",e),...r,children:t})}function bn({className:e,value:t,children:r,textValue:o,...n}){let a=we.useContext(fr);if(!a)throw new Error("ComboboxItem must be used within Combobox");let s=we__namespace.default.useId(),i=o||(typeof r=="string"?r:t),c=a.isItemVisible(s,i),d=a.value===t,m=a.visibleItems.findIndex(p=>p.id===s),u=a.activeIndex===m;return we.useEffect(()=>a.registerItem(s,i,t),[s,i,t,a.registerItem]),c?jsxRuntime.jsxs("div",{id:s,role:"option","aria-selected":d,onClick:()=>a.onValueChange(t),onMouseEnter:()=>a.setActiveIndex(m),className:l("relative flex cursor-default select-none items-center rounded-2xl px-3 py-2 text-sm outline-none transition-colors","text-gray-700 dark:text-white/80","aria-selected:bg-gray-100 aria-selected:text-gray-900 dark:aria-selected:bg-white/[0.06] dark:aria-selected:text-white","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-white/[0.06] dark:hover:text-white",(d||u)&&"bg-gray-100 text-gray-900 dark:bg-white/[0.06] dark:text-white",e),...n,children:[jsxRuntime.jsx("svg",{className:l("mr-2 h-4 w-4",d?"opacity-100":"opacity-0"),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("polyline",{points:"20 6 9 17 4 12"})}),r]}):null}var Zx=we__namespace.default.forwardRef(({className:e,value:t,defaultValue:r=0,min:o=0,max:n=100,step:a=1,onChange:s,disabled:i,...c},d)=>{let[m,u]=we.useState(r),p=t!==void 0,g=p?t:m,b=we.useRef(null),x=(g-o)/(n-o)*100,h=we.useCallback(y=>{if(i||!b.current)return;let k=b.current.getBoundingClientRect(),N=k.width,C=k.left,T=(y-C)/N*(n-o)+o;T=Math.min(Math.max(T,o),n);let E=Math.round((T-o)/a);T=o+E*a,T=Number(T.toFixed(10)),p||u(T),s?.(T);},[i,p,n,o,s,a]),f=y=>{if(i)return;h(y.clientX);let k=C=>{h(C.clientX);},N=()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",N);};document.addEventListener("mousemove",k),document.addEventListener("mouseup",N);},w=y=>{if(i)return;let k=y.touches[0];k&&h(k.clientX);let N=T=>{let E=T.touches[0];E&&h(E.clientX);},C=()=>{document.removeEventListener("touchmove",N),document.removeEventListener("touchend",C);};document.addEventListener("touchmove",N,{passive:false}),document.addEventListener("touchend",C);};return jsxRuntime.jsxs("div",{ref:d,role:"slider","aria-valuemin":o,"aria-valuemax":n,"aria-valuenow":g,"aria-disabled":i,tabIndex:i?-1:0,onKeyDown:y=>{if(i)return;let k=g;if(y.key==="ArrowRight"||y.key==="ArrowUp")k=Math.min(g+a,n);else if(y.key==="ArrowLeft"||y.key==="ArrowDown")k=Math.max(g-a,o);else if(y.key==="Home")k=o;else if(y.key==="End")k=n;else return;y.preventDefault(),k!==g&&(p||u(k),s?.(k));},className:l("relative flex w-full touch-none select-none items-center py-4 group",i&&"opacity-50 cursor-not-allowed",e),onMouseDown:f,onTouchStart:w,...c,children:[jsxRuntime.jsx("div",{ref:b,className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-gray-200 dark:bg-white/[0.06] backdrop-blur-sm border border-gray-200 dark:border-white/5",children:jsxRuntime.jsx("div",{className:"absolute h-full bg-gray-900 dark:bg-white transition-none dark:shadow-[0_0_10px_rgba(255,255,255,0.5)]",style:{width:`${x}%`}})}),jsxRuntime.jsx("div",{className:"absolute h-5 w-5 rounded-full border-2 border-gray-900 dark:border-white bg-white dark:bg-black shadow-md dark:shadow-[0_0_15px_rgba(255,255,255,0.5)] transition-transform hover:scale-110 focus:scale-110",style:{left:`calc(${x}% - 10px)`}})]})});var $l=["Su","Mo","Tu","We","Th","Fr","Sa"],Ul=["January","February","March","April","May","June","July","August","September","October","November","December"];function Jr({className:e,value:t,onChange:r,minDate:o,maxDate:n}){let[a,s]=we.useState(t||new Date),[i,c]=we.useState(t||new Date),d=(f,w)=>new Date(f,w+1,0).getDate(),m=(f,w)=>new Date(f,w,1).getDay(),u=()=>{c(new Date(i.getFullYear(),i.getMonth()-1,1));},p=()=>{c(new Date(i.getFullYear(),i.getMonth()+1,1));},g=f=>{let w=new Date(i.getFullYear(),i.getMonth(),f);r&&r(w),s(w);},b=f=>t&&t.getDate()===f&&t.getMonth()===i.getMonth()&&t.getFullYear()===i.getFullYear(),x=f=>{let w=new Date;return w.getDate()===f&&w.getMonth()===i.getMonth()&&w.getFullYear()===i.getFullYear()},h=()=>{let f=d(i.getFullYear(),i.getMonth()),w=m(i.getFullYear(),i.getMonth()),v=[];for(let y=0;y<w;y++)v.push(jsxRuntime.jsx("div",{className:"h-9 w-9"},`empty-${y}`));for(let y=1;y<=f;y++){let k=b(y),N=x(y);v.push(jsxRuntime.jsx("button",{onClick:()=>g(y),type:"button",className:l("h-9 w-9 rounded-2xl text-sm font-medium transition-all duration-200","hover:bg-gray-100 dark:hover:bg-white/[0.06] focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20",k&&"bg-gray-900 text-white dark:bg-white dark:text-black shadow-md dark:shadow-[0_0_15px_rgba(255,255,255,0.3)] hover:bg-gray-800 dark:hover:bg-white/90",!k&&N&&"bg-gray-100 dark:bg-white/[0.03] text-gray-900 dark:text-white border border-gray-200 dark:border-white/10",!k&&!N&&"text-gray-700 dark:text-white/70 hover:text-gray-900 dark:hover:text-white"),children:y},y));}return v};return jsxRuntime.jsxs("div",{className:l("p-4 bg-white dark:bg-black/40 backdrop-blur-xl border border-gray-200 dark:border-white/10 rounded-2xl w-fit",e),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[jsxRuntime.jsxs("div",{className:"font-semibold text-gray-900 dark:text-white",children:[Ul[i.getMonth()]," ",jsxRuntime.jsx("span",{className:"text-gray-500 dark:text-white/50",children:i.getFullYear()})]}),jsxRuntime.jsxs("div",{className:"flex gap-1",children:[jsxRuntime.jsx("button",{onClick:u,type:"button",className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/70 hover:text-gray-900 dark:hover:text-white transition-colors",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{onClick:p,type:"button",className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/70 hover:text-gray-900 dark:hover:text-white transition-colors",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2 text-center",children:$l.map(f=>jsxRuntime.jsx("div",{className:"h-9 w-9 flex items-center justify-center text-xs font-medium text-gray-400 dark:text-white/40",children:f},f))}),jsxRuntime.jsx("div",{className:"grid grid-cols-7 gap-1",children:h()})]})}function fv({value:e,onChange:t,placeholder:r="Pick a date",className:o}){let[n,a]=we.useState(e),[s,i]=we.useState(false),c=u=>{a(u),t?.(u),i(false);},d=u=>u.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"});return jsxRuntime.jsxs(Ze,{open:s,onOpenChange:i,children:[jsxRuntime.jsxs(et,{onMouseMove:u=>{let p=u.currentTarget.getBoundingClientRect(),g=u.clientX-p.left,b=u.clientY-p.top;u.currentTarget.style.setProperty("--x",`${g}px`),u.currentTarget.style.setProperty("--y",`${b}px`);},className:l("group relative flex h-11 w-full items-center justify-between rounded-2xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.03] px-4 py-2 text-sm text-gray-900 dark:text-white transition-all duration-200 overflow-hidden","hover:bg-gray-100 dark:hover:bg-white/[0.06] focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/15",!n&&"text-gray-400 dark:text-white/40",o),children:[jsxRuntime.jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none",style:{background:"radial-gradient(600px circle at var(--x) var(--y), rgba(255,255,255,0.06), transparent 40%)"}}),jsxRuntime.jsx("span",{className:"relative z-10",children:n?d(n):r}),jsxRuntime.jsx(lucideReact.Calendar,{className:"relative z-10 h-4 w-4 text-white/40"})]}),jsxRuntime.jsx(tt,{className:"w-auto p-0 border-none bg-transparent shadow-none",align:"start",children:jsxRuntime.jsx(Jr,{value:n,onChange:c,className:"shadow-2xl shadow-black/50"})})]})}var it=we__namespace.default.forwardRef(({className:e,children:t,orientation:r="vertical",scrollbarSize:o="sm",...n},a)=>jsxRuntime.jsx("div",{ref:a,className:l("overflow-auto","[&::-webkit-scrollbar]:bg-transparent","[&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-thumb]:bg-white/[0.06]","[&::-webkit-scrollbar-thumb]:rounded-full","hover:[&::-webkit-scrollbar-thumb]:bg-gray-400 dark:hover:[&::-webkit-scrollbar-thumb]:bg-white/20","[&::-webkit-scrollbar-track]:bg-transparent","[scrollbar-width:thin] [scrollbar-color:rgba(0,0,0,0.2)_transparent] dark:[scrollbar-color:rgba(255,255,255,0.1)_transparent]",r==="vertical"&&"overflow-y-auto overflow-x-hidden",r==="horizontal"&&"overflow-x-auto overflow-y-hidden",r==="both"&&"overflow-auto",o==="sm"&&"[&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar]:h-1.5",o==="md"&&"[&::-webkit-scrollbar]:w-2.5 [&::-webkit-scrollbar]:h-2.5",o==="lg"&&"[&::-webkit-scrollbar]:w-4 [&::-webkit-scrollbar]:h-4",e),...n,children:t}));it.displayName="ScrollArea";function Lv({value:e,onChange:t,placeholder:r="Pick date & time",className:o}){let[n,a]=we.useState(e),[s,i]=we.useState(false),[c,d]=we.useState(e?e.getHours():12),[m,u]=we.useState(e?e.getMinutes():0);we.useEffect(()=>{e&&(a(e),d(e.getHours()),u(e.getMinutes()));},[e]);let p=h=>{let f=new Date(h);f.setHours(c),f.setMinutes(m),a(f),t?.(f);},g=(h,f)=>{let w=parseInt(f,10);if(isNaN(w))return;let v=c,y=m;h==="hours"?(w=Math.max(0,Math.min(23,w)),d(w),v=w):(w=Math.max(0,Math.min(59,w)),u(w),y=w);let k=n||new Date,N=new Date(k);N.setHours(v),N.setMinutes(y),a(N),t?.(N);},b=h=>h.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"});return jsxRuntime.jsxs(Ze,{open:s,onOpenChange:i,children:[jsxRuntime.jsxs(et,{onMouseMove:h=>{let f=h.currentTarget.getBoundingClientRect(),w=h.clientX-f.left,v=h.clientY-f.top;h.currentTarget.style.setProperty("--x",`${w}px`),h.currentTarget.style.setProperty("--y",`${v}px`);},className:l("group relative flex h-11 w-full items-center justify-between rounded-2xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.03] px-4 py-2 text-sm text-gray-900 dark:text-white transition-all duration-200 overflow-hidden","hover:bg-gray-100 dark:hover:bg-white/[0.06] focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/15",!n&&"text-gray-400 dark:text-white/40",o),children:[jsxRuntime.jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none",style:{background:"radial-gradient(600px circle at var(--x) var(--y), rgba(0,0,0,0.06), transparent 40%)"}}),jsxRuntime.jsx("span",{className:"relative z-10",children:n?b(n):r}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-gray-400 dark:text-white/40",children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-4 w-4"}),jsxRuntime.jsx(lucideReact.Clock,{className:"h-4 w-4"})]})]}),jsxRuntime.jsx(tt,{className:"w-auto p-0 border-none bg-transparent shadow-none",align:"start",children:jsxRuntime.jsx("div",{className:"flex flex-col rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-black/40 backdrop-blur-xl shadow-2xl dark:shadow-black/50",children:jsxRuntime.jsxs("div",{className:"flex",children:[jsxRuntime.jsx("div",{className:"p-4 border-r border-gray-200 dark:border-white/10",children:jsxRuntime.jsx(Jr,{value:n,onChange:p,className:"border-0 p-0 bg-transparent backdrop-blur-none shadow-none rounded-none"})}),jsxRuntime.jsxs("div",{className:"flex flex-col p-4 w-[160px] h-[340px]",children:[jsxRuntime.jsx("div",{className:"mb-3 text-sm font-medium text-gray-700 dark:text-white/70",children:"Time"}),jsxRuntime.jsxs("div",{className:"flex flex-1 gap-2 min-h-0 overflow-hidden",children:[jsxRuntime.jsxs(it,{className:"flex-1 flex flex-col gap-1",scrollbarSize:"sm",children:[jsxRuntime.jsx("div",{className:"text-xs text-gray-400 dark:text-white/40 text-center mb-1 sticky top-0 bg-white dark:bg-[#0A0A0A] py-1 z-10",children:"Hr"}),jsxRuntime.jsx("div",{className:"flex flex-col gap-1",children:Array.from({length:24}).map((h,f)=>jsxRuntime.jsx("button",{onClick:()=>g("hours",f.toString()),className:l("w-full rounded-lg px-1 py-1.5 text-sm transition-colors text-center shrink-0",c===f?"bg-emerald-500 dark:bg-emerald-600/80 text-white font-medium":"text-gray-700 dark:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.06] hover:text-gray-900 dark:hover:text-white"),children:f.toString().padStart(2,"0")},f))})]}),jsxRuntime.jsx("div",{className:"w-[1px] bg-gray-200 dark:bg-white/[0.06]"}),jsxRuntime.jsxs(it,{className:"flex-1 flex flex-col gap-1",scrollbarSize:"sm",children:[jsxRuntime.jsx("div",{className:"text-xs text-gray-400 dark:text-white/40 text-center mb-1 sticky top-0 bg-white dark:bg-[#0A0A0A] py-1 z-10",children:"Min"}),jsxRuntime.jsx("div",{className:"flex flex-col gap-1",children:Array.from({length:60}).map((h,f)=>jsxRuntime.jsx("button",{onClick:()=>g("minutes",f.toString()),className:l("w-full rounded-lg px-1 py-1.5 text-sm transition-colors text-center shrink-0",m===f?"bg-emerald-500 dark:bg-emerald-600/80 text-white font-medium":"text-gray-700 dark:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.06] hover:text-gray-900 dark:hover:text-white"),children:f.toString().padStart(2,"0")},f))})]})]})]})]})})})]})}var hr=we__namespace.default.forwardRef(({className:e,label:t,error:r,id:o,disabled:n,...a},s)=>{let i=we__namespace.default.useId(),c=o||i;return jsxRuntime.jsxs("div",{className:"flex flex-col gap-1.5",children:[t&&jsxRuntime.jsx(X,{htmlFor:c,className:l(n&&"opacity-50 cursor-not-allowed"),children:t}),jsxRuntime.jsx("textarea",{ref:s,id:c,disabled:n,className:l("w-full rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-3","border border-gray-200 dark:border-white/[0.10]","text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-white/30","focus:outline-none focus:ring-2 focus:ring-purple-400/30","resize-none","disabled:cursor-not-allowed disabled:opacity-50",r&&"border-rose-400/25 focus:ring-rose-300/25",e),...a}),r&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:r})]})});hr.displayName="Textarea";var tc=we__namespace.default.forwardRef((e,t)=>{let[r,o]=we.useState(false);return jsxRuntime.jsx(kt,{...e,ref:t,type:r?"text":"password",rightIcon:jsxRuntime.jsx(L,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-white/10",onClick:()=>o(!r),"aria-label":r?"Hide password":"Show password",children:r?jsxRuntime.jsx(lucideReact.EyeOff,{className:"h-4 w-4 text-gray-400 dark:text-white/35"}):jsxRuntime.jsx(lucideReact.Eye,{className:"h-4 w-4 text-gray-400 dark:text-white/35"})})})});tc.displayName="PasswordInput";var ac=classVarianceAuthority.cva("inline-flex items-center gap-1 rounded-full border px-2.5 py-1 text-xs font-medium whitespace-nowrap transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"bg-gray-100 text-gray-700 border-gray-200 dark:bg-white/[0.06] dark:text-white/70 dark:border-white/10",neutral:"bg-gray-100 text-gray-700 border-gray-200 dark:bg-white/[0.06] dark:text-white/70 dark:border-white/10",success:"bg-emerald-100 text-emerald-700 border-emerald-200 dark:bg-emerald-400/15 dark:text-emerald-200 dark:border-emerald-400/20",warning:"bg-amber-100 text-amber-700 border-amber-200 dark:bg-amber-400/15 dark:text-amber-200 dark:border-amber-400/20",danger:"bg-rose-100 text-rose-700 border-rose-200 dark:bg-rose-400/15 dark:text-rose-200 dark:border-rose-400/20",info:"bg-sky-100 text-sky-700 border-sky-200 dark:bg-sky-400/15 dark:text-sky-200 dark:border-sky-400/20",outline:"bg-transparent text-white/60 border-white/10 hover:bg-white/[0.06]"}},defaultVariants:{variant:"default"}}),ze=we__namespace.default.forwardRef(({className:e,variant:t,...r},o)=>jsxRuntime.jsx("span",{ref:o,className:l(ac({variant:t}),e),...r}));ze.displayName="Badge";function ew({label:e,placeholder:t="Add tag...",tags:r,onChange:o,error:n,className:a}){let[s,i]=we.useState(""),c=m=>{m.key==="Enter"&&s.trim()?(m.preventDefault(),r.includes(s.trim())||o([...r,s.trim()]),i("")):m.key==="Backspace"&&!s&&r.length>0&&o(r.slice(0,-1));},d=m=>{o(r.filter(u=>u!==m));};return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",a),children:[e&&jsxRuntime.jsx(X,{children:e}),jsxRuntime.jsxs("div",{className:l("flex flex-wrap gap-2 rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-3 py-2 border border-gray-200 dark:border-white/[0.10] focus-within:ring-2 focus-within:ring-purple-400/30 transition-all duration-200",n&&"border-rose-400/25"),children:[r.map(m=>jsxRuntime.jsxs(ze,{variant:"default",className:"gap-1 pr-1",children:[m,jsxRuntime.jsx("button",{type:"button",onClick:()=>d(m),className:"rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10 transition-colors",children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},m)),jsxRuntime.jsx("input",{type:"text",value:s,onChange:m=>i(m.target.value),onKeyDown:c,placeholder:r.length===0?t:"",className:"flex-1 bg-transparent py-1 text-sm outline-none placeholder:text-gray-400 dark:placeholder:text-white/30 min-w-[120px]"})]}),n&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:n})]})}function nw({label:e,value:t,onChange:r,error:o,className:n}){return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",n),children:[e&&jsxRuntime.jsx(X,{children:e}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"h-10 w-10 rounded-xl border border-gray-200 dark:border-white/10 overflow-hidden relative",style:{backgroundColor:t},children:jsxRuntime.jsx("input",{type:"color",value:t,onChange:a=>r(a.target.value),className:"absolute inset-0 opacity-0 cursor-pointer w-full h-full"})}),jsxRuntime.jsx("input",{type:"text",value:t,onChange:a=>r(a.target.value),className:"flex-1 rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-2 border border-gray-200 dark:border-white/[0.10] text-sm focus:outline-none focus:ring-2 focus:ring-purple-400/30 transition-all"})]}),o&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400",children:o})]})}var Nn=we.createContext({}),dc=we__namespace.default.forwardRef(({className:e,value:t,onChange:r,name:o,disabled:n,label:a,children:s,...i},c)=>{let d=we__namespace.default.useId();return jsxRuntime.jsxs("div",{ref:c,className:l("flex flex-col gap-2",e),...i,children:[a&&jsxRuntime.jsx(X,{className:l(n&&"opacity-50 cursor-not-allowed"),children:a}),jsxRuntime.jsx("div",{className:"flex flex-col gap-2",role:"radiogroup",children:jsxRuntime.jsx(Nn.Provider,{value:{value:t,onChange:r,name:o||d,disabled:n},children:s})})]})});dc.displayName="RadioGroup";var mc=we__namespace.default.forwardRef(({className:e,value:t,label:r,disabled:o,...n},a)=>{let s=we.useContext(Nn),i=s.value===t,c=s.disabled||o,d=we__namespace.default.useId();return jsxRuntime.jsxs("label",{htmlFor:d,className:l("flex items-center gap-3 cursor-pointer group",c&&"cursor-not-allowed opacity-50",e),children:[jsxRuntime.jsxs("div",{className:"relative flex items-center justify-center",children:[jsxRuntime.jsx("input",{ref:a,id:d,type:"radio",name:s.name,value:t,checked:i,disabled:c,onChange:m=>{m.target.checked&&s.onChange?.(t);},className:"peer sr-only",...n}),jsxRuntime.jsx("div",{className:l("h-5 w-5 rounded-full border border-gray-300 dark:border-white/20 bg-gray-50 dark:bg-white/[0.03] transition-all duration-200","peer-focus-visible:ring-2 peer-focus-visible:ring-gray-400 dark:peer-focus-visible:ring-white/20 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-white dark:peer-focus-visible:ring-offset-[#0A0A0A]","group-hover:bg-gray-100 dark:group-hover:bg-white/[0.05]",i&&"border-gray-900 bg-gray-900 dark:border-white dark:bg-white"),children:i&&jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full bg-white dark:bg-black"})})})]}),r&&jsxRuntime.jsx("span",{className:"text-sm text-gray-900 dark:text-white/90 select-none font-medium",children:r})]})});mc.displayName="RadioGroupItem";var vr=we__namespace.default.createContext({}),uc=we__namespace.default.forwardRef(({className:e,...t},r)=>{let o=we__namespace.default.useId();return jsxRuntime.jsx(vr.Provider,{value:{id:o},children:jsxRuntime.jsx("div",{ref:r,className:l("space-y-2",e),...t})})});uc.displayName="FormItem";var pc=we__namespace.default.forwardRef(({className:e,...t},r)=>{let{id:o}=we__namespace.default.useContext(vr);return jsxRuntime.jsx(X,{ref:r,className:l("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),htmlFor:o,...t})});pc.displayName="FormLabel";var fc=we__namespace.default.forwardRef(({...e},t)=>{let{id:r}=we__namespace.default.useContext(vr),{children:o,...n}=e;return we__namespace.default.isValidElement(o)?we__namespace.default.cloneElement(o,{id:r,"aria-describedby":`${r}-description ${r}-message`,...n,...o.props}):jsxRuntime.jsx("div",{ref:t,...e})});fc.displayName="FormControl";var gc=we__namespace.default.forwardRef(({className:e,...t},r)=>{let{id:o}=we__namespace.default.useContext(vr);return jsxRuntime.jsx("p",{ref:r,id:`${o}-description`,className:l("text-xs text-white/50",e),...t})});gc.displayName="FormDescription";var hc=we__namespace.default.forwardRef(({className:e,children:t,...r},o)=>{let{id:n}=we__namespace.default.useContext(vr);return t?jsxRuntime.jsx("p",{ref:o,id:`${n}-message`,className:l("text-xs font-medium text-rose-500",e),...r,children:t}):null});hc.displayName="FormMessage";var yc=classVarianceAuthority.cva("relative flex flex-col items-center justify-center rounded-2xl border-2 border-dashed transition-all duration-200 text-center",{variants:{isDragActive:{true:"border-blue-500 bg-blue-50 dark:bg-blue-500/10",false:"border-gray-200 bg-gray-50 hover:bg-gray-100 dark:border-white/10 dark:bg-white/[0.02] dark:hover:bg-white/[0.05]"},error:{true:"border-rose-500 bg-rose-50 dark:bg-rose-500/10",false:""}},defaultVariants:{isDragActive:false,error:false}}),kc=we__namespace.default.forwardRef(({className:e,onDrop:t,maxFiles:r=1,maxSize:o,label:n="Upload files",description:a="Drag & drop or click to upload",...s},i)=>{let[c,d]=we.useState(false),[m,u]=we.useState([]),[p,g]=we.useState(null),b=we__namespace.default.useRef(null),x=k=>{k.preventDefault(),d(true);},h=k=>{k.preventDefault(),d(false);},f=k=>r&&k.length>r?(g(`Max ${r} files allowed`),false):o&&k.some(C=>C.size>o)?(g(`File too large (max ${o/1024/1024}MB)`),false):(g(null),true),w=k=>{k.preventDefault(),d(false);let N=Array.from(k.dataTransfer.files);f(N)&&(u(N),t?.(N));},v=k=>{if(k.target.files){let N=Array.from(k.target.files);f(N)&&(u(N),t?.(N));}},y=(k,N)=>{N.stopPropagation();let C=m.filter((T,E)=>E!==k);u(C),t?.(C);};return jsxRuntime.jsxs("div",{className:"w-full space-y-4",children:[jsxRuntime.jsxs("div",{ref:i,className:l(yc({isDragActive:c,error:!!p,className:e}),"p-8 cursor-pointer"),onDragOver:x,onDragLeave:h,onDrop:w,onClick:()=>b.current?.click(),...s,children:[jsxRuntime.jsx("input",{ref:b,type:"file",className:"hidden",multiple:r>1,onChange:v}),jsxRuntime.jsx("div",{className:"mb-4 rounded-full bg-gray-100 p-3 dark:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.Upload,{className:"h-6 w-6 text-gray-500 dark:text-white/70"})}),jsxRuntime.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-white",children:n}),jsxRuntime.jsx("div",{className:"mt-1 text-xs text-gray-500 dark:text-white/50",children:a}),p&&jsxRuntime.jsx("div",{className:"mt-2 text-xs font-medium text-rose-500",children:p})]}),m.length>0&&jsxRuntime.jsx("div",{className:"grid gap-2",children:m.map((k,N)=>jsxRuntime.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-gray-200 bg-white p-3 dark:border-white/10 dark:bg-white/[0.03]",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-gray-100 dark:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4 text-gray-500 dark:text-white/70"})}),jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white truncate max-w-[200px]",children:k.name}),jsxRuntime.jsxs("span",{className:"text-xs text-gray-500 dark:text-white/50",children:[(k.size/1024).toFixed(1)," KB"]})]})]}),jsxRuntime.jsx("button",{onClick:C=>y(N,C),className:"rounded-full p-1 hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]},N))})]})});kc.displayName="FileDropzone";var Lc=classVarianceAuthority.cva("flex items-center gap-2",{variants:{size:{sm:"[&>input]:h-8 [&>input]:w-8 [&>input]:text-sm",md:"[&>input]:h-10 [&>input]:w-10 [&>input]:text-base",lg:"[&>input]:h-12 [&>input]:w-12 [&>input]:text-lg"}},defaultVariants:{size:"md"}}),Pc=we__namespace.default.forwardRef(({className:e,size:t,length:r=6,value:o="",onChange:n,onComplete:a,disabled:s,error:i,...c},d)=>{let[m,u]=we.useState(new Array(r).fill("")),p=we.useRef([]);we.useEffect(()=>{let h=o.split("").slice(0,r),f=[...h,...new Array(r-h.length).fill("")];u(f);},[o,r]);let g=(h,f)=>{let w=h.target.value;if(isNaN(Number(w)))return;let v=[...m];v[f]=w.substring(w.length-1),u(v);let y=v.join("");n?.(y),w&&f<r-1&&p.current[f+1]?.focus(),y.length===r&&a?.(y);},b=(h,f)=>{h.key==="Backspace"&&!m[f]&&f>0&&p.current[f-1]?.focus();},x=h=>{h.preventDefault();let f=h.clipboardData.getData("text/plain").slice(0,r);if(!/^\d+$/.test(f))return;let w=[...m];f.split("").forEach((y,k)=>{w[k]=y;}),u(w);let v=w.join("");n?.(v),v.length===r&&a?.(v),p.current[Math.min(f.length,r-1)]?.focus();};return jsxRuntime.jsx("div",{ref:d,className:l(Lc({size:t,className:e})),...c,children:m.map((h,f)=>jsxRuntime.jsx("input",{ref:w=>p.current[f]=w,type:"text",inputMode:"numeric",maxLength:1,value:h,disabled:s,onChange:w=>g(w,f),onKeyDown:w=>b(w,f),onPaste:x,className:l("rounded-2xl border bg-gray-50 text-center font-semibold transition-all duration-200","focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 focus:outline-none","disabled:opacity-50 disabled:cursor-not-allowed","dark:bg-white/[0.03] dark:text-white",i?"border-rose-500 text-rose-500 focus:border-rose-500 focus:ring-rose-500/20":"border-gray-200 dark:border-white/10")},f))})});Pc.displayName="OTPInput";var Ic=classVarianceAuthority.cva("flex items-center rounded-2xl border bg-gray-50 dark:bg-white/[0.03] dark:border-white/10",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},error:{true:"border-rose-500",false:"border-gray-200"}},defaultVariants:{size:"md",error:false}}),Ac=we__namespace.default.forwardRef(({className:e,size:t,error:r,value:o=0,onChange:n,min:a=-1/0,max:s=1/0,step:i=1,disabled:c,...d},m)=>{let u=()=>{o-i>=a&&n?.(o-i);},p=()=>{o+i<=s&&n?.(o+i);},g=b=>{let x=parseFloat(b.target.value);isNaN(x)||n?.(x);};return jsxRuntime.jsxs("div",{className:l(Ic({size:t,error:r,className:e})),children:[jsxRuntime.jsx("button",{type:"button",onClick:u,disabled:c||o<=a,className:"flex h-full items-center justify-center px-3 text-gray-500 hover:text-gray-900 disabled:opacity-50 dark:text-white/50 dark:hover:text-white",children:jsxRuntime.jsx(lucideReact.Minus,{className:"h-3.5 w-3.5"})}),jsxRuntime.jsx("div",{className:"h-full w-px bg-gray-200 dark:bg-white/[0.06]"}),jsxRuntime.jsx("input",{ref:m,type:"number",value:o,onChange:g,disabled:c,className:"h-full w-full min-w-[3rem] bg-transparent text-center text-sm font-medium text-gray-900 focus:outline-none dark:text-white",...d}),jsxRuntime.jsx("div",{className:"h-full w-px bg-gray-200 dark:bg-white/[0.06]"}),jsxRuntime.jsx("button",{type:"button",onClick:p,disabled:c||o>=s,className:"flex h-full items-center justify-center px-3 text-gray-500 hover:text-gray-900 disabled:opacity-50 dark:text-white/50 dark:hover:text-white",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-3.5 w-3.5"})})]})});Ac.displayName="NumberInput";var Vc=classVarianceAuthority.cva("inline-flex items-center rounded-2xl border border-gray-200 bg-gray-50 p-1 dark:border-white/10 dark:bg-white/[0.03]",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},fullWidth:{true:"w-full flex",false:""}},defaultVariants:{size:"md",fullWidth:false}}),zc=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-2xl 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-gray-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-gray-950 dark:focus-visible:ring-gray-300",{variants:{selected:{true:"bg-white text-gray-950 shadow-sm dark:bg-gray-800 dark:text-gray-50",false:"text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-50"},fullWidth:{true:"flex-1",false:""}},defaultVariants:{selected:false,fullWidth:false}}),Kc=we__namespace.default.forwardRef(({className:e,size:t,fullWidth:r,value:o,onChange:n,options:a,...s},i)=>jsxRuntime.jsx("div",{ref:i,className:l(Vc({size:t,fullWidth:r,className:e})),...s,children:a.map(c=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>n?.(c.value),className:l(zc({selected:o===c.value,fullWidth:r})),children:[c.icon&&jsxRuntime.jsx("span",{className:"mr-2",children:c.icon}),c.label]},c.value))}));Kc.displayName="ToggleGroup";var Ln={loading:jsxRuntime.jsx("svg",{className:"animate-spin text-blue-500",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),success:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-emerald-400",children:[jsxRuntime.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),jsxRuntime.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),error:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-rose-400",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntime.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),jsxRuntime.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),warning:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-amber-400",children:[jsxRuntime.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),jsxRuntime.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),jsxRuntime.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),info:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-blue-400",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntime.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),jsxRuntime.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})},Pn=({id:e,title:t,description:r,variant:o="default",duration:n=5e3,onDismiss:a})=>(we.useEffect(()=>{if(n===1/0)return;let s=setTimeout(()=>{a(e);},n);return ()=>clearTimeout(s)},[n,e,a]),jsxRuntime.jsxs("div",{role:"alert",className:l("pointer-events-auto relative flex w-full max-w-sm items-start gap-4 overflow-hidden rounded-2xl border p-4 shadow-lg transition-all","animate-in slide-in-from-right-full fade-in duration-300","bg-white dark:bg-[#0A0A0A]/90 backdrop-blur-md border-gray-200 dark:border-white/10",o==="error"&&"border-rose-200 dark:border-rose-500/30 bg-rose-50 dark:bg-rose-500/10",o==="success"&&"border-emerald-200 dark:border-emerald-500/20 bg-emerald-50 dark:bg-emerald-950/10",o==="warning"&&"border-amber-200 dark:border-amber-500/20 bg-amber-50 dark:bg-amber-950/10",o==="info"&&"border-blue-200 dark:border-blue-500/20 bg-blue-50 dark:bg-blue-950/10",o==="loading"&&"border-blue-200 dark:border-blue-500/20 bg-blue-50 dark:bg-blue-950/10"),children:[o!=="default"&&Ln[o]&&jsxRuntime.jsx("div",{className:"shrink-0 pt-0.5",children:Ln[o]}),jsxRuntime.jsxs("div",{className:"flex-1 gap-1",children:[t&&jsxRuntime.jsx("div",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:t}),r&&jsxRuntime.jsx("div",{className:"text-sm text-gray-600 dark:text-white/80",children:r})]}),jsxRuntime.jsx("button",{onClick:()=>a(e),className:"shrink-0 rounded-md p-1 text-gray-400 dark:text-white/50 opacity-0 transition-opacity hover:text-gray-900 dark:hover:text-white group-hover:opacity-100 focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20",children:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsxRuntime.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}));var Ko=we.createContext(void 0);function jw({children:e}){let[t,r]=we.useState([]),o=we.useCallback(i=>{r(c=>c.filter(d=>d.id!==i));},[]),n=we.useCallback(i=>{let c=Math.random().toString(36).substring(2,9);return r(d=>[...d,{...i,id:c,onDismiss:o}]),c},[o]),a=we.useCallback((i,c)=>{r(d=>d.map(m=>m.id===i?{...m,...c}:m));},[]),s=we.useCallback(async(i,c)=>{let d=typeof c.loading=="string"?{title:c.loading,variant:"loading"}:{variant:"loading",...c.loading},m=n({...d,duration:1/0});try{let u=await i,p=typeof c.success=="function"?c.success(u):typeof c.success=="string"?{title:c.success,variant:"success"}:c.success;return a(m,{...p,duration:5e3}),u}catch(u){let p=typeof c.error=="function"?c.error(u):typeof c.error=="string"?{title:c.error,variant:"error"}:c.error;throw a(m,{...p,duration:5e3}),u}},[n,a]);return jsxRuntime.jsxs(Ko.Provider,{value:{toast:n,dismiss:o,promise:s},children:[e,jsxRuntime.jsx("div",{className:"fixed bottom-0 right-0 z-[150] flex max-h-screen w-full flex-col-reverse gap-2 p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",children:t.map(i=>jsxRuntime.jsx(Pn,{...i},i.id))})]})}var Xc={success:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-emerald-400",children:[jsxRuntime.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),jsxRuntime.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),error:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-rose-400",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntime.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),jsxRuntime.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),warning:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-amber-400",children:[jsxRuntime.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),jsxRuntime.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),jsxRuntime.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),info:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-blue-400",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntime.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),jsxRuntime.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})},qc=we__namespace.default.forwardRef(({className:e,variant:t="default",icon:r,title:o,children:n,...a},s)=>{let i=r||(t!=="default"?Xc[t]:null);return jsxRuntime.jsxs("div",{ref:s,role:"alert",className:l("relative w-full rounded-2xl border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-gray-900 dark:[&>svg]:text-white","bg-white dark:bg-[#0A0A0A]/50 backdrop-blur-md border-gray-200 dark:border-white/10 text-gray-900 dark:text-white",t==="error"&&"border-rose-200 dark:border-rose-500/20 bg-rose-50 dark:bg-rose-950/10 text-rose-900 dark:text-rose-50 [&>svg]:text-rose-600 dark:[&>svg]:text-rose-400",t==="success"&&"border-emerald-200 dark:border-emerald-500/20 bg-emerald-50 dark:bg-emerald-950/10 text-emerald-900 dark:text-emerald-50 [&>svg]:text-emerald-600 dark:[&>svg]:text-emerald-400",t==="warning"&&"border-amber-200 dark:border-amber-500/20 bg-amber-50 dark:bg-amber-950/10 text-amber-900 dark:text-amber-50 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",t==="info"&&"border-blue-200 dark:border-blue-500/20 bg-blue-50 dark:bg-blue-950/10 text-blue-900 dark:text-blue-50 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",e),...a,children:[i,jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[o&&jsxRuntime.jsx("h5",{className:"mb-1 font-medium leading-none tracking-tight",children:o}),n&&jsxRuntime.jsx("div",{className:"text-sm opacity-90 [&_p]:leading-relaxed",children:n})]})]})});qc.displayName="Alert";var jc=we__namespace.default.forwardRef(({className:e,value:t=0,max:r=100,variant:o="default",size:n="md",isIndeterminate:a=false,hasStripe:s=false,indicatorClassName:i,...c},d)=>{let m=a?0:Math.min(Math.max((t||0)/r,0),1)*100,u={default:"bg-gray-900 dark:bg-white dark:shadow-[0_0_10px_rgba(255,255,255,0.5)]",success:"bg-emerald-500 shadow-sm dark:shadow-[0_0_10px_rgba(16,185,129,0.5)]",warning:"bg-amber-500 shadow-sm dark:shadow-[0_0_10px_rgba(245,158,11,0.5)]",danger:"bg-rose-500 shadow-sm dark:shadow-[0_0_10px_rgba(244,63,94,0.5)]",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600 shadow-sm dark:shadow-[0_0_15px_rgba(99,102,241,0.5)]"};return jsxRuntime.jsx("div",{ref:d,role:"progressbar","aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":a?void 0:t,className:l("relative w-full overflow-hidden rounded-full bg-gray-200 dark:bg-white/[0.03] border border-gray-200 dark:border-white/5 backdrop-blur-sm",{sm:"h-1",md:"h-2",lg:"h-4"}[n],e),...c,children:jsxRuntime.jsx("div",{className:l("h-full w-full flex-1 transition-all duration-500 ease-in-out relative overflow-hidden",u[o],a&&"absolute inset-0 w-full origin-left animate-indeterminate-progress",i),style:{transform:a?void 0:`translateX(-${100-m}%)`},children:s&&!a&&jsxRuntime.jsx("div",{className:"absolute inset-0 w-full h-full animate-progress-stripe",style:{backgroundImage:"linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)",backgroundSize:"1rem 1rem"}})})})});jc.displayName="Progress";var Zc=we__namespace.default.forwardRef(({icon:e,title:t,description:r,action:o,className:n,...a},s)=>jsxRuntime.jsx(ie,{ref:s,className:l("p-8 text-center",n),...a,children:jsxRuntime.jsxs("div",{className:"mx-auto w-full max-w-md space-y-3",children:[jsxRuntime.jsx("div",{className:"mx-auto grid h-12 w-12 place-items-center rounded-2xl border border-white/10 bg-white/[0.03] text-white/70",children:e??jsxRuntime.jsx(lucideReact.Info,{className:"h-5 w-5"})}),jsxRuntime.jsx("div",{className:"text-lg font-semibold text-white",children:t}),r?jsxRuntime.jsx("div",{className:"text-sm text-white/55",children:r}):null,o?jsxRuntime.jsx("div",{className:"pt-2 flex justify-center",children:o}):null]})}));Zc.displayName="EmptyState";function Sn({className:e,variant:t="default",...r}){return jsxRuntime.jsx("div",{className:l("animate-pulse bg-gray-200 dark:bg-white/[0.03]",t==="circle"&&"rounded-full",t==="default"&&"rounded-2xl",t==="text"&&"rounded h-4 w-full",e),...r})}var nd=we__namespace.default.forwardRef(({className:e,max:t=5,value:r=0,onChange:o,readOnly:n=false,size:a="md",...s},i)=>{let[c,d]=we.useState(null),m={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"};return jsxRuntime.jsx("div",{ref:i,className:l("flex items-center gap-1",e),...s,children:Array.from({length:t}).map((u,p)=>{let g=p+1,b=(c!==null?c:r)>=g;return jsxRuntime.jsx("button",{type:"button",disabled:n,onClick:()=>o?.(g),onMouseEnter:()=>!n&&d(g),onMouseLeave:()=>!n&&d(null),className:l("transition-transform hover:scale-110 focus:outline-none",n&&"cursor-default hover:scale-100"),children:jsxRuntime.jsx(lucideReact.Star,{className:l(m[a],"transition-colors duration-200",b?"fill-amber-400 text-amber-400":"fill-transparent text-gray-300 dark:text-white/20")})},p)})})});nd.displayName="Rating";var Dn=classVarianceAuthority.cva("transition-all duration-700 ease-out",{variants:{preset:{fade:"opacity-0 translate-y-4",spring:"opacity-0 scale-95 translate-y-4","slide-right":"opacity-0 -translate-x-8","slide-left":"opacity-0 translate-x-8",blur:"opacity-0 blur-sm scale-105","3d-flip":"opacity-0 rotate-x-90"},visibleState:{fade:"opacity-100 translate-y-0",spring:"opacity-100 scale-100 translate-y-0 animate-enter-spring","slide-right":"opacity-100 translate-x-0","slide-left":"opacity-100 translate-x-0",blur:"opacity-100 blur-0 scale-100","3d-flip":"opacity-100 rotate-x-0"}},defaultVariants:{preset:"spring"}});function Hn({className:e,preset:t="spring",viewport:r=true,visible:o,delay:n=0,once:a=true,asChild:s=false,children:i,style:c,...d}){let{ref:m,isInView:u,hasAnimated:p}=$e({threshold:.1,enabled:r&&o===void 0}),b=o!==void 0?o:r?a?p:u:true,x=Dn({preset:t}),h=b?Dn({visibleState:t}):"";return jsxRuntime.jsx(s?yt:"div",{ref:m,className:l(x,h,e),style:{transitionDelay:`${n}ms`,willChange:"transform, opacity",...c},...d,children:i})}function Ey({children:e,stagger:t=100,delay:r=0,className:o,...n}){let{ref:a,hasAnimated:s}=$e({threshold:.1});return jsxRuntime.jsx("div",{ref:a,className:l("relative",o),...n,children:we__namespace.default.Children.map(e,(i,c)=>we__namespace.default.isValidElement(i)?we__namespace.default.cloneElement(i,{visible:s,viewport:false,delay:r+c*t}):i)})}function Ay({text:e,type:t="char",stagger:r=30,delay:o=0,className:n,...a}){let{ref:s,hasAnimated:i}=$e({threshold:.2}),c=t==="char"?e.split(""):e.split(" ");return jsxRuntime.jsx("div",{ref:s,className:l("flex flex-wrap",n),"aria-label":e,...a,children:c.map((d,m)=>jsxRuntime.jsxs("span",{className:l("inline-block whitespace-pre transition-all duration-500 ease-out will-change-transform",i?"opacity-100 translate-y-0 blur-0":"opacity-0 translate-y-4 blur-sm"),style:{transitionDelay:`${o+m*r}ms`},children:[d,t==="word"&&m!==c.length-1?" ":""]},m))})}function Fy({children:e,speed:t=.1,direction:r="vertical",className:o,...n}){let a=we.useRef(null);return we.useEffect(()=>{let s=a.current;if(!s)return;let i=()=>{let c=s.getBoundingClientRect(),d=window.innerHeight;if(c.top>d||c.bottom<0)return;let u=(d/2-(c.top+c.height/2))*t;r==="vertical"?s.style.transform=`translate3d(0, ${u}px, 0)`:s.style.transform=`translate3d(${u}px, 0, 0)`;};return window.addEventListener("scroll",i,{passive:true}),i(),()=>window.removeEventListener("scroll",i)},[t,r]),jsxRuntime.jsx("div",{ref:a,className:l("will-change-transform",o),...n,children:e})}function qy({children:e,strength:t=.5,className:r}){let o=we.useRef(null),n=s=>{let i=o.current;if(!i)return;let{clientX:c,clientY:d}=s,{left:m,top:u,width:p,height:g}=i.getBoundingClientRect(),b=m+p/2,x=u+g/2,h=c-b,f=d-x,w=Math.max(p,g)*1.5;Math.abs(h)<w&&Math.abs(f)<w?(i.style.setProperty("--mag-x",`${h*t}px`),i.style.setProperty("--mag-y",`${f*t}px`)):(i.style.setProperty("--mag-x","0px"),i.style.setProperty("--mag-y","0px"));},a=()=>{let s=o.current;s&&(s.style.setProperty("--mag-x","0px"),s.style.setProperty("--mag-y","0px"));};return we.useEffect(()=>(window.addEventListener("mousemove",n),()=>window.removeEventListener("mousemove",n)),[t]),jsxRuntime.jsx("div",{ref:o,className:l("inline-block transition-transform duration-300 ease-out will-change-transform",r),onMouseLeave:a,style:{transform:"translate3d(var(--mag-x, 0px), var(--mag-y, 0px), 0)"},children:e})}function tk({value:e,duration:t=2e3,delay:r=0,decimalPlaces:o=0,className:n,...a}){let[s,i]=we.useState(0),{ref:c,hasAnimated:d}=$e({threshold:.1}),m=we.useRef(null);return we.useEffect(()=>{if(!d)return;let u=g=>{m.current||(m.current=g);let b=Math.min((g-m.current-r)/t,1);if(b>=0){let x=b*e;i(x);}b<1&&requestAnimationFrame(u);},p=setTimeout(()=>{requestAnimationFrame(u);},r);return ()=>clearTimeout(p)},[d,e,t,r]),jsxRuntime.jsx("span",{ref:c,className:l("tabular-nums tracking-tighter",n),...a,children:s.toFixed(o)})}function sk({variant:e="spinner",text:t,fullscreen:r=true,className:o,...n}){let a=r?"fixed inset-0 z-[200] flex items-center justify-center bg-white/80 dark:bg-black/80 backdrop-blur-sm":"flex items-center justify-center p-8 w-full h-full min-h-[200px]";return e==="bar"?jsxRuntime.jsx("div",{className:l("fixed top-0 left-0 right-0 z-[200] h-1 bg-transparent",o),...n,children:jsxRuntime.jsx("div",{className:"h-full bg-blue-500 animate-indeterminate-progress origin-left"})}):e==="dots"?jsxRuntime.jsxs("div",{className:l(a,o),...n,children:[jsxRuntime.jsxs("div",{className:"flex space-x-2",children:[jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-blue-500 animate-bounce [animation-delay:-0.3s]"}),jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-blue-500 animate-bounce [animation-delay:-0.15s]"}),jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-blue-500 animate-bounce"})]}),t&&jsxRuntime.jsx("span",{className:"ml-4 text-sm font-medium text-gray-500 dark:text-white/70",children:t})]}):e==="logo"?jsxRuntime.jsx("div",{className:l(a,o),...n,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-4",children:[jsxRuntime.jsxs("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-full bg-white dark:bg-white/[0.06] shadow-lg ring-1 ring-black/5",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 rounded-full animate-ping bg-blue-500/20"}),jsxRuntime.jsx("div",{className:"h-8 w-8 rounded bg-blue-500"})]}),t&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-gray-500 dark:text-white/70 animate-pulse",children:t})]})}):e==="glass"?jsxRuntime.jsx("div",{className:l(a,"bg-white/30 dark:bg-black/30 backdrop-blur-md",o),...n,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-3",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"h-8 w-8 animate-spin text-white"}),t&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-white tracking-wider",children:t})]})}):jsxRuntime.jsx("div",{className:l(a,o),...n,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-3",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"h-8 w-8 animate-spin text-blue-500"}),t&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-gray-500 dark:text-white/70",children:t})]})})}function uk({preset:e="fade",duration:t=300,useViewTransition:r=false,className:o,children:n,...a}){let[s,i]=we.useState(false);we.useEffect(()=>{if(r&&document.startViewTransition)document.startViewTransition(()=>{i(true);});else {let m=requestAnimationFrame(()=>{i(true);});return ()=>cancelAnimationFrame(m)}},[r]);let d={fade:{initial:"opacity-0",animate:"opacity-100"},"slide-up":{initial:"opacity-0 translate-y-8",animate:"opacity-100 translate-y-0"},scale:{initial:"opacity-0 scale-95",animate:"opacity-100 scale-100"},blur:{initial:"opacity-0 blur-sm",animate:"opacity-100 blur-0"},none:{initial:"",animate:""}}[e];return jsxRuntime.jsx("div",{className:l("transition-all ease-out",s?d.animate:d.initial,o),style:{transitionDuration:`${t}ms`,viewTransitionName:r?"page-content":void 0},...a,children:n})}var Rd={sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-14 w-14 text-base",xl:"h-20 w-20 text-xl"},$=we__namespace.default.forwardRef(({className:e,src:t,alt:r,fallback:o,size:n="md",...a},s)=>{let[i,c]=we.useState(false);return we.useEffect(()=>{c(false);},[t]),jsxRuntime.jsx("div",{ref:s,className:l("relative flex shrink-0 overflow-hidden rounded-full bg-gray-200 dark:bg-white/[0.06]",Rd[n],e),...a,children:t&&!i?jsxRuntime.jsx("img",{src:t,alt:r,className:"aspect-square h-full w-full object-cover",onError:()=>c(true)}):jsxRuntime.jsx("div",{className:"flex h-full w-full items-center justify-center bg-gray-100 dark:bg-white/5 text-gray-600 dark:text-white/70 font-medium",children:o||(r?r.charAt(0).toUpperCase():"?")})})});$.displayName="Avatar";var Yo=we.createContext(void 0);function Nk({type:e="single",defaultValue:t,value:r,onValueChange:o,className:n,children:a,...s}){let[i,c]=we.useState(t||(e==="multiple"?[]:"")),d=r!==void 0?r:i,m=u=>{let p;if(e==="multiple"){let g=Array.isArray(d)?d:[];g.includes(u)?p=g.filter(b=>b!==u):p=[...g,u];}else p=d===u?"":u;r===void 0&&c(p),o?.(p);};return jsxRuntime.jsx(Yo.Provider,{value:{value:d,onValueChange:m,type:e},children:jsxRuntime.jsx("div",{className:l("space-y-2",n),...s,children:a})})}var _o=we.createContext({value:"",isOpen:false});function Tk({className:e,value:t,children:r,...o}){let n=we.useContext(Yo),a=Array.isArray(n?.value)?n?.value.includes(t):n?.value===t;return jsxRuntime.jsx(_o.Provider,{value:{value:t,isOpen:!!a},children:jsxRuntime.jsx("div",{className:l("overflow-hidden rounded-2xl border border-gray-200 dark:border-white/5 bg-gray-50 dark:bg-white/[0.03] transition-all duration-200",a&&"bg-white dark:bg-white/[0.04] border-gray-300 dark:border-white/10",e),...o,children:r})})}function Ck({className:e,children:t,...r}){let o=we.useContext(Yo),{value:n,isOpen:a}=we.useContext(_o);return jsxRuntime.jsxs("button",{type:"button",onClick:()=>o?.onValueChange(n),"aria-expanded":a,"aria-controls":`accordion-content-${n}`,id:`accordion-trigger-${n}`,className:l("flex w-full items-center justify-between px-4 py-3 text-sm font-medium text-gray-900 dark:text-white transition-all hover:text-gray-700 dark:hover:text-white/90 focus:outline-none",e),...r,children:[t,jsxRuntime.jsx(lucideReact.ChevronDown,{className:l("h-4 w-4 shrink-0 text-gray-400 dark:text-white/50 transition-transform duration-200",a&&"rotate-180 text-gray-900 dark:text-white")})]})}function Mk({className:e,children:t,...r}){let{isOpen:o,value:n}=we.useContext(_o);return o?jsxRuntime.jsx("div",{id:`accordion-content-${n}`,role:"region","aria-labelledby":`accordion-trigger-${n}`,className:l("px-4 pb-3 pt-0 text-sm text-gray-600 dark:text-white/70 animate-in slide-in-from-top-1 fade-in duration-200",e),...r,children:t}):null}we__namespace.default.createContext(null);var wr=we__namespace.default.forwardRef(({className:e,wrapperClassName:t,rounded:r=false,maxHeight:o,...n},a)=>jsxRuntime.jsx(it,{className:l("w-full",r&&"rounded-2xl border border-white/10",t),style:{maxHeight:o},orientation:o?"both":"horizontal",scrollbarSize:"sm",children:jsxRuntime.jsx("table",{ref:a,className:l("w-full caption-bottom text-sm text-left",e),...n})}));wr.displayName="Table";var yr=we__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("thead",{ref:r,className:l("bg-white/[0.02] text-white/55",e),...t}));yr.displayName="TableHeader";var kr=we__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("tbody",{ref:r,className:l("[&_tr:last-child]:border-0",e),...t}));kr.displayName="TableBody";var dt=we__namespace.default.forwardRef(({className:e,hoverable:t=true,optimized:r=false,...o},n)=>jsxRuntime.jsx("tr",{ref:n,className:l("border-t border-white/10 transition-colors data-[state=selected]:bg-white/[0.04]",t&&"hover:bg-white/[0.02]",e),style:r?{contentVisibility:"auto",containIntrinsicSize:"0 56px"}:void 0,...o}));dt.displayName="TableRow";var rt=we__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("th",{ref:r,className:l("h-10 px-5 py-3 text-left align-middle font-semibold text-white/55 [&:has([role=checkbox])]:pr-0 whitespace-nowrap",e),...t}));rt.displayName="TableHead";var We=we__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("td",{ref:r,className:l("p-5 align-middle [&:has([role=checkbox])]:pr-0 text-white/85 whitespace-nowrap",e),...t}));We.displayName="TableCell";function Fk({data:e,columns:t,searchPlaceholder:r="Search...",searchKeys:o,onRowClick:n,className:a,maxHeight:s,rounded:i=true}){let[c,d]=we.useState(""),[m,u]=we.useState({key:"",direction:null}),p=we.useMemo(()=>{let b=[...e];return c&&o&&(b=b.filter(x=>o.some(h=>String(x[h]??"").toLowerCase().includes(c.toLowerCase())))),m.key&&m.direction&&b.sort((x,h)=>{let f=x[m.key],w=h[m.key];return f==null||w===void 0||w===null?0:f<w?m.direction==="asc"?-1:1:f>w?m.direction==="asc"?1:-1:0}),b},[e,c,o,m]),g=b=>{u(x=>({key:b,direction:x.key===b&&x.direction==="asc"?"desc":"asc"}));};return jsxRuntime.jsxs("div",{className:l("space-y-4",a),children:[o&&jsxRuntime.jsx("div",{className:"relative max-w-sm",children:jsxRuntime.jsx(kt,{placeholder:r,value:c,onChange:b=>d(b.target.value),leftIcon:jsxRuntime.jsx(lucideReact.Search,{className:"w-4 h-4 text-white/40"})})}),jsxRuntime.jsxs(wr,{rounded:i,maxHeight:s,children:[jsxRuntime.jsx(yr,{children:jsxRuntime.jsx(dt,{children:t.map(b=>jsxRuntime.jsx(rt,{className:l(b.sortable&&"cursor-pointer select-none hover:text-cyan-500 transition-colors",b.className),onClick:()=>b.sortable&&g(b.key),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[b.header,b.sortable&&jsxRuntime.jsx("span",{className:"text-white/30",children:m.key===b.key?m.direction==="asc"?jsxRuntime.jsx(lucideReact.ArrowUp,{className:"w-3 h-3 text-cyan-500"}):jsxRuntime.jsx(lucideReact.ArrowDown,{className:"w-3 h-3 text-cyan-500"}):jsxRuntime.jsx(lucideReact.ArrowUpDown,{className:"w-3 h-3"})})]})},String(b.key)))})}),jsxRuntime.jsxs(kr,{children:[p.map((b,x)=>jsxRuntime.jsx(dt,{onClick:()=>n?.(b),className:l(n&&"cursor-pointer hover:bg-white/[0.03] transition-colors group"),children:t.map(h=>jsxRuntime.jsx(We,{className:h.className,children:h.render?h.render(b):b[h.key]},String(h.key)))},x)),p.length===0&&jsxRuntime.jsx(dt,{children:jsxRuntime.jsxs(We,{colSpan:t.length,className:"h-32 text-center text-white/40",children:['No results found for "',c,'"']})})]})]})]})}var qo=we__namespace.default.forwardRef(({className:e,containerClassName:t,alt:r,src:o,fallback:n,onLoad:a,onError:s,...i},c)=>{let[d,m]=we.useState(true),[u,p]=we.useState(false),g=x=>{m(false),a?.(x);},b=x=>{m(false),p(true),s?.(x);};return u&&n?jsxRuntime.jsx(jsxRuntime.Fragment,{children:n}):jsxRuntime.jsxs("div",{className:l("relative overflow-hidden rounded-2xl bg-gray-100 dark:bg-white/[0.02] border border-gray-200 dark:border-white/10",t),children:[d&&jsxRuntime.jsx(Sn,{className:"absolute inset-0 h-full w-full"}),jsxRuntime.jsx("img",{ref:c,src:o,alt:r,onLoad:g,onError:b,className:l("h-full w-full object-cover transition-opacity duration-300",d?"opacity-0":"opacity-100",e),...i})]})});qo.displayName="Image";var Fd=classVarianceAuthority.cva("flex flex-col gap-4 rounded-2xl border p-4 transition-all duration-200",{variants:{variant:{default:"bg-white border-gray-200 dark:bg-white/[0.03] dark:border-white/10",glass:"backdrop-blur-md bg-white/80 border-white/20 dark:bg-black/40 dark:border-white/10"}},defaultVariants:{variant:"default"}}),$d=we__namespace.default.forwardRef(({className:e,variant:t,user:r,onFollow:o,onMessage:n,...a},s)=>jsxRuntime.jsxs("div",{ref:s,className:l(Fd({variant:t,className:e})),...a,children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between",children:[jsxRuntime.jsxs("div",{className:"flex gap-3",children:[jsxRuntime.jsx($,{src:r.avatarSrc,alt:r.name,size:"lg"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:r.name}),r.role&&jsxRuntime.jsx("span",{className:"text-xs text-gray-500 dark:text-white/50",children:r.role}),r.email&&jsxRuntime.jsx("div",{className:"text-xs text-gray-400 dark:text-white/40 mt-0.5",children:r.email})]})]}),o&&jsxRuntime.jsx(L,{size:"sm",variant:"outline",onClick:o,children:"Follow"})]}),r.bio&&jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 line-clamp-2",children:r.bio}),r.stats&&jsxRuntime.jsx("div",{className:"flex gap-4 border-t border-gray-100 pt-3 dark:border-white/5",children:r.stats.map((i,c)=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("span",{className:"text-xs font-medium text-gray-900 dark:text-white",children:i.value}),jsxRuntime.jsx("span",{className:"text-[10px] text-gray-500 dark:text-white/40",children:i.label})]},c))}),n&&jsxRuntime.jsx(L,{className:"w-full mt-2",onClick:n,children:"Message"})]}));$d.displayName="UserPreview";var Yd=classVarianceAuthority.cva("relative pl-8 pb-8 last:pb-0",{variants:{status:{default:"[&>div:first-child]:bg-gray-200 dark:[&>div:first-child]:bg-white/20",active:"[&>div:first-child]:bg-blue-500",success:"[&>div:first-child]:bg-emerald-500",error:"[&>div:first-child]:bg-rose-500"}},defaultVariants:{status:"default"}}),_d=we__namespace.default.forwardRef(({className:e,status:t,title:r,date:o,description:n,icon:a,isLast:s,...i},c)=>jsxRuntime.jsxs("div",{ref:c,className:l(Yd({status:t,className:e})),...i,children:[!s&&jsxRuntime.jsx("div",{className:"absolute left-[11px] top-[24px] bottom-0 w-px bg-gray-200 dark:bg-white/[0.06]"}),jsxRuntime.jsx("div",{className:l("absolute left-0 top-1.5 flex h-6 w-6 items-center justify-center rounded-full border-2 border-white dark:border-black ring-1 ring-transparent transition-colors",t==="active"?"bg-blue-500 ring-blue-500/30":t==="success"?"bg-emerald-500 ring-emerald-500/30":t==="error"?"bg-rose-500 ring-rose-500/30":"bg-gray-200 dark:bg-white/20"),children:a&&jsxRuntime.jsx("span",{className:"text-white text-[10px]",children:a})}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:r}),o&&jsxRuntime.jsx("span",{className:"text-xs text-gray-500 dark:text-white/40",children:o})]}),n&&jsxRuntime.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:n})]})]}));_d.displayName="TimelineItem";var nN=({children:e,className:t})=>jsxRuntime.jsx("div",{className:l("flex flex-col",t),children:e});var zn=({node:e,depth:t=0,onSelect:r})=>{let[o,n]=we.useState(false),a=e.children&&e.children.length>0,s=i=>{i.stopPropagation(),a&&n(!o),r?.(e);};return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:l("flex items-center gap-2 rounded-lg px-2 py-1.5 text-sm text-gray-700 transition-colors hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-white/[0.03] cursor-pointer"),style:{paddingLeft:`${t*12+8}px`},onClick:s,children:[a?jsxRuntime.jsx("span",{className:"text-gray-400 dark:text-white/40",children:o?jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})}):jsxRuntime.jsx("span",{className:"w-4"}),e.icon?jsxRuntime.jsx("span",{className:"text-gray-500 dark:text-white/50",children:e.icon}):jsxRuntime.jsx("span",{className:"text-blue-500 dark:text-blue-400",children:a?o?jsxRuntime.jsx(lucideReact.FolderOpen,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Folder,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"})}),jsxRuntime.jsx("span",{className:"truncate",children:e.label})]}),o&&a&&jsxRuntime.jsx("div",{className:"animate-in slide-in-from-top-1 fade-in duration-200",children:e.children.map(i=>jsxRuntime.jsx(zn,{node:i,depth:t+1,onSelect:r},i.id))})]})},uN=({data:e,className:t,onSelect:r})=>jsxRuntime.jsx("div",{className:l("w-full select-none",t),children:e.map(o=>jsxRuntime.jsx(zn,{node:o,onSelect:r},o.id))});function Kn({title:e,view:t="board",onViewChange:r,onFilter:o,onSort:n,onAddColumn:a,canUndo:s,canRedo:i,onUndo:c,onRedo:d,className:m}){let u=[{id:"board",icon:lucideReact.Layout,label:"Board"},{id:"list",icon:lucideReact.List,label:"List"},{id:"calendar",icon:lucideReact.Calendar,label:"Calendar"},{id:"timeline",icon:lucideReact.Clock,label:"Timeline"}];return jsxRuntime.jsxs("div",{className:l("flex items-center justify-between mb-8",m),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-6",children:[jsxRuntime.jsx("h1",{className:"text-2xl font-bold text-white tracking-tight",children:e}),jsxRuntime.jsx("div",{className:"flex items-center bg-white/5 rounded-xl p-1",children:u.map(p=>jsxRuntime.jsxs("button",{onClick:()=>r?.(p.id),className:l("flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs font-medium transition-all",t===p.id?"bg-white/10 text-white shadow-lg":"text-white/40 hover:text-white/60"),children:[jsxRuntime.jsx(p.icon,{className:"h-3.5 w-3.5"}),p.label]},p.id))})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1 mr-2",children:[jsxRuntime.jsx(L,{variant:"ghost",size:"icon",onClick:c,disabled:!s,className:"h-8 w-8 text-white/40 disabled:opacity-20",children:jsxRuntime.jsx(lucideReact.Undo2,{className:"h-4 w-4"})}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",onClick:d,disabled:!i,className:"h-8 w-8 text-white/40 disabled:opacity-20",children:jsxRuntime.jsx(lucideReact.Redo2,{className:"h-4 w-4"})})]}),jsxRuntime.jsxs(L,{variant:"ghost",size:"sm",onClick:o,className:"gap-2 text-white/60",children:[jsxRuntime.jsx(lucideReact.Filter,{className:"h-4 w-4"}),"Filter"]}),jsxRuntime.jsxs(L,{variant:"ghost",size:"sm",onClick:n,className:"gap-2 text-white/60",children:[jsxRuntime.jsx(lucideReact.SortAsc,{className:"h-4 w-4"}),"Sort"]}),jsxRuntime.jsx("div",{className:"w-px h-4 bg-white/10 mx-2"}),jsxRuntime.jsxs(L,{size:"sm",onClick:a,className:"gap-2",children:[jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"}),"Add Column"]}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-9 w-9 text-white/40",children:jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:"h-4 w-4"})})]})]})}function $n({count:e,limit:t,className:r}){if(!t)return null;let o=e>t,n=Math.min(e/t*100,100);return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3",r),children:[jsxRuntime.jsx("div",{className:"flex-1 h-1 bg-white/5 rounded-full overflow-hidden",children:jsxRuntime.jsx("div",{className:l("h-full transition-all duration-500",o?"bg-red-500":n>80?"bg-orange-500":"bg-blue-500"),style:{width:`${n}%`}})}),jsxRuntime.jsxs("div",{className:l("flex items-center gap-1.5 text-[10px] font-bold px-2 py-0.5 rounded-full",o?"bg-red-500/20 text-red-400":"bg-white/5 text-white/40"),children:[o&&jsxRuntime.jsx(lucideReact.AlertCircle,{className:"h-3 w-3"}),e,"/",t]})]})}var Jo=we__namespace.default.memo(({task:e,isSelected:t,showTimer:r,onEdit:o,onDelete:n,draggable:a=true,activeTimerTaskId:s,selectable:i,cardClassName:c,onTaskClick:d,onTaskSelectionChange:m,onTaskTimerToggle:u,onDragStart:p,onDragOver:g,onDrop:b,renderCard:x})=>{if(x)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:x(e)});let h=f=>{switch(f){case "urgent":return "danger";case "high":return "warning";case "medium":return "info";case "low":return "success";default:return "neutral"}};return jsxRuntime.jsx(ie,{onClick:f=>d?.(f,e),draggable:a,onDragStart:p,onDragOver:g,onDrop:b,className:l("p-6 border border-white/10 bg-white/[0.03] hover:bg-white/[0.06] transition-all duration-200 rounded-2xl group cursor-grab active:cursor-grabbing",e.blockedBy&&e.blockedBy.length>0&&"border-red-500/30 bg-red-500/[0.02]",t&&"ring-2 ring-cyan-500/50 bg-cyan-500/[0.02]",c),children:jsxRuntime.jsxs("div",{className:"flex flex-col gap-3",children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[i&&jsxRuntime.jsx(Po,{checked:t,onChange:f=>{m?.(t?[]:[e.id]);},onClick:f=>f.stopPropagation(),className:"mr-1"}),e.blockedBy&&e.blockedBy.length>0&&jsxRuntime.jsx(lucideReact.Lock,{className:"h-3.5 w-3.5 text-red-500 flex-shrink-0"}),jsxRuntime.jsx(ve,{className:l("font-medium text-sm leading-tight group-hover:text-cyan-400 transition-colors truncate",e.blockedBy&&e.blockedBy.length>0&&"text-red-400/80"),children:e.title})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[n&&jsxRuntime.jsx("button",{onClick:f=>{f.stopPropagation(),n(e.id);},className:"p-1 rounded-md hover:bg-red-500/20 text-white/20 hover:text-red-400 transition-colors",children:jsxRuntime.jsx(lucideReact.Trash2,{className:"h-3.5 w-3.5"})}),a&&jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4 text-white/20 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0"})]})]}),e.description&&jsxRuntime.jsx(ve,{className:"text-xs text-white/50 line-clamp-2",children:e.description}),e.progress!==void 0&&jsxRuntime.jsxs("div",{className:"space-y-1.5",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between text-[10px]",children:[jsxRuntime.jsx("span",{className:"text-white/30 uppercase font-bold tracking-wider",children:"Progress"}),jsxRuntime.jsxs("span",{className:"text-white/50",children:[e.progress,"%"]})]}),jsxRuntime.jsx("div",{className:"h-1 w-full bg-white/[0.03] rounded-full overflow-hidden",children:jsxRuntime.jsx("div",{className:"h-full bg-cyan-500 transition-all duration-500",style:{width:`${e.progress}%`}})})]}),jsxRuntime.jsxs("div",{className:"flex flex-wrap gap-2 mt-1",children:[e.priority&&jsxRuntime.jsx(ze,{variant:h(e.priority),className:"text-[10px] px-1.5 py-0 uppercase font-bold",children:e.priority}),e.tags?.map(f=>jsxRuntime.jsx(ze,{variant:"neutral",className:"text-[10px] px-1.5 py-0 bg-white/[0.03] border-white/5",children:f},f))]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between mt-2 pt-3 border-t border-white/5",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-white/30",children:[e.timeSpent!==void 0&&jsxRuntime.jsxs("div",{className:l("flex items-center gap-1 px-1.5 py-0.5 rounded-md transition-colors",s===e.id?"bg-cyan-500/20 text-cyan-400":"bg-white/[0.03]"),children:[s===e.id?jsxRuntime.jsx(lucideReact.Pause,{className:"h-2.5 w-2.5 cursor-pointer hover:scale-110 transition-transform",onClick:f=>{f.stopPropagation(),u?.(e.id);}}):jsxRuntime.jsx(lucideReact.Play,{className:"h-2.5 w-2.5 cursor-pointer hover:scale-110 transition-transform",onClick:f=>{f.stopPropagation(),u?.(e.id);}}),jsxRuntime.jsxs("span",{className:"font-mono",children:[Math.floor(e.timeSpent/3600),"h ",Math.floor(e.timeSpent%3600/60),"m"]})]}),e.comments!==void 0&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(lucideReact.MessageSquare,{className:"h-3 w-3"}),e.comments]}),e.attachments!==void 0&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-3 w-3"}),e.attachments]}),e.dueDate&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(lucideReact.Clock,{className:"h-3 w-3"}),e.dueDate]})]}),e.assignee&&jsxRuntime.jsx("div",{className:"flex -space-x-2",children:jsxRuntime.jsx("div",{className:"h-6 w-6 rounded-full border-2 border-[#0a0a0a] bg-white/[0.06] flex items-center justify-center text-[10px] font-bold overflow-hidden",children:e.assignee.avatar?jsxRuntime.jsx("img",{src:e.assignee.avatar,alt:e.assignee.name,className:"h-full w-full object-cover"}):e.assignee.name[0]})})]})]})})});Jo.displayName="KanbanCard";function Qo({column:e,tasks:t,onAddTask:r,onCollapse:o,onTaskClick:n,onAction:a,onDragStart:s,onDragOver:i,onDrop:c,isCollapsed:d,children:m,className:u}){return jsxRuntime.jsxs("div",{className:l("flex flex-col h-full transition-all duration-300",d?"w-12":"w-80",u),onDragOver:p=>i?.(p),onDrop:p=>c?.(p),onDragStart:p=>s?.(p,e.id,"column"),draggable:!d,children:[jsxRuntime.jsxs("div",{className:l("flex items-center justify-between mb-4 px-2",d&&"flex-col gap-4"),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[jsxRuntime.jsx("button",{onClick:()=>o?.(e.id),className:"p-1 rounded hover:bg-white/5 text-white/40",children:d?jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"})}),!d&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:e.color||"#3b82f6"}}),jsxRuntime.jsx("h3",{className:"font-bold text-sm text-white truncate",children:e.title}),jsxRuntime.jsx("span",{className:"text-[10px] font-bold px-1.5 py-0.5 rounded-md bg-white/5 text-white/40",children:t.length})]})]}),!d&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>r?.(e.id),children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"})}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>a?.("more"),children:jsxRuntime.jsx(lucideReact.MoreVertical,{className:"h-4 w-4"})})]})]}),!d&&e.limit&&jsxRuntime.jsx("div",{className:"px-2 mb-4",children:jsxRuntime.jsx($n,{count:t.length,limit:e.limit})}),jsxRuntime.jsx("div",{className:l("flex-1 overflow-y-auto min-h-0 px-2 space-y-3 custom-scrollbar",d&&"hidden"),children:m||t.map(p=>jsxRuntime.jsx(Jo,{task:p,onTaskClick:(g,b)=>n?.(b),onDragStart:g=>s?.(g,p.id,"task"),onDragOver:g=>i?.(g,p.id),onDrop:g=>c?.(g,p.id)},p.id))}),d&&jsxRuntime.jsx("div",{className:"flex-1 flex items-center justify-center",children:jsxRuntime.jsx("span",{className:"rotate-90 whitespace-nowrap text-[10px] font-bold uppercase tracking-widest text-white/20",children:e.title})})]})}function oo({tasks:e,columns:t,onTaskClick:r,className:o}){let n=a=>t.find(s=>s.id===a);return jsxRuntime.jsx("div",{className:l("bg-white/[0.02] border border-white/5 rounded-2xl overflow-hidden",o),children:jsxRuntime.jsxs(wr,{children:[jsxRuntime.jsx(yr,{children:jsxRuntime.jsxs(dt,{className:"hover:bg-transparent border-white/5",children:[jsxRuntime.jsx(rt,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Task"}),jsxRuntime.jsx(rt,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Status"}),jsxRuntime.jsx(rt,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Priority"}),jsxRuntime.jsx(rt,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Assignee"}),jsxRuntime.jsx(rt,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Due Date"})]})}),jsxRuntime.jsx(kr,{children:e.map(a=>{let s=n(a.columnId);return jsxRuntime.jsxs(dt,{className:"border-white/5 hover:bg-white/[0.03] cursor-pointer transition-colors",onClick:()=>r?.(a),children:[jsxRuntime.jsx(We,{className:"font-medium text-white",children:a.title}),jsxRuntime.jsx(We,{children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:s?.color||"#3b82f6"}}),jsxRuntime.jsx("span",{className:"text-xs text-white/60",children:s?.title})]})}),jsxRuntime.jsx(We,{children:jsxRuntime.jsx(ze,{variant:a.priority==="urgent"?"danger":a.priority==="high"?"warning":"info",className:"text-[10px] uppercase",children:a.priority||"medium"})}),jsxRuntime.jsx(We,{children:a.assignee&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx($,{src:a.assignee.avatar,alt:a.assignee.name,size:"sm"}),jsxRuntime.jsx("span",{className:"text-xs text-white/60",children:a.assignee.name})]})}),jsxRuntime.jsx(We,{className:"text-xs text-white/40",children:a.dueDate?new Date(a.dueDate).toLocaleDateString():"-"})]},a.id)})})]})})}function Wn({tasks:e,className:t}){return jsxRuntime.jsxs("div",{className:l("p-8 bg-white/[0.02] border border-white/5 rounded-2xl flex flex-col items-center justify-center min-h-[400px]",t),children:[jsxRuntime.jsx("div",{className:"h-12 w-12 rounded-full bg-blue-500/10 flex items-center justify-center mb-4",children:jsxRuntime.jsx("div",{className:"h-6 w-6 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"})}),jsxRuntime.jsx("h3",{className:"text-lg font-bold text-white mb-2",children:"Timeline View"}),jsxRuntime.jsxs("p",{className:"text-sm text-white/40 text-center max-w-xs",children:["The timeline view is currently being optimized for high-performance rendering of ",e.length," tasks."]})]})}function Yn({tasks:e,columns:t,onTaskClick:r,className:o}){return jsxRuntime.jsx(oo,{tasks:e,columns:t,onTaskClick:r,className:o})}function _n({tasks:e,onTaskClick:t,onAddTask:r,className:o}){let[n,a]=we.useState(new Date),s=(f,w)=>new Date(f,w+1,0).getDate(),i=(f,w)=>new Date(f,w,1).getDay(),c=n.getFullYear(),d=n.getMonth(),m=s(c,d),u=i(c,d),p=()=>a(new Date(c,d-1,1)),g=()=>a(new Date(c,d+1,1)),b=["January","February","March","April","May","June","July","August","September","October","November","December"],x=[];for(let f=0;f<u;f++)x.push(null);for(let f=1;f<=m;f++)x.push(new Date(c,d,f));let h=f=>e.filter(w=>{if(!w.dueDate)return false;let v=new Date(w.dueDate);return v.getDate()===f.getDate()&&v.getMonth()===f.getMonth()&&v.getFullYear()===f.getFullYear()});return jsxRuntime.jsxs("div",{className:l("flex flex-col h-full",o),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-6",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[jsxRuntime.jsxs(Em,{level:3,className:"text-white",children:[b[d]," ",c]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(L,{variant:"ghost",size:"sm",onClick:p,children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(L,{variant:"ghost",size:"sm",onClick:g,children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]}),jsxRuntime.jsx(L,{variant:"ghost",size:"sm",onClick:()=>a(new Date),children:"Today"})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-7 gap-px bg-white/5 border border-white/5 rounded-2xl overflow-hidden flex-1",children:[["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(f=>jsxRuntime.jsx("div",{className:"bg-white/[0.02] p-3 text-center",children:jsxRuntime.jsx(ve,{size:"xs",className:"text-white/40 font-medium uppercase tracking-wider",children:f})},f)),x.map((f,w)=>jsxRuntime.jsx("div",{className:l("bg-gray-900/50 min-h-[120px] p-2 group transition-colors hover:bg-white/[0.02]",!f&&"bg-transparent"),children:f&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-2",children:[jsxRuntime.jsx("span",{className:l("text-xs font-medium w-6 h-6 flex items-center justify-center rounded-full",f.toDateString()===new Date().toDateString()?"bg-blue-500 text-white":"text-white/40"),children:f.getDate()}),jsxRuntime.jsx("button",{onClick:()=>r?.(f),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-white/10 rounded-lg transition-all",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-3 w-3 text-white/40"})})]}),jsxRuntime.jsx("div",{className:"space-y-1",children:h(f).map(v=>jsxRuntime.jsx("div",{onClick:()=>t?.(v),className:"px-2 py-1 rounded-lg bg-blue-500/10 border border-blue-500/20 cursor-pointer hover:bg-blue-500/20 transition-all",children:jsxRuntime.jsx(ve,{size:"xs",className:"text-blue-400 truncate",children:v.title})},v.id))})]})},w))]})]})}function Em({children:e,level:t,className:r}){let o=`h${t}`;return jsxRuntime.jsx(o,{className:l("font-semibold",r),children:e})}function Xn({children:e,...t}){return jsxRuntime.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden rounded-2xl bg-white dark:bg-black/90 text-gray-900 dark:text-white",children:jsxRuntime.jsx(Io,{usePopover:false,...t,children:e})})}function p1({children:e,open:t,onOpenChange:r,...o}){let n=we.useRef(null);we.useEffect(()=>{let s=i=>{i.key==="Escape"&&r(false);};return t&&(document.addEventListener("keydown",s),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",s),document.body.style.overflow="unset";}},[t,r]);let a=s=>{s.target===n.current&&r(false);};return t?reactDom.createPortal(jsxRuntime.jsx("div",{ref:n,onClick:a,className:"fixed inset-0 z-[100] flex items-start justify-center bg-black/60 backdrop-blur-sm animate-in fade-in duration-200 pt-[20vh]",children:jsxRuntime.jsx("div",{className:"relative w-full max-w-lg overflow-hidden rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-black/90 shadow-2xl animate-in zoom-in-95 duration-200",children:jsxRuntime.jsx(Io,{usePopover:false,...o,children:e})})}),document.body):null}function qn({className:e,...t}){return jsxRuntime.jsxs("div",{className:"flex items-center border-b border-gray-200 dark:border-white/10 px-3","cmdk-input-wrapper":"",children:[jsxRuntime.jsx(lucideReact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsxRuntime.jsx(fn,{className:l("flex h-12 w-full rounded-md bg-transparent py-3 text-sm text-gray-900 dark:text-white outline-none placeholder:text-gray-400 dark:placeholder:text-white/50 disabled:cursor-not-allowed disabled:opacity-50 border-none focus:ring-0 px-0",e),...t})]})}function Gn({className:e,...t}){return jsxRuntime.jsx(gn,{className:l("max-h-[300px] overflow-y-auto overflow-x-hidden p-2",e),...t})}function f1(e){return jsxRuntime.jsx(hn,{className:"py-6 text-center text-sm",...e})}function jn({children:e,heading:t,className:r,...o}){return jsxRuntime.jsxs("div",{className:l("overflow-hidden p-1 text-gray-900 dark:text-white",r),...o,children:[t&&jsxRuntime.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-gray-500 dark:text-white/50",children:t}),e]})}function Jn({className:e,...t}){return jsxRuntime.jsx(bn,{className:l("relative flex cursor-default select-none items-center rounded-2xl px-2 py-1.5 text-sm outline-none text-gray-900 dark:text-white aria-selected:bg-gray-100 dark:aria-selected:bg-white/[0.06] aria-selected:text-gray-900 dark:aria-selected:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t})}function g1({className:e,...t}){return jsxRuntime.jsx("span",{className:l("ml-auto text-xs tracking-widest text-gray-400 dark:text-white/50",e),...t})}function Zn({onSearchChange:e,onFilterChange:t,onSortChange:r,onViewChange:o,onGroupChange:n,priorityOptions:a=[],tagOptions:s=[],assigneeOptions:i=[],viewOptions:c=["board","list","calendar","timeline"],sortOptions:d=[],groupOptions:m=[],savedFilters:u=[],onSaveFilter:p,className:g}){let[b,x]=we.useState(""),[h,f]=we.useState({}),[w,v]=we.useState("board"),y=(C,T)=>{let E=h[C]||[],A=E.includes(T)?E.filter(S=>S!==T):[...E,T],M={...h,[C]:A};A.length===0&&delete M[C],f(M),t?.(M);},k=()=>{f({}),t?.({}),x(""),e?.("");},N=Object.values(h).flat().length;return jsxRuntime.jsxs(ie,{className:l("p-2 flex flex-wrap items-center gap-3 bg-white/[0.02] border-white/5",g),children:[jsxRuntime.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-white/20"}),jsxRuntime.jsx("input",{type:"text",placeholder:"Search tasks...",className:"w-full pl-10 pr-4 py-2 text-sm rounded-2xl border border-white/10 bg-white/[0.03] focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all placeholder:text-white/20 text-white",value:b,onChange:C=>{x(C.target.value),e?.(C.target.value);}})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(ta,{label:"Priority",options:a,selected:h.priority||[],onSelect:C=>y("priority",C)}),jsxRuntime.jsx(ta,{label:"Tags",options:s,selected:h.tags||[],onSelect:C=>y("tags",C)}),jsxRuntime.jsx(ta,{label:"Assignee",options:i,selected:h.assignee||[],onSelect:C=>y("assignee",C)}),jsxRuntime.jsx("div",{className:"w-px h-4 bg-white/10 mx-1"}),jsxRuntime.jsxs(Ze,{children:[jsxRuntime.jsx(et,{children:jsxRuntime.jsxs(L,{variant:"ghost",size:"sm",className:"h-9 gap-2 text-white/60",children:[jsxRuntime.jsx(lucideReact.SortAsc,{className:"h-4 w-4"}),"Sort"]})}),jsxRuntime.jsx(tt,{className:"w-48 p-1 bg-gray-900 border-white/10",children:d.map(C=>jsxRuntime.jsx("button",{className:"w-full flex items-center gap-2 px-3 py-2 text-xs text-white/60 hover:text-white hover:bg-white/5 rounded-lg text-left",onClick:()=>r?.(C.value,"asc"),children:C.label},C.value))})]}),N>0&&jsxRuntime.jsxs(L,{variant:"ghost",size:"sm",onClick:k,className:"h-9 px-3 text-xs text-white/40 hover:text-white gap-2",children:[jsxRuntime.jsx(lucideReact.X,{className:"h-3.5 w-3.5"})," Clear",jsxRuntime.jsx(ze,{variant:"neutral",className:"bg-white/[0.06] border-white/10 ml-1",children:N})]})]})]})}function ta({label:e,options:t,selected:r,onSelect:o}){return jsxRuntime.jsxs(Ze,{children:[jsxRuntime.jsx(et,{children:jsxRuntime.jsxs(L,{variant:"ghost",size:"sm",className:l("h-9 gap-2 text-xs transition-all",r.length>0?"bg-blue-500/10 text-blue-400":"text-white/60 hover:text-white"),children:[e,r.length>0?jsxRuntime.jsx(ze,{variant:"info",className:"h-4 min-w-[16px] px-1 bg-blue-500 text-white border-none",children:r.length}):jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-3.5 w-3.5 opacity-40"})]})}),jsxRuntime.jsx(tt,{className:"w-56 p-0 bg-gray-900 border-white/10 shadow-2xl",children:jsxRuntime.jsxs(Xn,{children:[jsxRuntime.jsx(qn,{placeholder:`Search ${e.toLowerCase()}...`,className:"border-none"}),jsxRuntime.jsx(Gn,{className:"max-h-[240px]",children:jsxRuntime.jsx(jn,{children:t.map(n=>jsxRuntime.jsxs(Jn,{value:n.value,onClick:()=>o(n.value),className:"flex items-center justify-between py-2 px-3 cursor-pointer hover:bg-white/5",children:[jsxRuntime.jsx("span",{className:"text-xs text-white/80",children:n.label}),r.includes(n.value)&&jsxRuntime.jsx(lucideReact.Check,{className:"h-3.5 w-3.5 text-blue-500"})]},n.value))})})]})})]})}function ao({isOpen:e,onClose:t,children:r,className:o}){let n=we.useRef(null),[a,s]=we__namespace.default.useState(false);we.useEffect(()=>{s(true);},[]),we.useEffect(()=>{let c=n.current;c&&(e?c.open||(c.showModal(),document.body.style.overflow="hidden"):c.open&&(c.close(),document.body.style.overflow="unset"));},[e,a]),we.useEffect(()=>{let c=n.current;if(!c)return;let d=m=>{m.preventDefault(),t();};return c.addEventListener("cancel",d),()=>c.removeEventListener("cancel",d)},[t,a]);let i=c=>{c.target===n.current&&t();};return a?reactDom.createPortal(jsxRuntime.jsx("dialog",{ref:n,onClick:i,className:l("fixed inset-0 z-[100] m-auto bg-transparent p-0 backdrop:bg-black/60 backdrop:backdrop-blur-sm open:flex open:items-center open:justify-center","animate-in fade-in duration-200",o),children:jsxRuntime.jsxs("div",{className:l("relative w-full max-w-lg scale-100 gap-4 border border-zinc-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A]/90 p-6 shadow-2xl backdrop-blur-xl transition-all sm:rounded-2xl","animate-in fade-in zoom-in-95 duration-200 slide-in-from-bottom-2"),children:[r,jsxRuntime.jsxs("button",{onClick:t,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20 disabled:pointer-events-none",children:[jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-900 dark:text-white",children:[jsxRuntime.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsxRuntime.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})}),document.body):null}function no({className:e,children:t}){return jsxRuntime.jsx("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left mb-4",e),children:t})}function so({className:e,children:t}){return jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),children:t})}function es({className:e,children:t}){return jsxRuntime.jsx(Qe,{as:"h2",className:l("text-lg font-semibold leading-none tracking-tight",e),children:t})}function z1({className:e,children:t}){return jsxRuntime.jsx(ve,{variant:"muted",className:l("text-sm",e),children:t})}function ts({items:e,onToggle:t,className:r}){if(!e||e.length===0)return null;let o=e.filter(a=>a.completed).length,n=o/e.length*100;return jsxRuntime.jsxs("div",{className:l("space-y-3",r),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between text-[10px] text-white/40 uppercase tracking-wider font-bold",children:[jsxRuntime.jsx("span",{children:"Checklist"}),jsxRuntime.jsxs("span",{children:[o,"/",e.length]})]}),jsxRuntime.jsx("div",{className:"h-1 w-full bg-white/5 rounded-full overflow-hidden",children:jsxRuntime.jsx("div",{className:"h-full bg-blue-500 transition-all duration-500",style:{width:`${n}%`}})}),jsxRuntime.jsx("div",{className:"space-y-2",children:e.map(a=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2 group cursor-pointer",onClick:()=>t?.(a.id),children:[a.completed?jsxRuntime.jsx(lucideReact.CheckSquare,{className:"h-4 w-4 text-blue-500"}):jsxRuntime.jsx(lucideReact.Square,{className:"h-4 w-4 text-white/20 group-hover:text-white/40"}),jsxRuntime.jsx("span",{className:l("text-sm transition-colors",a.completed?"text-white/40 line-through":"text-white/80"),children:a.title})]},a.id))})]})}function rs({comments:e,onAddComment:t,className:r}){let[o,n]=we.useState(""),a=()=>{o.trim()&&(t?.(o),n(""));};return jsxRuntime.jsxs("div",{className:l("space-y-6",r),children:[jsxRuntime.jsx("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold",children:"Comments"}),jsxRuntime.jsx("div",{className:"flex gap-3",children:jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx(hr,{placeholder:"Write a comment...",value:o,onChange:s=>n(s.target.value),className:"min-h-[80px] bg-white/[0.03] border-white/10 text-sm"}),jsxRuntime.jsx("div",{className:"flex justify-end mt-2",children:jsxRuntime.jsxs(L,{size:"sm",onClick:a,disabled:!o.trim(),className:"gap-2",children:[jsxRuntime.jsx(lucideReact.Send,{className:"h-3.5 w-3.5"}),"Comment"]})})]})}),jsxRuntime.jsx("div",{className:"space-y-6",children:e.map(s=>jsxRuntime.jsxs("div",{className:"flex gap-3",children:[jsxRuntime.jsx($,{src:s.user.avatar,alt:s.user.name,size:"sm"}),jsxRuntime.jsxs("div",{className:"flex-1 bg-white/[0.03] border border-white/5 rounded-2xl p-3",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-1",children:[jsxRuntime.jsx("span",{className:"text-xs font-bold text-white",children:s.user.name}),jsxRuntime.jsx("span",{className:"text-[10px] text-white/30",children:s.timestamp.toLocaleString()})]}),jsxRuntime.jsx("p",{className:"text-sm text-white/70 leading-relaxed",children:s.content})]})]},s.id))})]})}function os({attachments:e,onRemove:t,onDownload:r,className:o}){return jsxRuntime.jsxs("div",{className:l("space-y-4",o),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold",children:"Attachments"}),jsxRuntime.jsxs(L,{variant:"ghost",size:"sm",className:"h-7 gap-1.5 text-white/40 hover:text-white",children:[jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-3 w-3"}),"Add"]})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-2 gap-3",children:e.map(n=>jsxRuntime.jsxs("div",{className:"group relative bg-white/[0.03] border border-white/5 rounded-xl overflow-hidden hover:border-white/20 transition-all",children:[n.thumbnail?jsxRuntime.jsx("div",{className:"aspect-video w-full overflow-hidden",children:jsxRuntime.jsx("img",{src:n.thumbnail,alt:n.name,className:"w-full h-full object-cover"})}):jsxRuntime.jsx("div",{className:"aspect-video w-full flex items-center justify-center bg-white/5",children:jsxRuntime.jsx(lucideReact.FileIcon,{className:"h-8 w-8 text-white/20"})}),jsxRuntime.jsxs("div",{className:"p-2",children:[jsxRuntime.jsx("p",{className:"text-xs font-medium text-white truncate",children:n.name}),jsxRuntime.jsx("p",{className:"text-[10px] text-white/30 uppercase",children:n.size})]}),jsxRuntime.jsxs("div",{className:"absolute inset-0 bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center gap-2",children:[jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-full bg-white/10 hover:bg-white/20",onClick:()=>r?.(n),children:jsxRuntime.jsx(lucideReact.Download,{className:"h-4 w-4"})}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-full bg-red-500/20 hover:bg-red-500/40 text-red-400",onClick:()=>t?.(n.id),children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})]},n.id))})]})}function as({labels:e,selectedIds:t,onToggle:r,className:o}){return jsxRuntime.jsxs("div",{className:l("space-y-3",o),children:[jsxRuntime.jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Tag,{className:"h-3 w-3"}),"Labels"]}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(n=>{let a=t.includes(n.id);return jsxRuntime.jsxs("button",{onClick:()=>r(n.id),className:l("px-3 py-1.5 rounded-full text-xs font-medium transition-all flex items-center gap-2 border",a?"bg-white/10 border-white/20 text-white":"bg-transparent border-white/5 text-white/40 hover:border-white/10"),children:[jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:n.color}}),n.name,a&&jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})]},n.id)})})]})}function ns({users:e,selectedId:t,onSelect:r,className:o}){return jsxRuntime.jsxs("div",{className:l("space-y-3",o),children:[jsxRuntime.jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Users,{className:"h-3 w-3"}),"Assignee"]}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 gap-1",children:e.map(n=>{let a=t===n.id;return jsxRuntime.jsxs("button",{onClick:()=>r(n.id),className:l("flex items-center gap-3 p-2 rounded-xl transition-all text-left",a?"bg-white/10 text-white":"text-white/60 hover:bg-white/5"),children:[jsxRuntime.jsx($,{src:n.avatar,alt:n.name,size:"sm"}),jsxRuntime.jsx("span",{className:"text-sm flex-1 truncate",children:n.name}),a&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4 text-blue-500"})]},n.id)})})]})}function is({date:e,onChange:t,className:r}){return jsxRuntime.jsxs("div",{className:l("space-y-3",r),children:[jsxRuntime.jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-3 w-3"}),"Due Date"]}),e?jsxRuntime.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-2xl bg-white/5 border border-white/10",children:[jsxRuntime.jsx("div",{className:"h-8 w-8 rounded-lg bg-blue-500/20 flex items-center justify-center text-blue-400",children:jsxRuntime.jsx(lucideReact.Clock,{className:"h-4 w-4"})}),jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium text-white",children:e.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}),jsxRuntime.jsx("p",{className:"text-[10px] text-white/40",children:e.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})})]}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/20 hover:text-red-400",onClick:()=>t(void 0),children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}):jsxRuntime.jsxs(L,{variant:"ghost",className:"w-full justify-start gap-3 h-12 rounded-2xl border border-dashed border-white/10 text-white/40 hover:border-white/20 hover:bg-white/5",onClick:()=>t(new Date),children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-4 w-4"}),"Set due date"]})]})}function cs({initialSeconds:e=0,onTimeUpdate:t,className:r}){let[o,n]=we.useState(e),[a,s]=we.useState(false);we.useEffect(()=>{let c=null;return a?c=setInterval(()=>{n(d=>{let m=d+1;return t?.(m),m});},1e3):clearInterval(c),()=>clearInterval(c)},[a,t]);let i=c=>{let d=Math.floor(c/3600),m=Math.floor(c%3600/60),u=c%60;return `${d.toString().padStart(2,"0")}:${m.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}`};return jsxRuntime.jsxs("div",{className:l("space-y-3",r),children:[jsxRuntime.jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Timer,{className:"h-3 w-3"}),"Time Tracking"]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-2xl bg-white/[0.03] border border-white/5",children:[jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx("p",{className:"text-2xl font-mono font-bold text-white tracking-tight",children:i(o)}),jsxRuntime.jsx("p",{className:"text-[10px] text-white/30 uppercase font-bold mt-1",children:"Total Time Spent"})]}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-10 w-10 rounded-full bg-white/5 hover:bg-white/10",onClick:()=>n(0),children:jsxRuntime.jsx(lucideReact.RotateCcw,{className:"h-4 w-4"})}),jsxRuntime.jsx(L,{variant:a?"secondary":"primary",size:"icon",className:l("h-10 w-10 rounded-full shadow-lg transition-all",a?"bg-orange-500 hover:bg-orange-600":"bg-blue-600 hover:bg-blue-700"),onClick:()=>s(!a),children:a?jsxRuntime.jsx(lucideReact.Pause,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Play,{className:"h-4 w-4 ml-0.5"})})]})]})]})}function ds({isOpen:e,onClose:t,onSave:r,onDelete:o,onDuplicate:n,onArchive:a,task:s,columnId:i,columns:c=[],users:d=[],availableLabels:m=[],showSubtasks:u=true,showChecklist:p=true,showAttachments:g=true,showComments:b=true,showActivity:x=true}){let[h,f]=we.useState(""),[w,v]=we.useState(""),[y,k]=we.useState("medium"),[N,C]=we.useState(""),[T,E]=we.useState(void 0),[A,M]=we.useState([]),[S,I]=we.useState(void 0);we.useEffect(()=>{s?(f(s.title||""),v(s.description||""),k(s.priority||"medium"),C(s.columnId||""),E(s.assignee?.id),M(s.labels?.map(R=>R.id)||[]),I(s.dueDate?new Date(s.dueDate):void 0)):(f(""),v(""),k("medium"),C(i||""),E(void 0),M([]),I(void 0));},[s,e,i]);let B=()=>{h.trim()&&(r({...s,title:h,description:w,priority:y,columnId:N,assignee:d.find(R=>R.id===T),labels:m.filter(R=>A.includes(R.id)),dueDate:S?.toISOString()}),t());};return jsxRuntime.jsxs(ao,{isOpen:e,onClose:t,children:[jsxRuntime.jsxs(no,{className:"flex items-center justify-between pr-12",children:[jsxRuntime.jsx(es,{children:s?"Edit Task":"Create New Task"}),jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>n?.(s),children:jsxRuntime.jsx(lucideReact.Copy,{className:"h-4 w-4"})}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>a?.(s.id),children:jsxRuntime.jsx(lucideReact.Archive,{className:"h-4 w-4"})}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-red-400",onClick:()=>o?.(s.id),children:jsxRuntime.jsx(lucideReact.Trash2,{className:"h-4 w-4"})})]})})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8 py-6",children:[jsxRuntime.jsxs("div",{className:"lg:col-span-2 space-y-8",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(X,{htmlFor:"task-title",className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Title"}),jsxRuntime.jsx(kt,{id:"task-title",placeholder:"What needs to be done?",value:h,onChange:R=>f(R.target.value),className:"text-lg font-bold bg-transparent border-white/10 focus:border-blue-500",autoFocus:true})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(X,{htmlFor:"task-desc",className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Description"}),jsxRuntime.jsx(hr,{id:"task-desc",placeholder:"Add more details...",value:w,onChange:R=>v(R.target.value),rows:6,className:"bg-white/[0.03] border-white/10 text-sm leading-relaxed"})]}),p&&s?.checklist&&jsxRuntime.jsx(ts,{items:s.checklist}),g&&s?.attachments&&jsxRuntime.jsx(os,{attachments:[]}),b&&jsxRuntime.jsx(rs,{comments:[]})]}),jsxRuntime.jsxs("div",{className:"space-y-8 bg-white/[0.02] p-6 rounded-3xl border border-white/5 h-fit",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(X,{className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Status"}),jsxRuntime.jsx(_r,{value:N,onChange:R=>C(R),options:c.map(R=>({label:R.title,value:R.id})),className:"bg-white/5 border-white/10"})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(X,{className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Priority"}),jsxRuntime.jsx(_r,{value:y,onChange:R=>k(R),options:[{label:"Low",value:"low"},{label:"Medium",value:"medium"},{label:"High",value:"high"},{label:"Urgent",value:"urgent"}],className:"bg-white/5 border-white/10"})]}),jsxRuntime.jsx(ns,{users:d,selectedId:T,onSelect:E}),jsxRuntime.jsx(as,{labels:m,selectedIds:A,onToggle:R=>M(K=>K.includes(R)?K.filter(me=>me!==R):[...K,R])}),jsxRuntime.jsx(is,{date:S,onChange:I}),jsxRuntime.jsx(cs,{initialSeconds:s?.timeSpent})]})]}),jsxRuntime.jsxs(so,{className:"border-t border-white/5 pt-6",children:[jsxRuntime.jsx(L,{variant:"ghost",onClick:t,children:"Cancel"}),jsxRuntime.jsx(L,{onClick:B,className:"px-8",children:"Save Changes"})]})]})}function ms({title:e,count:t,isCollapsed:r,onToggle:o,children:n,className:a}){return jsxRuntime.jsxs("div",{className:l("space-y-4",a),children:[jsxRuntime.jsxs("button",{onClick:o,className:"flex items-center gap-3 w-full group",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[r?jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4 text-white/20"}):jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4 text-white/20"}),jsxRuntime.jsx("h4",{className:"text-xs font-bold uppercase tracking-widest text-white/40 group-hover:text-white/60 transition-colors",children:e})]}),jsxRuntime.jsx("div",{className:"h-px flex-1 bg-white/5"}),jsxRuntime.jsx("span",{className:"text-[10px] font-bold px-2 py-0.5 rounded-full bg-white/5 text-white/20",children:t})]}),!r&&jsxRuntime.jsx("div",{className:"animate-in fade-in slide-in-from-top-2 duration-300",children:n})]})}function fs(e){let[t,r]=we.useState(""),[o,n]=we.useState({}),a=we.useMemo(()=>e.filter(c=>{if(t){let d=t.toLowerCase();if(!(c.title.toLowerCase().includes(d)||c.description?.toLowerCase().includes(d)||c.tags?.some(u=>u.toLowerCase().includes(d))))return false}for(let[d,m]of Object.entries(o))if(!(!m||m.length===0)&&(d==="priority"&&!m.includes(c.priority)||d==="assignee"&&(!c.assignee||!m.includes(c.assignee.id))||d==="tags"&&!c.tags?.some(u=>m.includes(u))))return false;return true}),[e,t,o]),s=we.useCallback((c,d)=>{n(m=>{let u=m[c]||[],p=u.includes(d)?u.filter(b=>b!==d):[...u,d],g={...m,[c]:p};return p.length===0&&delete g[c],g});},[]),i=we.useCallback(()=>{n({}),r("");},[]);return {searchQuery:t,setSearchQuery:r,activeFilters:o,setActiveFilters:n,filteredTasks:a,toggleFilter:s,clearFilters:i}}function gs(e){let[t,r]=we.useState({history:[e],currentIndex:0}),o=we.useRef(e);we.useEffect(()=>{let i=e.tasks.length!==o.current.tasks.length||e.tasks.some((d,m)=>d.id!==o.current.tasks[m]?.id||d.columnId!==o.current.tasks[m]?.columnId),c=e.columns.length!==o.current.columns.length||e.columns.some((d,m)=>d.id!==o.current.columns[m]?.id);if(i||c){let d=t.history[t.currentIndex];d&&e.tasks.length===d.tasks.length&&e.tasks.every((u,p)=>u.id===d.tasks[p]?.id&&u.columnId===d.tasks[p]?.columnId)||r({history:[e],currentIndex:0}),o.current=e;}},[e,t.history,t.currentIndex]);let n=we.useCallback(i=>{r(c=>({history:[...c.history.slice(0,c.currentIndex+1),i],currentIndex:c.currentIndex+1}));},[]),a=we.useCallback(()=>{r(i=>i.currentIndex>0?{...i,currentIndex:i.currentIndex-1}:i);},[]),s=we.useCallback(()=>{r(i=>i.currentIndex<i.history.length-1?{...i,currentIndex:i.currentIndex+1}:i);},[]);return {state:t.history[t.currentIndex],pushState:n,undo:a,redo:s,canUndo:t.currentIndex>0,canRedo:t.currentIndex<t.history.length-1}}function hs({onUndo:e,onRedo:t,onSearch:r,onNewTask:o,onNewColumn:n,enabled:a=true}){we.useEffect(()=>{if(!a)return;let s=i=>{(i.ctrlKey||i.metaKey)&&i.key==="z"&&!i.shiftKey&&(i.preventDefault(),e?.()),((i.ctrlKey||i.metaKey)&&i.key==="z"&&i.shiftKey||(i.ctrlKey||i.metaKey)&&i.key==="y")&&(i.preventDefault(),t?.()),((i.ctrlKey||i.metaKey)&&i.key==="f"||i.key==="/"&&document.activeElement===document.body)&&(i.preventDefault(),r?.()),i.key==="n"&&document.activeElement===document.body&&(i.preventDefault(),o?.()),i.key==="c"&&document.activeElement===document.body&&(i.preventDefault(),n?.());};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[a,e,t,r,o,n]);}function xs({tasks:e,columns:t,selectedTaskIds:r,onTaskMove:o,onColumnMove:n,onTaskDrop:a,onTaskDragStart:s,onTaskDragEnd:i}){let[c,d]=we.useState(null),[m,u]=we.useState(null),[p,g]=we.useState(null),[b,x]=we.useState(null),[h,f]=we.useState(null),w=we.useRef(null),v=we.useRef(null),y=(M,S,I)=>{I==="task"?(d(S),M.dataTransfer.setData("taskId",S),s?.(S)):(u(S),M.dataTransfer.setData("columnId",S)),M.dataTransfer.effectAllowed="move";},k=we.useCallback(()=>{c&&i?.(c),d(null),u(null),g(null),x(null),f(null);},[c,i]);return {draggedTaskId:c,draggedColumnId:m,dragOverColumnId:p,dragOverTaskId:b,dropPosition:h,handleDragStart:y,handleDragEnd:k,handleDragOver:(M,S,I)=>{if(M.preventDefault(),M.dataTransfer.dropEffect="move",m){g(S);let B=M.currentTarget.getBoundingClientRect(),R=B.left+B.width/2;f(M.clientX<R?"left":"right");}else if(g(S),I){x(I);let B=M.currentTarget.getBoundingClientRect(),R=B.top+B.height/2;f(M.clientY<R?"top":"bottom");}else M.target===M.currentTarget&&(x(null),f(null));},handleDrop:(M,S,I)=>{M.preventDefault();let B=c||M.dataTransfer.getData("taskId"),R=m||M.dataTransfer.getData("columnId");if(R&&n)n(R,S,h==="right"?"right":"left");else if(B&&o){if(!e.find(Z=>Z.id===B))return;(r.includes(B)?r:[B]).forEach(Z=>{let Le=e.find(wt=>wt.id===Z)?.columnId||"";o(Z,S,I,h==="bottom"?"bottom":"top"),a?.(Z,Le,S,0);});}k();},handleTouchStart:(M,S,I)=>{let B=M.touches[0];B&&(w.current=setTimeout(()=>{I==="task"?(d(S),s?.(S)):u(S),v.current={x:B.clientX,y:B.clientY};},500));},handleTouchMove:M=>{if(!c&&!m)return;M.preventDefault();let S=M.touches[0];if(!S)return;let I=document.elementFromPoint(S.clientX,S.clientY);if(!I)return;let B=I.closest("[data-column-id]"),R=I.closest("[data-task-id]");if(B){let K=B.getAttribute("data-column-id");if(g(K),m){let me=B.getBoundingClientRect(),Z=me.left+me.width/2;f(S.clientX<Z?"left":"right");}else if(R){let me=R.getAttribute("data-task-id");x(me);let Z=R.getBoundingClientRect(),te=Z.top+Z.height/2;f(S.clientY<te?"top":"bottom");}}},handleTouchEnd:M=>{if(clearTimeout(w.current),c||m){if(p){let S=c,I=m;I&&n?n(I,p,h==="right"?"right":"left"):S&&o&&o(S,p,b||void 0,h==="bottom"?"bottom":"top");}k();}},setDraggedTaskId:d}}function ku({columns:e,tasks:t,onTaskMove:r,onColumnMove:o,onTaskClick:n,onTaskAdd:a,onColumnAction:s,swimlanes:i=false,swimlaneBy:c="priority",view:d,onViewChange:m,className:u,...p}){let[g,b]=we.useState(d||"board"),[x,h]=we.useState(null),[f,w]=we.useState([]),v=d||g,y=Y=>{b(Y),m?.(Y);},{state:k,pushState:N,undo:C,redo:T,canUndo:E,canRedo:A}=gs({tasks:t,columns:e}),M=k?.tasks||[],S=k?.columns||[],{setSearchQuery:I,setActiveFilters:B,filteredTasks:R}=fs(M),K=we.useMemo(()=>{if(!i)return null;let Y={},_=(P,H)=>H.includes(".")?H.split(".").reduce((O,re)=>O&&O[re],P):P[H];return R.forEach(P=>{let H=_(P,c),O=String(H||"Uncategorized");Y[O]||(Y[O]=[]),Y[O].push(P);}),Y},[R,i,c]),{handleDragStart:me,handleDragOver:Z,handleDrop:te}=xs({columns:S,tasks:M,selectedTaskIds:[],onTaskMove:(Y,_,P,H)=>{let O=[...M],re=O.findIndex(Fr=>Fr.id===Y);if(re===-1)return;let Je={...O[re],columnId:_};if(O.splice(re,1),!P)O.push(Je);else {let Fr=O.findIndex(Di=>Di.id===P),Si=H==="bottom"?Fr+1:Fr;O.splice(Si,0,Je);}N({tasks:O,columns:S}),r?.(Y,_,P,H);}});hs({onUndo:C,onRedo:T,onSearch:()=>document.querySelector('input[placeholder*="Search"]')?.focus(),onNewTask:()=>a?.("todo","New Task")});let wt=we.useMemo(()=>M.find(Y=>Y.id===x),[M,x]),Kr=()=>{let Y=_=>{h(_.id),n?.(_);};switch(v){case "list":return jsxRuntime.jsx(oo,{tasks:R,columns:S,onTaskClick:Y});case "timeline":return jsxRuntime.jsx(Wn,{tasks:R});case "table":return jsxRuntime.jsx(Yn,{tasks:R,columns:S,onTaskClick:Y});case "calendar":return jsxRuntime.jsx(_n,{tasks:R,onTaskClick:Y});default:if(i){let _=K&&Object.keys(K).length>0?K:{"All Tasks":[]};return jsxRuntime.jsx("div",{className:"flex flex-col gap-8 overflow-y-auto h-full pr-2 custom-scrollbar",children:Object.entries(_).map(([P,H])=>jsxRuntime.jsx(ms,{title:P,count:H.length,isCollapsed:f.includes(P),onToggle:()=>w(O=>O.includes(P)?O.filter(re=>re!==P):[...O,P]),children:jsxRuntime.jsx("div",{className:"flex gap-6 min-h-[200px]",children:S.map(O=>jsxRuntime.jsx(Qo,{column:O,tasks:H.filter(re=>re.columnId===O.id),onTaskClick:Y,onAddTask:()=>a?.(O.id,"New Task"),onAction:re=>s?.(O.id,re),onDragStart:me,onDragOver:(re,Je)=>Z(re,O.id,Je),onDrop:(re,Je)=>te(re,O.id,Je)},O.id))})},P))})}return jsxRuntime.jsx("div",{className:"flex gap-6 overflow-x-auto pb-4 min-h-[500px] scrollbar-thin scrollbar-thumb-white/10",children:S.map(_=>jsxRuntime.jsx(Qo,{column:_,tasks:R.filter(P=>P.columnId===_.id),onTaskClick:Y,onAddTask:()=>a?.(_.id,"New Task"),onAction:P=>s?.(_.id,P),onDragStart:me,onDragOver:(P,H)=>Z(P,_.id,H),onDrop:(P,H)=>te(P,_.id,H)},_.id))})}};return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-4 h-full",u),children:[jsxRuntime.jsx(Kn,{title:"Project Board",view:v,onViewChange:Y=>y(Y),canUndo:E,canRedo:A,onUndo:C,onRedo:T}),jsxRuntime.jsx(Zn,{onSearchChange:I,onFilterChange:B}),jsxRuntime.jsx("div",{className:"flex-1 overflow-hidden",children:Kr()}),wt&&jsxRuntime.jsx(ds,{isOpen:!!x,onClose:()=>h(null),task:wt,onSave:Y=>{let _=M.map(P=>P.id===wt.id?{...P,...Y}:P);N({tasks:_,columns:S}),h(null);}})]})}function DT({columnId:e,onAdd:t,placeholder:r="Add task...",className:o}){let[n,a]=we.useState(false),[s,i]=we.useState(""),c=d=>{d?.preventDefault(),s.trim()&&(t(e,s),i(""),a(false));};return n?jsxRuntime.jsxs("form",{onSubmit:c,className:l("bg-white/[0.03] border border-white/10 rounded-2xl p-3 space-y-3",o),children:[jsxRuntime.jsx("input",{autoFocus:true,value:s,onChange:d=>i(d.target.value),placeholder:"What needs to be done?",className:"w-full bg-transparent border-none outline-none text-sm text-white placeholder:text-white/20",onKeyDown:d=>{d.key==="Escape"&&a(false);}}),jsxRuntime.jsxs("div",{className:"flex items-center justify-end gap-2",children:[jsxRuntime.jsx(L,{variant:"ghost",size:"sm",onClick:()=>a(false),className:"h-8 text-white/40 hover:text-white",children:"Cancel"}),jsxRuntime.jsx(L,{size:"sm",onClick:()=>c(),disabled:!s.trim(),className:"h-8",children:"Add Task"})]})]}):jsxRuntime.jsxs("button",{onClick:()=>a(true),className:l("w-full flex items-center gap-2 p-3 rounded-2xl border border-dashed border-white/10 text-white/40 hover:border-white/20 hover:bg-white/5 transition-all text-sm",o),children:[jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"}),r]})}function OT({onSync:e,interval:t=3e4,enabled:r=false}){let[o,n]=we.useState(null),[a,s]=we.useState(false),[i,c]=we.useState(null);return {sync:we.useCallback(async m=>{if(e){s(true),c(null);try{await e(m),n(new Date);}catch(u){c(u instanceof Error?u:new Error("Sync failed"));}finally{s(false);}}},[e]),isSyncing:a,lastSynced:o,error:i}}function KT(){let[e,t]=we.useState([]),r=we.useCallback(n=>{let a={...n,id:Math.random().toString(36).substr(2,9),timestamp:new Date};t(s=>[a,...s]);},[]),o=we.useCallback(()=>{t([]);},[]);return {history:e,addEntry:r,clearHistory:o}}function WT({subtasks:e,onToggle:t,className:r}){return !e||e.length===0?null:jsxRuntime.jsx("div",{className:l("space-y-1",r),children:e.map(o=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2 group cursor-pointer",onClick:()=>t?.(o.id),children:[o.completed?jsxRuntime.jsx(lucideReact.CheckCircle2,{className:"h-3.5 w-3.5 text-green-500"}):jsxRuntime.jsx(lucideReact.Circle,{className:"h-3.5 w-3.5 text-white/20 group-hover:text-white/40"}),jsxRuntime.jsx("span",{className:l("text-xs transition-colors",o.completed?"text-white/40 line-through":"text-white/70"),children:o.title})]},o.id))})}function GT({activities:e,className:t}){return jsxRuntime.jsxs("div",{className:l("space-y-4",t),children:[jsxRuntime.jsx("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold",children:"Activity"}),jsxRuntime.jsx("div",{className:"space-y-4",children:e.map(r=>jsxRuntime.jsxs("div",{className:"flex gap-3",children:[jsxRuntime.jsx($,{src:r.user.avatar,alt:r.user.name,size:"sm"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("p",{className:"text-xs text-white/80",children:[jsxRuntime.jsx("span",{className:"font-bold text-white",children:r.user.name})," ",r.action," ",r.target&&jsxRuntime.jsx("span",{className:"font-medium text-blue-400",children:r.target})]}),jsxRuntime.jsx("p",{className:"text-[10px] text-white/30 mt-0.5",children:r.timestamp.toLocaleString()})]})]},r.id))})]})}var Su=we__namespace.default.forwardRef(({className:e,title:t="Terminal",children:r,...o},n)=>jsxRuntime.jsxs("div",{ref:n,className:l("overflow-hidden rounded-2xl border border-gray-200 bg-gray-950 shadow-xl dark:border-white/10",e),...o,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-b border-white/10 bg-white/[0.03] px-4 py-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5",children:[jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-rose-500/80"}),jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-amber-500/80"}),jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-emerald-500/80"})]}),jsxRuntime.jsx("div",{className:"text-xs font-medium text-white/50",children:t}),jsxRuntime.jsx("div",{className:"w-10"})," "]}),jsxRuntime.jsx("div",{className:"p-4 font-mono text-sm text-gray-300",children:r})]}));Su.displayName="Terminal";var E5=({children:e,prefix:t="$",className:r})=>jsxRuntime.jsxs("div",{className:l("flex gap-2",r),children:[jsxRuntime.jsx("span",{className:"select-none text-emerald-400",children:t}),jsxRuntime.jsx("span",{children:e})]});var I5=({className:e,pauseOnHover:t=false,direction:r="left",speed:o="normal",children:n,...a})=>{let s={slow:"40s",normal:"20s",fast:"10s"};return jsxRuntime.jsxs("div",{className:l("group flex overflow-hidden p-2 [--gap:1rem] [gap:var(--gap)]",e),...a,children:[jsxRuntime.jsx("div",{className:l("flex shrink-0 justify-around [gap:var(--gap)] min-w-full",r==="left"?"animate-marquee":"animate-marquee-reverse",t&&"group-hover:[animation-play-state:paused]"),style:{animationDuration:s[o]},children:n}),jsxRuntime.jsx("div",{"aria-hidden":"true",className:l("flex shrink-0 justify-around [gap:var(--gap)] min-w-full",r==="left"?"animate-marquee":"animate-marquee-reverse",t&&"group-hover:[animation-play-state:paused]"),style:{animationDuration:s[o]},children:n}),jsxRuntime.jsx("style",{children:`
|
|
12
|
+
`})]})};kl.displayName="LetterPullup";var X=ye__namespace.default.forwardRef(({className:e,children:t,required:r,...o},n)=>jsxRuntime.jsxs("label",{ref:n,className:l("text-sm font-medium leading-none text-gray-700 dark:text-white/80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...o,children:[t,r&&jsxRuntime.jsx("span",{className:"ml-1 text-rose-500",children:"*"})]}));X.displayName="Label";var Ll=classVarianceAuthority.cva("w-full rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-3 border border-gray-200 dark:border-white/[0.10] text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-white/30 focus:outline-none focus:ring-2 focus:ring-purple-400/30 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-200",{variants:{hasError:{true:"border-rose-400/25 focus:ring-rose-300/25",false:""},hasLeftIcon:{true:"pl-10",false:""},hasRightIcon:{true:"pr-10",false:""}},defaultVariants:{hasError:false,hasLeftIcon:false,hasRightIcon:false}}),kt=ye__namespace.default.forwardRef(({className:e,containerClassName:t,label:r,error:o,leftIcon:n,rightIcon:a,id:s,...i},c)=>{let d=s||ye__namespace.default.useId(),m=!!o;return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",t),children:[r&&jsxRuntime.jsx(X,{htmlFor:d,required:i.required,children:r}),jsxRuntime.jsxs("div",{className:"relative flex items-center",children:[n&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 dark:text-white/35",children:n}),jsxRuntime.jsx("input",{ref:c,id:d,className:l(Ll({hasError:m,hasLeftIcon:!!n,hasRightIcon:!!a,className:e})),...i}),a&&jsxRuntime.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2",children:a})]}),o&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:o})]})});kt.displayName="TextInput";var Po=ye__namespace.default.forwardRef(({className:e,label:t,error:r,id:o,disabled:n,checked:a,defaultChecked:s,onChange:i,...c},d)=>{let m=o||ye__namespace.default.useId(),[u,p]=ye__namespace.default.useState(s||a||false);ye__namespace.default.useEffect(()=>{a!==void 0&&p(a);},[a]);let g=()=>{if(n)return;let b=!u;p(b),i&&i({target:{checked:b}});};return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",e),children:[jsxRuntime.jsxs("button",{ref:d,type:"button",id:m,role:"checkbox","aria-checked":u,"aria-label":t,onClick:g,disabled:n,className:l("flex items-center gap-3 rounded-2xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.03] px-4 py-3","hover:bg-gray-100 dark:hover:bg-white/[0.04] transition-colors",n&&"opacity-50 cursor-not-allowed"),...c,children:[jsxRuntime.jsx("span",{"aria-hidden":"true",className:l("grid h-6 w-6 place-items-center rounded-lg border",u?"border-emerald-400/30 bg-emerald-400/15":"border-gray-300 dark:border-white/10 bg-white dark:bg-white/[0.02]"),children:u?jsxRuntime.jsx("svg",{className:"h-4 w-4 text-emerald-200",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}):null}),t&&jsxRuntime.jsx("span",{className:"text-sm text-gray-700 dark:text-white/70",children:t})]}),r&&jsxRuntime.jsx("p",{className:"text-xs text-rose-500 mt-1 ml-1",children:r})]})});Po.displayName="Checkbox";var Eo=ye__namespace.default.forwardRef(({className:e,label:t,error:r,id:o,disabled:n,checked:a,defaultChecked:s,onChange:i,...c},d)=>{let m=o||ye__namespace.default.useId(),[u,p]=ye__namespace.default.useState(s||a||false);ye__namespace.default.useEffect(()=>{a!==void 0&&p(a);},[a]);let g=()=>{if(n)return;let b=!u;p(b),i&&i({target:{checked:b}});};return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",e),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("button",{type:"button",id:m,role:"switch","aria-checked":u,onClick:g,disabled:n,className:l("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 dark:focus-visible:ring-offset-black disabled:cursor-not-allowed disabled:opacity-50",u?"bg-emerald-500":"bg-gray-200 dark:bg-white/[0.06]"),...c,children:jsxRuntime.jsx("span",{className:l("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform",u?"translate-x-5":"translate-x-0")})}),t&&jsxRuntime.jsx(X,{htmlFor:m,className:"cursor-pointer select-none text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",onClick:g,children:t})]}),r&&jsxRuntime.jsx("p",{className:"text-xs text-rose-500 mt-1 ml-1",children:r})]})});Eo.displayName="Switch";var Yr=ye__namespace.default.forwardRef(({label:e,name:t,options:r,value:o,defaultValue:n,onChange:a,placeholder:s="Select an option",error:i,disabled:c,className:d},m)=>{let[u,p]=ye.useState(false),[g,b]=ye.useState(n),[x,h]=ye.useState(-1),f=ye.useRef(null),w=ye__namespace.default.useId(),v=o!==void 0,y=v?o:g,k=r.find(T=>T.value===y);ye.useEffect(()=>{if(u){let T=r.findIndex(E=>E.value===y);h(T!==-1?T:0);}else h(-1);},[u,y,r]),ye.useEffect(()=>{let T=E=>{f.current&&!f.current.contains(E.target)&&p(false);};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);let N=T=>{c||(v||b(T),a?.(T),p(false));},C=T=>{c||(T.key==="Enter"||T.key===" "?(T.preventDefault(),u&&x!==-1?N(r[x].value):p(true)):T.key==="Escape"?p(false):T.key==="ArrowDown"?(T.preventDefault(),u?h(E=>(E+1)%r.length):p(true)):T.key==="ArrowUp"?(T.preventDefault(),u?h(E=>(E-1+r.length)%r.length):p(true)):T.key==="Home"?(T.preventDefault(),u&&h(0)):T.key==="End"&&(T.preventDefault(),u&&h(r.length-1)));};return jsxRuntime.jsxs("div",{ref:f,className:l("flex flex-col gap-1.5 relative",d),children:[e&&jsxRuntime.jsx(X,{htmlFor:w,className:l(c&&"opacity-50 cursor-not-allowed"),children:e}),jsxRuntime.jsxs("div",{ref:m,id:w,role:"combobox","aria-expanded":u,"aria-haspopup":"listbox","aria-controls":`${w}-listbox`,"aria-disabled":c,tabIndex:c?-1:0,onClick:()=>!c&&p(!u),onKeyDown:C,className:l("w-full appearance-none rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-3","border border-gray-200 dark:border-white/[0.10]","text-gray-900 dark:text-white flex items-center","focus:outline-none focus:ring-2 focus:ring-purple-400/30","hover:bg-gray-100 dark:hover:bg-white/[0.05] cursor-pointer",c&&"cursor-not-allowed opacity-50 hover:bg-gray-50 dark:hover:bg-white/[0.04]",u&&"border-gray-300 dark:border-white/20 ring-2 ring-purple-400/20",i&&"border-rose-400/25 focus:ring-rose-300/25"),children:[jsxRuntime.jsx("span",{className:l("block truncate",!k&&"text-gray-400 dark:text-white/20"),children:k?k.label:s}),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:l("absolute right-4 top-1/2 -translate-y-1/2 text-gray-400 dark:text-white/40 transition-transform duration-200",u&&"rotate-180"),children:jsxRuntime.jsx("path",{d:"m6 9 6 6 6-6"})})]}),u&&jsxRuntime.jsx("div",{className:"absolute top-full left-0 z-[110] mt-1 w-full overflow-hidden rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A] p-1 shadow-xl animate-in fade-in zoom-in-95 duration-100",children:jsxRuntime.jsx("ul",{id:`${w}-listbox`,role:"listbox","aria-activedescendant":x!==-1?`${w}-option-${x}`:void 0,className:"max-h-60 overflow-auto p-1 flex flex-col gap-2",children:r.map((T,E)=>jsxRuntime.jsx("li",{id:`${w}-option-${E}`,role:"option","aria-selected":y===T.value,onClick:()=>N(T.value),onMouseEnter:()=>h(E),className:l("w-full rounded-2xl px-3 py-2 text-left text-sm transition-colors cursor-pointer","hover:bg-gray-100 dark:hover:bg-white/[0.06] hover:text-gray-900 dark:hover:text-white",y===T.value||x===E?"bg-gray-100 dark:bg-white/[0.06] text-gray-900 dark:text-white/90":"text-gray-700 dark:text-white/80"),children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxRuntime.jsx("span",{className:"flex-1 truncate",children:T.label}),y===T.value&&jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-900 dark:text-white",children:jsxRuntime.jsx("polyline",{points:"20 6 9 17 4 12"})})]})},T.value))})}),i&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:i}),jsxRuntime.jsx("input",{type:"hidden",name:t,value:y||""})]})});Yr.displayName="Select";function Ft(e,t,r={}){let{side:o="bottom",align:n="center",sideOffset:a=4,alignOffset:s=0,isOpen:i=false}=r,[c,d]=ye.useState({top:0,left:0}),[m,u]=ye.useState(false),p=ye.useCallback(()=>{if(!e.current||!t.current||!i)return;let g=e.current.getBoundingClientRect(),b=t.current.getBoundingClientRect(),x=0,h=0;switch(o){case "top":x=g.top-b.height-a;break;case "bottom":x=g.bottom+a;break;case "left":h=g.left-b.width-a;break;case "right":h=g.right+a;break}if(o==="top"||o==="bottom")switch(n){case "start":h=g.left+s;break;case "center":h=g.left+g.width/2-b.width/2+s;break;case "end":h=g.right-b.width+s;break}else switch(n){case "start":x=g.top+s;break;case "center":x=g.top+g.height/2-b.height/2+s;break;case "end":x=g.bottom-b.height+s;break}let f=8,w=window.innerWidth,v=window.innerHeight;h<f&&(h=f),h+b.width>w-f&&(h=w-b.width-f),x<f&&(x=f),x+b.height>v-f&&(x=v-b.height-f),d({top:x,left:h}),u(true);},[e,t,o,n,a,s,i]);return ye.useLayoutEffect(()=>{if(!i){m&&u(false);return}p();let g=new ResizeObserver(()=>p());return e.current&&g.observe(e.current),t.current&&g.observe(t.current),window.addEventListener("resize",p),window.addEventListener("scroll",p,true),()=>{g.disconnect(),window.removeEventListener("resize",p),window.removeEventListener("scroll",p,true);}},[i,p,e,t]),{position:c,isPositioned:m,updatePosition:p}}var Ho=ye.createContext(void 0);function Ze({children:e,open:t,onOpenChange:r}){let[o,n]=ye.useState(false),a=ye.useRef(null),s=t!==void 0,i=s?t:o,c=d=>{s||n(d),r?.(d);};return jsxRuntime.jsx(Ho.Provider,{value:{isOpen:i,setIsOpen:c,triggerRef:a},children:jsxRuntime.jsx("div",{className:"relative inline-block",children:e})})}function et({className:e,children:t,...r}){let o=ye.useContext(Ho);if(!o)throw new Error("PopoverTrigger must be used within Popover");let n=a=>{o.setIsOpen(!o.isOpen),r.onClick?.(a);};return jsxRuntime.jsx("button",{ref:o.triggerRef,type:"button","aria-haspopup":"dialog","aria-expanded":o.isOpen?"true":"false",onClick:n,className:l("inline-flex items-center justify-center",e),...r,children:t})}function tt({className:e,children:t,align:r="center",sideOffset:o=4,...n}){let a=ye.useContext(Ho);if(!a)throw new Error("PopoverContent must be used within Popover");let s=ye.useRef(null),{position:i,isPositioned:c}=Ft(a.triggerRef,s,{side:"bottom",align:r,sideOffset:o,isOpen:a.isOpen});if(ye.useEffect(()=>{if(a.isOpen){let m=u=>{s.current&&!s.current.contains(u.target)&&a.triggerRef.current&&!a.triggerRef.current.contains(u.target)&&a.setIsOpen(false);};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m);}}},[a.isOpen,a.setIsOpen,a.triggerRef]),!a.isOpen)return null;let d=()=>{let m=i.top>(a.triggerRef.current?.getBoundingClientRect().top||0)?"bottom":"top";return m==="bottom"?r==="start"?"top left":r==="end"?"top right":"top center":m==="top"?r==="start"?"bottom left":r==="end"?"bottom right":"bottom center":"center center"};return reactDom.createPortal(jsxRuntime.jsx("div",{ref:s,style:{top:i.top,left:i.left,transformOrigin:d()},className:l("fixed z-[110] min-w-[12rem] rounded-2xl border border-gray-200 dark:border-white/10 bg-white/80 dark:bg-white/[0.03] backdrop-blur-xl p-4 shadow-xl outline-none duration-200",c?"animate-in fade-in zoom-in-95 opacity-100":"opacity-0",e),...n,children:t}),document.body)}var gr=ye.createContext(void 0);function Io({children:e,value:t,defaultValue:r="",onValueChange:o,filter:n=(s,i)=>s.toLowerCase().includes(i.toLowerCase()),usePopover:a=true}){let[s,i]=ye.useState(r),[c,d]=ye.useState(""),[m,u]=ye.useState(false),[p,g]=ye.useState(new Map),[b,x]=ye.useState(-1),h=t!==void 0,f=h?t:s,w=N=>{h||i(N),o?.(N),u(false),d("");},v=ye__namespace.default.useCallback((N,C,T)=>(g(E=>{let A=new Map(E);return A.set(N,{text:C,value:T}),A}),()=>{g(E=>{let A=new Map(E);return A.delete(N),A});}),[]),y=ye.useMemo(()=>Array.from(p.entries()).filter(([N,C])=>n(C.text,c)).map(([N,C])=>({id:N,value:C.value})),[p,c,n]),k=y.length>0;return ye.useEffect(()=>{x(m?0:-1);},[m]),jsxRuntime.jsx(gr.Provider,{value:{value:f,onValueChange:w,searchTerm:c,setSearchTerm:d,isOpen:m,setIsOpen:u,registerItem:v,isItemVisible:(N,C)=>n(C,c),hasVisibleItems:k,activeIndex:b,setActiveIndex:x,visibleItems:y},children:a?jsxRuntime.jsx(Ze,{open:m,onOpenChange:u,children:e}):e})}function Xx({className:e,children:t,...r}){let o=ye.useContext(gr);return jsxRuntime.jsxs(et,{role:"combobox","aria-expanded":o?.isOpen,"aria-haspopup":"listbox",className:l("flex h-10 w-full items-center justify-between rounded-2xl border border-gray-200 bg-gray-50 px-3 py-2 text-sm text-gray-900 placeholder:text-gray-500 focus:border-purple-500 focus:outline-none focus:ring-2 focus:ring-purple-500/20 disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:bg-white/[0.03] dark:text-white dark:placeholder:text-white/40 dark:focus:border-white/20 dark:focus:ring-white/10",e),...r,children:[t,jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"ml-2 opacity-50",children:jsxRuntime.jsx("path",{d:"m6 9 6 6 6-6"})})]})}function qx({className:e,children:t,...r}){return jsxRuntime.jsx(tt,{className:l("p-0 w-[200px]",e),align:"start",...r,children:t})}function fn({className:e,placeholder:t="Search...",...r}){let o=ye.useContext(gr);if(!o)throw new Error("ComboboxInput must be used within Combobox");let n=a=>{a.key==="ArrowDown"?(a.preventDefault(),o.setActiveIndex(s=>(s+1)%o.visibleItems.length)):a.key==="ArrowUp"?(a.preventDefault(),o.setActiveIndex(s=>(s-1+o.visibleItems.length)%o.visibleItems.length)):a.key==="Enter"?(a.preventDefault(),o.activeIndex!==-1&&o.visibleItems[o.activeIndex]&&o.onValueChange(o.visibleItems[o.activeIndex].value)):a.key==="Escape"&&o.setIsOpen(false),r.onKeyDown?.(a);};return jsxRuntime.jsxs("div",{className:"flex items-center border-b border-gray-200 dark:border-white/10 px-3",children:[jsxRuntime.jsxs("svg",{className:"mr-2 h-4 w-4 shrink-0 opacity-50",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("circle",{cx:"11",cy:"11",r:"8"}),jsxRuntime.jsx("path",{d:"m21 21-4.3-4.3"})]}),jsxRuntime.jsx("input",{className:l("flex h-10 w-full rounded-md bg-transparent py-3 text-sm text-gray-900 dark:text-white outline-none placeholder:text-gray-400 dark:placeholder:text-white/40 disabled:cursor-not-allowed disabled:opacity-50",e),placeholder:t,value:o.searchTerm,onChange:a=>o.setSearchTerm(a.target.value),onKeyDown:n,"aria-autocomplete":"list","aria-activedescendant":o.activeIndex!==-1?o.visibleItems[o.activeIndex]?.id:void 0,...r})]})}function gn({className:e,children:t,...r}){return jsxRuntime.jsx("div",{role:"listbox",className:l("max-h-[300px] overflow-y-auto overflow-x-hidden p-1",e),...r,children:t})}function hn({className:e,children:t,...r}){let o=ye.useContext(gr);if(!o)throw new Error("ComboboxEmpty must be used within Combobox");return o.hasVisibleItems?null:jsxRuntime.jsx("div",{className:l("py-6 text-center text-sm text-gray-500 dark:text-white/40",e),...r,children:t})}function bn({className:e,value:t,children:r,textValue:o,...n}){let a=ye.useContext(gr);if(!a)throw new Error("ComboboxItem must be used within Combobox");let s=ye__namespace.default.useId(),i=o||(typeof r=="string"?r:t),c=a.isItemVisible(s,i),d=a.value===t,m=a.visibleItems.findIndex(p=>p.id===s),u=a.activeIndex===m;return ye.useEffect(()=>a.registerItem(s,i,t),[s,i,t,a.registerItem]),c?jsxRuntime.jsxs("div",{id:s,role:"option","aria-selected":d,onClick:()=>a.onValueChange(t),onMouseEnter:()=>a.setActiveIndex(m),className:l("relative flex cursor-default select-none items-center rounded-2xl px-3 py-2 text-sm outline-none transition-colors","text-gray-700 dark:text-white/80","aria-selected:bg-gray-100 aria-selected:text-gray-900 dark:aria-selected:bg-white/[0.06] dark:aria-selected:text-white","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-white/[0.06] dark:hover:text-white",(d||u)&&"bg-gray-100 text-gray-900 dark:bg-white/[0.06] dark:text-white",e),...n,children:[jsxRuntime.jsx("svg",{className:l("mr-2 h-4 w-4",d?"opacity-100":"opacity-0"),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("polyline",{points:"20 6 9 17 4 12"})}),r]}):null}var ev=ye__namespace.default.forwardRef(({className:e,value:t,defaultValue:r=0,min:o=0,max:n=100,step:a=1,onChange:s,disabled:i,...c},d)=>{let[m,u]=ye.useState(r),p=t!==void 0,g=p?t:m,b=ye.useRef(null),x=(g-o)/(n-o)*100,h=ye.useCallback(y=>{if(i||!b.current)return;let k=b.current.getBoundingClientRect(),N=k.width,C=k.left,T=(y-C)/N*(n-o)+o;T=Math.min(Math.max(T,o),n);let E=Math.round((T-o)/a);T=o+E*a,T=Number(T.toFixed(10)),p||u(T),s?.(T);},[i,p,n,o,s,a]),f=y=>{if(i)return;h(y.clientX);let k=C=>{h(C.clientX);},N=()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",N);};document.addEventListener("mousemove",k),document.addEventListener("mouseup",N);},w=y=>{if(i)return;let k=y.touches[0];k&&h(k.clientX);let N=T=>{let E=T.touches[0];E&&h(E.clientX);},C=()=>{document.removeEventListener("touchmove",N),document.removeEventListener("touchend",C);};document.addEventListener("touchmove",N,{passive:false}),document.addEventListener("touchend",C);};return jsxRuntime.jsxs("div",{ref:d,role:"slider","aria-valuemin":o,"aria-valuemax":n,"aria-valuenow":g,"aria-disabled":i,tabIndex:i?-1:0,onKeyDown:y=>{if(i)return;let k=g;if(y.key==="ArrowRight"||y.key==="ArrowUp")k=Math.min(g+a,n);else if(y.key==="ArrowLeft"||y.key==="ArrowDown")k=Math.max(g-a,o);else if(y.key==="Home")k=o;else if(y.key==="End")k=n;else return;y.preventDefault(),k!==g&&(p||u(k),s?.(k));},className:l("relative flex w-full touch-none select-none items-center py-4 group",i&&"opacity-50 cursor-not-allowed",e),onMouseDown:f,onTouchStart:w,...c,children:[jsxRuntime.jsx("div",{ref:b,className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-gray-200 dark:bg-white/[0.06] backdrop-blur-sm border border-gray-200 dark:border-white/5",children:jsxRuntime.jsx("div",{className:"absolute h-full bg-gray-900 dark:bg-white transition-none dark:shadow-[0_0_10px_rgba(255,255,255,0.5)]",style:{width:`${x}%`}})}),jsxRuntime.jsx("div",{className:"absolute h-5 w-5 rounded-full border-2 border-gray-900 dark:border-white bg-white dark:bg-black shadow-md dark:shadow-[0_0_15px_rgba(255,255,255,0.5)] transition-transform hover:scale-110 focus:scale-110",style:{left:`calc(${x}% - 10px)`}})]})});var _l=["Su","Mo","Tu","We","Th","Fr","Sa"],Yl=["January","February","March","April","May","June","July","August","September","October","November","December"];function Jr({className:e,value:t,onChange:r,minDate:o,maxDate:n}){let[a,s]=ye.useState(t||new Date),[i,c]=ye.useState(t||new Date),d=(f,w)=>new Date(f,w+1,0).getDate(),m=(f,w)=>new Date(f,w,1).getDay(),u=()=>{c(new Date(i.getFullYear(),i.getMonth()-1,1));},p=()=>{c(new Date(i.getFullYear(),i.getMonth()+1,1));},g=f=>{let w=new Date(i.getFullYear(),i.getMonth(),f);r&&r(w),s(w);},b=f=>t&&t.getDate()===f&&t.getMonth()===i.getMonth()&&t.getFullYear()===i.getFullYear(),x=f=>{let w=new Date;return w.getDate()===f&&w.getMonth()===i.getMonth()&&w.getFullYear()===i.getFullYear()},h=()=>{let f=d(i.getFullYear(),i.getMonth()),w=m(i.getFullYear(),i.getMonth()),v=[];for(let y=0;y<w;y++)v.push(jsxRuntime.jsx("div",{className:"h-9 w-9"},`empty-${y}`));for(let y=1;y<=f;y++){let k=b(y),N=x(y);v.push(jsxRuntime.jsx("button",{onClick:()=>g(y),type:"button",className:l("h-9 w-9 rounded-2xl text-sm font-medium transition-all duration-200","hover:bg-gray-100 dark:hover:bg-white/[0.06] focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20",k&&"bg-gray-900 text-white dark:bg-white dark:text-black shadow-md dark:shadow-[0_0_15px_rgba(255,255,255,0.3)] hover:bg-gray-800 dark:hover:bg-white/90",!k&&N&&"bg-gray-100 dark:bg-white/[0.03] text-gray-900 dark:text-white border border-gray-200 dark:border-white/10",!k&&!N&&"text-gray-700 dark:text-white/70 hover:text-gray-900 dark:hover:text-white"),children:y},y));}return v};return jsxRuntime.jsxs("div",{className:l("p-4 bg-white dark:bg-black/40 backdrop-blur-xl border border-gray-200 dark:border-white/10 rounded-2xl w-fit",e),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[jsxRuntime.jsxs("div",{className:"font-semibold text-gray-900 dark:text-white",children:[Yl[i.getMonth()]," ",jsxRuntime.jsx("span",{className:"text-gray-500 dark:text-white/50",children:i.getFullYear()})]}),jsxRuntime.jsxs("div",{className:"flex gap-1",children:[jsxRuntime.jsx("button",{onClick:u,type:"button",className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/70 hover:text-gray-900 dark:hover:text-white transition-colors",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{onClick:p,type:"button",className:"p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/70 hover:text-gray-900 dark:hover:text-white transition-colors",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2 text-center",children:_l.map(f=>jsxRuntime.jsx("div",{className:"h-9 w-9 flex items-center justify-center text-xs font-medium text-gray-400 dark:text-white/40",children:f},f))}),jsxRuntime.jsx("div",{className:"grid grid-cols-7 gap-1",children:h()})]})}function gv({value:e,onChange:t,placeholder:r="Pick a date",className:o}){let[n,a]=ye.useState(e),[s,i]=ye.useState(false),c=u=>{a(u),t?.(u),i(false);},d=u=>u.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"});return jsxRuntime.jsxs(Ze,{open:s,onOpenChange:i,children:[jsxRuntime.jsxs(et,{onMouseMove:u=>{let p=u.currentTarget.getBoundingClientRect(),g=u.clientX-p.left,b=u.clientY-p.top;u.currentTarget.style.setProperty("--x",`${g}px`),u.currentTarget.style.setProperty("--y",`${b}px`);},className:l("group relative flex h-11 w-full items-center justify-between rounded-2xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.03] px-4 py-2 text-sm text-gray-900 dark:text-white transition-all duration-200 overflow-hidden","hover:bg-gray-100 dark:hover:bg-white/[0.06] focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/15",!n&&"text-gray-400 dark:text-white/40",o),children:[jsxRuntime.jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none",style:{background:"radial-gradient(600px circle at var(--x) var(--y), rgba(255,255,255,0.06), transparent 40%)"}}),jsxRuntime.jsx("span",{className:"relative z-10",children:n?d(n):r}),jsxRuntime.jsx(lucideReact.Calendar,{className:"relative z-10 h-4 w-4 text-white/40"})]}),jsxRuntime.jsx(tt,{className:"w-auto p-0 border-none bg-transparent shadow-none",align:"start",children:jsxRuntime.jsx(Jr,{value:n,onChange:c,className:"shadow-2xl shadow-black/50"})})]})}var it=ye__namespace.default.forwardRef(({className:e,children:t,orientation:r="vertical",scrollbarSize:o="sm",...n},a)=>jsxRuntime.jsx("div",{ref:a,className:l("overflow-auto","[&::-webkit-scrollbar]:bg-transparent","[&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-thumb]:bg-white/[0.06]","[&::-webkit-scrollbar-thumb]:rounded-full","hover:[&::-webkit-scrollbar-thumb]:bg-gray-400 dark:hover:[&::-webkit-scrollbar-thumb]:bg-white/20","[&::-webkit-scrollbar-track]:bg-transparent","[scrollbar-width:thin] [scrollbar-color:rgba(0,0,0,0.2)_transparent] dark:[scrollbar-color:rgba(255,255,255,0.1)_transparent]",r==="vertical"&&"overflow-y-auto overflow-x-hidden",r==="horizontal"&&"overflow-x-auto overflow-y-hidden",r==="both"&&"overflow-auto",o==="sm"&&"[&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar]:h-1.5",o==="md"&&"[&::-webkit-scrollbar]:w-2.5 [&::-webkit-scrollbar]:h-2.5",o==="lg"&&"[&::-webkit-scrollbar]:w-4 [&::-webkit-scrollbar]:h-4",e),...n,children:t}));it.displayName="ScrollArea";function Pv({value:e,onChange:t,placeholder:r="Pick date & time",className:o}){let[n,a]=ye.useState(e),[s,i]=ye.useState(false),[c,d]=ye.useState(e?e.getHours():12),[m,u]=ye.useState(e?e.getMinutes():0);ye.useEffect(()=>{e&&(a(e),d(e.getHours()),u(e.getMinutes()));},[e]);let p=h=>{let f=new Date(h);f.setHours(c),f.setMinutes(m),a(f),t?.(f);},g=(h,f)=>{let w=parseInt(f,10);if(isNaN(w))return;let v=c,y=m;h==="hours"?(w=Math.max(0,Math.min(23,w)),d(w),v=w):(w=Math.max(0,Math.min(59,w)),u(w),y=w);let k=n||new Date,N=new Date(k);N.setHours(v),N.setMinutes(y),a(N),t?.(N);},b=h=>h.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"});return jsxRuntime.jsxs(Ze,{open:s,onOpenChange:i,children:[jsxRuntime.jsxs(et,{onMouseMove:h=>{let f=h.currentTarget.getBoundingClientRect(),w=h.clientX-f.left,v=h.clientY-f.top;h.currentTarget.style.setProperty("--x",`${w}px`),h.currentTarget.style.setProperty("--y",`${v}px`);},className:l("group relative flex h-11 w-full items-center justify-between rounded-2xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-white/[0.03] px-4 py-2 text-sm text-gray-900 dark:text-white transition-all duration-200 overflow-hidden","hover:bg-gray-100 dark:hover:bg-white/[0.06] focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/15",!n&&"text-gray-400 dark:text-white/40",o),children:[jsxRuntime.jsx("div",{className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none",style:{background:"radial-gradient(600px circle at var(--x) var(--y), rgba(0,0,0,0.06), transparent 40%)"}}),jsxRuntime.jsx("span",{className:"relative z-10",children:n?b(n):r}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-gray-400 dark:text-white/40",children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-4 w-4"}),jsxRuntime.jsx(lucideReact.Clock,{className:"h-4 w-4"})]})]}),jsxRuntime.jsx(tt,{className:"w-auto p-0 border-none bg-transparent shadow-none",align:"start",children:jsxRuntime.jsx("div",{className:"flex flex-col rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-black/40 backdrop-blur-xl shadow-2xl dark:shadow-black/50",children:jsxRuntime.jsxs("div",{className:"flex",children:[jsxRuntime.jsx("div",{className:"p-4 border-r border-gray-200 dark:border-white/10",children:jsxRuntime.jsx(Jr,{value:n,onChange:p,className:"border-0 p-0 bg-transparent backdrop-blur-none shadow-none rounded-none"})}),jsxRuntime.jsxs("div",{className:"flex flex-col p-4 w-[160px] h-[340px]",children:[jsxRuntime.jsx("div",{className:"mb-3 text-sm font-medium text-gray-700 dark:text-white/70",children:"Time"}),jsxRuntime.jsxs("div",{className:"flex flex-1 gap-2 min-h-0 overflow-hidden",children:[jsxRuntime.jsxs(it,{className:"flex-1 flex flex-col gap-1",scrollbarSize:"sm",children:[jsxRuntime.jsx("div",{className:"text-xs text-gray-400 dark:text-white/40 text-center mb-1 sticky top-0 bg-white dark:bg-[#0A0A0A] py-1 z-10",children:"Hr"}),jsxRuntime.jsx("div",{className:"flex flex-col gap-1",children:Array.from({length:24}).map((h,f)=>jsxRuntime.jsx("button",{onClick:()=>g("hours",f.toString()),className:l("w-full rounded-lg px-1 py-1.5 text-sm transition-colors text-center shrink-0",c===f?"bg-emerald-500 dark:bg-emerald-600/80 text-white font-medium":"text-gray-700 dark:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.06] hover:text-gray-900 dark:hover:text-white"),children:f.toString().padStart(2,"0")},f))})]}),jsxRuntime.jsx("div",{className:"w-[1px] bg-gray-200 dark:bg-white/[0.06]"}),jsxRuntime.jsxs(it,{className:"flex-1 flex flex-col gap-1",scrollbarSize:"sm",children:[jsxRuntime.jsx("div",{className:"text-xs text-gray-400 dark:text-white/40 text-center mb-1 sticky top-0 bg-white dark:bg-[#0A0A0A] py-1 z-10",children:"Min"}),jsxRuntime.jsx("div",{className:"flex flex-col gap-1",children:Array.from({length:60}).map((h,f)=>jsxRuntime.jsx("button",{onClick:()=>g("minutes",f.toString()),className:l("w-full rounded-lg px-1 py-1.5 text-sm transition-colors text-center shrink-0",m===f?"bg-emerald-500 dark:bg-emerald-600/80 text-white font-medium":"text-gray-700 dark:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.06] hover:text-gray-900 dark:hover:text-white"),children:f.toString().padStart(2,"0")},f))})]})]})]})]})})})]})}var br=ye__namespace.default.forwardRef(({className:e,label:t,error:r,id:o,disabled:n,...a},s)=>{let i=ye__namespace.default.useId(),c=o||i;return jsxRuntime.jsxs("div",{className:"flex flex-col gap-1.5",children:[t&&jsxRuntime.jsx(X,{htmlFor:c,className:l(n&&"opacity-50 cursor-not-allowed"),children:t}),jsxRuntime.jsx("textarea",{ref:s,id:c,disabled:n,className:l("w-full rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-3","border border-gray-200 dark:border-white/[0.10]","text-gray-900 dark:text-white placeholder:text-gray-400 dark:placeholder:text-white/30","focus:outline-none focus:ring-2 focus:ring-purple-400/30","resize-none","disabled:cursor-not-allowed disabled:opacity-50",r&&"border-rose-400/25 focus:ring-rose-300/25",e),...a}),r&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:r})]})});br.displayName="Textarea";var ac=ye__namespace.default.forwardRef((e,t)=>{let[r,o]=ye.useState(false);return jsxRuntime.jsx(kt,{...e,ref:t,type:r?"text":"password",rightIcon:jsxRuntime.jsx(L,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-white/10",onClick:()=>o(!r),"aria-label":r?"Hide password":"Show password",children:r?jsxRuntime.jsx(lucideReact.EyeOff,{className:"h-4 w-4 text-gray-400 dark:text-white/35"}):jsxRuntime.jsx(lucideReact.Eye,{className:"h-4 w-4 text-gray-400 dark:text-white/35"})})})});ac.displayName="PasswordInput";var ic=classVarianceAuthority.cva("inline-flex items-center gap-1 rounded-full border px-2.5 py-1 text-xs font-medium whitespace-nowrap transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"bg-gray-100 text-gray-700 border-gray-200 dark:bg-white/[0.06] dark:text-white/70 dark:border-white/10",neutral:"bg-gray-100 text-gray-700 border-gray-200 dark:bg-white/[0.06] dark:text-white/70 dark:border-white/10",success:"bg-emerald-100 text-emerald-700 border-emerald-200 dark:bg-emerald-400/15 dark:text-emerald-200 dark:border-emerald-400/20",warning:"bg-amber-100 text-amber-700 border-amber-200 dark:bg-amber-400/15 dark:text-amber-200 dark:border-amber-400/20",danger:"bg-rose-100 text-rose-700 border-rose-200 dark:bg-rose-400/15 dark:text-rose-200 dark:border-rose-400/20",info:"bg-sky-100 text-sky-700 border-sky-200 dark:bg-sky-400/15 dark:text-sky-200 dark:border-sky-400/20",outline:"bg-transparent text-white/60 border-white/10 hover:bg-white/[0.06]"}},defaultVariants:{variant:"default"}}),ze=ye__namespace.default.forwardRef(({className:e,variant:t,...r},o)=>jsxRuntime.jsx("span",{ref:o,className:l(ic({variant:t}),e),...r}));ze.displayName="Badge";function tw({label:e,placeholder:t="Add tag...",tags:r,onChange:o,error:n,className:a}){let[s,i]=ye.useState(""),c=m=>{m.key==="Enter"&&s.trim()?(m.preventDefault(),r.includes(s.trim())||o([...r,s.trim()]),i("")):m.key==="Backspace"&&!s&&r.length>0&&o(r.slice(0,-1));},d=m=>{o(r.filter(u=>u!==m));};return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",a),children:[e&&jsxRuntime.jsx(X,{children:e}),jsxRuntime.jsxs("div",{className:l("flex flex-wrap gap-2 rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-3 py-2 border border-gray-200 dark:border-white/[0.10] focus-within:ring-2 focus-within:ring-purple-400/30 transition-all duration-200",n&&"border-rose-400/25"),children:[r.map(m=>jsxRuntime.jsxs(ze,{variant:"default",className:"gap-1 pr-1",children:[m,jsxRuntime.jsx("button",{type:"button",onClick:()=>d(m),className:"rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10 transition-colors",children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},m)),jsxRuntime.jsx("input",{type:"text",value:s,onChange:m=>i(m.target.value),onKeyDown:c,placeholder:r.length===0?t:"",className:"flex-1 bg-transparent py-1 text-sm outline-none placeholder:text-gray-400 dark:placeholder:text-white/30 min-w-[120px]"})]}),n&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400 animate-in slide-in-from-top-1 fade-in duration-200",children:n})]})}function sw({label:e,value:t,onChange:r,error:o,className:n}){return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-1.5",n),children:[e&&jsxRuntime.jsx(X,{children:e}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"h-10 w-10 rounded-xl border border-gray-200 dark:border-white/10 overflow-hidden relative",style:{backgroundColor:t},children:jsxRuntime.jsx("input",{type:"color",value:t,onChange:a=>r(a.target.value),className:"absolute inset-0 opacity-0 cursor-pointer w-full h-full"})}),jsxRuntime.jsx("input",{type:"text",value:t,onChange:a=>r(a.target.value),className:"flex-1 rounded-2xl bg-gray-50 dark:bg-white/[0.04] px-4 py-2 border border-gray-200 dark:border-white/[0.10] text-sm focus:outline-none focus:ring-2 focus:ring-purple-400/30 transition-all"})]}),o&&jsxRuntime.jsx("p",{className:"text-xs text-rose-400",children:o})]})}var Nn=ye.createContext({}),pc=ye__namespace.default.forwardRef(({className:e,value:t,onChange:r,name:o,disabled:n,label:a,children:s,...i},c)=>{let d=ye__namespace.default.useId();return jsxRuntime.jsxs("div",{ref:c,className:l("flex flex-col gap-2",e),...i,children:[a&&jsxRuntime.jsx(X,{className:l(n&&"opacity-50 cursor-not-allowed"),children:a}),jsxRuntime.jsx("div",{className:"flex flex-col gap-2",role:"radiogroup",children:jsxRuntime.jsx(Nn.Provider,{value:{value:t,onChange:r,name:o||d,disabled:n},children:s})})]})});pc.displayName="RadioGroup";var fc=ye__namespace.default.forwardRef(({className:e,value:t,label:r,disabled:o,...n},a)=>{let s=ye.useContext(Nn),i=s.value===t,c=s.disabled||o,d=ye__namespace.default.useId();return jsxRuntime.jsxs("label",{htmlFor:d,className:l("flex items-center gap-3 cursor-pointer group",c&&"cursor-not-allowed opacity-50",e),children:[jsxRuntime.jsxs("div",{className:"relative flex items-center justify-center",children:[jsxRuntime.jsx("input",{ref:a,id:d,type:"radio",name:s.name,value:t,checked:i,disabled:c,onChange:m=>{m.target.checked&&s.onChange?.(t);},className:"peer sr-only",...n}),jsxRuntime.jsx("div",{className:l("h-5 w-5 rounded-full border border-gray-300 dark:border-white/20 bg-gray-50 dark:bg-white/[0.03] transition-all duration-200","peer-focus-visible:ring-2 peer-focus-visible:ring-gray-400 dark:peer-focus-visible:ring-white/20 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-white dark:peer-focus-visible:ring-offset-[#0A0A0A]","group-hover:bg-gray-100 dark:group-hover:bg-white/[0.05]",i&&"border-gray-900 bg-gray-900 dark:border-white dark:bg-white"),children:i&&jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full bg-white dark:bg-black"})})})]}),r&&jsxRuntime.jsx("span",{className:"text-sm text-gray-900 dark:text-white/90 select-none font-medium",children:r})]})});fc.displayName="RadioGroupItem";var wr=ye__namespace.default.createContext({}),gc=ye__namespace.default.forwardRef(({className:e,...t},r)=>{let o=ye__namespace.default.useId();return jsxRuntime.jsx(wr.Provider,{value:{id:o},children:jsxRuntime.jsx("div",{ref:r,className:l("space-y-2",e),...t})})});gc.displayName="FormItem";var hc=ye__namespace.default.forwardRef(({className:e,...t},r)=>{let{id:o}=ye__namespace.default.useContext(wr);return jsxRuntime.jsx(X,{ref:r,className:l("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),htmlFor:o,...t})});hc.displayName="FormLabel";var bc=ye__namespace.default.forwardRef(({...e},t)=>{let{id:r}=ye__namespace.default.useContext(wr),{children:o,...n}=e;return ye__namespace.default.isValidElement(o)?ye__namespace.default.cloneElement(o,{id:r,"aria-describedby":`${r}-description ${r}-message`,...n,...o.props}):jsxRuntime.jsx("div",{ref:t,...e})});bc.displayName="FormControl";var xc=ye__namespace.default.forwardRef(({className:e,...t},r)=>{let{id:o}=ye__namespace.default.useContext(wr);return jsxRuntime.jsx("p",{ref:r,id:`${o}-description`,className:l("text-xs text-white/50",e),...t})});xc.displayName="FormDescription";var vc=ye__namespace.default.forwardRef(({className:e,children:t,...r},o)=>{let{id:n}=ye__namespace.default.useContext(wr);return t?jsxRuntime.jsx("p",{ref:o,id:`${n}-message`,className:l("text-xs font-medium text-rose-500",e),...r,children:t}):null});vc.displayName="FormMessage";var Tc=classVarianceAuthority.cva("relative flex flex-col items-center justify-center rounded-2xl border-2 border-dashed transition-all duration-200 text-center",{variants:{isDragActive:{true:"border-blue-500 bg-blue-50 dark:bg-blue-500/10",false:"border-gray-200 bg-gray-50 hover:bg-gray-100 dark:border-white/10 dark:bg-white/[0.02] dark:hover:bg-white/[0.05]"},error:{true:"border-rose-500 bg-rose-50 dark:bg-rose-500/10",false:""}},defaultVariants:{isDragActive:false,error:false}}),Cc=ye__namespace.default.forwardRef(({className:e,onDrop:t,maxFiles:r=1,maxSize:o,label:n="Upload files",description:a="Drag & drop or click to upload",...s},i)=>{let[c,d]=ye.useState(false),[m,u]=ye.useState([]),[p,g]=ye.useState(null),b=ye__namespace.default.useRef(null),x=k=>{k.preventDefault(),d(true);},h=k=>{k.preventDefault(),d(false);},f=k=>r&&k.length>r?(g(`Max ${r} files allowed`),false):o&&k.some(C=>C.size>o)?(g(`File too large (max ${o/1024/1024}MB)`),false):(g(null),true),w=k=>{k.preventDefault(),d(false);let N=Array.from(k.dataTransfer.files);f(N)&&(u(N),t?.(N));},v=k=>{if(k.target.files){let N=Array.from(k.target.files);f(N)&&(u(N),t?.(N));}},y=(k,N)=>{N.stopPropagation();let C=m.filter((T,E)=>E!==k);u(C),t?.(C);};return jsxRuntime.jsxs("div",{className:"w-full space-y-4",children:[jsxRuntime.jsxs("div",{ref:i,className:l(Tc({isDragActive:c,error:!!p,className:e}),"p-8 cursor-pointer"),onDragOver:x,onDragLeave:h,onDrop:w,onClick:()=>b.current?.click(),...s,children:[jsxRuntime.jsx("input",{ref:b,type:"file",className:"hidden",multiple:r>1,onChange:v}),jsxRuntime.jsx("div",{className:"mb-4 rounded-full bg-gray-100 p-3 dark:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.Upload,{className:"h-6 w-6 text-gray-500 dark:text-white/70"})}),jsxRuntime.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-white",children:n}),jsxRuntime.jsx("div",{className:"mt-1 text-xs text-gray-500 dark:text-white/50",children:a}),p&&jsxRuntime.jsx("div",{className:"mt-2 text-xs font-medium text-rose-500",children:p})]}),m.length>0&&jsxRuntime.jsx("div",{className:"grid gap-2",children:m.map((k,N)=>jsxRuntime.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-gray-200 bg-white p-3 dark:border-white/10 dark:bg-white/[0.03]",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-gray-100 dark:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4 text-gray-500 dark:text-white/70"})}),jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white truncate max-w-[200px]",children:k.name}),jsxRuntime.jsxs("span",{className:"text-xs text-gray-500 dark:text-white/50",children:[(k.size/1024).toFixed(1)," KB"]})]})]}),jsxRuntime.jsx("button",{onClick:C=>y(N,C),className:"rounded-full p-1 hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]},N))})]})});Cc.displayName="FileDropzone";var Sc=classVarianceAuthority.cva("flex items-center gap-2",{variants:{size:{sm:"[&>input]:h-8 [&>input]:w-8 [&>input]:text-sm",md:"[&>input]:h-10 [&>input]:w-10 [&>input]:text-base",lg:"[&>input]:h-12 [&>input]:w-12 [&>input]:text-lg"}},defaultVariants:{size:"md"}}),Dc=ye__namespace.default.forwardRef(({className:e,size:t,length:r=6,value:o="",onChange:n,onComplete:a,disabled:s,error:i,...c},d)=>{let[m,u]=ye.useState(new Array(r).fill("")),p=ye.useRef([]);ye.useEffect(()=>{let h=o.split("").slice(0,r),f=[...h,...new Array(r-h.length).fill("")];u(f);},[o,r]);let g=(h,f)=>{let w=h.target.value;if(isNaN(Number(w)))return;let v=[...m];v[f]=w.substring(w.length-1),u(v);let y=v.join("");n?.(y),w&&f<r-1&&p.current[f+1]?.focus(),y.length===r&&a?.(y);},b=(h,f)=>{h.key==="Backspace"&&!m[f]&&f>0&&p.current[f-1]?.focus();},x=h=>{h.preventDefault();let f=h.clipboardData.getData("text/plain").slice(0,r);if(!/^\d+$/.test(f))return;let w=[...m];f.split("").forEach((y,k)=>{w[k]=y;}),u(w);let v=w.join("");n?.(v),v.length===r&&a?.(v),p.current[Math.min(f.length,r-1)]?.focus();};return jsxRuntime.jsx("div",{ref:d,className:l(Sc({size:t,className:e})),...c,children:m.map((h,f)=>jsxRuntime.jsx("input",{ref:w=>p.current[f]=w,type:"text",inputMode:"numeric",maxLength:1,value:h,disabled:s,onChange:w=>g(w,f),onKeyDown:w=>b(w,f),onPaste:x,className:l("rounded-2xl border bg-gray-50 text-center font-semibold transition-all duration-200","focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 focus:outline-none","disabled:opacity-50 disabled:cursor-not-allowed","dark:bg-white/[0.03] dark:text-white",i?"border-rose-500 text-rose-500 focus:border-rose-500 focus:ring-rose-500/20":"border-gray-200 dark:border-white/10")},f))})});Dc.displayName="OTPInput";var Oc=classVarianceAuthority.cva("flex items-center rounded-2xl border bg-gray-50 dark:bg-white/[0.03] dark:border-white/10",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},error:{true:"border-rose-500",false:"border-gray-200"}},defaultVariants:{size:"md",error:false}}),Vc=ye__namespace.default.forwardRef(({className:e,size:t,error:r,value:o=0,onChange:n,min:a=-1/0,max:s=1/0,step:i=1,disabled:c,...d},m)=>{let u=()=>{o-i>=a&&n?.(o-i);},p=()=>{o+i<=s&&n?.(o+i);},g=b=>{let x=parseFloat(b.target.value);isNaN(x)||n?.(x);};return jsxRuntime.jsxs("div",{className:l(Oc({size:t,error:r,className:e})),children:[jsxRuntime.jsx("button",{type:"button",onClick:u,disabled:c||o<=a,className:"flex h-full items-center justify-center px-3 text-gray-500 hover:text-gray-900 disabled:opacity-50 dark:text-white/50 dark:hover:text-white",children:jsxRuntime.jsx(lucideReact.Minus,{className:"h-3.5 w-3.5"})}),jsxRuntime.jsx("div",{className:"h-full w-px bg-gray-200 dark:bg-white/[0.06]"}),jsxRuntime.jsx("input",{ref:m,type:"number",value:o,onChange:g,disabled:c,className:"h-full w-full min-w-[3rem] bg-transparent text-center text-sm font-medium text-gray-900 focus:outline-none dark:text-white",...d}),jsxRuntime.jsx("div",{className:"h-full w-px bg-gray-200 dark:bg-white/[0.06]"}),jsxRuntime.jsx("button",{type:"button",onClick:p,disabled:c||o>=s,className:"flex h-full items-center justify-center px-3 text-gray-500 hover:text-gray-900 disabled:opacity-50 dark:text-white/50 dark:hover:text-white",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-3.5 w-3.5"})})]})});Vc.displayName="NumberInput";var Fc=classVarianceAuthority.cva("inline-flex items-center rounded-2xl border border-gray-200 bg-gray-50 p-1 dark:border-white/10 dark:bg-white/[0.03]",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},fullWidth:{true:"w-full flex",false:""}},defaultVariants:{size:"md",fullWidth:false}}),$c=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-2xl 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-gray-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-gray-950 dark:focus-visible:ring-gray-300",{variants:{selected:{true:"bg-white text-gray-950 shadow-sm dark:bg-gray-800 dark:text-gray-50",false:"text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-50"},fullWidth:{true:"flex-1",false:""}},defaultVariants:{selected:false,fullWidth:false}}),Uc=ye__namespace.default.forwardRef(({className:e,size:t,fullWidth:r,value:o,onChange:n,options:a,...s},i)=>jsxRuntime.jsx("div",{ref:i,className:l(Fc({size:t,fullWidth:r,className:e})),...s,children:a.map(c=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>n?.(c.value),className:l($c({selected:o===c.value,fullWidth:r})),children:[c.icon&&jsxRuntime.jsx("span",{className:"mr-2",children:c.icon}),c.label]},c.value))}));Uc.displayName="ToggleGroup";var Ln={loading:jsxRuntime.jsx("svg",{className:"animate-spin text-blue-500",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),success:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-emerald-400",children:[jsxRuntime.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),jsxRuntime.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),error:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-rose-400",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntime.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),jsxRuntime.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),warning:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-amber-400",children:[jsxRuntime.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),jsxRuntime.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),jsxRuntime.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),info:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-blue-400",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntime.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),jsxRuntime.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})},Pn=({id:e,title:t,description:r,variant:o="default",duration:n=5e3,onDismiss:a})=>(ye.useEffect(()=>{if(n===1/0)return;let s=setTimeout(()=>{a(e);},n);return ()=>clearTimeout(s)},[n,e,a]),jsxRuntime.jsxs("div",{role:"alert",className:l("pointer-events-auto relative flex w-full max-w-sm items-start gap-4 overflow-hidden rounded-2xl border p-4 shadow-lg transition-all","animate-in slide-in-from-right-full fade-in duration-300","bg-white dark:bg-[#0A0A0A]/90 backdrop-blur-md border-gray-200 dark:border-white/10",o==="error"&&"border-rose-200 dark:border-rose-500/30 bg-rose-50 dark:bg-rose-500/10",o==="success"&&"border-emerald-200 dark:border-emerald-500/20 bg-emerald-50 dark:bg-emerald-950/10",o==="warning"&&"border-amber-200 dark:border-amber-500/20 bg-amber-50 dark:bg-amber-950/10",o==="info"&&"border-blue-200 dark:border-blue-500/20 bg-blue-50 dark:bg-blue-950/10",o==="loading"&&"border-blue-200 dark:border-blue-500/20 bg-blue-50 dark:bg-blue-950/10"),children:[o!=="default"&&Ln[o]&&jsxRuntime.jsx("div",{className:"shrink-0 pt-0.5",children:Ln[o]}),jsxRuntime.jsxs("div",{className:"flex-1 gap-1",children:[t&&jsxRuntime.jsx("div",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:t}),r&&jsxRuntime.jsx("div",{className:"text-sm text-gray-600 dark:text-white/80",children:r})]}),jsxRuntime.jsx("button",{onClick:()=>a(e),className:"shrink-0 rounded-md p-1 text-gray-400 dark:text-white/50 opacity-0 transition-opacity hover:text-gray-900 dark:hover:text-white group-hover:opacity-100 focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20",children:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsxRuntime.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}));var Ko=ye.createContext(void 0);function Jw({children:e}){let[t,r]=ye.useState([]),o=ye.useCallback(i=>{r(c=>c.filter(d=>d.id!==i));},[]),n=ye.useCallback(i=>{let c=Math.random().toString(36).substring(2,9);return r(d=>[...d,{...i,id:c,onDismiss:o}]),c},[o]),a=ye.useCallback((i,c)=>{r(d=>d.map(m=>m.id===i?{...m,...c}:m));},[]),s=ye.useCallback(async(i,c)=>{let d=typeof c.loading=="string"?{title:c.loading,variant:"loading"}:{variant:"loading",...c.loading},m=n({...d,duration:1/0});try{let u=await i,p=typeof c.success=="function"?c.success(u):typeof c.success=="string"?{title:c.success,variant:"success"}:c.success;return a(m,{...p,duration:5e3}),u}catch(u){let p=typeof c.error=="function"?c.error(u):typeof c.error=="string"?{title:c.error,variant:"error"}:c.error;throw a(m,{...p,duration:5e3}),u}},[n,a]);return jsxRuntime.jsxs(Ko.Provider,{value:{toast:n,dismiss:o,promise:s},children:[e,jsxRuntime.jsx("div",{className:"fixed bottom-0 right-0 z-[150] flex max-h-screen w-full flex-col-reverse gap-2 p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",children:t.map(i=>jsxRuntime.jsx(Pn,{...i},i.id))})]})}var Gc={success:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-emerald-400",children:[jsxRuntime.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),jsxRuntime.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),error:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-rose-400",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntime.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),jsxRuntime.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),warning:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-amber-400",children:[jsxRuntime.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),jsxRuntime.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),jsxRuntime.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),info:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-blue-400",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntime.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),jsxRuntime.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})},Jc=ye__namespace.default.forwardRef(({className:e,variant:t="default",icon:r,title:o,children:n,...a},s)=>{let i=r||(t!=="default"?Gc[t]:null);return jsxRuntime.jsxs("div",{ref:s,role:"alert",className:l("relative w-full rounded-2xl border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-gray-900 dark:[&>svg]:text-white","bg-white dark:bg-[#0A0A0A]/50 backdrop-blur-md border-gray-200 dark:border-white/10 text-gray-900 dark:text-white",t==="error"&&"border-rose-200 dark:border-rose-500/20 bg-rose-50 dark:bg-rose-950/10 text-rose-900 dark:text-rose-50 [&>svg]:text-rose-600 dark:[&>svg]:text-rose-400",t==="success"&&"border-emerald-200 dark:border-emerald-500/20 bg-emerald-50 dark:bg-emerald-950/10 text-emerald-900 dark:text-emerald-50 [&>svg]:text-emerald-600 dark:[&>svg]:text-emerald-400",t==="warning"&&"border-amber-200 dark:border-amber-500/20 bg-amber-50 dark:bg-amber-950/10 text-amber-900 dark:text-amber-50 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",t==="info"&&"border-blue-200 dark:border-blue-500/20 bg-blue-50 dark:bg-blue-950/10 text-blue-900 dark:text-blue-50 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",e),...a,children:[i,jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[o&&jsxRuntime.jsx("h5",{className:"mb-1 font-medium leading-none tracking-tight",children:o}),n&&jsxRuntime.jsx("div",{className:"text-sm opacity-90 [&_p]:leading-relaxed",children:n})]})]})});Jc.displayName="Alert";var Zc=ye__namespace.default.forwardRef(({className:e,value:t=0,max:r=100,variant:o="default",size:n="md",isIndeterminate:a=false,hasStripe:s=false,indicatorClassName:i,...c},d)=>{let m=a?0:Math.min(Math.max((t||0)/r,0),1)*100,u={default:"bg-gray-900 dark:bg-white dark:shadow-[0_0_10px_rgba(255,255,255,0.5)]",success:"bg-emerald-500 shadow-sm dark:shadow-[0_0_10px_rgba(16,185,129,0.5)]",warning:"bg-amber-500 shadow-sm dark:shadow-[0_0_10px_rgba(245,158,11,0.5)]",danger:"bg-rose-500 shadow-sm dark:shadow-[0_0_10px_rgba(244,63,94,0.5)]",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-blue-600 shadow-sm dark:shadow-[0_0_15px_rgba(99,102,241,0.5)]"};return jsxRuntime.jsx("div",{ref:d,role:"progressbar","aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":a?void 0:t,className:l("relative w-full overflow-hidden rounded-full bg-gray-200 dark:bg-white/[0.03] border border-gray-200 dark:border-white/5 backdrop-blur-sm",{sm:"h-1",md:"h-2",lg:"h-4"}[n],e),...c,children:jsxRuntime.jsx("div",{className:l("h-full w-full flex-1 transition-all duration-500 ease-in-out relative overflow-hidden",u[o],a&&"absolute inset-0 w-full origin-left animate-indeterminate-progress",i),style:{transform:a?void 0:`translateX(-${100-m}%)`},children:s&&!a&&jsxRuntime.jsx("div",{className:"absolute inset-0 w-full h-full animate-progress-stripe",style:{backgroundImage:"linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)",backgroundSize:"1rem 1rem"}})})})});Zc.displayName="Progress";var rd=ye__namespace.default.forwardRef(({icon:e,title:t,description:r,action:o,className:n,...a},s)=>jsxRuntime.jsx(ie,{ref:s,className:l("p-8 text-center",n),...a,children:jsxRuntime.jsxs("div",{className:"mx-auto w-full max-w-md space-y-3",children:[jsxRuntime.jsx("div",{className:"mx-auto grid h-12 w-12 place-items-center rounded-2xl border border-white/10 bg-white/[0.03] text-white/70",children:e??jsxRuntime.jsx(lucideReact.Info,{className:"h-5 w-5"})}),jsxRuntime.jsx("div",{className:"text-lg font-semibold text-white",children:t}),r?jsxRuntime.jsx("div",{className:"text-sm text-white/55",children:r}):null,o?jsxRuntime.jsx("div",{className:"pt-2 flex justify-center",children:o}):null]})}));rd.displayName="EmptyState";function Sn({className:e,variant:t="default",...r}){return jsxRuntime.jsx("div",{className:l("animate-pulse bg-gray-200 dark:bg-white/[0.03]",t==="circle"&&"rounded-full",t==="default"&&"rounded-2xl",t==="text"&&"rounded h-4 w-full",e),...r})}var ld=ye__namespace.default.forwardRef(({className:e,max:t=5,value:r=0,onChange:o,readOnly:n=false,size:a="md",...s},i)=>{let[c,d]=ye.useState(null),m={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"};return jsxRuntime.jsx("div",{ref:i,className:l("flex items-center gap-1",e),...s,children:Array.from({length:t}).map((u,p)=>{let g=p+1,b=(c!==null?c:r)>=g;return jsxRuntime.jsx("button",{type:"button",disabled:n,onClick:()=>o?.(g),onMouseEnter:()=>!n&&d(g),onMouseLeave:()=>!n&&d(null),className:l("transition-transform hover:scale-110 focus:outline-none",n&&"cursor-default hover:scale-100"),children:jsxRuntime.jsx(lucideReact.Star,{className:l(m[a],"transition-colors duration-200",b?"fill-amber-400 text-amber-400":"fill-transparent text-gray-300 dark:text-white/20")})},p)})})});ld.displayName="Rating";var Dn=classVarianceAuthority.cva("transition-all duration-700 ease-out",{variants:{preset:{fade:"opacity-0 translate-y-4",spring:"opacity-0 scale-95 translate-y-4","slide-right":"opacity-0 -translate-x-8","slide-left":"opacity-0 translate-x-8",blur:"opacity-0 blur-sm scale-105","3d-flip":"opacity-0 rotate-x-90"},visibleState:{fade:"opacity-100 translate-y-0",spring:"opacity-100 scale-100 translate-y-0 animate-enter-spring","slide-right":"opacity-100 translate-x-0","slide-left":"opacity-100 translate-x-0",blur:"opacity-100 blur-0 scale-100","3d-flip":"opacity-100 rotate-x-0"}},defaultVariants:{preset:"spring"}});function Hn({className:e,preset:t="spring",viewport:r=true,visible:o,delay:n=0,once:a=true,asChild:s=false,children:i,style:c,...d}){let{ref:m,isInView:u,hasAnimated:p}=$e({threshold:.1,enabled:r&&o===void 0}),b=o!==void 0?o:r?a?p:u:true,x=Dn({preset:t}),h=b?Dn({visibleState:t}):"";return jsxRuntime.jsx(s?yt:"div",{ref:m,className:l(x,h,e),style:{transitionDelay:`${n}ms`,willChange:"transform, opacity",...c},...d,children:i})}function Sy({children:e,stagger:t=100,delay:r=0,className:o,...n}){let{ref:a,hasAnimated:s}=$e({threshold:.1});return jsxRuntime.jsx("div",{ref:a,className:l("relative",o),...n,children:ye__namespace.default.Children.map(e,(i,c)=>ye__namespace.default.isValidElement(i)?ye__namespace.default.cloneElement(i,{visible:s,viewport:false,delay:r+c*t}):i)})}function By({text:e,type:t="char",stagger:r=30,delay:o=0,className:n,...a}){let{ref:s,hasAnimated:i}=$e({threshold:.2}),c=t==="char"?e.split(""):e.split(" ");return jsxRuntime.jsx("div",{ref:s,className:l("flex flex-wrap",n),"aria-label":e,...a,children:c.map((d,m)=>jsxRuntime.jsxs("span",{className:l("inline-block whitespace-pre transition-all duration-500 ease-out will-change-transform",i?"opacity-100 translate-y-0 blur-0":"opacity-0 translate-y-4 blur-sm"),style:{transitionDelay:`${o+m*r}ms`},children:[d,t==="word"&&m!==c.length-1?" ":""]},m))})}function $y({children:e,speed:t=.1,direction:r="vertical",className:o,...n}){let a=ye.useRef(null);return ye.useEffect(()=>{let s=a.current;if(!s)return;let i=()=>{let c=s.getBoundingClientRect(),d=window.innerHeight;if(c.top>d||c.bottom<0)return;let u=(d/2-(c.top+c.height/2))*t;r==="vertical"?s.style.transform=`translate3d(0, ${u}px, 0)`:s.style.transform=`translate3d(${u}px, 0, 0)`;};return window.addEventListener("scroll",i,{passive:true}),i(),()=>window.removeEventListener("scroll",i)},[t,r]),jsxRuntime.jsx("div",{ref:a,className:l("will-change-transform",o),...n,children:e})}function jy({children:e,strength:t=.5,className:r}){let o=ye.useRef(null),n=s=>{let i=o.current;if(!i)return;let{clientX:c,clientY:d}=s,{left:m,top:u,width:p,height:g}=i.getBoundingClientRect(),b=m+p/2,x=u+g/2,h=c-b,f=d-x,w=Math.max(p,g)*1.5;Math.abs(h)<w&&Math.abs(f)<w?(i.style.setProperty("--mag-x",`${h*t}px`),i.style.setProperty("--mag-y",`${f*t}px`)):(i.style.setProperty("--mag-x","0px"),i.style.setProperty("--mag-y","0px"));},a=()=>{let s=o.current;s&&(s.style.setProperty("--mag-x","0px"),s.style.setProperty("--mag-y","0px"));};return ye.useEffect(()=>(window.addEventListener("mousemove",n),()=>window.removeEventListener("mousemove",n)),[t]),jsxRuntime.jsx("div",{ref:o,className:l("inline-block transition-transform duration-300 ease-out will-change-transform",r),onMouseLeave:a,style:{transform:"translate3d(var(--mag-x, 0px), var(--mag-y, 0px), 0)"},children:e})}function rk({value:e,duration:t=2e3,delay:r=0,decimalPlaces:o=0,className:n,...a}){let[s,i]=ye.useState(0),{ref:c,hasAnimated:d}=$e({threshold:.1}),m=ye.useRef(null);return ye.useEffect(()=>{if(!d)return;let u=g=>{m.current||(m.current=g);let b=Math.min((g-m.current-r)/t,1);if(b>=0){let x=b*e;i(x);}b<1&&requestAnimationFrame(u);},p=setTimeout(()=>{requestAnimationFrame(u);},r);return ()=>clearTimeout(p)},[d,e,t,r]),jsxRuntime.jsx("span",{ref:c,className:l("tabular-nums tracking-tighter",n),...a,children:s.toFixed(o)})}function ik({variant:e="spinner",text:t,fullscreen:r=true,className:o,...n}){let a=r?"fixed inset-0 z-[200] flex items-center justify-center bg-white/80 dark:bg-black/80 backdrop-blur-sm":"flex items-center justify-center p-8 w-full h-full min-h-[200px]";return e==="bar"?jsxRuntime.jsx("div",{className:l("fixed top-0 left-0 right-0 z-[200] h-1 bg-transparent",o),...n,children:jsxRuntime.jsx("div",{className:"h-full bg-blue-500 animate-indeterminate-progress origin-left"})}):e==="dots"?jsxRuntime.jsxs("div",{className:l(a,o),...n,children:[jsxRuntime.jsxs("div",{className:"flex space-x-2",children:[jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-blue-500 animate-bounce [animation-delay:-0.3s]"}),jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-blue-500 animate-bounce [animation-delay:-0.15s]"}),jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-blue-500 animate-bounce"})]}),t&&jsxRuntime.jsx("span",{className:"ml-4 text-sm font-medium text-gray-500 dark:text-white/70",children:t})]}):e==="logo"?jsxRuntime.jsx("div",{className:l(a,o),...n,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-4",children:[jsxRuntime.jsxs("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-full bg-white dark:bg-white/[0.06] shadow-lg ring-1 ring-black/5",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 rounded-full animate-ping bg-blue-500/20"}),jsxRuntime.jsx("div",{className:"h-8 w-8 rounded bg-blue-500"})]}),t&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-gray-500 dark:text-white/70 animate-pulse",children:t})]})}):e==="glass"?jsxRuntime.jsx("div",{className:l(a,"bg-white/30 dark:bg-black/30 backdrop-blur-md",o),...n,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-3",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"h-8 w-8 animate-spin text-white"}),t&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-white tracking-wider",children:t})]})}):jsxRuntime.jsx("div",{className:l(a,o),...n,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-3",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"h-8 w-8 animate-spin text-blue-500"}),t&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-gray-500 dark:text-white/70",children:t})]})})}function pk({preset:e="fade",duration:t=300,useViewTransition:r=false,className:o,children:n,...a}){let[s,i]=ye.useState(false);ye.useEffect(()=>{if(r&&document.startViewTransition)document.startViewTransition(()=>{i(true);});else {let m=requestAnimationFrame(()=>{i(true);});return ()=>cancelAnimationFrame(m)}},[r]);let d={fade:{initial:"opacity-0",animate:"opacity-100"},"slide-up":{initial:"opacity-0 translate-y-8",animate:"opacity-100 translate-y-0"},scale:{initial:"opacity-0 scale-95",animate:"opacity-100 scale-100"},blur:{initial:"opacity-0 blur-sm",animate:"opacity-100 blur-0"},none:{initial:"",animate:""}}[e];return jsxRuntime.jsx("div",{className:l("transition-all ease-out",s?d.animate:d.initial,o),style:{transitionDuration:`${t}ms`,viewTransitionName:r?"page-content":void 0},...a,children:n})}var Ed={sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-14 w-14 text-base",xl:"h-20 w-20 text-xl"},$=ye__namespace.default.forwardRef(({className:e,src:t,alt:r,fallback:o,size:n="md",...a},s)=>{let[i,c]=ye.useState(false);return ye.useEffect(()=>{c(false);},[t]),jsxRuntime.jsx("div",{ref:s,className:l("relative flex shrink-0 overflow-hidden rounded-full bg-gray-200 dark:bg-white/[0.06]",Ed[n],e),...a,children:t&&!i?jsxRuntime.jsx("img",{src:t,alt:r,className:"aspect-square h-full w-full object-cover",onError:()=>c(true)}):jsxRuntime.jsx("div",{className:"flex h-full w-full items-center justify-center bg-gray-100 dark:bg-white/5 text-gray-600 dark:text-white/70 font-medium",children:o||(r?r.charAt(0).toUpperCase():"?")})})});$.displayName="Avatar";var _o=ye.createContext(void 0);function Tk({type:e="single",defaultValue:t,value:r,onValueChange:o,className:n,children:a,...s}){let[i,c]=ye.useState(t||(e==="multiple"?[]:"")),d=r!==void 0?r:i,m=u=>{let p;if(e==="multiple"){let g=Array.isArray(d)?d:[];g.includes(u)?p=g.filter(b=>b!==u):p=[...g,u];}else p=d===u?"":u;r===void 0&&c(p),o?.(p);};return jsxRuntime.jsx(_o.Provider,{value:{value:d,onValueChange:m,type:e},children:jsxRuntime.jsx("div",{className:l("space-y-2",n),...s,children:a})})}var Yo=ye.createContext({value:"",isOpen:false});function Ck({className:e,value:t,children:r,...o}){let n=ye.useContext(_o),a=Array.isArray(n?.value)?n?.value.includes(t):n?.value===t;return jsxRuntime.jsx(Yo.Provider,{value:{value:t,isOpen:!!a},children:jsxRuntime.jsx("div",{className:l("overflow-hidden rounded-2xl border border-gray-200 dark:border-white/5 bg-gray-50 dark:bg-white/[0.03] transition-all duration-200",a&&"bg-white dark:bg-white/[0.04] border-gray-300 dark:border-white/10",e),...o,children:r})})}function Mk({className:e,children:t,...r}){let o=ye.useContext(_o),{value:n,isOpen:a}=ye.useContext(Yo);return jsxRuntime.jsxs("button",{type:"button",onClick:()=>o?.onValueChange(n),"aria-expanded":a,"aria-controls":`accordion-content-${n}`,id:`accordion-trigger-${n}`,className:l("flex w-full items-center justify-between px-4 py-3 text-sm font-medium text-gray-900 dark:text-white transition-all hover:text-gray-700 dark:hover:text-white/90 focus:outline-none",e),...r,children:[t,jsxRuntime.jsx(lucideReact.ChevronDown,{className:l("h-4 w-4 shrink-0 text-gray-400 dark:text-white/50 transition-transform duration-200",a&&"rotate-180 text-gray-900 dark:text-white")})]})}function Rk({className:e,children:t,...r}){let{isOpen:o,value:n}=ye.useContext(Yo);return o?jsxRuntime.jsx("div",{id:`accordion-content-${n}`,role:"region","aria-labelledby":`accordion-trigger-${n}`,className:l("px-4 pb-3 pt-0 text-sm text-gray-600 dark:text-white/70 animate-in slide-in-from-top-1 fade-in duration-200",e),...r,children:t}):null}ye__namespace.default.createContext(null);var yr=ye__namespace.default.forwardRef(({className:e,wrapperClassName:t,rounded:r=false,maxHeight:o,...n},a)=>jsxRuntime.jsx(it,{className:l("w-full",r&&"rounded-2xl border border-white/10",t),style:{maxHeight:o},orientation:o?"both":"horizontal",scrollbarSize:"sm",children:jsxRuntime.jsx("table",{ref:a,className:l("w-full caption-bottom text-sm text-left",e),...n})}));yr.displayName="Table";var kr=ye__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("thead",{ref:r,className:l("bg-white/[0.02] text-white/55",e),...t}));kr.displayName="TableHeader";var Nr=ye__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("tbody",{ref:r,className:l("[&_tr:last-child]:border-0",e),...t}));Nr.displayName="TableBody";var dt=ye__namespace.default.forwardRef(({className:e,hoverable:t=true,optimized:r=false,...o},n)=>jsxRuntime.jsx("tr",{ref:n,className:l("border-t border-white/10 transition-colors data-[state=selected]:bg-white/[0.04]",t&&"hover:bg-white/[0.02]",e),style:r?{contentVisibility:"auto",containIntrinsicSize:"0 56px"}:void 0,...o}));dt.displayName="TableRow";var rt=ye__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("th",{ref:r,className:l("h-10 px-5 py-3 text-left align-middle font-semibold text-white/55 [&:has([role=checkbox])]:pr-0 whitespace-nowrap",e),...t}));rt.displayName="TableHead";var We=ye__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("td",{ref:r,className:l("p-5 align-middle [&:has([role=checkbox])]:pr-0 text-white/85 whitespace-nowrap",e),...t}));We.displayName="TableCell";function $k({data:e,columns:t,searchPlaceholder:r="Search...",searchKeys:o,onRowClick:n,className:a,maxHeight:s,rounded:i=true}){let[c,d]=ye.useState(""),[m,u]=ye.useState({key:"",direction:null}),p=ye.useMemo(()=>{let b=[...e];return c&&o&&(b=b.filter(x=>o.some(h=>String(x[h]??"").toLowerCase().includes(c.toLowerCase())))),m.key&&m.direction&&b.sort((x,h)=>{let f=x[m.key],w=h[m.key];return f==null||w===void 0||w===null?0:f<w?m.direction==="asc"?-1:1:f>w?m.direction==="asc"?1:-1:0}),b},[e,c,o,m]),g=b=>{u(x=>({key:b,direction:x.key===b&&x.direction==="asc"?"desc":"asc"}));};return jsxRuntime.jsxs("div",{className:l("space-y-4",a),children:[o&&jsxRuntime.jsx("div",{className:"relative max-w-sm",children:jsxRuntime.jsx(kt,{placeholder:r,value:c,onChange:b=>d(b.target.value),leftIcon:jsxRuntime.jsx(lucideReact.Search,{className:"w-4 h-4 text-white/40"})})}),jsxRuntime.jsxs(yr,{rounded:i,maxHeight:s,children:[jsxRuntime.jsx(kr,{children:jsxRuntime.jsx(dt,{children:t.map(b=>jsxRuntime.jsx(rt,{className:l(b.sortable&&"cursor-pointer select-none hover:text-cyan-500 transition-colors",b.className),onClick:()=>b.sortable&&g(b.key),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[b.header,b.sortable&&jsxRuntime.jsx("span",{className:"text-white/30",children:m.key===b.key?m.direction==="asc"?jsxRuntime.jsx(lucideReact.ArrowUp,{className:"w-3 h-3 text-cyan-500"}):jsxRuntime.jsx(lucideReact.ArrowDown,{className:"w-3 h-3 text-cyan-500"}):jsxRuntime.jsx(lucideReact.ArrowUpDown,{className:"w-3 h-3"})})]})},String(b.key)))})}),jsxRuntime.jsxs(Nr,{children:[p.map((b,x)=>jsxRuntime.jsx(dt,{onClick:()=>n?.(b),className:l(n&&"cursor-pointer hover:bg-white/[0.03] transition-colors group"),children:t.map(h=>jsxRuntime.jsx(We,{className:h.className,children:h.render?h.render(b):b[h.key]},String(h.key)))},x)),p.length===0&&jsxRuntime.jsx(dt,{children:jsxRuntime.jsxs(We,{colSpan:t.length,className:"h-32 text-center text-white/40",children:['No results found for "',c,'"']})})]})]})]})}var qo=ye__namespace.default.forwardRef(({className:e,containerClassName:t,alt:r,src:o,fallback:n,onLoad:a,onError:s,...i},c)=>{let[d,m]=ye.useState(true),[u,p]=ye.useState(false),g=x=>{m(false),a?.(x);},b=x=>{m(false),p(true),s?.(x);};return u&&n?jsxRuntime.jsx(jsxRuntime.Fragment,{children:n}):jsxRuntime.jsxs("div",{className:l("relative overflow-hidden rounded-2xl bg-gray-100 dark:bg-white/[0.02] border border-gray-200 dark:border-white/10",t),children:[d&&jsxRuntime.jsx(Sn,{className:"absolute inset-0 h-full w-full"}),jsxRuntime.jsx("img",{ref:c,src:o,alt:r,onLoad:g,onError:b,className:l("h-full w-full object-cover transition-opacity duration-300",d?"opacity-0":"opacity-100",e),...i})]})});qo.displayName="Image";var Wd=classVarianceAuthority.cva("flex flex-col gap-4 rounded-2xl border p-4 transition-all duration-200",{variants:{variant:{default:"bg-white border-gray-200 dark:bg-white/[0.03] dark:border-white/10",glass:"backdrop-blur-md bg-white/80 border-white/20 dark:bg-black/40 dark:border-white/10"}},defaultVariants:{variant:"default"}}),_d=ye__namespace.default.forwardRef(({className:e,variant:t,user:r,onFollow:o,onMessage:n,...a},s)=>jsxRuntime.jsxs("div",{ref:s,className:l(Wd({variant:t,className:e})),...a,children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between",children:[jsxRuntime.jsxs("div",{className:"flex gap-3",children:[jsxRuntime.jsx($,{src:r.avatarSrc,alt:r.name,size:"lg"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:r.name}),r.role&&jsxRuntime.jsx("span",{className:"text-xs text-gray-500 dark:text-white/50",children:r.role}),r.email&&jsxRuntime.jsx("div",{className:"text-xs text-gray-400 dark:text-white/40 mt-0.5",children:r.email})]})]}),o&&jsxRuntime.jsx(L,{size:"sm",variant:"outline",onClick:o,children:"Follow"})]}),r.bio&&jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 line-clamp-2",children:r.bio}),r.stats&&jsxRuntime.jsx("div",{className:"flex gap-4 border-t border-gray-100 pt-3 dark:border-white/5",children:r.stats.map((i,c)=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("span",{className:"text-xs font-medium text-gray-900 dark:text-white",children:i.value}),jsxRuntime.jsx("span",{className:"text-[10px] text-gray-500 dark:text-white/40",children:i.label})]},c))}),n&&jsxRuntime.jsx(L,{className:"w-full mt-2",onClick:n,children:"Message"})]}));_d.displayName="UserPreview";var qd=classVarianceAuthority.cva("relative pl-8 pb-8 last:pb-0",{variants:{status:{default:"[&>div:first-child]:bg-gray-200 dark:[&>div:first-child]:bg-white/20",active:"[&>div:first-child]:bg-blue-500",success:"[&>div:first-child]:bg-emerald-500",error:"[&>div:first-child]:bg-rose-500"}},defaultVariants:{status:"default"}}),jd=ye__namespace.default.forwardRef(({className:e,status:t,title:r,date:o,description:n,icon:a,isLast:s,...i},c)=>jsxRuntime.jsxs("div",{ref:c,className:l(qd({status:t,className:e})),...i,children:[!s&&jsxRuntime.jsx("div",{className:"absolute left-[11px] top-[24px] bottom-0 w-px bg-gray-200 dark:bg-white/[0.06]"}),jsxRuntime.jsx("div",{className:l("absolute left-0 top-1.5 flex h-6 w-6 items-center justify-center rounded-full border-2 border-white dark:border-black ring-1 ring-transparent transition-colors",t==="active"?"bg-blue-500 ring-blue-500/30":t==="success"?"bg-emerald-500 ring-emerald-500/30":t==="error"?"bg-rose-500 ring-rose-500/30":"bg-gray-200 dark:bg-white/20"),children:a&&jsxRuntime.jsx("span",{className:"text-white text-[10px]",children:a})}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:r}),o&&jsxRuntime.jsx("span",{className:"text-xs text-gray-500 dark:text-white/40",children:o})]}),n&&jsxRuntime.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:n})]})]}));jd.displayName="TimelineItem";var sN=({children:e,className:t})=>jsxRuntime.jsx("div",{className:l("flex flex-col",t),children:e});var zn=({node:e,depth:t=0,onSelect:r})=>{let[o,n]=ye.useState(false),a=e.children&&e.children.length>0,s=i=>{i.stopPropagation(),a&&n(!o),r?.(e);};return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:l("flex items-center gap-2 rounded-lg px-2 py-1.5 text-sm text-gray-700 transition-colors hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-white/[0.03] cursor-pointer"),style:{paddingLeft:`${t*12+8}px`},onClick:s,children:[a?jsxRuntime.jsx("span",{className:"text-gray-400 dark:text-white/40",children:o?jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})}):jsxRuntime.jsx("span",{className:"w-4"}),e.icon?jsxRuntime.jsx("span",{className:"text-gray-500 dark:text-white/50",children:e.icon}):jsxRuntime.jsx("span",{className:"text-blue-500 dark:text-blue-400",children:a?o?jsxRuntime.jsx(lucideReact.FolderOpen,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Folder,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"})}),jsxRuntime.jsx("span",{className:"truncate",children:e.label})]}),o&&a&&jsxRuntime.jsx("div",{className:"animate-in slide-in-from-top-1 fade-in duration-200",children:e.children.map(i=>jsxRuntime.jsx(zn,{node:i,depth:t+1,onSelect:r},i.id))})]})},pN=({data:e,className:t,onSelect:r})=>jsxRuntime.jsx("div",{className:l("w-full select-none",t),children:e.map(o=>jsxRuntime.jsx(zn,{node:o,onSelect:r},o.id))});function Kn({title:e,view:t="board",onViewChange:r,onFilter:o,onSort:n,onAddColumn:a,canUndo:s,canRedo:i,onUndo:c,onRedo:d,className:m}){let u=[{id:"board",icon:lucideReact.Layout,label:"Board"},{id:"list",icon:lucideReact.List,label:"List"},{id:"calendar",icon:lucideReact.Calendar,label:"Calendar"},{id:"timeline",icon:lucideReact.Clock,label:"Timeline"}];return jsxRuntime.jsxs("div",{className:l("flex items-center justify-between mb-8",m),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-6",children:[jsxRuntime.jsx("h1",{className:"text-2xl font-bold text-white tracking-tight",children:e}),jsxRuntime.jsx("div",{className:"flex items-center bg-white/5 rounded-xl p-1",children:u.map(p=>jsxRuntime.jsxs("button",{onClick:()=>r?.(p.id),className:l("flex items-center gap-2 px-3 py-1.5 rounded-lg text-xs font-medium transition-all",t===p.id?"bg-white/10 text-white shadow-lg":"text-white/40 hover:text-white/60"),children:[jsxRuntime.jsx(p.icon,{className:"h-3.5 w-3.5"}),p.label]},p.id))})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1 mr-2",children:[jsxRuntime.jsx(L,{variant:"ghost",size:"icon",onClick:c,disabled:!s,className:"h-8 w-8 text-white/40 disabled:opacity-20",children:jsxRuntime.jsx(lucideReact.Undo2,{className:"h-4 w-4"})}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",onClick:d,disabled:!i,className:"h-8 w-8 text-white/40 disabled:opacity-20",children:jsxRuntime.jsx(lucideReact.Redo2,{className:"h-4 w-4"})})]}),jsxRuntime.jsxs(L,{variant:"ghost",size:"sm",onClick:o,className:"gap-2 text-white/60",children:[jsxRuntime.jsx(lucideReact.Filter,{className:"h-4 w-4"}),"Filter"]}),jsxRuntime.jsxs(L,{variant:"ghost",size:"sm",onClick:n,className:"gap-2 text-white/60",children:[jsxRuntime.jsx(lucideReact.SortAsc,{className:"h-4 w-4"}),"Sort"]}),jsxRuntime.jsx("div",{className:"w-px h-4 bg-white/10 mx-2"}),jsxRuntime.jsxs(L,{size:"sm",onClick:a,className:"gap-2",children:[jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"}),"Add Column"]}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-9 w-9 text-white/40",children:jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:"h-4 w-4"})})]})]})}function $n({count:e,limit:t,className:r}){if(!t)return null;let o=e>t,n=Math.min(e/t*100,100);return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3",r),children:[jsxRuntime.jsx("div",{className:"flex-1 h-1 bg-white/5 rounded-full overflow-hidden",children:jsxRuntime.jsx("div",{className:l("h-full transition-all duration-500",o?"bg-red-500":n>80?"bg-orange-500":"bg-blue-500"),style:{width:`${n}%`}})}),jsxRuntime.jsxs("div",{className:l("flex items-center gap-1.5 text-[10px] font-bold px-2 py-0.5 rounded-full",o?"bg-red-500/20 text-red-400":"bg-white/5 text-white/40"),children:[o&&jsxRuntime.jsx(lucideReact.AlertCircle,{className:"h-3 w-3"}),e,"/",t]})]})}var Jo=ye__namespace.default.memo(({task:e,isSelected:t,showTimer:r,onEdit:o,onDelete:n,draggable:a=true,activeTimerTaskId:s,selectable:i,cardClassName:c,onTaskClick:d,onTaskSelectionChange:m,onTaskTimerToggle:u,onDragStart:p,onDragOver:g,onDrop:b,renderCard:x})=>{if(x)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:x(e)});let h=f=>{switch(f){case "urgent":return "danger";case "high":return "warning";case "medium":return "info";case "low":return "success";default:return "neutral"}};return jsxRuntime.jsx(ie,{onClick:f=>d?.(f,e),draggable:a,onDragStart:p,onDragOver:g,onDrop:b,className:l("p-6 border border-white/10 bg-white/[0.03] hover:bg-white/[0.06] transition-all duration-200 rounded-2xl group cursor-grab active:cursor-grabbing",e.blockedBy&&e.blockedBy.length>0&&"border-red-500/30 bg-red-500/[0.02]",t&&"ring-2 ring-cyan-500/50 bg-cyan-500/[0.02]",c),children:jsxRuntime.jsxs("div",{className:"flex flex-col gap-3",children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[i&&jsxRuntime.jsx(Po,{checked:t,onChange:f=>{m?.(t?[]:[e.id]);},onClick:f=>f.stopPropagation(),className:"mr-1"}),e.blockedBy&&e.blockedBy.length>0&&jsxRuntime.jsx(lucideReact.Lock,{className:"h-3.5 w-3.5 text-red-500 flex-shrink-0"}),jsxRuntime.jsx(we,{className:l("font-medium text-sm leading-tight group-hover:text-cyan-400 transition-colors truncate",e.blockedBy&&e.blockedBy.length>0&&"text-red-400/80"),children:e.title})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[n&&jsxRuntime.jsx("button",{onClick:f=>{f.stopPropagation(),n(e.id);},className:"p-1 rounded-md hover:bg-red-500/20 text-white/20 hover:text-red-400 transition-colors",children:jsxRuntime.jsx(lucideReact.Trash2,{className:"h-3.5 w-3.5"})}),a&&jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4 text-white/20 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0"})]})]}),e.description&&jsxRuntime.jsx(we,{className:"text-xs text-white/50 line-clamp-2",children:e.description}),e.progress!==void 0&&jsxRuntime.jsxs("div",{className:"space-y-1.5",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between text-[10px]",children:[jsxRuntime.jsx("span",{className:"text-white/30 uppercase font-bold tracking-wider",children:"Progress"}),jsxRuntime.jsxs("span",{className:"text-white/50",children:[e.progress,"%"]})]}),jsxRuntime.jsx("div",{className:"h-1 w-full bg-white/[0.03] rounded-full overflow-hidden",children:jsxRuntime.jsx("div",{className:"h-full bg-cyan-500 transition-all duration-500",style:{width:`${e.progress}%`}})})]}),jsxRuntime.jsxs("div",{className:"flex flex-wrap gap-2 mt-1",children:[e.priority&&jsxRuntime.jsx(ze,{variant:h(e.priority),className:"text-[10px] px-1.5 py-0 uppercase font-bold",children:e.priority}),e.tags?.map(f=>jsxRuntime.jsx(ze,{variant:"neutral",className:"text-[10px] px-1.5 py-0 bg-white/[0.03] border-white/5",children:f},f))]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between mt-2 pt-3 border-t border-white/5",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-white/30",children:[e.timeSpent!==void 0&&jsxRuntime.jsxs("div",{className:l("flex items-center gap-1 px-1.5 py-0.5 rounded-md transition-colors",s===e.id?"bg-cyan-500/20 text-cyan-400":"bg-white/[0.03]"),children:[s===e.id?jsxRuntime.jsx(lucideReact.Pause,{className:"h-2.5 w-2.5 cursor-pointer hover:scale-110 transition-transform",onClick:f=>{f.stopPropagation(),u?.(e.id);}}):jsxRuntime.jsx(lucideReact.Play,{className:"h-2.5 w-2.5 cursor-pointer hover:scale-110 transition-transform",onClick:f=>{f.stopPropagation(),u?.(e.id);}}),jsxRuntime.jsxs("span",{className:"font-mono",children:[Math.floor(e.timeSpent/3600),"h ",Math.floor(e.timeSpent%3600/60),"m"]})]}),e.comments!==void 0&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(lucideReact.MessageSquare,{className:"h-3 w-3"}),e.comments]}),e.attachments!==void 0&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-3 w-3"}),e.attachments]}),e.dueDate&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(lucideReact.Clock,{className:"h-3 w-3"}),e.dueDate]})]}),e.assignee&&jsxRuntime.jsx("div",{className:"flex -space-x-2",children:jsxRuntime.jsx("div",{className:"h-6 w-6 rounded-full border-2 border-[#0a0a0a] bg-white/[0.06] flex items-center justify-center text-[10px] font-bold overflow-hidden",children:e.assignee.avatar?jsxRuntime.jsx("img",{src:e.assignee.avatar,alt:e.assignee.name,className:"h-full w-full object-cover"}):e.assignee.name[0]})})]})]})})});Jo.displayName="KanbanCard";function Qo({column:e,tasks:t,onAddTask:r,onCollapse:o,onTaskClick:n,onAction:a,onDragStart:s,onDragOver:i,onDrop:c,isCollapsed:d,children:m,className:u}){return jsxRuntime.jsxs("div",{className:l("flex flex-col h-full transition-all duration-300",d?"w-12":"w-80",u),onDragOver:p=>i?.(p),onDrop:p=>c?.(p),onDragStart:p=>s?.(p,e.id,"column"),draggable:!d,children:[jsxRuntime.jsxs("div",{className:l("flex items-center justify-between mb-4 px-2",d&&"flex-col gap-4"),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[jsxRuntime.jsx("button",{onClick:()=>o?.(e.id),className:"p-1 rounded hover:bg-white/5 text-white/40",children:d?jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"})}),!d&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:e.color||"#3b82f6"}}),jsxRuntime.jsx("h3",{className:"font-bold text-sm text-white truncate",children:e.title}),jsxRuntime.jsx("span",{className:"text-[10px] font-bold px-1.5 py-0.5 rounded-md bg-white/5 text-white/40",children:t.length})]})]}),!d&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>r?.(e.id),children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"})}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>a?.("more"),children:jsxRuntime.jsx(lucideReact.MoreVertical,{className:"h-4 w-4"})})]})]}),!d&&e.limit&&jsxRuntime.jsx("div",{className:"px-2 mb-4",children:jsxRuntime.jsx($n,{count:t.length,limit:e.limit})}),jsxRuntime.jsx("div",{className:l("flex-1 overflow-y-auto min-h-0 px-2 space-y-3 custom-scrollbar",d&&"hidden"),children:m||t.map(p=>jsxRuntime.jsx(Jo,{task:p,onTaskClick:(g,b)=>n?.(b),onDragStart:g=>s?.(g,p.id,"task"),onDragOver:g=>i?.(g,p.id),onDrop:g=>c?.(g,p.id)},p.id))}),d&&jsxRuntime.jsx("div",{className:"flex-1 flex items-center justify-center",children:jsxRuntime.jsx("span",{className:"rotate-90 whitespace-nowrap text-[10px] font-bold uppercase tracking-widest text-white/20",children:e.title})})]})}function oo({tasks:e,columns:t,onTaskClick:r,className:o}){let n=a=>t.find(s=>s.id===a);return jsxRuntime.jsx("div",{className:l("bg-white/[0.02] border border-white/5 rounded-2xl overflow-hidden",o),children:jsxRuntime.jsxs(yr,{children:[jsxRuntime.jsx(kr,{children:jsxRuntime.jsxs(dt,{className:"hover:bg-transparent border-white/5",children:[jsxRuntime.jsx(rt,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Task"}),jsxRuntime.jsx(rt,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Status"}),jsxRuntime.jsx(rt,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Priority"}),jsxRuntime.jsx(rt,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Assignee"}),jsxRuntime.jsx(rt,{className:"text-white/40 uppercase text-[10px] font-bold",children:"Due Date"})]})}),jsxRuntime.jsx(Nr,{children:e.map(a=>{let s=n(a.columnId);return jsxRuntime.jsxs(dt,{className:"border-white/5 hover:bg-white/[0.03] cursor-pointer transition-colors",onClick:()=>r?.(a),children:[jsxRuntime.jsx(We,{className:"font-medium text-white",children:a.title}),jsxRuntime.jsx(We,{children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:s?.color||"#3b82f6"}}),jsxRuntime.jsx("span",{className:"text-xs text-white/60",children:s?.title})]})}),jsxRuntime.jsx(We,{children:jsxRuntime.jsx(ze,{variant:a.priority==="urgent"?"danger":a.priority==="high"?"warning":"info",className:"text-[10px] uppercase",children:a.priority||"medium"})}),jsxRuntime.jsx(We,{children:a.assignee&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx($,{src:a.assignee.avatar,alt:a.assignee.name,size:"sm"}),jsxRuntime.jsx("span",{className:"text-xs text-white/60",children:a.assignee.name})]})}),jsxRuntime.jsx(We,{className:"text-xs text-white/40",children:a.dueDate?new Date(a.dueDate).toLocaleDateString():"-"})]},a.id)})})]})})}function Wn({tasks:e,className:t}){return jsxRuntime.jsxs("div",{className:l("p-8 bg-white/[0.02] border border-white/5 rounded-2xl flex flex-col items-center justify-center min-h-[400px]",t),children:[jsxRuntime.jsx("div",{className:"h-12 w-12 rounded-full bg-blue-500/10 flex items-center justify-center mb-4",children:jsxRuntime.jsx("div",{className:"h-6 w-6 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"})}),jsxRuntime.jsx("h3",{className:"text-lg font-bold text-white mb-2",children:"Timeline View"}),jsxRuntime.jsxs("p",{className:"text-sm text-white/40 text-center max-w-xs",children:["The timeline view is currently being optimized for high-performance rendering of ",e.length," tasks."]})]})}function _n({tasks:e,columns:t,onTaskClick:r,className:o}){return jsxRuntime.jsx(oo,{tasks:e,columns:t,onTaskClick:r,className:o})}function Yn({tasks:e,onTaskClick:t,onAddTask:r,className:o}){let[n,a]=ye.useState(new Date),s=(f,w)=>new Date(f,w+1,0).getDate(),i=(f,w)=>new Date(f,w,1).getDay(),c=n.getFullYear(),d=n.getMonth(),m=s(c,d),u=i(c,d),p=()=>a(new Date(c,d-1,1)),g=()=>a(new Date(c,d+1,1)),b=["January","February","March","April","May","June","July","August","September","October","November","December"],x=[];for(let f=0;f<u;f++)x.push(null);for(let f=1;f<=m;f++)x.push(new Date(c,d,f));let h=f=>e.filter(w=>{if(!w.dueDate)return false;let v=new Date(w.dueDate);return v.getDate()===f.getDate()&&v.getMonth()===f.getMonth()&&v.getFullYear()===f.getFullYear()});return jsxRuntime.jsxs("div",{className:l("flex flex-col h-full",o),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-6",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[jsxRuntime.jsxs(Hm,{level:3,className:"text-white",children:[b[d]," ",c]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(L,{variant:"ghost",size:"sm",onClick:p,children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(L,{variant:"ghost",size:"sm",onClick:g,children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]}),jsxRuntime.jsx(L,{variant:"ghost",size:"sm",onClick:()=>a(new Date),children:"Today"})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-7 gap-px bg-white/5 border border-white/5 rounded-2xl overflow-hidden flex-1",children:[["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(f=>jsxRuntime.jsx("div",{className:"bg-white/[0.02] p-3 text-center",children:jsxRuntime.jsx(we,{size:"xs",className:"text-white/40 font-medium uppercase tracking-wider",children:f})},f)),x.map((f,w)=>jsxRuntime.jsx("div",{className:l("bg-gray-900/50 min-h-[120px] p-2 group transition-colors hover:bg-white/[0.02]",!f&&"bg-transparent"),children:f&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-2",children:[jsxRuntime.jsx("span",{className:l("text-xs font-medium w-6 h-6 flex items-center justify-center rounded-full",f.toDateString()===new Date().toDateString()?"bg-blue-500 text-white":"text-white/40"),children:f.getDate()}),jsxRuntime.jsx("button",{onClick:()=>r?.(f),className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-white/10 rounded-lg transition-all",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-3 w-3 text-white/40"})})]}),jsxRuntime.jsx("div",{className:"space-y-1",children:h(f).map(v=>jsxRuntime.jsx("div",{onClick:()=>t?.(v),className:"px-2 py-1 rounded-lg bg-blue-500/10 border border-blue-500/20 cursor-pointer hover:bg-blue-500/20 transition-all",children:jsxRuntime.jsx(we,{size:"xs",className:"text-blue-400 truncate",children:v.title})},v.id))})]})},w))]})]})}function Hm({children:e,level:t,className:r}){let o=`h${t}`;return jsxRuntime.jsx(o,{className:l("font-semibold",r),children:e})}function Xn({children:e,...t}){return jsxRuntime.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden rounded-2xl bg-white dark:bg-black/90 text-gray-900 dark:text-white",children:jsxRuntime.jsx(Io,{usePopover:false,...t,children:e})})}function f1({children:e,open:t,onOpenChange:r,...o}){let n=ye.useRef(null);ye.useEffect(()=>{let s=i=>{i.key==="Escape"&&r(false);};return t&&(document.addEventListener("keydown",s),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",s),document.body.style.overflow="unset";}},[t,r]);let a=s=>{s.target===n.current&&r(false);};return t?reactDom.createPortal(jsxRuntime.jsx("div",{ref:n,onClick:a,className:"fixed inset-0 z-[100] flex items-start justify-center bg-black/60 backdrop-blur-sm animate-in fade-in duration-200 pt-[20vh]",children:jsxRuntime.jsx("div",{className:"relative w-full max-w-lg overflow-hidden rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-black/90 shadow-2xl animate-in zoom-in-95 duration-200",children:jsxRuntime.jsx(Io,{usePopover:false,...o,children:e})})}),document.body):null}function qn({className:e,...t}){return jsxRuntime.jsxs("div",{className:"flex items-center border-b border-gray-200 dark:border-white/10 px-3","cmdk-input-wrapper":"",children:[jsxRuntime.jsx(lucideReact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsxRuntime.jsx(fn,{className:l("flex h-12 w-full rounded-md bg-transparent py-3 text-sm text-gray-900 dark:text-white outline-none placeholder:text-gray-400 dark:placeholder:text-white/50 disabled:cursor-not-allowed disabled:opacity-50 border-none focus:ring-0 px-0",e),...t})]})}function jn({className:e,...t}){return jsxRuntime.jsx(gn,{className:l("max-h-[300px] overflow-y-auto overflow-x-hidden p-2",e),...t})}function g1(e){return jsxRuntime.jsx(hn,{className:"py-6 text-center text-sm",...e})}function Gn({children:e,heading:t,className:r,...o}){return jsxRuntime.jsxs("div",{className:l("overflow-hidden p-1 text-gray-900 dark:text-white",r),...o,children:[t&&jsxRuntime.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-gray-500 dark:text-white/50",children:t}),e]})}function Jn({className:e,...t}){return jsxRuntime.jsx(bn,{className:l("relative flex cursor-default select-none items-center rounded-2xl px-2 py-1.5 text-sm outline-none text-gray-900 dark:text-white aria-selected:bg-gray-100 dark:aria-selected:bg-white/[0.06] aria-selected:text-gray-900 dark:aria-selected:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t})}function h1({className:e,...t}){return jsxRuntime.jsx("span",{className:l("ml-auto text-xs tracking-widest text-gray-400 dark:text-white/50",e),...t})}function Zn({onSearchChange:e,onFilterChange:t,onSortChange:r,onViewChange:o,onGroupChange:n,priorityOptions:a=[],tagOptions:s=[],assigneeOptions:i=[],viewOptions:c=["board","list","calendar","timeline"],sortOptions:d=[],groupOptions:m=[],savedFilters:u=[],onSaveFilter:p,className:g}){let[b,x]=ye.useState(""),[h,f]=ye.useState({}),[w,v]=ye.useState("board"),y=(C,T)=>{let E=h[C]||[],A=E.includes(T)?E.filter(S=>S!==T):[...E,T],M={...h,[C]:A};A.length===0&&delete M[C],f(M),t?.(M);},k=()=>{f({}),t?.({}),x(""),e?.("");},N=Object.values(h).flat().length;return jsxRuntime.jsxs(ie,{className:l("p-2 flex flex-wrap items-center gap-3 bg-white/[0.02] border-white/5",g),children:[jsxRuntime.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-white/20"}),jsxRuntime.jsx("input",{type:"text",placeholder:"Search tasks...",className:"w-full pl-10 pr-4 py-2 text-sm rounded-2xl border border-white/10 bg-white/[0.03] focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all placeholder:text-white/20 text-white",value:b,onChange:C=>{x(C.target.value),e?.(C.target.value);}})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(ta,{label:"Priority",options:a,selected:h.priority||[],onSelect:C=>y("priority",C)}),jsxRuntime.jsx(ta,{label:"Tags",options:s,selected:h.tags||[],onSelect:C=>y("tags",C)}),jsxRuntime.jsx(ta,{label:"Assignee",options:i,selected:h.assignee||[],onSelect:C=>y("assignee",C)}),jsxRuntime.jsx("div",{className:"w-px h-4 bg-white/10 mx-1"}),jsxRuntime.jsxs(Ze,{children:[jsxRuntime.jsx(et,{children:jsxRuntime.jsxs(L,{variant:"ghost",size:"sm",className:"h-9 gap-2 text-white/60",children:[jsxRuntime.jsx(lucideReact.SortAsc,{className:"h-4 w-4"}),"Sort"]})}),jsxRuntime.jsx(tt,{className:"w-48 p-1 bg-gray-900 border-white/10",children:d.map(C=>jsxRuntime.jsx("button",{className:"w-full flex items-center gap-2 px-3 py-2 text-xs text-white/60 hover:text-white hover:bg-white/5 rounded-lg text-left",onClick:()=>r?.(C.value,"asc"),children:C.label},C.value))})]}),N>0&&jsxRuntime.jsxs(L,{variant:"ghost",size:"sm",onClick:k,className:"h-9 px-3 text-xs text-white/40 hover:text-white gap-2",children:[jsxRuntime.jsx(lucideReact.X,{className:"h-3.5 w-3.5"})," Clear",jsxRuntime.jsx(ze,{variant:"neutral",className:"bg-white/[0.06] border-white/10 ml-1",children:N})]})]})]})}function ta({label:e,options:t,selected:r,onSelect:o}){return jsxRuntime.jsxs(Ze,{children:[jsxRuntime.jsx(et,{children:jsxRuntime.jsxs(L,{variant:"ghost",size:"sm",className:l("h-9 gap-2 text-xs transition-all",r.length>0?"bg-blue-500/10 text-blue-400":"text-white/60 hover:text-white"),children:[e,r.length>0?jsxRuntime.jsx(ze,{variant:"info",className:"h-4 min-w-[16px] px-1 bg-blue-500 text-white border-none",children:r.length}):jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-3.5 w-3.5 opacity-40"})]})}),jsxRuntime.jsx(tt,{className:"w-56 p-0 bg-gray-900 border-white/10 shadow-2xl",children:jsxRuntime.jsxs(Xn,{children:[jsxRuntime.jsx(qn,{placeholder:`Search ${e.toLowerCase()}...`,className:"border-none"}),jsxRuntime.jsx(jn,{className:"max-h-[240px]",children:jsxRuntime.jsx(Gn,{children:t.map(n=>jsxRuntime.jsxs(Jn,{value:n.value,onClick:()=>o(n.value),className:"flex items-center justify-between py-2 px-3 cursor-pointer hover:bg-white/5",children:[jsxRuntime.jsx("span",{className:"text-xs text-white/80",children:n.label}),r.includes(n.value)&&jsxRuntime.jsx(lucideReact.Check,{className:"h-3.5 w-3.5 text-blue-500"})]},n.value))})})]})})]})}function ao({isOpen:e,onClose:t,children:r,className:o}){let n=ye.useRef(null),[a,s]=ye__namespace.default.useState(false);ye.useEffect(()=>{s(true);},[]),ye.useEffect(()=>{let c=n.current;c&&(e?c.open||(c.showModal(),document.body.style.overflow="hidden"):c.open&&(c.close(),document.body.style.overflow="unset"));},[e,a]),ye.useEffect(()=>{let c=n.current;if(!c)return;let d=m=>{m.preventDefault(),t();};return c.addEventListener("cancel",d),()=>c.removeEventListener("cancel",d)},[t,a]);let i=c=>{c.target===n.current&&t();};return a?reactDom.createPortal(jsxRuntime.jsx("dialog",{ref:n,onClick:i,className:l("fixed inset-0 z-[100] m-auto bg-transparent p-0 backdrop:bg-black/60 backdrop:backdrop-blur-sm open:flex open:items-center open:justify-center","animate-in fade-in duration-200",o),children:jsxRuntime.jsxs("div",{className:l("relative w-full max-w-lg scale-100 gap-4 border border-zinc-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A]/90 p-6 shadow-2xl backdrop-blur-xl transition-all sm:rounded-2xl","animate-in fade-in zoom-in-95 duration-200 slide-in-from-bottom-2"),children:[r,jsxRuntime.jsxs("button",{onClick:t,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20 disabled:pointer-events-none",children:[jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-900 dark:text-white",children:[jsxRuntime.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsxRuntime.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})}),document.body):null}function no({className:e,children:t}){return jsxRuntime.jsx("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left mb-4",e),children:t})}function so({className:e,children:t}){return jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),children:t})}function es({className:e,children:t}){return jsxRuntime.jsx(Qe,{as:"h2",className:l("text-lg font-semibold leading-none tracking-tight",e),children:t})}function K1({className:e,children:t}){return jsxRuntime.jsx(we,{variant:"muted",className:l("text-sm",e),children:t})}function ts({items:e,onToggle:t,className:r}){if(!e||e.length===0)return null;let o=e.filter(a=>a.completed).length,n=o/e.length*100;return jsxRuntime.jsxs("div",{className:l("space-y-3",r),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between text-[10px] text-white/40 uppercase tracking-wider font-bold",children:[jsxRuntime.jsx("span",{children:"Checklist"}),jsxRuntime.jsxs("span",{children:[o,"/",e.length]})]}),jsxRuntime.jsx("div",{className:"h-1 w-full bg-white/5 rounded-full overflow-hidden",children:jsxRuntime.jsx("div",{className:"h-full bg-blue-500 transition-all duration-500",style:{width:`${n}%`}})}),jsxRuntime.jsx("div",{className:"space-y-2",children:e.map(a=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2 group cursor-pointer",onClick:()=>t?.(a.id),children:[a.completed?jsxRuntime.jsx(lucideReact.CheckSquare,{className:"h-4 w-4 text-blue-500"}):jsxRuntime.jsx(lucideReact.Square,{className:"h-4 w-4 text-white/20 group-hover:text-white/40"}),jsxRuntime.jsx("span",{className:l("text-sm transition-colors",a.completed?"text-white/40 line-through":"text-white/80"),children:a.title})]},a.id))})]})}function rs({comments:e,onAddComment:t,className:r}){let[o,n]=ye.useState(""),a=()=>{o.trim()&&(t?.(o),n(""));};return jsxRuntime.jsxs("div",{className:l("space-y-6",r),children:[jsxRuntime.jsx("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold",children:"Comments"}),jsxRuntime.jsx("div",{className:"flex gap-3",children:jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx(br,{placeholder:"Write a comment...",value:o,onChange:s=>n(s.target.value),className:"min-h-[80px] bg-white/[0.03] border-white/10 text-sm"}),jsxRuntime.jsx("div",{className:"flex justify-end mt-2",children:jsxRuntime.jsxs(L,{size:"sm",onClick:a,disabled:!o.trim(),className:"gap-2",children:[jsxRuntime.jsx(lucideReact.Send,{className:"h-3.5 w-3.5"}),"Comment"]})})]})}),jsxRuntime.jsx("div",{className:"space-y-6",children:e.map(s=>jsxRuntime.jsxs("div",{className:"flex gap-3",children:[jsxRuntime.jsx($,{src:s.user.avatar,alt:s.user.name,size:"sm"}),jsxRuntime.jsxs("div",{className:"flex-1 bg-white/[0.03] border border-white/5 rounded-2xl p-3",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-1",children:[jsxRuntime.jsx("span",{className:"text-xs font-bold text-white",children:s.user.name}),jsxRuntime.jsx("span",{className:"text-[10px] text-white/30",children:s.timestamp.toLocaleString()})]}),jsxRuntime.jsx("p",{className:"text-sm text-white/70 leading-relaxed",children:s.content})]})]},s.id))})]})}function os({attachments:e,onRemove:t,onDownload:r,className:o}){return jsxRuntime.jsxs("div",{className:l("space-y-4",o),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold",children:"Attachments"}),jsxRuntime.jsxs(L,{variant:"ghost",size:"sm",className:"h-7 gap-1.5 text-white/40 hover:text-white",children:[jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-3 w-3"}),"Add"]})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-2 gap-3",children:e.map(n=>jsxRuntime.jsxs("div",{className:"group relative bg-white/[0.03] border border-white/5 rounded-xl overflow-hidden hover:border-white/20 transition-all",children:[n.thumbnail?jsxRuntime.jsx("div",{className:"aspect-video w-full overflow-hidden",children:jsxRuntime.jsx("img",{src:n.thumbnail,alt:n.name,className:"w-full h-full object-cover"})}):jsxRuntime.jsx("div",{className:"aspect-video w-full flex items-center justify-center bg-white/5",children:jsxRuntime.jsx(lucideReact.FileIcon,{className:"h-8 w-8 text-white/20"})}),jsxRuntime.jsxs("div",{className:"p-2",children:[jsxRuntime.jsx("p",{className:"text-xs font-medium text-white truncate",children:n.name}),jsxRuntime.jsx("p",{className:"text-[10px] text-white/30 uppercase",children:n.size})]}),jsxRuntime.jsxs("div",{className:"absolute inset-0 bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center gap-2",children:[jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-full bg-white/10 hover:bg-white/20",onClick:()=>r?.(n),children:jsxRuntime.jsx(lucideReact.Download,{className:"h-4 w-4"})}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-full bg-red-500/20 hover:bg-red-500/40 text-red-400",onClick:()=>t?.(n.id),children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})]},n.id))})]})}function as({labels:e,selectedIds:t,onToggle:r,className:o}){return jsxRuntime.jsxs("div",{className:l("space-y-3",o),children:[jsxRuntime.jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Tag,{className:"h-3 w-3"}),"Labels"]}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(n=>{let a=t.includes(n.id);return jsxRuntime.jsxs("button",{onClick:()=>r(n.id),className:l("px-3 py-1.5 rounded-full text-xs font-medium transition-all flex items-center gap-2 border",a?"bg-white/10 border-white/20 text-white":"bg-transparent border-white/5 text-white/40 hover:border-white/10"),children:[jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:n.color}}),n.name,a&&jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})]},n.id)})})]})}function ns({users:e,selectedId:t,onSelect:r,className:o}){return jsxRuntime.jsxs("div",{className:l("space-y-3",o),children:[jsxRuntime.jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Users,{className:"h-3 w-3"}),"Assignee"]}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 gap-1",children:e.map(n=>{let a=t===n.id;return jsxRuntime.jsxs("button",{onClick:()=>r(n.id),className:l("flex items-center gap-3 p-2 rounded-xl transition-all text-left",a?"bg-white/10 text-white":"text-white/60 hover:bg-white/5"),children:[jsxRuntime.jsx($,{src:n.avatar,alt:n.name,size:"sm"}),jsxRuntime.jsx("span",{className:"text-sm flex-1 truncate",children:n.name}),a&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4 text-blue-500"})]},n.id)})})]})}function is({date:e,onChange:t,className:r}){return jsxRuntime.jsxs("div",{className:l("space-y-3",r),children:[jsxRuntime.jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-3 w-3"}),"Due Date"]}),e?jsxRuntime.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-2xl bg-white/5 border border-white/10",children:[jsxRuntime.jsx("div",{className:"h-8 w-8 rounded-lg bg-blue-500/20 flex items-center justify-center text-blue-400",children:jsxRuntime.jsx(lucideReact.Clock,{className:"h-4 w-4"})}),jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium text-white",children:e.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}),jsxRuntime.jsx("p",{className:"text-[10px] text-white/40",children:e.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})})]}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/20 hover:text-red-400",onClick:()=>t(void 0),children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}):jsxRuntime.jsxs(L,{variant:"ghost",className:"w-full justify-start gap-3 h-12 rounded-2xl border border-dashed border-white/10 text-white/40 hover:border-white/20 hover:bg-white/5",onClick:()=>t(new Date),children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-4 w-4"}),"Set due date"]})]})}function cs({initialSeconds:e=0,onTimeUpdate:t,className:r}){let[o,n]=ye.useState(e),[a,s]=ye.useState(false);ye.useEffect(()=>{let c=null;return a?c=setInterval(()=>{n(d=>{let m=d+1;return t?.(m),m});},1e3):clearInterval(c),()=>clearInterval(c)},[a,t]);let i=c=>{let d=Math.floor(c/3600),m=Math.floor(c%3600/60),u=c%60;return `${d.toString().padStart(2,"0")}:${m.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}`};return jsxRuntime.jsxs("div",{className:l("space-y-3",r),children:[jsxRuntime.jsxs("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Timer,{className:"h-3 w-3"}),"Time Tracking"]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-2xl bg-white/[0.03] border border-white/5",children:[jsxRuntime.jsxs("div",{className:"flex-1",children:[jsxRuntime.jsx("p",{className:"text-2xl font-mono font-bold text-white tracking-tight",children:i(o)}),jsxRuntime.jsx("p",{className:"text-[10px] text-white/30 uppercase font-bold mt-1",children:"Total Time Spent"})]}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-10 w-10 rounded-full bg-white/5 hover:bg-white/10",onClick:()=>n(0),children:jsxRuntime.jsx(lucideReact.RotateCcw,{className:"h-4 w-4"})}),jsxRuntime.jsx(L,{variant:a?"secondary":"primary",size:"icon",className:l("h-10 w-10 rounded-full shadow-lg transition-all",a?"bg-orange-500 hover:bg-orange-600":"bg-blue-600 hover:bg-blue-700"),onClick:()=>s(!a),children:a?jsxRuntime.jsx(lucideReact.Pause,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Play,{className:"h-4 w-4 ml-0.5"})})]})]})]})}function ds({isOpen:e,onClose:t,onSave:r,onDelete:o,onDuplicate:n,onArchive:a,task:s,columnId:i,columns:c=[],users:d=[],availableLabels:m=[],showSubtasks:u=true,showChecklist:p=true,showAttachments:g=true,showComments:b=true,showActivity:x=true}){let[h,f]=ye.useState(""),[w,v]=ye.useState(""),[y,k]=ye.useState("medium"),[N,C]=ye.useState(""),[T,E]=ye.useState(void 0),[A,M]=ye.useState([]),[S,I]=ye.useState(void 0);ye.useEffect(()=>{s?(f(s.title||""),v(s.description||""),k(s.priority||"medium"),C(s.columnId||""),E(s.assignee?.id),M(s.labels?.map(R=>R.id)||[]),I(s.dueDate?new Date(s.dueDate):void 0)):(f(""),v(""),k("medium"),C(i||""),E(void 0),M([]),I(void 0));},[s,e,i]);let B=()=>{h.trim()&&(r({...s,title:h,description:w,priority:y,columnId:N,assignee:d.find(R=>R.id===T),labels:m.filter(R=>A.includes(R.id)),dueDate:S?.toISOString()}),t());};return jsxRuntime.jsxs(ao,{isOpen:e,onClose:t,children:[jsxRuntime.jsxs(no,{className:"flex items-center justify-between pr-12",children:[jsxRuntime.jsx(es,{children:s?"Edit Task":"Create New Task"}),jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>n?.(s),children:jsxRuntime.jsx(lucideReact.Copy,{className:"h-4 w-4"})}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-white",onClick:()=>a?.(s.id),children:jsxRuntime.jsx(lucideReact.Archive,{className:"h-4 w-4"})}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-8 w-8 text-white/40 hover:text-red-400",onClick:()=>o?.(s.id),children:jsxRuntime.jsx(lucideReact.Trash2,{className:"h-4 w-4"})})]})})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8 py-6",children:[jsxRuntime.jsxs("div",{className:"lg:col-span-2 space-y-8",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(X,{htmlFor:"task-title",className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Title"}),jsxRuntime.jsx(kt,{id:"task-title",placeholder:"What needs to be done?",value:h,onChange:R=>f(R.target.value),className:"text-lg font-bold bg-transparent border-white/10 focus:border-blue-500",autoFocus:true})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(X,{htmlFor:"task-desc",className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Description"}),jsxRuntime.jsx(br,{id:"task-desc",placeholder:"Add more details...",value:w,onChange:R=>v(R.target.value),rows:6,className:"bg-white/[0.03] border-white/10 text-sm leading-relaxed"})]}),p&&s?.checklist&&jsxRuntime.jsx(ts,{items:s.checklist}),g&&s?.attachments&&jsxRuntime.jsx(os,{attachments:[]}),b&&jsxRuntime.jsx(rs,{comments:[]})]}),jsxRuntime.jsxs("div",{className:"space-y-8 bg-white/[0.02] p-6 rounded-3xl border border-white/5 h-fit",children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(X,{className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Status"}),jsxRuntime.jsx(Yr,{value:N,onChange:R=>C(R),options:c.map(R=>({label:R.title,value:R.id})),className:"bg-white/5 border-white/10"})]}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(X,{className:"text-[10px] uppercase tracking-wider text-white/40 font-bold",children:"Priority"}),jsxRuntime.jsx(Yr,{value:y,onChange:R=>k(R),options:[{label:"Low",value:"low"},{label:"Medium",value:"medium"},{label:"High",value:"high"},{label:"Urgent",value:"urgent"}],className:"bg-white/5 border-white/10"})]}),jsxRuntime.jsx(ns,{users:d,selectedId:T,onSelect:E}),jsxRuntime.jsx(as,{labels:m,selectedIds:A,onToggle:R=>M(K=>K.includes(R)?K.filter(me=>me!==R):[...K,R])}),jsxRuntime.jsx(is,{date:S,onChange:I}),jsxRuntime.jsx(cs,{initialSeconds:s?.timeSpent})]})]}),jsxRuntime.jsxs(so,{className:"border-t border-white/5 pt-6",children:[jsxRuntime.jsx(L,{variant:"ghost",onClick:t,children:"Cancel"}),jsxRuntime.jsx(L,{onClick:B,className:"px-8",children:"Save Changes"})]})]})}function ms({title:e,count:t,isCollapsed:r,onToggle:o,children:n,className:a}){return jsxRuntime.jsxs("div",{className:l("space-y-4",a),children:[jsxRuntime.jsxs("button",{onClick:o,className:"flex items-center gap-3 w-full group",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[r?jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4 text-white/20"}):jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4 text-white/20"}),jsxRuntime.jsx("h4",{className:"text-xs font-bold uppercase tracking-widest text-white/40 group-hover:text-white/60 transition-colors",children:e})]}),jsxRuntime.jsx("div",{className:"h-px flex-1 bg-white/5"}),jsxRuntime.jsx("span",{className:"text-[10px] font-bold px-2 py-0.5 rounded-full bg-white/5 text-white/20",children:t})]}),!r&&jsxRuntime.jsx("div",{className:"animate-in fade-in slide-in-from-top-2 duration-300",children:n})]})}function fs(e){let[t,r]=ye.useState(""),[o,n]=ye.useState({}),a=ye.useMemo(()=>e.filter(c=>{if(t){let d=t.toLowerCase();if(!(c.title.toLowerCase().includes(d)||c.description?.toLowerCase().includes(d)||c.tags?.some(u=>u.toLowerCase().includes(d))))return false}for(let[d,m]of Object.entries(o))if(!(!m||m.length===0)&&(d==="priority"&&!m.includes(c.priority)||d==="assignee"&&(!c.assignee||!m.includes(c.assignee.id))||d==="tags"&&!c.tags?.some(u=>m.includes(u))))return false;return true}),[e,t,o]),s=ye.useCallback((c,d)=>{n(m=>{let u=m[c]||[],p=u.includes(d)?u.filter(b=>b!==d):[...u,d],g={...m,[c]:p};return p.length===0&&delete g[c],g});},[]),i=ye.useCallback(()=>{n({}),r("");},[]);return {searchQuery:t,setSearchQuery:r,activeFilters:o,setActiveFilters:n,filteredTasks:a,toggleFilter:s,clearFilters:i}}function gs(e){let[t,r]=ye.useState({history:[e],currentIndex:0}),o=ye.useRef(e);ye.useEffect(()=>{let i=e.tasks.length!==o.current.tasks.length||e.tasks.some((d,m)=>d.id!==o.current.tasks[m]?.id||d.columnId!==o.current.tasks[m]?.columnId),c=e.columns.length!==o.current.columns.length||e.columns.some((d,m)=>d.id!==o.current.columns[m]?.id);if(i||c){let d=t.history[t.currentIndex];d&&e.tasks.length===d.tasks.length&&e.tasks.every((u,p)=>u.id===d.tasks[p]?.id&&u.columnId===d.tasks[p]?.columnId)||r({history:[e],currentIndex:0}),o.current=e;}},[e,t.history,t.currentIndex]);let n=ye.useCallback(i=>{r(c=>({history:[...c.history.slice(0,c.currentIndex+1),i],currentIndex:c.currentIndex+1}));},[]),a=ye.useCallback(()=>{r(i=>i.currentIndex>0?{...i,currentIndex:i.currentIndex-1}:i);},[]),s=ye.useCallback(()=>{r(i=>i.currentIndex<i.history.length-1?{...i,currentIndex:i.currentIndex+1}:i);},[]);return {state:t.history[t.currentIndex],pushState:n,undo:a,redo:s,canUndo:t.currentIndex>0,canRedo:t.currentIndex<t.history.length-1}}function hs({onUndo:e,onRedo:t,onSearch:r,onNewTask:o,onNewColumn:n,enabled:a=true}){ye.useEffect(()=>{if(!a)return;let s=i=>{(i.ctrlKey||i.metaKey)&&i.key==="z"&&!i.shiftKey&&(i.preventDefault(),e?.()),((i.ctrlKey||i.metaKey)&&i.key==="z"&&i.shiftKey||(i.ctrlKey||i.metaKey)&&i.key==="y")&&(i.preventDefault(),t?.()),((i.ctrlKey||i.metaKey)&&i.key==="f"||i.key==="/"&&document.activeElement===document.body)&&(i.preventDefault(),r?.()),i.key==="n"&&document.activeElement===document.body&&(i.preventDefault(),o?.()),i.key==="c"&&document.activeElement===document.body&&(i.preventDefault(),n?.());};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[a,e,t,r,o,n]);}function xs({tasks:e,columns:t,selectedTaskIds:r,onTaskMove:o,onColumnMove:n,onTaskDrop:a,onTaskDragStart:s,onTaskDragEnd:i}){let[c,d]=ye.useState(null),[m,u]=ye.useState(null),[p,g]=ye.useState(null),[b,x]=ye.useState(null),[h,f]=ye.useState(null),w=ye.useRef(null),v=ye.useRef(null),y=(M,S,I)=>{I==="task"?(d(S),M.dataTransfer.setData("taskId",S),s?.(S)):(u(S),M.dataTransfer.setData("columnId",S)),M.dataTransfer.effectAllowed="move";},k=ye.useCallback(()=>{c&&i?.(c),d(null),u(null),g(null),x(null),f(null);},[c,i]);return {draggedTaskId:c,draggedColumnId:m,dragOverColumnId:p,dragOverTaskId:b,dropPosition:h,handleDragStart:y,handleDragEnd:k,handleDragOver:(M,S,I)=>{if(M.preventDefault(),M.dataTransfer.dropEffect="move",m){g(S);let B=M.currentTarget.getBoundingClientRect(),R=B.left+B.width/2;f(M.clientX<R?"left":"right");}else if(g(S),I){x(I);let B=M.currentTarget.getBoundingClientRect(),R=B.top+B.height/2;f(M.clientY<R?"top":"bottom");}else M.target===M.currentTarget&&(x(null),f(null));},handleDrop:(M,S,I)=>{M.preventDefault();let B=c||M.dataTransfer.getData("taskId"),R=m||M.dataTransfer.getData("columnId");if(R&&n)n(R,S,h==="right"?"right":"left");else if(B&&o){if(!e.find(Z=>Z.id===B))return;(r.includes(B)?r:[B]).forEach(Z=>{let Le=e.find(wt=>wt.id===Z)?.columnId||"";o(Z,S,I,h==="bottom"?"bottom":"top"),a?.(Z,Le,S,0);});}k();},handleTouchStart:(M,S,I)=>{let B=M.touches[0];B&&(w.current=setTimeout(()=>{I==="task"?(d(S),s?.(S)):u(S),v.current={x:B.clientX,y:B.clientY};},500));},handleTouchMove:M=>{if(!c&&!m)return;M.preventDefault();let S=M.touches[0];if(!S)return;let I=document.elementFromPoint(S.clientX,S.clientY);if(!I)return;let B=I.closest("[data-column-id]"),R=I.closest("[data-task-id]");if(B){let K=B.getAttribute("data-column-id");if(g(K),m){let me=B.getBoundingClientRect(),Z=me.left+me.width/2;f(S.clientX<Z?"left":"right");}else if(R){let me=R.getAttribute("data-task-id");x(me);let Z=R.getBoundingClientRect(),re=Z.top+Z.height/2;f(S.clientY<re?"top":"bottom");}}},handleTouchEnd:M=>{if(clearTimeout(w.current),c||m){if(p){let S=c,I=m;I&&n?n(I,p,h==="right"?"right":"left"):S&&o&&o(S,p,b||void 0,h==="bottom"?"bottom":"top");}k();}},setDraggedTaskId:d}}function Cu({columns:e,tasks:t,onTaskMove:r,onColumnMove:o,onTaskClick:n,onTaskAdd:a,onColumnAction:s,swimlanes:i=false,swimlaneBy:c="priority",view:d,onViewChange:m,className:u,...p}){let[g,b]=ye.useState(d||"board"),[x,h]=ye.useState(null),[f,w]=ye.useState([]),v=d||g,y=_=>{b(_),m?.(_);},{state:k,pushState:N,undo:C,redo:T,canUndo:E,canRedo:A}=gs({tasks:t,columns:e}),M=k?.tasks||[],S=k?.columns||[],{setSearchQuery:I,setActiveFilters:B,filteredTasks:R}=fs(M),K=ye.useMemo(()=>{if(!i)return null;let _={},Y=(P,H)=>H.includes(".")?H.split(".").reduce((O,oe)=>O&&O[oe],P):P[H];return R.forEach(P=>{let H=Y(P,c),O=String(H||"Uncategorized");_[O]||(_[O]=[]),_[O].push(P);}),_},[R,i,c]),{handleDragStart:me,handleDragOver:Z,handleDrop:re}=xs({columns:S,tasks:M,selectedTaskIds:[],onTaskMove:(_,Y,P,H)=>{let O=[...M],oe=O.findIndex(Fr=>Fr.id===_);if(oe===-1)return;let Je={...O[oe],columnId:Y};if(O.splice(oe,1),!P)O.push(Je);else {let Fr=O.findIndex(Ai=>Ai.id===P),Ii=H==="bottom"?Fr+1:Fr;O.splice(Ii,0,Je);}N({tasks:O,columns:S}),r?.(_,Y,P,H);}});hs({onUndo:C,onRedo:T,onSearch:()=>document.querySelector('input[placeholder*="Search"]')?.focus(),onNewTask:()=>a?.("todo","New Task")});let wt=ye.useMemo(()=>M.find(_=>_.id===x),[M,x]),Kr=()=>{let _=Y=>{h(Y.id),n?.(Y);};switch(v){case "list":return jsxRuntime.jsx(oo,{tasks:R,columns:S,onTaskClick:_});case "timeline":return jsxRuntime.jsx(Wn,{tasks:R});case "table":return jsxRuntime.jsx(_n,{tasks:R,columns:S,onTaskClick:_});case "calendar":return jsxRuntime.jsx(Yn,{tasks:R,onTaskClick:_});default:if(i){let Y=K&&Object.keys(K).length>0?K:{"All Tasks":[]};return jsxRuntime.jsx("div",{className:"flex flex-col gap-8 overflow-y-auto h-full pr-2 custom-scrollbar",children:Object.entries(Y).map(([P,H])=>jsxRuntime.jsx(ms,{title:P,count:H.length,isCollapsed:f.includes(P),onToggle:()=>w(O=>O.includes(P)?O.filter(oe=>oe!==P):[...O,P]),children:jsxRuntime.jsx("div",{className:"flex gap-6 min-h-[200px]",children:S.map(O=>jsxRuntime.jsx(Qo,{column:O,tasks:H.filter(oe=>oe.columnId===O.id),onTaskClick:_,onAddTask:()=>a?.(O.id,"New Task"),onAction:oe=>s?.(O.id,oe),onDragStart:me,onDragOver:(oe,Je)=>Z(oe,O.id,Je),onDrop:(oe,Je)=>re(oe,O.id,Je)},O.id))})},P))})}return jsxRuntime.jsx("div",{className:"flex gap-6 overflow-x-auto pb-4 min-h-[500px] scrollbar-thin scrollbar-thumb-white/10",children:S.map(Y=>jsxRuntime.jsx(Qo,{column:Y,tasks:R.filter(P=>P.columnId===Y.id),onTaskClick:_,onAddTask:()=>a?.(Y.id,"New Task"),onAction:P=>s?.(Y.id,P),onDragStart:me,onDragOver:(P,H)=>Z(P,Y.id,H),onDrop:(P,H)=>re(P,Y.id,H)},Y.id))})}};return jsxRuntime.jsxs("div",{className:l("flex flex-col gap-4 h-full",u),children:[jsxRuntime.jsx(Kn,{title:"Project Board",view:v,onViewChange:_=>y(_),canUndo:E,canRedo:A,onUndo:C,onRedo:T}),jsxRuntime.jsx(Zn,{onSearchChange:I,onFilterChange:B}),jsxRuntime.jsx("div",{className:"flex-1 overflow-hidden",children:Kr()}),wt&&jsxRuntime.jsx(ds,{isOpen:!!x,onClose:()=>h(null),task:wt,onSave:_=>{let Y=M.map(P=>P.id===wt.id?{...P,..._}:P);N({tasks:Y,columns:S}),h(null);}})]})}function HT({columnId:e,onAdd:t,placeholder:r="Add task...",className:o}){let[n,a]=ye.useState(false),[s,i]=ye.useState(""),c=d=>{d?.preventDefault(),s.trim()&&(t(e,s),i(""),a(false));};return n?jsxRuntime.jsxs("form",{onSubmit:c,className:l("bg-white/[0.03] border border-white/10 rounded-2xl p-3 space-y-3",o),children:[jsxRuntime.jsx("input",{autoFocus:true,value:s,onChange:d=>i(d.target.value),placeholder:"What needs to be done?",className:"w-full bg-transparent border-none outline-none text-sm text-white placeholder:text-white/20",onKeyDown:d=>{d.key==="Escape"&&a(false);}}),jsxRuntime.jsxs("div",{className:"flex items-center justify-end gap-2",children:[jsxRuntime.jsx(L,{variant:"ghost",size:"sm",onClick:()=>a(false),className:"h-8 text-white/40 hover:text-white",children:"Cancel"}),jsxRuntime.jsx(L,{size:"sm",onClick:()=>c(),disabled:!s.trim(),className:"h-8",children:"Add Task"})]})]}):jsxRuntime.jsxs("button",{onClick:()=>a(true),className:l("w-full flex items-center gap-2 p-3 rounded-2xl border border-dashed border-white/10 text-white/40 hover:border-white/20 hover:bg-white/5 transition-all text-sm",o),children:[jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"}),r]})}function VT({onSync:e,interval:t=3e4,enabled:r=false}){let[o,n]=ye.useState(null),[a,s]=ye.useState(false),[i,c]=ye.useState(null);return {sync:ye.useCallback(async m=>{if(e){s(true),c(null);try{await e(m),n(new Date);}catch(u){c(u instanceof Error?u:new Error("Sync failed"));}finally{s(false);}}},[e]),isSyncing:a,lastSynced:o,error:i}}function FT(){let[e,t]=ye.useState([]),r=ye.useCallback(n=>{let a={...n,id:Math.random().toString(36).substr(2,9),timestamp:new Date};t(s=>[a,...s]);},[]),o=ye.useCallback(()=>{t([]);},[]);return {history:e,addEntry:r,clearHistory:o}}function _T({subtasks:e,onToggle:t,className:r}){return !e||e.length===0?null:jsxRuntime.jsx("div",{className:l("space-y-1",r),children:e.map(o=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2 group cursor-pointer",onClick:()=>t?.(o.id),children:[o.completed?jsxRuntime.jsx(lucideReact.CheckCircle2,{className:"h-3.5 w-3.5 text-green-500"}):jsxRuntime.jsx(lucideReact.Circle,{className:"h-3.5 w-3.5 text-white/20 group-hover:text-white/40"}),jsxRuntime.jsx("span",{className:l("text-xs transition-colors",o.completed?"text-white/40 line-through":"text-white/70"),children:o.title})]},o.id))})}function GT({activities:e,className:t}){return jsxRuntime.jsxs("div",{className:l("space-y-4",t),children:[jsxRuntime.jsx("h4",{className:"text-[10px] text-white/40 uppercase tracking-wider font-bold",children:"Activity"}),jsxRuntime.jsx("div",{className:"space-y-4",children:e.map(r=>jsxRuntime.jsxs("div",{className:"flex gap-3",children:[jsxRuntime.jsx($,{src:r.user.avatar,alt:r.user.name,size:"sm"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("p",{className:"text-xs text-white/80",children:[jsxRuntime.jsx("span",{className:"font-bold text-white",children:r.user.name})," ",r.action," ",r.target&&jsxRuntime.jsx("span",{className:"font-medium text-blue-400",children:r.target})]}),jsxRuntime.jsx("p",{className:"text-[10px] text-white/30 mt-0.5",children:r.timestamp.toLocaleString()})]})]},r.id))})]})}var Iu=ye__namespace.default.forwardRef(({className:e,title:t="Terminal",children:r,...o},n)=>jsxRuntime.jsxs("div",{ref:n,className:l("overflow-hidden rounded-2xl border border-gray-200 bg-gray-950 shadow-xl dark:border-white/10",e),...o,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-b border-white/10 bg-white/[0.03] px-4 py-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5",children:[jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-rose-500/80"}),jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-amber-500/80"}),jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-emerald-500/80"})]}),jsxRuntime.jsx("div",{className:"text-xs font-medium text-white/50",children:t}),jsxRuntime.jsx("div",{className:"w-10"})," "]}),jsxRuntime.jsx("div",{className:"p-4 font-mono text-sm text-gray-300",children:r})]}));Iu.displayName="Terminal";var S5=({children:e,prefix:t="$",className:r})=>jsxRuntime.jsxs("div",{className:l("flex gap-2",r),children:[jsxRuntime.jsx("span",{className:"select-none text-emerald-400",children:t}),jsxRuntime.jsx("span",{children:e})]});var A5=({className:e,pauseOnHover:t=false,direction:r="left",speed:o="normal",children:n,...a})=>{let s={slow:"40s",normal:"20s",fast:"10s"};return jsxRuntime.jsxs("div",{className:l("group flex overflow-hidden p-2 [--gap:1rem] [gap:var(--gap)]",e),...a,children:[jsxRuntime.jsx("div",{className:l("flex shrink-0 justify-around [gap:var(--gap)] min-w-full",r==="left"?"animate-marquee":"animate-marquee-reverse",t&&"group-hover:[animation-play-state:paused]"),style:{animationDuration:s[o]},children:n}),jsxRuntime.jsx("div",{"aria-hidden":"true",className:l("flex shrink-0 justify-around [gap:var(--gap)] min-w-full",r==="left"?"animate-marquee":"animate-marquee-reverse",t&&"group-hover:[animation-play-state:paused]"),style:{animationDuration:s[o]},children:n}),jsxRuntime.jsx("style",{children:`
|
|
13
13
|
@keyframes marquee {
|
|
14
14
|
from { transform: translateX(0); }
|
|
15
15
|
to { transform: translateX(calc(-100% - var(--gap))); }
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
.animate-marquee-reverse {
|
|
25
25
|
animation: marquee-reverse linear infinite;
|
|
26
26
|
}
|
|
27
|
-
`})]})};var
|
|
27
|
+
`})]})};var Vu=classVarianceAuthority.cva("inline-block rounded-full",{variants:{variant:{success:"bg-emerald-500",warning:"bg-amber-500",error:"bg-rose-500",info:"bg-blue-500",neutral:"bg-gray-400"},size:{sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3"},animate:{true:"animate-pulse",false:""}},defaultVariants:{variant:"neutral",size:"md",animate:false}}),zu=ye__namespace.default.forwardRef(({className:e,variant:t,size:r,animate:o,...n},a)=>jsxRuntime.jsx("span",{ref:a,className:l(Vu({variant:t,size:r,animate:o,className:e})),...n}));zu.displayName="StatusDot";var Uu=classVarianceAuthority.cva("shrink-0 bg-gray-200 dark:bg-white/[0.03]",{variants:{orientation:{horizontal:"h-[1px] w-full",vertical:"h-full w-[1px]"}},defaultVariants:{orientation:"horizontal"}}),Dr=ye__namespace.default.forwardRef(({className:e,orientation:t="horizontal",decorative:r=true,...o},n)=>jsxRuntime.jsx("div",{ref:n,role:r?"none":"separator","aria-orientation":r?void 0:t,className:l(Uu({orientation:t,className:e})),...o}));Dr.displayName="Separator";function eC({title:e,open:t,defaultOpen:r=false,onOpenChange:o,disabled:n=false,children:a,className:s,triggerClassName:i,contentClassName:c,...d}){let[m,u]=ye.useState(r),p=t!==void 0,g=p?t:m,b=()=>{if(n)return;let x=!g;p||u(x),o?.(x);};return jsxRuntime.jsxs("div",{className:l("w-full overflow-hidden rounded-2xl border border-gray-200 bg-white dark:border-white/10 dark:bg-white/[0.02]",s),...d,children:[e&&jsxRuntime.jsxs("button",{type:"button",onClick:b,disabled:n,className:l("flex w-full items-center justify-between px-4 py-3 text-sm font-medium transition-colors hover:bg-gray-50 dark:hover:bg-white/[0.02]",n&&"cursor-not-allowed opacity-50",i),children:[e,jsxRuntime.jsx(lucideReact.ChevronDown,{className:l("h-4 w-4 shrink-0 text-gray-500 transition-transform duration-200 dark:text-gray-400",g&&"rotate-180")})]}),jsxRuntime.jsx("div",{className:l("grid transition-all duration-300 ease-in-out",g?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:jsxRuntime.jsx("div",{className:"overflow-hidden",children:jsxRuntime.jsx("div",{className:l("px-4 pb-4 pt-0",e&&"pt-1",c),children:a})})})]})}var Ms=ye.createContext(void 0);function Re(){let e=ye.useContext(Ms);if(!e)throw new Error("Chart components must be used within a ChartContainer");return e}function Qt(e,t,r){return t===0?0:e/t*r}function nC({data:e,height:t=300,padding:r={top:20,right:20,bottom:40,left:40},className:o,children:n,...a}){let[s,i]=ye.useState(null),[c,d]=ye.useState(0),m=ye__namespace.default.useRef(null);ye__namespace.default.useEffect(()=>{if(!m.current)return;let p=new ResizeObserver(g=>{g[0]&&d(g[0].contentRect.width);});return p.observe(m.current),()=>p.disconnect()},[]);let u=ye.useMemo(()=>{if(!e||e.length===0)return 1;let p=Math.max(...e.map(g=>g.value));return p===0?1:p*1.1},[e]);return jsxRuntime.jsx(Ms.Provider,{value:{width:c,height:t,data:e,maxValue:u,padding:r,hoveredIndex:s,setHoveredIndex:i},children:jsxRuntime.jsx("div",{ref:m,className:l("relative w-full select-none",o),style:{height:t},...a,children:c>0&&jsxRuntime.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${c} ${t}`,className:"overflow-visible",children:n})})})}function sC({lines:e=5}){let{width:t,height:r,padding:o}=Re(),n=r-o.top-o.bottom;return jsxRuntime.jsx("g",{className:"text-gray-200 dark:text-white/5",children:Array.from({length:e+1}).map((a,s)=>{let i=o.top+n/e*s;return jsxRuntime.jsx("line",{x1:o.left,y1:i,x2:t-o.right,y2:i,stroke:"currentColor",strokeWidth:1,strokeDasharray:"4 4"},s)})})}function iC(){let{width:e,height:t,padding:r,data:o}=Re(),a=(e-r.left-r.right)/o.length;return jsxRuntime.jsx("g",{children:o.map((s,i)=>{let c=r.left+a*i+a/2,d=t-r.bottom+20;return jsxRuntime.jsx("text",{x:c,y:d,textAnchor:"middle",className:"fill-gray-400 dark:fill-white/40 text-xs font-medium",children:s.label},i)})})}function lC({renderTooltip:e}){let{hoveredIndex:t,data:r,width:o,padding:n}=Re();if(t===null)return null;let s=(o-n.left-n.right)/r.length,i=n.left+s*t+s/2,c=r[t];if(!c)return null;let d=e?e(c):jsxRuntime.jsxs("div",{className:"rounded-xl border border-gray-200 dark:border-white/10 bg-white/90 dark:bg-black/80 px-3 py-2 text-xs shadow-xl backdrop-blur-md",children:[jsxRuntime.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:c.label}),jsxRuntime.jsxs("div",{className:"text-gray-500 dark:text-white/70",children:["Value: ",c.value]})]});return jsxRuntime.jsx("foreignObject",{x:i-75,y:0,width:150,height:"100%",className:"pointer-events-none overflow-visible",children:jsxRuntime.jsx("div",{className:"flex h-full flex-col justify-center items-center",children:jsxRuntime.jsx("div",{className:"animate-in fade-in zoom-in-95 duration-200",children:d})})})}function cC(){return jsxRuntime.jsx("div",{className:"w-full h-full flex items-end justify-between gap-2 p-4 animate-pulse bg-gray-100 dark:bg-white/[0.02] rounded-2xl border border-gray-200 dark:border-white/5",children:[...Array(12)].map((e,t)=>jsxRuntime.jsx("div",{className:"w-full bg-gray-200 dark:bg-white/[0.03] rounded-t-lg",style:{height:`${Math.random()*60+20}%`}},t))})}function fC({color:e="cyan",showValues:t=false,animationDelay:r=0,onValueClick:o}){let{width:n,height:a,padding:s,data:i,maxValue:c,setHoveredIndex:d,hoveredIndex:m}=Re();if(!i||i.length===0)return null;let u=n-s.left-s.right,p=a-s.top-s.bottom,g=u/i.length,b=g*.6,x={cyan:"from-cyan-500 to-blue-600",purple:"from-purple-500 to-indigo-600",emerald:"from-emerald-500 to-teal-600",amber:"from-amber-400 to-orange-600",rose:"from-rose-500 to-pink-600"};return jsxRuntime.jsxs("g",{children:[i.map((h,f)=>{let w=Qt(h.value,c,p),v=s.left+g*f+(g-b)/2,y=a-s.bottom-w,k=m===f,N=f*.1+r;return jsxRuntime.jsxs("g",{onMouseEnter:()=>d(f),onMouseLeave:()=>d(null),onClick:()=>o?.(h),className:l("cursor-pointer",o&&"cursor-pointer"),children:[jsxRuntime.jsx("rect",{x:s.left+g*f,y:s.top,width:g,height:p,fill:"transparent"}),jsxRuntime.jsx("rect",{x:v,y,width:b,height:w,rx:4,className:l("transition-all duration-300 ease-out",k?"brightness-125 filter":"opacity-80"),style:{transformOrigin:`center ${a-s.bottom}px`,animation:`grow-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) ${N}s backwards`}}),jsxRuntime.jsx("rect",{x:v,y,width:b,height:w,rx:4,className:l("bg-gradient-to-b",x[e]),style:{pointerEvents:"none",transformOrigin:`center ${a-s.bottom}px`,animation:`grow-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) ${N}s backwards`}}),t&&jsxRuntime.jsx("text",{x:v+b/2,y:y-8,textAnchor:"middle",fill:"white",fontSize:12,fontWeight:500,style:{opacity:0,animation:`fade-in-up 0.5s ease-out ${N+.4}s forwards`,textShadow:"0 2px 4px rgba(0,0,0,0.5)"},children:h.value})]},f)}),jsxRuntime.jsx("style",{children:`
|
|
28
28
|
@keyframes grow-up {
|
|
29
29
|
from { transform: scaleY(0); }
|
|
30
30
|
to { transform: scaleY(1); }
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
from { opacity: 0; transform: translateY(10px); }
|
|
34
34
|
to { opacity: 1; transform: translateY(0); }
|
|
35
35
|
}
|
|
36
|
-
`})]})}function
|
|
36
|
+
`})]})}function vC({color:e="purple",showValues:t=false,animationDelay:r=0,onValueClick:o}){let{width:n,height:a,padding:s,data:i,maxValue:c,setHoveredIndex:d,hoveredIndex:m}=Re();if(!i||i.length===0)return null;let u=n-s.left-s.right,p=a-s.top-s.bottom,g=i.length>1?u/(i.length-1):u,x={cyan:{stroke:"#06b6d4",fill:"rgba(6, 182, 212, 0.2)"},purple:{stroke:"#8b5cf6",fill:"rgba(139, 92, 246, 0.2)"},emerald:{stroke:"#10b981",fill:"rgba(16, 185, 129, 0.2)"},amber:{stroke:"#f59e0b",fill:"rgba(245, 158, 11, 0.2)"},rose:{stroke:"#f43f5e",fill:"rgba(244, 63, 94, 0.2)"}}[e],h=i.map((v,y)=>{let k=s.left+g*y,N=a-s.bottom-Qt(v.value,c,p);return {x:k,y:N,item:v}}),f=h.map((v,y)=>y===0?`M ${v.x} ${v.y}`:`L ${v.x} ${v.y}`).join(" "),w=`
|
|
37
37
|
${f}
|
|
38
38
|
L ${n-s.right} ${a-s.bottom}
|
|
39
39
|
L ${s.left} ${a-s.bottom}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
from { opacity: 0; transform: translateY(10px); }
|
|
51
51
|
to { opacity: 1; transform: translateY(0); }
|
|
52
52
|
}
|
|
53
|
-
`})]})}function
|
|
53
|
+
`})]})}function TC({color:e="cyan",showValues:t=false,animationDelay:r=0,curve:o="smooth",strokeWidth:n=3,align:a="edge",onValueClick:s}){let{width:i,height:c,padding:d,data:m,maxValue:u,setHoveredIndex:p,hoveredIndex:g}=Re();if(!m||m.length===0)return null;let b=i-d.left-d.right,x=c-d.top-d.bottom,h=a==="center"?b/m.length:m.length>1?b/(m.length-1):b,w={cyan:"#06b6d4",purple:"#8b5cf6",emerald:"#10b981",amber:"#f59e0b",rose:"#f43f5e"}[e],v=m.map((k,N)=>{let C;a==="center"?C=d.left+h*N+h/2:C=d.left+h*N;let T=c-d.bottom-Qt(k.value,u,x);return {x:C,y:T,item:k}}),y="";if(v.length>0)if(y=`M ${v[0].x} ${v[0].y}`,o==="smooth")for(let k=0;k<v.length-1;k++){let N=v[k],C=v[k+1],T=N.x+(C.x-N.x)/2,E=N.y,A=N.x+(C.x-N.x)/2,M=C.y;y+=` C ${T} ${E}, ${A} ${M}, ${C.x} ${C.y}`;}else if(o==="step")for(let k=0;k<v.length-1;k++){let N=v[k],C=v[k+1];y+=` L ${C.x} ${N.y} L ${C.x} ${C.y}`;}else for(let k=1;k<v.length;k++)y+=` L ${v[k].x} ${v[k].y}`;return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("path",{d:y,fill:"none",stroke:w,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",style:{strokeDasharray:3e3,strokeDashoffset:3e3,animation:`draw-line 2.5s ease-out ${r}s forwards`}}),v.map((k,N)=>jsxRuntime.jsxs("g",{onMouseEnter:()=>p(N),onMouseLeave:()=>p(null),onClick:()=>s?.(k.item),className:l("cursor-crosshair",s&&"cursor-pointer"),children:[jsxRuntime.jsx("rect",{x:k.x-h/2,y:d.top,width:h,height:x,fill:"transparent"}),(g===N||t)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g===N&&jsxRuntime.jsx("line",{x1:k.x,y1:d.top,x2:k.x,y2:c-d.bottom,stroke:"white",strokeWidth:1,strokeDasharray:"4 4",className:"opacity-50"}),jsxRuntime.jsx("circle",{cx:k.x,cy:k.y,r:g===N?6:4,fill:w,stroke:"white",strokeWidth:2,style:{transition:"r 0.2s ease-out"}}),t&&jsxRuntime.jsx("text",{x:k.x,y:k.y-12,textAnchor:"middle",fill:"white",fontSize:12,fontWeight:500,style:{opacity:0,animation:`fade-in-up 0.5s ease-out ${r+1+N*.1}s forwards`,textShadow:"0 2px 4px rgba(0,0,0,0.5)"},children:m[N]?.value})]})]},N)),jsxRuntime.jsx("style",{children:`
|
|
54
54
|
@keyframes draw-line {
|
|
55
55
|
to { stroke-dashoffset: 0; }
|
|
56
56
|
}
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
from { opacity: 0; transform: translateY(10px); }
|
|
59
59
|
to { opacity: 1; transform: translateY(0); }
|
|
60
60
|
}
|
|
61
|
-
`})]})}function
|
|
61
|
+
`})]})}function SC({innerRadius:e=0,padAngle:t=.02,showLabels:r=false,colors:o=["#06b6d4","#8b5cf6","#10b981","#f59e0b","#f43f5e","#3b82f6","#ec4899"],onValueClick:n}){let{width:a,height:s,data:i,setHoveredIndex:c,hoveredIndex:d}=Re(),m=Math.min(a,s)/2*.8,u=a/2,p=s/2,g=ye.useMemo(()=>i.reduce((f,w)=>f+w.value,0),[i]),b=0,x=i.map((f,w)=>{let v=f.value/g,y=v*2*Math.PI,k=b,N=b+y;return b+=y,{...f,startAngle:k,endAngle:N,color:o[w%o.length],percentage:v}}),h=(f,w)=>{let v=u+w*Math.cos(f),y=p+w*Math.sin(f);return [v,y]};return jsxRuntime.jsxs("g",{children:[x.map((f,w)=>{let v=f.startAngle+(x.length>1?t/2:0),y=f.endAngle-(x.length>1?t/2:0);if(y<=v)return null;let[k,N]=h(v,m),[C,T]=h(y,m),E=y-v>Math.PI?1:0,A=m*e,[M,S]=h(y,A),[I,B]=h(v,A),R=[`M ${k} ${N}`,`A ${m} ${m} 0 ${E} 1 ${C} ${T}`,e>0?`L ${M} ${S}`:`L ${u} ${p}`,e>0?`A ${A} ${A} 0 ${E} 0 ${I} ${B}`:"","Z"].join(" "),K=d===w,me=(f.startAngle+f.endAngle)/2,Z=m*(e>0?(1+e)/2:.7),[re,Le]=h(me,Z);return jsxRuntime.jsxs("g",{onMouseEnter:()=>c(w),onMouseLeave:()=>c(null),className:"cursor-pointer",children:[jsxRuntime.jsx("path",{d:R,fill:f.color,className:l("transition-all duration-300 ease-out",K?"opacity-100 brightness-110":"opacity-90"),style:{transformOrigin:`${u}px ${p}px`,transform:K?"scale(1.05)":"scale(1)",animation:`pie-enter 0.6s ease-out ${w*.05}s backwards`}}),(r||K)&&jsxRuntime.jsxs("text",{x:re,y:Le,textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:12,fontWeight:600,className:"pointer-events-none",style:{textShadow:"0 1px 2px rgba(0,0,0,0.5)"},children:[Math.round(f.percentage*100),"%"]})]},w)}),jsxRuntime.jsx("style",{children:`
|
|
62
62
|
@keyframes pie-enter {
|
|
63
63
|
from { opacity: 0; transform: scale(0.8) rotate(-10deg); }
|
|
64
64
|
to { opacity: 0.9; transform: scale(1) rotate(0); }
|
|
65
65
|
}
|
|
66
|
-
`})]})}function AC({data:e,keys:t,colors:r=["cyan","purple","emerald"],maxValue:o,height:n=300,className:a,...s}){let[i,c]=we.useState(0),d=we__namespace.default.useRef(null);we__namespace.default.useEffect(()=>{if(!d.current)return;let h=new ResizeObserver(f=>{f[0]&&c(f[0].contentRect.width);});return h.observe(d.current),()=>h.disconnect()},[]);let m={x:i/2,y:n/2},u=Math.min(i,n)/2-40,p=we.useMemo(()=>{if(o)return o;let h=0;return e.forEach(f=>{t.forEach(w=>{let v=Number(f[w])||0;v>h&&(h=v);});}),h*1.1||100},[e,t,o]),g=Math.PI*2/e.length,b={cyan:"rgba(6, 182, 212, 0.5)",purple:"rgba(139, 92, 246, 0.5)",emerald:"rgba(16, 185, 129, 0.5)",amber:"rgba(245, 158, 11, 0.5)",rose:"rgba(244, 63, 94, 0.5)"},x={cyan:"#06b6d4",purple:"#8b5cf6",emerald:"#10b981",amber:"#f59e0b",rose:"#f43f5e"};return i===0?jsxRuntime.jsx("div",{ref:d,style:{height:n}}):jsxRuntime.jsx("div",{ref:d,className:l("relative w-full select-none",a),style:{height:n},...s,children:jsxRuntime.jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${i} ${n}`,className:"overflow-visible",children:[[1,2,3,4,5].map(h=>{let f=u/5*h,w=e.map((v,y)=>{let k=g*y-Math.PI/2;return `${m.x+Math.cos(k)*f},${m.y+Math.sin(k)*f}`}).join(" ");return jsxRuntime.jsx("polygon",{points:w,fill:"none",stroke:"rgba(255,255,255,0.1)",strokeWidth:"1"},h)}),e.map((h,f)=>{let w=g*f-Math.PI/2,v=m.x+Math.cos(w)*u,y=m.y+Math.sin(w)*u,k=m.x+Math.cos(w)*(u+20),N=m.y+Math.sin(w)*(u+20);return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:m.x,y1:m.y,x2:v,y2:y,stroke:"rgba(255,255,255,0.1)",strokeWidth:"1"}),jsxRuntime.jsx("text",{x:k,y:N,textAnchor:"middle",dominantBaseline:"middle",fill:"rgba(255,255,255,0.6)",fontSize:"12",children:h.subject})]},f)}),t.map((h,f)=>{let w=e.map((N,C)=>{let E=(Number(N[h])||0)/p*u,A=g*C-Math.PI/2;return `${m.x+Math.cos(A)*E},${m.y+Math.sin(A)*E}`}).join(" "),v=r[f%r.length]||"cyan",y=b[v],k=x[v];return jsxRuntime.jsx("polygon",{points:w,fill:y,fillOpacity:.3,stroke:k,strokeWidth:2,className:"transition-all duration-500 ease-out hover:fill-opacity-50"},h)})]})})}function zC({data:e,color:t="emerald",height:r=40,strokeWidth:o=2,fill:n=false,className:a,...s}){let i=Math.max(...e),c=Math.min(...e),d=i-c||1,u={cyan:"#06b6d4",purple:"#8b5cf6",emerald:"#10b981",amber:"#f59e0b",rose:"#f43f5e",white:"#ffffff"}[t],p=e.map((x,h)=>{let f=h/(e.length-1)*100,v=95-(x-c)/d*90;return {x:f,y:v}}),g="";if(p.length>0){g=`M ${p[0].x} ${p[0].y}`;for(let x=0;x<p.length-1;x++){let h=p[x],f=p[x+1],w=h.x+(f.x-h.x)/2,v=h.y,y=h.x+(f.x-h.x)/2,k=f.y;g+=` C ${w} ${v}, ${y} ${k}, ${f.x} ${f.y}`;}}let b=n?`${g} L 100 100 L 0 100 Z`:void 0;return jsxRuntime.jsx("div",{className:l("w-full overflow-hidden",a),style:{height:r},...s,children:jsxRuntime.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"overflow-visible",children:[n&&jsxRuntime.jsx("path",{d:b,fill:u,fillOpacity:.1,stroke:"none"}),jsxRuntime.jsx("path",{d:g,fill:"none",stroke:u,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]})})}function UC({ticks:e=5,format:t=r=>r.toString()}){let{height:r,padding:o,maxValue:n}=Me(),a=r-o.top-o.bottom;return jsxRuntime.jsx("g",{children:Array.from({length:e+1}).map((s,i)=>{let c=n/e*i,d=r-o.bottom-a/e*i;return jsxRuntime.jsx("text",{x:o.left-10,y:d,textAnchor:"end",dominantBaseline:"middle",className:"fill-gray-400 dark:fill-white/40 text-xs font-medium",children:t(Math.round(c))},i)})})}var ha=we.createContext(void 0);function GC({defaultValue:e,value:t,onValueChange:r,className:o,children:n,...a}){let[s,i]=we.useState(e),c=m=>{t===void 0&&i(m),r?.(m);},d=t!==void 0?t:s;return jsxRuntime.jsx(ha.Provider,{value:{value:d,onValueChange:c},children:jsxRuntime.jsx("div",{className:l("w-full",o),...a,children:n})})}function jC({className:e,children:t,...r}){return jsxRuntime.jsx("div",{role:"tablist",className:l("inline-flex h-10 items-center justify-center rounded-2xl bg-gray-100 p-1 text-gray-500 dark:bg-white/[0.03] dark:text-white/60",e),...r,children:t})}function JC({className:e,value:t,children:r,...o}){let n=we.useContext(ha);if(!n)throw new Error("TabsTrigger must be used within Tabs");let a=n.value===t;return jsxRuntime.jsx("button",{type:"button",role:"tab","aria-selected":a,"aria-controls":`tabs-content-${t}`,id:`tabs-trigger-${t}`,onClick:()=>n.onValueChange(t),className:l("inline-flex items-center justify-center whitespace-nowrap rounded-2xl 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-gray-400 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-zinc-950 dark:focus-visible:ring-white/20",a?"bg-white text-gray-900 shadow-sm dark:bg-white/[0.06] dark:text-white dark:backdrop-blur-sm":"hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-white/[0.03] dark:hover:text-white",e),...o,children:r})}function QC({className:e,value:t,children:r,...o}){let n=we.useContext(ha);if(!n)throw new Error("TabsContent must be used within Tabs");return n.value!==t?null:jsxRuntime.jsx("div",{role:"tabpanel",id:`tabs-content-${t}`,"aria-labelledby":`tabs-trigger-${t}`,tabIndex:0,className:l("mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20 focus-visible:ring-offset-2",e),...o,children:r})}var oM=we__namespace.default.forwardRef(({className:e,children:t,...r},o)=>jsxRuntime.jsx("aside",{ref:o,className:l("flex h-full w-64 flex-col border-r backdrop-blur-xl transition-colors duration-200","border-zinc-200 bg-white/80","dark:border-white/10 dark:bg-black/20",e),...r,children:t})),aM=we__namespace.default.forwardRef(({className:e,children:t,...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l("flex h-16 items-center px-6 border-b border-gray-200 dark:border-white/5",e),...r,children:t})),nM=we__namespace.default.forwardRef(({className:e,children:t,...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l("flex-1 overflow-y-auto py-4 px-3 space-y-1",e),...r,children:t})),sM=we__namespace.default.forwardRef(({className:e,children:t,...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l("p-4 border-t border-gray-200 dark:border-white/5",e),...r,children:t})),iM=we__namespace.default.forwardRef(({className:e,children:t,active:r,icon:o,badge:n,...a},s)=>jsxRuntime.jsxs("button",{ref:s,className:l("flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium transition-colors","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-white/[0.03] dark:hover:text-white",r?"bg-gray-200 text-gray-900 dark:bg-white/[0.06] dark:text-white":"text-gray-600 dark:text-white/60",e),...a,children:[o&&jsxRuntime.jsx("span",{className:l("flex h-4 w-4 items-center justify-center",r?"text-gray-900 dark:text-white":"text-gray-500 dark:text-white/60"),children:o}),jsxRuntime.jsx("span",{className:"flex-1 text-left",children:t}),n&&jsxRuntime.jsx("span",{className:"flex h-5 min-w-5 items-center justify-center rounded-full bg-gray-200 dark:bg-white/[0.06] px-1.5 text-[10px] font-bold text-gray-900 dark:text-white",children:n})]})),lM=we__namespace.default.forwardRef(({className:e,children:t,label:r,...o},n)=>jsxRuntime.jsxs("div",{ref:n,className:l("mb-6",e),...o,children:[r&&jsxRuntime.jsx("div",{className:"mb-2 px-3 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-white/40",children:r}),jsxRuntime.jsx("div",{className:"space-y-1",children:t})]}));var ap={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"};function hM({logo:e,links:t=[],actions:r,className:o,maxWidth:n="xl"}){let[a,s]=we.useState(false),[i,c]=we.useState(false);return we.useEffect(()=>{let d=()=>{s(window.scrollY>20);};return window.addEventListener("scroll",d),()=>window.removeEventListener("scroll",d)},[]),jsxRuntime.jsx("nav",{className:l("fixed top-0 left-0 right-0 z-50 transition-all duration-300 px-4 py-4",a?"py-3":"py-6",o),children:jsxRuntime.jsxs("div",{className:l("mx-auto transition-all duration-300",ap[n]),children:[jsxRuntime.jsxs(ie,{className:l("flex items-center justify-between px-6 py-3 transition-all duration-300",a?"rounded-2xl border-white/10 bg-white/70 dark:bg-zinc-900/70 backdrop-blur-xl shadow-lg":"rounded-2xl border-transparent bg-transparent dark:bg-transparent backdrop-blur-none shadow-none"),children:[jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:e||jsxRuntime.jsx("span",{className:"text-xl font-bold tracking-tighter",children:"PIXON"})}),jsxRuntime.jsx("div",{className:"hidden md:flex items-center gap-8",children:t.map(d=>jsxRuntime.jsx("a",{href:d.href,className:"text-sm font-medium text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-colors",children:d.label},d.label))}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[jsxRuntime.jsx("div",{className:"hidden md:flex items-center gap-2",children:r}),jsxRuntime.jsx("button",{className:"md:hidden p-2 text-zinc-600 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-white/[0.03] rounded-2xl transition-colors",onClick:()=>c(!i),children:i?jsxRuntime.jsx(lucideReact.X,{size:20}):jsxRuntime.jsx(lucideReact.Menu,{size:20})})]})]}),jsxRuntime.jsx("div",{className:l("md:hidden absolute top-full left-4 right-4 mt-2 transition-all duration-300 origin-top",i?"opacity-100 scale-100 translate-y-0":"opacity-0 scale-95 -translate-y-4 pointer-events-none"),children:jsxRuntime.jsxs(ie,{className:"p-4 flex flex-col gap-4 shadow-2xl border-white/10 bg-white/90 dark:bg-zinc-900/90 backdrop-blur-2xl",children:[t.map(d=>jsxRuntime.jsx("a",{href:d.href,className:"text-base font-medium px-4 py-2 rounded-2xl hover:bg-zinc-100 dark:hover:bg-white/[0.03] text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-all",onClick:()=>c(false),children:d.label},d.label)),jsxRuntime.jsx("div",{className:"pt-4 border-t border-zinc-200 dark:border-white/10 flex flex-col gap-2",children:r})]})})]})})}var ho=we.createContext(void 0);function at({children:e}){let[t,r]=we.useState(false),o=we.useRef(null);return jsxRuntime.jsx(ho.Provider,{value:{isOpen:t,setIsOpen:r,triggerRef:o},children:jsxRuntime.jsx("div",{className:"relative inline-block text-left",children:e})})}function nt({className:e,children:t,...r}){let o=we.useContext(ho);if(!o)throw new Error("DropdownMenuTrigger must be used within DropdownMenu");let n=a=>{o.setIsOpen(!o.isOpen),r.onClick?.(a);};return jsxRuntime.jsx("button",{ref:o.triggerRef,type:"button","aria-haspopup":"menu","aria-expanded":o.isOpen?"true":"false",onClick:n,className:l("inline-flex items-center justify-center",e),...r,children:t})}function st({className:e,children:t,align:r="start",side:o="bottom",...n}){let a=we.useContext(ho);if(!a)throw new Error("DropdownMenuContent must be used within DropdownMenu");let s=we.useRef(null),{position:i,isPositioned:c}=Kt(a.triggerRef,s,{side:o,align:r,isOpen:a.isOpen});if(we.useEffect(()=>{if(a.isOpen){let m=p=>{s.current&&!s.current.contains(p.target)&&a.triggerRef.current&&!a.triggerRef.current.contains(p.target)&&a.setIsOpen(false);},u=p=>{if(p.key==="Escape"&&(a.setIsOpen(false),a.triggerRef.current?.focus()),p.key==="ArrowDown"||p.key==="ArrowUp"){p.preventDefault();let g=s.current?.querySelectorAll('[role="menuitem"]');if(!g.length)return;let b=Array.from(g).indexOf(document.activeElement),x=0;p.key==="ArrowDown"?x=(b+1)%g.length:x=(b-1+g.length)%g.length,g[x]?.focus();}};return document.addEventListener("mousedown",m),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",u);}}},[a.isOpen,a.setIsOpen,a.triggerRef]),!a.isOpen)return null;let d=()=>o==="bottom"?r==="start"?"top left":r==="end"?"top right":"top center":o==="top"?r==="start"?"bottom left":r==="end"?"bottom right":"bottom center":o==="left"?r==="start"?"top right":r==="end"?"bottom right":"center right":o==="right"?r==="start"?"top left":r==="end"?"bottom left":"center left":"center center";return reactDom.createPortal(jsxRuntime.jsx("div",{ref:s,role:"menu","aria-orientation":"vertical",style:{top:i.top,left:i.left,transformOrigin:d()},className:l("fixed z-[110] min-w-[8rem] overflow-hidden rounded-2xl border border-gray-200 dark:border-white/10 bg-white/80 dark:bg-white/[0.03] backdrop-blur-xl p-1 shadow-md duration-100",c?"animate-in fade-in zoom-in-95 opacity-100":"opacity-0",e),...n,children:t}),document.body)}function V({className:e,children:t,...r}){let o=we.useContext(ho);return jsxRuntime.jsx("button",{type:"button",role:"menuitem",onClick:a=>{o?.setIsOpen(false),r.onClick?.(a);},className:l("relative flex w-full cursor-pointer select-none items-center rounded-2xl px-3 py-2 text-sm outline-none transition-colors","text-gray-700 dark:text-white/80","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-white/[0.06] dark:hover:text-white","focus:bg-gray-100 focus:text-gray-900 dark:focus:bg-white/[0.06] dark:focus:text-white","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:t})}function Bs({className:e,children:t,...r}){return jsxRuntime.jsx("div",{className:l("px-2 py-1.5 text-sm font-semibold text-gray-900 dark:text-white",e),...r,children:t})}function xa({className:e,...t}){return jsxRuntime.jsx("div",{className:l("-mx-1 my-1 h-px bg-gray-200 dark:bg-white/[0.03]",e),...t})}function SM({name:e,description:t,avatarSrc:r,avatarFallback:o,className:n,side:a="top",align:s="start"}){return jsxRuntime.jsxs(at,{children:[jsxRuntime.jsx(nt,{className:l("w-full outline-none",n),children:jsxRuntime.jsxs("div",{className:"group flex w-full items-center gap-3 rounded-2xl border border-gray-200 dark:border-white/5 bg-white dark:bg-white/[0.03] p-3 transition-colors hover:bg-gray-50 dark:hover:bg-white/[0.06]",children:[jsxRuntime.jsx($,{src:r,fallback:o||e.charAt(0),size:"sm"}),jsxRuntime.jsxs("div",{className:"flex flex-1 flex-col items-start text-left",children:[jsxRuntime.jsx("span",{className:"text-xs font-medium text-gray-900 dark:text-white",children:e}),t&&jsxRuntime.jsx("span",{className:"text-[10px] text-gray-500 dark:text-white/50",children:t})]}),jsxRuntime.jsx(lucideReact.Settings,{className:"h-4 w-4 text-gray-400 dark:text-white/50 transition-colors group-hover:text-gray-900 dark:group-hover:text-white"})]})}),jsxRuntime.jsxs(st,{className:"w-56",align:s,side:a,children:[jsxRuntime.jsx(Bs,{children:"My Account"}),jsxRuntime.jsx(xa,{}),jsxRuntime.jsxs(V,{children:[jsxRuntime.jsx(lucideReact.User,{className:"mr-2 h-4 w-4"}),jsxRuntime.jsx("span",{children:"Profile"})]}),jsxRuntime.jsxs(V,{children:[jsxRuntime.jsx(lucideReact.Settings,{className:"mr-2 h-4 w-4"}),jsxRuntime.jsx("span",{children:"Settings"})]}),jsxRuntime.jsx(xa,{}),jsxRuntime.jsxs(V,{className:"text-rose-400 focus:text-rose-400",children:[jsxRuntime.jsx(lucideReact.LogOut,{className:"mr-2 h-4 w-4"}),jsxRuntime.jsx("span",{children:"Log out"})]})]})]})}var mp=we__namespace.default.forwardRef(({...e},t)=>jsxRuntime.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));mp.displayName="Breadcrumb";var up=we__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("ol",{ref:r,className:l("flex flex-wrap items-center gap-1.5 break-words text-sm text-gray-500 dark:text-white/50 sm:gap-2.5",e),...t}));up.displayName="BreadcrumbList";var pp=we__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("li",{ref:r,className:l("inline-flex items-center gap-1.5",e),...t}));pp.displayName="BreadcrumbItem";var fp=we__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("a",{ref:r,className:l("transition-colors hover:text-gray-900 dark:hover:text-white",e),...t}));fp.displayName="BreadcrumbLink";var gp=we__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:l("font-normal text-gray-900 dark:text-white",e),...t}));gp.displayName="BreadcrumbPage";var hp=({children:e,className:t,...r})=>jsxRuntime.jsx("li",{role:"presentation","aria-hidden":"true",className:l("[&>svg]:size-3.5",t),...r,children:e??jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:jsxRuntime.jsx("path",{d:"m9 18 6-6-6-6"})})});hp.displayName="BreadcrumbSeparator";var bp=({className:e,...t})=>jsxRuntime.jsxs("span",{role:"presentation","aria-hidden":"true",className:l("flex h-9 w-9 items-center justify-center",e),...t,children:[jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"19",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"5",cy:"12",r:"1"})]}),jsxRuntime.jsx("span",{className:"sr-only",children:"More"})]});bp.displayName="BreadcrumbElipssis";function zM({contentId:e="main-content",className:t,children:r="Skip to content"}){return jsxRuntime.jsx("a",{href:`#${e}`,className:l("sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-[100] focus:px-4 focus:py-2 focus:bg-purple-600 focus:text-white focus:rounded-xl focus:shadow-2xl focus:outline-none focus:ring-2 focus:ring-white/20 transition-all",t),children:r})}var vp=({className:e,...t})=>jsxRuntime.jsx("nav",{role:"navigation","aria-label":"pagination",className:l("mx-auto flex w-full justify-center",e),...t});vp.displayName="Pagination";var wp=we__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("ul",{ref:r,className:l("flex flex-row items-center gap-1",e),...t}));wp.displayName="PaginationContent";var yp=we__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("li",{ref:r,className:l("",e),...t}));yp.displayName="PaginationItem";var va=({className:e,isActive:t,...r})=>jsxRuntime.jsx("a",{"aria-current":t?"page":void 0,className:l("inline-flex h-9 w-9 items-center justify-center rounded-2xl text-sm font-medium transition-colors","hover:bg-gray-100 dark:hover:bg-white/[0.03] hover:text-gray-900 dark:hover:text-white",t?"bg-gray-100 text-gray-900 dark:bg-white/[0.06] dark:text-white":"text-gray-500 dark:text-white/60",e),...r});va.displayName="PaginationLink";var kp=({className:e,...t})=>jsxRuntime.jsxs(va,{"aria-label":"Go to previous page",className:l("w-auto gap-1 px-2.5",e),...t,children:[jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:jsxRuntime.jsx("path",{d:"m15 18-6-6 6-6"})}),jsxRuntime.jsx("span",{children:"Previous"})]});kp.displayName="PaginationPrevious";var Np=({className:e,...t})=>jsxRuntime.jsxs(va,{"aria-label":"Go to next page",className:l("w-auto gap-1 px-2.5",e),...t,children:[jsxRuntime.jsx("span",{children:"Next"}),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:jsxRuntime.jsx("path",{d:"m9 18 6-6-6-6"})})]});Np.displayName="PaginationNext";var Tp=({className:e,...t})=>jsxRuntime.jsxs("span",{"aria-hidden":true,className:l("flex h-9 w-9 items-center justify-center",e),...t,children:[jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"19",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"5",cy:"12",r:"1"})]}),jsxRuntime.jsx("span",{className:"sr-only",children:"More pages"})]});Tp.displayName="PaginationEllipsis";var qM=({steps:e,currentStep:t,className:r,onStepClick:o})=>jsxRuntime.jsx("div",{className:l("flex w-full flex-col gap-4 md:flex-row",r),children:e.map((n,a)=>{let s=t>a,i=t===a,c=!!o;return jsxRuntime.jsxs("div",{className:l("flex flex-1 flex-col gap-2 md:flex-row md:items-center md:gap-4",c&&"cursor-pointer"),onClick:()=>c&&o(a),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4 md:flex-col md:gap-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("div",{className:l("flex h-8 w-8 items-center justify-center rounded-full border-2 text-sm font-semibold transition-colors",s?"border-blue-600 bg-blue-600 text-white dark:border-blue-500 dark:bg-blue-500":i?"border-blue-600 text-blue-600 dark:border-blue-500 dark:text-blue-500":"border-gray-300 text-gray-500 dark:border-white/20 dark:text-white/40"),children:s?jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"}):a+1}),a<e.length-1&&jsxRuntime.jsx("div",{className:l("ml-4 h-px flex-1 bg-gray-200 md:hidden dark:bg-white/[0.03]",s&&"bg-blue-600 dark:bg-blue-500")})]}),jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("span",{className:l("text-sm font-medium",i||s?"text-gray-900 dark:text-white":"text-gray-500 dark:text-white/50"),children:n.title}),n.description&&jsxRuntime.jsx("span",{className:"text-xs text-gray-500 dark:text-white/40 hidden md:block",children:n.description})]})]}),a<e.length-1&&jsxRuntime.jsx("div",{className:l("hidden h-px flex-1 bg-gray-200 md:block dark:bg-white/[0.03]",s&&"bg-blue-600 dark:bg-blue-500")})]},a)})});function rR({isOpen:e,onClose:t,onConfirm:r,title:o,description:n,confirmText:a="Confirm",cancelText:s="Cancel",variant:i="primary",isLoading:c=false}){return jsxRuntime.jsxs(ao,{isOpen:e,onClose:t,children:[jsxRuntime.jsx(no,{children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[i==="danger"&&jsxRuntime.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-rose-500/10 text-rose-500",children:jsxRuntime.jsx(lucideReact.AlertTriangle,{className:"h-5 w-5"})}),jsxRuntime.jsx(Qe,{as:"h3",children:o})]})}),jsxRuntime.jsx("div",{className:"py-2",children:jsxRuntime.jsx(ve,{className:"text-gray-500 dark:text-white/60",children:n})}),jsxRuntime.jsxs(so,{children:[jsxRuntime.jsx(L,{variant:"ghost",onClick:t,disabled:c,children:s}),jsxRuntime.jsx(L,{variant:i==="danger"?"danger":"primary",onClick:r,isLoading:c,children:a})]})]})}function cR({isOpen:e,onClose:t,children:r,className:o}){let n=we.useRef(null),[a,s]=we__namespace.default.useState(false);we.useEffect(()=>{s(true);},[]),we.useEffect(()=>{let c=n.current;c&&(e?c.open||c.showModal():c.open&&c.close());},[e,a]),we.useEffect(()=>{let c=n.current;if(!c)return;let d=m=>{m.preventDefault(),t();};return c.addEventListener("cancel",d),()=>c.removeEventListener("cancel",d)},[t,a]);let i=c=>{c.target===n.current&&t();};return a?reactDom.createPortal(jsxRuntime.jsx("dialog",{ref:n,onClick:i,className:l("fixed inset-0 z-[100] m-auto bg-transparent p-0 backdrop:bg-black/60 backdrop:backdrop-blur-sm open:flex open:items-center open:justify-center","open:animate-in open:fade-in open:duration-200",o),children:jsxRuntime.jsxs("div",{className:l("relative w-full max-w-lg scale-100 gap-4 border border-zinc-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A]/90 p-6 shadow-2xl backdrop-blur-xl transition-all sm:rounded-2xl","animate-in fade-in zoom-in-95 duration-200 slide-in-from-bottom-2"),children:[r,jsxRuntime.jsxs("button",{onClick:t,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20 disabled:pointer-events-none",children:[jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-900 dark:text-white",children:[jsxRuntime.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsxRuntime.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})}),document.body):null}function dR({className:e,children:t}){return jsxRuntime.jsx("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left mb-4",e),children:t})}function mR({className:e,children:t}){return jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),children:t})}function uR({className:e,children:t}){return jsxRuntime.jsx(Qe,{as:"h2",className:l("text-lg font-semibold leading-none tracking-tight",e),children:t})}function pR({className:e,children:t}){return jsxRuntime.jsx("p",{className:l("text-sm text-gray-500 dark:text-gray-400",e),children:t})}function kR({isOpen:e,onClose:t,position:r="right",children:o,className:n}){let[a,s]=we.useState(false),[i,c]=we.useState(false),d=we.useRef(null);we.useEffect(()=>{if(e)c(true),requestAnimationFrame(()=>{requestAnimationFrame(()=>{s(true);});}),document.body.style.overflow="hidden";else {s(false);let g=setTimeout(()=>{c(false),document.body.style.overflow="unset";},300);return ()=>clearTimeout(g)}},[e]),we.useEffect(()=>{let g=b=>{b.key==="Escape"&&t();};return e&&document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g);}},[e,t]);let m=g=>{g.target===d.current&&t();};if(!i)return null;let u={left:"left-0 h-full w-3/4 max-w-sm border-r",right:"right-0 h-full w-3/4 max-w-sm border-l",bottom:"bottom-0 w-full h-auto max-h-[90vh] border-t rounded-t-2xl"},p={left:a?"translate-x-0":"-translate-x-full",right:a?"translate-x-0":"translate-x-full",bottom:a?"translate-y-0":"translate-y-full"};return reactDom.createPortal(jsxRuntime.jsx("div",{ref:d,onClick:m,className:l("fixed inset-0 z-[100] flex bg-black/60 backdrop-blur-sm transition-opacity duration-300",a?"opacity-100":"opacity-0"),role:"dialog","aria-modal":"true",children:jsxRuntime.jsx("div",{className:l("absolute bg-white dark:bg-[#0A0A0A] border-gray-200 dark:border-white/10 p-6 shadow-2xl transition-transform duration-300 ease-in-out",u[r],p[r],n),children:o})}),document.body)}function NR({className:e,children:t,...r}){return jsxRuntime.jsx("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left mb-6",e),...r,children:t})}function TR({className:e,children:t,...r}){return jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-auto pt-6",e),...r,children:t})}function CR({className:e,children:t,...r}){return jsxRuntime.jsx(Qe,{as:"h2",className:l("text-lg font-semibold leading-none tracking-tight",e),...r,children:t})}function MR({className:e,children:t,...r}){return jsxRuntime.jsx(ve,{variant:"muted",className:l("text-sm",e),...r,children:t})}function IR({content:e,children:t,position:r="top",delay:o=200,className:n}){let[a,s]=we.useState(false),i=we.useRef(null),c=we.useRef(null),d=we.useRef(null),{position:m,isPositioned:u}=Kt(c,d,{side:r,align:"center",sideOffset:8,isOpen:a}),p=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>s(true),o);},g=()=>{i.current&&clearTimeout(i.current),s(false);};we.useEffect(()=>()=>{i.current&&clearTimeout(i.current);},[]);let b={top:"slide-in-from-bottom-2",bottom:"slide-in-from-top-2",left:"slide-in-from-right-2",right:"slide-in-from-left-2"};return jsxRuntime.jsxs("div",{ref:c,className:"relative inline-flex",onMouseEnter:p,onMouseLeave:g,onFocus:p,onBlur:g,children:[t,a&&reactDom.createPortal(jsxRuntime.jsx("div",{ref:d,role:"tooltip",style:{top:m.top,left:m.left},className:l("fixed z-[120] min-w-max max-w-xs rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A]/90 px-3 py-1.5 text-xs text-gray-900 dark:text-white shadow-xl backdrop-blur-md","duration-200",u?"animate-in fade-in opacity-100":"opacity-0",b[r],n),children:e}),document.body)]})}var Vp=we__namespace.default.forwardRef(({className:e,size:t="lg",...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l("mx-auto w-full px-4",{sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl",full:"max-w-full"}[t],e),...r}));Vp.displayName="Container";var Fp=we__namespace.default.forwardRef(({className:e,direction:t="col",gap:r=4,align:o,justify:n,wrap:a,style:s,...i},c)=>jsxRuntime.jsx("div",{ref:c,className:l("flex",{"flex-row":t==="row","flex-col":t==="col","flex-row-reverse":t==="row-reverse","flex-col-reverse":t==="col-reverse","flex-wrap":a,"items-start":o==="start","items-end":o==="end","items-center":o==="center","items-baseline":o==="baseline","items-stretch":o==="stretch","justify-start":n==="start","justify-end":n==="end","justify-center":n==="center","justify-between":n==="between","justify-around":n==="around","justify-evenly":n==="evenly"},e),style:{gap:typeof r=="number"?`${r*.25}rem`:r,...s},...i}));Fp.displayName="Stack";var $s={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},Wp={1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},Yp={1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},_p={1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},Xp={1:"xl:grid-cols-1",2:"xl:grid-cols-2",3:"xl:grid-cols-3",4:"xl:grid-cols-4",5:"xl:grid-cols-5",6:"xl:grid-cols-6",7:"xl:grid-cols-7",8:"xl:grid-cols-8",9:"xl:grid-cols-9",10:"xl:grid-cols-10",11:"xl:grid-cols-11",12:"xl:grid-cols-12"},qp=we__namespace.default.forwardRef(({className:e,cols:t,sm:r,md:o,lg:n,xl:a,gap:s=4,style:i,...c},d)=>jsxRuntime.jsx("div",{ref:d,className:l("grid",t&&$s[t],r&&Wp[r],o&&Yp[o],n&&_p[n],a&&Xp[a],e),style:{gridTemplateColumns:t&&!$s[t]?`repeat(${t}, minmax(0, 1fr))`:void 0,gap:typeof s=="number"?`${s*.25}rem`:s,...i},...c}));qp.displayName="Grid";var jp=we__namespace.default.forwardRef(({variant:e="none",noise:t=false,patternColor:r,size:o=24,mask:n="none",animate:a=false,followMouse:s=false,bgColor:i,className:c,children:d,style:m,...u},p)=>{let g=we__namespace.default.useRef(null);we__namespace.default.useEffect(()=>{if(!s)return;let h=f=>{let w=g.current;if(!w)return;let v=w.getBoundingClientRect(),y=f.clientX-v.left,k=f.clientY-v.top;w.style.setProperty("--mouse-x",`${y}px`),w.style.setProperty("--mouse-y",`${k}px`);};return window.addEventListener("mousemove",h),()=>window.removeEventListener("mousemove",h)},[s]);let b=()=>{let h={},f=r||"var(--pattern-color, rgba(255,255,255,0.08))";return e==="dots"?{...h,backgroundImage:`radial-gradient(${f} 1px, transparent 1px)`,backgroundSize:`${o}px ${o}px`,transform:s?"translate3d(calc((var(--mouse-x, 0) - 24px) / 40), calc((var(--mouse-y, 0) - 24px) / 40), 0)":void 0}:e==="grid"?{...h,backgroundImage:`
|
|
66
|
+
`})]})}function BC({data:e,keys:t,colors:r=["cyan","purple","emerald"],maxValue:o,height:n=300,className:a,...s}){let[i,c]=ye.useState(0),d=ye__namespace.default.useRef(null);ye__namespace.default.useEffect(()=>{if(!d.current)return;let h=new ResizeObserver(f=>{f[0]&&c(f[0].contentRect.width);});return h.observe(d.current),()=>h.disconnect()},[]);let m={x:i/2,y:n/2},u=Math.min(i,n)/2-40,p=ye.useMemo(()=>{if(o)return o;let h=0;return e.forEach(f=>{t.forEach(w=>{let v=Number(f[w])||0;v>h&&(h=v);});}),h*1.1||100},[e,t,o]),g=Math.PI*2/e.length,b={cyan:"rgba(6, 182, 212, 0.5)",purple:"rgba(139, 92, 246, 0.5)",emerald:"rgba(16, 185, 129, 0.5)",amber:"rgba(245, 158, 11, 0.5)",rose:"rgba(244, 63, 94, 0.5)"},x={cyan:"#06b6d4",purple:"#8b5cf6",emerald:"#10b981",amber:"#f59e0b",rose:"#f43f5e"};return i===0?jsxRuntime.jsx("div",{ref:d,style:{height:n}}):jsxRuntime.jsx("div",{ref:d,className:l("relative w-full select-none",a),style:{height:n},...s,children:jsxRuntime.jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${i} ${n}`,className:"overflow-visible",children:[[1,2,3,4,5].map(h=>{let f=u/5*h,w=e.map((v,y)=>{let k=g*y-Math.PI/2;return `${m.x+Math.cos(k)*f},${m.y+Math.sin(k)*f}`}).join(" ");return jsxRuntime.jsx("polygon",{points:w,fill:"none",stroke:"rgba(255,255,255,0.1)",strokeWidth:"1"},h)}),e.map((h,f)=>{let w=g*f-Math.PI/2,v=m.x+Math.cos(w)*u,y=m.y+Math.sin(w)*u,k=m.x+Math.cos(w)*(u+20),N=m.y+Math.sin(w)*(u+20);return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:m.x,y1:m.y,x2:v,y2:y,stroke:"rgba(255,255,255,0.1)",strokeWidth:"1"}),jsxRuntime.jsx("text",{x:k,y:N,textAnchor:"middle",dominantBaseline:"middle",fill:"rgba(255,255,255,0.6)",fontSize:"12",children:h.subject})]},f)}),t.map((h,f)=>{let w=e.map((N,C)=>{let E=(Number(N[h])||0)/p*u,A=g*C-Math.PI/2;return `${m.x+Math.cos(A)*E},${m.y+Math.sin(A)*E}`}).join(" "),v=r[f%r.length]||"cyan",y=b[v],k=x[v];return jsxRuntime.jsx("polygon",{points:w,fill:y,fillOpacity:.3,stroke:k,strokeWidth:2,className:"transition-all duration-500 ease-out hover:fill-opacity-50"},h)})]})})}function KC({data:e,color:t="emerald",height:r=40,strokeWidth:o=2,fill:n=false,className:a,...s}){let i=Math.max(...e),c=Math.min(...e),d=i-c||1,u={cyan:"#06b6d4",purple:"#8b5cf6",emerald:"#10b981",amber:"#f59e0b",rose:"#f43f5e",white:"#ffffff"}[t],p=e.map((x,h)=>{let f=h/(e.length-1)*100,v=95-(x-c)/d*90;return {x:f,y:v}}),g="";if(p.length>0){g=`M ${p[0].x} ${p[0].y}`;for(let x=0;x<p.length-1;x++){let h=p[x],f=p[x+1],w=h.x+(f.x-h.x)/2,v=h.y,y=h.x+(f.x-h.x)/2,k=f.y;g+=` C ${w} ${v}, ${y} ${k}, ${f.x} ${f.y}`;}}let b=n?`${g} L 100 100 L 0 100 Z`:void 0;return jsxRuntime.jsx("div",{className:l("w-full overflow-hidden",a),style:{height:r},...s,children:jsxRuntime.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"overflow-visible",children:[n&&jsxRuntime.jsx("path",{d:b,fill:u,fillOpacity:.1,stroke:"none"}),jsxRuntime.jsx("path",{d:g,fill:"none",stroke:u,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]})})}function WC({ticks:e=5,format:t=r=>r.toString()}){let{height:r,padding:o,maxValue:n}=Re(),a=r-o.top-o.bottom;return jsxRuntime.jsx("g",{children:Array.from({length:e+1}).map((s,i)=>{let c=n/e*i,d=r-o.bottom-a/e*i;return jsxRuntime.jsx("text",{x:o.left-10,y:d,textAnchor:"end",dominantBaseline:"middle",className:"fill-gray-400 dark:fill-white/40 text-xs font-medium",children:t(Math.round(c))},i)})})}var ha=ye.createContext(void 0);function GC({defaultValue:e,value:t,onValueChange:r,className:o,children:n,...a}){let[s,i]=ye.useState(e),c=m=>{t===void 0&&i(m),r?.(m);},d=t!==void 0?t:s;return jsxRuntime.jsx(ha.Provider,{value:{value:d,onValueChange:c},children:jsxRuntime.jsx("div",{className:l("w-full",o),...a,children:n})})}function JC({className:e,children:t,...r}){return jsxRuntime.jsx("div",{role:"tablist",className:l("inline-flex h-10 items-center justify-center rounded-2xl bg-gray-100 p-1 text-gray-500 dark:bg-white/[0.03] dark:text-white/60",e),...r,children:t})}function QC({className:e,value:t,children:r,...o}){let n=ye.useContext(ha);if(!n)throw new Error("TabsTrigger must be used within Tabs");let a=n.value===t;return jsxRuntime.jsx("button",{type:"button",role:"tab","aria-selected":a,"aria-controls":`tabs-content-${t}`,id:`tabs-trigger-${t}`,onClick:()=>n.onValueChange(t),className:l("inline-flex items-center justify-center whitespace-nowrap rounded-2xl 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-gray-400 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-zinc-950 dark:focus-visible:ring-white/20",a?"bg-white text-gray-900 shadow-sm dark:bg-white/[0.06] dark:text-white dark:backdrop-blur-sm":"hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-white/[0.03] dark:hover:text-white",e),...o,children:r})}function ZC({className:e,value:t,children:r,...o}){let n=ye.useContext(ha);if(!n)throw new Error("TabsContent must be used within Tabs");return n.value!==t?null:jsxRuntime.jsx("div",{role:"tabpanel",id:`tabs-content-${t}`,"aria-labelledby":`tabs-trigger-${t}`,tabIndex:0,className:l("mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/20 focus-visible:ring-offset-2",e),...o,children:r})}var aM=ye__namespace.default.forwardRef(({className:e,children:t,...r},o)=>jsxRuntime.jsx("aside",{ref:o,className:l("flex h-full w-64 flex-col border-r backdrop-blur-xl transition-colors duration-200","border-zinc-200 bg-white/80","dark:border-white/10 dark:bg-black/20",e),...r,children:t})),nM=ye__namespace.default.forwardRef(({className:e,children:t,...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l("flex h-16 items-center px-6 border-b border-gray-200 dark:border-white/5",e),...r,children:t})),sM=ye__namespace.default.forwardRef(({className:e,children:t,...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l("flex-1 overflow-y-auto py-4 px-3 space-y-1",e),...r,children:t})),iM=ye__namespace.default.forwardRef(({className:e,children:t,...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l("p-4 border-t border-gray-200 dark:border-white/5",e),...r,children:t})),lM=ye__namespace.default.forwardRef(({className:e,children:t,active:r,icon:o,badge:n,...a},s)=>jsxRuntime.jsxs("button",{ref:s,className:l("flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium transition-colors","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-white/[0.03] dark:hover:text-white",r?"bg-gray-200 text-gray-900 dark:bg-white/[0.06] dark:text-white":"text-gray-600 dark:text-white/60",e),...a,children:[o&&jsxRuntime.jsx("span",{className:l("flex h-4 w-4 items-center justify-center",r?"text-gray-900 dark:text-white":"text-gray-500 dark:text-white/60"),children:o}),jsxRuntime.jsx("span",{className:"flex-1 text-left",children:t}),n&&jsxRuntime.jsx("span",{className:"flex h-5 min-w-5 items-center justify-center rounded-full bg-gray-200 dark:bg-white/[0.06] px-1.5 text-[10px] font-bold text-gray-900 dark:text-white",children:n})]})),cM=ye__namespace.default.forwardRef(({className:e,children:t,label:r,...o},n)=>jsxRuntime.jsxs("div",{ref:n,className:l("mb-6",e),...o,children:[r&&jsxRuntime.jsx("div",{className:"mb-2 px-3 text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-white/40",children:r}),jsxRuntime.jsx("div",{className:"space-y-1",children:t})]}));var ip={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"};function bM({logo:e,links:t=[],actions:r,className:o,maxWidth:n="xl"}){let[a,s]=ye.useState(false),[i,c]=ye.useState(false);return ye.useEffect(()=>{let d=()=>{s(window.scrollY>20);};return window.addEventListener("scroll",d),()=>window.removeEventListener("scroll",d)},[]),jsxRuntime.jsx("nav",{className:l("fixed top-0 left-0 right-0 z-50 transition-all duration-300 px-4 py-4",a?"py-3":"py-6",o),children:jsxRuntime.jsxs("div",{className:l("mx-auto transition-all duration-300",ip[n]),children:[jsxRuntime.jsxs(ie,{className:l("flex items-center justify-between px-6 py-3 transition-all duration-300",a?"rounded-2xl border-white/10 bg-white/70 dark:bg-zinc-900/70 backdrop-blur-xl shadow-lg":"rounded-2xl border-transparent bg-transparent dark:bg-transparent backdrop-blur-none shadow-none"),children:[jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:e||jsxRuntime.jsx("span",{className:"text-xl font-bold tracking-tighter",children:"PIXON"})}),jsxRuntime.jsx("div",{className:"hidden md:flex items-center gap-8",children:t.map(d=>jsxRuntime.jsx("a",{href:d.href,className:"text-sm font-medium text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-colors",children:d.label},d.label))}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[jsxRuntime.jsx("div",{className:"hidden md:flex items-center gap-2",children:r}),jsxRuntime.jsx("button",{className:"md:hidden p-2 text-zinc-600 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-white/[0.03] rounded-2xl transition-colors",onClick:()=>c(!i),children:i?jsxRuntime.jsx(lucideReact.X,{size:20}):jsxRuntime.jsx(lucideReact.Menu,{size:20})})]})]}),jsxRuntime.jsx("div",{className:l("md:hidden absolute top-full left-4 right-4 mt-2 transition-all duration-300 origin-top",i?"opacity-100 scale-100 translate-y-0":"opacity-0 scale-95 -translate-y-4 pointer-events-none"),children:jsxRuntime.jsxs(ie,{className:"p-4 flex flex-col gap-4 shadow-2xl border-white/10 bg-white/90 dark:bg-zinc-900/90 backdrop-blur-2xl",children:[t.map(d=>jsxRuntime.jsx("a",{href:d.href,className:"text-base font-medium px-4 py-2 rounded-2xl hover:bg-zinc-100 dark:hover:bg-white/[0.03] text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition-all",onClick:()=>c(false),children:d.label},d.label)),jsxRuntime.jsx("div",{className:"pt-4 border-t border-zinc-200 dark:border-white/10 flex flex-col gap-2",children:r})]})})]})})}var ho=ye.createContext(void 0);function at({children:e}){let[t,r]=ye.useState(false),o=ye.useRef(null);return jsxRuntime.jsx(ho.Provider,{value:{isOpen:t,setIsOpen:r,triggerRef:o},children:jsxRuntime.jsx("div",{className:"relative inline-block text-left",children:e})})}function nt({className:e,children:t,...r}){let o=ye.useContext(ho);if(!o)throw new Error("DropdownMenuTrigger must be used within DropdownMenu");let n=a=>{o.setIsOpen(!o.isOpen),r.onClick?.(a);};return jsxRuntime.jsx("button",{ref:o.triggerRef,type:"button","aria-haspopup":"menu","aria-expanded":o.isOpen?"true":"false",onClick:n,className:l("inline-flex items-center justify-center",e),...r,children:t})}function st({className:e,children:t,align:r="start",side:o="bottom",...n}){let a=ye.useContext(ho);if(!a)throw new Error("DropdownMenuContent must be used within DropdownMenu");let s=ye.useRef(null),{position:i,isPositioned:c}=Ft(a.triggerRef,s,{side:o,align:r,isOpen:a.isOpen});if(ye.useEffect(()=>{if(a.isOpen){let m=p=>{s.current&&!s.current.contains(p.target)&&a.triggerRef.current&&!a.triggerRef.current.contains(p.target)&&a.setIsOpen(false);},u=p=>{if(p.key==="Escape"&&(a.setIsOpen(false),a.triggerRef.current?.focus()),p.key==="ArrowDown"||p.key==="ArrowUp"){p.preventDefault();let g=s.current?.querySelectorAll('[role="menuitem"]');if(!g.length)return;let b=Array.from(g).indexOf(document.activeElement),x=0;p.key==="ArrowDown"?x=(b+1)%g.length:x=(b-1+g.length)%g.length,g[x]?.focus();}};return document.addEventListener("mousedown",m),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",u);}}},[a.isOpen,a.setIsOpen,a.triggerRef]),!a.isOpen)return null;let d=()=>o==="bottom"?r==="start"?"top left":r==="end"?"top right":"top center":o==="top"?r==="start"?"bottom left":r==="end"?"bottom right":"bottom center":o==="left"?r==="start"?"top right":r==="end"?"bottom right":"center right":o==="right"?r==="start"?"top left":r==="end"?"bottom left":"center left":"center center";return reactDom.createPortal(jsxRuntime.jsx("div",{ref:s,role:"menu","aria-orientation":"vertical",style:{top:i.top,left:i.left,transformOrigin:d()},className:l("fixed z-[110] min-w-[8rem] overflow-hidden rounded-2xl border border-gray-200 dark:border-white/10 bg-white/80 dark:bg-white/[0.03] backdrop-blur-xl p-1 shadow-md duration-100",c?"animate-in fade-in zoom-in-95 opacity-100":"opacity-0",e),...n,children:t}),document.body)}function V({className:e,children:t,...r}){let o=ye.useContext(ho);return jsxRuntime.jsx("button",{type:"button",role:"menuitem",onClick:a=>{o?.setIsOpen(false),r.onClick?.(a);},className:l("relative flex w-full cursor-pointer select-none items-center rounded-2xl px-3 py-2 text-sm outline-none transition-colors","text-gray-700 dark:text-white/80","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-white/[0.06] dark:hover:text-white","focus:bg-gray-100 focus:text-gray-900 dark:focus:bg-white/[0.06] dark:focus:text-white","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:t})}function Bs({className:e,children:t,...r}){return jsxRuntime.jsx("div",{className:l("px-2 py-1.5 text-sm font-semibold text-gray-900 dark:text-white",e),...r,children:t})}function xa({className:e,...t}){return jsxRuntime.jsx("div",{className:l("-mx-1 my-1 h-px bg-gray-200 dark:bg-white/[0.03]",e),...t})}function DM({name:e,description:t,avatarSrc:r,avatarFallback:o,className:n,side:a="top",align:s="start"}){return jsxRuntime.jsxs(at,{children:[jsxRuntime.jsx(nt,{className:l("w-full outline-none",n),children:jsxRuntime.jsxs("div",{className:"group flex w-full items-center gap-3 rounded-2xl border border-gray-200 dark:border-white/5 bg-white dark:bg-white/[0.03] p-3 transition-colors hover:bg-gray-50 dark:hover:bg-white/[0.06]",children:[jsxRuntime.jsx($,{src:r,fallback:o||e.charAt(0),size:"sm"}),jsxRuntime.jsxs("div",{className:"flex flex-1 flex-col items-start text-left",children:[jsxRuntime.jsx("span",{className:"text-xs font-medium text-gray-900 dark:text-white",children:e}),t&&jsxRuntime.jsx("span",{className:"text-[10px] text-gray-500 dark:text-white/50",children:t})]}),jsxRuntime.jsx(lucideReact.Settings,{className:"h-4 w-4 text-gray-400 dark:text-white/50 transition-colors group-hover:text-gray-900 dark:group-hover:text-white"})]})}),jsxRuntime.jsxs(st,{className:"w-56",align:s,side:a,children:[jsxRuntime.jsx(Bs,{children:"My Account"}),jsxRuntime.jsx(xa,{}),jsxRuntime.jsxs(V,{children:[jsxRuntime.jsx(lucideReact.User,{className:"mr-2 h-4 w-4"}),jsxRuntime.jsx("span",{children:"Profile"})]}),jsxRuntime.jsxs(V,{children:[jsxRuntime.jsx(lucideReact.Settings,{className:"mr-2 h-4 w-4"}),jsxRuntime.jsx("span",{children:"Settings"})]}),jsxRuntime.jsx(xa,{}),jsxRuntime.jsxs(V,{className:"text-rose-400 focus:text-rose-400",children:[jsxRuntime.jsx(lucideReact.LogOut,{className:"mr-2 h-4 w-4"}),jsxRuntime.jsx("span",{children:"Log out"})]})]})]})}var fp=ye__namespace.default.forwardRef(({...e},t)=>jsxRuntime.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));fp.displayName="Breadcrumb";var gp=ye__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("ol",{ref:r,className:l("flex flex-wrap items-center gap-1.5 break-words text-sm text-gray-500 dark:text-white/50 sm:gap-2.5",e),...t}));gp.displayName="BreadcrumbList";var hp=ye__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("li",{ref:r,className:l("inline-flex items-center gap-1.5",e),...t}));hp.displayName="BreadcrumbItem";var bp=ye__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("a",{ref:r,className:l("transition-colors hover:text-gray-900 dark:hover:text-white",e),...t}));bp.displayName="BreadcrumbLink";var xp=ye__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:l("font-normal text-gray-900 dark:text-white",e),...t}));xp.displayName="BreadcrumbPage";var vp=({children:e,className:t,...r})=>jsxRuntime.jsx("li",{role:"presentation","aria-hidden":"true",className:l("[&>svg]:size-3.5",t),...r,children:e??jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:jsxRuntime.jsx("path",{d:"m9 18 6-6-6-6"})})});vp.displayName="BreadcrumbSeparator";var wp=({className:e,...t})=>jsxRuntime.jsxs("span",{role:"presentation","aria-hidden":"true",className:l("flex h-9 w-9 items-center justify-center",e),...t,children:[jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"19",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"5",cy:"12",r:"1"})]}),jsxRuntime.jsx("span",{className:"sr-only",children:"More"})]});wp.displayName="BreadcrumbElipssis";function KM({contentId:e="main-content",className:t,children:r="Skip to content"}){return jsxRuntime.jsx("a",{href:`#${e}`,className:l("sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-[100] focus:px-4 focus:py-2 focus:bg-purple-600 focus:text-white focus:rounded-xl focus:shadow-2xl focus:outline-none focus:ring-2 focus:ring-white/20 transition-all",t),children:r})}var kp=({className:e,...t})=>jsxRuntime.jsx("nav",{role:"navigation","aria-label":"pagination",className:l("mx-auto flex w-full justify-center",e),...t});kp.displayName="Pagination";var Np=ye__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("ul",{ref:r,className:l("flex flex-row items-center gap-1",e),...t}));Np.displayName="PaginationContent";var Tp=ye__namespace.default.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("li",{ref:r,className:l("",e),...t}));Tp.displayName="PaginationItem";var va=({className:e,isActive:t,...r})=>jsxRuntime.jsx("a",{"aria-current":t?"page":void 0,className:l("inline-flex h-9 w-9 items-center justify-center rounded-2xl text-sm font-medium transition-colors","hover:bg-gray-100 dark:hover:bg-white/[0.03] hover:text-gray-900 dark:hover:text-white",t?"bg-gray-100 text-gray-900 dark:bg-white/[0.06] dark:text-white":"text-gray-500 dark:text-white/60",e),...r});va.displayName="PaginationLink";var Cp=({className:e,...t})=>jsxRuntime.jsxs(va,{"aria-label":"Go to previous page",className:l("w-auto gap-1 px-2.5",e),...t,children:[jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:jsxRuntime.jsx("path",{d:"m15 18-6-6 6-6"})}),jsxRuntime.jsx("span",{children:"Previous"})]});Cp.displayName="PaginationPrevious";var Mp=({className:e,...t})=>jsxRuntime.jsxs(va,{"aria-label":"Go to next page",className:l("w-auto gap-1 px-2.5",e),...t,children:[jsxRuntime.jsx("span",{children:"Next"}),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:jsxRuntime.jsx("path",{d:"m9 18 6-6-6-6"})})]});Mp.displayName="PaginationNext";var Rp=({className:e,...t})=>jsxRuntime.jsxs("span",{"aria-hidden":true,className:l("flex h-9 w-9 items-center justify-center",e),...t,children:[jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"19",cy:"12",r:"1"}),jsxRuntime.jsx("circle",{cx:"5",cy:"12",r:"1"})]}),jsxRuntime.jsx("span",{className:"sr-only",children:"More pages"})]});Rp.displayName="PaginationEllipsis";var jM=({steps:e,currentStep:t,className:r,onStepClick:o})=>jsxRuntime.jsx("div",{className:l("flex w-full flex-col gap-4 md:flex-row",r),children:e.map((n,a)=>{let s=t>a,i=t===a,c=!!o;return jsxRuntime.jsxs("div",{className:l("flex flex-1 flex-col gap-2 md:flex-row md:items-center md:gap-4",c&&"cursor-pointer"),onClick:()=>c&&o(a),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4 md:flex-col md:gap-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("div",{className:l("flex h-8 w-8 items-center justify-center rounded-full border-2 text-sm font-semibold transition-colors",s?"border-blue-600 bg-blue-600 text-white dark:border-blue-500 dark:bg-blue-500":i?"border-blue-600 text-blue-600 dark:border-blue-500 dark:text-blue-500":"border-gray-300 text-gray-500 dark:border-white/20 dark:text-white/40"),children:s?jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"}):a+1}),a<e.length-1&&jsxRuntime.jsx("div",{className:l("ml-4 h-px flex-1 bg-gray-200 md:hidden dark:bg-white/[0.03]",s&&"bg-blue-600 dark:bg-blue-500")})]}),jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("span",{className:l("text-sm font-medium",i||s?"text-gray-900 dark:text-white":"text-gray-500 dark:text-white/50"),children:n.title}),n.description&&jsxRuntime.jsx("span",{className:"text-xs text-gray-500 dark:text-white/40 hidden md:block",children:n.description})]})]}),a<e.length-1&&jsxRuntime.jsx("div",{className:l("hidden h-px flex-1 bg-gray-200 md:block dark:bg-white/[0.03]",s&&"bg-blue-600 dark:bg-blue-500")})]},a)})});function oR({isOpen:e,onClose:t,onConfirm:r,title:o,description:n,confirmText:a="Confirm",cancelText:s="Cancel",variant:i="primary",isLoading:c=false}){return jsxRuntime.jsxs(ao,{isOpen:e,onClose:t,children:[jsxRuntime.jsx(no,{children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[i==="danger"&&jsxRuntime.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-rose-500/10 text-rose-500",children:jsxRuntime.jsx(lucideReact.AlertTriangle,{className:"h-5 w-5"})}),jsxRuntime.jsx(Qe,{as:"h3",children:o})]})}),jsxRuntime.jsx("div",{className:"py-2",children:jsxRuntime.jsx(we,{className:"text-gray-500 dark:text-white/60",children:n})}),jsxRuntime.jsxs(so,{children:[jsxRuntime.jsx(L,{variant:"ghost",onClick:t,disabled:c,children:s}),jsxRuntime.jsx(L,{variant:i==="danger"?"danger":"primary",onClick:r,isLoading:c,children:a})]})]})}function dR({isOpen:e,onClose:t,children:r,className:o}){let n=ye.useRef(null),[a,s]=ye__namespace.default.useState(false);ye.useEffect(()=>{s(true);},[]),ye.useEffect(()=>{let c=n.current;c&&(e?c.open||c.showModal():c.open&&c.close());},[e,a]),ye.useEffect(()=>{let c=n.current;if(!c)return;let d=m=>{m.preventDefault(),t();};return c.addEventListener("cancel",d),()=>c.removeEventListener("cancel",d)},[t,a]);let i=c=>{c.target===n.current&&t();};return a?reactDom.createPortal(jsxRuntime.jsx("dialog",{ref:n,onClick:i,className:l("fixed inset-0 z-[100] m-auto bg-transparent p-0 backdrop:bg-black/60 backdrop:backdrop-blur-sm open:flex open:items-center open:justify-center","open:animate-in open:fade-in open:duration-200",o),children:jsxRuntime.jsxs("div",{className:l("relative w-full max-w-lg scale-100 gap-4 border border-zinc-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A]/90 p-6 shadow-2xl backdrop-blur-xl transition-all sm:rounded-2xl","animate-in fade-in zoom-in-95 duration-200 slide-in-from-bottom-2"),children:[r,jsxRuntime.jsxs("button",{onClick:t,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-gray-400 dark:focus:ring-white/20 disabled:pointer-events-none",children:[jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-900 dark:text-white",children:[jsxRuntime.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),jsxRuntime.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})}),document.body):null}function mR({className:e,children:t}){return jsxRuntime.jsx("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left mb-4",e),children:t})}function uR({className:e,children:t}){return jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),children:t})}function pR({className:e,children:t}){return jsxRuntime.jsx(Qe,{as:"h2",className:l("text-lg font-semibold leading-none tracking-tight",e),children:t})}function fR({className:e,children:t}){return jsxRuntime.jsx("p",{className:l("text-sm text-gray-500 dark:text-gray-400",e),children:t})}function NR({isOpen:e,onClose:t,position:r="right",children:o,className:n}){let[a,s]=ye.useState(false),[i,c]=ye.useState(false),d=ye.useRef(null);ye.useEffect(()=>{if(e)c(true),requestAnimationFrame(()=>{requestAnimationFrame(()=>{s(true);});}),document.body.style.overflow="hidden";else {s(false);let g=setTimeout(()=>{c(false),document.body.style.overflow="unset";},300);return ()=>clearTimeout(g)}},[e]),ye.useEffect(()=>{let g=b=>{b.key==="Escape"&&t();};return e&&document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g);}},[e,t]);let m=g=>{g.target===d.current&&t();};if(!i)return null;let u={left:"left-0 h-full w-3/4 max-w-sm border-r",right:"right-0 h-full w-3/4 max-w-sm border-l",bottom:"bottom-0 w-full h-auto max-h-[90vh] border-t rounded-t-2xl"},p={left:a?"translate-x-0":"-translate-x-full",right:a?"translate-x-0":"translate-x-full",bottom:a?"translate-y-0":"translate-y-full"};return reactDom.createPortal(jsxRuntime.jsx("div",{ref:d,onClick:m,className:l("fixed inset-0 z-[100] flex bg-black/60 backdrop-blur-sm transition-opacity duration-300",a?"opacity-100":"opacity-0"),role:"dialog","aria-modal":"true",children:jsxRuntime.jsx("div",{className:l("absolute bg-white dark:bg-[#0A0A0A] border-gray-200 dark:border-white/10 p-6 shadow-2xl transition-transform duration-300 ease-in-out",u[r],p[r],n),children:o})}),document.body)}function TR({className:e,children:t,...r}){return jsxRuntime.jsx("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left mb-6",e),...r,children:t})}function CR({className:e,children:t,...r}){return jsxRuntime.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-auto pt-6",e),...r,children:t})}function MR({className:e,children:t,...r}){return jsxRuntime.jsx(Qe,{as:"h2",className:l("text-lg font-semibold leading-none tracking-tight",e),...r,children:t})}function RR({className:e,children:t,...r}){return jsxRuntime.jsx(we,{variant:"muted",className:l("text-sm",e),...r,children:t})}function AR({content:e,children:t,position:r="top",delay:o=200,className:n}){let[a,s]=ye.useState(false),i=ye.useRef(null),c=ye.useRef(null),d=ye.useRef(null),{position:m,isPositioned:u}=Ft(c,d,{side:r,align:"center",sideOffset:8,isOpen:a}),p=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>s(true),o);},g=()=>{i.current&&clearTimeout(i.current),s(false);};ye.useEffect(()=>()=>{i.current&&clearTimeout(i.current);},[]);let b={top:"slide-in-from-bottom-2",bottom:"slide-in-from-top-2",left:"slide-in-from-right-2",right:"slide-in-from-left-2"};return jsxRuntime.jsxs("div",{ref:c,className:"relative inline-flex",onMouseEnter:p,onMouseLeave:g,onFocus:p,onBlur:g,children:[t,a&&reactDom.createPortal(jsxRuntime.jsx("div",{ref:d,role:"tooltip",style:{top:m.top,left:m.left},className:l("fixed z-[120] min-w-max max-w-xs rounded-2xl border border-gray-200 dark:border-white/10 bg-white dark:bg-[#0A0A0A]/90 px-3 py-1.5 text-xs text-gray-900 dark:text-white shadow-xl backdrop-blur-md","duration-200",u?"animate-in fade-in opacity-100":"opacity-0",b[r],n),children:e}),document.body)]})}var Fp=ye__namespace.default.forwardRef(({className:e,size:t="lg",...r},o)=>jsxRuntime.jsx("div",{ref:o,className:l("mx-auto w-full px-4",{sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl",full:"max-w-full"}[t],e),...r}));Fp.displayName="Container";var Wp=ye__namespace.default.forwardRef(({className:e,direction:t="col",gap:r=4,align:o,justify:n,wrap:a,style:s,...i},c)=>jsxRuntime.jsx("div",{ref:c,className:l("flex",{"flex-row":t==="row","flex-col":t==="col","flex-row-reverse":t==="row-reverse","flex-col-reverse":t==="col-reverse","flex-wrap":a,"items-start":o==="start","items-end":o==="end","items-center":o==="center","items-baseline":o==="baseline","items-stretch":o==="stretch","justify-start":n==="start","justify-end":n==="end","justify-center":n==="center","justify-between":n==="between","justify-around":n==="around","justify-evenly":n==="evenly"},e),style:{gap:typeof r=="number"?`${r*.25}rem`:r,...s},...i}));Wp.displayName="Stack";var $s={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},Xp={1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},qp={1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},jp={1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},Gp={1:"xl:grid-cols-1",2:"xl:grid-cols-2",3:"xl:grid-cols-3",4:"xl:grid-cols-4",5:"xl:grid-cols-5",6:"xl:grid-cols-6",7:"xl:grid-cols-7",8:"xl:grid-cols-8",9:"xl:grid-cols-9",10:"xl:grid-cols-10",11:"xl:grid-cols-11",12:"xl:grid-cols-12"},Jp=ye__namespace.default.forwardRef(({className:e,cols:t,sm:r,md:o,lg:n,xl:a,gap:s=4,style:i,...c},d)=>jsxRuntime.jsx("div",{ref:d,className:l("grid",t&&$s[t],r&&Xp[r],o&&qp[o],n&&jp[n],a&&Gp[a],e),style:{gridTemplateColumns:t&&!$s[t]?`repeat(${t}, minmax(0, 1fr))`:void 0,gap:typeof s=="number"?`${s*.25}rem`:s,...i},...c}));Jp.displayName="Grid";var Zp=ye__namespace.default.forwardRef(({variant:e="none",noise:t=false,patternColor:r,size:o=24,mask:n="none",animate:a=false,followMouse:s=false,bgColor:i,className:c,children:d,style:m,...u},p)=>{let g=ye__namespace.default.useRef(null);ye__namespace.default.useEffect(()=>{if(!s)return;let h=f=>{let w=g.current;if(!w)return;let v=w.getBoundingClientRect(),y=f.clientX-v.left,k=f.clientY-v.top;w.style.setProperty("--mouse-x",`${y}px`),w.style.setProperty("--mouse-y",`${k}px`);};return window.addEventListener("mousemove",h),()=>window.removeEventListener("mousemove",h)},[s]);let b=()=>{let h={},f=r||"var(--pattern-color, rgba(255,255,255,0.08))";return e==="dots"?{...h,backgroundImage:`radial-gradient(${f} 1px, transparent 1px)`,backgroundSize:`${o}px ${o}px`,transform:s?"translate3d(calc((var(--mouse-x, 0) - 24px) / 40), calc((var(--mouse-y, 0) - 24px) / 40), 0)":void 0}:e==="grid"?{...h,backgroundImage:`
|
|
67
67
|
linear-gradient(to right, ${f} 1px, transparent 1px),
|
|
68
68
|
linear-gradient(to bottom, ${f} 1px, transparent 1px)
|
|
69
|
-
`,backgroundSize:`${o}px ${o}px`,transform:s?"translate3d(calc((var(--mouse-x, 0) - 24px) / 40), calc((var(--mouse-y, 0) - 24px) / 40), 0)":void 0}:e==="gradient"?{...h,background:s?`radial-gradient(circle at var(--mouse-x, center) var(--mouse-y, center), ${f}, transparent)`:`radial-gradient(circle at center, ${f}, transparent)`}:e==="beams"?{...h,background:`radial-gradient(60% 40% at 50% 0%, ${f} 0%, transparent 100%)`}:h},x=n==="fade"?{maskImage:"radial-gradient(ellipse at center, black, transparent 90%)",WebkitMaskImage:"radial-gradient(ellipse at center, black, transparent 90%)"}:{};return jsxRuntime.jsxs("div",{ref:h=>{h&&(g.current=h),typeof p=="function"?p(h):p&&(p.current=h);},className:l("absolute inset-0 overflow-hidden pointer-events-none transition-transform duration-300 ease-out","z-0","[--pattern-color:rgba(0,0,0,0.05)] dark:[--pattern-color:rgba(255,255,255,0.08)]",i?.startsWith("bg-")?i:"",c),style:{...b(),...x,...m,backgroundColor:i&&!i.startsWith("bg-")?i:void 0},...u,children:[t&&jsxRuntime.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none brightness-100 contrast-150",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`}}),e==="beams"&&jsxRuntime.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[jsxRuntime.jsx("div",{className:"absolute top-0 left-1/4 w-px h-full bg-gradient-to-b from-transparent via-white/10 to-transparent"}),jsxRuntime.jsx("div",{className:"absolute top-0 right-1/4 w-px h-full bg-gradient-to-b from-transparent via-white/10 to-transparent"})]}),e==="mesh"&&jsxRuntime.jsxs("div",{className:l("absolute inset-0 opacity-30 blur-[100px]",a&&"animate-pulse"),children:[jsxRuntime.jsx("div",{className:"absolute top-[-10%] left-[-10%] w-[50%] h-[50%] rounded-full bg-blue-500/20"}),jsxRuntime.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] w-[50%] h-[50%] rounded-full bg-purple-500/20"}),jsxRuntime.jsx("div",{className:"absolute top-[20%] right-[10%] w-[40%] h-[40%] rounded-full bg-indigo-500/10"})]}),d]})});jp.displayName="Background";var a4=({children:e,className:t,size:r=300,color:o,fill:n,...a})=>{let s=we.useRef(null),i=n||o||"rgba(255, 255, 255, 0.1)";return jsxRuntime.jsxs("div",{ref:s,onMouseMove:u=>{let p=s.current;if(!p)return;let g=p.getBoundingClientRect(),b=u.clientX-g.left,x=u.clientY-g.top;p.style.setProperty("--mouse-x",`${b}px`),p.style.setProperty("--mouse-y",`${x}px`);},onMouseEnter:()=>{s.current?.style.setProperty("--opacity","1");},onMouseLeave:()=>{s.current?.style.setProperty("--opacity","0");},className:l("relative overflow-hidden rounded-2xl border border-gray-200 bg-white dark:border-white/10 dark:bg-black",t),...a,children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute -inset-px transition-opacity duration-300",style:{opacity:"var(--opacity, 0)",background:`radial-gradient(${r}px circle at var(--mouse-x, center) var(--mouse-y, center), ${i}, transparent 80%)`}}),e&&jsxRuntime.jsx("div",{className:"relative h-full",children:e})]})};var mf=classVarianceAuthority.cva("relative flex w-full flex-col rounded-2xl border transition-all duration-200 focus-within:ring-4",{variants:{variant:{default:"bg-white border-gray-200 shadow-sm focus-within:border-purple-500/50 focus-within:ring-purple-500/10 dark:bg-white/[0.03] dark:border-white/10 dark:shadow-none",ghost:"bg-transparent border-transparent shadow-none focus-within:bg-white/50 dark:focus-within:bg-white/5"}},defaultVariants:{variant:"default"}}),uf=we__namespace.default.forwardRef(({className:e,variant:t,onSubmit:r,isGenerating:o,onAttach:n,onFilesSelected:a,onStop:s,onMic:i,maxLength:c,footer:d,attachments:m,onRemoveAttachment:u,accept:p,multiple:g,placeholder:b="Ask AI anything...",value:x,onChange:h,...f},w)=>{let[v,y]=we.useState(""),k=x!==void 0,N=k?x:v,C=we.useRef(null),T=we.useRef(null),E=()=>{C.current&&(C.current.style.height="auto",C.current.style.height=`${C.current.scrollHeight}px`);};we.useEffect(()=>{E();},[N]);let A=R=>{let K=R.target.value;c&&K.length>c||(k||y(K),h?.(R));},M=R=>{R.key==="Enter"&&!R.shiftKey&&(R.preventDefault(),N.trim()&&!o&&(r?.(N),k||y(""))),f.onKeyDown?.(R);},S=()=>{o&&s?s():N.trim()&&(r?.(N),k||y(""));},I=()=>{a&&T.current?T.current.click():n?.();},B=R=>{R.target.files&&R.target.files.length>0&&a?.(R.target.files),T.current&&(T.current.value="");};return jsxRuntime.jsxs("div",{className:l(mf({variant:t,className:e})),children:[jsxRuntime.jsx("input",{type:"file",ref:T,className:"hidden",onChange:B,accept:p,multiple:g}),m&&m.length>0&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 px-4 pt-4",children:m.map(R=>jsxRuntime.jsxs("div",{className:"group relative flex items-center gap-2 rounded-xl border border-gray-200 bg-gray-50 px-3 py-1.5 text-sm transition-colors hover:bg-gray-100 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/[0.06]",children:[jsxRuntime.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded-lg bg-white dark:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.File,{className:"h-3 w-3 text-purple-500"})}),jsxRuntime.jsx("span",{className:"max-w-[120px] truncate text-gray-700 dark:text-gray-300",children:R.name}),jsxRuntime.jsx("button",{onClick:()=>u?.(R.id),className:"ml-1 rounded-full p-0.5 text-gray-400 opacity-0 transition-all hover:bg-gray-200 hover:text-gray-600 group-hover:opacity-100 dark:hover:bg-white/[0.06] dark:hover:text-white",type:"button",children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},R.id))}),jsxRuntime.jsx("textarea",{ref:R=>{C.current=R,typeof w=="function"?w(R):w&&(w.current=R);},value:N,onChange:A,onKeyDown:M,placeholder:b,rows:1,className:l("w-full resize-none bg-transparent px-4 py-4 text-base outline-none max-h-[200px]","text-gray-900 placeholder:text-gray-400","dark:text-white dark:placeholder:text-white/40"),disabled:o&&!s,...f}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-2 pb-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"text-gray-400 hover:text-gray-600 dark:text-white/40 dark:hover:text-white",onClick:I,type:"button",title:"Attach file",children:jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-5 w-5"})}),i&&jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"text-gray-400 hover:text-gray-600 dark:text-white/40 dark:hover:text-white",onClick:i,type:"button",title:"Use microphone",children:jsxRuntime.jsx(lucideReact.Mic,{className:"h-5 w-5"})})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[c&&jsxRuntime.jsxs("span",{className:"text-xs text-gray-400 dark:text-white/30",children:[N.length,"/",c]}),jsxRuntime.jsx(L,{size:"icon",disabled:!N.trim()&&!o||o&&!s,onClick:S,className:l("h-8 w-8 rounded-full transition-all duration-200",N.trim()||o?"bg-purple-600 text-white hover:bg-purple-500 shadow-lg shadow-purple-500/25":"bg-gray-100 text-gray-400 dark:bg-white/[0.06] dark:text-white/20"),children:o?s?jsxRuntime.jsx(lucideReact.Square,{className:"h-3 w-3 fill-current"}):jsxRuntime.jsx(lucideReact.Sparkles,{className:"h-4 w-4 animate-pulse"}):jsxRuntime.jsx(lucideReact.ArrowUp,{className:"h-4 w-4"})})]})]}),d&&jsxRuntime.jsx("div",{className:"border-t border-gray-100 px-4 py-2 text-xs text-gray-400 dark:border-white/5 dark:text-white/30",children:d})]})});uf.displayName="AIPromptInput";var Nf=classVarianceAuthority.cva("group relative overflow-hidden rounded-2xl border transition-all duration-200",{variants:{variant:{default:"bg-gray-50 border-gray-200 dark:bg-white/[0.02] dark:border-white/10",ghost:"bg-transparent border-transparent",outline:"bg-transparent border-gray-200 dark:border-white/10"}},defaultVariants:{variant:"default"}}),Tf=we__namespace.default.forwardRef(({className:e,variant:t,children:r,onCopy:o,onRegenerate:n,onFeedback:a,onShare:s,onEdit:i,timestamp:c,sources:d,model:m,usage:u,...p},g)=>jsxRuntime.jsxs("div",{ref:g,className:l(Nf({variant:t,className:e})),...p,children:[jsxRuntime.jsxs("div",{className:"absolute left-4 top-4 flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-gradient-to-br from-purple-500 to-blue-500 shadow-lg shadow-purple-500/20",children:jsxRuntime.jsx(lucideReact.Sparkles,{className:"h-3.5 w-3.5 text-white"})}),c&&jsxRuntime.jsx("span",{className:"text-xs font-medium text-gray-400 dark:text-white/30",children:c})]}),jsxRuntime.jsxs("div",{className:"pl-14 pr-4 py-4",children:[jsxRuntime.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none text-gray-700 dark:text-gray-300",children:r}),d&&d.length>0&&jsxRuntime.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:d.map((b,x)=>jsxRuntime.jsxs("a",{href:b.url,target:"_blank",rel:"noopener noreferrer",className:l("flex items-center gap-1.5 rounded-full border px-3 py-1 text-xs transition-colors","border-gray-200 bg-white text-gray-600 hover:bg-gray-50","dark:border-white/10 dark:bg-white/[0.03] dark:text-white/60 dark:hover:bg-white/[0.06]"),children:[jsxRuntime.jsx("span",{className:"max-w-[150px] truncate",children:b.title}),jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3 w-3 opacity-50"})]},x))})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-t border-gray-200 bg-white/50 px-2 py-1.5 backdrop-blur dark:border-white/5 dark:bg-white/[0.02]",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 px-2 text-[10px] font-medium text-gray-400 dark:text-white/20",children:[m&&jsxRuntime.jsx("span",{children:m}),u&&jsxRuntime.jsx("span",{children:u})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsxs(L,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:o,children:[jsxRuntime.jsx(lucideReact.Copy,{className:"mr-1.5 h-3.5 w-3.5"}),"Copy"]}),s&&jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:s,title:"Share",children:jsxRuntime.jsx(lucideReact.Share,{className:"h-3.5 w-3.5"})}),i&&jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:i,title:"Edit",children:jsxRuntime.jsx(lucideReact.Edit,{className:"h-3.5 w-3.5"})}),jsxRuntime.jsx("div",{className:"mx-1 h-3 w-px bg-gray-200 dark:bg-white/10"}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:n,title:"Regenerate",children:jsxRuntime.jsx(lucideReact.RefreshCw,{className:"h-3.5 w-3.5"})}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:()=>a?.("up"),title:"Helpful",children:jsxRuntime.jsx(lucideReact.ThumbsUp,{className:"h-3.5 w-3.5"})}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:()=>a?.("down"),title:"Not helpful",children:jsxRuntime.jsx(lucideReact.ThumbsDown,{className:"h-3.5 w-3.5"})})]})]})]}));Tf.displayName="AIResponse";function k4({children:e,className:t,...r}){return jsxRuntime.jsx("div",{className:l("flex h-[800px] w-full overflow-hidden rounded-3xl border border-gray-200 dark:border-white/10 bg-white dark:bg-black/40 backdrop-blur-xl shadow-2xl",t),...r,children:e})}function S4({conversations:e,activeId:t,onSelect:r,onNewChat:o,onSearch:n,onArchive:a,onPin:s,onMute:i,onDelete:c,onMarkUnread:d,filter:m="all",sortBy:u="recent",hideHeader:p=false,className:g,...b}){let[x,h]=we.useState(""),f=we.useMemo(()=>e.filter(v=>(v.user?.name||v.group?.name||"").toLowerCase().includes(x.toLowerCase())),[e,x]),w=v=>{let y=v.target.value;h(y),n?.(y);};return jsxRuntime.jsxs("div",{className:l("flex flex-col border-r border-gray-200 dark:border-white/10 bg-gray-50/50 dark:bg-white/[0.02]",!g?.includes("w-")&&"w-80",g),...b,children:[!p&&jsxRuntime.jsxs("div",{className:"p-4 space-y-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:"Messages"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("button",{className:"p-2 rounded-full hover:bg-gray-200 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",title:"Filter",children:jsxRuntime.jsx(lucideReact.Filter,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{onClick:o,className:"p-2 rounded-full hover:bg-gray-200 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",title:"New Chat",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-5 w-5"})})]})]}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),jsxRuntime.jsx("input",{type:"text",value:x,onChange:w,placeholder:"Search messages...",className:"w-full h-10 pl-9 pr-4 rounded-2xl bg-white dark:bg-white/[0.03] border border-gray-200 dark:border-white/10 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all placeholder:text-gray-400 dark:text-white"})]})]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:bg-white/10 [&::-webkit-scrollbar-thumb]:rounded-full hover:[&::-webkit-scrollbar-thumb]:bg-white/20 [&::-webkit-scrollbar-track]:bg-transparent",children:jsxRuntime.jsx("div",{className:"flex flex-col",children:f.map(v=>{let y=v.user?.name||v.group?.name||"Unknown",k=v.user?.avatar||v.group?.avatar,N=v.user?.status==="online",C=t===v.id;return jsxRuntime.jsx("div",{className:"p-2",children:jsxRuntime.jsxs("div",{onClick:()=>r?.(v.id),className:l("w-full h-16 flex items-center gap-3 p-3 rounded-2xl transition-all text-left group cursor-pointer",C?"bg-blue-500/10 dark:bg-white/[0.06] shadow-[0_0_15px_rgba(59,130,246,0.1)] dark:shadow-[0_0_15px_rgba(255,255,255,0.05)]":"hover:bg-gray-100 dark:hover:bg-white/[0.03]"),children:[jsxRuntime.jsxs("div",{className:"relative flex-shrink-0",children:[jsxRuntime.jsx($,{src:k,alt:y,fallback:y[0]}),N&&jsxRuntime.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 w-3.5 h-3.5 bg-green-500 border-2 border-white dark:border-[#0a0a0a] rounded-full"})]}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-0.5",children:[jsxRuntime.jsx("span",{className:l("font-semibold truncate",C?"text-blue-600 dark:text-white":"text-gray-900 dark:text-white/90"),children:y}),v.lastMessage&&jsxRuntime.jsx("span",{className:"text-[10px] text-gray-400 dark:text-white/30 whitespace-nowrap",children:new Date(v.lastMessage.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsxRuntime.jsx("p",{className:"text-xs text-gray-500 dark:text-white/40 truncate",children:v.isTyping?jsxRuntime.jsx("span",{className:"text-blue-500 animate-pulse",children:"typing..."}):v.lastMessage?.content||"No messages yet"}),v.unreadCount>0&&jsxRuntime.jsx("span",{className:"flex-shrink-0 min-w-[18px] h-[18px] flex items-center justify-center bg-blue-500 text-white text-[10px] font-bold rounded-full px-1",children:v.unreadCount})]})]}),jsxRuntime.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity",onClick:T=>T.stopPropagation(),children:jsxRuntime.jsxs(at,{children:[jsxRuntime.jsx(nt,{className:"p-1 rounded-lg hover:bg-gray-200 dark:hover:bg-white/10 text-gray-400",children:jsxRuntime.jsx(lucideReact.MoreVertical,{className:"h-4 w-4"})}),jsxRuntime.jsxs(st,{align:"end",children:[jsxRuntime.jsxs(V,{onClick:()=>s?.(v.id),children:[jsxRuntime.jsx(lucideReact.Pin,{className:"h-4 w-4 mr-2"})," Pin"]}),jsxRuntime.jsxs(V,{onClick:()=>a?.(v.id),children:[jsxRuntime.jsx(lucideReact.Archive,{className:"h-4 w-4 mr-2"})," Archive"]}),jsxRuntime.jsxs(V,{onClick:()=>i?.(v.id),children:[jsxRuntime.jsx(lucideReact.BellOff,{className:"h-4 w-4 mr-2"})," Mute"]}),jsxRuntime.jsxs(V,{onClick:()=>d?.(v.id),children:[jsxRuntime.jsx(lucideReact.MessageSquare,{className:"h-4 w-4 mr-2"})," Mark as Unread"]}),jsxRuntime.jsxs(V,{className:"text-red-500",onClick:()=>c?.(v.id),children:[jsxRuntime.jsx(lucideReact.Trash2,{className:"h-4 w-4 mr-2"})," Delete"]})]})]})})]})},v.id)})})})]})}function O4({user:e,onBack:t,onInfo:r,onAvatarClick:o,onCall:n,onVideoCall:a,onSearch:s,onMute:i,isTyping:c,isMuted:d,actions:m,className:u,...p}){return jsxRuntime.jsxs("div",{className:l("flex h-16 items-center justify-between border-b border-gray-200 dark:border-white/10 bg-white/80 dark:bg-black/40 backdrop-blur px-4 sticky top-0 z-10",u),...p,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[t&&jsxRuntime.jsx("button",{onClick:t,className:"md:hidden p-2 -ml-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.ArrowLeft,{className:"h-5 w-5 text-gray-600 dark:text-white/70"})}),jsxRuntime.jsxs("div",{className:"relative cursor-pointer",onClick:o||r,children:[jsxRuntime.jsx($,{src:e.avatar,alt:e.name,fallback:e.name[0]}),e.status==="online"&&jsxRuntime.jsx("span",{className:"absolute bottom-0 right-0 h-3 w-3 rounded-full bg-green-500 border-2 border-white dark:border-black"})]}),jsxRuntime.jsxs("div",{className:"cursor-pointer",onClick:r,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white leading-none",children:e.name}),d&&jsxRuntime.jsx(lucideReact.BellOff,{className:"h-3 w-3 text-gray-400"})]}),jsxRuntime.jsx("p",{className:l("text-xs mt-1 transition-colors",c?"text-blue-500 font-medium animate-pulse":"text-gray-500 dark:text-white/50"),children:c?"typing...":e.status==="online"?"Online":`Last seen ${e.lastSeen?.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[s&&jsxRuntime.jsx("button",{onClick:s,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Search,{className:"h-5 w-5"})}),n&&jsxRuntime.jsx("button",{onClick:n,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Phone,{className:"h-5 w-5"})}),a&&jsxRuntime.jsx("button",{onClick:a,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Video,{className:"h-5 w-5"})}),m,jsxRuntime.jsx("button",{onClick:r,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.MoreVertical,{className:"h-5 w-5"})})]})]})}function Ys({src:e,duration:t,isMe:r,className:o,...n}){let[a,s]=we.useState(false),[i,c]=we.useState(0),[d,m]=we.useState(false),u=we.useRef(null),p=()=>{u.current&&(a?u.current.pause():u.current.play(),s(!a));},g=()=>{u.current&&c(u.current.currentTime);},b=()=>{s(false),c(0);},x=f=>{let w=Math.floor(f/60),v=Math.floor(f%60);return `${w}:${v.toString().padStart(2,"0")}`},h=t?i/t*100:0;return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3 p-2 rounded-2xl min-w-[200px]",r?"bg-white/10":"bg-gray-100 dark:bg-white/[0.03]",o),...n,children:[jsxRuntime.jsx("audio",{ref:u,src:e,onTimeUpdate:g,onEnded:b}),jsxRuntime.jsx("button",{onClick:p,className:l("w-10 h-10 rounded-full flex items-center justify-center transition-all",r?"bg-white text-blue-600":"bg-blue-500 text-white"),children:a?jsxRuntime.jsx(lucideReact.Pause,{className:"h-5 w-5 fill-current"}):jsxRuntime.jsx(lucideReact.Play,{className:"h-5 w-5 fill-current ml-0.5"})}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-1",children:[jsxRuntime.jsx("div",{className:"h-1.5 w-full bg-gray-300 dark:bg-white/10 rounded-full overflow-hidden",children:jsxRuntime.jsx("div",{className:l("h-full transition-all duration-100",r?"bg-white":"bg-blue-500"),style:{width:`${h}%`}})}),jsxRuntime.jsxs("div",{className:"flex justify-between text-[10px] font-medium opacity-60",children:[jsxRuntime.jsx("span",{children:x(i)}),jsxRuntime.jsx("span",{children:t?x(t):"--:--"})]})]}),jsxRuntime.jsx("button",{onClick:()=>m(!d),className:"p-1.5 rounded-full hover:bg-black/5 dark:hover:bg-white/5 opacity-60",children:d?jsxRuntime.jsx(lucideReact.VolumeX,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Volume2,{className:"h-4 w-4"})})]})}function Xs({status:e,className:t,...r}){return e==="sending"?jsxRuntime.jsx("div",{className:l("w-3 h-3 border border-current border-t-transparent rounded-full animate-spin opacity-50",t),...r}):e==="failed"?jsxRuntime.jsx("span",{className:l("text-red-500 text-[10px] font-bold",t),...r,children:"!"}):jsxRuntime.jsxs("div",{className:l("flex items-center",t),...r,children:[e==="sent"&&jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3 opacity-50"}),e==="delivered"&&jsxRuntime.jsx(lucideReact.CheckCheck,{className:"h-3 w-3 opacity-50"}),e==="read"&&jsxRuntime.jsx(lucideReact.CheckCheck,{className:"h-3 w-3 text-blue-500"})]})}function qs({url:e,title:t,description:r,image:o,siteName:n,className:a,...s}){return jsxRuntime.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:l("block overflow-hidden rounded-xl border border-gray-200 dark:border-white/10 bg-white dark:bg-white/[0.03] hover:bg-gray-50 dark:hover:bg-white/[0.05] transition-all group",a),...s,children:[o&&jsxRuntime.jsx("div",{className:"aspect-video w-full overflow-hidden border-b border-gray-200 dark:border-white/10",children:jsxRuntime.jsx("img",{src:o,alt:t,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"})}),jsxRuntime.jsxs("div",{className:"p-3 space-y-1",children:[n&&jsxRuntime.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-blue-500",children:n}),jsxRuntime.jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-white line-clamp-1",children:t||e}),r&&jsxRuntime.jsx("p",{className:"text-xs text-gray-500 dark:text-white/50 line-clamp-2",children:r}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-gray-400 pt-1",children:[jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3 w-3"}),jsxRuntime.jsx("span",{className:"truncate",children:new URL(e).hostname})]})]})]})}function Js({data:e,isOwn:t,onAction:r}){return jsxRuntime.jsxs("div",{className:"space-y-2 max-w-sm",children:[(()=>{if(!e.header)return null;switch(e.header.type){case "text":return jsxRuntime.jsx("h4",{className:"font-bold mb-1 text-sm",children:e.header.text});case "image":return jsxRuntime.jsx("div",{className:"mb-2 rounded-lg overflow-hidden border border-white/10",children:jsxRuntime.jsx("img",{src:e.header.attachment?.url,alt:"Header",className:"w-full h-auto object-cover"})});default:return null}})(),jsxRuntime.jsx("p",{className:"text-sm leading-relaxed",children:e.body}),e.footer&&jsxRuntime.jsx("p",{className:"text-[10px] opacity-50 italic",children:e.footer}),e.type==="button"&&e.buttons&&jsxRuntime.jsx("div",{className:"flex flex-col gap-1 mt-3",children:e.buttons.map(n=>jsxRuntime.jsxs("button",{onClick:()=>r?.(n),className:l("flex items-center justify-center gap-2 p-2.5 rounded-xl text-sm font-medium transition-all","bg-white/10 hover:bg-white/20 border border-white/10 active:scale-[0.98]",t?"text-white":"text-blue-500 dark:text-blue-400"),children:[n.type==="url"&&jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3.5 w-3.5"}),n.type==="call"&&jsxRuntime.jsx(lucideReact.Phone,{className:"h-3.5 w-3.5"}),n.type==="reply"&&jsxRuntime.jsx(lucideReact.Reply,{className:"h-3.5 w-3.5"}),n.text]},n.id))}),e.type==="list"&&e.sections&&jsxRuntime.jsx("div",{className:"mt-3 space-y-3",children:e.sections.map((n,a)=>jsxRuntime.jsxs("div",{className:"space-y-1",children:[n.title&&jsxRuntime.jsx("p",{className:"text-[10px] uppercase tracking-wider opacity-40 font-bold px-1",children:n.title}),jsxRuntime.jsx("div",{className:"flex flex-col gap-1",children:n.rows.map(s=>jsxRuntime.jsxs("button",{onClick:()=>r?.({id:s.id,text:s.title,type:"reply"}),className:"flex flex-col items-start p-3 rounded-xl bg-white/5 hover:bg-white/10 border border-white/5 transition-colors text-left",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:s.title}),s.description&&jsxRuntime.jsx("span",{className:"text-xs opacity-50 line-clamp-1",children:s.description})]},s.id))})]},a))}),e.nativeFlow&&jsxRuntime.jsx("div",{className:"flex flex-col gap-1 mt-3",children:e.nativeFlow.buttons.map((n,a)=>{let s={};try{s=typeof n.buttonParamsJson=="string"?JSON.parse(n.buttonParamsJson):n.buttonParamsJson;}catch{}return jsxRuntime.jsxs("button",{onClick:()=>r?.({id:s.id||n.name,text:s.display_text||n.name,type:"reply",params:s}),className:l("flex items-center justify-center gap-2 p-2.5 rounded-xl text-sm font-medium transition-all","bg-white/10 hover:bg-white/20 border border-white/10 active:scale-[0.98]",t?"text-white":"text-blue-500 dark:text-blue-400"),children:[n.name==="cta_copy"&&jsxRuntime.jsx(lucideReact.Copy,{className:"h-3.5 w-3.5"}),n.name==="cta_url"&&jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3.5 w-3.5"}),n.name==="cta_call"&&jsxRuntime.jsx(lucideReact.Phone,{className:"h-3.5 w-3.5"}),s.display_text||n.name]},a)})})]})}function Qs({cards:e,isOwn:t,onAction:r}){let o=we__namespace.default.useRef(null),n=a=>{o.current&&o.current.scrollBy({left:a==="left"?-240:240,behavior:"smooth"});};return jsxRuntime.jsxs("div",{className:"relative group/carousel max-w-[300px] sm:max-w-[400px]",children:[jsxRuntime.jsx("div",{ref:o,className:"flex gap-3 overflow-x-auto scrollbar-hide snap-x snap-mandatory pb-2",children:e.map((a,s)=>jsxRuntime.jsxs("div",{className:"flex-shrink-0 w-[240px] snap-start rounded-2xl bg-white/5 dark:bg-white/[0.03] border border-white/10 overflow-hidden flex flex-col",children:[a.header?.attachment&&jsxRuntime.jsx("div",{className:"aspect-video w-full overflow-hidden",children:jsxRuntime.jsx("img",{src:a.header.attachment.url,alt:"Card",className:"w-full h-full object-cover"})}),jsxRuntime.jsxs("div",{className:"p-3 flex-1 flex flex-col",children:[jsxRuntime.jsx("p",{className:"text-sm leading-relaxed mb-1",children:a.body}),a.footer&&jsxRuntime.jsx("p",{className:"text-[10px] opacity-50 italic mb-3",children:a.footer}),jsxRuntime.jsx("div",{className:"mt-auto flex flex-col gap-1",children:a.buttons.map(i=>jsxRuntime.jsxs("button",{onClick:()=>r?.(i),className:l("flex items-center justify-center gap-2 p-2 rounded-lg text-xs font-medium transition-all","bg-white/10 hover:bg-white/20 border border-white/10",t?"text-white":"text-blue-500 dark:text-blue-400"),children:[i.type==="url"&&jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3 w-3"}),i.type==="call"&&jsxRuntime.jsx(lucideReact.Phone,{className:"h-3 w-3"}),i.type==="reply"&&jsxRuntime.jsx(lucideReact.Reply,{className:"h-3 w-3"}),i.text]},i.id))})]})]},s))}),e.length>1&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:()=>n("left"),className:"absolute left-[-12px] top-1/2 -translate-y-1/2 p-1.5 rounded-full bg-white dark:bg-gray-800 shadow-lg border border-white/10 opacity-0 group-hover/carousel:opacity-100 transition-opacity z-10",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{onClick:()=>n("right"),className:"absolute right-[-12px] top-1/2 -translate-y-1/2 p-1.5 rounded-full bg-white dark:bg-gray-800 shadow-lg border border-white/10 opacity-0 group-hover/carousel:opacity-100 transition-opacity z-10",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]})}function ti({message:e,isOwn:t,showAvatar:r,showStatus:o=true,className:n,onReply:a,onReact:s,onDelete:i,onEdit:c,onForward:d,onCopy:m,onPin:u,onStar:p,onSelect:g,onAction:b,onImageClick:x,isSelected:h}){let f=()=>!t||!o?null:jsxRuntime.jsx(Xs,{status:e.status||"sent",className:"ml-1"}),w=()=>{if(e.type==="revoked")return jsxRuntime.jsxs("p",{className:"text-sm italic opacity-50 flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Trash2,{className:"h-3 w-3"})," This message was deleted"]});switch(e.type){case "audio":return jsxRuntime.jsx(Ys,{src:e.attachments?.[0]?.url||"",duration:e.attachments?.[0]?.duration,isMe:t});case "location":return jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.MapPin,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"text-sm font-medium",children:e.location?.address||"Shared Location"})]}),jsxRuntime.jsxs("div",{className:"aspect-video rounded-xl bg-gray-200 dark:bg-white/10 flex items-center justify-center overflow-hidden relative group/map",children:[jsxRuntime.jsx(lucideReact.MapPin,{className:"h-8 w-8 opacity-20 group-hover/map:scale-110 transition-transform"}),jsxRuntime.jsx("div",{className:"absolute inset-0 bg-blue-500/5 group-hover/map:bg-blue-500/10 transition-colors"})]})]});case "contact":return jsxRuntime.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-xl bg-black/5 dark:bg-white/10 border border-white/5",children:[jsxRuntime.jsx("div",{className:"w-10 h-10 rounded-full bg-blue-500 flex items-center justify-center text-white shadow-lg shadow-blue-500/20",children:jsxRuntime.jsx(lucideReact.User,{className:"h-5 w-5"})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-sm font-bold truncate",children:e.contact?.name}),jsxRuntime.jsx("p",{className:"text-xs opacity-60 truncate",children:e.contact?.phone})]})]});case "file":return jsxRuntime.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-xl bg-black/5 dark:bg-white/10 border border-white/5 hover:bg-black/10 dark:hover:bg-white/20 transition-colors cursor-pointer",children:[jsxRuntime.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-500/20 flex items-center justify-center text-blue-500",children:jsxRuntime.jsx(lucideReact.FileText,{className:"h-6 w-6"})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium truncate",children:e.attachments?.[0]?.name||"File"}),jsxRuntime.jsx("p",{className:"text-[10px] opacity-60 uppercase",children:e.attachments?.[0]?.size||"Unknown size"})]})]});case "sticker":return jsxRuntime.jsx("div",{className:"relative group/sticker",children:jsxRuntime.jsx("img",{src:e.attachments?.[0]?.url,alt:"Sticker",className:"w-32 h-32 object-contain"})});case "image":return jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"relative rounded-2xl overflow-hidden border border-white/5 group/image cursor-pointer",onClick:()=>x?.(e.attachments?.[0]?.url||""),children:jsxRuntime.jsx(qo,{src:e.attachments?.[0]?.url||"",alt:e.content||"Image",className:"max-h-[300px] w-auto object-contain bg-black/20 transition-transform duration-300 group-hover/image:scale-105"})}),e.content&&jsxRuntime.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap break-words px-1",children:e.content})]});case "video":return jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"relative rounded-2xl overflow-hidden border border-white/5 bg-black/20 aspect-video flex items-center justify-center group/video",children:jsxRuntime.jsx("video",{src:e.attachments?.[0]?.url,controls:true,className:"max-h-[300px] w-full"})}),e.content&&jsxRuntime.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap break-words px-1",children:e.content})]});case "interactive":return e.interactive?.type==="carousel"&&e.interactive.cards?jsxRuntime.jsx(Qs,{cards:e.interactive.cards,isOwn:t,onAction:b}):e.interactive?jsxRuntime.jsx(Js,{data:e.interactive,isOwn:t,onAction:b}):null;default:let v=/(https?:\/\/[^\s]+)/g,y=e.content.match(v);return jsxRuntime.jsxs("div",{className:"space-y-2",children:[e.replyTo&&jsxRuntime.jsxs("div",{className:"mb-2 p-2 rounded-lg bg-black/5 dark:bg-white/5 border-l-4 border-blue-500 text-xs",children:[jsxRuntime.jsx("p",{className:"font-bold text-blue-500 truncate",children:e.replyTo.senderId===e.senderId?"You":"Other"}),jsxRuntime.jsx("p",{className:"opacity-60 truncate",children:e.replyTo.content})]}),jsxRuntime.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap break-words",children:e.content}),y&&y.map(k=>jsxRuntime.jsx(qs,{url:k},k))]})}};return jsxRuntime.jsxs("div",{className:l("flex w-full mb-4 group/bubble",t?"justify-end":"justify-start",n),children:[!t&&r&&jsxRuntime.jsx("div",{className:"mr-2 mt-auto",children:jsxRuntime.jsx($,{src:e.contact?.avatar,alt:e.contact?.name||"User",className:"w-8 h-8",fallback:(e.contact?.name||e.senderId||"?").charAt(0).toUpperCase()})}),jsxRuntime.jsxs("div",{className:l("relative max-w-[75%] sm:max-w-[60%] transition-all duration-300",h&&"scale-95 opacity-80"),children:[jsxRuntime.jsx(Hn,{preset:"spring",children:jsxRuntime.jsxs("div",{className:l("relative p-3 rounded-2xl shadow-sm backdrop-blur-md border",t?"bg-blue-600/90 dark:bg-blue-500/20 text-white border-blue-500/20 rounded-tr-none":"bg-white/80 dark:bg-white/[0.05] text-gray-900 dark:text-white border-white/10 rounded-tl-none","hover:shadow-lg hover:shadow-blue-500/5 transition-shadow"),children:[!t&&e.remoteJid?.endsWith("@g.us")&&e.contact?.name&&jsxRuntime.jsx("p",{className:"text-[11px] font-bold text-blue-500 dark:text-blue-400 mb-1 truncate",children:e.contact.name}),w(),jsxRuntime.jsxs("div",{className:"flex items-center justify-end gap-1 mt-1 opacity-60 text-[10px]",children:[jsxRuntime.jsx("span",{children:new Date(e.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),f()]}),e.reactions&&Object.keys(e.reactions).length>0&&jsxRuntime.jsx("div",{className:"absolute -bottom-3 right-2 flex -space-x-1",children:Object.entries(e.reactions).map(([v,y])=>jsxRuntime.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-white/10 rounded-full px-1.5 py-0.5 text-xs shadow-sm animate-in zoom-in-50",title:y.join(", "),children:v},v))})]})}),jsxRuntime.jsxs("div",{className:l("absolute top-0 opacity-0 group-hover/bubble:opacity-100 transition-opacity flex items-center gap-1",t?"right-full mr-2":"left-full ml-2"),children:[jsxRuntime.jsxs(at,{children:[jsxRuntime.jsx(nt,{className:"p-1.5 rounded-full hover:bg-gray-100 dark:hover:bg-white/10 text-gray-400 transition-colors",children:jsxRuntime.jsx(lucideReact.Smile,{className:"h-4 w-4"})}),jsxRuntime.jsx(st,{side:"top",className:"flex gap-1 p-1",children:["\u{1F44D}","\u2764\uFE0F","\u{1F602}","\u{1F62E}","\u{1F622}","\u{1F64F}"].map(v=>jsxRuntime.jsx("button",{onClick:()=>s?.(v),className:"p-1.5 hover:bg-gray-100 dark:hover:bg-white/10 rounded-lg transition-transform hover:scale-125",children:v},v))})]}),jsxRuntime.jsxs(at,{children:[jsxRuntime.jsx(nt,{className:"p-1.5 rounded-full hover:bg-gray-100 dark:hover:bg-white/10 text-gray-400 transition-colors",children:jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:"h-4 w-4"})}),jsxRuntime.jsxs(st,{align:t?"end":"start",children:[jsxRuntime.jsxs(V,{onClick:a,children:[jsxRuntime.jsx(lucideReact.Reply,{className:"h-4 w-4 mr-2"})," Reply"]}),jsxRuntime.jsxs(V,{onClick:m,children:[jsxRuntime.jsx(lucideReact.Copy,{className:"h-4 w-4 mr-2"})," Copy"]}),jsxRuntime.jsxs(V,{onClick:d,children:[jsxRuntime.jsx(lucideReact.Forward,{className:"h-4 w-4 mr-2"})," Forward"]}),jsxRuntime.jsxs(V,{onClick:u,children:[jsxRuntime.jsx(lucideReact.Pin,{className:"h-4 w-4 mr-2"})," Pin"]}),jsxRuntime.jsxs(V,{onClick:()=>p?.(true),children:[jsxRuntime.jsx(lucideReact.Star,{className:"h-4 w-4 mr-2"})," Star"]}),t&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(V,{onClick:c,children:[jsxRuntime.jsx(lucideReact.Edit2,{className:"h-4 w-4 mr-2"})," Edit"]}),jsxRuntime.jsxs(V,{className:"text-red-500",onClick:i,children:[jsxRuntime.jsx(lucideReact.Trash2,{className:"h-4 w-4 mr-2"})," Delete"]})]})]})]})]})]})]})}function HL({messages:e,currentUserId:t,className:r,onReply:o,onReact:n,onDelete:a,onEdit:s,onForward:i,onCopy:c,onPin:d,onStar:m,onSelect:u,onAction:p,onImageClick:g,onLoadMore:b,hasMore:x,isLoadingMore:h,selectedMessages:f=[],dateFormat:w="MMMM d, yyyy",groupByDate:v=true,...y}){let[k,N]=we.useState(true),C=we.useRef(null),T=we.useRef(null),E=we.useCallback((M="auto")=>{T.current?.scrollIntoView({behavior:M});},[]);we.useEffect(()=>{k&&E("smooth");},[e.length,k,E]);let A=M=>{let S=M.currentTarget,I=Math.abs(S.scrollHeight-S.clientHeight-S.scrollTop)<100;N(I),S.scrollTop===0&&x&&!h&&b&&b();};return e.length===0&&!h?jsxRuntime.jsx("div",{className:l("flex-1 flex items-center justify-center p-8 text-center text-gray-500 dark:text-white/40",r),...y,children:jsxRuntime.jsxs("div",{className:"max-w-sm space-y-4",children:[jsxRuntime.jsx("div",{className:"w-24 h-24 bg-blue-500/10 dark:bg-white/[0.03] rounded-full flex items-center justify-center mx-auto mb-6 animate-pulse",children:jsxRuntime.jsx(lucideReact.MessageSquare,{className:"h-12 w-12 text-blue-500"})}),jsxRuntime.jsx("h3",{className:"text-xl font-medium text-gray-900 dark:text-white",children:"No messages yet"}),jsxRuntime.jsx("p",{children:"Start the conversation by sending a message below."})]})}):jsxRuntime.jsxs("div",{className:l("flex-1 relative overflow-hidden",r),...y,children:[jsxRuntime.jsx("div",{ref:C,onScroll:A,className:"h-full overflow-y-auto p-4 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:bg-white/10 [&::-webkit-scrollbar-thumb]:rounded-full hover:[&::-webkit-scrollbar-thumb]:bg-white/20 [&::-webkit-scrollbar-track]:bg-transparent",children:jsxRuntime.jsxs("div",{className:"flex flex-col gap-4",children:[e.map((M,S)=>{let I=M.senderId===t,B=S>0?e[S-1]:null,R=!I&&(!B||B.senderId!==M.senderId);return jsxRuntime.jsx(ti,{message:M,isOwn:I,showAvatar:R,onReply:()=>o?.(M),onReact:K=>n?.(M,K),onDelete:()=>a?.(M),onEdit:()=>s?.(M),onForward:()=>i?.(M),onCopy:()=>c?.(M),onPin:()=>d?.(M),onStar:K=>m?.(M,K),onSelect:()=>u?.(M),onAction:K=>p?.(M,K),onImageClick:g,isSelected:f.includes(M.id)},M.id)}),jsxRuntime.jsx("div",{ref:T})]})}),!k&&jsxRuntime.jsx("button",{onClick:()=>E("smooth"),className:"absolute bottom-6 right-6 p-3 rounded-full bg-white dark:bg-white/10 backdrop-blur border border-gray-200 dark:border-white/10 shadow-lg text-gray-600 dark:text-white hover:scale-110 transition-all z-10",children:jsxRuntime.jsx(lucideReact.ArrowDown,{className:"h-5 w-5"})})]})}function oi(){let[e,t]=we.useState(false),[r,o]=we.useState(0),[n,a]=we.useState(null),[s,i]=we.useState(null),c=we.useRef(null),d=we.useRef(null),m=we.useRef([]),u=we.useCallback(async()=>{try{let x=await navigator.mediaDevices.getUserMedia({audio:!0}),h=MediaRecorder.isTypeSupported("audio/ogg; codecs=opus")?"audio/ogg; codecs=opus":"audio/webm";c.current=new MediaRecorder(x,{mimeType:h}),m.current=[],c.current.ondataavailable=f=>{f.data.size>0&&m.current.push(f.data);},c.current.onstop=()=>{let f=new Blob(m.current,{type:h}),w=URL.createObjectURL(f);a(f),i(w),x.getTracks().forEach(v=>v.stop());},c.current.start(),t(!0),o(0),d.current=window.setInterval(()=>{o(f=>f+1);},1e3);}catch(x){throw console.error("Failed to start recording",x),x}},[]),p=we.useCallback(()=>{c.current&&e&&(c.current.stop(),t(false),d.current&&clearInterval(d.current));},[e]),g=we.useCallback(()=>{c.current&&e&&(c.current.stop(),t(false),d.current&&clearInterval(d.current),a(null),i(null),o(0));},[e]),b=we.useCallback(()=>{a(null),i(null),o(0);},[]);return {isRecording:e,duration:r,audioBlob:n,audioUrl:s,startRecording:u,stopRecording:p,cancelRecording:g,clearAudio:b}}function ai({onSend:e,onCancel:t,className:r,...o}){let{isRecording:n,duration:a,audioBlob:s,startRecording:i,stopRecording:c,cancelRecording:d}=oi();we.useEffect(()=>(i(),()=>d()),[]);let m=u=>{let p=Math.floor(u/60),g=u%60;return `${p}:${g.toString().padStart(2,"0")}`};return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3 p-2 rounded-2xl bg-gray-100 dark:bg-white/[0.03] border border-gray-200 dark:border-white/10 animate-in slide-in-from-bottom-2",r),...o,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-xl bg-red-500/10 text-red-500",children:[jsxRuntime.jsx("div",{className:"w-2 h-2 rounded-full bg-red-500 animate-pulse"}),jsxRuntime.jsx("span",{className:"text-sm font-mono font-bold",children:m(a)})]}),jsxRuntime.jsx("div",{className:"flex-1 h-8 flex items-center gap-0.5 px-2",children:[...Array(20)].map((u,p)=>jsxRuntime.jsx("div",{className:"w-1 bg-red-500/40 rounded-full transition-all duration-150",style:{height:n?`${20+Math.random()*80}%`:"20%",animationDelay:`${p*.05}s`}},p))}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("button",{onClick:()=>{d(),t();},className:"p-2 rounded-full hover:bg-gray-200 dark:hover:bg-white/10 text-gray-500 transition-colors",children:jsxRuntime.jsx(lucideReact.Trash2,{className:"h-5 w-5"})}),n?jsxRuntime.jsx(L,{size:"icon",variant:"ghost",onClick:c,className:"rounded-full bg-red-500 text-white hover:bg-red-600",children:jsxRuntime.jsx(lucideReact.Square,{className:"h-4 w-4 fill-current"})}):jsxRuntime.jsx(L,{size:"icon",onClick:()=>s&&e(s,a),className:"rounded-full bg-blue-500 text-white hover:bg-blue-600",children:jsxRuntime.jsx(lucideReact.Send,{className:"h-4 w-4"})})]})]})}function rP({value:e,onValueChange:t,onSend:r,onChange:o,onAttach:n,onMic:a,onVoiceEnd:s,onEmoji:i,onGif:c,onLocation:d,onContact:m,onPoll:u,onPix:p,onCarousel:g,onButtons:b,onList:x,onCancelReply:h,placeholder:f="Type a message...",users:w=[],replyingTo:v,isRecording:y,maxLength:k,disabled:N,className:C,...T}){let[E,A]=we.useState(""),M=e!==void 0?e:E,S=P=>{t?t(P):A(P);},[I,B]=we.useState(false),[R,K]=we.useState(null),[me,Z]=we.useState(0),te=we.useRef(null),Le=we.useMemo(()=>R===null?[]:w.filter(P=>P.name.toLowerCase().includes(R.toLowerCase())).slice(0,5),[w,R]),wt=P=>{if(N)return;let H=P.target.value;if(k&&H.length>k)return;S(H),o?.(H);H[P.target.selectionStart-1];let Je=H.slice(0,P.target.selectionStart).match(/@(\w*)$/);Je?(K(Je[1]||""),Z(0)):K(null),te.current&&(te.current.style.height="auto",te.current.style.height=`${Math.min(te.current.scrollHeight,120)}px`);},Kr=P=>{if(!te.current)return;let H=te.current.selectionStart,O=M.slice(0,H).replace(/@\w*$/,`@${P.name} `),re=M.slice(H);S(O+re),K(null),te.current.focus();},Y=P=>{if(!N){if(R!==null&&Le.length>0){P.key==="ArrowDown"?(P.preventDefault(),Z(H=>(H+1)%Le.length)):P.key==="ArrowUp"?(P.preventDefault(),Z(H=>(H-1+Le.length)%Le.length)):P.key==="Enter"||P.key==="Tab"?(P.preventDefault(),Kr(Le[me])):P.key==="Escape"&&K(null);return}P.key==="Enter"&&!P.shiftKey&&(P.preventDefault(),_());}},_=()=>{N||!M.trim()&&!y||(r?.(M),S(""),te.current&&(te.current.style.height="auto"));};return jsxRuntime.jsxs("div",{className:l("p-4 bg-white/80 dark:bg-black/40 backdrop-blur border-t border-gray-200 dark:border-white/10 relative",C),...T,children:[R!==null&&Le.length>0&&jsxRuntime.jsx("div",{className:"absolute bottom-full left-4 mb-2 w-64 bg-white dark:bg-gray-900 border border-gray-200 dark:border-white/10 rounded-2xl shadow-2xl overflow-hidden animate-in slide-in-from-bottom-4",children:Le.map((P,H)=>jsxRuntime.jsxs("button",{onClick:()=>Kr(P),className:l("w-full flex items-center gap-3 p-3 text-left transition-colors",H===me?"bg-blue-500/10 dark:bg-white/10":"hover:bg-gray-50 dark:hover:bg-white/5"),children:[jsxRuntime.jsx($,{src:P.avatar,alt:P.name,className:"w-8 h-8"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-sm font-bold dark:text-white",children:P.name}),jsxRuntime.jsxs("p",{className:"text-xs text-gray-500 dark:text-white/40",children:["@",P.name.toLowerCase().replace(/\s/g,"")]})]})]},P.id))}),v&&jsxRuntime.jsxs("div",{className:"mb-3 flex items-center justify-between p-3 rounded-2xl bg-blue-500/5 border-l-4 border-blue-500 animate-in slide-in-from-bottom-2",children:[jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-xs font-bold text-blue-500",children:"Replying to"}),jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-white/60 truncate",children:v.content})]}),jsxRuntime.jsx("button",{onClick:h,className:"p-1.5 rounded-full hover:bg-gray-200 dark:hover:bg-white/10 text-gray-400",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}),jsxRuntime.jsxs("div",{className:"flex items-end gap-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[jsxRuntime.jsxs(at,{children:[jsxRuntime.jsx(nt,{disabled:N,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50 transition-colors disabled:opacity-50",children:jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-5 w-5"})}),jsxRuntime.jsxs(st,{align:"start",side:"top",children:[jsxRuntime.jsxs(V,{onClick:n,children:[jsxRuntime.jsx(lucideReact.Image,{className:"h-4 w-4 mr-2"})," Image & Video"]}),jsxRuntime.jsxs(V,{onClick:n,children:[jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-4 w-4 mr-2"})," Document"]}),jsxRuntime.jsxs(V,{onClick:d,children:[jsxRuntime.jsx(lucideReact.MapPin,{className:"h-4 w-4 mr-2"})," Location"]}),jsxRuntime.jsxs(V,{onClick:m,children:[jsxRuntime.jsx(lucideReact.AtSign,{className:"h-4 w-4 mr-2"})," Contact"]}),jsxRuntime.jsxs(V,{onClick:u,children:[jsxRuntime.jsx(lucideReact.AtSign,{className:"h-4 w-4 mr-2"})," Poll"]}),jsxRuntime.jsxs(V,{onClick:p,children:[jsxRuntime.jsx(lucideReact.AtSign,{className:"h-4 w-4 mr-2"})," PIX"]}),jsxRuntime.jsxs(V,{onClick:g,children:[jsxRuntime.jsx(lucideReact.Layout,{className:"h-4 w-4 mr-2"})," Carousel"]}),jsxRuntime.jsxs(V,{onClick:b,children:[jsxRuntime.jsx(lucideReact.Layout,{className:"h-4 w-4 mr-2"})," Buttons"]}),jsxRuntime.jsxs(V,{onClick:x,children:[jsxRuntime.jsx(lucideReact.List,{className:"h-4 w-4 mr-2"})," List Menu"]}),jsxRuntime.jsxs(V,{onClick:c,children:[jsxRuntime.jsx(lucideReact.Gift,{className:"h-4 w-4 mr-2"})," GIF"]})]})]}),jsxRuntime.jsx("button",{onClick:i,disabled:N,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50 transition-colors disabled:opacity-50",children:jsxRuntime.jsx(lucideReact.Smile,{className:"h-5 w-5"})})]}),jsxRuntime.jsx("div",{className:"flex-1 relative",children:y?jsxRuntime.jsx(ai,{onSend:(P,H)=>s?.(P,H),onCancel:()=>h?.()}):jsxRuntime.jsx("textarea",{ref:te,value:M,onChange:wt,onKeyDown:Y,placeholder:f,disabled:N,rows:1,className:"w-full p-2.5 max-h-[120px] rounded-2xl bg-gray-100 dark:bg-white/[0.03] border border-transparent focus:border-blue-500/50 focus:bg-white dark:focus:bg-white/[0.06] text-sm resize-none transition-all outline-none dark:text-white placeholder:text-gray-400"})}),jsxRuntime.jsx("div",{className:"flex items-center gap-1 mb-1",children:M.trim()||y?jsxRuntime.jsx("button",{onClick:_,disabled:N,className:"p-2.5 rounded-full bg-blue-500 text-white hover:bg-blue-600 shadow-lg shadow-blue-500/20 transition-all active:scale-90",children:jsxRuntime.jsx(lucideReact.Send,{className:"h-5 w-5"})}):jsxRuntime.jsx("button",{onClick:a,disabled:N,className:"p-2.5 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50 transition-colors disabled:opacity-50",children:jsxRuntime.jsx(lucideReact.Mic,{className:"h-5 w-5"})})})]})]})}function pP({user:e,onClose:t,className:r,...o}){return jsxRuntime.jsxs("div",{className:l("w-80 border-l border-gray-200 dark:border-white/10 bg-white dark:bg-black/20 flex flex-col",r),...o,children:[jsxRuntime.jsxs("div",{className:"h-16 flex items-center px-4 border-b border-gray-200 dark:border-white/10",children:[jsxRuntime.jsx("button",{onClick:t,className:"p-2 -ml-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5 text-gray-500"})}),jsxRuntime.jsx("span",{className:"ml-2 font-semibold text-gray-900 dark:text-white",children:"Contact Info"})]}),jsxRuntime.jsxs(it,{className:"flex-1",children:[jsxRuntime.jsxs("div",{className:"p-6 flex flex-col items-center text-center",children:[jsxRuntime.jsx($,{src:e.avatar,alt:e.name,fallback:e.name[0],className:"h-24 w-24 mb-4 text-2xl"}),jsxRuntime.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:e.name}),jsxRuntime.jsx("p",{className:"text-sm text-gray-500 dark:text-white/50 mt-1",children:e.phone||"+1 (555) 000-0000"}),jsxRuntime.jsxs("div",{className:"mt-6 w-full",children:[jsxRuntime.jsx("p",{className:"text-sm text-gray-500 dark:text-white/50 mb-1 text-left",children:"About"}),jsxRuntime.jsx("p",{className:"text-sm text-gray-900 dark:text-white text-left",children:e.bio||"Hey there! I am using Pixon Chat."})]})]}),jsxRuntime.jsx(Sr,{}),jsxRuntime.jsxs("div",{className:"p-4 space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-xs font-semibold text-gray-500 dark:text-white/40 uppercase tracking-wider",children:"Media & Docs"}),jsxRuntime.jsx("div",{className:"grid grid-cols-3 gap-2",children:[1,2,3,4,5,6].map(n=>jsxRuntime.jsxs("div",{className:"aspect-square rounded-2xl bg-gray-100 dark:bg-white/[0.03] overflow-hidden relative group cursor-pointer",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-gray-400",children:jsxRuntime.jsx(lucideReact.Image,{className:"h-6 w-6"})}),jsxRuntime.jsx("div",{className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity"})]},n))})]}),jsxRuntime.jsx(Sr,{}),jsxRuntime.jsx("div",{className:"p-4 space-y-4",children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 text-gray-700 dark:text-white/80",children:[jsxRuntime.jsx(lucideReact.Bell,{className:"h-5 w-5"}),jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"Mute Notifications"})]}),jsxRuntime.jsx(Eo,{})]})}),jsxRuntime.jsx(Sr,{}),jsxRuntime.jsxs("div",{className:"p-4 space-y-2",children:[jsxRuntime.jsxs("button",{className:"w-full flex items-center gap-3 p-3 rounded-2xl hover:bg-red-50 dark:hover:bg-red-500/10 text-red-600 dark:text-red-400 transition-colors text-sm font-medium",children:[jsxRuntime.jsx(lucideReact.Ban,{className:"h-5 w-5"}),"Block ",e.name]}),jsxRuntime.jsxs("button",{className:"w-full flex items-center gap-3 p-3 rounded-2xl hover:bg-red-50 dark:hover:bg-red-500/10 text-red-600 dark:text-red-400 transition-colors text-sm font-medium",children:[jsxRuntime.jsx(lucideReact.Trash2,{className:"h-5 w-5"}),"Delete Chat"]})]})]})]})}function bP({users:e=[],variant:t="default",className:r,...o}){let n=e.length===0?"Someone is typing":e.length===1?`${e[0]} is typing`:e.length===2?`${e[0]} and ${e[1]} are typing`:`${e[0]} and ${e.length-1} others are typing`;return t==="bubble"?jsxRuntime.jsx("div",{className:l("flex items-center gap-1 px-3 py-2 rounded-2xl bg-gray-100 dark:bg-white/[0.03] w-fit",r),...o,children:jsxRuntime.jsxs("div",{className:"flex gap-1",children:[jsxRuntime.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-400 animate-bounce [animation-delay:-0.3s]"}),jsxRuntime.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-400 animate-bounce [animation-delay:-0.15s]"}),jsxRuntime.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-400 animate-bounce"})]})}):jsxRuntime.jsxs("div",{className:l("flex items-center gap-2 text-xs text-gray-500 dark:text-white/40 italic",r),...o,children:[jsxRuntime.jsxs("div",{className:"flex gap-0.5",children:[jsxRuntime.jsx("span",{className:"w-1 h-1 rounded-full bg-current animate-bounce [animation-delay:-0.3s]"}),jsxRuntime.jsx("span",{className:"w-1 h-1 rounded-full bg-current animate-bounce [animation-delay:-0.15s]"}),jsxRuntime.jsx("span",{className:"w-1 h-1 rounded-full bg-current animate-bounce"})]}),n]})}function kP({message:e,onCancel:t,className:r,...o}){return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3 p-2 rounded-xl bg-blue-500/5 border-l-4 border-blue-500 animate-in slide-in-from-bottom-2",r),...o,children:[jsxRuntime.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/10 text-blue-500",children:jsxRuntime.jsx(lucideReact.Reply,{className:"h-4 w-4"})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-xs font-bold text-blue-500",children:"Replying to"}),jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-white/60 truncate",children:e.content})]}),t&&jsxRuntime.jsx("button",{onClick:t,className:"p-1 rounded-full hover:bg-gray-200 dark:hover:bg-white/10 text-gray-400 transition-colors",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})}function RP({type:e="info",message:t,action:r,onClose:o,className:n,...a}){let s={info:lucideReact.Info,warning:lucideReact.AlertCircle,error:lucideReact.AlertCircle,success:lucideReact.CheckCircle2},i={info:"bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/20",warning:"bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/20",error:"bg-red-500/10 text-red-600 dark:text-red-400 border-red-500/20",success:"bg-green-500/10 text-green-600 dark:text-green-400 border-green-500/20"},c=s[e];return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3 px-4 py-2 border-b text-sm animate-in slide-in-from-top duration-300",i[e],n),...a,children:[jsxRuntime.jsx(c,{className:"h-4 w-4 shrink-0"}),jsxRuntime.jsx("p",{className:"flex-1 font-medium",children:t}),r&&jsxRuntime.jsx("button",{onClick:r.onClick,className:"text-xs font-bold uppercase tracking-wider hover:underline",children:r.label}),o&&jsxRuntime.jsx("button",{onClick:o,className:"p-1 rounded-full hover:bg-black/5 dark:hover:bg-white/5 transition-colors",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})}function DP({date:e,className:t,...r}){return jsxRuntime.jsx("div",{className:l("flex justify-center sticky top-0 z-10 py-4",t),...r,children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2 px-3 py-1 rounded-full bg-gray-100/80 dark:bg-white/5 backdrop-blur text-[10px] font-bold uppercase tracking-wider text-gray-500 dark:text-white/40 border border-gray-200 dark:border-white/10 shadow-sm",children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-3 w-3"}),e]})})}function BP({status:e="offline",size:t="md",className:r,...o}){let n={online:"bg-green-500",offline:"bg-gray-400",away:"bg-amber-500",busy:"bg-red-500"},a={sm:"h-2 w-2",md:"h-3 w-3",lg:"h-4 w-4"};return jsxRuntime.jsx("span",{className:l("rounded-full border-2 border-white dark:border-black shrink-0",n[e],a[t],e==="online"&&"animate-pulse",r),...o})}function KP({content:e,className:t,...r}){return jsxRuntime.jsx("div",{className:l("flex justify-center py-2",t),...r,children:jsxRuntime.jsx("div",{className:"px-4 py-1 rounded-lg bg-gray-100/50 dark:bg-white/[0.02] text-[11px] font-medium text-gray-500 dark:text-white/30 border border-gray-200/50 dark:border-white/5",children:e})})}function XP({group:e,onBack:t,onInfo:r,isTyping:o,typingUsers:n=[],className:a,...s}){let i=n.length>0?`${n.join(", ")} ${n.length===1?"is":"are"} typing...`:"typing...";return jsxRuntime.jsxs("div",{className:l("flex h-16 items-center justify-between border-b border-gray-200 dark:border-white/10 bg-white/80 dark:bg-black/40 backdrop-blur px-4 sticky top-0 z-10",a),...s,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[t&&jsxRuntime.jsx("button",{onClick:t,className:"md:hidden p-2 -ml-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.ArrowLeft,{className:"h-5 w-5 text-gray-600 dark:text-white/70"})}),jsxRuntime.jsx("div",{className:"relative cursor-pointer",onClick:r,children:jsxRuntime.jsxs("div",{className:"flex -space-x-3",children:[e.members.slice(0,2).map((c,d)=>jsxRuntime.jsx($,{src:c.avatar,alt:c.name,fallback:c.name[0],className:l("border-2 border-white dark:border-black",d===0?"z-10":"z-0")},c.id)),e.members.length>2&&jsxRuntime.jsxs("div",{className:"w-10 h-10 rounded-full bg-gray-200 dark:bg-white/10 border-2 border-white dark:border-black flex items-center justify-center text-[10px] font-bold text-gray-600 dark:text-white/60 z-0",children:["+",e.members.length-2]})]})}),jsxRuntime.jsxs("div",{className:"cursor-pointer min-w-0",onClick:r,children:[jsxRuntime.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white leading-none truncate",children:e.name}),jsxRuntime.jsx("p",{className:l("text-xs mt-1 truncate transition-colors",o?"text-blue-500 font-medium animate-pulse":"text-gray-500 dark:text-white/50"),children:o?i:`${e.members.length} members`})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("button",{className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Phone,{className:"h-5 w-5"})}),jsxRuntime.jsx("button",{className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Video,{className:"h-5 w-5"})}),jsxRuntime.jsx("button",{onClick:r,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.MoreVertical,{className:"h-5 w-5"})})]})]})}function ZP({users:e,selectedIndex:t,onSelect:r,className:o,...n}){return e.length===0?null:jsxRuntime.jsx(ie,{className:l("w-64 overflow-hidden shadow-xl animate-in fade-in slide-in-from-bottom-2",o),...n,children:jsxRuntime.jsxs("div",{className:"p-1",children:[jsxRuntime.jsx("div",{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-wider text-gray-400 border-b border-gray-200 dark:border-white/5 mb-1",children:"Mention someone"}),e.map((a,s)=>jsxRuntime.jsxs("button",{onClick:()=>r(a),className:l("w-full flex items-center gap-2 p-2 rounded-xl text-left transition-colors",s===t?"bg-blue-500 text-white":"hover:bg-gray-100 dark:hover:bg-white/[0.06]"),children:[jsxRuntime.jsx($,{src:a.avatar,alt:a.name,fallback:a.name[0],size:"sm"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium truncate",children:a.name}),a.status&&jsxRuntime.jsx("p",{className:l("text-[10px]",s===t?"text-white/70":"text-gray-500"),children:a.status})]})]},a.id))]})})}var rg=[{name:"Smileys",emojis:["\u{1F600}","\u{1F603}","\u{1F604}","\u{1F601}","\u{1F606}","\u{1F605}","\u{1F602}","\u{1F923}","\u{1F60A}","\u{1F607}","\u{1F642}","\u{1F643}","\u{1F609}","\u{1F60C}","\u{1F60D}","\u{1F970}","\u{1F618}","\u{1F617}","\u{1F619}","\u{1F61A}","\u{1F60B}","\u{1F61B}","\u{1F61D}","\u{1F61C}","\u{1F92A}","\u{1F928}","\u{1F9D0}","\u{1F913}","\u{1F60E}","\u{1F929}","\u{1F973}","\u{1F60F}","\u{1F612}","\u{1F61E}","\u{1F614}","\u{1F61F}","\u{1F615}","\u{1F641}","\u2639\uFE0F","\u{1F623}","\u{1F616}","\u{1F62B}","\u{1F629}","\u{1F97A}","\u{1F622}","\u{1F62D}","\u{1F624}","\u{1F620}","\u{1F621}","\u{1F92C}","\u{1F92F}","\u{1F633}","\u{1F975}","\u{1F976}","\u{1F631}","\u{1F628}","\u{1F630}","\u{1F625}","\u{1F613}","\u{1F917}","\u{1F914}","\u{1F92D}","\u{1F92B}","\u{1F925}","\u{1F636}","\u{1F610}","\u{1F611}","\u{1F62C}","\u{1F644}","\u{1F62F}","\u{1F626}","\u{1F627}","\u{1F62E}","\u{1F632}","\u{1F971}","\u{1F634}","\u{1F924}","\u{1F62A}","\u{1F635}","\u{1F910}","\u{1F974}","\u{1F922}","\u{1F92E}","\u{1F927}","\u{1F637}","\u{1F912}","\u{1F915}"]},{name:"Hearts",emojis:["\u2764\uFE0F","\u{1F9E1}","\u{1F49B}","\u{1F49A}","\u{1F499}","\u{1F49C}","\u{1F5A4}","\u{1F90D}","\u{1F90E}","\u{1F494}","\u2763\uFE0F","\u{1F495}","\u{1F49E}","\u{1F493}","\u{1F497}","\u{1F496}","\u{1F498}","\u{1F49D}","\u{1F49F}"]},{name:"Gestures",emojis:["\u{1F44D}","\u{1F44E}","\u{1F44C}","\u{1F90C}","\u{1F90F}","\u270C\uFE0F","\u{1F91E}","\u{1F91F}","\u{1F918}","\u{1F919}","\u{1F448}","\u{1F449}","\u{1F446}","\u{1F595}","\u{1F447}","\u261D\uFE0F","\u270A","\u{1F44A}","\u{1F91B}","\u{1F91C}","\u{1F44F}","\u{1F64C}","\u{1F450}","\u{1F932}","\u{1F91D}","\u{1F64F}","\u270D\uFE0F","\u{1F485}","\u{1F933}","\u{1F4AA}","\u{1F9BE}","\u{1F9B5}","\u{1F9BF}","\u{1F9B6}","\u{1F463}","\u{1F442}","\u{1F9BB}","\u{1F443}","\u{1F9E0}","\u{1FAC0}","\u{1FAC1}","\u{1F9B7}","\u{1F9B4}","\u{1F440}","\u{1F441}\uFE0F","\u{1F445}","\u{1F444}"]},{name:"Activities",emojis:["\u26BD","\u{1F3C0}","\u{1F3C8}","\u26BE","\u{1F94E}","\u{1F3BE}","\u{1F3D0}","\u{1F3C9}","\u{1F94F}","\u{1F3B1}","\u{1FA80}","\u{1F3D3}","\u{1F3F8}","\u{1F3D2}","\u{1F3D1}","\u{1F94D}","\u{1F3CF}","\u{1FA83}","\u{1F945}","\u26F3","\u{1FA81}","\u{1F3F9}","\u{1F3A3}","\u{1F93F}","\u{1F94A}","\u{1F94B}","\u{1F3BD}","\u{1F6F9}","\u{1F6FC}","\u{1F6F7}","\u26F8\uFE0F","\u{1F3BF}","\u26F7\uFE0F","\u{1F3C2}","\u{1FA82}","\u{1F3CB}\uFE0F","\u{1F93C}","\u{1F938}","\u26F9\uFE0F","\u{1F93A}","\u{1F93E}","\u{1F3CC}\uFE0F","\u{1F3C7}","\u{1F9D8}","\u{1F3C4}","\u{1F3CA}","\u{1F93D}","\u{1F6A3}","\u{1F9D7}","\u{1F6B5}","\u{1F6B4}"]},{name:"Nature",emojis:["\u{1F436}","\u{1F431}","\u{1F42D}","\u{1F439}","\u{1F430}","\u{1F98A}","\u{1F43B}","\u{1F43C}","\u{1F43B}\u200D\u2744\uFE0F","\u{1F428}","\u{1F42F}","\u{1F981}","\u{1F42E}","\u{1F437}","\u{1F43D}","\u{1F438}","\u{1F435}","\u{1F648}","\u{1F649}","\u{1F64A}","\u{1F412}","\u{1F414}","\u{1F427}","\u{1F426}","\u{1F424}","\u{1F423}","\u{1F425}","\u{1F986}","\u{1F985}","\u{1F989}","\u{1F987}","\u{1F43A}","\u{1F417}","\u{1F434}","\u{1F984}","\u{1F41D}","\u{1FAB1}","\u{1F41B}","\u{1F98B}","\u{1F40C}","\u{1F41E}","\u{1F41C}","\u{1F99F}","\u{1FAB0}","\u{1FAB2}","\u{1FAB3}","\u{1F997}","\u{1F577}\uFE0F","\u{1F578}\uFE0F","\u{1F982}","\u{1F422}","\u{1F40D}","\u{1F98E}","\u{1F996}","\u{1F995}","\u{1F419}","\u{1F991}","\u{1F990}","\u{1F99E}","\u{1F980}","\u{1F421}","\u{1F420}","\u{1F41F}","\u{1F42C}","\u{1F433}","\u{1F40B}","\u{1F988}","\u{1F40A}","\u{1F405}","\u{1F406}","\u{1F993}","\u{1F98D}","\u{1F9A7}","\u{1F9A3}","\u{1F418}","\u{1F99B}","\u{1F98F}","\u{1F42A}","\u{1F42B}","\u{1F992}","\u{1F998}","\u{1F9AC}","\u{1F403}","\u{1F402}","\u{1F404}","\u{1F40E}","\u{1F416}","\u{1F40F}","\u{1F411}","\u{1F410}","\u{1F98C}","\u{1F415}","\u{1F429}","\u{1F9AE}","\u{1F415}\u200D\u{1F9BA}","\u{1F408}","\u{1F408}\u200D\u2B1B","\u{1F413}","\u{1F983}","\u{1F99A}","\u{1F99C}","\u{1F9A2}","\u{1F9A9}","\u{1F54A}\uFE0F","\u{1F407}","\u{1F99D}","\u{1F9A8}","\u{1F9A1}","\u{1F9AB}","\u{1F9A6}","\u{1F9A5}","\u{1F401}","\u{1F400}","\u{1F43F}\uFE0F","\u{1F994}","\u{1F43E}","\u{1F409}","\u{1F432}","\u{1F335}","\u{1F384}","\u{1F332}","\u{1F333}","\u{1F334}","\u{1FAB5}","\u{1F331}","\u{1F33F}","\u2618\uFE0F","\u{1F340}","\u{1F38D}","\u{1FAB4}","\u{1F38B}","\u{1F343}","\u{1F342}","\u{1F341}","\u{1F344}","\u{1F41A}","\u{1FAA8}","\u{1F33E}","\u{1F490}","\u{1F337}","\u{1F339}","\u{1F940}","\u{1F33A}","\u{1F338}","\u{1F33C}","\u{1F33B}","\u{1F31E}","\u{1F31D}","\u{1F31B}","\u{1F31C}","\u{1F31A}","\u{1F315}","\u{1F316}","\u{1F317}","\u{1F318}","\u{1F311}","\u{1F312}","\u{1F313}","\u{1F314}","\u{1F319}","\u{1F30E}","\u{1F30D}","\u{1F30F}","\u{1FA90}","\u{1F4AB}","\u2B50\uFE0F","\u{1F31F}","\u2728","\u26A1\uFE0F","\u2604\uFE0F","\u{1F4A5}","\u{1F525}","\u{1F32A}\uFE0F","\u{1F308}","\u2600\uFE0F","\u{1F324}\uFE0F","\u26C5\uFE0F","\u{1F325}\uFE0F","\u2601\uFE0F","\u{1F326}\uFE0F","\u{1F327}\uFE0F","\u26C8\uFE0F","\u{1F329}\uFE0F","\u{1F328}\uFE0F","\u2744\uFE0F","\u2603\uFE0F","\u26C4\uFE0F","\u{1F32C}\uFE0F","\u{1F4A8}","\u{1F4A7}","\u{1F4A6}","\u2614\uFE0F","\u2602\uFE0F","\u{1F30A}","\u{1F32B}\uFE0F"]}];function iE({onSelect:e,className:t,...r}){let[o,n]=we.useState(""),a=rg.map(s=>({...s,emojis:s.emojis.filter(i=>o===""||i.includes(o))})).filter(s=>s.emojis.length>0);return jsxRuntime.jsxs(ie,{className:l("w-72 h-96 flex flex-col overflow-hidden shadow-2xl",t),...r,children:[jsxRuntime.jsx("div",{className:"p-3 border-b border-gray-200 dark:border-white/10",children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),jsxRuntime.jsx("input",{type:"text",value:o,onChange:s=>n(s.target.value),placeholder:"Search emoji...",className:"w-full h-8 pl-8 pr-3 rounded-lg bg-gray-100 dark:bg-white/5 text-xs focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all"})]})}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto p-2 custom-scrollbar",children:a.map(s=>jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsx("h4",{className:"text-[10px] font-bold uppercase tracking-wider text-gray-400 px-2 mb-2",children:s.name}),jsxRuntime.jsx("div",{className:"grid grid-cols-8 gap-1",children:s.emojis.map(i=>jsxRuntime.jsx("button",{onClick:()=>e(i),className:"h-8 w-8 flex items-center justify-center rounded-lg hover:bg-gray-100 dark:hover:bg-white/10 text-lg transition-colors",children:i},i))})]},s.name))})]})}function hE({onSearch:e,results:t,onResultClick:r,onClose:o,className:n,...a}){let[s,i]=we.useState(""),c=d=>{let m=d.target.value;i(m),e(m);};return jsxRuntime.jsxs("div",{className:l("flex flex-col h-full bg-white dark:bg-gray-900 border-l border-gray-200 dark:border-white/10 animate-in slide-in-from-right duration-300",n),...a,children:[jsxRuntime.jsxs("div",{className:"p-4 border-b border-gray-200 dark:border-white/10 flex items-center justify-between",children:[jsxRuntime.jsx("h3",{className:"font-bold text-gray-900 dark:text-white",children:"Search Messages"}),jsxRuntime.jsx("button",{onClick:o,className:"p-1 rounded-full hover:bg-gray-100 dark:hover:bg-white/10",children:jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5 text-gray-500"})})]}),jsxRuntime.jsx("div",{className:"p-4",children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),jsxRuntime.jsx("input",{type:"text",value:s,onChange:c,placeholder:"Search in conversation...",className:"w-full h-10 pl-10 pr-4 rounded-xl bg-gray-100 dark:bg-white/5 border-none text-sm focus:ring-2 focus:ring-blue-500/50 transition-all",autoFocus:true})]})}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:s&&t.length===0?jsxRuntime.jsx("div",{className:"p-8 text-center text-gray-500 dark:text-white/30",children:jsxRuntime.jsxs("p",{className:"text-sm",children:['No messages found for "',s,'"']})}):jsxRuntime.jsx("div",{className:"space-y-1",children:t.map(d=>jsxRuntime.jsxs("button",{onClick:()=>r(d),className:"w-full p-3 rounded-xl hover:bg-gray-100 dark:hover:bg-white/5 text-left transition-all group",children:[jsxRuntime.jsxs("div",{className:"flex justify-between mb-1",children:[jsxRuntime.jsx("span",{className:"text-[10px] font-bold text-blue-500 uppercase",children:d.timestamp.toLocaleDateString()}),jsxRuntime.jsx("span",{className:"text-[10px] text-gray-400",children:d.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),jsxRuntime.jsx("p",{className:"text-sm text-gray-700 dark:text-white/70 line-clamp-2 group-hover:text-gray-900 dark:group-hover:text-white",children:d.content})]},d.id))})})]})}var Ba=class{constructor(){this.state={conversations:new Map,messages:new Map,activeChatId:null,presence:new Map};this.listeners=new Set;this.getState=()=>this.state;this.subscribe=t=>(this.listeners.add(t),()=>this.listeners.delete(t));}emitChange(t){this.state=t;for(let r of this.listeners)r();}setConversations(t){this.emitChange({...this.state,conversations:new Map(t.map(r=>[r.id,r]))});}upsertConversation(t){let r=new Map(this.state.conversations),o=r.get(t.id);r.set(t.id,{...o||{unreadCount:0},...t}),this.emitChange({...this.state,conversations:r});}setMessages(t,r){let o=new Map(this.state.messages);o.set(t,r),this.emitChange({...this.state,messages:o});}addMessage(t,r){let o=this.state.messages.get(t)||[];if(o.some(i=>i.id===r.id))return;let n=new Map(this.state.messages);n.set(t,[...o,r]);let a={...this.state,messages:n},s=this.state.conversations.get(t);if(s){let i=new Map(this.state.conversations);i.set(t,{...s,lastMessage:r,unreadCount:this.state.activeChatId===t?0:(s.unreadCount||0)+1}),a.conversations=i;}this.emitChange(a);}updateMessageStatus(t,r,o){let n=this.state.messages.get(t);if(!n)return;let a=n.findIndex(s=>s.id===r);if(a!==-1){let s=[...n],i=s[a];if(i){s[a]={...i,status:o};let c=new Map(this.state.messages);c.set(t,s),this.emitChange({...this.state,messages:c});}}}updateMessage(t,r,o){let n=this.state.messages.get(t);if(!n)return;let a=n.findIndex(s=>s.id===r);if(a!==-1){let s=[...n];s[a]={...s[a],...o};let i=new Map(this.state.messages);i.set(t,s),this.emitChange({...this.state,messages:i});}}addReaction(t,r,o,n){let a=this.state.messages.get(t);if(!a)return;let s=a.findIndex(i=>i.id===r);if(s!==-1){let i=[...a],c={...i[s]},d={...c.reactions||{}},m=[...d[o]||[]];if(!m.includes(n)){m.push(n),d[o]=m,c.reactions=d,i[s]=c;let u=new Map(this.state.messages);u.set(t,i),this.emitChange({...this.state,messages:u});}}}removeReaction(t,r,o,n){let a=this.state.messages.get(t);if(!a)return;let s=a.findIndex(i=>i.id===r);if(s!==-1){let i=[...a],c={...i[s]},d={...c.reactions||{}};if(d[o]){d[o]=d[o].filter(u=>u!==n),d[o].length===0&&delete d[o],c.reactions=d,i[s]=c;let m=new Map(this.state.messages);m.set(t,i),this.emitChange({...this.state,messages:m});}}}deleteMessage(t,r){let o=this.state.messages.get(t);if(!o)return;let n=o.findIndex(a=>a.id===r);if(n!==-1){let a=[...o];a[n]={...a[n],type:"revoked",content:"Esta mensagem foi apagada",attachments:[],reactions:{}};let s=new Map(this.state.messages);s.set(t,a),this.emitChange({...this.state,messages:s});}}setActiveChat(t){let r={...this.state,activeChatId:t};if(t){let o=this.state.conversations.get(t);if(o&&o.unreadCount>0){let n=new Map(this.state.conversations);n.set(t,{...o,unreadCount:0}),r.conversations=n;}}this.emitChange(r);}setUserPresence(t,r){let o=new Map(this.state.presence);o.set(t,r),this.emitChange({...this.state,presence:o});}},je=new Ba;function ko(e){let t=we.useSyncExternalStore(je.subscribe,je.getState);return we.useMemo(()=>e(t),[t,e])}var lg=e=>Array.from(e.conversations.values()).sort((t,r)=>{if(t.isPinned&&!r.isPinned)return -1;if(!t.isPinned&&r.isPinned)return 1;let o=t.lastMessage?.timestamp.getTime()||0;return (r.lastMessage?.timestamp.getTime()||0)-o});function wE(){return ko(lg)}function yE(e){let t=we.useCallback(r=>e?r.messages.get(e)||[]:[],[e]);return ko(t)}function kE(){let e=we.useCallback(t=>t.activeChatId?t.conversations.get(t.activeChatId):null,[]);return ko(e)}function NE(e){let t=we.useCallback(r=>r.presence.get(e)||"unavailable",[e]);return ko(t)}function Va({url:e,token:t,rooms:r=[],onConnect:o,onDisconnect:n,onError:a}){let s=we.useRef(null);we.useEffect(()=>{let d=socket_ioClient.io(e,{auth:{token:t},transports:["websocket"],reconnectionAttempts:5,reconnectionDelay:1e3});return s.current=d,d.on("connect",()=>{console.log("Socket connected:",d.id),r.forEach(m=>d.emit("join",m)),o?.();}),d.on("disconnect",m=>{console.log("Socket disconnected:",m),n?.();}),d.on("connect_error",m=>{console.error("Socket connection error:",m),a?.(m);}),()=>{d.disconnect();}},[e,t,r,o,n,a]);let i=we.useCallback((d,m)=>{s.current?.connected?s.current.emit(d,m):console.warn("Socket not connected. Event buffered or dropped:",d);},[]),c=we.useCallback((d,m)=>(s.current?.on(d,m),()=>{s.current?.off(d,m);}),[]);return {socket:s.current,emit:i,on:c,isConnected:s.current?.connected||false}}function DE(e,t){let{on:r,emit:o,isConnected:n}=Va({url:e,token:t});return we.useEffect(()=>{r("chats.set",a=>{je.setConversations(a);}),r("chats.upsert",a=>{a.forEach(s=>je.upsertConversation(s));}),r("chats.update",a=>{a.forEach(s=>{s.id&&je.upsertConversation(s);});}),r("messages.upsert",({chatId:a,messages:s})=>{s.forEach(i=>je.addMessage(a,i));}),r("messages.update",({chatId:a,messageId:s,status:i})=>{je.updateMessageStatus(a,s,i);}),r("presence.update",({userId:a,status:s})=>{je.setUserPresence(a,s);}),r("groups.update",a=>{a.forEach(s=>{je.upsertConversation({id:s.id,group:s});});});},[r]),{isConnected:n,emit:o}}function HE(e,t){let{emit:r}=Va({url:""});return {setPresence:n=>{r("presence.send",{chatId:e,userId:t,status:n});}}}function IE(){return {uploadMedia:async(t,r)=>({url:"...",thumbnail:"...",blurhash:"..."})}}function AE(e){return {search:r=>r?e.filter(o=>o.content.toLowerCase().includes(r.toLowerCase())):e}}function VE({itemCount:e,itemHeight:t,overscan:r=5,initialScrollTop:o=0,startAtBottom:n=false}){let[a,s]=we.useState(o),[i,c]=we.useState(0),d=we.useRef(null),m=we.useRef(false),u=we.useCallback(f=>typeof t=="function"?t(f):t,[t]);we.useLayoutEffect(()=>{if(d.current){let f=new ResizeObserver(w=>{for(let v of w)c(v.contentRect.height);});return f.observe(d.current),o>0&&(d.current.scrollTop=o),()=>f.disconnect()}},[o]);let p=we.useCallback(f=>{s(f.currentTarget.scrollTop);},[]),{visibleItems:g,totalHeight:b,startIndex:x}=we.useMemo(()=>{let f=0,w=[];for(let T=0;T<e;T++)w.push(f),f+=u(T);let v=0,k=0,N=e-1;for(;k<=N;){let T=Math.floor((k+N)/2),E=w[T];E!==void 0&&E<=a?(v=T,k=T+1):N=T-1;}v=Math.max(0,v-r);let C=[];for(let T=v;T<e;T++){let E=w[T];if(E===void 0||E>a+i+r*u(T))break;C.push({index:T,offsetTop:E,height:u(T)});}return {visibleItems:C,totalHeight:f,startIndex:v}},[a,i,e,u,r]);we.useLayoutEffect(()=>{if(n&&!m.current&&b>0&&d.current&&i>0){let f=d.current,w=b-i;w>0&&(f.scrollTop=w,s(w)),m.current=true;}},[b,i,n]);let h=we.useCallback((f,w="auto")=>{if(d.current){let v=0;for(let y=0;y<f;y++)v+=u(y);d.current.scrollTo({top:v,behavior:w});}},[u]);return {containerRef:d,visibleItems:g,totalHeight:b,startIndex:x,onScroll:p,scrollToIndex:h,scrollToBottom:(f="auto")=>{d.current&&d.current.scrollTo({top:d.current.scrollHeight,behavior:f});}}}function gi(){let[e,t]=we.useState({scrollX:0,scrollY:0,scrollProgressX:0,scrollProgressY:0}),r=we.useRef(false),o=we.useCallback(()=>{r.current||(window.requestAnimationFrame(()=>{let n=window.scrollX,a=window.scrollY,s=document.documentElement.scrollWidth-document.documentElement.clientWidth,i=document.documentElement.scrollHeight-document.documentElement.clientHeight;t({scrollX:n,scrollY:a,scrollProgressX:s>0?n/s:0,scrollProgressY:i>0?a/i:0}),r.current=false;}),r.current=true);},[]);return we.useEffect(()=>(window.addEventListener("scroll",o,{passive:true}),o(),()=>window.removeEventListener("scroll",o)),[o]),e}function WE({className:e,color:t="bg-blue-500",height:r=2,position:o="top",...n}){let{scrollProgressY:a}=gi();return jsxRuntime.jsx("div",{className:l("fixed left-0 right-0 z-[100] w-full pointer-events-none",o==="top"?"top-0":"bottom-0",e),style:{height:r},...n,children:jsxRuntime.jsx("div",{className:l("h-full transition-all duration-75 ease-out",t),style:{width:`${a*100}%`,boxShadow:a>0?`0 0 10px ${t.replace("bg-","var(--")}`:"none"}})})}var vg=we__namespace.default.forwardRef(({orientation:e="horizontal",className:t,...r},o)=>jsxRuntime.jsx("hr",{ref:o,className:l("border-0 bg-gray-200 dark:bg-white/10",{"h-px w-full":e==="horizontal","h-full w-px":e==="vertical"},t),...r}));vg.displayName="Divider";var kg=we__namespace.default.forwardRef(({children:e,className:t,...r},o)=>jsxRuntime.jsx("kbd",{ref:o,className:l("rounded-lg border border-gray-200 dark:border-white/10 bg-gray-100 dark:bg-white/[0.03] px-2 py-1 text-[11px] font-semibold text-gray-500 dark:text-white/65",t),...r,children:e}));kg.displayName="Kbd";var Rg={theme:"system",setTheme:()=>null},xi=we.createContext(Rg);function oS({children:e,defaultTheme:t="system",storageKey:r="vite-ui-theme",...o}){let[n,a]=we.useState(t);we.useEffect(()=>{let i=localStorage.getItem(r);i&&a(i);},[r]),we.useEffect(()=>{let i=window.document.documentElement;if(i.classList.remove("light","dark"),n==="system"){let c=window.matchMedia("(prefers-color-scheme: dark)"),d=()=>{i.classList.remove("light","dark"),i.classList.add(c.matches?"dark":"light");};return d(),c.addEventListener("change",d),()=>c.removeEventListener("change",d)}i.classList.add(n);},[n]);let s={theme:n,setTheme:i=>{localStorage.setItem(r,i),a(i);}};return jsxRuntime.jsx(xi.Provider,{...o,value:s,children:e})}var vi=()=>{let e=we.useContext(xi);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function dS({className:e}){let{setTheme:t,theme:r}=vi();return jsxRuntime.jsxs(L,{variant:"ghost",size:"icon",className:l("h-9 w-9",e),onClick:()=>t(r==="light"?"dark":"light"),children:[jsxRuntime.jsx(lucideReact.Sun,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsxRuntime.jsx(lucideReact.Moon,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function Ig(e,t=true){let[r,o]=we.useState({data:null,error:null,isLoading:false}),n=we.useCallback(async()=>{o({data:null,error:null,isLoading:true});try{let a=await e();return o({data:a,error:null,isLoading:!1}),a}catch(a){throw o({data:null,error:a,isLoading:false}),a}},[e]);return we.useEffect(()=>{t&&n();},[n,t]),{...r,execute:n}}function fS(e,t){let r=we.useCallback(()=>fetch(e,t).then(o=>o.json()),[e,t]);return Ig(r)}function bS({initialMessages:e=[],onSendMessage:t,scrollThreshold:r=100}={}){let[o,n]=we.useState(e),[a,s]=we.useState(false),[i,c]=we.useState(false),d=we.useRef(null),m=we.useRef(true),u=we.useCallback((x="smooth")=>{d.current&&d.current.scrollTo({top:d.current.scrollHeight,behavior:x});},[]),p=we.useCallback(()=>{if(d.current){let{scrollTop:x,scrollHeight:h,clientHeight:f}=d.current;m.current=h-x-f<r;}},[r]);we.useEffect(()=>{m.current&&u();},[o,u]);let g=we.useCallback(async(x,h)=>{if(!x.trim())return;let f=crypto.randomUUID(),w={id:f,content:x,senderId:h,timestamp:new Date,status:"sending"};n(v=>[...v,w]);try{t&&await t(x),n(v=>v.map(y=>y.id===f?{...y,status:"sent"}:y));}catch{n(y=>y.map(k=>k.id===f?{...k,status:"error"}:k));}},[t]),b=we.useCallback(()=>{n([]);},[]);return {messages:o,setMessages:n,sendMessage:g,clearMessages:b,isTyping:a,setIsTyping:s,isLoading:i,setIsLoading:c,scrollRef:d,handleScroll:p,scrollToBottom:u}}function yS(e=[]){let[t,r]=we.useState(e),o=we.useCallback(d=>{r(m=>[...m,d]);},[]),n=we.useCallback((d,m)=>{r(u=>u.map(p=>p.id===d?{...p,status:m}:p));},[]),a=we.useCallback(d=>{r(m=>m.filter(u=>u.id!==d));},[]),s=we.useCallback((d,m)=>{r(u=>u.map(p=>p.id===d?{...p,content:m,isEdited:true}:p));},[]),i=we.useCallback((d,m,u)=>{r(p=>p.map(g=>{if(g.id!==d)return g;let b={...g.reactions||{}},x=b[m]||[];return x.includes(u)?(b[m]=x.filter(h=>h!==u),b[m].length===0&&delete b[m]):b[m]=[...x,u],{...g,reactions:b}}));},[]),c=we.useCallback(()=>{r([]);},[]);return {messages:t,setMessages:r,addMessage:o,updateMessageStatus:n,deleteMessage:a,editMessage:s,addReaction:i,clearMessages:c}}function TS(e){let[t,r]=we.useState(""),o=we.useMemo(()=>{if(!t.trim())return [];let n=t.toLowerCase();return e.filter(a=>a.content.toLowerCase().includes(n))},[e,t]);return {query:t,setQuery:r,results:o}}function RS(e){let t=we.useRef(null);return we.useEffect(()=>{let r=o=>{let n=t.current;!n||n.contains(o?.target||null)||e(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e]),t}function ES({timeout:e=2e3}={}){let[t,r]=we.useState(false),[o,n]=we.useState(null);return {copy:we.useCallback(async s=>{if(!navigator?.clipboard){n(new Error("Clipboard API not supported"));return}try{await navigator.clipboard.writeText(s),r(!0),setTimeout(()=>r(!1),e);}catch(i){n(i instanceof Error?i:new Error("Failed to copy"));}},[e]),copied:t,error:o}}function HS(e,t){let[r,o]=we.useState(e);return we.useEffect(()=>{let n=setTimeout(()=>{o(e);},t);return ()=>{clearTimeout(n);}},[e,t]),r}function BS(e){let[t,r]=we.useState(false),[o,n]=we.useState({x:0,y:0}),a=we.useRef({x:0,y:0}),s=we.useRef({x:0,y:0}),i=we.useRef(Date.now()),c=we.useRef({x:0,y:0}),d=we.useCallback((p,g)=>{r(true),a.current={x:p-o.x,y:g-o.y},s.current={x:p,y:g},i.current=Date.now();},[o]),m=we.useCallback((p,g)=>{if(!t)return;let b=p-a.current.x,x=g-a.current.y,h=Date.now(),f=h-i.current;f>0&&(c.current={x:(p-s.current.x)/f,y:(g-s.current.y)/f}),n({x:b,y:x}),s.current={x:p,y:g},i.current=h,e?.({isDragging:true,offset:{x:b,y:x},velocity:c.current});},[t,e]),u=we.useCallback(()=>{r(false),e?.({isDragging:false,offset:o,velocity:c.current});},[o,e]);return we.useEffect(()=>{let p=h=>m(h.clientX,h.clientY),g=h=>{h.touches[0]&&m(h.touches[0].clientX,h.touches[0].clientY);},b=()=>u(),x=()=>u();return t&&(window.addEventListener("mousemove",p),window.addEventListener("mouseup",b),window.addEventListener("touchmove",g),window.addEventListener("touchend",x)),()=>{window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",b),window.removeEventListener("touchmove",g),window.removeEventListener("touchend",x);}},[t,m,u]),{isDragging:t,offset:o,dragProps:{onMouseDown:p=>d(p.clientX,p.clientY),onTouchStart:p=>{p.touches[0]&&d(p.touches[0].clientX,p.touches[0].clientY);},style:{cursor:t?"grabbing":"grab",touchAction:"none"}}}}function zS(e){let[t,r]=we.useState({progress:0,scrollY:0,isIntersecting:false}),o=we.useRef(false);return we.useEffect(()=>{let n=e.current;if(!n)return;let a=()=>{o.current||(window.requestAnimationFrame(()=>{let s=n.getBoundingClientRect(),i=window.innerHeight,c=i+s.height,d=i-s.top,m=Math.max(0,Math.min(1,d/c));r({progress:m,scrollY:window.scrollY,isIntersecting:s.top<i&&s.bottom>0}),o.current=false;}),o.current=true);};return window.addEventListener("scroll",a,{passive:true}),window.addEventListener("resize",a),a(),()=>{window.removeEventListener("scroll",a),window.removeEventListener("resize",a);}},[e]),t}function $S(e,t){let r=we.useRef(null);return we.useLayoutEffect(()=>{let o=document.querySelector(`[data-flip-id="${e}"]`);if(!o)return;let n=r.current,a=o.getBoundingClientRect();if(n){let s=n.left-a.left,i=n.top-a.top,c=n.width/a.width,d=n.height/a.height;(Math.abs(s)>.5||Math.abs(i)>.5||Math.abs(c-1)>.01||Math.abs(d-1)>.01)&&o.animate([{transformOrigin:"top left",transform:`translate(${s}px, ${i}px) scale(${c}, ${d})`},{transformOrigin:"top left",transform:"none"}],{duration:400,easing:"cubic-bezier(0.2, 0.8, 0.2, 1)"});}r.current=a;},t),{"data-flip-id":e}}function YS({initialValues:e,onSubmit:t}){let[r,o]=we.useState(e),[n,a]=we.useState({}),[s,i]=we.useState(false),c=we.useCallback(u=>{let{name:p,value:g,type:b}=u.target,x=b==="checkbox"?u.target.checked:g;o(h=>({...h,[p]:x})),n[p]&&a(h=>({...h,[p]:""}));},[n]),d=we.useCallback(async u=>{u.preventDefault();let p=u.currentTarget;if(!p.checkValidity()){let g={};Array.from(p.elements).forEach(b=>{let x=b;x.name&&!x.validity.valid&&(g[x.name]=x.validationMessage);}),a(g);return}i(true);try{await t(r);}finally{i(false);}},[r,t]),m=we.useCallback(u=>({name:u,value:r[u],onChange:c,error:n[u]}),[r,n,c]);return {values:r,errors:n,isSubmitting:s,handleChange:c,handleSubmit:d,register:m,setValues:o,setErrors:a}}function GS(e){let[t,r]=we.useState({past:[],present:e,future:[]}),o=t.past.length>0,n=t.future.length>0,a=we.useCallback(()=>{o&&r(d=>{let m=d.past[d.past.length-1];return m===void 0?d:{past:d.past.slice(0,d.past.length-1),present:m,future:[d.present,...d.future]}});},[o]),s=we.useCallback(()=>{n&&r(d=>{let m=d.future[0];if(m===void 0)return d;let u=d.future.slice(1);return {past:[...d.past,d.present],present:m,future:u}});},[n]),i=we.useCallback(d=>{r(m=>{let u=typeof d=="function"?d(m.present):d;return m.present===u?m:{past:[...m.past,m.present],present:u,future:[]}});},[]),c=we.useCallback(()=>{r({past:[],present:e,future:[]});},[e]);return {state:t.present,set:i,undo:a,redo:s,clear:c,canUndo:o,canRedo:n,history:t}}function QS(e=3e3){let[t,r]=we.useState(false),o=we.useRef();return we.useEffect(()=>{let n=()=>{r(false),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(true);},e);},a=["mousemove","mousedown","keydown","touchstart","scroll"];return a.forEach(s=>{window.addEventListener(s,n);}),n(),()=>{a.forEach(s=>{window.removeEventListener(s,n);}),o.current&&clearTimeout(o.current);}},[e]),t}function tD({onLoadMore:e,isLoading:t,hasMore:r,threshold:o=100,root:n=null}){let a=we.useRef(null),s=we.useRef(null),i=we.useCallback(c=>{let d=c[0];d&&d.isIntersecting&&r&&!t&&e();},[r,t,e]);return we.useEffect(()=>{let c=s.current;if(c)return a.current=new IntersectionObserver(i,{root:n,rootMargin:`0px 0px ${o}px 0px`,threshold:.1}),a.current.observe(c),()=>{a.current&&a.current.disconnect();}},[i,n,o]),s}function nD(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:n=false}={}){let[a,s]=we.useState(),i=a?.isIntersecting&&n,c=([d])=>{s(d);};return we.useEffect(()=>{let d=e?.current;if(!!!window.IntersectionObserver||i||!d)return;let u={threshold:t,root:r,rootMargin:o},p=new IntersectionObserver(c,u);return p.observe(d),()=>p.disconnect()},[e,t,r,o,i]),a}function lD(e){let[t,r]=we.useState(e),o=we.useCallback((i,c,d,m)=>{r(u=>{let p=u.columns[c],g=u.columns[d],b=u.tasks[i];if(!p||!g||!b)return u;let x=Array.from(p.taskIds);x.splice(x.indexOf(i),1);let h={...p,taskIds:x},f=c===d?x:Array.from(g.taskIds);f.splice(m,0,i);let w={...g,taskIds:f};return {...u,columns:{...u.columns,[c]:h,[d]:w},tasks:{...u.tasks,[i]:{...b,columnId:d}}}});},[]),n=we.useCallback((i,c)=>{r(d=>{let m=Array.from(d.columnOrder);return m.splice(m.indexOf(i),1),m.splice(c,0,i),{...d,columnOrder:m}});},[]),a=we.useCallback((i,c)=>{r(d=>{let m=d.columns[i];if(!m)return d;let u={...m,taskIds:[...m.taskIds,c.id]};return {...d,tasks:{...d.tasks,[c.id]:c},columns:{...d.columns,[i]:u}}});},[]),s=we.useCallback(i=>{r(c=>{let d=c.tasks[i];if(!d)return c;let m=c.columns[d.columnId];if(!m)return c;let u={...c.tasks};delete u[i];let p={...m,taskIds:m.taskIds.filter(g=>g!==i)};return {...c,tasks:u,columns:{...c.columns,[d.columnId]:p}}});},[]);return {board:t,setBoard:r,moveTask:o,moveColumn:n,addTask:a,removeTask:s}}function mD(e){let t=we.useRef(e);t.current=e,we.useEffect(()=>{let r=o=>{let n=[];(o.ctrlKey||o.metaKey)&&n.push("mod"),o.shiftKey&&n.push("shift"),o.altKey&&n.push("alt");let s=o.key.toLowerCase();["control","meta","shift","alt"].includes(s)||n.push(s);let i=n.join("+"),c=t.current[i]||t.current[s];c&&c(o);};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[]);}function fD(e){let t=we.useRef(false);we.useEffect(()=>{t.current||(t.current=true,e());},[]);}function gD(e){we.useEffect(()=>()=>{e();},[]);}function vD(e,t){let[r,o]=we.useState(()=>{if(typeof window>"u")return t;try{let a=window.localStorage.getItem(e);return a?JSON.parse(a):t}catch(a){return console.warn(`Error reading localStorage key "${e}":`,a),t}}),n=we.useCallback(a=>{try{let s=a instanceof Function?a(r):a;o(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s));}catch(s){console.warn(`Error setting localStorage key "${e}":`,s);}},[e,r]);return [r,n]}function kD(e){let[t,r]=we.useState({x:0,y:0,elementX:0,elementY:0,percentageX:0,percentageY:0}),o=we.useRef(),n=we.useRef({x:0,y:0});return we.useEffect(()=>{let a=i=>{n.current={x:i.clientX,y:i.clientY},o.current||(o.current=requestAnimationFrame(s));},s=()=>{let{x:i,y:c}=n.current,d=0,m=0,u=0,p=0;if(e?.current){let g=e.current.getBoundingClientRect();d=i-g.left,m=c-g.top,u=Math.max(0,Math.min(100,d/g.width*100)),p=Math.max(0,Math.min(100,m/g.height*100));}r({x:i,y:c,elementX:d,elementY:m,percentageX:u,percentageY:p}),o.current=void 0;};return window.addEventListener("mousemove",a),()=>{window.removeEventListener("mousemove",a),o.current&&cancelAnimationFrame(o.current);}},[e]),t}function CD(){let[e,t]=we.useState({alpha:null,beta:null,gamma:null,absolute:false});return we.useEffect(()=>{let r=o=>{t({alpha:o.alpha,beta:o.beta,gamma:o.gamma,absolute:o.absolute});};return typeof window<"u"&&"DeviceOrientationEvent"in window&&window.addEventListener("deviceorientation",r),()=>{window.removeEventListener("deviceorientation",r);}},[]),e}function LD(e){let t=we.useRef();return we.useEffect(()=>{t.current=e;},[e]),t.current}function SD(e){let t=we.useRef(null),r=we.useCallback((o,n,a)=>{!o||a||!t.current||(o.dataset.messageId=n,t.current.observe(o));},[]);return we.useEffect(()=>(t.current=new IntersectionObserver(o=>{o.forEach(n=>{if(n.isIntersecting){let a=n.target.dataset.messageId;a&&(e(a),t.current?.unobserve(n.target));}});},{threshold:.5}),()=>{t.current?.disconnect();}),[e]),{registerMessage:r}}function ID(){let[e,t]=we.useState(false);return we.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");t(r.matches);let o=n=>{t(n.matches);};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),e}var Nh={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function Th(e){let[t,r]=we.useState(false);return we.useEffect(()=>{let o=window.matchMedia(e);r(o.matches);let n=()=>r(o.matches);return o.addEventListener("change",n),()=>o.removeEventListener("change",n)},[e]),t}function OD(e){return Th(`(min-width: ${Nh[e]}px)`)}function VD(e){let[t,r]=we.useState({width:0,height:0});return we.useLayoutEffect(()=>{if(!e.current)return;let o=new ResizeObserver(n=>{for(let a of n)r({width:a.contentRect.width,height:a.contentRect.height});});return o.observe(e.current),()=>o.disconnect()},[e]),t}function FD(e=10){let[t,r]=we.useState(null),o=we.useRef(0);return we.useEffect(()=>{let n=()=>{let s=window.scrollY;if(Math.abs(s-o.current)<e)return;let i=s>o.current?"down":"up";i!==t&&(s>0||i==="down")&&r(i),o.current=s>0?s:0;},a=()=>{window.requestAnimationFrame(n);};return window.addEventListener("scroll",a),()=>window.removeEventListener("scroll",a)},[t,e]),t}function WD(e=true){we.useLayoutEffect(()=>{if(!e)return;let t=window.getComputedStyle(document.body).overflow,r=window.getComputedStyle(document.body).paddingRight,o=window.innerWidth-document.documentElement.clientWidth;return document.body.style.overflow="hidden",o>0&&(document.body.style.paddingRight=`${parseFloat(r)+o}px`),()=>{document.body.style.overflow=t,document.body.style.paddingRight=r;}},[e]);}function Ph(e,t,r){let[o,n]=t,[a,s]=r,i=(e-o)/(n-o),c=Math.max(0,Math.min(1,i));return a+c*(s-a)}function _D(e,t,r){return Ph(e,t,r)}function GD(){let[e,t]=we.useState(0),r=we.useRef(0),o=we.useRef(Date.now()),n=we.useRef();return we.useEffect(()=>{let a=()=>{let i=window.scrollY,c=Date.now(),d=c-o.current;if(d>0){let u=(i-r.current)/d;t(u);}r.current=i,o.current=c,n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(s);},s=()=>{t(i=>Math.abs(i)<.01?0:i*.9),n.current=requestAnimationFrame(s);};return window.addEventListener("scroll",a,{passive:true}),()=>{window.removeEventListener("scroll",a),n.current&&cancelAnimationFrame(n.current);}},[]),e}function Hh(e,t){let r=e.toLowerCase().replace(/\s/g,""),o=t.toLowerCase(),n=0;for(let a=0;a<o.length&&n<r.length;a++)o[a]===r[n]&&n++;return n===r.length}function QD(e,t,r){return we.useMemo(()=>t.trim()?e.filter(o=>r.some(n=>{let a=o[n];return a==null?false:Hh(t,String(a))})):e,[e,t,r])}function tH(e,t){let r=we.useCallback(()=>{if(typeof window>"u")return t;try{let s=window.sessionStorage.getItem(e);return s?JSON.parse(s):t}catch(s){return console.warn(`Error reading sessionStorage key "${e}":`,s),t}},[t,e]),[o,n]=we.useState(r),a=we.useCallback(s=>{try{let i=s instanceof Function?s(o):s;n(i),typeof window<"u"&&window.sessionStorage.setItem(e,JSON.stringify(i));}catch(i){console.warn(`Error setting sessionStorage key "${e}":`,i);}},[e,o]);return we.useEffect(()=>{n(r());},[r]),[o,a]}function aH(e,t={}){let{stiffness:r=.15,damping:o=.8,mass:n=1,precision:a=.01}=t,[s,i]=we.useState(e),c=we.useRef(0),d=we.useRef(e),m=we.useRef();return we.useEffect(()=>{let u=()=>{let p=e-d.current,b=p*r/n;if(c.current=(c.current+b)*o,d.current+=c.current,Math.abs(p)<a&&Math.abs(c.current)<a){d.current=e,i(e),m.current=void 0;return}i(d.current),m.current=requestAnimationFrame(u);};return m.current&&cancelAnimationFrame(m.current),m.current=requestAnimationFrame(u),()=>{m.current&&cancelAnimationFrame(m.current);}},[e,r,o,n,a]),s}function sH(e,t=100,r=0){return r+e*t}function iH(e,t=100){return Array.from({length:e},(r,o)=>o*t)}var Pi="01XYZ#%&@$+-/<>!_";function dH(e,t=800,r=true){let[o,n]=we.useState(e),a=we.useRef();return we.useEffect(()=>{if(!r){n(e);return}let s=Date.now(),i=()=>{let c=Date.now()-s,d=Math.min(c/t,1),m=e.split("").map((u,p)=>u===" "?" ":d>p/e.length?u:Pi[Math.floor(Math.random()*Pi.length)]).join("");n(m),d<1&&(a.current=requestAnimationFrame(i));};return a.current=requestAnimationFrame(i),()=>{a.current&&cancelAnimationFrame(a.current);}},[e,t,r]),o}function pH(e,t){let[r,o]=we.useState(e),n=we.useRef(Date.now());return we.useEffect(()=>{let a=setTimeout(()=>{Date.now()-n.current>=t&&(o(e),n.current=Date.now());},t-(Date.now()-n.current));return ()=>{clearTimeout(a);}},[e,t]),r}function hH(e=0){let[t,r]=we.useState(e),[o,n]=we.useState(false),a=we.useRef(null),s=we.useCallback(()=>{o||(n(true),a.current=setInterval(()=>{r(m=>m+1);},1e3));},[o]),i=we.useCallback(()=>{o&&a.current&&(clearInterval(a.current),n(false));},[o]),c=we.useCallback(()=>{a.current&&clearInterval(a.current),n(false),r(0);},[]);return we.useEffect(()=>()=>{a.current&&clearInterval(a.current);},[]),{seconds:t,isActive:o,start:s,pause:i,reset:c,formattedTime:(m=>{let u=Math.floor(m/3600),p=Math.floor(m%3600/60),g=m%60;return [u,p,g].map(b=>b<10?"0"+b:b).filter((b,x)=>b!=="00"||x>0).join(":")})(t)}}function wH(){let e=we.useContext(Ko);if(!e)throw new Error("useToast must be used within a ToastProvider");return e}function NH(e=false){let[t,r]=we.useState(e),o=we.useCallback(()=>{r(n=>!n);},[]);return [t,o,r]}function MH(e=3e3){let[t,r]=we.useState(false),o=we.useRef(null),n=we.useCallback(a=>{r(a),o.current&&clearTimeout(o.current),a&&(o.current=window.setTimeout(()=>{r(false);},e));},[e]);return we.useEffect(()=>()=>{o.current&&clearTimeout(o.current);},[]),{isTyping:t,setTyping:n}}function PH(){return {startTransition:t=>{if(!document.startViewTransition){t();return}document.startViewTransition(()=>{reactDom.flushSync(()=>{t();});});}}}function SH(e,t={month:"short",day:"numeric",year:"numeric"}){let r=new Date(e);return new Intl.DateTimeFormat("en-US",t).format(r)}function DH(e){return new Intl.NumberFormat("en-US").format(e)}function HH(e,t="USD"){return new Intl.NumberFormat("en-US",{style:"currency",currency:t}).format(e)}function AH(e,t){return e.length<=t?e:e.slice(0,t)+"..."}function BH(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}
|
|
70
|
-
exports.AIPromptInput=
|
|
69
|
+
`,backgroundSize:`${o}px ${o}px`,transform:s?"translate3d(calc((var(--mouse-x, 0) - 24px) / 40), calc((var(--mouse-y, 0) - 24px) / 40), 0)":void 0}:e==="gradient"?{...h,background:s?`radial-gradient(circle at var(--mouse-x, center) var(--mouse-y, center), ${f}, transparent)`:`radial-gradient(circle at center, ${f}, transparent)`}:e==="beams"?{...h,background:`radial-gradient(60% 40% at 50% 0%, ${f} 0%, transparent 100%)`}:h},x=n==="fade"?{maskImage:"radial-gradient(ellipse at center, black, transparent 90%)",WebkitMaskImage:"radial-gradient(ellipse at center, black, transparent 90%)"}:{};return jsxRuntime.jsxs("div",{ref:h=>{h&&(g.current=h),typeof p=="function"?p(h):p&&(p.current=h);},className:l("absolute inset-0 overflow-hidden pointer-events-none transition-transform duration-300 ease-out","z-0","[--pattern-color:rgba(0,0,0,0.05)] dark:[--pattern-color:rgba(255,255,255,0.08)]",i?.startsWith("bg-")?i:"",c),style:{...b(),...x,...m,backgroundColor:i&&!i.startsWith("bg-")?i:void 0},...u,children:[t&&jsxRuntime.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none brightness-100 contrast-150",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`}}),e==="beams"&&jsxRuntime.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[jsxRuntime.jsx("div",{className:"absolute top-0 left-1/4 w-px h-full bg-gradient-to-b from-transparent via-white/10 to-transparent"}),jsxRuntime.jsx("div",{className:"absolute top-0 right-1/4 w-px h-full bg-gradient-to-b from-transparent via-white/10 to-transparent"})]}),e==="mesh"&&jsxRuntime.jsxs("div",{className:l("absolute inset-0 opacity-30 blur-[100px]",a&&"animate-pulse"),children:[jsxRuntime.jsx("div",{className:"absolute top-[-10%] left-[-10%] w-[50%] h-[50%] rounded-full bg-blue-500/20"}),jsxRuntime.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] w-[50%] h-[50%] rounded-full bg-purple-500/20"}),jsxRuntime.jsx("div",{className:"absolute top-[20%] right-[10%] w-[40%] h-[40%] rounded-full bg-indigo-500/10"})]}),d]})});Zp.displayName="Background";var n4=({children:e,className:t,size:r=300,color:o,fill:n,...a})=>{let s=ye.useRef(null),i=n||o||"rgba(255, 255, 255, 0.1)";return jsxRuntime.jsxs("div",{ref:s,onMouseMove:u=>{let p=s.current;if(!p)return;let g=p.getBoundingClientRect(),b=u.clientX-g.left,x=u.clientY-g.top;p.style.setProperty("--mouse-x",`${b}px`),p.style.setProperty("--mouse-y",`${x}px`);},onMouseEnter:()=>{s.current?.style.setProperty("--opacity","1");},onMouseLeave:()=>{s.current?.style.setProperty("--opacity","0");},className:l("relative overflow-hidden rounded-2xl border border-gray-200 bg-white dark:border-white/10 dark:bg-black",t),...a,children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute -inset-px transition-opacity duration-300",style:{opacity:"var(--opacity, 0)",background:`radial-gradient(${r}px circle at var(--mouse-x, center) var(--mouse-y, center), ${i}, transparent 80%)`}}),e&&jsxRuntime.jsx("div",{className:"relative h-full",children:e})]})};var ff=classVarianceAuthority.cva("relative flex w-full flex-col rounded-2xl border transition-all duration-200 focus-within:ring-4",{variants:{variant:{default:"bg-white border-gray-200 shadow-sm focus-within:border-purple-500/50 focus-within:ring-purple-500/10 dark:bg-white/[0.03] dark:border-white/10 dark:shadow-none",ghost:"bg-transparent border-transparent shadow-none focus-within:bg-white/50 dark:focus-within:bg-white/5"}},defaultVariants:{variant:"default"}}),gf=ye__namespace.default.forwardRef(({className:e,variant:t,onSubmit:r,isGenerating:o,onAttach:n,onFilesSelected:a,onStop:s,onMic:i,maxLength:c,footer:d,attachments:m,onRemoveAttachment:u,accept:p,multiple:g,placeholder:b="Ask AI anything...",value:x,onChange:h,...f},w)=>{let[v,y]=ye.useState(""),k=x!==void 0,N=k?x:v,C=ye.useRef(null),T=ye.useRef(null),E=()=>{C.current&&(C.current.style.height="auto",C.current.style.height=`${C.current.scrollHeight}px`);};ye.useEffect(()=>{E();},[N]);let A=R=>{let K=R.target.value;c&&K.length>c||(k||y(K),h?.(R));},M=R=>{R.key==="Enter"&&!R.shiftKey&&(R.preventDefault(),N.trim()&&!o&&(r?.(N),k||y(""))),f.onKeyDown?.(R);},S=()=>{o&&s?s():N.trim()&&(r?.(N),k||y(""));},I=()=>{a&&T.current?T.current.click():n?.();},B=R=>{R.target.files&&R.target.files.length>0&&a?.(R.target.files),T.current&&(T.current.value="");};return jsxRuntime.jsxs("div",{className:l(ff({variant:t,className:e})),children:[jsxRuntime.jsx("input",{type:"file",ref:T,className:"hidden",onChange:B,accept:p,multiple:g}),m&&m.length>0&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 px-4 pt-4",children:m.map(R=>jsxRuntime.jsxs("div",{className:"group relative flex items-center gap-2 rounded-xl border border-gray-200 bg-gray-50 px-3 py-1.5 text-sm transition-colors hover:bg-gray-100 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/[0.06]",children:[jsxRuntime.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded-lg bg-white dark:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.File,{className:"h-3 w-3 text-purple-500"})}),jsxRuntime.jsx("span",{className:"max-w-[120px] truncate text-gray-700 dark:text-gray-300",children:R.name}),jsxRuntime.jsx("button",{onClick:()=>u?.(R.id),className:"ml-1 rounded-full p-0.5 text-gray-400 opacity-0 transition-all hover:bg-gray-200 hover:text-gray-600 group-hover:opacity-100 dark:hover:bg-white/[0.06] dark:hover:text-white",type:"button",children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},R.id))}),jsxRuntime.jsx("textarea",{ref:R=>{C.current=R,typeof w=="function"?w(R):w&&(w.current=R);},value:N,onChange:A,onKeyDown:M,placeholder:b,rows:1,className:l("w-full resize-none bg-transparent px-4 py-4 text-base outline-none max-h-[200px]","text-gray-900 placeholder:text-gray-400","dark:text-white dark:placeholder:text-white/40"),disabled:o&&!s,...f}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-2 pb-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"text-gray-400 hover:text-gray-600 dark:text-white/40 dark:hover:text-white",onClick:I,type:"button",title:"Attach file",children:jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-5 w-5"})}),i&&jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"text-gray-400 hover:text-gray-600 dark:text-white/40 dark:hover:text-white",onClick:i,type:"button",title:"Use microphone",children:jsxRuntime.jsx(lucideReact.Mic,{className:"h-5 w-5"})})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[c&&jsxRuntime.jsxs("span",{className:"text-xs text-gray-400 dark:text-white/30",children:[N.length,"/",c]}),jsxRuntime.jsx(L,{size:"icon",disabled:!N.trim()&&!o||o&&!s,onClick:S,className:l("h-8 w-8 rounded-full transition-all duration-200",N.trim()||o?"bg-purple-600 text-white hover:bg-purple-500 shadow-lg shadow-purple-500/25":"bg-gray-100 text-gray-400 dark:bg-white/[0.06] dark:text-white/20"),children:o?s?jsxRuntime.jsx(lucideReact.Square,{className:"h-3 w-3 fill-current"}):jsxRuntime.jsx(lucideReact.Sparkles,{className:"h-4 w-4 animate-pulse"}):jsxRuntime.jsx(lucideReact.ArrowUp,{className:"h-4 w-4"})})]})]}),d&&jsxRuntime.jsx("div",{className:"border-t border-gray-100 px-4 py-2 text-xs text-gray-400 dark:border-white/5 dark:text-white/30",children:d})]})});gf.displayName="AIPromptInput";var Mf=classVarianceAuthority.cva("group relative overflow-hidden rounded-2xl border transition-all duration-200",{variants:{variant:{default:"bg-gray-50 border-gray-200 dark:bg-white/[0.02] dark:border-white/10",ghost:"bg-transparent border-transparent",outline:"bg-transparent border-gray-200 dark:border-white/10"}},defaultVariants:{variant:"default"}}),Rf=ye__namespace.default.forwardRef(({className:e,variant:t,children:r,onCopy:o,onRegenerate:n,onFeedback:a,onShare:s,onEdit:i,timestamp:c,sources:d,model:m,usage:u,...p},g)=>jsxRuntime.jsxs("div",{ref:g,className:l(Mf({variant:t,className:e})),...p,children:[jsxRuntime.jsxs("div",{className:"absolute left-4 top-4 flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-gradient-to-br from-purple-500 to-blue-500 shadow-lg shadow-purple-500/20",children:jsxRuntime.jsx(lucideReact.Sparkles,{className:"h-3.5 w-3.5 text-white"})}),c&&jsxRuntime.jsx("span",{className:"text-xs font-medium text-gray-400 dark:text-white/30",children:c})]}),jsxRuntime.jsxs("div",{className:"pl-14 pr-4 py-4",children:[jsxRuntime.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none text-gray-700 dark:text-gray-300",children:r}),d&&d.length>0&&jsxRuntime.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:d.map((b,x)=>jsxRuntime.jsxs("a",{href:b.url,target:"_blank",rel:"noopener noreferrer",className:l("flex items-center gap-1.5 rounded-full border px-3 py-1 text-xs transition-colors","border-gray-200 bg-white text-gray-600 hover:bg-gray-50","dark:border-white/10 dark:bg-white/[0.03] dark:text-white/60 dark:hover:bg-white/[0.06]"),children:[jsxRuntime.jsx("span",{className:"max-w-[150px] truncate",children:b.title}),jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3 w-3 opacity-50"})]},x))})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-t border-gray-200 bg-white/50 px-2 py-1.5 backdrop-blur dark:border-white/5 dark:bg-white/[0.02]",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 px-2 text-[10px] font-medium text-gray-400 dark:text-white/20",children:[m&&jsxRuntime.jsx("span",{children:m}),u&&jsxRuntime.jsx("span",{children:u})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsxs(L,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:o,children:[jsxRuntime.jsx(lucideReact.Copy,{className:"mr-1.5 h-3.5 w-3.5"}),"Copy"]}),s&&jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:s,title:"Share",children:jsxRuntime.jsx(lucideReact.Share,{className:"h-3.5 w-3.5"})}),i&&jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:i,title:"Edit",children:jsxRuntime.jsx(lucideReact.Edit,{className:"h-3.5 w-3.5"})}),jsxRuntime.jsx("div",{className:"mx-1 h-3 w-px bg-gray-200 dark:bg-white/10"}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:n,title:"Regenerate",children:jsxRuntime.jsx(lucideReact.RefreshCw,{className:"h-3.5 w-3.5"})}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:()=>a?.("up"),title:"Helpful",children:jsxRuntime.jsx(lucideReact.ThumbsUp,{className:"h-3.5 w-3.5"})}),jsxRuntime.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-900 dark:text-white/40 dark:hover:text-white",onClick:()=>a?.("down"),title:"Not helpful",children:jsxRuntime.jsx(lucideReact.ThumbsDown,{className:"h-3.5 w-3.5"})})]})]})]}));Rf.displayName="AIResponse";function N4({children:e,className:t,...r}){return jsxRuntime.jsx("div",{className:l("flex h-[800px] w-full overflow-hidden rounded-3xl border border-gray-200 dark:border-white/10 bg-white dark:bg-black/40 backdrop-blur-xl shadow-2xl",t),...r,children:e})}function D4({conversations:e,activeId:t,onSelect:r,onNewChat:o,onSearch:n,onArchive:a,onPin:s,onMute:i,onDelete:c,onMarkUnread:d,filter:m="all",sortBy:u="recent",hideHeader:p=false,className:g,...b}){let[x,h]=ye.useState(""),f=ye.useMemo(()=>e.filter(v=>(v.user?.name||v.group?.name||"").toLowerCase().includes(x.toLowerCase())),[e,x]),w=v=>{let y=v.target.value;h(y),n?.(y);};return jsxRuntime.jsxs("div",{className:l("flex flex-col border-r border-gray-200 dark:border-white/10 bg-gray-50/50 dark:bg-white/[0.02]",!g?.includes("w-")&&"w-80",g),...b,children:[!p&&jsxRuntime.jsxs("div",{className:"p-4 space-y-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:"Messages"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("button",{className:"p-2 rounded-full hover:bg-gray-200 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",title:"Filter",children:jsxRuntime.jsx(lucideReact.Filter,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{onClick:o,className:"p-2 rounded-full hover:bg-gray-200 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",title:"New Chat",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-5 w-5"})})]})]}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),jsxRuntime.jsx("input",{type:"text",value:x,onChange:w,placeholder:"Search messages...",className:"w-full h-10 pl-9 pr-4 rounded-2xl bg-white dark:bg-white/[0.03] border border-gray-200 dark:border-white/10 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all placeholder:text-gray-400 dark:text-white"})]})]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:bg-white/10 [&::-webkit-scrollbar-thumb]:rounded-full hover:[&::-webkit-scrollbar-thumb]:bg-white/20 [&::-webkit-scrollbar-track]:bg-transparent",children:jsxRuntime.jsx("div",{className:"flex flex-col",children:f.map(v=>{let y=v.user?.name||v.group?.name||"Unknown",k=v.user?.avatar||v.group?.avatar,N=v.user?.status==="online",C=t===v.id;return jsxRuntime.jsx("div",{className:"p-2",children:jsxRuntime.jsxs("div",{onClick:()=>r?.(v.id),className:l("w-full h-16 flex items-center gap-3 p-3 rounded-2xl transition-all text-left group cursor-pointer",C?"bg-blue-500/10 dark:bg-white/[0.06] shadow-[0_0_15px_rgba(59,130,246,0.1)] dark:shadow-[0_0_15px_rgba(255,255,255,0.05)]":"hover:bg-gray-100 dark:hover:bg-white/[0.03]"),children:[jsxRuntime.jsxs("div",{className:"relative flex-shrink-0",children:[jsxRuntime.jsx($,{src:k,alt:y,fallback:y[0]}),N&&jsxRuntime.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 w-3.5 h-3.5 bg-green-500 border-2 border-white dark:border-[#0a0a0a] rounded-full"})]}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-0.5",children:[jsxRuntime.jsx("span",{className:l("font-semibold truncate",C?"text-blue-600 dark:text-white":"text-gray-900 dark:text-white/90"),children:y}),v.lastMessage&&jsxRuntime.jsx("span",{className:"text-[10px] text-gray-400 dark:text-white/30 whitespace-nowrap",children:new Date(v.lastMessage.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsxRuntime.jsx("p",{className:"text-xs text-gray-500 dark:text-white/40 truncate",children:v.isTyping?jsxRuntime.jsx("span",{className:"text-blue-500 animate-pulse",children:"typing..."}):v.lastMessage?.content||"No messages yet"}),v.unreadCount>0&&jsxRuntime.jsx("span",{className:"flex-shrink-0 min-w-[18px] h-[18px] flex items-center justify-center bg-blue-500 text-white text-[10px] font-bold rounded-full px-1",children:v.unreadCount})]})]}),jsxRuntime.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity",onClick:T=>T.stopPropagation(),children:jsxRuntime.jsxs(at,{children:[jsxRuntime.jsx(nt,{className:"p-1 rounded-lg hover:bg-gray-200 dark:hover:bg-white/10 text-gray-400",children:jsxRuntime.jsx(lucideReact.MoreVertical,{className:"h-4 w-4"})}),jsxRuntime.jsxs(st,{align:"end",children:[jsxRuntime.jsxs(V,{onClick:()=>s?.(v.id),children:[jsxRuntime.jsx(lucideReact.Pin,{className:"h-4 w-4 mr-2"})," Pin"]}),jsxRuntime.jsxs(V,{onClick:()=>a?.(v.id),children:[jsxRuntime.jsx(lucideReact.Archive,{className:"h-4 w-4 mr-2"})," Archive"]}),jsxRuntime.jsxs(V,{onClick:()=>i?.(v.id),children:[jsxRuntime.jsx(lucideReact.BellOff,{className:"h-4 w-4 mr-2"})," Mute"]}),jsxRuntime.jsxs(V,{onClick:()=>d?.(v.id),children:[jsxRuntime.jsx(lucideReact.MessageSquare,{className:"h-4 w-4 mr-2"})," Mark as Unread"]}),jsxRuntime.jsxs(V,{className:"text-red-500",onClick:()=>c?.(v.id),children:[jsxRuntime.jsx(lucideReact.Trash2,{className:"h-4 w-4 mr-2"})," Delete"]})]})]})})]})},v.id)})})})]})}function V4({user:e,onBack:t,onInfo:r,onAvatarClick:o,onCall:n,onVideoCall:a,onSearch:s,onMute:i,isTyping:c,isMuted:d,actions:m,className:u,...p}){return jsxRuntime.jsxs("div",{className:l("flex h-16 items-center justify-between border-b border-gray-200 dark:border-white/10 bg-white/80 dark:bg-black/40 backdrop-blur px-4 sticky top-0 z-10",u),...p,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[t&&jsxRuntime.jsx("button",{onClick:t,className:"md:hidden p-2 -ml-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.ArrowLeft,{className:"h-5 w-5 text-gray-600 dark:text-white/70"})}),jsxRuntime.jsxs("div",{className:"relative cursor-pointer",onClick:o||r,children:[jsxRuntime.jsx($,{src:e.avatar,alt:e.name,fallback:e.name[0]}),e.status==="online"&&jsxRuntime.jsx("span",{className:"absolute bottom-0 right-0 h-3 w-3 rounded-full bg-green-500 border-2 border-white dark:border-black"})]}),jsxRuntime.jsxs("div",{className:"cursor-pointer",onClick:r,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white leading-none",children:e.name}),d&&jsxRuntime.jsx(lucideReact.BellOff,{className:"h-3 w-3 text-gray-400"})]}),jsxRuntime.jsx("p",{className:l("text-xs mt-1 transition-colors",c?"text-blue-500 font-medium animate-pulse":"text-gray-500 dark:text-white/50"),children:c?"typing...":e.status==="online"?"Online":`Last seen ${e.lastSeen?.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[s&&jsxRuntime.jsx("button",{onClick:s,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Search,{className:"h-5 w-5"})}),n&&jsxRuntime.jsx("button",{onClick:n,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Phone,{className:"h-5 w-5"})}),a&&jsxRuntime.jsx("button",{onClick:a,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Video,{className:"h-5 w-5"})}),m,jsxRuntime.jsx("button",{onClick:r,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.MoreVertical,{className:"h-5 w-5"})})]})]})}function _s({src:e,duration:t,isMe:r,className:o,...n}){let[a,s]=ye.useState(false),[i,c]=ye.useState(0),[d,m]=ye.useState(false),u=ye.useRef(null),p=()=>{u.current&&(a?u.current.pause():u.current.play(),s(!a));},g=()=>{u.current&&c(u.current.currentTime);},b=()=>{s(false),c(0);},x=f=>{let w=Math.floor(f/60),v=Math.floor(f%60);return `${w}:${v.toString().padStart(2,"0")}`},h=t?i/t*100:0;return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3 p-2 rounded-2xl min-w-[200px]",r?"bg-white/10":"bg-gray-100 dark:bg-white/[0.03]",o),...n,children:[jsxRuntime.jsx("audio",{ref:u,src:e,onTimeUpdate:g,onEnded:b}),jsxRuntime.jsx("button",{onClick:p,className:l("w-10 h-10 rounded-full flex items-center justify-center transition-all",r?"bg-white text-blue-600":"bg-blue-500 text-white"),children:a?jsxRuntime.jsx(lucideReact.Pause,{className:"h-5 w-5 fill-current"}):jsxRuntime.jsx(lucideReact.Play,{className:"h-5 w-5 fill-current ml-0.5"})}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-1",children:[jsxRuntime.jsx("div",{className:"h-1.5 w-full bg-gray-300 dark:bg-white/10 rounded-full overflow-hidden",children:jsxRuntime.jsx("div",{className:l("h-full transition-all duration-100",r?"bg-white":"bg-blue-500"),style:{width:`${h}%`}})}),jsxRuntime.jsxs("div",{className:"flex justify-between text-[10px] font-medium opacity-60",children:[jsxRuntime.jsx("span",{children:x(i)}),jsxRuntime.jsx("span",{children:t?x(t):"--:--"})]})]}),jsxRuntime.jsx("button",{onClick:()=>m(!d),className:"p-1.5 rounded-full hover:bg-black/5 dark:hover:bg-white/5 opacity-60",children:d?jsxRuntime.jsx(lucideReact.VolumeX,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Volume2,{className:"h-4 w-4"})})]})}function Xs({status:e,className:t,...r}){return e==="sending"?jsxRuntime.jsx("div",{className:l("w-3 h-3 border border-current border-t-transparent rounded-full animate-spin opacity-50",t),...r}):e==="failed"?jsxRuntime.jsx("span",{className:l("text-red-500 text-[10px] font-bold",t),...r,children:"!"}):jsxRuntime.jsxs("div",{className:l("flex items-center",t),...r,children:[e==="sent"&&jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3 opacity-50"}),e==="delivered"&&jsxRuntime.jsx(lucideReact.CheckCheck,{className:"h-3 w-3 opacity-50"}),e==="read"&&jsxRuntime.jsx(lucideReact.CheckCheck,{className:"h-3 w-3 text-blue-500"})]})}function qs({url:e,title:t,description:r,image:o,siteName:n,className:a,...s}){return jsxRuntime.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:l("block overflow-hidden rounded-xl border border-gray-200 dark:border-white/10 bg-white dark:bg-white/[0.03] hover:bg-gray-50 dark:hover:bg-white/[0.05] transition-all group",a),...s,children:[o&&jsxRuntime.jsx("div",{className:"aspect-video w-full overflow-hidden border-b border-gray-200 dark:border-white/10",children:jsxRuntime.jsx("img",{src:o,alt:t,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"})}),jsxRuntime.jsxs("div",{className:"p-3 space-y-1",children:[n&&jsxRuntime.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-blue-500",children:n}),jsxRuntime.jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-white line-clamp-1",children:t||e}),r&&jsxRuntime.jsx("p",{className:"text-xs text-gray-500 dark:text-white/50 line-clamp-2",children:r}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-gray-400 pt-1",children:[jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3 w-3"}),jsxRuntime.jsx("span",{className:"truncate",children:new URL(e).hostname})]})]})]})}function Qs({data:e,isOwn:t,onAction:r}){return jsxRuntime.jsxs("div",{className:"space-y-2 max-w-sm",children:[(()=>{if(!e.header)return null;switch(e.header.type){case "text":return jsxRuntime.jsx("h4",{className:"font-bold mb-1 text-sm",children:e.header.text});case "image":return jsxRuntime.jsx("div",{className:"mb-2 rounded-lg overflow-hidden border border-white/10",children:jsxRuntime.jsx("img",{src:e.header.attachment?.url,alt:"Header",className:"w-full h-auto object-cover"})});default:return null}})(),jsxRuntime.jsx("p",{className:"text-sm leading-relaxed",children:e.body}),e.footer&&jsxRuntime.jsx("p",{className:"text-[10px] opacity-50 italic",children:e.footer}),e.type==="button"&&e.buttons&&jsxRuntime.jsx("div",{className:"flex flex-col gap-1 mt-3",children:e.buttons.map(n=>jsxRuntime.jsxs("button",{onClick:()=>r?.(n),className:l("flex items-center justify-center gap-2 p-2.5 rounded-xl text-sm font-medium transition-all","bg-white/10 hover:bg-white/20 border border-white/10 active:scale-[0.98]",t?"text-white":"text-blue-500 dark:text-blue-400"),children:[n.type==="url"&&jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3.5 w-3.5"}),n.type==="call"&&jsxRuntime.jsx(lucideReact.Phone,{className:"h-3.5 w-3.5"}),n.type==="reply"&&jsxRuntime.jsx(lucideReact.Reply,{className:"h-3.5 w-3.5"}),n.text]},n.id))}),e.type==="list"&&e.sections&&jsxRuntime.jsx("div",{className:"mt-3 space-y-3",children:e.sections.map((n,a)=>jsxRuntime.jsxs("div",{className:"space-y-1",children:[n.title&&jsxRuntime.jsx("p",{className:"text-[10px] uppercase tracking-wider opacity-40 font-bold px-1",children:n.title}),jsxRuntime.jsx("div",{className:"flex flex-col gap-1",children:n.rows.map(s=>jsxRuntime.jsxs("button",{onClick:()=>r?.({id:s.id,text:s.title,type:"reply"}),className:"flex flex-col items-start p-3 rounded-xl bg-white/5 hover:bg-white/10 border border-white/5 transition-colors text-left",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:s.title}),s.description&&jsxRuntime.jsx("span",{className:"text-xs opacity-50 line-clamp-1",children:s.description})]},s.id))})]},a))}),e.nativeFlow&&jsxRuntime.jsx("div",{className:"flex flex-col gap-1 mt-3",children:e.nativeFlow.buttons.map((n,a)=>{let s={};try{s=typeof n.buttonParamsJson=="string"?JSON.parse(n.buttonParamsJson):n.buttonParamsJson;}catch{}return jsxRuntime.jsxs("button",{onClick:()=>r?.({id:s.id||n.name,text:s.display_text||n.name,type:"reply",params:s}),className:l("flex items-center justify-center gap-2 p-2.5 rounded-xl text-sm font-medium transition-all","bg-white/10 hover:bg-white/20 border border-white/10 active:scale-[0.98]",t?"text-white":"text-blue-500 dark:text-blue-400"),children:[n.name==="cta_copy"&&jsxRuntime.jsx(lucideReact.Copy,{className:"h-3.5 w-3.5"}),n.name==="cta_url"&&jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3.5 w-3.5"}),n.name==="cta_call"&&jsxRuntime.jsx(lucideReact.Phone,{className:"h-3.5 w-3.5"}),n.name==="single_select"&&jsxRuntime.jsx(lucideReact.Reply,{className:"h-3.5 w-3.5"}),s.display_text||s.title||n.name]},a)})})]})}function ti({cards:e,isOwn:t,onAction:r}){let o=ye__namespace.default.useRef(null),n=a=>{o.current&&o.current.scrollBy({left:a==="left"?-240:240,behavior:"smooth"});};return jsxRuntime.jsxs("div",{className:"relative group/carousel max-w-[300px] sm:max-w-[400px]",children:[jsxRuntime.jsx("div",{ref:o,className:"flex gap-3 overflow-x-auto scrollbar-hide snap-x snap-mandatory pb-2",children:e.map((a,s)=>jsxRuntime.jsxs("div",{className:"flex-shrink-0 w-[240px] snap-start rounded-2xl bg-white/5 dark:bg-white/[0.03] border border-white/10 overflow-hidden flex flex-col",children:[a.header?.attachment&&jsxRuntime.jsx("div",{className:"aspect-video w-full overflow-hidden",children:jsxRuntime.jsx("img",{src:a.header.attachment.url,alt:"Card",className:"w-full h-full object-cover"})}),jsxRuntime.jsxs("div",{className:"p-3 flex-1 flex flex-col",children:[jsxRuntime.jsx("p",{className:"text-sm leading-relaxed mb-1",children:a.body}),a.footer&&jsxRuntime.jsx("p",{className:"text-[10px] opacity-50 italic mb-3",children:a.footer}),jsxRuntime.jsxs("div",{className:"mt-auto flex flex-col gap-1",children:[a.buttons?.map(i=>jsxRuntime.jsxs("button",{onClick:()=>r?.(i),className:l("flex items-center justify-center gap-2 p-2 rounded-lg text-xs font-medium transition-all","bg-white/10 hover:bg-white/20 border border-white/10",t?"text-white":"text-blue-500 dark:text-blue-400"),children:[i.type==="url"&&jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3 w-3"}),i.type==="call"&&jsxRuntime.jsx(lucideReact.Phone,{className:"h-3 w-3"}),i.type==="reply"&&jsxRuntime.jsx(lucideReact.Reply,{className:"h-3 w-3"}),i.text]},i.id)),a.nativeFlow?.buttons.map((i,c)=>{let d={};try{d=typeof i.buttonParamsJson=="string"?JSON.parse(i.buttonParamsJson):i.buttonParamsJson;}catch{}return jsxRuntime.jsxs("button",{onClick:()=>r?.({id:d.id||i.name,text:d.display_text||i.name,type:"reply",params:d}),className:l("flex items-center justify-center gap-2 p-2 rounded-lg text-xs font-medium transition-all","bg-white/10 hover:bg-white/20 border border-white/10",t?"text-white":"text-blue-500 dark:text-blue-400"),children:[i.name==="cta_copy"&&jsxRuntime.jsx(lucideReact.Copy,{className:"h-3 w-3"}),i.name==="cta_url"&&jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3 w-3"}),i.name==="cta_call"&&jsxRuntime.jsx(lucideReact.Phone,{className:"h-3 w-3"}),d.display_text||i.name]},c)})]})]})]},s))}),e.length>1&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:()=>n("left"),className:"absolute left-[-12px] top-1/2 -translate-y-1/2 p-1.5 rounded-full bg-white dark:bg-gray-800 shadow-lg border border-white/10 opacity-0 group-hover/carousel:opacity-100 transition-opacity z-10",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{onClick:()=>n("right"),className:"absolute right-[-12px] top-1/2 -translate-y-1/2 p-1.5 rounded-full bg-white dark:bg-gray-800 shadow-lg border border-white/10 opacity-0 group-hover/carousel:opacity-100 transition-opacity z-10",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]})}function ai({message:e,isOwn:t,showAvatar:r,showStatus:o=true,className:n,onReply:a,onReact:s,onDelete:i,onEdit:c,onForward:d,onCopy:m,onPin:u,onStar:p,onSelect:g,onAction:b,onImageClick:x,isSelected:h}){let f=()=>!t||!o?null:jsxRuntime.jsx(Xs,{status:e.status||"sent",className:"ml-1"}),w=()=>{if(e.type==="revoked")return jsxRuntime.jsxs("p",{className:"text-sm italic opacity-50 flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Trash2,{className:"h-3 w-3"})," This message was deleted"]});switch(e.type){case "audio":return jsxRuntime.jsx(_s,{src:e.attachments?.[0]?.url||"",duration:e.attachments?.[0]?.duration,isMe:t});case "location":return jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(lucideReact.MapPin,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"text-sm font-medium",children:e.location?.address||"Shared Location"})]}),jsxRuntime.jsxs("div",{className:"aspect-video rounded-xl bg-gray-200 dark:bg-white/10 flex items-center justify-center overflow-hidden relative group/map",children:[jsxRuntime.jsx(lucideReact.MapPin,{className:"h-8 w-8 opacity-20 group-hover/map:scale-110 transition-transform"}),jsxRuntime.jsx("div",{className:"absolute inset-0 bg-blue-500/5 group-hover/map:bg-blue-500/10 transition-colors"})]})]});case "contact":return jsxRuntime.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-xl bg-black/5 dark:bg-white/10 border border-white/5",children:[jsxRuntime.jsx("div",{className:"w-10 h-10 rounded-full bg-blue-500 flex items-center justify-center text-white shadow-lg shadow-blue-500/20",children:jsxRuntime.jsx(lucideReact.User,{className:"h-5 w-5"})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-sm font-bold truncate",children:e.contact?.name}),jsxRuntime.jsx("p",{className:"text-xs opacity-60 truncate",children:e.contact?.phone})]})]});case "file":return jsxRuntime.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-xl bg-black/5 dark:bg-white/10 border border-white/5 hover:bg-black/10 dark:hover:bg-white/20 transition-colors cursor-pointer",children:[jsxRuntime.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-500/20 flex items-center justify-center text-blue-500",children:jsxRuntime.jsx(lucideReact.FileText,{className:"h-6 w-6"})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium truncate",children:e.attachments?.[0]?.name||"File"}),jsxRuntime.jsx("p",{className:"text-[10px] opacity-60 uppercase",children:e.attachments?.[0]?.size||"Unknown size"})]})]});case "sticker":return jsxRuntime.jsx("div",{className:"relative group/sticker",children:jsxRuntime.jsx("img",{src:e.attachments?.[0]?.url,alt:"Sticker",className:"w-32 h-32 object-contain"})});case "image":return jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"relative rounded-2xl overflow-hidden border border-white/5 group/image cursor-pointer",onClick:()=>x?.(e.attachments?.[0]?.url||""),children:jsxRuntime.jsx(qo,{src:e.attachments?.[0]?.url||"",alt:e.content||"Image",className:"max-h-[300px] w-auto object-contain bg-black/20 transition-transform duration-300 group-hover/image:scale-105"})}),e.content&&jsxRuntime.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap break-words px-1",children:e.content})]});case "video":return jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("div",{className:"relative rounded-2xl overflow-hidden border border-white/5 bg-black/20 aspect-video flex items-center justify-center group/video",children:jsxRuntime.jsx("video",{src:e.attachments?.[0]?.url,controls:true,className:"max-h-[300px] w-full"})}),e.content&&jsxRuntime.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap break-words px-1",children:e.content})]});case "interactive":return e.interactive?.type==="carousel"&&e.interactive.cards?jsxRuntime.jsx(ti,{cards:e.interactive.cards,isOwn:t,onAction:b}):e.interactive?jsxRuntime.jsx(Qs,{data:e.interactive,isOwn:t,onAction:b}):null;default:let v=/(https?:\/\/[^\s]+)/g,y=e.content.match(v);return jsxRuntime.jsxs("div",{className:"space-y-2",children:[e.replyTo&&jsxRuntime.jsxs("div",{className:"mb-2 p-2 rounded-lg bg-black/5 dark:bg-white/5 border-l-4 border-blue-500 text-xs",children:[jsxRuntime.jsx("p",{className:"font-bold text-blue-500 truncate",children:e.replyTo.senderId===e.senderId?"You":"Other"}),jsxRuntime.jsx("p",{className:"opacity-60 truncate",children:e.replyTo.content})]}),jsxRuntime.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap break-words",children:e.content}),y&&y.map(k=>jsxRuntime.jsx(qs,{url:k},k))]})}};return jsxRuntime.jsxs("div",{className:l("flex w-full mb-4 group/bubble",t?"justify-end":"justify-start",n),children:[!t&&r&&jsxRuntime.jsx("div",{className:"mr-2 mt-auto",children:jsxRuntime.jsx($,{src:e.contact?.avatar,alt:e.contact?.name||"User",className:"w-8 h-8",fallback:(e.contact?.name||e.senderId||"?").charAt(0).toUpperCase()})}),jsxRuntime.jsxs("div",{className:l("relative max-w-[75%] sm:max-w-[60%] transition-all duration-300",h&&"scale-95 opacity-80"),children:[jsxRuntime.jsx(Hn,{preset:"spring",children:jsxRuntime.jsxs("div",{className:l("relative p-3 rounded-2xl shadow-sm backdrop-blur-md border",t?"bg-blue-600/90 dark:bg-blue-500/20 text-white border-blue-500/20 rounded-tr-none":"bg-white/80 dark:bg-white/[0.05] text-gray-900 dark:text-white border-white/10 rounded-tl-none","hover:shadow-lg hover:shadow-blue-500/5 transition-shadow"),children:[!t&&e.remoteJid?.endsWith("@g.us")&&e.contact?.name&&jsxRuntime.jsx("p",{className:"text-[11px] font-bold text-blue-500 dark:text-blue-400 mb-1 truncate",children:e.contact.name}),w(),jsxRuntime.jsxs("div",{className:"flex items-center justify-end gap-1 mt-1 opacity-60 text-[10px]",children:[jsxRuntime.jsx("span",{children:new Date(e.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),f()]}),e.reactions&&Object.keys(e.reactions).length>0&&jsxRuntime.jsx("div",{className:"absolute -bottom-3 right-2 flex -space-x-1",children:Object.entries(e.reactions).map(([v,y])=>jsxRuntime.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-white/10 rounded-full px-1.5 py-0.5 text-xs shadow-sm animate-in zoom-in-50",title:y.join(", "),children:v},v))})]})}),jsxRuntime.jsxs("div",{className:l("absolute top-0 opacity-0 group-hover/bubble:opacity-100 transition-opacity flex items-center gap-1",t?"right-full mr-2":"left-full ml-2"),children:[jsxRuntime.jsxs(at,{children:[jsxRuntime.jsx(nt,{className:"p-1.5 rounded-full hover:bg-gray-100 dark:hover:bg-white/10 text-gray-400 transition-colors",children:jsxRuntime.jsx(lucideReact.Smile,{className:"h-4 w-4"})}),jsxRuntime.jsx(st,{side:"top",className:"flex gap-1 p-1",children:["\u{1F44D}","\u2764\uFE0F","\u{1F602}","\u{1F62E}","\u{1F622}","\u{1F64F}"].map(v=>jsxRuntime.jsx("button",{onClick:()=>s?.(v),className:"p-1.5 hover:bg-gray-100 dark:hover:bg-white/10 rounded-lg transition-transform hover:scale-125",children:v},v))})]}),jsxRuntime.jsxs(at,{children:[jsxRuntime.jsx(nt,{className:"p-1.5 rounded-full hover:bg-gray-100 dark:hover:bg-white/10 text-gray-400 transition-colors",children:jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:"h-4 w-4"})}),jsxRuntime.jsxs(st,{align:t?"end":"start",children:[jsxRuntime.jsxs(V,{onClick:a,children:[jsxRuntime.jsx(lucideReact.Reply,{className:"h-4 w-4 mr-2"})," Reply"]}),jsxRuntime.jsxs(V,{onClick:m,children:[jsxRuntime.jsx(lucideReact.Copy,{className:"h-4 w-4 mr-2"})," Copy"]}),jsxRuntime.jsxs(V,{onClick:d,children:[jsxRuntime.jsx(lucideReact.Forward,{className:"h-4 w-4 mr-2"})," Forward"]}),jsxRuntime.jsxs(V,{onClick:u,children:[jsxRuntime.jsx(lucideReact.Pin,{className:"h-4 w-4 mr-2"})," Pin"]}),jsxRuntime.jsxs(V,{onClick:()=>p?.(true),children:[jsxRuntime.jsx(lucideReact.Star,{className:"h-4 w-4 mr-2"})," Star"]}),t&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(V,{onClick:c,children:[jsxRuntime.jsx(lucideReact.Edit2,{className:"h-4 w-4 mr-2"})," Edit"]}),jsxRuntime.jsxs(V,{className:"text-red-500",onClick:i,children:[jsxRuntime.jsx(lucideReact.Trash2,{className:"h-4 w-4 mr-2"})," Delete"]})]})]})]})]})]})]})}function IL({messages:e,currentUserId:t,className:r,onReply:o,onReact:n,onDelete:a,onEdit:s,onForward:i,onCopy:c,onPin:d,onStar:m,onSelect:u,onAction:p,onImageClick:g,onLoadMore:b,hasMore:x,isLoadingMore:h,selectedMessages:f=[],dateFormat:w="MMMM d, yyyy",groupByDate:v=true,...y}){let[k,N]=ye.useState(true),C=ye.useRef(null),T=ye.useRef(null),E=ye.useCallback((M="auto")=>{T.current?.scrollIntoView({behavior:M});},[]);ye.useEffect(()=>{k&&E("smooth");},[e.length,k,E]);let A=M=>{let S=M.currentTarget,I=Math.abs(S.scrollHeight-S.clientHeight-S.scrollTop)<100;N(I),S.scrollTop===0&&x&&!h&&b&&b();};return e.length===0&&!h?jsxRuntime.jsx("div",{className:l("flex-1 flex items-center justify-center p-8 text-center text-gray-500 dark:text-white/40",r),...y,children:jsxRuntime.jsxs("div",{className:"max-w-sm space-y-4",children:[jsxRuntime.jsx("div",{className:"w-24 h-24 bg-blue-500/10 dark:bg-white/[0.03] rounded-full flex items-center justify-center mx-auto mb-6 animate-pulse",children:jsxRuntime.jsx(lucideReact.MessageSquare,{className:"h-12 w-12 text-blue-500"})}),jsxRuntime.jsx("h3",{className:"text-xl font-medium text-gray-900 dark:text-white",children:"No messages yet"}),jsxRuntime.jsx("p",{children:"Start the conversation by sending a message below."})]})}):jsxRuntime.jsxs("div",{className:l("flex-1 relative overflow-hidden",r),...y,children:[jsxRuntime.jsx("div",{ref:C,onScroll:A,className:"h-full overflow-y-auto p-4 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:bg-white/10 [&::-webkit-scrollbar-thumb]:rounded-full hover:[&::-webkit-scrollbar-thumb]:bg-white/20 [&::-webkit-scrollbar-track]:bg-transparent",children:jsxRuntime.jsxs("div",{className:"flex flex-col gap-4",children:[e.map((M,S)=>{let I=M.senderId===t,B=S>0?e[S-1]:null,R=!I&&(!B||B.senderId!==M.senderId);return jsxRuntime.jsx(ai,{message:M,isOwn:I,showAvatar:R,onReply:()=>o?.(M),onReact:K=>n?.(M,K),onDelete:()=>a?.(M),onEdit:()=>s?.(M),onForward:()=>i?.(M),onCopy:()=>c?.(M),onPin:()=>d?.(M),onStar:K=>m?.(M,K),onSelect:()=>u?.(M),onAction:K=>p?.(M,K),onImageClick:g,isSelected:f.includes(M.id)},M.id)}),jsxRuntime.jsx("div",{ref:T})]})}),!k&&jsxRuntime.jsx("button",{onClick:()=>E("smooth"),className:"absolute bottom-6 right-6 p-3 rounded-full bg-white dark:bg-white/10 backdrop-blur border border-gray-200 dark:border-white/10 shadow-lg text-gray-600 dark:text-white hover:scale-110 transition-all z-10",children:jsxRuntime.jsx(lucideReact.ArrowDown,{className:"h-5 w-5"})})]})}function si(){let[e,t]=ye.useState(false),[r,o]=ye.useState(0),[n,a]=ye.useState(null),[s,i]=ye.useState(null),c=ye.useRef(null),d=ye.useRef(null),m=ye.useRef([]),u=ye.useCallback(async()=>{try{let x=await navigator.mediaDevices.getUserMedia({audio:!0}),h=MediaRecorder.isTypeSupported("audio/ogg; codecs=opus")?"audio/ogg; codecs=opus":"audio/webm";c.current=new MediaRecorder(x,{mimeType:h}),m.current=[],c.current.ondataavailable=f=>{f.data.size>0&&m.current.push(f.data);},c.current.onstop=()=>{let f=new Blob(m.current,{type:h}),w=URL.createObjectURL(f);a(f),i(w),x.getTracks().forEach(v=>v.stop());},c.current.start(),t(!0),o(0),d.current=window.setInterval(()=>{o(f=>f+1);},1e3);}catch(x){throw console.error("Failed to start recording",x),x}},[]),p=ye.useCallback(()=>{c.current&&e&&(c.current.stop(),t(false),d.current&&clearInterval(d.current));},[e]),g=ye.useCallback(()=>{c.current&&e&&(c.current.stop(),t(false),d.current&&clearInterval(d.current),a(null),i(null),o(0));},[e]),b=ye.useCallback(()=>{a(null),i(null),o(0);},[]);return {isRecording:e,duration:r,audioBlob:n,audioUrl:s,startRecording:u,stopRecording:p,cancelRecording:g,clearAudio:b}}function ii({onSend:e,onCancel:t,className:r,...o}){let{isRecording:n,duration:a,audioBlob:s,startRecording:i,stopRecording:c,cancelRecording:d}=si();ye.useEffect(()=>(i(),()=>d()),[]);let m=u=>{let p=Math.floor(u/60),g=u%60;return `${p}:${g.toString().padStart(2,"0")}`};return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3 p-2 rounded-2xl bg-gray-100 dark:bg-white/[0.03] border border-gray-200 dark:border-white/10 animate-in slide-in-from-bottom-2",r),...o,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-xl bg-red-500/10 text-red-500",children:[jsxRuntime.jsx("div",{className:"w-2 h-2 rounded-full bg-red-500 animate-pulse"}),jsxRuntime.jsx("span",{className:"text-sm font-mono font-bold",children:m(a)})]}),jsxRuntime.jsx("div",{className:"flex-1 h-8 flex items-center gap-0.5 px-2",children:[...Array(20)].map((u,p)=>jsxRuntime.jsx("div",{className:"w-1 bg-red-500/40 rounded-full transition-all duration-150",style:{height:n?`${20+Math.random()*80}%`:"20%",animationDelay:`${p*.05}s`}},p))}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("button",{onClick:()=>{d(),t();},className:"p-2 rounded-full hover:bg-gray-200 dark:hover:bg-white/10 text-gray-500 transition-colors",children:jsxRuntime.jsx(lucideReact.Trash2,{className:"h-5 w-5"})}),n?jsxRuntime.jsx(L,{size:"icon",variant:"ghost",onClick:c,className:"rounded-full bg-red-500 text-white hover:bg-red-600",children:jsxRuntime.jsx(lucideReact.Square,{className:"h-4 w-4 fill-current"})}):jsxRuntime.jsx(L,{size:"icon",onClick:()=>s&&e(s,a),className:"rounded-full bg-blue-500 text-white hover:bg-blue-600",children:jsxRuntime.jsx(lucideReact.Send,{className:"h-4 w-4"})})]})]})}function oP({value:e,onValueChange:t,onSend:r,onChange:o,onAttach:n,onMic:a,onVoiceEnd:s,onEmoji:i,onGif:c,onLocation:d,onContact:m,onPoll:u,onPix:p,onCarousel:g,onButtons:b,onList:x,onCancelReply:h,placeholder:f="Type a message...",users:w=[],replyingTo:v,isRecording:y,maxLength:k,disabled:N,className:C,...T}){let[E,A]=ye.useState(""),M=e!==void 0?e:E,S=P=>{t?t(P):A(P);},[I,B]=ye.useState(false),[R,K]=ye.useState(null),[me,Z]=ye.useState(0),re=ye.useRef(null),Le=ye.useMemo(()=>R===null?[]:w.filter(P=>P.name.toLowerCase().includes(R.toLowerCase())).slice(0,5),[w,R]),wt=P=>{if(N)return;let H=P.target.value;if(k&&H.length>k)return;S(H),o?.(H);H[P.target.selectionStart-1];let Je=H.slice(0,P.target.selectionStart).match(/@(\w*)$/);Je?(K(Je[1]||""),Z(0)):K(null),re.current&&(re.current.style.height="auto",re.current.style.height=`${Math.min(re.current.scrollHeight,120)}px`);},Kr=P=>{if(!re.current)return;let H=re.current.selectionStart,O=M.slice(0,H).replace(/@\w*$/,`@${P.name} `),oe=M.slice(H);S(O+oe),K(null),re.current.focus();},_=P=>{if(!N){if(R!==null&&Le.length>0){P.key==="ArrowDown"?(P.preventDefault(),Z(H=>(H+1)%Le.length)):P.key==="ArrowUp"?(P.preventDefault(),Z(H=>(H-1+Le.length)%Le.length)):P.key==="Enter"||P.key==="Tab"?(P.preventDefault(),Kr(Le[me])):P.key==="Escape"&&K(null);return}P.key==="Enter"&&!P.shiftKey&&(P.preventDefault(),Y());}},Y=()=>{N||!M.trim()&&!y||(r?.(M),S(""),re.current&&(re.current.style.height="auto"));};return jsxRuntime.jsxs("div",{className:l("p-4 bg-white/80 dark:bg-black/40 backdrop-blur border-t border-gray-200 dark:border-white/10 relative",C),...T,children:[R!==null&&Le.length>0&&jsxRuntime.jsx("div",{className:"absolute bottom-full left-4 mb-2 w-64 bg-white dark:bg-gray-900 border border-gray-200 dark:border-white/10 rounded-2xl shadow-2xl overflow-hidden animate-in slide-in-from-bottom-4",children:Le.map((P,H)=>jsxRuntime.jsxs("button",{onClick:()=>Kr(P),className:l("w-full flex items-center gap-3 p-3 text-left transition-colors",H===me?"bg-blue-500/10 dark:bg-white/10":"hover:bg-gray-50 dark:hover:bg-white/5"),children:[jsxRuntime.jsx($,{src:P.avatar,alt:P.name,className:"w-8 h-8"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-sm font-bold dark:text-white",children:P.name}),jsxRuntime.jsxs("p",{className:"text-xs text-gray-500 dark:text-white/40",children:["@",P.name.toLowerCase().replace(/\s/g,"")]})]})]},P.id))}),v&&jsxRuntime.jsxs("div",{className:"mb-3 flex items-center justify-between p-3 rounded-2xl bg-blue-500/5 border-l-4 border-blue-500 animate-in slide-in-from-bottom-2",children:[jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-xs font-bold text-blue-500",children:"Replying to"}),jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-white/60 truncate",children:v.content})]}),jsxRuntime.jsx("button",{onClick:h,className:"p-1.5 rounded-full hover:bg-gray-200 dark:hover:bg-white/10 text-gray-400",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}),jsxRuntime.jsxs("div",{className:"flex items-end gap-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[jsxRuntime.jsxs(at,{children:[jsxRuntime.jsx(nt,{disabled:N,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50 transition-colors disabled:opacity-50",children:jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-5 w-5"})}),jsxRuntime.jsxs(st,{align:"start",side:"top",children:[jsxRuntime.jsxs(V,{onClick:n,children:[jsxRuntime.jsx(lucideReact.Image,{className:"h-4 w-4 mr-2"})," Image & Video"]}),jsxRuntime.jsxs(V,{onClick:n,children:[jsxRuntime.jsx(lucideReact.Paperclip,{className:"h-4 w-4 mr-2"})," Document"]}),jsxRuntime.jsxs(V,{onClick:d,children:[jsxRuntime.jsx(lucideReact.MapPin,{className:"h-4 w-4 mr-2"})," Location"]}),jsxRuntime.jsxs(V,{onClick:m,children:[jsxRuntime.jsx(lucideReact.AtSign,{className:"h-4 w-4 mr-2"})," Contact"]}),jsxRuntime.jsxs(V,{onClick:u,children:[jsxRuntime.jsx(lucideReact.AtSign,{className:"h-4 w-4 mr-2"})," Poll"]}),jsxRuntime.jsxs(V,{onClick:p,children:[jsxRuntime.jsx(lucideReact.AtSign,{className:"h-4 w-4 mr-2"})," PIX"]}),jsxRuntime.jsxs(V,{onClick:g,children:[jsxRuntime.jsx(lucideReact.Layout,{className:"h-4 w-4 mr-2"})," Carousel"]}),jsxRuntime.jsxs(V,{onClick:b,children:[jsxRuntime.jsx(lucideReact.Layout,{className:"h-4 w-4 mr-2"})," Buttons"]}),jsxRuntime.jsxs(V,{onClick:x,children:[jsxRuntime.jsx(lucideReact.List,{className:"h-4 w-4 mr-2"})," List Menu"]}),jsxRuntime.jsxs(V,{onClick:c,children:[jsxRuntime.jsx(lucideReact.Gift,{className:"h-4 w-4 mr-2"})," GIF"]})]})]}),jsxRuntime.jsx("button",{onClick:i,disabled:N,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50 transition-colors disabled:opacity-50",children:jsxRuntime.jsx(lucideReact.Smile,{className:"h-5 w-5"})})]}),jsxRuntime.jsx("div",{className:"flex-1 relative",children:y?jsxRuntime.jsx(ii,{onSend:(P,H)=>s?.(P,H),onCancel:()=>h?.()}):jsxRuntime.jsx("textarea",{ref:re,value:M,onChange:wt,onKeyDown:_,placeholder:f,disabled:N,rows:1,className:"w-full p-2.5 max-h-[120px] rounded-2xl bg-gray-100 dark:bg-white/[0.03] border border-transparent focus:border-blue-500/50 focus:bg-white dark:focus:bg-white/[0.06] text-sm resize-none transition-all outline-none dark:text-white placeholder:text-gray-400"})}),jsxRuntime.jsx("div",{className:"flex items-center gap-1 mb-1",children:M.trim()||y?jsxRuntime.jsx("button",{onClick:Y,disabled:N,className:"p-2.5 rounded-full bg-blue-500 text-white hover:bg-blue-600 shadow-lg shadow-blue-500/20 transition-all active:scale-90",children:jsxRuntime.jsx(lucideReact.Send,{className:"h-5 w-5"})}):jsxRuntime.jsx("button",{onClick:a,disabled:N,className:"p-2.5 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-500 dark:text-white/50 transition-colors disabled:opacity-50",children:jsxRuntime.jsx(lucideReact.Mic,{className:"h-5 w-5"})})})]})]})}function fP({user:e,onClose:t,className:r,...o}){return jsxRuntime.jsxs("div",{className:l("w-80 border-l border-gray-200 dark:border-white/10 bg-white dark:bg-black/20 flex flex-col",r),...o,children:[jsxRuntime.jsxs("div",{className:"h-16 flex items-center px-4 border-b border-gray-200 dark:border-white/10",children:[jsxRuntime.jsx("button",{onClick:t,className:"p-2 -ml-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5 text-gray-500"})}),jsxRuntime.jsx("span",{className:"ml-2 font-semibold text-gray-900 dark:text-white",children:"Contact Info"})]}),jsxRuntime.jsxs(it,{className:"flex-1",children:[jsxRuntime.jsxs("div",{className:"p-6 flex flex-col items-center text-center",children:[jsxRuntime.jsx($,{src:e.avatar,alt:e.name,fallback:e.name[0],className:"h-24 w-24 mb-4 text-2xl"}),jsxRuntime.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:e.name}),jsxRuntime.jsx("p",{className:"text-sm text-gray-500 dark:text-white/50 mt-1",children:e.phone||"+1 (555) 000-0000"}),jsxRuntime.jsxs("div",{className:"mt-6 w-full",children:[jsxRuntime.jsx("p",{className:"text-sm text-gray-500 dark:text-white/50 mb-1 text-left",children:"About"}),jsxRuntime.jsx("p",{className:"text-sm text-gray-900 dark:text-white text-left",children:e.bio||"Hey there! I am using Pixon Chat."})]})]}),jsxRuntime.jsx(Dr,{}),jsxRuntime.jsxs("div",{className:"p-4 space-y-4",children:[jsxRuntime.jsx("h3",{className:"text-xs font-semibold text-gray-500 dark:text-white/40 uppercase tracking-wider",children:"Media & Docs"}),jsxRuntime.jsx("div",{className:"grid grid-cols-3 gap-2",children:[1,2,3,4,5,6].map(n=>jsxRuntime.jsxs("div",{className:"aspect-square rounded-2xl bg-gray-100 dark:bg-white/[0.03] overflow-hidden relative group cursor-pointer",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-gray-400",children:jsxRuntime.jsx(lucideReact.Image,{className:"h-6 w-6"})}),jsxRuntime.jsx("div",{className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity"})]},n))})]}),jsxRuntime.jsx(Dr,{}),jsxRuntime.jsx("div",{className:"p-4 space-y-4",children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 text-gray-700 dark:text-white/80",children:[jsxRuntime.jsx(lucideReact.Bell,{className:"h-5 w-5"}),jsxRuntime.jsx("span",{className:"text-sm font-medium",children:"Mute Notifications"})]}),jsxRuntime.jsx(Eo,{})]})}),jsxRuntime.jsx(Dr,{}),jsxRuntime.jsxs("div",{className:"p-4 space-y-2",children:[jsxRuntime.jsxs("button",{className:"w-full flex items-center gap-3 p-3 rounded-2xl hover:bg-red-50 dark:hover:bg-red-500/10 text-red-600 dark:text-red-400 transition-colors text-sm font-medium",children:[jsxRuntime.jsx(lucideReact.Ban,{className:"h-5 w-5"}),"Block ",e.name]}),jsxRuntime.jsxs("button",{className:"w-full flex items-center gap-3 p-3 rounded-2xl hover:bg-red-50 dark:hover:bg-red-500/10 text-red-600 dark:text-red-400 transition-colors text-sm font-medium",children:[jsxRuntime.jsx(lucideReact.Trash2,{className:"h-5 w-5"}),"Delete Chat"]})]})]})]})}function xP({users:e=[],variant:t="default",className:r,...o}){let n=e.length===0?"Someone is typing":e.length===1?`${e[0]} is typing`:e.length===2?`${e[0]} and ${e[1]} are typing`:`${e[0]} and ${e.length-1} others are typing`;return t==="bubble"?jsxRuntime.jsx("div",{className:l("flex items-center gap-1 px-3 py-2 rounded-2xl bg-gray-100 dark:bg-white/[0.03] w-fit",r),...o,children:jsxRuntime.jsxs("div",{className:"flex gap-1",children:[jsxRuntime.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-400 animate-bounce [animation-delay:-0.3s]"}),jsxRuntime.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-400 animate-bounce [animation-delay:-0.15s]"}),jsxRuntime.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-gray-400 animate-bounce"})]})}):jsxRuntime.jsxs("div",{className:l("flex items-center gap-2 text-xs text-gray-500 dark:text-white/40 italic",r),...o,children:[jsxRuntime.jsxs("div",{className:"flex gap-0.5",children:[jsxRuntime.jsx("span",{className:"w-1 h-1 rounded-full bg-current animate-bounce [animation-delay:-0.3s]"}),jsxRuntime.jsx("span",{className:"w-1 h-1 rounded-full bg-current animate-bounce [animation-delay:-0.15s]"}),jsxRuntime.jsx("span",{className:"w-1 h-1 rounded-full bg-current animate-bounce"})]}),n]})}function NP({message:e,onCancel:t,className:r,...o}){return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3 p-2 rounded-xl bg-blue-500/5 border-l-4 border-blue-500 animate-in slide-in-from-bottom-2",r),...o,children:[jsxRuntime.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/10 text-blue-500",children:jsxRuntime.jsx(lucideReact.Reply,{className:"h-4 w-4"})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-xs font-bold text-blue-500",children:"Replying to"}),jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-white/60 truncate",children:e.content})]}),t&&jsxRuntime.jsx("button",{onClick:t,className:"p-1 rounded-full hover:bg-gray-200 dark:hover:bg-white/10 text-gray-400 transition-colors",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})}function LP({type:e="info",message:t,action:r,onClose:o,className:n,...a}){let s={info:lucideReact.Info,warning:lucideReact.AlertCircle,error:lucideReact.AlertCircle,success:lucideReact.CheckCircle2},i={info:"bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/20",warning:"bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/20",error:"bg-red-500/10 text-red-600 dark:text-red-400 border-red-500/20",success:"bg-green-500/10 text-green-600 dark:text-green-400 border-green-500/20"},c=s[e];return jsxRuntime.jsxs("div",{className:l("flex items-center gap-3 px-4 py-2 border-b text-sm animate-in slide-in-from-top duration-300",i[e],n),...a,children:[jsxRuntime.jsx(c,{className:"h-4 w-4 shrink-0"}),jsxRuntime.jsx("p",{className:"flex-1 font-medium",children:t}),r&&jsxRuntime.jsx("button",{onClick:r.onClick,className:"text-xs font-bold uppercase tracking-wider hover:underline",children:r.label}),o&&jsxRuntime.jsx("button",{onClick:o,className:"p-1 rounded-full hover:bg-black/5 dark:hover:bg-white/5 transition-colors",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})}function HP({date:e,className:t,...r}){return jsxRuntime.jsx("div",{className:l("flex justify-center sticky top-0 z-10 py-4",t),...r,children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2 px-3 py-1 rounded-full bg-gray-100/80 dark:bg-white/5 backdrop-blur text-[10px] font-bold uppercase tracking-wider text-gray-500 dark:text-white/40 border border-gray-200 dark:border-white/10 shadow-sm",children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"h-3 w-3"}),e]})})}function OP({status:e="offline",size:t="md",className:r,...o}){let n={online:"bg-green-500",offline:"bg-gray-400",away:"bg-amber-500",busy:"bg-red-500"},a={sm:"h-2 w-2",md:"h-3 w-3",lg:"h-4 w-4"};return jsxRuntime.jsx("span",{className:l("rounded-full border-2 border-white dark:border-black shrink-0",n[e],a[t],e==="online"&&"animate-pulse",r),...o})}function FP({content:e,className:t,...r}){return jsxRuntime.jsx("div",{className:l("flex justify-center py-2",t),...r,children:jsxRuntime.jsx("div",{className:"px-4 py-1 rounded-lg bg-gray-100/50 dark:bg-white/[0.02] text-[11px] font-medium text-gray-500 dark:text-white/30 border border-gray-200/50 dark:border-white/5",children:e})})}function qP({group:e,onBack:t,onInfo:r,isTyping:o,typingUsers:n=[],className:a,...s}){let i=n.length>0?`${n.join(", ")} ${n.length===1?"is":"are"} typing...`:"typing...";return jsxRuntime.jsxs("div",{className:l("flex h-16 items-center justify-between border-b border-gray-200 dark:border-white/10 bg-white/80 dark:bg-black/40 backdrop-blur px-4 sticky top-0 z-10",a),...s,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[t&&jsxRuntime.jsx("button",{onClick:t,className:"md:hidden p-2 -ml-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06]",children:jsxRuntime.jsx(lucideReact.ArrowLeft,{className:"h-5 w-5 text-gray-600 dark:text-white/70"})}),jsxRuntime.jsx("div",{className:"relative cursor-pointer",onClick:r,children:jsxRuntime.jsxs("div",{className:"flex -space-x-3",children:[e.members.slice(0,2).map((c,d)=>jsxRuntime.jsx($,{src:c.avatar,alt:c.name,fallback:c.name[0],className:l("border-2 border-white dark:border-black",d===0?"z-10":"z-0")},c.id)),e.members.length>2&&jsxRuntime.jsxs("div",{className:"w-10 h-10 rounded-full bg-gray-200 dark:bg-white/10 border-2 border-white dark:border-black flex items-center justify-center text-[10px] font-bold text-gray-600 dark:text-white/60 z-0",children:["+",e.members.length-2]})]})}),jsxRuntime.jsxs("div",{className:"cursor-pointer min-w-0",onClick:r,children:[jsxRuntime.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white leading-none truncate",children:e.name}),jsxRuntime.jsx("p",{className:l("text-xs mt-1 truncate transition-colors",o?"text-blue-500 font-medium animate-pulse":"text-gray-500 dark:text-white/50"),children:o?i:`${e.members.length} members`})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("button",{className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Phone,{className:"h-5 w-5"})}),jsxRuntime.jsx("button",{className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.Video,{className:"h-5 w-5"})}),jsxRuntime.jsx("button",{onClick:r,className:"p-2 rounded-full hover:bg-gray-100 dark:hover:bg-white/[0.06] text-gray-600 dark:text-white/60 transition-colors",children:jsxRuntime.jsx(lucideReact.MoreVertical,{className:"h-5 w-5"})})]})]})}function eE({users:e,selectedIndex:t,onSelect:r,className:o,...n}){return e.length===0?null:jsxRuntime.jsx(ie,{className:l("w-64 overflow-hidden shadow-xl animate-in fade-in slide-in-from-bottom-2",o),...n,children:jsxRuntime.jsxs("div",{className:"p-1",children:[jsxRuntime.jsx("div",{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-wider text-gray-400 border-b border-gray-200 dark:border-white/5 mb-1",children:"Mention someone"}),e.map((a,s)=>jsxRuntime.jsxs("button",{onClick:()=>r(a),className:l("w-full flex items-center gap-2 p-2 rounded-xl text-left transition-colors",s===t?"bg-blue-500 text-white":"hover:bg-gray-100 dark:hover:bg-white/[0.06]"),children:[jsxRuntime.jsx($,{src:a.avatar,alt:a.name,fallback:a.name[0],size:"sm"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium truncate",children:a.name}),a.status&&jsxRuntime.jsx("p",{className:l("text-[10px]",s===t?"text-white/70":"text-gray-500"),children:a.status})]})]},a.id))]})})}var og=[{name:"Smileys",emojis:["\u{1F600}","\u{1F603}","\u{1F604}","\u{1F601}","\u{1F606}","\u{1F605}","\u{1F602}","\u{1F923}","\u{1F60A}","\u{1F607}","\u{1F642}","\u{1F643}","\u{1F609}","\u{1F60C}","\u{1F60D}","\u{1F970}","\u{1F618}","\u{1F617}","\u{1F619}","\u{1F61A}","\u{1F60B}","\u{1F61B}","\u{1F61D}","\u{1F61C}","\u{1F92A}","\u{1F928}","\u{1F9D0}","\u{1F913}","\u{1F60E}","\u{1F929}","\u{1F973}","\u{1F60F}","\u{1F612}","\u{1F61E}","\u{1F614}","\u{1F61F}","\u{1F615}","\u{1F641}","\u2639\uFE0F","\u{1F623}","\u{1F616}","\u{1F62B}","\u{1F629}","\u{1F97A}","\u{1F622}","\u{1F62D}","\u{1F624}","\u{1F620}","\u{1F621}","\u{1F92C}","\u{1F92F}","\u{1F633}","\u{1F975}","\u{1F976}","\u{1F631}","\u{1F628}","\u{1F630}","\u{1F625}","\u{1F613}","\u{1F917}","\u{1F914}","\u{1F92D}","\u{1F92B}","\u{1F925}","\u{1F636}","\u{1F610}","\u{1F611}","\u{1F62C}","\u{1F644}","\u{1F62F}","\u{1F626}","\u{1F627}","\u{1F62E}","\u{1F632}","\u{1F971}","\u{1F634}","\u{1F924}","\u{1F62A}","\u{1F635}","\u{1F910}","\u{1F974}","\u{1F922}","\u{1F92E}","\u{1F927}","\u{1F637}","\u{1F912}","\u{1F915}"]},{name:"Hearts",emojis:["\u2764\uFE0F","\u{1F9E1}","\u{1F49B}","\u{1F49A}","\u{1F499}","\u{1F49C}","\u{1F5A4}","\u{1F90D}","\u{1F90E}","\u{1F494}","\u2763\uFE0F","\u{1F495}","\u{1F49E}","\u{1F493}","\u{1F497}","\u{1F496}","\u{1F498}","\u{1F49D}","\u{1F49F}"]},{name:"Gestures",emojis:["\u{1F44D}","\u{1F44E}","\u{1F44C}","\u{1F90C}","\u{1F90F}","\u270C\uFE0F","\u{1F91E}","\u{1F91F}","\u{1F918}","\u{1F919}","\u{1F448}","\u{1F449}","\u{1F446}","\u{1F595}","\u{1F447}","\u261D\uFE0F","\u270A","\u{1F44A}","\u{1F91B}","\u{1F91C}","\u{1F44F}","\u{1F64C}","\u{1F450}","\u{1F932}","\u{1F91D}","\u{1F64F}","\u270D\uFE0F","\u{1F485}","\u{1F933}","\u{1F4AA}","\u{1F9BE}","\u{1F9B5}","\u{1F9BF}","\u{1F9B6}","\u{1F463}","\u{1F442}","\u{1F9BB}","\u{1F443}","\u{1F9E0}","\u{1FAC0}","\u{1FAC1}","\u{1F9B7}","\u{1F9B4}","\u{1F440}","\u{1F441}\uFE0F","\u{1F445}","\u{1F444}"]},{name:"Activities",emojis:["\u26BD","\u{1F3C0}","\u{1F3C8}","\u26BE","\u{1F94E}","\u{1F3BE}","\u{1F3D0}","\u{1F3C9}","\u{1F94F}","\u{1F3B1}","\u{1FA80}","\u{1F3D3}","\u{1F3F8}","\u{1F3D2}","\u{1F3D1}","\u{1F94D}","\u{1F3CF}","\u{1FA83}","\u{1F945}","\u26F3","\u{1FA81}","\u{1F3F9}","\u{1F3A3}","\u{1F93F}","\u{1F94A}","\u{1F94B}","\u{1F3BD}","\u{1F6F9}","\u{1F6FC}","\u{1F6F7}","\u26F8\uFE0F","\u{1F3BF}","\u26F7\uFE0F","\u{1F3C2}","\u{1FA82}","\u{1F3CB}\uFE0F","\u{1F93C}","\u{1F938}","\u26F9\uFE0F","\u{1F93A}","\u{1F93E}","\u{1F3CC}\uFE0F","\u{1F3C7}","\u{1F9D8}","\u{1F3C4}","\u{1F3CA}","\u{1F93D}","\u{1F6A3}","\u{1F9D7}","\u{1F6B5}","\u{1F6B4}"]},{name:"Nature",emojis:["\u{1F436}","\u{1F431}","\u{1F42D}","\u{1F439}","\u{1F430}","\u{1F98A}","\u{1F43B}","\u{1F43C}","\u{1F43B}\u200D\u2744\uFE0F","\u{1F428}","\u{1F42F}","\u{1F981}","\u{1F42E}","\u{1F437}","\u{1F43D}","\u{1F438}","\u{1F435}","\u{1F648}","\u{1F649}","\u{1F64A}","\u{1F412}","\u{1F414}","\u{1F427}","\u{1F426}","\u{1F424}","\u{1F423}","\u{1F425}","\u{1F986}","\u{1F985}","\u{1F989}","\u{1F987}","\u{1F43A}","\u{1F417}","\u{1F434}","\u{1F984}","\u{1F41D}","\u{1FAB1}","\u{1F41B}","\u{1F98B}","\u{1F40C}","\u{1F41E}","\u{1F41C}","\u{1F99F}","\u{1FAB0}","\u{1FAB2}","\u{1FAB3}","\u{1F997}","\u{1F577}\uFE0F","\u{1F578}\uFE0F","\u{1F982}","\u{1F422}","\u{1F40D}","\u{1F98E}","\u{1F996}","\u{1F995}","\u{1F419}","\u{1F991}","\u{1F990}","\u{1F99E}","\u{1F980}","\u{1F421}","\u{1F420}","\u{1F41F}","\u{1F42C}","\u{1F433}","\u{1F40B}","\u{1F988}","\u{1F40A}","\u{1F405}","\u{1F406}","\u{1F993}","\u{1F98D}","\u{1F9A7}","\u{1F9A3}","\u{1F418}","\u{1F99B}","\u{1F98F}","\u{1F42A}","\u{1F42B}","\u{1F992}","\u{1F998}","\u{1F9AC}","\u{1F403}","\u{1F402}","\u{1F404}","\u{1F40E}","\u{1F416}","\u{1F40F}","\u{1F411}","\u{1F410}","\u{1F98C}","\u{1F415}","\u{1F429}","\u{1F9AE}","\u{1F415}\u200D\u{1F9BA}","\u{1F408}","\u{1F408}\u200D\u2B1B","\u{1F413}","\u{1F983}","\u{1F99A}","\u{1F99C}","\u{1F9A2}","\u{1F9A9}","\u{1F54A}\uFE0F","\u{1F407}","\u{1F99D}","\u{1F9A8}","\u{1F9A1}","\u{1F9AB}","\u{1F9A6}","\u{1F9A5}","\u{1F401}","\u{1F400}","\u{1F43F}\uFE0F","\u{1F994}","\u{1F43E}","\u{1F409}","\u{1F432}","\u{1F335}","\u{1F384}","\u{1F332}","\u{1F333}","\u{1F334}","\u{1FAB5}","\u{1F331}","\u{1F33F}","\u2618\uFE0F","\u{1F340}","\u{1F38D}","\u{1FAB4}","\u{1F38B}","\u{1F343}","\u{1F342}","\u{1F341}","\u{1F344}","\u{1F41A}","\u{1FAA8}","\u{1F33E}","\u{1F490}","\u{1F337}","\u{1F339}","\u{1F940}","\u{1F33A}","\u{1F338}","\u{1F33C}","\u{1F33B}","\u{1F31E}","\u{1F31D}","\u{1F31B}","\u{1F31C}","\u{1F31A}","\u{1F315}","\u{1F316}","\u{1F317}","\u{1F318}","\u{1F311}","\u{1F312}","\u{1F313}","\u{1F314}","\u{1F319}","\u{1F30E}","\u{1F30D}","\u{1F30F}","\u{1FA90}","\u{1F4AB}","\u2B50\uFE0F","\u{1F31F}","\u2728","\u26A1\uFE0F","\u2604\uFE0F","\u{1F4A5}","\u{1F525}","\u{1F32A}\uFE0F","\u{1F308}","\u2600\uFE0F","\u{1F324}\uFE0F","\u26C5\uFE0F","\u{1F325}\uFE0F","\u2601\uFE0F","\u{1F326}\uFE0F","\u{1F327}\uFE0F","\u26C8\uFE0F","\u{1F329}\uFE0F","\u{1F328}\uFE0F","\u2744\uFE0F","\u2603\uFE0F","\u26C4\uFE0F","\u{1F32C}\uFE0F","\u{1F4A8}","\u{1F4A7}","\u{1F4A6}","\u2614\uFE0F","\u2602\uFE0F","\u{1F30A}","\u{1F32B}\uFE0F"]}];function lE({onSelect:e,className:t,...r}){let[o,n]=ye.useState(""),a=og.map(s=>({...s,emojis:s.emojis.filter(i=>o===""||i.includes(o))})).filter(s=>s.emojis.length>0);return jsxRuntime.jsxs(ie,{className:l("w-72 h-96 flex flex-col overflow-hidden shadow-2xl",t),...r,children:[jsxRuntime.jsx("div",{className:"p-3 border-b border-gray-200 dark:border-white/10",children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),jsxRuntime.jsx("input",{type:"text",value:o,onChange:s=>n(s.target.value),placeholder:"Search emoji...",className:"w-full h-8 pl-8 pr-3 rounded-lg bg-gray-100 dark:bg-white/5 text-xs focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all"})]})}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto p-2 custom-scrollbar",children:a.map(s=>jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsx("h4",{className:"text-[10px] font-bold uppercase tracking-wider text-gray-400 px-2 mb-2",children:s.name}),jsxRuntime.jsx("div",{className:"grid grid-cols-8 gap-1",children:s.emojis.map(i=>jsxRuntime.jsx("button",{onClick:()=>e(i),className:"h-8 w-8 flex items-center justify-center rounded-lg hover:bg-gray-100 dark:hover:bg-white/10 text-lg transition-colors",children:i},i))})]},s.name))})]})}function bE({onSearch:e,results:t,onResultClick:r,onClose:o,className:n,...a}){let[s,i]=ye.useState(""),c=d=>{let m=d.target.value;i(m),e(m);};return jsxRuntime.jsxs("div",{className:l("flex flex-col h-full bg-white dark:bg-gray-900 border-l border-gray-200 dark:border-white/10 animate-in slide-in-from-right duration-300",n),...a,children:[jsxRuntime.jsxs("div",{className:"p-4 border-b border-gray-200 dark:border-white/10 flex items-center justify-between",children:[jsxRuntime.jsx("h3",{className:"font-bold text-gray-900 dark:text-white",children:"Search Messages"}),jsxRuntime.jsx("button",{onClick:o,className:"p-1 rounded-full hover:bg-gray-100 dark:hover:bg-white/10",children:jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5 text-gray-500"})})]}),jsxRuntime.jsx("div",{className:"p-4",children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),jsxRuntime.jsx("input",{type:"text",value:s,onChange:c,placeholder:"Search in conversation...",className:"w-full h-10 pl-10 pr-4 rounded-xl bg-gray-100 dark:bg-white/5 border-none text-sm focus:ring-2 focus:ring-blue-500/50 transition-all",autoFocus:true})]})}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:s&&t.length===0?jsxRuntime.jsx("div",{className:"p-8 text-center text-gray-500 dark:text-white/30",children:jsxRuntime.jsxs("p",{className:"text-sm",children:['No messages found for "',s,'"']})}):jsxRuntime.jsx("div",{className:"space-y-1",children:t.map(d=>jsxRuntime.jsxs("button",{onClick:()=>r(d),className:"w-full p-3 rounded-xl hover:bg-gray-100 dark:hover:bg-white/5 text-left transition-all group",children:[jsxRuntime.jsxs("div",{className:"flex justify-between mb-1",children:[jsxRuntime.jsx("span",{className:"text-[10px] font-bold text-blue-500 uppercase",children:d.timestamp.toLocaleDateString()}),jsxRuntime.jsx("span",{className:"text-[10px] text-gray-400",children:d.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),jsxRuntime.jsx("p",{className:"text-sm text-gray-700 dark:text-white/70 line-clamp-2 group-hover:text-gray-900 dark:group-hover:text-white",children:d.content})]},d.id))})})]})}var Ba=class{constructor(){this.state={conversations:new Map,messages:new Map,activeChatId:null,presence:new Map};this.listeners=new Set;this.getState=()=>this.state;this.subscribe=t=>(this.listeners.add(t),()=>this.listeners.delete(t));}emitChange(t){this.state=t;for(let r of this.listeners)r();}setConversations(t){this.emitChange({...this.state,conversations:new Map(t.map(r=>[r.id,r]))});}upsertConversation(t){let r=new Map(this.state.conversations),o=r.get(t.id);r.set(t.id,{...o||{unreadCount:0},...t}),this.emitChange({...this.state,conversations:r});}setMessages(t,r){let o=new Map(this.state.messages);o.set(t,r),this.emitChange({...this.state,messages:o});}addMessage(t,r){let o=this.state.messages.get(t)||[];if(o.some(i=>i.id===r.id))return;let n=new Map(this.state.messages);n.set(t,[...o,r]);let a={...this.state,messages:n},s=this.state.conversations.get(t);if(s){let i=new Map(this.state.conversations);i.set(t,{...s,lastMessage:r,unreadCount:this.state.activeChatId===t?0:(s.unreadCount||0)+1}),a.conversations=i;}this.emitChange(a);}updateMessageStatus(t,r,o){let n=this.state.messages.get(t);if(!n)return;let a=n.findIndex(s=>s.id===r);if(a!==-1){let s=[...n],i=s[a];if(i){s[a]={...i,status:o};let c=new Map(this.state.messages);c.set(t,s),this.emitChange({...this.state,messages:c});}}}updateMessage(t,r,o){let n=this.state.messages.get(t);if(!n)return;let a=n.findIndex(s=>s.id===r);if(a!==-1){let s=[...n];s[a]={...s[a],...o};let i=new Map(this.state.messages);i.set(t,s),this.emitChange({...this.state,messages:i});}}addReaction(t,r,o,n){let a=this.state.messages.get(t);if(!a)return;let s=a.findIndex(i=>i.id===r);if(s!==-1){let i=[...a],c={...i[s]},d={...c.reactions||{}},m=[...d[o]||[]];if(!m.includes(n)){m.push(n),d[o]=m,c.reactions=d,i[s]=c;let u=new Map(this.state.messages);u.set(t,i),this.emitChange({...this.state,messages:u});}}}removeReaction(t,r,o,n){let a=this.state.messages.get(t);if(!a)return;let s=a.findIndex(i=>i.id===r);if(s!==-1){let i=[...a],c={...i[s]},d={...c.reactions||{}};if(d[o]){d[o]=d[o].filter(u=>u!==n),d[o].length===0&&delete d[o],c.reactions=d,i[s]=c;let m=new Map(this.state.messages);m.set(t,i),this.emitChange({...this.state,messages:m});}}}deleteMessage(t,r){let o=this.state.messages.get(t);if(!o)return;let n=o.findIndex(a=>a.id===r);if(n!==-1){let a=[...o];a[n]={...a[n],type:"revoked",content:"Esta mensagem foi apagada",attachments:[],reactions:{}};let s=new Map(this.state.messages);s.set(t,a),this.emitChange({...this.state,messages:s});}}setActiveChat(t){let r={...this.state,activeChatId:t};if(t){let o=this.state.conversations.get(t);if(o&&o.unreadCount>0){let n=new Map(this.state.conversations);n.set(t,{...o,unreadCount:0}),r.conversations=n;}}this.emitChange(r);}setUserPresence(t,r){let o=new Map(this.state.presence);o.set(t,r),this.emitChange({...this.state,presence:o});}},Ge=new Ba;function ko(e){let t=ye.useSyncExternalStore(Ge.subscribe,Ge.getState);return ye.useMemo(()=>e(t),[t,e])}var cg=e=>Array.from(e.conversations.values()).sort((t,r)=>{if(t.isPinned&&!r.isPinned)return -1;if(!t.isPinned&&r.isPinned)return 1;let o=t.lastMessage?.timestamp.getTime()||0;return (r.lastMessage?.timestamp.getTime()||0)-o});function yE(){return ko(cg)}function kE(e){let t=ye.useCallback(r=>e?r.messages.get(e)||[]:[],[e]);return ko(t)}function NE(){let e=ye.useCallback(t=>t.activeChatId?t.conversations.get(t.activeChatId):null,[]);return ko(e)}function TE(e){let t=ye.useCallback(r=>r.presence.get(e)||"unavailable",[e]);return ko(t)}function Va({url:e,token:t,rooms:r=[],onConnect:o,onDisconnect:n,onError:a}){let s=ye.useRef(null);ye.useEffect(()=>{let d=socket_ioClient.io(e,{auth:{token:t},transports:["websocket"],reconnectionAttempts:5,reconnectionDelay:1e3});return s.current=d,d.on("connect",()=>{console.log("Socket connected:",d.id),r.forEach(m=>d.emit("join",m)),o?.();}),d.on("disconnect",m=>{console.log("Socket disconnected:",m),n?.();}),d.on("connect_error",m=>{console.error("Socket connection error:",m),a?.(m);}),()=>{d.disconnect();}},[e,t,r,o,n,a]);let i=ye.useCallback((d,m)=>{s.current?.connected?s.current.emit(d,m):console.warn("Socket not connected. Event buffered or dropped:",d);},[]),c=ye.useCallback((d,m)=>(s.current?.on(d,m),()=>{s.current?.off(d,m);}),[]);return {socket:s.current,emit:i,on:c,isConnected:s.current?.connected||false}}function HE(e,t){let{on:r,emit:o,isConnected:n}=Va({url:e,token:t});return ye.useEffect(()=>{r("chats.set",a=>{Ge.setConversations(a);}),r("chats.upsert",a=>{a.forEach(s=>Ge.upsertConversation(s));}),r("chats.update",a=>{a.forEach(s=>{s.id&&Ge.upsertConversation(s);});}),r("messages.upsert",({chatId:a,messages:s})=>{s.forEach(i=>Ge.addMessage(a,i));}),r("messages.update",({chatId:a,messageId:s,status:i})=>{Ge.updateMessageStatus(a,s,i);}),r("presence.update",({userId:a,status:s})=>{Ge.setUserPresence(a,s);}),r("groups.update",a=>{a.forEach(s=>{Ge.upsertConversation({id:s.id,group:s});});});},[r]),{isConnected:n,emit:o}}function IE(e,t){let{emit:r}=Va({url:""});return {setPresence:n=>{r("presence.send",{chatId:e,userId:t,status:n});}}}function AE(){return {uploadMedia:async(t,r)=>({url:"...",thumbnail:"...",blurhash:"..."})}}function BE(e){return {search:r=>r?e.filter(o=>o.content.toLowerCase().includes(r.toLowerCase())):e}}function zE({itemCount:e,itemHeight:t,overscan:r=5,initialScrollTop:o=0,startAtBottom:n=false}){let[a,s]=ye.useState(o),[i,c]=ye.useState(0),d=ye.useRef(null),m=ye.useRef(false),u=ye.useCallback(f=>typeof t=="function"?t(f):t,[t]);ye.useLayoutEffect(()=>{if(d.current){let f=new ResizeObserver(w=>{for(let v of w)c(v.contentRect.height);});return f.observe(d.current),o>0&&(d.current.scrollTop=o),()=>f.disconnect()}},[o]);let p=ye.useCallback(f=>{s(f.currentTarget.scrollTop);},[]),{visibleItems:g,totalHeight:b,startIndex:x}=ye.useMemo(()=>{let f=0,w=[];for(let T=0;T<e;T++)w.push(f),f+=u(T);let v=0,k=0,N=e-1;for(;k<=N;){let T=Math.floor((k+N)/2),E=w[T];E!==void 0&&E<=a?(v=T,k=T+1):N=T-1;}v=Math.max(0,v-r);let C=[];for(let T=v;T<e;T++){let E=w[T];if(E===void 0||E>a+i+r*u(T))break;C.push({index:T,offsetTop:E,height:u(T)});}return {visibleItems:C,totalHeight:f,startIndex:v}},[a,i,e,u,r]);ye.useLayoutEffect(()=>{if(n&&!m.current&&b>0&&d.current&&i>0){let f=d.current,w=b-i;w>0&&(f.scrollTop=w,s(w)),m.current=true;}},[b,i,n]);let h=ye.useCallback((f,w="auto")=>{if(d.current){let v=0;for(let y=0;y<f;y++)v+=u(y);d.current.scrollTo({top:v,behavior:w});}},[u]);return {containerRef:d,visibleItems:g,totalHeight:b,startIndex:x,onScroll:p,scrollToIndex:h,scrollToBottom:(f="auto")=>{d.current&&d.current.scrollTo({top:d.current.scrollHeight,behavior:f});}}}function xi(){let[e,t]=ye.useState({scrollX:0,scrollY:0,scrollProgressX:0,scrollProgressY:0}),r=ye.useRef(false),o=ye.useCallback(()=>{r.current||(window.requestAnimationFrame(()=>{let n=window.scrollX,a=window.scrollY,s=document.documentElement.scrollWidth-document.documentElement.clientWidth,i=document.documentElement.scrollHeight-document.documentElement.clientHeight;t({scrollX:n,scrollY:a,scrollProgressX:s>0?n/s:0,scrollProgressY:i>0?a/i:0}),r.current=false;}),r.current=true);},[]);return ye.useEffect(()=>(window.addEventListener("scroll",o,{passive:true}),o(),()=>window.removeEventListener("scroll",o)),[o]),e}function _E({className:e,color:t="bg-blue-500",height:r=2,position:o="top",...n}){let{scrollProgressY:a}=xi();return jsxRuntime.jsx("div",{className:l("fixed left-0 right-0 z-[100] w-full pointer-events-none",o==="top"?"top-0":"bottom-0",e),style:{height:r},...n,children:jsxRuntime.jsx("div",{className:l("h-full transition-all duration-75 ease-out",t),style:{width:`${a*100}%`,boxShadow:a>0?`0 0 10px ${t.replace("bg-","var(--")}`:"none"}})})}var wg=ye__namespace.default.forwardRef(({orientation:e="horizontal",className:t,...r},o)=>jsxRuntime.jsx("hr",{ref:o,className:l("border-0 bg-gray-200 dark:bg-white/10",{"h-px w-full":e==="horizontal","h-full w-px":e==="vertical"},t),...r}));wg.displayName="Divider";var Ng=ye__namespace.default.forwardRef(({children:e,className:t,...r},o)=>jsxRuntime.jsx("kbd",{ref:o,className:l("rounded-lg border border-gray-200 dark:border-white/10 bg-gray-100 dark:bg-white/[0.03] px-2 py-1 text-[11px] font-semibold text-gray-500 dark:text-white/65",t),...r,children:e}));Ng.displayName="Kbd";var Lg={theme:"system",setTheme:()=>null},yi=ye.createContext(Lg);function aS({children:e,defaultTheme:t="system",storageKey:r="vite-ui-theme",...o}){let[n,a]=ye.useState(t);ye.useEffect(()=>{let i=localStorage.getItem(r);i&&a(i);},[r]),ye.useEffect(()=>{let i=window.document.documentElement;if(i.classList.remove("light","dark"),n==="system"){let c=window.matchMedia("(prefers-color-scheme: dark)"),d=()=>{i.classList.remove("light","dark"),i.classList.add(c.matches?"dark":"light");};return d(),c.addEventListener("change",d),()=>c.removeEventListener("change",d)}i.classList.add(n);},[n]);let s={theme:n,setTheme:i=>{localStorage.setItem(r,i),a(i);}};return jsxRuntime.jsx(yi.Provider,{...o,value:s,children:e})}var ki=()=>{let e=ye.useContext(yi);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function mS({className:e}){let{setTheme:t,theme:r}=ki();return jsxRuntime.jsxs(L,{variant:"ghost",size:"icon",className:l("h-9 w-9",e),onClick:()=>t(r==="light"?"dark":"light"),children:[jsxRuntime.jsx(lucideReact.Sun,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsxRuntime.jsx(lucideReact.Moon,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function Ag(e,t=true){let[r,o]=ye.useState({data:null,error:null,isLoading:false}),n=ye.useCallback(async()=>{o({data:null,error:null,isLoading:true});try{let a=await e();return o({data:a,error:null,isLoading:!1}),a}catch(a){throw o({data:null,error:a,isLoading:false}),a}},[e]);return ye.useEffect(()=>{t&&n();},[n,t]),{...r,execute:n}}function gS(e,t){let r=ye.useCallback(()=>fetch(e,t).then(o=>o.json()),[e,t]);return Ag(r)}function xS({initialMessages:e=[],onSendMessage:t,scrollThreshold:r=100}={}){let[o,n]=ye.useState(e),[a,s]=ye.useState(false),[i,c]=ye.useState(false),d=ye.useRef(null),m=ye.useRef(true),u=ye.useCallback((x="smooth")=>{d.current&&d.current.scrollTo({top:d.current.scrollHeight,behavior:x});},[]),p=ye.useCallback(()=>{if(d.current){let{scrollTop:x,scrollHeight:h,clientHeight:f}=d.current;m.current=h-x-f<r;}},[r]);ye.useEffect(()=>{m.current&&u();},[o,u]);let g=ye.useCallback(async(x,h)=>{if(!x.trim())return;let f=crypto.randomUUID(),w={id:f,content:x,senderId:h,timestamp:new Date,status:"sending"};n(v=>[...v,w]);try{t&&await t(x),n(v=>v.map(y=>y.id===f?{...y,status:"sent"}:y));}catch{n(y=>y.map(k=>k.id===f?{...k,status:"error"}:k));}},[t]),b=ye.useCallback(()=>{n([]);},[]);return {messages:o,setMessages:n,sendMessage:g,clearMessages:b,isTyping:a,setIsTyping:s,isLoading:i,setIsLoading:c,scrollRef:d,handleScroll:p,scrollToBottom:u}}function kS(e=[]){let[t,r]=ye.useState(e),o=ye.useCallback(d=>{r(m=>[...m,d]);},[]),n=ye.useCallback((d,m)=>{r(u=>u.map(p=>p.id===d?{...p,status:m}:p));},[]),a=ye.useCallback(d=>{r(m=>m.filter(u=>u.id!==d));},[]),s=ye.useCallback((d,m)=>{r(u=>u.map(p=>p.id===d?{...p,content:m,isEdited:true}:p));},[]),i=ye.useCallback((d,m,u)=>{r(p=>p.map(g=>{if(g.id!==d)return g;let b={...g.reactions||{}},x=b[m]||[];return x.includes(u)?(b[m]=x.filter(h=>h!==u),b[m].length===0&&delete b[m]):b[m]=[...x,u],{...g,reactions:b}}));},[]),c=ye.useCallback(()=>{r([]);},[]);return {messages:t,setMessages:r,addMessage:o,updateMessageStatus:n,deleteMessage:a,editMessage:s,addReaction:i,clearMessages:c}}function CS(e){let[t,r]=ye.useState(""),o=ye.useMemo(()=>{if(!t.trim())return [];let n=t.toLowerCase();return e.filter(a=>a.content.toLowerCase().includes(n))},[e,t]);return {query:t,setQuery:r,results:o}}function LS(e){let t=ye.useRef(null);return ye.useEffect(()=>{let r=o=>{let n=t.current;!n||n.contains(o?.target||null)||e(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e]),t}function SS({timeout:e=2e3}={}){let[t,r]=ye.useState(false),[o,n]=ye.useState(null);return {copy:ye.useCallback(async s=>{if(!navigator?.clipboard){n(new Error("Clipboard API not supported"));return}try{await navigator.clipboard.writeText(s),r(!0),setTimeout(()=>r(!1),e);}catch(i){n(i instanceof Error?i:new Error("Failed to copy"));}},[e]),copied:t,error:o}}function IS(e,t){let[r,o]=ye.useState(e);return ye.useEffect(()=>{let n=setTimeout(()=>{o(e);},t);return ()=>{clearTimeout(n);}},[e,t]),r}function OS(e){let[t,r]=ye.useState(false),[o,n]=ye.useState({x:0,y:0}),a=ye.useRef({x:0,y:0}),s=ye.useRef({x:0,y:0}),i=ye.useRef(Date.now()),c=ye.useRef({x:0,y:0}),d=ye.useCallback((p,g)=>{r(true),a.current={x:p-o.x,y:g-o.y},s.current={x:p,y:g},i.current=Date.now();},[o]),m=ye.useCallback((p,g)=>{if(!t)return;let b=p-a.current.x,x=g-a.current.y,h=Date.now(),f=h-i.current;f>0&&(c.current={x:(p-s.current.x)/f,y:(g-s.current.y)/f}),n({x:b,y:x}),s.current={x:p,y:g},i.current=h,e?.({isDragging:true,offset:{x:b,y:x},velocity:c.current});},[t,e]),u=ye.useCallback(()=>{r(false),e?.({isDragging:false,offset:o,velocity:c.current});},[o,e]);return ye.useEffect(()=>{let p=h=>m(h.clientX,h.clientY),g=h=>{h.touches[0]&&m(h.touches[0].clientX,h.touches[0].clientY);},b=()=>u(),x=()=>u();return t&&(window.addEventListener("mousemove",p),window.addEventListener("mouseup",b),window.addEventListener("touchmove",g),window.addEventListener("touchend",x)),()=>{window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",b),window.removeEventListener("touchmove",g),window.removeEventListener("touchend",x);}},[t,m,u]),{isDragging:t,offset:o,dragProps:{onMouseDown:p=>d(p.clientX,p.clientY),onTouchStart:p=>{p.touches[0]&&d(p.touches[0].clientX,p.touches[0].clientY);},style:{cursor:t?"grabbing":"grab",touchAction:"none"}}}}function KS(e){let[t,r]=ye.useState({progress:0,scrollY:0,isIntersecting:false}),o=ye.useRef(false);return ye.useEffect(()=>{let n=e.current;if(!n)return;let a=()=>{o.current||(window.requestAnimationFrame(()=>{let s=n.getBoundingClientRect(),i=window.innerHeight,c=i+s.height,d=i-s.top,m=Math.max(0,Math.min(1,d/c));r({progress:m,scrollY:window.scrollY,isIntersecting:s.top<i&&s.bottom>0}),o.current=false;}),o.current=true);};return window.addEventListener("scroll",a,{passive:true}),window.addEventListener("resize",a),a(),()=>{window.removeEventListener("scroll",a),window.removeEventListener("resize",a);}},[e]),t}function US(e,t){let r=ye.useRef(null);return ye.useLayoutEffect(()=>{let o=document.querySelector(`[data-flip-id="${e}"]`);if(!o)return;let n=r.current,a=o.getBoundingClientRect();if(n){let s=n.left-a.left,i=n.top-a.top,c=n.width/a.width,d=n.height/a.height;(Math.abs(s)>.5||Math.abs(i)>.5||Math.abs(c-1)>.01||Math.abs(d-1)>.01)&&o.animate([{transformOrigin:"top left",transform:`translate(${s}px, ${i}px) scale(${c}, ${d})`},{transformOrigin:"top left",transform:"none"}],{duration:400,easing:"cubic-bezier(0.2, 0.8, 0.2, 1)"});}r.current=a;},t),{"data-flip-id":e}}function YS({initialValues:e,onSubmit:t}){let[r,o]=ye.useState(e),[n,a]=ye.useState({}),[s,i]=ye.useState(false),c=ye.useCallback(u=>{let{name:p,value:g,type:b}=u.target,x=b==="checkbox"?u.target.checked:g;o(h=>({...h,[p]:x})),n[p]&&a(h=>({...h,[p]:""}));},[n]),d=ye.useCallback(async u=>{u.preventDefault();let p=u.currentTarget;if(!p.checkValidity()){let g={};Array.from(p.elements).forEach(b=>{let x=b;x.name&&!x.validity.valid&&(g[x.name]=x.validationMessage);}),a(g);return}i(true);try{await t(r);}finally{i(false);}},[r,t]),m=ye.useCallback(u=>({name:u,value:r[u],onChange:c,error:n[u]}),[r,n,c]);return {values:r,errors:n,isSubmitting:s,handleChange:c,handleSubmit:d,register:m,setValues:o,setErrors:a}}function GS(e){let[t,r]=ye.useState({past:[],present:e,future:[]}),o=t.past.length>0,n=t.future.length>0,a=ye.useCallback(()=>{o&&r(d=>{let m=d.past[d.past.length-1];return m===void 0?d:{past:d.past.slice(0,d.past.length-1),present:m,future:[d.present,...d.future]}});},[o]),s=ye.useCallback(()=>{n&&r(d=>{let m=d.future[0];if(m===void 0)return d;let u=d.future.slice(1);return {past:[...d.past,d.present],present:m,future:u}});},[n]),i=ye.useCallback(d=>{r(m=>{let u=typeof d=="function"?d(m.present):d;return m.present===u?m:{past:[...m.past,m.present],present:u,future:[]}});},[]),c=ye.useCallback(()=>{r({past:[],present:e,future:[]});},[e]);return {state:t.present,set:i,undo:a,redo:s,clear:c,canUndo:o,canRedo:n,history:t}}function ZS(e=3e3){let[t,r]=ye.useState(false),o=ye.useRef();return ye.useEffect(()=>{let n=()=>{r(false),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(true);},e);},a=["mousemove","mousedown","keydown","touchstart","scroll"];return a.forEach(s=>{window.addEventListener(s,n);}),n(),()=>{a.forEach(s=>{window.removeEventListener(s,n);}),o.current&&clearTimeout(o.current);}},[e]),t}function rD({onLoadMore:e,isLoading:t,hasMore:r,threshold:o=100,root:n=null}){let a=ye.useRef(null),s=ye.useRef(null),i=ye.useCallback(c=>{let d=c[0];d&&d.isIntersecting&&r&&!t&&e();},[r,t,e]);return ye.useEffect(()=>{let c=s.current;if(c)return a.current=new IntersectionObserver(i,{root:n,rootMargin:`0px 0px ${o}px 0px`,threshold:.1}),a.current.observe(c),()=>{a.current&&a.current.disconnect();}},[i,n,o]),s}function sD(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:n=false}={}){let[a,s]=ye.useState(),i=a?.isIntersecting&&n,c=([d])=>{s(d);};return ye.useEffect(()=>{let d=e?.current;if(!!!window.IntersectionObserver||i||!d)return;let u={threshold:t,root:r,rootMargin:o},p=new IntersectionObserver(c,u);return p.observe(d),()=>p.disconnect()},[e,t,r,o,i]),a}function cD(e){let[t,r]=ye.useState(e),o=ye.useCallback((i,c,d,m)=>{r(u=>{let p=u.columns[c],g=u.columns[d],b=u.tasks[i];if(!p||!g||!b)return u;let x=Array.from(p.taskIds);x.splice(x.indexOf(i),1);let h={...p,taskIds:x},f=c===d?x:Array.from(g.taskIds);f.splice(m,0,i);let w={...g,taskIds:f};return {...u,columns:{...u.columns,[c]:h,[d]:w},tasks:{...u.tasks,[i]:{...b,columnId:d}}}});},[]),n=ye.useCallback((i,c)=>{r(d=>{let m=Array.from(d.columnOrder);return m.splice(m.indexOf(i),1),m.splice(c,0,i),{...d,columnOrder:m}});},[]),a=ye.useCallback((i,c)=>{r(d=>{let m=d.columns[i];if(!m)return d;let u={...m,taskIds:[...m.taskIds,c.id]};return {...d,tasks:{...d.tasks,[c.id]:c},columns:{...d.columns,[i]:u}}});},[]),s=ye.useCallback(i=>{r(c=>{let d=c.tasks[i];if(!d)return c;let m=c.columns[d.columnId];if(!m)return c;let u={...c.tasks};delete u[i];let p={...m,taskIds:m.taskIds.filter(g=>g!==i)};return {...c,tasks:u,columns:{...c.columns,[d.columnId]:p}}});},[]);return {board:t,setBoard:r,moveTask:o,moveColumn:n,addTask:a,removeTask:s}}function uD(e){let t=ye.useRef(e);t.current=e,ye.useEffect(()=>{let r=o=>{let n=[];(o.ctrlKey||o.metaKey)&&n.push("mod"),o.shiftKey&&n.push("shift"),o.altKey&&n.push("alt");let s=o.key.toLowerCase();["control","meta","shift","alt"].includes(s)||n.push(s);let i=n.join("+"),c=t.current[i]||t.current[s];c&&c(o);};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[]);}function gD(e){let t=ye.useRef(false);ye.useEffect(()=>{t.current||(t.current=true,e());},[]);}function hD(e){ye.useEffect(()=>()=>{e();},[]);}function wD(e,t){let[r,o]=ye.useState(()=>{if(typeof window>"u")return t;try{let a=window.localStorage.getItem(e);return a?JSON.parse(a):t}catch(a){return console.warn(`Error reading localStorage key "${e}":`,a),t}}),n=ye.useCallback(a=>{try{let s=a instanceof Function?a(r):a;o(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s));}catch(s){console.warn(`Error setting localStorage key "${e}":`,s);}},[e,r]);return [r,n]}function ND(e){let[t,r]=ye.useState({x:0,y:0,elementX:0,elementY:0,percentageX:0,percentageY:0}),o=ye.useRef(),n=ye.useRef({x:0,y:0});return ye.useEffect(()=>{let a=i=>{n.current={x:i.clientX,y:i.clientY},o.current||(o.current=requestAnimationFrame(s));},s=()=>{let{x:i,y:c}=n.current,d=0,m=0,u=0,p=0;if(e?.current){let g=e.current.getBoundingClientRect();d=i-g.left,m=c-g.top,u=Math.max(0,Math.min(100,d/g.width*100)),p=Math.max(0,Math.min(100,m/g.height*100));}r({x:i,y:c,elementX:d,elementY:m,percentageX:u,percentageY:p}),o.current=void 0;};return window.addEventListener("mousemove",a),()=>{window.removeEventListener("mousemove",a),o.current&&cancelAnimationFrame(o.current);}},[e]),t}function MD(){let[e,t]=ye.useState({alpha:null,beta:null,gamma:null,absolute:false});return ye.useEffect(()=>{let r=o=>{t({alpha:o.alpha,beta:o.beta,gamma:o.gamma,absolute:o.absolute});};return typeof window<"u"&&"DeviceOrientationEvent"in window&&window.addEventListener("deviceorientation",r),()=>{window.removeEventListener("deviceorientation",r);}},[]),e}function PD(e){let t=ye.useRef();return ye.useEffect(()=>{t.current=e;},[e]),t.current}function DD(e){let t=ye.useRef(null),r=ye.useCallback((o,n,a)=>{!o||a||!t.current||(o.dataset.messageId=n,t.current.observe(o));},[]);return ye.useEffect(()=>(t.current=new IntersectionObserver(o=>{o.forEach(n=>{if(n.isIntersecting){let a=n.target.dataset.messageId;a&&(e(a),t.current?.unobserve(n.target));}});},{threshold:.5}),()=>{t.current?.disconnect();}),[e]),{registerMessage:r}}function AD(){let[e,t]=ye.useState(false);return ye.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");t(r.matches);let o=n=>{t(n.matches);};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),e}var Th={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function Ch(e){let[t,r]=ye.useState(false);return ye.useEffect(()=>{let o=window.matchMedia(e);r(o.matches);let n=()=>r(o.matches);return o.addEventListener("change",n),()=>o.removeEventListener("change",n)},[e]),t}function VD(e){return Ch(`(min-width: ${Th[e]}px)`)}function zD(e){let[t,r]=ye.useState({width:0,height:0});return ye.useLayoutEffect(()=>{if(!e.current)return;let o=new ResizeObserver(n=>{for(let a of n)r({width:a.contentRect.width,height:a.contentRect.height});});return o.observe(e.current),()=>o.disconnect()},[e]),t}function $D(e=10){let[t,r]=ye.useState(null),o=ye.useRef(0);return ye.useEffect(()=>{let n=()=>{let s=window.scrollY;if(Math.abs(s-o.current)<e)return;let i=s>o.current?"down":"up";i!==t&&(s>0||i==="down")&&r(i),o.current=s>0?s:0;},a=()=>{window.requestAnimationFrame(n);};return window.addEventListener("scroll",a),()=>window.removeEventListener("scroll",a)},[t,e]),t}function _D(e=true){ye.useLayoutEffect(()=>{if(!e)return;let t=window.getComputedStyle(document.body).overflow,r=window.getComputedStyle(document.body).paddingRight,o=window.innerWidth-document.documentElement.clientWidth;return document.body.style.overflow="hidden",o>0&&(document.body.style.paddingRight=`${parseFloat(r)+o}px`),()=>{document.body.style.overflow=t,document.body.style.paddingRight=r;}},[e]);}function Eh(e,t,r){let[o,n]=t,[a,s]=r,i=(e-o)/(n-o),c=Math.max(0,Math.min(1,i));return a+c*(s-a)}function XD(e,t,r){return Eh(e,t,r)}function GD(){let[e,t]=ye.useState(0),r=ye.useRef(0),o=ye.useRef(Date.now()),n=ye.useRef();return ye.useEffect(()=>{let a=()=>{let i=window.scrollY,c=Date.now(),d=c-o.current;if(d>0){let u=(i-r.current)/d;t(u);}r.current=i,o.current=c,n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(s);},s=()=>{t(i=>Math.abs(i)<.01?0:i*.9),n.current=requestAnimationFrame(s);};return window.addEventListener("scroll",a,{passive:true}),()=>{window.removeEventListener("scroll",a),n.current&&cancelAnimationFrame(n.current);}},[]),e}function Ih(e,t){let r=e.toLowerCase().replace(/\s/g,""),o=t.toLowerCase(),n=0;for(let a=0;a<o.length&&n<r.length;a++)o[a]===r[n]&&n++;return n===r.length}function ZD(e,t,r){return ye.useMemo(()=>t.trim()?e.filter(o=>r.some(n=>{let a=o[n];return a==null?false:Ih(t,String(a))})):e,[e,t,r])}function r3(e,t){let r=ye.useCallback(()=>{if(typeof window>"u")return t;try{let s=window.sessionStorage.getItem(e);return s?JSON.parse(s):t}catch(s){return console.warn(`Error reading sessionStorage key "${e}":`,s),t}},[t,e]),[o,n]=ye.useState(r),a=ye.useCallback(s=>{try{let i=s instanceof Function?s(o):s;n(i),typeof window<"u"&&window.sessionStorage.setItem(e,JSON.stringify(i));}catch(i){console.warn(`Error setting sessionStorage key "${e}":`,i);}},[e,o]);return ye.useEffect(()=>{n(r());},[r]),[o,a]}function n3(e,t={}){let{stiffness:r=.15,damping:o=.8,mass:n=1,precision:a=.01}=t,[s,i]=ye.useState(e),c=ye.useRef(0),d=ye.useRef(e),m=ye.useRef();return ye.useEffect(()=>{let u=()=>{let p=e-d.current,b=p*r/n;if(c.current=(c.current+b)*o,d.current+=c.current,Math.abs(p)<a&&Math.abs(c.current)<a){d.current=e,i(e),m.current=void 0;return}i(d.current),m.current=requestAnimationFrame(u);};return m.current&&cancelAnimationFrame(m.current),m.current=requestAnimationFrame(u),()=>{m.current&&cancelAnimationFrame(m.current);}},[e,r,o,n,a]),s}function i3(e,t=100,r=0){return r+e*t}function l3(e,t=100){return Array.from({length:e},(r,o)=>o*t)}var Di="01XYZ#%&@$+-/<>!_";function m3(e,t=800,r=true){let[o,n]=ye.useState(e),a=ye.useRef();return ye.useEffect(()=>{if(!r){n(e);return}let s=Date.now(),i=()=>{let c=Date.now()-s,d=Math.min(c/t,1),m=e.split("").map((u,p)=>u===" "?" ":d>p/e.length?u:Di[Math.floor(Math.random()*Di.length)]).join("");n(m),d<1&&(a.current=requestAnimationFrame(i));};return a.current=requestAnimationFrame(i),()=>{a.current&&cancelAnimationFrame(a.current);}},[e,t,r]),o}function f3(e,t){let[r,o]=ye.useState(e),n=ye.useRef(Date.now());return ye.useEffect(()=>{let a=setTimeout(()=>{Date.now()-n.current>=t&&(o(e),n.current=Date.now());},t-(Date.now()-n.current));return ()=>{clearTimeout(a);}},[e,t]),r}function b3(e=0){let[t,r]=ye.useState(e),[o,n]=ye.useState(false),a=ye.useRef(null),s=ye.useCallback(()=>{o||(n(true),a.current=setInterval(()=>{r(m=>m+1);},1e3));},[o]),i=ye.useCallback(()=>{o&&a.current&&(clearInterval(a.current),n(false));},[o]),c=ye.useCallback(()=>{a.current&&clearInterval(a.current),n(false),r(0);},[]);return ye.useEffect(()=>()=>{a.current&&clearInterval(a.current);},[]),{seconds:t,isActive:o,start:s,pause:i,reset:c,formattedTime:(m=>{let u=Math.floor(m/3600),p=Math.floor(m%3600/60),g=m%60;return [u,p,g].map(b=>b<10?"0"+b:b).filter((b,x)=>b!=="00"||x>0).join(":")})(t)}}function y3(){let e=ye.useContext(Ko);if(!e)throw new Error("useToast must be used within a ToastProvider");return e}function T3(e=false){let[t,r]=ye.useState(e),o=ye.useCallback(()=>{r(n=>!n);},[]);return [t,o,r]}function R3(e=3e3){let[t,r]=ye.useState(false),o=ye.useRef(null),n=ye.useCallback(a=>{r(a),o.current&&clearTimeout(o.current),a&&(o.current=window.setTimeout(()=>{r(false);},e));},[e]);return ye.useEffect(()=>()=>{o.current&&clearTimeout(o.current);},[]),{isTyping:t,setTyping:n}}function E3(){return {startTransition:t=>{if(!document.startViewTransition){t();return}document.startViewTransition(()=>{reactDom.flushSync(()=>{t();});});}}}function D3(e,t={month:"short",day:"numeric",year:"numeric"}){let r=new Date(e);return new Intl.DateTimeFormat("en-US",t).format(r)}function H3(e){return new Intl.NumberFormat("en-US").format(e)}function I3(e,t="USD"){return new Intl.NumberFormat("en-US",{style:"currency",currency:t}).format(e)}function B3(e,t){return e.length<=t?e:e.slice(0,t)+"..."}function O3(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}
|
|
70
|
+
exports.AIPromptInput=gf;exports.AIResponse=Rf;exports.Accordion=Tk;exports.AccordionContent=Rk;exports.AccordionItem=Ck;exports.AccordionTrigger=Mk;exports.Alert=Jc;exports.AreaChart=vC;exports.AssigneePicker=ns;exports.AudioPlayer=_s;exports.Avatar=$;exports.Background=Zp;exports.Badge=ze;exports.BarChart=fC;exports.Breadcrumb=fp;exports.BreadcrumbEllipsis=wp;exports.BreadcrumbItem=hp;exports.BreadcrumbLink=bp;exports.BreadcrumbList=gp;exports.BreadcrumbPage=xp;exports.BreadcrumbSeparator=vp;exports.Button=L;exports.Calendar=Jr;exports.Card=rl;exports.CardContent=sl;exports.CardDescription=nl;exports.CardFooter=il;exports.CardHeader=ol;exports.CardTitle=al;exports.CarouselMessage=ti;exports.ChartContainer=nC;exports.ChartGrid=sC;exports.ChartSkeleton=cC;exports.ChartTooltip=lC;exports.ChartXAxis=iC;exports.ChartYAxis=WC;exports.ChatBanner=LP;exports.ChatHeader=V4;exports.ChatInput=oP;exports.ChatLayout=N4;exports.ChatProfile=fP;exports.ChatSidebar=D4;exports.Checkbox=Po;exports.Checklist=ts;exports.Collapse=eC;exports.ColorPicker=sw;exports.ColumnLimit=$n;exports.Combobox=Io;exports.ComboboxContent=qx;exports.ComboboxEmpty=hn;exports.ComboboxInput=fn;exports.ComboboxItem=bn;exports.ComboboxList=gn;exports.ComboboxTrigger=Xx;exports.Command=Xn;exports.CommandDialog=f1;exports.CommandEmpty=g1;exports.CommandGroup=Gn;exports.CommandInput=qn;exports.CommandItem=Jn;exports.CommandList=jn;exports.CommandShortcut=h1;exports.ConfirmDialog=oR;exports.Container=Fp;exports.DataTable=$k;exports.DatePicker=gv;exports.DateSeparator=HP;exports.DateTimePicker=Pv;exports.Dialog=dR;exports.DialogDescription=fR;exports.DialogFooter=uR;exports.DialogHeader=mR;exports.DialogTitle=pR;exports.Divider=wg;exports.Drawer=NR;exports.DrawerDescription=RR;exports.DrawerFooter=CR;exports.DrawerHeader=TR;exports.DrawerTitle=MR;exports.DropdownMenu=at;exports.DropdownMenuContent=st;exports.DropdownMenuItem=V;exports.DropdownMenuLabel=Bs;exports.DropdownMenuSeparator=xa;exports.DropdownMenuTrigger=nt;exports.DueDatePicker=is;exports.EmojiPicker=lE;exports.EmptyState=rd;exports.FileDropzone=Cc;exports.FormControl=bc;exports.FormDescription=xc;exports.FormItem=gc;exports.FormLabel=hc;exports.FormMessage=vc;exports.GlowButton=_i;exports.Grid=Jp;exports.GroupHeader=qP;exports.Heading=Qe;exports.HeroText=yl;exports.Image=qo;exports.InteractiveMessage=Qs;exports.Kanban=Cu;exports.KanbanBoard=Cu;exports.KanbanCalendarView=Yn;exports.KanbanCard=Jo;exports.KanbanColumn=Qo;exports.KanbanFilterBar=Zn;exports.KanbanHeader=Kn;exports.KanbanListView=oo;exports.KanbanQuickAdd=HT;exports.KanbanSwimlane=ms;exports.KanbanTableView=_n;exports.KanbanTaskModal=ds;exports.KanbanTimelineView=Wn;exports.Kbd=Ng;exports.Label=X;exports.LabelPicker=as;exports.LetterPullup=kl;exports.LineChart=TC;exports.LinkPreview=qs;exports.Magnetic=jy;exports.Marquee=A5;exports.MentionList=eE;exports.MessageBubble=ai;exports.MessageList=IL;exports.MessageSearch=bE;exports.MetricCard=Ji;exports.Modal=ao;exports.ModalDescription=K1;exports.ModalFooter=so;exports.ModalHeader=no;exports.ModalTitle=es;exports.Motion=Hn;exports.MotionGroup=Sy;exports.Navbar=bM;exports.NumberInput=Vc;exports.NumberTicker=rk;exports.OTPInput=Dc;exports.OnlineIndicator=OP;exports.PageLoader=ik;exports.PageTransition=pk;exports.Pagination=kp;exports.PaginationContent=Np;exports.PaginationEllipsis=Rp;exports.PaginationItem=Tp;exports.PaginationLink=va;exports.PaginationNext=Mp;exports.PaginationPrevious=Cp;exports.Parallax=$y;exports.PasswordInput=ac;exports.PieChart=SC;exports.Popover=Ze;exports.PopoverContent=tt;exports.PopoverTrigger=et;exports.PrimaryButton=zi;exports.Progress=Zc;exports.RadarChart=BC;exports.RadioGroup=pc;exports.RadioGroupItem=fc;exports.Rating=ld;exports.ReadReceipt=Xs;exports.ReplyPreview=NP;exports.Reveal=en;exports.ScrollArea=it;exports.ScrollProgress=_E;exports.Select=Yr;exports.Separator=Dr;exports.ShinyText=hl;exports.Sidebar=aM;exports.SidebarContent=sM;exports.SidebarFooter=iM;exports.SidebarGroup=cM;exports.SidebarHeader=nM;exports.SidebarItem=lM;exports.Skeleton=Sn;exports.SkipToContent=KM;exports.Slider=ev;exports.Sparkline=KC;exports.Spotlight=n4;exports.Stack=Wp;exports.StatusDot=zu;exports.Stepper=jM;exports.SubtaskList=_T;exports.Surface=ie;exports.Switch=Eo;exports.SystemMessage=FP;exports.Table=yr;exports.TableBody=Nr;exports.TableCell=We;exports.TableHead=rt;exports.TableHeader=kr;exports.TableRow=dt;exports.Tabs=GC;exports.TabsContent=ZC;exports.TabsList=JC;exports.TabsTrigger=QC;exports.TagInput=tw;exports.TaskActivity=GT;exports.TaskAttachments=os;exports.TaskComments=rs;exports.Terminal=Iu;exports.TerminalLine=S5;exports.Text=we;exports.TextGradient=pl;exports.TextInput=kt;exports.TextMotion=By;exports.Textarea=br;exports.ThemeProvider=aS;exports.ThemeToggle=mS;exports.TimeTracker=cs;exports.Timeline=sN;exports.TimelineItem=jd;exports.Toast=Pn;exports.ToastContext=Ko;exports.ToastProvider=Jw;exports.ToggleGroup=Uc;exports.Tooltip=AR;exports.Tree=pN;exports.TypingIndicator=xP;exports.UserMenu=DM;exports.UserPreview=_d;exports.VoiceRecorder=ii;exports.chatStore=Ge;exports.cn=l;exports.formatCurrency=I3;exports.formatDate=D3;exports.formatNumber=H3;exports.normalize=Qt;exports.slugify=O3;exports.truncate=B3;exports.useActiveChat=NE;exports.useAsync=Ag;exports.useBaileysSync=HE;exports.useBreakpoint=VD;exports.useChart=Re;exports.useChat=xS;exports.useChatMedia=AE;exports.useChatMessages=kS;exports.useChatPresence=IE;exports.useChatSearch=CS;exports.useChatSearchWorker=BE;exports.useChatStore=ko;exports.useClickOutside=LS;exports.useClipboard=SS;exports.useContainerQuery=zD;exports.useConversations=yE;exports.useDebounce=IS;exports.useDrag=OS;exports.useElementScroll=KS;exports.useFetch=gS;exports.useFlip=US;exports.useFloating=Ft;exports.useForm=YS;exports.useHistory=GS;exports.useIdle=ZS;exports.useInView=$e;exports.useInfiniteScroll=rD;exports.useIntersection=sD;exports.useKanban=cD;exports.useKanbanFilters=fs;exports.useKanbanHistory=FT;exports.useKanbanKeyboard=hs;exports.useKanbanSync=VT;exports.useKanbanUndo=gs;exports.useKeyboardShortcuts=uD;exports.useLocalStorage=wD;exports.useMediaQuery=Ch;exports.useMessages=kE;exports.useMousePosition=ND;exports.useOnMount=gD;exports.useOnUnmount=hD;exports.useOrientation=MD;exports.usePrevious=PD;exports.useReadReceipts=DD;exports.useReducedMotion=AD;exports.useScroll=xi;exports.useScrollDirection=$D;exports.useScrollLock=_D;exports.useScrollTransform=XD;exports.useScrollVelocity=GD;exports.useSearch=ZD;exports.useSequence=l3;exports.useSessionStorage=r3;exports.useSocket=Va;exports.useSpring=n3;exports.useStagger=i3;exports.useTextScramble=m3;exports.useTheme=ki;exports.useThrottle=f3;exports.useTimer=b3;exports.useToast=y3;exports.useToggle=T3;exports.useTypingIndicator=R3;exports.useUserPresence=TE;exports.useViewTransition=E3;exports.useVirtualList=zE;exports.useVoiceRecorder=si;//# sourceMappingURL=index.js.map
|
|
71
71
|
//# sourceMappingURL=index.js.map
|