@craftzbay/ui 0.6.0 → 0.7.0

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.
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const xs=require("clsx"),fs=require("tailwind-merge"),i=require("react"),d=require("lucide-react"),e=require("react/jsx-runtime"),gs=require("@radix-ui/react-accordion"),X=require("class-variance-authority"),hs=require("@radix-ui/react-avatar"),Rt=require("@radix-ui/react-slot"),ps=require("@radix-ui/react-checkbox"),bs=require("@radix-ui/react-popover"),E=require("cmdk"),vs=require("@radix-ui/react-dialog"),js=require("@radix-ui/react-context-menu"),Ns=require("@radix-ui/react-dropdown-menu"),ws=require("react-day-picker"),ys=require("@radix-ui/react-label"),Xe=require("react-hook-form"),Cs=require("@radix-ui/react-select"),ks=require("@radix-ui/react-progress"),Ss=require("@radix-ui/react-radio-group"),Ts=require("@radix-ui/react-scroll-area"),Ds=require("@radix-ui/react-separator"),Rs=require("@radix-ui/react-slider"),Ms=require("@radix-ui/react-switch"),zs=require("@radix-ui/react-tabs"),Is=require("@radix-ui/react-toast"),Ps=require("@radix-ui/react-tooltip"),_s=require("embla-carousel-react"),oe=require("vaul");function A(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const r in a)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(a,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>a[r]})}}return t.default=a,Object.freeze(t)}const ve=A(gs),Ve=A(hs),Ct=A(ps),I=A(bs),R=A(vs),O=A(js),$=A(Ns),As=A(ys),B=A(Cs),kt=A(ks),We=A(Ss),he=A(Ts),Fs=A(Ds),Te=A(Rs),St=A(Ms),ze=A(zs),de=A(Is),je=A(Ps);function l(...a){return fs.twMerge(xs.clsx(a))}let Tt=0;function Ls(a="ds"){return Tt+=1,`${a}-${Tt}`}function Mt(a){const[t,r]=i.useState(()=>typeof window>"u"?!1:window.matchMedia(a).matches);return i.useEffect(()=>{if(typeof window>"u")return;const s=window.matchMedia(a),n=o=>r(o.matches);return r(s.matches),s.addEventListener("change",n),()=>s.removeEventListener("change",n)},[a]),t}function Es(){return Mt("(prefers-reduced-motion: reduce)")}const ie={toasts:[],listeners:new Set,emit(){for(const a of this.listeners)a(this.toasts)},push(a){const t=a.id??`t_${Date.now()}_${Math.random().toString(36).slice(2,7)}`,r={open:!0,duration:5e3,variant:"default",...a,id:t};return this.toasts=[r,...this.toasts].slice(0,3),this.emit(),t},dismiss(a){this.toasts=this.toasts.map(t=>t.id===a?{...t,open:!1}:t),this.emit()},remove(a){this.toasts=this.toasts.filter(t=>t.id!==a),this.emit()}};function Bs(){const[a,t]=i.useState(()=>[...ie.toasts]);i.useEffect(()=>{const o=c=>t([...c]);return ie.listeners.add(o),()=>{ie.listeners.delete(o)}},[]);const r=i.useCallback(o=>ie.push(o),[]),s=i.useCallback(o=>ie.dismiss(o),[]),n=i.useCallback(o=>ie.remove(o),[]);return{toasts:a,push:r,dismiss:s,remove:n}}const Os=a=>ie.push(a),$s=Object.freeze(Object.defineProperty({__proto__:null,AlertCircle:d.AlertCircle,AlertTriangle:d.AlertTriangle,ArrowDown:d.ArrowDown,ArrowLeft:d.ArrowLeft,ArrowRight:d.ArrowRight,ArrowUp:d.ArrowUp,ArrowUpDown:d.ArrowUpDown,AtSign:d.AtSign,BarChart3:d.BarChart3,Bell:d.Bell,Bookmark:d.Bookmark,Calendar:d.Calendar,Check:d.Check,CheckCircle2:d.CheckCircle2,ChevronDown:d.ChevronDown,ChevronLeft:d.ChevronLeft,ChevronRight:d.ChevronRight,ChevronUp:d.ChevronUp,ChevronsLeft:d.ChevronsLeft,ChevronsRight:d.ChevronsRight,ChevronsUpDown:d.ChevronsUpDown,Circle:d.Circle,Copy:d.Copy,CornerDownLeft:d.CornerDownLeft,CreditCard:d.CreditCard,Download:d.Download,Edit2:d.Edit2,Ellipsis:d.Ellipsis,ExternalLink:d.ExternalLink,Eye:d.Eye,EyeOff:d.EyeOff,Filter:d.Filter,Folder:d.Folder,GripVertical:d.GripVertical,HelpCircle:d.HelpCircle,Home:d.Home,Inbox:d.Inbox,Info:d.Info,LayoutGrid:d.LayoutGrid,Link2:d.Link2,Loader2:d.Loader2,Lock:d.Lock,LogOut:d.LogOut,Mail:d.Mail,Menu:d.Menu,Minus:d.Minus,Moon:d.Moon,MoreHorizontal:d.MoreHorizontal,Package:d.Package,Plug:d.Plug,Plus:d.Plus,Search:d.Search,Settings:d.Settings,Sparkles:d.Sparkles,Sun:d.Sun,Trash2:d.Trash2,Upload:d.Upload,User:d.User,Users:d.Users,X:d.X,XCircle:d.XCircle},Symbol.toStringTag,{value:"Module"}));function me({className:a,children:t,...r}){return e.jsx("svg",{viewBox:"0 0 120 120",role:"img",width:"120",height:"120",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:l("text-foreground-subtle",a),"aria-hidden":!0,...r,children:t})}function zt(a){return e.jsxs(me,{...a,children:[e.jsx("path",{d:"M22 56l10-28a6 6 0 0 1 6-4h44a6 6 0 0 1 6 4l10 28"}),e.jsx("path",{d:"M22 56v32a6 6 0 0 0 6 6h64a6 6 0 0 0 6-6V56"}),e.jsx("path",{d:"M22 56h22l4 10h24l4-10h22"}),e.jsx("circle",{cx:"60",cy:"36",r:"2",className:"text-accent",stroke:"currentColor"}),e.jsx("path",{d:"M52 28l8 8M68 28l-8 8",opacity:"0.4"})]})}function Us(a){return e.jsxs(me,{...a,children:[e.jsx("circle",{cx:"52",cy:"52",r:"26"}),e.jsx("path",{d:"M72 72l20 20"}),e.jsx("path",{d:"M42 52h20",opacity:"0.5"}),e.jsx("circle",{cx:"98",cy:"22",r:"1.5",className:"text-accent",stroke:"currentColor"}),e.jsx("circle",{cx:"20",cy:"92",r:"1.5",className:"text-accent",stroke:"currentColor"})]})}function It(a){return e.jsxs(me,{...a,children:[e.jsx("path",{d:"M22 32h76v56a6 6 0 0 1-6 6H28a6 6 0 0 1-6-6V32z"}),e.jsx("path",{d:"M22 44h76"}),e.jsx("circle",{cx:"32",cy:"38",r:"1.5"}),e.jsx("circle",{cx:"40",cy:"38",r:"1.5"}),e.jsx("circle",{cx:"48",cy:"38",r:"1.5"}),e.jsx("path",{d:"M44 64l32 16M76 64l-32 16",className:"text-accent",stroke:"currentColor"}),e.jsx("text",{x:"60",y:"76",fontFamily:"ui-monospace,monospace",fontSize:"9",textAnchor:"middle",fill:"currentColor",stroke:"none",opacity:"0.6",children:"404"})]})}function Pt(a){return e.jsxs(me,{...a,children:[e.jsx("rect",{x:"22",y:"28",width:"76",height:"20",rx:"3"}),e.jsx("rect",{x:"22",y:"54",width:"76",height:"20",rx:"3"}),e.jsx("rect",{x:"22",y:"80",width:"76",height:"20",rx:"3"}),e.jsx("circle",{cx:"32",cy:"38",r:"2",className:"text-danger",stroke:"currentColor"}),e.jsx("circle",{cx:"32",cy:"64",r:"2",className:"text-danger",stroke:"currentColor"}),e.jsx("circle",{cx:"32",cy:"90",r:"2",className:"text-warning",stroke:"currentColor"}),e.jsx("path",{d:"M44 38h44M44 64h44M44 90h28",opacity:"0.4"}),e.jsx("path",{d:"M82 84l16 16M82 100l16-16",className:"text-danger",stroke:"currentColor"})]})}function Hs(a){return e.jsxs(me,{...a,children:[e.jsx("path",{d:"M22 86h76"}),e.jsx("path",{d:"M30 86V52l30-22 30 22v34"}),e.jsx("rect",{x:"40",y:"64",width:"14",height:"14",rx:"1"}),e.jsx("rect",{x:"66",y:"64",width:"14",height:"14",rx:"1"}),e.jsx("path",{d:"M30 52h60",opacity:"0.4"}),e.jsx("path",{d:"M40 40v6M50 36v10M70 36v10M80 40v6",className:"text-accent",stroke:"currentColor"})]})}function _t(a){return e.jsxs(me,{...a,children:[e.jsx("path",{d:"M22 60a40 40 0 0 1 76 0",opacity:"0.4"}),e.jsx("path",{d:"M34 70a28 28 0 0 1 52 0",opacity:"0.6"}),e.jsx("path",{d:"M46 80a16 16 0 0 1 28 0"}),e.jsx("circle",{cx:"60",cy:"92",r:"3"}),e.jsx("path",{d:"M20 20l80 80",className:"text-danger",stroke:"currentColor"})]})}const Gs=Object.freeze(Object.defineProperty({__proto__:null,ConnectionLost:_t,Construction:Hs,InboxEmpty:zt,NoSearchResults:Us,NotFound:It,ServerError:Pt},Symbol.toStringTag,{value:"Module"})),Vs=ve.Root,At=i.forwardRef(function({className:t,...r},s){return e.jsx(ve.Item,{ref:s,className:l("border-b border-border",t),...r})});At.displayName="AccordionItem";const Ft=i.forwardRef(function({className:t,children:r,...s},n){return e.jsx(ve.Header,{className:"flex",children:e.jsxs(ve.Trigger,{ref:n,className:l("flex flex-1 items-center justify-between gap-2 py-4 text-left text-sm font-medium text-foreground","outline-none transition-colors duration-[var(--duration-fast)]","hover:text-accent","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","[&[data-state=open]>svg]:rotate-180",t),...s,children:[r,e.jsx(d.ChevronDown,{className:"size-4 shrink-0 text-foreground-subtle transition-transform duration-[var(--duration-base)]","aria-hidden":!0})]})})});Ft.displayName="AccordionTrigger";const Lt=i.forwardRef(function({className:t,children:r,...s},n){return e.jsx(ve.Content,{ref:n,className:l("overflow-hidden text-sm text-foreground-muted","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"),...s,children:e.jsx("div",{className:l("pb-4 pt-0",t),children:r})})});Lt.displayName="AccordionContent";const qs=X.cva(["relative flex w-full gap-3 rounded-lg border p-4","text-sm"],{variants:{variant:{default:"border-border bg-background-subtle text-foreground",info:"border-info-border-soft bg-info-soft text-info-text",success:"border-success-border-soft bg-success-soft text-success-text",warning:"border-warning-border-soft bg-warning-soft text-warning-text",danger:"border-danger-border-soft bg-danger-soft text-danger-text"}},defaultVariants:{variant:"default"}}),Ws={default:null,info:e.jsx(d.Info,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),success:e.jsx(d.CheckCircle2,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),warning:e.jsx(d.AlertTriangle,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),danger:e.jsx(d.XCircle,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0})},we=i.forwardRef(function({className:t,variant:r="default",title:s,dismissible:n,onDismiss:o,icon:c,children:m,...x},u){const[g,p]=i.useState(!0);if(!g)return null;const f=()=>{p(!1),o==null||o()},h=c===!1?null:c??Ws[r??"default"];return e.jsxs("div",{ref:u,role:"alert",className:l(qs({variant:r}),t),...x,children:[h,e.jsxs("div",{className:"flex-1 min-w-0",children:[s&&e.jsx("h5",{className:"font-medium leading-tight mb-1",children:s}),e.jsx("div",{className:"text-sm leading-relaxed [&_p]:leading-relaxed",children:m})]}),n&&e.jsx("button",{type:"button","aria-label":"Dismiss",onClick:f,className:l("inline-flex size-6 shrink-0 items-center justify-center rounded-md","hover:bg-current/10 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:e.jsx(d.X,{className:"size-3.5","aria-hidden":!0})})]})});we.displayName="Alert";const Et={xs:"size-5 text-[10px]",sm:"size-6 text-xs",md:"size-8 text-xs",lg:"size-10 text-sm",xl:"size-12 text-base"},Xs=X.cva("relative inline-flex shrink-0",{variants:{size:Et},defaultVariants:{size:"md"}}),Ks={online:"bg-success",busy:"bg-danger",away:"bg-warning",offline:"bg-foreground-subtle"},Y=i.forwardRef(function({className:t,size:r,src:s,alt:n,fallback:o,status:c,...m},x){return e.jsxs("span",{className:Xs({size:r}),children:[e.jsxs(Ve.Root,{ref:x,className:l("block size-full overflow-hidden rounded-full bg-background-muted text-foreground-muted",t),...m,children:[s&&e.jsx(Ve.Image,{src:s,alt:n??"",className:"aspect-square size-full object-cover"}),e.jsx(Ve.Fallback,{delayMs:s?200:0,className:"flex size-full items-center justify-center bg-background-muted font-medium uppercase",children:o??"?"})]}),c&&e.jsx("span",{"aria-label":`Status: ${c}`,className:l("absolute bottom-0 right-0 block size-[28%] rounded-full ring-2 ring-background",Ks[c])})]})});Y.displayName="Avatar";const Bt=i.forwardRef(function({max:t=4,size:r="md",className:s,children:n,...o},c){const m=Array.isArray(n)?n:[n],x=m.slice(0,t),u=m.length-x.length;return e.jsxs("div",{ref:c,className:l("flex items-center -space-x-2",s),...o,children:[x.map((g,p)=>e.jsx("div",{className:"ring-2 ring-background rounded-full",children:g},p)),u>0&&e.jsxs("div",{className:l("inline-flex items-center justify-center rounded-full bg-background-muted text-foreground-muted ring-2 ring-background",Et[r],"font-medium"),"aria-label":`${u} more`,children:["+",u]})]})});Bt.displayName="AvatarGroup";const Qs=X.cva(["inline-flex items-center gap-1 rounded-full px-2 py-0.5","text-xs font-medium whitespace-nowrap"],{variants:{variant:{subtle:"",outline:"border bg-transparent"},tone:{neutral:"",accent:"",success:"",warning:"",danger:"",info:""}},compoundVariants:[{variant:"subtle",tone:"neutral",class:"bg-background-muted text-foreground-muted"},{variant:"subtle",tone:"accent",class:"bg-accent-soft text-on-accent-soft"},{variant:"subtle",tone:"success",class:"bg-success-soft text-success-text"},{variant:"subtle",tone:"warning",class:"bg-warning-soft text-warning-text"},{variant:"subtle",tone:"danger",class:"bg-danger-soft text-danger-text"},{variant:"subtle",tone:"info",class:"bg-info-soft text-info-text"},{variant:"outline",tone:"neutral",class:"border-border text-foreground-muted"},{variant:"outline",tone:"accent",class:"border-accent text-accent"},{variant:"outline",tone:"success",class:"border-success-border-soft text-success-text"},{variant:"outline",tone:"warning",class:"border-warning-border-soft text-warning-text"},{variant:"outline",tone:"danger",class:"border-danger-border-soft text-danger-text"},{variant:"outline",tone:"info",class:"border-info-border-soft text-info-text"}],defaultVariants:{variant:"subtle",tone:"neutral"}}),Ys={neutral:"bg-foreground-subtle",accent:"bg-accent",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"},V=i.forwardRef(function({className:t,variant:r,tone:s="neutral",dot:n,children:o,...c},m){return e.jsxs("span",{ref:m,className:l(Qs({variant:r,tone:s}),t),...c,children:[n&&e.jsx("span",{"aria-hidden":!0,className:l("inline-block size-1.5 rounded-full",Ys[s??"neutral"])}),o]})});V.displayName="Badge";const Ke=i.forwardRef(function({items:t,maxItems:r=4,renderLink:s,className:n,...o},c){const x=t.length>r?[t[0],{collapsed:!0},...t.slice(-2)]:t;return e.jsx("nav",{ref:c,"aria-label":"Breadcrumb",className:l("text-sm",n),...o,children:e.jsx("ol",{className:"flex flex-wrap items-center gap-1.5 text-foreground-subtle",children:x.map((u,g)=>{const p=g===x.length-1;if("collapsed"in u)return e.jsxs("li",{className:"flex items-center gap-1.5",children:[e.jsx(d.MoreHorizontal,{className:"size-4","aria-hidden":!0}),e.jsx(d.ChevronRight,{className:"size-3.5","aria-hidden":!0})]},`ellipsis-${g}`);const f=u,h=p?e.jsx("span",{"aria-current":"page",className:"font-medium text-foreground",children:f.label}):f.href?s?s(f.href,f.label):e.jsx("a",{href:f.href,className:"hover:text-foreground transition-colors duration-[var(--duration-fast)] outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",children:f.label}):e.jsx("span",{children:f.label});return e.jsxs("li",{className:"flex items-center gap-1.5",children:[h,!p&&e.jsx(d.ChevronRight,{className:"size-3.5","aria-hidden":!0})]},g)})})})});Ke.displayName="Breadcrumbs";const Js=X.cva(["inline-flex items-center justify-center gap-2 whitespace-nowrap","rounded-md text-sm font-medium","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0"],{variants:{variant:{primary:["bg-accent text-on-accent","hover:bg-accent-700","active:bg-accent-800"],secondary:["bg-background-muted text-foreground border border-border","hover:bg-neutral-200 dark:hover:bg-neutral-800","active:bg-neutral-300 dark:active:bg-neutral-700"],outline:["border border-border bg-transparent text-foreground","hover:bg-background-muted","active:bg-background-subtle"],ghost:["bg-transparent text-foreground","hover:bg-background-muted","active:bg-background-subtle"],destructive:["bg-danger text-on-danger","hover:bg-danger-700","active:bg-danger-800"],link:["bg-transparent text-accent underline-offset-4 px-0","hover:underline","active:text-accent-700"]},size:{sm:"h-8 px-3 text-xs [&_svg]:size-4",md:"h-9 px-3.5 text-sm [&_svg]:size-4",lg:"h-10 px-4 text-sm [&_svg]:size-5",icon:"h-9 w-9 [&_svg]:size-4"}},compoundVariants:[{variant:"link",size:"sm",class:"h-auto px-0"},{variant:"link",size:"md",class:"h-auto px-0"},{variant:"link",size:"lg",class:"h-auto px-0"}],defaultVariants:{variant:"primary",size:"md"}}),T=i.forwardRef(function({className:t,variant:r,size:s,asChild:n=!1,loading:o=!1,leadingIcon:c,trailingIcon:m,disabled:x,children:u,type:g="button",...p},f){const h=x||o,b=l(Js({variant:r,size:s}),t);return n?e.jsx(Rt.Slot,{ref:f,"aria-busy":o||void 0,"data-loading":o||void 0,className:b,...p,children:u}):e.jsxs("button",{ref:f,type:g,"aria-busy":o||void 0,disabled:h,"data-loading":o||void 0,className:b,...p,children:[o?e.jsx(d.Loader2,{className:"animate-spin","aria-hidden":"true"}):c,u,!o&&m]})});T.displayName="Button";const Zs=X.cva(["rounded-lg border bg-card text-card-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]"],{variants:{variant:{default:"border-border",interactive:"border-border hover:border-border-strong hover:bg-background-subtle cursor-pointer"},padding:{none:"",sm:"p-4",md:"p-5",lg:"p-6"}},defaultVariants:{variant:"default",padding:"md"}}),U=i.forwardRef(function({className:t,variant:r,padding:s,...n},o){return e.jsx("div",{ref:o,className:l(Zs({variant:r,padding:s}),t),...n})});U.displayName="Card";const H=i.forwardRef(function({className:t,...r},s){return e.jsx("div",{ref:s,className:l("flex flex-col gap-1 pb-4",t),...r})});H.displayName="CardHeader";const W=i.forwardRef(function({className:t,...r},s){return e.jsx("h3",{ref:s,className:l("text-base font-semibold text-foreground leading-tight",t),...r})});W.displayName="CardTitle";const te=i.forwardRef(function({className:t,...r},s){return e.jsx("p",{ref:s,className:l("text-sm text-foreground-muted",t),...r})});te.displayName="CardDescription";const G=i.forwardRef(function({className:t,...r},s){return e.jsx("div",{ref:s,className:l("text-sm text-foreground",t),...r})});G.displayName="CardContent";const Ot=i.forwardRef(function({className:t,...r},s){return e.jsx("div",{ref:s,className:l("flex items-center gap-2 pt-4",t),...r})});Ot.displayName="CardFooter";const pe=i.forwardRef(function({className:t,label:r,description:s,error:n,hideLabel:o,id:c,disabled:m,...x},u){const g=i.useId(),p=c??g,f=s?`${p}-desc`:void 0,h=n?`${p}-error`:void 0;return e.jsxs("div",{className:l("flex flex-col gap-1",t),children:[e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx(Ct.Root,{ref:u,id:p,disabled:m,"aria-describedby":h??f,"aria-invalid":!!n||void 0,className:l("peer mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-sm border","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","data-[state=checked]:bg-accent data-[state=checked]:border-accent data-[state=checked]:text-on-accent","data-[state=indeterminate]:bg-accent data-[state=indeterminate]:border-accent data-[state=indeterminate]:text-on-accent","disabled:cursor-not-allowed disabled:opacity-50",n?"border-danger":"border-border-strong"),...x,children:e.jsx(Ct.Indicator,{className:"flex items-center justify-center",children:x.checked==="indeterminate"?e.jsx(d.Minus,{className:"size-3","aria-hidden":!0,strokeWidth:3}):e.jsx(d.Check,{className:"size-3","aria-hidden":!0,strokeWidth:3})})}),r&&e.jsxs("div",{className:l("flex flex-col gap-0.5",o&&"sr-only"),children:[e.jsx("label",{htmlFor:p,className:l("text-sm text-foreground select-none",m&&"opacity-50 cursor-not-allowed"),children:r}),s&&e.jsx("p",{id:f,className:"text-xs text-foreground-subtle",children:s})]})]}),n&&e.jsx("p",{id:h,role:"alert",className:"text-xs text-danger-text",children:n})]})});pe.displayName="Checkbox";const $t=i.forwardRef(function({value:t,onChange:r,options:s,loadOptions:n,label:o,helperText:c,error:m,placeholder:x="Select…",searchPlaceholder:u="Search…",emptyText:g="No results.",clearable:p=!0,disabled:f,size:h="md",className:b},j){const v=i.useId(),S=`${v}-helper`,_=`${v}-error`,[D,k]=i.useState(!1),[N,w]=i.useState(""),[F,K]=i.useState([]),[Q,se]=i.useState(!1),z=n?F:s??[];i.useEffect(()=>{if(!n||!D)return;let L=!1;return se(!0),n(N).then(C=>{L||K(C)}).finally(()=>{L||se(!1)}),()=>{L=!0}},[N,D,n]);const q=i.useMemo(()=>z.find(L=>L.value===t)??null,[z,t]),Z=h==="sm"?"h-8":h==="lg"?"h-10":"h-9",y=h==="sm"?"px-2.5":h==="lg"?"px-3.5":"px-3",ee=i.useCallback(L=>{L.stopPropagation(),r(null)},[r]),fe=!!m;return e.jsxs("div",{ref:j,className:l("flex flex-col gap-1.5",b),children:[o&&e.jsx("label",{htmlFor:v,className:"text-sm font-medium text-foreground",children:o}),e.jsxs(I.Root,{open:D,onOpenChange:k,children:[e.jsx(I.Trigger,{asChild:!0,children:e.jsxs("button",{id:v,type:"button",role:"combobox","aria-expanded":D,"aria-invalid":fe||void 0,"aria-describedby":fe?_:c?S:void 0,disabled:f,className:l("inline-flex w-full items-center justify-between gap-2 rounded-md border bg-card text-sm text-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",Z,y,fe?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring"),children:[e.jsx("span",{className:l("truncate",!q&&"text-foreground-subtle"),children:q?q.label:x}),e.jsxs("span",{className:"ml-2 flex items-center gap-1 shrink-0",children:[p&&q&&!f&&e.jsx("span",{role:"button",tabIndex:-1,onClick:ee,"aria-label":"Clear selection",className:"text-foreground-subtle hover:text-foreground",children:e.jsx(d.X,{className:"size-4","aria-hidden":!0})}),e.jsx(d.ChevronsUpDown,{className:"size-4 text-foreground-subtle","aria-hidden":!0})]})]})}),e.jsx(I.Portal,{children:e.jsx(I.Content,{align:"start",sideOffset:4,className:l("z-[var(--z-popover)] w-[var(--radix-popover-trigger-width)] overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"),children:e.jsxs(E.Command,{shouldFilter:!n,className:"flex h-full w-full flex-col",children:[e.jsxs("div",{className:"flex items-center border-b border-border px-3",children:[e.jsx(E.Command.Input,{value:N,onValueChange:w,placeholder:u,className:"flex h-9 w-full bg-transparent py-2 text-sm outline-none placeholder:text-foreground-subtle"}),Q&&e.jsx(d.Loader2,{className:"size-4 animate-spin text-foreground-subtle","aria-hidden":!0})]}),e.jsxs(E.Command.List,{className:"max-h-64 overflow-y-auto p-1",children:[z.map(L=>{const C=L.value===t;return e.jsxs(E.Command.Item,{value:L.value,disabled:L.disabled,onSelect:M=>{r(M),k(!1)},className:l("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground","data-[selected=true]:bg-background-muted","data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none"),children:[e.jsx("span",{className:"flex-1",children:L.label}),L.description&&e.jsx("span",{className:"text-xs text-foreground-subtle",children:L.description}),C&&e.jsx(d.Check,{className:"size-4 text-accent","aria-hidden":!0})]},L.value)}),!Q&&z.length===0&&e.jsx(E.Command.Empty,{className:"px-2 py-6 text-center text-sm text-foreground-subtle",children:g})]})]})})})]}),m?e.jsx("p",{id:_,role:"alert",className:"text-xs text-danger-text",children:m}):c?e.jsx("p",{id:S,className:"text-xs text-foreground-subtle",children:c}):null]})});$t.displayName="Combobox";const Ut=i.forwardRef(function({className:t,...r},s){return e.jsx(E.Command,{ref:s,className:l("flex h-full w-full flex-col overflow-hidden rounded-lg bg-popover text-popover-foreground",t),...r})});Ut.displayName="Command";const Ht=i.forwardRef(function({className:t,...r},s){return e.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3","cmdk-input-wrapper":"",children:[e.jsx(d.Search,{className:"size-4 shrink-0 text-foreground-subtle","aria-hidden":!0}),e.jsx(E.Command.Input,{ref:s,className:l("flex h-11 w-full bg-transparent py-3 text-sm outline-none","placeholder:text-foreground-subtle disabled:cursor-not-allowed disabled:opacity-50",t),...r})]})});Ht.displayName="CommandInput";const Gt=i.forwardRef(function({className:t,...r},s){return e.jsx(E.Command.List,{ref:s,className:l("max-h-[320px] overflow-y-auto p-1",t),...r})});Gt.displayName="CommandList";const Vt=i.forwardRef(function(t,r){return e.jsx(E.Command.Empty,{ref:r,className:"py-8 text-center text-sm text-foreground-subtle",...t})});Vt.displayName="CommandEmpty";const qt=i.forwardRef(function({className:t,...r},s){return e.jsx(E.Command.Group,{ref:s,className:l("overflow-hidden text-foreground p-1","[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5","[&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium","[&_[cmdk-group-heading]]:text-foreground-subtle",t),...r})});qt.displayName="CommandGroup";const Wt=i.forwardRef(function({className:t,...r},s){return e.jsx(E.Command.Separator,{ref:s,className:l("-mx-1 my-1 h-px bg-border",t),...r})});Wt.displayName="CommandSeparator";const Xt=i.forwardRef(function({className:t,...r},s){return e.jsx(E.Command.Item,{ref:s,className:l("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[selected=true]:bg-background-muted data-[selected=true]:text-foreground","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","[&_svg]:size-4 [&_svg]:text-foreground-subtle",t),...r})});Xt.displayName="CommandItem";function ea({children:a,className:t}){return e.jsx("span",{className:l("ml-auto inline-flex items-center gap-0.5 text-xs tracking-widest text-foreground-subtle font-mono",t),children:a})}function ta({open:a,onOpenChange:t,children:r,title:s="Command palette"}){return e.jsx(R.Root,{open:a,onOpenChange:t,children:e.jsxs(R.Portal,{children:[e.jsx(R.Overlay,{className:l("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0")}),e.jsxs(R.Content,{className:l("fixed left-1/2 top-[20%] z-[var(--z-modal)] -translate-x-1/2","w-[calc(100%-2rem)] max-w-[640px] overflow-hidden","rounded-lg border border-border bg-popover text-popover-foreground shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0","data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95"),children:[e.jsx(R.Title,{className:"sr-only",children:s}),r]})]})})}function ra(a){const[t,r]=i.useState(0);i.useEffect(()=>{const s=n=>{n.key==="k"&&(n.metaKey||n.ctrlKey)&&(n.preventDefault(),a(!0),r(o=>o+1))};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[a])}const sa=O.Root,aa=O.Trigger,na=O.Group,Kt=O.Portal,oa=O.Sub,ia=O.RadioGroup,Ie=l("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50"),Qt=i.forwardRef(function({className:t,children:r,...s},n){return e.jsxs(O.SubTrigger,{ref:n,className:l(Ie,"data-[state=open]:bg-background-muted",t),...s,children:[r,e.jsx(d.ChevronRight,{className:"ml-auto size-4 text-foreground-subtle","aria-hidden":!0})]})});Qt.displayName="ContextMenuSubTrigger";const Yt=i.forwardRef(function({className:t,...r},s){return e.jsx(O.SubContent,{ref:s,className:l("z-[var(--z-popover)] min-w-[8rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md",t),...r})});Yt.displayName="ContextMenuSubContent";const Jt=i.forwardRef(function({className:t,...r},s){return e.jsx(Kt,{children:e.jsx(O.Content,{ref:s,className:l("z-[var(--z-popover)] min-w-[12rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r})})});Jt.displayName="ContextMenuContent";const Zt=i.forwardRef(function({className:t,destructive:r,...s},n){return e.jsx(O.Item,{ref:n,className:l(Ie,r&&"text-danger-text data-[highlighted]:bg-danger-soft data-[highlighted]:text-danger-text",t),...s})});Zt.displayName="ContextMenuItem";const er=i.forwardRef(function({className:t,children:r,...s},n){return e.jsxs(O.CheckboxItem,{ref:n,className:l(Ie,"pl-8",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(O.ItemIndicator,{children:e.jsx(d.Check,{className:"size-4 text-accent","aria-hidden":!0})})}),r]})});er.displayName="ContextMenuCheckboxItem";const tr=i.forwardRef(function({className:t,children:r,...s},n){return e.jsxs(O.RadioItem,{ref:n,className:l(Ie,"pl-8",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(O.ItemIndicator,{children:e.jsx(d.Circle,{className:"size-2 fill-accent text-accent","aria-hidden":!0})})}),r]})});tr.displayName="ContextMenuRadioItem";const rr=i.forwardRef(function({className:t,...r},s){return e.jsx(O.Label,{ref:s,className:l("px-2 py-1.5 text-xs font-medium text-foreground-subtle",t),...r})});rr.displayName="ContextMenuLabel";const sr=i.forwardRef(function({className:t,...r},s){return e.jsx(O.Separator,{ref:s,className:l("-mx-1 my-1 h-px bg-border",t),...r})});sr.displayName="ContextMenuSeparator";function ar({className:a,...t}){return e.jsx("span",{className:l("ml-auto text-xs tracking-widest text-foreground-subtle font-mono",a),...t})}ar.displayName="ContextMenuShortcut";const Pe=$.Root,_e=$.Trigger,la=$.Group,nr=$.Portal,da=$.Sub,ca=$.RadioGroup,Ae=l("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","transition-colors duration-[var(--duration-fast)]"),or=i.forwardRef(function({className:t,inset:r,children:s,...n},o){return e.jsxs($.SubTrigger,{ref:o,className:l(Ae,"data-[state=open]:bg-background-muted",r&&"pl-8",t),...n,children:[s,e.jsx(d.ChevronRight,{className:"ml-auto size-4 text-foreground-subtle","aria-hidden":!0})]})});or.displayName="DropdownMenuSubTrigger";const ir=i.forwardRef(function({className:t,...r},s){return e.jsx($.SubContent,{ref:s,className:l("z-[var(--z-popover)] min-w-[8rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",t),...r})});ir.displayName="DropdownMenuSubContent";const ye=i.forwardRef(function({className:t,sideOffset:r=4,align:s="end",...n},o){return e.jsx(nr,{children:e.jsx($.Content,{ref:o,sideOffset:r,align:s,className:l("z-[var(--z-popover)] min-w-[12rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-1 data-[side=top]:slide-in-from-bottom-1",t),...n})})});ye.displayName="DropdownMenuContent";const Qe=i.forwardRef(function({className:t,inset:r,destructive:s,...n},o){return e.jsx($.Item,{ref:o,className:l(Ae,r&&"pl-8",s&&"text-danger-text data-[highlighted]:bg-danger-soft data-[highlighted]:text-danger-text",t),...n})});Qe.displayName="DropdownMenuItem";const Ye=i.forwardRef(function({className:t,children:r,checked:s,...n},o){return e.jsxs($.CheckboxItem,{ref:o,checked:s,className:l(Ae,"pl-8",t),...n,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx($.ItemIndicator,{children:e.jsx(d.Check,{className:"size-4 text-accent","aria-hidden":!0})})}),r]})});Ye.displayName="DropdownMenuCheckboxItem";const lr=i.forwardRef(function({className:t,children:r,...s},n){return e.jsxs($.RadioItem,{ref:n,className:l(Ae,"pl-8",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx($.ItemIndicator,{children:e.jsx(d.Circle,{className:"size-2 fill-accent text-accent","aria-hidden":!0})})}),r]})});lr.displayName="DropdownMenuRadioItem";const Fe=i.forwardRef(function({className:t,inset:r,...s},n){return e.jsx($.Label,{ref:n,className:l("px-2 py-1.5 text-xs font-medium text-foreground-subtle",r&&"pl-8",t),...s})});Fe.displayName="DropdownMenuLabel";const Ne=i.forwardRef(function({className:t,...r},s){return e.jsx($.Separator,{ref:s,className:l("-mx-1 my-1 h-px bg-border",t),...r})});Ne.displayName="DropdownMenuSeparator";function dr({className:a,...t}){return e.jsx("span",{className:l("ml-auto text-xs tracking-widest text-foreground-subtle font-mono",a),...t})}dr.displayName="DropdownMenuShortcut";const ua=X.cva(["inline-flex items-center justify-center shrink-0","rounded-md","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none"],{variants:{variant:{primary:"bg-accent text-on-accent hover:bg-accent-700 active:bg-accent-800",secondary:"bg-background-muted text-foreground border border-border hover:bg-neutral-200 dark:hover:bg-neutral-800",outline:"border border-border bg-transparent text-foreground hover:bg-background-muted",ghost:"bg-transparent text-foreground-muted hover:bg-background-muted hover:text-foreground",destructive:"bg-danger text-on-danger hover:bg-danger-700 active:bg-danger-800"},size:{sm:"h-7 w-7 [&_svg]:size-3.5",md:"h-8 w-8 [&_svg]:size-4",lg:"h-10 w-10 [&_svg]:size-5"}},defaultVariants:{variant:"ghost",size:"md"}}),xe=i.forwardRef(function({className:t,variant:r,size:s,icon:n,loading:o,disabled:c,type:m="button",...x},u){const g=c||o;return e.jsx("button",{ref:u,type:m,"aria-busy":o||void 0,disabled:g,className:l(ua({variant:r,size:s}),t),...x,children:o?e.jsx(d.Loader2,{className:"animate-spin","aria-hidden":"true"}):n})});xe.displayName="IconButton";const ma=X.cva(["group inline-flex items-center w-full","rounded-md border bg-card text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","has-disabled:opacity-50 has-disabled:pointer-events-none","focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-offset-background"],{variants:{size:{sm:"h-8 px-2.5 gap-1.5",md:"h-9 px-3 gap-2",lg:"h-10 px-3.5 gap-2"},tone:{default:"border-border focus-within:border-accent focus-within:ring-ring",error:"border-danger focus-within:border-danger focus-within:ring-danger"}},defaultVariants:{size:"md",tone:"default"}}),xa=X.cva(["flex-1 min-w-0 bg-transparent outline-none","placeholder:text-foreground-subtle","text-foreground","disabled:cursor-not-allowed"]),P=i.forwardRef(function({className:t,type:r="text",size:s,tone:n,label:o,helperText:c,error:m,prefix:x,suffix:u,clearable:g,onClear:p,hideLabel:f,id:h,disabled:b,value:j,...v},S){const _=i.useId(),D=h??_,k=`${D}-helper`,N=`${D}-error`,[w,F]=i.useState(!1),K=r==="password"?w?"text":"password":r,Q=!!m,se=Q?"error":n,z=x??(r==="search"?e.jsx(d.Search,{className:"size-4 text-foreground-subtle","aria-hidden":!0}):null),q=j!==void 0&&j!==""&&j!==null;return e.jsxs("div",{className:l("flex flex-col gap-1.5",t),children:[o&&e.jsx("label",{htmlFor:D,className:l("text-sm font-medium text-foreground",f&&"sr-only"),children:o}),e.jsxs("div",{className:l(ma({size:s,tone:se})),children:[z&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:z}),e.jsx("input",{ref:S,id:D,type:K,disabled:b,value:j,"aria-invalid":Q||void 0,"aria-describedby":m?N:c?k:void 0,className:l(xa()),...v}),g&&q&&e.jsx("button",{type:"button",onClick:p,tabIndex:-1,"aria-label":"Clear input",className:"flex items-center text-foreground-subtle hover:text-foreground",children:e.jsx(d.X,{className:"size-4","aria-hidden":!0})}),r==="password"&&e.jsx("button",{type:"button",onClick:()=>F(Z=>!Z),tabIndex:-1,"aria-label":w?"Hide password":"Show password","aria-pressed":w,className:"flex items-center text-foreground-subtle hover:text-foreground",children:w?e.jsx(d.EyeOff,{className:"size-4","aria-hidden":!0}):e.jsx(d.Eye,{className:"size-4","aria-hidden":!0})}),u&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:u})]}),m?e.jsx("p",{id:N,role:"alert",className:"text-xs text-danger-text",children:m}):c?e.jsx("p",{id:k,className:"text-xs text-foreground-subtle",children:c}):null]})});P.displayName="Input";const Le=i.forwardRef(function({className:t,...r},s){return e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:s,className:l("w-full caption-bottom text-sm border-collapse",t),...r})})});Le.displayName="Table";const Ee=i.forwardRef(function({className:t,...r},s){return e.jsx("thead",{ref:s,className:l("sticky top-0 z-10 bg-background-subtle text-foreground-muted","[&_tr]:border-b [&_tr]:border-border",t),...r})});Ee.displayName="TableHeader";const Be=i.forwardRef(function({className:t,...r},s){return e.jsx("tbody",{ref:s,className:l("[&_tr:last-child]:border-0",t),...r})});Be.displayName="TableBody";const cr=i.forwardRef(function({className:t,...r},s){return e.jsx("tfoot",{ref:s,className:l("border-t border-border bg-background-subtle font-medium",t),...r})});cr.displayName="TableFooter";const ae=i.forwardRef(function({className:t,selected:r,...s},n){return e.jsx("tr",{ref:n,"data-selected":r||void 0,className:l("border-b border-border transition-colors duration-[var(--duration-fast)]","hover:bg-background-subtle","data-[selected]:bg-accent-soft data-[selected]:hover:bg-accent-soft",t),...s})});ae.displayName="TableRow";const ne=i.forwardRef(function({className:t,...r},s){return e.jsx("th",{ref:s,className:l("h-10 px-3 text-left align-middle text-xs font-medium uppercase tracking-wide text-foreground-subtle","[&:has([role=checkbox])]:w-10 [&:has([role=checkbox])]:pr-0",t),...r})});ne.displayName="TableHead";const re=i.forwardRef(function({className:t,...r},s){return e.jsx("td",{ref:s,className:l("px-3 py-3 align-middle text-foreground",t),...r})});re.displayName="TableCell";const ur=i.forwardRef(function({className:t,...r},s){return e.jsx("caption",{ref:s,className:l("mt-4 text-sm text-foreground-subtle",t),...r})});ur.displayName="TableCaption";const Je=i.forwardRef(function({sortKey:t,currentSort:r,onSortChange:s,children:n,className:o,...c},m){const x=(r==null?void 0:r.key)===t,u=x?r==null?void 0:r.direction:void 0,g=()=>{s(t,x&&u==="asc"?"desc":"asc")};return e.jsx(ne,{ref:m,className:l("p-0",o),"aria-sort":x?u==="asc"?"ascending":"descending":"none",...c,children:e.jsxs("button",{type:"button",onClick:g,className:l("inline-flex h-10 w-full items-center gap-1.5 px-3 outline-none","transition-colors duration-[var(--duration-fast)]","hover:text-foreground focus-visible:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background rounded-sm",x&&"text-foreground"),children:[n,u==="asc"?e.jsx(d.ArrowUp,{className:"size-3.5","aria-hidden":!0}):u==="desc"?e.jsx(d.ArrowDown,{className:"size-3.5","aria-hidden":!0}):e.jsx(d.ArrowUpDown,{className:"size-3.5 opacity-40","aria-hidden":!0})]})})});Je.displayName="TableSortHeader";const Ze=i.forwardRef(function({className:t,variant:r,...s},n){return e.jsx("div",{ref:n,"aria-hidden":!0,className:l("animate-pulse bg-background-muted",r==="text"&&"h-3 rounded-sm",r==="circle"&&"rounded-full aspect-square",r==="avatar"&&"size-8 rounded-full",r==="card"&&"rounded-lg",!r&&"rounded-md",t),...s})});Ze.displayName="Skeleton";function mr({columns:a,rows:t,loading:r,sort:s,onSortChange:n,filter:o,emptyState:c,className:m}){const[x,u]=i.useState({}),g=i.useMemo(()=>a.filter(f=>!x[f.key]),[a,x]),p=()=>r?Array.from({length:5}).map((f,h)=>e.jsx(ae,{children:g.map(b=>e.jsx(re,{children:e.jsx(Ze,{variant:"text",className:"w-3/4"})},b.key))},`skel-${h}`)):t.length===0?e.jsx(ae,{children:e.jsx(re,{colSpan:g.length,className:"h-32 text-center",children:c??e.jsx("span",{className:"text-foreground-subtle",children:"No results."})})}):t.map(f=>e.jsx(ae,{children:g.map(h=>e.jsx(re,{className:l(h.align==="right"&&"text-right tabular"),children:h.cell?h.cell(f):f[h.key]},h.key))},f.id));return e.jsxs("div",{className:l("flex flex-col gap-3",m),children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o?e.jsx(P,{type:"search",placeholder:o.placeholder??"Filter…",value:o.value,onChange:f=>o.onChange(f.target.value),clearable:!0,onClear:()=>o.onChange(""),className:"max-w-sm w-full",hideLabel:!0,label:"Filter rows"}):e.jsx("div",{}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(Pe,{children:[e.jsx(_e,{asChild:!0,children:e.jsx(xe,{"aria-label":"Column visibility",icon:e.jsx(d.Settings,{}),variant:"outline"})}),e.jsxs(ye,{children:[e.jsx(Fe,{children:"Columns"}),e.jsx(Ne,{}),a.map(f=>e.jsx(Ye,{checked:!x[f.key],onCheckedChange:h=>u(b=>({...b,[f.key]:!h})),children:f.header},f.key))]})]})})]}),e.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:e.jsxs(Le,{children:[e.jsx("colgroup",{children:g.map(f=>e.jsx("col",{style:f.width?{width:f.width}:void 0},f.key))}),e.jsx(Ee,{children:e.jsx(ae,{children:g.map(f=>f.sortable&&n?e.jsx(Je,{sortKey:f.key,currentSort:s??null,onSortChange:(h,b)=>n({key:h,direction:b}),children:f.header},f.key):e.jsx(ne,{className:l(f.align==="right"&&"text-right"),children:f.header},f.key))})}),e.jsx(Be,{children:p()})]})})]})}const et=i.forwardRef(function({className:t,classNames:r,...s},n){return e.jsx(ws.DayPicker,{showOutsideDays:!0,className:l("p-3",t),classNames:{root:"rdp",months:"flex flex-col gap-4 sm:flex-row sm:gap-6",month:"flex flex-col gap-3",month_caption:"relative flex h-8 items-center justify-center",caption_label:"text-sm font-medium",nav:"absolute inset-x-0 top-0 flex h-8 items-center justify-between",button_previous:"inline-flex h-7 w-7 items-center justify-center rounded-md text-foreground-muted hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring outline-none",button_next:"inline-flex h-7 w-7 items-center justify-center rounded-md text-foreground-muted hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring outline-none",month_grid:"w-full border-collapse",weekdays:"grid grid-cols-7",weekday:"h-8 w-9 text-center text-[11px] font-medium uppercase tracking-wide text-foreground-subtle",week:"mt-0.5 grid grid-cols-7",day:"relative h-9 w-9 p-0 text-center",day_button:"inline-flex h-9 w-9 items-center justify-center rounded-md text-sm hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring outline-none aria-selected:bg-accent aria-selected:text-on-accent aria-selected:hover:bg-accent-700",today:"[&_button]:border [&_button]:border-border",outside:"text-foreground-subtle",disabled:"opacity-40 pointer-events-none",range_start:"[&_button]:bg-accent [&_button]:text-on-accent [&_button]:rounded-r-none",range_end:"[&_button]:bg-accent [&_button]:text-on-accent [&_button]:rounded-l-none",range_middle:"[&_button]:bg-accent-soft [&_button]:text-foreground [&_button]:rounded-none",hidden:"invisible",...r},components:{Chevron:({orientation:o})=>o==="left"?e.jsx(d.ChevronLeft,{className:"size-4"}):e.jsx(d.ChevronRight,{className:"size-4"})},...s})});function Me(a){return a?a.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):""}function xr({label:a,placeholder:t,hasValue:r,children:s,error:n,fieldId:o,disabled:c}){return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[a&&e.jsx("label",{htmlFor:o,className:"text-sm font-medium text-foreground",children:a}),e.jsx(I.Trigger,{asChild:!0,children:e.jsxs("button",{id:o,type:"button",disabled:c,"aria-invalid":!!n||void 0,className:l("inline-flex h-9 w-full items-center justify-start gap-2 rounded-md border bg-card px-3 text-left text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",n?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring",!r&&"text-foreground-subtle"),children:[e.jsx(d.Calendar,{className:"size-4 text-foreground-subtle","aria-hidden":!0}),e.jsx("span",{className:"truncate",children:r?s:t})]})}),n&&e.jsx("p",{role:"alert",className:"text-xs text-danger-text",children:n})]})}const fr=i.forwardRef(function({value:t,onChange:r,label:s,placeholder:n="Pick a date",error:o,disabled:c,fromDate:m,toDate:x,className:u},g){const p=i.useId(),[f,h]=i.useState(!1);return e.jsx("div",{ref:g,className:l(u),children:e.jsxs(I.Root,{open:f,onOpenChange:h,children:[e.jsx(xr,{label:s,placeholder:n,hasValue:!!t,error:o,fieldId:p,disabled:c,children:Me(t)}),e.jsx(I.Portal,{children:e.jsx(I.Content,{align:"start",sideOffset:4,className:"z-[var(--z-popover)] rounded-lg border border-border bg-popover text-popover-foreground shadow-md",children:e.jsx(et,{mode:"single",selected:t,onSelect:b=>{r(b??void 0),b&&h(!1)},startMonth:m,endMonth:x})})})]})})});fr.displayName="DatePicker";const gr=i.forwardRef(function({value:t,onChange:r,label:s,placeholder:n="Pick a range",error:o,disabled:c,fromDate:m,toDate:x,className:u},g){const p=i.useId(),[f,h]=i.useState(!1),b=!!(t!=null&&t.from);return e.jsx("div",{ref:g,className:l(u),children:e.jsxs(I.Root,{open:f,onOpenChange:h,children:[e.jsx(xr,{label:s,placeholder:n,hasValue:b,error:o,fieldId:p,disabled:c,children:t!=null&&t.from&&t.to?`${Me(t.from)} – ${Me(t.to)}`:t!=null&&t.from?Me(t.from):""}),e.jsx(I.Portal,{children:e.jsx(I.Content,{align:"start",sideOffset:4,className:"z-[var(--z-popover)] rounded-lg border border-border bg-popover text-popover-foreground shadow-md",children:e.jsx(et,{mode:"range",selected:t,onSelect:r,numberOfMonths:2,startMonth:m,endMonth:x})})})]})})});gr.displayName="DateRangePicker";function fa({tokens:a,className:t,children:r,style:s,...n}){const o={...s};if(a)for(const[c,m]of Object.entries(a)){const x=c.startsWith("--")?c:`--${c}`;o[x]=m}return e.jsx("div",{"data-brand-scope":!0,className:l("contents",t),style:o,...n,children:r})}const ga={default:{},edgelog:{"color-accent":"oklch(0.55 0.18 250)","color-accent-700":"oklch(0.46 0.16 250)","color-accent-800":"oklch(0.38 0.14 250)","color-accent-soft":"oklch(0.95 0.04 250)","radius-md":"8px","radius-lg":"12px"},gerege:{"color-accent":"oklch(0.62 0.16 45)","color-accent-700":"oklch(0.54 0.16 45)","color-accent-800":"oklch(0.46 0.14 45)","color-accent-soft":"oklch(0.95 0.04 45)","radius-md":"4px","radius-lg":"6px"},forest:{"color-accent":"oklch(0.55 0.14 155)","color-accent-700":"oklch(0.47 0.14 155)","color-accent-800":"oklch(0.39 0.12 155)","color-accent-soft":"oklch(0.95 0.04 155)"}},hr=R.Root,ha=R.Trigger,pr=R.Portal,br=R.Close,tt=i.forwardRef(function({className:t,...r},s){return e.jsx(R.Overlay,{ref:s,className:l("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r})});tt.displayName="DialogOverlay";const rt=i.forwardRef(function({className:t,children:r,showClose:s=!0,size:n="md",...o},c){return e.jsxs(pr,{children:[e.jsx(tt,{}),e.jsxs(R.Content,{ref:c,className:l("fixed left-1/2 top-1/2 z-[var(--z-modal)] -translate-x-1/2 -translate-y-1/2","w-[calc(100%-2rem)] rounded-lg border border-border bg-card text-card-foreground shadow-lg","p-6","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",n==="sm"&&"max-w-[400px]",n==="md"&&"max-w-[520px]",n==="lg"&&"max-w-[720px]",t),...o,children:[r,s&&e.jsx(R.Close,{"aria-label":"Close",className:l("absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-foreground-subtle","hover:bg-background-muted hover:text-foreground","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","transition-colors duration-[var(--duration-fast)]"),children:e.jsx(d.X,{className:"size-4","aria-hidden":!0})})]})]})});rt.displayName="DialogContent";function st({className:a,...t}){return e.jsx("div",{className:l("flex flex-col gap-1 pb-4",a),...t})}st.displayName="DialogHeader";function at({className:a,...t}){return e.jsx("div",{className:l("flex flex-col-reverse gap-2 pt-6 sm:flex-row sm:justify-end",a),...t})}at.displayName="DialogFooter";const nt=i.forwardRef(function({className:t,...r},s){return e.jsx(R.Title,{ref:s,className:l("text-lg font-semibold text-foreground leading-tight",t),...r})});nt.displayName="DialogTitle";const ot=i.forwardRef(function({className:t,...r},s){return e.jsx(R.Description,{ref:s,className:l("text-sm text-foreground-muted",t),...r})});ot.displayName="DialogDescription";function vr({open:a,onOpenChange:t,title:r,description:s,confirmLabel:n="Confirm",cancelLabel:o="Cancel",confirmVariant:c="primary",onConfirm:m,loading:x}){return e.jsx(hr,{open:a,onOpenChange:t,children:e.jsxs(rt,{size:"sm",children:[e.jsxs(st,{children:[e.jsx(nt,{children:r}),s&&e.jsx(ot,{children:s})]}),e.jsxs(at,{children:[e.jsx(br,{asChild:!0,children:e.jsx(T,{variant:"outline",children:o})}),e.jsx(T,{variant:c,loading:x,onClick:m,children:n})]})]})})}vr.displayName="ConfirmationDialog";const Oe=i.forwardRef(function({icon:t,illustration:r,title:s,description:n,action:o,secondaryAction:c,className:m,...x},u){return e.jsxs("div",{ref:u,className:l("flex flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border bg-background-subtle p-10 text-center",m),...x,children:[r||(t?e.jsx("div",{className:"inline-flex size-12 items-center justify-center rounded-full bg-background-muted text-foreground-muted [&_svg]:size-6",children:t}):e.jsx(zt,{className:"size-24"})),e.jsx("h3",{className:"text-base font-semibold text-foreground leading-tight",children:s}),n&&e.jsx("p",{className:"max-w-md text-sm text-foreground-muted leading-relaxed",children:n}),(o||c)&&e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[o,c]})]})});Oe.displayName="EmptyState";const pa={404:{illustration:e.jsx(It,{className:"size-32"}),title:"Page not found",description:"We couldn't find what you were looking for."},500:{illustration:e.jsx(Pt,{className:"size-32"}),title:"Something went wrong",description:"We're looking into it. Please try again in a moment."},generic:{illustration:e.jsx(_t,{className:"size-32"}),title:"Unexpected error",description:"Something interrupted this action."}},jr=i.forwardRef(function({variant:t="generic",title:r,description:s,illustration:n,action:o,onRetry:c,className:m,...x},u){const g=pa[t];return e.jsxs("div",{ref:u,role:"alert",className:l("flex flex-col items-center justify-center gap-3 rounded-lg border border-border bg-background-subtle p-10 text-center",m),...x,children:[n??g.illustration,e.jsx("h3",{className:"text-base font-semibold text-foreground leading-tight",children:r??g.title}),e.jsx("p",{className:"max-w-md text-sm text-foreground-muted leading-relaxed",children:s??g.description}),(o||c)&&e.jsx("div",{className:"mt-2 flex items-center gap-2",children:o??e.jsx(T,{onClick:c,variant:"outline",children:"Try again"})})]})});jr.displayName="ErrorState";const ba=Xe.FormProvider,Nr=i.createContext(null);function va(a){return e.jsx(Nr.Provider,{value:{name:a.name},children:e.jsx(Xe.Controller,{...a})})}const wr=i.createContext(null);function Ce(){const a=i.useContext(Nr),t=i.useContext(wr),{getFieldState:r,formState:s}=Xe.useFormContext();if(!a)throw new Error("useFormField must be used inside <FormField>");const n=r(a.name,s),o=(t==null?void 0:t.id)??"";return{id:o,name:a.name,formItemId:`${o}-item`,formDescriptionId:`${o}-desc`,formMessageId:`${o}-error`,...n}}const yr=i.forwardRef(function({className:t,...r},s){const n=i.useId();return e.jsx(wr.Provider,{value:{id:n},children:e.jsx("div",{ref:s,className:l("flex flex-col gap-1.5",t),...r})})});yr.displayName="FormItem";const Cr=i.forwardRef(function({className:t,...r},s){const{formItemId:n,error:o}=Ce();return e.jsx(As.Root,{ref:s,htmlFor:n,className:l("text-sm font-medium text-foreground",o&&"text-danger-text",t),...r})});Cr.displayName="FormLabel";const kr=i.forwardRef(function(t,r){const{error:s,formItemId:n,formDescriptionId:o,formMessageId:c}=Ce();return e.jsx(Rt.Slot,{ref:r,id:n,"aria-describedby":s?`${o} ${c}`:o,"aria-invalid":!!s,...t})});kr.displayName="FormControl";const Sr=i.forwardRef(function({className:t,...r},s){const{formDescriptionId:n}=Ce();return e.jsx("p",{ref:s,id:n,className:l("text-xs text-foreground-subtle",t),...r})});Sr.displayName="FormDescription";const Tr=i.forwardRef(function({className:t,children:r,...s},n){const{error:o,formMessageId:c}=Ce(),m=o?String((o==null?void 0:o.message)??""):r;return m?e.jsx("p",{ref:n,id:c,role:"alert",className:l("text-xs text-danger-text",t),...s,children:m}):null});Tr.displayName="FormError";const it=i.forwardRef(function({size:t="sm",className:r,...s},n){return e.jsx("kbd",{ref:n,className:l("inline-flex items-center justify-center rounded border border-border bg-background-subtle font-mono","text-foreground-muted shadow-xs",t==="sm"?"h-5 min-w-5 px-1 text-[10px]":"h-6 min-w-6 px-1.5 text-xs",r),...s})});it.displayName="Kbd";const Dr=i.forwardRef(function({options:t,value:r,onChange:s,label:n,helperText:o,error:c,placeholder:m="Select…",emptyText:x="No results.",maxVisibleChips:u=3,clearable:g=!0,disabled:p,className:f},h){const b=i.useId(),j=b,v=`${b}-helper`,S=`${b}-error`,[_,D]=i.useState(!1),[k,N]=i.useState(""),w=i.useRef(null),F=i.useMemo(()=>t.filter(y=>r.includes(y.value)),[t,r]),K=i.useCallback(y=>{r.includes(y)?s(r.filter(ee=>ee!==y)):s([...r,y])},[r,s]),Q=i.useCallback(()=>s([]),[s]),se=y=>{y.key==="Backspace"&&k===""&&r.length>0&&s(r.slice(0,-1))},z=F.slice(0,u),q=F.length-z.length,Z=!!c;return e.jsxs("div",{ref:h,className:l("flex flex-col gap-1.5",f),children:[n&&e.jsx("label",{htmlFor:j,className:"text-sm font-medium text-foreground",children:n}),e.jsxs(I.Root,{open:_,onOpenChange:D,children:[e.jsx(I.Trigger,{asChild:!0,children:e.jsxs("div",{role:"combobox","aria-expanded":_,"aria-controls":`${j}-list`,"aria-haspopup":"listbox",id:j,tabIndex:p?-1:0,onKeyDown:se,"aria-disabled":p||void 0,"aria-invalid":Z||void 0,"aria-describedby":Z?S:o?v:void 0,className:l("flex h-9 w-full cursor-text items-center gap-1.5 overflow-hidden rounded-md border bg-card px-2 py-1 text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background",Z?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring",p&&"opacity-50 pointer-events-none"),onClick:()=>{var y;return(y=w.current)==null?void 0:y.focus()},children:[z.length===0&&e.jsx("span",{className:"text-foreground-subtle px-1",children:m}),z.map(y=>e.jsxs("span",{className:"inline-flex max-w-[10rem] shrink-0 items-center gap-1 rounded-md bg-accent-soft px-1.5 py-0.5 text-xs font-medium text-on-accent-soft",children:[e.jsx("span",{className:"truncate",children:y.label}),e.jsx("button",{type:"button","aria-label":`Remove ${y.label}`,className:"inline-flex items-center text-on-accent-soft hover:text-foreground",onClick:ee=>{ee.stopPropagation(),K(y.value)},children:e.jsx(d.X,{className:"size-3","aria-hidden":!0})})]},y.value)),q>0&&e.jsxs("span",{className:"shrink-0 rounded-md bg-background-muted px-1.5 py-0.5 text-xs font-medium text-foreground-muted",children:["+",q]}),e.jsx("input",{ref:w,value:k,onChange:y=>N(y.target.value),onFocus:()=>D(!0),className:"flex-1 min-w-[8ch] bg-transparent text-sm outline-none placeholder:text-foreground-subtle",placeholder:(F.length===0,""),disabled:p}),e.jsxs("span",{className:"ml-auto flex items-center gap-1",children:[g&&F.length>0&&e.jsx("button",{type:"button","aria-label":"Clear all",onClick:y=>{y.stopPropagation(),Q()},className:"text-foreground-subtle hover:text-foreground",children:e.jsx(d.X,{className:"size-4","aria-hidden":!0})}),e.jsx(d.ChevronsUpDown,{className:"size-4 text-foreground-subtle","aria-hidden":!0})]})]})}),e.jsx(I.Portal,{children:e.jsx(I.Content,{align:"start",sideOffset:4,className:l("z-[var(--z-popover)] w-[var(--radix-popover-trigger-width)] overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"),onOpenAutoFocus:y=>y.preventDefault(),children:e.jsx(E.Command,{shouldFilter:!1,className:"flex h-full w-full flex-col",children:e.jsxs(E.Command.List,{id:`${j}-list`,className:"max-h-64 overflow-y-auto p-1",children:[t.filter(y=>y.label.toLowerCase().includes(k.toLowerCase())).map(y=>{const ee=r.includes(y.value);return e.jsxs(E.Command.Item,{value:y.value,disabled:y.disabled,onSelect:()=>K(y.value),className:l("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground","data-[selected=true]:bg-background-muted","data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none"),children:[e.jsx("span",{"aria-hidden":!0,className:l("flex size-4 items-center justify-center rounded-sm border",ee?"border-accent bg-accent text-on-accent":"border-border"),children:ee&&e.jsx(d.Check,{className:"size-3","aria-hidden":!0})}),e.jsx("span",{className:"flex-1",children:y.label}),y.description&&e.jsx("span",{className:"text-xs text-foreground-subtle",children:y.description})]},y.value)}),e.jsx(E.Command.Empty,{className:"px-2 py-6 text-center text-sm text-foreground-subtle",children:x})]})})})})]}),c?e.jsx("p",{id:S,role:"alert",className:"text-xs text-danger-text",children:c}):o?e.jsx("p",{id:v,className:"text-xs text-foreground-subtle",children:o}):null]})});Dr.displayName="MultiSelect";const lt=B.Root,ja=B.Value,$e=i.forwardRef(function({className:t,placeholder:r,size:s="md",tone:n="default",...o},c){return e.jsxs(B.Trigger,{ref:c,className:l("inline-flex w-full items-center justify-between gap-2 rounded-md border bg-card text-sm text-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed","data-[placeholder]:text-foreground-subtle",s==="sm"&&"h-8 px-2.5",s==="md"&&"h-9 px-3",s==="lg"&&"h-10 px-3.5",n==="default"?"border-border focus-visible:border-accent focus-visible:ring-ring":"border-danger focus-visible:border-danger focus-visible:ring-danger",t),...o,children:[e.jsx(B.Value,{placeholder:r}),e.jsx(B.Icon,{asChild:!0,children:e.jsx(d.ChevronsUpDown,{className:"size-4 text-foreground-subtle shrink-0","aria-hidden":!0})})]})});$e.displayName="SelectTrigger";const Rr="flex h-6 cursor-default items-center justify-center text-foreground-subtle",dt=i.forwardRef(function({className:t,...r},s){return e.jsx(B.ScrollUpButton,{ref:s,className:l(Rr,t),...r,children:e.jsx(d.ChevronUp,{className:"size-4","aria-hidden":!0})})});dt.displayName="SelectScrollUpButton";const ct=i.forwardRef(function({className:t,...r},s){return e.jsx(B.ScrollDownButton,{ref:s,className:l(Rr,t),...r,children:e.jsx(d.ChevronDown,{className:"size-4","aria-hidden":!0})})});ct.displayName="SelectScrollDownButton";const Ue=i.forwardRef(function({className:t,children:r,position:s="popper",...n},o){return e.jsx(B.Portal,{children:e.jsxs(B.Content,{ref:o,position:s,className:l("z-[var(--z-popover)] min-w-[var(--radix-select-trigger-width)] max-h-96","overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground","shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",t),...n,children:[e.jsx(dt,{}),e.jsx(B.Viewport,{className:"p-1",children:r}),e.jsx(ct,{})]})})});Ue.displayName="SelectContent";const ut=i.forwardRef(function({className:t,...r},s){return e.jsx(B.Label,{ref:s,className:l("px-2 py-1.5 text-xs font-medium text-foreground-subtle",t),...r})});ut.displayName="SelectLabel";const He=i.forwardRef(function({className:t,children:r,leadingIcon:s,...n},o){return e.jsxs(B.Item,{ref:o,className:l("relative flex w-full cursor-default select-none items-center gap-2","rounded-sm px-2 py-1.5 pr-8 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[s&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:s}),e.jsx(B.ItemText,{children:r}),e.jsx("span",{className:"absolute right-2 flex items-center justify-center",children:e.jsx(B.ItemIndicator,{children:e.jsx(d.Check,{className:"size-4 text-accent","aria-hidden":!0})})})]})});He.displayName="SelectItem";const Mr=i.forwardRef(function({className:t,...r},s){return e.jsx(B.Separator,{ref:s,className:l("-mx-1 my-1 h-px bg-border",t),...r})});Mr.displayName="SelectSeparator";const zr=i.forwardRef(function({label:t,children:r,...s},n){return e.jsxs(B.Group,{ref:n,...s,children:[t&&e.jsx(ut,{children:t}),r]})});zr.displayName="SelectGroup";function Na(a,t,r=7){if(t<=r)return Array.from({length:t},(m,x)=>x+1);const s=1,n=[],o=Math.max(2,a-s),c=Math.min(t-1,a+s);n.push(1),o>2&&n.push("gap");for(let m=o;m<=c;m++)n.push(m);return c<t-1&&n.push("gap"),n.push(t),n}const mt=i.forwardRef(function({page:t,pageCount:r,onPageChange:s,totalItems:n,pageSize:o,pageSizeOptions:c,onPageSizeChange:m,showJump:x=!0,className:u,...g},p){const f=i.useMemo(()=>Na(t,r),[t,r]),h=o?(t-1)*o+1:void 0,b=o&&n?Math.min(t*o,n):void 0,j=v=>{v<1||v>r||v===t||s(v)};return e.jsxs("nav",{ref:p,"aria-label":"Pagination",className:l("flex flex-wrap items-center justify-between gap-3",u),...g,children:[e.jsxs("div",{className:"flex items-center gap-3 text-sm text-foreground-muted",children:[n!==void 0&&o!==void 0&&e.jsxs("span",{className:"tabular",children:["Showing ",h,"–",b," of ",n]}),c&&m&&o!==void 0&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"page-size",className:"sr-only",children:"Rows per page"}),e.jsxs(lt,{value:String(o),onValueChange:v=>m(Number(v)),children:[e.jsx($e,{size:"sm",className:"w-[7.5rem] whitespace-nowrap"}),e.jsx(Ue,{children:c.map(v=>e.jsxs(He,{value:String(v),children:[v," / page"]},v))})]})]})]}),e.jsxs("ul",{className:"flex items-center gap-1",children:[x&&e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Go to first page",disabled:t===1,onClick:()=>j(1),className:De,children:e.jsx(d.ChevronsLeft,{className:"size-4","aria-hidden":!0})})}),e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Previous page",disabled:t===1,onClick:()=>j(t-1),className:De,children:e.jsx(d.ChevronLeft,{className:"size-4","aria-hidden":!0})})}),f.map((v,S)=>v==="gap"?e.jsx("li",{className:"px-2 text-foreground-subtle",children:"…"},`gap-${S}`):e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":`Page ${v}`,"aria-current":v===t?"page":void 0,onClick:()=>j(v),className:l("inline-flex size-8 items-center justify-center rounded-md text-sm tabular outline-none","transition-colors duration-[var(--duration-fast)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",v===t?"bg-accent text-on-accent font-medium":"text-foreground-muted hover:bg-background-muted hover:text-foreground"),children:v})},v)),e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Next page",disabled:t===r,onClick:()=>j(t+1),className:De,children:e.jsx(d.ChevronRight,{className:"size-4","aria-hidden":!0})})}),x&&e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Go to last page",disabled:t===r,onClick:()=>j(r),className:De,children:e.jsx(d.ChevronsRight,{className:"size-4","aria-hidden":!0})})})]})]})});mt.displayName="Pagination";const De=l("inline-flex size-8 items-center justify-center rounded-md text-foreground-muted","transition-colors duration-[var(--duration-fast)]","hover:bg-background-muted hover:text-foreground","disabled:opacity-50 disabled:pointer-events-none","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),wa=I.Root,ya=I.Trigger,Ca=I.Anchor,ka=I.Close,Ir=i.forwardRef(function({className:t,align:r="center",sideOffset:s=4,...n},o){return e.jsx(I.Portal,{children:e.jsx(I.Content,{ref:o,align:r,sideOffset:s,className:l("z-[var(--z-popover)] w-72 rounded-lg border border-border bg-popover p-4 text-popover-foreground shadow-md","outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-1 data-[side=top]:slide-in-from-bottom-1","data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1",t),...n})})});Ir.displayName="PopoverContent";const Sa={sm:"h-1",md:"h-1.5",lg:"h-2"},Ta={accent:"bg-accent",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},Pr=i.forwardRef(function({className:t,value:r,size:s="md",tone:n="accent",...o},c){const m=r==null;return e.jsxs(kt.Root,{ref:c,value:m?void 0:r,className:l("relative w-full overflow-hidden rounded-full bg-background-muted",Sa[s],t),...o,children:[e.jsx(kt.Indicator,{className:l("h-full w-full flex-1 transition-transform",Ta[n],m&&"animate-[progressIndeterminate_1.4s_ease-in-out_infinite] origin-left"),style:m?void 0:{transform:`translateX(-${100-(r??0)}%)`}}),e.jsx("style",{children:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const fs=require("clsx"),gs=require("tailwind-merge"),i=require("react"),d=require("lucide-react"),e=require("react/jsx-runtime"),hs=require("@radix-ui/react-accordion"),X=require("class-variance-authority"),ps=require("@radix-ui/react-avatar"),Rt=require("@radix-ui/react-slot"),bs=require("@radix-ui/react-checkbox"),vs=require("@radix-ui/react-popover"),E=require("cmdk"),js=require("@radix-ui/react-dialog"),Ns=require("@radix-ui/react-context-menu"),ws=require("@radix-ui/react-dropdown-menu"),ys=require("react-day-picker"),Cs=require("@radix-ui/react-label"),Xe=require("react-hook-form"),ks=require("@radix-ui/react-select"),Ss=require("@radix-ui/react-progress"),Ts=require("@radix-ui/react-radio-group"),Ds=require("@radix-ui/react-scroll-area"),Rs=require("@radix-ui/react-separator"),Ms=require("@radix-ui/react-slider"),zs=require("@radix-ui/react-switch"),Is=require("@radix-ui/react-tabs"),Ps=require("@radix-ui/react-toast"),_s=require("@radix-ui/react-tooltip"),As=require("embla-carousel-react"),oe=require("vaul");function A(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const r in a)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(a,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>a[r]})}}return t.default=a,Object.freeze(t)}const ve=A(hs),Ve=A(ps),Ct=A(bs),I=A(vs),R=A(js),O=A(Ns),$=A(ws),Fs=A(Cs),B=A(ks),kt=A(Ss),We=A(Ts),he=A(Ds),Ls=A(Rs),Te=A(Ms),St=A(zs),ze=A(Is),de=A(Ps),je=A(_s);function l(...a){return gs.twMerge(fs.clsx(a))}let Tt=0;function Es(a="ds"){return Tt+=1,`${a}-${Tt}`}function Mt(a){const[t,r]=i.useState(()=>typeof window>"u"?!1:window.matchMedia(a).matches);return i.useEffect(()=>{if(typeof window>"u")return;const s=window.matchMedia(a),n=o=>r(o.matches);return r(s.matches),s.addEventListener("change",n),()=>s.removeEventListener("change",n)},[a]),t}function Bs(){return Mt("(prefers-reduced-motion: reduce)")}const ie={toasts:[],listeners:new Set,emit(){for(const a of this.listeners)a(this.toasts)},push(a){const t=a.id??`t_${Date.now()}_${Math.random().toString(36).slice(2,7)}`,r={open:!0,duration:5e3,variant:"default",...a,id:t};return this.toasts=[r,...this.toasts].slice(0,3),this.emit(),t},dismiss(a){this.toasts=this.toasts.map(t=>t.id===a?{...t,open:!1}:t),this.emit()},remove(a){this.toasts=this.toasts.filter(t=>t.id!==a),this.emit()}};function Os(){const[a,t]=i.useState(()=>[...ie.toasts]);i.useEffect(()=>{const o=c=>t([...c]);return ie.listeners.add(o),()=>{ie.listeners.delete(o)}},[]);const r=i.useCallback(o=>ie.push(o),[]),s=i.useCallback(o=>ie.dismiss(o),[]),n=i.useCallback(o=>ie.remove(o),[]);return{toasts:a,push:r,dismiss:s,remove:n}}const $s=a=>ie.push(a),Us=Object.freeze(Object.defineProperty({__proto__:null,AlertCircle:d.AlertCircle,AlertTriangle:d.AlertTriangle,ArrowDown:d.ArrowDown,ArrowLeft:d.ArrowLeft,ArrowRight:d.ArrowRight,ArrowUp:d.ArrowUp,ArrowUpDown:d.ArrowUpDown,AtSign:d.AtSign,BarChart3:d.BarChart3,Bell:d.Bell,Bookmark:d.Bookmark,Calendar:d.Calendar,Check:d.Check,CheckCircle2:d.CheckCircle2,ChevronDown:d.ChevronDown,ChevronLeft:d.ChevronLeft,ChevronRight:d.ChevronRight,ChevronUp:d.ChevronUp,ChevronsLeft:d.ChevronsLeft,ChevronsRight:d.ChevronsRight,ChevronsUpDown:d.ChevronsUpDown,Circle:d.Circle,Copy:d.Copy,CornerDownLeft:d.CornerDownLeft,CreditCard:d.CreditCard,Download:d.Download,Edit2:d.Edit2,Ellipsis:d.Ellipsis,ExternalLink:d.ExternalLink,Eye:d.Eye,EyeOff:d.EyeOff,Filter:d.Filter,Folder:d.Folder,GripVertical:d.GripVertical,HelpCircle:d.HelpCircle,Home:d.Home,Inbox:d.Inbox,Info:d.Info,LayoutGrid:d.LayoutGrid,Link2:d.Link2,Loader2:d.Loader2,Lock:d.Lock,LogOut:d.LogOut,Mail:d.Mail,Menu:d.Menu,Minus:d.Minus,Moon:d.Moon,MoreHorizontal:d.MoreHorizontal,Package:d.Package,Plug:d.Plug,Plus:d.Plus,Search:d.Search,Settings:d.Settings,Sparkles:d.Sparkles,Sun:d.Sun,Trash2:d.Trash2,Upload:d.Upload,User:d.User,Users:d.Users,X:d.X,XCircle:d.XCircle},Symbol.toStringTag,{value:"Module"}));function me({className:a,children:t,...r}){return e.jsx("svg",{viewBox:"0 0 120 120",role:"img",width:"120",height:"120",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:l("text-foreground-subtle",a),"aria-hidden":!0,...r,children:t})}function zt(a){return e.jsxs(me,{...a,children:[e.jsx("path",{d:"M22 56l10-28a6 6 0 0 1 6-4h44a6 6 0 0 1 6 4l10 28"}),e.jsx("path",{d:"M22 56v32a6 6 0 0 0 6 6h64a6 6 0 0 0 6-6V56"}),e.jsx("path",{d:"M22 56h22l4 10h24l4-10h22"}),e.jsx("circle",{cx:"60",cy:"36",r:"2",className:"text-accent",stroke:"currentColor"}),e.jsx("path",{d:"M52 28l8 8M68 28l-8 8",opacity:"0.4"})]})}function Hs(a){return e.jsxs(me,{...a,children:[e.jsx("circle",{cx:"52",cy:"52",r:"26"}),e.jsx("path",{d:"M72 72l20 20"}),e.jsx("path",{d:"M42 52h20",opacity:"0.5"}),e.jsx("circle",{cx:"98",cy:"22",r:"1.5",className:"text-accent",stroke:"currentColor"}),e.jsx("circle",{cx:"20",cy:"92",r:"1.5",className:"text-accent",stroke:"currentColor"})]})}function It(a){return e.jsxs(me,{...a,children:[e.jsx("path",{d:"M22 32h76v56a6 6 0 0 1-6 6H28a6 6 0 0 1-6-6V32z"}),e.jsx("path",{d:"M22 44h76"}),e.jsx("circle",{cx:"32",cy:"38",r:"1.5"}),e.jsx("circle",{cx:"40",cy:"38",r:"1.5"}),e.jsx("circle",{cx:"48",cy:"38",r:"1.5"}),e.jsx("path",{d:"M44 64l32 16M76 64l-32 16",className:"text-accent",stroke:"currentColor"}),e.jsx("text",{x:"60",y:"76",fontFamily:"ui-monospace,monospace",fontSize:"9",textAnchor:"middle",fill:"currentColor",stroke:"none",opacity:"0.6",children:"404"})]})}function Pt(a){return e.jsxs(me,{...a,children:[e.jsx("rect",{x:"22",y:"28",width:"76",height:"20",rx:"3"}),e.jsx("rect",{x:"22",y:"54",width:"76",height:"20",rx:"3"}),e.jsx("rect",{x:"22",y:"80",width:"76",height:"20",rx:"3"}),e.jsx("circle",{cx:"32",cy:"38",r:"2",className:"text-danger",stroke:"currentColor"}),e.jsx("circle",{cx:"32",cy:"64",r:"2",className:"text-danger",stroke:"currentColor"}),e.jsx("circle",{cx:"32",cy:"90",r:"2",className:"text-warning",stroke:"currentColor"}),e.jsx("path",{d:"M44 38h44M44 64h44M44 90h28",opacity:"0.4"}),e.jsx("path",{d:"M82 84l16 16M82 100l16-16",className:"text-danger",stroke:"currentColor"})]})}function Gs(a){return e.jsxs(me,{...a,children:[e.jsx("path",{d:"M22 86h76"}),e.jsx("path",{d:"M30 86V52l30-22 30 22v34"}),e.jsx("rect",{x:"40",y:"64",width:"14",height:"14",rx:"1"}),e.jsx("rect",{x:"66",y:"64",width:"14",height:"14",rx:"1"}),e.jsx("path",{d:"M30 52h60",opacity:"0.4"}),e.jsx("path",{d:"M40 40v6M50 36v10M70 36v10M80 40v6",className:"text-accent",stroke:"currentColor"})]})}function _t(a){return e.jsxs(me,{...a,children:[e.jsx("path",{d:"M22 60a40 40 0 0 1 76 0",opacity:"0.4"}),e.jsx("path",{d:"M34 70a28 28 0 0 1 52 0",opacity:"0.6"}),e.jsx("path",{d:"M46 80a16 16 0 0 1 28 0"}),e.jsx("circle",{cx:"60",cy:"92",r:"3"}),e.jsx("path",{d:"M20 20l80 80",className:"text-danger",stroke:"currentColor"})]})}const Vs=Object.freeze(Object.defineProperty({__proto__:null,ConnectionLost:_t,Construction:Gs,InboxEmpty:zt,NoSearchResults:Hs,NotFound:It,ServerError:Pt},Symbol.toStringTag,{value:"Module"})),qs=ve.Root,At=i.forwardRef(function({className:t,...r},s){return e.jsx(ve.Item,{ref:s,className:l("border-b border-border",t),...r})});At.displayName="AccordionItem";const Ft=i.forwardRef(function({className:t,children:r,...s},n){return e.jsx(ve.Header,{className:"flex",children:e.jsxs(ve.Trigger,{ref:n,className:l("flex flex-1 items-center justify-between gap-2 py-4 text-left text-sm font-medium text-foreground","outline-none transition-colors duration-[var(--duration-fast)]","hover:text-accent","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","[&[data-state=open]>svg]:rotate-180",t),...s,children:[r,e.jsx(d.ChevronDown,{className:"size-4 shrink-0 text-foreground-subtle transition-transform duration-[var(--duration-base)]","aria-hidden":!0})]})})});Ft.displayName="AccordionTrigger";const Lt=i.forwardRef(function({className:t,children:r,...s},n){return e.jsx(ve.Content,{ref:n,className:l("overflow-hidden text-sm text-foreground-muted","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"),...s,children:e.jsx("div",{className:l("pb-4 pt-0",t),children:r})})});Lt.displayName="AccordionContent";const Ws=X.cva(["relative flex w-full gap-3 rounded-lg border p-4","text-sm"],{variants:{variant:{default:"border-border bg-background-subtle text-foreground",info:"border-info-border-soft bg-info-soft text-info-text",success:"border-success-border-soft bg-success-soft text-success-text",warning:"border-warning-border-soft bg-warning-soft text-warning-text",danger:"border-danger-border-soft bg-danger-soft text-danger-text"}},defaultVariants:{variant:"default"}}),Xs={default:null,info:e.jsx(d.Info,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),success:e.jsx(d.CheckCircle2,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),warning:e.jsx(d.AlertTriangle,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),danger:e.jsx(d.XCircle,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0})},we=i.forwardRef(function({className:t,variant:r="default",title:s,dismissible:n,onDismiss:o,icon:c,children:m,...x},u){const[g,p]=i.useState(!0);if(!g)return null;const f=()=>{p(!1),o==null||o()},h=c===!1?null:c??Xs[r??"default"];return e.jsxs("div",{ref:u,role:"alert",className:l(Ws({variant:r}),t),...x,children:[h,e.jsxs("div",{className:"flex-1 min-w-0",children:[s&&e.jsx("h5",{className:"font-medium leading-tight mb-1",children:s}),e.jsx("div",{className:"text-sm leading-relaxed [&_p]:leading-relaxed",children:m})]}),n&&e.jsx("button",{type:"button","aria-label":"Dismiss",onClick:f,className:l("inline-flex size-6 shrink-0 items-center justify-center rounded-md","hover:bg-current/10 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:e.jsx(d.X,{className:"size-3.5","aria-hidden":!0})})]})});we.displayName="Alert";const Et={xs:"size-5 text-[10px]",sm:"size-6 text-xs",md:"size-8 text-xs",lg:"size-10 text-sm",xl:"size-12 text-base"},Ks=X.cva("relative inline-flex shrink-0",{variants:{size:Et},defaultVariants:{size:"md"}}),Qs={online:"bg-success",busy:"bg-danger",away:"bg-warning",offline:"bg-foreground-subtle"},Y=i.forwardRef(function({className:t,size:r,src:s,alt:n,fallback:o,status:c,...m},x){return e.jsxs("span",{className:Ks({size:r}),children:[e.jsxs(Ve.Root,{ref:x,className:l("block size-full overflow-hidden rounded-full bg-background-muted text-foreground-muted",t),...m,children:[s&&e.jsx(Ve.Image,{src:s,alt:n??"",className:"aspect-square size-full object-cover"}),e.jsx(Ve.Fallback,{delayMs:s?200:0,className:"flex size-full items-center justify-center bg-background-muted font-medium uppercase",children:o??"?"})]}),c&&e.jsx("span",{"aria-label":`Status: ${c}`,className:l("absolute bottom-0 right-0 block size-[28%] rounded-full ring-2 ring-background",Qs[c])})]})});Y.displayName="Avatar";const Bt=i.forwardRef(function({max:t=4,size:r="md",className:s,children:n,...o},c){const m=Array.isArray(n)?n:[n],x=m.slice(0,t),u=m.length-x.length;return e.jsxs("div",{ref:c,className:l("flex items-center -space-x-2",s),...o,children:[x.map((g,p)=>e.jsx("div",{className:"ring-2 ring-background rounded-full",children:g},p)),u>0&&e.jsxs("div",{className:l("inline-flex items-center justify-center rounded-full bg-background-muted text-foreground-muted ring-2 ring-background",Et[r],"font-medium"),"aria-label":`${u} more`,children:["+",u]})]})});Bt.displayName="AvatarGroup";const Ys=X.cva(["inline-flex items-center gap-1 rounded-full px-2 py-0.5","text-xs font-medium whitespace-nowrap"],{variants:{variant:{subtle:"",outline:"border bg-transparent"},tone:{neutral:"",accent:"",success:"",warning:"",danger:"",info:""}},compoundVariants:[{variant:"subtle",tone:"neutral",class:"bg-background-muted text-foreground-muted"},{variant:"subtle",tone:"accent",class:"bg-accent-soft text-on-accent-soft"},{variant:"subtle",tone:"success",class:"bg-success-soft text-success-text"},{variant:"subtle",tone:"warning",class:"bg-warning-soft text-warning-text"},{variant:"subtle",tone:"danger",class:"bg-danger-soft text-danger-text"},{variant:"subtle",tone:"info",class:"bg-info-soft text-info-text"},{variant:"outline",tone:"neutral",class:"border-border text-foreground-muted"},{variant:"outline",tone:"accent",class:"border-accent text-accent"},{variant:"outline",tone:"success",class:"border-success-border-soft text-success-text"},{variant:"outline",tone:"warning",class:"border-warning-border-soft text-warning-text"},{variant:"outline",tone:"danger",class:"border-danger-border-soft text-danger-text"},{variant:"outline",tone:"info",class:"border-info-border-soft text-info-text"}],defaultVariants:{variant:"subtle",tone:"neutral"}}),Js={neutral:"bg-foreground-subtle",accent:"bg-accent",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"},V=i.forwardRef(function({className:t,variant:r,tone:s="neutral",dot:n,children:o,...c},m){return e.jsxs("span",{ref:m,className:l(Ys({variant:r,tone:s}),t),...c,children:[n&&e.jsx("span",{"aria-hidden":!0,className:l("inline-block size-1.5 rounded-full",Js[s??"neutral"])}),o]})});V.displayName="Badge";const Ke=i.forwardRef(function({items:t,maxItems:r=4,renderLink:s,className:n,...o},c){const x=t.length>r?[t[0],{collapsed:!0},...t.slice(-2)]:t;return e.jsx("nav",{ref:c,"aria-label":"Breadcrumb",className:l("text-sm",n),...o,children:e.jsx("ol",{className:"flex flex-wrap items-center gap-1.5 text-foreground-subtle",children:x.map((u,g)=>{const p=g===x.length-1;if("collapsed"in u)return e.jsxs("li",{className:"flex items-center gap-1.5",children:[e.jsx(d.MoreHorizontal,{className:"size-4","aria-hidden":!0}),e.jsx(d.ChevronRight,{className:"size-3.5","aria-hidden":!0})]},`ellipsis-${g}`);const f=u,h=p?e.jsx("span",{"aria-current":"page",className:"font-medium text-foreground",children:f.label}):f.href?s?s(f.href,f.label):e.jsx("a",{href:f.href,className:"hover:text-foreground transition-colors duration-[var(--duration-fast)] outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",children:f.label}):e.jsx("span",{children:f.label});return e.jsxs("li",{className:"flex items-center gap-1.5",children:[h,!p&&e.jsx(d.ChevronRight,{className:"size-3.5","aria-hidden":!0})]},g)})})})});Ke.displayName="Breadcrumbs";const Zs=X.cva(["inline-flex items-center justify-center gap-2 whitespace-nowrap","rounded-md text-sm font-medium","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0"],{variants:{variant:{primary:["bg-accent text-on-accent","hover:bg-accent-700","active:bg-accent-800"],secondary:["bg-background-muted text-foreground border border-border","hover:bg-neutral-200 dark:hover:bg-neutral-800","active:bg-neutral-300 dark:active:bg-neutral-700"],outline:["border border-border bg-transparent text-foreground","hover:bg-background-muted","active:bg-background-subtle"],ghost:["bg-transparent text-foreground","hover:bg-background-muted","active:bg-background-subtle"],destructive:["bg-danger text-on-danger","hover:bg-danger-700","active:bg-danger-800"],link:["bg-transparent text-accent underline-offset-4 px-0","hover:underline","active:text-accent-700"]},size:{sm:"h-8 px-3 text-xs [&_svg]:size-4",md:"h-9 px-3.5 text-sm [&_svg]:size-4",lg:"h-10 px-4 text-sm [&_svg]:size-5",icon:"h-9 w-9 [&_svg]:size-4"}},compoundVariants:[{variant:"link",size:"sm",class:"h-auto px-0"},{variant:"link",size:"md",class:"h-auto px-0"},{variant:"link",size:"lg",class:"h-auto px-0"}],defaultVariants:{variant:"primary",size:"md"}}),T=i.forwardRef(function({className:t,variant:r,size:s,asChild:n=!1,loading:o=!1,leadingIcon:c,trailingIcon:m,disabled:x,children:u,type:g="button",...p},f){const h=x||o,b=l(Zs({variant:r,size:s}),t);return n?e.jsx(Rt.Slot,{ref:f,"aria-busy":o||void 0,"data-loading":o||void 0,className:b,...p,children:u}):e.jsxs("button",{ref:f,type:g,"aria-busy":o||void 0,disabled:h,"data-loading":o||void 0,className:b,...p,children:[o?e.jsx(d.Loader2,{className:"animate-spin","aria-hidden":"true"}):c,u,!o&&m]})});T.displayName="Button";const ea=X.cva(["rounded-lg border bg-card text-card-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]"],{variants:{variant:{default:"border-border",interactive:"border-border hover:border-border-strong hover:bg-background-subtle cursor-pointer"},padding:{none:"",sm:"p-4",md:"p-5",lg:"p-6"}},defaultVariants:{variant:"default",padding:"md"}}),U=i.forwardRef(function({className:t,variant:r,padding:s,...n},o){return e.jsx("div",{ref:o,className:l(ea({variant:r,padding:s}),t),...n})});U.displayName="Card";const H=i.forwardRef(function({className:t,...r},s){return e.jsx("div",{ref:s,className:l("flex flex-col gap-1 pb-4",t),...r})});H.displayName="CardHeader";const W=i.forwardRef(function({className:t,...r},s){return e.jsx("h3",{ref:s,className:l("text-base font-semibold text-foreground leading-tight",t),...r})});W.displayName="CardTitle";const te=i.forwardRef(function({className:t,...r},s){return e.jsx("p",{ref:s,className:l("text-sm text-foreground-muted",t),...r})});te.displayName="CardDescription";const G=i.forwardRef(function({className:t,...r},s){return e.jsx("div",{ref:s,className:l("text-sm text-foreground",t),...r})});G.displayName="CardContent";const Ot=i.forwardRef(function({className:t,...r},s){return e.jsx("div",{ref:s,className:l("flex items-center gap-2 pt-4",t),...r})});Ot.displayName="CardFooter";const pe=i.forwardRef(function({className:t,label:r,description:s,error:n,hideLabel:o,id:c,disabled:m,...x},u){const g=i.useId(),p=c??g,f=s?`${p}-desc`:void 0,h=n?`${p}-error`:void 0;return e.jsxs("div",{className:l("flex flex-col gap-1",t),children:[e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx(Ct.Root,{ref:u,id:p,disabled:m,"aria-describedby":h??f,"aria-invalid":!!n||void 0,className:l("peer mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-sm border","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","data-[state=checked]:bg-accent data-[state=checked]:border-accent data-[state=checked]:text-on-accent","data-[state=indeterminate]:bg-accent data-[state=indeterminate]:border-accent data-[state=indeterminate]:text-on-accent","disabled:cursor-not-allowed disabled:opacity-50",n?"border-danger":"border-border-strong"),...x,children:e.jsx(Ct.Indicator,{className:"flex items-center justify-center",children:x.checked==="indeterminate"?e.jsx(d.Minus,{className:"size-3","aria-hidden":!0,strokeWidth:3}):e.jsx(d.Check,{className:"size-3","aria-hidden":!0,strokeWidth:3})})}),r&&e.jsxs("div",{className:l("flex flex-col gap-0.5",o&&"sr-only"),children:[e.jsx("label",{htmlFor:p,className:l("text-sm text-foreground select-none",m&&"opacity-50 cursor-not-allowed"),children:r}),s&&e.jsx("p",{id:f,className:"text-xs text-foreground-subtle",children:s})]})]}),n&&e.jsx("p",{id:h,role:"alert",className:"text-xs text-danger-text",children:n})]})});pe.displayName="Checkbox";const $t=i.forwardRef(function({value:t,onChange:r,options:s,loadOptions:n,label:o,helperText:c,error:m,placeholder:x="Select…",searchPlaceholder:u="Search…",emptyText:g="No results.",clearable:p=!0,disabled:f,size:h="md",className:b},j){const v=i.useId(),S=`${v}-helper`,_=`${v}-error`,[D,k]=i.useState(!1),[N,w]=i.useState(""),[F,K]=i.useState([]),[Q,se]=i.useState(!1),z=n?F:s??[];i.useEffect(()=>{if(!n||!D)return;let L=!1;return se(!0),n(N).then(C=>{L||K(C)}).finally(()=>{L||se(!1)}),()=>{L=!0}},[N,D,n]);const q=i.useMemo(()=>z.find(L=>L.value===t)??null,[z,t]),Z=h==="sm"?"h-8":h==="lg"?"h-10":"h-9",y=h==="sm"?"px-2.5":h==="lg"?"px-3.5":"px-3",ee=i.useCallback(L=>{L.stopPropagation(),r(null)},[r]),fe=!!m;return e.jsxs("div",{ref:j,className:l("flex flex-col gap-1.5",b),children:[o&&e.jsx("label",{htmlFor:v,className:"text-sm font-medium text-foreground",children:o}),e.jsxs(I.Root,{open:D,onOpenChange:k,children:[e.jsx(I.Trigger,{asChild:!0,children:e.jsxs("button",{id:v,type:"button",role:"combobox","aria-expanded":D,"aria-invalid":fe||void 0,"aria-describedby":fe?_:c?S:void 0,disabled:f,className:l("inline-flex w-full items-center justify-between gap-2 rounded-md border bg-card text-sm text-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",Z,y,fe?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring"),children:[e.jsx("span",{className:l("truncate",!q&&"text-foreground-subtle"),children:q?q.label:x}),e.jsxs("span",{className:"ml-2 flex items-center gap-1 shrink-0",children:[p&&q&&!f&&e.jsx("span",{role:"button",tabIndex:-1,onClick:ee,"aria-label":"Clear selection",className:"text-foreground-subtle hover:text-foreground",children:e.jsx(d.X,{className:"size-4","aria-hidden":!0})}),e.jsx(d.ChevronsUpDown,{className:"size-4 text-foreground-subtle","aria-hidden":!0})]})]})}),e.jsx(I.Portal,{children:e.jsx(I.Content,{align:"start",sideOffset:4,className:l("z-[var(--z-popover)] w-[var(--radix-popover-trigger-width)] overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"),children:e.jsxs(E.Command,{shouldFilter:!n,className:"flex h-full w-full flex-col",children:[e.jsxs("div",{className:"flex items-center border-b border-border px-3",children:[e.jsx(E.Command.Input,{value:N,onValueChange:w,placeholder:u,className:"flex h-9 w-full bg-transparent py-2 text-sm outline-none placeholder:text-foreground-subtle"}),Q&&e.jsx(d.Loader2,{className:"size-4 animate-spin text-foreground-subtle","aria-hidden":!0})]}),e.jsxs(E.Command.List,{className:"max-h-64 overflow-y-auto p-1",children:[z.map(L=>{const C=L.value===t;return e.jsxs(E.Command.Item,{value:L.value,disabled:L.disabled,onSelect:M=>{r(M),k(!1)},className:l("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground","data-[selected=true]:bg-background-muted","data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none"),children:[e.jsx("span",{className:"flex-1",children:L.label}),L.description&&e.jsx("span",{className:"text-xs text-foreground-subtle",children:L.description}),C&&e.jsx(d.Check,{className:"size-4 text-accent","aria-hidden":!0})]},L.value)}),!Q&&z.length===0&&e.jsx(E.Command.Empty,{className:"px-2 py-6 text-center text-sm text-foreground-subtle",children:g})]})]})})})]}),m?e.jsx("p",{id:_,role:"alert",className:"text-xs text-danger-text",children:m}):c?e.jsx("p",{id:S,className:"text-xs text-foreground-subtle",children:c}):null]})});$t.displayName="Combobox";const Ut=i.forwardRef(function({className:t,...r},s){return e.jsx(E.Command,{ref:s,className:l("flex h-full w-full flex-col overflow-hidden rounded-lg bg-popover text-popover-foreground",t),...r})});Ut.displayName="Command";const Ht=i.forwardRef(function({className:t,...r},s){return e.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3","cmdk-input-wrapper":"",children:[e.jsx(d.Search,{className:"size-4 shrink-0 text-foreground-subtle","aria-hidden":!0}),e.jsx(E.Command.Input,{ref:s,className:l("flex h-11 w-full bg-transparent py-3 text-sm outline-none","placeholder:text-foreground-subtle disabled:cursor-not-allowed disabled:opacity-50",t),...r})]})});Ht.displayName="CommandInput";const Gt=i.forwardRef(function({className:t,...r},s){return e.jsx(E.Command.List,{ref:s,className:l("max-h-[320px] overflow-y-auto p-1",t),...r})});Gt.displayName="CommandList";const Vt=i.forwardRef(function(t,r){return e.jsx(E.Command.Empty,{ref:r,className:"py-8 text-center text-sm text-foreground-subtle",...t})});Vt.displayName="CommandEmpty";const qt=i.forwardRef(function({className:t,...r},s){return e.jsx(E.Command.Group,{ref:s,className:l("overflow-hidden text-foreground p-1","[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5","[&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium","[&_[cmdk-group-heading]]:text-foreground-subtle",t),...r})});qt.displayName="CommandGroup";const Wt=i.forwardRef(function({className:t,...r},s){return e.jsx(E.Command.Separator,{ref:s,className:l("-mx-1 my-1 h-px bg-border",t),...r})});Wt.displayName="CommandSeparator";const Xt=i.forwardRef(function({className:t,...r},s){return e.jsx(E.Command.Item,{ref:s,className:l("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[selected=true]:bg-background-muted data-[selected=true]:text-foreground","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","[&_svg]:size-4 [&_svg]:text-foreground-subtle",t),...r})});Xt.displayName="CommandItem";function ta({children:a,className:t}){return e.jsx("span",{className:l("ml-auto inline-flex items-center gap-0.5 text-xs tracking-widest text-foreground-subtle font-mono",t),children:a})}function ra({open:a,onOpenChange:t,children:r,title:s="Command palette"}){return e.jsx(R.Root,{open:a,onOpenChange:t,children:e.jsxs(R.Portal,{children:[e.jsx(R.Overlay,{className:l("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0")}),e.jsxs(R.Content,{className:l("fixed left-1/2 top-[20%] z-[var(--z-modal)] -translate-x-1/2","w-[calc(100%-2rem)] max-w-[640px] overflow-hidden","rounded-lg border border-border bg-popover text-popover-foreground shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0","data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95"),children:[e.jsx(R.Title,{className:"sr-only",children:s}),r]})]})})}function sa(a){const[t,r]=i.useState(0);i.useEffect(()=>{const s=n=>{n.key==="k"&&(n.metaKey||n.ctrlKey)&&(n.preventDefault(),a(!0),r(o=>o+1))};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[a])}const aa=O.Root,na=O.Trigger,oa=O.Group,Kt=O.Portal,ia=O.Sub,la=O.RadioGroup,Ie=l("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50"),Qt=i.forwardRef(function({className:t,children:r,...s},n){return e.jsxs(O.SubTrigger,{ref:n,className:l(Ie,"data-[state=open]:bg-background-muted",t),...s,children:[r,e.jsx(d.ChevronRight,{className:"ml-auto size-4 text-foreground-subtle","aria-hidden":!0})]})});Qt.displayName="ContextMenuSubTrigger";const Yt=i.forwardRef(function({className:t,...r},s){return e.jsx(O.SubContent,{ref:s,className:l("z-[var(--z-popover)] min-w-[8rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md",t),...r})});Yt.displayName="ContextMenuSubContent";const Jt=i.forwardRef(function({className:t,...r},s){return e.jsx(Kt,{children:e.jsx(O.Content,{ref:s,className:l("z-[var(--z-popover)] min-w-[12rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r})})});Jt.displayName="ContextMenuContent";const Zt=i.forwardRef(function({className:t,destructive:r,...s},n){return e.jsx(O.Item,{ref:n,className:l(Ie,r&&"text-danger-text data-[highlighted]:bg-danger-soft data-[highlighted]:text-danger-text",t),...s})});Zt.displayName="ContextMenuItem";const er=i.forwardRef(function({className:t,children:r,...s},n){return e.jsxs(O.CheckboxItem,{ref:n,className:l(Ie,"pl-8",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(O.ItemIndicator,{children:e.jsx(d.Check,{className:"size-4 text-accent","aria-hidden":!0})})}),r]})});er.displayName="ContextMenuCheckboxItem";const tr=i.forwardRef(function({className:t,children:r,...s},n){return e.jsxs(O.RadioItem,{ref:n,className:l(Ie,"pl-8",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(O.ItemIndicator,{children:e.jsx(d.Circle,{className:"size-2 fill-accent text-accent","aria-hidden":!0})})}),r]})});tr.displayName="ContextMenuRadioItem";const rr=i.forwardRef(function({className:t,...r},s){return e.jsx(O.Label,{ref:s,className:l("px-2 py-1.5 text-xs font-medium text-foreground-subtle",t),...r})});rr.displayName="ContextMenuLabel";const sr=i.forwardRef(function({className:t,...r},s){return e.jsx(O.Separator,{ref:s,className:l("-mx-1 my-1 h-px bg-border",t),...r})});sr.displayName="ContextMenuSeparator";function ar({className:a,...t}){return e.jsx("span",{className:l("ml-auto text-xs tracking-widest text-foreground-subtle font-mono",a),...t})}ar.displayName="ContextMenuShortcut";const Pe=$.Root,_e=$.Trigger,da=$.Group,nr=$.Portal,ca=$.Sub,ua=$.RadioGroup,Ae=l("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","transition-colors duration-[var(--duration-fast)]"),or=i.forwardRef(function({className:t,inset:r,children:s,...n},o){return e.jsxs($.SubTrigger,{ref:o,className:l(Ae,"data-[state=open]:bg-background-muted",r&&"pl-8",t),...n,children:[s,e.jsx(d.ChevronRight,{className:"ml-auto size-4 text-foreground-subtle","aria-hidden":!0})]})});or.displayName="DropdownMenuSubTrigger";const ir=i.forwardRef(function({className:t,...r},s){return e.jsx($.SubContent,{ref:s,className:l("z-[var(--z-popover)] min-w-[8rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",t),...r})});ir.displayName="DropdownMenuSubContent";const ye=i.forwardRef(function({className:t,sideOffset:r=4,align:s="end",...n},o){return e.jsx(nr,{children:e.jsx($.Content,{ref:o,sideOffset:r,align:s,className:l("z-[var(--z-popover)] min-w-[12rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-1 data-[side=top]:slide-in-from-bottom-1",t),...n})})});ye.displayName="DropdownMenuContent";const Qe=i.forwardRef(function({className:t,inset:r,destructive:s,...n},o){return e.jsx($.Item,{ref:o,className:l(Ae,r&&"pl-8",s&&"text-danger-text data-[highlighted]:bg-danger-soft data-[highlighted]:text-danger-text",t),...n})});Qe.displayName="DropdownMenuItem";const Ye=i.forwardRef(function({className:t,children:r,checked:s,...n},o){return e.jsxs($.CheckboxItem,{ref:o,checked:s,className:l(Ae,"pl-8",t),...n,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx($.ItemIndicator,{children:e.jsx(d.Check,{className:"size-4 text-accent","aria-hidden":!0})})}),r]})});Ye.displayName="DropdownMenuCheckboxItem";const lr=i.forwardRef(function({className:t,children:r,...s},n){return e.jsxs($.RadioItem,{ref:n,className:l(Ae,"pl-8",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx($.ItemIndicator,{children:e.jsx(d.Circle,{className:"size-2 fill-accent text-accent","aria-hidden":!0})})}),r]})});lr.displayName="DropdownMenuRadioItem";const Fe=i.forwardRef(function({className:t,inset:r,...s},n){return e.jsx($.Label,{ref:n,className:l("px-2 py-1.5 text-xs font-medium text-foreground-subtle",r&&"pl-8",t),...s})});Fe.displayName="DropdownMenuLabel";const Ne=i.forwardRef(function({className:t,...r},s){return e.jsx($.Separator,{ref:s,className:l("-mx-1 my-1 h-px bg-border",t),...r})});Ne.displayName="DropdownMenuSeparator";function dr({className:a,...t}){return e.jsx("span",{className:l("ml-auto text-xs tracking-widest text-foreground-subtle font-mono",a),...t})}dr.displayName="DropdownMenuShortcut";const ma=X.cva(["inline-flex items-center justify-center shrink-0","rounded-md","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none"],{variants:{variant:{primary:"bg-accent text-on-accent hover:bg-accent-700 active:bg-accent-800",secondary:"bg-background-muted text-foreground border border-border hover:bg-neutral-200 dark:hover:bg-neutral-800",outline:"border border-border bg-transparent text-foreground hover:bg-background-muted",ghost:"bg-transparent text-foreground-muted hover:bg-background-muted hover:text-foreground",destructive:"bg-danger text-on-danger hover:bg-danger-700 active:bg-danger-800"},size:{sm:"h-7 w-7 [&_svg]:size-3.5",md:"h-8 w-8 [&_svg]:size-4",lg:"h-10 w-10 [&_svg]:size-5"}},defaultVariants:{variant:"ghost",size:"md"}}),xe=i.forwardRef(function({className:t,variant:r,size:s,icon:n,loading:o,disabled:c,type:m="button",...x},u){const g=c||o;return e.jsx("button",{ref:u,type:m,"aria-busy":o||void 0,disabled:g,className:l(ma({variant:r,size:s}),t),...x,children:o?e.jsx(d.Loader2,{className:"animate-spin","aria-hidden":"true"}):n})});xe.displayName="IconButton";const xa=X.cva(["group inline-flex items-center w-full","rounded-md border bg-card text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","has-disabled:opacity-50 has-disabled:pointer-events-none","focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-offset-background"],{variants:{size:{sm:"h-8 px-2.5 gap-1.5",md:"h-9 px-3 gap-2",lg:"h-10 px-3.5 gap-2"},tone:{default:"border-border focus-within:border-accent focus-within:ring-ring",error:"border-danger focus-within:border-danger focus-within:ring-danger"}},defaultVariants:{size:"md",tone:"default"}}),fa=X.cva(["flex-1 min-w-0 bg-transparent outline-none","placeholder:text-foreground-subtle","text-foreground","disabled:cursor-not-allowed"]),P=i.forwardRef(function({className:t,type:r="text",size:s,tone:n,label:o,helperText:c,error:m,prefix:x,suffix:u,clearable:g,onClear:p,hideLabel:f,id:h,disabled:b,value:j,...v},S){const _=i.useId(),D=h??_,k=`${D}-helper`,N=`${D}-error`,[w,F]=i.useState(!1),K=r==="password"?w?"text":"password":r,Q=!!m,se=Q?"error":n,z=x??(r==="search"?e.jsx(d.Search,{className:"size-4 text-foreground-subtle","aria-hidden":!0}):null),q=j!==void 0&&j!==""&&j!==null;return e.jsxs("div",{className:l("flex flex-col gap-1.5",t),children:[o&&e.jsx("label",{htmlFor:D,className:l("text-sm font-medium text-foreground",f&&"sr-only"),children:o}),e.jsxs("div",{className:l(xa({size:s,tone:se})),children:[z&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:z}),e.jsx("input",{ref:S,id:D,type:K,disabled:b,value:j,"aria-invalid":Q||void 0,"aria-describedby":m?N:c?k:void 0,className:l(fa()),...v}),g&&q&&e.jsx("button",{type:"button",onClick:p,tabIndex:-1,"aria-label":"Clear input",className:"flex items-center text-foreground-subtle hover:text-foreground",children:e.jsx(d.X,{className:"size-4","aria-hidden":!0})}),r==="password"&&e.jsx("button",{type:"button",onClick:()=>F(Z=>!Z),tabIndex:-1,"aria-label":w?"Hide password":"Show password","aria-pressed":w,className:"flex items-center text-foreground-subtle hover:text-foreground",children:w?e.jsx(d.EyeOff,{className:"size-4","aria-hidden":!0}):e.jsx(d.Eye,{className:"size-4","aria-hidden":!0})}),u&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:u})]}),m?e.jsx("p",{id:N,role:"alert",className:"text-xs text-danger-text",children:m}):c?e.jsx("p",{id:k,className:"text-xs text-foreground-subtle",children:c}):null]})});P.displayName="Input";const Le=i.forwardRef(function({className:t,...r},s){return e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:s,className:l("w-full caption-bottom text-sm border-collapse",t),...r})})});Le.displayName="Table";const Ee=i.forwardRef(function({className:t,...r},s){return e.jsx("thead",{ref:s,className:l("sticky top-0 z-10 bg-background-subtle text-foreground-muted","[&_tr]:border-b [&_tr]:border-border",t),...r})});Ee.displayName="TableHeader";const Be=i.forwardRef(function({className:t,...r},s){return e.jsx("tbody",{ref:s,className:l("[&_tr:last-child]:border-0",t),...r})});Be.displayName="TableBody";const cr=i.forwardRef(function({className:t,...r},s){return e.jsx("tfoot",{ref:s,className:l("border-t border-border bg-background-subtle font-medium",t),...r})});cr.displayName="TableFooter";const ae=i.forwardRef(function({className:t,selected:r,...s},n){return e.jsx("tr",{ref:n,"data-selected":r||void 0,className:l("border-b border-border transition-colors duration-[var(--duration-fast)]","hover:bg-background-subtle","data-[selected]:bg-accent-soft data-[selected]:hover:bg-accent-soft",t),...s})});ae.displayName="TableRow";const ne=i.forwardRef(function({className:t,...r},s){return e.jsx("th",{ref:s,className:l("h-10 px-3 text-left align-middle text-xs font-medium uppercase tracking-wide text-foreground-subtle","[&:has([role=checkbox])]:w-10 [&:has([role=checkbox])]:pr-0",t),...r})});ne.displayName="TableHead";const re=i.forwardRef(function({className:t,...r},s){return e.jsx("td",{ref:s,className:l("px-3 py-3 align-middle text-foreground",t),...r})});re.displayName="TableCell";const ur=i.forwardRef(function({className:t,...r},s){return e.jsx("caption",{ref:s,className:l("mt-4 text-sm text-foreground-subtle",t),...r})});ur.displayName="TableCaption";const Je=i.forwardRef(function({sortKey:t,currentSort:r,onSortChange:s,children:n,className:o,...c},m){const x=(r==null?void 0:r.key)===t,u=x?r==null?void 0:r.direction:void 0,g=()=>{s(t,x&&u==="asc"?"desc":"asc")};return e.jsx(ne,{ref:m,className:l("p-0",o),"aria-sort":x?u==="asc"?"ascending":"descending":"none",...c,children:e.jsxs("button",{type:"button",onClick:g,className:l("inline-flex h-10 w-full items-center gap-1.5 px-3 outline-none","transition-colors duration-[var(--duration-fast)]","hover:text-foreground focus-visible:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background rounded-sm",x&&"text-foreground"),children:[n,u==="asc"?e.jsx(d.ArrowUp,{className:"size-3.5","aria-hidden":!0}):u==="desc"?e.jsx(d.ArrowDown,{className:"size-3.5","aria-hidden":!0}):e.jsx(d.ArrowUpDown,{className:"size-3.5 opacity-40","aria-hidden":!0})]})})});Je.displayName="TableSortHeader";const Ze=i.forwardRef(function({className:t,variant:r,...s},n){return e.jsx("div",{ref:n,"aria-hidden":!0,className:l("animate-pulse bg-background-muted",r==="text"&&"h-3 rounded-sm",r==="circle"&&"rounded-full aspect-square",r==="avatar"&&"size-8 rounded-full",r==="card"&&"rounded-lg",!r&&"rounded-md",t),...s})});Ze.displayName="Skeleton";function mr({columns:a,rows:t,loading:r,sort:s,onSortChange:n,filter:o,emptyState:c,className:m}){const[x,u]=i.useState({}),g=i.useMemo(()=>a.filter(f=>!x[f.key]),[a,x]),p=()=>r?Array.from({length:5}).map((f,h)=>e.jsx(ae,{children:g.map(b=>e.jsx(re,{children:e.jsx(Ze,{variant:"text",className:"w-3/4"})},b.key))},`skel-${h}`)):t.length===0?e.jsx(ae,{children:e.jsx(re,{colSpan:g.length,className:"h-32 text-center",children:c??e.jsx("span",{className:"text-foreground-subtle",children:"No results."})})}):t.map(f=>e.jsx(ae,{children:g.map(h=>e.jsx(re,{className:l(h.align==="right"&&"text-right tabular"),children:h.cell?h.cell(f):f[h.key]},h.key))},f.id));return e.jsxs("div",{className:l("flex flex-col gap-3",m),children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o?e.jsx(P,{type:"search",placeholder:o.placeholder??"Filter…",value:o.value,onChange:f=>o.onChange(f.target.value),clearable:!0,onClear:()=>o.onChange(""),className:"max-w-sm w-full",hideLabel:!0,label:"Filter rows"}):e.jsx("div",{}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(Pe,{children:[e.jsx(_e,{asChild:!0,children:e.jsx(xe,{"aria-label":"Column visibility",icon:e.jsx(d.Settings,{}),variant:"outline"})}),e.jsxs(ye,{children:[e.jsx(Fe,{children:"Columns"}),e.jsx(Ne,{}),a.map(f=>e.jsx(Ye,{checked:!x[f.key],onCheckedChange:h=>u(b=>({...b,[f.key]:!h})),children:f.header},f.key))]})]})})]}),e.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:e.jsxs(Le,{children:[e.jsx("colgroup",{children:g.map(f=>e.jsx("col",{style:f.width?{width:f.width}:void 0},f.key))}),e.jsx(Ee,{children:e.jsx(ae,{children:g.map(f=>f.sortable&&n?e.jsx(Je,{sortKey:f.key,currentSort:s??null,onSortChange:(h,b)=>n({key:h,direction:b}),children:f.header},f.key):e.jsx(ne,{className:l(f.align==="right"&&"text-right"),children:f.header},f.key))})}),e.jsx(Be,{children:p()})]})})]})}const et=i.forwardRef(function({className:t,classNames:r,...s},n){return e.jsx(ys.DayPicker,{showOutsideDays:!0,className:l("p-3",t),classNames:{root:"rdp",months:"flex flex-col gap-4 sm:flex-row sm:gap-6",month:"flex flex-col gap-3",month_caption:"relative flex h-8 items-center justify-center",caption_label:"text-sm font-medium",nav:"absolute inset-x-0 top-0 flex h-8 items-center justify-between",button_previous:"inline-flex h-7 w-7 items-center justify-center rounded-md text-foreground-muted hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring outline-none",button_next:"inline-flex h-7 w-7 items-center justify-center rounded-md text-foreground-muted hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring outline-none",month_grid:"w-full border-collapse",weekdays:"grid grid-cols-7",weekday:"h-8 w-9 text-center text-[11px] font-medium uppercase tracking-wide text-foreground-subtle",week:"mt-0.5 grid grid-cols-7",day:"relative h-9 w-9 p-0 text-center",day_button:"inline-flex h-9 w-9 items-center justify-center rounded-md text-sm hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring outline-none aria-selected:bg-accent aria-selected:text-on-accent aria-selected:hover:bg-accent-700",today:"[&_button]:border [&_button]:border-border",outside:"text-foreground-subtle",disabled:"opacity-40 pointer-events-none",range_start:"[&_button]:bg-accent [&_button]:text-on-accent [&_button]:rounded-r-none",range_end:"[&_button]:bg-accent [&_button]:text-on-accent [&_button]:rounded-l-none",range_middle:"[&_button]:bg-accent-soft [&_button]:text-foreground [&_button]:rounded-none",hidden:"invisible",...r},components:{Chevron:({orientation:o})=>o==="left"?e.jsx(d.ChevronLeft,{className:"size-4"}):e.jsx(d.ChevronRight,{className:"size-4"})},...s})});function Me(a){return a?a.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):""}function xr({label:a,placeholder:t,hasValue:r,children:s,error:n,fieldId:o,disabled:c}){return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[a&&e.jsx("label",{htmlFor:o,className:"text-sm font-medium text-foreground",children:a}),e.jsx(I.Trigger,{asChild:!0,children:e.jsxs("button",{id:o,type:"button",disabled:c,"aria-invalid":!!n||void 0,className:l("inline-flex h-9 w-full items-center justify-start gap-2 rounded-md border bg-card px-3 text-left text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",n?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring",!r&&"text-foreground-subtle"),children:[e.jsx(d.Calendar,{className:"size-4 text-foreground-subtle","aria-hidden":!0}),e.jsx("span",{className:"truncate",children:r?s:t})]})}),n&&e.jsx("p",{role:"alert",className:"text-xs text-danger-text",children:n})]})}const fr=i.forwardRef(function({value:t,onChange:r,label:s,placeholder:n="Pick a date",error:o,disabled:c,fromDate:m,toDate:x,className:u},g){const p=i.useId(),[f,h]=i.useState(!1);return e.jsx("div",{ref:g,className:l(u),children:e.jsxs(I.Root,{open:f,onOpenChange:h,children:[e.jsx(xr,{label:s,placeholder:n,hasValue:!!t,error:o,fieldId:p,disabled:c,children:Me(t)}),e.jsx(I.Portal,{children:e.jsx(I.Content,{align:"start",sideOffset:4,className:"z-[var(--z-popover)] rounded-lg border border-border bg-popover text-popover-foreground shadow-md",children:e.jsx(et,{mode:"single",selected:t,onSelect:b=>{r(b??void 0),b&&h(!1)},startMonth:m,endMonth:x})})})]})})});fr.displayName="DatePicker";const gr=i.forwardRef(function({value:t,onChange:r,label:s,placeholder:n="Pick a range",error:o,disabled:c,fromDate:m,toDate:x,className:u},g){const p=i.useId(),[f,h]=i.useState(!1),b=!!(t!=null&&t.from);return e.jsx("div",{ref:g,className:l(u),children:e.jsxs(I.Root,{open:f,onOpenChange:h,children:[e.jsx(xr,{label:s,placeholder:n,hasValue:b,error:o,fieldId:p,disabled:c,children:t!=null&&t.from&&t.to?`${Me(t.from)} – ${Me(t.to)}`:t!=null&&t.from?Me(t.from):""}),e.jsx(I.Portal,{children:e.jsx(I.Content,{align:"start",sideOffset:4,className:"z-[var(--z-popover)] rounded-lg border border-border bg-popover text-popover-foreground shadow-md",children:e.jsx(et,{mode:"range",selected:t,onSelect:r,numberOfMonths:2,startMonth:m,endMonth:x})})})]})})});gr.displayName="DateRangePicker";function ga({tokens:a,className:t,children:r,style:s,...n}){const o={...s};if(a)for(const[c,m]of Object.entries(a)){const x=c.startsWith("--")?c:`--${c}`;o[x]=m}return e.jsx("div",{"data-brand-scope":!0,className:l("contents",t),style:o,...n,children:r})}const ha={default:{},edgelog:{"color-accent":"oklch(0.55 0.18 250)","color-accent-700":"oklch(0.46 0.16 250)","color-accent-800":"oklch(0.38 0.14 250)","color-accent-soft":"oklch(0.95 0.04 250)","radius-md":"8px","radius-lg":"12px"},gerege:{"color-accent":"oklch(0.62 0.16 45)","color-accent-700":"oklch(0.54 0.16 45)","color-accent-800":"oklch(0.46 0.14 45)","color-accent-soft":"oklch(0.95 0.04 45)","radius-md":"4px","radius-lg":"6px"},forest:{"color-accent":"oklch(0.55 0.14 155)","color-accent-700":"oklch(0.47 0.14 155)","color-accent-800":"oklch(0.39 0.12 155)","color-accent-soft":"oklch(0.95 0.04 155)"}},hr=R.Root,pa=R.Trigger,pr=R.Portal,br=R.Close,tt=i.forwardRef(function({className:t,...r},s){return e.jsx(R.Overlay,{ref:s,className:l("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r})});tt.displayName="DialogOverlay";const rt=i.forwardRef(function({className:t,children:r,showClose:s=!0,size:n="md",...o},c){return e.jsxs(pr,{children:[e.jsx(tt,{}),e.jsxs(R.Content,{ref:c,className:l("fixed left-1/2 top-1/2 z-[var(--z-modal)] -translate-x-1/2 -translate-y-1/2","w-[calc(100%-2rem)] rounded-lg border border-border bg-card text-card-foreground shadow-lg","p-6","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",n==="sm"&&"max-w-[400px]",n==="md"&&"max-w-[520px]",n==="lg"&&"max-w-[720px]",t),...o,children:[r,s&&e.jsx(R.Close,{"aria-label":"Close",className:l("absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-foreground-subtle","hover:bg-background-muted hover:text-foreground","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","transition-colors duration-[var(--duration-fast)]"),children:e.jsx(d.X,{className:"size-4","aria-hidden":!0})})]})]})});rt.displayName="DialogContent";function st({className:a,...t}){return e.jsx("div",{className:l("flex flex-col gap-1 pb-4",a),...t})}st.displayName="DialogHeader";function at({className:a,...t}){return e.jsx("div",{className:l("flex flex-col-reverse gap-2 pt-6 sm:flex-row sm:justify-end",a),...t})}at.displayName="DialogFooter";const nt=i.forwardRef(function({className:t,...r},s){return e.jsx(R.Title,{ref:s,className:l("text-lg font-semibold text-foreground leading-tight",t),...r})});nt.displayName="DialogTitle";const ot=i.forwardRef(function({className:t,...r},s){return e.jsx(R.Description,{ref:s,className:l("text-sm text-foreground-muted",t),...r})});ot.displayName="DialogDescription";function vr({open:a,onOpenChange:t,title:r,description:s,confirmLabel:n="Confirm",cancelLabel:o="Cancel",confirmVariant:c="primary",onConfirm:m,loading:x}){return e.jsx(hr,{open:a,onOpenChange:t,children:e.jsxs(rt,{size:"sm",children:[e.jsxs(st,{children:[e.jsx(nt,{children:r}),s&&e.jsx(ot,{children:s})]}),e.jsxs(at,{children:[e.jsx(br,{asChild:!0,children:e.jsx(T,{variant:"outline",children:o})}),e.jsx(T,{variant:c,loading:x,onClick:m,children:n})]})]})})}vr.displayName="ConfirmationDialog";const Oe=i.forwardRef(function({icon:t,illustration:r,title:s,description:n,action:o,secondaryAction:c,className:m,...x},u){return e.jsxs("div",{ref:u,className:l("flex flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border bg-background-subtle p-10 text-center",m),...x,children:[r||(t?e.jsx("div",{className:"inline-flex size-12 items-center justify-center rounded-full bg-background-muted text-foreground-muted [&_svg]:size-6",children:t}):e.jsx(zt,{className:"size-24"})),e.jsx("h3",{className:"text-base font-semibold text-foreground leading-tight",children:s}),n&&e.jsx("p",{className:"max-w-md text-sm text-foreground-muted leading-relaxed",children:n}),(o||c)&&e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[o,c]})]})});Oe.displayName="EmptyState";const ba={404:{illustration:e.jsx(It,{className:"size-32"}),title:"Page not found",description:"We couldn't find what you were looking for."},500:{illustration:e.jsx(Pt,{className:"size-32"}),title:"Something went wrong",description:"We're looking into it. Please try again in a moment."},generic:{illustration:e.jsx(_t,{className:"size-32"}),title:"Unexpected error",description:"Something interrupted this action."}},jr=i.forwardRef(function({variant:t="generic",title:r,description:s,illustration:n,action:o,onRetry:c,className:m,...x},u){const g=ba[t];return e.jsxs("div",{ref:u,role:"alert",className:l("flex flex-col items-center justify-center gap-3 rounded-lg border border-border bg-background-subtle p-10 text-center",m),...x,children:[n??g.illustration,e.jsx("h3",{className:"text-base font-semibold text-foreground leading-tight",children:r??g.title}),e.jsx("p",{className:"max-w-md text-sm text-foreground-muted leading-relaxed",children:s??g.description}),(o||c)&&e.jsx("div",{className:"mt-2 flex items-center gap-2",children:o??e.jsx(T,{onClick:c,variant:"outline",children:"Try again"})})]})});jr.displayName="ErrorState";const va=Xe.FormProvider,Nr=i.createContext(null);function ja(a){return e.jsx(Nr.Provider,{value:{name:a.name},children:e.jsx(Xe.Controller,{...a})})}const wr=i.createContext(null);function Ce(){const a=i.useContext(Nr),t=i.useContext(wr),{getFieldState:r,formState:s}=Xe.useFormContext();if(!a)throw new Error("useFormField must be used inside <FormField>");const n=r(a.name,s),o=(t==null?void 0:t.id)??"";return{id:o,name:a.name,formItemId:`${o}-item`,formDescriptionId:`${o}-desc`,formMessageId:`${o}-error`,...n}}const yr=i.forwardRef(function({className:t,...r},s){const n=i.useId();return e.jsx(wr.Provider,{value:{id:n},children:e.jsx("div",{ref:s,className:l("flex flex-col gap-1.5",t),...r})})});yr.displayName="FormItem";const Cr=i.forwardRef(function({className:t,...r},s){const{formItemId:n,error:o}=Ce();return e.jsx(Fs.Root,{ref:s,htmlFor:n,className:l("text-sm font-medium text-foreground",o&&"text-danger-text",t),...r})});Cr.displayName="FormLabel";const kr=i.forwardRef(function(t,r){const{error:s,formItemId:n,formDescriptionId:o,formMessageId:c}=Ce();return e.jsx(Rt.Slot,{ref:r,id:n,"aria-describedby":s?`${o} ${c}`:o,"aria-invalid":!!s,...t})});kr.displayName="FormControl";const Sr=i.forwardRef(function({className:t,...r},s){const{formDescriptionId:n}=Ce();return e.jsx("p",{ref:s,id:n,className:l("text-xs text-foreground-subtle",t),...r})});Sr.displayName="FormDescription";const Tr=i.forwardRef(function({className:t,children:r,...s},n){const{error:o,formMessageId:c}=Ce(),m=o?String((o==null?void 0:o.message)??""):r;return m?e.jsx("p",{ref:n,id:c,role:"alert",className:l("text-xs text-danger-text",t),...s,children:m}):null});Tr.displayName="FormError";const it=i.forwardRef(function({size:t="sm",className:r,...s},n){return e.jsx("kbd",{ref:n,className:l("inline-flex items-center justify-center rounded border border-border bg-background-subtle font-mono","text-foreground-muted shadow-xs",t==="sm"?"h-5 min-w-5 px-1 text-[10px]":"h-6 min-w-6 px-1.5 text-xs",r),...s})});it.displayName="Kbd";const Dr=i.forwardRef(function({options:t,value:r,onChange:s,label:n,helperText:o,error:c,placeholder:m="Select…",emptyText:x="No results.",maxVisibleChips:u=3,clearable:g=!0,disabled:p,className:f},h){const b=i.useId(),j=b,v=`${b}-helper`,S=`${b}-error`,[_,D]=i.useState(!1),[k,N]=i.useState(""),w=i.useRef(null),F=i.useMemo(()=>t.filter(y=>r.includes(y.value)),[t,r]),K=i.useCallback(y=>{r.includes(y)?s(r.filter(ee=>ee!==y)):s([...r,y])},[r,s]),Q=i.useCallback(()=>s([]),[s]),se=y=>{y.key==="Backspace"&&k===""&&r.length>0&&s(r.slice(0,-1))},z=F.slice(0,u),q=F.length-z.length,Z=!!c;return e.jsxs("div",{ref:h,className:l("flex flex-col gap-1.5",f),children:[n&&e.jsx("label",{htmlFor:j,className:"text-sm font-medium text-foreground",children:n}),e.jsxs(I.Root,{open:_,onOpenChange:D,children:[e.jsx(I.Trigger,{asChild:!0,children:e.jsxs("div",{role:"combobox","aria-expanded":_,"aria-controls":`${j}-list`,"aria-haspopup":"listbox",id:j,tabIndex:p?-1:0,onKeyDown:se,"aria-disabled":p||void 0,"aria-invalid":Z||void 0,"aria-describedby":Z?S:o?v:void 0,className:l("flex h-9 w-full cursor-text items-center gap-1.5 overflow-hidden rounded-md border bg-card px-2 py-1 text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background",Z?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring",p&&"opacity-50 pointer-events-none"),onClick:()=>{var y;return(y=w.current)==null?void 0:y.focus()},children:[z.length===0&&e.jsx("span",{className:"text-foreground-subtle px-1",children:m}),z.map(y=>e.jsxs("span",{className:"inline-flex max-w-[10rem] shrink-0 items-center gap-1 rounded-md bg-accent-soft px-1.5 py-0.5 text-xs font-medium text-on-accent-soft",children:[e.jsx("span",{className:"truncate",children:y.label}),e.jsx("button",{type:"button","aria-label":`Remove ${y.label}`,className:"inline-flex items-center text-on-accent-soft hover:text-foreground",onClick:ee=>{ee.stopPropagation(),K(y.value)},children:e.jsx(d.X,{className:"size-3","aria-hidden":!0})})]},y.value)),q>0&&e.jsxs("span",{className:"shrink-0 rounded-md bg-background-muted px-1.5 py-0.5 text-xs font-medium text-foreground-muted",children:["+",q]}),e.jsx("input",{ref:w,value:k,onChange:y=>N(y.target.value),onFocus:()=>D(!0),className:"flex-1 min-w-[8ch] bg-transparent text-sm outline-none placeholder:text-foreground-subtle",placeholder:(F.length===0,""),disabled:p}),e.jsxs("span",{className:"ml-auto flex items-center gap-1",children:[g&&F.length>0&&e.jsx("button",{type:"button","aria-label":"Clear all",onClick:y=>{y.stopPropagation(),Q()},className:"text-foreground-subtle hover:text-foreground",children:e.jsx(d.X,{className:"size-4","aria-hidden":!0})}),e.jsx(d.ChevronsUpDown,{className:"size-4 text-foreground-subtle","aria-hidden":!0})]})]})}),e.jsx(I.Portal,{children:e.jsx(I.Content,{align:"start",sideOffset:4,className:l("z-[var(--z-popover)] w-[var(--radix-popover-trigger-width)] overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"),onOpenAutoFocus:y=>y.preventDefault(),children:e.jsx(E.Command,{shouldFilter:!1,className:"flex h-full w-full flex-col",children:e.jsxs(E.Command.List,{id:`${j}-list`,className:"max-h-64 overflow-y-auto p-1",children:[t.filter(y=>y.label.toLowerCase().includes(k.toLowerCase())).map(y=>{const ee=r.includes(y.value);return e.jsxs(E.Command.Item,{value:y.value,disabled:y.disabled,onSelect:()=>K(y.value),className:l("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground","data-[selected=true]:bg-background-muted","data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none"),children:[e.jsx("span",{"aria-hidden":!0,className:l("flex size-4 items-center justify-center rounded-sm border",ee?"border-accent bg-accent text-on-accent":"border-border"),children:ee&&e.jsx(d.Check,{className:"size-3","aria-hidden":!0})}),e.jsx("span",{className:"flex-1",children:y.label}),y.description&&e.jsx("span",{className:"text-xs text-foreground-subtle",children:y.description})]},y.value)}),e.jsx(E.Command.Empty,{className:"px-2 py-6 text-center text-sm text-foreground-subtle",children:x})]})})})})]}),c?e.jsx("p",{id:S,role:"alert",className:"text-xs text-danger-text",children:c}):o?e.jsx("p",{id:v,className:"text-xs text-foreground-subtle",children:o}):null]})});Dr.displayName="MultiSelect";const lt=B.Root,Na=B.Value,$e=i.forwardRef(function({className:t,placeholder:r,size:s="md",tone:n="default",...o},c){return e.jsxs(B.Trigger,{ref:c,className:l("inline-flex w-full items-center justify-between gap-2 rounded-md border bg-card text-sm text-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed","data-[placeholder]:text-foreground-subtle",s==="sm"&&"h-8 px-2.5",s==="md"&&"h-9 px-3",s==="lg"&&"h-10 px-3.5",n==="default"?"border-border focus-visible:border-accent focus-visible:ring-ring":"border-danger focus-visible:border-danger focus-visible:ring-danger",t),...o,children:[e.jsx(B.Value,{placeholder:r}),e.jsx(B.Icon,{asChild:!0,children:e.jsx(d.ChevronsUpDown,{className:"size-4 text-foreground-subtle shrink-0","aria-hidden":!0})})]})});$e.displayName="SelectTrigger";const Rr="flex h-6 cursor-default items-center justify-center text-foreground-subtle",dt=i.forwardRef(function({className:t,...r},s){return e.jsx(B.ScrollUpButton,{ref:s,className:l(Rr,t),...r,children:e.jsx(d.ChevronUp,{className:"size-4","aria-hidden":!0})})});dt.displayName="SelectScrollUpButton";const ct=i.forwardRef(function({className:t,...r},s){return e.jsx(B.ScrollDownButton,{ref:s,className:l(Rr,t),...r,children:e.jsx(d.ChevronDown,{className:"size-4","aria-hidden":!0})})});ct.displayName="SelectScrollDownButton";const Ue=i.forwardRef(function({className:t,children:r,position:s="popper",...n},o){return e.jsx(B.Portal,{children:e.jsxs(B.Content,{ref:o,position:s,className:l("z-[var(--z-popover)] min-w-[var(--radix-select-trigger-width)] max-h-96","overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground","shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",t),...n,children:[e.jsx(dt,{}),e.jsx(B.Viewport,{className:"p-1",children:r}),e.jsx(ct,{})]})})});Ue.displayName="SelectContent";const ut=i.forwardRef(function({className:t,...r},s){return e.jsx(B.Label,{ref:s,className:l("px-2 py-1.5 text-xs font-medium text-foreground-subtle",t),...r})});ut.displayName="SelectLabel";const He=i.forwardRef(function({className:t,children:r,leadingIcon:s,...n},o){return e.jsxs(B.Item,{ref:o,className:l("relative flex w-full cursor-default select-none items-center gap-2","rounded-sm px-2 py-1.5 pr-8 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[s&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:s}),e.jsx(B.ItemText,{children:r}),e.jsx("span",{className:"absolute right-2 flex items-center justify-center",children:e.jsx(B.ItemIndicator,{children:e.jsx(d.Check,{className:"size-4 text-accent","aria-hidden":!0})})})]})});He.displayName="SelectItem";const Mr=i.forwardRef(function({className:t,...r},s){return e.jsx(B.Separator,{ref:s,className:l("-mx-1 my-1 h-px bg-border",t),...r})});Mr.displayName="SelectSeparator";const zr=i.forwardRef(function({label:t,children:r,...s},n){return e.jsxs(B.Group,{ref:n,...s,children:[t&&e.jsx(ut,{children:t}),r]})});zr.displayName="SelectGroup";function wa(a,t,r=7){if(t<=r)return Array.from({length:t},(m,x)=>x+1);const s=1,n=[],o=Math.max(2,a-s),c=Math.min(t-1,a+s);n.push(1),o>2&&n.push("gap");for(let m=o;m<=c;m++)n.push(m);return c<t-1&&n.push("gap"),n.push(t),n}const mt=i.forwardRef(function({page:t,pageCount:r,onPageChange:s,totalItems:n,pageSize:o,pageSizeOptions:c,onPageSizeChange:m,showJump:x=!0,className:u,...g},p){const f=i.useMemo(()=>wa(t,r),[t,r]),h=o?(t-1)*o+1:void 0,b=o&&n?Math.min(t*o,n):void 0,j=v=>{v<1||v>r||v===t||s(v)};return e.jsxs("nav",{ref:p,"aria-label":"Pagination",className:l("flex flex-wrap items-center justify-between gap-3",u),...g,children:[e.jsxs("div",{className:"flex items-center gap-3 text-sm text-foreground-muted",children:[n!==void 0&&o!==void 0&&e.jsxs("span",{className:"tabular",children:["Showing ",h,"–",b," of ",n]}),c&&m&&o!==void 0&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"page-size",className:"sr-only",children:"Rows per page"}),e.jsxs(lt,{value:String(o),onValueChange:v=>m(Number(v)),children:[e.jsx($e,{size:"sm",className:"w-[7.5rem] whitespace-nowrap"}),e.jsx(Ue,{children:c.map(v=>e.jsxs(He,{value:String(v),children:[v," / page"]},v))})]})]})]}),e.jsxs("ul",{className:"flex items-center gap-1",children:[x&&e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Go to first page",disabled:t===1,onClick:()=>j(1),className:De,children:e.jsx(d.ChevronsLeft,{className:"size-4","aria-hidden":!0})})}),e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Previous page",disabled:t===1,onClick:()=>j(t-1),className:De,children:e.jsx(d.ChevronLeft,{className:"size-4","aria-hidden":!0})})}),f.map((v,S)=>v==="gap"?e.jsx("li",{className:"px-2 text-foreground-subtle",children:"…"},`gap-${S}`):e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":`Page ${v}`,"aria-current":v===t?"page":void 0,onClick:()=>j(v),className:l("inline-flex size-8 items-center justify-center rounded-md text-sm tabular outline-none","transition-colors duration-[var(--duration-fast)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",v===t?"bg-accent text-on-accent font-medium":"text-foreground-muted hover:bg-background-muted hover:text-foreground"),children:v})},v)),e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Next page",disabled:t===r,onClick:()=>j(t+1),className:De,children:e.jsx(d.ChevronRight,{className:"size-4","aria-hidden":!0})})}),x&&e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Go to last page",disabled:t===r,onClick:()=>j(r),className:De,children:e.jsx(d.ChevronsRight,{className:"size-4","aria-hidden":!0})})})]})]})});mt.displayName="Pagination";const De=l("inline-flex size-8 items-center justify-center rounded-md text-foreground-muted","transition-colors duration-[var(--duration-fast)]","hover:bg-background-muted hover:text-foreground","disabled:opacity-50 disabled:pointer-events-none","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),ya=I.Root,Ca=I.Trigger,ka=I.Anchor,Sa=I.Close,Ir=i.forwardRef(function({className:t,align:r="center",sideOffset:s=4,...n},o){return e.jsx(I.Portal,{children:e.jsx(I.Content,{ref:o,align:r,sideOffset:s,className:l("z-[var(--z-popover)] w-72 rounded-lg border border-border bg-popover p-4 text-popover-foreground shadow-md","outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-1 data-[side=top]:slide-in-from-bottom-1","data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1",t),...n})})});Ir.displayName="PopoverContent";const Ta={sm:"h-1",md:"h-1.5",lg:"h-2"},Da={accent:"bg-accent",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},Pr=i.forwardRef(function({className:t,value:r,size:s="md",tone:n="accent",...o},c){const m=r==null;return e.jsxs(kt.Root,{ref:c,value:m?void 0:r,className:l("relative w-full overflow-hidden rounded-full bg-background-muted",Ta[s],t),...o,children:[e.jsx(kt.Indicator,{className:l("h-full w-full flex-1 transition-transform",Da[n],m&&"animate-[progressIndeterminate_1.4s_ease-in-out_infinite] origin-left"),style:m?void 0:{transform:`translateX(-${100-(r??0)}%)`}}),e.jsx("style",{children:`
2
2
  @keyframes progressIndeterminate {
3
3
  0% { transform: translateX(-100%) scaleX(0.6); }
4
4
  50% { transform: translateX(0%) scaleX(0.4); }
5
5
  100% { transform: translateX(100%) scaleX(0.6); }
6
6
  }
7
- `})]})});Pr.displayName="Progress";const Da={accent:"stroke-accent",success:"stroke-success",warning:"stroke-warning",danger:"stroke-danger"},_r=i.forwardRef(function({value:t,size:r=36,thickness:s=3,className:n,tone:o="accent",...c},m){const x=t===void 0,u=(r-s)/2,g=2*Math.PI*u,p=x?0:g-Math.min(100,Math.max(0,t))/100*g;return e.jsxs("svg",{ref:m,width:r,height:r,viewBox:`0 0 ${r} ${r}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":x?void 0:t,className:l("shrink-0",x&&"animate-spin",n),...c,children:[e.jsx("circle",{cx:r/2,cy:r/2,r:u,strokeWidth:s,className:"stroke-background-muted fill-none"}),e.jsx("circle",{cx:r/2,cy:r/2,r:u,strokeWidth:s,strokeLinecap:"round",strokeDasharray:g,strokeDashoffset:x?g*.7:p,className:l(Da[o],"fill-none transition-[stroke-dashoffset]"),transform:`rotate(-90 ${r/2} ${r/2})`})]})});_r.displayName="ProgressCircle";const xt=i.forwardRef(function({className:t,orientation:r="vertical",...s},n){return e.jsx(We.Root,{ref:n,className:l("flex gap-3",r==="vertical"?"flex-col":"flex-row flex-wrap",t),...s})});xt.displayName="RadioGroup";const be=i.forwardRef(function({className:t,label:r,description:s,hideLabel:n,id:o,disabled:c,...m},x){const u=i.useId(),g=o??u,p=s?`${g}-desc`:void 0;return e.jsxs("div",{className:l("flex items-start gap-2.5",t),children:[e.jsx(We.Item,{ref:x,id:g,disabled:c,"aria-describedby":p,className:l("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border bg-card","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","data-[state=checked]:border-accent","disabled:cursor-not-allowed disabled:opacity-50","border-border-strong"),...m,children:e.jsx(We.Indicator,{className:"flex items-center justify-center",children:e.jsx("span",{className:"size-2 rounded-full bg-accent","aria-hidden":!0})})}),r&&e.jsxs("div",{className:l("flex flex-col gap-0.5",n&&"sr-only"),children:[e.jsx("label",{htmlFor:g,className:l("text-sm text-foreground select-none",c&&"opacity-50 cursor-not-allowed"),children:r}),s&&e.jsx("p",{id:p,className:"text-xs text-foreground-subtle",children:s})]})]})});be.displayName="RadioItem";const Ar=i.forwardRef(function({className:t,children:r,...s},n){return e.jsxs(he.Root,{ref:n,className:l("relative overflow-hidden",t),...s,children:[e.jsx(he.Viewport,{className:"h-full w-full rounded-[inherit]",children:r}),e.jsx(ft,{}),e.jsx(he.Corner,{})]})});Ar.displayName="ScrollArea";const ft=i.forwardRef(function({className:t,orientation:r="vertical",...s},n){return e.jsx(he.ScrollAreaScrollbar,{ref:n,orientation:r,className:l("flex touch-none select-none transition-colors duration-[var(--duration-fast)]",r==="vertical"&&"h-full w-2 border-l border-l-transparent p-px",r==="horizontal"&&"h-2 flex-col border-t border-t-transparent p-px",t),...s,children:e.jsx(he.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border-strong"})})});ft.displayName="ScrollBar";const le=i.forwardRef(function({className:t,orientation:r="horizontal",decorative:s=!0,...n},o){return e.jsx(Fs.Root,{ref:o,orientation:r,decorative:s,className:l("shrink-0 bg-border",r==="horizontal"?"h-px w-full":"h-full w-px",t),...n})});le.displayName="Separator";const Fr=R.Root,Lr=R.Trigger,Ra=R.Close,Er=R.Portal,Br=i.forwardRef(function({className:t,...r},s){return e.jsx(R.Overlay,{ref:s,className:l("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",t),...r})});Br.displayName="SheetOverlay";const Ma=X.cva(["fixed z-[var(--z-modal)] bg-card text-card-foreground shadow-lg","flex flex-col gap-4 p-6","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:duration-[var(--duration-base)] data-[state=open]:duration-[var(--duration-slow)]"],{variants:{side:{top:"inset-x-0 top-0 border-b border-border data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top",bottom:"inset-x-0 bottom-0 border-t border-border data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom",left:"inset-y-0 left-0 h-full w-3/4 max-w-md border-r border-border data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left",right:"inset-y-0 right-0 h-full w-3/4 max-w-md border-l border-border data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right"}},defaultVariants:{side:"right"}}),gt=i.forwardRef(function({className:t,children:r,side:s="right",showClose:n=!0,...o},c){return e.jsxs(Er,{children:[e.jsx(Br,{}),e.jsxs(R.Content,{ref:c,className:l(Ma({side:s}),t),...o,children:[r,n&&e.jsx(R.Close,{"aria-label":"Close",className:l("absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-foreground-subtle","hover:bg-background-muted hover:text-foreground","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","transition-colors duration-[var(--duration-fast)]"),children:e.jsx(d.X,{className:"size-4","aria-hidden":!0})})]})]})});gt.displayName="SheetContent";function Or({className:a,...t}){return e.jsx("div",{className:l("flex flex-col gap-1",a),...t})}Or.displayName="SheetHeader";function $r({className:a,...t}){return e.jsx("div",{className:l("mt-auto flex flex-col-reverse gap-2 pt-4 sm:flex-row sm:justify-end",a),...t})}$r.displayName="SheetFooter";const Ur=i.forwardRef(function({className:t,...r},s){return e.jsx(R.Title,{ref:s,className:l("text-lg font-semibold text-foreground leading-tight",t),...r})});Ur.displayName="SheetTitle";const Hr=i.forwardRef(function({className:t,...r},s){return e.jsx(R.Description,{ref:s,className:l("text-sm text-foreground-muted",t),...r})});Hr.displayName="SheetDescription";const ke=i.createContext({collapsed:!1});function za(){return i.useContext(ke)}const ht=i.forwardRef(function({defaultCollapsed:t=!1,collapsed:r,onCollapsedChange:s,header:n,footer:o,className:c,children:m,...x},u){const[g,p]=i.useState(t),f=r??g,h=b=>{r===void 0&&p(b),s==null||s(b)};return e.jsx(ke.Provider,{value:{collapsed:f},children:e.jsxs("aside",{ref:u,"aria-label":"Primary",className:l("sticky top-0 hidden md:flex h-screen shrink-0 flex-col gap-2 border-r border-border bg-background-subtle","transition-[width] duration-[var(--duration-base)] ease-[var(--ease-out)]",f?"w-14":"w-60",c),...x,children:[n&&e.jsx("div",{className:l("flex h-14 shrink-0 items-center overflow-hidden border-b border-border",f?"justify-center px-2":"px-3"),children:n}),e.jsx("div",{className:"flex-1 overflow-y-auto py-3",children:m}),o&&e.jsx("div",{className:"border-t border-border p-2",children:o}),e.jsxs("button",{type:"button",onClick:()=>h(!f),"aria-label":f?"Expand sidebar":"Collapse sidebar","aria-expanded":!f,className:l("flex h-8 items-center gap-2 mx-2 mb-2 rounded-md px-2 text-foreground-subtle","hover:bg-background-muted hover:text-foreground outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","transition-colors duration-[var(--duration-fast)]"),children:[f?e.jsx(d.ChevronsRight,{className:"size-4","aria-hidden":!0}):e.jsx(d.ChevronsLeft,{className:"size-4","aria-hidden":!0}),!f&&e.jsx("span",{className:"text-xs font-medium",children:"Collapse"})]})]})})});ht.displayName="Sidebar";function pt({label:a,className:t,children:r,...s}){const{collapsed:n}=i.useContext(ke);return e.jsxs("div",{className:l("mb-3",t),...s,children:[a&&!n&&e.jsx("div",{className:"px-4 pb-1 pt-2 text-xs font-medium text-foreground-subtle uppercase tracking-wide",children:a}),e.jsx("ul",{className:"flex flex-col gap-px",children:r})]})}pt.displayName="SidebarSection";function bt({icon:a,active:t,href:r,trailing:s,sub:n,className:o,children:c,...m}){const{collapsed:x}=i.useContext(ke),u=r?"a":"button";return e.jsx("li",{children:e.jsxs(u,{href:r,"aria-current":t?"page":void 0,className:l("mx-2 flex h-8 items-center gap-2 rounded-md px-2 text-sm outline-none","transition-colors duration-[var(--duration-fast)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",t?"bg-background-muted text-foreground font-medium":"text-foreground-muted hover:bg-background-muted hover:text-foreground",n&&!x&&"ml-6",x&&"justify-center",o),...m,children:[a&&e.jsx("span",{className:"flex shrink-0 items-center [&_svg]:size-4",children:a}),!x&&e.jsx("span",{className:"flex-1 truncate text-left",children:c}),!x&&s&&e.jsx("span",{className:"ml-auto",children:s})]})})}bt.displayName="SidebarItem";function Gr({icon:a,label:t,defaultOpen:r=!0,children:s}){const{collapsed:n}=i.useContext(ke),[o,c]=i.useState(r);return n?e.jsx(e.Fragment,{children:s}):e.jsxs("li",{children:[e.jsxs("button",{type:"button",onClick:()=>c(m=>!m),"aria-expanded":o,className:l("mx-2 flex h-8 w-[calc(100%-1rem)] items-center gap-2 rounded-md px-2 text-sm text-foreground-muted outline-none","transition-colors duration-[var(--duration-fast)]","hover:bg-background-muted hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:[a&&e.jsx("span",{className:"flex shrink-0 items-center [&_svg]:size-4",children:a}),e.jsx("span",{className:"flex-1 text-left",children:t}),e.jsx(d.ChevronDown,{className:l("size-3.5 transition-transform",o&&"rotate-180"),"aria-hidden":!0})]}),o&&e.jsx("ul",{className:"flex flex-col gap-px",children:s})]})}Gr.displayName="SidebarGroup";const Vr=i.forwardRef(function({className:t,label:r,showValue:s,formatValue:n=u=>String(u),value:o,defaultValue:c,...m},x){const u=o??c??[0],g=u.length>1;return e.jsxs("div",{className:l("flex flex-col gap-2",t),children:[(r||s)&&e.jsxs("div",{className:"flex items-center justify-between",children:[r&&e.jsx("span",{className:"text-sm font-medium text-foreground",children:r}),s&&e.jsx("span",{className:"text-xs tabular text-foreground-muted font-mono",children:g?`${n(u[0])} – ${n(u[1])}`:n(u[0])})]}),e.jsxs(Te.Root,{ref:x,value:o,defaultValue:c,className:"relative flex w-full touch-none select-none items-center",...m,children:[e.jsx(Te.Track,{className:"relative h-1 w-full grow overflow-hidden rounded-full bg-background-muted",children:e.jsx(Te.Range,{className:"absolute h-full bg-accent"})}),u.map((p,f)=>e.jsx(Te.Thumb,{className:l("block size-4 rounded-full border-2 border-accent bg-card shadow-sm","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","transition-transform duration-[var(--duration-fast)] ease-[var(--ease-out)]","hover:scale-110 disabled:pointer-events-none disabled:opacity-50"),"aria-label":g?f===0?"Minimum":"Maximum":r?String(r):"Value"},f))]})]})});Vr.displayName="Slider";const Ia={sm:"size-3.5",md:"size-4",lg:"size-6"},Pa={accent:"text-accent",neutral:"text-foreground-subtle","on-accent":"text-on-accent"},qr=i.forwardRef(function({className:t,tone:r="accent",size:s="md",label:n,decorative:o,...c},m){return e.jsxs("svg",{ref:m,viewBox:"0 0 24 24",role:o?void 0:"status","aria-label":o?void 0:n??"Loading","aria-hidden":o||void 0,className:l("animate-spin",Ia[s],Pa[r],t),...c,children:[e.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeOpacity:.2,fill:"none"}),e.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",fill:"none"})]})});qr.displayName="Spinner";const vt=i.forwardRef(function({steps:t,current:r,orientation:s="horizontal",className:n,...o},c){return e.jsx("ol",{ref:c,"aria-label":"Progress",className:l(s==="horizontal"?"flex w-full items-center":"flex flex-col gap-6",n),...o,children:t.map((m,x)=>{const u=x<r?"complete":x===r?"current":"upcoming",g=x===t.length-1;return e.jsxs("li",{"aria-current":u==="current"?"step":void 0,className:l(s==="horizontal"?"flex flex-1 items-center gap-3 last:flex-initial":"flex items-start gap-3"),children:[e.jsxs("div",{className:l(s==="horizontal"?"flex items-center gap-3":"flex flex-col items-center"),children:[e.jsx("span",{"aria-hidden":!0,className:l("inline-flex size-7 items-center justify-center rounded-full text-xs font-semibold transition-colors",u==="complete"&&"bg-accent text-on-accent",u==="current"&&"bg-card border-2 border-accent text-accent",u==="upcoming"&&"bg-background-muted text-foreground-subtle border border-border"),children:u==="complete"?e.jsx(d.Check,{className:"size-4"}):x+1}),s==="vertical"&&!g&&e.jsx("span",{className:l("mt-1 w-px flex-1 min-h-6",x<r?"bg-accent":"bg-border")})]}),e.jsxs("div",{className:l("flex flex-col",s==="horizontal"&&"min-w-0"),children:[e.jsx("span",{className:l("text-sm font-medium",u==="upcoming"?"text-foreground-subtle":"text-foreground"),children:m.title}),s==="vertical"&&m.description&&e.jsx("p",{className:"text-xs text-foreground-muted mt-0.5",children:m.description})]}),s==="horizontal"&&!g&&e.jsx("span",{"aria-hidden":!0,className:l("h-px flex-1 mx-2",x<r?"bg-accent":"bg-border")})]},x)})})});vt.displayName="Stepper";const _a={sm:"h-4 w-7",md:"h-5 w-9"},Aa={sm:"size-3 data-[state=checked]:translate-x-3",md:"size-4 data-[state=checked]:translate-x-4"},ue=i.forwardRef(function({className:t,label:r,description:s,labelPosition:n="after",size:o="md",hideLabel:c,id:m,disabled:x,...u},g){const p=i.useId(),f=m??p,h=s?`${f}-desc`:void 0,b=e.jsx(St.Root,{ref:g,id:f,disabled:x,"aria-describedby":h,className:l("peer inline-flex shrink-0 items-center rounded-full border-2 border-transparent","transition-colors duration-[var(--duration-base)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-accent data-[state=unchecked]:bg-neutral-300 dark:data-[state=unchecked]:bg-neutral-700",_a[o]),...u,children:e.jsx(St.Thumb,{className:l("pointer-events-none block rounded-full bg-white shadow-sm","transition-transform duration-[var(--duration-base)] ease-[var(--ease-out)]","translate-x-0",Aa[o])})}),j=r&&e.jsxs("div",{className:l("flex flex-col gap-0.5 select-none",c&&"sr-only"),children:[e.jsx("label",{htmlFor:f,className:l("text-sm text-foreground",x&&"opacity-50 cursor-not-allowed"),children:r}),s&&e.jsx("p",{id:h,className:"text-xs text-foreground-subtle",children:s})]});return e.jsxs("div",{className:l("inline-flex items-center gap-2.5",t),children:[n==="before"&&j,b,n==="after"&&j]})});ue.displayName="Switch";const Wr=ze.Root,Fa=X.cva("inline-flex items-center",{variants:{variant:{underline:"gap-4 border-b border-border w-full",pills:"gap-1 rounded-lg bg-background-muted p-1"},size:{sm:"h-9 text-xs",md:"h-10 text-sm",lg:"h-11 text-sm"}},defaultVariants:{variant:"underline",size:"md"}}),jt=i.forwardRef(function({className:t,variant:r="underline",size:s,...n},o){return e.jsx(ze.List,{ref:o,"data-variant":r,className:l(Fa({variant:r,size:s}),t),...n})});jt.displayName="TabsList";const Nt=i.forwardRef(function({className:t,...r},s){return e.jsx(ze.Trigger,{ref:s,className:l("inline-flex items-center gap-2 whitespace-nowrap font-medium","outline-none transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[[data-variant=underline]_&]:relative [[data-variant=underline]_&]:h-full","[[data-variant=underline]_&]:px-1 [[data-variant=underline]_&]:text-foreground-muted","[[data-variant=underline]_&]:hover:text-foreground","[[data-variant=underline]_&]:data-[state=active]:text-foreground","[[data-variant=underline]_&]:data-[state=active]:after:absolute","[[data-variant=underline]_&]:data-[state=active]:after:inset-x-0","[[data-variant=underline]_&]:data-[state=active]:after:-bottom-px","[[data-variant=underline]_&]:data-[state=active]:after:h-0.5","[[data-variant=underline]_&]:data-[state=active]:after:bg-accent","[[data-variant=pills]_&]:h-full [[data-variant=pills]_&]:rounded-md [[data-variant=pills]_&]:px-3","[[data-variant=pills]_&]:text-foreground-muted","[[data-variant=pills]_&]:hover:text-foreground","[[data-variant=pills]_&]:data-[state=active]:bg-card","[[data-variant=pills]_&]:data-[state=active]:text-foreground","[[data-variant=pills]_&]:data-[state=active]:shadow-xs",t),...r})});Nt.displayName="TabsTrigger";const wt=i.forwardRef(function({className:t,...r},s){return e.jsx(ze.Content,{ref:s,className:l("mt-4 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",t),...r})});wt.displayName="TabsContent";const Xr=i.forwardRef(function({className:t,label:r,helperText:s,error:n,autoResize:o,minRows:c=3,maxRows:m=12,hideLabel:x,id:u,onChange:g,value:p,defaultValue:f,...h},b){const j=i.useId(),v=u??j,S=`${v}-helper`,_=`${v}-error`,D=i.useRef(null),k=w=>{D.current=w,typeof b=="function"?b(w):b&&(b.current=w)},N=i.useCallback(()=>{const w=D.current;if(!w||!o)return;w.style.height="auto";const K=(parseFloat(getComputedStyle(w).lineHeight)||20)*m;w.style.height=`${Math.min(w.scrollHeight,K)}px`,w.style.overflowY=w.scrollHeight>K?"auto":"hidden"},[o,m]);return i.useEffect(()=>{o&&N()},[o,N,p,f]),e.jsxs("div",{className:l("flex flex-col gap-1.5",t),children:[r&&e.jsx("label",{htmlFor:v,className:l("text-sm font-medium text-foreground",x&&"sr-only"),children:r}),e.jsx("textarea",{ref:k,id:v,rows:c,value:p,defaultValue:f,onChange:w=>{g==null||g(w),o&&N()},"aria-invalid":!!n||void 0,"aria-describedby":n?_:s?S:void 0,className:l("rounded-md border bg-card px-3 py-2 text-sm text-foreground","placeholder:text-foreground-subtle","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",n?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent",o?"resize-none":"resize-y min-h-20"),...h}),n?e.jsx("p",{id:_,role:"alert",className:"text-xs text-danger-text",children:n}):s?e.jsx("p",{id:S,className:"text-xs text-foreground-subtle",children:s}):null]})});Xr.displayName="Textarea";const La=de.Provider,Kr=i.forwardRef(function({className:t,...r},s){return e.jsx(de.Viewport,{ref:s,className:l("fixed bottom-0 right-0 z-[var(--z-toast)] flex max-h-screen w-full flex-col-reverse gap-2 p-6","sm:bottom-auto sm:top-4 sm:right-4 sm:max-w-sm sm:flex-col",t),...r})});Kr.displayName="ToastViewport";const Ea=X.cva(["group pointer-events-auto relative flex w-full items-start gap-3","overflow-hidden rounded-lg border p-4 pr-8 shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-right-full","data-[state=closed]:slide-out-to-right-full","data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)]","data-[swipe=cancel]:translate-x-0 data-[swipe=cancel]:transition-transform","data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)]"],{variants:{variant:{default:"border-border bg-card text-card-foreground",success:"border-success-border-soft bg-success-soft text-success-text",warning:"border-warning-border-soft bg-warning-soft text-warning-text",danger:"border-danger-border-soft bg-danger-soft text-danger-text",info:"border-info-border-soft bg-info-soft text-info-text"}},defaultVariants:{variant:"default"}}),Ba={default:null,success:e.jsx(d.CheckCircle2,{className:"size-5 text-success-text shrink-0 mt-0.5","aria-hidden":!0}),warning:e.jsx(d.AlertTriangle,{className:"size-5 text-warning-text shrink-0 mt-0.5","aria-hidden":!0}),danger:e.jsx(d.XCircle,{className:"size-5 text-danger-text shrink-0 mt-0.5","aria-hidden":!0}),info:e.jsx(d.Info,{className:"size-5 text-info-text shrink-0 mt-0.5","aria-hidden":!0})},Qr=i.forwardRef(function({className:t,variant:r="default",children:s,...n},o){return e.jsxs(de.Root,{ref:o,className:l(Ea({variant:r}),t),...n,children:[Ba[r??"default"],e.jsx("div",{className:"flex-1 space-y-1",children:s})]})});Qr.displayName="Toast";const Yr=i.forwardRef(function({className:t,...r},s){return e.jsx(de.Title,{ref:s,className:l("text-sm font-medium",t),...r})});Yr.displayName="ToastTitle";const Jr=i.forwardRef(function({className:t,...r},s){return e.jsx(de.Description,{ref:s,className:l("text-sm opacity-90",t),...r})});Jr.displayName="ToastDescription";const Zr=i.forwardRef(function({className:t,...r},s){return e.jsx(de.Action,{ref:s,className:l("inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-current bg-transparent px-3 text-sm font-medium","transition-colors hover:bg-current/10 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card",t),...r})});Zr.displayName="ToastAction";const es=i.forwardRef(function({className:t,...r},s){return e.jsx(de.Close,{ref:s,"aria-label":"Close",className:l("absolute right-2 top-2 inline-flex size-7 items-center justify-center rounded-md text-foreground-subtle","opacity-0 transition-opacity group-hover:opacity-100 hover:text-foreground","outline-none focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-ring",t),"toast-close":"",...r,children:e.jsx(d.X,{className:"size-4","aria-hidden":!0})})});es.displayName="ToastClose";const Oa=({delayDuration:a=500,skipDelayDuration:t=200,...r})=>e.jsx(je.Provider,{delayDuration:a,skipDelayDuration:t,...r}),ts=je.Root,rs=je.Trigger,yt=i.forwardRef(function({className:t,sideOffset:r=4,...s},n){return e.jsx(je.Portal,{children:e.jsx(je.Content,{ref:n,sideOffset:r,className:l("z-[var(--z-tooltip)] overflow-hidden rounded-md px-2 py-1 text-xs font-medium","bg-neutral-900 text-neutral-50","dark:bg-neutral-50 dark:text-neutral-900","shadow-sm max-w-xs","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",t),...s})})});yt.displayName="TooltipContent";function ss({children:a,label:t,side:r="top",align:s="center",disabled:n,delayDuration:o}){return n?e.jsx(e.Fragment,{children:a}):e.jsxs(ts,{delayDuration:o,children:[e.jsx(rs,{asChild:!0,children:a}),e.jsx(yt,{side:r,align:s,children:t})]})}ss.displayName="Tooltip";const as=i.forwardRef(function({logo:t,nav:r,search:s,actions:n,className:o,...c},m){return e.jsxs("header",{ref:m,className:l("sticky top-0 z-[var(--z-sticky)] flex h-14 w-full items-center gap-4","border-b border-border bg-background/80 px-4 backdrop-blur","supports-[backdrop-filter]:bg-background/60",o),...c,children:[e.jsxs("div",{className:"flex items-center gap-6 shrink-0",children:[t,r&&e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:r})]}),s&&e.jsx("div",{className:"flex-1 max-w-md mx-auto",children:s}),n&&e.jsx("div",{className:"ml-auto flex items-center gap-2 shrink-0",children:n})]})});as.displayName="TopNav";const ns=i.forwardRef(function({href:t,active:r,className:s,children:n,...o},c){return e.jsx("a",{ref:c,href:t,"aria-current":r?"page":void 0,className:l("inline-flex h-9 items-center rounded-md px-3 text-sm font-medium outline-none","transition-colors duration-[var(--duration-fast)]",r?"text-foreground":"text-foreground-muted hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",s),...o,children:n})});ns.displayName="TopNavLink";const os=i.createContext(null);function Ge(){const a=i.useContext(os);if(!a)throw new Error("Carousel components must be used inside <Carousel>");return a}const $a=i.forwardRef(function({opts:t,orientation:r="horizontal",setApi:s,className:n,children:o,...c},m){const[x,u]=_s({...t,axis:r==="horizontal"?"x":"y"}),[g,p]=i.useState(!1),[f,h]=i.useState(!1),b=i.useCallback(j=>{j&&(p(j.canScrollPrev()),h(j.canScrollNext()))},[]);return i.useEffect(()=>{if(u)return s==null||s(u),b(u),u.on("reInit",b).on("select",b),()=>{u.off("reInit",b).off("select",b)}},[u,b,s]),e.jsx(os.Provider,{value:{carouselRef:x,api:u,canPrev:g,canNext:f,scrollPrev:()=>u==null?void 0:u.scrollPrev(),scrollNext:()=>u==null?void 0:u.scrollNext(),orientation:r},children:e.jsx("div",{ref:m,className:l("relative",n),role:"region","aria-roledescription":"carousel",...c,children:o})})}),Ua=i.forwardRef(function({className:t,...r},s){const{carouselRef:n,orientation:o}=Ge();return e.jsx("div",{ref:n,className:"overflow-hidden",children:e.jsx("div",{ref:s,className:l("flex",o==="horizontal"?"-ml-4":"-mt-4 flex-col",t),...r})})}),Ha=i.forwardRef(function({className:t,...r},s){const{orientation:n}=Ge();return e.jsx("div",{ref:s,role:"group","aria-roledescription":"slide",className:l("min-w-0 shrink-0 grow-0 basis-full",n==="horizontal"?"pl-4":"pt-4",t),...r})});function Ga({className:a}){const{canPrev:t,scrollPrev:r,orientation:s}=Ge();return e.jsx(xe,{"aria-label":"Previous",variant:"outline",disabled:!t,onClick:r,icon:e.jsx(d.ChevronLeft,{}),className:l("absolute z-10",s==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",a)})}function Va({className:a}){const{canNext:t,scrollNext:r,orientation:s}=Ge();return e.jsx(xe,{"aria-label":"Next",variant:"outline",disabled:!t,onClick:r,icon:e.jsx(d.ChevronRight,{}),className:l("absolute z-10",s==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",a)})}function is(a,t,r,s=8){const n=a.map(f=>f.y),o=Math.min(0,...n),c=Math.max(...n,1),m=c-o||1,x=t-s*2,u=r-s*2;return{sx:f=>a.length<=1?s+x/2:s+f/(a.length-1)*x,sy:f=>s+u-(f-o)/m*u,min:o,max:c}}function qa({data:a,height:t=80,width:r="100%",caption:s,className:n}){const o=typeof r=="number"?r:320,{sx:c,sy:m}=is(a,o,t),x=a.map((u,g)=>`${g===0?"M":"L"}${c(g).toFixed(1)},${m(u.y).toFixed(1)}`).join(" ");return e.jsxs("figure",{className:l("flex flex-col gap-1.5",n),children:[s&&e.jsx("figcaption",{className:"text-xs text-foreground-muted",children:s}),e.jsxs("svg",{viewBox:`0 0 ${o} ${t}`,width:r,height:t,role:"img",children:[e.jsx("path",{d:x,fill:"none",stroke:"var(--color-accent)",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round"}),a.map((u,g)=>e.jsx("circle",{cx:c(g),cy:m(u.y),r:2,fill:"var(--color-accent)"},g))]})]})}function Wa({data:a,height:t=80,width:r="100%",caption:s,className:n}){const o=typeof r=="number"?r:320,{sx:c,sy:m}=is(a,o,t),x=a.map((g,p)=>`${p===0?"M":"L"}${c(p).toFixed(1)},${m(g.y).toFixed(1)}`).join(" "),u=`${x} L${c(a.length-1).toFixed(1)},${t} L${c(0).toFixed(1)},${t} Z`;return e.jsxs("figure",{className:l("flex flex-col gap-1.5",n),children:[s&&e.jsx("figcaption",{className:"text-xs text-foreground-muted",children:s}),e.jsxs("svg",{viewBox:`0 0 ${o} ${t}`,width:r,height:t,role:"img",children:[e.jsx("path",{d:u,fill:"var(--color-accent-soft)"}),e.jsx("path",{d:x,fill:"none",stroke:"var(--color-accent)",strokeWidth:1.5})]})]})}function Xa({data:a,height:t=100,width:r="100%",caption:s,className:n}){const o=typeof r=="number"?r:320,c=8,m=2,x=o-c*2,u=Math.max(2,x/a.length-m),g=a.map(f=>f.y),p=Math.max(...g,1);return e.jsxs("figure",{className:l("flex flex-col gap-1.5",n),children:[s&&e.jsx("figcaption",{className:"text-xs text-foreground-muted",children:s}),e.jsx("svg",{viewBox:`0 0 ${o} ${t}`,width:r,height:t,role:"img",children:a.map((f,h)=>{const b=f.y/p*(t-c*2);return e.jsx("rect",{x:c+h*(u+m),y:t-c-b,width:u,height:b,fill:"var(--color-accent)",rx:1.5,children:e.jsx("title",{children:`${f.x}: ${f.y}`})},h)})})]})}const ls=({shouldScaleBackground:a=!0,...t})=>e.jsx(oe.Drawer.Root,{shouldScaleBackground:a,...t});ls.displayName="Drawer";const Ka=oe.Drawer.Trigger,ds=oe.Drawer.Portal,Qa=oe.Drawer.Close,cs=i.forwardRef(function({className:t,...r},s){return e.jsx(oe.Drawer.Overlay,{ref:s,className:l("fixed inset-0 z-50 bg-black/40",t),...r})}),Ya={bottom:"inset-x-0 bottom-0 mt-24 flex h-auto max-h-[90vh] flex-col rounded-t-xl border-t border-border",top:"inset-x-0 top-0 mb-24 flex h-auto max-h-[90vh] flex-col rounded-b-xl border-b border-border",left:"inset-y-0 left-0 flex h-full w-[420px] max-w-[90vw] flex-col rounded-r-xl border-r border-border",right:"inset-y-0 right-0 flex h-full w-[420px] max-w-[90vw] flex-col rounded-l-xl border-l border-border"},Ja={bottom:"mx-auto mt-3 h-1.5 w-12 rounded-full bg-border",top:"mx-auto mb-3 h-1.5 w-12 rounded-full bg-border order-last",left:"mx-1.5 my-auto h-12 w-1.5 rounded-full bg-border order-last self-stretch shrink-0",right:"mx-1.5 my-auto h-12 w-1.5 rounded-full bg-border shrink-0 self-stretch"},Za=i.forwardRef(function({className:t,direction:r="bottom",hideHandle:s,children:n,...o},c){const m=r==="left"||r==="right";return e.jsxs(ds,{children:[e.jsx(cs,{}),e.jsxs(oe.Drawer.Content,{ref:c,className:l("fixed z-50 bg-card",Ya[r],m&&"flex-row",t),...o,children:[!s&&e.jsx("div",{"aria-hidden":!0,className:Ja[r]}),e.jsx("div",{className:l("min-h-0 min-w-0 flex-1",m&&"flex flex-col"),children:n})]})]})});function en({className:a,...t}){return e.jsx("div",{className:l("grid gap-1 p-4 text-center sm:text-left",a),...t})}function tn({className:a,...t}){return e.jsx("div",{className:l("mt-auto flex flex-col gap-2 p-4",a),...t})}const rn=i.forwardRef(function({className:t,...r},s){return e.jsx(oe.Drawer.Title,{ref:s,className:l("text-lg font-semibold",t),...r})}),sn=i.forwardRef(function({className:t,...r},s){return e.jsx(oe.Drawer.Description,{ref:s,className:l("text-sm text-foreground-muted",t),...r})});function an(a){return a<1024?`${a} B`:a<1024*1024?`${(a/1024).toFixed(1)} KB`:`${(a/1024/1024).toFixed(1)} MB`}const nn=i.forwardRef(function({accept:t,multiple:r,maxSize:s,value:n,onChange:o,hint:c,disabled:m,className:x},u){const g=i.useRef(null),p=i.useId(),[f,h]=i.useState([]),[b,j]=i.useState(!1),v=n??f,S=i.useCallback(N=>{n===void 0&&h(N),o==null||o(N)},[o,n]),_=i.useCallback(N=>{const w=Array.from(N).filter(F=>!s||F.size<=s);S(r?[...v,...w]:w.slice(0,1))},[v,s,r,S]),D=N=>S(v.filter((w,F)=>F!==N)),k=N=>{N.preventDefault(),j(!1),!m&&_(N.dataTransfer.files)};return e.jsxs("div",{ref:u,className:l("flex flex-col gap-3",x),children:[e.jsxs("label",{htmlFor:p,onDragOver:N=>{N.preventDefault(),m||j(!0)},onDragLeave:()=>j(!1),onDrop:k,className:l("group relative flex cursor-pointer flex-col items-center justify-center gap-2","rounded-md border border-dashed border-border bg-background-subtle px-6 py-8","text-center transition-colors","hover:border-border-strong hover:bg-background-muted",b&&"border-accent bg-accent-soft",m&&"pointer-events-none opacity-50"),children:[e.jsx(d.Upload,{className:"size-5 text-foreground-muted","aria-hidden":!0}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"Drop files here, or click to browse"}),c&&e.jsx("p",{className:"text-xs text-foreground-muted",children:c})]}),e.jsx("input",{ref:g,id:p,type:"file",accept:t,multiple:r,disabled:m,className:"sr-only",onChange:N=>N.target.files&&_(N.target.files)})]}),v.length>0&&e.jsx("ul",{className:"flex flex-col gap-2",children:v.map((N,w)=>e.jsxs("li",{className:"flex items-center gap-3 rounded-md border border-border bg-card px-3 py-2",children:[e.jsx(d.File,{className:"size-4 shrink-0 text-foreground-muted","aria-hidden":!0}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-sm",children:N.name}),e.jsx("p",{className:"text-xs text-foreground-muted",children:an(N.size)})]}),e.jsx("button",{type:"button",onClick:()=>D(w),className:"rounded p-1 text-foreground-muted hover:bg-background-muted hover:text-foreground","aria-label":`Remove ${N.name}`,children:e.jsx(d.X,{className:"size-4"})})]},`${N.name}-${w}`))})]})}),on=X.cva(["relative pointer-events-auto w-full max-w-md","flex items-start gap-3 rounded-md border bg-card p-3 shadow-md","text-sm text-foreground"],{variants:{variant:{default:"border-border",info:"border-info-border-soft",success:"border-success-border-soft",warning:"border-warning-border-soft",danger:"border-danger-border-soft"}},defaultVariants:{variant:"default"}}),ln={default:null,info:e.jsx(d.Info,{className:"size-4 shrink-0 mt-0.5 text-info-text","aria-hidden":!0}),success:e.jsx(d.CheckCircle2,{className:"size-4 shrink-0 mt-0.5 text-success-text","aria-hidden":!0}),warning:e.jsx(d.AlertTriangle,{className:"size-4 shrink-0 mt-0.5 text-warning-text","aria-hidden":!0}),danger:e.jsx(d.XCircle,{className:"size-4 shrink-0 mt-0.5 text-danger-text","aria-hidden":!0})},dn=i.forwardRef(function({className:t,variant:r="default",title:s,action:n,onClose:o,icon:c,children:m,...x},u){const g=c===!1?null:c??ln[r??"default"];return e.jsxs("div",{ref:u,role:"status",className:l(on({variant:r}),t),...x,children:[g,e.jsxs("div",{className:"min-w-0 flex-1",children:[s&&e.jsx("p",{className:"font-medium",children:s}),m&&e.jsx("p",{className:"text-foreground-muted",children:m})]}),n,o&&e.jsx("button",{type:"button",onClick:o,"aria-label":"Dismiss",className:"rounded p-1 text-foreground-muted hover:bg-background-muted hover:text-foreground",children:e.jsx(d.X,{className:"size-4"})})]})}),cn=i.forwardRef(function({value:t,defaultValue:r=[],onChange:s,placeholder:n="Add and press Enter",max:o,disabled:c,error:m,separators:x=["Enter",","],className:u},g){const[p,f]=i.useState(r),[h,b]=i.useState(""),j=t??p,v=i.useCallback(k=>{t===void 0&&f(k),s==null||s(k)},[s,t]),S=k=>{const N=k.trim();!N||j.includes(N)||o!==void 0&&j.length>=o||v([...j,N])},_=k=>v(j.filter((N,w)=>w!==k)),D=k=>{x.includes(k.key)?(k.preventDefault(),S(h),b("")):k.key==="Backspace"&&!h&&j.length&&_(j.length-1)};return e.jsxs("div",{ref:g,className:l("flex min-h-9 w-full flex-wrap items-center gap-1.5 rounded-md border bg-card px-2 py-1.5","transition-colors focus-within:border-ring focus-within:ring-2 focus-within:ring-ring",m?"border-danger focus-within:border-danger focus-within:ring-danger":"border-border",c&&"pointer-events-none opacity-50",u),children:[j.map((k,N)=>e.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-background-muted px-2 py-0.5 text-xs",children:[k,e.jsx("button",{type:"button",onClick:()=>_(N),className:"rounded p-0.5 text-foreground-muted hover:bg-background-subtle hover:text-foreground","aria-label":`Remove ${k}`,children:e.jsx(d.X,{className:"size-3"})})]},`${k}-${N}`)),e.jsx("input",{value:h,disabled:c,onChange:k=>b(k.target.value),onKeyDown:D,onBlur:()=>{h&&(S(h),b(""))},placeholder:j.length===0?n:void 0,className:"min-w-[8ch] flex-1 bg-transparent text-sm outline-none placeholder:text-foreground-subtle"})]})}),un=i.forwardRef(function({className:t,children:r,...s},n){return e.jsx("ol",{ref:n,className:l("relative flex flex-col gap-6",t),...s,children:r})}),mn=i.forwardRef(function({bullet:t,isLast:r,className:s,children:n,...o},c){return e.jsxs("li",{ref:c,className:l("relative flex gap-4 pb-1",s),...o,children:[e.jsxs("div",{className:"relative flex shrink-0 flex-col items-center",children:[e.jsx("div",{className:"flex size-6 items-center justify-center rounded-full border border-border bg-card text-foreground-muted",children:t??e.jsx("span",{className:"size-2 rounded-full bg-accent","aria-hidden":!0})}),!r&&e.jsx("span",{className:"mt-1 flex-1 w-px bg-border","aria-hidden":!0})]}),e.jsx("div",{className:"min-w-0 flex-1 pb-4",children:n})]})});function xn({className:a,children:t}){return e.jsx("p",{className:l("text-xs text-foreground-subtle",a),children:t})}function fn({className:a,children:t}){return e.jsx("p",{className:l("text-sm font-medium",a),children:t})}function gn({className:a,children:t}){return e.jsx("p",{className:l("mt-0.5 text-sm text-foreground-muted",a),children:t})}function hn({data:a,defaultExpanded:t=[],selectedId:r,onSelect:s,className:n}){const[o,c]=i.useState(new Set(t)),m=u=>c(g=>{const p=new Set(g);return p.has(u)?p.delete(u):p.add(u),p});function x(u,g){const p=!!u.children,f=o.has(u.id),h=r===u.id,b=p?f?d.FolderOpen:d.Folder:d.File;return e.jsxs("li",{role:"treeitem","aria-expanded":p?f:void 0,children:[e.jsxs("button",{type:"button",tabIndex:0,onClick:()=>{s==null||s(u.id),p&&m(u.id)},onKeyDown:j=>{(j.key==="ArrowRight"&&p&&!f||j.key==="ArrowLeft"&&p&&f)&&m(u.id)},style:{paddingLeft:g*16+8},className:l("flex w-full items-center gap-1.5 rounded-md py-1 pr-2 text-left text-sm","hover:bg-background-muted focus-visible:bg-background-muted outline-none",h&&"bg-accent-soft text-foreground"),children:[p?e.jsx(d.ChevronRight,{className:l("size-3.5 shrink-0 text-foreground-subtle transition-transform",f&&"rotate-90"),"aria-hidden":!0}):e.jsx("span",{className:"w-3.5 shrink-0","aria-hidden":!0}),u.icon??e.jsx(b,{className:"size-4 shrink-0 text-foreground-muted","aria-hidden":!0}),e.jsx("span",{className:"truncate",children:u.label})]}),p&&f&&e.jsx("ul",{role:"group",className:"mt-0.5",children:u.children.map(j=>x(j,g+1))})]},u.id)}return e.jsx("ul",{role:"tree",className:l("flex flex-col gap-0.5",n),children:a.map(u=>x(u,0))})}function pn({brand:a,title:t,subtitle:r,children:s,footer:n}){return e.jsx("main",{className:"grid min-h-screen place-items-center bg-background-subtle px-4 py-12",children:e.jsxs("div",{className:"w-full max-w-[400px] space-y-6",children:[a&&e.jsx("div",{className:"flex justify-center",children:a}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:t}),r&&e.jsx("p",{className:"text-sm text-foreground-muted",children:r})]}),e.jsx("div",{className:"rounded-lg border border-border bg-card p-6",children:s}),n&&e.jsx("p",{className:"text-center text-sm text-foreground-muted",children:n})]})})}function bn({onSubmit:a,loading:t,error:r,forgotHref:s="/forgot"}){const[n,o]=i.useState(""),[c,m]=i.useState(""),x=u=>{u.preventDefault(),a({email:n,password:c})};return e.jsxs("form",{onSubmit:x,className:"space-y-4",children:[r&&e.jsx(we,{variant:"danger",children:r}),e.jsx(P,{type:"email",label:"Email",value:n,onChange:u=>o(u.target.value),autoComplete:"email",required:!0}),e.jsx(P,{type:"password",label:"Password",value:c,onChange:u=>m(u.target.value),autoComplete:"current-password",required:!0}),e.jsx("div",{className:"flex items-center justify-between text-sm",children:e.jsx("a",{href:s,className:"font-medium text-accent hover:underline outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm",children:"Forgot password?"})}),e.jsx(T,{type:"submit",loading:t,className:"w-full",trailingIcon:e.jsx(d.ArrowRight,{}),children:"Sign in"})]})}function vn({onSubmit:a,loading:t,error:r}){const[s,n]=i.useState(""),[o,c]=i.useState(""),[m,x]=i.useState("");return e.jsxs("form",{onSubmit:u=>{u.preventDefault(),a({name:s,email:o,password:m})},className:"space-y-4",children:[r&&e.jsx(we,{variant:"danger",children:r}),e.jsx(P,{label:"Full name",value:s,onChange:u=>n(u.target.value),required:!0}),e.jsx(P,{type:"email",label:"Work email",value:o,onChange:u=>c(u.target.value),autoComplete:"email",required:!0}),e.jsx(P,{type:"password",label:"Password",helperText:"At least 8 characters.",value:m,onChange:u=>x(u.target.value),autoComplete:"new-password",required:!0}),e.jsx(T,{type:"submit",loading:t,className:"w-full",children:"Create account"}),e.jsx("p",{className:"text-xs text-foreground-subtle text-center",children:"By signing up you agree to our Terms of Service and Privacy Policy."})]})}function jn({onSubmit:a,loading:t,error:r}){const[s,n]=i.useState("");return e.jsxs("form",{onSubmit:o=>{o.preventDefault(),a(s)},className:"space-y-4",children:[r&&e.jsx(we,{variant:"danger",children:r}),e.jsx(P,{type:"email",label:"Email",helperText:"We'll send a reset link if an account exists.",value:s,onChange:o=>n(o.target.value),autoComplete:"email",required:!0}),e.jsx(T,{type:"submit",loading:t,className:"w-full",leadingIcon:e.jsx(d.Mail,{}),children:"Send reset link"})]})}function Nn({email:a,onResend:t}){return e.jsxs("div",{className:"space-y-4 text-center",children:[e.jsx("div",{className:"mx-auto inline-flex size-12 items-center justify-center rounded-full bg-success-soft text-success-text",children:e.jsx(d.CheckCircle2,{className:"size-6","aria-hidden":!0})}),e.jsxs("p",{className:"text-sm text-foreground-muted",children:["We sent a sign-in link to"," ",e.jsx("span",{className:"font-medium text-foreground",children:a}),". Open it on this device to continue."]}),e.jsx(le,{}),e.jsxs("p",{className:"text-xs text-foreground-subtle",children:["Didn't get it?"," ",e.jsx("button",{type:"button",onClick:t,className:"font-medium text-accent hover:underline outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm",children:"Resend"})]})]})}function ge(a){typeof window>"u"||(window.location.hash=a)}const wn=[{label:"Workspace",items:[{key:"home",label:"Home",icon:e.jsx(d.Home,{}),href:"#dashboard"},{key:"projects",label:"Projects",icon:e.jsx(d.Folder,{}),href:"#data-table",trailing:e.jsx(V,{tone:"neutral",children:"12"})},{key:"inbox",label:"Inbox",icon:e.jsx(d.Inbox,{}),href:"#first-run",trailing:e.jsx(V,{tone:"accent",children:"5"})},{key:"members",label:"Members",icon:e.jsx(d.Users,{}),href:"#record",trailing:e.jsx(V,{tone:"neutral",children:"3"})},{key:"insights",label:"Insights",icon:e.jsx(d.BarChart3,{}),href:"#dashboard"}]},{label:"Personal",items:[{key:"bookmarks",label:"Bookmarks",icon:e.jsx(d.Bookmark,{}),href:"#pricing"},{key:"apps",label:"Apps",icon:e.jsx(d.LayoutGrid,{}),href:"#onboarding"}]},{label:"Account",items:[{key:"settings",label:"Settings",icon:e.jsx(d.Settings,{}),href:"#settings"},{key:"integrations",label:"Integrations",icon:e.jsx(d.Plug,{}),href:"#settings"},{key:"help",label:"Help & docs",icon:e.jsx(d.HelpCircle,{}),href:"#"}]}],yn={name:"Bay Otgonbayar",email:"bay@craftzbay.com",initials:"BO",status:"online"},Cn=[{id:"n1",who:{name:"Anu B.",initials:"AB"},action:"mentioned you in",target:"Q2 OKRs",when:"2m",unread:!0},{id:"n2",who:{name:"Bat E.",initials:"BE"},action:"requested review on",target:"fix/login-flow",when:"18m",unread:!0},{id:"n3",who:{name:"Tuya G.",initials:"TG"},action:"commented on",target:"feat/segments",when:"1h",unread:!0},{id:"n4",who:{name:"Khulan O.",initials:"KO"},action:"archived",target:"old-billing-spike",when:"3h"},{id:"n5",who:{name:"Sara M.",initials:"SM"},action:"invited you to",target:"Atlas workspace",when:"Yesterday"}],kn=[{label:"Profile",icon:e.jsx(d.User,{className:"size-4"}),onSelect:()=>ge("record")},{label:"Account settings",icon:e.jsx(d.Settings,{className:"size-4"}),onSelect:()=>ge("settings")},{label:"Upgrade plan",icon:e.jsx(d.Sparkles,{className:"size-4"}),trailing:e.jsx(V,{tone:"accent",className:"ml-auto",children:"Pro"}),onSelect:()=>ge("pricing")},{label:"Help & support",icon:e.jsx(d.HelpCircle,{className:"size-4"}),onSelect:()=>ge("first-run"),separatorAbove:!0},{label:"Sign out",icon:e.jsx(d.LogOut,{className:"size-4"}),onSelect:()=>ge("auth-signin"),separatorAbove:!0}];function Sn({children:a,brand:t,active:r="home",navSections:s=wn,sidebar:n,topbarActions:o,search:c,user:m=yn,profileMenu:x=kn,notifications:u=Cn,onMarkAllNotificationsRead:g,onViewAllNotifications:p}){return e.jsxs("div",{className:"flex min-h-screen w-full bg-background",children:[e.jsx(ht,{defaultCollapsed:!1,header:t,footer:e.jsx(ms,{user:m}),children:n??e.jsx(us,{sections:s,active:r})}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[e.jsx(Tn,{brand:t,active:r,navSections:s,sidebar:n,user:m,search:c,topbarActions:o,notifications:u,profileMenu:x,onMarkAllNotificationsRead:g,onViewAllNotifications:p}),e.jsx("main",{className:"flex-1 overflow-y-auto p-4 md:p-8",children:a})]})]})}function us({sections:a,active:t}){return e.jsx(e.Fragment,{children:a.map((r,s)=>e.jsx(pt,{label:r.label,children:r.items.map(n=>e.jsx(bt,{href:n.href,icon:n.icon,active:n.key===t,trailing:n.trailing,onClick:n.onClick,children:n.label},n.key))},s))})}function Tn({brand:a,active:t,navSections:r,sidebar:s,user:n,search:o,topbarActions:c,notifications:m,profileMenu:x,onMarkAllNotificationsRead:u,onViewAllNotifications:g}){const[p,f]=i.useState(!1),h=o===!1?null:o??e.jsx(P,{type:"search",placeholder:"Search projects, members, files…",hideLabel:!0,label:"Search",prefix:e.jsx(d.Search,{}),suffix:e.jsx(it,{children:"⌘K"})});return e.jsxs("header",{className:"sticky top-0 z-30 flex h-14 items-center gap-3 border-b border-border bg-background/80 px-4 backdrop-blur md:px-6",children:[e.jsxs("div",{className:"flex items-center gap-2 md:hidden",children:[e.jsxs(Fr,{open:p,onOpenChange:f,children:[e.jsx(Lr,{asChild:!0,children:e.jsx(xe,{"aria-label":"Open menu",icon:e.jsx(d.Menu,{}),variant:"ghost",size:"sm"})}),e.jsxs(gt,{side:"left",className:"w-64 p-0",children:[e.jsx("div",{className:"flex h-14 shrink-0 items-center border-b border-border px-3",children:a}),e.jsx("div",{className:"flex-1 overflow-y-auto py-3",onClick:()=>f(!1),children:s??e.jsx(us,{sections:r,active:t})}),e.jsx("div",{className:"border-t border-border p-2",children:e.jsx(ms,{user:n})})]})]}),e.jsx("div",{className:"text-sm",children:a})]}),h&&e.jsx("div",{className:"relative hidden max-w-xl flex-1 sm:block",children:h}),e.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[c,m.length>0&&e.jsx(Dn,{notifications:m,onMarkAllRead:u,onViewAll:g}),e.jsx(Rn,{user:n,items:x})]})]})}function Dn({notifications:a,onMarkAllRead:t,onViewAll:r}){const s=a.filter(n=>n.unread).length;return e.jsxs(Pe,{children:[e.jsx(_e,{asChild:!0,children:e.jsxs("button",{type:"button","aria-label":`Notifications${s?`, ${s} unread`:""}`,className:"relative inline-flex size-9 items-center justify-center rounded-md text-foreground-muted outline-none transition-colors hover:bg-background-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:[e.jsx(d.Bell,{className:"size-4"}),s>0&&e.jsx("span",{"aria-hidden":!0,className:"absolute right-2 top-2 inline-flex h-2 w-2 rounded-full bg-accent ring-2 ring-background"})]})}),e.jsxs(ye,{align:"end",className:"w-80 p-0",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-border px-3 py-2.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:"Notifications"}),s>0&&e.jsxs(V,{tone:"accent",children:[s," new"]})]}),t&&e.jsx("button",{type:"button",onClick:t,className:"text-xs text-foreground-muted hover:text-foreground",children:"Mark all read"})]}),e.jsx("ul",{className:"max-h-80 overflow-y-auto py-1",children:a.map(n=>e.jsx("li",{children:e.jsxs("button",{type:"button",onClick:n.onClick,className:"flex w-full items-start gap-3 px-3 py-2.5 text-left outline-none hover:bg-background-muted focus-visible:bg-background-muted",children:[e.jsxs("div",{className:"relative mt-0.5",children:[e.jsx(Y,{size:"sm",fallback:n.who.initials}),n.unread&&e.jsx("span",{"aria-hidden":!0,className:"absolute -right-0.5 -top-0.5 inline-flex h-2 w-2 rounded-full bg-accent ring-2 ring-background"})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("p",{className:"text-sm leading-snug",children:[e.jsx("span",{className:"font-medium text-foreground",children:n.who.name})," ",e.jsx("span",{className:"text-foreground-muted",children:n.action})," ",e.jsx("span",{className:"font-medium text-foreground",children:n.target})]}),e.jsx("p",{className:"mt-0.5 text-xs text-foreground-subtle",children:n.when})]})]})},n.id))}),r&&e.jsx("div",{className:"border-t border-border px-3 py-2 text-center",children:e.jsx("button",{type:"button",onClick:r,className:"text-xs font-medium text-accent hover:underline",children:"View all notifications"})})]})]})}function Rn({user:a,items:t}){return e.jsxs(Pe,{children:[e.jsx(_e,{asChild:!0,children:e.jsx("button",{type:"button","aria-label":"Open profile menu",className:"flex items-center gap-2 rounded-full p-0.5 outline-none hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:e.jsx(Y,{size:"sm",fallback:a.initials,status:a.status})})}),e.jsxs(ye,{align:"end",className:"w-60",children:[e.jsx(Fe,{children:e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:"text-sm font-medium text-foreground",children:a.name}),a.email&&e.jsx("span",{className:"text-xs text-foreground-subtle",children:a.email})]})}),e.jsx(Ne,{}),t.map((r,s)=>e.jsxs(i.Fragment,{children:[r.separatorAbove&&e.jsx(Ne,{}),e.jsxs(Qe,{onSelect:r.onSelect,children:[r.icon,r.label,r.trailing]})]},s))]})]})}function ms({user:a}){return e.jsxs("div",{className:"flex items-center gap-2.5 rounded-md px-2 py-1.5",children:[e.jsx(Y,{fallback:a.initials,size:"sm",status:a.status}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:a.name}),a.email&&e.jsx("p",{className:"truncate text-xs text-foreground-subtle",children:a.email})]})]})}const Mn=[{label:"Active users",value:"2,840",delta:{value:"+12%",positive:!0}},{label:"Sessions today",value:"8,402",delta:{value:"+4%",positive:!0}},{label:"Open issues",value:"14",delta:{value:"−6%",positive:!0}},{label:"Error rate",value:"0.32%",delta:{value:"+0.05%",positive:!1}}],zn=[{id:"1",who:{name:"Anu B.",initials:"AB"},action:"merged",target:"feat/segments",when:"12m ago"},{id:"2",who:{name:"Bat E.",initials:"BE"},action:"opened",target:"fix/login-flow",when:"34m ago"},{id:"3",who:{name:"Tuya G.",initials:"TG"},action:"commented on",target:"Q2 OKRs",when:"1h ago"},{id:"4",who:{name:"Khulan O.",initials:"KO"},action:"archived",target:"old-billing-spike",when:"3h ago"}];function In({title:a="Overview",subtitle:t="What's happening across your workspace today.",headerActions:r=e.jsx(V,{tone:"neutral",variant:"outline",children:"Last 7 days"}),stats:s=Mn,chart:n,chartTitle:o="Active users",chartDescription:c="Distinct sessions per day, last 30 days.",activity:m=zn,activityTitle:x="Recent activity"}={}){return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("header",{className:"flex items-end justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:a}),t&&e.jsx("p",{className:"mt-1 text-sm text-foreground-muted",children:t})]}),r&&e.jsx("div",{className:"hidden items-center gap-2 md:flex",children:r})]}),s.length>0&&e.jsx("section",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",children:s.map((u,g)=>e.jsxs(U,{children:[e.jsx(H,{className:"pb-2",children:e.jsx(te,{children:u.label})}),e.jsx(G,{children:e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"tabular text-2xl font-semibold text-foreground",children:u.value}),u.delta&&e.jsx("span",{className:u.delta.positive?"tabular text-xs font-medium text-success-text":"tabular text-xs font-medium text-danger-text",children:u.delta.value})]})})]},g))}),(n!==void 0||o)&&e.jsxs(U,{children:[e.jsxs(H,{children:[o&&e.jsx(W,{children:o}),c&&e.jsx(te,{children:c})]}),e.jsx(G,{children:n??e.jsx("div",{role:"img","aria-label":"Chart placeholder",className:"h-48 w-full rounded-md border border-dashed border-border bg-background-subtle"})})]}),m.length>0&&e.jsxs(U,{padding:"none",children:[e.jsx(H,{className:"px-5 pt-5",children:e.jsx(W,{children:x})}),e.jsxs(Le,{children:[e.jsx(Ee,{children:e.jsxs(ae,{children:[e.jsx(ne,{children:"Who"}),e.jsx(ne,{children:"Action"}),e.jsx(ne,{children:"Target"}),e.jsx(ne,{className:"text-right",children:"When"})]})}),e.jsx(Be,{children:m.map(u=>e.jsxs(ae,{children:[e.jsx(re,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Y,{size:"xs",fallback:u.who.initials}),e.jsx("span",{className:"text-foreground",children:u.who.name})]})}),e.jsx(re,{className:"text-foreground-muted",children:u.action}),e.jsx(re,{children:e.jsx(V,{tone:"neutral",variant:"outline",children:u.target})}),e.jsx(re,{className:"tabular text-right text-foreground-subtle",children:u.when})]},u.id))})]})]})]})}const Pn=[{id:"profile",label:"Profile",icon:e.jsx(d.User,{}),render:()=>e.jsxs(U,{children:[e.jsxs(H,{children:[e.jsx(W,{children:"Profile"}),e.jsx(te,{children:"Visible to your teammates."})]}),e.jsxs(G,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(Y,{size:"xl",fallback:"BO"}),e.jsxs("div",{children:[e.jsx(T,{variant:"outline",size:"sm",children:"Change photo"}),e.jsx("p",{className:"mt-2 text-xs text-foreground-subtle",children:"JPG or PNG, max 2 MB."})]})]}),e.jsx(le,{}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(P,{label:"First name",defaultValue:"Bay"}),e.jsx(P,{label:"Last name",defaultValue:"Otgonbayar"})]}),e.jsx(P,{label:"Display email",type:"email",defaultValue:"bay@company.com"}),e.jsx("div",{className:"flex justify-end",children:e.jsx(T,{children:"Save changes"})})]})]})},{id:"security",label:"Security",icon:e.jsx(d.Lock,{}),render:()=>e.jsxs(U,{children:[e.jsxs(H,{children:[e.jsx(W,{children:"Security"}),e.jsx(te,{children:"How you sign in and protect your account."})]}),e.jsxs(G,{className:"space-y-4",children:[e.jsx(P,{label:"Current password",type:"password"}),e.jsx(P,{label:"New password",type:"password",helperText:"At least 8 characters."}),e.jsx(le,{}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Two-factor authentication"}),e.jsx("p",{className:"text-xs text-foreground-subtle",children:"Required for admin accounts on production."})]}),e.jsx(ue,{defaultChecked:!0})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(T,{children:"Update password"})})]})]})},{id:"notifications",label:"Notifications",icon:e.jsx(d.Bell,{}),render:()=>e.jsxs(U,{children:[e.jsxs(H,{children:[e.jsx(W,{children:"Notifications"}),e.jsx(te,{children:"Choose what we email and ping you about."})]}),e.jsxs(G,{className:"space-y-4",children:[e.jsx(ue,{label:"Product updates",description:"A short note when we ship something.",defaultChecked:!0}),e.jsx(le,{}),e.jsx(ue,{label:"Mentions",description:"When a teammate @ mentions you in a comment.",defaultChecked:!0}),e.jsx(le,{}),e.jsx(ue,{label:"Weekly digest",description:"A Monday-morning summary of last week's activity."})]})]})},{id:"billing",label:"Billing",icon:e.jsx(d.CreditCard,{}),render:()=>e.jsxs(U,{children:[e.jsxs(H,{children:[e.jsx(W,{children:"Billing"}),e.jsx(te,{children:"Your plan, invoices, and payment method."})]}),e.jsxs(G,{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-md border border-border bg-background-subtle p-4",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Team — $20/user/month"}),e.jsx("p",{className:"mt-1 text-xs text-foreground-subtle",children:"Renews on 1 June 2026 · 12 seats"})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(T,{variant:"outline",children:"Manage seats"}),e.jsx(T,{children:"Upgrade plan"})]})]})]})},{id:"team",label:"Team",icon:e.jsx(d.Users,{}),render:()=>e.jsxs(U,{children:[e.jsxs(H,{children:[e.jsx(W,{children:"Team"}),e.jsx(te,{children:"Invite teammates and manage roles."})]}),e.jsxs(G,{className:"space-y-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(P,{type:"email",placeholder:"teammate@company.com",hideLabel:!0,label:"Invite email",className:"flex-1"}),e.jsx(T,{children:"Send invite"})]}),e.jsx("p",{className:"text-xs text-foreground-subtle",children:"Invited members will receive a sign-up link by email."})]})]})}];function _n({title:a="Settings",subtitle:t="Manage your account, preferences, and billing.",sections:r=Pn,defaultSection:s,activeSection:n,onActiveSectionChange:o,className:c}={}){var f;const m=n!==void 0,[x,u]=i.useState(s??((f=r[0])==null?void 0:f.id)??""),g=m?n:x,p=h=>{m||u(h),o==null||o(h)};return e.jsxs("div",{className:l("mx-auto max-w-5xl space-y-8",c),children:[(a||t)&&e.jsxs("header",{children:[a&&e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:a}),t&&e.jsx("p",{className:"mt-1 text-sm text-foreground-muted",children:t})]}),e.jsxs("div",{className:"grid gap-8 md:grid-cols-[200px_1fr]",children:[e.jsx("nav",{"aria-label":"Settings sections",className:"md:sticky md:top-20 md:self-start",children:e.jsx("ul",{className:"flex flex-col gap-px",children:r.map(h=>e.jsx("li",{children:e.jsxs("button",{type:"button",onClick:()=>p(h.id),className:l("flex h-9 w-full items-center gap-2 rounded-md px-2 text-left text-sm transition-colors duration-[var(--duration-fast)] outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",g===h.id?"bg-background-muted font-medium text-foreground":"text-foreground-muted hover:bg-background-muted hover:text-foreground"),"aria-current":g===h.id?"page":void 0,children:[h.icon&&e.jsx("span",{className:"[&_svg]:size-4",children:h.icon}),h.label]})},h.id))})}),e.jsx("div",{className:"space-y-8",children:r.map(h=>e.jsx("section",{id:h.id,hidden:g!==h.id,children:h.render()},h.id))})]})]})}const An=[{id:"p1",name:"Pulse onboarding",status:"active",owner:"Anu B.",updatedAt:"2 hours ago"},{id:"p2",name:"Q2 OKRs rollout",status:"active",owner:"Bat E.",updatedAt:"Yesterday"},{id:"p3",name:"Legacy export",status:"paused",owner:"Tuya G.",updatedAt:"3 days ago"},{id:"p4",name:"Billing spike",status:"archived",owner:"Khulan O.",updatedAt:"Last week"},{id:"p5",name:"Marketing refresh",status:"active",owner:"Anu B.",updatedAt:"Last week"}],Dt={active:{tone:"success",label:"Active"},paused:{tone:"warning",label:"Paused"},archived:{tone:"neutral",label:"Archived"}},Fn=[{key:"name",header:"Name",sortable:!0,cell:a=>e.jsx("span",{className:"font-medium text-foreground",children:a.name})},{key:"status",header:"Status",cell:a=>e.jsx(V,{tone:Dt[a.status].tone,dot:!0,children:Dt[a.status].label})},{key:"owner",header:"Owner"},{key:"updatedAt",header:"Updated",align:"right"}],Ln=[{key:"status",label:"Status",options:[{value:"all",label:"All statuses"},{value:"active",label:"Active"},{value:"paused",label:"Paused"},{value:"archived",label:"Archived"}]}],En=e.jsxs(e.Fragment,{children:[e.jsx(T,{variant:"outline",leadingIcon:e.jsx(d.Upload,{}),children:"Import"}),e.jsx(T,{leadingIcon:e.jsx(d.Plus,{}),children:"New project"})]}),Bn=[{label:"Export",icon:e.jsx(d.Download,{}),variant:"ghost",onAction:()=>{}},{label:"Delete",icon:e.jsx(d.Trash2,{}),variant:"ghost",onAction:()=>{}}];function On({title:a="Projects",subtitle:t,headerActions:r=En,rows:s,columns:n,filters:o,predicate:c,searchPlaceholder:m="Search…",pageSizeOptions:x=[10,20,50],defaultPageSize:u=10,bulkActions:g,emptyState:p,className:f}={}){const h=s??An,b=n??Fn,j=o??Ln,v=g??Bn,[S,_]=i.useState(""),[D,k]=i.useState(()=>{var M;const C={};for(const J of j)C[J.key]=J.defaultValue??((M=J.options[0])==null?void 0:M.value)??"";return C}),[N,w]=i.useState([]),[F,K]=i.useState(1),[Q,se]=i.useState(u),z=i.useMemo(()=>{const C=M=>{const J=S.toLowerCase();if(J&&!Object.values(M).some(ce=>typeof ce=="string"&&ce.toLowerCase().includes(J)))return!1;for(const[Se,ce]of Object.entries(D))if(!(!ce||ce==="all")&&M[Se]!==ce)return!1;return!0};return h.filter(M=>c?c(M,D,S):C(M))},[h,S,D,c]),q=z.length>0&&z.every(C=>N.includes(C.id)),Z=N.length>0&&!q,y=i.useMemo(()=>h.filter(C=>N.includes(C.id)),[h,N]),ee=Math.max(1,Math.ceil(z.length/Q)),fe=z.slice((F-1)*Q,F*Q),L=[{key:"__select",header:e.jsx(pe,{checked:q?!0:Z?"indeterminate":!1,onCheckedChange:C=>w(C?z.map(M=>M.id):[]),"aria-label":"Select all rows"}),width:"32px",cell:C=>e.jsx(pe,{checked:N.includes(C.id),onCheckedChange:M=>w(J=>M?[...J,C.id]:J.filter(Se=>Se!==C.id)),"aria-label":"Select row"})},...b];return e.jsxs("div",{className:`space-y-6 ${f??""}`,children:[e.jsxs("header",{className:"flex items-end justify-between gap-4",children:[e.jsxs("div",{children:[a&&e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:a}),e.jsx("p",{className:"mt-1 text-sm text-foreground-muted",children:t??`${z.length} item${z.length===1?"":"s"} match your filters.`})]}),r&&e.jsx("div",{className:"flex items-center gap-2",children:r})]}),(j.length>0||v.length>0)&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[j.map(C=>e.jsxs(lt,{value:D[C.key],onValueChange:M=>k(J=>({...J,[C.key]:M})),children:[e.jsx($e,{className:"w-40",placeholder:C.label}),e.jsx(Ue,{children:C.options.map(M=>e.jsx(He,{value:M.value,children:M.label},M.value))})]},C.key)),e.jsx(T,{variant:"outline",size:"sm",leadingIcon:e.jsx(d.Filter,{}),children:"More filters"})]}),N.length>0&&v.length>0&&e.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border bg-background-subtle px-4 py-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(pe,{checked:q?!0:Z?"indeterminate":!1,onCheckedChange:C=>w(C?z.map(M=>M.id):[]),"aria-label":"Select all"}),e.jsxs("span",{className:"text-sm text-foreground",children:[N.length," selected"]})]}),e.jsx("div",{className:"flex items-center gap-2",children:v.map(C=>e.jsx(T,{variant:C.variant??"ghost",size:"sm",leadingIcon:C.icon,onClick:()=>C.onAction(y),children:C.label},C.label))})]}),e.jsx(mr,{rows:fe,filter:{value:S,onChange:_,placeholder:m},emptyState:p??e.jsx(Oe,{title:"No results",description:"Try adjusting filters or your search.",className:"border-0 bg-transparent"}),columns:L}),e.jsx(mt,{page:F,pageCount:ee,onPageChange:K,totalItems:z.length,pageSize:Q,pageSizeOptions:x,onPageSizeChange:C=>{se(C),K(1)}})]})}const $n={title:"Pulse onboarding",subtitle:"Self-serve onboarding flow for new admins. Owns the first 5 minutes of every workspace.",status:e.jsx(V,{tone:"success",dot:!0,children:"Active"}),actions:e.jsxs(e.Fragment,{children:[e.jsx(T,{variant:"outline",leadingIcon:e.jsx(d.Edit2,{}),children:"Edit"}),e.jsx(T,{variant:"outline",leadingIcon:e.jsx(d.Trash2,{}),children:"Archive"}),e.jsx(T,{trailingIcon:e.jsx(d.ExternalLink,{}),children:"Open in app"})]}),breadcrumbs:[{label:"Projects",href:"/projects"},{label:"Pulse onboarding"}]},Un=[{id:"overview",label:"Overview",render:()=>e.jsxs(U,{children:[e.jsx(H,{children:e.jsx(W,{children:"Summary"})}),e.jsxs(G,{className:"space-y-2 leading-relaxed text-foreground-muted",children:[e.jsx("p",{children:"The Pulse onboarding flow walks new admins through workspace creation, teammate invites, and first-data import in under five minutes."}),e.jsx("p",{children:"Completion rate sits at 71% (week-over-week +4 pts) and median time to finish is 4 m 22 s."})]})]})},{id:"activity",label:"Activity",render:()=>e.jsx(qe,{children:"Activity feed appears here."})},{id:"files",label:"Files",render:()=>e.jsx(qe,{children:"Linked documents appear here."})},{id:"settings",label:"Settings",render:()=>e.jsx(qe,{children:"Project settings appear here."})}],Hn=e.jsxs(e.Fragment,{children:[e.jsxs(U,{children:[e.jsx(H,{children:e.jsx(W,{children:"Details"})}),e.jsxs(G,{className:"space-y-3 text-sm",children:[e.jsx(Re,{label:"Owner",value:e.jsxs(e.Fragment,{children:[e.jsx(Y,{size:"xs",fallback:"AB"})," Anu B."]})}),e.jsx(Re,{label:"Created",value:"12 Feb 2026"}),e.jsx(Re,{label:"Updated",value:"2 hours ago"}),e.jsx(Re,{label:"Tags",value:e.jsxs(e.Fragment,{children:[e.jsx(V,{tone:"accent",children:"growth"})," ",e.jsx(V,{tone:"neutral",variant:"outline",children:"v2"})]})})]})]}),e.jsxs(U,{children:[e.jsx(H,{children:e.jsx(W,{children:"Watchers"})}),e.jsx(G,{children:e.jsxs("div",{className:"flex -space-x-2",children:[e.jsx(Y,{fallback:"AB"}),e.jsx(Y,{fallback:"BE"}),e.jsx(Y,{fallback:"TG"}),e.jsx(Y,{fallback:"+2"})]})})]})]});function Gn({header:a=$n,tabs:t=Un,defaultTab:r,sidePanel:s=Hn,className:n}={}){var c;const o=r??((c=t[0])==null?void 0:c.id)??"";return e.jsxs("div",{className:`space-y-6 ${n??""}`,children:[a.breadcrumbs&&a.breadcrumbs.length>0&&e.jsx(Ke,{items:a.breadcrumbs}),e.jsxs("header",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:a.title}),a.status]}),a.subtitle&&e.jsx("p",{className:"max-w-2xl text-sm text-foreground-muted",children:a.subtitle})]}),a.actions&&e.jsx("div",{className:"flex items-center gap-2",children:a.actions})]}),e.jsxs("div",{className:s?"grid gap-6 lg:grid-cols-[1fr_320px]":"min-w-0",children:[e.jsx("div",{className:"min-w-0",children:e.jsxs(Wr,{defaultValue:o,children:[e.jsx(jt,{children:t.map(m=>e.jsx(Nt,{value:m.id,children:m.label},m.id))}),t.map(m=>e.jsx(wt,{value:m.id,className:"space-y-4",children:m.render()},m.id))]})}),s&&e.jsx("aside",{className:"space-y-4",children:s})]})]})}function Re({label:a,value:t}){return e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"text-foreground-subtle",children:a}),e.jsx("span",{className:"flex items-center gap-1.5 text-foreground",children:t})]})}function qe({children:a}){return e.jsx("p",{className:"text-sm text-foreground-muted",children:a})}const Vn=[{id:"workspace",title:"Workspace",heading:"Create your workspace",subheading:"A workspace is where your team and projects live.",render:({data:a,setData:t})=>e.jsxs(e.Fragment,{children:[e.jsx(P,{label:"Workspace name",placeholder:"Acme Inc.",value:a.workspaceName??"",onChange:r=>t({workspaceName:r.target.value})}),e.jsx(P,{label:"URL slug",prefix:e.jsx("span",{children:"acme.app/"}),placeholder:"acme",value:a.slug??"",onChange:r=>t({slug:r.target.value})})]})},{id:"invite",title:"Invite team",heading:"Invite your team",subheading:"You can always invite more people later.",render:({data:a,setData:t})=>e.jsxs(e.Fragment,{children:[e.jsx(P,{type:"email",label:"Invite by email",placeholder:"teammate@company.com",helperText:"Separate multiple emails with commas.",value:a.inviteEmail??"",onChange:r=>t({inviteEmail:r.target.value})}),e.jsxs(xt,{value:a.role??"member",onValueChange:r=>t({role:r}),children:[e.jsx(be,{value:"admin",label:"Admin",description:"Can manage workspace and billing."}),e.jsx(be,{value:"member",label:"Member",description:"Can create and edit projects."}),e.jsx(be,{value:"viewer",label:"Viewer",description:"Read-only access."})]})]})},{id:"data",title:"Connect data",heading:"Connect a data source",subheading:"Pick one — others can be added in settings.",render:({data:a,setData:t})=>e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm text-foreground-muted",children:"Connect your data source so we can populate your first dashboard."}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:["Postgres","BigQuery","Snowflake","CSV upload"].map(r=>{const s=a.source===r;return e.jsxs("button",{type:"button",onClick:()=>t({source:r}),"aria-pressed":s,className:`rounded-lg border bg-card p-4 text-left transition-colors duration-[var(--duration-fast)] outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background ${s?"border-accent bg-accent-soft":"border-border hover:border-border-strong hover:bg-background-subtle"}`,children:[e.jsx("p",{className:"font-medium text-foreground",children:r}),e.jsx("p",{className:"mt-1 text-xs text-foreground-subtle",children:"Quick setup with SSO"})]},r)})})]})},{id:"done",title:"Done",heading:"Welcome aboard",subheading:"We've set up your starting dashboard.",ctaLabel:"Open workspace",render:()=>e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6 text-center",children:[e.jsx(d.CheckCircle2,{className:"size-10 text-success-text","aria-hidden":!0}),e.jsx("p",{className:"text-base font-medium text-foreground",children:"You're all set."}),e.jsx("p",{className:"max-w-sm text-sm text-foreground-muted",children:"Your workspace is ready. We've sent invites and your first dashboard is loading."})]})}];function qn({steps:a=Vn,initialData:t={},onComplete:r,className:s}={}){const[n,o]=i.useState(0),[c,m]=i.useState(t),x=v=>m(S=>({...S,...v})),u=v=>o(Math.max(0,Math.min(v,a.length-1))),g=()=>u(n+1),p=()=>u(n-1),f=async()=>{r&&await r(c)},h={next:g,prev:p,goTo:u,finish:f,data:c,setData:x},b=a[n],j=n===a.length-1;return e.jsxs("div",{className:`mx-auto max-w-2xl space-y-8 py-12 ${s??""}`,children:[e.jsx(vt,{steps:a.map(v=>({title:v.title,description:v.description})),current:n}),e.jsxs(U,{children:[e.jsxs(H,{children:[e.jsx(W,{children:b.heading}),b.subheading&&e.jsx(te,{children:b.subheading})]}),e.jsx(G,{className:"space-y-4",children:b.render(h)})]}),!b.hideNavigation&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{variant:"ghost",leadingIcon:e.jsx(d.ArrowLeft,{}),onClick:p,disabled:n===0,children:"Back"}),e.jsx(T,{trailingIcon:j?void 0:e.jsx(d.ArrowRight,{}),onClick:j?f:g,children:b.ctaLabel??(j?"Finish":"Continue")})]})]})}const Wn=[{name:"Starter",price:"$0",cadence:"forever",description:"For individuals exploring the product.",features:["Up to 3 projects","Community support","Single workspace"],cta:"Start free"},{name:"Team",price:"$20",cadence:"per user / month",description:"For small teams running real workloads.",features:["Unlimited projects","Email support, 24h response","SSO via Google & Microsoft","Audit log (30 days)"],cta:"Start 14-day trial",highlighted:!0},{name:"Enterprise",price:"Custom",cadence:"annual",description:"For organisations with custom requirements.",features:["Everything in Team","SAML SSO + SCIM","Dedicated CSM","SOC 2 report + DPA","Audit log (unlimited)"],cta:"Talk to sales"}];function Xn({title:a="Plans that scale with your team",subtitle:t="Start free, upgrade when you need more. All paid plans include a 14-day trial — no credit card required.",tiers:r=Wn,highlightedLabel:s="Most popular",className:n}={}){const o=r.length;return e.jsxs("div",{className:l("mx-auto max-w-5xl space-y-8 py-16",n),children:[e.jsxs("header",{className:"space-y-3 text-center",children:[e.jsx("h1",{className:"text-3xl font-semibold tracking-tight text-foreground",children:a}),t&&e.jsx("p",{className:"mx-auto max-w-xl text-sm text-foreground-muted",children:t})]}),e.jsx("div",{className:l("grid gap-4",o===2&&"md:grid-cols-2",o===3&&"md:grid-cols-3",o===4&&"md:grid-cols-2 lg:grid-cols-4",o>4&&"md:grid-cols-3"),children:r.map(c=>e.jsxs("div",{className:l("flex flex-col gap-6 rounded-lg border bg-card p-6",c.highlighted?"border-accent shadow-sm":"border-border"),children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:c.name}),c.highlighted&&e.jsx(V,{tone:"accent",children:s})]}),c.description&&e.jsx("p",{className:"text-sm text-foreground-muted",children:c.description})]}),e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"tabular text-3xl font-semibold text-foreground",children:c.price}),c.cadence&&e.jsx("span",{className:"text-sm text-foreground-subtle",children:c.cadence})]}),e.jsx("ul",{className:"space-y-2 text-sm",children:c.features.map(m=>e.jsxs("li",{className:"flex items-start gap-2 text-foreground",children:[e.jsx(d.Check,{className:"mt-0.5 size-4 shrink-0 text-accent","aria-hidden":!0}),m]},m))}),e.jsx(T,{variant:c.highlighted?"primary":"outline",className:"mt-auto w-full",onClick:c.onSelect,children:c.cta})]},c.name))})]})}const Kn=[{icon:e.jsx(d.Plus,{}),title:"Create a project",description:"Track a real piece of work end-to-end.",cta:"New project"},{icon:e.jsx(d.Upload,{}),title:"Import existing data",description:"CSV, Postgres, BigQuery, or Snowflake — connect in a minute.",cta:"Connect source"},{icon:e.jsx(d.Users,{}),title:"Invite your team",description:"Workspaces are better with teammates. We'll send the invites.",cta:"Invite people"}];function Qn({heroIcon:a=e.jsx(d.Folder,{className:"size-6"}),title:t="Your workspace is ready",description:r="Start with one of the steps below — you can always come back to the others.",primaryAction:s=e.jsx(T,{trailingIcon:e.jsx(d.ArrowRight,{}),children:"Open tutorial"}),steps:n=Kn,className:o}={}){return e.jsxs("div",{className:`mx-auto max-w-3xl space-y-8 py-12 ${o??""}`,children:[e.jsx(Oe,{icon:a,title:t,description:r,action:s}),n.length>0&&e.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:n.map(c=>e.jsx(U,{variant:"interactive",children:e.jsxs(G,{className:"space-y-3",children:[c.icon&&e.jsx("div",{className:"inline-flex size-9 items-center justify-center rounded-md bg-accent-soft text-on-accent-soft [&_svg]:size-4",children:c.icon}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h3",{className:"text-sm font-semibold text-foreground",children:c.title}),e.jsx("p",{className:"text-xs text-foreground-muted leading-relaxed",children:c.description})]}),e.jsx(T,{variant:"ghost",size:"sm",trailingIcon:e.jsx(d.ArrowRight,{}),onClick:c.onSelect,children:c.cta})]})},c.title))})]})}Object.defineProperty(exports,"cva",{enumerable:!0,get:()=>X.cva});exports.Accordion=Vs;exports.AccordionContent=Lt;exports.AccordionItem=At;exports.AccordionTrigger=Ft;exports.Alert=we;exports.AppShell=Sn;exports.AreaChart=Wa;exports.AuthLayout=pn;exports.Avatar=Y;exports.AvatarGroup=Bt;exports.Badge=V;exports.BarChart=Xa;exports.Breadcrumbs=Ke;exports.Button=T;exports.Calendar=et;exports.Card=U;exports.CardContent=G;exports.CardDescription=te;exports.CardFooter=Ot;exports.CardHeader=H;exports.CardTitle=W;exports.Carousel=$a;exports.CarouselContent=Ua;exports.CarouselItem=Ha;exports.CarouselNext=Va;exports.CarouselPrevious=Ga;exports.Checkbox=pe;exports.Combobox=$t;exports.Command=Ut;exports.CommandDialog=ta;exports.CommandEmpty=Vt;exports.CommandGroup=qt;exports.CommandInput=Ht;exports.CommandItem=Xt;exports.CommandList=Gt;exports.CommandSeparator=Wt;exports.CommandShortcut=ea;exports.ConfirmationDialog=vr;exports.ContextMenu=sa;exports.ContextMenuCheckboxItem=er;exports.ContextMenuContent=Jt;exports.ContextMenuGroup=na;exports.ContextMenuItem=Zt;exports.ContextMenuLabel=rr;exports.ContextMenuPortal=Kt;exports.ContextMenuRadioGroup=ia;exports.ContextMenuRadioItem=tr;exports.ContextMenuSeparator=sr;exports.ContextMenuShortcut=ar;exports.ContextMenuSub=oa;exports.ContextMenuSubContent=Yt;exports.ContextMenuSubTrigger=Qt;exports.ContextMenuTrigger=aa;exports.Dashboard=In;exports.DataGrid=mr;exports.DataTablePage=On;exports.DatePicker=fr;exports.DateRangePicker=gr;exports.DesignSystemProvider=fa;exports.Dialog=hr;exports.DialogClose=br;exports.DialogContent=rt;exports.DialogDescription=ot;exports.DialogFooter=at;exports.DialogHeader=st;exports.DialogOverlay=tt;exports.DialogPortal=pr;exports.DialogTitle=nt;exports.DialogTrigger=ha;exports.Drawer=ls;exports.DrawerClose=Qa;exports.DrawerContent=Za;exports.DrawerDescription=sn;exports.DrawerFooter=tn;exports.DrawerHeader=en;exports.DrawerOverlay=cs;exports.DrawerPortal=ds;exports.DrawerTitle=rn;exports.DrawerTrigger=Ka;exports.DropdownMenu=Pe;exports.DropdownMenuCheckboxItem=Ye;exports.DropdownMenuContent=ye;exports.DropdownMenuGroup=la;exports.DropdownMenuItem=Qe;exports.DropdownMenuLabel=Fe;exports.DropdownMenuPortal=nr;exports.DropdownMenuRadioGroup=ca;exports.DropdownMenuRadioItem=lr;exports.DropdownMenuSeparator=Ne;exports.DropdownMenuShortcut=dr;exports.DropdownMenuSub=da;exports.DropdownMenuSubContent=ir;exports.DropdownMenuSubTrigger=or;exports.DropdownMenuTrigger=_e;exports.EmptyState=Oe;exports.ErrorState=jr;exports.FileUpload=nn;exports.FirstRunEmpty=Qn;exports.ForgotPasswordForm=jn;exports.Form=ba;exports.FormControl=kr;exports.FormDescription=Sr;exports.FormError=Tr;exports.FormField=va;exports.FormItem=yr;exports.FormLabel=Cr;exports.IconButton=xe;exports.Icons=$s;exports.Illustrations=Gs;exports.Input=P;exports.Kbd=it;exports.LineChart=qa;exports.MagicLinkSent=Nn;exports.MultiSelect=Dr;exports.Onboarding=qn;exports.Pagination=mt;exports.Popover=wa;exports.PopoverAnchor=Ca;exports.PopoverClose=ka;exports.PopoverContent=Ir;exports.PopoverTrigger=ya;exports.Pricing=Xn;exports.Progress=Pr;exports.ProgressCircle=_r;exports.RadioGroup=xt;exports.RadioItem=be;exports.RecordDetail=Gn;exports.ScrollArea=Ar;exports.ScrollBar=ft;exports.Select=lt;exports.SelectContent=Ue;exports.SelectGroup=zr;exports.SelectItem=He;exports.SelectLabel=ut;exports.SelectScrollDownButton=ct;exports.SelectScrollUpButton=dt;exports.SelectSeparator=Mr;exports.SelectTrigger=$e;exports.SelectValue=ja;exports.Separator=le;exports.SettingsPage=_n;exports.Sheet=Fr;exports.SheetClose=Ra;exports.SheetContent=gt;exports.SheetDescription=Hr;exports.SheetFooter=$r;exports.SheetHeader=Or;exports.SheetPortal=Er;exports.SheetTitle=Ur;exports.SheetTrigger=Lr;exports.Sidebar=ht;exports.SidebarGroup=Gr;exports.SidebarItem=bt;exports.SidebarSection=pt;exports.SignInForm=bn;exports.SignUpForm=vn;exports.Skeleton=Ze;exports.Slider=Vr;exports.Snackbar=dn;exports.Spinner=qr;exports.Stepper=vt;exports.Switch=ue;exports.Table=Le;exports.TableBody=Be;exports.TableCaption=ur;exports.TableCell=re;exports.TableFooter=cr;exports.TableHead=ne;exports.TableHeader=Ee;exports.TableRow=ae;exports.TableSortHeader=Je;exports.Tabs=Wr;exports.TabsContent=wt;exports.TabsList=jt;exports.TabsTrigger=Nt;exports.TagInput=cn;exports.Textarea=Xr;exports.Timeline=un;exports.TimelineDescription=gn;exports.TimelineItem=mn;exports.TimelineTime=xn;exports.TimelineTitle=fn;exports.Toast=Qr;exports.ToastAction=Zr;exports.ToastClose=es;exports.ToastDescription=Jr;exports.ToastProvider=La;exports.ToastTitle=Yr;exports.ToastViewport=Kr;exports.Tooltip=ss;exports.TooltipContent=yt;exports.TooltipProvider=Oa;exports.TooltipRoot=ts;exports.TooltipTrigger=rs;exports.TopNav=as;exports.TopNavLink=ns;exports.Tree=hn;exports.brandPresets=ga;exports.cn=l;exports.toast=Os;exports.uid=Ls;exports.useCommandPaletteShortcut=ra;exports.useFormField=Ce;exports.useMediaQuery=Mt;exports.usePrefersReducedMotion=Es;exports.useSidebar=za;exports.useToast=Bs;
7
+ `})]})});Pr.displayName="Progress";const Ra={accent:"stroke-accent",success:"stroke-success",warning:"stroke-warning",danger:"stroke-danger"},_r=i.forwardRef(function({value:t,size:r=36,thickness:s=3,className:n,tone:o="accent",...c},m){const x=t===void 0,u=(r-s)/2,g=2*Math.PI*u,p=x?0:g-Math.min(100,Math.max(0,t))/100*g;return e.jsxs("svg",{ref:m,width:r,height:r,viewBox:`0 0 ${r} ${r}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":x?void 0:t,className:l("shrink-0",x&&"animate-spin",n),...c,children:[e.jsx("circle",{cx:r/2,cy:r/2,r:u,strokeWidth:s,className:"stroke-background-muted fill-none"}),e.jsx("circle",{cx:r/2,cy:r/2,r:u,strokeWidth:s,strokeLinecap:"round",strokeDasharray:g,strokeDashoffset:x?g*.7:p,className:l(Ra[o],"fill-none transition-[stroke-dashoffset]"),transform:`rotate(-90 ${r/2} ${r/2})`})]})});_r.displayName="ProgressCircle";const xt=i.forwardRef(function({className:t,orientation:r="vertical",...s},n){return e.jsx(We.Root,{ref:n,className:l("flex gap-3",r==="vertical"?"flex-col":"flex-row flex-wrap",t),...s})});xt.displayName="RadioGroup";const be=i.forwardRef(function({className:t,label:r,description:s,hideLabel:n,id:o,disabled:c,...m},x){const u=i.useId(),g=o??u,p=s?`${g}-desc`:void 0;return e.jsxs("div",{className:l("flex items-start gap-2.5",t),children:[e.jsx(We.Item,{ref:x,id:g,disabled:c,"aria-describedby":p,className:l("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border bg-card","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","data-[state=checked]:border-accent","disabled:cursor-not-allowed disabled:opacity-50","border-border-strong"),...m,children:e.jsx(We.Indicator,{className:"flex items-center justify-center",children:e.jsx("span",{className:"size-2 rounded-full bg-accent","aria-hidden":!0})})}),r&&e.jsxs("div",{className:l("flex flex-col gap-0.5",n&&"sr-only"),children:[e.jsx("label",{htmlFor:g,className:l("text-sm text-foreground select-none",c&&"opacity-50 cursor-not-allowed"),children:r}),s&&e.jsx("p",{id:p,className:"text-xs text-foreground-subtle",children:s})]})]})});be.displayName="RadioItem";const Ar=i.forwardRef(function({className:t,children:r,...s},n){return e.jsxs(he.Root,{ref:n,className:l("relative overflow-hidden",t),...s,children:[e.jsx(he.Viewport,{className:"h-full w-full rounded-[inherit]",children:r}),e.jsx(ft,{}),e.jsx(he.Corner,{})]})});Ar.displayName="ScrollArea";const ft=i.forwardRef(function({className:t,orientation:r="vertical",...s},n){return e.jsx(he.ScrollAreaScrollbar,{ref:n,orientation:r,className:l("flex touch-none select-none transition-colors duration-[var(--duration-fast)]",r==="vertical"&&"h-full w-2 border-l border-l-transparent p-px",r==="horizontal"&&"h-2 flex-col border-t border-t-transparent p-px",t),...s,children:e.jsx(he.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border-strong"})})});ft.displayName="ScrollBar";const le=i.forwardRef(function({className:t,orientation:r="horizontal",decorative:s=!0,...n},o){return e.jsx(Ls.Root,{ref:o,orientation:r,decorative:s,className:l("shrink-0 bg-border",r==="horizontal"?"h-px w-full":"h-full w-px",t),...n})});le.displayName="Separator";const Fr=R.Root,Lr=R.Trigger,Ma=R.Close,Er=R.Portal,Br=i.forwardRef(function({className:t,...r},s){return e.jsx(R.Overlay,{ref:s,className:l("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",t),...r})});Br.displayName="SheetOverlay";const za=X.cva(["fixed z-[var(--z-modal)] bg-card text-card-foreground shadow-lg","flex flex-col gap-4 p-6","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:duration-[var(--duration-base)] data-[state=open]:duration-[var(--duration-slow)]"],{variants:{side:{top:"inset-x-0 top-0 border-b border-border data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top",bottom:"inset-x-0 bottom-0 border-t border-border data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom",left:"inset-y-0 left-0 h-full w-3/4 max-w-md border-r border-border data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left",right:"inset-y-0 right-0 h-full w-3/4 max-w-md border-l border-border data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right"}},defaultVariants:{side:"right"}}),gt=i.forwardRef(function({className:t,children:r,side:s="right",showClose:n=!0,...o},c){return e.jsxs(Er,{children:[e.jsx(Br,{}),e.jsxs(R.Content,{ref:c,className:l(za({side:s}),t),...o,children:[r,n&&e.jsx(R.Close,{"aria-label":"Close",className:l("absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-foreground-subtle","hover:bg-background-muted hover:text-foreground","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","transition-colors duration-[var(--duration-fast)]"),children:e.jsx(d.X,{className:"size-4","aria-hidden":!0})})]})]})});gt.displayName="SheetContent";function Or({className:a,...t}){return e.jsx("div",{className:l("flex flex-col gap-1",a),...t})}Or.displayName="SheetHeader";function $r({className:a,...t}){return e.jsx("div",{className:l("mt-auto flex flex-col-reverse gap-2 pt-4 sm:flex-row sm:justify-end",a),...t})}$r.displayName="SheetFooter";const Ur=i.forwardRef(function({className:t,...r},s){return e.jsx(R.Title,{ref:s,className:l("text-lg font-semibold text-foreground leading-tight",t),...r})});Ur.displayName="SheetTitle";const Hr=i.forwardRef(function({className:t,...r},s){return e.jsx(R.Description,{ref:s,className:l("text-sm text-foreground-muted",t),...r})});Hr.displayName="SheetDescription";const ke=i.createContext({collapsed:!1});function Ia(){return i.useContext(ke)}const ht=i.forwardRef(function({defaultCollapsed:t=!1,collapsed:r,onCollapsedChange:s,header:n,footer:o,className:c,children:m,...x},u){const[g,p]=i.useState(t),f=r??g,h=b=>{r===void 0&&p(b),s==null||s(b)};return e.jsx(ke.Provider,{value:{collapsed:f},children:e.jsxs("aside",{ref:u,"aria-label":"Primary",className:l("sticky top-0 hidden md:flex h-screen shrink-0 flex-col gap-2 border-r border-border bg-background-subtle","transition-[width] duration-[var(--duration-base)] ease-[var(--ease-out)]",f?"w-14":"w-60",c),...x,children:[n&&e.jsx("div",{className:l("flex h-14 shrink-0 items-center overflow-hidden border-b border-border",f?"justify-center px-2":"px-3"),children:n}),e.jsx("div",{className:"flex-1 overflow-y-auto py-3",children:m}),o&&e.jsx("div",{className:"border-t border-border p-2",children:o}),e.jsxs("button",{type:"button",onClick:()=>h(!f),"aria-label":f?"Expand sidebar":"Collapse sidebar","aria-expanded":!f,className:l("flex h-8 items-center gap-2 mx-2 mb-2 rounded-md px-2 text-foreground-subtle","hover:bg-background-muted hover:text-foreground outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","transition-colors duration-[var(--duration-fast)]"),children:[f?e.jsx(d.ChevronsRight,{className:"size-4","aria-hidden":!0}):e.jsx(d.ChevronsLeft,{className:"size-4","aria-hidden":!0}),!f&&e.jsx("span",{className:"text-xs font-medium",children:"Collapse"})]})]})})});ht.displayName="Sidebar";function pt({label:a,className:t,children:r,...s}){const{collapsed:n}=i.useContext(ke);return e.jsxs("div",{className:l("mb-3",t),...s,children:[a&&!n&&e.jsx("div",{className:"px-4 pb-1 pt-2 text-xs font-medium text-foreground-subtle uppercase tracking-wide",children:a}),e.jsx("ul",{className:"flex flex-col gap-px",children:r})]})}pt.displayName="SidebarSection";function bt({icon:a,active:t,href:r,trailing:s,sub:n,className:o,children:c,...m}){const{collapsed:x}=i.useContext(ke),u=r?"a":"button";return e.jsx("li",{children:e.jsxs(u,{href:r,"aria-current":t?"page":void 0,className:l("mx-2 flex h-8 items-center gap-2 rounded-md px-2 text-sm outline-none","transition-colors duration-[var(--duration-fast)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",t?"bg-background-muted text-foreground font-medium":"text-foreground-muted hover:bg-background-muted hover:text-foreground",n&&!x&&"ml-6",x&&"justify-center",o),...m,children:[a&&e.jsx("span",{className:"flex shrink-0 items-center [&_svg]:size-4",children:a}),!x&&e.jsx("span",{className:"flex-1 truncate text-left",children:c}),!x&&s&&e.jsx("span",{className:"ml-auto",children:s})]})})}bt.displayName="SidebarItem";function Gr({icon:a,label:t,defaultOpen:r=!0,children:s}){const{collapsed:n}=i.useContext(ke),[o,c]=i.useState(r);return n?e.jsx(e.Fragment,{children:s}):e.jsxs("li",{children:[e.jsxs("button",{type:"button",onClick:()=>c(m=>!m),"aria-expanded":o,className:l("mx-2 flex h-8 w-[calc(100%-1rem)] items-center gap-2 rounded-md px-2 text-sm text-foreground-muted outline-none","transition-colors duration-[var(--duration-fast)]","hover:bg-background-muted hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:[a&&e.jsx("span",{className:"flex shrink-0 items-center [&_svg]:size-4",children:a}),e.jsx("span",{className:"flex-1 text-left",children:t}),e.jsx(d.ChevronDown,{className:l("size-3.5 transition-transform",o&&"rotate-180"),"aria-hidden":!0})]}),o&&e.jsx("ul",{className:"flex flex-col gap-px",children:s})]})}Gr.displayName="SidebarGroup";const Vr=i.forwardRef(function({className:t,label:r,showValue:s,formatValue:n=u=>String(u),value:o,defaultValue:c,...m},x){const u=o??c??[0],g=u.length>1;return e.jsxs("div",{className:l("flex flex-col gap-2",t),children:[(r||s)&&e.jsxs("div",{className:"flex items-center justify-between",children:[r&&e.jsx("span",{className:"text-sm font-medium text-foreground",children:r}),s&&e.jsx("span",{className:"text-xs tabular text-foreground-muted font-mono",children:g?`${n(u[0])} – ${n(u[1])}`:n(u[0])})]}),e.jsxs(Te.Root,{ref:x,value:o,defaultValue:c,className:"relative flex w-full touch-none select-none items-center",...m,children:[e.jsx(Te.Track,{className:"relative h-1 w-full grow overflow-hidden rounded-full bg-background-muted",children:e.jsx(Te.Range,{className:"absolute h-full bg-accent"})}),u.map((p,f)=>e.jsx(Te.Thumb,{className:l("block size-4 rounded-full border-2 border-accent bg-card shadow-sm","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","transition-transform duration-[var(--duration-fast)] ease-[var(--ease-out)]","hover:scale-110 disabled:pointer-events-none disabled:opacity-50"),"aria-label":g?f===0?"Minimum":"Maximum":r?String(r):"Value"},f))]})]})});Vr.displayName="Slider";const Pa={sm:"size-3.5",md:"size-4",lg:"size-6"},_a={accent:"text-accent",neutral:"text-foreground-subtle","on-accent":"text-on-accent"},qr=i.forwardRef(function({className:t,tone:r="accent",size:s="md",label:n,decorative:o,...c},m){return e.jsxs("svg",{ref:m,viewBox:"0 0 24 24",role:o?void 0:"status","aria-label":o?void 0:n??"Loading","aria-hidden":o||void 0,className:l("animate-spin",Pa[s],_a[r],t),...c,children:[e.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeOpacity:.2,fill:"none"}),e.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",fill:"none"})]})});qr.displayName="Spinner";const vt=i.forwardRef(function({steps:t,current:r,orientation:s="horizontal",className:n,...o},c){return e.jsx("ol",{ref:c,"aria-label":"Progress",className:l(s==="horizontal"?"flex w-full items-center":"flex flex-col gap-6",n),...o,children:t.map((m,x)=>{const u=x<r?"complete":x===r?"current":"upcoming",g=x===t.length-1;return e.jsxs("li",{"aria-current":u==="current"?"step":void 0,className:l(s==="horizontal"?"flex flex-1 items-center gap-3 last:flex-initial":"flex items-start gap-3"),children:[e.jsxs("div",{className:l(s==="horizontal"?"flex items-center gap-3":"flex flex-col items-center"),children:[e.jsx("span",{"aria-hidden":!0,className:l("inline-flex size-7 items-center justify-center rounded-full text-xs font-semibold transition-colors",u==="complete"&&"bg-accent text-on-accent",u==="current"&&"bg-card border-2 border-accent text-accent",u==="upcoming"&&"bg-background-muted text-foreground-subtle border border-border"),children:u==="complete"?e.jsx(d.Check,{className:"size-4"}):x+1}),s==="vertical"&&!g&&e.jsx("span",{className:l("mt-1 w-px flex-1 min-h-6",x<r?"bg-accent":"bg-border")})]}),e.jsxs("div",{className:l("flex flex-col",s==="horizontal"&&"min-w-0"),children:[e.jsx("span",{className:l("text-sm font-medium",u==="upcoming"?"text-foreground-subtle":"text-foreground"),children:m.title}),s==="vertical"&&m.description&&e.jsx("p",{className:"text-xs text-foreground-muted mt-0.5",children:m.description})]}),s==="horizontal"&&!g&&e.jsx("span",{"aria-hidden":!0,className:l("h-px flex-1 mx-2",x<r?"bg-accent":"bg-border")})]},x)})})});vt.displayName="Stepper";const Aa={sm:"h-4 w-7",md:"h-5 w-9"},Fa={sm:"size-3 data-[state=checked]:translate-x-3",md:"size-4 data-[state=checked]:translate-x-4"},ue=i.forwardRef(function({className:t,label:r,description:s,labelPosition:n="after",size:o="md",hideLabel:c,id:m,disabled:x,...u},g){const p=i.useId(),f=m??p,h=s?`${f}-desc`:void 0,b=e.jsx(St.Root,{ref:g,id:f,disabled:x,"aria-describedby":h,className:l("peer inline-flex shrink-0 items-center rounded-full border-2 border-transparent","transition-colors duration-[var(--duration-base)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-accent data-[state=unchecked]:bg-neutral-300 dark:data-[state=unchecked]:bg-neutral-700",Aa[o]),...u,children:e.jsx(St.Thumb,{className:l("pointer-events-none block rounded-full bg-white shadow-sm","transition-transform duration-[var(--duration-base)] ease-[var(--ease-out)]","translate-x-0",Fa[o])})}),j=r&&e.jsxs("div",{className:l("flex flex-col gap-0.5 select-none",c&&"sr-only"),children:[e.jsx("label",{htmlFor:f,className:l("text-sm text-foreground",x&&"opacity-50 cursor-not-allowed"),children:r}),s&&e.jsx("p",{id:h,className:"text-xs text-foreground-subtle",children:s})]});return e.jsxs("div",{className:l("inline-flex items-center gap-2.5",t),children:[n==="before"&&j,b,n==="after"&&j]})});ue.displayName="Switch";const Wr=ze.Root,La=X.cva("inline-flex items-center",{variants:{variant:{underline:"gap-4 border-b border-border w-full",pills:"gap-1 rounded-lg bg-background-muted p-1"},size:{sm:"h-9 text-xs",md:"h-10 text-sm",lg:"h-11 text-sm"}},defaultVariants:{variant:"underline",size:"md"}}),jt=i.forwardRef(function({className:t,variant:r="underline",size:s,...n},o){return e.jsx(ze.List,{ref:o,"data-variant":r,className:l(La({variant:r,size:s}),t),...n})});jt.displayName="TabsList";const Nt=i.forwardRef(function({className:t,...r},s){return e.jsx(ze.Trigger,{ref:s,className:l("inline-flex items-center gap-2 whitespace-nowrap font-medium","outline-none transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[[data-variant=underline]_&]:relative [[data-variant=underline]_&]:h-full","[[data-variant=underline]_&]:px-1 [[data-variant=underline]_&]:text-foreground-muted","[[data-variant=underline]_&]:hover:text-foreground","[[data-variant=underline]_&]:data-[state=active]:text-foreground","[[data-variant=underline]_&]:data-[state=active]:after:absolute","[[data-variant=underline]_&]:data-[state=active]:after:inset-x-0","[[data-variant=underline]_&]:data-[state=active]:after:-bottom-px","[[data-variant=underline]_&]:data-[state=active]:after:h-0.5","[[data-variant=underline]_&]:data-[state=active]:after:bg-accent","[[data-variant=pills]_&]:h-full [[data-variant=pills]_&]:rounded-md [[data-variant=pills]_&]:px-3","[[data-variant=pills]_&]:text-foreground-muted","[[data-variant=pills]_&]:hover:text-foreground","[[data-variant=pills]_&]:data-[state=active]:bg-card","[[data-variant=pills]_&]:data-[state=active]:text-foreground","[[data-variant=pills]_&]:data-[state=active]:shadow-xs",t),...r})});Nt.displayName="TabsTrigger";const wt=i.forwardRef(function({className:t,...r},s){return e.jsx(ze.Content,{ref:s,className:l("mt-4 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",t),...r})});wt.displayName="TabsContent";const Xr=i.forwardRef(function({className:t,label:r,helperText:s,error:n,autoResize:o,minRows:c=3,maxRows:m=12,hideLabel:x,id:u,onChange:g,value:p,defaultValue:f,...h},b){const j=i.useId(),v=u??j,S=`${v}-helper`,_=`${v}-error`,D=i.useRef(null),k=w=>{D.current=w,typeof b=="function"?b(w):b&&(b.current=w)},N=i.useCallback(()=>{const w=D.current;if(!w||!o)return;w.style.height="auto";const K=(parseFloat(getComputedStyle(w).lineHeight)||20)*m;w.style.height=`${Math.min(w.scrollHeight,K)}px`,w.style.overflowY=w.scrollHeight>K?"auto":"hidden"},[o,m]);return i.useEffect(()=>{o&&N()},[o,N,p,f]),e.jsxs("div",{className:l("flex flex-col gap-1.5",t),children:[r&&e.jsx("label",{htmlFor:v,className:l("text-sm font-medium text-foreground",x&&"sr-only"),children:r}),e.jsx("textarea",{ref:k,id:v,rows:c,value:p,defaultValue:f,onChange:w=>{g==null||g(w),o&&N()},"aria-invalid":!!n||void 0,"aria-describedby":n?_:s?S:void 0,className:l("rounded-md border bg-card px-3 py-2 text-sm text-foreground","placeholder:text-foreground-subtle","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",n?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent",o?"resize-none":"resize-y min-h-20"),...h}),n?e.jsx("p",{id:_,role:"alert",className:"text-xs text-danger-text",children:n}):s?e.jsx("p",{id:S,className:"text-xs text-foreground-subtle",children:s}):null]})});Xr.displayName="Textarea";const Ea=de.Provider,Kr=i.forwardRef(function({className:t,...r},s){return e.jsx(de.Viewport,{ref:s,className:l("fixed bottom-0 right-0 z-[var(--z-toast)] flex max-h-screen w-full flex-col-reverse gap-2 p-6","sm:bottom-auto sm:top-4 sm:right-4 sm:max-w-sm sm:flex-col",t),...r})});Kr.displayName="ToastViewport";const Ba=X.cva(["group pointer-events-auto relative flex w-full items-start gap-3","overflow-hidden rounded-lg border p-4 pr-8 shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-right-full","data-[state=closed]:slide-out-to-right-full","data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)]","data-[swipe=cancel]:translate-x-0 data-[swipe=cancel]:transition-transform","data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)]"],{variants:{variant:{default:"border-border bg-card text-card-foreground",success:"border-success-border-soft bg-success-soft text-success-text",warning:"border-warning-border-soft bg-warning-soft text-warning-text",danger:"border-danger-border-soft bg-danger-soft text-danger-text",info:"border-info-border-soft bg-info-soft text-info-text"}},defaultVariants:{variant:"default"}}),Oa={default:null,success:e.jsx(d.CheckCircle2,{className:"size-5 text-success-text shrink-0 mt-0.5","aria-hidden":!0}),warning:e.jsx(d.AlertTriangle,{className:"size-5 text-warning-text shrink-0 mt-0.5","aria-hidden":!0}),danger:e.jsx(d.XCircle,{className:"size-5 text-danger-text shrink-0 mt-0.5","aria-hidden":!0}),info:e.jsx(d.Info,{className:"size-5 text-info-text shrink-0 mt-0.5","aria-hidden":!0})},Qr=i.forwardRef(function({className:t,variant:r="default",children:s,...n},o){return e.jsxs(de.Root,{ref:o,className:l(Ba({variant:r}),t),...n,children:[Oa[r??"default"],e.jsx("div",{className:"flex-1 space-y-1",children:s})]})});Qr.displayName="Toast";const Yr=i.forwardRef(function({className:t,...r},s){return e.jsx(de.Title,{ref:s,className:l("text-sm font-medium",t),...r})});Yr.displayName="ToastTitle";const Jr=i.forwardRef(function({className:t,...r},s){return e.jsx(de.Description,{ref:s,className:l("text-sm opacity-90",t),...r})});Jr.displayName="ToastDescription";const Zr=i.forwardRef(function({className:t,...r},s){return e.jsx(de.Action,{ref:s,className:l("inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-current bg-transparent px-3 text-sm font-medium","transition-colors hover:bg-current/10 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card",t),...r})});Zr.displayName="ToastAction";const es=i.forwardRef(function({className:t,...r},s){return e.jsx(de.Close,{ref:s,"aria-label":"Close",className:l("absolute right-2 top-2 inline-flex size-7 items-center justify-center rounded-md text-foreground-subtle","opacity-0 transition-opacity group-hover:opacity-100 hover:text-foreground","outline-none focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-ring",t),"toast-close":"",...r,children:e.jsx(d.X,{className:"size-4","aria-hidden":!0})})});es.displayName="ToastClose";const $a=({delayDuration:a=500,skipDelayDuration:t=200,...r})=>e.jsx(je.Provider,{delayDuration:a,skipDelayDuration:t,...r}),ts=je.Root,rs=je.Trigger,yt=i.forwardRef(function({className:t,sideOffset:r=4,...s},n){return e.jsx(je.Portal,{children:e.jsx(je.Content,{ref:n,sideOffset:r,className:l("z-[var(--z-tooltip)] overflow-hidden rounded-md px-2 py-1 text-xs font-medium","bg-neutral-900 text-neutral-50","dark:bg-neutral-50 dark:text-neutral-900","shadow-sm max-w-xs","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",t),...s})})});yt.displayName="TooltipContent";function ss({children:a,label:t,side:r="top",align:s="center",disabled:n,delayDuration:o}){return n?e.jsx(e.Fragment,{children:a}):e.jsxs(ts,{delayDuration:o,children:[e.jsx(rs,{asChild:!0,children:a}),e.jsx(yt,{side:r,align:s,children:t})]})}ss.displayName="Tooltip";const as=i.forwardRef(function({logo:t,nav:r,search:s,actions:n,className:o,...c},m){return e.jsxs("header",{ref:m,className:l("sticky top-0 z-[var(--z-sticky)] flex h-14 w-full items-center gap-4","border-b border-border bg-background/80 px-4 backdrop-blur","supports-[backdrop-filter]:bg-background/60",o),...c,children:[e.jsxs("div",{className:"flex items-center gap-6 shrink-0",children:[t,r&&e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:r})]}),s&&e.jsx("div",{className:"flex-1 max-w-md mx-auto",children:s}),n&&e.jsx("div",{className:"ml-auto flex items-center gap-2 shrink-0",children:n})]})});as.displayName="TopNav";const ns=i.forwardRef(function({href:t,active:r,className:s,children:n,...o},c){return e.jsx("a",{ref:c,href:t,"aria-current":r?"page":void 0,className:l("inline-flex h-9 items-center rounded-md px-3 text-sm font-medium outline-none","transition-colors duration-[var(--duration-fast)]",r?"text-foreground":"text-foreground-muted hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",s),...o,children:n})});ns.displayName="TopNavLink";const os=i.createContext(null);function Ge(){const a=i.useContext(os);if(!a)throw new Error("Carousel components must be used inside <Carousel>");return a}const Ua=i.forwardRef(function({opts:t,orientation:r="horizontal",setApi:s,className:n,children:o,...c},m){const[x,u]=As({...t,axis:r==="horizontal"?"x":"y"}),[g,p]=i.useState(!1),[f,h]=i.useState(!1),b=i.useCallback(j=>{j&&(p(j.canScrollPrev()),h(j.canScrollNext()))},[]);return i.useEffect(()=>{if(u)return s==null||s(u),b(u),u.on("reInit",b).on("select",b),()=>{u.off("reInit",b).off("select",b)}},[u,b,s]),e.jsx(os.Provider,{value:{carouselRef:x,api:u,canPrev:g,canNext:f,scrollPrev:()=>u==null?void 0:u.scrollPrev(),scrollNext:()=>u==null?void 0:u.scrollNext(),orientation:r},children:e.jsx("div",{ref:m,className:l("relative",n),role:"region","aria-roledescription":"carousel",...c,children:o})})}),Ha=i.forwardRef(function({className:t,...r},s){const{carouselRef:n,orientation:o}=Ge();return e.jsx("div",{ref:n,className:"overflow-hidden",children:e.jsx("div",{ref:s,className:l("flex",o==="horizontal"?"-ml-4":"-mt-4 flex-col",t),...r})})}),Ga=i.forwardRef(function({className:t,...r},s){const{orientation:n}=Ge();return e.jsx("div",{ref:s,role:"group","aria-roledescription":"slide",className:l("min-w-0 shrink-0 grow-0 basis-full",n==="horizontal"?"pl-4":"pt-4",t),...r})});function Va({className:a}){const{canPrev:t,scrollPrev:r,orientation:s}=Ge();return e.jsx(xe,{"aria-label":"Previous",variant:"outline",disabled:!t,onClick:r,icon:e.jsx(d.ChevronLeft,{}),className:l("absolute z-10",s==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",a)})}function qa({className:a}){const{canNext:t,scrollNext:r,orientation:s}=Ge();return e.jsx(xe,{"aria-label":"Next",variant:"outline",disabled:!t,onClick:r,icon:e.jsx(d.ChevronRight,{}),className:l("absolute z-10",s==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",a)})}function is(a,t,r,s=8){const n=a.map(f=>f.y),o=Math.min(0,...n),c=Math.max(...n,1),m=c-o||1,x=t-s*2,u=r-s*2;return{sx:f=>a.length<=1?s+x/2:s+f/(a.length-1)*x,sy:f=>s+u-(f-o)/m*u,min:o,max:c}}function ls({data:a,height:t=80,width:r="100%",caption:s,className:n}){const o=typeof r=="number"?r:320,{sx:c,sy:m}=is(a,o,t),x=a.map((u,g)=>`${g===0?"M":"L"}${c(g).toFixed(1)},${m(u.y).toFixed(1)}`).join(" ");return e.jsxs("figure",{className:l("flex flex-col gap-1.5",n),children:[s&&e.jsx("figcaption",{className:"text-xs text-foreground-muted",children:s}),e.jsxs("svg",{viewBox:`0 0 ${o} ${t}`,width:r,height:t,role:"img",children:[e.jsx("path",{d:x,fill:"none",stroke:"var(--color-accent)",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round"}),a.map((u,g)=>e.jsx("circle",{cx:c(g),cy:m(u.y),r:2,fill:"var(--color-accent)"},g))]})]})}function Wa({data:a,height:t=80,width:r="100%",caption:s,className:n}){const o=typeof r=="number"?r:320,{sx:c,sy:m}=is(a,o,t),x=a.map((g,p)=>`${p===0?"M":"L"}${c(p).toFixed(1)},${m(g.y).toFixed(1)}`).join(" "),u=`${x} L${c(a.length-1).toFixed(1)},${t} L${c(0).toFixed(1)},${t} Z`;return e.jsxs("figure",{className:l("flex flex-col gap-1.5",n),children:[s&&e.jsx("figcaption",{className:"text-xs text-foreground-muted",children:s}),e.jsxs("svg",{viewBox:`0 0 ${o} ${t}`,width:r,height:t,role:"img",children:[e.jsx("path",{d:u,fill:"var(--color-accent-soft)"}),e.jsx("path",{d:x,fill:"none",stroke:"var(--color-accent)",strokeWidth:1.5})]})]})}function Xa({data:a,height:t=100,width:r="100%",caption:s,className:n}){const o=typeof r=="number"?r:320,c=8,m=2,x=o-c*2,u=Math.max(2,x/a.length-m),g=a.map(f=>f.y),p=Math.max(...g,1);return e.jsxs("figure",{className:l("flex flex-col gap-1.5",n),children:[s&&e.jsx("figcaption",{className:"text-xs text-foreground-muted",children:s}),e.jsx("svg",{viewBox:`0 0 ${o} ${t}`,width:r,height:t,role:"img",children:a.map((f,h)=>{const b=f.y/p*(t-c*2);return e.jsx("rect",{x:c+h*(u+m),y:t-c-b,width:u,height:b,fill:"var(--color-accent)",rx:1.5,children:e.jsx("title",{children:`${f.x}: ${f.y}`})},h)})})]})}const ds=({shouldScaleBackground:a=!0,...t})=>e.jsx(oe.Drawer.Root,{shouldScaleBackground:a,...t});ds.displayName="Drawer";const Ka=oe.Drawer.Trigger,cs=oe.Drawer.Portal,Qa=oe.Drawer.Close,us=i.forwardRef(function({className:t,...r},s){return e.jsx(oe.Drawer.Overlay,{ref:s,className:l("fixed inset-0 z-50 bg-black/40",t),...r})}),Ya={bottom:"inset-x-0 bottom-0 mt-24 flex h-auto max-h-[90vh] flex-col rounded-t-xl border-t border-border",top:"inset-x-0 top-0 mb-24 flex h-auto max-h-[90vh] flex-col rounded-b-xl border-b border-border",left:"inset-y-0 left-0 flex h-full w-[420px] max-w-[90vw] flex-col rounded-r-xl border-r border-border",right:"inset-y-0 right-0 flex h-full w-[420px] max-w-[90vw] flex-col rounded-l-xl border-l border-border"},Ja={bottom:"mx-auto mt-3 h-1.5 w-12 rounded-full bg-border",top:"mx-auto mb-3 h-1.5 w-12 rounded-full bg-border order-last",left:"mx-1.5 my-auto h-12 w-1.5 rounded-full bg-border order-last self-stretch shrink-0",right:"mx-1.5 my-auto h-12 w-1.5 rounded-full bg-border shrink-0 self-stretch"},Za=i.forwardRef(function({className:t,direction:r="bottom",hideHandle:s,children:n,...o},c){const m=r==="left"||r==="right";return e.jsxs(cs,{children:[e.jsx(us,{}),e.jsxs(oe.Drawer.Content,{ref:c,className:l("fixed z-50 bg-card",Ya[r],m&&"flex-row",t),...o,children:[!s&&e.jsx("div",{"aria-hidden":!0,className:Ja[r]}),e.jsx("div",{className:l("min-h-0 min-w-0 flex-1",m&&"flex flex-col"),children:n})]})]})});function en({className:a,...t}){return e.jsx("div",{className:l("grid gap-1 p-4 text-center sm:text-left",a),...t})}function tn({className:a,...t}){return e.jsx("div",{className:l("mt-auto flex flex-col gap-2 p-4",a),...t})}const rn=i.forwardRef(function({className:t,...r},s){return e.jsx(oe.Drawer.Title,{ref:s,className:l("text-lg font-semibold",t),...r})}),sn=i.forwardRef(function({className:t,...r},s){return e.jsx(oe.Drawer.Description,{ref:s,className:l("text-sm text-foreground-muted",t),...r})});function an(a){return a<1024?`${a} B`:a<1024*1024?`${(a/1024).toFixed(1)} KB`:`${(a/1024/1024).toFixed(1)} MB`}const nn=i.forwardRef(function({accept:t,multiple:r,maxSize:s,value:n,onChange:o,hint:c,disabled:m,className:x},u){const g=i.useRef(null),p=i.useId(),[f,h]=i.useState([]),[b,j]=i.useState(!1),v=n??f,S=i.useCallback(N=>{n===void 0&&h(N),o==null||o(N)},[o,n]),_=i.useCallback(N=>{const w=Array.from(N).filter(F=>!s||F.size<=s);S(r?[...v,...w]:w.slice(0,1))},[v,s,r,S]),D=N=>S(v.filter((w,F)=>F!==N)),k=N=>{N.preventDefault(),j(!1),!m&&_(N.dataTransfer.files)};return e.jsxs("div",{ref:u,className:l("flex flex-col gap-3",x),children:[e.jsxs("label",{htmlFor:p,onDragOver:N=>{N.preventDefault(),m||j(!0)},onDragLeave:()=>j(!1),onDrop:k,className:l("group relative flex cursor-pointer flex-col items-center justify-center gap-2","rounded-md border border-dashed border-border bg-background-subtle px-6 py-8","text-center transition-colors","hover:border-border-strong hover:bg-background-muted",b&&"border-accent bg-accent-soft",m&&"pointer-events-none opacity-50"),children:[e.jsx(d.Upload,{className:"size-5 text-foreground-muted","aria-hidden":!0}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"Drop files here, or click to browse"}),c&&e.jsx("p",{className:"text-xs text-foreground-muted",children:c})]}),e.jsx("input",{ref:g,id:p,type:"file",accept:t,multiple:r,disabled:m,className:"sr-only",onChange:N=>N.target.files&&_(N.target.files)})]}),v.length>0&&e.jsx("ul",{className:"flex flex-col gap-2",children:v.map((N,w)=>e.jsxs("li",{className:"flex items-center gap-3 rounded-md border border-border bg-card px-3 py-2",children:[e.jsx(d.File,{className:"size-4 shrink-0 text-foreground-muted","aria-hidden":!0}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-sm",children:N.name}),e.jsx("p",{className:"text-xs text-foreground-muted",children:an(N.size)})]}),e.jsx("button",{type:"button",onClick:()=>D(w),className:"rounded p-1 text-foreground-muted hover:bg-background-muted hover:text-foreground","aria-label":`Remove ${N.name}`,children:e.jsx(d.X,{className:"size-4"})})]},`${N.name}-${w}`))})]})}),on=X.cva(["relative pointer-events-auto w-full max-w-md","flex items-start gap-3 rounded-md border bg-card p-3 shadow-md","text-sm text-foreground"],{variants:{variant:{default:"border-border",info:"border-info-border-soft",success:"border-success-border-soft",warning:"border-warning-border-soft",danger:"border-danger-border-soft"}},defaultVariants:{variant:"default"}}),ln={default:null,info:e.jsx(d.Info,{className:"size-4 shrink-0 mt-0.5 text-info-text","aria-hidden":!0}),success:e.jsx(d.CheckCircle2,{className:"size-4 shrink-0 mt-0.5 text-success-text","aria-hidden":!0}),warning:e.jsx(d.AlertTriangle,{className:"size-4 shrink-0 mt-0.5 text-warning-text","aria-hidden":!0}),danger:e.jsx(d.XCircle,{className:"size-4 shrink-0 mt-0.5 text-danger-text","aria-hidden":!0})},dn=i.forwardRef(function({className:t,variant:r="default",title:s,action:n,onClose:o,icon:c,children:m,...x},u){const g=c===!1?null:c??ln[r??"default"];return e.jsxs("div",{ref:u,role:"status",className:l(on({variant:r}),t),...x,children:[g,e.jsxs("div",{className:"min-w-0 flex-1",children:[s&&e.jsx("p",{className:"font-medium",children:s}),m&&e.jsx("p",{className:"text-foreground-muted",children:m})]}),n,o&&e.jsx("button",{type:"button",onClick:o,"aria-label":"Dismiss",className:"rounded p-1 text-foreground-muted hover:bg-background-muted hover:text-foreground",children:e.jsx(d.X,{className:"size-4"})})]})}),cn=i.forwardRef(function({value:t,defaultValue:r=[],onChange:s,placeholder:n="Add and press Enter",max:o,disabled:c,error:m,separators:x=["Enter",","],className:u},g){const[p,f]=i.useState(r),[h,b]=i.useState(""),j=t??p,v=i.useCallback(k=>{t===void 0&&f(k),s==null||s(k)},[s,t]),S=k=>{const N=k.trim();!N||j.includes(N)||o!==void 0&&j.length>=o||v([...j,N])},_=k=>v(j.filter((N,w)=>w!==k)),D=k=>{x.includes(k.key)?(k.preventDefault(),S(h),b("")):k.key==="Backspace"&&!h&&j.length&&_(j.length-1)};return e.jsxs("div",{ref:g,className:l("flex min-h-9 w-full flex-wrap items-center gap-1.5 rounded-md border bg-card px-2 py-1.5","transition-colors focus-within:border-ring focus-within:ring-2 focus-within:ring-ring",m?"border-danger focus-within:border-danger focus-within:ring-danger":"border-border",c&&"pointer-events-none opacity-50",u),children:[j.map((k,N)=>e.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-background-muted px-2 py-0.5 text-xs",children:[k,e.jsx("button",{type:"button",onClick:()=>_(N),className:"rounded p-0.5 text-foreground-muted hover:bg-background-subtle hover:text-foreground","aria-label":`Remove ${k}`,children:e.jsx(d.X,{className:"size-3"})})]},`${k}-${N}`)),e.jsx("input",{value:h,disabled:c,onChange:k=>b(k.target.value),onKeyDown:D,onBlur:()=>{h&&(S(h),b(""))},placeholder:j.length===0?n:void 0,className:"min-w-[8ch] flex-1 bg-transparent text-sm outline-none placeholder:text-foreground-subtle"})]})}),un=i.forwardRef(function({className:t,children:r,...s},n){return e.jsx("ol",{ref:n,className:l("relative flex flex-col gap-6",t),...s,children:r})}),mn=i.forwardRef(function({bullet:t,isLast:r,className:s,children:n,...o},c){return e.jsxs("li",{ref:c,className:l("relative flex gap-4 pb-1",s),...o,children:[e.jsxs("div",{className:"relative flex shrink-0 flex-col items-center",children:[e.jsx("div",{className:"flex size-6 items-center justify-center rounded-full border border-border bg-card text-foreground-muted",children:t??e.jsx("span",{className:"size-2 rounded-full bg-accent","aria-hidden":!0})}),!r&&e.jsx("span",{className:"mt-1 flex-1 w-px bg-border","aria-hidden":!0})]}),e.jsx("div",{className:"min-w-0 flex-1 pb-4",children:n})]})});function xn({className:a,children:t}){return e.jsx("p",{className:l("text-xs text-foreground-subtle",a),children:t})}function fn({className:a,children:t}){return e.jsx("p",{className:l("text-sm font-medium",a),children:t})}function gn({className:a,children:t}){return e.jsx("p",{className:l("mt-0.5 text-sm text-foreground-muted",a),children:t})}function hn({data:a,defaultExpanded:t=[],selectedId:r,onSelect:s,className:n}){const[o,c]=i.useState(new Set(t)),m=u=>c(g=>{const p=new Set(g);return p.has(u)?p.delete(u):p.add(u),p});function x(u,g){const p=!!u.children,f=o.has(u.id),h=r===u.id,b=p?f?d.FolderOpen:d.Folder:d.File;return e.jsxs("li",{role:"treeitem","aria-expanded":p?f:void 0,children:[e.jsxs("button",{type:"button",tabIndex:0,onClick:()=>{s==null||s(u.id),p&&m(u.id)},onKeyDown:j=>{(j.key==="ArrowRight"&&p&&!f||j.key==="ArrowLeft"&&p&&f)&&m(u.id)},style:{paddingLeft:g*16+8},className:l("flex w-full items-center gap-1.5 rounded-md py-1 pr-2 text-left text-sm","hover:bg-background-muted focus-visible:bg-background-muted outline-none",h&&"bg-accent-soft text-foreground"),children:[p?e.jsx(d.ChevronRight,{className:l("size-3.5 shrink-0 text-foreground-subtle transition-transform",f&&"rotate-90"),"aria-hidden":!0}):e.jsx("span",{className:"w-3.5 shrink-0","aria-hidden":!0}),u.icon??e.jsx(b,{className:"size-4 shrink-0 text-foreground-muted","aria-hidden":!0}),e.jsx("span",{className:"truncate",children:u.label})]}),p&&f&&e.jsx("ul",{role:"group",className:"mt-0.5",children:u.children.map(j=>x(j,g+1))})]},u.id)}return e.jsx("ul",{role:"tree",className:l("flex flex-col gap-0.5",n),children:a.map(u=>x(u,0))})}function pn({brand:a,title:t,subtitle:r,children:s,footer:n}){return e.jsx("main",{className:"grid min-h-screen place-items-center bg-background-subtle px-4 py-12",children:e.jsxs("div",{className:"w-full max-w-[400px] space-y-6",children:[a&&e.jsx("div",{className:"flex justify-center",children:a}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:t}),r&&e.jsx("p",{className:"text-sm text-foreground-muted",children:r})]}),e.jsx("div",{className:"rounded-lg border border-border bg-card p-6",children:s}),n&&e.jsx("p",{className:"text-center text-sm text-foreground-muted",children:n})]})})}function bn({onSubmit:a,loading:t,error:r,forgotHref:s="/forgot"}){const[n,o]=i.useState(""),[c,m]=i.useState(""),x=u=>{u.preventDefault(),a({email:n,password:c})};return e.jsxs("form",{onSubmit:x,className:"space-y-4",children:[r&&e.jsx(we,{variant:"danger",children:r}),e.jsx(P,{type:"email",label:"Email",value:n,onChange:u=>o(u.target.value),autoComplete:"email",required:!0}),e.jsx(P,{type:"password",label:"Password",value:c,onChange:u=>m(u.target.value),autoComplete:"current-password",required:!0}),e.jsx("div",{className:"flex items-center justify-between text-sm",children:e.jsx("a",{href:s,className:"font-medium text-accent hover:underline outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm",children:"Forgot password?"})}),e.jsx(T,{type:"submit",loading:t,className:"w-full",trailingIcon:e.jsx(d.ArrowRight,{}),children:"Sign in"})]})}function vn({onSubmit:a,loading:t,error:r}){const[s,n]=i.useState(""),[o,c]=i.useState(""),[m,x]=i.useState("");return e.jsxs("form",{onSubmit:u=>{u.preventDefault(),a({name:s,email:o,password:m})},className:"space-y-4",children:[r&&e.jsx(we,{variant:"danger",children:r}),e.jsx(P,{label:"Full name",value:s,onChange:u=>n(u.target.value),required:!0}),e.jsx(P,{type:"email",label:"Work email",value:o,onChange:u=>c(u.target.value),autoComplete:"email",required:!0}),e.jsx(P,{type:"password",label:"Password",helperText:"At least 8 characters.",value:m,onChange:u=>x(u.target.value),autoComplete:"new-password",required:!0}),e.jsx(T,{type:"submit",loading:t,className:"w-full",children:"Create account"}),e.jsx("p",{className:"text-xs text-foreground-subtle text-center",children:"By signing up you agree to our Terms of Service and Privacy Policy."})]})}function jn({onSubmit:a,loading:t,error:r}){const[s,n]=i.useState("");return e.jsxs("form",{onSubmit:o=>{o.preventDefault(),a(s)},className:"space-y-4",children:[r&&e.jsx(we,{variant:"danger",children:r}),e.jsx(P,{type:"email",label:"Email",helperText:"We'll send a reset link if an account exists.",value:s,onChange:o=>n(o.target.value),autoComplete:"email",required:!0}),e.jsx(T,{type:"submit",loading:t,className:"w-full",leadingIcon:e.jsx(d.Mail,{}),children:"Send reset link"})]})}function Nn({email:a,onResend:t}){return e.jsxs("div",{className:"space-y-4 text-center",children:[e.jsx("div",{className:"mx-auto inline-flex size-12 items-center justify-center rounded-full bg-success-soft text-success-text",children:e.jsx(d.CheckCircle2,{className:"size-6","aria-hidden":!0})}),e.jsxs("p",{className:"text-sm text-foreground-muted",children:["We sent a sign-in link to"," ",e.jsx("span",{className:"font-medium text-foreground",children:a}),". Open it on this device to continue."]}),e.jsx(le,{}),e.jsxs("p",{className:"text-xs text-foreground-subtle",children:["Didn't get it?"," ",e.jsx("button",{type:"button",onClick:t,className:"font-medium text-accent hover:underline outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm",children:"Resend"})]})]})}function ge(a){typeof window>"u"||(window.location.hash=a)}const wn=[{label:"Workspace",items:[{key:"home",label:"Home",icon:e.jsx(d.Home,{}),href:"#dashboard"},{key:"projects",label:"Projects",icon:e.jsx(d.Folder,{}),href:"#data-table",trailing:e.jsx(V,{tone:"neutral",children:"12"})},{key:"inbox",label:"Inbox",icon:e.jsx(d.Inbox,{}),href:"#first-run",trailing:e.jsx(V,{tone:"accent",children:"5"})},{key:"members",label:"Members",icon:e.jsx(d.Users,{}),href:"#record",trailing:e.jsx(V,{tone:"neutral",children:"3"})},{key:"insights",label:"Insights",icon:e.jsx(d.BarChart3,{}),href:"#dashboard"}]},{label:"Personal",items:[{key:"bookmarks",label:"Bookmarks",icon:e.jsx(d.Bookmark,{}),href:"#pricing"},{key:"apps",label:"Apps",icon:e.jsx(d.LayoutGrid,{}),href:"#onboarding"}]},{label:"Account",items:[{key:"settings",label:"Settings",icon:e.jsx(d.Settings,{}),href:"#settings"},{key:"integrations",label:"Integrations",icon:e.jsx(d.Plug,{}),href:"#settings"},{key:"help",label:"Help & docs",icon:e.jsx(d.HelpCircle,{}),href:"#"}]}],yn={name:"Bay Otgonbayar",email:"bay@craftzbay.com",initials:"BO",status:"online"},Cn=[{id:"n1",who:{name:"Anu B.",initials:"AB"},action:"mentioned you in",target:"Q2 OKRs",when:"2m",unread:!0},{id:"n2",who:{name:"Bat E.",initials:"BE"},action:"requested review on",target:"fix/login-flow",when:"18m",unread:!0},{id:"n3",who:{name:"Tuya G.",initials:"TG"},action:"commented on",target:"feat/segments",when:"1h",unread:!0},{id:"n4",who:{name:"Khulan O.",initials:"KO"},action:"archived",target:"old-billing-spike",when:"3h"},{id:"n5",who:{name:"Sara M.",initials:"SM"},action:"invited you to",target:"Atlas workspace",when:"Yesterday"}],kn=[{label:"Profile",icon:e.jsx(d.User,{className:"size-4"}),onSelect:()=>ge("record")},{label:"Account settings",icon:e.jsx(d.Settings,{className:"size-4"}),onSelect:()=>ge("settings")},{label:"Upgrade plan",icon:e.jsx(d.Sparkles,{className:"size-4"}),trailing:e.jsx(V,{tone:"accent",className:"ml-auto",children:"Pro"}),onSelect:()=>ge("pricing")},{label:"Help & support",icon:e.jsx(d.HelpCircle,{className:"size-4"}),onSelect:()=>ge("first-run"),separatorAbove:!0},{label:"Sign out",icon:e.jsx(d.LogOut,{className:"size-4"}),onSelect:()=>ge("auth-signin"),separatorAbove:!0}];function Sn({children:a,brand:t,active:r="home",navSections:s=wn,sidebar:n,topbarActions:o,search:c,user:m=yn,profileMenu:x=kn,notifications:u=Cn,onMarkAllNotificationsRead:g,onViewAllNotifications:p}){return e.jsxs("div",{className:"flex min-h-screen w-full bg-background",children:[e.jsx(ht,{defaultCollapsed:!1,header:t,footer:e.jsx(xs,{user:m}),children:n??e.jsx(ms,{sections:s,active:r})}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[e.jsx(Tn,{brand:t,active:r,navSections:s,sidebar:n,user:m,search:c,topbarActions:o,notifications:u,profileMenu:x,onMarkAllNotificationsRead:g,onViewAllNotifications:p}),e.jsx("main",{className:"flex-1 overflow-y-auto p-4 md:p-8",children:a})]})]})}function ms({sections:a,active:t}){return e.jsx(e.Fragment,{children:a.map((r,s)=>e.jsx(pt,{label:r.label,children:r.items.map(n=>e.jsx(bt,{href:n.href,icon:n.icon,active:n.key===t,trailing:n.trailing,onClick:n.onClick,children:n.label},n.key))},s))})}function Tn({brand:a,active:t,navSections:r,sidebar:s,user:n,search:o,topbarActions:c,notifications:m,profileMenu:x,onMarkAllNotificationsRead:u,onViewAllNotifications:g}){const[p,f]=i.useState(!1),h=o===!1?null:o??e.jsx(P,{type:"search",placeholder:"Search projects, members, files…",hideLabel:!0,label:"Search",prefix:e.jsx(d.Search,{}),suffix:e.jsx(it,{children:"⌘K"})});return e.jsxs("header",{className:"sticky top-0 z-30 flex h-14 items-center gap-3 border-b border-border bg-background/80 px-4 backdrop-blur md:px-6",children:[e.jsxs("div",{className:"flex items-center gap-2 md:hidden",children:[e.jsxs(Fr,{open:p,onOpenChange:f,children:[e.jsx(Lr,{asChild:!0,children:e.jsx(xe,{"aria-label":"Open menu",icon:e.jsx(d.Menu,{}),variant:"ghost",size:"sm"})}),e.jsxs(gt,{side:"left",className:"w-64 p-0",children:[e.jsx("div",{className:"flex h-14 shrink-0 items-center border-b border-border px-3",children:a}),e.jsx("div",{className:"flex-1 overflow-y-auto py-3",onClick:()=>f(!1),children:s??e.jsx(ms,{sections:r,active:t})}),e.jsx("div",{className:"border-t border-border p-2",children:e.jsx(xs,{user:n})})]})]}),e.jsx("div",{className:"text-sm",children:a})]}),h&&e.jsx("div",{className:"relative hidden max-w-xl flex-1 sm:block",children:h}),e.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[c,m.length>0&&e.jsx(Dn,{notifications:m,onMarkAllRead:u,onViewAll:g}),e.jsx(Rn,{user:n,items:x})]})]})}function Dn({notifications:a,onMarkAllRead:t,onViewAll:r}){const s=a.filter(n=>n.unread).length;return e.jsxs(Pe,{children:[e.jsx(_e,{asChild:!0,children:e.jsxs("button",{type:"button","aria-label":`Notifications${s?`, ${s} unread`:""}`,className:"relative inline-flex size-9 items-center justify-center rounded-md text-foreground-muted outline-none transition-colors hover:bg-background-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:[e.jsx(d.Bell,{className:"size-4"}),s>0&&e.jsx("span",{"aria-hidden":!0,className:"absolute right-2 top-2 inline-flex h-2 w-2 rounded-full bg-accent ring-2 ring-background"})]})}),e.jsxs(ye,{align:"end",className:"w-80 p-0",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-border px-3 py-2.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:"Notifications"}),s>0&&e.jsxs(V,{tone:"accent",children:[s," new"]})]}),t&&e.jsx("button",{type:"button",onClick:t,className:"text-xs text-foreground-muted hover:text-foreground",children:"Mark all read"})]}),e.jsx("ul",{className:"max-h-80 overflow-y-auto py-1",children:a.map(n=>e.jsx("li",{children:e.jsxs("button",{type:"button",onClick:n.onClick,className:"flex w-full items-start gap-3 px-3 py-2.5 text-left outline-none hover:bg-background-muted focus-visible:bg-background-muted",children:[e.jsxs("div",{className:"relative mt-0.5",children:[e.jsx(Y,{size:"sm",fallback:n.who.initials}),n.unread&&e.jsx("span",{"aria-hidden":!0,className:"absolute -right-0.5 -top-0.5 inline-flex h-2 w-2 rounded-full bg-accent ring-2 ring-background"})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("p",{className:"text-sm leading-snug",children:[e.jsx("span",{className:"font-medium text-foreground",children:n.who.name})," ",e.jsx("span",{className:"text-foreground-muted",children:n.action})," ",e.jsx("span",{className:"font-medium text-foreground",children:n.target})]}),e.jsx("p",{className:"mt-0.5 text-xs text-foreground-subtle",children:n.when})]})]})},n.id))}),r&&e.jsx("div",{className:"border-t border-border px-3 py-2 text-center",children:e.jsx("button",{type:"button",onClick:r,className:"text-xs font-medium text-accent hover:underline",children:"View all notifications"})})]})]})}function Rn({user:a,items:t}){return e.jsxs(Pe,{children:[e.jsx(_e,{asChild:!0,children:e.jsx("button",{type:"button","aria-label":"Open profile menu",className:"flex items-center gap-2 rounded-full p-0.5 outline-none hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:e.jsx(Y,{size:"sm",fallback:a.initials,status:a.status})})}),e.jsxs(ye,{align:"end",className:"w-60",children:[e.jsx(Fe,{children:e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:"text-sm font-medium text-foreground",children:a.name}),a.email&&e.jsx("span",{className:"text-xs text-foreground-subtle",children:a.email})]})}),e.jsx(Ne,{}),t.map((r,s)=>e.jsxs(i.Fragment,{children:[r.separatorAbove&&e.jsx(Ne,{}),e.jsxs(Qe,{onSelect:r.onSelect,children:[r.icon,r.label,r.trailing]})]},s))]})]})}function xs({user:a}){return e.jsxs("div",{className:"flex items-center gap-2.5 rounded-md px-2 py-1.5",children:[e.jsx(Y,{fallback:a.initials,size:"sm",status:a.status}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:a.name}),a.email&&e.jsx("p",{className:"truncate text-xs text-foreground-subtle",children:a.email})]})]})}const Mn=Array.from({length:30},(a,t)=>{const r=2200+t*22,s=Math.sin(t/3.5)*180,n=(Math.sin(t*7.3)+Math.cos(t*3.1))*60;return{x:t,y:Math.round(r+s+n)}}),zn=[{label:"Active users",value:"2,840",delta:{value:"+12%",positive:!0}},{label:"Sessions today",value:"8,402",delta:{value:"+4%",positive:!0}},{label:"Open issues",value:"14",delta:{value:"−6%",positive:!0}},{label:"Error rate",value:"0.32%",delta:{value:"+0.05%",positive:!1}}],In=[{id:"1",who:{name:"Anu B.",initials:"AB"},action:"merged",target:"feat/segments",when:"12m ago"},{id:"2",who:{name:"Bat E.",initials:"BE"},action:"opened",target:"fix/login-flow",when:"34m ago"},{id:"3",who:{name:"Tuya G.",initials:"TG"},action:"commented on",target:"Q2 OKRs",when:"1h ago"},{id:"4",who:{name:"Khulan O.",initials:"KO"},action:"archived",target:"old-billing-spike",when:"3h ago"}];function Pn({title:a="Overview",subtitle:t="What's happening across your workspace today.",headerActions:r=e.jsx(V,{tone:"neutral",variant:"outline",children:"Last 7 days"}),stats:s=zn,chart:n,chartTitle:o="Active users",chartDescription:c="Distinct sessions per day, last 30 days.",activity:m=In,activityTitle:x="Recent activity"}={}){return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("header",{className:"flex items-end justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:a}),t&&e.jsx("p",{className:"mt-1 text-sm text-foreground-muted",children:t})]}),r&&e.jsx("div",{className:"hidden items-center gap-2 md:flex",children:r})]}),s.length>0&&e.jsx("section",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",children:s.map((u,g)=>e.jsxs(U,{children:[e.jsx(H,{className:"pb-2",children:e.jsx(te,{children:u.label})}),e.jsx(G,{children:e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"tabular text-2xl font-semibold text-foreground",children:u.value}),u.delta&&e.jsx("span",{className:u.delta.positive?"tabular text-xs font-medium text-success-text":"tabular text-xs font-medium text-danger-text",children:u.delta.value})]})})]},g))}),(n!==void 0||o)&&e.jsxs(U,{children:[e.jsxs(H,{children:[o&&e.jsx(W,{children:o}),c&&e.jsx(te,{children:c})]}),e.jsx(G,{children:n??e.jsx(ls,{data:Mn,height:160,className:"w-full"})})]}),m.length>0&&e.jsxs(U,{padding:"none",children:[e.jsx(H,{className:"px-5 pt-5",children:e.jsx(W,{children:x})}),e.jsxs(Le,{children:[e.jsx(Ee,{children:e.jsxs(ae,{children:[e.jsx(ne,{children:"Who"}),e.jsx(ne,{children:"Action"}),e.jsx(ne,{children:"Target"}),e.jsx(ne,{className:"text-right",children:"When"})]})}),e.jsx(Be,{children:m.map(u=>e.jsxs(ae,{children:[e.jsx(re,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Y,{size:"xs",fallback:u.who.initials}),e.jsx("span",{className:"text-foreground",children:u.who.name})]})}),e.jsx(re,{className:"text-foreground-muted",children:u.action}),e.jsx(re,{children:e.jsx(V,{tone:"neutral",variant:"outline",children:u.target})}),e.jsx(re,{className:"tabular text-right text-foreground-subtle",children:u.when})]},u.id))})]})]})]})}const _n=[{id:"profile",label:"Profile",icon:e.jsx(d.User,{}),render:()=>e.jsxs(U,{children:[e.jsxs(H,{children:[e.jsx(W,{children:"Profile"}),e.jsx(te,{children:"Visible to your teammates."})]}),e.jsxs(G,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(Y,{size:"xl",fallback:"BO"}),e.jsxs("div",{children:[e.jsx(T,{variant:"outline",size:"sm",children:"Change photo"}),e.jsx("p",{className:"mt-2 text-xs text-foreground-subtle",children:"JPG or PNG, max 2 MB."})]})]}),e.jsx(le,{}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(P,{label:"First name",defaultValue:"Bay"}),e.jsx(P,{label:"Last name",defaultValue:"Otgonbayar"})]}),e.jsx(P,{label:"Display email",type:"email",defaultValue:"bay@company.com"}),e.jsx("div",{className:"flex justify-end",children:e.jsx(T,{children:"Save changes"})})]})]})},{id:"security",label:"Security",icon:e.jsx(d.Lock,{}),render:()=>e.jsxs(U,{children:[e.jsxs(H,{children:[e.jsx(W,{children:"Security"}),e.jsx(te,{children:"How you sign in and protect your account."})]}),e.jsxs(G,{className:"space-y-4",children:[e.jsx(P,{label:"Current password",type:"password"}),e.jsx(P,{label:"New password",type:"password",helperText:"At least 8 characters."}),e.jsx(le,{}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Two-factor authentication"}),e.jsx("p",{className:"text-xs text-foreground-subtle",children:"Required for admin accounts on production."})]}),e.jsx(ue,{defaultChecked:!0})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(T,{children:"Update password"})})]})]})},{id:"notifications",label:"Notifications",icon:e.jsx(d.Bell,{}),render:()=>e.jsxs(U,{children:[e.jsxs(H,{children:[e.jsx(W,{children:"Notifications"}),e.jsx(te,{children:"Choose what we email and ping you about."})]}),e.jsxs(G,{className:"space-y-4",children:[e.jsx(ue,{label:"Product updates",description:"A short note when we ship something.",defaultChecked:!0}),e.jsx(le,{}),e.jsx(ue,{label:"Mentions",description:"When a teammate @ mentions you in a comment.",defaultChecked:!0}),e.jsx(le,{}),e.jsx(ue,{label:"Weekly digest",description:"A Monday-morning summary of last week's activity."})]})]})},{id:"billing",label:"Billing",icon:e.jsx(d.CreditCard,{}),render:()=>e.jsxs(U,{children:[e.jsxs(H,{children:[e.jsx(W,{children:"Billing"}),e.jsx(te,{children:"Your plan, invoices, and payment method."})]}),e.jsxs(G,{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-md border border-border bg-background-subtle p-4",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Team — $20/user/month"}),e.jsx("p",{className:"mt-1 text-xs text-foreground-subtle",children:"Renews on 1 June 2026 · 12 seats"})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(T,{variant:"outline",children:"Manage seats"}),e.jsx(T,{children:"Upgrade plan"})]})]})]})},{id:"team",label:"Team",icon:e.jsx(d.Users,{}),render:()=>e.jsxs(U,{children:[e.jsxs(H,{children:[e.jsx(W,{children:"Team"}),e.jsx(te,{children:"Invite teammates and manage roles."})]}),e.jsxs(G,{className:"space-y-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(P,{type:"email",placeholder:"teammate@company.com",hideLabel:!0,label:"Invite email",className:"flex-1"}),e.jsx(T,{children:"Send invite"})]}),e.jsx("p",{className:"text-xs text-foreground-subtle",children:"Invited members will receive a sign-up link by email."})]})]})}];function An({title:a="Settings",subtitle:t="Manage your account, preferences, and billing.",sections:r=_n,defaultSection:s,activeSection:n,onActiveSectionChange:o,className:c}={}){var f;const m=n!==void 0,[x,u]=i.useState(s??((f=r[0])==null?void 0:f.id)??""),g=m?n:x,p=h=>{m||u(h),o==null||o(h)};return e.jsxs("div",{className:l("mx-auto max-w-5xl space-y-8",c),children:[(a||t)&&e.jsxs("header",{children:[a&&e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:a}),t&&e.jsx("p",{className:"mt-1 text-sm text-foreground-muted",children:t})]}),e.jsxs("div",{className:"grid gap-8 md:grid-cols-[200px_1fr]",children:[e.jsx("nav",{"aria-label":"Settings sections",className:"md:sticky md:top-20 md:self-start",children:e.jsx("ul",{className:"flex flex-col gap-px",children:r.map(h=>e.jsx("li",{children:e.jsxs("button",{type:"button",onClick:()=>p(h.id),className:l("flex h-9 w-full items-center gap-2 rounded-md px-2 text-left text-sm transition-colors duration-[var(--duration-fast)] outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",g===h.id?"bg-background-muted font-medium text-foreground":"text-foreground-muted hover:bg-background-muted hover:text-foreground"),"aria-current":g===h.id?"page":void 0,children:[h.icon&&e.jsx("span",{className:"[&_svg]:size-4",children:h.icon}),h.label]})},h.id))})}),e.jsx("div",{className:"space-y-8",children:r.map(h=>e.jsx("section",{id:h.id,hidden:g!==h.id,children:h.render()},h.id))})]})]})}const Fn=[{id:"p1",name:"Pulse onboarding",status:"active",owner:"Anu B.",updatedAt:"2 hours ago"},{id:"p2",name:"Q2 OKRs rollout",status:"active",owner:"Bat E.",updatedAt:"Yesterday"},{id:"p3",name:"Legacy export",status:"paused",owner:"Tuya G.",updatedAt:"3 days ago"},{id:"p4",name:"Billing spike",status:"archived",owner:"Khulan O.",updatedAt:"Last week"},{id:"p5",name:"Marketing refresh",status:"active",owner:"Anu B.",updatedAt:"Last week"}],Dt={active:{tone:"success",label:"Active"},paused:{tone:"warning",label:"Paused"},archived:{tone:"neutral",label:"Archived"}},Ln=[{key:"name",header:"Name",sortable:!0,cell:a=>e.jsx("span",{className:"font-medium text-foreground",children:a.name})},{key:"status",header:"Status",cell:a=>e.jsx(V,{tone:Dt[a.status].tone,dot:!0,children:Dt[a.status].label})},{key:"owner",header:"Owner"},{key:"updatedAt",header:"Updated",align:"right"}],En=[{key:"status",label:"Status",options:[{value:"all",label:"All statuses"},{value:"active",label:"Active"},{value:"paused",label:"Paused"},{value:"archived",label:"Archived"}]}],Bn=e.jsxs(e.Fragment,{children:[e.jsx(T,{variant:"outline",leadingIcon:e.jsx(d.Upload,{}),children:"Import"}),e.jsx(T,{leadingIcon:e.jsx(d.Plus,{}),children:"New project"})]}),On=[{label:"Export",icon:e.jsx(d.Download,{}),variant:"ghost",onAction:()=>{}},{label:"Delete",icon:e.jsx(d.Trash2,{}),variant:"ghost",onAction:()=>{}}];function $n({title:a="Projects",subtitle:t,headerActions:r=Bn,rows:s,columns:n,filters:o,predicate:c,searchPlaceholder:m="Search…",pageSizeOptions:x=[10,20,50],defaultPageSize:u=10,bulkActions:g,emptyState:p,className:f}={}){const h=s??Fn,b=n??Ln,j=o??En,v=g??On,[S,_]=i.useState(""),[D,k]=i.useState(()=>{var M;const C={};for(const J of j)C[J.key]=J.defaultValue??((M=J.options[0])==null?void 0:M.value)??"";return C}),[N,w]=i.useState([]),[F,K]=i.useState(1),[Q,se]=i.useState(u),z=i.useMemo(()=>{const C=M=>{const J=S.toLowerCase();if(J&&!Object.values(M).some(ce=>typeof ce=="string"&&ce.toLowerCase().includes(J)))return!1;for(const[Se,ce]of Object.entries(D))if(!(!ce||ce==="all")&&M[Se]!==ce)return!1;return!0};return h.filter(M=>c?c(M,D,S):C(M))},[h,S,D,c]),q=z.length>0&&z.every(C=>N.includes(C.id)),Z=N.length>0&&!q,y=i.useMemo(()=>h.filter(C=>N.includes(C.id)),[h,N]),ee=Math.max(1,Math.ceil(z.length/Q)),fe=z.slice((F-1)*Q,F*Q),L=[{key:"__select",header:e.jsx(pe,{checked:q?!0:Z?"indeterminate":!1,onCheckedChange:C=>w(C?z.map(M=>M.id):[]),"aria-label":"Select all rows"}),width:"32px",cell:C=>e.jsx(pe,{checked:N.includes(C.id),onCheckedChange:M=>w(J=>M?[...J,C.id]:J.filter(Se=>Se!==C.id)),"aria-label":"Select row"})},...b];return e.jsxs("div",{className:`space-y-6 ${f??""}`,children:[e.jsxs("header",{className:"flex items-end justify-between gap-4",children:[e.jsxs("div",{children:[a&&e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:a}),e.jsx("p",{className:"mt-1 text-sm text-foreground-muted",children:t??`${z.length} item${z.length===1?"":"s"} match your filters.`})]}),r&&e.jsx("div",{className:"flex items-center gap-2",children:r})]}),(j.length>0||v.length>0)&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[j.map(C=>e.jsxs(lt,{value:D[C.key],onValueChange:M=>k(J=>({...J,[C.key]:M})),children:[e.jsx($e,{className:"w-40",placeholder:C.label}),e.jsx(Ue,{children:C.options.map(M=>e.jsx(He,{value:M.value,children:M.label},M.value))})]},C.key)),e.jsx(T,{variant:"outline",size:"sm",leadingIcon:e.jsx(d.Filter,{}),children:"More filters"})]}),N.length>0&&v.length>0&&e.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border bg-background-subtle px-4 py-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(pe,{checked:q?!0:Z?"indeterminate":!1,onCheckedChange:C=>w(C?z.map(M=>M.id):[]),"aria-label":"Select all"}),e.jsxs("span",{className:"text-sm text-foreground",children:[N.length," selected"]})]}),e.jsx("div",{className:"flex items-center gap-2",children:v.map(C=>e.jsx(T,{variant:C.variant??"ghost",size:"sm",leadingIcon:C.icon,onClick:()=>C.onAction(y),children:C.label},C.label))})]}),e.jsx(mr,{rows:fe,filter:{value:S,onChange:_,placeholder:m},emptyState:p??e.jsx(Oe,{title:"No results",description:"Try adjusting filters or your search.",className:"border-0 bg-transparent"}),columns:L}),e.jsx(mt,{page:F,pageCount:ee,onPageChange:K,totalItems:z.length,pageSize:Q,pageSizeOptions:x,onPageSizeChange:C=>{se(C),K(1)}})]})}const Un={title:"Pulse onboarding",subtitle:"Self-serve onboarding flow for new admins. Owns the first 5 minutes of every workspace.",status:e.jsx(V,{tone:"success",dot:!0,children:"Active"}),actions:e.jsxs(e.Fragment,{children:[e.jsx(T,{variant:"outline",leadingIcon:e.jsx(d.Edit2,{}),children:"Edit"}),e.jsx(T,{variant:"outline",leadingIcon:e.jsx(d.Trash2,{}),children:"Archive"}),e.jsx(T,{trailingIcon:e.jsx(d.ExternalLink,{}),children:"Open in app"})]}),breadcrumbs:[{label:"Projects",href:"/projects"},{label:"Pulse onboarding"}]},Hn=[{id:"overview",label:"Overview",render:()=>e.jsxs(U,{children:[e.jsx(H,{children:e.jsx(W,{children:"Summary"})}),e.jsxs(G,{className:"space-y-2 leading-relaxed text-foreground-muted",children:[e.jsx("p",{children:"The Pulse onboarding flow walks new admins through workspace creation, teammate invites, and first-data import in under five minutes."}),e.jsx("p",{children:"Completion rate sits at 71% (week-over-week +4 pts) and median time to finish is 4 m 22 s."})]})]})},{id:"activity",label:"Activity",render:()=>e.jsx(qe,{children:"Activity feed appears here."})},{id:"files",label:"Files",render:()=>e.jsx(qe,{children:"Linked documents appear here."})},{id:"settings",label:"Settings",render:()=>e.jsx(qe,{children:"Project settings appear here."})}],Gn=e.jsxs(e.Fragment,{children:[e.jsxs(U,{children:[e.jsx(H,{children:e.jsx(W,{children:"Details"})}),e.jsxs(G,{className:"space-y-3 text-sm",children:[e.jsx(Re,{label:"Owner",value:e.jsxs(e.Fragment,{children:[e.jsx(Y,{size:"xs",fallback:"AB"})," Anu B."]})}),e.jsx(Re,{label:"Created",value:"12 Feb 2026"}),e.jsx(Re,{label:"Updated",value:"2 hours ago"}),e.jsx(Re,{label:"Tags",value:e.jsxs(e.Fragment,{children:[e.jsx(V,{tone:"accent",children:"growth"})," ",e.jsx(V,{tone:"neutral",variant:"outline",children:"v2"})]})})]})]}),e.jsxs(U,{children:[e.jsx(H,{children:e.jsx(W,{children:"Watchers"})}),e.jsx(G,{children:e.jsxs("div",{className:"flex -space-x-2",children:[e.jsx(Y,{fallback:"AB"}),e.jsx(Y,{fallback:"BE"}),e.jsx(Y,{fallback:"TG"}),e.jsx(Y,{fallback:"+2"})]})})]})]});function Vn({header:a=Un,tabs:t=Hn,defaultTab:r,sidePanel:s=Gn,className:n}={}){var c;const o=r??((c=t[0])==null?void 0:c.id)??"";return e.jsxs("div",{className:`space-y-6 ${n??""}`,children:[a.breadcrumbs&&a.breadcrumbs.length>0&&e.jsx(Ke,{items:a.breadcrumbs}),e.jsxs("header",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:a.title}),a.status]}),a.subtitle&&e.jsx("p",{className:"max-w-2xl text-sm text-foreground-muted",children:a.subtitle})]}),a.actions&&e.jsx("div",{className:"flex items-center gap-2",children:a.actions})]}),e.jsxs("div",{className:s?"grid gap-6 lg:grid-cols-[1fr_320px]":"min-w-0",children:[e.jsx("div",{className:"min-w-0",children:e.jsxs(Wr,{defaultValue:o,children:[e.jsx(jt,{children:t.map(m=>e.jsx(Nt,{value:m.id,children:m.label},m.id))}),t.map(m=>e.jsx(wt,{value:m.id,className:"space-y-4",children:m.render()},m.id))]})}),s&&e.jsx("aside",{className:"space-y-4",children:s})]})]})}function Re({label:a,value:t}){return e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"text-foreground-subtle",children:a}),e.jsx("span",{className:"flex items-center gap-1.5 text-foreground",children:t})]})}function qe({children:a}){return e.jsx("p",{className:"text-sm text-foreground-muted",children:a})}const qn=[{id:"workspace",title:"Workspace",heading:"Create your workspace",subheading:"A workspace is where your team and projects live.",render:({data:a,setData:t})=>e.jsxs(e.Fragment,{children:[e.jsx(P,{label:"Workspace name",placeholder:"Acme Inc.",value:a.workspaceName??"",onChange:r=>t({workspaceName:r.target.value})}),e.jsx(P,{label:"URL slug",prefix:e.jsx("span",{children:"acme.app/"}),placeholder:"acme",value:a.slug??"",onChange:r=>t({slug:r.target.value})})]})},{id:"invite",title:"Invite team",heading:"Invite your team",subheading:"You can always invite more people later.",render:({data:a,setData:t})=>e.jsxs(e.Fragment,{children:[e.jsx(P,{type:"email",label:"Invite by email",placeholder:"teammate@company.com",helperText:"Separate multiple emails with commas.",value:a.inviteEmail??"",onChange:r=>t({inviteEmail:r.target.value})}),e.jsxs(xt,{value:a.role??"member",onValueChange:r=>t({role:r}),children:[e.jsx(be,{value:"admin",label:"Admin",description:"Can manage workspace and billing."}),e.jsx(be,{value:"member",label:"Member",description:"Can create and edit projects."}),e.jsx(be,{value:"viewer",label:"Viewer",description:"Read-only access."})]})]})},{id:"data",title:"Connect data",heading:"Connect a data source",subheading:"Pick one — others can be added in settings.",render:({data:a,setData:t})=>e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm text-foreground-muted",children:"Connect your data source so we can populate your first dashboard."}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:["Postgres","BigQuery","Snowflake","CSV upload"].map(r=>{const s=a.source===r;return e.jsxs("button",{type:"button",onClick:()=>t({source:r}),"aria-pressed":s,className:`rounded-lg border bg-card p-4 text-left transition-colors duration-[var(--duration-fast)] outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background ${s?"border-accent bg-accent-soft":"border-border hover:border-border-strong hover:bg-background-subtle"}`,children:[e.jsx("p",{className:"font-medium text-foreground",children:r}),e.jsx("p",{className:"mt-1 text-xs text-foreground-subtle",children:"Quick setup with SSO"})]},r)})})]})},{id:"done",title:"Done",heading:"Welcome aboard",subheading:"We've set up your starting dashboard.",ctaLabel:"Open workspace",render:()=>e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6 text-center",children:[e.jsx(d.CheckCircle2,{className:"size-10 text-success-text","aria-hidden":!0}),e.jsx("p",{className:"text-base font-medium text-foreground",children:"You're all set."}),e.jsx("p",{className:"max-w-sm text-sm text-foreground-muted",children:"Your workspace is ready. We've sent invites and your first dashboard is loading."})]})}];function Wn({steps:a=qn,initialData:t={},onComplete:r,className:s}={}){const[n,o]=i.useState(0),[c,m]=i.useState(t),x=v=>m(S=>({...S,...v})),u=v=>o(Math.max(0,Math.min(v,a.length-1))),g=()=>u(n+1),p=()=>u(n-1),f=async()=>{r&&await r(c)},h={next:g,prev:p,goTo:u,finish:f,data:c,setData:x},b=a[n],j=n===a.length-1;return e.jsxs("div",{className:`mx-auto max-w-2xl space-y-8 py-12 ${s??""}`,children:[e.jsx(vt,{steps:a.map(v=>({title:v.title,description:v.description})),current:n}),e.jsxs(U,{children:[e.jsxs(H,{children:[e.jsx(W,{children:b.heading}),b.subheading&&e.jsx(te,{children:b.subheading})]}),e.jsx(G,{className:"space-y-4",children:b.render(h)})]}),!b.hideNavigation&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(T,{variant:"ghost",leadingIcon:e.jsx(d.ArrowLeft,{}),onClick:p,disabled:n===0,children:"Back"}),e.jsx(T,{trailingIcon:j?void 0:e.jsx(d.ArrowRight,{}),onClick:j?f:g,children:b.ctaLabel??(j?"Finish":"Continue")})]})]})}const Xn=[{name:"Starter",price:"$0",cadence:"forever",description:"For individuals exploring the product.",features:["Up to 3 projects","Community support","Single workspace"],cta:"Start free"},{name:"Team",price:"$20",cadence:"per user / month",description:"For small teams running real workloads.",features:["Unlimited projects","Email support, 24h response","SSO via Google & Microsoft","Audit log (30 days)"],cta:"Start 14-day trial",highlighted:!0},{name:"Enterprise",price:"Custom",cadence:"annual",description:"For organisations with custom requirements.",features:["Everything in Team","SAML SSO + SCIM","Dedicated CSM","SOC 2 report + DPA","Audit log (unlimited)"],cta:"Talk to sales"}];function Kn({title:a="Plans that scale with your team",subtitle:t="Start free, upgrade when you need more. All paid plans include a 14-day trial — no credit card required.",tiers:r=Xn,highlightedLabel:s="Most popular",className:n}={}){const o=r.length;return e.jsxs("div",{className:l("mx-auto max-w-5xl space-y-8 py-16",n),children:[e.jsxs("header",{className:"space-y-3 text-center",children:[e.jsx("h1",{className:"text-3xl font-semibold tracking-tight text-foreground",children:a}),t&&e.jsx("p",{className:"mx-auto max-w-xl text-sm text-foreground-muted",children:t})]}),e.jsx("div",{className:l("grid gap-4",o===2&&"md:grid-cols-2",o===3&&"md:grid-cols-3",o===4&&"md:grid-cols-2 lg:grid-cols-4",o>4&&"md:grid-cols-3"),children:r.map(c=>e.jsxs("div",{className:l("flex flex-col gap-6 rounded-lg border bg-card p-6",c.highlighted?"border-accent shadow-sm":"border-border"),children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:c.name}),c.highlighted&&e.jsx(V,{tone:"accent",children:s})]}),c.description&&e.jsx("p",{className:"text-sm text-foreground-muted",children:c.description})]}),e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"tabular text-3xl font-semibold text-foreground",children:c.price}),c.cadence&&e.jsx("span",{className:"text-sm text-foreground-subtle",children:c.cadence})]}),e.jsx("ul",{className:"space-y-2 text-sm",children:c.features.map(m=>e.jsxs("li",{className:"flex items-start gap-2 text-foreground",children:[e.jsx(d.Check,{className:"mt-0.5 size-4 shrink-0 text-accent","aria-hidden":!0}),m]},m))}),e.jsx(T,{variant:c.highlighted?"primary":"outline",className:"mt-auto w-full",onClick:c.onSelect,children:c.cta})]},c.name))})]})}const Qn=[{icon:e.jsx(d.Plus,{}),title:"Create a project",description:"Track a real piece of work end-to-end.",cta:"New project"},{icon:e.jsx(d.Upload,{}),title:"Import existing data",description:"CSV, Postgres, BigQuery, or Snowflake — connect in a minute.",cta:"Connect source"},{icon:e.jsx(d.Users,{}),title:"Invite your team",description:"Workspaces are better with teammates. We'll send the invites.",cta:"Invite people"}];function Yn({heroIcon:a=e.jsx(d.Folder,{className:"size-6"}),title:t="Your workspace is ready",description:r="Start with one of the steps below — you can always come back to the others.",primaryAction:s=e.jsx(T,{trailingIcon:e.jsx(d.ArrowRight,{}),children:"Open tutorial"}),steps:n=Qn,className:o}={}){return e.jsxs("div",{className:`mx-auto max-w-3xl space-y-8 py-12 ${o??""}`,children:[e.jsx(Oe,{icon:a,title:t,description:r,action:s}),n.length>0&&e.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:n.map(c=>e.jsx(U,{variant:"interactive",children:e.jsxs(G,{className:"space-y-3",children:[c.icon&&e.jsx("div",{className:"inline-flex size-9 items-center justify-center rounded-md bg-accent-soft text-on-accent-soft [&_svg]:size-4",children:c.icon}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h3",{className:"text-sm font-semibold text-foreground",children:c.title}),e.jsx("p",{className:"text-xs text-foreground-muted leading-relaxed",children:c.description})]}),e.jsx(T,{variant:"ghost",size:"sm",trailingIcon:e.jsx(d.ArrowRight,{}),onClick:c.onSelect,children:c.cta})]})},c.title))})]})}Object.defineProperty(exports,"cva",{enumerable:!0,get:()=>X.cva});exports.Accordion=qs;exports.AccordionContent=Lt;exports.AccordionItem=At;exports.AccordionTrigger=Ft;exports.Alert=we;exports.AppShell=Sn;exports.AreaChart=Wa;exports.AuthLayout=pn;exports.Avatar=Y;exports.AvatarGroup=Bt;exports.Badge=V;exports.BarChart=Xa;exports.Breadcrumbs=Ke;exports.Button=T;exports.Calendar=et;exports.Card=U;exports.CardContent=G;exports.CardDescription=te;exports.CardFooter=Ot;exports.CardHeader=H;exports.CardTitle=W;exports.Carousel=Ua;exports.CarouselContent=Ha;exports.CarouselItem=Ga;exports.CarouselNext=qa;exports.CarouselPrevious=Va;exports.Checkbox=pe;exports.Combobox=$t;exports.Command=Ut;exports.CommandDialog=ra;exports.CommandEmpty=Vt;exports.CommandGroup=qt;exports.CommandInput=Ht;exports.CommandItem=Xt;exports.CommandList=Gt;exports.CommandSeparator=Wt;exports.CommandShortcut=ta;exports.ConfirmationDialog=vr;exports.ContextMenu=aa;exports.ContextMenuCheckboxItem=er;exports.ContextMenuContent=Jt;exports.ContextMenuGroup=oa;exports.ContextMenuItem=Zt;exports.ContextMenuLabel=rr;exports.ContextMenuPortal=Kt;exports.ContextMenuRadioGroup=la;exports.ContextMenuRadioItem=tr;exports.ContextMenuSeparator=sr;exports.ContextMenuShortcut=ar;exports.ContextMenuSub=ia;exports.ContextMenuSubContent=Yt;exports.ContextMenuSubTrigger=Qt;exports.ContextMenuTrigger=na;exports.Dashboard=Pn;exports.DataGrid=mr;exports.DataTablePage=$n;exports.DatePicker=fr;exports.DateRangePicker=gr;exports.DesignSystemProvider=ga;exports.Dialog=hr;exports.DialogClose=br;exports.DialogContent=rt;exports.DialogDescription=ot;exports.DialogFooter=at;exports.DialogHeader=st;exports.DialogOverlay=tt;exports.DialogPortal=pr;exports.DialogTitle=nt;exports.DialogTrigger=pa;exports.Drawer=ds;exports.DrawerClose=Qa;exports.DrawerContent=Za;exports.DrawerDescription=sn;exports.DrawerFooter=tn;exports.DrawerHeader=en;exports.DrawerOverlay=us;exports.DrawerPortal=cs;exports.DrawerTitle=rn;exports.DrawerTrigger=Ka;exports.DropdownMenu=Pe;exports.DropdownMenuCheckboxItem=Ye;exports.DropdownMenuContent=ye;exports.DropdownMenuGroup=da;exports.DropdownMenuItem=Qe;exports.DropdownMenuLabel=Fe;exports.DropdownMenuPortal=nr;exports.DropdownMenuRadioGroup=ua;exports.DropdownMenuRadioItem=lr;exports.DropdownMenuSeparator=Ne;exports.DropdownMenuShortcut=dr;exports.DropdownMenuSub=ca;exports.DropdownMenuSubContent=ir;exports.DropdownMenuSubTrigger=or;exports.DropdownMenuTrigger=_e;exports.EmptyState=Oe;exports.ErrorState=jr;exports.FileUpload=nn;exports.FirstRunEmpty=Yn;exports.ForgotPasswordForm=jn;exports.Form=va;exports.FormControl=kr;exports.FormDescription=Sr;exports.FormError=Tr;exports.FormField=ja;exports.FormItem=yr;exports.FormLabel=Cr;exports.IconButton=xe;exports.Icons=Us;exports.Illustrations=Vs;exports.Input=P;exports.Kbd=it;exports.LineChart=ls;exports.MagicLinkSent=Nn;exports.MultiSelect=Dr;exports.Onboarding=Wn;exports.Pagination=mt;exports.Popover=ya;exports.PopoverAnchor=ka;exports.PopoverClose=Sa;exports.PopoverContent=Ir;exports.PopoverTrigger=Ca;exports.Pricing=Kn;exports.Progress=Pr;exports.ProgressCircle=_r;exports.RadioGroup=xt;exports.RadioItem=be;exports.RecordDetail=Vn;exports.ScrollArea=Ar;exports.ScrollBar=ft;exports.Select=lt;exports.SelectContent=Ue;exports.SelectGroup=zr;exports.SelectItem=He;exports.SelectLabel=ut;exports.SelectScrollDownButton=ct;exports.SelectScrollUpButton=dt;exports.SelectSeparator=Mr;exports.SelectTrigger=$e;exports.SelectValue=Na;exports.Separator=le;exports.SettingsPage=An;exports.Sheet=Fr;exports.SheetClose=Ma;exports.SheetContent=gt;exports.SheetDescription=Hr;exports.SheetFooter=$r;exports.SheetHeader=Or;exports.SheetPortal=Er;exports.SheetTitle=Ur;exports.SheetTrigger=Lr;exports.Sidebar=ht;exports.SidebarGroup=Gr;exports.SidebarItem=bt;exports.SidebarSection=pt;exports.SignInForm=bn;exports.SignUpForm=vn;exports.Skeleton=Ze;exports.Slider=Vr;exports.Snackbar=dn;exports.Spinner=qr;exports.Stepper=vt;exports.Switch=ue;exports.Table=Le;exports.TableBody=Be;exports.TableCaption=ur;exports.TableCell=re;exports.TableFooter=cr;exports.TableHead=ne;exports.TableHeader=Ee;exports.TableRow=ae;exports.TableSortHeader=Je;exports.Tabs=Wr;exports.TabsContent=wt;exports.TabsList=jt;exports.TabsTrigger=Nt;exports.TagInput=cn;exports.Textarea=Xr;exports.Timeline=un;exports.TimelineDescription=gn;exports.TimelineItem=mn;exports.TimelineTime=xn;exports.TimelineTitle=fn;exports.Toast=Qr;exports.ToastAction=Zr;exports.ToastClose=es;exports.ToastDescription=Jr;exports.ToastProvider=Ea;exports.ToastTitle=Yr;exports.ToastViewport=Kr;exports.Tooltip=ss;exports.TooltipContent=yt;exports.TooltipProvider=$a;exports.TooltipRoot=ts;exports.TooltipTrigger=rs;exports.TopNav=as;exports.TopNavLink=ns;exports.Tree=hn;exports.brandPresets=ha;exports.cn=l;exports.toast=$s;exports.uid=Es;exports.useCommandPaletteShortcut=sa;exports.useFormField=Ce;exports.useMediaQuery=Mt;exports.usePrefersReducedMotion=Bs;exports.useSidebar=Ia;exports.useToast=Os;
8
8
  //# sourceMappingURL=index.cjs.map