@reeverdev/ui 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import*as U from'react';import {cva}from'class-variance-authority';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {Slot}from'@radix-ui/react-slot';import {Loader2,Check,X,ChevronDown,ChevronUp,ChevronRight,Circle,Search,EyeOff,Eye,Minus,Plus,ChevronsUpDown,Calendar,Heart,Star,PanelLeft,TrendingUp,TrendingDown,Upload,Clock,Menu,ExternalLink,ArrowUp,File,Folder,FolderOpen,Copy,AlertTriangle,RefreshCw,Info,CheckCircle,XCircle,HelpCircle,ZoomOut,ZoomIn,RotateCw,Download,Minimize2,Maximize2,ChevronLeft,GripVertical,Undo,Redo,Heading1,Heading2,Heading3,Bold,Italic,Underline,Strikethrough,List,ListOrdered,AlignLeft,AlignCenter,AlignRight,Quote,Code,Link,Unlink,Moon,Sun,Monitor,MoreHorizontal,AlertCircle,CheckCircle2,MoreVertical,ArrowRight,Hash,User,Settings,Bell,CheckCheck,Trash2,Megaphone,Image,FileVideo,FileAudio,FileText,FileArchive,ArrowDown}from'lucide-react';import*as io from'@radix-ui/react-checkbox';import*as oe from'@radix-ui/react-dialog';import*as zi from'@radix-ui/react-label';import*as Bi from'@radix-ui/react-separator';import*as co from'@radix-ui/react-switch';import*as Et from'@radix-ui/react-avatar';import*as it from'@radix-ui/react-tooltip';import*as Y from'@radix-ui/react-select';import*as _ from'@radix-ui/react-dropdown-menu';import*as st from'@radix-ui/react-popover';import*as lt from'@radix-ui/react-tabs';import {Toaster}from'sonner';export{toast}from'sonner';import*as Ue from'@radix-ui/react-scroll-area';import*as K from'@radix-ui/react-context-menu';import*as fa from'@radix-ui/react-radio-group';import*as es from'@radix-ui/react-toggle';import*as hr from'@radix-ui/react-toggle-group';import*as zt from'@radix-ui/react-slider';import*as Ye from'@radix-ui/react-accordion';import*as xr from'@radix-ui/react-collapsible';import*as le from'@radix-ui/react-alert-dialog';import*as go from'@radix-ui/react-progress';import*as Ya from'@radix-ui/react-hover-card';import*as hc from'@radix-ui/react-aspect-ratio';import*as fe from'@radix-ui/react-navigation-menu';import {Drawer}from'vaul';import {DayPicker}from'react-day-picker';import {Command}from'cmdk';import {format}from'date-fns';import {Panel,Group,Separator}from'react-resizable-panels';import {HexColorPicker,HexColorInput}from'react-colorful';import*as $ from'@radix-ui/react-menubar';import {createPortal}from'react-dom';import*as og from'@radix-ui/react-visually-hidden';import {ResponsiveContainer,LineChart,CartesianGrid,XAxis,YAxis,Tooltip,Legend,Line,BarChart,Bar,PieChart,Pie,Cell,AreaChart,Area}from'recharts';import {useSensors,useSensor,PointerSensor,KeyboardSensor,DndContext,closestCorners,DragOverlay}from'@dnd-kit/core';import {sortableKeyboardCoordinates,SortableContext,verticalListSortingStrategy,useSortable}from'@dnd-kit/sortable';import {CSS}from'@dnd-kit/utilities';import bP from'embla-carousel-react';import {useEditor,EditorContent}from'@tiptap/react';import CP from'@tiptap/starter-kit';import SP from'@tiptap/extension-link';import TP from'@tiptap/extension-underline';import MP from'@tiptap/extension-text-align';import kP from'@tiptap/extension-placeholder';import qP,{centerCrop,makeAspectCrop}from'react-image-crop';import'react-image-crop/dist/ReactCrop.css';import oC from'react-qr-code';import {useTheme,ThemeProvider}from'next-themes';export{useTheme}from'next-themes';import {motion,AnimatePresence,useInView,useSpring,useTransform,useScroll}from'framer-motion';import to from'canvas-confetti';function o(...e){return twMerge(clsx(e))}var ux=cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",{variants:{variant:{solid:"border-transparent bg-primary text-primary-foreground [&>svg]:text-primary-foreground",outline:"border-input bg-transparent text-foreground [&>svg]:text-foreground",ghost:"border-transparent bg-transparent text-foreground [&>svg]:text-foreground",soft:"border-transparent bg-primary/15 text-primary [&>svg]:text-primary",surface:"border-transparent bg-muted text-muted-foreground [&>svg]:text-muted-foreground",destructive:"border-destructive/50 bg-destructive/10 text-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"solid"}}),fx=U.forwardRef(({className:e,variant:t,...a},r)=>jsx("div",{ref:r,role:"alert",className:o(ux({variant:t}),e),...a}));fx.displayName="Alert";var gx=U.forwardRef(({className:e,...t},a)=>jsx("h5",{ref:a,className:o("mb-1 font-medium leading-none tracking-tight",e),...t}));gx.displayName="AlertTitle";var bx=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("text-sm [&_p]:leading-relaxed",e),...t}));bx.displayName="AlertDescription";var hx=cva("inline-flex items-center border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{solid:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-input bg-transparent text-foreground",ghost:"border-transparent bg-transparent text-foreground hover:bg-accent",soft:"border-transparent bg-primary/15 text-primary",surface:"border-transparent bg-muted text-muted-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"solid",radius:"full"}}),no=U.forwardRef(({className:e,variant:t,radius:a,...r},n)=>jsx("div",{ref:n,className:o(hx({variant:t,radius:a}),e),...r}));no.displayName="Badge";var Te=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-all cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{solid:"hover:opacity-90",bordered:"border-2 bg-transparent hover:opacity-70",light:"bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800",flat:"hover:opacity-70",ghost:"border-2 bg-transparent"},colorScheme:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},size:{sm:"h-9 px-3 text-xs",md:"h-10 px-4",lg:"h-12 px-6 text-base",icon:"h-10 w-10"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},compoundVariants:[{variant:"solid",colorScheme:"default",className:"bg-zinc-900 text-white dark:bg-white dark:text-zinc-900"},{variant:"bordered",colorScheme:"default",className:"border-zinc-900 text-zinc-900 dark:border-white dark:text-white"},{variant:"light",colorScheme:"default",className:"text-zinc-900 dark:text-white"},{variant:"flat",colorScheme:"default",className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-white"},{variant:"ghost",colorScheme:"default",className:"border-zinc-900 text-zinc-900 hover:bg-zinc-900 hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-zinc-900"},{variant:"solid",colorScheme:"primary",className:"bg-violet-400 text-white"},{variant:"bordered",colorScheme:"primary",className:"border-violet-400 text-violet-400"},{variant:"light",colorScheme:"primary",className:"text-violet-400 hover:bg-violet-400/10"},{variant:"flat",colorScheme:"primary",className:"bg-violet-400/20 text-violet-400"},{variant:"ghost",colorScheme:"primary",className:"border-violet-400 text-violet-400 hover:bg-violet-400 hover:text-white"},{variant:"solid",colorScheme:"secondary",className:"bg-zinc-500 text-white"},{variant:"bordered",colorScheme:"secondary",className:"border-zinc-500 text-zinc-500"},{variant:"light",colorScheme:"secondary",className:"text-zinc-500 hover:bg-zinc-500/10"},{variant:"flat",colorScheme:"secondary",className:"bg-zinc-500/20 text-zinc-600 dark:text-zinc-400"},{variant:"ghost",colorScheme:"secondary",className:"border-zinc-500 text-zinc-500 hover:bg-zinc-500 hover:text-white"},{variant:"solid",colorScheme:"success",className:"bg-green-500 text-white"},{variant:"bordered",colorScheme:"success",className:"border-green-500 text-green-500"},{variant:"light",colorScheme:"success",className:"text-green-500 hover:bg-green-500/10"},{variant:"flat",colorScheme:"success",className:"bg-green-500/20 text-green-600 dark:text-green-400"},{variant:"ghost",colorScheme:"success",className:"border-green-500 text-green-500 hover:bg-green-500 hover:text-white"},{variant:"solid",colorScheme:"warning",className:"bg-amber-500 text-white"},{variant:"bordered",colorScheme:"warning",className:"border-amber-500 text-amber-500"},{variant:"light",colorScheme:"warning",className:"text-amber-500 hover:bg-amber-500/10"},{variant:"flat",colorScheme:"warning",className:"bg-amber-500/20 text-amber-600 dark:text-amber-400"},{variant:"ghost",colorScheme:"warning",className:"border-amber-500 text-amber-500 hover:bg-amber-500 hover:text-white"},{variant:"solid",colorScheme:"danger",className:"bg-red-500 text-white"},{variant:"bordered",colorScheme:"danger",className:"border-red-500 text-red-500"},{variant:"light",colorScheme:"danger",className:"text-red-500 hover:bg-red-500/10"},{variant:"flat",colorScheme:"danger",className:"bg-red-500/20 text-red-600 dark:text-red-400"},{variant:"ghost",colorScheme:"danger",className:"border-red-500 text-red-500 hover:bg-red-500 hover:text-white"}],defaultVariants:{variant:"solid",colorScheme:"default",size:"md",radius:"md"}}),O=U.forwardRef(({className:e,variant:t,colorScheme:a,size:r,radius:n,asChild:i=false,href:s,loading:l=false,loadingText:d,children:m,disabled:u,...c},g)=>{let p=u||l,v=l?jsxs(Fragment,{children:[jsx(Loader2,{className:"animate-spin"}),d||m]}):m;return i?jsx(Slot,{className:o(Te({variant:t,colorScheme:a,size:r,radius:n,className:e})),ref:g,...c,children:v}):s?jsx("a",{href:s,className:o(Te({variant:t,colorScheme:a,size:r,radius:n,className:e}),p&&"pointer-events-none opacity-50"),...c,children:v}):jsx("button",{className:o(Te({variant:t,colorScheme:a,size:r,radius:n,className:e})),ref:g,disabled:p,...c,children:v})});O.displayName="Button";var Sx=cva("border bg-card text-card-foreground shadow-sm",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"}},defaultVariants:{radius:"lg"}}),$l=U.forwardRef(({className:e,radius:t,...a},r)=>jsx("div",{ref:r,className:o(Sx({radius:t,className:e})),...a}));$l.displayName="Card";var _l=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("flex flex-col space-y-1.5 p-6",e),...t}));_l.displayName="CardHeader";var Kl=U.forwardRef(({className:e,...t},a)=>jsx("h3",{ref:a,className:o("text-2xl font-semibold leading-none tracking-tight",e),...t}));Kl.displayName="CardTitle";var Ul=U.forwardRef(({className:e,...t},a)=>jsx("p",{ref:a,className:o("text-sm text-muted-foreground",e),...t}));Ul.displayName="CardDescription";var Yl=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("p-6 pt-0",e),...t}));Yl.displayName="CardContent";var jl=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("flex items-center p-6 pt-0",e),...t}));jl.displayName="CardFooter";var so=U.forwardRef(({className:e,...t},a)=>jsx(io.Root,{ref:a,className:o("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:jsx(io.Indicator,{className:o("flex items-center justify-center text-current"),children:jsx(Check,{className:"h-4 w-4"})})}));so.displayName=io.Root.displayName;var Hi=oe.Root,kx=oe.Trigger,ql=oe.Portal,Dx=oe.Close,Ai=U.forwardRef(({className:e,...t},a)=>jsx(oe.Overlay,{ref:a,className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Ai.displayName=oe.Overlay.displayName;var Qo=U.forwardRef(({className:e,children:t,...a},r)=>jsxs(ql,{children:[jsx(Ai,{}),jsxs(oe.Content,{ref:r,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,jsxs(oe.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Qo.displayName=oe.Content.displayName;var Zl=({className:e,...t})=>jsx("div",{className:o("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Zl.displayName="DialogHeader";var Ql=({className:e,...t})=>jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ql.displayName="DialogFooter";var Jl=U.forwardRef(({className:e,...t},a)=>jsx(oe.Title,{ref:a,className:o("text-lg font-semibold leading-none tracking-tight",e),...t}));Jl.displayName=oe.Title.displayName;var ed=U.forwardRef(({className:e,...t},a)=>jsx(oe.Description,{ref:a,className:o("text-sm text-muted-foreground",e),...t}));ed.displayName=oe.Description.displayName;var Lx=cva("flex h-10 w-full border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),Jo=U.forwardRef(({className:e,type:t,radius:a,...r},n)=>jsx("input",{type:t,className:o(Lx({radius:a,className:e})),ref:n,...r}));Jo.displayName="Input";var Hx=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),za=U.forwardRef(({className:e,...t},a)=>jsx(zi.Root,{ref:a,className:o(Hx(),e),...t}));za.displayName=zi.Root.displayName;var da=U.forwardRef(({className:e,orientation:t="horizontal",decorative:a=true,...r},n)=>jsx(Bi.Root,{ref:n,decorative:a,orientation:t,className:o("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));da.displayName=Bi.Root.displayName;var id=U.forwardRef(({className:e,...t},a)=>jsx(co.Root,{className:o("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:a,children:jsx(co.Thumb,{className:o("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));id.displayName=co.Root.displayName;var Fx=cva("flex min-h-[80px] w-full border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"md"}}),ld=U.forwardRef(({className:e,radius:t,...a},r)=>jsx("textarea",{className:o(Fx({radius:t,className:e})),ref:r,...a}));ld.displayName="Textarea";var cd=cva("rounded-md bg-muted",{variants:{variant:{pulse:"animate-pulse",wave:"relative overflow-hidden before:absolute before:inset-0 before:-translate-x-full before:animate-shimmer before:bg-gradient-to-r before:from-transparent before:via-white/20 before:to-transparent",shimmer:"relative overflow-hidden before:absolute before:inset-0 before:-translate-x-full before:animate-shimmer before:bg-gradient-to-r before:from-transparent before:via-white/40 before:to-transparent",static:""}},defaultVariants:{variant:"pulse"}}),en=U.forwardRef(({className:e,variant:t,...a},r)=>jsx("div",{ref:r,className:o(cd({variant:t,className:e})),...a}));en.displayName="Skeleton";var _x=cva("relative flex shrink-0 overflow-hidden",{variants:{size:{xs:"h-6 w-6",sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12",xl:"h-14 w-14"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",radius:"full"}}),Ba=U.forwardRef(({className:e,size:t,radius:a,...r},n)=>jsx(Et.Root,{ref:n,className:o(_x({size:t,radius:a,className:e})),...r}));Ba.displayName=Et.Root.displayName;var br=U.forwardRef(({className:e,...t},a)=>jsx(Et.Image,{ref:a,className:o("aspect-square h-full w-full",e),...t}));br.displayName=Et.Image.displayName;var Fa=U.forwardRef(({className:e,...t},a)=>jsx(Et.Fallback,{ref:a,className:o("flex h-full w-full items-center justify-center bg-muted",e),...t}));Fa.displayName=Et.Fallback.displayName;var Oa=it.Provider,Ga=it.Root,Wa=it.Trigger,ca=U.forwardRef(({className:e,sideOffset:t=4,...a},r)=>jsx(it.Portal,{children:jsx(it.Content,{ref:r,sideOffset:t,className:o("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));ca.displayName=it.Content.displayName;var Oi=Y.Root,Yx=Y.Group,Gi=Y.Value,an=U.forwardRef(({className:e,children:t,...a},r)=>jsxs(Y.Trigger,{ref:r,className:o("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...a,children:[t,jsx(Y.Icon,{asChild:true,children:jsx(ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));an.displayName=Y.Trigger.displayName;var Wi=U.forwardRef(({className:e,...t},a)=>jsx(Y.ScrollUpButton,{ref:a,className:o("flex cursor-default items-center justify-center py-1",e),...t,children:jsx(ChevronUp,{className:"h-4 w-4"})}));Wi.displayName=Y.ScrollUpButton.displayName;var $i=U.forwardRef(({className:e,...t},a)=>jsx(Y.ScrollDownButton,{ref:a,className:o("flex cursor-default items-center justify-center py-1",e),...t,children:jsx(ChevronDown,{className:"h-4 w-4"})}));$i.displayName=Y.ScrollDownButton.displayName;var rn=U.forwardRef(({className:e,children:t,position:a="popper",...r},n)=>jsx(Y.Portal,{children:jsxs(Y.Content,{ref:n,className:o("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...r,children:[jsx(Wi,{}),jsx(Y.Viewport,{className:o("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),jsx($i,{})]})}));rn.displayName=Y.Content.displayName;var fd=U.forwardRef(({className:e,...t},a)=>jsx(Y.Label,{ref:a,className:o("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));fd.displayName=Y.Label.displayName;var on=U.forwardRef(({className:e,children:t,...a},r)=>jsxs(Y.Item,{ref:r,className:o("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(Y.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),jsx(Y.ItemText,{children:t})]}));on.displayName=Y.Item.displayName;var gd=U.forwardRef(({className:e,...t},a)=>jsx(Y.Separator,{ref:a,className:o("-mx-1 my-1 h-px bg-muted",e),...t}));gd.displayName=Y.Separator.displayName;var $a=_.Root,_a=_.Trigger,Zx=_.Group,Qx=_.Portal,Jx=_.Sub,ey=_.RadioGroup,bd=U.forwardRef(({className:e,inset:t,children:a,...r},n)=>jsxs(_.SubTrigger,{ref:n,className:o("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[a,jsx(ChevronRight,{className:"ml-auto"})]}));bd.displayName=_.SubTrigger.displayName;var vd=U.forwardRef(({className:e,...t},a)=>jsx(_.SubContent,{ref:a,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));vd.displayName=_.SubContent.displayName;var pa=U.forwardRef(({className:e,sideOffset:t=4,...a},r)=>jsx(_.Portal,{children:jsx(_.Content,{ref:r,sideOffset:t,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md 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-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));pa.displayName=_.Content.displayName;var xt=U.forwardRef(({className:e,inset:t,...a},r)=>jsx(_.Item,{ref:r,className:o("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));xt.displayName=_.Item.displayName;var hd=U.forwardRef(({className:e,children:t,checked:a,...r},n)=>jsxs(_.CheckboxItem,{ref:n,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...r,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(_.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),t]}));hd.displayName=_.CheckboxItem.displayName;var xd=U.forwardRef(({className:e,children:t,...a},r)=>jsxs(_.RadioItem,{ref:r,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(_.ItemIndicator,{children:jsx(Circle,{className:"h-2 w-2 fill-current"})})}),t]}));xd.displayName=_.RadioItem.displayName;var yd=U.forwardRef(({className:e,inset:t,...a},r)=>jsx(_.Label,{ref:r,className:o("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));yd.displayName=_.Label.displayName;var nn=U.forwardRef(({className:e,...t},a)=>jsx(_.Separator,{ref:a,className:o("-mx-1 my-1 h-px bg-muted",e),...t}));nn.displayName=_.Separator.displayName;var Rd=({className:e,...t})=>jsx("span",{className:o("ml-auto text-xs tracking-widest opacity-60",e),...t});Rd.displayName="DropdownMenuShortcut";var ve=st.Root,Re=st.Trigger,Ui=st.Anchor,ue=U.forwardRef(({className:e,align:t="center",sideOffset:a=4,...r},n)=>jsx(st.Portal,{children:jsx(st.Content,{ref:n,align:t,sideOffset:a,className:o("z-50 w-72 rounded-md 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-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",e),...r})}));ue.displayName=st.Content.displayName;var ty=lt.Root,Pd=U.forwardRef(({className:e,...t},a)=>jsx(lt.List,{ref:a,className:o("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Pd.displayName=lt.List.displayName;var Cd=U.forwardRef(({className:e,...t},a)=>jsx(lt.Trigger,{ref:a,className:o("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Cd.displayName=lt.Trigger.displayName;var Sd=U.forwardRef(({className:e,...t},a)=>jsx(lt.Content,{ref:a,className:o("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Sd.displayName=lt.Content.displayName;var po=oe.Root,oy=oe.Trigger,ny=oe.Close,Td=oe.Portal,Xi=U.forwardRef(({className:e,...t},a)=>jsx(oe.Overlay,{className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));Xi.displayName=oe.Overlay.displayName;var Md=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),vr=U.forwardRef(({side:e="right",className:t,children:a,...r},n)=>jsxs(Td,{children:[jsx(Xi,{}),jsxs(oe.Content,{ref:n,className:o(Md({side:e}),t),...r,children:[jsxs(oe.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));vr.displayName=oe.Content.displayName;var kd=({className:e,...t})=>jsx("div",{className:o("flex flex-col space-y-2 text-center sm:text-left",e),...t});kd.displayName="SheetHeader";var Dd=({className:e,...t})=>jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Dd.displayName="SheetFooter";var Vd=U.forwardRef(({className:e,...t},a)=>jsx(oe.Title,{ref:a,className:o("text-lg font-semibold text-foreground",e),...t}));Vd.displayName=oe.Title.displayName;var Ld=U.forwardRef(({className:e,...t},a)=>jsx(oe.Description,{ref:a,className:o("text-sm text-muted-foreground",e),...t}));Ld.displayName=oe.Description.displayName;var ly=({theme:e="system",...t})=>jsx(Toaster,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t});var dt=U.forwardRef(({className:e,children:t,...a},r)=>jsxs(Ue.Root,{ref:r,className:o("relative overflow-hidden",e),...a,children:[jsx(Ue.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),jsx(Zi,{}),jsx(Ue.Corner,{})]}));dt.displayName=Ue.Root.displayName;var Zi=U.forwardRef(({className:e,orientation:t="vertical",...a},r)=>jsx(Ue.ScrollAreaScrollbar,{ref:r,orientation:t,className:o("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:jsx(Ue.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Zi.displayName=Ue.ScrollAreaScrollbar.displayName;var fy=K.Root,gy=K.Trigger,by=K.Group,vy=K.Portal,hy=K.Sub,xy=K.RadioGroup,Id=U.forwardRef(({className:e,inset:t,children:a,...r},n)=>jsxs(K.SubTrigger,{ref:n,className:o("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...r,children:[a,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]}));Id.displayName=K.SubTrigger.displayName;var Ed=U.forwardRef(({className:e,...t},a)=>jsx(K.SubContent,{ref:a,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]",e),...t}));Ed.displayName=K.SubContent.displayName;var Hd=U.forwardRef(({className:e,...t},a)=>jsx(K.Portal,{children:jsx(K.Content,{ref:a,className:o("z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md 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-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]",e),...t})}));Hd.displayName=K.Content.displayName;var Ad=U.forwardRef(({className:e,inset:t,...a},r)=>jsx(K.Item,{ref:r,className:o("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...a}));Ad.displayName=K.Item.displayName;var zd=U.forwardRef(({className:e,children:t,checked:a,...r},n)=>jsxs(K.CheckboxItem,{ref:n,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...r,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(K.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),t]}));zd.displayName=K.CheckboxItem.displayName;var Bd=U.forwardRef(({className:e,children:t,...a},r)=>jsxs(K.RadioItem,{ref:r,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(K.ItemIndicator,{children:jsx(Circle,{className:"h-4 w-4 fill-current"})})}),t]}));Bd.displayName=K.RadioItem.displayName;var Fd=U.forwardRef(({className:e,inset:t,...a},r)=>jsx(K.Label,{ref:r,className:o("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...a}));Fd.displayName=K.Label.displayName;var Od=U.forwardRef(({className:e,...t},a)=>jsx(K.Separator,{ref:a,className:o("-mx-1 my-1 h-px bg-border",e),...t}));Od.displayName=K.Separator.displayName;var Gd=({className:e,...t})=>jsx("span",{className:o("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Gd.displayName="ContextMenuShortcut";var Wd=U.forwardRef(({className:e,...t},a)=>jsx(fa.Root,{className:o("grid gap-2",e),...t,ref:a}));Wd.displayName=fa.Root.displayName;var $d=U.forwardRef(({className:e,...t},a)=>jsx(fa.Item,{ref:a,className:o("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:jsx(fa.Indicator,{className:"flex items-center justify-center",children:jsx(Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}));$d.displayName=fa.Item.displayName;var dn=cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2",{variants:{variant:{solid:"bg-transparent hover:bg-muted data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",outline:"border border-input bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",ghost:"bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",soft:"bg-transparent hover:bg-primary/10 data-[state=on]:bg-primary/15 data-[state=on]:text-primary",surface:"bg-muted/50 hover:bg-muted data-[state=on]:bg-muted data-[state=on]:text-foreground"},size:{sm:"h-9 px-2.5 min-w-9",md:"h-10 px-3 min-w-10",lg:"h-11 px-5 min-w-11"}},defaultVariants:{variant:"solid",size:"md"}}),Kd=U.forwardRef(({className:e,variant:t,size:a,...r},n)=>jsx(es.Root,{ref:n,className:o(dn({variant:t,size:a,className:e})),...r}));Kd.displayName=es.Root.displayName;var Ud=U.createContext({size:"md",variant:"solid"}),Yd=U.forwardRef(({className:e,variant:t,size:a,children:r,...n},i)=>jsx(hr.Root,{ref:i,className:o("flex items-center justify-center gap-1",e),...n,children:jsx(Ud.Provider,{value:{variant:t,size:a},children:r})}));Yd.displayName=hr.Root.displayName;var jd=U.forwardRef(({className:e,children:t,variant:a,size:r,...n},i)=>{let s=U.useContext(Ud);return jsx(hr.Item,{ref:i,className:o(dn({variant:s.variant||a,size:s.size||r}),e),...n,children:t})});jd.displayName=hr.Item.displayName;var cn=U.forwardRef(({className:e,...t},a)=>jsxs(zt.Root,{ref:a,className:o("relative flex w-full touch-none select-none items-center",e),...t,children:[jsx(zt.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:jsx(zt.Range,{className:"absolute h-full bg-primary"})}),jsx(zt.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));cn.displayName=zt.Root.displayName;var Cy=Ye.Root,qd=U.forwardRef(({className:e,...t},a)=>jsx(Ye.Item,{ref:a,className:o("border-b",e),...t}));qd.displayName="AccordionItem";var Zd=U.forwardRef(({className:e,children:t,...a},r)=>jsx(Ye.Header,{className:"flex",children:jsxs(Ye.Trigger,{ref:r,className:o("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",e),...a,children:[t,jsx(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Zd.displayName=Ye.Trigger.displayName;var Qd=U.forwardRef(({className:e,children:t,...a},r)=>jsx(Ye.Content,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...a,children:jsx("div",{className:o("pb-4 pt-0",e),children:t})}));Qd.displayName=Ye.Content.displayName;var Ty=xr.Root,My=xr.CollapsibleTrigger,ky=xr.CollapsibleContent;var Dy=le.Root,Vy=le.Trigger,Jd=le.Portal,rs=U.forwardRef(({className:e,...t},a)=>jsx(le.Overlay,{className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));rs.displayName=le.Overlay.displayName;var ec=U.forwardRef(({className:e,...t},a)=>jsxs(Jd,{children:[jsx(rs,{}),jsx(le.Content,{ref:a,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));ec.displayName=le.Content.displayName;var tc=({className:e,...t})=>jsx("div",{className:o("flex flex-col space-y-2 text-center sm:text-left",e),...t});tc.displayName="AlertDialogHeader";var ac=({className:e,...t})=>jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ac.displayName="AlertDialogFooter";var rc=U.forwardRef(({className:e,...t},a)=>jsx(le.Title,{ref:a,className:o("text-lg font-semibold",e),...t}));rc.displayName=le.Title.displayName;var oc=U.forwardRef(({className:e,...t},a)=>jsx(le.Description,{ref:a,className:o("text-sm text-muted-foreground",e),...t}));oc.displayName=le.Description.displayName;var nc=U.forwardRef(({className:e,...t},a)=>jsx(le.Action,{ref:a,className:o(Te(),e),...t}));nc.displayName=le.Action.displayName;var ic=U.forwardRef(({className:e,...t},a)=>jsx(le.Cancel,{ref:a,className:o(Te({variant:"bordered"}),"mt-2 sm:mt-0",e),...t}));ic.displayName=le.Cancel.displayName;var pn=U.forwardRef(({className:e,value:t,...a},r)=>jsx(go.Root,{ref:r,className:o("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:jsx(go.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));pn.displayName=go.Root.displayName;var Iy=Ya.Root,Ey=Ya.Trigger,cc=U.forwardRef(({className:e,align:t="center",sideOffset:a=4,...r},n)=>jsx(Ya.Content,{ref:n,align:t,sideOffset:a,className:o("z-50 w-64 rounded-md 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-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));cc.displayName=Ya.Content.displayName;var mc=U.forwardRef(({...e},t)=>jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));mc.displayName="Breadcrumb";var pc=U.forwardRef(({className:e,...t},a)=>jsx("ol",{ref:a,className:o("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));pc.displayName="BreadcrumbList";var uc=U.forwardRef(({className:e,...t},a)=>jsx("li",{ref:a,className:o("inline-flex items-center gap-1.5",e),...t}));uc.displayName="BreadcrumbItem";var fc=U.forwardRef(({asChild:e,className:t,...a},r)=>jsx(e?Slot:"a",{ref:r,className:o("transition-colors hover:text-foreground",t),...a}));fc.displayName="BreadcrumbLink";var gc=U.forwardRef(({className:e,...t},a)=>jsx("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:o("font-normal text-foreground",e),...t}));gc.displayName="BreadcrumbPage";var bc=({children:e,className:t,...a})=>jsx("li",{role:"presentation","aria-hidden":"true",className:o("[&>svg]:h-3.5 [&>svg]:w-3.5",t),...a,children:e??jsx(ChevronRight,{})});bc.displayName="BreadcrumbSeparator";var vc=({className:e,...t})=>jsxs("span",{role:"presentation","aria-hidden":"true",className:o("flex h-9 w-9 items-center justify-center",e),...t,children:[jsx(MoreHorizontal,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"More"})]});vc.displayName="BreadcrumbEllipsis";var Oy=hc.Root;var xc=U.forwardRef(({className:e,children:t,...a},r)=>jsxs(fe.Root,{ref:r,className:o("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...a,children:[t,jsx(os,{})]}));xc.displayName=fe.Root.displayName;var yc=U.forwardRef(({className:e,...t},a)=>jsx(fe.List,{ref:a,className:o("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));yc.displayName=fe.List.displayName;var $y=fe.Item,Rc=cva("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),wc=U.forwardRef(({className:e,children:t,...a},r)=>jsxs(fe.Trigger,{ref:r,className:o(Rc(),"group",e),...a,children:[t," ",jsx(ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));wc.displayName=fe.Trigger.displayName;var Nc=U.forwardRef(({className:e,...t},a)=>jsx(fe.Content,{ref:a,className:o("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto",e),...t}));Nc.displayName=fe.Content.displayName;var _y=fe.Link,os=U.forwardRef(({className:e,...t},a)=>jsx("div",{className:o("absolute left-0 top-full flex justify-center"),children:jsx(fe.Viewport,{className:o("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:a,...t})}));os.displayName=fe.Viewport.displayName;var Pc=U.forwardRef(({className:e,...t},a)=>jsx(fe.Indicator,{ref:a,className:o("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));Pc.displayName=fe.Indicator.displayName;var Tc=({shouldScaleBackground:e=true,...t})=>jsx(Drawer.Root,{shouldScaleBackground:e,...t});Tc.displayName="Drawer";var Ky=Drawer.Trigger,Mc=Drawer.Portal,Uy=Drawer.Close,ns=U.forwardRef(({className:e,...t},a)=>jsx(Drawer.Overlay,{ref:a,className:o("fixed inset-0 z-50 bg-black/80",e),...t}));ns.displayName=Drawer.Overlay.displayName;var kc=U.forwardRef(({className:e,children:t,...a},r)=>jsxs(Mc,{children:[jsx(ns,{}),jsxs(Drawer.Content,{ref:r,className:o("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...a,children:[jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));kc.displayName="DrawerContent";var Dc=({className:e,...t})=>jsx("div",{className:o("grid gap-1.5 p-4 text-center sm:text-left",e),...t});Dc.displayName="DrawerHeader";var Vc=({className:e,...t})=>jsx("div",{className:o("mt-auto flex flex-col gap-2 p-4",e),...t});Vc.displayName="DrawerFooter";var Lc=U.forwardRef(({className:e,...t},a)=>jsx(Drawer.Title,{ref:a,className:o("text-lg font-semibold leading-none tracking-tight",e),...t}));Lc.displayName=Drawer.Title.displayName;var Ic=U.forwardRef(({className:e,...t},a)=>jsx(Drawer.Description,{ref:a,className:o("text-sm text-muted-foreground",e),...t}));Ic.displayName=Drawer.Description.displayName;var Ec=U.forwardRef(({className:e,...t},a)=>jsx("div",{className:"relative w-full overflow-auto",children:jsx("table",{ref:a,className:o("w-full caption-bottom text-sm",e),...t})}));Ec.displayName="Table";var Hc=U.forwardRef(({className:e,...t},a)=>jsx("thead",{ref:a,className:o("[&_tr]:border-b",e),...t}));Hc.displayName="TableHeader";var Ac=U.forwardRef(({className:e,...t},a)=>jsx("tbody",{ref:a,className:o("[&_tr:last-child]:border-0",e),...t}));Ac.displayName="TableBody";var zc=U.forwardRef(({className:e,...t},a)=>jsx("tfoot",{ref:a,className:o("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));zc.displayName="TableFooter";var Bc=U.forwardRef(({className:e,...t},a)=>jsx("tr",{ref:a,className:o("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Bc.displayName="TableRow";var Fc=U.forwardRef(({className:e,...t},a)=>jsx("th",{ref:a,className:o("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Fc.displayName="TableHead";var Oc=U.forwardRef(({className:e,...t},a)=>jsx("td",{ref:a,className:o("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Oc.displayName="TableCell";var Gc=U.forwardRef(({className:e,...t},a)=>jsx("caption",{ref:a,className:o("mt-4 text-sm text-muted-foreground",e),...t}));Gc.displayName="TableCaption";var $c=cva("animate-spin text-muted-foreground",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-6 w-6",xl:"h-8 w-8"}},defaultVariants:{size:"md"}}),_c=U.forwardRef(({className:e,size:t,...a},r)=>jsx(Loader2,{ref:r,className:o($c({size:t,className:e})),...a}));_c.displayName="Spinner";function Rr({className:e,classNames:t,showOutsideDays:a=true,...r}){return jsx(DayPicker,{showOutsideDays:a,className:o("p-3",e),classNames:{months:"flex flex-col sm:flex-row gap-4",month:"flex flex-col gap-4",month_caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",button_previous:o(Te({variant:"bordered"}),"absolute left-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),button_next:o(Te({variant:"bordered"}),"absolute right-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),month_grid:"w-full border-collapse space-y-1",weekdays:"flex",weekday:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",week:"flex w-full mt-2",day:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day_button:o(Te({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),range_end:"day-range-end",selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",today:"bg-accent text-accent-foreground",outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",disabled:"text-muted-foreground opacity-50",range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...t},components:{Chevron:({orientation:n})=>n==="left"?jsx(ChevronLeft,{className:"h-4 w-4"}):jsx(ChevronRight,{className:"h-4 w-4"})},...r})}Rr.displayName="Calendar";var Kc=({className:e,...t})=>jsx("nav",{role:"navigation","aria-label":"pagination",className:o("mx-auto flex w-full justify-center",e),...t});Kc.displayName="Pagination";var Uc=U.forwardRef(({className:e,...t},a)=>jsx("ul",{ref:a,className:o("flex flex-row items-center gap-1",e),...t}));Uc.displayName="PaginationContent";var Yc=U.forwardRef(({className:e,...t},a)=>jsx("li",{ref:a,className:o("",e),...t}));Yc.displayName="PaginationItem";var un=({className:e,isActive:t,size:a="icon",...r})=>jsx("a",{"aria-current":t?"page":void 0,className:o(Te({variant:t?"bordered":"ghost",size:a}),e),...r});un.displayName="PaginationLink";var jc=({className:e,...t})=>jsxs(un,{"aria-label":"Go to previous page",size:"md",className:o("gap-1 pl-2.5",e),...t,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{children:"Previous"})]});jc.displayName="PaginationPrevious";var Xc=({className:e,...t})=>jsxs(un,{"aria-label":"Go to next page",size:"md",className:o("gap-1 pr-2.5",e),...t,children:[jsx("span",{children:"Next"}),jsx(ChevronRight,{className:"h-4 w-4"})]});Xc.displayName="PaginationNext";var qc=({className:e,...t})=>jsxs("span",{"aria-hidden":true,className:o("flex h-9 w-9 items-center justify-center",e),...t,children:[jsx(MoreHorizontal,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"More pages"})]});qc.displayName="PaginationEllipsis";var ds=U.forwardRef(({className:e,...t},a)=>jsx(Command,{ref:a,className:o("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));ds.displayName=Command.displayName;var rR=({children:e,...t})=>jsx(Hi,{...t,children:jsx(Qo,{className:"overflow-hidden p-0 shadow-lg",children:jsx(ds,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Zc=U.forwardRef(({className:e,...t},a)=>jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[jsx(Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsx(Command.Input,{ref:a,className:o("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Zc.displayName=Command.Input.displayName;var Qc=U.forwardRef(({className:e,...t},a)=>jsx(Command.List,{ref:a,className:o("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Qc.displayName=Command.List.displayName;var Jc=U.forwardRef((e,t)=>jsx(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Jc.displayName=Command.Empty.displayName;var em=U.forwardRef(({className:e,...t},a)=>jsx(Command.Group,{ref:a,className:o("overflow-hidden p-1 text-foreground [&_[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-muted-foreground",e),...t}));em.displayName=Command.Group.displayName;var tm=U.forwardRef(({className:e,...t},a)=>jsx(Command.Separator,{ref:a,className:o("-mx-1 h-px bg-border",e),...t}));tm.displayName=Command.Separator.displayName;var am=U.forwardRef(({className:e,...t},a)=>jsx(Command.Item,{ref:a,className:o("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));am.displayName=Command.Item.displayName;var rm=({className:e,...t})=>jsx("span",{className:o("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});rm.displayName="CommandShortcut";var om=U.forwardRef(({className:e,showToggle:t=true,disabled:a,...r},n)=>{let[i,s]=U.useState(false);return jsxs("div",{className:"relative",children:[jsx("input",{type:i?"text":"password",className:o("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t&&"pr-10",e),ref:n,disabled:a,...r}),t&&jsx(O,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-10 w-10 px-3 hover:bg-transparent",onClick:()=>s(!i),disabled:a,tabIndex:-1,"aria-label":i?"Hide password":"Show password",children:i?jsx(EyeOff,{className:"h-4 w-4 text-muted-foreground"}):jsx(Eye,{className:"h-4 w-4 text-muted-foreground"})})]})});om.displayName="PasswordInput";var nm=U.forwardRef(({className:e,showButtons:t=true,step:a=1,min:r,max:n,value:i,defaultValue:s,onChange:l,disabled:d,...m},u)=>{let[c,g]=U.useState(s),p=i!==void 0,v=p?i:c,N=x=>{x!==void 0&&(r!==void 0&&x<r&&(x=r),n!==void 0&&x>n&&(x=n)),p||g(x),l?.(x);},b=()=>{N((v??0)+a);},h=()=>{N((v??0)-a);},w=x=>{let S=x.target.value;if(S==="")N(void 0);else {let k=parseFloat(S);isNaN(k)||N(k);}},f=x=>{x.key==="ArrowUp"?(x.preventDefault(),b()):x.key==="ArrowDown"&&(x.preventDefault(),h());},y=r===void 0||(v??0)>r,P=n===void 0||(v??0)<n;return jsxs("div",{className:"relative flex items-center",children:[t&&jsx(O,{type:"button",variant:"bordered",size:"icon",className:"h-10 w-10 rounded-r-none border-r-0",onClick:h,disabled:d||!y,tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:"h-4 w-4"})}),jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:o("flex h-10 w-full bg-background px-3 py-2 text-sm text-center ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t?"border-y border-input rounded-none":"border border-input rounded-md",e),ref:u,value:v??"",onChange:w,onKeyDown:f,disabled:d,...m}),t&&jsx(O,{type:"button",variant:"bordered",size:"icon",className:"h-10 w-10 rounded-l-none border-l-0",onClick:b,disabled:d||!P,tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:"h-4 w-4"})})]})});nm.displayName="NumberInput";var im=U.forwardRef(({options:e,value:t,defaultValue:a=[],onValueChange:r,placeholder:n="Select items...",searchPlaceholder:i="Search...",emptyText:s="No items found.",maxItems:l,showCount:d=false,disabled:m=false,className:u},c)=>{let[g,p]=U.useState(false),[v,N]=U.useState(""),[b,h]=U.useState(a),w=t!==void 0,f=w?t:b,y=R=>{w||h(R),r?.(R);},P=R=>{let C=f.includes(R)?f.filter(D=>D!==R):l&&f.length>=l?f:[...f,R];y(C);},x=R=>{y(f.filter(C=>C!==R));},S=()=>{y([]);},k=e.filter(R=>f.includes(R.value)),M=e.filter(R=>R.label.toLowerCase().includes(v.toLowerCase()));return jsxs(ve,{open:g,onOpenChange:p,children:[jsx(Re,{asChild:true,children:jsxs(O,{ref:c,variant:"bordered",role:"combobox","aria-expanded":g,disabled:m,className:o("w-full justify-between h-auto min-h-10",f.length>0?"px-2 py-1.5":"px-3 py-2",u),children:[f.length===0?jsx("span",{className:"text-muted-foreground font-normal",children:n}):d?jsxs("span",{className:"font-normal",children:[f.length," selected"]}):jsx("div",{className:"flex flex-wrap gap-1",children:k.map(R=>jsxs(no,{variant:"soft",className:"mr-1",children:[R.label,jsx("button",{type:"button",className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",onKeyDown:C=>{C.key==="Enter"&&(C.preventDefault(),C.stopPropagation(),x(R.value));},onMouseDown:C=>{C.preventDefault(),C.stopPropagation();},onClick:C=>{C.preventDefault(),C.stopPropagation(),x(R.value);},children:jsx(X,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},R.value))}),jsx(ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),jsx(ue,{className:"w-[--radix-popover-trigger-width] p-0",align:"start",children:jsxs(Command,{className:"overflow-hidden rounded-md",children:[jsxs("div",{className:"flex items-center border-b px-3",children:[jsx(Command.Input,{value:v,onValueChange:N,placeholder:i,className:"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),f.length>0&&jsx("button",{type:"button",onClick:S,className:"ml-2 text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),jsxs(Command.List,{className:"max-h-[200px] overflow-y-auto p-1",children:[M.length===0&&jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:s}),M.map(R=>{let C=f.includes(R.value),D=R.disabled||!C&&l!==void 0&&f.length>=l;return jsxs(Command.Item,{value:R.value,disabled:D,onSelect:()=>P(R.value),className:o("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground"),children:[jsx("div",{className:o("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",C?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:jsx(Check,{className:"h-3 w-3"})}),R.label]},R.value)})]})]})})]})});im.displayName="MultiSelect";var sm=U.forwardRef(({options:e,value:t,defaultValue:a="",onValueChange:r,placeholder:n="Select...",searchPlaceholder:i="Search...",emptyText:s="No results found.",disabled:l=false,clearable:d=false,className:m},u)=>{let[c,g]=U.useState(false),[p,v]=U.useState(""),[N,b]=U.useState(a),h=t!==void 0,w=h?t:N,f=S=>{h||b(S),r?.(S);},y=S=>{f(d&&w===S?"":S),g(false),v("");},P=e.find(S=>S.value===w),x=e.filter(S=>S.label.toLowerCase().includes(p.toLowerCase()));return jsxs(ve,{open:c,onOpenChange:g,children:[jsx(Re,{asChild:true,children:jsxs(O,{ref:u,variant:"bordered",role:"combobox","aria-expanded":c,disabled:l,className:o("w-full justify-between font-normal",!w&&"text-muted-foreground",m),children:[P?P.label:n,jsx(ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),jsx(ue,{className:"w-[--radix-popover-trigger-width] p-0",align:"start",children:jsxs(Command,{className:"overflow-hidden rounded-md",children:[jsx("div",{className:"flex items-center border-b px-3",children:jsx(Command.Input,{value:p,onValueChange:v,placeholder:i,className:"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"})}),jsxs(Command.List,{className:"max-h-[200px] overflow-y-auto p-1",children:[x.length===0&&jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:s}),x.map(S=>jsxs(Command.Item,{value:S.value,disabled:S.disabled,onSelect:()=>y(S.value),className:o("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground"),children:[jsx(Check,{className:o("mr-2 h-4 w-4",w===S.value?"opacity-100":"opacity-0")}),S.label]},S.value))]})]})})]})});sm.displayName="Combobox";var dm=U.forwardRef(({value:e,defaultValue:t,onValueChange:a,placeholder:r="Pick a date",dateFormat:n="PPP",disabled:i=false,minDate:s,maxDate:l,className:d},m)=>{let[u,c]=U.useState(false),[g,p]=U.useState(t),v=e!==void 0,N=v?e:g,b=h=>{v||p(h),a?.(h),c(false);};return jsxs(ve,{open:u,onOpenChange:c,children:[jsx(Re,{asChild:true,children:jsxs(O,{ref:m,variant:"bordered",disabled:i,className:o("w-full justify-start text-left font-normal",!N&&"text-muted-foreground",d),children:[jsx(Calendar,{className:"mr-2 h-4 w-4"}),N?format(N,n):r]})}),jsx(ue,{className:"w-auto p-0",align:"start",children:jsx(Rr,{mode:"single",selected:N,onSelect:b,disabled:h=>!!(s&&h<s||l&&h>l),initialFocus:true})})]})});dm.displayName="DatePicker";var um=cva("flex -space-x-2",{variants:{size:{sm:"-space-x-1.5",md:"-space-x-2",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),cm=cva("border-2 border-background ring-0",{variants:{size:{sm:"h-6 w-6 text-xs",md:"h-8 w-8 text-sm",lg:"h-10 w-10 text-base"}},defaultVariants:{size:"md"}}),fm=U.forwardRef(({className:e,items:t,max:a=5,size:r,showTooltips:n=false,...i},s)=>{let l=t.slice(0,a),d=t.length-a,m=(c,g)=>{let p=jsxs(Ba,{className:o(cm({size:r})),children:[c.src&&jsx(br,{src:c.src,alt:c.alt||""}),jsx(Fa,{className:"text-xs",children:c.fallback||c.alt?.charAt(0)?.toUpperCase()||"?"})]},g);return n&&c.alt?jsxs(Ga,{children:[jsx(Wa,{asChild:true,children:p}),jsx(ca,{children:c.alt})]},g):p},u=jsxs("div",{ref:s,className:o(um({size:r,className:e})),...i,children:[l.map((c,g)=>m(c,g)),d>0&&jsx(Ba,{className:o(cm({size:r})),children:jsxs(Fa,{className:"bg-muted text-muted-foreground",children:["+",d]})})]});return n?jsx(Oa,{delayDuration:300,children:u}):u});fm.displayName="AvatarGroup";var gm=cva("flex gap-0.5",{variants:{size:{sm:"[&_svg]:h-4 [&_svg]:w-4",md:"[&_svg]:h-5 [&_svg]:w-5",lg:"[&_svg]:h-6 [&_svg]:w-6"}},defaultVariants:{size:"md"}}),bm=U.forwardRef(({className:e,value:t,defaultValue:a=0,onValueChange:r,max:n=5,size:i,icon:s="star",allowHalf:l=false,readOnly:d=false,disabled:m=false,filledColor:u,emptyColor:c,...g},p)=>{let[v,N]=U.useState(a),[b,h]=U.useState(null),w=t!==void 0,f=w?t:v,y=b!==null?b:f,P=T=>{d||m||(w||N(T),r?.(T));},x=(T,I=false)=>{let L=l&&I?T+.5:T+1;P(L);},S=(T,I)=>{if(d||m)return;let L=T.currentTarget.getBoundingClientRect(),V=l&&T.clientX<L.left+L.width/2;h(V?I+.5:I+1);},k=()=>{h(null);},M=s==="heart"?Heart:Star,R=T=>y>=T+1?"full":y>=T+.5?"half":"empty",C=u?{color:u,fill:u}:{},D=c?{color:c}:{};return jsx("div",{ref:p,className:o(gm({size:i,className:e}),m&&"opacity-50 cursor-not-allowed"),onMouseLeave:k,role:"radiogroup","aria-label":"Rating",...g,children:Array.from({length:n},(T,I)=>{let L=R(I);return jsxs("button",{type:"button",className:o("relative focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",!d&&!m&&"cursor-pointer hover:scale-110 transition-transform"),onClick:V=>{let E=V.currentTarget.getBoundingClientRect(),A=l&&V.clientX<E.left+E.width/2;x(I,A);},onMouseMove:V=>S(V,I),disabled:m||d,"aria-label":`Rate ${I+1} out of ${n}`,role:"radio","aria-checked":f===I+1,children:[jsx(M,{className:o("text-muted-foreground/30",L!=="empty"&&"absolute inset-0"),style:L==="empty"?D:void 0}),L!=="empty"&&jsx(M,{className:o("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",L==="half"&&"clip-path-half"),style:{...C,clipPath:L==="half"?"inset(0 50% 0 0)":void 0}})]},I)})})});bm.displayName="Rating";var PR="16rem",CR="18rem",SR="3rem",TR="b",vm=U.createContext(null);function wo(){let e=U.useContext(vm);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}var hm=U.forwardRef(({defaultOpen:e=true,open:t,onOpenChange:a,className:r,style:n,children:i,...s},l)=>{let[d,m]=U.useState(false),[u,c]=U.useState(false),[g,p]=U.useState(e),v=t??g,N=U.useCallback(f=>{let y=typeof f=="function"?f(v):f;a?a(y):p(y);},[a,v]);U.useEffect(()=>{let f=()=>{m(window.innerWidth<768);};return f(),window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)},[]);let b=U.useCallback(()=>d?c(f=>!f):N(f=>!f),[d,N,c]);U.useEffect(()=>{let f=y=>{y.key===TR&&(y.metaKey||y.ctrlKey)&&(y.preventDefault(),b());};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[b]);let h=v?"expanded":"collapsed",w=U.useMemo(()=>({state:h,open:v,setOpen:N,isMobile:d,openMobile:u,setOpenMobile:c,toggleSidebar:b}),[h,v,N,d,u,c,b]);return jsx(vm.Provider,{value:w,children:jsx(Oa,{delayDuration:0,children:jsx("div",{ref:l,style:{"--sidebar-width":PR,"--sidebar-width-icon":SR,...n},className:o("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),...s,children:i})})})});hm.displayName="SidebarProvider";var xm=U.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:r,children:n,...i},s)=>{let{isMobile:l,state:d,openMobile:m,setOpenMobile:u}=wo();return a==="none"?jsx("div",{ref:s,className:o("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),...i,children:n}):l?jsx(po,{open:m,onOpenChange:u,children:jsx(vr,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":CR},side:e,children:jsx("div",{className:"flex h-full w-full flex-col",children:n})})}):jsxs("div",{ref:s,className:"group peer hidden md:block text-sidebar-foreground","data-state":d,"data-collapsible":d==="collapsed"?a:"","data-variant":t,"data-side":e,children:[jsx("div",{className:o("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),jsx("div",{className:o("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...i,children:jsx("div",{"data-sidebar":"sidebar",className:o("flex h-full w-full flex-col bg-sidebar",t==="floating"&&"overflow-hidden rounded-lg border border-sidebar-border shadow-sm",t==="inset"&&"overflow-hidden rounded-lg border border-sidebar-border"),children:n})})]})});xm.displayName="Sidebar";var ym=U.forwardRef(({className:e,onClick:t,...a},r)=>{let{toggleSidebar:n}=wo();return jsxs(O,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:o("h-7 w-7",e),onClick:i=>{t?.(i),n();},...a,children:[jsx(PanelLeft,{}),jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});ym.displayName="SidebarTrigger";var Rm=U.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:r}=wo();return jsx("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:o("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Rm.displayName="SidebarRail";var wm=U.forwardRef(({className:e,...t},a)=>jsx("main",{ref:a,className:o("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));wm.displayName="SidebarInset";var Nm=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,"data-sidebar":"header",className:o("flex flex-col gap-2 p-2",e),...t}));Nm.displayName="SidebarHeader";var Pm=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,"data-sidebar":"footer",className:o("flex flex-col gap-2 p-2",e),...t}));Pm.displayName="SidebarFooter";var Cm=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,"data-sidebar":"separator",className:o("mx-2 h-px w-auto bg-sidebar-border",e),...t}));Cm.displayName="SidebarSeparator";var Sm=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,"data-sidebar":"content",className:o("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Sm.displayName="SidebarContent";var Tm=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,"data-sidebar":"group",className:o("relative flex w-full min-w-0 flex-col p-2",e),...t}));Tm.displayName="SidebarGroup";var Mm=U.forwardRef(({className:e,asChild:t=false,...a},r)=>jsx(t?Slot:"div",{ref:r,"data-sidebar":"group-label",className:o("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...a}));Mm.displayName="SidebarGroupLabel";var km=U.forwardRef(({className:e,asChild:t=false,...a},r)=>jsx(t?Slot:"button",{ref:r,"data-sidebar":"group-action",className:o("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...a}));km.displayName="SidebarGroupAction";var Dm=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,"data-sidebar":"group-content",className:o("w-full text-sm",e),...t}));Dm.displayName="SidebarGroupContent";var Vm=U.forwardRef(({className:e,...t},a)=>jsx("ul",{ref:a,"data-sidebar":"menu",className:o("flex w-full min-w-0 flex-col gap-1",e),...t}));Vm.displayName="SidebarMenu";var Lm=U.forwardRef(({className:e,...t},a)=>jsx("li",{ref:a,"data-sidebar":"menu-item",className:o("group/menu-item relative",e),...t}));Lm.displayName="SidebarMenuItem";var Im=cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{solid:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]",ghost:"hover:bg-sidebar-accent/50 hover:text-sidebar-accent-foreground",soft:"hover:bg-primary/10 hover:text-primary",surface:"bg-sidebar-accent/30 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"},size:{sm:"h-7 text-xs",md:"h-8 text-sm",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"solid",size:"md"}}),Em=U.forwardRef(({asChild:e=false,isActive:t=false,variant:a="solid",size:r="md",tooltip:n,className:i,...s},l)=>{let d=e?Slot:"button",{isMobile:m,state:u}=wo(),c=jsx(d,{ref:l,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:o(Im({variant:a,size:r}),i),...s});return n?(typeof n=="string"&&(n={children:n}),jsxs(Ga,{children:[jsx(Wa,{asChild:true,children:c}),jsx(ca,{side:"right",align:"center",hidden:u!=="collapsed"||m,...n})]})):c});Em.displayName="SidebarMenuButton";var Hm=U.forwardRef(({className:e,asChild:t=false,showOnHover:a=false,...r},n)=>jsx(t?Slot:"button",{ref:n,"data-sidebar":"menu-action",className:o("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r}));Hm.displayName="SidebarMenuAction";var Am=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,"data-sidebar":"menu-badge",className:o("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));Am.displayName="SidebarMenuBadge";var zm=U.forwardRef(({className:e,showIcon:t=false,...a},r)=>{let n=U.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:o("rounded-md h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&jsx("div",{className:"size-4 rounded-md bg-sidebar-accent animate-pulse"}),jsx("div",{className:"h-4 flex-1 max-w-[--skeleton-width] bg-sidebar-accent animate-pulse rounded-md",style:{"--skeleton-width":n}})]})});zm.displayName="SidebarMenuSkeleton";var Bm=U.forwardRef(({className:e,...t},a)=>jsx("ul",{ref:a,"data-sidebar":"menu-sub",className:o("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));Bm.displayName="SidebarMenuSub";var Fm=U.forwardRef(({...e},t)=>jsx("li",{ref:t,...e}));Fm.displayName="SidebarMenuSubItem";var Om=U.forwardRef(({asChild:e=false,size:t="md",isActive:a,className:r,...n},i)=>jsx(e?Slot:"a",{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:o("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...n}));Om.displayName="SidebarMenuSubButton";var $m=cva("inline-flex items-center justify-center gap-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"border-transparent text-primary-foreground",outline:"border bg-transparent",ghost:"border-transparent bg-transparent",soft:"border-transparent",surface:"border-transparent bg-muted text-muted-foreground"},color:{primary:"",secondary:"",success:"",warning:"",danger:"",info:""},size:{sm:"h-6 px-2 text-xs",md:"h-7 px-2.5 text-sm",lg:"h-8 px-3 text-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},clickable:{true:"cursor-pointer",false:""}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"solid",color:"success",className:"bg-success hover:bg-success/90"},{variant:"solid",color:"warning",className:"bg-warning text-warning-foreground hover:bg-warning/90"},{variant:"solid",color:"danger",className:"bg-danger hover:bg-danger/90"},{variant:"solid",color:"info",className:"bg-info hover:bg-info/90"},{variant:"outline",color:"primary",className:"border-primary text-primary hover:bg-primary/10"},{variant:"outline",color:"secondary",className:"border-secondary text-secondary-foreground hover:bg-secondary/10"},{variant:"outline",color:"success",className:"border-success text-success hover:bg-success/10"},{variant:"outline",color:"warning",className:"border-warning text-warning hover:bg-warning/10"},{variant:"outline",color:"danger",className:"border-danger text-danger hover:bg-danger/10"},{variant:"outline",color:"info",className:"border-info text-info hover:bg-info/10"},{variant:"ghost",color:"primary",className:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"secondary",className:"text-secondary-foreground hover:bg-secondary"},{variant:"ghost",color:"success",className:"text-success hover:bg-success/10"},{variant:"ghost",color:"warning",className:"text-warning hover:bg-warning/10"},{variant:"ghost",color:"danger",className:"text-danger hover:bg-danger/10"},{variant:"ghost",color:"info",className:"text-info hover:bg-info/10"},{variant:"soft",color:"primary",className:"bg-primary/15 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"soft",color:"success",className:"bg-success/15 text-success hover:bg-success/20"},{variant:"soft",color:"warning",className:"bg-warning/15 text-warning hover:bg-warning/20"},{variant:"soft",color:"danger",className:"bg-danger/15 text-danger hover:bg-danger/20"},{variant:"soft",color:"info",className:"bg-info/15 text-info hover:bg-info/20"}],defaultVariants:{variant:"solid",color:"primary",size:"md",radius:"full",clickable:false}}),kR=cva("ml-1 rounded-full p-0.5 transition-colors hover:bg-black/10 dark:hover:bg-white/10",{variants:{size:{sm:"[&_svg]:size-3",md:"[&_svg]:size-3.5",lg:"[&_svg]:size-4"}},defaultVariants:{size:"md"}}),_m=U.forwardRef(({className:e,variant:t,color:a,size:r,radius:n,clickable:i,startContent:s,endContent:l,closable:d,onClose:m,disabled:u,avatar:c,children:g,onClick:p,...v},N)=>{let b=i||!!p,h=w=>{w.stopPropagation(),m?.();};return jsxs("div",{ref:N,role:b?"button":void 0,tabIndex:b&&!u?0:void 0,"aria-disabled":u,onClick:u?void 0:p,onKeyDown:b&&!u?w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),p?.(w));}:void 0,className:o($m({variant:t,color:a,size:r,radius:n,clickable:b}),u&&"opacity-50 cursor-not-allowed",e),...v,children:[c&&jsx("span",{className:"-ml-1 [&>*]:size-5 [&>*]:rounded-full",children:c}),s&&jsx("span",{className:"shrink-0",children:s}),jsx("span",{className:"truncate",children:g}),l&&jsx("span",{className:"shrink-0",children:l}),d&&jsx("button",{type:"button","aria-label":"Remove",onClick:h,disabled:u,className:o(kR({size:r})),children:jsx(X,{})})]})});_m.displayName="Chip";var HR=({className:e,direction:t="horizontal",...a})=>jsx(Group,{orientation:t,className:o("flex h-full w-full data-[orientation=vertical]:flex-col",e),...a}),AR=Panel,zR=({withHandle:e,className:t,...a})=>jsx(Separator,{className:o("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-1 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:-translate-y-1/2 data-[orientation=vertical]:after:translate-x-0 [&[data-orientation=vertical]>div]:rotate-90",t),...a,children:e&&jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:jsx(GripVertical,{className:"h-2.5 w-2.5"})})});var Ym=cva("inline-flex items-center gap-1",{variants:{size:{sm:"[&>span]:h-1 [&>span]:w-1",md:"[&>span]:h-1.5 [&>span]:w-1.5",lg:"[&>span]:h-2 [&>span]:w-2",xl:"[&>span]:h-3 [&>span]:w-3"}},defaultVariants:{size:"md"}}),jm=U.forwardRef(({className:e,size:t,count:a=3,...r},n)=>jsx("span",{ref:n,role:"status","aria-label":"Loading",className:o(Ym({size:t,className:e})),...r,children:Array.from({length:a}).map((i,s)=>jsx("span",{className:"rounded-full bg-current animate-dots-bounce",style:{animationDelay:`${s*.16}s`}},s))}));jm.displayName="Dots";var qm=cva("",{variants:{size:{sm:"h-4 w-4",md:"h-8 w-8",lg:"h-12 w-12",xl:"h-16 w-16"}},defaultVariants:{size:"md"}}),Zm=U.forwardRef(({className:e,size:t,value:a,strokeWidth:r=4,showValue:n=false,label:i,...s},l)=>{let d=a===void 0,m=50-r/2,u=2*Math.PI*m,c=d?0:u-Math.min(100,Math.max(0,a))/100*u;return jsxs("svg",{ref:l,viewBox:"0 0 100 100",className:o(qm({size:t,className:e}),d&&"animate-spin"),role:"progressbar","aria-valuenow":d?void 0:a,"aria-valuemin":0,"aria-valuemax":100,...s,children:[jsx("circle",{cx:"50",cy:"50",r:m,fill:"none",stroke:"currentColor",strokeWidth:r,className:"text-muted opacity-20"}),jsx("circle",{cx:"50",cy:"50",r:m,fill:"none",stroke:"currentColor",strokeWidth:r,strokeLinecap:"round",strokeDasharray:u,strokeDashoffset:d?u*.75:c,className:"text-primary transition-[stroke-dashoffset] duration-300 ease-in-out",style:{transformOrigin:"center",transform:"rotate(-90deg)"}}),n&&!d&&jsx("text",{x:"50",y:"50",textAnchor:"middle",dominantBaseline:"central",className:"fill-current text-[0.65rem] font-medium",children:i??`${Math.round(a)}%`})]})});Zm.displayName="CircularProgress";var Qm=U.createContext(null),$R=()=>{let e=U.useContext(Qm);if(!e)throw new Error("OTP components must be used within InputOTP");return e},Jm=cva("flex items-center gap-2 has-[:disabled]:opacity-50",{variants:{size:{sm:"[&_[data-otp-slot]]:h-8 [&_[data-otp-slot]]:w-8 [&_[data-otp-slot]]:text-xs",md:"[&_[data-otp-slot]]:h-10 [&_[data-otp-slot]]:w-10 [&_[data-otp-slot]]:text-sm",lg:"[&_[data-otp-slot]]:h-12 [&_[data-otp-slot]]:w-12 [&_[data-otp-slot]]:text-base"}},defaultVariants:{size:"md"}}),ep=U.forwardRef(({className:e,containerClassName:t,maxLength:a,value:r,defaultValue:n="",onChange:i,onComplete:s,pattern:l,disabled:d=false,size:m,children:u,...c},g)=>{let[p,v]=U.useState(n),[N,b]=U.useState(0),[h,w]=U.useState(false),f=U.useRef(null),y=r!==void 0?r:p;U.useImperativeHandle(g,()=>f.current),U.useEffect(()=>{b(Math.min(y.length,a-1));},[y,a]),U.useEffect(()=>{y.length===a&&s&&s(y);},[y,a,s]);let P=C=>{let D=C.target.value;if(l&&D){let T=new RegExp(l.replace("^","").replace("$","").replace("+",""));D=D.split("").filter(I=>T.test(I)).join("");}D=D.slice(0,a),r===void 0&&v(D),i?.(D);},x=C=>{C.key==="ArrowLeft"?b(D=>Math.max(0,D-1)):C.key==="ArrowRight"&&b(D=>Math.min(y.length,a-1,D+1));},S=()=>{f.current?.focus();},k=()=>{w(true),b(Math.min(y.length,a-1));},M=()=>{w(false);},R={value:y,activeIndex:h?N:-1,maxLength:a,disabled:d};return jsx(Qm.Provider,{value:R,children:jsxs("div",{className:o(Jm({size:m}),t),onClick:S,"data-otp-container":true,children:[jsx("input",{ref:f,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:y,onChange:P,onKeyDown:x,onFocus:k,onBlur:M,disabled:d,maxLength:a,className:o("absolute opacity-0 pointer-events-none w-0 h-0",e),...c}),u]})})});ep.displayName="InputOTP";var tp=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("flex items-center",e),...t}));tp.displayName="InputOTPGroup";var ap=U.forwardRef(({index:e,className:t,...a},r)=>{let{value:n,activeIndex:i,disabled:s}=$R(),l=n[e]||"",d=i===e,m=d&&n.length===e;return jsxs("div",{ref:r,"data-otp-slot":true,"data-active":d,"data-filled":!!l,className:o("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm font-medium transition-all first:rounded-l-md first:border-l last:rounded-r-md",d&&"z-10 ring-2 ring-ring ring-offset-background",s&&"cursor-not-allowed opacity-50",t),...a,children:[l,m&&jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});ap.displayName="InputOTPSlot";var rp=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,role:"separator",className:o("text-muted-foreground",e),...t,children:jsx(Minus,{className:"h-4 w-4"})}));rp.displayName="InputOTPSeparator";var ip=cva("inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-transparent",ghost:"bg-transparent text-foreground",soft:"bg-primary/15 text-primary",surface:"bg-muted text-muted-foreground"},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-2.5 text-xs",lg:"h-7 px-3 text-sm"}},defaultVariants:{variant:"soft",size:"md"}}),sp=U.forwardRef(({className:e,variant:t,size:a,value:r=[],onChange:n,placeholder:i="Add tag...",maxTags:s,minTagLength:l=1,maxTagLength:d=50,triggerKeys:m=["Enter",",","Tab"],allowDuplicates:u=false,disabled:c,readOnly:g,renderTag:p,...v},N)=>{let[b,h]=U.useState(""),w=U.useRef(null);U.useImperativeHandle(N,()=>w.current);let f=R=>{let C=R.trim();if(C.length<l||C.length>d||s&&r.length>=s||!u&&r.some(T=>T.text.toLowerCase()===C.toLowerCase()))return;let D={id:crypto.randomUUID(),text:C};n?.([...r,D]),h("");},y=R=>{c||g||n?.(r.filter(C=>C.id!==R));},P=R=>{if(m.includes(R.key)){if(R.key==="Tab"&&!b)return;R.preventDefault(),f(b);}R.key==="Backspace"&&!b&&r.length>0&&y(r[r.length-1].id);},x=R=>{let C=R.target.value;if(C.includes(",")){C.split(",").forEach(T=>{T.trim()&&f(T);});return}h(C);},S=R=>{R.preventDefault(),R.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(T=>{f(T);});},k=()=>{w.current?.focus();},M=s?r.length>=s:false;return jsxs("div",{className:o("flex min-h-10 w-full flex-wrap gap-1.5 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",c&&"cursor-not-allowed opacity-50",e),onClick:k,children:[r.map(R=>p?p(R,()=>y(R.id)):jsxs("span",{className:o(ip({variant:t,size:a})),children:[R.text,!c&&!g&&jsx("button",{type:"button",onClick:C=>{C.stopPropagation(),y(R.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${R.text}`,children:jsx(X,{className:"h-3 w-3"})})]},R.id)),!M&&!g&&jsx("input",{ref:w,type:"text",value:b,onChange:x,onKeyDown:P,onPaste:S,placeholder:r.length===0?i:"",disabled:c,className:o("flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed","min-w-[80px]"),...v})]})});sp.displayName="TagInput";var dp=cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-2 py-6",md:"gap-3 py-10",lg:"gap-4 py-16"}},defaultVariants:{size:"md"}}),cp=U.forwardRef(({className:e,size:t,icon:a,title:r,description:n,action:i,children:s,...l},d)=>jsxs("div",{ref:d,className:o(dp({size:t,className:e})),...l,children:[a&&jsx("div",{className:"text-muted-foreground [&>svg]:h-10 [&>svg]:w-10",children:a}),r&&jsx("h3",{className:"text-lg font-semibold text-foreground",children:r}),n&&jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:n}),i&&jsx("div",{className:"mt-2",children:i}),s]}));cp.displayName="EmptyState";var pp=cva("rounded-lg border bg-card p-6 text-card-foreground shadow-sm",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-transparent",ghost:"border-transparent shadow-none",soft:"bg-primary/10 border-primary/20",surface:"bg-muted border-muted"}},defaultVariants:{variant:"outline"}}),up=U.forwardRef(({className:e,variant:t,label:a,value:r,icon:n,trend:i,trendValue:s,description:l,...d},m)=>{let u=i==="up"?TrendingUp:i==="down"?TrendingDown:Minus,c=i==="up"?"text-green-500":i==="down"?"text-red-500":"text-muted-foreground";return jsxs("div",{ref:m,className:o(pp({variant:t,className:e})),...d,children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("p",{className:"text-sm font-medium text-muted-foreground",children:a}),n&&jsx("div",{className:"text-muted-foreground [&>svg]:h-4 [&>svg]:w-4",children:n})]}),jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[jsx("p",{className:"text-2xl font-bold",children:r}),i&&s&&jsxs("span",{className:o("flex items-center gap-0.5 text-sm",c),children:[jsx(u,{className:"h-3 w-3"}),s]})]}),l&&jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:l})]})});up.displayName="StatCard";var gp=cva("flex flex-col",{variants:{variant:{default:"",bordered:"divide-y divide-border rounded-lg border",striped:"[&>*:nth-child(odd)]:bg-muted/50"},size:{sm:"gap-1 [&>*]:py-2 [&>*]:px-3",md:"gap-2 [&>*]:py-3 [&>*]:px-4",lg:"gap-3 [&>*]:py-4 [&>*]:px-5"}},defaultVariants:{variant:"default",size:"md"}}),bp=U.forwardRef(({className:e,variant:t,size:a,...r},n)=>jsx("div",{ref:n,role:"list",className:o(gp({variant:t,size:a,className:e})),...r}));bp.displayName="List";var vp=cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),hp=U.forwardRef(({className:e,interactive:t,leading:a,trailing:r,children:n,...i},s)=>jsxs("div",{ref:s,role:"listitem",className:o(vp({interactive:t,className:e})),...i,children:[a&&jsx("div",{className:"flex-shrink-0 text-muted-foreground",children:a}),jsx("div",{className:"flex-1 min-w-0",children:n}),r&&jsx("div",{className:"flex-shrink-0",children:r})]}));hp.displayName="ListItem";var xp=U.forwardRef(({className:e,primary:t,secondary:a,children:r,...n},i)=>jsxs("div",{ref:i,className:o("min-w-0",e),...n,children:[t&&jsx("p",{className:"text-sm font-medium leading-none truncate",children:t}),a&&jsx("p",{className:"mt-1 text-sm text-muted-foreground truncate",children:a}),r]}));xp.displayName="ListItemText";var wp=cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),Np=U.forwardRef(({className:e,position:t,...a},r)=>jsx("div",{ref:r,"data-position":t,className:o(wp({position:t,className:e})),...a}));Np.displayName="Timeline";var Pp=cva("relative flex gap-4 pb-8 last:pb-0",{variants:{variant:{default:"",success:"[&_[data-timeline-dot]]:bg-green-500 [&_[data-timeline-dot]]:border-green-500",warning:"[&_[data-timeline-dot]]:bg-yellow-500 [&_[data-timeline-dot]]:border-yellow-500",error:"[&_[data-timeline-dot]]:bg-red-500 [&_[data-timeline-dot]]:border-red-500",info:"[&_[data-timeline-dot]]:bg-blue-500 [&_[data-timeline-dot]]:border-blue-500"}},defaultVariants:{variant:"default"}}),Cp=U.forwardRef(({className:e,variant:t,...a},r)=>jsx("div",{ref:r,className:o(Pp({variant:t,className:e})),...a}));Cp.displayName="TimelineItem";var Sp=U.forwardRef(({className:e,dot:t,showConnector:a=true,...r},n)=>jsxs("div",{ref:n,className:o("flex flex-col items-center",e),...r,children:[jsx("div",{"data-timeline-dot":true,className:"flex h-3 w-3 items-center justify-center rounded-full border-2 border-primary bg-primary",children:t}),a&&jsx("div",{className:"w-0.5 flex-1 bg-border"})]}));Sp.displayName="TimelineSeparator";var Tp=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("flex-1 pt-0.5",e),...t}));Tp.displayName="TimelineContent";var Mp=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));Mp.displayName="TimelineOpposite";var Dp=cva("inline-flex items-center rounded-lg bg-muted p-1 text-muted-foreground",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},fullWidth:{true:"w-full",false:""}},defaultVariants:{size:"md",fullWidth:false}}),Vp=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",{variants:{size:{sm:"h-6 text-xs px-2.5",md:"h-8 text-sm px-3",lg:"h-10 text-base px-4"}},defaultVariants:{size:"md"}}),Lp=U.createContext({}),Ip=U.forwardRef(({className:e,size:t,fullWidth:a,children:r,...n},i)=>jsx(hr.Root,{ref:i,type:"single",rovingFocus:false,className:o(Dp({size:t,fullWidth:a,className:e})),...n,children:jsx(Lp.Provider,{value:{size:t??"md"},children:r})}));Ip.displayName="SegmentedControl";var Ep=U.forwardRef(({className:e,children:t,...a},r)=>{let{size:n}=U.useContext(Lp);return jsx(hr.Item,{ref:r,className:o(Vp({size:n}),"flex-1",e),...a,children:t})});Ep.displayName="SegmentedControlItem";var Hp=cva("relative flex flex-col items-center justify-center rounded-lg border-2 border-dashed transition-colors",{variants:{variant:{default:"border-input bg-background hover:bg-accent/50",active:"border-primary bg-primary/5",error:"border-danger bg-danger/5"},size:{sm:"p-4 min-h-[120px]",md:"p-6 min-h-[160px]",lg:"p-8 min-h-[200px]"}},defaultVariants:{variant:"default",size:"md"}}),Ap=e=>{let t=e.type;return t.startsWith("image/")?Image:t.startsWith("video/")?FileVideo:t.startsWith("audio/")?FileAudio:t.includes("pdf")||t.includes("document")?FileText:t.includes("zip")||t.includes("rar")||t.includes("archive")?FileArchive:File},Tn=e=>{if(e===0)return "0 Bytes";let t=1024,a=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+a[r]},zp=(e,t,a)=>{let r=[];return t&&e.size>t&&r.push({code:"file-too-large",message:`File is larger than ${Tn(t)}`}),a&&a.length>0&&(a.some(i=>{if(i.startsWith("."))return e.name.toLowerCase().endsWith(i.toLowerCase());if(i.endsWith("/*")){let s=i.slice(0,-2);return e.type.startsWith(s)}return e.type===i})||r.push({code:"file-invalid-type",message:`File type not accepted. Accepted: ${a.join(", ")}`})),r},Bp=U.forwardRef(({className:e,variant:t,size:a,onFilesChange:r,onFilesRejected:n,onFileRemove:i,files:s=[],showFileList:l=true,children:d,maxSize:m=10*1024*1024,accept:u,multiple:c=true,disabled:g,...p},v)=>{let[N,b]=U.useState(false),[h,w]=U.useState(false),[f,y]=U.useState([]),P=U.useRef(null),x=U.useCallback(V=>{if(!V||V.length===0)return;let E=Array.from(V),A=[],B=[];(c?E:[E[0]]).forEach(Q=>{let te=zp(Q,m,u);te.length>0?B.push({file:Q,errors:te}):A.push(Q);}),y(B),A.length>0&&r?.(A),B.length>0&&n?.(B);},[m,u,c,r,n]),S=U.useCallback(V=>{if(V.preventDefault(),V.stopPropagation(),!g&&(b(true),V.dataTransfer.items)){let A=Array.from(V.dataTransfer.items).some(B=>{if(B.kind!=="file")return true;if(u&&u.length>0){let H=B.type;return !u.some(Q=>Q.endsWith("/*")?H.startsWith(Q.slice(0,-2)):H===Q)}return false});w(A);}},[g,u]),k=U.useCallback(V=>{V.preventDefault(),V.stopPropagation(),!g&&(V.dataTransfer.dropEffect="copy");},[g]),M=U.useCallback(V=>{V.preventDefault(),V.stopPropagation();let E=V.currentTarget.getBoundingClientRect(),A=V.clientX,B=V.clientY;(A<E.left||A>E.right||B<E.top||B>E.bottom)&&(b(false),w(false));},[]),R=U.useCallback(V=>{V.preventDefault(),V.stopPropagation(),b(false),w(false),!g&&x(V.dataTransfer.files);},[g,x]),C=U.useCallback(()=>{g||P.current?.click();},[g]),D=U.useCallback(V=>{x(V.target.files),V.target.value="";},[x]),T=U.useCallback(V=>{g||(V.key==="Enter"||V.key===" ")&&(V.preventDefault(),P.current?.click());},[g]),I=h?"error":N?"active":t,L=u?.join(",");return jsxs("div",{ref:v,className:o("space-y-4",e),...p,children:[jsxs("div",{role:"button",tabIndex:g?-1:0,onDragEnter:S,onDragOver:k,onDragLeave:M,onDrop:R,onClick:C,onKeyDown:T,className:o(Hp({variant:I,size:a}),g&&"opacity-50 cursor-not-allowed",!g&&"cursor-pointer focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"),"aria-disabled":g,children:[jsx("input",{ref:P,type:"file",accept:L,multiple:c,disabled:g,onChange:D,className:"sr-only",tabIndex:-1}),d||jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[jsx("div",{className:"rounded-full bg-muted p-3",children:jsx(Upload,{className:"h-6 w-6 text-muted-foreground"})}),jsxs("div",{className:"space-y-1",children:[jsx("p",{className:"text-sm font-medium",children:N?"Drop files here":"Drop files or click to upload"}),jsxs("p",{className:"text-xs text-muted-foreground",children:[m&&`Max ${Tn(m)}`,u&&u.length>0&&` \u2022 ${u.join(", ")}`]})]})]})]}),f.length>0&&jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:f.map(({file:V,errors:E})=>jsxs("div",{children:[jsx("span",{className:"font-medium",children:V.name}),":"," ",E.map(A=>A.message).join(", ")]},V.name))}),l&&s.length>0&&jsx("div",{className:"space-y-2",children:s.map(V=>{let E=Ap(V.file);return jsxs("div",{className:o("flex items-center gap-3 rounded-lg border p-3",V.error&&"border-danger bg-danger/5"),children:[jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-muted",children:jsx(E,{className:"h-5 w-5 text-muted-foreground"})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"truncate text-sm font-medium",children:V.file.name}),jsxs("p",{className:"text-xs text-muted-foreground",children:[Tn(V.file.size),V.error&&jsx("span",{className:"ml-2 text-danger",children:V.error})]}),V.progress!==void 0&&V.progress<100&&jsx(pn,{value:V.progress,className:"mt-2 h-1"})]}),jsxs(O,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-foreground",onClick:A=>{A.stopPropagation(),i?.(V.file);},children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Remove"})]})]},V.id)})})]})});Bp.displayName="FileUpload";var Gp=cva("relative rounded-md border border-input shadow-sm transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{xs:"h-4 w-4",sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},shape:{square:"rounded-md",circle:"rounded-full"},interactive:{true:"cursor-pointer hover:scale-110 active:scale-105",false:"cursor-default"}},defaultVariants:{size:"md",shape:"square",interactive:false}}),d0=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cg fill='%23ccc'%3E%3Crect width='4' height='4'/%3E%3Crect x='4' y='4' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E")`,kr=U.forwardRef(({color:e,isSelected:t,showTransparency:a=true,onSelect:r,size:n,shape:i,interactive:s,className:l,onClick:d,disabled:m,...u},c)=>jsx("button",{ref:c,type:"button",disabled:m,onClick:v=>{d?.(v),r?.(e);},className:o(Gp({size:n,shape:i,interactive:s??(!!r||!!d)}),t&&"ring-2 ring-ring ring-offset-2",l),style:{backgroundImage:a?d0:void 0,backgroundSize:a?"8px 8px":void 0},"aria-label":`Color ${e}`,"aria-pressed":t,...u,children:jsx("span",{className:"absolute inset-0 rounded-[inherit]",style:{backgroundColor:e}})}));kr.displayName="ColorSwatch";var p0=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],u0={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},Wp=U.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:a,disabled:r,presets:n=p0,showInput:i=true,size:s="md",className:l},d)=>{let[m,u]=U.useState(e??t);U.useEffect(()=>{e!==void 0&&u(e);},[e]);let c=p=>{u(p),a?.(p);},g=p=>{u(p),a?.(p);};return jsxs(ve,{children:[jsx(Re,{asChild:true,children:jsx("button",{ref:d,disabled:r,className:o("rounded-md border border-input shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",u0[s],l),style:{backgroundColor:m},"aria-label":`Color picker, current color: ${m}`})}),jsx(ue,{className:"w-auto p-3",align:"start",children:jsxs("div",{className:"space-y-3",children:[jsx(HexColorPicker,{color:m,onChange:c,className:"!w-[200px]"}),i&&jsxs("div",{className:"space-y-1.5",children:[jsx(za,{htmlFor:"color-input",className:"text-xs",children:"Hex Color"}),jsxs("div",{className:"flex gap-2",children:[jsx("div",{className:"h-9 w-9 shrink-0 rounded-md border",style:{backgroundColor:m}}),jsx(HexColorInput,{id:"color-input",color:m,onChange:c,prefixed:true,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-sm uppercase ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"})]})]}),n.length>0&&jsxs("div",{className:"space-y-1.5",children:[jsx(za,{className:"text-xs",children:"Presets"}),jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(p=>jsx(kr,{color:p,size:"sm",isSelected:m.toLowerCase()===p.toLowerCase(),onSelect:g},p))})]})]})})]})});Wp.displayName="ColorPicker";var $p=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),fs=e=>String(e).padStart(2,"0"),h0=e=>{let[t,a]=e.split(":").map(Number);return {hours:t||0,minutes:a||0}},x0=(e,t)=>`${fs(e)}:${fs(t)}`,_p=U.forwardRef(({className:e,size:t,value:a,onChange:r,use24Hour:n=true,minuteStep:i=1,showPicker:s=true,minTime:l,maxTime:d,disabled:m,...u},c)=>{let[g,p]=U.useState(a??""),[v,N]=U.useState(false);U.useEffect(()=>{a!==void 0&&p(a);},[a]);let{hours:b,minutes:h}=h0(g||"00:00"),w=M=>{let R=M.target.value;p(R),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(R)&&r?.(R);},f=(M,R)=>{let C=Math.max(0,Math.min(23,M)),D=Math.max(0,Math.min(59,R)),T=x0(C,D);p(T),r?.(T);},y=()=>f(b+1,h),P=()=>f(b-1,h),x=()=>f(b,h+i),S=()=>f(b,h-i),k=({value:M,onIncrement:R,onDecrement:C})=>jsxs("div",{className:"flex flex-col items-center",children:[jsx(O,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:R,disabled:m,children:jsx(ChevronUp,{className:"h-4 w-4"})}),jsx("div",{className:"flex h-10 w-12 items-center justify-center rounded-md bg-muted text-lg font-semibold",children:fs(M)}),jsx(O,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:C,disabled:m,children:jsx(ChevronDown,{className:"h-4 w-4"})})]});return jsxs("div",{className:"relative flex items-center",children:[jsx("input",{ref:c,type:"time",value:g,onChange:w,disabled:m,className:o($p({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...u}),s&&jsxs(ve,{open:v,onOpenChange:N,children:[jsx(Re,{asChild:true,children:jsxs(O,{type:"button",variant:"ghost",size:"sm",className:"absolute right-1 h-7 w-7 p-0",disabled:m,children:[jsx(Clock,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Pick time"})]})}),jsxs(ue,{className:"w-auto p-4",align:"end",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(k,{value:b,onIncrement:y,onDecrement:P,max:23}),jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsx(k,{value:h,onIncrement:x,onDecrement:S,max:59})]}),jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsx(O,{variant:"bordered",size:"sm",onClick:()=>{let M=new Date;f(M.getHours(),M.getMinutes());},children:"Now"}),jsx(O,{size:"sm",onClick:()=>N(false),children:"Done"})]})]})]})]})});_p.displayName="TimeInput";var Kp=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),R0=(e,t)=>{try{return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(i=>i.type==="currency")?.value??e}catch{return e}},gs=(e,t,a,r)=>{let n=e.toFixed(t),[i,s]=n.split("."),l=i.replace(/\B(?=(\d{3})+(?!\d))/g,a);return s?`${l}${r}${s}`:l},Up=(e,t,a)=>{if(!e)return;let r=e.replace(new RegExp(`\\${t}`,"g"),"");r=r.replace(a,"."),r=r.replace(/[^0-9.-]/g,"");let n=parseFloat(r);return isNaN(n)?void 0:n},Yp=U.forwardRef(({className:e,size:t,value:a,defaultValue:r,onChange:n,currency:i="USD",locale:s="en-US",decimals:l=2,min:d,max:m,showCurrency:u=true,currencyPosition:c="prefix",currencySymbol:g,thousandSeparator:p=",",decimalSeparator:v=".",disabled:N,placeholder:b,...h},w)=>{let[f,y]=U.useState(r),[P,x]=U.useState(""),[S,k]=U.useState(false),M=a!==void 0?a:f,R=g??R0(i,s);U.useEffect(()=>{!S&&M!==void 0&&x(gs(M,l,p,v));},[M,l,p,v,S]);let C=V=>{let E=V.target.value;if(!E){x(""),a===void 0&&y(void 0),n?.(void 0);return}if(!new RegExp(`^[0-9${p}${v}.-]*$`).test(E))return;x(E);let B=Up(E,p,v);if(B!==void 0){let H=B;d!==void 0&&B<d&&(H=d),m!==void 0&&B>m&&(H=m),a===void 0&&y(H),n?.(H);}},D=()=>{k(true),M!==void 0&&x(M.toString().replace(".",v));},T=()=>{k(false),x(M!==void 0?gs(M,l,p,v):"");},I=u&&c==="prefix"&&jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:R}),L=u&&c==="suffix"&&jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:R});return jsxs("div",{className:"relative flex items-center",children:[I&&jsx("div",{className:"absolute left-3 pointer-events-none",children:I}),jsx("input",{ref:w,type:"text",inputMode:"decimal",value:P,onChange:C,onFocus:D,onBlur:T,disabled:N,placeholder:b??`0${v}${"0".repeat(l)}`,className:o(Kp({size:t}),I&&"pl-8",L&&"pr-8","text-right",e),...h}),L&&jsx("div",{className:"absolute right-3 pointer-events-none",children:L})]})});Yp.displayName="CurrencyInput";var jp=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),bs={creditCard:{mask:"#### #### #### ####"},creditCardAmex:{mask:"#### ###### #####"},cvv:{mask:"###"},expiry:{mask:"##/##"},date:{mask:"##/##/####"},dateISO:{mask:"####-##-##"},time:{mask:"##:##"},ip:{mask:"###.###.###.###"},mac:{mask:"AA:AA:AA:AA:AA:AA"},id11:{mask:"###########"},id9:{mask:"#########"},id10:{mask:"##########"},postal5:{mask:"#####"},postal9:{mask:"#####-####"}},P0=(e,t)=>{switch(t){case "#":return /\d/.test(e);case "A":return /[a-zA-Z]/.test(e);case "*":return /[a-zA-Z0-9]/.test(e);default:return e===t}},Ra=e=>["#","A","*"].includes(e),Mn=(e,t,a)=>{let r="",n=0;for(let i=0;i<t.length&&n<=e.length;i++){let s=t[i];if(Ra(s)){if(n<e.length){let l=e[n];P0(l,s)?(r+=l,n++):(n++,i--);}}else (n<e.length||a)&&(r+=s);}return r},vs=(e,t)=>{let a="";for(let r=0;r<e.length&&r<t.length;r++){let n=t[r];Ra(n)&&(a+=e[r]);}return a},Xp=(e,t)=>e.split("").map(a=>Ra(a)?t:a).join(""),C0=(e,t,a)=>{let r=0;for(let l=0;l<a&&l<e.length&&l<t.length;l++)Ra(t[l])&&r++;let i=0,s=0;for(let l=0;l<t.length&&s<r;l++)i++,Ra(t[l])&&s++;for(;i<t.length&&!Ra(t[i]);)i++;return Math.min(i,e.length)},qp=U.forwardRef(({className:e,size:t,value:a,defaultValue:r="",onChange:n,mask:i,maskPlaceholder:s="_",showMaskPlaceholder:l=false,includeMaskChars:d=false,disabled:m,placeholder:u,...c},g)=>{let p=typeof i=="string"&&i in bs?bs[i].mask:i,[v,N]=U.useState(r),[b,h]=U.useState(""),w=U.useRef(null),f=a!==void 0?a:v;U.useImperativeHandle(g,()=>w.current),U.useEffect(()=>{let S=Mn(f,p,true);h(S);},[f,p]);let y=S=>{let k=S.target.value,M=S.target.selectionStart??0,R=k.replace(/[^\w]/g,""),C=Mn(R,p,true),D=vs(C,p);h(C),a===void 0&&N(d?C:D),n?.(D,C),requestAnimationFrame(()=>{if(w.current){let T=C0(C,p,M);w.current.setSelectionRange(T,T);}});},P=S=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(S.key)||S.ctrlKey||S.metaKey)return;let k=w.current;if(!k)return;let M=k.selectionStart??0;if(S.key==="Backspace"&&M>0){let R=M-1;for(;R>0&&!Ra(p[R]);)R--;let C=vs(b,p),D=0;for(let L=0;L<R&&L<p.length;L++)Ra(p[L])&&D++;let T=C.slice(0,Math.max(0,D-1))+C.slice(D),I=Mn(T,p,true);h(I),a===void 0&&N(d?I:T),n?.(T,I),S.preventDefault(),requestAnimationFrame(()=>{w.current&&w.current.setSelectionRange(R,R);});}},x=l?Xp(p,s):u;return jsx("input",{ref:w,type:"text",value:b,onChange:y,onKeyDown:P,disabled:m,placeholder:x,className:o(jp({size:t}),e),...c})});qp.displayName="MaskedInput";var Zp=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),Vn={"DD/MM/YYYY":"/","MM/DD/YYYY":"/","YYYY-MM-DD":"-","DD.MM.YYYY":"."},xs={"DD/MM/YYYY":["day","month","year"],"MM/DD/YYYY":["month","day","year"],"YYYY-MM-DD":["year","month","day"],"DD.MM.YYYY":["day","month","year"]},hs=(e,t)=>String(e).padStart(t,"0"),Dn=(e,t)=>{let a=hs(e.getDate(),2),r=hs(e.getMonth()+1,2),n=hs(e.getFullYear(),4),i=Vn[t],s=xs[t],l={day:a,month:r,year:n};return s.map(d=>l[d]).join(i)},Qp=(e,t)=>{let a=Vn[t],r=e.split(a);if(r.length!==3)return null;let n=xs[t],i={};if(n.forEach((l,d)=>{i[l]=parseInt(r[d],10);}),isNaN(i.day)||isNaN(i.month)||isNaN(i.year)||i.month<1||i.month>12||i.day<1||i.day>31||i.year<1e3||i.year>9999)return null;let s=new Date(i.year,i.month-1,i.day);return s.getFullYear()!==i.year||s.getMonth()!==i.month-1||s.getDate()!==i.day?null:s},k0=e=>e.toLowerCase(),D0=e=>{let t=Vn[e];return xs[e].map(r=>r==="year"?"####":"##").join(t)},Jp=U.forwardRef(({className:e,size:t,value:a,defaultValue:r,onChange:n,format:i="DD/MM/YYYY",minDate:s,maxDate:l,showIcon:d=true,disabled:m,placeholder:u,...c},g)=>{let[p,v]=U.useState(r??null),[N,b]=U.useState(""),[h,w]=U.useState(null),f=U.useRef(null),y=a!==void 0?a:p;U.useImperativeHandle(g,()=>f.current),U.useEffect(()=>{y?(b(Dn(y,i)),w(null)):b("");},[y,i]);let P=Vn[i],x=D0(i),S=R=>{let C=R.target.value;C=C.replace(new RegExp(`[^0-9\\${P}]`,"g"),"");let D=C.replace(new RegExp(`\\${P}`,"g"),""),T="",I=0;for(let L=0;L<x.length&&I<D.length;L++)x[L]==="#"?(T+=D[I],I++):T+=x[L];if(b(T),T.length===x.length){let L=Qp(T,i);if(L){if(s&&L<s){w(`Date must be after ${Dn(s,i)}`);return}if(l&&L>l){w(`Date must be before ${Dn(l,i)}`);return}w(null),a===void 0&&v(L),n?.(L);}else w("Invalid date");}else a===void 0&&v(null),n?.(null),w(null);},k=()=>{N&&N.length!==x.length&&(b(""),w(null),a===void 0&&v(null),n?.(null));},M=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4";return jsxs("div",{className:"relative",children:[jsx("input",{ref:f,type:"text",inputMode:"numeric",value:N,onChange:S,onBlur:k,disabled:m,placeholder:u??k0(i),className:o(Zp({size:t}),d&&"pr-10",h&&"border-danger focus-visible:ring-danger",e),"aria-invalid":!!h,"aria-describedby":h?"date-error":void 0,...c}),d&&jsx("div",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2",children:jsx(Calendar,{className:o(M,"text-muted-foreground")})}),h&&jsx("p",{id:"date-error",className:"mt-1 text-xs text-danger",children:h})]})});Jp.displayName="DateInput";var eu=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),tu=[{code:"TR",name:"Turkey",dialCode:"+90",flag:"\u{1F1F9}\u{1F1F7}",format:"(###) ### ## ##"},{code:"US",name:"United States",dialCode:"+1",flag:"\u{1F1FA}\u{1F1F8}",format:"(###) ###-####"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"\u{1F1EC}\u{1F1E7}",format:"#### ### ####"},{code:"DE",name:"Germany",dialCode:"+49",flag:"\u{1F1E9}\u{1F1EA}",format:"#### #######"},{code:"FR",name:"France",dialCode:"+33",flag:"\u{1F1EB}\u{1F1F7}",format:"# ## ## ## ##"},{code:"IT",name:"Italy",dialCode:"+39",flag:"\u{1F1EE}\u{1F1F9}",format:"### ### ####"},{code:"ES",name:"Spain",dialCode:"+34",flag:"\u{1F1EA}\u{1F1F8}",format:"### ### ###"},{code:"NL",name:"Netherlands",dialCode:"+31",flag:"\u{1F1F3}\u{1F1F1}",format:"## ########"},{code:"BE",name:"Belgium",dialCode:"+32",flag:"\u{1F1E7}\u{1F1EA}",format:"### ## ## ##"},{code:"AT",name:"Austria",dialCode:"+43",flag:"\u{1F1E6}\u{1F1F9}",format:"### #######"},{code:"CH",name:"Switzerland",dialCode:"+41",flag:"\u{1F1E8}\u{1F1ED}",format:"## ### ## ##"},{code:"SE",name:"Sweden",dialCode:"+46",flag:"\u{1F1F8}\u{1F1EA}",format:"##-### ## ##"},{code:"NO",name:"Norway",dialCode:"+47",flag:"\u{1F1F3}\u{1F1F4}",format:"### ## ###"},{code:"DK",name:"Denmark",dialCode:"+45",flag:"\u{1F1E9}\u{1F1F0}",format:"## ## ## ##"},{code:"FI",name:"Finland",dialCode:"+358",flag:"\u{1F1EB}\u{1F1EE}",format:"## ### ####"},{code:"PL",name:"Poland",dialCode:"+48",flag:"\u{1F1F5}\u{1F1F1}",format:"### ### ###"},{code:"CZ",name:"Czech Republic",dialCode:"+420",flag:"\u{1F1E8}\u{1F1FF}",format:"### ### ###"},{code:"GR",name:"Greece",dialCode:"+30",flag:"\u{1F1EC}\u{1F1F7}",format:"### ### ####"},{code:"PT",name:"Portugal",dialCode:"+351",flag:"\u{1F1F5}\u{1F1F9}",format:"### ### ###"},{code:"RU",name:"Russia",dialCode:"+7",flag:"\u{1F1F7}\u{1F1FA}",format:"(###) ###-##-##"},{code:"UA",name:"Ukraine",dialCode:"+380",flag:"\u{1F1FA}\u{1F1E6}",format:"## ### ## ##"},{code:"RO",name:"Romania",dialCode:"+40",flag:"\u{1F1F7}\u{1F1F4}",format:"### ### ###"},{code:"HU",name:"Hungary",dialCode:"+36",flag:"\u{1F1ED}\u{1F1FA}",format:"## ### ####"},{code:"BG",name:"Bulgaria",dialCode:"+359",flag:"\u{1F1E7}\u{1F1EC}",format:"### ### ###"},{code:"HR",name:"Croatia",dialCode:"+385",flag:"\u{1F1ED}\u{1F1F7}",format:"## ### ####"},{code:"RS",name:"Serbia",dialCode:"+381",flag:"\u{1F1F7}\u{1F1F8}",format:"## ### ####"},{code:"SI",name:"Slovenia",dialCode:"+386",flag:"\u{1F1F8}\u{1F1EE}",format:"## ### ###"},{code:"SK",name:"Slovakia",dialCode:"+421",flag:"\u{1F1F8}\u{1F1F0}",format:"### ### ###"},{code:"CA",name:"Canada",dialCode:"+1",flag:"\u{1F1E8}\u{1F1E6}",format:"(###) ###-####"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"\u{1F1F2}\u{1F1FD}",format:"### ### ####"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"\u{1F1E7}\u{1F1F7}",format:"(##) #####-####"},{code:"AR",name:"Argentina",dialCode:"+54",flag:"\u{1F1E6}\u{1F1F7}",format:"## ####-####"},{code:"AU",name:"Australia",dialCode:"+61",flag:"\u{1F1E6}\u{1F1FA}",format:"### ### ###"},{code:"NZ",name:"New Zealand",dialCode:"+64",flag:"\u{1F1F3}\u{1F1FF}",format:"## ### ####"},{code:"JP",name:"Japan",dialCode:"+81",flag:"\u{1F1EF}\u{1F1F5}",format:"##-####-####"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"\u{1F1F0}\u{1F1F7}",format:"##-####-####"},{code:"CN",name:"China",dialCode:"+86",flag:"\u{1F1E8}\u{1F1F3}",format:"### #### ####"},{code:"HK",name:"Hong Kong",dialCode:"+852",flag:"\u{1F1ED}\u{1F1F0}",format:"#### ####"},{code:"TW",name:"Taiwan",dialCode:"+886",flag:"\u{1F1F9}\u{1F1FC}",format:"### ### ###"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"\u{1F1F8}\u{1F1EC}",format:"#### ####"},{code:"IN",name:"India",dialCode:"+91",flag:"\u{1F1EE}\u{1F1F3}",format:"##### #####"},{code:"PK",name:"Pakistan",dialCode:"+92",flag:"\u{1F1F5}\u{1F1F0}",format:"### #######"},{code:"AE",name:"United Arab Emirates",dialCode:"+971",flag:"\u{1F1E6}\u{1F1EA}",format:"## ### ####"},{code:"SA",name:"Saudi Arabia",dialCode:"+966",flag:"\u{1F1F8}\u{1F1E6}",format:"## ### ####"},{code:"EG",name:"Egypt",dialCode:"+20",flag:"\u{1F1EA}\u{1F1EC}",format:"### ### ####"},{code:"ZA",name:"South Africa",dialCode:"+27",flag:"\u{1F1FF}\u{1F1E6}",format:"## ### ####"},{code:"NG",name:"Nigeria",dialCode:"+234",flag:"\u{1F1F3}\u{1F1EC}",format:"### ### ####"},{code:"IL",name:"Israel",dialCode:"+972",flag:"\u{1F1EE}\u{1F1F1}",format:"##-###-####"}],Ln=(e,t)=>{let a=e.replace(/\D/g,""),r="",n=0;for(let i=0;i<t.length&&n<a.length;i++)t[i]==="#"?(r+=a[n],n++):r+=t[i];return r},I0=e=>e.replace(/#/g,"_"),au=U.forwardRef(({className:e,size:t,value:a,defaultValue:r="",onChange:n,country:i,defaultCountry:s="TR",onCountryChange:l,countries:d=tu,showCountrySelect:m=true,showDialCode:u=false,disabled:c,placeholder:g,...p},v)=>{let[N,b]=U.useState(r),[h,w]=U.useState(i??s),f=a!==void 0?a:N,y=i??h,P=d.find(R=>R.code===y)??d[0],x=Ln(f,P.format),S=R=>{let D=R.target.value.replace(/\D/g,"");a===void 0&&b(D);let T=Ln(D,P.format),I=`${P.dialCode} ${T}`;n?.(D,I,P);};return jsxs("div",{className:"flex",children:[m&&jsxs(Oi,{value:y,onValueChange:R=>{let C=d.find(I=>I.code===R);if(!C)return;i===void 0&&w(R),l?.(C);let D=Ln(f,C.format),T=`${C.dialCode} ${D}`;n?.(f,T,C);},disabled:c,children:[jsx(an,{className:o("w-[100px] rounded-r-none border-r-0 shrink-0",t==="sm"?"h-8":t==="lg"?"h-12":"h-10"),children:jsx(Gi,{children:jsxs("span",{className:"flex items-center gap-1.5",children:[jsx("span",{children:P.flag}),jsx("span",{className:"text-xs text-muted-foreground",children:P.dialCode})]})})}),jsx(rn,{className:"max-h-[300px]",children:d.map(R=>jsx(on,{value:R.code,children:jsxs("span",{className:"flex items-center gap-2",children:[jsx("span",{children:R.flag}),jsx("span",{className:"flex-1",children:R.name}),jsx("span",{className:"text-xs text-muted-foreground",children:R.dialCode})]})},R.code))})]}),jsxs("div",{className:"relative flex-1",children:[u&&!m&&jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:P.dialCode}),jsx("input",{ref:v,type:"tel",inputMode:"tel",value:x,onChange:S,disabled:c,placeholder:g??I0(P.format),className:o(eu({size:t}),m&&"rounded-l-none",u&&!m&&"pl-12",e),...p})]})]})});au.displayName="PhoneInput";var ou=cva("flex items-center justify-between w-full px-4 py-3 border-b bg-background",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-background border-border",ghost:"bg-transparent border-transparent",soft:"bg-primary/10 border-primary/20",surface:"bg-muted border-border"},size:{sm:"h-12 px-3 py-2",md:"h-14 px-4 py-3",lg:"h-16 px-6 py-4"},sticky:{true:"sticky top-0 z-50",false:""}},defaultVariants:{variant:"outline",size:"md",sticky:false}}),nu=U.forwardRef(({className:e,variant:t,size:a,sticky:r,brand:n,children:i,mobileBreakpoint:s="md",...l},d)=>{let[m,u]=U.useState(false),c={sm:"hidden sm:flex",md:"hidden md:flex",lg:"hidden lg:flex"}[s],g={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden"}[s];return jsxs("nav",{ref:d,className:o(ou({variant:t,size:a,sticky:r,className:e})),...l,children:[jsxs("div",{className:"flex items-center justify-between w-full",children:[n&&jsx("div",{className:"flex-shrink-0",children:n}),jsx("div",{className:o("items-center gap-4 flex-1 justify-end",c),children:i}),jsx("button",{type:"button",className:o("p-2 rounded-md hover:bg-accent hover:text-accent-foreground transition-colors",g),onClick:()=>u(!m),"aria-label":m?"Close menu":"Open menu","aria-expanded":m,children:m?jsx(X,{className:"h-5 w-5"}):jsx(Menu,{className:"h-5 w-5"})})]}),m&&jsx("div",{className:o("absolute top-full left-0 right-0 flex flex-col gap-2 p-4 bg-background border-b border-border shadow-lg",g),children:i})]})});nu.displayName="Navbar";var iu=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("flex items-center gap-2 font-semibold text-lg",e),...t}));iu.displayName="NavbarBrand";var su=U.forwardRef(({className:e,justify:t="start",...a},r)=>{let n={start:"justify-start",center:"justify-center",end:"justify-end"}[t];return jsx("div",{ref:r,className:o("flex items-center gap-4",n,e),...a})});su.displayName="NavbarContent";var lu=U.forwardRef(({className:e,isActive:t,...a},r)=>jsx("div",{ref:r,className:o("flex items-center",t&&"text-primary font-medium",e),...a}));lu.displayName="NavbarItem";var du=U.forwardRef(({className:e,isActive:t,...a},r)=>jsx("a",{ref:r,className:o("text-sm font-medium transition-colors hover:text-primary",t?"text-primary":"text-muted-foreground",e),...a}));du.displayName="NavbarLink";var mu=cva("inline-flex items-center gap-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"text-primary-foreground bg-primary px-2 py-0.5 rounded hover:bg-primary/90",outline:"text-primary underline-offset-4 hover:underline",ghost:"text-foreground hover:text-primary",soft:"text-primary bg-primary/10 px-2 py-0.5 rounded hover:bg-primary/20",surface:"text-foreground bg-muted px-2 py-0.5 rounded hover:bg-muted/80"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},underline:{none:"",hover:"hover:underline underline-offset-4",always:"underline underline-offset-4"}},defaultVariants:{variant:"outline",size:"md",underline:"hover"}}),pu=U.forwardRef(({className:e,variant:t,size:a,underline:r,isExternal:n,showExternalIcon:i=true,isDisabled:s,children:l,...d},m)=>{let u=n?{target:"_blank",rel:"noopener noreferrer"}:{};return jsxs("a",{ref:m,className:o(mu({variant:t,size:a,underline:r,className:e}),s&&"pointer-events-none opacity-50"),"aria-disabled":s,...u,...d,children:[l,n&&i&&jsx(ExternalLink,{className:"h-3 w-3 ml-0.5","aria-hidden":"true"})]})});pu.displayName="Link";var fu=cva("fixed bottom-6 right-6 z-50 flex items-center justify-center rounded-full shadow-lg transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",{variants:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"bg-background border border-border text-foreground hover:bg-accent",ghost:"bg-background/80 backdrop-blur-sm text-foreground hover:bg-accent",soft:"bg-primary/10 text-primary hover:bg-primary/20",surface:"bg-muted text-foreground hover:bg-muted/80"},size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"}},defaultVariants:{variant:"solid",size:"md"}}),gu=U.forwardRef(({className:e,variant:t,size:a,visibilityHeight:r=400,smooth:n=true,icon:i,duration:s=300,onClick:l,...d},m)=>{let[u,c]=U.useState(false);U.useEffect(()=>{let v=()=>{c(window.scrollY>r);};return v(),window.addEventListener("scroll",v,{passive:true}),()=>window.removeEventListener("scroll",v)},[r]);let g=v=>{n?window.scrollTo({top:0,behavior:"smooth"}):window.scrollTo(0,0),l?.(v);},p={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[a||"md"];return u?jsx("button",{ref:m,type:"button",className:o(fu({variant:t,size:a,className:e}),"animate-in fade-in zoom-in duration-300"),onClick:g,"aria-label":"Back to top",...d,children:i||jsx(ArrowUp,{className:p})}):null});gu.displayName="BackTop";var U0=$.Menu,Y0=$.Group,j0=$.Portal,X0=$.Sub,q0=$.RadioGroup,bu=U.forwardRef(({className:e,...t},a)=>jsx($.Root,{ref:a,className:o("flex h-10 items-center space-x-1 rounded-md border bg-background p-1",e),...t}));bu.displayName=$.Root.displayName;var vu=U.forwardRef(({className:e,...t},a)=>jsx($.Trigger,{ref:a,className:o("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e),...t}));vu.displayName=$.Trigger.displayName;var hu=U.forwardRef(({className:e,inset:t,children:a,...r},n)=>jsxs($.SubTrigger,{ref:n,className:o("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...r,children:[a,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]}));hu.displayName=$.SubTrigger.displayName;var xu=U.forwardRef(({className:e,...t},a)=>jsx($.SubContent,{ref:a,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));xu.displayName=$.SubContent.displayName;var yu=U.forwardRef(({className:e,align:t="start",alignOffset:a=-4,sideOffset:r=8,...n},i)=>jsx($.Portal,{children:jsx($.Content,{ref:i,align:t,alignOffset:a,sideOffset:r,className:o("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));yu.displayName=$.Content.displayName;var Ru=U.forwardRef(({className:e,inset:t,...a},r)=>jsx($.Item,{ref:r,className:o("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...a}));Ru.displayName=$.Item.displayName;var wu=U.forwardRef(({className:e,children:t,checked:a,...r},n)=>jsxs($.CheckboxItem,{ref:n,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...r,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx($.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),t]}));wu.displayName=$.CheckboxItem.displayName;var Nu=U.forwardRef(({className:e,children:t,...a},r)=>jsxs($.RadioItem,{ref:r,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx($.ItemIndicator,{children:jsx(Circle,{className:"h-2 w-2 fill-current"})})}),t]}));Nu.displayName=$.RadioItem.displayName;var Pu=U.forwardRef(({className:e,inset:t,...a},r)=>jsx($.Label,{ref:r,className:o("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));Pu.displayName=$.Label.displayName;var Cu=U.forwardRef(({className:e,...t},a)=>jsx($.Separator,{ref:a,className:o("-mx-1 my-1 h-px bg-muted",e),...t}));Cu.displayName=$.Separator.displayName;var Su=({className:e,...t})=>jsx("span",{className:o("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Su.displayName="MenubarShortcut";var Tu=cva("flex",{variants:{orientation:{horizontal:"flex-row items-center",vertical:"flex-col"},size:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"horizontal",size:"md"}}),Mu=U.forwardRef(({className:e,orientation:t,size:a,currentStep:r=0,children:n,...i},s)=>{let l=U.Children.toArray(n);return jsx("div",{ref:s,className:o(Tu({orientation:t,size:a,className:e})),...i,children:l.map((d,m)=>U.isValidElement(d)?U.cloneElement(d,{...d.props,stepNumber:m+1,status:d.props.status||(m<r?"completed":m===r?"current":"upcoming"),isLast:m===l.length-1,orientation:t,size:a}):d)})});Mu.displayName="Steps";var ku=cva("flex items-center",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col items-start"},size:{sm:"gap-2",md:"gap-3",lg:"gap-4"}},defaultVariants:{orientation:"horizontal",size:"md"}}),Q0=cva("flex items-center justify-center rounded-full font-medium transition-colors",{variants:{status:{completed:"bg-primary text-primary-foreground",current:"bg-primary text-primary-foreground ring-2 ring-primary ring-offset-2 ring-offset-background",upcoming:"bg-muted text-muted-foreground border-2 border-muted-foreground/30"},size:{sm:"h-6 w-6 text-xs",md:"h-8 w-8 text-sm",lg:"h-10 w-10 text-base"}},defaultVariants:{status:"upcoming",size:"md"}}),J0=cva("bg-muted transition-colors",{variants:{orientation:{horizontal:"h-0.5 flex-1 min-w-8",vertical:"w-0.5 min-h-8 ml-4"},status:{completed:"bg-primary",current:"bg-muted",upcoming:"bg-muted"}},defaultVariants:{orientation:"horizontal",status:"upcoming"}}),Du=U.forwardRef(({className:e,orientation:t="horizontal",size:a="md",title:r,description:n,icon:i,status:s="upcoming",stepNumber:l,isLast:d,...m},u)=>jsxs("div",{ref:u,className:o(ku({orientation:t,size:a,className:e}),!d&&t==="horizontal"&&"flex-1"),...m,children:[jsx("div",{className:o("flex items-center",t==="vertical"&&"flex-col items-start"),children:jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:o(Q0({status:s,size:a})),children:s==="completed"?jsx(Check,{className:a==="sm"?"h-3 w-3":a==="lg"?"h-5 w-5":"h-4 w-4"}):i||l}),(r||n)&&jsxs("div",{className:"flex flex-col",children:[r&&jsx("span",{className:o("font-medium",a==="sm"&&"text-sm",a==="lg"&&"text-lg",s==="upcoming"&&"text-muted-foreground"),children:r}),n&&jsx("span",{className:o("text-muted-foreground",a==="sm"&&"text-xs",a==="md"&&"text-sm",a==="lg"&&"text-base"),children:n})]})]})}),!d&&jsx("div",{className:o(J0({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Du.displayName="Step";function nw({className:e,data:t,columns:a,selectable:r=false,selectedKeys:n,onSelectionChange:i,getRowKey:s=(y,P)=>String(P),sortable:l=false,sortState:d,onSortChange:m,paginated:u=false,pageSizeOptions:c=[10,20,50],paginationState:g,onPaginationChange:p,emptyContent:v="No data",loading:N=false,striped:b=false,hoverable:h=true,...w},f){let[y,P]=U.useState(new Set),[x,S]=U.useState({columnId:null,direction:null}),[k,M]=U.useState({pageIndex:0,pageSize:c[0]||10}),R=n??y,C=d??x,D=g??k,T=z=>{i?i(z):P(z);},I=z=>{m?m(z):S(z);},L=z=>{p?p(z):M(z);},V=U.useMemo(()=>{if(!C.columnId||!C.direction)return t;let z=a.find(F=>F.id===C.columnId);return z?[...t].sort((F,ae)=>{let G=z.accessor(F),ge=z.accessor(ae);if(G===ge)return 0;if(G==null)return 1;if(ge==null)return -1;let ro=String(G).localeCompare(String(ge),void 0,{numeric:true});return C.direction==="asc"?ro:-ro}):t},[t,C,a]),E=U.useMemo(()=>{if(!u)return V;let z=D.pageIndex*D.pageSize;return V.slice(z,z+D.pageSize)},[V,u,D]),A=Math.ceil(V.length/D.pageSize),B=z=>{if(z){let F=new Set(E.map((ae,G)=>s(ae,G)));T(F);}else T(new Set);},H=(z,F)=>{let ae=new Set(R);F?ae.add(z):ae.delete(z),T(ae);},Q=E.length>0&&E.every((z,F)=>R.has(s(z,F))),te=E.some((z,F)=>R.has(s(z,F))),J=z=>{if(!a.find(G=>G.id===z)?.sortable&&!l)return;let ae="asc";C.columnId===z&&(C.direction==="asc"?ae="desc":C.direction==="desc"&&(ae=null)),I({columnId:ae?z:null,direction:ae});},nt=z=>C.columnId!==z?jsx(ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):C.direction==="asc"?jsx(ChevronUp,{className:"h-4 w-4"}):jsx(ChevronDown,{className:"h-4 w-4"});return jsxs("div",{ref:f,className:o("w-full",e),...w,children:[jsx("div",{className:"relative w-full overflow-auto rounded-md border",children:jsxs("table",{className:"w-full caption-bottom text-sm",children:[jsx("thead",{className:"[&_tr]:border-b bg-muted/50",children:jsxs("tr",{children:[r&&jsx("th",{className:"h-12 w-12 px-4",children:jsx(so,{checked:Q?true:te?"indeterminate":false,onCheckedChange:B,"aria-label":"Select all"})}),a.map(z=>{let F=z.sortable??l;return jsx("th",{className:o("h-12 px-4 text-left align-middle font-medium text-muted-foreground",F&&"cursor-pointer select-none hover:text-foreground"),style:{width:z.width},onClick:()=>F&&J(z.id),children:jsxs("div",{className:"flex items-center gap-2",children:[z.header,F&&nt(z.id)]})},z.id)})]})}),jsx("tbody",{className:"[&_tr:last-child]:border-0",children:N?jsx("tr",{children:jsx("td",{colSpan:a.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:"Loading..."})}):E.length===0?jsx("tr",{children:jsx("td",{colSpan:a.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:v})}):E.map((z,F)=>{let ae=s(z,F),G=R.has(ae);return jsxs("tr",{className:o("border-b transition-colors",h&&"hover:bg-muted/50",b&&F%2===1&&"bg-muted/30",G&&"bg-muted"),"data-state":G?"selected":void 0,children:[r&&jsx("td",{className:"w-12 px-4",children:jsx(so,{checked:G,onCheckedChange:ge=>H(ae,!!ge),"aria-label":`Select row ${F+1}`})}),a.map(ge=>jsx("td",{className:"p-4 align-middle",children:ge.cell?ge.cell(z,F):ge.accessor(z)},ge.id))]},ae)})})]})}),u&&jsxs("div",{className:"flex items-center justify-between px-2 py-4",children:[jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsx("span",{children:"Rows per page:"}),jsx("select",{value:D.pageSize,onChange:z=>L({pageIndex:0,pageSize:Number(z.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:c.map(z=>jsx("option",{value:z,children:z},z))})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",D.pageIndex+1," of ",A||1]}),jsxs("div",{className:"flex gap-1",children:[jsx("button",{onClick:()=>L({...D,pageIndex:D.pageIndex-1}),disabled:D.pageIndex===0,className:"inline-flex h-8 w-8 items-center justify-center rounded-md border bg-transparent hover:bg-muted disabled:opacity-50 disabled:pointer-events-none","aria-label":"Previous page",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx("button",{onClick:()=>L({...D,pageIndex:D.pageIndex+1}),disabled:D.pageIndex>=A-1,className:"inline-flex h-8 w-8 items-center justify-center rounded-md border bg-transparent hover:bg-muted disabled:opacity-50 disabled:pointer-events-none","aria-label":"Next page",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var iw=U.forwardRef(nw);var Lu=cva("",{variants:{size:{sm:"[--tree-indent:12px] [--tree-item-height:28px] text-xs",md:"[--tree-indent:16px] [--tree-item-height:32px] text-sm",lg:"[--tree-indent:20px] [--tree-item-height:40px] text-base"}},defaultVariants:{size:"md"}}),Iu=U.forwardRef(({className:e,size:t,data:a,defaultExpandedIds:r=[],expandedIds:n,onExpandedChange:i,selectedId:s,onSelect:l,showIcons:d=true,leafIcon:m=jsx(File,{className:"h-4 w-4"}),folderIcon:u=jsx(Folder,{className:"h-4 w-4"}),folderOpenIcon:c=jsx(FolderOpen,{className:"h-4 w-4"}),defaultExpandAll:g=false,...p},v)=>{let N=U.useCallback(x=>x.reduce((S,k)=>k.children?.length?[...S,k.id,...N(k.children)]:S,[]),[]),[b,h]=U.useState(()=>g?N(a):r),w=n??b,f=x=>{i?i(x):h(x);},y=x=>{w.includes(x)?f(w.filter(S=>S!==x)):f([...w,x]);},P=(x,S=0)=>{let k=x.children&&x.children.length>0,M=w.includes(x.id),R=s===x.id,C=()=>{x.disabled||l?.(x);},D=I=>{I.stopPropagation(),k&&y(x.id);},T=()=>x.icon?x.icon:k?M?c:u:m;return jsxs("div",{role:"treeitem","aria-expanded":k?M:void 0,children:[jsxs("div",{className:o("flex items-center gap-1 rounded-md px-2 cursor-pointer transition-colors","h-[var(--tree-item-height)]","hover:bg-muted/50",R&&"bg-primary/10 text-primary",x.disabled&&"opacity-50 cursor-not-allowed"),style:{paddingLeft:`calc(${S} * var(--tree-indent) + 8px)`},onClick:C,children:[jsx("button",{type:"button",className:o("flex h-5 w-5 items-center justify-center rounded hover:bg-muted",!k&&"invisible"),onClick:D,tabIndex:-1,"aria-label":M?"Collapse":"Expand",children:M?jsx(ChevronDown,{className:"h-4 w-4"}):jsx(ChevronRight,{className:"h-4 w-4"})}),d&&jsx("span",{className:"flex-shrink-0 text-muted-foreground",children:T()}),jsx("span",{className:"truncate",children:x.name})]}),k&&M&&jsx("div",{role:"group",children:x.children.map(I=>P(I,S+1))})]},x.id)};return jsx("div",{ref:v,role:"tree",className:o(Lu({size:t,className:e})),...p,children:a.map(x=>P(x))})});Iu.displayName="TreeView";var Hu=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),vw=({text:e,query:t})=>{if(!t)return jsx(Fragment,{children:e});let a=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),r=e.split(a);return jsx(Fragment,{children:r.map((n,i)=>a.test(n)?jsx("mark",{className:"bg-primary/20 text-foreground rounded-sm",children:n},i):jsx("span",{children:n},i))})},hw=(e,t)=>{let[a,r]=U.useState(e);return U.useEffect(()=>{let n=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(n);}},[e,t]),a},Au=U.forwardRef(({className:e,size:t,value:a,defaultValue:r="",onChange:n,onSelect:i,options:s=[],loadOptions:l,debounceMs:d=300,minChars:m=0,placeholder:u="Type to search...",emptyText:c="No results found.",loadingText:g="Loading...",clearable:p=false,freeSolo:v=true,maxHeight:N=200,highlightMatch:b=true,disabled:h,...w},f)=>{let[y,P]=U.useState(false),[x,S]=U.useState(r),[k,M]=U.useState([]),[R,C]=U.useState(false),D=U.useRef(null),T=a!==void 0?a:x,I=hw(T,d);U.useImperativeHandle(f,()=>D.current);let L=l?k:s,V=U.useMemo(()=>l?L:L.filter(F=>F.label.toLowerCase().includes(T.toLowerCase())),[L,T,l]);U.useEffect(()=>{if(!l)return;if(I.length<m){M([]);return}let F=false;return (async()=>{C(true);try{let G=await l(I);F||M(G);}catch{F||M([]);}finally{F||C(false);}})(),()=>{F=true;}},[I,l,m]);let E=F=>{a===void 0&&S(F),n?.(F);},A=F=>{let ae=F.target.value;E(ae),ae.length>=m&&P(true);},B=F=>{E(F.label),i?.(F),P(false);},H=()=>{E(""),D.current?.focus();},Q=()=>{T.length>=m&&(V.length>0||R)&&P(true);},te=F=>{F.key==="Escape"&&P(false),F.key==="ArrowDown"&&!y&&V.length>0&&P(true);},J=y&&T.length>=m,nt=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",z=p&&T?"pr-8":"pr-3";return jsxs(ve,{open:J,onOpenChange:P,children:[jsx(Ui,{asChild:true,children:jsxs("div",{className:"relative w-full",children:[jsx("input",{ref:D,type:"text",value:T,onChange:A,onFocus:Q,onKeyDown:te,disabled:h,placeholder:u,className:o(Hu({size:t}),z,e),role:"combobox","aria-expanded":J,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...w}),p&&T&&!h&&jsx("button",{type:"button",onClick:H,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:jsx(X,{className:nt})})]})}),jsx(ue,{className:"w-[--radix-popover-trigger-width] p-0",align:"start",onOpenAutoFocus:F=>F.preventDefault(),children:jsx(Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsx(Command.List,{id:"autocomplete-list",className:"overflow-y-auto p-1",style:{maxHeight:N},children:R?jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsx(Loader2,{className:o(nt,"animate-spin")}),g]}):V.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c}):V.map(F=>jsxs(Command.Item,{value:F.value,disabled:F.disabled,onSelect:()=>B(F),className:o("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground"),children:[jsx(Check,{className:o("mr-2 h-4 w-4 shrink-0",T===F.label?"opacity-100":"opacity-0")}),jsx("span",{className:"flex-1",children:b?jsx(vw,{text:F.label,query:T}):F.label})]},F.value))})})})]})});Au.displayName="Autocomplete";var Ns=U.createContext(null),Ps=U.createContext(null),Cs=()=>{let e=U.useContext(Ns);if(!e)throw new Error("useFormContext must be used within a Form");return e},Hn=()=>{let e=U.useContext(Ps);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},xw={required:(e="This field is required")=>({validate:t=>typeof t=="string"?t.trim().length>0:Array.isArray(t)?t.length>0:t!=null,message:e}),minLength:(e,t)=>({validate:a=>typeof a=="string"&&a.length>=e,message:t??`Must be at least ${e} characters`}),maxLength:(e,t)=>({validate:a=>typeof a=="string"&&a.length<=e,message:t??`Must be at most ${e} characters`}),min:(e,t)=>({validate:a=>typeof a=="number"&&a>=e,message:t??`Must be at least ${e}`}),max:(e,t)=>({validate:a=>typeof a=="number"&&a<=e,message:t??`Must be at most ${e}`}),email:(e="Invalid email address")=>({validate:t=>typeof t=="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),message:e}),pattern:(e,t="Invalid format")=>({validate:a=>typeof a=="string"&&e.test(a),message:t}),custom:(e,t)=>({validate:e,message:t})},zu=U.forwardRef(({defaultValues:e={},onSubmit:t,onError:a,validateOnBlur:r=true,validateOnChange:n=false,children:i,className:s,...l},d)=>{let[m,u]=U.useState(e),[c,g]=U.useState({}),[p,v]=U.useState({}),[N,b]=U.useState({}),[h,w]=U.useState(false),f=U.useRef(new Map),y=U.useCallback((L,V)=>{f.current.set(L,V);},[]),P=U.useCallback(L=>{f.current.delete(L);},[]),x=U.useCallback(L=>{let V=f.current.get(L)||[],E=m[L];for(let A of V)if(!A.validate(E))return g(B=>({...B,[L]:A.message})),false;return g(A=>({...A,[L]:null})),true},[m]),S=U.useCallback(()=>{let L=true,V={};return f.current.forEach((E,A)=>{let B=m[A];for(let H of E)if(!H.validate(B)){V[A]=H.message,L=false;break}V[A]||(V[A]=null);}),g(V),L},[m]),k=U.useCallback((L,V)=>{u(E=>({...E,[L]:V})),b(E=>({...E,[L]:true})),n&&setTimeout(()=>{x(L);},0);},[n,x]),M=U.useCallback((L,V)=>{g(E=>({...E,[L]:V}));},[]),R=U.useCallback((L,V)=>{v(E=>({...E,[L]:V})),V&&r&&x(L);},[r,x]),C=U.useCallback(L=>({value:m[L],error:c[L]??null,touched:p[L]??false,dirty:N[L]??false}),[m,c,p,N]),D=U.useCallback(()=>{u(e),g({}),v({}),b({});},[e]),T=async L=>{L.preventDefault();let V={};if(f.current.forEach((A,B)=>{V[B]=true;}),v(V),!S()){a?.(c);return}if(t){w(true);try{await t(m);}finally{w(false);}}},I={values:m,errors:c,touched:p,dirty:N,isSubmitting:h,setValue:k,setError:M,setTouched:R,validateField:x,validateAll:S,registerField:y,unregisterField:P,getFieldState:C,reset:D};return jsx(Ns.Provider,{value:I,children:jsx("form",{ref:d,onSubmit:T,className:o("space-y-4",s),...l,children:i})})});zu.displayName="Form";var Bu=({name:e,rules:t=[],defaultValue:a,children:r})=>{let n=Cs(),i=U.useId();U.useEffect(()=>(n.registerField(e,t),a!==void 0&&n.values[e]===void 0&&n.setValue(e,a),()=>{n.unregisterField(e);}),[e,t,a,n]);let s=n.getFieldState(e),l={name:e,id:`${i}-${e}`,value:s.value,error:s.error,touched:s.touched,dirty:s.dirty};return jsx(Ps.Provider,{value:l,children:r})};Bu.displayName="FormField";var Fu=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("space-y-1.5",e),...t}));Fu.displayName="FormItem";var Ou=U.forwardRef(({className:e,required:t,children:a,...r},n)=>{let{id:i,error:s,touched:l}=Hn();return jsxs(za,{ref:n,htmlFor:i,className:o(s&&l&&"text-danger",e),...r,children:[a,t&&jsx("span",{className:"ml-1 text-danger",children:"*"})]})});Ou.displayName="FormLabel";var Gu=({children:e})=>{let{name:t,id:a,error:r,touched:n}=Hn(),i=Cs(),s=i.getFieldState(t),l=m=>{let u=m.target,c=u.type==="checkbox"?u.checked:u.value;i.setValue(t,c);},d=()=>{i.setTouched(t,true);};return U.cloneElement(e,{id:a,name:t,value:s.value??"",onChange:l,onBlur:d,"aria-invalid":r&&n?"true":void 0,"aria-describedby":r&&n?`${a}-error`:void 0})};Gu.displayName="FormControl";var Wu=U.forwardRef(({className:e,...t},a)=>jsx("p",{ref:a,className:o("text-xs text-muted-foreground",e),...t}));Wu.displayName="FormDescription";var $u=U.forwardRef(({className:e,message:t,...a},r)=>{let{id:n,error:i,touched:s}=Hn(),l=t??(s?i:null);return l?jsx("p",{ref:r,id:`${n}-error`,className:o("text-xs text-danger",e),role:"alert",...a,children:l}):null});$u.displayName="FormMessage";var Ku=cva("inline-flex items-center gap-3",{variants:{size:{sm:"[&_[data-user-avatar]]:h-8 [&_[data-user-avatar]]:w-8",md:"[&_[data-user-avatar]]:h-10 [&_[data-user-avatar]]:w-10",lg:"[&_[data-user-avatar]]:h-12 [&_[data-user-avatar]]:w-12"}},defaultVariants:{size:"md"}}),Uu=U.forwardRef(({className:e,size:t,name:a,description:r,avatarUrl:n,avatarFallback:i,trailing:s,...l},d)=>{let m=i||a.split(" ").map(u=>u[0]).join("").toUpperCase().slice(0,2);return jsxs("div",{ref:d,className:o(Ku({size:t,className:e})),...l,children:[jsxs(Ba,{"data-user-avatar":true,children:[n&&jsx(br,{src:n,alt:a}),jsx(Fa,{children:m})]}),jsxs("div",{className:"flex flex-col min-w-0",children:[jsx("span",{className:"text-sm font-medium leading-none truncate",children:a}),r&&jsx("span",{className:"text-sm text-muted-foreground truncate",children:r})]}),s&&jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});Uu.displayName="User";var ju=cva("font-mono rounded",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-transparent",ghost:"bg-transparent",soft:"bg-muted text-foreground",surface:"bg-muted/50 text-foreground border border-border"},size:{sm:"px-1 py-0.5 text-xs",md:"px-1.5 py-0.5 text-sm",lg:"px-2 py-1 text-base"}},defaultVariants:{variant:"soft",size:"md"}}),Xu=U.forwardRef(({className:e,variant:t,size:a,...r},n)=>jsx("code",{ref:n,className:o(ju({variant:t,size:a,className:e})),...r}));Xu.displayName="Code";var qu=cva("relative flex items-center gap-2 font-mono rounded-lg border",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-transparent border-input",ghost:"bg-transparent border-transparent",soft:"bg-muted border-muted",surface:"bg-muted/50 border-border"},size:{sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-base"}},defaultVariants:{variant:"surface",size:"md"}}),Zu=U.forwardRef(({className:e,variant:t,size:a,code:r,copyable:n=true,copyLabel:i="Copy",onCopy:s,symbol:l="$",hideSymbol:d=false,...m},u)=>{let[c,g]=U.useState(false),p=async()=>{try{await navigator.clipboard.writeText(r),g(!0),s?.(),setTimeout(()=>g(!1),2e3);}catch(v){console.error("Failed to copy:",v);}};return jsxs("div",{ref:u,className:o(qu({variant:t,size:a,className:e})),...m,children:[!d&&jsx("span",{className:"text-muted-foreground select-none",children:l}),jsx("code",{className:"flex-1 truncate",children:r}),n&&jsx("button",{type:"button",onClick:p,className:o("flex-shrink-0 rounded p-1 transition-colors","hover:bg-black/10 dark:hover:bg-white/10","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":c?"Copied":i,children:c?jsx(Check,{className:"h-4 w-4 text-green-500"}):jsx(Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});Zu.displayName="Snippet";var Ms=cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),Qu=U.forwardRef(({className:e,radius:t,src:a,alt:r,fallback:n,showSkeleton:i=true,onLoad:s,onError:l,fit:d="cover",aspectRatio:m,style:u,...c},g)=>{let[p,v]=U.useState("loading");U.useEffect(()=>{a&&v("loading");},[a]);let N=()=>{v("loaded"),s?.();},b=()=>{v("error"),l?.();},h={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}[d];return p==="error"&&n?jsx("div",{className:o(Ms({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:m,...u},children:n}):jsxs("div",{className:o(Ms({radius:t}),"relative",e),style:{aspectRatio:m,...u},children:[p==="loading"&&i&&jsx(en,{className:"absolute inset-0 h-full w-full"}),jsx("img",{ref:g,src:a,alt:r,onLoad:N,onError:b,className:o("h-full w-full transition-opacity duration-300",h,p==="loading"?"opacity-0":"opacity-100"),...c})]})});Qu.displayName="Image";var tf=cva("flex flex-col rounded-lg border bg-background",{variants:{size:{sm:"p-1 gap-0.5",md:"p-1.5 gap-1",lg:"p-2 gap-1.5"}},defaultVariants:{size:"md"}}),af=cva("relative flex cursor-pointer select-none items-center rounded-md outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{size:{sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}},defaultVariants:{size:"md"}}),rf=U.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),of=U.forwardRef(({className:e,size:t="md",value:a,defaultValue:r="",onValueChange:n,multiple:i=false,children:s,...l},d)=>{let[m,u]=U.useState(r),c=a??m,g=p=>{let v;if(i){let N=Array.isArray(c)?c:[c].filter(Boolean);N.includes(p)?v=N.filter(b=>b!==p):v=[...N,p];}else v=p;n?n(v):u(v);};return jsx(rf.Provider,{value:{value:c,onValueChange:g,multiple:i,size:t??"md"},children:jsx("div",{ref:d,role:"listbox","aria-multiselectable":i,className:o(tf({size:t,className:e})),...l,children:s})})});of.displayName="Listbox";var nf=U.forwardRef(({className:e,value:t,disabled:a,icon:r,description:n,children:i,...s},l)=>{let{value:d,onValueChange:m,multiple:u,size:c}=U.useContext(rf),g=u?Array.isArray(d)&&d.includes(t):d===t,p=()=>{a||m(t);},v=N=>{(N.key==="Enter"||N.key===" ")&&!a&&(N.preventDefault(),m(t));};return jsxs("div",{ref:l,role:"option","aria-selected":g,"data-disabled":a?"":void 0,tabIndex:a?-1:0,className:o(af({size:c}),g&&"bg-accent text-accent-foreground",e),onClick:p,onKeyDown:v,...s,children:[r&&jsx("span",{className:"mr-2 flex-shrink-0",children:r}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:i}),n&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:n})]}),g&&jsx(Check,{className:"ml-2 h-4 w-4 flex-shrink-0"})]})});nf.displayName="ListboxItem";var lf=cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),df=cva("flex items-center gap-3 bg-background transition-all",{variants:{variant:{default:"rounded-lg border p-3",bordered:"p-3",cards:"rounded-lg border p-3 shadow-sm"},size:{sm:"p-2 text-sm",md:"p-3 text-sm",lg:"p-4 text-base"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg z-10",false:""},isDragOver:{true:"border-primary border-dashed",false:""}},defaultVariants:{variant:"default",size:"md",isDragging:false,isDragOver:false}});function Lw({className:e,variant:t,size:a,items:r,onReorder:n,renderItem:i,showHandle:s=true,disabled:l=false,...d},m){let[u,c]=U.useState(null),[g,p]=U.useState(null),v=(f,y)=>{l||(c(y),f.dataTransfer.effectAllowed="move",f.dataTransfer.setData("text/plain",String(y)));},N=(f,y)=>{f.preventDefault(),!(l||u===null||u===y)&&p(y);},b=()=>{p(null);},h=(f,y)=>{if(f.preventDefault(),l||u===null||u===y){c(null),p(null);return}let P=[...r],[x]=P.splice(u,1);P.splice(y,0,x),n?.(P),c(null),p(null);},w=()=>{c(null),p(null);};return jsx("div",{ref:m,className:o(lf({variant:t,size:a,className:e})),...d,children:r.map((f,y)=>jsxs("div",{draggable:!l,onDragStart:P=>v(P,y),onDragOver:P=>N(P,y),onDragLeave:b,onDrop:P=>h(P,y),onDragEnd:w,className:o(df({variant:t,size:a,isDragging:u===y,isDragOver:g===y}),!l&&"cursor-move"),children:[s&&jsx("div",{className:o("flex-shrink-0 text-muted-foreground",l?"opacity-30":"cursor-grab active:cursor-grabbing"),children:jsx(GripVertical,{className:"h-5 w-5"})}),jsx("div",{className:"flex-1 min-w-0",children:i(f,y)})]},f.id))})}var Iw=U.forwardRef(Lw);var pf=cva("absolute inset-0 z-50 flex items-center justify-center transition-opacity",{variants:{variant:{solid:"bg-background",soft:"bg-background/80 backdrop-blur-sm",ghost:"bg-background/50"},visible:{true:"opacity-100 pointer-events-auto",false:"opacity-0 pointer-events-none"}},defaultVariants:{variant:"soft",visible:true}}),zw={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},uf=U.forwardRef(({className:e,variant:t,loading:a=true,size:r="md",spinner:n,text:i,children:s,...l},d)=>jsxs("div",{ref:d,className:o("relative",e),...l,children:[s,jsx("div",{className:o(pf({variant:t,visible:a})),"aria-hidden":!a,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[n||jsx(Loader2,{className:o(zw[r],"animate-spin text-primary")}),i&&jsx("span",{className:"text-sm text-muted-foreground",children:i})]})})]}));uf.displayName="LoadingOverlay";var ff=cva("fixed top-0 left-0 z-[9999] h-0.5 transition-all duration-200 ease-out",{variants:{color:{primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"}},defaultVariants:{color:"primary"}}),gf=U.forwardRef(({className:e,color:t,isLoading:a=false,progress:r,showSpinner:n=false,...i},s)=>{let[l,d]=U.useState(0),[m,u]=U.useState(false),c=U.useRef(null);return U.useEffect(()=>{if(r!==void 0){d(r),u(r>0&&r<100);return}return a?(u(true),d(10),c.current=setInterval(()=>{d(g=>{if(g>=90)return g;let p=Math.random()*10;return Math.min(g+p,90)});},500)):l>0&&(d(100),setTimeout(()=>{u(false),d(0);},200)),()=>{c.current&&clearInterval(c.current);}},[a,r]),!m&&r===void 0||r!==void 0&&(r<=0||r>=100)?null:jsxs(Fragment,{children:[jsx("div",{ref:s,className:o(ff({color:t,className:e})),style:{width:`${l}%`},role:"progressbar","aria-valuenow":l,"aria-valuemin":0,"aria-valuemax":100,...i,children:jsx("div",{className:"absolute right-0 h-full w-24 -translate-y-1 rotate-3 bg-inherit opacity-50 blur-sm"})}),n&&m&&jsx("div",{className:"fixed top-4 right-4 z-[9999]",children:jsx("div",{className:o("h-4 w-4 animate-spin rounded-full border-2 border-transparent",t==="primary"&&"border-t-primary",t==="secondary"&&"border-t-secondary",t==="success"&&"border-t-success",t==="warning"&&"border-t-warning",t==="danger"&&"border-t-danger",t==="info"&&"border-t-info")})})]})});gf.displayName="NProgress";var xf=cva("flex items-center justify-center",{variants:{variant:{spinner:"",dots:"",pulse:"",skeleton:""},size:{sm:"gap-1",md:"gap-2",lg:"gap-3"},fullScreen:{true:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",false:""}},defaultVariants:{variant:"spinner",size:"md",fullScreen:false}}),bf={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},$w={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},yf=U.forwardRef(({className:e,variant:t="spinner",size:a="md",fullScreen:r,text:n,color:i="primary",...s},l)=>{let d={primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"}[i],m=()=>{switch(t){case "dots":return jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(u=>jsx("div",{className:o($w[a||"md"],"animate-bounce rounded-full bg-current",d),style:{animationDelay:`${u*.15}s`}},u))});case "pulse":return jsx("div",{className:o(bf[a||"md"],"animate-pulse rounded-full bg-current",d)});case "skeleton":return jsxs("div",{className:"w-full space-y-2",children:[jsx("div",{className:"h-4 w-3/4 animate-pulse rounded bg-muted"}),jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-muted"}),jsx("div",{className:"h-4 w-5/6 animate-pulse rounded bg-muted"})]});default:return jsx(Loader2,{className:o(bf[a||"md"],"animate-spin",d)})}};return jsx("div",{ref:l,className:o(xf({variant:t,size:a,fullScreen:r,className:e})),role:"status","aria-label":n||"Loading",...s,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[m(),n&&jsx("span",{className:o("text-sm",d),children:n})]})})});yf.displayName="Loading";var Vs=class extends U.Component{constructor(t){super(t),this.state={hasError:false,error:null};}static getDerivedStateFromError(t){return {hasError:true,error:t}}componentDidCatch(t,a){this.props.onError?.(t,a);}componentDidUpdate(t){this.state.hasError&&this.props.resetKeys&&this.props.resetKeys.some((r,n)=>r!==t.resetKeys?.[n])&&this.reset();}reset=()=>{this.props.onReset?.(),this.setState({hasError:false,error:null});};render(){return this.state.hasError?this.props.fallback?this.props.fallback:jsx(Ls,{error:this.state.error,onReset:this.reset}):this.props.children}},Ls=U.forwardRef(({error:e,onReset:t,className:a},r)=>jsxs("div",{ref:r,className:o("flex min-h-[200px] flex-col items-center justify-center gap-4 rounded-lg border border-danger/20 bg-danger/5 p-6 text-center",a),role:"alert",children:[jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-danger/10",children:jsx(AlertTriangle,{className:"h-6 w-6 text-danger"})}),jsxs("div",{className:"space-y-2",children:[jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Something went wrong"}),e&&jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:e.message||"An unexpected error occurred"})]}),t&&jsxs("button",{onClick:t,className:"inline-flex items-center gap-2 rounded-md bg-danger px-4 py-2 text-sm font-medium text-danger-foreground hover:bg-danger/90 transition-colors",children:[jsx(RefreshCw,{className:"h-4 w-4"}),"Try again"]})]}));Ls.displayName="DefaultErrorFallback";var Uw=Vs;var wf=U.forwardRef(({value:e,defaultValue:t,onValueChange:a,placeholder:r="Pick a date range",dateFormat:n="LLL dd, y",disabled:i=false,minDate:s,maxDate:l,numberOfMonths:d=2,className:m,align:u="start"},c)=>{let[g,p]=U.useState(false),[v,N]=U.useState(t),b=e!==void 0,h=b?e:v,w=y=>{b||N(y),a?.(y);},f=y=>{if(!y)return r;let{from:P,to:x}=y;return P&&x?`${format(P,n)} - ${format(x,n)}`:P?format(P,n):r};return jsxs(ve,{open:g,onOpenChange:p,children:[jsx(Re,{asChild:true,children:jsxs(O,{ref:c,variant:"bordered",disabled:i,className:o("w-full justify-start text-left font-normal",!h?.from&&"text-muted-foreground",m),children:[jsx(Calendar,{className:"mr-2 h-4 w-4"}),f(h)]})}),jsx(ue,{className:"w-auto p-0",align:u,children:jsx(Rr,{mode:"range",defaultMonth:h?.from,selected:h,onSelect:w,numberOfMonths:d,disabled:y=>!!(s&&y<s||l&&y>l),initialFocus:true})})]})});wf.displayName="DateRangePicker";var Ar=e=>String(e).padStart(2,"0"),Nf=U.forwardRef(({value:e,onValueChange:t,placeholder:a="Pick a time",use24Hour:r=true,minuteStep:n=1,disabled:i=false,className:s},l)=>{let[d,m]=U.useState(false),u=r?Array.from({length:24},(f,y)=>y):Array.from({length:12},(f,y)=>y+1),c=Array.from({length:Math.floor(60/n)},(f,y)=>y*n),g=f=>{if(!f)return a;if(r)return `${Ar(f.hours)}:${Ar(f.minutes)}`;let y=f.hours%12||12,P=f.hours>=12?"PM":"AM";return `${Ar(y)}:${Ar(f.minutes)} ${P}`},p=f=>{let y=e?.minutes??0,P=f;if(!r&&e){let x=e.hours>=12;x&&f!==12?P=f+12:!x&&f===12&&(P=0);}t?.({hours:P,minutes:y});},v=f=>{let y=e?.hours??0;t?.({hours:y,minutes:f});},N=f=>{if(!e)return;let y=e.hours;f==="AM"&&e.hours>=12?y=e.hours-12:f==="PM"&&e.hours<12&&(y=e.hours+12),t?.({hours:y,minutes:e.minutes});},b=()=>{let f=new Date;t?.({hours:f.getHours(),minutes:f.getMinutes()});},h=e?e.hours>=12?"PM":"AM":void 0,w=e?r?e.hours:e.hours%12||12:void 0;return jsxs(ve,{open:d,onOpenChange:m,children:[jsx(Re,{asChild:true,children:jsxs(O,{ref:l,variant:"bordered",disabled:i,className:o("w-full justify-start text-left font-normal",!e&&"text-muted-foreground",s),children:[jsx(Clock,{className:"mr-2 h-4 w-4"}),g(e)]})}),jsxs(ue,{className:"w-auto p-0",align:"start",children:[jsxs("div",{className:"flex",children:[jsxs("div",{className:"flex flex-col",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Hour"}),jsx(dt,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:u.map(f=>jsx(O,{variant:w===f?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(f),children:Ar(f)},f))})})]}),jsxs("div",{className:"flex flex-col border-l",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Min"}),jsx(dt,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:c.map(f=>jsx(O,{variant:e?.minutes===f?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>v(f),children:Ar(f)},f))})})]}),!r&&jsxs("div",{className:"flex flex-col border-l",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"\xA0"}),jsxs("div",{className:"flex flex-col gap-1 p-1",children:[jsx(O,{variant:h==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>N("AM"),children:"AM"}),jsx(O,{variant:h==="PM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>N("PM"),children:"PM"})]})]})]}),jsxs("div",{className:"flex justify-between border-t p-2",children:[jsx(O,{variant:"ghost",size:"sm",onClick:b,children:"Now"}),jsx(O,{size:"sm",onClick:()=>m(false),children:"Done"})]})]})]})});Nf.displayName="TimePicker";var Pf=cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function qw({className:e,variant:t,items:a,itemHeight:r,height:n,overscan:i=3,renderItem:s,getItemKey:l,gap:d=0,onScrollChange:m,...u},c){let g=U.useRef(null),[p,v]=U.useState(0);U.useImperativeHandle(c,()=>g.current);let N=a.length*(r+d)-d,b=r+d,h=Math.max(0,Math.floor(p/b)-i),w=Math.ceil(n/b)+2*i,f=Math.min(a.length-1,h+w),y=x=>{let S=x.currentTarget.scrollTop;v(S),m?.(S);},P=U.useMemo(()=>{let x=[];for(let S=h;S<=f;S++)a[S]!==void 0&&x.push({item:a[S],index:S,style:{position:"absolute",top:S*b,left:0,right:0,height:r}});return x},[a,h,f,b,r]);return jsx("div",{ref:g,className:o(Pf({variant:t,className:e})),style:{height:n,position:"relative"},onScroll:y,...u,children:jsx("div",{style:{height:N,position:"relative"},children:P.map(({item:x,index:S,style:k})=>jsx("div",{style:k,children:s(x,S)},l?l(x,S):S))})})}var Zw=U.forwardRef(qw);var Sf=cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),Hs=cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),Tf=U.forwardRef(({className:e,variant:t,size:a,children:r,onLoadMore:n,hasMore:i,isLoading:s=false,loader:l,threshold:d=100,rootMargin:m,useWindow:u=false,endMessage:c,...g},p)=>{let v=U.useRef(null),N=U.useRef(null),b=U.useRef(false);U.useImperativeHandle(p,()=>v.current),U.useEffect(()=>{let w=N.current;if(!w)return;let f=new IntersectionObserver(y=>{let[P]=y;P.isIntersecting&&i&&!s&&!b.current&&(b.current=true,Promise.resolve(n()).finally(()=>{b.current=false;}));},{root:u?null:v.current,rootMargin:m||`${d}px`,threshold:0});return f.observe(w),()=>{f.disconnect();}},[i,s,n,d,m,u]);let h=jsx("div",{className:o(Hs({size:a})),children:jsx(Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})});return jsxs("div",{ref:v,className:o(Sf({variant:t,className:e})),...g,children:[r,jsx("div",{ref:N,className:"h-px w-full"}),s&&(l||h),!i&&!s&&c&&jsx("div",{className:o(Hs({size:a}),"text-muted-foreground text-sm"),children:c})]})});Tf.displayName="InfiniteScroll";var Df=cva("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),As=cva("fixed left-[50%] top-[50%] z-50 grid translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",{variants:{size:{sm:"w-full max-w-sm",md:"w-full max-w-lg",lg:"w-full max-w-2xl",xl:"w-full max-w-4xl",full:"w-[calc(100vw-2rem)] h-[calc(100vh-2rem)] max-w-none"}},defaultVariants:{size:"md"}}),Vf=U.forwardRef(({open:e,onOpenChange:t,children:a,trigger:r,title:n,description:i,footer:s,showCloseButton:l=true,closeOnOverlayClick:d=true,closeOnEscape:m=true,size:u,className:c,contentClassName:g},p)=>jsxs(oe.Root,{open:e,onOpenChange:t,children:[r&&jsx(oe.Trigger,{asChild:true,children:r}),jsxs(oe.Portal,{children:[jsx(oe.Overlay,{className:o(Df(),c),onClick:d?void 0:v=>v.stopPropagation()}),jsxs(oe.Content,{ref:p,className:o(As({size:u}),g),onEscapeKeyDown:m?void 0:v=>v.preventDefault(),onPointerDownOutside:d?void 0:v=>v.preventDefault(),children:[(n||i)&&jsxs("div",{className:"flex flex-col space-y-1.5 text-center sm:text-left",children:[n&&jsx(oe.Title,{className:"text-lg font-semibold leading-none tracking-tight",children:n}),i&&jsx(oe.Description,{className:"text-sm text-muted-foreground",children:i})]}),a,s&&jsx("div",{className:"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",children:s}),l&&jsxs(oe.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]})]}));Vf.displayName="Modal";var eN=oe.Root,tN=oe.Trigger,Lf=oe.Portal,aN=oe.Close,zs=U.forwardRef(({className:e,...t},a)=>jsx(oe.Overlay,{ref:a,className:o(Df(),e),...t}));zs.displayName="ModalOverlay";var If=U.forwardRef(({className:e,children:t,size:a,showCloseButton:r=true,...n},i)=>jsxs(Lf,{children:[jsx(zs,{}),jsxs(oe.Content,{ref:i,className:o(As({size:a}),e),...n,children:[t,r&&jsxs(oe.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}));If.displayName="ModalContent";var Ef=({className:e,...t})=>jsx("div",{className:o("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ef.displayName="ModalHeader";var Hf=({className:e,...t})=>jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Hf.displayName="ModalFooter";var Af=U.forwardRef(({className:e,...t},a)=>jsx(oe.Title,{ref:a,className:o("text-lg font-semibold leading-none tracking-tight",e),...t}));Af.displayName="ModalTitle";var zf=U.forwardRef(({className:e,...t},a)=>jsx(oe.Description,{ref:a,className:o("text-sm text-muted-foreground",e),...t}));zf.displayName="ModalDescription";var Ff=cva("h-10 w-10 rounded-full p-2",{variants:{variant:{default:"bg-muted text-foreground",danger:"bg-danger/10 text-danger",warning:"bg-warning/10 text-warning",success:"bg-success/10 text-success",info:"bg-info/10 text-info"}},defaultVariants:{variant:"default"}}),lN=cva("",{variants:{variant:{default:"",danger:"bg-danger text-danger-foreground hover:bg-danger/90",warning:"bg-warning text-warning-foreground hover:bg-warning/90",success:"bg-success text-success-foreground hover:bg-success/90",info:"bg-info text-info-foreground hover:bg-info/90"}},defaultVariants:{variant:"default"}}),dN={default:HelpCircle,danger:XCircle,warning:AlertTriangle,success:CheckCircle,info:Info},Bs=U.forwardRef(({open:e,onOpenChange:t,trigger:a,title:r,description:n,confirmText:i="Confirm",cancelText:s="Cancel",onConfirm:l,onCancel:d,showIcon:m=true,icon:u,variant:c="default",loading:g=false,disabled:p=false,className:v},N)=>{let[b,h]=U.useState(false),w=dN[c||"default"],f=async()=>{if(l){let x=l();if(x instanceof Promise){h(true);try{await x;}finally{h(false);}}}},y=()=>{d?.();},P=g||b;return jsxs(le.Root,{open:e,onOpenChange:t,children:[a&&jsx(le.Trigger,{asChild:true,children:a}),jsxs(le.Portal,{children:[jsx(le.Overlay,{className:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),jsxs(le.Content,{ref:N,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-md translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",v),children:[jsxs("div",{className:"flex flex-col items-center gap-4 sm:flex-row sm:items-start",children:[m&&jsx("div",{className:o(Ff({variant:c})),children:u||jsx(w,{className:"h-6 w-6"})}),jsxs("div",{className:"flex flex-col space-y-2 text-center sm:text-left",children:[jsx(le.Title,{className:"text-lg font-semibold",children:r}),n&&jsx(le.Description,{className:"text-sm text-muted-foreground",children:n})]})]}),jsxs("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:[jsx(le.Cancel,{className:o(Te({variant:"bordered"})),onClick:y,disabled:P,children:s}),jsx(le.Action,{className:o(Te(),lN({variant:c}),P&&"opacity-50 cursor-not-allowed"),onClick:f,disabled:p||P,children:P?jsxs("span",{className:"flex items-center gap-2",children:[jsxs("svg",{className:"h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Loading..."]}):i})]})]})]})]})});Bs.displayName="ConfirmDialog";function cN(){let[e,t]=U.useState({open:false,options:null,resolve:null}),a=U.useCallback(l=>new Promise(d=>{t({open:true,options:l,resolve:d});}),[]),r=U.useCallback(()=>{e.resolve?.(true),t({open:false,options:null,resolve:null});},[e.resolve]),n=U.useCallback(()=>{e.resolve?.(false),t({open:false,options:null,resolve:null});},[e.resolve]),i=U.useCallback(l=>{l||(e.resolve?.(false),t({open:false,options:null,resolve:null}));},[e.resolve]),s=U.useMemo(()=>e.options?jsx(Bs,{open:e.open,onOpenChange:i,title:e.options.title,description:e.options.description,confirmText:e.options.confirmText,cancelText:e.options.cancelText,variant:e.options.variant,onConfirm:r,onCancel:n}):null,[e,r,n,i]);return {confirm:a,ConfirmDialog:s}}var yN=e=>e.map(t=>typeof t=="string"?{src:t}:t),Os=U.forwardRef(({images:e,open:t,onOpenChange:a,initialIndex:r=0,onIndexChange:n,trigger:i,showThumbnails:s=true,showZoom:l=true,showRotate:d=true,showDownload:m=true,showFullscreen:u=true,showNavigation:c=true,showCounter:g=true,closeOnBackdropClick:p=true,className:v},N)=>{let b=U.useMemo(()=>yN(e),[e]),[h,w]=U.useState(r),[f,y]=U.useState(1),[P,x]=U.useState(0),[S,k]=U.useState(false),[M,R]=U.useState(false),[C,D]=U.useState({x:0,y:0}),[T,I]=U.useState({x:0,y:0}),L=U.useRef(null),V=b[h];U.useEffect(()=>{w(r);},[r]),U.useEffect(()=>{n?.(h);},[h,n]),U.useEffect(()=>{y(1),x(0),D({x:0,y:0});},[h]);let E=U.useCallback(()=>{w(G=>G>0?G-1:b.length-1);},[b.length]),A=U.useCallback(()=>{w(G=>G<b.length-1?G+1:0);},[b.length]),B=()=>{y(G=>Math.min(G+.5,4));},H=()=>{y(G=>{let ge=Math.max(G-.5,.5);return ge===1&&D({x:0,y:0}),ge});},Q=()=>{x(G=>(G+90)%360);},te=async()=>{if(V)try{let ge=await(await fetch(V.src)).blob(),ro=URL.createObjectURL(ge),oo=document.createElement("a");oo.href=ro,oo.download=V.alt||`image-${h+1}`,document.body.appendChild(oo),oo.click(),document.body.removeChild(oo),URL.revokeObjectURL(ro);}catch{window.open(V.src,"_blank");}},J=async()=>{if(L.current)if(S)try{await document.exitFullscreen(),k(!1);}catch{}else try{await L.current.requestFullscreen(),k(!0);}catch{}},nt=G=>{f>1&&(R(true),I({x:G.clientX-C.x,y:G.clientY-C.y}));},z=G=>{M&&f>1&&D({x:G.clientX-T.x,y:G.clientY-T.y});},F=()=>{R(false);},ae=U.useCallback(G=>{switch(G.key){case "ArrowLeft":E();break;case "ArrowRight":A();break;case "Escape":a?.(false);break;case "+":case "=":B();break;case "-":H();break}},[E,A,a]);return U.useEffect(()=>{if(t)return window.addEventListener("keydown",ae),()=>window.removeEventListener("keydown",ae)},[t,ae]),U.useEffect(()=>{let G=()=>{k(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",G),()=>document.removeEventListener("fullscreenchange",G)},[]),b.length===0?null:jsxs(oe.Root,{open:t,onOpenChange:a,children:[i&&jsx(oe.Trigger,{asChild:true,children:i}),jsxs(oe.Portal,{children:[jsx(oe.Overlay,{className:"fixed inset-0 z-50 bg-black/90 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",onClick:p?void 0:G=>G.stopPropagation()}),jsxs(oe.Content,{ref:N,className:o("fixed inset-0 z-50 flex flex-col outline-none",v),onPointerDownOutside:p?void 0:G=>G.preventDefault(),children:[jsxs("div",{className:"flex items-center justify-between p-4 text-white",children:[jsxs("div",{className:"flex items-center gap-2",children:[g&&b.length>1&&jsxs("span",{className:"text-sm",children:[h+1," / ",b.length]}),V?.title&&jsx("span",{className:"ml-4 text-sm font-medium",children:V.title})]}),jsxs("div",{className:"flex items-center gap-1",children:[l&&jsxs(Fragment,{children:[jsx("button",{onClick:H,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom out",children:jsx(ZoomOut,{className:"h-5 w-5"})}),jsxs("span",{className:"min-w-[3rem] text-center text-sm",children:[Math.round(f*100),"%"]}),jsx("button",{onClick:B,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom in",children:jsx(ZoomIn,{className:"h-5 w-5"})})]}),d&&jsx("button",{onClick:Q,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Rotate",children:jsx(RotateCw,{className:"h-5 w-5"})}),m&&jsx("button",{onClick:te,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Download",children:jsx(Download,{className:"h-5 w-5"})}),u&&jsx("button",{onClick:J,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:S?"Exit fullscreen":"Fullscreen",children:S?jsx(Minimize2,{className:"h-5 w-5"}):jsx(Maximize2,{className:"h-5 w-5"})}),jsxs(oe.Close,{className:"rounded-full p-2 hover:bg-white/10 transition-colors ml-2",children:[jsx(X,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}),jsxs("div",{ref:L,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:nt,onMouseMove:z,onMouseUp:F,onMouseLeave:F,children:[c&&b.length>1&&jsxs(Fragment,{children:[jsx("button",{onClick:E,className:"absolute left-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsx(ChevronLeft,{className:"h-6 w-6"})}),jsx("button",{onClick:A,className:"absolute right-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsx(ChevronRight,{className:"h-6 w-6"})})]}),jsx("img",{src:V?.src,alt:V?.alt||"",className:o("max-h-full max-w-full object-contain transition-transform duration-200",M?"cursor-grabbing":f>1?"cursor-grab":""),style:{transform:`translate(${C.x}px, ${C.y}px) scale(${f}) rotate(${P}deg)`},draggable:false})]}),V?.description&&jsx("div",{className:"p-4 text-center text-white text-sm",children:V.description}),s&&b.length>1&&jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:b.map((G,ge)=>jsx("button",{onClick:()=>w(ge),className:o("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",h===ge?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsx("img",{src:G.src,alt:G.alt||`Thumbnail ${ge+1}`,className:"h-full w-full object-cover"})},ge))})]})]})]})});Os.displayName="ImageViewer";var Of=({children:e,images:t,index:a=0,className:r})=>{let[n,i]=U.useState(false);return jsxs(Fragment,{children:[jsx("button",{onClick:()=>i(true),className:o("cursor-zoom-in",r),children:e}),jsx(Os,{images:t,open:n,onOpenChange:i,initialIndex:a})]})};Of.displayName="ImageViewerTrigger";var $f=cva("inline-flex items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-input hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),_f=U.forwardRef(({className:e,variant:t,size:a,iconSize:r,...n},i)=>{let l=r??{sm:14,md:16,lg:20}[a??"md"];return jsx("button",{ref:i,type:"button",className:o($f({variant:t,size:a}),e),"aria-label":"Close",...n,children:jsx(X,{style:{width:l,height:l}})})});_f.displayName="CloseButton";var Uf=cva("inline-flex items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",soft:"bg-primary/10 text-primary hover:bg-primary/20",surface:"bg-muted hover:bg-muted/80"},size:{sm:"h-7 w-7",md:"h-9 w-9",lg:"h-11 w-11"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary text-primary-foreground hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/90"},{variant:"solid",color:"success",className:"bg-success text-success-foreground hover:bg-success/90"},{variant:"solid",color:"warning",className:"bg-warning text-warning-foreground hover:bg-warning/90"},{variant:"solid",color:"danger",className:"bg-danger text-danger-foreground hover:bg-danger/90"},{variant:"soft",color:"primary",className:"bg-primary/10 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary/10 text-secondary-foreground hover:bg-secondary/20"},{variant:"soft",color:"success",className:"bg-success/10 text-success hover:bg-success/20"},{variant:"soft",color:"warning",className:"bg-warning/10 text-warning hover:bg-warning/20"},{variant:"soft",color:"danger",className:"bg-danger/10 text-danger hover:bg-danger/20"},{variant:"outline",color:"primary",className:"border-primary text-primary hover:bg-primary/10"},{variant:"outline",color:"success",className:"border-success text-success hover:bg-success/10"},{variant:"outline",color:"warning",className:"border-warning text-warning hover:bg-warning/10"},{variant:"outline",color:"danger",className:"border-danger text-danger hover:bg-danger/10"}],defaultVariants:{variant:"ghost",size:"md",color:"default",radius:"md"}}),Yf=U.forwardRef(({className:e,variant:t,size:a,color:r,radius:n,loading:i,disabled:s,children:l,...d},m)=>jsx("button",{ref:m,type:"button",className:o(Uf({variant:t,size:a,color:r,radius:n}),e),disabled:s||i,...d,children:i?jsxs("svg",{className:"animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",style:{width:"1em",height:"1em"},children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):l}));Yf.displayName="ActionIcon";var qf=({children:e,container:t,disabled:a=false})=>{let[r,n]=U.useState(false);if(U.useEffect(()=>{n(true);},[]),a||!r)return jsx(Fragment,{children:e});let i=null;return typeof t=="string"?i=document.querySelector(t):t instanceof Element?i=t:i=document.body,i?createPortal(e,i):jsx(Fragment,{children:e})};qf.displayName="Portal";var Zf=cva("absolute rounded-full border-2 border-background",{variants:{color:{default:"bg-muted-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},size:{sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3"},position:{"top-right":"top-0 right-0 -translate-y-1/3 translate-x-1/3","top-left":"top-0 left-0 -translate-y-1/3 -translate-x-1/3","bottom-right":"bottom-0 right-0 translate-y-1/3 translate-x-1/3","bottom-left":"bottom-0 left-0 translate-y-1/3 -translate-x-1/3"},ping:{true:"",false:""}},defaultVariants:{color:"primary",size:"md",position:"top-right",ping:false}}),Qf=U.forwardRef(({className:e,color:t,size:a,position:r,ping:n,content:i,show:s=true,offset:l,style:d,...m},u)=>{if(!s)return null;let c=i!=null;return jsxs("span",{ref:u,className:o(Zf({color:t,size:c?void 0:a,position:r,ping:n}),c&&"flex h-auto w-auto min-w-[1.25rem] items-center justify-center px-1 py-0.5 text-[10px] font-medium text-white",e),style:{...d,...l!==void 0&&{transform:`translate(${r?.includes("right")?l:-l}px, ${r?.includes("top")?-l:l}px)`}},...m,children:[n&&jsx("span",{className:o("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",t==="default"&&"bg-muted-foreground",t==="primary"&&"bg-primary",t==="secondary"&&"bg-secondary",t==="success"&&"bg-success",t==="warning"&&"bg-warning",t==="danger"&&"bg-danger")}),i]})});Qf.displayName="Indicator";var Jf=U.forwardRef(({className:e,children:t,...a},r)=>jsx("div",{ref:r,className:o("relative inline-flex",e),...a,children:t}));Jf.displayName="IndicatorWrapper";var tg=cva("relative overflow-auto",{variants:{orientation:{vertical:"",horizontal:"",both:""},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"vertical",size:"md"}}),ag=U.forwardRef(({className:e,orientation:t,size:a,hideScrollbar:r=false,shadowColor:n="rgba(0, 0, 0, 0.1)",children:i,...s},l)=>{let d=U.useRef(null),[m,u]=U.useState({top:false,bottom:false,left:false,right:false});U.useImperativeHandle(l,()=>d.current);let c=U.useCallback(()=>{let h=d.current;if(!h)return;let{scrollTop:w,scrollLeft:f,scrollHeight:y,scrollWidth:P,clientHeight:x,clientWidth:S}=h;u({top:w>0,bottom:w<y-x-1,left:f>0,right:f<P-S-1});},[]);U.useEffect(()=>{let h=d.current;if(h)return c(),h.addEventListener("scroll",c),window.addEventListener("resize",c),()=>{h.removeEventListener("scroll",c),window.removeEventListener("resize",c);}},[c]);let p={sm:"20px",md:"40px",lg:"60px"}[a??"md"],v=t==="vertical"||t==="both",N=t==="horizontal"||t==="both",b={maskImage:[v&&m.top&&`linear-gradient(to bottom, transparent, black ${p})`,v&&m.bottom&&`linear-gradient(to top, transparent, black ${p})`,N&&m.left&&`linear-gradient(to right, transparent, black ${p})`,N&&m.right&&`linear-gradient(to left, transparent, black ${p})`].filter(Boolean).join(", ")||void 0,maskComposite:"intersect",WebkitMaskComposite:"source-in"};return jsx("div",{ref:d,className:o(tg({orientation:t,size:a}),r&&"scrollbar-hide [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",e),style:b,...s,children:i})});ag.displayName="ScrollShadow";var ng=U.forwardRef(({className:e,...t},a)=>jsx(og.Root,{ref:a,className:o(e),...t}));ng.displayName="VisuallyHidden";var ig=cva("inline-flex items-center justify-center font-mono font-medium",{variants:{variant:{default:"rounded border border-border bg-muted text-muted-foreground shadow-sm",outline:"rounded border border-border text-foreground",ghost:"text-muted-foreground"},size:{sm:"min-w-[1.25rem] px-1 py-0.5 text-[10px]",md:"min-w-[1.5rem] px-1.5 py-0.5 text-xs",lg:"min-w-[2rem] px-2 py-1 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),LN={cmd:"\u2318",command:"\u2318",ctrl:"\u2303",control:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7",enter:"\u21B5",return:"\u21B5",backspace:"\u232B",delete:"\u2326",escape:"\u238B",esc:"\u238B",tab:"\u21E5",space:"\u2423",up:"\u2191",down:"\u2193",left:"\u2190",right:"\u2192",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2912",end:"\u2913",capslock:"\u21EA"},IN=e=>{let t=e.toLowerCase();return LN[t]||e.toUpperCase()},sg=U.forwardRef(({className:e,variant:t,size:a,keys:r,children:n,...i},s)=>{let l=()=>r?(Array.isArray(r)?r:[r]).map((m,u)=>jsxs(U.Fragment,{children:[u>0&&jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsx("span",{children:IN(m)})]},u)):n;return jsx("kbd",{ref:s,className:o(ig({variant:t,size:a}),e),...i,children:l()})});sg.displayName="Kbd";var dg=U.forwardRef(({className:e,size:t,axis:a="both",style:r,...n},i)=>{let s=typeof t=="number"?`${t}px`:t,l={...r,...t?{width:a==="vertical"?void 0:s,height:a==="horizontal"?void 0:s,minWidth:a==="vertical"?void 0:s,minHeight:a==="horizontal"?void 0:s,flexShrink:0}:{flex:"1 1 auto"}};return jsx("div",{ref:i,"aria-hidden":"true",className:o(e),style:l,...n})});dg.displayName="Spacer";var cg=cva("inline-flex items-center justify-center rounded-md transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-input hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-7 w-7",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),mg=U.forwardRef(({className:e,variant:t,size:a,value:r,successDuration:n=2e3,onCopySuccess:i,onCopyError:s,copyIcon:l,successIcon:d,...m},u)=>{let[c,g]=U.useState(false),p={sm:14,md:16,lg:20}[a??"md"],v=async()=>{try{await navigator.clipboard.writeText(r),g(!0),i?.(),setTimeout(()=>{g(!1);},n);}catch(N){s?.(N);}};return jsx("button",{ref:u,type:"button",className:o(cg({variant:t,size:a}),e),onClick:v,"aria-label":c?"Copied":"Copy to clipboard",...m,children:c?d??jsx(Check,{className:"text-success",style:{width:p,height:p}}):l??jsx(Copy,{style:{width:p,height:p}})})});mg.displayName="CopyButton";var ug=cva("flex flex-col bg-background",{variants:{variant:{default:"border rounded-lg",bordered:"border-2 rounded-lg",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"md"}}),WN=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],$N=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function _N(e,t,a){let r=new Date(e,t,1),n=new Date(e,t+1,0),i=[],s=r.getDay()-a;s<0&&(s+=7);for(let d=s-1;d>=0;d--)i.push(new Date(e,t,-d));for(let d=1;d<=n.getDate();d++)i.push(new Date(e,t,d));let l=42-i.length;for(let d=1;d<=l;d++)i.push(new Date(e,t+1,d));return i}function KN(e,t){let a=[],n=e.getDay()-t;n<0&&(n+=7);let i=new Date(e);i.setDate(e.getDate()-n);for(let s=0;s<7;s++){let l=new Date(i);l.setDate(i.getDate()+s),a.push(l);}return a}function Yn(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Un(e){return Yn(e,new Date)}function pg(e,t){return e.filter(a=>{let r=new Date(a.start),n=new Date(a.end);return Yn(r,t)||Yn(n,t)||r<t&&n>t})}var fg=U.forwardRef(({className:e,variant:t,size:a,events:r=[],view:n="month",onViewChange:i,date:s,onDateChange:l,onEventClick:d,onSlotClick:m,weekStartsOn:u=0,locale:c="en-US",...g},p)=>{let[v,N]=U.useState(new Date),b=s??v,h=R=>{l?l(R):N(R);},w=u===1?$N:WN,f=()=>{let R=new Date(b);n==="month"?R.setMonth(R.getMonth()-1):n==="week"?R.setDate(R.getDate()-7):R.setDate(R.getDate()-1),h(R);},y=()=>{let R=new Date(b);n==="month"?R.setMonth(R.getMonth()+1):n==="week"?R.setDate(R.getDate()+7):R.setDate(R.getDate()+1),h(R);},P=()=>{h(new Date);},x=()=>n==="day"?b.toLocaleDateString(c,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):b.toLocaleDateString(c,{year:"numeric",month:"long"}),S=()=>{let R=_N(b.getFullYear(),b.getMonth(),u);return jsxs("div",{className:"flex-1 flex flex-col",children:[jsx("div",{className:"grid grid-cols-7 border-b",children:w.map(C=>jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:C},C))}),jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:R.map((C,D)=>{let T=pg(r,C),I=C.getMonth()===b.getMonth();return jsxs("div",{className:o("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!I&&"bg-muted/30"),onClick:()=>m?.(C),children:[jsx("div",{className:o("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",Un(C)&&"bg-primary text-primary-foreground",!I&&"text-muted-foreground"),children:C.getDate()}),jsxs("div",{className:"space-y-0.5",children:[T.slice(0,3).map(L=>jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:L.color||"hsl(var(--primary))",color:"white"},onClick:V=>{V.stopPropagation(),d?.(L);},children:L.title},L.id)),T.length>3&&jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",T.length-3," more"]})]})]},D)})})]})},k=()=>{let R=KN(b,u),C=Array.from({length:24},(D,T)=>T);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsxs("div",{className:"grid grid-cols-[60px_repeat(7,1fr)] border-b",children:[jsx("div",{className:"p-2"}),R.map((D,T)=>jsxs("div",{className:o("p-2 text-center border-l",Un(D)&&"bg-primary/10"),children:[jsx("div",{className:"text-xs text-muted-foreground",children:w[T]}),jsx("div",{className:o("text-lg font-semibold",Un(D)&&"text-primary"),children:D.getDate()})]},T))]}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:C.map(D=>jsxs(U.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[D.toString().padStart(2,"0"),":00"]}),R.map((T,I)=>{let L=new Date(T);L.setHours(D,0,0,0);let V=r.filter(E=>{let A=new Date(E.start);return Yn(A,T)&&A.getHours()===D});return jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(L),children:V.map(E=>jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:E.color||"hsl(var(--primary))",color:"white"},onClick:A=>{A.stopPropagation(),d?.(E);},children:E.title},E.id))},I)})]},D))})})]})},M=()=>{let R=Array.from({length:24},(D,T)=>T),C=pg(r,b);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsx("div",{className:"p-4 border-b text-center",children:jsx("div",{className:o("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",Un(b)&&"bg-primary text-primary-foreground"),children:b.getDate()})}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_1fr]",children:R.map(D=>{let T=new Date(b);T.setHours(D,0,0,0);let I=C.filter(L=>new Date(L.start).getHours()===D);return jsxs(U.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[D.toString().padStart(2,"0"),":00"]}),jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(T),children:I.map(L=>jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:L.color||"hsl(var(--primary))",color:"white"},onClick:V=>{V.stopPropagation(),d?.(L);},children:L.title},L.id))})]},D)})})})]})};return jsxs("div",{ref:p,className:o(ug({variant:t,size:a,className:e})),...g,children:[jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(O,{variant:"bordered",size:"sm",onClick:P,children:"Today"}),jsx(O,{variant:"ghost",size:"icon",onClick:f,children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(O,{variant:"ghost",size:"icon",onClick:y,children:jsx(ChevronRight,{className:"h-4 w-4"})}),jsx("h2",{className:"text-lg font-semibold ml-2",children:x()})]}),jsx("div",{className:"flex items-center gap-1 border rounded-lg p-1",children:["month","week","day"].map(R=>jsx(O,{variant:n===R?"solid":"ghost",size:"sm",onClick:()=>i?.(R),children:R.charAt(0).toUpperCase()+R.slice(1)},R))})]}),n==="month"&&S(),n==="week"&&k(),n==="day"&&M()]})});fg.displayName="FullCalendar";var Io=cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),Eo=["hsl(var(--primary))","hsl(var(--chart-1, 220 70% 50%))","hsl(var(--chart-2, 160 60% 45%))","hsl(var(--chart-3, 30 80% 55%))","hsl(var(--chart-4, 280 65% 60%))"],gg=U.forwardRef(({className:e,size:t,data:a,dataKeys:r,colors:n=Eo,showGrid:i=true,showLegend:s=true,showTooltip:l=true,xAxisKey:d="name",curveType:m="monotone",...u},c)=>jsx("div",{ref:c,className:o(Io({size:t,className:e})),...u,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(LineChart,{data:a,children:[i&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:d,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),l&&jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),s&&jsx(Legend,{}),r.map((g,p)=>jsx(Line,{type:m,dataKey:g,stroke:n[p%n.length],strokeWidth:2,dot:{fill:n[p%n.length],strokeWidth:0},activeDot:{r:6}},g))]})})}));gg.displayName="LineChart";var bg=U.forwardRef(({className:e,size:t,data:a,dataKeys:r,colors:n=Eo,showGrid:i=true,showLegend:s=true,showTooltip:l=true,xAxisKey:d="name",stacked:m=false,layout:u="horizontal",...c},g)=>jsx("div",{ref:g,className:o(Io({size:t,className:e})),...c,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(BarChart,{data:a,layout:u,children:[i&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:u==="horizontal"?d:void 0,type:u==="horizontal"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{dataKey:u==="vertical"?d:void 0,type:u==="vertical"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),l&&jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),s&&jsx(Legend,{}),r.map((p,v)=>jsx(Bar,{dataKey:p,fill:n[v%n.length],stackId:m?"stack":void 0,radius:[4,4,0,0]},p))]})})}));bg.displayName="BarChart";var vg=U.forwardRef(({className:e,size:t,data:a,dataKey:r="value",nameKey:n="name",colors:i=Eo,innerRadius:s=0,outerRadius:l=80,showLegend:d=true,showTooltip:m=true,showLabels:u=false,...c},g)=>jsx("div",{ref:g,className:o(Io({size:t,className:e})),...c,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(PieChart,{children:[m&&jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"}}),d&&jsx(Legend,{}),jsx(Pie,{data:a,dataKey:r,nameKey:n,cx:"50%",cy:"50%",innerRadius:s,outerRadius:l,label:u,labelLine:u,children:a.map((p,v)=>jsx(Cell,{fill:i[v%i.length]},`cell-${v}`))})]})})}));vg.displayName="PieChart";var hg=U.forwardRef(({className:e,size:t,data:a,dataKeys:r,colors:n=Eo,showGrid:i=true,showLegend:s=true,showTooltip:l=true,xAxisKey:d="name",stacked:m=false,curveType:u="monotone",...c},g)=>jsx("div",{ref:g,className:o(Io({size:t,className:e})),...c,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(AreaChart,{data:a,children:[i&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:d,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),l&&jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),s&&jsx(Legend,{}),r.map((p,v)=>jsx(Area,{type:u,dataKey:p,stroke:n[v%n.length],fill:n[v%n.length],fillOpacity:.3,stackId:m?"stack":void 0},p))]})})}));hg.displayName="AreaChart";var Rg=cva("flex gap-4 overflow-x-auto p-4",{variants:{variant:{default:"bg-muted/30",bordered:"border rounded-lg bg-background",ghost:""}},defaultVariants:{variant:"default"}}),wg=cva("flex flex-col min-w-[280px] w-[280px] rounded-lg",{variants:{variant:{default:"bg-muted/50",bordered:"border bg-background",ghost:"bg-transparent"}},defaultVariants:{variant:"default"}}),Xs=cva("rounded-lg p-3 cursor-grab active:cursor-grabbing transition-all",{variants:{variant:{default:"bg-background border shadow-sm hover:shadow-md",bordered:"border-2 bg-background hover:border-primary/50",ghost:"bg-muted/50 hover:bg-muted"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg",false:""}},defaultVariants:{variant:"default",isDragging:false}});function fP({card:e,columnId:t,variant:a,renderCard:r,onCardClick:n}){let{attributes:i,listeners:s,setNodeRef:l,transform:d,transition:m,isDragging:u}=useSortable({id:e.id,data:{columnId:t}}),c={transform:CSS.Transform.toString(d),transition:m};return jsx("div",{ref:l,style:c,className:o(Xs({variant:a,isDragging:u})),onClick:()=>n?.(e,t),...i,...s,children:r?r(e,t):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:e.title}),e.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description})]})]})})}function gP({column:e,variant:t,renderCard:a,onCardClick:r,onAddCard:n,showAddCard:i,columnHeight:s}){return jsxs("div",{className:o(wg({variant:t})),children:[jsxs("div",{className:"flex items-center justify-between p-3 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[e.color&&jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),jsx("h3",{className:"font-semibold text-sm",children:e.title}),jsx("span",{className:"text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded-full",children:e.cards.length})]}),i&&jsx(O,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>n?.(e.id),children:jsx(Plus,{className:"h-4 w-4"})})]}),jsx(dt,{style:{height:s},children:jsxs("div",{className:"p-2 space-y-2",children:[jsx(SortableContext,{items:e.cards.map(l=>l.id),strategy:verticalListSortingStrategy,children:e.cards.map(l=>jsx(fP,{card:l,columnId:e.id,variant:t,renderCard:a,onCardClick:r},l.id))}),e.cards.length===0&&jsx("div",{className:"h-20 border-2 border-dashed rounded-lg flex items-center justify-center text-muted-foreground text-sm",children:"Drop here"})]})})]})}var Ng=U.forwardRef(({className:e,variant:t,columns:a,onCardMove:r,onCardClick:n,onAddCard:i,renderCard:s,showAddCard:l=true,columnHeight:d=500,...m},u)=>{let[c,g]=U.useState(null),[p,v]=U.useState(null),N=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),b=y=>a.find(P=>P.cards.some(x=>x.id===y));return jsxs(DndContext,{sensors:N,collisionDetection:closestCorners,onDragStart:y=>{let{active:P}=y,x=b(P.id);if(x){let S=x.cards.find(k=>k.id===P.id);S&&(g(S),v(x.id));}},onDragOver:y=>{let{active:P,over:x}=y;if(!x)return;let S=P.id,k=x.id,M=b(S),R=b(k)||a.find(T=>T.id===k);if(!M||!R||M.id===R.id)return;let C=R.cards.findIndex(T=>T.id===k),D=C===-1?R.cards.length:C;r?.(S,M.id,R.id,D);},onDragEnd:y=>{let{active:P,over:x}=y;if(x&&P.id!==x.id){let S=b(P.id),k=b(x.id)||a.find(M=>M.id===x.id);if(S&&k){let M=k.cards.findIndex(C=>C.id===x.id),R=M===-1?k.cards.length:M;r?.(P.id,S.id,k.id,R);}}g(null),v(null);},children:[jsx("div",{ref:u,className:o(Rg({variant:t,className:e})),...m,children:a.map(y=>jsx(gP,{column:y,variant:t,renderCard:s,onCardClick:n,onAddCard:i,showAddCard:l,columnHeight:d},y.id))}),jsx(DragOverlay,{children:c&&p&&jsx("div",{className:o(Xs({variant:t,isDragging:true})),children:s?s(c,p):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:c.title}),c.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:c.description})]})]})})})]})});Ng.displayName="KanbanBoard";var Pg=cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),Cg=U.createContext(null);function qs(){let e=U.useContext(Cg);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Sg=U.forwardRef(({className:e,variant:t,children:a,opts:r,plugins:n,orientation:i="horizontal",showArrows:s=true,showDots:l=true,setApi:d,...m},u)=>{let[c,g]=bP({...r,axis:i==="horizontal"?"x":"y"},n),[p,v]=U.useState(false),[N,b]=U.useState(false),[h,w]=U.useState(0),[f,y]=U.useState([]),P=U.useCallback(R=>{R&&(w(R.selectedScrollSnap()),v(R.canScrollPrev()),b(R.canScrollNext()));},[]),x=U.useCallback(()=>{g?.scrollPrev();},[g]),S=U.useCallback(()=>{g?.scrollNext();},[g]),k=U.useCallback(R=>{g?.scrollTo(R);},[g]),M=U.useCallback(R=>{R.key==="ArrowLeft"?(R.preventDefault(),x()):R.key==="ArrowRight"&&(R.preventDefault(),S());},[x,S]);return U.useEffect(()=>{!g||!d||d(g);},[g,d]),U.useEffect(()=>{if(g)return y(g.scrollSnapList()),P(g),g.on("reInit",P),g.on("select",P),()=>{g?.off("select",P);}},[g,P]),jsx(Cg.Provider,{value:{carouselRef:c,api:g,scrollPrev:x,scrollNext:S,canScrollPrev:p,canScrollNext:N,selectedIndex:h,scrollSnaps:f,scrollTo:k},children:jsxs("div",{ref:u,className:o(Pg({variant:t,className:e})),onKeyDownCapture:M,role:"region","aria-roledescription":"carousel",...m,children:[jsx("div",{ref:c,className:"overflow-hidden",children:jsx("div",{className:o("flex",i==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:a})}),s&&jsxs(Fragment,{children:[jsx(Zs,{}),jsx(Qs,{})]}),l&&f.length>1&&jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:f.map((R,C)=>jsx("button",{className:o("w-2 h-2 rounded-full transition-all",C===h?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>k(C),"aria-label":`Go to slide ${C+1}`},C))})]})})});Sg.displayName="Carousel";var Tg=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("flex",e),...t}));Tg.displayName="CarouselContent";var Mg=U.forwardRef(({className:e,basis:t="basis-full",...a},r)=>jsx("div",{ref:r,role:"group","aria-roledescription":"slide",className:o("min-w-0 shrink-0 grow-0 pl-4",t,e),...a}));Mg.displayName="CarouselItem";var Zs=U.forwardRef(({className:e,variant:t="bordered",size:a="icon",...r},n)=>{let{scrollPrev:i,canScrollPrev:s}=qs();return jsxs(O,{ref:n,variant:t,size:a,className:o("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:i,...r,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Previous slide"})]})});Zs.displayName="CarouselPrevious";var Qs=U.forwardRef(({className:e,variant:t="bordered",size:a="icon",...r},n)=>{let{scrollNext:i,canScrollNext:s}=qs();return jsxs(O,{ref:n,variant:t,size:a,className:o("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:i,...r,children:[jsx(ChevronRight,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Next slide"})]})});Qs.displayName="CarouselNext";var kg=cva("flex flex-col bg-popover border rounded-lg shadow-md",{variants:{size:{sm:"w-64 h-72",md:"w-80 h-96",lg:"w-96 h-[480px]"}},defaultVariants:{size:"md"}}),Jn={recent:{icon:"\u{1F550}",name:"Recent"},smileys:{icon:"\u{1F600}",name:"Smileys & Emotion"},people:{icon:"\u{1F44B}",name:"People & Body"},animals:{icon:"\u{1F43B}",name:"Animals & Nature"},food:{icon:"\u{1F354}",name:"Food & Drink"},travel:{icon:"\u{1F697}",name:"Travel & Places"},activities:{icon:"\u26BD",name:"Activities"},objects:{icon:"\u{1F4A1}",name:"Objects"},symbols:{icon:"\u2764\uFE0F",name:"Symbols"},flags:{icon:"\u{1F3F3}\uFE0F",name:"Flags"}},el={smileys:["\u{1F600}","\u{1F603}","\u{1F604}","\u{1F601}","\u{1F606}","\u{1F605}","\u{1F923}","\u{1F602}","\u{1F642}","\u{1F643}","\u{1F609}","\u{1F60A}","\u{1F607}","\u{1F970}","\u{1F60D}","\u{1F929}","\u{1F618}","\u{1F617}","\u263A\uFE0F","\u{1F61A}","\u{1F60B}","\u{1F61B}","\u{1F61C}","\u{1F92A}","\u{1F61D}","\u{1F911}","\u{1F917}","\u{1F92D}","\u{1F92B}","\u{1F914}","\u{1F910}","\u{1F928}","\u{1F610}","\u{1F611}","\u{1F636}","\u{1F60F}","\u{1F612}","\u{1F644}","\u{1F62C}","\u{1F925}","\u{1F60C}","\u{1F614}","\u{1F62A}","\u{1F924}","\u{1F634}","\u{1F637}","\u{1F912}","\u{1F915}","\u{1F922}","\u{1F92E}","\u{1F927}","\u{1F975}","\u{1F976}","\u{1F974}","\u{1F635}","\u{1F92F}","\u{1F920}","\u{1F973}","\u{1F978}","\u{1F60E}","\u{1F913}","\u{1F9D0}","\u{1F615}","\u{1F61F}","\u{1F641}","\u2639\uFE0F","\u{1F62E}","\u{1F62F}","\u{1F632}","\u{1F633}","\u{1F97A}","\u{1F626}","\u{1F627}","\u{1F628}","\u{1F630}","\u{1F625}","\u{1F622}","\u{1F62D}","\u{1F631}","\u{1F616}","\u{1F623}","\u{1F61E}","\u{1F613}","\u{1F629}","\u{1F62B}","\u{1F971}","\u{1F624}","\u{1F621}","\u{1F620}","\u{1F92C}","\u{1F608}","\u{1F47F}","\u{1F480}","\u2620\uFE0F","\u{1F4A9}","\u{1F921}","\u{1F479}","\u{1F47A}","\u{1F47B}","\u{1F47D}"],people:["\u{1F44B}","\u{1F91A}","\u{1F590}\uFE0F","\u270B","\u{1F596}","\u{1F44C}","\u{1F90C}","\u{1F90F}","\u270C\uFE0F","\u{1F91E}","\u{1F91F}","\u{1F918}","\u{1F919}","\u{1F448}","\u{1F449}","\u{1F446}","\u{1F595}","\u{1F447}","\u261D\uFE0F","\u{1F44D}","\u{1F44E}","\u270A","\u{1F44A}","\u{1F91B}","\u{1F91C}","\u{1F44F}","\u{1F64C}","\u{1F450}","\u{1F932}","\u{1F91D}","\u{1F64F}","\u270D\uFE0F","\u{1F485}","\u{1F933}","\u{1F4AA}","\u{1F9BE}","\u{1F9BF}","\u{1F9B5}","\u{1F9B6}","\u{1F442}","\u{1F9BB}","\u{1F443}","\u{1F9E0}","\u{1FAC0}","\u{1FAC1}","\u{1F9B7}","\u{1F9B4}","\u{1F440}","\u{1F441}\uFE0F","\u{1F445}","\u{1F444}","\u{1F476}","\u{1F9D2}","\u{1F466}","\u{1F467}","\u{1F9D1}","\u{1F471}","\u{1F468}","\u{1F9D4}","\u{1F469}","\u{1F9D3}","\u{1F474}","\u{1F475}","\u{1F64D}","\u{1F64E}","\u{1F645}","\u{1F646}","\u{1F481}","\u{1F64B}","\u{1F9CF}","\u{1F647}","\u{1F926}","\u{1F937}","\u{1F46E}","\u{1F575}\uFE0F","\u{1F482}","\u{1F977}","\u{1F477}","\u{1F934}","\u{1F478}"],animals:["\u{1F436}","\u{1F431}","\u{1F42D}","\u{1F439}","\u{1F430}","\u{1F98A}","\u{1F43B}","\u{1F43C}","\u{1F428}","\u{1F42F}","\u{1F981}","\u{1F42E}","\u{1F437}","\u{1F43D}","\u{1F438}","\u{1F435}","\u{1F648}","\u{1F649}","\u{1F64A}","\u{1F412}","\u{1F414}","\u{1F427}","\u{1F426}","\u{1F424}","\u{1F423}","\u{1F425}","\u{1F986}","\u{1F985}","\u{1F989}","\u{1F987}","\u{1F43A}","\u{1F417}","\u{1F434}","\u{1F984}","\u{1F41D}","\u{1FAB1}","\u{1F41B}","\u{1F98B}","\u{1F40C}","\u{1F41E}","\u{1F41C}","\u{1FAB0}","\u{1FAB2}","\u{1FAB3}","\u{1F99F}","\u{1F997}","\u{1F577}\uFE0F","\u{1F578}\uFE0F","\u{1F982}","\u{1F422}","\u{1F40D}","\u{1F98E}","\u{1F996}","\u{1F995}","\u{1F419}","\u{1F991}","\u{1F990}","\u{1F99E}","\u{1F980}","\u{1F421}","\u{1F420}","\u{1F41F}","\u{1F42C}","\u{1F433}","\u{1F40B}","\u{1F988}","\u{1F40A}","\u{1F405}","\u{1F406}","\u{1F993}","\u{1F98D}","\u{1F9A7}","\u{1F9A3}","\u{1F418}","\u{1F99B}","\u{1F98F}","\u{1F42A}","\u{1F42B}","\u{1F992}","\u{1F998}"],food:["\u{1F347}","\u{1F348}","\u{1F349}","\u{1F34A}","\u{1F34B}","\u{1F34C}","\u{1F34D}","\u{1F96D}","\u{1F34E}","\u{1F34F}","\u{1F350}","\u{1F351}","\u{1F352}","\u{1F353}","\u{1FAD0}","\u{1F95D}","\u{1F345}","\u{1FAD2}","\u{1F965}","\u{1F951}","\u{1F346}","\u{1F954}","\u{1F955}","\u{1F33D}","\u{1F336}\uFE0F","\u{1FAD1}","\u{1F952}","\u{1F96C}","\u{1F966}","\u{1F9C4}","\u{1F9C5}","\u{1F344}","\u{1F95C}","\u{1F330}","\u{1F35E}","\u{1F950}","\u{1F956}","\u{1FAD3}","\u{1F968}","\u{1F96F}","\u{1F95E}","\u{1F9C7}","\u{1F9C0}","\u{1F356}","\u{1F357}","\u{1F969}","\u{1F953}","\u{1F354}","\u{1F35F}","\u{1F355}","\u{1F32D}","\u{1F96A}","\u{1F32E}","\u{1F32F}","\u{1FAD4}","\u{1F959}","\u{1F9C6}","\u{1F95A}","\u{1F373}","\u{1F958}","\u{1F372}","\u{1FAD5}","\u{1F963}","\u{1F957}","\u{1F37F}","\u{1F9C8}","\u{1F9C2}","\u{1F96B}","\u{1F371}","\u{1F358}","\u{1F359}","\u{1F35A}","\u{1F35B}","\u{1F35C}","\u{1F35D}","\u{1F360}","\u{1F362}","\u{1F363}","\u{1F364}","\u{1F365}"],travel:["\u{1F697}","\u{1F695}","\u{1F699}","\u{1F68C}","\u{1F68E}","\u{1F3CE}\uFE0F","\u{1F693}","\u{1F691}","\u{1F692}","\u{1F690}","\u{1F6FB}","\u{1F69A}","\u{1F69B}","\u{1F69C}","\u{1F9AF}","\u{1F9BD}","\u{1F9BC}","\u{1F6F4}","\u{1F6B2}","\u{1F6F5}","\u{1F3CD}\uFE0F","\u{1F6FA}","\u{1F6A8}","\u{1F694}","\u{1F68D}","\u{1F698}","\u{1F696}","\u{1F6A1}","\u{1F6A0}","\u{1F69F}","\u{1F683}","\u{1F68B}","\u{1F69E}","\u{1F69D}","\u{1F684}","\u{1F685}","\u{1F688}","\u{1F682}","\u{1F686}","\u{1F687}","\u{1F68A}","\u{1F689}","\u2708\uFE0F","\u{1F6EB}","\u{1F6EC}","\u{1F6E9}\uFE0F","\u{1F4BA}","\u{1F6F0}\uFE0F","\u{1F680}","\u{1F6F8}","\u{1F681}","\u{1F6F6}","\u26F5","\u{1F6A4}","\u{1F6E5}\uFE0F","\u{1F6F3}\uFE0F","\u26F4\uFE0F","\u{1F6A2}","\u2693","\u{1FA9D}","\u26FD","\u{1F6A7}","\u{1F6A6}","\u{1F6A5}","\u{1F68F}","\u{1F5FA}\uFE0F","\u{1F5FF}","\u{1F5FD}","\u{1F5FC}","\u{1F3F0}","\u{1F3EF}","\u{1F3DF}\uFE0F","\u{1F3A1}","\u{1F3A2}","\u{1F3A0}","\u26F2","\u26F1\uFE0F","\u{1F3D6}\uFE0F","\u{1F3DD}\uFE0F","\u{1F3DC}\uFE0F"],activities:["\u26BD","\u{1F3C0}","\u{1F3C8}","\u26BE","\u{1F94E}","\u{1F3BE}","\u{1F3D0}","\u{1F3C9}","\u{1F94F}","\u{1F3B1}","\u{1FA80}","\u{1F3D3}","\u{1F3F8}","\u{1F3D2}","\u{1F3D1}","\u{1F94D}","\u{1F3CF}","\u{1FA83}","\u{1F945}","\u26F3","\u{1FA81}","\u{1F3F9}","\u{1F3A3}","\u{1F93F}","\u{1F94A}","\u{1F94B}","\u{1F3BD}","\u{1F6F9}","\u{1F6FC}","\u{1F6F7}","\u26F8\uFE0F","\u{1F94C}","\u{1F3BF}","\u26F7\uFE0F","\u{1F3C2}","\u{1FA82}","\u{1F3CB}\uFE0F","\u{1F93C}","\u{1F938}","\u26F9\uFE0F","\u{1F93A}","\u{1F93E}","\u{1F3CC}\uFE0F","\u{1F3C7}","\u26D1\uFE0F","\u{1F9D8}","\u{1F3C4}","\u{1F3CA}","\u{1F93D}","\u{1F6A3}","\u{1F9D7}","\u{1F6B5}","\u{1F6B4}","\u{1F3C6}","\u{1F947}","\u{1F948}","\u{1F949}","\u{1F3C5}","\u{1F396}\uFE0F","\u{1F3F5}\uFE0F","\u{1F397}\uFE0F","\u{1F3AB}","\u{1F39F}\uFE0F","\u{1F3AA}","\u{1F939}","\u{1F3AD}","\u{1FA70}","\u{1F3A8}","\u{1F3AC}","\u{1F3A4}","\u{1F3A7}","\u{1F3BC}","\u{1F3B9}","\u{1F941}","\u{1FA98}","\u{1F3B7}","\u{1F3BA}","\u{1FA97}","\u{1F3B8}","\u{1FA95}"],objects:["\u231A","\u{1F4F1}","\u{1F4F2}","\u{1F4BB}","\u2328\uFE0F","\u{1F5A5}\uFE0F","\u{1F5A8}\uFE0F","\u{1F5B1}\uFE0F","\u{1F5B2}\uFE0F","\u{1F579}\uFE0F","\u{1F5DC}\uFE0F","\u{1F4BD}","\u{1F4BE}","\u{1F4BF}","\u{1F4C0}","\u{1F4FC}","\u{1F4F7}","\u{1F4F8}","\u{1F4F9}","\u{1F3A5}","\u{1F4FD}\uFE0F","\u{1F39E}\uFE0F","\u{1F4DE}","\u260E\uFE0F","\u{1F4DF}","\u{1F4E0}","\u{1F4FA}","\u{1F4FB}","\u{1F399}\uFE0F","\u{1F39A}\uFE0F","\u{1F39B}\uFE0F","\u{1F9ED}","\u23F1\uFE0F","\u23F2\uFE0F","\u23F0","\u{1F570}\uFE0F","\u231B","\u23F3","\u{1F4E1}","\u{1F50B}","\u{1F50C}","\u{1F4A1}","\u{1F526}","\u{1F56F}\uFE0F","\u{1FA94}","\u{1F9EF}","\u{1F6E2}\uFE0F","\u{1F4B8}","\u{1F4B5}","\u{1F4B4}","\u{1F4B6}","\u{1F4B7}","\u{1FA99}","\u{1F4B0}","\u{1F4B3}","\u{1F48E}","\u2696\uFE0F","\u{1FA9C}","\u{1F9F0}","\u{1FA9B}","\u{1F527}","\u{1F528}","\u2692\uFE0F","\u{1F6E0}\uFE0F","\u26CF\uFE0F","\u{1FA9A}","\u{1F529}","\u2699\uFE0F","\u{1FAA4}","\u{1F9F1}","\u26D3\uFE0F","\u{1F9F2}","\u{1F52B}","\u{1F4A3}","\u{1F9E8}","\u{1FA93}","\u{1F52A}","\u{1F5E1}\uFE0F","\u2694\uFE0F","\u{1F6E1}\uFE0F"],symbols:["\u2764\uFE0F","\u{1F9E1}","\u{1F49B}","\u{1F49A}","\u{1F499}","\u{1F49C}","\u{1F5A4}","\u{1F90D}","\u{1F90E}","\u{1F494}","\u2763\uFE0F","\u{1F495}","\u{1F49E}","\u{1F493}","\u{1F497}","\u{1F496}","\u{1F498}","\u{1F49D}","\u{1F49F}","\u262E\uFE0F","\u271D\uFE0F","\u262A\uFE0F","\u{1F549}\uFE0F","\u2638\uFE0F","\u2721\uFE0F","\u{1F52F}","\u{1F54E}","\u262F\uFE0F","\u2626\uFE0F","\u{1F6D0}","\u26CE","\u2648","\u2649","\u264A","\u264B","\u264C","\u264D","\u264E","\u264F","\u2650","\u2651","\u2652","\u2653","\u{1F194}","\u269B\uFE0F","\u{1F251}","\u2622\uFE0F","\u2623\uFE0F","\u{1F4F4}","\u{1F4F3}","\u{1F236}","\u{1F21A}","\u{1F238}","\u{1F23A}","\u{1F237}\uFE0F","\u2734\uFE0F","\u{1F19A}","\u{1F4AE}","\u{1F250}","\u3299\uFE0F","\u3297\uFE0F","\u{1F234}","\u{1F235}","\u{1F239}","\u{1F232}","\u{1F170}\uFE0F","\u{1F171}\uFE0F","\u{1F18E}","\u{1F191}","\u{1F17E}\uFE0F","\u{1F198}","\u274C","\u2B55","\u{1F6D1}","\u26D4","\u{1F4DB}","\u{1F6AB}","\u{1F4AF}","\u{1F4A2}","\u2668\uFE0F"],flags:["\u{1F3F3}\uFE0F","\u{1F3F4}","\u{1F3C1}","\u{1F6A9}","\u{1F3F3}\uFE0F\u200D\u{1F308}","\u{1F3F3}\uFE0F\u200D\u26A7\uFE0F","\u{1F1FA}\u{1F1F3}","\u{1F1E6}\u{1F1EB}","\u{1F1E6}\u{1F1F1}","\u{1F1E9}\u{1F1FF}","\u{1F1E6}\u{1F1F8}","\u{1F1E6}\u{1F1E9}","\u{1F1E6}\u{1F1F4}","\u{1F1E6}\u{1F1EE}","\u{1F1E6}\u{1F1F6}","\u{1F1E6}\u{1F1EC}","\u{1F1E6}\u{1F1F7}","\u{1F1E6}\u{1F1F2}","\u{1F1E6}\u{1F1FC}","\u{1F1E6}\u{1F1FA}","\u{1F1E6}\u{1F1F9}","\u{1F1E6}\u{1F1FF}","\u{1F1E7}\u{1F1F8}","\u{1F1E7}\u{1F1ED}","\u{1F1E7}\u{1F1E9}","\u{1F1E7}\u{1F1E7}","\u{1F1E7}\u{1F1FE}","\u{1F1E7}\u{1F1EA}","\u{1F1E7}\u{1F1FF}","\u{1F1E7}\u{1F1EF}","\u{1F1E7}\u{1F1F2}","\u{1F1E7}\u{1F1F9}","\u{1F1E7}\u{1F1F4}","\u{1F1E7}\u{1F1E6}","\u{1F1E7}\u{1F1FC}","\u{1F1E7}\u{1F1F7}","\u{1F1E7}\u{1F1F3}","\u{1F1E7}\u{1F1EC}","\u{1F1E7}\u{1F1EB}","\u{1F1E7}\u{1F1EE}","\u{1F1E8}\u{1F1FB}","\u{1F1F0}\u{1F1ED}","\u{1F1E8}\u{1F1F2}","\u{1F1E8}\u{1F1E6}","\u{1F1E8}\u{1F1EB}","\u{1F1F9}\u{1F1E9}","\u{1F1E8}\u{1F1F1}","\u{1F1E8}\u{1F1F3}","\u{1F1E8}\u{1F1F4}","\u{1F1F0}\u{1F1F2}","\u{1F1E8}\u{1F1EC}","\u{1F1E8}\u{1F1E9}","\u{1F1E8}\u{1F1F7}","\u{1F1ED}\u{1F1F7}","\u{1F1E8}\u{1F1FA}","\u{1F1E8}\u{1F1FE}","\u{1F1E8}\u{1F1FF}","\u{1F1E9}\u{1F1F0}","\u{1F1E9}\u{1F1EF}","\u{1F1E9}\u{1F1F2}","\u{1F1E9}\u{1F1F4}","\u{1F1EA}\u{1F1E8}","\u{1F1EA}\u{1F1EC}","\u{1F1F8}\u{1F1FB}","\u{1F1EC}\u{1F1F6}","\u{1F1EA}\u{1F1F7}","\u{1F1EA}\u{1F1EA}","\u{1F1EA}\u{1F1F9}","\u{1F1EA}\u{1F1FA}","\u{1F1EB}\u{1F1EF}","\u{1F1EB}\u{1F1EE}","\u{1F1EB}\u{1F1F7}","\u{1F1EC}\u{1F1E6}","\u{1F1EC}\u{1F1F2}","\u{1F1EC}\u{1F1EA}","\u{1F1E9}\u{1F1EA}","\u{1F1EC}\u{1F1ED}","\u{1F1EC}\u{1F1F7}","\u{1F1EC}\u{1F1F9}","\u{1F1EC}\u{1F1F3}"]},Dg=U.forwardRef(({className:e,size:t,onEmojiSelect:a,recentEmojis:r=[],defaultCategory:n="smileys",showSearch:i=true,showCategories:s=true,...l},d)=>{let[m,u]=U.useState(r.length>0?"recent":n),[c,g]=U.useState(""),v=c?Object.values(el).flat().filter(b=>b.toLowerCase().includes(c.toLowerCase())):m==="recent"?r:el[m]||[],N=b=>{a?.(b);};return jsxs("div",{ref:d,className:o(kg({size:t,className:e})),...l,children:[i&&jsx("div",{className:"p-2 border-b",children:jsxs("div",{className:"relative",children:[jsx(Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),jsx(Jo,{placeholder:"Search emojis...",value:c,onChange:b=>g(b.target.value),className:"pl-8 h-8"})]})}),s&&!c&&jsx("div",{className:"flex border-b px-1",children:Object.entries(Jn).map(([b,{icon:h}])=>b==="recent"&&r.length===0?null:jsx("button",{className:o("flex-1 p-2 text-lg hover:bg-accent rounded transition-colors",m===b&&"bg-accent"),onClick:()=>u(b),title:Jn[b].name,children:h},b))}),!c&&jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:Jn[m].name}),jsx(dt,{className:"flex-1",children:jsxs("div",{className:"grid grid-cols-8 gap-1 p-2",children:[v.map((b,h)=>jsx("button",{className:"w-8 h-8 flex items-center justify-center text-xl hover:bg-accent rounded transition-colors",onClick:()=>N(b),children:b},`${b}-${h}`)),v.length===0&&jsx("div",{className:"col-span-8 py-8 text-center text-muted-foreground text-sm",children:"No emojis found"})]})})]})});Dg.displayName="EmojiPicker";var Vg=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),jP=cva("flex flex-wrap items-center gap-0.5 p-1 border-b",{variants:{size:{sm:"p-0.5",md:"p-1",lg:"p-1.5"}},defaultVariants:{size:"md"}}),XP=cva("flex-1 overflow-auto prose prose-sm max-w-none dark:prose-invert [&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[inherit] [&_.ProseMirror.is-editor-empty:first-child::before]:text-muted-foreground [&_.ProseMirror.is-editor-empty:first-child::before]:content-[attr(data-placeholder)] [&_.ProseMirror.is-editor-empty:first-child::before]:float-left [&_.ProseMirror.is-editor-empty:first-child::before]:pointer-events-none [&_.ProseMirror.is-editor-empty:first-child::before]:h-0",{variants:{size:{sm:"min-h-[100px] [&_.ProseMirror]:p-2 text-sm",md:"min-h-[150px] [&_.ProseMirror]:p-3 text-sm",lg:"min-h-[200px] [&_.ProseMirror]:p-4 text-base"}},defaultVariants:{size:"md"}}),Pe=({icon:e,title:t,isActive:a,onClick:r,disabled:n})=>jsxs(Ga,{children:[jsx(Wa,{asChild:true,children:jsx(O,{type:"button",variant:a?"solid":"ghost",size:"icon",className:"h-7 w-7",onClick:r,disabled:n,children:e})}),jsx(ca,{side:"top",className:"text-xs",children:t})]}),Lg=U.forwardRef(({className:e,variant:t,size:a,value:r="",onChange:n,placeholder:i="Start writing...",readOnly:s=false,showToolbar:l=true,minHeight:d,maxHeight:m,onEditorReady:u,...c},g)=>{let p=useEditor({extensions:[CP.configure({heading:{levels:[1,2,3]}}),SP.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),TP,MP.configure({types:["heading","paragraph"]}),kP.configure({placeholder:i})],content:r,editable:!s,onUpdate:({editor:N})=>{n?.(N.getHTML());},onCreate:({editor:N})=>{u?.(N);}});U.useEffect(()=>{p&&r!==p.getHTML()&&p.commands.setContent(r);},[r,p]),U.useEffect(()=>{p&&p.setEditable(!s);},[s,p]);let v=()=>{if(!p)return;let N=p.getAttributes("link").href,b=window.prompt("URL",N);if(b!==null){if(b===""){p.chain().focus().extendMarkRange("link").unsetLink().run();return}p.chain().focus().extendMarkRange("link").setLink({href:b}).run();}};return p?jsx(Oa,{children:jsxs("div",{ref:g,className:o(Vg({variant:t,size:a,className:e})),...c,children:[l&&!s&&jsxs("div",{className:o(jP({size:a})),children:[jsx(Pe,{icon:jsx(Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsx(Pe,{icon:jsx(Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsx(da,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Pe,{icon:jsx(Heading1,{className:"h-4 w-4"}),title:"Heading 1",isActive:p.isActive("heading",{level:1}),onClick:()=>p.chain().focus().toggleHeading({level:1}).run()}),jsx(Pe,{icon:jsx(Heading2,{className:"h-4 w-4"}),title:"Heading 2",isActive:p.isActive("heading",{level:2}),onClick:()=>p.chain().focus().toggleHeading({level:2}).run()}),jsx(Pe,{icon:jsx(Heading3,{className:"h-4 w-4"}),title:"Heading 3",isActive:p.isActive("heading",{level:3}),onClick:()=>p.chain().focus().toggleHeading({level:3}).run()}),jsx(da,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Pe,{icon:jsx(Bold,{className:"h-4 w-4"}),title:"Bold (Ctrl+B)",isActive:p.isActive("bold"),onClick:()=>p.chain().focus().toggleBold().run()}),jsx(Pe,{icon:jsx(Italic,{className:"h-4 w-4"}),title:"Italic (Ctrl+I)",isActive:p.isActive("italic"),onClick:()=>p.chain().focus().toggleItalic().run()}),jsx(Pe,{icon:jsx(Underline,{className:"h-4 w-4"}),title:"Underline (Ctrl+U)",isActive:p.isActive("underline"),onClick:()=>p.chain().focus().toggleUnderline().run()}),jsx(Pe,{icon:jsx(Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsx(da,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Pe,{icon:jsx(List,{className:"h-4 w-4"}),title:"Bullet List",isActive:p.isActive("bulletList"),onClick:()=>p.chain().focus().toggleBulletList().run()}),jsx(Pe,{icon:jsx(ListOrdered,{className:"h-4 w-4"}),title:"Numbered List",isActive:p.isActive("orderedList"),onClick:()=>p.chain().focus().toggleOrderedList().run()}),jsx(da,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Pe,{icon:jsx(AlignLeft,{className:"h-4 w-4"}),title:"Align Left",isActive:p.isActive({textAlign:"left"}),onClick:()=>p.chain().focus().setTextAlign("left").run()}),jsx(Pe,{icon:jsx(AlignCenter,{className:"h-4 w-4"}),title:"Align Center",isActive:p.isActive({textAlign:"center"}),onClick:()=>p.chain().focus().setTextAlign("center").run()}),jsx(Pe,{icon:jsx(AlignRight,{className:"h-4 w-4"}),title:"Align Right",isActive:p.isActive({textAlign:"right"}),onClick:()=>p.chain().focus().setTextAlign("right").run()}),jsx(da,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Pe,{icon:jsx(Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsx(Pe,{icon:jsx(Code,{className:"h-4 w-4"}),title:"Code Block",isActive:p.isActive("codeBlock"),onClick:()=>p.chain().focus().toggleCodeBlock().run()}),jsx(da,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Pe,{icon:jsx(Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:v}),jsx(Pe,{icon:jsx(Unlink,{className:"h-4 w-4"}),title:"Remove Link",onClick:()=>p.chain().focus().unsetLink().run(),disabled:!p.isActive("link")})]}),jsx(EditorContent,{editor:p,className:o(XP({size:a})),style:{minHeight:d,maxHeight:m}})]})}):null});Lg.displayName="RichTextEditor";var Eg=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function rC(e,t,a){return centerCrop(makeAspectCrop({unit:"%",width:90},a,e,t),e,t)}async function Ig(e,t,a=0,r=1){let n=document.createElement("canvas"),i=n.getContext("2d");if(!i)return null;let s=e.naturalWidth/e.width,l=e.naturalHeight/e.height,d=window.devicePixelRatio||1;n.width=Math.floor(t.width*s*d),n.height=Math.floor(t.height*l*d),i.scale(d,d),i.imageSmoothingQuality="high";let m=t.x*s,u=t.y*l,c=a*Math.PI/180,g=e.naturalWidth/2,p=e.naturalHeight/2;return i.save(),i.translate(-m,-u),i.translate(g,p),i.rotate(c),i.scale(r,r),i.translate(-g,-p),i.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),i.restore(),new Promise(v=>{n.toBlob(N=>{v(N);},"image/png");})}var Hg=U.forwardRef(({className:e,variant:t,src:a,aspectRatio:r,onCropChange:n,onCropComplete:i,showZoom:s=true,showRotation:l=true,minZoom:d=1,maxZoom:m=3,circularCrop:u=false,initialCrop:c,...g},p)=>{let v=U.useRef(null),[N,b]=U.useState(),[h,w]=U.useState(),[f,y]=U.useState(1),[P,x]=U.useState(0),S=C=>{let{width:D,height:T}=C.currentTarget;if(r){let I=rC(D,T,r);b(I);}else b(c||{unit:"%",x:10,y:10,width:80,height:80});},k=C=>{b(C),n?.(C);},M=async C=>{if(w(C),i&&v.current&&C.width&&C.height){let D=await Ig(v.current,C,P,f);i(D);}},R=()=>{x(C=>(C+90)%360);};return U.useEffect(()=>{h&&v.current&&i&&Ig(v.current,h,P,f).then(C=>{i(C);});},[f,P,h,i]),jsxs("div",{ref:p,className:o(Eg({variant:t,className:e})),...g,children:[jsx("div",{className:"flex-1 flex items-center justify-center p-4 bg-muted/30 min-h-[300px]",children:jsx(qP,{crop:N,onChange:k,onComplete:M,aspect:r,circularCrop:u,className:"max-h-[400px]",children:jsx("img",{ref:v,src:a,alt:"Crop preview",onLoad:S,style:{transform:`scale(${f}) rotate(${P}deg)`,maxHeight:"400px"}})})}),jsxs("div",{className:"flex items-center gap-4 p-3 border-t",children:[s&&jsxs("div",{className:"flex items-center gap-2 flex-1",children:[jsx(ZoomOut,{className:"h-4 w-4 text-muted-foreground"}),jsx(cn,{value:[f],onValueChange:([C])=>y(C),min:d,max:m,step:.1,className:"flex-1"}),jsx(ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),l&&jsx(O,{variant:"bordered",size:"icon",onClick:R,children:jsx(RotateCw,{className:"h-4 w-4"})})]})]})});Hg.displayName="ImageCropper";var ol=cva("inline-block",{variants:{variant:{default:"",bordered:"border rounded-lg p-2",card:"border rounded-lg p-4 bg-card shadow-sm"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),iC={sm:96,md:128,lg:192},zg=U.forwardRef(({className:e,variant:t,size:a,value:r,qrSize:n,fgColor:i="currentColor",bgColor:s="transparent",level:l="M",includeMargin:d=false,title:m,logo:u,logoSize:c=40,logoPadding:g=4,logoBackgroundColor:p="white",...v},N)=>{let b=n??iC[a??"md"];return r?jsx("div",{ref:N,className:o(ol({variant:t,size:a,className:e})),...v,children:jsxs("div",{className:"relative inline-block",children:[jsx(oC,{value:r,size:b,fgColor:i,bgColor:s,level:l,title:m,style:{padding:d?16:0}}),u&&jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded",style:{padding:g,backgroundColor:p},children:jsx("img",{src:u,alt:"Logo",style:{width:c,height:c,objectFit:"contain"}})})]})}):jsx("div",{ref:N,className:o(ol({variant:t,size:a,className:e})),...v,children:jsx("div",{className:"flex items-center justify-center bg-muted text-muted-foreground text-xs rounded",style:{width:b,height:b},children:"No data"})})});zg.displayName="QRCode";var Bg=({children:e,defaultTheme:t="system",storageKey:a="reever-ui-theme",enableSystem:r=true,disableTransitionOnChange:n=false,attribute:i="class",forcedTheme:s,themes:l=["light","dark"]})=>jsx(ThemeProvider,{defaultTheme:t,storageKey:a,enableSystem:r,disableTransitionOnChange:n,attribute:i,forcedTheme:s,themes:l,children:e});Bg.displayName="ThemeProvider";var uC=cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),Fg=U.forwardRef(({className:e,variant:t="ghost",size:a="md",mode:r="dropdown"},n)=>{let{theme:i,setTheme:s,resolvedTheme:l}=useTheme(),[d,m]=U.useState(false);U.useEffect(()=>{m(true);},[]);let u=()=>{let c=["light","dark","system"],p=(c.indexOf(i||"system")+1)%c.length;s(c[p]);};return d?r==="cycle"?jsxs(O,{ref:n,variant:t==="default"?"bordered":t,size:"icon",className:o("h-9 w-9",e),onClick:u,children:[l==="dark"?jsx(Moon,{className:"h-4 w-4"}):jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]}):jsxs($a,{children:[jsx(_a,{asChild:true,children:jsxs(O,{ref:n,variant:t==="default"?"bordered":t,size:"icon",className:o("h-9 w-9",e),children:[jsx(Sun,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsx(Moon,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),jsxs(pa,{align:"end",children:[jsxs(xt,{onClick:()=>s("light"),children:[jsx(Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxs(xt,{onClick:()=>s("dark"),children:[jsx(Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxs(xt,{onClick:()=>s("system"),children:[jsx(Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxs(O,{ref:n,variant:t==="default"?"bordered":t,size:"icon",className:o("h-9 w-9",e),disabled:true,children:[jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})});Fg.displayName="ThemeToggle";var Gg=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),Wg=cva("flex w-full rounded-md border border-input bg-background ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-12 px-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),$g=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),_g=U.forwardRef(({className:e,label:t,description:a,errorMessage:r,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,startContent:c,endContent:g,id:p,...v},N)=>{let b=U.useId(),h=p||b,w=`${h}-description`,f=`${h}-error`,y=i&&r;return jsxs("div",{className:o(Gg({size:s}),e),children:[t&&jsxs(zi.Root,{htmlFor:h,className:o($g({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[c&&jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:c}),jsx("input",{ref:N,id:h,"aria-invalid":i,"aria-describedby":y?f:a?w:void 0,"aria-required":n,className:o(Wg({size:s,isInvalid:i}),c&&"pl-10",g&&"pr-10",d),...v}),g&&jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:g})]}),a&&!y&&jsx("p",{id:w,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a}),y&&jsx("p",{id:f,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:r})]})});_g.displayName="TextField";var jg=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),bC=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 text-center [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",{variants:{size:{sm:"h-8 px-8 py-1.5 text-xs",md:"h-10 px-10 py-2 text-sm",lg:"h-12 px-12 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),Kg=cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Ug=cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),vC=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Xg=U.forwardRef(({className:e,label:t,description:a,errorMessage:r,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,min:c,max:g,step:p=1,value:v,defaultValue:N,onChange:b,showButtons:h=true,formatOptions:w,disabled:f,id:y,...P},x)=>{let S=U.useId(),k=y||S,M=`${k}-description`,R=`${k}-error`,[C,D]=U.useState(N),T=v!==void 0?v:C,I=i&&r,L=U.useCallback(J=>{J!==void 0&&(c!==void 0&&J<c&&(J=c),g!==void 0&&J>g&&(J=g)),v===void 0&&D(J),b?.(J);},[v,c,g,b]),V=()=>{let J=(T??0)+p;L(J);},E=()=>{let J=(T??0)-p;L(J);},A=J=>{let nt=J.target.value;if(nt==="")L(void 0);else {let z=parseFloat(nt);isNaN(z)||L(z);}},B=J=>{J.key==="ArrowUp"?(J.preventDefault(),V()):J.key==="ArrowDown"&&(J.preventDefault(),E());},H=U.useMemo(()=>T===void 0?"":w?new Intl.NumberFormat(void 0,w).format(T):T.toString(),[T,w]),Q=c!==void 0&&T!==void 0&&T<=c,te=g!==void 0&&T!==void 0&&T>=g;return jsxs("div",{className:o(jg({size:s}),e),children:[t&&jsxs(zi.Root,{htmlFor:k,className:o(vC({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[h&&jsx("button",{type:"button",onClick:E,disabled:f||Q,className:o(Kg({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:o(Ug({size:s}))})}),jsx("input",{ref:x,id:k,type:"text",inputMode:"decimal",value:H,onChange:A,onKeyDown:B,"aria-invalid":i,"aria-describedby":I?R:a?M:void 0,"aria-required":n,"aria-valuemin":c,"aria-valuemax":g,"aria-valuenow":T,disabled:f,className:o(bC({size:s,isInvalid:i}),!h&&"px-3",d),...P}),h&&jsx("button",{type:"button",onClick:V,disabled:f||te,className:o(Kg({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:o(Ug({size:s}))})})]}),a&&!I&&jsx("p",{id:M,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a}),I&&jsx("p",{id:R,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:r})]})});Xg.displayName="NumberField";var Qg=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),yC=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-12 pl-12 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),qg=cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),RC=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),wC=cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",{variants:{size:{sm:"h-5 w-5 right-1.5",md:"h-6 w-6 right-2",lg:"h-7 w-7 right-2.5"}},defaultVariants:{size:"md"}}),Jg=U.forwardRef(({className:e,label:t,description:a,errorMessage:r,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,value:c,defaultValue:g="",onChange:p,onClear:v,onSearch:N,showClearButton:b=true,showSearchIcon:h=true,disabled:w,placeholder:f="Search...",id:y,...P},x)=>{let S=U.useId(),k=y||S,M=`${k}-description`,R=`${k}-error`,[C,D]=U.useState(g),T=c!==void 0?c:C,I=i&&r,L=T.length>0,V=B=>{let H=B.target.value;c===void 0&&D(H),p?.(H);},E=()=>{c===void 0&&D(""),p?.(""),v?.();},A=B=>{B.key==="Enter"?(B.preventDefault(),N?.(T)):B.key==="Escape"&&L&&(B.preventDefault(),E());};return jsxs("div",{className:o(Qg({size:s}),e),children:[t&&jsxs(zi.Root,{htmlFor:k,className:o(RC({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[h&&jsx(Search,{className:o(qg({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsx("input",{ref:x,id:k,type:"search",value:T,onChange:V,onKeyDown:A,placeholder:f,"aria-invalid":i,"aria-describedby":I?R:a?M:void 0,"aria-required":n,disabled:w,className:o(yC({size:s,isInvalid:i}),!h&&"pl-3",!b&&"pr-3",d),...P}),b&&L&&!w&&jsx("button",{type:"button",onClick:E,className:o(wC({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsx(X,{className:o(qg({size:s}))})})]}),a&&!I&&jsx("p",{id:M,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a}),I&&jsx("p",{id:R,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:r})]})});Jg.displayName="SearchField";var tb=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),PC=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 pl-8 pr-3 py-1.5 text-xs",md:"h-10 pl-10 pr-3 py-2 text-sm",lg:"h-12 pl-12 pr-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),CC=cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),SC=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),cl=(e,t="yyyy-MM-dd")=>{if(!e)return "";let a=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(a)).replace("MM",r).replace("dd",n)},TC=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},ab=U.forwardRef(({className:e,label:t,description:a,errorMessage:r,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,value:c,defaultValue:g,onChange:p,minDate:v,maxDate:N,dateFormat:b="yyyy-MM-dd",showIcon:h=true,disabled:w,id:f,...y},P)=>{let x=U.useId(),S=f||x,k=`${S}-description`,M=`${S}-error`,[R,C]=U.useState(g??null),D=c!==void 0?c:R,T=i&&r,I=A=>{let B=TC(A.target.value);c===void 0&&C(B),p?.(B);},L=D?cl(D,"yyyy-MM-dd"):"",V=v?cl(v,"yyyy-MM-dd"):void 0,E=N?cl(N,"yyyy-MM-dd"):void 0;return jsxs("div",{className:o(tb({size:s}),e),children:[t&&jsxs(zi.Root,{htmlFor:S,className:o(SC({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[h&&jsx(Calendar,{className:o(CC({size:s}),"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none")}),jsx("input",{ref:P,id:S,type:"date",value:L,onChange:I,min:V,max:E,"aria-invalid":i,"aria-describedby":T?M:a?k:void 0,"aria-required":n,disabled:w,className:o(PC({size:s,isInvalid:i}),!h&&"pl-3",d),...y})]}),a&&!T&&jsx("p",{id:k,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a}),T&&jsx("p",{id:M,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:r})]})});ab.displayName="DateField";var ob=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),kC=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 pl-8 pr-3 py-1.5 text-xs",md:"h-10 pl-10 pr-3 py-2 text-sm",lg:"h-12 pl-12 pr-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),DC=cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),VC=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),pl=(e,t)=>{if(!e)return "";let a=String(e.hour).padStart(2,"0"),r=String(e.minute).padStart(2,"0");if(t&&e.second!==void 0){let n=String(e.second).padStart(2,"0");return `${a}:${r}:${n}`}return `${a}:${r}`},LC=(e,t)=>{if(!e)return null;let a=e.split(":");if(a.length<2)return null;let r=parseInt(a[0],10),n=parseInt(a[1],10),i=t&&a[2]?parseInt(a[2],10):void 0;return isNaN(r)||isNaN(n)?null:{hour:r,minute:n,second:i}},nb=U.forwardRef(({className:e,label:t,description:a,errorMessage:r,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,value:c,defaultValue:g,onChange:p,minTime:v,maxTime:N,showSeconds:b=false,showIcon:h=true,hourCycle:w=24,disabled:f,id:y,...P},x)=>{let S=U.useId(),k=y||S,M=`${k}-description`,R=`${k}-error`,[C,D]=U.useState(g??null),T=c!==void 0?c:C,I=i&&r,L=B=>{let H=LC(B.target.value,b);c===void 0&&D(H),p?.(H);},V=pl(T,b),E=v?pl(v,b):void 0,A=N?pl(N,b):void 0;return jsxs("div",{className:o(ob({size:s}),e),children:[t&&jsxs(zi.Root,{htmlFor:k,className:o(VC({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[h&&jsx(Clock,{className:o(DC({size:s}),"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none")}),jsx("input",{ref:x,id:k,type:"time",value:V,onChange:L,min:E,max:A,step:b?1:60,"aria-invalid":i,"aria-describedby":I?R:a?M:void 0,"aria-required":n,disabled:f,className:o(kC({size:s,isInvalid:i}),!h&&"pl-3",d),...P})]}),a&&!I&&jsx("p",{id:M,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a}),I&&jsx("p",{id:R,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:r})]})});nb.displayName="TimeField";var lb=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),IC=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono uppercase",{variants:{size:{sm:"h-8 pl-10 pr-3 py-1.5 text-xs",md:"h-10 pl-12 pr-3 py-2 text-sm",lg:"h-12 pl-14 pr-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),EC=cva("absolute left-2 top-1/2 -translate-y-1/2 rounded border border-input overflow-hidden",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),HC=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),ib=e=>/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e),AC=e=>(e.startsWith("#")||(e="#"+e),e.length===4&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),e.toUpperCase()),db=U.forwardRef(({className:e,label:t,description:a,errorMessage:r,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,value:c,defaultValue:g="#000000",onChange:p,showSwatch:v=true,showPicker:N=true,allowAlpha:b=false,disabled:h,id:w,...f},y)=>{let P=U.useId(),x=w||P,S=`${x}-picker`,k=`${x}-description`,M=`${x}-error`,[R,C]=U.useState(g),D=c!==void 0?c:R,T=i&&r,I=A=>{let B=A.target.value;B&&!B.startsWith("#")&&(B="#"+B),c===void 0&&C(B),p?.(B);},L=A=>{let B=A.target.value.toUpperCase();c===void 0&&C(B),p?.(B);},V=()=>{if(D&&ib(D)){let A=AC(D);A!==D&&(c===void 0&&C(A),p?.(A));}},E=ib(D)?D:"#000000";return jsxs("div",{className:o(lb({size:s}),e),children:[t&&jsxs(zi.Root,{htmlFor:x,className:o(HC({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[v&&jsx("div",{className:o(EC({size:s})),children:N?jsxs("label",{htmlFor:S,className:"block h-full w-full cursor-pointer",children:[jsx("input",{id:S,type:"color",value:E,onChange:L,disabled:h,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0",tabIndex:-1}),jsx("div",{className:"h-full w-full",style:{backgroundColor:E}})]}):jsx("div",{className:"h-full w-full",style:{backgroundColor:E}})}),jsx("input",{ref:y,id:x,type:"text",value:D,onChange:I,onBlur:V,placeholder:"#000000",maxLength:b?9:7,"aria-invalid":i,"aria-describedby":T?M:a?k:void 0,"aria-required":n,disabled:h,className:o(IC({size:s,isInvalid:i}),!v&&"pl-3",d),...f})]}),a&&!T&&jsx("p",{id:k,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a}),T&&jsx("p",{id:M,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:r})]})});db.displayName="ColorField";var mb=cva("inline-flex",{variants:{variant:{default:"",attached:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px"},orientation:{horizontal:"flex-row",vertical:"flex-col [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:ml-0"},spacing:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3"}},compoundVariants:[{variant:"attached",spacing:["sm","md","lg"],className:"gap-0"}],defaultVariants:{variant:"default",orientation:"horizontal",spacing:"sm"}}),pb=U.createContext({});function BC(){return U.useContext(pb)}var ub=U.forwardRef(({className:e,variant:t,orientation:a,spacing:r,disabled:n,children:i,...s},l)=>jsx(pb.Provider,{value:{disabled:n},children:jsx("div",{ref:l,role:"group",className:o(mb({variant:t,orientation:a,spacing:r,className:e})),...s,children:i})}));ub.displayName="ButtonGroup";var gb=cva("inline-flex items-center justify-center transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",soft:"bg-primary/10 text-primary hover:bg-primary/20",surface:"bg-muted text-muted-foreground hover:bg-muted/80"},size:{sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10",xl:"h-12 w-12"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"ghost",size:"md",radius:"md"}}),bb=U.forwardRef(({className:e,variant:t,size:a,radius:r,isLoading:n,disabled:i,children:s,...l},d)=>{let m={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5",xl:"h-6 w-6"}[a??"md"];return jsx("button",{ref:d,type:"button",disabled:i||n,className:o(gb({variant:t,size:a,radius:r,className:e})),...l,children:n?jsxs("svg",{className:o("animate-spin",m),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):jsx("span",{className:o("[&>svg]:h-full [&>svg]:w-full",m),children:s})})});bb.displayName="IconButton";var hb=cva("inline-flex items-center",{variants:{variant:{default:"gap-1",compact:"gap-0.5",attached:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px gap-0"},orientation:{horizontal:"flex-row",vertical:"flex-col [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:ml-0"},size:{sm:"",md:"",lg:""},density:{compact:"gap-0.5",regular:"gap-1",spacious:"gap-2"}},defaultVariants:{variant:"default",orientation:"horizontal",size:"md",density:"regular"}}),xb=U.forwardRef(({className:e,variant:t,orientation:a,size:r,density:n,items:i,maxVisibleItems:s,isDisabled:l,onAction:d,showLabels:m=false,renderItem:u,...c},g)=>{let p=s&&s<i.length?i.slice(0,s):i,v=s&&s<i.length?i.slice(s):[],N={sm:"h-8 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-4 text-base"}[r??"md"],b={sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10"}[r??"md"],h={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[r??"md"],w=(y,P)=>{P&&P(),d&&d(y);},f=y=>jsxs("button",{type:"button",disabled:l||y.isDisabled,onClick:()=>w(y.key,y.onPress),className:o("inline-flex items-center justify-center gap-2 rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50",m?N:b),"aria-label":y.label,children:[y.icon&&jsx("span",{className:h,children:y.icon}),m&&jsx("span",{children:y.label})]},y.key);return jsxs("div",{ref:g,role:"group",className:o(hb({variant:t,orientation:a,size:r,density:n,className:e})),...c,children:[p.map(y=>u?u(y):f(y)),v.length>0&&jsxs($a,{children:[jsx(_a,{asChild:true,children:jsx("button",{type:"button",disabled:l,className:o("inline-flex items-center justify-center rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50",b),"aria-label":"More actions",children:jsx(MoreHorizontal,{className:h})})}),jsx(pa,{align:"end",children:v.map(y=>jsxs(xt,{disabled:y.isDisabled,onClick:()=>w(y.key,y.onPress),children:[y.icon&&jsx("span",{className:o(h,"mr-2"),children:y.icon}),y.label]},y.key))})]})]})});xb.displayName="ActionGroup";var Nb=cva("inline-flex items-center gap-2",{variants:{variant:{neutral:"[--status-color:theme(colors.muted.foreground)]",info:"[--status-color:theme(colors.blue.500)]",positive:"[--status-color:theme(colors.green.500)]",notice:"[--status-color:theme(colors.yellow.500)]",negative:"[--status-color:theme(colors.red.500)]"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"neutral",size:"md"}}),$C=cva("rounded-full bg-[--status-color] flex-shrink-0",{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2.5 w-2.5"},pulse:{true:"animate-pulse",false:""}},defaultVariants:{size:"md",pulse:false}}),Pb=U.forwardRef(({className:e,variant:t,size:a,pulse:r=false,hideLabel:n=false,children:i,...s},l)=>jsxs("span",{ref:l,role:"status",className:o(Nb({variant:t,size:a,className:e})),...s,children:[jsx("span",{className:o($C({size:a,pulse:r})),"aria-hidden":"true"}),!n&&i&&jsx("span",{className:"text-foreground",children:i})]}));Pb.displayName="StatusLight";var Sb=cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-3 max-w-xs",md:"gap-4 max-w-sm",lg:"gap-5 max-w-md"}},defaultVariants:{size:"md"}}),KC=cva("text-muted-foreground",{variants:{size:{sm:"[&>svg]:h-16 [&>svg]:w-16",md:"[&>svg]:h-24 [&>svg]:w-24",lg:"[&>svg]:h-32 [&>svg]:w-32"}},defaultVariants:{size:"md"}}),UC=cva("font-semibold text-foreground",{variants:{size:{sm:"text-base",md:"text-lg",lg:"text-xl"}},defaultVariants:{size:"md"}}),YC=cva("text-muted-foreground",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Tb=U.forwardRef(({className:e,size:t,illustration:a,heading:r,description:n,children:i,...s},l)=>jsxs("div",{ref:l,className:o(Sb({size:t,className:e})),...s,children:[a&&jsx("div",{className:o(KC({size:t})),"aria-hidden":"true",children:a}),r&&jsx("h3",{className:o(UC({size:t})),children:r}),n&&jsx("p",{className:o(YC({size:t})),children:n}),i&&jsx("div",{className:"mt-2",children:i})]}));Tb.displayName="IllustratedMessage";var Db=cva("relative flex gap-3 rounded-lg border p-4 text-sm",{variants:{variant:{info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-100 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-950 dark:text-green-100 [&>svg]:text-green-600 dark:[&>svg]:text-green-400",warning:"border-yellow-200 bg-yellow-50 text-yellow-900 dark:border-yellow-800 dark:bg-yellow-950 dark:text-yellow-100 [&>svg]:text-yellow-600 dark:[&>svg]:text-yellow-400",error:"border-red-200 bg-red-50 text-red-900 dark:border-red-800 dark:bg-red-950 dark:text-red-100 [&>svg]:text-red-600 dark:[&>svg]:text-red-400",neutral:"border-border bg-muted text-foreground [&>svg]:text-muted-foreground"}},defaultVariants:{variant:"info"}}),eS={info:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle,neutral:Info},Vb=U.forwardRef(({className:e,variant:t,title:a,icon:r,hideIcon:n=false,isDismissible:i=false,onDismiss:s,actions:l,children:d,...m},u)=>{let[c,g]=U.useState(true);if(!c)return null;let p=eS[t??"info"],v=()=>{g(false),s?.();};return jsxs("div",{ref:u,role:"alert",className:o(Db({variant:t,className:e})),...m,children:[!n&&jsx("div",{className:"flex-shrink-0",children:r||jsx(p,{className:"h-5 w-5"})}),jsxs("div",{className:"flex-1 space-y-1",children:[a&&jsx("div",{className:"font-medium",children:a}),d&&jsx("div",{className:"opacity-90",children:d}),l&&jsx("div",{className:"mt-3 flex gap-2",children:l})]}),i&&jsx("button",{type:"button",onClick:v,className:"absolute right-2 top-2 rounded-md p-1 opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Dismiss",children:jsx(X,{className:"h-4 w-4"})})]})});Vb.displayName="InlineAlert";var Lb=cva("fixed flex items-center gap-2 rounded-lg border bg-background shadow-lg transition-all duration-200",{variants:{position:{bottom:"bottom-4 left-1/2 -translate-x-1/2",top:"top-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4"},size:{sm:"px-3 py-2 gap-1.5",md:"px-4 py-2.5 gap-2",lg:"px-5 py-3 gap-3"}},defaultVariants:{position:"bottom",size:"md"}}),Ib=U.forwardRef(({className:e,position:t,size:a,selectedCount:r=0,isOpen:n=true,onClose:i,showClose:s=true,selectedText:l,children:d,...m},u)=>{if(!n||r===0)return null;let c=()=>typeof l=="function"?l(r):l||`${r} item${r>1?"s":""} selected`;return jsxs("div",{ref:u,role:"toolbar","aria-label":"Actions for selected items",className:o(Lb({position:t,size:a,className:e})),...m,children:[jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:c()}),jsx("div",{className:"h-4 w-px bg-border"}),jsx("div",{className:"flex items-center gap-1",children:d}),s&&jsxs(Fragment,{children:[jsx("div",{className:"h-4 w-px bg-border"}),jsx("button",{type:"button",onClick:i,className:"rounded-md p-1 text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors","aria-label":"Close action bar",children:jsx(X,{className:"h-4 w-4"})})]})]})});Ib.displayName="ActionBar";var Eb=U.forwardRef(({className:e,icon:t,children:a,...r},n)=>jsxs("button",{ref:n,type:"button",className:o("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50",e),...r,children:[t&&jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:t}),a]}));Eb.displayName="ActionBarButton";var Hb=cva("inline-flex items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",subtle:"text-muted-foreground hover:text-foreground hover:bg-muted"},size:{sm:"h-7 w-7",md:"h-8 w-8",lg:"h-9 w-9"}},defaultVariants:{variant:"ghost",size:"md"}});function sS(e){return "items"in e}var Ab=U.forwardRef(({items:e,align:t="end",side:a="bottom",iconOrientation:r="vertical",trigger:n,variant:i,size:s,onAction:l,"aria-label":d="More actions",triggerClassName:m,disabled:u},c)=>{let g={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}[s??"md"],p=r==="horizontal"?MoreHorizontal:MoreVertical,v=b=>{b.onSelect?.(),l?.(b.key);},N=b=>jsxs(xt,{disabled:b.isDisabled,onClick:()=>v(b),className:o(b.isDestructive&&"text-destructive focus:text-destructive"),children:[b.icon&&jsx("span",{className:"mr-2 h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:b.icon}),jsx("span",{className:"flex-1",children:b.label}),b.shortcut&&jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:b.shortcut})]},b.key);return jsxs($a,{children:[jsx(_a,{asChild:true,children:n||jsx("button",{ref:c,type:"button",disabled:u,className:o(Hb({variant:i,size:s}),m),"aria-label":d,children:jsx(p,{className:g})})}),jsx(pa,{align:t,side:a,children:e.map((b,h)=>sS(b)?jsxs(U.Fragment,{children:[h>0&&jsx(nn,{}),b.items.map(N)]},b.key):N(b))})]})});Ab.displayName="ActionMenu";var Fb=cva("flex flex-col",{variants:{variant:{default:"gap-1",bordered:"border rounded-lg divide-y",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),Ob=cva("flex items-center gap-3 transition-colors cursor-pointer",{variants:{variant:{default:"rounded-md hover:bg-accent",bordered:"hover:bg-accent",cards:"rounded-lg border hover:border-primary/50 hover:bg-accent/50"},size:{sm:"px-2 py-1.5 text-sm",md:"px-3 py-2",lg:"px-4 py-3 text-lg"},isSelected:{true:"bg-accent",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"cards",isSelected:true,className:"border-primary bg-accent"}],defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function Gb({className:e,variant:t,size:a,items:r,selectedKeys:n,selectionMode:i="none",onSelectionChange:s,allowsDragging:l=false,onReorder:d,showCheckbox:m=false,renderItem:u,emptyContent:c,...g}){let[p,v]=U.useState(new Set),[N,b]=U.useState(null),[h,w]=U.useState(null),f=U.useMemo(()=>n?n instanceof Set?n:new Set(n):p,[n,p]),y=k=>{if(i==="none")return;let M;i==="single"?M=f.has(k)?new Set:new Set([k]):(M=new Set(f),M.has(k)?M.delete(k):M.add(k)),n||v(M),s?.(M);},P=(k,M)=>{b(M),k.dataTransfer.effectAllowed="move";},x=(k,M)=>{k.preventDefault(),N!==M&&w(M);},S=()=>{if(N&&h&&N!==h){let k=r.findIndex(D=>D.key===N),M=r.findIndex(D=>D.key===h),R=[...r],[C]=R.splice(k,1);R.splice(M,0,C),d?.(R);}b(null),w(null);};return r.length===0?jsx("div",{className:o("flex items-center justify-center p-8 text-muted-foreground",e),children:c||"No items"}):jsx("div",{role:"listbox","aria-multiselectable":i==="multiple",className:o(Fb({variant:t,size:a,className:e})),...g,children:r.map(k=>{let M=f.has(k.key),R=N===k.key,C=h===k.key;return u?jsx("div",{role:"option","aria-selected":M,onClick:()=>y(k.key),children:u(k,M)},k.key):jsxs("div",{role:"option","aria-selected":M,"aria-disabled":k.isDisabled,draggable:l&&!k.isDisabled,onDragStart:D=>P(D,k.key),onDragOver:D=>x(D,k.key),onDragEnd:S,onClick:()=>!k.isDisabled&&y(k.key),className:o(Ob({variant:t,size:a,isSelected:M,isDisabled:k.isDisabled}),R&&"opacity-50",C&&"border-t-2 border-t-primary"),children:[l&&jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground cursor-grab"}),m&&i!=="none"&&jsx("div",{className:o("flex h-4 w-4 items-center justify-center rounded border",M?"bg-primary border-primary text-primary-foreground":"border-input"),children:M&&jsx(Check,{className:"h-3 w-3"})}),k.icon&&jsx("span",{className:"h-5 w-5 text-muted-foreground [&>svg]:h-full [&>svg]:w-full",children:k.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:k.label}),k.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:k.description})]})]},k.key)})})}Gb.displayName="ListView";var $b=cva("relative flex w-full touch-none select-none",{variants:{orientation:{horizontal:"items-center",vertical:"flex-col justify-center h-full"},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"horizontal",size:"md"}}),cS=cva("relative grow overflow-hidden rounded-full bg-secondary",{variants:{orientation:{horizontal:"w-full",vertical:"w-2 h-full"},size:{sm:"h-1",md:"h-2",lg:"h-3"}},compoundVariants:[{orientation:"vertical",size:"sm",className:"w-1 h-full"},{orientation:"vertical",size:"md",className:"w-2 h-full"},{orientation:"vertical",size:"lg",className:"w-3 h-full"}],defaultVariants:{orientation:"horizontal",size:"md"}}),Wb=cva("block rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{size:"md"}}),_b=U.forwardRef(({className:e,orientation:t="horizontal",size:a,value:r,defaultValue:n=[25,75],onValueChange:i,onValueCommit:s,showLabels:l=false,formatLabel:d=b=>String(b),trackColor:m="primary",min:u=0,max:c=100,step:g=1,disabled:p,...v},N)=>{let[b,h]=U.useState(n),w=r??b,f=x=>{let S=x;r||h(S),i?.(S);},y=x=>{s?.(x);},P={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[m];return jsxs("div",{className:"relative w-full",children:[l&&jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsx("span",{children:d(w[0])}),jsx("span",{children:d(w[1])})]}),jsxs(zt.Root,{ref:N,value:w,onValueChange:f,onValueCommit:y,min:u,max:c,step:g,disabled:p,orientation:t??"horizontal",className:o($b({orientation:t,size:a,className:e})),...v,children:[jsx(zt.Track,{className:o(cS({orientation:t,size:a})),children:jsx(zt.Range,{className:o("absolute rounded-full",P,{"h-full":t==="horizontal","w-full":t==="vertical"})})}),jsx(zt.Thumb,{className:o(Wb({size:a}))}),jsx(zt.Thumb,{className:o(Wb({size:a}))})]})]})});_b.displayName="RangeSlider";var Yb=cva("inline-flex items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{help:"text-muted-foreground hover:text-foreground",info:"text-blue-500 hover:text-blue-600",warning:"text-yellow-500 hover:text-yellow-600"},size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"help",size:"md"}}),fS=cva("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none animate-in fade-in-0 zoom-in-95",{variants:{size:{sm:"w-56 text-xs",md:"w-72 text-sm",lg:"w-80 text-base"}},defaultVariants:{size:"md"}}),gS={help:HelpCircle,info:Info,warning:AlertCircle},jb=U.forwardRef(({variant:e="help",size:t,title:a,children:r,trigger:n,side:i="top",align:s="center",open:l,onOpenChange:d,learnMoreUrl:m,learnMoreText:u="Learn more",triggerClassName:c,contentClassName:g},p)=>{let v=gS[e??"help"];return jsxs(st.Root,{open:l,onOpenChange:d,children:[jsx(st.Trigger,{asChild:true,children:n||jsx("button",{ref:p,type:"button",className:o(Yb({variant:e,size:t}),c),"aria-label":"Help",children:jsx(v,{className:"h-full w-full"})})}),jsx(st.Portal,{children:jsxs(st.Content,{side:i,align:s,sideOffset:8,className:o(fS({size:t}),g),children:[a&&jsx("div",{className:"mb-2 font-semibold text-foreground",children:a}),jsx("div",{className:"text-muted-foreground",children:r}),m&&jsxs("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block text-primary hover:underline",children:[u," \u2192"]}),jsx(st.Arrow,{className:"fill-popover"})]})})]})});jb.displayName="ContextualHelp";var qb=cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),yl=cva("inline-flex items-center gap-1 rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-background hover:bg-accent",soft:"bg-primary/10 text-primary",surface:"bg-muted text-muted-foreground"},size:{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},isSelected:{true:"",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"outline",isSelected:true,className:"border-primary bg-primary/5"},{variant:"soft",isSelected:true,className:"bg-primary/20"},{variant:"surface",isSelected:true,className:"bg-muted/80 ring-2 ring-primary/20"}],defaultVariants:{variant:"soft",size:"md",isSelected:false,isDisabled:false}});function Zb({className:e,spacing:t,variant:a,size:r,items:n,selectedKeys:i,selectionMode:s="none",onSelectionChange:l,allowsRemoving:d=false,onRemove:m,label:u,description:c,errorMessage:g,maxTags:p,...v}){let[N,b]=U.useState(new Set),h=U.useMemo(()=>i?i instanceof Set?i:new Set(i):N,[i,N]),w=x=>{if(s==="none")return;let S;s==="single"?S=h.has(x)?new Set:new Set([x]):(S=new Set(h),S.has(x)?S.delete(x):S.add(x)),i||b(S),l?.(S);},f=(x,S)=>{S.stopPropagation(),m?.(x);},y=p?n.slice(0,p):n,P=p?Math.max(0,n.length-p):0;return jsxs("div",{className:"flex flex-col gap-1.5",children:[u&&jsx("span",{className:"text-sm font-medium text-foreground",children:u}),c&&jsx("span",{className:"text-sm text-muted-foreground",children:c}),jsxs("div",{role:"group","aria-label":u,className:o(qb({spacing:t}),e),...v,children:[y.map(x=>{let S=h.has(x.key),k=s!=="none";return jsxs("span",{role:k?"button":void 0,tabIndex:k&&!x.isDisabled?0:void 0,"aria-pressed":k?S:void 0,onClick:()=>!x.isDisabled&&w(x.key),onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&!x.isDisabled&&(M.preventDefault(),w(x.key));},style:x.color?{backgroundColor:x.color}:void 0,className:o(yl({variant:x.color?void 0:a,size:r,isSelected:S,isDisabled:x.isDisabled}),k&&!x.isDisabled&&"cursor-pointer hover:opacity-80",x.color&&"text-white"),children:[x.icon&&jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:x.icon}),x.label,d&&!x.isDisabled&&jsx("button",{type:"button",onClick:M=>f(x.key,M),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${x.label}`,children:jsx(X,{className:"h-3 w-3"})})]},x.key)}),P>0&&jsxs("span",{className:o(yl({variant:"surface",size:r}),"cursor-default"),children:["+",P," more"]})]}),g&&jsx("span",{className:"text-sm text-destructive",children:g})]})}Zb.displayName="TagGroup";var ev=cva("grid",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",auto:"grid-cols-[repeat(auto-fill,minmax(150px,1fr))]"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{columns:"auto",gap:"md"}}),tv=cva("relative flex flex-col rounded-lg border transition-all cursor-pointer",{variants:{variant:{default:"hover:border-primary/50 hover:bg-accent/50",card:"bg-card shadow-sm hover:shadow-md hover:border-primary/50"},size:{sm:"p-2",md:"p-3",lg:"p-4"},isSelected:{true:"border-primary bg-accent ring-2 ring-primary/20",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function av({className:e,columns:t,gap:a,items:r,selectedKeys:n,selectionMode:i="none",onSelectionChange:s,showSelectionIndicator:l=true,itemVariant:d="default",itemSize:m="md",renderItem:u,emptyContent:c,...g}){let[p,v]=U.useState(new Set),N=U.useMemo(()=>n?n instanceof Set?n:new Set(n):p,[n,p]),b=h=>{if(i==="none")return;let w;i==="single"?w=N.has(h)?new Set:new Set([h]):(w=new Set(N),w.has(h)?w.delete(h):w.add(h)),n||v(w),s?.(w);};return r.length===0?jsx("div",{className:o("flex items-center justify-center p-8 text-muted-foreground",e),children:c||"No items"}):jsx("div",{role:"grid","aria-multiselectable":i==="multiple",className:o(ev({columns:t,gap:a,className:e})),...g,children:r.map(h=>{let w=N.has(h.key);return u?jsx("div",{role:"gridcell","aria-selected":w,onClick:()=>b(h.key),children:u(h,w)},h.key):jsxs("div",{role:"gridcell","aria-selected":w,"aria-disabled":h.isDisabled,onClick:()=>!h.isDisabled&&b(h.key),className:o(tv({variant:d,size:m,isSelected:w,isDisabled:h.isDisabled})),children:[l&&i!=="none"&&w&&jsx("div",{className:"absolute top-2 right-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:jsx(Check,{className:"h-3 w-3"})}),h.thumbnail&&jsx("div",{className:"mb-2 aspect-square w-full overflow-hidden rounded-md bg-muted",children:h.thumbnail}),jsxs("div",{className:"min-w-0",children:[jsx("div",{className:"truncate font-medium",children:h.label}),h.description&&jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:h.description})]})]},h.key)})})}av.displayName="GridList";var ov=cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),hS=cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),xS=cva("h-full transition-all duration-300 ease-out",{variants:{color:{primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500",auto:""},rounded:{true:"rounded-full",false:"rounded-l-full"}},defaultVariants:{color:"primary",rounded:true}}),vi=U.forwardRef(({className:e,size:t,value:a,min:r=0,max:n=100,optimum:i,low:s,high:l,label:d,showValueLabel:m=false,formatValue:u,color:c="primary",trackVariant:g="default",...p},v)=>{let N=Math.min(100,Math.max(0,(a-r)/(n-r)*100)),b=()=>{if(c!=="auto")return "";let w=(a-r)/(n-r),f=s!==void 0?(s-r)/(n-r):.25,y=l!==void 0?(l-r)/(n-r):.75;return (i!==void 0?(i-r)/(n-r):1)>=.5?w<=f?"bg-red-500":w<=y?"bg-yellow-500":"bg-green-500":w>=y?"bg-red-500":w>=f?"bg-yellow-500":"bg-green-500"},h=u?u(a,N):`${Math.round(N)}%`;return jsxs("div",{ref:v,className:o("w-full",e),...p,children:[(d||m)&&jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[d&&jsx("span",{className:"text-sm font-medium text-foreground",children:d}),m&&jsx("span",{className:"text-sm text-muted-foreground",children:h})]}),jsx("div",{role:"meter","aria-valuenow":a,"aria-valuemin":r,"aria-valuemax":n,"aria-label":d,className:o(ov({size:t})),children:jsx("div",{className:o(hS({variant:g})),children:jsx("div",{className:o(xS({color:c==="auto"?void 0:c,rounded:N>=100}),c==="auto"&&b()),style:{width:`${N}%`}})})})]})});vi.displayName="Meter";var nv=U.forwardRef((e,t)=>jsx(vi,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));nv.displayName="DiskUsageMeter";var iv=U.forwardRef((e,t)=>jsx(vi,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));iv.displayName="BatteryMeter";var lv=cva("flex flex-wrap",{variants:{size:{sm:"gap-1",md:"gap-1.5",lg:"gap-2"},layout:{wrap:"flex-wrap",grid:"grid"}},defaultVariants:{size:"md",layout:"wrap"}}),dv=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],cv=["#f8fafc","#f1f5f9","#e2e8f0","#cbd5e1","#94a3b8","#64748b","#475569","#334155","#1e293b","#0f172a","#fef2f2","#fee2e2","#fecaca","#fca5a5","#f87171","#ef4444","#dc2626","#b91c1c","#991b1b","#7f1d1d","#fff7ed","#ffedd5","#fed7aa","#fdba74","#fb923c","#f97316","#ea580c","#c2410c","#9a3412","#7c2d12","#fefce8","#fef9c3","#fef08a","#fde047","#facc15","#eab308","#ca8a04","#a16207","#854d0e","#713f12","#f0fdf4","#dcfce7","#bbf7d0","#86efac","#4ade80","#22c55e","#16a34a","#15803d","#166534","#14532d","#eff6ff","#dbeafe","#bfdbfe","#93c5fd","#60a5fa","#3b82f6","#2563eb","#1d4ed8","#1e40af","#1e3a8a","#faf5ff","#f3e8ff","#e9d5ff","#d8b4fe","#c084fc","#a855f7","#9333ea","#7e22ce","#6b21a8","#581c87","#fdf2f8","#fce7f3","#fbcfe8","#f9a8d4","#f472b6","#ec4899","#db2777","#be185d","#9d174d","#831843"],mv=["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#9e9e9e","#607d8b"],pv=U.forwardRef(({value:e,defaultValue:t,onChange:a,colors:r="default",customColors:n,size:i,layout:s,swatchSize:l="md",swatchShape:d="square",columns:m,disabled:u,showSelection:c=true,className:g,...p},v)=>{let[N,b]=U.useState(t),h=e!==void 0?e:N,f=(()=>{if(n)return n;if(Array.isArray(r))return r;switch(r){case "tailwind":return cv;case "material":return mv;default:return dv}})(),y=x=>{u||(e===void 0&&b(x),a?.(x));},P=s==="grid"&&m?{gridTemplateColumns:`repeat(${m}, 1fr)`}:{};return jsx("div",{ref:v,role:"listbox","aria-label":"Color palette",className:o(lv({size:i,layout:s}),g),style:P,...p,children:f.map((x,S)=>jsx(kr,{color:x,size:l,shape:d,isSelected:c&&h?.toLowerCase()===x.toLowerCase(),onSelect:y,disabled:u,role:"option","aria-selected":h?.toLowerCase()===x.toLowerCase()},`${x}-${S}`))})});pv.displayName="ColorSwatchPicker";var uv=cva("relative rounded-md border border-input overflow-hidden cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64",full:"h-full w-full"}},defaultVariants:{size:"md"}}),yi=(e,t,a)=>{let r=n=>{let i=(n+e/60)%6;return a-a*t*Math.max(Math.min(i,4-i,1),0)};return [Math.round(r(5)*255),Math.round(r(3)*255),Math.round(r(1)*255)]},fv=(e,t,a)=>{e/=255,t/=255,a/=255;let r=Math.max(e,t,a),n=Math.min(e,t,a),i=r-n,s=0,l=r===0?0:i/r,d=r;if(i!==0)switch(r){case e:s=((t-a)/i+(t<a?6:0))*60;break;case t:s=((a-e)/i+2)*60;break;case a:s=((e-t)/i+4)*60;break}return [s,l,d]},gv=e=>{let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null},bv=(e,t,a)=>"#"+[e,t,a].map(r=>r.toString(16).padStart(2,"0")).join(""),vv=U.forwardRef(({hue:e,saturation:t,brightness:a,value:r,defaultValue:n="#ff0000",onChange:i,onColorChange:s,size:l,disabled:d,thumbSize:m=16,className:u,...c},g)=>{let p=U.useRef(null),[v,N]=U.useState(false),b=U.useCallback(H=>{let Q=gv(H);return Q?fv(...Q):[0,1,1]},[]),[h,w]=U.useState(()=>b(r||n)),f=e??h[0],y=t??h[1],P=a??h[2];U.useEffect(()=>{if(r){let H=b(r);w(H);}},[r,b]);let x=U.useCallback((H,Q)=>{if(d||!p.current)return;let te=p.current.getBoundingClientRect(),J=Math.max(0,Math.min(1,(H-te.left)/te.width)),nt=Math.max(0,Math.min(1,(Q-te.top)/te.height)),z=J,F=1-nt;t===void 0&&a===void 0&&w([f,z,F]),i?.({hue:f,saturation:z,brightness:F});let ae=yi(f,z,F);s?.(bv(...ae));},[d,f,t,a,i,s]),S=H=>{d||(H.preventDefault(),N(true),H.target.setPointerCapture(H.pointerId),x(H.clientX,H.clientY));},k=H=>{v&&x(H.clientX,H.clientY);},M=H=>{N(false),H.target.releasePointerCapture(H.pointerId);},[R,C,D]=yi(f,1,1),T=`rgb(${R}, ${C}, ${D})`,I=y*100,L=(1-P)*100,[V,E,A]=yi(f,y,P),B=`rgb(${V}, ${E}, ${A})`;return jsx("div",{ref:g,className:o(uv({size:l}),d&&"cursor-not-allowed opacity-50",u),...c,children:jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:T},onPointerDown:S,onPointerMove:k,onPointerUp:M,onPointerLeave:M,children:[jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to right, white, transparent)"}}),jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, black)"}}),jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:m,height:m,left:`calc(${I}% - ${m/2}px)`,top:`calc(${L}% - ${m/2}px)`,backgroundColor:B,boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});vv.displayName="ColorArea";var xv=cva("relative rounded-full cursor-pointer touch-none select-none",{variants:{orientation:{horizontal:"w-full",vertical:"h-full"},size:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",size:"sm",className:"h-3"},{orientation:"horizontal",size:"md",className:"h-4"},{orientation:"horizontal",size:"lg",className:"h-5"},{orientation:"vertical",size:"sm",className:"w-3"},{orientation:"vertical",size:"md",className:"w-4"},{orientation:"vertical",size:"lg",className:"w-5"}],defaultVariants:{orientation:"horizontal",size:"md"}}),PS=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cg fill='%23ccc'%3E%3Crect width='4' height='4'/%3E%3Crect x='4' y='4' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E")`,hv="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",yv=U.forwardRef(({value:e,defaultValue:t,onChange:a,channel:r="hue",baseColor:n="#ff0000",orientation:i,size:s,disabled:l,thumbSize:d=18,showBorder:m=true,className:u,...c},g)=>{let p=U.useRef(null),[v,N]=U.useState(false),b=()=>{switch(r){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[h,w]=U.useState(t??b()),f=e??h,y=r==="hue"?f/360:f,P=U.useCallback((T,I)=>{if(l||!p.current)return;let L=p.current.getBoundingClientRect(),V=i!=="vertical",E;V?E=Math.max(0,Math.min(1,(T-L.left)/L.width)):E=Math.max(0,Math.min(1,1-(I-L.top)/L.height));let A=r==="hue"?E*360:E;e===void 0&&w(A),a?.(A);},[l,i,r,e,a]),x=T=>{l||(T.preventDefault(),N(true),T.target.setPointerCapture(T.pointerId),P(T.clientX,T.clientY));},S=T=>{v&&P(T.clientX,T.clientY);},k=T=>{N(false),T.target.releasePointerCapture(T.pointerId);},M=()=>{let T=i!=="vertical",I=T?"to right":"to top";switch(r){case "hue":return T?hv:"linear-gradient(to top, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)";case "alpha":return `linear-gradient(${I}, transparent, ${n})`;case "saturation":return `linear-gradient(${I}, #808080, ${n})`;case "brightness":return `linear-gradient(${I}, #000000, ${n})`;default:return hv}},R=()=>r==="hue"?`hsl(${f}, 100%, 50%)`:n,C=i!=="vertical",D=y*100;return jsx("div",{ref:g,className:o(xv({orientation:i,size:s}),l&&"cursor-not-allowed opacity-50",u),...c,children:jsxs("div",{ref:p,className:o("absolute inset-0 rounded-full overflow-hidden",m&&"border border-input"),style:{backgroundImage:r==="alpha"?PS:void 0,backgroundSize:r==="alpha"?"8px 8px":void 0},onPointerDown:x,onPointerMove:S,onPointerUp:k,onPointerLeave:k,children:[jsx("div",{className:"absolute inset-0 rounded-full",style:{background:M()}}),jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:d,height:d,...C?{left:`calc(${D}% - ${d/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${D}% - ${d/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:R(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});yv.displayName="ColorSlider";var Rv=cva("relative cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64"}},defaultVariants:{size:"md"}}),TS=(e,t,a)=>{let r=e-a,n=t-a,i=Math.atan2(n,r)*180/Math.PI+90;return i<0&&(i+=360),i},wv=U.forwardRef(({value:e,defaultValue:t=0,onChange:a,size:r,disabled:n,innerRadius:i=.6,thumbSize:s=20,showCenter:l=true,className:d,...m},u)=>{let c=U.useRef(null),[g,p]=U.useState(false),[v,N]=U.useState(t),b=e??v,h=U.useCallback((x,S)=>{if(n||!c.current)return;let k=c.current.getBoundingClientRect(),M=k.width/2,R=x-k.left,C=S-k.top,D=TS(R,C,M);e===void 0&&N(D),a?.(D);},[n,e,a]),w=x=>{n||(x.preventDefault(),p(true),x.target.setPointerCapture(x.pointerId),h(x.clientX,x.clientY));},f=x=>{g&&h(x.clientX,x.clientY);},y=x=>{p(false),x.target.releasePointerCapture(x.pointerId);},P=()=>{let x=[];for(let S=0;S<=360;S+=30)x.push(`hsl(${S}, 100%, 50%) ${S}deg`);return `conic-gradient(from 270deg, ${x.join(", ")})`};return jsx("div",{ref:u,className:o(Rv({size:r}),n&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:c,className:"absolute inset-0 rounded-full",style:{background:P()},onPointerDown:w,onPointerMove:f,onPointerUp:y,onPointerLeave:y,children:[i<1&&jsx("div",{className:"absolute bg-background rounded-full",style:{top:`${(1-i)*50}%`,left:`${(1-i)*50}%`,width:`${i*100}%`,height:`${i*100}%`}}),l&&i<1&&jsx("div",{className:"absolute rounded-full border-2 border-input bg-background",style:{width:8,height:8,top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),jsx(MS,{hue:b,innerRadius:i,thumbSize:s})]})})});wv.displayName="ColorWheel";var MS=({hue:e,innerRadius:t,thumbSize:a})=>{let r=(1-(1-t)/2)*50,n=(e-90)*Math.PI/180,i=50+r*Math.cos(n),s=50+r*Math.sin(n);return jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:a,height:a,left:`calc(${i}% - ${a/2}px)`,top:`calc(${s}% - ${a/2}px)`,backgroundColor:`hsl(${e}, 100%, 50%)`,boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})};var Nv=cva("flex",{variants:{direction:{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"},gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},inline:{true:"inline-flex",false:"flex"}},defaultVariants:{direction:"row",align:"stretch",justify:"start",wrap:"nowrap",gap:0,inline:false}}),_o=U.forwardRef(({className:e,direction:t,align:a,justify:r,wrap:n,gap:i,inline:s,as:l="div",...d},m)=>jsx(l,{ref:m,className:o(Nv({direction:t,align:a,justify:r,wrap:n,gap:i,inline:s,className:e})),...d}));_o.displayName="Flex";var Pv=U.forwardRef(({gap:e=2,align:t="center",...a},r)=>jsx(_o,{ref:r,direction:"row",gap:e,align:t,...a}));Pv.displayName="HStack";var Cv=U.forwardRef(({gap:e=2,align:t="stretch",...a},r)=>jsx(_o,{ref:r,direction:"column",gap:e,align:t,...a}));Cv.displayName="VStack";var Sv=U.forwardRef((e,t)=>jsx(_o,{ref:t,align:"center",justify:"center",...e}));Sv.displayName="Center";var Mv=cva("grid",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12",none:"grid-cols-none",auto:"grid-cols-[repeat(auto-fill,minmax(200px,1fr))]"},rows:{1:"grid-rows-1",2:"grid-rows-2",3:"grid-rows-3",4:"grid-rows-4",5:"grid-rows-5",6:"grid-rows-6",none:"grid-rows-none"},gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},gapX:{0:"gap-x-0",1:"gap-x-1",2:"gap-x-2",3:"gap-x-3",4:"gap-x-4",5:"gap-x-5",6:"gap-x-6",8:"gap-x-8",10:"gap-x-10",12:"gap-x-12"},gapY:{0:"gap-y-0",1:"gap-y-1",2:"gap-y-2",3:"gap-y-3",4:"gap-y-4",5:"gap-y-5",6:"gap-y-6",8:"gap-y-8",10:"gap-y-10",12:"gap-y-12"},flow:{row:"grid-flow-row",col:"grid-flow-col",dense:"grid-flow-dense","row-dense":"grid-flow-row-dense","col-dense":"grid-flow-col-dense"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-items-start",center:"justify-items-center",end:"justify-items-end",stretch:"justify-items-stretch"},placeItems:{start:"place-items-start",center:"place-items-center",end:"place-items-end",stretch:"place-items-stretch"}},defaultVariants:{columns:1,gap:4,flow:"row",align:"stretch",justify:"stretch"}}),wi=U.forwardRef(({className:e,columns:t,rows:a,gap:r,gapX:n,gapY:i,flow:s,align:l,justify:d,placeItems:m,as:u="div",minChildWidth:c,style:g,...p},v)=>{let N=c?{...g,gridTemplateColumns:`repeat(auto-fill, minmax(${c}, 1fr))`}:g;return jsx(u,{ref:v,className:o(Mv({columns:c?void 0:t,rows:a,gap:r,gapX:n,gapY:i,flow:s,align:l,justify:d,placeItems:m,className:e})),style:N,...p})});wi.displayName="Grid";var kv=cva("",{variants:{colSpan:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",full:"col-span-full"},rowSpan:{1:"row-span-1",2:"row-span-2",3:"row-span-3",4:"row-span-4",5:"row-span-5",6:"row-span-6",full:"row-span-full"},colStart:{1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12",13:"col-start-13",auto:"col-start-auto"},colEnd:{1:"col-end-1",2:"col-end-2",3:"col-end-3",4:"col-end-4",5:"col-end-5",6:"col-end-6",7:"col-end-7",8:"col-end-8",9:"col-end-9",10:"col-end-10",11:"col-end-11",12:"col-end-12",13:"col-end-13",auto:"col-end-auto"},rowStart:{1:"row-start-1",2:"row-start-2",3:"row-start-3",4:"row-start-4",5:"row-start-5",6:"row-start-6",7:"row-start-7",auto:"row-start-auto"},rowEnd:{1:"row-end-1",2:"row-end-2",3:"row-end-3",4:"row-end-4",5:"row-end-5",6:"row-end-6",7:"row-end-7",auto:"row-end-auto"}}}),Dv=U.forwardRef(({className:e,colSpan:t,rowSpan:a,colStart:r,colEnd:n,rowStart:i,rowEnd:s,as:l="div",...d},m)=>jsx(l,{ref:m,className:o(kv({colSpan:t,rowSpan:a,colStart:r,colEnd:n,rowStart:i,rowEnd:s,className:e})),...d}));Dv.displayName="GridItem";var Vv=U.forwardRef(({columns:e=2,className:t,...a},r)=>{if(typeof e=="number")return jsx(wi,{ref:r,columns:e,className:t,...a});let n=o(e.sm&&`sm:grid-cols-${e.sm}`,e.md&&`md:grid-cols-${e.md}`,e.lg&&`lg:grid-cols-${e.lg}`,e.xl&&`xl:grid-cols-${e.xl}`);return jsx(wi,{ref:r,columns:1,className:o(n,t),...a})});Vv.displayName="SimpleGrid";var Iv=cva("rounded-lg",{variants:{variant:{default:"bg-muted",subtle:"bg-muted/50",outline:"border border-border bg-transparent",filled:"bg-accent",sunken:"bg-muted shadow-inner"},size:{sm:"p-3",md:"p-4",lg:"p-6",xl:"p-8"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"default",size:"md",radius:"lg"}}),Ev=U.forwardRef(({className:e,variant:t,size:a,radius:r,as:n="div",...i},s)=>jsx(n,{ref:s,className:o(Iv({variant:t,size:a,radius:r,className:e})),...i}));Ev.displayName="Well";var Av=cva("flex",{variants:{orientation:{horizontal:"flex-row items-center gap-2",vertical:"flex-col gap-1"},size:{sm:"",md:"",lg:""},align:{start:"items-start",center:"items-center",end:"items-end"}},compoundVariants:[{orientation:"horizontal",align:"start",className:"items-start"},{orientation:"horizontal",align:"center",className:"items-center"},{orientation:"horizontal",align:"end",className:"items-end"}],defaultVariants:{orientation:"vertical",size:"md",align:"start"}}),IS=cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),ES=cva("text-foreground",{variants:{size:{sm:"text-sm",md:"text-base",lg:"text-lg"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},mono:{true:"font-mono",false:""}},defaultVariants:{size:"md",weight:"normal",mono:false}}),zv=U.forwardRef(({className:e,orientation:t,size:a,align:r,label:n,value:i,valueWeight:s,mono:l,labelWidth:d,labelClassName:m,valueClassName:u,showColon:c=false,copyable:g=false,onCopy:p,...v},N)=>{let b=async()=>{if(!(!g||i===null||i===void 0))try{let h=typeof i=="string"?i:String(i);await navigator.clipboard.writeText(h),p?.();}catch{}};return jsxs("div",{ref:N,className:o(Av({orientation:t,size:a,align:r,className:e})),...v,children:[jsxs("span",{className:o(IS({size:a}),m),style:d?{width:d,flexShrink:0}:void 0,children:[n,c&&":"]}),jsx("span",{className:o(ES({size:a,weight:s,mono:l}),g&&"cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 transition-colors",u),onClick:g?b:void 0,role:g?"button":void 0,tabIndex:g?0:void 0,onKeyDown:g?h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),b());}:void 0,children:i})]})});zv.displayName="LabeledValue";var Bv=cva("",{variants:{orientation:{horizontal:"flex flex-row flex-wrap",vertical:"flex flex-col"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"vertical",gap:"md"}}),Fv=U.forwardRef(({className:e,orientation:t,gap:a,...r},n)=>jsx("div",{ref:n,className:o(Bv({orientation:t,gap:a,className:e})),...r}));Fv.displayName="LabeledValueGroup";var $v=cva("flex items-center rounded-md border border-input bg-background ring-offset-background transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",{variants:{size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),Xr=cva("text-muted-foreground shrink-0",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),_v=U.forwardRef(({value:e,defaultValue:t="",onChange:a,onSearch:r,onSelect:n,suggestions:i=[],recentSearches:s=[],onClearRecentSearches:l,trendingSearches:d=[],isLoading:m,showClear:u=true,showIcon:c=true,popoverWidth:g="trigger",emptyMessage:p="No results found",size:v,variant:N,className:b,placeholder:h="Search...",disabled:w,...f},y)=>{let[P,x]=U.useState(false),[S,k]=U.useState(t),M=e!==void 0?e:S,R=U.useRef(null);U.useImperativeHandle(y,()=>R.current);let C=M.length>0,D=P&&(i.length>0||s.length>0||d.length>0||C),T=H=>{e===void 0&&k(H),a?.(H);},I=()=>{T(""),R.current?.focus();},L=H=>{H?.preventDefault(),M.trim()&&(r?.(M.trim()),x(false));},V=H=>{T(H.label),n?.(H),x(false);},E=H=>{T(H),r?.(H),x(false);},A=H=>{T(H),r?.(H),x(false);},B=U.useMemo(()=>{let H={};return i.forEach(Q=>{let te=Q.category||"Results";H[te]||(H[te]=[]),H[te].push(Q);}),H},[i]);return jsxs(ve,{open:D,onOpenChange:x,children:[jsx(Re,{asChild:true,children:jsxs("form",{onSubmit:L,className:o($v({size:v,variant:N}),b),children:[c&&jsx(Search,{className:o(Xr({size:v}),"ml-3")}),jsx("input",{ref:R,type:"text",value:M,onChange:H=>T(H.target.value),onFocus:()=>x(true),placeholder:h,disabled:w,className:o("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!c&&"pl-3"),...f}),u&&C&&!w&&jsx("button",{type:"button",onClick:I,className:o("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",Xr({size:v})),children:jsx(X,{className:"h-full w-full"})})]})}),jsx(ue,{className:"p-0",style:{width:g==="trigger"?"var(--radix-popover-trigger-width)":g},align:"start",onOpenAutoFocus:H=>H.preventDefault(),children:jsxs(Command,{className:"rounded-lg border-0",children:[s.length>0&&!C&&jsxs("div",{className:"p-2",children:[jsxs("div",{className:"flex items-center justify-between px-2 py-1.5",children:[jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Recent"}),l&&jsx("button",{type:"button",onClick:l,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),s.map((H,Q)=>jsxs("button",{type:"button",onClick:()=>E(H),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(Clock,{className:o(Xr({size:v}))}),jsx("span",{className:"flex-1 text-left truncate",children:H}),jsx(ArrowRight,{className:o(Xr({size:v}),"opacity-0 group-hover:opacity-100")})]},Q))]}),d.length>0&&!C&&jsxs("div",{className:"border-t p-2",children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Trending"})}),d.map((H,Q)=>jsxs("button",{type:"button",onClick:()=>A(H),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(TrendingUp,{className:o(Xr({size:v}))}),jsx("span",{className:"flex-1 text-left truncate",children:H})]},Q))]}),C&&jsx("div",{className:"p-2",children:m?jsx("div",{className:"flex items-center justify-center py-6",children:jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):i.length>0?Object.entries(B).map(([H,Q])=>jsxs("div",{children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:H})}),Q.map(te=>jsxs("button",{type:"button",onClick:()=>V(te),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[te.icon||jsx(Search,{className:o(Xr({size:v}))}),jsxs("div",{className:"flex-1 text-left",children:[jsx("div",{className:"truncate",children:te.label}),te.description&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:te.description})]})]},te.id))]},H)):jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});_v.displayName="SearchBar";var Kv={Pages:jsx(File,{className:"h-4 w-4"}),Files:jsx(Folder,{className:"h-4 w-4"}),Settings:jsx(Settings,{className:"h-4 w-4"}),Users:jsx(User,{className:"h-4 w-4"}),Tags:jsx(Hash,{className:"h-4 w-4"})},Uv=U.forwardRef(({open:e,onOpenChange:t,items:a=[],recentItems:r=[],placeholder:n="Search...",isLoading:i,emptyMessage:s="No results found.",filter:l,shortcut:d="\u2318K",onSelect:m,footer:u},c)=>{let[g,p]=U.useState(""),v=U.useRef(null);U.useEffect(()=>{e||p("");},[e]);let N=U.useMemo(()=>{let f={};return a.forEach(y=>{let P=y.category||"Results";f[P]||(f[P]=[]),f[P].push(y);}),f},[a]),b=f=>{f.onSelect?.(),m?.(f),t?.(false);},h=g.length>0,w=!h&&r.length>0;return jsx(oe.Root,{open:e,onOpenChange:t,children:jsxs(oe.Portal,{children:[jsx(oe.Overlay,{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),jsx(oe.Content,{ref:c,className:"fixed left-1/2 top-[20%] z-50 w-full max-w-2xl -translate-x-1/2 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-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2",children:jsxs(Command,{className:"overflow-hidden rounded-xl border bg-background shadow-2xl",filter:l,shouldFilter:!l,children:[jsxs("div",{className:"flex items-center border-b px-4",children:[jsx(Search,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),jsx(Command.Input,{ref:v,value:g,onValueChange:p,placeholder:n,className:"flex h-14 w-full bg-transparent px-4 py-4 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),g&&jsx("button",{type:"button",onClick:()=>p(""),className:"rounded-sm p-1 text-muted-foreground hover:text-foreground",children:jsx(X,{className:"h-4 w-4"})})]}),jsx(Command.List,{className:"max-h-[400px] overflow-y-auto p-2",children:i?jsx("div",{className:"flex items-center justify-center py-10",children:jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):jsxs(Fragment,{children:[w&&jsxs(Command.Group,{heading:"Recent",children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Recent"}),r.map(f=>jsxs(Command.Item,{value:f.label,onSelect:()=>b(f),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:f.icon||Kv[f.category||""]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:f.label}),f.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:f.description})]}),f.shortcut&&jsx("div",{className:"flex items-center gap-1",children:f.shortcut.map((y,P)=>jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:y},P))})]},f.id))]}),h&&Object.entries(N).map(([f,y])=>jsxs(Command.Group,{heading:f,children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:f}),y.map(P=>jsxs(Command.Item,{value:`${P.label} ${P.keywords?.join(" ")||""}`,onSelect:()=>b(P),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:P.icon||Kv[f]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:P.label}),P.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:P.description})]}),jsx(ArrowRight,{className:"h-4 w-4 text-muted-foreground opacity-0 group-aria-selected:opacity-100"})]},P.id))]},f)),jsx(Command.Empty,{className:"py-10 text-center text-sm text-muted-foreground",children:s})]})}),u?jsx("div",{className:"border-t px-4 py-3",children:u}):jsxs("div",{className:"flex items-center justify-between border-t px-4 py-3 text-xs text-muted-foreground",children:[jsxs("div",{className:"flex items-center gap-4",children:[jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u2191\u2193"}),"Navigate"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u21B5"}),"Select"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"Esc"}),"Close"]})]}),jsxs("span",{className:"flex items-center gap-1",children:["Press ",jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:d})," to open"]})]})]})})]})})});Uv.displayName="SpotlightSearch";function YS(e="k"){let[t,a]=U.useState(false);return U.useEffect(()=>{let r=n=>{(n.metaKey||n.ctrlKey)&&n.key===e&&(n.preventDefault(),a(i=>!i));};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),{open:t,setOpen:a,toggle:()=>a(r=>!r)}}var tT=cva("",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),aT={default:"bg-muted",info:"bg-blue-500/10 text-blue-600 dark:text-blue-400",success:"bg-green-500/10 text-green-600 dark:text-green-400",warning:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",error:"bg-red-500/10 text-red-600 dark:text-red-400"},rT=e=>{let t=typeof e=="string"?new Date(e):e,r=new Date().getTime()-t.getTime(),n=Math.floor(r/6e4),i=Math.floor(r/36e5),s=Math.floor(r/864e5);return n<1?"Just now":n<60?`${n}m ago`:i<24?`${i}h ago`:s<7?`${s}d ago`:t.toLocaleDateString()},Yv=U.forwardRef(({notifications:e=[],onNotificationClick:t,onMarkAsRead:a,onMarkAllAsRead:r,onDismiss:n,onClearAll:i,showSettings:s,onSettingsClick:l,trigger:d,align:m="end",emptyMessage:u="No notifications",maxHeight:c=400,className:g},p)=>{let[v,N]=U.useState(false),b=e.filter(f=>!f.read).length,h=e.length>0,w=f=>{f.read||a?.(f.id),t?.(f);};return jsxs(ve,{open:v,onOpenChange:N,children:[jsx(Re,{asChild:true,children:d||jsxs("button",{ref:p,className:o("relative inline-flex h-10 w-10 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",g),children:[jsx(Bell,{className:"h-5 w-5"}),b>0&&jsx("span",{className:"absolute -right-1 -top-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-[10px] font-medium text-primary-foreground",children:b>99?"99+":b})]})}),jsxs(ue,{className:"w-80 p-0 sm:w-96",align:m,sideOffset:8,children:[jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("h3",{className:"font-semibold",children:"Notifications"}),b>0&&jsxs(no,{variant:"soft",className:"h-5 px-1.5 text-xs",children:[b," new"]})]}),jsxs("div",{className:"flex items-center gap-1",children:[h&&r&&b>0&&jsx("button",{type:"button",onClick:r,className:"rounded-sm p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Mark all as read",children:jsx(CheckCheck,{className:"h-4 w-4"})}),h&&i&&jsx("button",{type:"button",onClick:i,className:"rounded-sm p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Clear all",children:jsx(Trash2,{className:"h-4 w-4"})}),s&&l&&jsx("button",{type:"button",onClick:l,className:"rounded-sm p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Settings",children:jsx(Settings,{className:"h-4 w-4"})})]})]}),h?jsx(dt,{style:{maxHeight:c},children:jsx("div",{className:"divide-y",children:e.map(f=>jsxs("div",{className:o("group relative flex gap-3 px-4 py-3 transition-colors hover:bg-muted/50",!f.read&&"bg-muted/30"),children:[jsx("div",{className:o("flex h-9 w-9 shrink-0 items-center justify-center rounded-full",f.avatar?"overflow-hidden":aT[f.type||"default"]),children:f.avatar?jsx("img",{src:f.avatar,alt:"",className:"h-full w-full object-cover"}):f.icon?f.icon:jsx(Bell,{className:"h-4 w-4"})}),jsxs("button",{type:"button",onClick:()=>w(f),className:"flex-1 text-left",children:[jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsx("p",{className:o("text-sm",!f.read&&"font-medium"),children:f.title}),!f.read&&jsx("span",{className:"mt-1.5 h-2 w-2 shrink-0 rounded-full bg-primary"})]}),f.description&&jsx("p",{className:"mt-0.5 text-xs text-muted-foreground line-clamp-2",children:f.description}),jsx("p",{className:"mt-1 text-[10px] text-muted-foreground",children:rT(f.timestamp)})]}),jsxs("div",{className:"absolute right-2 top-2 flex gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[!f.read&&a&&jsx("button",{type:"button",onClick:y=>{y.stopPropagation(),a(f.id);},className:"rounded-sm p-1 text-muted-foreground hover:bg-background hover:text-foreground",title:"Mark as read",children:jsx(Check,{className:"h-3.5 w-3.5"})}),(n||f.onDismiss)&&jsx("button",{type:"button",onClick:y=>{y.stopPropagation(),f.onDismiss?.(),n?.(f.id);},className:"rounded-sm p-1 text-muted-foreground hover:bg-background hover:text-foreground",title:"Dismiss",children:jsx(X,{className:"h-3.5 w-3.5"})})]})]},f.id))})}):jsxs("div",{className:"flex flex-col items-center justify-center py-10 text-center",children:[jsx(Bell,{className:"h-10 w-10 text-muted-foreground/50"}),jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:u})]})]})]})});Yv.displayName="NotificationCenter";var Xv=cva("relative flex items-center justify-center gap-3 px-4 py-2.5 text-sm",{variants:{variant:{default:"bg-muted text-foreground",primary:"bg-primary text-primary-foreground",info:"bg-blue-500 text-white",success:"bg-green-500 text-white",warning:"bg-yellow-500 text-black",danger:"bg-red-500 text-white",gradient:"bg-gradient-to-r from-primary via-purple-500 to-pink-500 text-white"},position:{top:"fixed top-0 left-0 right-0 z-50",relative:"relative"}},defaultVariants:{variant:"default",position:"relative"}}),cT={default:Megaphone,primary:Megaphone,info:Info,success:CheckCircle,warning:AlertTriangle,danger:XCircle,gradient:Megaphone},qv=U.forwardRef(({message:e,showIcon:t=true,icon:a,dismissible:r=true,onDismiss:n,action:i,variant:s="default",position:l,animate:d,autoDismiss:m,storageKey:u,className:c,...g},p)=>{let[v,N]=U.useState(true),[b,h]=U.useState(false);U.useEffect(()=>{u&&localStorage.getItem(`banner-${u}`)==="true"&&N(false);},[u]),U.useEffect(()=>{if(m&&v){let y=setTimeout(()=>{w();},m);return ()=>clearTimeout(y)}},[m,v]);let w=()=>{h(true),setTimeout(()=>{N(false),u&&localStorage.setItem(`banner-${u}`,"true"),n?.();},200);};if(!v)return null;let f=a?null:cT[s||"default"];return jsxs("div",{ref:p,className:o(Xv({variant:s,position:l}),d&&"animate-pulse",b&&"animate-out fade-out slide-out-to-top duration-200",c),role:"banner",...g,children:[t&&jsx("span",{className:"shrink-0",children:a||f&&jsx(f,{className:"h-4 w-4"})}),jsx("span",{className:"text-center font-medium",children:e}),i&&(i.href?jsxs("a",{href:i.href,className:"group inline-flex shrink-0 items-center gap-1 font-semibold underline-offset-4 hover:underline",children:[i.label,jsx(ArrowRight,{className:"h-3.5 w-3.5 transition-transform group-hover:translate-x-0.5"})]}):jsxs("button",{type:"button",onClick:i.onClick,className:"group inline-flex shrink-0 items-center gap-1 font-semibold underline-offset-4 hover:underline",children:[i.label,jsx(ArrowRight,{className:"h-3.5 w-3.5 transition-transform group-hover:translate-x-0.5"})]})),r&&jsx("button",{type:"button",onClick:w,className:o("absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-1 transition-opacity hover:opacity-70",l==="relative"&&"right-4"),"aria-label":"Dismiss banner",children:jsx(X,{className:"h-4 w-4"})})]})});qv.displayName="AnnouncementBanner";var Ko=cva("inline-flex items-center justify-center rounded-full shadow-lg transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-muted",ghost:"bg-background hover:bg-muted shadow-md"},size:{sm:"h-10 w-10",md:"h-14 w-14",lg:"h-16 w-16"},position:{"bottom-right":"fixed bottom-6 right-6","bottom-left":"fixed bottom-6 left-6","bottom-center":"fixed bottom-6 left-1/2 -translate-x-1/2",relative:"relative"}},defaultVariants:{variant:"default",size:"md",position:"bottom-right"}}),pT=cva("transition-transform duration-200",{variants:{size:{sm:"h-4 w-4",md:"h-6 w-6",lg:"h-7 w-7"}},defaultVariants:{size:"md"}}),kl=U.forwardRef(({icon:e,label:t="Action button",extended:a,extendedLabel:r,actions:n,direction:i="up",showTooltip:s=true,closeIcon:l,animation:d="rotate",variant:m,size:u,position:c,className:g,onClick:p,disabled:v,...N},b)=>{let[h,w]=U.useState(false),f=n&&n.length>0,y=M=>{f&&w(!h),p?.(M);},P=M=>{M.onClick?.(),w(false);},x={up:{container:"flex-col-reverse bottom-full mb-3",item:"mb-3"},down:{container:"flex-col top-full mt-3",item:"mt-3"},left:{container:"flex-row-reverse right-full mr-3",item:"mr-3"},right:{container:"flex-row left-full ml-3",item:"ml-3"}},S=d==="rotate"&&h?"rotate-45":"",k=d==="scale"&&h?"scale-0":"scale-100";return jsxs("div",{className:o("z-50",c!=="relative"&&c&&Ko({position:c})),children:[f&&h&&jsx("div",{className:o("absolute flex items-center gap-2",x[i].container),children:n.map((M,R)=>jsxs("div",{className:o("flex items-center gap-2 animate-in fade-in zoom-in duration-200",i==="up"||i==="down"?"flex-row":"flex-col"),style:{animationDelay:`${R*50}ms`},children:[s&&(i==="up"||i==="down")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:M.label}),M.href?jsx("a",{href:M.href,className:o(Ko({variant:M.variant||"secondary",size:u==="lg"?"md":"sm"})),"aria-label":M.label,children:M.icon}):jsx("button",{type:"button",onClick:()=>P(M),className:o(Ko({variant:M.variant||"secondary",size:u==="lg"?"md":"sm"})),"aria-label":M.label,children:M.icon}),s&&(i==="left"||i==="right")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:M.label})]},M.id))}),jsxs("button",{ref:b,type:"button",onClick:y,disabled:v,className:o(Ko({variant:m,size:u,position:"relative"}),a&&"px-6 gap-2",g),"aria-label":t,"aria-expanded":f?h:void 0,...N,children:[h&&l?l:jsx("span",{className:o(pT({size:u}),S,k,"transition-all duration-200"),children:e||jsx(Plus,{})}),a&&r&&jsx("span",{className:"font-medium",children:r})]}),f&&h&&jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>w(false)})]})});kl.displayName="FloatingActionButton";var uT=kl;var Jv=cva("fixed bottom-0 left-0 right-0 z-50 flex items-center justify-around border-t bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/80 safe-area-inset-bottom",{variants:{variant:{default:"border-border",elevated:"border-transparent shadow-lg",filled:"border-transparent bg-primary text-primary-foreground"},size:{sm:"h-14",md:"h-16",lg:"h-20"}},defaultVariants:{variant:"default",size:"md"}}),fT=cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors",{variants:{variant:{default:"text-muted-foreground hover:text-foreground",elevated:"text-muted-foreground hover:text-foreground",filled:"text-primary-foreground/70 hover:text-primary-foreground"},size:{sm:"py-1.5",md:"py-2",lg:"py-3"},isActive:{true:"",false:""}},compoundVariants:[{variant:"default",isActive:true,className:"text-primary"},{variant:"elevated",isActive:true,className:"text-primary"},{variant:"filled",isActive:true,className:"text-primary-foreground"}],defaultVariants:{variant:"default",size:"md",isActive:false}}),gT=cva("transition-transform",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-7 w-7"},isActive:{true:"scale-110",false:""}},defaultVariants:{size:"md",isActive:false}}),bT=cva("font-medium transition-opacity",{variants:{size:{sm:"text-[10px]",md:"text-xs",lg:"text-sm"},showLabel:{always:"opacity-100",active:"",never:"sr-only"},isActive:{true:"",false:""}},compoundVariants:[{showLabel:"active",isActive:true,className:"opacity-100"},{showLabel:"active",isActive:false,className:"opacity-0 h-0"}],defaultVariants:{size:"md",showLabel:"always",isActive:false}}),eh=U.forwardRef(({className:e,variant:t,size:a,items:r,activeKey:n,defaultActiveKey:i,onChange:s,showLabels:l="always",hideOnScroll:d=false,...m},u)=>{let[c,g]=U.useState(i??r[0]?.key),[p,v]=U.useState(true),N=U.useRef(0),b=n??c;U.useEffect(()=>{if(!d)return;let w=()=>{let f=window.scrollY,y=f>N.current,P=f<N.current;y&&f>100?v(false):P&&v(true),N.current=f;};return window.addEventListener("scroll",w,{passive:true}),()=>window.removeEventListener("scroll",w)},[d]);let h=w=>{n===void 0&&g(w.key),s?.(w.key),w.onClick?.();};return jsx("nav",{ref:u,role:"navigation","aria-label":"Bottom navigation",className:o(Jv({variant:t,size:a,className:e}),"transition-transform duration-300",!p&&"translate-y-full"),...m,children:r.map(w=>{let f=b===w.key,y=f&&w.activeIcon?w.activeIcon:w.icon,P=jsxs(Fragment,{children:[jsxs("span",{className:"relative",children:[jsx("span",{className:o(gT({size:a,isActive:f})),children:y}),w.badge!==void 0&&jsx("span",{className:"absolute -right-2 -top-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-destructive px-1 text-[10px] font-medium text-destructive-foreground",children:typeof w.badge=="number"&&w.badge>99?"99+":w.badge})]}),jsx("span",{className:o(bT({size:a,showLabel:l,isActive:f})),children:w.label})]}),x=o(fT({variant:t,size:a,isActive:f}));return w.href?jsx("a",{href:w.href,className:x,"aria-current":f?"page":void 0,onClick:()=>h(w),children:P},w.key):jsx("button",{type:"button",className:x,"aria-current":f?"page":void 0,onClick:()=>h(w),children:P},w.key)})})});eh.displayName="BottomNavigation";var rh=cva("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[20px] border-t bg-background",{variants:{size:{sm:"max-h-[50vh]",md:"max-h-[70vh]",lg:"max-h-[85vh]",full:"max-h-[100vh] rounded-t-none"}},defaultVariants:{size:"md"}}),oh=cva("flex w-full items-center gap-3 px-4 py-3.5 text-left transition-colors focus-visible:outline-none focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-accent",destructive:"text-destructive hover:bg-destructive/10"}},defaultVariants:{variant:"default"}}),nh=U.forwardRef(({open:e,onOpenChange:t,trigger:a,title:r,description:n,items:i,cancelLabel:s="Cancel",onCancel:l,showCancel:d=true,children:m,size:u,closeOnSelect:c=true,onAction:g},p)=>{let v=b=>{b.isDisabled||(b.onSelect?.(),g?.(b.key),c&&t?.(false));},N=()=>{l?.(),t?.(false);};return jsxs(Drawer.Root,{open:e,onOpenChange:t,children:[a&&jsx(Drawer.Trigger,{asChild:true,children:a}),jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/40"}),jsxs(Drawer.Content,{ref:p,className:o(rh({size:u})),children:[jsx("div",{className:"mx-auto mt-4 h-1.5 w-12 flex-shrink-0 rounded-full bg-muted"}),(r||n)&&jsxs("div",{className:"px-4 py-3 text-center",children:[r&&jsx(Drawer.Title,{className:"text-base font-semibold",children:r}),n&&jsx(Drawer.Description,{className:"mt-1 text-sm text-muted-foreground",children:n})]}),jsx("div",{className:"flex-1 overflow-y-auto",children:m||jsx("div",{className:"divide-y",children:i?.map(b=>jsxs("button",{type:"button",disabled:b.isDisabled,onClick:()=>v(b),className:o(oh({variant:b.isDestructive?"destructive":"default"})),children:[b.icon&&jsx("span",{className:"h-5 w-5 flex-shrink-0 [&>svg]:h-full [&>svg]:w-full",children:b.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"font-medium",children:b.label}),b.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:b.description})]})]},b.key))})}),d&&jsx("div",{className:"border-t p-2 pb-safe",children:jsx("button",{type:"button",onClick:N,className:"w-full rounded-lg bg-muted py-3.5 text-center font-semibold transition-colors hover:bg-muted/80",children:s})})]})]})]})});nh.displayName="ActionSheet";var sh=cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),Vl=cva("flex h-full items-center justify-center px-4 text-white font-medium transition-opacity",{variants:{variant:{primary:"bg-primary",secondary:"bg-secondary text-secondary-foreground",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500"},size:{sm:"min-w-16",md:"min-w-20",lg:"min-w-24"}},defaultVariants:{variant:"primary",size:"md"}}),lh=U.forwardRef(({className:e,variant:t,leftActions:a=[],rightActions:r=[],actionSize:n="md",threshold:i=.3,onSwipeEnd:s,disabled:l=false,fullSwipeAction:d,children:m,...u},c)=>{let g=U.useRef(null),[p,v]=U.useState(0),[N,b]=U.useState(false),h=U.useRef(0),w=U.useRef(0),f=a.length*(n==="sm"?64:n==="lg"?96:80),y=r.length*(n==="sm"?64:n==="lg"?96:80),P=R=>{l||(b(true),h.current=R.touches[0].clientX,w.current=p);},x=R=>{if(!N||l)return;let D=R.touches[0].clientX-h.current,T=w.current+D;(T>0&&a.length===0||T<0&&r.length===0)&&(T=0),T>f?T=f+(T-f)*.3:T<-y&&(T=-y+(T+y)*.3),v(T);},S=()=>{if(!N)return;b(false);let R=g.current?.offsetWidth||0,C=Math.abs(p)/R;if(d&&C>.6){d==="right"&&p>0&&a[0]?(a[0].onAction?.(),s?.("right",a[0].key)):d==="left"&&p<0&&r[0]&&(r[0].onAction?.(),s?.("left",r[0].key)),v(0);return}p>f*i&&a.length>0?(v(f),s?.("right")):p<-y*i&&r.length>0?(v(-y),s?.("left")):v(0);},k=(R,C)=>{R.onAction?.(),s?.(C,R.key),v(0);},M=()=>{v(0);};return jsxs("div",{ref:c,className:o(sh({variant:t,className:e})),...u,children:[a.length>0&&jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:f},children:a.map(R=>jsxs("button",{type:"button",onClick:()=>k(R,"right"),className:o(Vl({variant:R.variant,size:n})),style:{opacity:Math.min(1,p/f)},children:[R.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:R.icon}),!R.icon&&R.label]},R.key))}),r.length>0&&jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:y},children:r.map(R=>jsxs("button",{type:"button",onClick:()=>k(R,"left"),className:o(Vl({variant:R.variant,size:n})),style:{opacity:Math.min(1,Math.abs(p)/y)},children:[R.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:R.icon}),!R.icon&&R.label]},R.key))}),jsx("div",{ref:g,className:o("relative bg-background",N?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:P,onTouchMove:x,onTouchEnd:S,onClick:p!==0?M:void 0,children:m})]})});lh.displayName="SwipeActions";var ch=cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),yT=cva("absolute left-1/2 -translate-x-1/2 flex items-center justify-center transition-all duration-200",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"}},defaultVariants:{size:"md"}}),mh=U.forwardRef(({className:e,variant:t,onRefresh:a,pullThreshold:r=80,maxPullDistance:n=120,loadingIndicator:i,pullIndicator:s,indicatorSize:l="md",disabled:d=false,pullText:m="Pull to refresh",releaseText:u="Release to refresh",refreshingText:c="Refreshing...",children:g,...p},v)=>{let N=U.useRef(null),[b,h]=U.useState(0),[w,f]=U.useState("idle"),y=U.useRef(0),P=U.useRef(false),x=()=>d||w==="refreshing"?false:(N.current?.scrollTop??window.scrollY)<=0,S=D=>{x()&&(y.current=D.touches[0].clientY,P.current=true);},k=D=>{if(!P.current||!x())return;let I=D.touches[0].clientY-y.current;if(I<0){h(0),f("idle");return}let V=Math.min(I*.5,n);h(V),f(V>=r?"ready":"pulling");},M=async()=>{if(P.current)if(P.current=false,w==="ready"){f("refreshing"),h(r*.6);try{await a();}finally{f("idle"),h(0);}}else f("idle"),h(0);},R={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[l],C=()=>{if(w==="refreshing")return i||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(Loader2,{className:o(R,"animate-spin text-primary")}),jsx("span",{className:"text-xs text-muted-foreground",children:c})]});let D=Math.min(b/r*180,180);return s||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(ArrowDown,{className:o(R,"text-muted-foreground transition-transform"),style:{transform:`rotate(${D}deg)`}}),jsx("span",{className:"text-xs text-muted-foreground",children:w==="ready"?u:m})]})};return jsxs("div",{ref:v,className:o(ch({variant:t,className:e})),...p,children:[jsx("div",{className:o(yT({size:l}),"z-10",w==="idle"&&b===0&&"opacity-0"),style:{top:Math.max(b-60,-60),opacity:Math.min(b/(r*.5),1)},children:C()}),jsx("div",{ref:N,className:o("transition-transform duration-200",w==="refreshing"&&"ease-out"),style:{transform:`translateY(${b}px)`,transition:P.current?"none":void 0},onTouchStart:S,onTouchMove:k,onTouchEnd:M,children:g})]})});mh.displayName="PullToRefresh";var uh=cva("flex min-h-screen w-full",{variants:{layout:{default:"flex-col",sidebar:"flex-row"}},defaultVariants:{layout:"default"}}),fh=U.forwardRef(({className:e,layout:t="default",header:a,footer:r,sidebar:n,aside:i,sidebarCollapsed:s=false,sidebarWidth:l="16rem",sidebarCollapsedWidth:d="4rem",asideWidth:m="16rem",fixed:u=false,children:c,...g},p)=>{let v=s?d:l;return jsxs("div",{ref:p,className:o(uh({layout:t}),e),style:{"--app-shell-sidebar-width":v,"--app-shell-aside-width":m},...g,children:[a&&jsx(Il,{fixed:u,hasSidebar:!!n,children:a}),jsxs("div",{className:"flex flex-1",children:[n&&jsx(El,{collapsed:s,fixed:u,children:n}),jsx("main",{className:o("flex-1 flex flex-col min-h-0",u&&a&&"pt-14",u&&r&&"pb-14"),children:c}),i&&jsx(Hl,{fixed:u,children:i})]}),r&&jsx(Al,{fixed:u,hasSidebar:!!n,children:r})]})});fh.displayName="AppShell";var Il=U.forwardRef(({className:e,fixed:t,hasSidebar:a,children:r,...n},i)=>jsx("header",{ref:i,className:o("flex h-14 items-center border-b bg-background px-4",t&&"fixed top-0 right-0 z-40",t&&a&&"left-[var(--app-shell-sidebar-width)]",t&&!a&&"left-0",e),...n,children:r}));Il.displayName="AppShellHeader";var El=U.forwardRef(({className:e,collapsed:t,fixed:a,children:r,...n},i)=>jsx("aside",{ref:i,className:o("w-[var(--app-shell-sidebar-width)] shrink-0 border-r bg-background transition-[width] duration-200",a&&"fixed left-0 top-0 bottom-0 z-50",e),"data-collapsed":t,...n,children:r}));El.displayName="AppShellSidebar";var Hl=U.forwardRef(({className:e,fixed:t,children:a,...r},n)=>jsx("aside",{ref:n,className:o("w-[var(--app-shell-aside-width)] shrink-0 border-l bg-background",t&&"fixed right-0 top-14 bottom-0 z-40",e),...r,children:a}));Hl.displayName="AppShellAside";var Al=U.forwardRef(({className:e,fixed:t,hasSidebar:a,children:r,...n},i)=>jsx("footer",{ref:i,className:o("flex h-14 items-center border-t bg-background px-4",t&&"fixed bottom-0 right-0 z-40",t&&a&&"left-[var(--app-shell-sidebar-width)]",t&&!a&&"left-0",e),...n,children:r}));Al.displayName="AppShellFooter";var gh=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("flex-1 overflow-auto p-4",e),...t}));gh.displayName="AppShellMain";var vh=cva("flex min-h-screen w-full bg-muted/40",{variants:{variant:{default:"",bordered:"[&_[data-slot=sidebar]]:border-r [&_[data-slot=header]]:border-b",filled:"[&_[data-slot=sidebar]]:bg-background [&_[data-slot=header]]:bg-background"}},defaultVariants:{variant:"bordered"}}),hh=U.forwardRef(({className:e,variant:t,navigation:a,logo:r,userMenu:n,headerActions:i,breadcrumb:s,defaultCollapsed:l=false,collapsed:d,onCollapsedChange:m,children:u,...c},g)=>{let[p,v]=U.useState(l),[N,b]=U.useState(false),h=d??p,w=U.useCallback(f=>{v(f),m?.(f);},[m]);return jsxs("div",{ref:g,className:o(vh({variant:t}),e),...c,children:[jsxs("aside",{"data-slot":"sidebar","data-collapsed":h,className:o("hidden lg:flex flex-col fixed inset-y-0 left-0 z-50 bg-background transition-[width] duration-200",h?"w-16":"w-64"),children:[jsx("div",{className:"flex h-14 items-center border-b px-4",children:r}),jsx("nav",{className:"flex-1 overflow-auto py-4",children:a}),n&&jsx("div",{className:"border-t p-4",children:n})]}),jsx(po,{open:N,onOpenChange:b,children:jsxs(vr,{side:"left",className:"w-64 p-0",children:[jsx("div",{className:"flex h-14 items-center border-b px-4",children:r}),jsx("nav",{className:"flex-1 overflow-auto py-4",children:a}),n&&jsx("div",{className:"border-t p-4",children:n})]})}),jsxs("div",{className:o("flex flex-1 flex-col transition-[margin-left] duration-200",h?"lg:ml-16":"lg:ml-64"),children:[jsxs("header",{"data-slot":"header",className:"sticky top-0 z-40 flex h-14 items-center gap-4 bg-background px-4 lg:px-6",children:[jsxs(O,{variant:"ghost",size:"icon",className:"lg:hidden",onClick:()=>b(true),children:[jsx(Menu,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Toggle menu"})]}),jsxs(O,{variant:"ghost",size:"icon",className:"hidden lg:flex",onClick:()=>w(!h),children:[jsx(Menu,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Toggle sidebar"})]}),s&&jsx("div",{className:"flex-1",children:s}),i&&jsx("div",{className:"flex items-center gap-2",children:i})]}),jsx("main",{className:"flex-1 p-4 lg:p-6",children:u})]})]})});hh.displayName="DashboardLayout";var xh=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("space-y-6",e),...t}));xh.displayName="DashboardPage";var yh=U.forwardRef(({className:e,title:t,description:a,actions:r,children:n,...i},s)=>jsxs("div",{ref:s,className:o("flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",e),...i,children:[jsxs("div",{className:"space-y-1",children:[t&&jsx("h1",{className:"text-2xl font-bold tracking-tight",children:t}),a&&jsx("p",{className:"text-muted-foreground",children:a}),n]}),r&&jsx("div",{className:"flex items-center gap-2",children:r})]}));yh.displayName="DashboardPageHeader";var Rh=U.forwardRef(({className:e,columns:t=4,...a},r)=>jsx("div",{ref:r,className:o("grid gap-4",{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}[t],e),...a}));Rh.displayName="DashboardGrid";var ki=cva("min-h-screen w-full",{variants:{variant:{centered:"flex items-center justify-center bg-muted/40",split:"flex flex-col lg:flex-row",cover:"relative flex items-center justify-center"}},defaultVariants:{variant:"centered"}}),wh=U.forwardRef(({className:e,variant:t="centered",logo:a,sideContent:r,backgroundImage:n,sidePosition:i="left",footer:s,children:l,...d},m)=>t==="split"?jsxs("div",{ref:m,className:o(ki({variant:t}),e),...d,children:[jsx("div",{className:o("hidden lg:flex lg:w-1/2 flex-col bg-primary text-primary-foreground",i==="right"&&"order-2"),children:r||jsxs("div",{className:"flex flex-1 flex-col items-center justify-center p-8",children:[a&&jsx("div",{className:"mb-8",children:a}),jsxs("div",{className:"max-w-md text-center",children:[jsx("h2",{className:"text-3xl font-bold",children:"Welcome back"}),jsx("p",{className:"mt-4 text-primary-foreground/80",children:"Sign in to your account to continue"})]})]})}),jsxs("div",{className:o("flex flex-1 flex-col lg:w-1/2",i==="right"&&"order-1"),children:[a&&jsx("div",{className:"flex items-center justify-center p-6 lg:hidden",children:a}),jsx("div",{className:"flex flex-1 items-center justify-center p-6",children:jsx("div",{className:"w-full max-w-md space-y-6",children:l})}),s&&jsx("div",{className:"p-6 text-center text-sm text-muted-foreground",children:s})]})]}):t==="cover"?jsxs("div",{ref:m,className:o(ki({variant:t}),e),style:n?{backgroundImage:`url(${n})`,backgroundSize:"cover",backgroundPosition:"center"}:void 0,...d,children:[n&&jsx("div",{className:"absolute inset-0 bg-background/80 backdrop-blur-sm"}),jsxs("div",{className:"relative z-10 w-full max-w-md p-6",children:[a&&jsx("div",{className:"mb-8 flex justify-center",children:a}),jsx("div",{className:"rounded-lg border bg-card p-6 shadow-lg",children:l}),s&&jsx("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:s})]})]}):jsx("div",{ref:m,className:o(ki({variant:t}),e),...d,children:jsxs("div",{className:"w-full max-w-md p-6",children:[a&&jsx("div",{className:"mb-8 flex justify-center",children:a}),jsx("div",{className:"rounded-lg border bg-card p-6 shadow-sm",children:l}),s&&jsx("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:s})]})}));wh.displayName="AuthLayout";var Nh=U.forwardRef(({className:e,...t},a)=>jsx("form",{ref:a,className:o("space-y-4",e),...t}));Nh.displayName="AuthForm";var Ph=U.forwardRef(({className:e,title:t,description:a,children:r,...n},i)=>jsxs("div",{ref:i,className:o("space-y-2 text-center",e),...n,children:[t&&jsx("h1",{className:"text-2xl font-bold",children:t}),a&&jsx("p",{className:"text-muted-foreground",children:a}),r]}));Ph.displayName="AuthHeader";var Ch=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("flex flex-col gap-2 text-center text-sm",e),...t}));Ch.displayName="AuthFooterLinks";var Sh=U.forwardRef(({className:e,text:t="or continue with",...a},r)=>jsxs("div",{ref:r,className:o("relative my-4",e),...a,children:[jsx("div",{className:"absolute inset-0 flex items-center",children:jsx("span",{className:"w-full border-t"})}),jsx("div",{className:"relative flex justify-center text-xs uppercase",children:jsx("span",{className:"bg-card px-2 text-muted-foreground",children:t})})]}));Sh.displayName="AuthDivider";var Th=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("grid grid-cols-2 gap-2",e),...t}));Th.displayName="AuthSocialButtons";var Di=cva("w-full",{variants:{variant:{sidebar:"flex flex-col lg:flex-row gap-8",tabs:"space-y-6",stacked:"space-y-8"}},defaultVariants:{variant:"sidebar"}}),Mh=U.forwardRef(({className:e,variant:t="sidebar",navigation:a,title:r,description:n,children:i,...s},l)=>t==="sidebar"?jsxs("div",{ref:l,className:o(Di({variant:t}),e),...s,children:[a&&jsx("aside",{className:"lg:w-64 shrink-0",children:jsx("nav",{className:"flex flex-col gap-1",children:a})}),jsxs("div",{className:"flex-1 space-y-6",children:[(r||n)&&jsx(Yo,{title:r,description:n}),i]})]}):t==="tabs"?jsxs("div",{ref:l,className:o(Di({variant:t}),e),...s,children:[(r||n)&&jsx(Yo,{title:r,description:n}),a,jsx("div",{className:"pt-4",children:i})]}):jsxs("div",{ref:l,className:o(Di({variant:t}),e),...s,children:[(r||n)&&jsx(Yo,{title:r,description:n}),i]}));Mh.displayName="SettingsLayout";var Yo=U.forwardRef(({className:e,title:t,description:a,children:r,...n},i)=>jsxs("div",{ref:i,className:o("space-y-1",e),...n,children:[t&&jsx("h1",{className:"text-2xl font-bold",children:t}),a&&jsx("p",{className:"text-muted-foreground",children:a}),r]}));Yo.displayName="SettingsHeader";var kh=U.forwardRef(({className:e,title:t,description:a,children:r,...n},i)=>jsxs("div",{ref:i,className:o("space-y-4",e),...n,children:[(t||a)&&jsxs("div",{className:"space-y-1",children:[t&&jsx("h2",{className:"text-lg font-medium",children:t}),a&&jsx("p",{className:"text-sm text-muted-foreground",children:a})]}),r]}));kh.displayName="SettingsSection";var Dh=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("rounded-lg border bg-card p-6",e),...t}));Dh.displayName="SettingsCard";var Vh=U.forwardRef(({className:e,label:t,description:a,htmlFor:r,children:n,...i},s)=>jsxs("div",{ref:s,className:o("flex flex-col gap-4 py-4 sm:flex-row sm:items-center sm:justify-between","border-b last:border-0 first:pt-0 last:pb-0",e),...i,children:[jsxs("div",{className:"space-y-0.5",children:[t&&jsx("label",{htmlFor:r,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:t}),a&&jsx("p",{className:"text-sm text-muted-foreground",children:a})]}),jsx("div",{className:"shrink-0",children:n})]}));Vh.displayName="SettingsRow";var Lh=U.forwardRef(({className:e,active:t,icon:a,children:r,...n},i)=>jsxs("button",{ref:i,type:"button",className:o("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors","hover:bg-muted",t&&"bg-muted",e),...n,children:[a&&jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:a}),r]}));Lh.displayName="SettingsNavItem";var Ih=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("h-px bg-border my-4",e),...t}));Ih.displayName="SettingsSeparator";var fr=(e,t,a)=>({duration:e,delay:t,ease:a||[.4,0,.2,1]}),CT={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},Eh=U.forwardRef(({show:e=true,children:t,duration:a=.3,delay:r=0,ease:n,className:i,unmountOnExit:s=true,initialOpacity:l=0,onAnimationStart:d,onAnimationComplete:m},u)=>{let c=jsx(motion.div,{ref:u,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:CT,custom:l,transition:fr(a,r,n),className:o(i),onAnimationStart:d,onAnimationComplete:m,children:t});return s?jsx(AnimatePresence,{children:e&&c}):c});Eh.displayName="Fade";var ST=(e,t)=>{let a=typeof t=="number"?`${t}px`:t,r={up:{y:a},down:{y:`-${a}`},left:{x:a},right:{x:`-${a}`}};return {hidden:{opacity:0,...r[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...r[e]}}},Hh=U.forwardRef(({show:e=true,children:t,duration:a=.3,delay:r=0,ease:n,className:i,unmountOnExit:s=true,direction:l="up",offset:d=20,onAnimationStart:m,onAnimationComplete:u},c)=>{let g=U.useMemo(()=>ST(l,d),[l,d]),p=jsx(motion.div,{ref:c,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:g,transition:fr(a,r,n),className:o(i),onAnimationStart:m,onAnimationComplete:u,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});Hh.displayName="Slide";var TT={center:"center center",top:"center top",bottom:"center bottom",left:"left center",right:"right center","top-left":"left top","top-right":"right top","bottom-left":"left bottom","bottom-right":"right bottom"},MT={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},Ah=U.forwardRef(({show:e=true,children:t,duration:a=.3,delay:r=0,ease:n,className:i,unmountOnExit:s=true,initialScale:l=.9,origin:d="center",onAnimationStart:m,onAnimationComplete:u},c)=>{let g=jsx(motion.div,{ref:c,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:MT,custom:l,transition:fr(a,r,n),className:o(i),style:{transformOrigin:TT[d]},onAnimationStart:m,onAnimationComplete:u,children:t});return s?jsx(AnimatePresence,{children:e&&g}):g});Ah.displayName="Scale";var zh=U.forwardRef(({show:e=true,children:t,duration:a=.3,delay:r=0,ease:n,className:i,horizontal:s=false,startingSize:l=0,animateOpacity:d=true,onAnimationStart:m,onAnimationComplete:u},c)=>{let g=s?"width":"height",p={hidden:{[g]:l,opacity:d?0:1},visible:{[g]:"auto",opacity:1},exit:{[g]:l,opacity:d?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:c,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:fr(a,r,n),className:o("overflow-hidden",i),onAnimationStart:m,onAnimationComplete:u,children:t})})});zh.displayName="Collapse";var Bh=U.forwardRef(({show:e=true,children:t,duration:a=.4,delay:r=0,ease:n,className:i,initialWidth:s=0,initialHeight:l=0,animateOpacity:d=true,onAnimationStart:m,onAnimationComplete:u},c)=>{let g={hidden:{width:s,height:l,opacity:d?0:1},visible:{width:"auto",height:"auto",opacity:1},exit:{width:s,height:l,opacity:d?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:c,initial:"hidden",animate:"visible",exit:"exit",variants:g,transition:fr(a,r,n),className:o("overflow-hidden",i),onAnimationStart:m,onAnimationComplete:u,children:t})})});Bh.displayName="Expand";var Fh=U.forwardRef(({show:e=true,children:t,duration:a=.3,delay:r=0,ease:n,className:i,unmountOnExit:s=true,initialRotation:l=-180,finalRotation:d=0,onAnimationStart:m,onAnimationComplete:u},c)=>{let g={hidden:{opacity:0,rotate:l},visible:{opacity:1,rotate:d},exit:{opacity:0,rotate:l}},p=jsx(motion.div,{ref:c,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:g,transition:fr(a,r,n),className:o(i),onAnimationStart:m,onAnimationComplete:u,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});Fh.displayName="Rotate";var Oh=U.forwardRef(({front:e,back:t,direction:a="horizontal",flipped:r=false,duration:n=.6,delay:i=0,ease:s,className:l,onAnimationStart:d,onAnimationComplete:m},u)=>{let c=a==="horizontal"?"rotateY":"rotateX";return jsx("div",{ref:u,className:o("relative",l),style:{perspective:1e3},children:jsxs(motion.div,{animate:{[c]:r?180:0},transition:fr(n,i,s),style:{transformStyle:"preserve-3d"},onAnimationStart:d,onAnimationComplete:m,children:[jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden"},children:e}),jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden",transform:`${c}(180deg)`},children:t})]})})});Oh.displayName="Flip";var Gh=U.forwardRef(({color:e="currentColor",duration:t=.6,children:a,className:r,disabled:n=false},i)=>{let[s,l]=U.useState([]),d=U.useRef(null),m=c=>{if(n)return;let g=d.current;if(!g)return;let p=g.getBoundingClientRect(),v=c.clientX-p.left,N=c.clientY-p.top,b=Math.max(p.width,p.height)*2,h={id:Date.now(),x:v,y:N,size:b};l(w=>[...w,h]);},u=c=>{l(g=>g.filter(p=>p.id!==c));};return jsxs("div",{ref:i,className:o("relative overflow-hidden",r),onClick:m,children:[jsx("div",{ref:d,className:"relative z-0",children:a}),jsx(AnimatePresence,{children:s.map(c=>jsx(motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>u(c.id),className:"pointer-events-none absolute rounded-full",style:{left:c.x-c.size/2,top:c.y-c.size/2,width:c.size,height:c.size,backgroundColor:e}},c.id))})]})});Gh.displayName="Ripple";var Wh=U.forwardRef(({children:e,animate:t=true,height:a=10,duration:r=.5,count:n=0,className:i,triggerOnHover:s=false},l)=>{let[d,m]=U.useState(false),u=s?d:t,c={idle:{y:0},bounce:{y:[0,-a,0],transition:{duration:r,ease:"easeInOut",repeat:n===0?1/0:n-1,repeatType:"loop"}}};return jsx(motion.div,{ref:l,variants:c,initial:"idle",animate:u?"bounce":"idle",className:o(i),onMouseEnter:()=>s&&m(true),onMouseLeave:()=>s&&m(false),children:e})});Wh.displayName="Bounce";var VT={subtle:[0,-2,2,-2,2,-1,1,0],normal:[0,-5,5,-5,5,-3,3,0],strong:[0,-10,10,-10,10,-5,5,0]},$h=U.forwardRef(({children:e,animate:t=true,intensity:a="normal",duration:r=.5,count:n=1,className:i,triggerOnHover:s=false},l)=>{let[d,m]=U.useState(false),u=s?d:t,c={idle:{x:0},shake:{x:VT[a],transition:{duration:r,ease:"easeInOut",repeat:n-1}}};return jsx(motion.div,{ref:l,variants:c,initial:"idle",animate:u?"shake":"idle",className:o(i),onMouseEnter:()=>s&&m(true),onMouseLeave:()=>s&&m(false),children:e})});$h.displayName="Shake";var LT={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},_h=U.forwardRef(({children:e,animate:t=true,speed:a="normal",className:r},n)=>jsx("div",{ref:n,className:o(t&&LT[a],r),children:e}));_h.displayName="Pulse";var Kh=U.forwardRef(({children:e,animate:t=true,angle:a=10,duration:r=.3,count:n=0,className:i,triggerOnHover:s=false},l)=>{let[d,m]=U.useState(false),u=s?d:t,c={idle:{rotate:0},wiggle:{rotate:[0,-a,a,-a,a,0],transition:{duration:r,ease:"easeInOut",repeat:n===0?1/0:n-1,repeatType:"loop"}}};return jsx(motion.div,{ref:l,variants:c,initial:"idle",animate:u?"wiggle":"idle",className:o(i),onMouseEnter:()=>s&&m(true),onMouseLeave:()=>s&&m(false),children:e})});Kh.displayName="Wiggle";var Uh=U.forwardRef(({children:e,animate:t=false,scale:a=1.2,duration:r=.2,className:n,triggerOnHover:i=false,triggerOnClick:s=false},l)=>{let[d,m]=U.useState(false),u=t||d,c={type:"spring",stiffness:400,damping:17,duration:r},g=()=>{s&&(m(true),setTimeout(()=>m(false),r*1e3));};return jsx(motion.div,{ref:l,animate:{scale:u?a:1},transition:c,className:o(n),onMouseEnter:()=>i&&m(true),onMouseLeave:()=>i&&m(false),onClick:g,children:e})});Uh.displayName="Pop";var zT=(e,t,a,r)=>{let n=e.toFixed(t),[i,s]=n.split("."),l=i.replace(/\B(?=(\d{3})+(?!\d))/g,a);return s?`${l}${r}${s}`:l},Yh=U.forwardRef(({value:e,from:t=0,duration:a=2,decimals:r=0,prefix:n="",suffix:i="",separator:s=",",decimalSeparator:l=".",animateOnView:d=true,delay:m=0,className:u,onComplete:c},g)=>{let p=U.useRef(null),v=useInView(p,{once:true}),[N,b]=U.useState(!d);U.useEffect(()=>{if(d&&v){let y=setTimeout(()=>b(true),m*1e3);return ()=>clearTimeout(y)}},[d,v,m]);let h={damping:30,stiffness:100,duration:a*1e3},w=useSpring(N?e:t,h),f=useTransform(w,y=>zT(y,r,s,l));return U.useEffect(()=>{N&&w.set(e);},[N,e,w]),U.useEffect(()=>{let y=w.on("change",P=>{Math.abs(P-e)<.01&&c&&c();});return ()=>y()},[w,e,c]),jsx("span",{ref:p,className:o(u),children:jsxs("span",{ref:g,children:[n,jsx(motion.span,{children:f}),i]})})});Yh.displayName="Counter";var jh=U.forwardRef(({text:e,speed:t=50,delay:a=0,pauseBetween:r=1500,cursor:n=true,cursorChar:i="|",loop:s=false,deleteSpeed:l=30,animateOnView:d=true,className:m,cursorClassName:u,onComplete:c},g)=>{let p=Array.isArray(e)?e:[e],[v,N]=U.useState(""),[b,h]=U.useState(0),[w,f]=U.useState(false),[y,P]=U.useState(false),x=U.useRef(null),S=useInView(x,{once:true}),[k,M]=U.useState(!d);return U.useEffect(()=>{if(d&&S){let R=setTimeout(()=>M(true),a*1e3);return ()=>clearTimeout(R)}},[d,S,a]),U.useEffect(()=>{if(!k||y)return;let R=p[b],C;return w?v.length>0?C=setTimeout(()=>{N(v.slice(0,-1));},l):(f(false),h(D=>(D+1)%p.length)):v.length<R.length?C=setTimeout(()=>{N(R.slice(0,v.length+1));},t):b<p.length-1||s?C=setTimeout(()=>{f(true);},r):(P(true),c?.()),()=>clearTimeout(C)},[k,v,b,w,y,p,t,l,r,s,c]),jsxs("span",{ref:x,className:o(m),children:[jsx("span",{ref:g,children:v}),n&&jsx(motion.span,{animate:{opacity:[1,0]},transition:{duration:.8,repeat:1/0,repeatType:"reverse"},className:o("ml-0.5",u),children:i})]})});jh.displayName="Typewriter";var Xh=U.forwardRef(({children:e,direction:t="up",stagger:a=.05,duration:r=.5,delay:n=0,splitBy:i="word",animateOnView:s=true,className:l},d)=>{let m=U.useRef(null),u=useInView(m,{once:true,amount:.5}),c=s?u:true,g=typeof e=="string"?e:"",p=i==="word"?g.split(" "):g.split(""),v={up:{y:20},down:{y:-20},left:{x:20},right:{x:-20}},N={hidden:{},visible:{transition:{staggerChildren:a,delayChildren:n}}},b={hidden:{opacity:0,...v[t]},visible:{opacity:1,x:0,y:0,transition:{duration:r,ease:"easeInOut"}}};return jsx(motion.div,{ref:d,className:o("inline-flex flex-wrap",l),variants:N,initial:"hidden",animate:c?"visible":"hidden",children:jsx("span",{ref:m,children:p.map((h,w)=>jsxs(motion.span,{variants:b,className:"inline-block",children:[h,i==="word"&&w<p.length-1&&"\xA0"]},w))})})});Xh.displayName="TextReveal";var qh=U.forwardRef(({words:e,duration:t=2,animation:a="slide",animationDuration:r=.5,className:n,loop:i=true},s)=>{let[l,d]=U.useState(0);U.useEffect(()=>{if(!i&&l===e.length-1)return;let u=setInterval(()=>{d(c=>(c+1)%e.length);},t*1e3);return ()=>clearInterval(u)},[e.length,t,i,l]);let m=()=>{switch(a){case "fade":return {initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};case "slide":return {initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20}};case "scale":return {initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.2}};case "blur":return {initial:{opacity:0,filter:"blur(10px)"},animate:{opacity:1,filter:"blur(0px)"},exit:{opacity:0,filter:"blur(10px)"}}}};return jsx("span",{ref:s,className:o("relative inline-block",n),children:jsx(AnimatePresence,{mode:"wait",children:jsx(motion.span,{variants:m(),initial:"initial",animate:"animate",exit:"exit",transition:{duration:r},className:"inline-block",children:e[l]},e[l])})})});qh.displayName="WordRotate";var ex=U.forwardRef(({children:e,direction:t="up",distance:a=50,duration:r=.6,delay:n=0,once:i=true,threshold:s=.1,className:l,scale:d,rotate:m,blur:u,ease:c=[.4,0,.2,1]},g)=>{let p=U.useRef(null),v=useInView(p,{once:i,amount:s}),b={up:{x:0,y:a},down:{x:0,y:-a},left:{x:a,y:0},right:{x:-a,y:0},none:{x:0,y:0}}[t],h={hidden:{opacity:0,x:b.x,y:b.y,scale:d??1,rotate:m??0,filter:u?`blur(${u}px)`:"blur(0px)"},visible:{opacity:1,x:0,y:0,scale:1,rotate:0,filter:"blur(0px)",transition:{duration:r,delay:n,ease:c}}};return jsx("div",{ref:p,children:jsx(motion.div,{ref:g,variants:h,initial:"hidden",animate:v?"visible":"hidden",className:o(l),children:e})})});ex.displayName="ScrollReveal";var tx=U.forwardRef(({position:e="top",size:t=4,color:a="hsl(var(--primary))",backgroundColor:r="transparent",zIndex:n=50,className:i,container:s,showPercentage:l=false,useSpring:d=true},m)=>{let{scrollYProgress:u}=useScroll({container:s}),c=useSpring(u,{stiffness:100,damping:30,restDelta:.001}),g=d?c:u,p=e==="top"||e==="bottom",v={top:{top:0,left:0,right:0,height:t},bottom:{bottom:0,left:0,right:0,height:t},left:{top:0,left:0,bottom:0,width:t},right:{top:0,right:0,bottom:0,width:t}},N=p?"scaleX":"scaleY",b=p?"left":"top";return jsxs("div",{ref:m,className:o("fixed",i),style:{...v[e],zIndex:n,backgroundColor:r},children:[jsx(motion.div,{className:"h-full w-full",style:{[N]:g,transformOrigin:b,backgroundColor:a}}),l&&jsx(FT,{progress:g,position:e})]})});tx.displayName="ScrollProgress";var FT=({progress:e,position:t})=>{let a=useTransform(e,s=>Math.round(s*100)),[r,n]=U.useState(0);return U.useEffect(()=>{let s=a.on("change",n);return ()=>s()},[a]),jsxs("span",{className:o("fixed rounded bg-background/80 px-2 py-1 text-xs font-medium backdrop-blur-sm",{top:"top-2 right-4",bottom:"bottom-2 right-4",left:"top-4 left-2",right:"top-4 right-2"}[t]),children:[r,"%"]})},ax=U.forwardRef(({children:e,speed:t=.5,direction:a="vertical",className:r,container:n},i)=>{let s=U.useRef(null),{scrollYProgress:l}=useScroll({target:s,container:n,offset:["start end","end start"]}),d=[-100*t,100*t],m=useTransform(l,[0,1],d),u=useSpring(m,{stiffness:100,damping:30}),c=a==="horizontal"?u:0,g=a==="vertical"?u:0;return jsx("div",{ref:s,className:o("overflow-hidden",r),children:jsx(motion.div,{ref:i,style:{x:c,y:g},children:e})})});ax.displayName="Parallax";var nx=U.forwardRef(({children:e,width:t,height:a,duration:r=1.5,direction:n="right",baseColor:i="hsl(var(--muted))",highlightColor:s="hsl(var(--muted-foreground) / 0.1)",borderRadius:l,className:d,active:m=true},u)=>{let c={left:"to left",right:"to right",top:"to top",bottom:"to bottom"},g={left:"shimmer-left",right:"shimmer-right",top:"shimmer-top",bottom:"shimmer-bottom"};return jsxs("div",{ref:u,className:o("relative overflow-hidden",d),style:{width:t,height:a,borderRadius:l,backgroundColor:i},children:[e,m&&jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(${c[n]}, transparent, ${s}, transparent)`,animation:`${g[n]} ${r}s infinite`}}),jsx("style",{children:`
1
+ import*as U from'react';import {cva}from'class-variance-authority';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {Slot}from'@radix-ui/react-slot';import {Loader2,Check,X,ChevronDown,ChevronUp,ChevronRight,Circle,Search,EyeOff,Eye,Minus,Plus,ChevronsUpDown,Calendar,Heart,Star,PanelLeft,TrendingUp,TrendingDown,Upload,Clock,Menu,ExternalLink,ArrowUp,File,Folder,FolderOpen,Copy,AlertTriangle,RefreshCw,Info,CheckCircle,XCircle,HelpCircle,ZoomOut,ZoomIn,RotateCw,Download,Minimize2,Maximize2,ChevronLeft,GripVertical,Undo,Redo,Heading1,Heading2,Heading3,Bold,Italic,Underline,Strikethrough,List,ListOrdered,AlignLeft,AlignCenter,AlignRight,Quote,Code,Link,Unlink,Moon,Sun,Monitor,MoreHorizontal,AlertCircle,CheckCircle2,MoreVertical,ArrowRight,Hash,User,Settings,Bell,CheckCheck,Trash2,Megaphone,Image,FileVideo,FileAudio,FileText,FileArchive,ArrowDown}from'lucide-react';import*as io from'@radix-ui/react-checkbox';import*as oe from'@radix-ui/react-dialog';import*as zi from'@radix-ui/react-label';import*as Bi from'@radix-ui/react-separator';import*as co from'@radix-ui/react-switch';import*as Et from'@radix-ui/react-avatar';import*as it from'@radix-ui/react-tooltip';import*as Y from'@radix-ui/react-select';import*as _ from'@radix-ui/react-dropdown-menu';import*as st from'@radix-ui/react-popover';import*as lt from'@radix-ui/react-tabs';import {Toaster}from'sonner';export{toast}from'sonner';import*as Ue from'@radix-ui/react-scroll-area';import*as K from'@radix-ui/react-context-menu';import*as fa from'@radix-ui/react-radio-group';import*as es from'@radix-ui/react-toggle';import*as hr from'@radix-ui/react-toggle-group';import*as zt from'@radix-ui/react-slider';import*as Ye from'@radix-ui/react-accordion';import*as xr from'@radix-ui/react-collapsible';import*as le from'@radix-ui/react-alert-dialog';import*as go from'@radix-ui/react-progress';import*as Ya from'@radix-ui/react-hover-card';import*as hc from'@radix-ui/react-aspect-ratio';import*as fe from'@radix-ui/react-navigation-menu';import {Drawer}from'vaul';import {DayPicker}from'react-day-picker';import {Command}from'cmdk';import {format}from'date-fns';import {Panel,Group,Separator}from'react-resizable-panels';import {HexColorPicker,HexColorInput}from'react-colorful';import*as $ from'@radix-ui/react-menubar';import {createPortal}from'react-dom';import*as og from'@radix-ui/react-visually-hidden';import {ResponsiveContainer,LineChart,CartesianGrid,XAxis,YAxis,Tooltip,Legend,Line,BarChart,Bar,PieChart,Pie,Cell,AreaChart,Area}from'recharts';import {useSensors,useSensor,PointerSensor,KeyboardSensor,DndContext,closestCorners,DragOverlay}from'@dnd-kit/core';import {sortableKeyboardCoordinates,SortableContext,verticalListSortingStrategy,useSortable}from'@dnd-kit/sortable';import {CSS}from'@dnd-kit/utilities';import bP from'embla-carousel-react';import {useEditor,EditorContent}from'@tiptap/react';import CP from'@tiptap/starter-kit';import SP from'@tiptap/extension-link';import TP from'@tiptap/extension-underline';import MP from'@tiptap/extension-text-align';import kP from'@tiptap/extension-placeholder';import qP,{centerCrop,makeAspectCrop}from'react-image-crop';import'react-image-crop/dist/ReactCrop.css';import oC from'react-qr-code';import {useTheme,ThemeProvider}from'next-themes';export{useTheme}from'next-themes';import {motion,AnimatePresence,useInView,useSpring,useTransform,useScroll}from'framer-motion';import to from'canvas-confetti';function o(...e){return twMerge(clsx(e))}var ux=cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",{variants:{variant:{solid:"border-transparent bg-primary text-primary-foreground [&>svg]:text-primary-foreground",outline:"border-input bg-transparent text-foreground [&>svg]:text-foreground",ghost:"border-transparent bg-transparent text-foreground [&>svg]:text-foreground",soft:"border-transparent bg-primary/15 text-primary [&>svg]:text-primary",surface:"border-transparent bg-muted text-muted-foreground [&>svg]:text-muted-foreground",destructive:"border-destructive/50 bg-destructive/10 text-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"solid"}}),fx=U.forwardRef(({className:e,variant:t,...a},r)=>jsx("div",{ref:r,role:"alert",className:o(ux({variant:t}),e),...a}));fx.displayName="Alert";var gx=U.forwardRef(({className:e,...t},a)=>jsx("h5",{ref:a,className:o("mb-1 font-medium leading-none tracking-tight",e),...t}));gx.displayName="AlertTitle";var bx=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("text-sm [&_p]:leading-relaxed",e),...t}));bx.displayName="AlertDescription";var hx=cva("inline-flex items-center border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{solid:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-input bg-transparent text-foreground",ghost:"border-transparent bg-transparent text-foreground hover:bg-accent",soft:"border-transparent bg-primary/15 text-primary",surface:"border-transparent bg-muted text-muted-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"solid",radius:"full"}}),no=U.forwardRef(({className:e,variant:t,radius:a,...r},n)=>jsx("div",{ref:n,className:o(hx({variant:t,radius:a}),e),...r}));no.displayName="Badge";var Te=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-all cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{solid:"hover:opacity-90",bordered:"border-2 bg-transparent hover:opacity-70",light:"bg-transparent",flat:"hover:opacity-70",ghost:"border-2 bg-transparent"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},size:{sm:"h-9 px-3 text-xs",md:"h-10 px-4",lg:"h-12 px-6 text-base",icon:"h-10 w-10"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-900 text-white dark:bg-white dark:text-zinc-900"},{variant:"bordered",color:"default",className:"border-zinc-900 text-zinc-900 dark:border-white dark:text-white"},{variant:"light",color:"default",className:"text-zinc-900 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800"},{variant:"flat",color:"default",className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-white"},{variant:"ghost",color:"default",className:"border-zinc-900 text-zinc-900 hover:bg-zinc-900 hover:text-white dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-zinc-900"},{variant:"solid",color:"primary",className:"bg-[#9575CD] text-white"},{variant:"bordered",color:"primary",className:"border-[#9575CD] text-[#9575CD]"},{variant:"light",color:"primary",className:"text-[#9575CD] hover:bg-[#9575CD]/10"},{variant:"flat",color:"primary",className:"bg-[#9575CD]/20 text-[#7E57C2]"},{variant:"ghost",color:"primary",className:"border-[#9575CD] text-[#9575CD] hover:bg-[#9575CD] hover:text-white"},{variant:"solid",color:"secondary",className:"bg-zinc-200 text-zinc-800 dark:bg-zinc-700 dark:text-zinc-200"},{variant:"bordered",color:"secondary",className:"border-zinc-400 text-zinc-600 dark:border-zinc-500 dark:text-zinc-400"},{variant:"light",color:"secondary",className:"text-zinc-600 hover:bg-zinc-200 dark:text-zinc-400 dark:hover:bg-zinc-700"},{variant:"flat",color:"secondary",className:"bg-zinc-200 text-zinc-700 dark:bg-zinc-700 dark:text-zinc-300"},{variant:"ghost",color:"secondary",className:"border-zinc-400 text-zinc-600 hover:bg-zinc-200 dark:border-zinc-500 dark:text-zinc-400 dark:hover:bg-zinc-700"},{variant:"solid",color:"success",className:"bg-green-500 text-white"},{variant:"bordered",color:"success",className:"border-green-500 text-green-500"},{variant:"light",color:"success",className:"text-green-500 hover:bg-green-500/10"},{variant:"flat",color:"success",className:"bg-green-500/20 text-green-600 dark:text-green-400"},{variant:"ghost",color:"success",className:"border-green-500 text-green-500 hover:bg-green-500 hover:text-white"},{variant:"solid",color:"warning",className:"bg-amber-500 text-white"},{variant:"bordered",color:"warning",className:"border-amber-500 text-amber-500"},{variant:"light",color:"warning",className:"text-amber-500 hover:bg-amber-500/10"},{variant:"flat",color:"warning",className:"bg-amber-500/20 text-amber-600 dark:text-amber-400"},{variant:"ghost",color:"warning",className:"border-amber-500 text-amber-500 hover:bg-amber-500 hover:text-white"},{variant:"solid",color:"danger",className:"bg-red-500 text-white"},{variant:"bordered",color:"danger",className:"border-red-500 text-red-500"},{variant:"light",color:"danger",className:"text-red-500 hover:bg-red-500/10"},{variant:"flat",color:"danger",className:"bg-red-500/20 text-red-600 dark:text-red-400"},{variant:"ghost",color:"danger",className:"border-red-500 text-red-500 hover:bg-red-500 hover:text-white"}],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"md"}}),O=U.forwardRef(({className:e,variant:t,color:a,size:r,radius:n,asChild:i=false,href:s,loading:l=false,loadingText:d,children:m,disabled:u,...c},g)=>{let p=u||l,v=l?jsxs(Fragment,{children:[jsx(Loader2,{className:"animate-spin"}),d||m]}):m;return i?jsx(Slot,{className:o(Te({variant:t,color:a,size:r,radius:n,className:e})),ref:g,...c,children:v}):s?jsx("a",{href:s,className:o(Te({variant:t,color:a,size:r,radius:n,className:e}),p&&"pointer-events-none opacity-50"),...c,children:v}):jsx("button",{className:o(Te({variant:t,color:a,size:r,radius:n,className:e})),ref:g,disabled:p,...c,children:v})});O.displayName="Button";var Sx=cva("border bg-card text-card-foreground shadow-sm",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"}},defaultVariants:{radius:"lg"}}),$l=U.forwardRef(({className:e,radius:t,...a},r)=>jsx("div",{ref:r,className:o(Sx({radius:t,className:e})),...a}));$l.displayName="Card";var _l=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("flex flex-col space-y-1.5 p-6",e),...t}));_l.displayName="CardHeader";var Kl=U.forwardRef(({className:e,...t},a)=>jsx("h3",{ref:a,className:o("text-2xl font-semibold leading-none tracking-tight",e),...t}));Kl.displayName="CardTitle";var Ul=U.forwardRef(({className:e,...t},a)=>jsx("p",{ref:a,className:o("text-sm text-muted-foreground",e),...t}));Ul.displayName="CardDescription";var Yl=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("p-6 pt-0",e),...t}));Yl.displayName="CardContent";var jl=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("flex items-center p-6 pt-0",e),...t}));jl.displayName="CardFooter";var so=U.forwardRef(({className:e,...t},a)=>jsx(io.Root,{ref:a,className:o("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:jsx(io.Indicator,{className:o("flex items-center justify-center text-current"),children:jsx(Check,{className:"h-4 w-4"})})}));so.displayName=io.Root.displayName;var Hi=oe.Root,kx=oe.Trigger,ql=oe.Portal,Dx=oe.Close,Ai=U.forwardRef(({className:e,...t},a)=>jsx(oe.Overlay,{ref:a,className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Ai.displayName=oe.Overlay.displayName;var Qo=U.forwardRef(({className:e,children:t,...a},r)=>jsxs(ql,{children:[jsx(Ai,{}),jsxs(oe.Content,{ref:r,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,jsxs(oe.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Qo.displayName=oe.Content.displayName;var Zl=({className:e,...t})=>jsx("div",{className:o("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Zl.displayName="DialogHeader";var Ql=({className:e,...t})=>jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ql.displayName="DialogFooter";var Jl=U.forwardRef(({className:e,...t},a)=>jsx(oe.Title,{ref:a,className:o("text-lg font-semibold leading-none tracking-tight",e),...t}));Jl.displayName=oe.Title.displayName;var ed=U.forwardRef(({className:e,...t},a)=>jsx(oe.Description,{ref:a,className:o("text-sm text-muted-foreground",e),...t}));ed.displayName=oe.Description.displayName;var Lx=cva("flex h-10 w-full border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),Jo=U.forwardRef(({className:e,type:t,radius:a,...r},n)=>jsx("input",{type:t,className:o(Lx({radius:a,className:e})),ref:n,...r}));Jo.displayName="Input";var Hx=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),za=U.forwardRef(({className:e,...t},a)=>jsx(zi.Root,{ref:a,className:o(Hx(),e),...t}));za.displayName=zi.Root.displayName;var da=U.forwardRef(({className:e,orientation:t="horizontal",decorative:a=true,...r},n)=>jsx(Bi.Root,{ref:n,decorative:a,orientation:t,className:o("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));da.displayName=Bi.Root.displayName;var id=U.forwardRef(({className:e,...t},a)=>jsx(co.Root,{className:o("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:a,children:jsx(co.Thumb,{className:o("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));id.displayName=co.Root.displayName;var Fx=cva("flex min-h-[80px] w-full border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"md"}}),ld=U.forwardRef(({className:e,radius:t,...a},r)=>jsx("textarea",{className:o(Fx({radius:t,className:e})),ref:r,...a}));ld.displayName="Textarea";var cd=cva("rounded-md bg-muted",{variants:{variant:{pulse:"animate-pulse",wave:"relative overflow-hidden before:absolute before:inset-0 before:-translate-x-full before:animate-shimmer before:bg-gradient-to-r before:from-transparent before:via-white/20 before:to-transparent",shimmer:"relative overflow-hidden before:absolute before:inset-0 before:-translate-x-full before:animate-shimmer before:bg-gradient-to-r before:from-transparent before:via-white/40 before:to-transparent",static:""}},defaultVariants:{variant:"pulse"}}),en=U.forwardRef(({className:e,variant:t,...a},r)=>jsx("div",{ref:r,className:o(cd({variant:t,className:e})),...a}));en.displayName="Skeleton";var _x=cva("relative flex shrink-0 overflow-hidden",{variants:{size:{xs:"h-6 w-6",sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12",xl:"h-14 w-14"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",radius:"full"}}),Ba=U.forwardRef(({className:e,size:t,radius:a,...r},n)=>jsx(Et.Root,{ref:n,className:o(_x({size:t,radius:a,className:e})),...r}));Ba.displayName=Et.Root.displayName;var br=U.forwardRef(({className:e,...t},a)=>jsx(Et.Image,{ref:a,className:o("aspect-square h-full w-full",e),...t}));br.displayName=Et.Image.displayName;var Fa=U.forwardRef(({className:e,...t},a)=>jsx(Et.Fallback,{ref:a,className:o("flex h-full w-full items-center justify-center bg-muted",e),...t}));Fa.displayName=Et.Fallback.displayName;var Oa=it.Provider,Ga=it.Root,Wa=it.Trigger,ca=U.forwardRef(({className:e,sideOffset:t=4,...a},r)=>jsx(it.Portal,{children:jsx(it.Content,{ref:r,sideOffset:t,className:o("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));ca.displayName=it.Content.displayName;var Oi=Y.Root,Yx=Y.Group,Gi=Y.Value,an=U.forwardRef(({className:e,children:t,...a},r)=>jsxs(Y.Trigger,{ref:r,className:o("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...a,children:[t,jsx(Y.Icon,{asChild:true,children:jsx(ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));an.displayName=Y.Trigger.displayName;var Wi=U.forwardRef(({className:e,...t},a)=>jsx(Y.ScrollUpButton,{ref:a,className:o("flex cursor-default items-center justify-center py-1",e),...t,children:jsx(ChevronUp,{className:"h-4 w-4"})}));Wi.displayName=Y.ScrollUpButton.displayName;var $i=U.forwardRef(({className:e,...t},a)=>jsx(Y.ScrollDownButton,{ref:a,className:o("flex cursor-default items-center justify-center py-1",e),...t,children:jsx(ChevronDown,{className:"h-4 w-4"})}));$i.displayName=Y.ScrollDownButton.displayName;var rn=U.forwardRef(({className:e,children:t,position:a="popper",...r},n)=>jsx(Y.Portal,{children:jsxs(Y.Content,{ref:n,className:o("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...r,children:[jsx(Wi,{}),jsx(Y.Viewport,{className:o("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),jsx($i,{})]})}));rn.displayName=Y.Content.displayName;var fd=U.forwardRef(({className:e,...t},a)=>jsx(Y.Label,{ref:a,className:o("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));fd.displayName=Y.Label.displayName;var on=U.forwardRef(({className:e,children:t,...a},r)=>jsxs(Y.Item,{ref:r,className:o("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(Y.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),jsx(Y.ItemText,{children:t})]}));on.displayName=Y.Item.displayName;var gd=U.forwardRef(({className:e,...t},a)=>jsx(Y.Separator,{ref:a,className:o("-mx-1 my-1 h-px bg-muted",e),...t}));gd.displayName=Y.Separator.displayName;var $a=_.Root,_a=_.Trigger,Zx=_.Group,Qx=_.Portal,Jx=_.Sub,ey=_.RadioGroup,bd=U.forwardRef(({className:e,inset:t,children:a,...r},n)=>jsxs(_.SubTrigger,{ref:n,className:o("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[a,jsx(ChevronRight,{className:"ml-auto"})]}));bd.displayName=_.SubTrigger.displayName;var vd=U.forwardRef(({className:e,...t},a)=>jsx(_.SubContent,{ref:a,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));vd.displayName=_.SubContent.displayName;var pa=U.forwardRef(({className:e,sideOffset:t=4,...a},r)=>jsx(_.Portal,{children:jsx(_.Content,{ref:r,sideOffset:t,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md 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-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));pa.displayName=_.Content.displayName;var xt=U.forwardRef(({className:e,inset:t,...a},r)=>jsx(_.Item,{ref:r,className:o("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));xt.displayName=_.Item.displayName;var hd=U.forwardRef(({className:e,children:t,checked:a,...r},n)=>jsxs(_.CheckboxItem,{ref:n,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...r,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(_.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),t]}));hd.displayName=_.CheckboxItem.displayName;var xd=U.forwardRef(({className:e,children:t,...a},r)=>jsxs(_.RadioItem,{ref:r,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(_.ItemIndicator,{children:jsx(Circle,{className:"h-2 w-2 fill-current"})})}),t]}));xd.displayName=_.RadioItem.displayName;var yd=U.forwardRef(({className:e,inset:t,...a},r)=>jsx(_.Label,{ref:r,className:o("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));yd.displayName=_.Label.displayName;var nn=U.forwardRef(({className:e,...t},a)=>jsx(_.Separator,{ref:a,className:o("-mx-1 my-1 h-px bg-muted",e),...t}));nn.displayName=_.Separator.displayName;var Rd=({className:e,...t})=>jsx("span",{className:o("ml-auto text-xs tracking-widest opacity-60",e),...t});Rd.displayName="DropdownMenuShortcut";var ve=st.Root,Re=st.Trigger,Ui=st.Anchor,ue=U.forwardRef(({className:e,align:t="center",sideOffset:a=4,...r},n)=>jsx(st.Portal,{children:jsx(st.Content,{ref:n,align:t,sideOffset:a,className:o("z-50 w-72 rounded-md 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-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",e),...r})}));ue.displayName=st.Content.displayName;var ty=lt.Root,Pd=U.forwardRef(({className:e,...t},a)=>jsx(lt.List,{ref:a,className:o("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Pd.displayName=lt.List.displayName;var Cd=U.forwardRef(({className:e,...t},a)=>jsx(lt.Trigger,{ref:a,className:o("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Cd.displayName=lt.Trigger.displayName;var Sd=U.forwardRef(({className:e,...t},a)=>jsx(lt.Content,{ref:a,className:o("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Sd.displayName=lt.Content.displayName;var po=oe.Root,oy=oe.Trigger,ny=oe.Close,Td=oe.Portal,Xi=U.forwardRef(({className:e,...t},a)=>jsx(oe.Overlay,{className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));Xi.displayName=oe.Overlay.displayName;var Md=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),vr=U.forwardRef(({side:e="right",className:t,children:a,...r},n)=>jsxs(Td,{children:[jsx(Xi,{}),jsxs(oe.Content,{ref:n,className:o(Md({side:e}),t),...r,children:[jsxs(oe.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));vr.displayName=oe.Content.displayName;var kd=({className:e,...t})=>jsx("div",{className:o("flex flex-col space-y-2 text-center sm:text-left",e),...t});kd.displayName="SheetHeader";var Dd=({className:e,...t})=>jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Dd.displayName="SheetFooter";var Vd=U.forwardRef(({className:e,...t},a)=>jsx(oe.Title,{ref:a,className:o("text-lg font-semibold text-foreground",e),...t}));Vd.displayName=oe.Title.displayName;var Ld=U.forwardRef(({className:e,...t},a)=>jsx(oe.Description,{ref:a,className:o("text-sm text-muted-foreground",e),...t}));Ld.displayName=oe.Description.displayName;var ly=({theme:e="system",...t})=>jsx(Toaster,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t});var dt=U.forwardRef(({className:e,children:t,...a},r)=>jsxs(Ue.Root,{ref:r,className:o("relative overflow-hidden",e),...a,children:[jsx(Ue.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),jsx(Zi,{}),jsx(Ue.Corner,{})]}));dt.displayName=Ue.Root.displayName;var Zi=U.forwardRef(({className:e,orientation:t="vertical",...a},r)=>jsx(Ue.ScrollAreaScrollbar,{ref:r,orientation:t,className:o("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:jsx(Ue.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Zi.displayName=Ue.ScrollAreaScrollbar.displayName;var fy=K.Root,gy=K.Trigger,by=K.Group,vy=K.Portal,hy=K.Sub,xy=K.RadioGroup,Id=U.forwardRef(({className:e,inset:t,children:a,...r},n)=>jsxs(K.SubTrigger,{ref:n,className:o("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...r,children:[a,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]}));Id.displayName=K.SubTrigger.displayName;var Ed=U.forwardRef(({className:e,...t},a)=>jsx(K.SubContent,{ref:a,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]",e),...t}));Ed.displayName=K.SubContent.displayName;var Hd=U.forwardRef(({className:e,...t},a)=>jsx(K.Portal,{children:jsx(K.Content,{ref:a,className:o("z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md 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-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]",e),...t})}));Hd.displayName=K.Content.displayName;var Ad=U.forwardRef(({className:e,inset:t,...a},r)=>jsx(K.Item,{ref:r,className:o("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...a}));Ad.displayName=K.Item.displayName;var zd=U.forwardRef(({className:e,children:t,checked:a,...r},n)=>jsxs(K.CheckboxItem,{ref:n,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...r,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(K.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),t]}));zd.displayName=K.CheckboxItem.displayName;var Bd=U.forwardRef(({className:e,children:t,...a},r)=>jsxs(K.RadioItem,{ref:r,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(K.ItemIndicator,{children:jsx(Circle,{className:"h-4 w-4 fill-current"})})}),t]}));Bd.displayName=K.RadioItem.displayName;var Fd=U.forwardRef(({className:e,inset:t,...a},r)=>jsx(K.Label,{ref:r,className:o("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...a}));Fd.displayName=K.Label.displayName;var Od=U.forwardRef(({className:e,...t},a)=>jsx(K.Separator,{ref:a,className:o("-mx-1 my-1 h-px bg-border",e),...t}));Od.displayName=K.Separator.displayName;var Gd=({className:e,...t})=>jsx("span",{className:o("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Gd.displayName="ContextMenuShortcut";var Wd=U.forwardRef(({className:e,...t},a)=>jsx(fa.Root,{className:o("grid gap-2",e),...t,ref:a}));Wd.displayName=fa.Root.displayName;var $d=U.forwardRef(({className:e,...t},a)=>jsx(fa.Item,{ref:a,className:o("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:jsx(fa.Indicator,{className:"flex items-center justify-center",children:jsx(Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}));$d.displayName=fa.Item.displayName;var dn=cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2",{variants:{variant:{solid:"bg-transparent hover:bg-muted data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",outline:"border border-input bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",ghost:"bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",soft:"bg-transparent hover:bg-primary/10 data-[state=on]:bg-primary/15 data-[state=on]:text-primary",surface:"bg-muted/50 hover:bg-muted data-[state=on]:bg-muted data-[state=on]:text-foreground"},size:{sm:"h-9 px-2.5 min-w-9",md:"h-10 px-3 min-w-10",lg:"h-11 px-5 min-w-11"}},defaultVariants:{variant:"solid",size:"md"}}),Kd=U.forwardRef(({className:e,variant:t,size:a,...r},n)=>jsx(es.Root,{ref:n,className:o(dn({variant:t,size:a,className:e})),...r}));Kd.displayName=es.Root.displayName;var Ud=U.createContext({size:"md",variant:"solid"}),Yd=U.forwardRef(({className:e,variant:t,size:a,children:r,...n},i)=>jsx(hr.Root,{ref:i,className:o("flex items-center justify-center gap-1",e),...n,children:jsx(Ud.Provider,{value:{variant:t,size:a},children:r})}));Yd.displayName=hr.Root.displayName;var jd=U.forwardRef(({className:e,children:t,variant:a,size:r,...n},i)=>{let s=U.useContext(Ud);return jsx(hr.Item,{ref:i,className:o(dn({variant:s.variant||a,size:s.size||r}),e),...n,children:t})});jd.displayName=hr.Item.displayName;var cn=U.forwardRef(({className:e,...t},a)=>jsxs(zt.Root,{ref:a,className:o("relative flex w-full touch-none select-none items-center",e),...t,children:[jsx(zt.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:jsx(zt.Range,{className:"absolute h-full bg-primary"})}),jsx(zt.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));cn.displayName=zt.Root.displayName;var Cy=Ye.Root,qd=U.forwardRef(({className:e,...t},a)=>jsx(Ye.Item,{ref:a,className:o("border-b",e),...t}));qd.displayName="AccordionItem";var Zd=U.forwardRef(({className:e,children:t,...a},r)=>jsx(Ye.Header,{className:"flex",children:jsxs(Ye.Trigger,{ref:r,className:o("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",e),...a,children:[t,jsx(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Zd.displayName=Ye.Trigger.displayName;var Qd=U.forwardRef(({className:e,children:t,...a},r)=>jsx(Ye.Content,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...a,children:jsx("div",{className:o("pb-4 pt-0",e),children:t})}));Qd.displayName=Ye.Content.displayName;var Ty=xr.Root,My=xr.CollapsibleTrigger,ky=xr.CollapsibleContent;var Dy=le.Root,Vy=le.Trigger,Jd=le.Portal,rs=U.forwardRef(({className:e,...t},a)=>jsx(le.Overlay,{className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));rs.displayName=le.Overlay.displayName;var ec=U.forwardRef(({className:e,...t},a)=>jsxs(Jd,{children:[jsx(rs,{}),jsx(le.Content,{ref:a,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));ec.displayName=le.Content.displayName;var tc=({className:e,...t})=>jsx("div",{className:o("flex flex-col space-y-2 text-center sm:text-left",e),...t});tc.displayName="AlertDialogHeader";var ac=({className:e,...t})=>jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ac.displayName="AlertDialogFooter";var rc=U.forwardRef(({className:e,...t},a)=>jsx(le.Title,{ref:a,className:o("text-lg font-semibold",e),...t}));rc.displayName=le.Title.displayName;var oc=U.forwardRef(({className:e,...t},a)=>jsx(le.Description,{ref:a,className:o("text-sm text-muted-foreground",e),...t}));oc.displayName=le.Description.displayName;var nc=U.forwardRef(({className:e,...t},a)=>jsx(le.Action,{ref:a,className:o(Te(),e),...t}));nc.displayName=le.Action.displayName;var ic=U.forwardRef(({className:e,...t},a)=>jsx(le.Cancel,{ref:a,className:o(Te({variant:"bordered"}),"mt-2 sm:mt-0",e),...t}));ic.displayName=le.Cancel.displayName;var pn=U.forwardRef(({className:e,value:t,...a},r)=>jsx(go.Root,{ref:r,className:o("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:jsx(go.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));pn.displayName=go.Root.displayName;var Iy=Ya.Root,Ey=Ya.Trigger,cc=U.forwardRef(({className:e,align:t="center",sideOffset:a=4,...r},n)=>jsx(Ya.Content,{ref:n,align:t,sideOffset:a,className:o("z-50 w-64 rounded-md 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-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));cc.displayName=Ya.Content.displayName;var mc=U.forwardRef(({...e},t)=>jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));mc.displayName="Breadcrumb";var pc=U.forwardRef(({className:e,...t},a)=>jsx("ol",{ref:a,className:o("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));pc.displayName="BreadcrumbList";var uc=U.forwardRef(({className:e,...t},a)=>jsx("li",{ref:a,className:o("inline-flex items-center gap-1.5",e),...t}));uc.displayName="BreadcrumbItem";var fc=U.forwardRef(({asChild:e,className:t,...a},r)=>jsx(e?Slot:"a",{ref:r,className:o("transition-colors hover:text-foreground",t),...a}));fc.displayName="BreadcrumbLink";var gc=U.forwardRef(({className:e,...t},a)=>jsx("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:o("font-normal text-foreground",e),...t}));gc.displayName="BreadcrumbPage";var bc=({children:e,className:t,...a})=>jsx("li",{role:"presentation","aria-hidden":"true",className:o("[&>svg]:h-3.5 [&>svg]:w-3.5",t),...a,children:e??jsx(ChevronRight,{})});bc.displayName="BreadcrumbSeparator";var vc=({className:e,...t})=>jsxs("span",{role:"presentation","aria-hidden":"true",className:o("flex h-9 w-9 items-center justify-center",e),...t,children:[jsx(MoreHorizontal,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"More"})]});vc.displayName="BreadcrumbEllipsis";var Oy=hc.Root;var xc=U.forwardRef(({className:e,children:t,...a},r)=>jsxs(fe.Root,{ref:r,className:o("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...a,children:[t,jsx(os,{})]}));xc.displayName=fe.Root.displayName;var yc=U.forwardRef(({className:e,...t},a)=>jsx(fe.List,{ref:a,className:o("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));yc.displayName=fe.List.displayName;var $y=fe.Item,Rc=cva("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),wc=U.forwardRef(({className:e,children:t,...a},r)=>jsxs(fe.Trigger,{ref:r,className:o(Rc(),"group",e),...a,children:[t," ",jsx(ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));wc.displayName=fe.Trigger.displayName;var Nc=U.forwardRef(({className:e,...t},a)=>jsx(fe.Content,{ref:a,className:o("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto",e),...t}));Nc.displayName=fe.Content.displayName;var _y=fe.Link,os=U.forwardRef(({className:e,...t},a)=>jsx("div",{className:o("absolute left-0 top-full flex justify-center"),children:jsx(fe.Viewport,{className:o("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:a,...t})}));os.displayName=fe.Viewport.displayName;var Pc=U.forwardRef(({className:e,...t},a)=>jsx(fe.Indicator,{ref:a,className:o("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));Pc.displayName=fe.Indicator.displayName;var Tc=({shouldScaleBackground:e=true,...t})=>jsx(Drawer.Root,{shouldScaleBackground:e,...t});Tc.displayName="Drawer";var Ky=Drawer.Trigger,Mc=Drawer.Portal,Uy=Drawer.Close,ns=U.forwardRef(({className:e,...t},a)=>jsx(Drawer.Overlay,{ref:a,className:o("fixed inset-0 z-50 bg-black/80",e),...t}));ns.displayName=Drawer.Overlay.displayName;var kc=U.forwardRef(({className:e,children:t,...a},r)=>jsxs(Mc,{children:[jsx(ns,{}),jsxs(Drawer.Content,{ref:r,className:o("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...a,children:[jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));kc.displayName="DrawerContent";var Dc=({className:e,...t})=>jsx("div",{className:o("grid gap-1.5 p-4 text-center sm:text-left",e),...t});Dc.displayName="DrawerHeader";var Vc=({className:e,...t})=>jsx("div",{className:o("mt-auto flex flex-col gap-2 p-4",e),...t});Vc.displayName="DrawerFooter";var Lc=U.forwardRef(({className:e,...t},a)=>jsx(Drawer.Title,{ref:a,className:o("text-lg font-semibold leading-none tracking-tight",e),...t}));Lc.displayName=Drawer.Title.displayName;var Ic=U.forwardRef(({className:e,...t},a)=>jsx(Drawer.Description,{ref:a,className:o("text-sm text-muted-foreground",e),...t}));Ic.displayName=Drawer.Description.displayName;var Ec=U.forwardRef(({className:e,...t},a)=>jsx("div",{className:"relative w-full overflow-auto",children:jsx("table",{ref:a,className:o("w-full caption-bottom text-sm",e),...t})}));Ec.displayName="Table";var Hc=U.forwardRef(({className:e,...t},a)=>jsx("thead",{ref:a,className:o("[&_tr]:border-b",e),...t}));Hc.displayName="TableHeader";var Ac=U.forwardRef(({className:e,...t},a)=>jsx("tbody",{ref:a,className:o("[&_tr:last-child]:border-0",e),...t}));Ac.displayName="TableBody";var zc=U.forwardRef(({className:e,...t},a)=>jsx("tfoot",{ref:a,className:o("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));zc.displayName="TableFooter";var Bc=U.forwardRef(({className:e,...t},a)=>jsx("tr",{ref:a,className:o("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Bc.displayName="TableRow";var Fc=U.forwardRef(({className:e,...t},a)=>jsx("th",{ref:a,className:o("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Fc.displayName="TableHead";var Oc=U.forwardRef(({className:e,...t},a)=>jsx("td",{ref:a,className:o("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Oc.displayName="TableCell";var Gc=U.forwardRef(({className:e,...t},a)=>jsx("caption",{ref:a,className:o("mt-4 text-sm text-muted-foreground",e),...t}));Gc.displayName="TableCaption";var $c=cva("animate-spin text-muted-foreground",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-6 w-6",xl:"h-8 w-8"}},defaultVariants:{size:"md"}}),_c=U.forwardRef(({className:e,size:t,...a},r)=>jsx(Loader2,{ref:r,className:o($c({size:t,className:e})),...a}));_c.displayName="Spinner";function Rr({className:e,classNames:t,showOutsideDays:a=true,...r}){return jsx(DayPicker,{showOutsideDays:a,className:o("p-3",e),classNames:{months:"flex flex-col sm:flex-row gap-4",month:"flex flex-col gap-4",month_caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",button_previous:o(Te({variant:"bordered"}),"absolute left-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),button_next:o(Te({variant:"bordered"}),"absolute right-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),month_grid:"w-full border-collapse space-y-1",weekdays:"flex",weekday:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",week:"flex w-full mt-2",day:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day_button:o(Te({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),range_end:"day-range-end",selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",today:"bg-accent text-accent-foreground",outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",disabled:"text-muted-foreground opacity-50",range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...t},components:{Chevron:({orientation:n})=>n==="left"?jsx(ChevronLeft,{className:"h-4 w-4"}):jsx(ChevronRight,{className:"h-4 w-4"})},...r})}Rr.displayName="Calendar";var Kc=({className:e,...t})=>jsx("nav",{role:"navigation","aria-label":"pagination",className:o("mx-auto flex w-full justify-center",e),...t});Kc.displayName="Pagination";var Uc=U.forwardRef(({className:e,...t},a)=>jsx("ul",{ref:a,className:o("flex flex-row items-center gap-1",e),...t}));Uc.displayName="PaginationContent";var Yc=U.forwardRef(({className:e,...t},a)=>jsx("li",{ref:a,className:o("",e),...t}));Yc.displayName="PaginationItem";var un=({className:e,isActive:t,size:a="icon",...r})=>jsx("a",{"aria-current":t?"page":void 0,className:o(Te({variant:t?"bordered":"ghost",size:a}),e),...r});un.displayName="PaginationLink";var jc=({className:e,...t})=>jsxs(un,{"aria-label":"Go to previous page",size:"md",className:o("gap-1 pl-2.5",e),...t,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{children:"Previous"})]});jc.displayName="PaginationPrevious";var Xc=({className:e,...t})=>jsxs(un,{"aria-label":"Go to next page",size:"md",className:o("gap-1 pr-2.5",e),...t,children:[jsx("span",{children:"Next"}),jsx(ChevronRight,{className:"h-4 w-4"})]});Xc.displayName="PaginationNext";var qc=({className:e,...t})=>jsxs("span",{"aria-hidden":true,className:o("flex h-9 w-9 items-center justify-center",e),...t,children:[jsx(MoreHorizontal,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"More pages"})]});qc.displayName="PaginationEllipsis";var ds=U.forwardRef(({className:e,...t},a)=>jsx(Command,{ref:a,className:o("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));ds.displayName=Command.displayName;var rR=({children:e,...t})=>jsx(Hi,{...t,children:jsx(Qo,{className:"overflow-hidden p-0 shadow-lg",children:jsx(ds,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Zc=U.forwardRef(({className:e,...t},a)=>jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[jsx(Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsx(Command.Input,{ref:a,className:o("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Zc.displayName=Command.Input.displayName;var Qc=U.forwardRef(({className:e,...t},a)=>jsx(Command.List,{ref:a,className:o("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Qc.displayName=Command.List.displayName;var Jc=U.forwardRef((e,t)=>jsx(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Jc.displayName=Command.Empty.displayName;var em=U.forwardRef(({className:e,...t},a)=>jsx(Command.Group,{ref:a,className:o("overflow-hidden p-1 text-foreground [&_[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-muted-foreground",e),...t}));em.displayName=Command.Group.displayName;var tm=U.forwardRef(({className:e,...t},a)=>jsx(Command.Separator,{ref:a,className:o("-mx-1 h-px bg-border",e),...t}));tm.displayName=Command.Separator.displayName;var am=U.forwardRef(({className:e,...t},a)=>jsx(Command.Item,{ref:a,className:o("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));am.displayName=Command.Item.displayName;var rm=({className:e,...t})=>jsx("span",{className:o("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});rm.displayName="CommandShortcut";var om=U.forwardRef(({className:e,showToggle:t=true,disabled:a,...r},n)=>{let[i,s]=U.useState(false);return jsxs("div",{className:"relative",children:[jsx("input",{type:i?"text":"password",className:o("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t&&"pr-10",e),ref:n,disabled:a,...r}),t&&jsx(O,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-10 w-10 px-3 hover:bg-transparent",onClick:()=>s(!i),disabled:a,tabIndex:-1,"aria-label":i?"Hide password":"Show password",children:i?jsx(EyeOff,{className:"h-4 w-4 text-muted-foreground"}):jsx(Eye,{className:"h-4 w-4 text-muted-foreground"})})]})});om.displayName="PasswordInput";var nm=U.forwardRef(({className:e,showButtons:t=true,step:a=1,min:r,max:n,value:i,defaultValue:s,onChange:l,disabled:d,...m},u)=>{let[c,g]=U.useState(s),p=i!==void 0,v=p?i:c,N=x=>{x!==void 0&&(r!==void 0&&x<r&&(x=r),n!==void 0&&x>n&&(x=n)),p||g(x),l?.(x);},b=()=>{N((v??0)+a);},h=()=>{N((v??0)-a);},w=x=>{let S=x.target.value;if(S==="")N(void 0);else {let k=parseFloat(S);isNaN(k)||N(k);}},f=x=>{x.key==="ArrowUp"?(x.preventDefault(),b()):x.key==="ArrowDown"&&(x.preventDefault(),h());},y=r===void 0||(v??0)>r,P=n===void 0||(v??0)<n;return jsxs("div",{className:"relative flex items-center",children:[t&&jsx(O,{type:"button",variant:"bordered",size:"icon",className:"h-10 w-10 rounded-r-none border-r-0",onClick:h,disabled:d||!y,tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:"h-4 w-4"})}),jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:o("flex h-10 w-full bg-background px-3 py-2 text-sm text-center ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t?"border-y border-input rounded-none":"border border-input rounded-md",e),ref:u,value:v??"",onChange:w,onKeyDown:f,disabled:d,...m}),t&&jsx(O,{type:"button",variant:"bordered",size:"icon",className:"h-10 w-10 rounded-l-none border-l-0",onClick:b,disabled:d||!P,tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:"h-4 w-4"})})]})});nm.displayName="NumberInput";var im=U.forwardRef(({options:e,value:t,defaultValue:a=[],onValueChange:r,placeholder:n="Select items...",searchPlaceholder:i="Search...",emptyText:s="No items found.",maxItems:l,showCount:d=false,disabled:m=false,className:u},c)=>{let[g,p]=U.useState(false),[v,N]=U.useState(""),[b,h]=U.useState(a),w=t!==void 0,f=w?t:b,y=R=>{w||h(R),r?.(R);},P=R=>{let C=f.includes(R)?f.filter(D=>D!==R):l&&f.length>=l?f:[...f,R];y(C);},x=R=>{y(f.filter(C=>C!==R));},S=()=>{y([]);},k=e.filter(R=>f.includes(R.value)),M=e.filter(R=>R.label.toLowerCase().includes(v.toLowerCase()));return jsxs(ve,{open:g,onOpenChange:p,children:[jsx(Re,{asChild:true,children:jsxs(O,{ref:c,variant:"bordered",role:"combobox","aria-expanded":g,disabled:m,className:o("w-full justify-between h-auto min-h-10",f.length>0?"px-2 py-1.5":"px-3 py-2",u),children:[f.length===0?jsx("span",{className:"text-muted-foreground font-normal",children:n}):d?jsxs("span",{className:"font-normal",children:[f.length," selected"]}):jsx("div",{className:"flex flex-wrap gap-1",children:k.map(R=>jsxs(no,{variant:"soft",className:"mr-1",children:[R.label,jsx("button",{type:"button",className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",onKeyDown:C=>{C.key==="Enter"&&(C.preventDefault(),C.stopPropagation(),x(R.value));},onMouseDown:C=>{C.preventDefault(),C.stopPropagation();},onClick:C=>{C.preventDefault(),C.stopPropagation(),x(R.value);},children:jsx(X,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},R.value))}),jsx(ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),jsx(ue,{className:"w-[--radix-popover-trigger-width] p-0",align:"start",children:jsxs(Command,{className:"overflow-hidden rounded-md",children:[jsxs("div",{className:"flex items-center border-b px-3",children:[jsx(Command.Input,{value:v,onValueChange:N,placeholder:i,className:"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),f.length>0&&jsx("button",{type:"button",onClick:S,className:"ml-2 text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),jsxs(Command.List,{className:"max-h-[200px] overflow-y-auto p-1",children:[M.length===0&&jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:s}),M.map(R=>{let C=f.includes(R.value),D=R.disabled||!C&&l!==void 0&&f.length>=l;return jsxs(Command.Item,{value:R.value,disabled:D,onSelect:()=>P(R.value),className:o("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground"),children:[jsx("div",{className:o("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",C?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:jsx(Check,{className:"h-3 w-3"})}),R.label]},R.value)})]})]})})]})});im.displayName="MultiSelect";var sm=U.forwardRef(({options:e,value:t,defaultValue:a="",onValueChange:r,placeholder:n="Select...",searchPlaceholder:i="Search...",emptyText:s="No results found.",disabled:l=false,clearable:d=false,className:m},u)=>{let[c,g]=U.useState(false),[p,v]=U.useState(""),[N,b]=U.useState(a),h=t!==void 0,w=h?t:N,f=S=>{h||b(S),r?.(S);},y=S=>{f(d&&w===S?"":S),g(false),v("");},P=e.find(S=>S.value===w),x=e.filter(S=>S.label.toLowerCase().includes(p.toLowerCase()));return jsxs(ve,{open:c,onOpenChange:g,children:[jsx(Re,{asChild:true,children:jsxs(O,{ref:u,variant:"bordered",role:"combobox","aria-expanded":c,disabled:l,className:o("w-full justify-between font-normal",!w&&"text-muted-foreground",m),children:[P?P.label:n,jsx(ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),jsx(ue,{className:"w-[--radix-popover-trigger-width] p-0",align:"start",children:jsxs(Command,{className:"overflow-hidden rounded-md",children:[jsx("div",{className:"flex items-center border-b px-3",children:jsx(Command.Input,{value:p,onValueChange:v,placeholder:i,className:"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"})}),jsxs(Command.List,{className:"max-h-[200px] overflow-y-auto p-1",children:[x.length===0&&jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:s}),x.map(S=>jsxs(Command.Item,{value:S.value,disabled:S.disabled,onSelect:()=>y(S.value),className:o("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground"),children:[jsx(Check,{className:o("mr-2 h-4 w-4",w===S.value?"opacity-100":"opacity-0")}),S.label]},S.value))]})]})})]})});sm.displayName="Combobox";var dm=U.forwardRef(({value:e,defaultValue:t,onValueChange:a,placeholder:r="Pick a date",dateFormat:n="PPP",disabled:i=false,minDate:s,maxDate:l,className:d},m)=>{let[u,c]=U.useState(false),[g,p]=U.useState(t),v=e!==void 0,N=v?e:g,b=h=>{v||p(h),a?.(h),c(false);};return jsxs(ve,{open:u,onOpenChange:c,children:[jsx(Re,{asChild:true,children:jsxs(O,{ref:m,variant:"bordered",disabled:i,className:o("w-full justify-start text-left font-normal",!N&&"text-muted-foreground",d),children:[jsx(Calendar,{className:"mr-2 h-4 w-4"}),N?format(N,n):r]})}),jsx(ue,{className:"w-auto p-0",align:"start",children:jsx(Rr,{mode:"single",selected:N,onSelect:b,disabled:h=>!!(s&&h<s||l&&h>l),initialFocus:true})})]})});dm.displayName="DatePicker";var um=cva("flex -space-x-2",{variants:{size:{sm:"-space-x-1.5",md:"-space-x-2",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),cm=cva("border-2 border-background ring-0",{variants:{size:{sm:"h-6 w-6 text-xs",md:"h-8 w-8 text-sm",lg:"h-10 w-10 text-base"}},defaultVariants:{size:"md"}}),fm=U.forwardRef(({className:e,items:t,max:a=5,size:r,showTooltips:n=false,...i},s)=>{let l=t.slice(0,a),d=t.length-a,m=(c,g)=>{let p=jsxs(Ba,{className:o(cm({size:r})),children:[c.src&&jsx(br,{src:c.src,alt:c.alt||""}),jsx(Fa,{className:"text-xs",children:c.fallback||c.alt?.charAt(0)?.toUpperCase()||"?"})]},g);return n&&c.alt?jsxs(Ga,{children:[jsx(Wa,{asChild:true,children:p}),jsx(ca,{children:c.alt})]},g):p},u=jsxs("div",{ref:s,className:o(um({size:r,className:e})),...i,children:[l.map((c,g)=>m(c,g)),d>0&&jsx(Ba,{className:o(cm({size:r})),children:jsxs(Fa,{className:"bg-muted text-muted-foreground",children:["+",d]})})]});return n?jsx(Oa,{delayDuration:300,children:u}):u});fm.displayName="AvatarGroup";var gm=cva("flex gap-0.5",{variants:{size:{sm:"[&_svg]:h-4 [&_svg]:w-4",md:"[&_svg]:h-5 [&_svg]:w-5",lg:"[&_svg]:h-6 [&_svg]:w-6"}},defaultVariants:{size:"md"}}),bm=U.forwardRef(({className:e,value:t,defaultValue:a=0,onValueChange:r,max:n=5,size:i,icon:s="star",allowHalf:l=false,readOnly:d=false,disabled:m=false,filledColor:u,emptyColor:c,...g},p)=>{let[v,N]=U.useState(a),[b,h]=U.useState(null),w=t!==void 0,f=w?t:v,y=b!==null?b:f,P=T=>{d||m||(w||N(T),r?.(T));},x=(T,I=false)=>{let L=l&&I?T+.5:T+1;P(L);},S=(T,I)=>{if(d||m)return;let L=T.currentTarget.getBoundingClientRect(),V=l&&T.clientX<L.left+L.width/2;h(V?I+.5:I+1);},k=()=>{h(null);},M=s==="heart"?Heart:Star,R=T=>y>=T+1?"full":y>=T+.5?"half":"empty",C=u?{color:u,fill:u}:{},D=c?{color:c}:{};return jsx("div",{ref:p,className:o(gm({size:i,className:e}),m&&"opacity-50 cursor-not-allowed"),onMouseLeave:k,role:"radiogroup","aria-label":"Rating",...g,children:Array.from({length:n},(T,I)=>{let L=R(I);return jsxs("button",{type:"button",className:o("relative focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",!d&&!m&&"cursor-pointer hover:scale-110 transition-transform"),onClick:V=>{let E=V.currentTarget.getBoundingClientRect(),A=l&&V.clientX<E.left+E.width/2;x(I,A);},onMouseMove:V=>S(V,I),disabled:m||d,"aria-label":`Rate ${I+1} out of ${n}`,role:"radio","aria-checked":f===I+1,children:[jsx(M,{className:o("text-muted-foreground/30",L!=="empty"&&"absolute inset-0"),style:L==="empty"?D:void 0}),L!=="empty"&&jsx(M,{className:o("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",L==="half"&&"clip-path-half"),style:{...C,clipPath:L==="half"?"inset(0 50% 0 0)":void 0}})]},I)})})});bm.displayName="Rating";var PR="16rem",CR="18rem",SR="3rem",TR="b",vm=U.createContext(null);function wo(){let e=U.useContext(vm);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}var hm=U.forwardRef(({defaultOpen:e=true,open:t,onOpenChange:a,className:r,style:n,children:i,...s},l)=>{let[d,m]=U.useState(false),[u,c]=U.useState(false),[g,p]=U.useState(e),v=t??g,N=U.useCallback(f=>{let y=typeof f=="function"?f(v):f;a?a(y):p(y);},[a,v]);U.useEffect(()=>{let f=()=>{m(window.innerWidth<768);};return f(),window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)},[]);let b=U.useCallback(()=>d?c(f=>!f):N(f=>!f),[d,N,c]);U.useEffect(()=>{let f=y=>{y.key===TR&&(y.metaKey||y.ctrlKey)&&(y.preventDefault(),b());};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[b]);let h=v?"expanded":"collapsed",w=U.useMemo(()=>({state:h,open:v,setOpen:N,isMobile:d,openMobile:u,setOpenMobile:c,toggleSidebar:b}),[h,v,N,d,u,c,b]);return jsx(vm.Provider,{value:w,children:jsx(Oa,{delayDuration:0,children:jsx("div",{ref:l,style:{"--sidebar-width":PR,"--sidebar-width-icon":SR,...n},className:o("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),...s,children:i})})})});hm.displayName="SidebarProvider";var xm=U.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:r,children:n,...i},s)=>{let{isMobile:l,state:d,openMobile:m,setOpenMobile:u}=wo();return a==="none"?jsx("div",{ref:s,className:o("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),...i,children:n}):l?jsx(po,{open:m,onOpenChange:u,children:jsx(vr,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":CR},side:e,children:jsx("div",{className:"flex h-full w-full flex-col",children:n})})}):jsxs("div",{ref:s,className:"group peer hidden md:block text-sidebar-foreground","data-state":d,"data-collapsible":d==="collapsed"?a:"","data-variant":t,"data-side":e,children:[jsx("div",{className:o("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),jsx("div",{className:o("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...i,children:jsx("div",{"data-sidebar":"sidebar",className:o("flex h-full w-full flex-col bg-sidebar",t==="floating"&&"overflow-hidden rounded-lg border border-sidebar-border shadow-sm",t==="inset"&&"overflow-hidden rounded-lg border border-sidebar-border"),children:n})})]})});xm.displayName="Sidebar";var ym=U.forwardRef(({className:e,onClick:t,...a},r)=>{let{toggleSidebar:n}=wo();return jsxs(O,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:o("h-7 w-7",e),onClick:i=>{t?.(i),n();},...a,children:[jsx(PanelLeft,{}),jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});ym.displayName="SidebarTrigger";var Rm=U.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:r}=wo();return jsx("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:o("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Rm.displayName="SidebarRail";var wm=U.forwardRef(({className:e,...t},a)=>jsx("main",{ref:a,className:o("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));wm.displayName="SidebarInset";var Nm=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,"data-sidebar":"header",className:o("flex flex-col gap-2 p-2",e),...t}));Nm.displayName="SidebarHeader";var Pm=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,"data-sidebar":"footer",className:o("flex flex-col gap-2 p-2",e),...t}));Pm.displayName="SidebarFooter";var Cm=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,"data-sidebar":"separator",className:o("mx-2 h-px w-auto bg-sidebar-border",e),...t}));Cm.displayName="SidebarSeparator";var Sm=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,"data-sidebar":"content",className:o("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Sm.displayName="SidebarContent";var Tm=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,"data-sidebar":"group",className:o("relative flex w-full min-w-0 flex-col p-2",e),...t}));Tm.displayName="SidebarGroup";var Mm=U.forwardRef(({className:e,asChild:t=false,...a},r)=>jsx(t?Slot:"div",{ref:r,"data-sidebar":"group-label",className:o("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...a}));Mm.displayName="SidebarGroupLabel";var km=U.forwardRef(({className:e,asChild:t=false,...a},r)=>jsx(t?Slot:"button",{ref:r,"data-sidebar":"group-action",className:o("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...a}));km.displayName="SidebarGroupAction";var Dm=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,"data-sidebar":"group-content",className:o("w-full text-sm",e),...t}));Dm.displayName="SidebarGroupContent";var Vm=U.forwardRef(({className:e,...t},a)=>jsx("ul",{ref:a,"data-sidebar":"menu",className:o("flex w-full min-w-0 flex-col gap-1",e),...t}));Vm.displayName="SidebarMenu";var Lm=U.forwardRef(({className:e,...t},a)=>jsx("li",{ref:a,"data-sidebar":"menu-item",className:o("group/menu-item relative",e),...t}));Lm.displayName="SidebarMenuItem";var Im=cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{solid:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]",ghost:"hover:bg-sidebar-accent/50 hover:text-sidebar-accent-foreground",soft:"hover:bg-primary/10 hover:text-primary",surface:"bg-sidebar-accent/30 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"},size:{sm:"h-7 text-xs",md:"h-8 text-sm",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"solid",size:"md"}}),Em=U.forwardRef(({asChild:e=false,isActive:t=false,variant:a="solid",size:r="md",tooltip:n,className:i,...s},l)=>{let d=e?Slot:"button",{isMobile:m,state:u}=wo(),c=jsx(d,{ref:l,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:o(Im({variant:a,size:r}),i),...s});return n?(typeof n=="string"&&(n={children:n}),jsxs(Ga,{children:[jsx(Wa,{asChild:true,children:c}),jsx(ca,{side:"right",align:"center",hidden:u!=="collapsed"||m,...n})]})):c});Em.displayName="SidebarMenuButton";var Hm=U.forwardRef(({className:e,asChild:t=false,showOnHover:a=false,...r},n)=>jsx(t?Slot:"button",{ref:n,"data-sidebar":"menu-action",className:o("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r}));Hm.displayName="SidebarMenuAction";var Am=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,"data-sidebar":"menu-badge",className:o("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));Am.displayName="SidebarMenuBadge";var zm=U.forwardRef(({className:e,showIcon:t=false,...a},r)=>{let n=U.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:o("rounded-md h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&jsx("div",{className:"size-4 rounded-md bg-sidebar-accent animate-pulse"}),jsx("div",{className:"h-4 flex-1 max-w-[--skeleton-width] bg-sidebar-accent animate-pulse rounded-md",style:{"--skeleton-width":n}})]})});zm.displayName="SidebarMenuSkeleton";var Bm=U.forwardRef(({className:e,...t},a)=>jsx("ul",{ref:a,"data-sidebar":"menu-sub",className:o("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));Bm.displayName="SidebarMenuSub";var Fm=U.forwardRef(({...e},t)=>jsx("li",{ref:t,...e}));Fm.displayName="SidebarMenuSubItem";var Om=U.forwardRef(({asChild:e=false,size:t="md",isActive:a,className:r,...n},i)=>jsx(e?Slot:"a",{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:o("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...n}));Om.displayName="SidebarMenuSubButton";var $m=cva("inline-flex items-center justify-center gap-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"border-transparent text-primary-foreground",outline:"border bg-transparent",ghost:"border-transparent bg-transparent",soft:"border-transparent",surface:"border-transparent bg-muted text-muted-foreground"},color:{primary:"",secondary:"",success:"",warning:"",danger:"",info:""},size:{sm:"h-6 px-2 text-xs",md:"h-7 px-2.5 text-sm",lg:"h-8 px-3 text-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},clickable:{true:"cursor-pointer",false:""}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"solid",color:"success",className:"bg-success hover:bg-success/90"},{variant:"solid",color:"warning",className:"bg-warning text-warning-foreground hover:bg-warning/90"},{variant:"solid",color:"danger",className:"bg-danger hover:bg-danger/90"},{variant:"solid",color:"info",className:"bg-info hover:bg-info/90"},{variant:"outline",color:"primary",className:"border-primary text-primary hover:bg-primary/10"},{variant:"outline",color:"secondary",className:"border-secondary text-secondary-foreground hover:bg-secondary/10"},{variant:"outline",color:"success",className:"border-success text-success hover:bg-success/10"},{variant:"outline",color:"warning",className:"border-warning text-warning hover:bg-warning/10"},{variant:"outline",color:"danger",className:"border-danger text-danger hover:bg-danger/10"},{variant:"outline",color:"info",className:"border-info text-info hover:bg-info/10"},{variant:"ghost",color:"primary",className:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"secondary",className:"text-secondary-foreground hover:bg-secondary"},{variant:"ghost",color:"success",className:"text-success hover:bg-success/10"},{variant:"ghost",color:"warning",className:"text-warning hover:bg-warning/10"},{variant:"ghost",color:"danger",className:"text-danger hover:bg-danger/10"},{variant:"ghost",color:"info",className:"text-info hover:bg-info/10"},{variant:"soft",color:"primary",className:"bg-primary/15 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"soft",color:"success",className:"bg-success/15 text-success hover:bg-success/20"},{variant:"soft",color:"warning",className:"bg-warning/15 text-warning hover:bg-warning/20"},{variant:"soft",color:"danger",className:"bg-danger/15 text-danger hover:bg-danger/20"},{variant:"soft",color:"info",className:"bg-info/15 text-info hover:bg-info/20"}],defaultVariants:{variant:"solid",color:"primary",size:"md",radius:"full",clickable:false}}),kR=cva("ml-1 rounded-full p-0.5 transition-colors hover:bg-black/10 dark:hover:bg-white/10",{variants:{size:{sm:"[&_svg]:size-3",md:"[&_svg]:size-3.5",lg:"[&_svg]:size-4"}},defaultVariants:{size:"md"}}),_m=U.forwardRef(({className:e,variant:t,color:a,size:r,radius:n,clickable:i,startContent:s,endContent:l,closable:d,onClose:m,disabled:u,avatar:c,children:g,onClick:p,...v},N)=>{let b=i||!!p,h=w=>{w.stopPropagation(),m?.();};return jsxs("div",{ref:N,role:b?"button":void 0,tabIndex:b&&!u?0:void 0,"aria-disabled":u,onClick:u?void 0:p,onKeyDown:b&&!u?w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),p?.(w));}:void 0,className:o($m({variant:t,color:a,size:r,radius:n,clickable:b}),u&&"opacity-50 cursor-not-allowed",e),...v,children:[c&&jsx("span",{className:"-ml-1 [&>*]:size-5 [&>*]:rounded-full",children:c}),s&&jsx("span",{className:"shrink-0",children:s}),jsx("span",{className:"truncate",children:g}),l&&jsx("span",{className:"shrink-0",children:l}),d&&jsx("button",{type:"button","aria-label":"Remove",onClick:h,disabled:u,className:o(kR({size:r})),children:jsx(X,{})})]})});_m.displayName="Chip";var HR=({className:e,direction:t="horizontal",...a})=>jsx(Group,{orientation:t,className:o("flex h-full w-full data-[orientation=vertical]:flex-col",e),...a}),AR=Panel,zR=({withHandle:e,className:t,...a})=>jsx(Separator,{className:o("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-1 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:-translate-y-1/2 data-[orientation=vertical]:after:translate-x-0 [&[data-orientation=vertical]>div]:rotate-90",t),...a,children:e&&jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:jsx(GripVertical,{className:"h-2.5 w-2.5"})})});var Ym=cva("inline-flex items-center gap-1",{variants:{size:{sm:"[&>span]:h-1 [&>span]:w-1",md:"[&>span]:h-1.5 [&>span]:w-1.5",lg:"[&>span]:h-2 [&>span]:w-2",xl:"[&>span]:h-3 [&>span]:w-3"}},defaultVariants:{size:"md"}}),jm=U.forwardRef(({className:e,size:t,count:a=3,...r},n)=>jsx("span",{ref:n,role:"status","aria-label":"Loading",className:o(Ym({size:t,className:e})),...r,children:Array.from({length:a}).map((i,s)=>jsx("span",{className:"rounded-full bg-current animate-dots-bounce",style:{animationDelay:`${s*.16}s`}},s))}));jm.displayName="Dots";var qm=cva("",{variants:{size:{sm:"h-4 w-4",md:"h-8 w-8",lg:"h-12 w-12",xl:"h-16 w-16"}},defaultVariants:{size:"md"}}),Zm=U.forwardRef(({className:e,size:t,value:a,strokeWidth:r=4,showValue:n=false,label:i,...s},l)=>{let d=a===void 0,m=50-r/2,u=2*Math.PI*m,c=d?0:u-Math.min(100,Math.max(0,a))/100*u;return jsxs("svg",{ref:l,viewBox:"0 0 100 100",className:o(qm({size:t,className:e}),d&&"animate-spin"),role:"progressbar","aria-valuenow":d?void 0:a,"aria-valuemin":0,"aria-valuemax":100,...s,children:[jsx("circle",{cx:"50",cy:"50",r:m,fill:"none",stroke:"currentColor",strokeWidth:r,className:"text-muted opacity-20"}),jsx("circle",{cx:"50",cy:"50",r:m,fill:"none",stroke:"currentColor",strokeWidth:r,strokeLinecap:"round",strokeDasharray:u,strokeDashoffset:d?u*.75:c,className:"text-primary transition-[stroke-dashoffset] duration-300 ease-in-out",style:{transformOrigin:"center",transform:"rotate(-90deg)"}}),n&&!d&&jsx("text",{x:"50",y:"50",textAnchor:"middle",dominantBaseline:"central",className:"fill-current text-[0.65rem] font-medium",children:i??`${Math.round(a)}%`})]})});Zm.displayName="CircularProgress";var Qm=U.createContext(null),$R=()=>{let e=U.useContext(Qm);if(!e)throw new Error("OTP components must be used within InputOTP");return e},Jm=cva("flex items-center gap-2 has-[:disabled]:opacity-50",{variants:{size:{sm:"[&_[data-otp-slot]]:h-8 [&_[data-otp-slot]]:w-8 [&_[data-otp-slot]]:text-xs",md:"[&_[data-otp-slot]]:h-10 [&_[data-otp-slot]]:w-10 [&_[data-otp-slot]]:text-sm",lg:"[&_[data-otp-slot]]:h-12 [&_[data-otp-slot]]:w-12 [&_[data-otp-slot]]:text-base"}},defaultVariants:{size:"md"}}),ep=U.forwardRef(({className:e,containerClassName:t,maxLength:a,value:r,defaultValue:n="",onChange:i,onComplete:s,pattern:l,disabled:d=false,size:m,children:u,...c},g)=>{let[p,v]=U.useState(n),[N,b]=U.useState(0),[h,w]=U.useState(false),f=U.useRef(null),y=r!==void 0?r:p;U.useImperativeHandle(g,()=>f.current),U.useEffect(()=>{b(Math.min(y.length,a-1));},[y,a]),U.useEffect(()=>{y.length===a&&s&&s(y);},[y,a,s]);let P=C=>{let D=C.target.value;if(l&&D){let T=new RegExp(l.replace("^","").replace("$","").replace("+",""));D=D.split("").filter(I=>T.test(I)).join("");}D=D.slice(0,a),r===void 0&&v(D),i?.(D);},x=C=>{C.key==="ArrowLeft"?b(D=>Math.max(0,D-1)):C.key==="ArrowRight"&&b(D=>Math.min(y.length,a-1,D+1));},S=()=>{f.current?.focus();},k=()=>{w(true),b(Math.min(y.length,a-1));},M=()=>{w(false);},R={value:y,activeIndex:h?N:-1,maxLength:a,disabled:d};return jsx(Qm.Provider,{value:R,children:jsxs("div",{className:o(Jm({size:m}),t),onClick:S,"data-otp-container":true,children:[jsx("input",{ref:f,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:y,onChange:P,onKeyDown:x,onFocus:k,onBlur:M,disabled:d,maxLength:a,className:o("absolute opacity-0 pointer-events-none w-0 h-0",e),...c}),u]})})});ep.displayName="InputOTP";var tp=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("flex items-center",e),...t}));tp.displayName="InputOTPGroup";var ap=U.forwardRef(({index:e,className:t,...a},r)=>{let{value:n,activeIndex:i,disabled:s}=$R(),l=n[e]||"",d=i===e,m=d&&n.length===e;return jsxs("div",{ref:r,"data-otp-slot":true,"data-active":d,"data-filled":!!l,className:o("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm font-medium transition-all first:rounded-l-md first:border-l last:rounded-r-md",d&&"z-10 ring-2 ring-ring ring-offset-background",s&&"cursor-not-allowed opacity-50",t),...a,children:[l,m&&jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});ap.displayName="InputOTPSlot";var rp=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,role:"separator",className:o("text-muted-foreground",e),...t,children:jsx(Minus,{className:"h-4 w-4"})}));rp.displayName="InputOTPSeparator";var ip=cva("inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-transparent",ghost:"bg-transparent text-foreground",soft:"bg-primary/15 text-primary",surface:"bg-muted text-muted-foreground"},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-2.5 text-xs",lg:"h-7 px-3 text-sm"}},defaultVariants:{variant:"soft",size:"md"}}),sp=U.forwardRef(({className:e,variant:t,size:a,value:r=[],onChange:n,placeholder:i="Add tag...",maxTags:s,minTagLength:l=1,maxTagLength:d=50,triggerKeys:m=["Enter",",","Tab"],allowDuplicates:u=false,disabled:c,readOnly:g,renderTag:p,...v},N)=>{let[b,h]=U.useState(""),w=U.useRef(null);U.useImperativeHandle(N,()=>w.current);let f=R=>{let C=R.trim();if(C.length<l||C.length>d||s&&r.length>=s||!u&&r.some(T=>T.text.toLowerCase()===C.toLowerCase()))return;let D={id:crypto.randomUUID(),text:C};n?.([...r,D]),h("");},y=R=>{c||g||n?.(r.filter(C=>C.id!==R));},P=R=>{if(m.includes(R.key)){if(R.key==="Tab"&&!b)return;R.preventDefault(),f(b);}R.key==="Backspace"&&!b&&r.length>0&&y(r[r.length-1].id);},x=R=>{let C=R.target.value;if(C.includes(",")){C.split(",").forEach(T=>{T.trim()&&f(T);});return}h(C);},S=R=>{R.preventDefault(),R.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(T=>{f(T);});},k=()=>{w.current?.focus();},M=s?r.length>=s:false;return jsxs("div",{className:o("flex min-h-10 w-full flex-wrap gap-1.5 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",c&&"cursor-not-allowed opacity-50",e),onClick:k,children:[r.map(R=>p?p(R,()=>y(R.id)):jsxs("span",{className:o(ip({variant:t,size:a})),children:[R.text,!c&&!g&&jsx("button",{type:"button",onClick:C=>{C.stopPropagation(),y(R.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${R.text}`,children:jsx(X,{className:"h-3 w-3"})})]},R.id)),!M&&!g&&jsx("input",{ref:w,type:"text",value:b,onChange:x,onKeyDown:P,onPaste:S,placeholder:r.length===0?i:"",disabled:c,className:o("flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed","min-w-[80px]"),...v})]})});sp.displayName="TagInput";var dp=cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-2 py-6",md:"gap-3 py-10",lg:"gap-4 py-16"}},defaultVariants:{size:"md"}}),cp=U.forwardRef(({className:e,size:t,icon:a,title:r,description:n,action:i,children:s,...l},d)=>jsxs("div",{ref:d,className:o(dp({size:t,className:e})),...l,children:[a&&jsx("div",{className:"text-muted-foreground [&>svg]:h-10 [&>svg]:w-10",children:a}),r&&jsx("h3",{className:"text-lg font-semibold text-foreground",children:r}),n&&jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:n}),i&&jsx("div",{className:"mt-2",children:i}),s]}));cp.displayName="EmptyState";var pp=cva("rounded-lg border bg-card p-6 text-card-foreground shadow-sm",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-transparent",ghost:"border-transparent shadow-none",soft:"bg-primary/10 border-primary/20",surface:"bg-muted border-muted"}},defaultVariants:{variant:"outline"}}),up=U.forwardRef(({className:e,variant:t,label:a,value:r,icon:n,trend:i,trendValue:s,description:l,...d},m)=>{let u=i==="up"?TrendingUp:i==="down"?TrendingDown:Minus,c=i==="up"?"text-green-500":i==="down"?"text-red-500":"text-muted-foreground";return jsxs("div",{ref:m,className:o(pp({variant:t,className:e})),...d,children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("p",{className:"text-sm font-medium text-muted-foreground",children:a}),n&&jsx("div",{className:"text-muted-foreground [&>svg]:h-4 [&>svg]:w-4",children:n})]}),jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[jsx("p",{className:"text-2xl font-bold",children:r}),i&&s&&jsxs("span",{className:o("flex items-center gap-0.5 text-sm",c),children:[jsx(u,{className:"h-3 w-3"}),s]})]}),l&&jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:l})]})});up.displayName="StatCard";var gp=cva("flex flex-col",{variants:{variant:{default:"",bordered:"divide-y divide-border rounded-lg border",striped:"[&>*:nth-child(odd)]:bg-muted/50"},size:{sm:"gap-1 [&>*]:py-2 [&>*]:px-3",md:"gap-2 [&>*]:py-3 [&>*]:px-4",lg:"gap-3 [&>*]:py-4 [&>*]:px-5"}},defaultVariants:{variant:"default",size:"md"}}),bp=U.forwardRef(({className:e,variant:t,size:a,...r},n)=>jsx("div",{ref:n,role:"list",className:o(gp({variant:t,size:a,className:e})),...r}));bp.displayName="List";var vp=cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),hp=U.forwardRef(({className:e,interactive:t,leading:a,trailing:r,children:n,...i},s)=>jsxs("div",{ref:s,role:"listitem",className:o(vp({interactive:t,className:e})),...i,children:[a&&jsx("div",{className:"flex-shrink-0 text-muted-foreground",children:a}),jsx("div",{className:"flex-1 min-w-0",children:n}),r&&jsx("div",{className:"flex-shrink-0",children:r})]}));hp.displayName="ListItem";var xp=U.forwardRef(({className:e,primary:t,secondary:a,children:r,...n},i)=>jsxs("div",{ref:i,className:o("min-w-0",e),...n,children:[t&&jsx("p",{className:"text-sm font-medium leading-none truncate",children:t}),a&&jsx("p",{className:"mt-1 text-sm text-muted-foreground truncate",children:a}),r]}));xp.displayName="ListItemText";var wp=cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),Np=U.forwardRef(({className:e,position:t,...a},r)=>jsx("div",{ref:r,"data-position":t,className:o(wp({position:t,className:e})),...a}));Np.displayName="Timeline";var Pp=cva("relative flex gap-4 pb-8 last:pb-0",{variants:{variant:{default:"",success:"[&_[data-timeline-dot]]:bg-green-500 [&_[data-timeline-dot]]:border-green-500",warning:"[&_[data-timeline-dot]]:bg-yellow-500 [&_[data-timeline-dot]]:border-yellow-500",error:"[&_[data-timeline-dot]]:bg-red-500 [&_[data-timeline-dot]]:border-red-500",info:"[&_[data-timeline-dot]]:bg-blue-500 [&_[data-timeline-dot]]:border-blue-500"}},defaultVariants:{variant:"default"}}),Cp=U.forwardRef(({className:e,variant:t,...a},r)=>jsx("div",{ref:r,className:o(Pp({variant:t,className:e})),...a}));Cp.displayName="TimelineItem";var Sp=U.forwardRef(({className:e,dot:t,showConnector:a=true,...r},n)=>jsxs("div",{ref:n,className:o("flex flex-col items-center",e),...r,children:[jsx("div",{"data-timeline-dot":true,className:"flex h-3 w-3 items-center justify-center rounded-full border-2 border-primary bg-primary",children:t}),a&&jsx("div",{className:"w-0.5 flex-1 bg-border"})]}));Sp.displayName="TimelineSeparator";var Tp=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("flex-1 pt-0.5",e),...t}));Tp.displayName="TimelineContent";var Mp=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));Mp.displayName="TimelineOpposite";var Dp=cva("inline-flex items-center rounded-lg bg-muted p-1 text-muted-foreground",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},fullWidth:{true:"w-full",false:""}},defaultVariants:{size:"md",fullWidth:false}}),Vp=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",{variants:{size:{sm:"h-6 text-xs px-2.5",md:"h-8 text-sm px-3",lg:"h-10 text-base px-4"}},defaultVariants:{size:"md"}}),Lp=U.createContext({}),Ip=U.forwardRef(({className:e,size:t,fullWidth:a,children:r,...n},i)=>jsx(hr.Root,{ref:i,type:"single",rovingFocus:false,className:o(Dp({size:t,fullWidth:a,className:e})),...n,children:jsx(Lp.Provider,{value:{size:t??"md"},children:r})}));Ip.displayName="SegmentedControl";var Ep=U.forwardRef(({className:e,children:t,...a},r)=>{let{size:n}=U.useContext(Lp);return jsx(hr.Item,{ref:r,className:o(Vp({size:n}),"flex-1",e),...a,children:t})});Ep.displayName="SegmentedControlItem";var Hp=cva("relative flex flex-col items-center justify-center rounded-lg border-2 border-dashed transition-colors",{variants:{variant:{default:"border-input bg-background hover:bg-accent/50",active:"border-primary bg-primary/5",error:"border-danger bg-danger/5"},size:{sm:"p-4 min-h-[120px]",md:"p-6 min-h-[160px]",lg:"p-8 min-h-[200px]"}},defaultVariants:{variant:"default",size:"md"}}),Ap=e=>{let t=e.type;return t.startsWith("image/")?Image:t.startsWith("video/")?FileVideo:t.startsWith("audio/")?FileAudio:t.includes("pdf")||t.includes("document")?FileText:t.includes("zip")||t.includes("rar")||t.includes("archive")?FileArchive:File},Tn=e=>{if(e===0)return "0 Bytes";let t=1024,a=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+a[r]},zp=(e,t,a)=>{let r=[];return t&&e.size>t&&r.push({code:"file-too-large",message:`File is larger than ${Tn(t)}`}),a&&a.length>0&&(a.some(i=>{if(i.startsWith("."))return e.name.toLowerCase().endsWith(i.toLowerCase());if(i.endsWith("/*")){let s=i.slice(0,-2);return e.type.startsWith(s)}return e.type===i})||r.push({code:"file-invalid-type",message:`File type not accepted. Accepted: ${a.join(", ")}`})),r},Bp=U.forwardRef(({className:e,variant:t,size:a,onFilesChange:r,onFilesRejected:n,onFileRemove:i,files:s=[],showFileList:l=true,children:d,maxSize:m=10*1024*1024,accept:u,multiple:c=true,disabled:g,...p},v)=>{let[N,b]=U.useState(false),[h,w]=U.useState(false),[f,y]=U.useState([]),P=U.useRef(null),x=U.useCallback(V=>{if(!V||V.length===0)return;let E=Array.from(V),A=[],B=[];(c?E:[E[0]]).forEach(Q=>{let te=zp(Q,m,u);te.length>0?B.push({file:Q,errors:te}):A.push(Q);}),y(B),A.length>0&&r?.(A),B.length>0&&n?.(B);},[m,u,c,r,n]),S=U.useCallback(V=>{if(V.preventDefault(),V.stopPropagation(),!g&&(b(true),V.dataTransfer.items)){let A=Array.from(V.dataTransfer.items).some(B=>{if(B.kind!=="file")return true;if(u&&u.length>0){let H=B.type;return !u.some(Q=>Q.endsWith("/*")?H.startsWith(Q.slice(0,-2)):H===Q)}return false});w(A);}},[g,u]),k=U.useCallback(V=>{V.preventDefault(),V.stopPropagation(),!g&&(V.dataTransfer.dropEffect="copy");},[g]),M=U.useCallback(V=>{V.preventDefault(),V.stopPropagation();let E=V.currentTarget.getBoundingClientRect(),A=V.clientX,B=V.clientY;(A<E.left||A>E.right||B<E.top||B>E.bottom)&&(b(false),w(false));},[]),R=U.useCallback(V=>{V.preventDefault(),V.stopPropagation(),b(false),w(false),!g&&x(V.dataTransfer.files);},[g,x]),C=U.useCallback(()=>{g||P.current?.click();},[g]),D=U.useCallback(V=>{x(V.target.files),V.target.value="";},[x]),T=U.useCallback(V=>{g||(V.key==="Enter"||V.key===" ")&&(V.preventDefault(),P.current?.click());},[g]),I=h?"error":N?"active":t,L=u?.join(",");return jsxs("div",{ref:v,className:o("space-y-4",e),...p,children:[jsxs("div",{role:"button",tabIndex:g?-1:0,onDragEnter:S,onDragOver:k,onDragLeave:M,onDrop:R,onClick:C,onKeyDown:T,className:o(Hp({variant:I,size:a}),g&&"opacity-50 cursor-not-allowed",!g&&"cursor-pointer focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"),"aria-disabled":g,children:[jsx("input",{ref:P,type:"file",accept:L,multiple:c,disabled:g,onChange:D,className:"sr-only",tabIndex:-1}),d||jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[jsx("div",{className:"rounded-full bg-muted p-3",children:jsx(Upload,{className:"h-6 w-6 text-muted-foreground"})}),jsxs("div",{className:"space-y-1",children:[jsx("p",{className:"text-sm font-medium",children:N?"Drop files here":"Drop files or click to upload"}),jsxs("p",{className:"text-xs text-muted-foreground",children:[m&&`Max ${Tn(m)}`,u&&u.length>0&&` \u2022 ${u.join(", ")}`]})]})]})]}),f.length>0&&jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:f.map(({file:V,errors:E})=>jsxs("div",{children:[jsx("span",{className:"font-medium",children:V.name}),":"," ",E.map(A=>A.message).join(", ")]},V.name))}),l&&s.length>0&&jsx("div",{className:"space-y-2",children:s.map(V=>{let E=Ap(V.file);return jsxs("div",{className:o("flex items-center gap-3 rounded-lg border p-3",V.error&&"border-danger bg-danger/5"),children:[jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-muted",children:jsx(E,{className:"h-5 w-5 text-muted-foreground"})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"truncate text-sm font-medium",children:V.file.name}),jsxs("p",{className:"text-xs text-muted-foreground",children:[Tn(V.file.size),V.error&&jsx("span",{className:"ml-2 text-danger",children:V.error})]}),V.progress!==void 0&&V.progress<100&&jsx(pn,{value:V.progress,className:"mt-2 h-1"})]}),jsxs(O,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-foreground",onClick:A=>{A.stopPropagation(),i?.(V.file);},children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Remove"})]})]},V.id)})})]})});Bp.displayName="FileUpload";var Gp=cva("relative rounded-md border border-input shadow-sm transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{xs:"h-4 w-4",sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},shape:{square:"rounded-md",circle:"rounded-full"},interactive:{true:"cursor-pointer hover:scale-110 active:scale-105",false:"cursor-default"}},defaultVariants:{size:"md",shape:"square",interactive:false}}),d0=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cg fill='%23ccc'%3E%3Crect width='4' height='4'/%3E%3Crect x='4' y='4' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E")`,kr=U.forwardRef(({color:e,isSelected:t,showTransparency:a=true,onSelect:r,size:n,shape:i,interactive:s,className:l,onClick:d,disabled:m,...u},c)=>jsx("button",{ref:c,type:"button",disabled:m,onClick:v=>{d?.(v),r?.(e);},className:o(Gp({size:n,shape:i,interactive:s??(!!r||!!d)}),t&&"ring-2 ring-ring ring-offset-2",l),style:{backgroundImage:a?d0:void 0,backgroundSize:a?"8px 8px":void 0},"aria-label":`Color ${e}`,"aria-pressed":t,...u,children:jsx("span",{className:"absolute inset-0 rounded-[inherit]",style:{backgroundColor:e}})}));kr.displayName="ColorSwatch";var p0=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],u0={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},Wp=U.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:a,disabled:r,presets:n=p0,showInput:i=true,size:s="md",className:l},d)=>{let[m,u]=U.useState(e??t);U.useEffect(()=>{e!==void 0&&u(e);},[e]);let c=p=>{u(p),a?.(p);},g=p=>{u(p),a?.(p);};return jsxs(ve,{children:[jsx(Re,{asChild:true,children:jsx("button",{ref:d,disabled:r,className:o("rounded-md border border-input shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",u0[s],l),style:{backgroundColor:m},"aria-label":`Color picker, current color: ${m}`})}),jsx(ue,{className:"w-auto p-3",align:"start",children:jsxs("div",{className:"space-y-3",children:[jsx(HexColorPicker,{color:m,onChange:c,className:"!w-[200px]"}),i&&jsxs("div",{className:"space-y-1.5",children:[jsx(za,{htmlFor:"color-input",className:"text-xs",children:"Hex Color"}),jsxs("div",{className:"flex gap-2",children:[jsx("div",{className:"h-9 w-9 shrink-0 rounded-md border",style:{backgroundColor:m}}),jsx(HexColorInput,{id:"color-input",color:m,onChange:c,prefixed:true,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-sm uppercase ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"})]})]}),n.length>0&&jsxs("div",{className:"space-y-1.5",children:[jsx(za,{className:"text-xs",children:"Presets"}),jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(p=>jsx(kr,{color:p,size:"sm",isSelected:m.toLowerCase()===p.toLowerCase(),onSelect:g},p))})]})]})})]})});Wp.displayName="ColorPicker";var $p=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),fs=e=>String(e).padStart(2,"0"),h0=e=>{let[t,a]=e.split(":").map(Number);return {hours:t||0,minutes:a||0}},x0=(e,t)=>`${fs(e)}:${fs(t)}`,_p=U.forwardRef(({className:e,size:t,value:a,onChange:r,use24Hour:n=true,minuteStep:i=1,showPicker:s=true,minTime:l,maxTime:d,disabled:m,...u},c)=>{let[g,p]=U.useState(a??""),[v,N]=U.useState(false);U.useEffect(()=>{a!==void 0&&p(a);},[a]);let{hours:b,minutes:h}=h0(g||"00:00"),w=M=>{let R=M.target.value;p(R),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(R)&&r?.(R);},f=(M,R)=>{let C=Math.max(0,Math.min(23,M)),D=Math.max(0,Math.min(59,R)),T=x0(C,D);p(T),r?.(T);},y=()=>f(b+1,h),P=()=>f(b-1,h),x=()=>f(b,h+i),S=()=>f(b,h-i),k=({value:M,onIncrement:R,onDecrement:C})=>jsxs("div",{className:"flex flex-col items-center",children:[jsx(O,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:R,disabled:m,children:jsx(ChevronUp,{className:"h-4 w-4"})}),jsx("div",{className:"flex h-10 w-12 items-center justify-center rounded-md bg-muted text-lg font-semibold",children:fs(M)}),jsx(O,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:C,disabled:m,children:jsx(ChevronDown,{className:"h-4 w-4"})})]});return jsxs("div",{className:"relative flex items-center",children:[jsx("input",{ref:c,type:"time",value:g,onChange:w,disabled:m,className:o($p({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...u}),s&&jsxs(ve,{open:v,onOpenChange:N,children:[jsx(Re,{asChild:true,children:jsxs(O,{type:"button",variant:"ghost",size:"sm",className:"absolute right-1 h-7 w-7 p-0",disabled:m,children:[jsx(Clock,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Pick time"})]})}),jsxs(ue,{className:"w-auto p-4",align:"end",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(k,{value:b,onIncrement:y,onDecrement:P,max:23}),jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsx(k,{value:h,onIncrement:x,onDecrement:S,max:59})]}),jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsx(O,{variant:"bordered",size:"sm",onClick:()=>{let M=new Date;f(M.getHours(),M.getMinutes());},children:"Now"}),jsx(O,{size:"sm",onClick:()=>N(false),children:"Done"})]})]})]})]})});_p.displayName="TimeInput";var Kp=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),R0=(e,t)=>{try{return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(i=>i.type==="currency")?.value??e}catch{return e}},gs=(e,t,a,r)=>{let n=e.toFixed(t),[i,s]=n.split("."),l=i.replace(/\B(?=(\d{3})+(?!\d))/g,a);return s?`${l}${r}${s}`:l},Up=(e,t,a)=>{if(!e)return;let r=e.replace(new RegExp(`\\${t}`,"g"),"");r=r.replace(a,"."),r=r.replace(/[^0-9.-]/g,"");let n=parseFloat(r);return isNaN(n)?void 0:n},Yp=U.forwardRef(({className:e,size:t,value:a,defaultValue:r,onChange:n,currency:i="USD",locale:s="en-US",decimals:l=2,min:d,max:m,showCurrency:u=true,currencyPosition:c="prefix",currencySymbol:g,thousandSeparator:p=",",decimalSeparator:v=".",disabled:N,placeholder:b,...h},w)=>{let[f,y]=U.useState(r),[P,x]=U.useState(""),[S,k]=U.useState(false),M=a!==void 0?a:f,R=g??R0(i,s);U.useEffect(()=>{!S&&M!==void 0&&x(gs(M,l,p,v));},[M,l,p,v,S]);let C=V=>{let E=V.target.value;if(!E){x(""),a===void 0&&y(void 0),n?.(void 0);return}if(!new RegExp(`^[0-9${p}${v}.-]*$`).test(E))return;x(E);let B=Up(E,p,v);if(B!==void 0){let H=B;d!==void 0&&B<d&&(H=d),m!==void 0&&B>m&&(H=m),a===void 0&&y(H),n?.(H);}},D=()=>{k(true),M!==void 0&&x(M.toString().replace(".",v));},T=()=>{k(false),x(M!==void 0?gs(M,l,p,v):"");},I=u&&c==="prefix"&&jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:R}),L=u&&c==="suffix"&&jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:R});return jsxs("div",{className:"relative flex items-center",children:[I&&jsx("div",{className:"absolute left-3 pointer-events-none",children:I}),jsx("input",{ref:w,type:"text",inputMode:"decimal",value:P,onChange:C,onFocus:D,onBlur:T,disabled:N,placeholder:b??`0${v}${"0".repeat(l)}`,className:o(Kp({size:t}),I&&"pl-8",L&&"pr-8","text-right",e),...h}),L&&jsx("div",{className:"absolute right-3 pointer-events-none",children:L})]})});Yp.displayName="CurrencyInput";var jp=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),bs={creditCard:{mask:"#### #### #### ####"},creditCardAmex:{mask:"#### ###### #####"},cvv:{mask:"###"},expiry:{mask:"##/##"},date:{mask:"##/##/####"},dateISO:{mask:"####-##-##"},time:{mask:"##:##"},ip:{mask:"###.###.###.###"},mac:{mask:"AA:AA:AA:AA:AA:AA"},id11:{mask:"###########"},id9:{mask:"#########"},id10:{mask:"##########"},postal5:{mask:"#####"},postal9:{mask:"#####-####"}},P0=(e,t)=>{switch(t){case "#":return /\d/.test(e);case "A":return /[a-zA-Z]/.test(e);case "*":return /[a-zA-Z0-9]/.test(e);default:return e===t}},Ra=e=>["#","A","*"].includes(e),Mn=(e,t,a)=>{let r="",n=0;for(let i=0;i<t.length&&n<=e.length;i++){let s=t[i];if(Ra(s)){if(n<e.length){let l=e[n];P0(l,s)?(r+=l,n++):(n++,i--);}}else (n<e.length||a)&&(r+=s);}return r},vs=(e,t)=>{let a="";for(let r=0;r<e.length&&r<t.length;r++){let n=t[r];Ra(n)&&(a+=e[r]);}return a},Xp=(e,t)=>e.split("").map(a=>Ra(a)?t:a).join(""),C0=(e,t,a)=>{let r=0;for(let l=0;l<a&&l<e.length&&l<t.length;l++)Ra(t[l])&&r++;let i=0,s=0;for(let l=0;l<t.length&&s<r;l++)i++,Ra(t[l])&&s++;for(;i<t.length&&!Ra(t[i]);)i++;return Math.min(i,e.length)},qp=U.forwardRef(({className:e,size:t,value:a,defaultValue:r="",onChange:n,mask:i,maskPlaceholder:s="_",showMaskPlaceholder:l=false,includeMaskChars:d=false,disabled:m,placeholder:u,...c},g)=>{let p=typeof i=="string"&&i in bs?bs[i].mask:i,[v,N]=U.useState(r),[b,h]=U.useState(""),w=U.useRef(null),f=a!==void 0?a:v;U.useImperativeHandle(g,()=>w.current),U.useEffect(()=>{let S=Mn(f,p,true);h(S);},[f,p]);let y=S=>{let k=S.target.value,M=S.target.selectionStart??0,R=k.replace(/[^\w]/g,""),C=Mn(R,p,true),D=vs(C,p);h(C),a===void 0&&N(d?C:D),n?.(D,C),requestAnimationFrame(()=>{if(w.current){let T=C0(C,p,M);w.current.setSelectionRange(T,T);}});},P=S=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(S.key)||S.ctrlKey||S.metaKey)return;let k=w.current;if(!k)return;let M=k.selectionStart??0;if(S.key==="Backspace"&&M>0){let R=M-1;for(;R>0&&!Ra(p[R]);)R--;let C=vs(b,p),D=0;for(let L=0;L<R&&L<p.length;L++)Ra(p[L])&&D++;let T=C.slice(0,Math.max(0,D-1))+C.slice(D),I=Mn(T,p,true);h(I),a===void 0&&N(d?I:T),n?.(T,I),S.preventDefault(),requestAnimationFrame(()=>{w.current&&w.current.setSelectionRange(R,R);});}},x=l?Xp(p,s):u;return jsx("input",{ref:w,type:"text",value:b,onChange:y,onKeyDown:P,disabled:m,placeholder:x,className:o(jp({size:t}),e),...c})});qp.displayName="MaskedInput";var Zp=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),Vn={"DD/MM/YYYY":"/","MM/DD/YYYY":"/","YYYY-MM-DD":"-","DD.MM.YYYY":"."},xs={"DD/MM/YYYY":["day","month","year"],"MM/DD/YYYY":["month","day","year"],"YYYY-MM-DD":["year","month","day"],"DD.MM.YYYY":["day","month","year"]},hs=(e,t)=>String(e).padStart(t,"0"),Dn=(e,t)=>{let a=hs(e.getDate(),2),r=hs(e.getMonth()+1,2),n=hs(e.getFullYear(),4),i=Vn[t],s=xs[t],l={day:a,month:r,year:n};return s.map(d=>l[d]).join(i)},Qp=(e,t)=>{let a=Vn[t],r=e.split(a);if(r.length!==3)return null;let n=xs[t],i={};if(n.forEach((l,d)=>{i[l]=parseInt(r[d],10);}),isNaN(i.day)||isNaN(i.month)||isNaN(i.year)||i.month<1||i.month>12||i.day<1||i.day>31||i.year<1e3||i.year>9999)return null;let s=new Date(i.year,i.month-1,i.day);return s.getFullYear()!==i.year||s.getMonth()!==i.month-1||s.getDate()!==i.day?null:s},k0=e=>e.toLowerCase(),D0=e=>{let t=Vn[e];return xs[e].map(r=>r==="year"?"####":"##").join(t)},Jp=U.forwardRef(({className:e,size:t,value:a,defaultValue:r,onChange:n,format:i="DD/MM/YYYY",minDate:s,maxDate:l,showIcon:d=true,disabled:m,placeholder:u,...c},g)=>{let[p,v]=U.useState(r??null),[N,b]=U.useState(""),[h,w]=U.useState(null),f=U.useRef(null),y=a!==void 0?a:p;U.useImperativeHandle(g,()=>f.current),U.useEffect(()=>{y?(b(Dn(y,i)),w(null)):b("");},[y,i]);let P=Vn[i],x=D0(i),S=R=>{let C=R.target.value;C=C.replace(new RegExp(`[^0-9\\${P}]`,"g"),"");let D=C.replace(new RegExp(`\\${P}`,"g"),""),T="",I=0;for(let L=0;L<x.length&&I<D.length;L++)x[L]==="#"?(T+=D[I],I++):T+=x[L];if(b(T),T.length===x.length){let L=Qp(T,i);if(L){if(s&&L<s){w(`Date must be after ${Dn(s,i)}`);return}if(l&&L>l){w(`Date must be before ${Dn(l,i)}`);return}w(null),a===void 0&&v(L),n?.(L);}else w("Invalid date");}else a===void 0&&v(null),n?.(null),w(null);},k=()=>{N&&N.length!==x.length&&(b(""),w(null),a===void 0&&v(null),n?.(null));},M=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4";return jsxs("div",{className:"relative",children:[jsx("input",{ref:f,type:"text",inputMode:"numeric",value:N,onChange:S,onBlur:k,disabled:m,placeholder:u??k0(i),className:o(Zp({size:t}),d&&"pr-10",h&&"border-danger focus-visible:ring-danger",e),"aria-invalid":!!h,"aria-describedby":h?"date-error":void 0,...c}),d&&jsx("div",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2",children:jsx(Calendar,{className:o(M,"text-muted-foreground")})}),h&&jsx("p",{id:"date-error",className:"mt-1 text-xs text-danger",children:h})]})});Jp.displayName="DateInput";var eu=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),tu=[{code:"TR",name:"Turkey",dialCode:"+90",flag:"\u{1F1F9}\u{1F1F7}",format:"(###) ### ## ##"},{code:"US",name:"United States",dialCode:"+1",flag:"\u{1F1FA}\u{1F1F8}",format:"(###) ###-####"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"\u{1F1EC}\u{1F1E7}",format:"#### ### ####"},{code:"DE",name:"Germany",dialCode:"+49",flag:"\u{1F1E9}\u{1F1EA}",format:"#### #######"},{code:"FR",name:"France",dialCode:"+33",flag:"\u{1F1EB}\u{1F1F7}",format:"# ## ## ## ##"},{code:"IT",name:"Italy",dialCode:"+39",flag:"\u{1F1EE}\u{1F1F9}",format:"### ### ####"},{code:"ES",name:"Spain",dialCode:"+34",flag:"\u{1F1EA}\u{1F1F8}",format:"### ### ###"},{code:"NL",name:"Netherlands",dialCode:"+31",flag:"\u{1F1F3}\u{1F1F1}",format:"## ########"},{code:"BE",name:"Belgium",dialCode:"+32",flag:"\u{1F1E7}\u{1F1EA}",format:"### ## ## ##"},{code:"AT",name:"Austria",dialCode:"+43",flag:"\u{1F1E6}\u{1F1F9}",format:"### #######"},{code:"CH",name:"Switzerland",dialCode:"+41",flag:"\u{1F1E8}\u{1F1ED}",format:"## ### ## ##"},{code:"SE",name:"Sweden",dialCode:"+46",flag:"\u{1F1F8}\u{1F1EA}",format:"##-### ## ##"},{code:"NO",name:"Norway",dialCode:"+47",flag:"\u{1F1F3}\u{1F1F4}",format:"### ## ###"},{code:"DK",name:"Denmark",dialCode:"+45",flag:"\u{1F1E9}\u{1F1F0}",format:"## ## ## ##"},{code:"FI",name:"Finland",dialCode:"+358",flag:"\u{1F1EB}\u{1F1EE}",format:"## ### ####"},{code:"PL",name:"Poland",dialCode:"+48",flag:"\u{1F1F5}\u{1F1F1}",format:"### ### ###"},{code:"CZ",name:"Czech Republic",dialCode:"+420",flag:"\u{1F1E8}\u{1F1FF}",format:"### ### ###"},{code:"GR",name:"Greece",dialCode:"+30",flag:"\u{1F1EC}\u{1F1F7}",format:"### ### ####"},{code:"PT",name:"Portugal",dialCode:"+351",flag:"\u{1F1F5}\u{1F1F9}",format:"### ### ###"},{code:"RU",name:"Russia",dialCode:"+7",flag:"\u{1F1F7}\u{1F1FA}",format:"(###) ###-##-##"},{code:"UA",name:"Ukraine",dialCode:"+380",flag:"\u{1F1FA}\u{1F1E6}",format:"## ### ## ##"},{code:"RO",name:"Romania",dialCode:"+40",flag:"\u{1F1F7}\u{1F1F4}",format:"### ### ###"},{code:"HU",name:"Hungary",dialCode:"+36",flag:"\u{1F1ED}\u{1F1FA}",format:"## ### ####"},{code:"BG",name:"Bulgaria",dialCode:"+359",flag:"\u{1F1E7}\u{1F1EC}",format:"### ### ###"},{code:"HR",name:"Croatia",dialCode:"+385",flag:"\u{1F1ED}\u{1F1F7}",format:"## ### ####"},{code:"RS",name:"Serbia",dialCode:"+381",flag:"\u{1F1F7}\u{1F1F8}",format:"## ### ####"},{code:"SI",name:"Slovenia",dialCode:"+386",flag:"\u{1F1F8}\u{1F1EE}",format:"## ### ###"},{code:"SK",name:"Slovakia",dialCode:"+421",flag:"\u{1F1F8}\u{1F1F0}",format:"### ### ###"},{code:"CA",name:"Canada",dialCode:"+1",flag:"\u{1F1E8}\u{1F1E6}",format:"(###) ###-####"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"\u{1F1F2}\u{1F1FD}",format:"### ### ####"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"\u{1F1E7}\u{1F1F7}",format:"(##) #####-####"},{code:"AR",name:"Argentina",dialCode:"+54",flag:"\u{1F1E6}\u{1F1F7}",format:"## ####-####"},{code:"AU",name:"Australia",dialCode:"+61",flag:"\u{1F1E6}\u{1F1FA}",format:"### ### ###"},{code:"NZ",name:"New Zealand",dialCode:"+64",flag:"\u{1F1F3}\u{1F1FF}",format:"## ### ####"},{code:"JP",name:"Japan",dialCode:"+81",flag:"\u{1F1EF}\u{1F1F5}",format:"##-####-####"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"\u{1F1F0}\u{1F1F7}",format:"##-####-####"},{code:"CN",name:"China",dialCode:"+86",flag:"\u{1F1E8}\u{1F1F3}",format:"### #### ####"},{code:"HK",name:"Hong Kong",dialCode:"+852",flag:"\u{1F1ED}\u{1F1F0}",format:"#### ####"},{code:"TW",name:"Taiwan",dialCode:"+886",flag:"\u{1F1F9}\u{1F1FC}",format:"### ### ###"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"\u{1F1F8}\u{1F1EC}",format:"#### ####"},{code:"IN",name:"India",dialCode:"+91",flag:"\u{1F1EE}\u{1F1F3}",format:"##### #####"},{code:"PK",name:"Pakistan",dialCode:"+92",flag:"\u{1F1F5}\u{1F1F0}",format:"### #######"},{code:"AE",name:"United Arab Emirates",dialCode:"+971",flag:"\u{1F1E6}\u{1F1EA}",format:"## ### ####"},{code:"SA",name:"Saudi Arabia",dialCode:"+966",flag:"\u{1F1F8}\u{1F1E6}",format:"## ### ####"},{code:"EG",name:"Egypt",dialCode:"+20",flag:"\u{1F1EA}\u{1F1EC}",format:"### ### ####"},{code:"ZA",name:"South Africa",dialCode:"+27",flag:"\u{1F1FF}\u{1F1E6}",format:"## ### ####"},{code:"NG",name:"Nigeria",dialCode:"+234",flag:"\u{1F1F3}\u{1F1EC}",format:"### ### ####"},{code:"IL",name:"Israel",dialCode:"+972",flag:"\u{1F1EE}\u{1F1F1}",format:"##-###-####"}],Ln=(e,t)=>{let a=e.replace(/\D/g,""),r="",n=0;for(let i=0;i<t.length&&n<a.length;i++)t[i]==="#"?(r+=a[n],n++):r+=t[i];return r},I0=e=>e.replace(/#/g,"_"),au=U.forwardRef(({className:e,size:t,value:a,defaultValue:r="",onChange:n,country:i,defaultCountry:s="TR",onCountryChange:l,countries:d=tu,showCountrySelect:m=true,showDialCode:u=false,disabled:c,placeholder:g,...p},v)=>{let[N,b]=U.useState(r),[h,w]=U.useState(i??s),f=a!==void 0?a:N,y=i??h,P=d.find(R=>R.code===y)??d[0],x=Ln(f,P.format),S=R=>{let D=R.target.value.replace(/\D/g,"");a===void 0&&b(D);let T=Ln(D,P.format),I=`${P.dialCode} ${T}`;n?.(D,I,P);};return jsxs("div",{className:"flex",children:[m&&jsxs(Oi,{value:y,onValueChange:R=>{let C=d.find(I=>I.code===R);if(!C)return;i===void 0&&w(R),l?.(C);let D=Ln(f,C.format),T=`${C.dialCode} ${D}`;n?.(f,T,C);},disabled:c,children:[jsx(an,{className:o("w-[100px] rounded-r-none border-r-0 shrink-0",t==="sm"?"h-8":t==="lg"?"h-12":"h-10"),children:jsx(Gi,{children:jsxs("span",{className:"flex items-center gap-1.5",children:[jsx("span",{children:P.flag}),jsx("span",{className:"text-xs text-muted-foreground",children:P.dialCode})]})})}),jsx(rn,{className:"max-h-[300px]",children:d.map(R=>jsx(on,{value:R.code,children:jsxs("span",{className:"flex items-center gap-2",children:[jsx("span",{children:R.flag}),jsx("span",{className:"flex-1",children:R.name}),jsx("span",{className:"text-xs text-muted-foreground",children:R.dialCode})]})},R.code))})]}),jsxs("div",{className:"relative flex-1",children:[u&&!m&&jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:P.dialCode}),jsx("input",{ref:v,type:"tel",inputMode:"tel",value:x,onChange:S,disabled:c,placeholder:g??I0(P.format),className:o(eu({size:t}),m&&"rounded-l-none",u&&!m&&"pl-12",e),...p})]})]})});au.displayName="PhoneInput";var ou=cva("flex items-center justify-between w-full px-4 py-3 border-b bg-background",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-background border-border",ghost:"bg-transparent border-transparent",soft:"bg-primary/10 border-primary/20",surface:"bg-muted border-border"},size:{sm:"h-12 px-3 py-2",md:"h-14 px-4 py-3",lg:"h-16 px-6 py-4"},sticky:{true:"sticky top-0 z-50",false:""}},defaultVariants:{variant:"outline",size:"md",sticky:false}}),nu=U.forwardRef(({className:e,variant:t,size:a,sticky:r,brand:n,children:i,mobileBreakpoint:s="md",...l},d)=>{let[m,u]=U.useState(false),c={sm:"hidden sm:flex",md:"hidden md:flex",lg:"hidden lg:flex"}[s],g={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden"}[s];return jsxs("nav",{ref:d,className:o(ou({variant:t,size:a,sticky:r,className:e})),...l,children:[jsxs("div",{className:"flex items-center justify-between w-full",children:[n&&jsx("div",{className:"flex-shrink-0",children:n}),jsx("div",{className:o("items-center gap-4 flex-1 justify-end",c),children:i}),jsx("button",{type:"button",className:o("p-2 rounded-md hover:bg-accent hover:text-accent-foreground transition-colors",g),onClick:()=>u(!m),"aria-label":m?"Close menu":"Open menu","aria-expanded":m,children:m?jsx(X,{className:"h-5 w-5"}):jsx(Menu,{className:"h-5 w-5"})})]}),m&&jsx("div",{className:o("absolute top-full left-0 right-0 flex flex-col gap-2 p-4 bg-background border-b border-border shadow-lg",g),children:i})]})});nu.displayName="Navbar";var iu=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("flex items-center gap-2 font-semibold text-lg",e),...t}));iu.displayName="NavbarBrand";var su=U.forwardRef(({className:e,justify:t="start",...a},r)=>{let n={start:"justify-start",center:"justify-center",end:"justify-end"}[t];return jsx("div",{ref:r,className:o("flex items-center gap-4",n,e),...a})});su.displayName="NavbarContent";var lu=U.forwardRef(({className:e,isActive:t,...a},r)=>jsx("div",{ref:r,className:o("flex items-center",t&&"text-primary font-medium",e),...a}));lu.displayName="NavbarItem";var du=U.forwardRef(({className:e,isActive:t,...a},r)=>jsx("a",{ref:r,className:o("text-sm font-medium transition-colors hover:text-primary",t?"text-primary":"text-muted-foreground",e),...a}));du.displayName="NavbarLink";var mu=cva("inline-flex items-center gap-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"text-primary-foreground bg-primary px-2 py-0.5 rounded hover:bg-primary/90",outline:"text-primary underline-offset-4 hover:underline",ghost:"text-foreground hover:text-primary",soft:"text-primary bg-primary/10 px-2 py-0.5 rounded hover:bg-primary/20",surface:"text-foreground bg-muted px-2 py-0.5 rounded hover:bg-muted/80"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},underline:{none:"",hover:"hover:underline underline-offset-4",always:"underline underline-offset-4"}},defaultVariants:{variant:"outline",size:"md",underline:"hover"}}),pu=U.forwardRef(({className:e,variant:t,size:a,underline:r,isExternal:n,showExternalIcon:i=true,isDisabled:s,children:l,...d},m)=>{let u=n?{target:"_blank",rel:"noopener noreferrer"}:{};return jsxs("a",{ref:m,className:o(mu({variant:t,size:a,underline:r,className:e}),s&&"pointer-events-none opacity-50"),"aria-disabled":s,...u,...d,children:[l,n&&i&&jsx(ExternalLink,{className:"h-3 w-3 ml-0.5","aria-hidden":"true"})]})});pu.displayName="Link";var fu=cva("fixed bottom-6 right-6 z-50 flex items-center justify-center rounded-full shadow-lg transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",{variants:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"bg-background border border-border text-foreground hover:bg-accent",ghost:"bg-background/80 backdrop-blur-sm text-foreground hover:bg-accent",soft:"bg-primary/10 text-primary hover:bg-primary/20",surface:"bg-muted text-foreground hover:bg-muted/80"},size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"}},defaultVariants:{variant:"solid",size:"md"}}),gu=U.forwardRef(({className:e,variant:t,size:a,visibilityHeight:r=400,smooth:n=true,icon:i,duration:s=300,onClick:l,...d},m)=>{let[u,c]=U.useState(false);U.useEffect(()=>{let v=()=>{c(window.scrollY>r);};return v(),window.addEventListener("scroll",v,{passive:true}),()=>window.removeEventListener("scroll",v)},[r]);let g=v=>{n?window.scrollTo({top:0,behavior:"smooth"}):window.scrollTo(0,0),l?.(v);},p={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[a||"md"];return u?jsx("button",{ref:m,type:"button",className:o(fu({variant:t,size:a,className:e}),"animate-in fade-in zoom-in duration-300"),onClick:g,"aria-label":"Back to top",...d,children:i||jsx(ArrowUp,{className:p})}):null});gu.displayName="BackTop";var U0=$.Menu,Y0=$.Group,j0=$.Portal,X0=$.Sub,q0=$.RadioGroup,bu=U.forwardRef(({className:e,...t},a)=>jsx($.Root,{ref:a,className:o("flex h-10 items-center space-x-1 rounded-md border bg-background p-1",e),...t}));bu.displayName=$.Root.displayName;var vu=U.forwardRef(({className:e,...t},a)=>jsx($.Trigger,{ref:a,className:o("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e),...t}));vu.displayName=$.Trigger.displayName;var hu=U.forwardRef(({className:e,inset:t,children:a,...r},n)=>jsxs($.SubTrigger,{ref:n,className:o("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...r,children:[a,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]}));hu.displayName=$.SubTrigger.displayName;var xu=U.forwardRef(({className:e,...t},a)=>jsx($.SubContent,{ref:a,className:o("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));xu.displayName=$.SubContent.displayName;var yu=U.forwardRef(({className:e,align:t="start",alignOffset:a=-4,sideOffset:r=8,...n},i)=>jsx($.Portal,{children:jsx($.Content,{ref:i,align:t,alignOffset:a,sideOffset:r,className:o("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));yu.displayName=$.Content.displayName;var Ru=U.forwardRef(({className:e,inset:t,...a},r)=>jsx($.Item,{ref:r,className:o("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...a}));Ru.displayName=$.Item.displayName;var wu=U.forwardRef(({className:e,children:t,checked:a,...r},n)=>jsxs($.CheckboxItem,{ref:n,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...r,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx($.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),t]}));wu.displayName=$.CheckboxItem.displayName;var Nu=U.forwardRef(({className:e,children:t,...a},r)=>jsxs($.RadioItem,{ref:r,className:o("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx($.ItemIndicator,{children:jsx(Circle,{className:"h-2 w-2 fill-current"})})}),t]}));Nu.displayName=$.RadioItem.displayName;var Pu=U.forwardRef(({className:e,inset:t,...a},r)=>jsx($.Label,{ref:r,className:o("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));Pu.displayName=$.Label.displayName;var Cu=U.forwardRef(({className:e,...t},a)=>jsx($.Separator,{ref:a,className:o("-mx-1 my-1 h-px bg-muted",e),...t}));Cu.displayName=$.Separator.displayName;var Su=({className:e,...t})=>jsx("span",{className:o("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Su.displayName="MenubarShortcut";var Tu=cva("flex",{variants:{orientation:{horizontal:"flex-row items-center",vertical:"flex-col"},size:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"horizontal",size:"md"}}),Mu=U.forwardRef(({className:e,orientation:t,size:a,currentStep:r=0,children:n,...i},s)=>{let l=U.Children.toArray(n);return jsx("div",{ref:s,className:o(Tu({orientation:t,size:a,className:e})),...i,children:l.map((d,m)=>U.isValidElement(d)?U.cloneElement(d,{...d.props,stepNumber:m+1,status:d.props.status||(m<r?"completed":m===r?"current":"upcoming"),isLast:m===l.length-1,orientation:t,size:a}):d)})});Mu.displayName="Steps";var ku=cva("flex items-center",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col items-start"},size:{sm:"gap-2",md:"gap-3",lg:"gap-4"}},defaultVariants:{orientation:"horizontal",size:"md"}}),Q0=cva("flex items-center justify-center rounded-full font-medium transition-colors",{variants:{status:{completed:"bg-primary text-primary-foreground",current:"bg-primary text-primary-foreground ring-2 ring-primary ring-offset-2 ring-offset-background",upcoming:"bg-muted text-muted-foreground border-2 border-muted-foreground/30"},size:{sm:"h-6 w-6 text-xs",md:"h-8 w-8 text-sm",lg:"h-10 w-10 text-base"}},defaultVariants:{status:"upcoming",size:"md"}}),J0=cva("bg-muted transition-colors",{variants:{orientation:{horizontal:"h-0.5 flex-1 min-w-8",vertical:"w-0.5 min-h-8 ml-4"},status:{completed:"bg-primary",current:"bg-muted",upcoming:"bg-muted"}},defaultVariants:{orientation:"horizontal",status:"upcoming"}}),Du=U.forwardRef(({className:e,orientation:t="horizontal",size:a="md",title:r,description:n,icon:i,status:s="upcoming",stepNumber:l,isLast:d,...m},u)=>jsxs("div",{ref:u,className:o(ku({orientation:t,size:a,className:e}),!d&&t==="horizontal"&&"flex-1"),...m,children:[jsx("div",{className:o("flex items-center",t==="vertical"&&"flex-col items-start"),children:jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:o(Q0({status:s,size:a})),children:s==="completed"?jsx(Check,{className:a==="sm"?"h-3 w-3":a==="lg"?"h-5 w-5":"h-4 w-4"}):i||l}),(r||n)&&jsxs("div",{className:"flex flex-col",children:[r&&jsx("span",{className:o("font-medium",a==="sm"&&"text-sm",a==="lg"&&"text-lg",s==="upcoming"&&"text-muted-foreground"),children:r}),n&&jsx("span",{className:o("text-muted-foreground",a==="sm"&&"text-xs",a==="md"&&"text-sm",a==="lg"&&"text-base"),children:n})]})]})}),!d&&jsx("div",{className:o(J0({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Du.displayName="Step";function nw({className:e,data:t,columns:a,selectable:r=false,selectedKeys:n,onSelectionChange:i,getRowKey:s=(y,P)=>String(P),sortable:l=false,sortState:d,onSortChange:m,paginated:u=false,pageSizeOptions:c=[10,20,50],paginationState:g,onPaginationChange:p,emptyContent:v="No data",loading:N=false,striped:b=false,hoverable:h=true,...w},f){let[y,P]=U.useState(new Set),[x,S]=U.useState({columnId:null,direction:null}),[k,M]=U.useState({pageIndex:0,pageSize:c[0]||10}),R=n??y,C=d??x,D=g??k,T=z=>{i?i(z):P(z);},I=z=>{m?m(z):S(z);},L=z=>{p?p(z):M(z);},V=U.useMemo(()=>{if(!C.columnId||!C.direction)return t;let z=a.find(F=>F.id===C.columnId);return z?[...t].sort((F,ae)=>{let G=z.accessor(F),ge=z.accessor(ae);if(G===ge)return 0;if(G==null)return 1;if(ge==null)return -1;let ro=String(G).localeCompare(String(ge),void 0,{numeric:true});return C.direction==="asc"?ro:-ro}):t},[t,C,a]),E=U.useMemo(()=>{if(!u)return V;let z=D.pageIndex*D.pageSize;return V.slice(z,z+D.pageSize)},[V,u,D]),A=Math.ceil(V.length/D.pageSize),B=z=>{if(z){let F=new Set(E.map((ae,G)=>s(ae,G)));T(F);}else T(new Set);},H=(z,F)=>{let ae=new Set(R);F?ae.add(z):ae.delete(z),T(ae);},Q=E.length>0&&E.every((z,F)=>R.has(s(z,F))),te=E.some((z,F)=>R.has(s(z,F))),J=z=>{if(!a.find(G=>G.id===z)?.sortable&&!l)return;let ae="asc";C.columnId===z&&(C.direction==="asc"?ae="desc":C.direction==="desc"&&(ae=null)),I({columnId:ae?z:null,direction:ae});},nt=z=>C.columnId!==z?jsx(ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):C.direction==="asc"?jsx(ChevronUp,{className:"h-4 w-4"}):jsx(ChevronDown,{className:"h-4 w-4"});return jsxs("div",{ref:f,className:o("w-full",e),...w,children:[jsx("div",{className:"relative w-full overflow-auto rounded-md border",children:jsxs("table",{className:"w-full caption-bottom text-sm",children:[jsx("thead",{className:"[&_tr]:border-b bg-muted/50",children:jsxs("tr",{children:[r&&jsx("th",{className:"h-12 w-12 px-4",children:jsx(so,{checked:Q?true:te?"indeterminate":false,onCheckedChange:B,"aria-label":"Select all"})}),a.map(z=>{let F=z.sortable??l;return jsx("th",{className:o("h-12 px-4 text-left align-middle font-medium text-muted-foreground",F&&"cursor-pointer select-none hover:text-foreground"),style:{width:z.width},onClick:()=>F&&J(z.id),children:jsxs("div",{className:"flex items-center gap-2",children:[z.header,F&&nt(z.id)]})},z.id)})]})}),jsx("tbody",{className:"[&_tr:last-child]:border-0",children:N?jsx("tr",{children:jsx("td",{colSpan:a.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:"Loading..."})}):E.length===0?jsx("tr",{children:jsx("td",{colSpan:a.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:v})}):E.map((z,F)=>{let ae=s(z,F),G=R.has(ae);return jsxs("tr",{className:o("border-b transition-colors",h&&"hover:bg-muted/50",b&&F%2===1&&"bg-muted/30",G&&"bg-muted"),"data-state":G?"selected":void 0,children:[r&&jsx("td",{className:"w-12 px-4",children:jsx(so,{checked:G,onCheckedChange:ge=>H(ae,!!ge),"aria-label":`Select row ${F+1}`})}),a.map(ge=>jsx("td",{className:"p-4 align-middle",children:ge.cell?ge.cell(z,F):ge.accessor(z)},ge.id))]},ae)})})]})}),u&&jsxs("div",{className:"flex items-center justify-between px-2 py-4",children:[jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsx("span",{children:"Rows per page:"}),jsx("select",{value:D.pageSize,onChange:z=>L({pageIndex:0,pageSize:Number(z.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:c.map(z=>jsx("option",{value:z,children:z},z))})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",D.pageIndex+1," of ",A||1]}),jsxs("div",{className:"flex gap-1",children:[jsx("button",{onClick:()=>L({...D,pageIndex:D.pageIndex-1}),disabled:D.pageIndex===0,className:"inline-flex h-8 w-8 items-center justify-center rounded-md border bg-transparent hover:bg-muted disabled:opacity-50 disabled:pointer-events-none","aria-label":"Previous page",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx("button",{onClick:()=>L({...D,pageIndex:D.pageIndex+1}),disabled:D.pageIndex>=A-1,className:"inline-flex h-8 w-8 items-center justify-center rounded-md border bg-transparent hover:bg-muted disabled:opacity-50 disabled:pointer-events-none","aria-label":"Next page",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var iw=U.forwardRef(nw);var Lu=cva("",{variants:{size:{sm:"[--tree-indent:12px] [--tree-item-height:28px] text-xs",md:"[--tree-indent:16px] [--tree-item-height:32px] text-sm",lg:"[--tree-indent:20px] [--tree-item-height:40px] text-base"}},defaultVariants:{size:"md"}}),Iu=U.forwardRef(({className:e,size:t,data:a,defaultExpandedIds:r=[],expandedIds:n,onExpandedChange:i,selectedId:s,onSelect:l,showIcons:d=true,leafIcon:m=jsx(File,{className:"h-4 w-4"}),folderIcon:u=jsx(Folder,{className:"h-4 w-4"}),folderOpenIcon:c=jsx(FolderOpen,{className:"h-4 w-4"}),defaultExpandAll:g=false,...p},v)=>{let N=U.useCallback(x=>x.reduce((S,k)=>k.children?.length?[...S,k.id,...N(k.children)]:S,[]),[]),[b,h]=U.useState(()=>g?N(a):r),w=n??b,f=x=>{i?i(x):h(x);},y=x=>{w.includes(x)?f(w.filter(S=>S!==x)):f([...w,x]);},P=(x,S=0)=>{let k=x.children&&x.children.length>0,M=w.includes(x.id),R=s===x.id,C=()=>{x.disabled||l?.(x);},D=I=>{I.stopPropagation(),k&&y(x.id);},T=()=>x.icon?x.icon:k?M?c:u:m;return jsxs("div",{role:"treeitem","aria-expanded":k?M:void 0,children:[jsxs("div",{className:o("flex items-center gap-1 rounded-md px-2 cursor-pointer transition-colors","h-[var(--tree-item-height)]","hover:bg-muted/50",R&&"bg-primary/10 text-primary",x.disabled&&"opacity-50 cursor-not-allowed"),style:{paddingLeft:`calc(${S} * var(--tree-indent) + 8px)`},onClick:C,children:[jsx("button",{type:"button",className:o("flex h-5 w-5 items-center justify-center rounded hover:bg-muted",!k&&"invisible"),onClick:D,tabIndex:-1,"aria-label":M?"Collapse":"Expand",children:M?jsx(ChevronDown,{className:"h-4 w-4"}):jsx(ChevronRight,{className:"h-4 w-4"})}),d&&jsx("span",{className:"flex-shrink-0 text-muted-foreground",children:T()}),jsx("span",{className:"truncate",children:x.name})]}),k&&M&&jsx("div",{role:"group",children:x.children.map(I=>P(I,S+1))})]},x.id)};return jsx("div",{ref:v,role:"tree",className:o(Lu({size:t,className:e})),...p,children:a.map(x=>P(x))})});Iu.displayName="TreeView";var Hu=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),vw=({text:e,query:t})=>{if(!t)return jsx(Fragment,{children:e});let a=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),r=e.split(a);return jsx(Fragment,{children:r.map((n,i)=>a.test(n)?jsx("mark",{className:"bg-primary/20 text-foreground rounded-sm",children:n},i):jsx("span",{children:n},i))})},hw=(e,t)=>{let[a,r]=U.useState(e);return U.useEffect(()=>{let n=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(n);}},[e,t]),a},Au=U.forwardRef(({className:e,size:t,value:a,defaultValue:r="",onChange:n,onSelect:i,options:s=[],loadOptions:l,debounceMs:d=300,minChars:m=0,placeholder:u="Type to search...",emptyText:c="No results found.",loadingText:g="Loading...",clearable:p=false,freeSolo:v=true,maxHeight:N=200,highlightMatch:b=true,disabled:h,...w},f)=>{let[y,P]=U.useState(false),[x,S]=U.useState(r),[k,M]=U.useState([]),[R,C]=U.useState(false),D=U.useRef(null),T=a!==void 0?a:x,I=hw(T,d);U.useImperativeHandle(f,()=>D.current);let L=l?k:s,V=U.useMemo(()=>l?L:L.filter(F=>F.label.toLowerCase().includes(T.toLowerCase())),[L,T,l]);U.useEffect(()=>{if(!l)return;if(I.length<m){M([]);return}let F=false;return (async()=>{C(true);try{let G=await l(I);F||M(G);}catch{F||M([]);}finally{F||C(false);}})(),()=>{F=true;}},[I,l,m]);let E=F=>{a===void 0&&S(F),n?.(F);},A=F=>{let ae=F.target.value;E(ae),ae.length>=m&&P(true);},B=F=>{E(F.label),i?.(F),P(false);},H=()=>{E(""),D.current?.focus();},Q=()=>{T.length>=m&&(V.length>0||R)&&P(true);},te=F=>{F.key==="Escape"&&P(false),F.key==="ArrowDown"&&!y&&V.length>0&&P(true);},J=y&&T.length>=m,nt=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",z=p&&T?"pr-8":"pr-3";return jsxs(ve,{open:J,onOpenChange:P,children:[jsx(Ui,{asChild:true,children:jsxs("div",{className:"relative w-full",children:[jsx("input",{ref:D,type:"text",value:T,onChange:A,onFocus:Q,onKeyDown:te,disabled:h,placeholder:u,className:o(Hu({size:t}),z,e),role:"combobox","aria-expanded":J,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...w}),p&&T&&!h&&jsx("button",{type:"button",onClick:H,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:jsx(X,{className:nt})})]})}),jsx(ue,{className:"w-[--radix-popover-trigger-width] p-0",align:"start",onOpenAutoFocus:F=>F.preventDefault(),children:jsx(Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsx(Command.List,{id:"autocomplete-list",className:"overflow-y-auto p-1",style:{maxHeight:N},children:R?jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsx(Loader2,{className:o(nt,"animate-spin")}),g]}):V.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c}):V.map(F=>jsxs(Command.Item,{value:F.value,disabled:F.disabled,onSelect:()=>B(F),className:o("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground"),children:[jsx(Check,{className:o("mr-2 h-4 w-4 shrink-0",T===F.label?"opacity-100":"opacity-0")}),jsx("span",{className:"flex-1",children:b?jsx(vw,{text:F.label,query:T}):F.label})]},F.value))})})})]})});Au.displayName="Autocomplete";var Ns=U.createContext(null),Ps=U.createContext(null),Cs=()=>{let e=U.useContext(Ns);if(!e)throw new Error("useFormContext must be used within a Form");return e},Hn=()=>{let e=U.useContext(Ps);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},xw={required:(e="This field is required")=>({validate:t=>typeof t=="string"?t.trim().length>0:Array.isArray(t)?t.length>0:t!=null,message:e}),minLength:(e,t)=>({validate:a=>typeof a=="string"&&a.length>=e,message:t??`Must be at least ${e} characters`}),maxLength:(e,t)=>({validate:a=>typeof a=="string"&&a.length<=e,message:t??`Must be at most ${e} characters`}),min:(e,t)=>({validate:a=>typeof a=="number"&&a>=e,message:t??`Must be at least ${e}`}),max:(e,t)=>({validate:a=>typeof a=="number"&&a<=e,message:t??`Must be at most ${e}`}),email:(e="Invalid email address")=>({validate:t=>typeof t=="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),message:e}),pattern:(e,t="Invalid format")=>({validate:a=>typeof a=="string"&&e.test(a),message:t}),custom:(e,t)=>({validate:e,message:t})},zu=U.forwardRef(({defaultValues:e={},onSubmit:t,onError:a,validateOnBlur:r=true,validateOnChange:n=false,children:i,className:s,...l},d)=>{let[m,u]=U.useState(e),[c,g]=U.useState({}),[p,v]=U.useState({}),[N,b]=U.useState({}),[h,w]=U.useState(false),f=U.useRef(new Map),y=U.useCallback((L,V)=>{f.current.set(L,V);},[]),P=U.useCallback(L=>{f.current.delete(L);},[]),x=U.useCallback(L=>{let V=f.current.get(L)||[],E=m[L];for(let A of V)if(!A.validate(E))return g(B=>({...B,[L]:A.message})),false;return g(A=>({...A,[L]:null})),true},[m]),S=U.useCallback(()=>{let L=true,V={};return f.current.forEach((E,A)=>{let B=m[A];for(let H of E)if(!H.validate(B)){V[A]=H.message,L=false;break}V[A]||(V[A]=null);}),g(V),L},[m]),k=U.useCallback((L,V)=>{u(E=>({...E,[L]:V})),b(E=>({...E,[L]:true})),n&&setTimeout(()=>{x(L);},0);},[n,x]),M=U.useCallback((L,V)=>{g(E=>({...E,[L]:V}));},[]),R=U.useCallback((L,V)=>{v(E=>({...E,[L]:V})),V&&r&&x(L);},[r,x]),C=U.useCallback(L=>({value:m[L],error:c[L]??null,touched:p[L]??false,dirty:N[L]??false}),[m,c,p,N]),D=U.useCallback(()=>{u(e),g({}),v({}),b({});},[e]),T=async L=>{L.preventDefault();let V={};if(f.current.forEach((A,B)=>{V[B]=true;}),v(V),!S()){a?.(c);return}if(t){w(true);try{await t(m);}finally{w(false);}}},I={values:m,errors:c,touched:p,dirty:N,isSubmitting:h,setValue:k,setError:M,setTouched:R,validateField:x,validateAll:S,registerField:y,unregisterField:P,getFieldState:C,reset:D};return jsx(Ns.Provider,{value:I,children:jsx("form",{ref:d,onSubmit:T,className:o("space-y-4",s),...l,children:i})})});zu.displayName="Form";var Bu=({name:e,rules:t=[],defaultValue:a,children:r})=>{let n=Cs(),i=U.useId();U.useEffect(()=>(n.registerField(e,t),a!==void 0&&n.values[e]===void 0&&n.setValue(e,a),()=>{n.unregisterField(e);}),[e,t,a,n]);let s=n.getFieldState(e),l={name:e,id:`${i}-${e}`,value:s.value,error:s.error,touched:s.touched,dirty:s.dirty};return jsx(Ps.Provider,{value:l,children:r})};Bu.displayName="FormField";var Fu=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("space-y-1.5",e),...t}));Fu.displayName="FormItem";var Ou=U.forwardRef(({className:e,required:t,children:a,...r},n)=>{let{id:i,error:s,touched:l}=Hn();return jsxs(za,{ref:n,htmlFor:i,className:o(s&&l&&"text-danger",e),...r,children:[a,t&&jsx("span",{className:"ml-1 text-danger",children:"*"})]})});Ou.displayName="FormLabel";var Gu=({children:e})=>{let{name:t,id:a,error:r,touched:n}=Hn(),i=Cs(),s=i.getFieldState(t),l=m=>{let u=m.target,c=u.type==="checkbox"?u.checked:u.value;i.setValue(t,c);},d=()=>{i.setTouched(t,true);};return U.cloneElement(e,{id:a,name:t,value:s.value??"",onChange:l,onBlur:d,"aria-invalid":r&&n?"true":void 0,"aria-describedby":r&&n?`${a}-error`:void 0})};Gu.displayName="FormControl";var Wu=U.forwardRef(({className:e,...t},a)=>jsx("p",{ref:a,className:o("text-xs text-muted-foreground",e),...t}));Wu.displayName="FormDescription";var $u=U.forwardRef(({className:e,message:t,...a},r)=>{let{id:n,error:i,touched:s}=Hn(),l=t??(s?i:null);return l?jsx("p",{ref:r,id:`${n}-error`,className:o("text-xs text-danger",e),role:"alert",...a,children:l}):null});$u.displayName="FormMessage";var Ku=cva("inline-flex items-center gap-3",{variants:{size:{sm:"[&_[data-user-avatar]]:h-8 [&_[data-user-avatar]]:w-8",md:"[&_[data-user-avatar]]:h-10 [&_[data-user-avatar]]:w-10",lg:"[&_[data-user-avatar]]:h-12 [&_[data-user-avatar]]:w-12"}},defaultVariants:{size:"md"}}),Uu=U.forwardRef(({className:e,size:t,name:a,description:r,avatarUrl:n,avatarFallback:i,trailing:s,...l},d)=>{let m=i||a.split(" ").map(u=>u[0]).join("").toUpperCase().slice(0,2);return jsxs("div",{ref:d,className:o(Ku({size:t,className:e})),...l,children:[jsxs(Ba,{"data-user-avatar":true,children:[n&&jsx(br,{src:n,alt:a}),jsx(Fa,{children:m})]}),jsxs("div",{className:"flex flex-col min-w-0",children:[jsx("span",{className:"text-sm font-medium leading-none truncate",children:a}),r&&jsx("span",{className:"text-sm text-muted-foreground truncate",children:r})]}),s&&jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});Uu.displayName="User";var ju=cva("font-mono rounded",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-transparent",ghost:"bg-transparent",soft:"bg-muted text-foreground",surface:"bg-muted/50 text-foreground border border-border"},size:{sm:"px-1 py-0.5 text-xs",md:"px-1.5 py-0.5 text-sm",lg:"px-2 py-1 text-base"}},defaultVariants:{variant:"soft",size:"md"}}),Xu=U.forwardRef(({className:e,variant:t,size:a,...r},n)=>jsx("code",{ref:n,className:o(ju({variant:t,size:a,className:e})),...r}));Xu.displayName="Code";var qu=cva("relative flex items-center gap-2 font-mono rounded-lg border",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-transparent border-input",ghost:"bg-transparent border-transparent",soft:"bg-muted border-muted",surface:"bg-muted/50 border-border"},size:{sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-base"}},defaultVariants:{variant:"surface",size:"md"}}),Zu=U.forwardRef(({className:e,variant:t,size:a,code:r,copyable:n=true,copyLabel:i="Copy",onCopy:s,symbol:l="$",hideSymbol:d=false,...m},u)=>{let[c,g]=U.useState(false),p=async()=>{try{await navigator.clipboard.writeText(r),g(!0),s?.(),setTimeout(()=>g(!1),2e3);}catch(v){console.error("Failed to copy:",v);}};return jsxs("div",{ref:u,className:o(qu({variant:t,size:a,className:e})),...m,children:[!d&&jsx("span",{className:"text-muted-foreground select-none",children:l}),jsx("code",{className:"flex-1 truncate",children:r}),n&&jsx("button",{type:"button",onClick:p,className:o("flex-shrink-0 rounded p-1 transition-colors","hover:bg-black/10 dark:hover:bg-white/10","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":c?"Copied":i,children:c?jsx(Check,{className:"h-4 w-4 text-green-500"}):jsx(Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});Zu.displayName="Snippet";var Ms=cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),Qu=U.forwardRef(({className:e,radius:t,src:a,alt:r,fallback:n,showSkeleton:i=true,onLoad:s,onError:l,fit:d="cover",aspectRatio:m,style:u,...c},g)=>{let[p,v]=U.useState("loading");U.useEffect(()=>{a&&v("loading");},[a]);let N=()=>{v("loaded"),s?.();},b=()=>{v("error"),l?.();},h={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}[d];return p==="error"&&n?jsx("div",{className:o(Ms({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:m,...u},children:n}):jsxs("div",{className:o(Ms({radius:t}),"relative",e),style:{aspectRatio:m,...u},children:[p==="loading"&&i&&jsx(en,{className:"absolute inset-0 h-full w-full"}),jsx("img",{ref:g,src:a,alt:r,onLoad:N,onError:b,className:o("h-full w-full transition-opacity duration-300",h,p==="loading"?"opacity-0":"opacity-100"),...c})]})});Qu.displayName="Image";var tf=cva("flex flex-col rounded-lg border bg-background",{variants:{size:{sm:"p-1 gap-0.5",md:"p-1.5 gap-1",lg:"p-2 gap-1.5"}},defaultVariants:{size:"md"}}),af=cva("relative flex cursor-pointer select-none items-center rounded-md outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{size:{sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}},defaultVariants:{size:"md"}}),rf=U.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),of=U.forwardRef(({className:e,size:t="md",value:a,defaultValue:r="",onValueChange:n,multiple:i=false,children:s,...l},d)=>{let[m,u]=U.useState(r),c=a??m,g=p=>{let v;if(i){let N=Array.isArray(c)?c:[c].filter(Boolean);N.includes(p)?v=N.filter(b=>b!==p):v=[...N,p];}else v=p;n?n(v):u(v);};return jsx(rf.Provider,{value:{value:c,onValueChange:g,multiple:i,size:t??"md"},children:jsx("div",{ref:d,role:"listbox","aria-multiselectable":i,className:o(tf({size:t,className:e})),...l,children:s})})});of.displayName="Listbox";var nf=U.forwardRef(({className:e,value:t,disabled:a,icon:r,description:n,children:i,...s},l)=>{let{value:d,onValueChange:m,multiple:u,size:c}=U.useContext(rf),g=u?Array.isArray(d)&&d.includes(t):d===t,p=()=>{a||m(t);},v=N=>{(N.key==="Enter"||N.key===" ")&&!a&&(N.preventDefault(),m(t));};return jsxs("div",{ref:l,role:"option","aria-selected":g,"data-disabled":a?"":void 0,tabIndex:a?-1:0,className:o(af({size:c}),g&&"bg-accent text-accent-foreground",e),onClick:p,onKeyDown:v,...s,children:[r&&jsx("span",{className:"mr-2 flex-shrink-0",children:r}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:i}),n&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:n})]}),g&&jsx(Check,{className:"ml-2 h-4 w-4 flex-shrink-0"})]})});nf.displayName="ListboxItem";var lf=cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),df=cva("flex items-center gap-3 bg-background transition-all",{variants:{variant:{default:"rounded-lg border p-3",bordered:"p-3",cards:"rounded-lg border p-3 shadow-sm"},size:{sm:"p-2 text-sm",md:"p-3 text-sm",lg:"p-4 text-base"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg z-10",false:""},isDragOver:{true:"border-primary border-dashed",false:""}},defaultVariants:{variant:"default",size:"md",isDragging:false,isDragOver:false}});function Lw({className:e,variant:t,size:a,items:r,onReorder:n,renderItem:i,showHandle:s=true,disabled:l=false,...d},m){let[u,c]=U.useState(null),[g,p]=U.useState(null),v=(f,y)=>{l||(c(y),f.dataTransfer.effectAllowed="move",f.dataTransfer.setData("text/plain",String(y)));},N=(f,y)=>{f.preventDefault(),!(l||u===null||u===y)&&p(y);},b=()=>{p(null);},h=(f,y)=>{if(f.preventDefault(),l||u===null||u===y){c(null),p(null);return}let P=[...r],[x]=P.splice(u,1);P.splice(y,0,x),n?.(P),c(null),p(null);},w=()=>{c(null),p(null);};return jsx("div",{ref:m,className:o(lf({variant:t,size:a,className:e})),...d,children:r.map((f,y)=>jsxs("div",{draggable:!l,onDragStart:P=>v(P,y),onDragOver:P=>N(P,y),onDragLeave:b,onDrop:P=>h(P,y),onDragEnd:w,className:o(df({variant:t,size:a,isDragging:u===y,isDragOver:g===y}),!l&&"cursor-move"),children:[s&&jsx("div",{className:o("flex-shrink-0 text-muted-foreground",l?"opacity-30":"cursor-grab active:cursor-grabbing"),children:jsx(GripVertical,{className:"h-5 w-5"})}),jsx("div",{className:"flex-1 min-w-0",children:i(f,y)})]},f.id))})}var Iw=U.forwardRef(Lw);var pf=cva("absolute inset-0 z-50 flex items-center justify-center transition-opacity",{variants:{variant:{solid:"bg-background",soft:"bg-background/80 backdrop-blur-sm",ghost:"bg-background/50"},visible:{true:"opacity-100 pointer-events-auto",false:"opacity-0 pointer-events-none"}},defaultVariants:{variant:"soft",visible:true}}),zw={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},uf=U.forwardRef(({className:e,variant:t,loading:a=true,size:r="md",spinner:n,text:i,children:s,...l},d)=>jsxs("div",{ref:d,className:o("relative",e),...l,children:[s,jsx("div",{className:o(pf({variant:t,visible:a})),"aria-hidden":!a,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[n||jsx(Loader2,{className:o(zw[r],"animate-spin text-primary")}),i&&jsx("span",{className:"text-sm text-muted-foreground",children:i})]})})]}));uf.displayName="LoadingOverlay";var ff=cva("fixed top-0 left-0 z-[9999] h-0.5 transition-all duration-200 ease-out",{variants:{color:{primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"}},defaultVariants:{color:"primary"}}),gf=U.forwardRef(({className:e,color:t,isLoading:a=false,progress:r,showSpinner:n=false,...i},s)=>{let[l,d]=U.useState(0),[m,u]=U.useState(false),c=U.useRef(null);return U.useEffect(()=>{if(r!==void 0){d(r),u(r>0&&r<100);return}return a?(u(true),d(10),c.current=setInterval(()=>{d(g=>{if(g>=90)return g;let p=Math.random()*10;return Math.min(g+p,90)});},500)):l>0&&(d(100),setTimeout(()=>{u(false),d(0);},200)),()=>{c.current&&clearInterval(c.current);}},[a,r]),!m&&r===void 0||r!==void 0&&(r<=0||r>=100)?null:jsxs(Fragment,{children:[jsx("div",{ref:s,className:o(ff({color:t,className:e})),style:{width:`${l}%`},role:"progressbar","aria-valuenow":l,"aria-valuemin":0,"aria-valuemax":100,...i,children:jsx("div",{className:"absolute right-0 h-full w-24 -translate-y-1 rotate-3 bg-inherit opacity-50 blur-sm"})}),n&&m&&jsx("div",{className:"fixed top-4 right-4 z-[9999]",children:jsx("div",{className:o("h-4 w-4 animate-spin rounded-full border-2 border-transparent",t==="primary"&&"border-t-primary",t==="secondary"&&"border-t-secondary",t==="success"&&"border-t-success",t==="warning"&&"border-t-warning",t==="danger"&&"border-t-danger",t==="info"&&"border-t-info")})})]})});gf.displayName="NProgress";var xf=cva("flex items-center justify-center",{variants:{variant:{spinner:"",dots:"",pulse:"",skeleton:""},size:{sm:"gap-1",md:"gap-2",lg:"gap-3"},fullScreen:{true:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",false:""}},defaultVariants:{variant:"spinner",size:"md",fullScreen:false}}),bf={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},$w={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},yf=U.forwardRef(({className:e,variant:t="spinner",size:a="md",fullScreen:r,text:n,color:i="primary",...s},l)=>{let d={primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"}[i],m=()=>{switch(t){case "dots":return jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(u=>jsx("div",{className:o($w[a||"md"],"animate-bounce rounded-full bg-current",d),style:{animationDelay:`${u*.15}s`}},u))});case "pulse":return jsx("div",{className:o(bf[a||"md"],"animate-pulse rounded-full bg-current",d)});case "skeleton":return jsxs("div",{className:"w-full space-y-2",children:[jsx("div",{className:"h-4 w-3/4 animate-pulse rounded bg-muted"}),jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-muted"}),jsx("div",{className:"h-4 w-5/6 animate-pulse rounded bg-muted"})]});default:return jsx(Loader2,{className:o(bf[a||"md"],"animate-spin",d)})}};return jsx("div",{ref:l,className:o(xf({variant:t,size:a,fullScreen:r,className:e})),role:"status","aria-label":n||"Loading",...s,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[m(),n&&jsx("span",{className:o("text-sm",d),children:n})]})})});yf.displayName="Loading";var Vs=class extends U.Component{constructor(t){super(t),this.state={hasError:false,error:null};}static getDerivedStateFromError(t){return {hasError:true,error:t}}componentDidCatch(t,a){this.props.onError?.(t,a);}componentDidUpdate(t){this.state.hasError&&this.props.resetKeys&&this.props.resetKeys.some((r,n)=>r!==t.resetKeys?.[n])&&this.reset();}reset=()=>{this.props.onReset?.(),this.setState({hasError:false,error:null});};render(){return this.state.hasError?this.props.fallback?this.props.fallback:jsx(Ls,{error:this.state.error,onReset:this.reset}):this.props.children}},Ls=U.forwardRef(({error:e,onReset:t,className:a},r)=>jsxs("div",{ref:r,className:o("flex min-h-[200px] flex-col items-center justify-center gap-4 rounded-lg border border-danger/20 bg-danger/5 p-6 text-center",a),role:"alert",children:[jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-danger/10",children:jsx(AlertTriangle,{className:"h-6 w-6 text-danger"})}),jsxs("div",{className:"space-y-2",children:[jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Something went wrong"}),e&&jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:e.message||"An unexpected error occurred"})]}),t&&jsxs("button",{onClick:t,className:"inline-flex items-center gap-2 rounded-md bg-danger px-4 py-2 text-sm font-medium text-danger-foreground hover:bg-danger/90 transition-colors",children:[jsx(RefreshCw,{className:"h-4 w-4"}),"Try again"]})]}));Ls.displayName="DefaultErrorFallback";var Uw=Vs;var wf=U.forwardRef(({value:e,defaultValue:t,onValueChange:a,placeholder:r="Pick a date range",dateFormat:n="LLL dd, y",disabled:i=false,minDate:s,maxDate:l,numberOfMonths:d=2,className:m,align:u="start"},c)=>{let[g,p]=U.useState(false),[v,N]=U.useState(t),b=e!==void 0,h=b?e:v,w=y=>{b||N(y),a?.(y);},f=y=>{if(!y)return r;let{from:P,to:x}=y;return P&&x?`${format(P,n)} - ${format(x,n)}`:P?format(P,n):r};return jsxs(ve,{open:g,onOpenChange:p,children:[jsx(Re,{asChild:true,children:jsxs(O,{ref:c,variant:"bordered",disabled:i,className:o("w-full justify-start text-left font-normal",!h?.from&&"text-muted-foreground",m),children:[jsx(Calendar,{className:"mr-2 h-4 w-4"}),f(h)]})}),jsx(ue,{className:"w-auto p-0",align:u,children:jsx(Rr,{mode:"range",defaultMonth:h?.from,selected:h,onSelect:w,numberOfMonths:d,disabled:y=>!!(s&&y<s||l&&y>l),initialFocus:true})})]})});wf.displayName="DateRangePicker";var Ar=e=>String(e).padStart(2,"0"),Nf=U.forwardRef(({value:e,onValueChange:t,placeholder:a="Pick a time",use24Hour:r=true,minuteStep:n=1,disabled:i=false,className:s},l)=>{let[d,m]=U.useState(false),u=r?Array.from({length:24},(f,y)=>y):Array.from({length:12},(f,y)=>y+1),c=Array.from({length:Math.floor(60/n)},(f,y)=>y*n),g=f=>{if(!f)return a;if(r)return `${Ar(f.hours)}:${Ar(f.minutes)}`;let y=f.hours%12||12,P=f.hours>=12?"PM":"AM";return `${Ar(y)}:${Ar(f.minutes)} ${P}`},p=f=>{let y=e?.minutes??0,P=f;if(!r&&e){let x=e.hours>=12;x&&f!==12?P=f+12:!x&&f===12&&(P=0);}t?.({hours:P,minutes:y});},v=f=>{let y=e?.hours??0;t?.({hours:y,minutes:f});},N=f=>{if(!e)return;let y=e.hours;f==="AM"&&e.hours>=12?y=e.hours-12:f==="PM"&&e.hours<12&&(y=e.hours+12),t?.({hours:y,minutes:e.minutes});},b=()=>{let f=new Date;t?.({hours:f.getHours(),minutes:f.getMinutes()});},h=e?e.hours>=12?"PM":"AM":void 0,w=e?r?e.hours:e.hours%12||12:void 0;return jsxs(ve,{open:d,onOpenChange:m,children:[jsx(Re,{asChild:true,children:jsxs(O,{ref:l,variant:"bordered",disabled:i,className:o("w-full justify-start text-left font-normal",!e&&"text-muted-foreground",s),children:[jsx(Clock,{className:"mr-2 h-4 w-4"}),g(e)]})}),jsxs(ue,{className:"w-auto p-0",align:"start",children:[jsxs("div",{className:"flex",children:[jsxs("div",{className:"flex flex-col",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Hour"}),jsx(dt,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:u.map(f=>jsx(O,{variant:w===f?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(f),children:Ar(f)},f))})})]}),jsxs("div",{className:"flex flex-col border-l",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Min"}),jsx(dt,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:c.map(f=>jsx(O,{variant:e?.minutes===f?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>v(f),children:Ar(f)},f))})})]}),!r&&jsxs("div",{className:"flex flex-col border-l",children:[jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"\xA0"}),jsxs("div",{className:"flex flex-col gap-1 p-1",children:[jsx(O,{variant:h==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>N("AM"),children:"AM"}),jsx(O,{variant:h==="PM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>N("PM"),children:"PM"})]})]})]}),jsxs("div",{className:"flex justify-between border-t p-2",children:[jsx(O,{variant:"ghost",size:"sm",onClick:b,children:"Now"}),jsx(O,{size:"sm",onClick:()=>m(false),children:"Done"})]})]})]})});Nf.displayName="TimePicker";var Pf=cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function qw({className:e,variant:t,items:a,itemHeight:r,height:n,overscan:i=3,renderItem:s,getItemKey:l,gap:d=0,onScrollChange:m,...u},c){let g=U.useRef(null),[p,v]=U.useState(0);U.useImperativeHandle(c,()=>g.current);let N=a.length*(r+d)-d,b=r+d,h=Math.max(0,Math.floor(p/b)-i),w=Math.ceil(n/b)+2*i,f=Math.min(a.length-1,h+w),y=x=>{let S=x.currentTarget.scrollTop;v(S),m?.(S);},P=U.useMemo(()=>{let x=[];for(let S=h;S<=f;S++)a[S]!==void 0&&x.push({item:a[S],index:S,style:{position:"absolute",top:S*b,left:0,right:0,height:r}});return x},[a,h,f,b,r]);return jsx("div",{ref:g,className:o(Pf({variant:t,className:e})),style:{height:n,position:"relative"},onScroll:y,...u,children:jsx("div",{style:{height:N,position:"relative"},children:P.map(({item:x,index:S,style:k})=>jsx("div",{style:k,children:s(x,S)},l?l(x,S):S))})})}var Zw=U.forwardRef(qw);var Sf=cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),Hs=cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),Tf=U.forwardRef(({className:e,variant:t,size:a,children:r,onLoadMore:n,hasMore:i,isLoading:s=false,loader:l,threshold:d=100,rootMargin:m,useWindow:u=false,endMessage:c,...g},p)=>{let v=U.useRef(null),N=U.useRef(null),b=U.useRef(false);U.useImperativeHandle(p,()=>v.current),U.useEffect(()=>{let w=N.current;if(!w)return;let f=new IntersectionObserver(y=>{let[P]=y;P.isIntersecting&&i&&!s&&!b.current&&(b.current=true,Promise.resolve(n()).finally(()=>{b.current=false;}));},{root:u?null:v.current,rootMargin:m||`${d}px`,threshold:0});return f.observe(w),()=>{f.disconnect();}},[i,s,n,d,m,u]);let h=jsx("div",{className:o(Hs({size:a})),children:jsx(Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})});return jsxs("div",{ref:v,className:o(Sf({variant:t,className:e})),...g,children:[r,jsx("div",{ref:N,className:"h-px w-full"}),s&&(l||h),!i&&!s&&c&&jsx("div",{className:o(Hs({size:a}),"text-muted-foreground text-sm"),children:c})]})});Tf.displayName="InfiniteScroll";var Df=cva("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),As=cva("fixed left-[50%] top-[50%] z-50 grid translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",{variants:{size:{sm:"w-full max-w-sm",md:"w-full max-w-lg",lg:"w-full max-w-2xl",xl:"w-full max-w-4xl",full:"w-[calc(100vw-2rem)] h-[calc(100vh-2rem)] max-w-none"}},defaultVariants:{size:"md"}}),Vf=U.forwardRef(({open:e,onOpenChange:t,children:a,trigger:r,title:n,description:i,footer:s,showCloseButton:l=true,closeOnOverlayClick:d=true,closeOnEscape:m=true,size:u,className:c,contentClassName:g},p)=>jsxs(oe.Root,{open:e,onOpenChange:t,children:[r&&jsx(oe.Trigger,{asChild:true,children:r}),jsxs(oe.Portal,{children:[jsx(oe.Overlay,{className:o(Df(),c),onClick:d?void 0:v=>v.stopPropagation()}),jsxs(oe.Content,{ref:p,className:o(As({size:u}),g),onEscapeKeyDown:m?void 0:v=>v.preventDefault(),onPointerDownOutside:d?void 0:v=>v.preventDefault(),children:[(n||i)&&jsxs("div",{className:"flex flex-col space-y-1.5 text-center sm:text-left",children:[n&&jsx(oe.Title,{className:"text-lg font-semibold leading-none tracking-tight",children:n}),i&&jsx(oe.Description,{className:"text-sm text-muted-foreground",children:i})]}),a,s&&jsx("div",{className:"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",children:s}),l&&jsxs(oe.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]})]}));Vf.displayName="Modal";var eN=oe.Root,tN=oe.Trigger,Lf=oe.Portal,aN=oe.Close,zs=U.forwardRef(({className:e,...t},a)=>jsx(oe.Overlay,{ref:a,className:o(Df(),e),...t}));zs.displayName="ModalOverlay";var If=U.forwardRef(({className:e,children:t,size:a,showCloseButton:r=true,...n},i)=>jsxs(Lf,{children:[jsx(zs,{}),jsxs(oe.Content,{ref:i,className:o(As({size:a}),e),...n,children:[t,r&&jsxs(oe.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}));If.displayName="ModalContent";var Ef=({className:e,...t})=>jsx("div",{className:o("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ef.displayName="ModalHeader";var Hf=({className:e,...t})=>jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Hf.displayName="ModalFooter";var Af=U.forwardRef(({className:e,...t},a)=>jsx(oe.Title,{ref:a,className:o("text-lg font-semibold leading-none tracking-tight",e),...t}));Af.displayName="ModalTitle";var zf=U.forwardRef(({className:e,...t},a)=>jsx(oe.Description,{ref:a,className:o("text-sm text-muted-foreground",e),...t}));zf.displayName="ModalDescription";var Ff=cva("h-10 w-10 rounded-full p-2",{variants:{variant:{default:"bg-muted text-foreground",danger:"bg-danger/10 text-danger",warning:"bg-warning/10 text-warning",success:"bg-success/10 text-success",info:"bg-info/10 text-info"}},defaultVariants:{variant:"default"}}),lN=cva("",{variants:{variant:{default:"",danger:"bg-danger text-danger-foreground hover:bg-danger/90",warning:"bg-warning text-warning-foreground hover:bg-warning/90",success:"bg-success text-success-foreground hover:bg-success/90",info:"bg-info text-info-foreground hover:bg-info/90"}},defaultVariants:{variant:"default"}}),dN={default:HelpCircle,danger:XCircle,warning:AlertTriangle,success:CheckCircle,info:Info},Bs=U.forwardRef(({open:e,onOpenChange:t,trigger:a,title:r,description:n,confirmText:i="Confirm",cancelText:s="Cancel",onConfirm:l,onCancel:d,showIcon:m=true,icon:u,variant:c="default",loading:g=false,disabled:p=false,className:v},N)=>{let[b,h]=U.useState(false),w=dN[c||"default"],f=async()=>{if(l){let x=l();if(x instanceof Promise){h(true);try{await x;}finally{h(false);}}}},y=()=>{d?.();},P=g||b;return jsxs(le.Root,{open:e,onOpenChange:t,children:[a&&jsx(le.Trigger,{asChild:true,children:a}),jsxs(le.Portal,{children:[jsx(le.Overlay,{className:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),jsxs(le.Content,{ref:N,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-md translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",v),children:[jsxs("div",{className:"flex flex-col items-center gap-4 sm:flex-row sm:items-start",children:[m&&jsx("div",{className:o(Ff({variant:c})),children:u||jsx(w,{className:"h-6 w-6"})}),jsxs("div",{className:"flex flex-col space-y-2 text-center sm:text-left",children:[jsx(le.Title,{className:"text-lg font-semibold",children:r}),n&&jsx(le.Description,{className:"text-sm text-muted-foreground",children:n})]})]}),jsxs("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:[jsx(le.Cancel,{className:o(Te({variant:"bordered"})),onClick:y,disabled:P,children:s}),jsx(le.Action,{className:o(Te(),lN({variant:c}),P&&"opacity-50 cursor-not-allowed"),onClick:f,disabled:p||P,children:P?jsxs("span",{className:"flex items-center gap-2",children:[jsxs("svg",{className:"h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Loading..."]}):i})]})]})]})]})});Bs.displayName="ConfirmDialog";function cN(){let[e,t]=U.useState({open:false,options:null,resolve:null}),a=U.useCallback(l=>new Promise(d=>{t({open:true,options:l,resolve:d});}),[]),r=U.useCallback(()=>{e.resolve?.(true),t({open:false,options:null,resolve:null});},[e.resolve]),n=U.useCallback(()=>{e.resolve?.(false),t({open:false,options:null,resolve:null});},[e.resolve]),i=U.useCallback(l=>{l||(e.resolve?.(false),t({open:false,options:null,resolve:null}));},[e.resolve]),s=U.useMemo(()=>e.options?jsx(Bs,{open:e.open,onOpenChange:i,title:e.options.title,description:e.options.description,confirmText:e.options.confirmText,cancelText:e.options.cancelText,variant:e.options.variant,onConfirm:r,onCancel:n}):null,[e,r,n,i]);return {confirm:a,ConfirmDialog:s}}var yN=e=>e.map(t=>typeof t=="string"?{src:t}:t),Os=U.forwardRef(({images:e,open:t,onOpenChange:a,initialIndex:r=0,onIndexChange:n,trigger:i,showThumbnails:s=true,showZoom:l=true,showRotate:d=true,showDownload:m=true,showFullscreen:u=true,showNavigation:c=true,showCounter:g=true,closeOnBackdropClick:p=true,className:v},N)=>{let b=U.useMemo(()=>yN(e),[e]),[h,w]=U.useState(r),[f,y]=U.useState(1),[P,x]=U.useState(0),[S,k]=U.useState(false),[M,R]=U.useState(false),[C,D]=U.useState({x:0,y:0}),[T,I]=U.useState({x:0,y:0}),L=U.useRef(null),V=b[h];U.useEffect(()=>{w(r);},[r]),U.useEffect(()=>{n?.(h);},[h,n]),U.useEffect(()=>{y(1),x(0),D({x:0,y:0});},[h]);let E=U.useCallback(()=>{w(G=>G>0?G-1:b.length-1);},[b.length]),A=U.useCallback(()=>{w(G=>G<b.length-1?G+1:0);},[b.length]),B=()=>{y(G=>Math.min(G+.5,4));},H=()=>{y(G=>{let ge=Math.max(G-.5,.5);return ge===1&&D({x:0,y:0}),ge});},Q=()=>{x(G=>(G+90)%360);},te=async()=>{if(V)try{let ge=await(await fetch(V.src)).blob(),ro=URL.createObjectURL(ge),oo=document.createElement("a");oo.href=ro,oo.download=V.alt||`image-${h+1}`,document.body.appendChild(oo),oo.click(),document.body.removeChild(oo),URL.revokeObjectURL(ro);}catch{window.open(V.src,"_blank");}},J=async()=>{if(L.current)if(S)try{await document.exitFullscreen(),k(!1);}catch{}else try{await L.current.requestFullscreen(),k(!0);}catch{}},nt=G=>{f>1&&(R(true),I({x:G.clientX-C.x,y:G.clientY-C.y}));},z=G=>{M&&f>1&&D({x:G.clientX-T.x,y:G.clientY-T.y});},F=()=>{R(false);},ae=U.useCallback(G=>{switch(G.key){case "ArrowLeft":E();break;case "ArrowRight":A();break;case "Escape":a?.(false);break;case "+":case "=":B();break;case "-":H();break}},[E,A,a]);return U.useEffect(()=>{if(t)return window.addEventListener("keydown",ae),()=>window.removeEventListener("keydown",ae)},[t,ae]),U.useEffect(()=>{let G=()=>{k(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",G),()=>document.removeEventListener("fullscreenchange",G)},[]),b.length===0?null:jsxs(oe.Root,{open:t,onOpenChange:a,children:[i&&jsx(oe.Trigger,{asChild:true,children:i}),jsxs(oe.Portal,{children:[jsx(oe.Overlay,{className:"fixed inset-0 z-50 bg-black/90 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",onClick:p?void 0:G=>G.stopPropagation()}),jsxs(oe.Content,{ref:N,className:o("fixed inset-0 z-50 flex flex-col outline-none",v),onPointerDownOutside:p?void 0:G=>G.preventDefault(),children:[jsxs("div",{className:"flex items-center justify-between p-4 text-white",children:[jsxs("div",{className:"flex items-center gap-2",children:[g&&b.length>1&&jsxs("span",{className:"text-sm",children:[h+1," / ",b.length]}),V?.title&&jsx("span",{className:"ml-4 text-sm font-medium",children:V.title})]}),jsxs("div",{className:"flex items-center gap-1",children:[l&&jsxs(Fragment,{children:[jsx("button",{onClick:H,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom out",children:jsx(ZoomOut,{className:"h-5 w-5"})}),jsxs("span",{className:"min-w-[3rem] text-center text-sm",children:[Math.round(f*100),"%"]}),jsx("button",{onClick:B,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom in",children:jsx(ZoomIn,{className:"h-5 w-5"})})]}),d&&jsx("button",{onClick:Q,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Rotate",children:jsx(RotateCw,{className:"h-5 w-5"})}),m&&jsx("button",{onClick:te,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Download",children:jsx(Download,{className:"h-5 w-5"})}),u&&jsx("button",{onClick:J,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:S?"Exit fullscreen":"Fullscreen",children:S?jsx(Minimize2,{className:"h-5 w-5"}):jsx(Maximize2,{className:"h-5 w-5"})}),jsxs(oe.Close,{className:"rounded-full p-2 hover:bg-white/10 transition-colors ml-2",children:[jsx(X,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}),jsxs("div",{ref:L,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:nt,onMouseMove:z,onMouseUp:F,onMouseLeave:F,children:[c&&b.length>1&&jsxs(Fragment,{children:[jsx("button",{onClick:E,className:"absolute left-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsx(ChevronLeft,{className:"h-6 w-6"})}),jsx("button",{onClick:A,className:"absolute right-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsx(ChevronRight,{className:"h-6 w-6"})})]}),jsx("img",{src:V?.src,alt:V?.alt||"",className:o("max-h-full max-w-full object-contain transition-transform duration-200",M?"cursor-grabbing":f>1?"cursor-grab":""),style:{transform:`translate(${C.x}px, ${C.y}px) scale(${f}) rotate(${P}deg)`},draggable:false})]}),V?.description&&jsx("div",{className:"p-4 text-center text-white text-sm",children:V.description}),s&&b.length>1&&jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:b.map((G,ge)=>jsx("button",{onClick:()=>w(ge),className:o("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",h===ge?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsx("img",{src:G.src,alt:G.alt||`Thumbnail ${ge+1}`,className:"h-full w-full object-cover"})},ge))})]})]})]})});Os.displayName="ImageViewer";var Of=({children:e,images:t,index:a=0,className:r})=>{let[n,i]=U.useState(false);return jsxs(Fragment,{children:[jsx("button",{onClick:()=>i(true),className:o("cursor-zoom-in",r),children:e}),jsx(Os,{images:t,open:n,onOpenChange:i,initialIndex:a})]})};Of.displayName="ImageViewerTrigger";var $f=cva("inline-flex items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-input hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),_f=U.forwardRef(({className:e,variant:t,size:a,iconSize:r,...n},i)=>{let l=r??{sm:14,md:16,lg:20}[a??"md"];return jsx("button",{ref:i,type:"button",className:o($f({variant:t,size:a}),e),"aria-label":"Close",...n,children:jsx(X,{style:{width:l,height:l}})})});_f.displayName="CloseButton";var Uf=cva("inline-flex items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",soft:"bg-primary/10 text-primary hover:bg-primary/20",surface:"bg-muted hover:bg-muted/80"},size:{sm:"h-7 w-7",md:"h-9 w-9",lg:"h-11 w-11"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary text-primary-foreground hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/90"},{variant:"solid",color:"success",className:"bg-success text-success-foreground hover:bg-success/90"},{variant:"solid",color:"warning",className:"bg-warning text-warning-foreground hover:bg-warning/90"},{variant:"solid",color:"danger",className:"bg-danger text-danger-foreground hover:bg-danger/90"},{variant:"soft",color:"primary",className:"bg-primary/10 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary/10 text-secondary-foreground hover:bg-secondary/20"},{variant:"soft",color:"success",className:"bg-success/10 text-success hover:bg-success/20"},{variant:"soft",color:"warning",className:"bg-warning/10 text-warning hover:bg-warning/20"},{variant:"soft",color:"danger",className:"bg-danger/10 text-danger hover:bg-danger/20"},{variant:"outline",color:"primary",className:"border-primary text-primary hover:bg-primary/10"},{variant:"outline",color:"success",className:"border-success text-success hover:bg-success/10"},{variant:"outline",color:"warning",className:"border-warning text-warning hover:bg-warning/10"},{variant:"outline",color:"danger",className:"border-danger text-danger hover:bg-danger/10"}],defaultVariants:{variant:"ghost",size:"md",color:"default",radius:"md"}}),Yf=U.forwardRef(({className:e,variant:t,size:a,color:r,radius:n,loading:i,disabled:s,children:l,...d},m)=>jsx("button",{ref:m,type:"button",className:o(Uf({variant:t,size:a,color:r,radius:n}),e),disabled:s||i,...d,children:i?jsxs("svg",{className:"animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",style:{width:"1em",height:"1em"},children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):l}));Yf.displayName="ActionIcon";var qf=({children:e,container:t,disabled:a=false})=>{let[r,n]=U.useState(false);if(U.useEffect(()=>{n(true);},[]),a||!r)return jsx(Fragment,{children:e});let i=null;return typeof t=="string"?i=document.querySelector(t):t instanceof Element?i=t:i=document.body,i?createPortal(e,i):jsx(Fragment,{children:e})};qf.displayName="Portal";var Zf=cva("absolute rounded-full border-2 border-background",{variants:{color:{default:"bg-muted-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},size:{sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3"},position:{"top-right":"top-0 right-0 -translate-y-1/3 translate-x-1/3","top-left":"top-0 left-0 -translate-y-1/3 -translate-x-1/3","bottom-right":"bottom-0 right-0 translate-y-1/3 translate-x-1/3","bottom-left":"bottom-0 left-0 translate-y-1/3 -translate-x-1/3"},ping:{true:"",false:""}},defaultVariants:{color:"primary",size:"md",position:"top-right",ping:false}}),Qf=U.forwardRef(({className:e,color:t,size:a,position:r,ping:n,content:i,show:s=true,offset:l,style:d,...m},u)=>{if(!s)return null;let c=i!=null;return jsxs("span",{ref:u,className:o(Zf({color:t,size:c?void 0:a,position:r,ping:n}),c&&"flex h-auto w-auto min-w-[1.25rem] items-center justify-center px-1 py-0.5 text-[10px] font-medium text-white",e),style:{...d,...l!==void 0&&{transform:`translate(${r?.includes("right")?l:-l}px, ${r?.includes("top")?-l:l}px)`}},...m,children:[n&&jsx("span",{className:o("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",t==="default"&&"bg-muted-foreground",t==="primary"&&"bg-primary",t==="secondary"&&"bg-secondary",t==="success"&&"bg-success",t==="warning"&&"bg-warning",t==="danger"&&"bg-danger")}),i]})});Qf.displayName="Indicator";var Jf=U.forwardRef(({className:e,children:t,...a},r)=>jsx("div",{ref:r,className:o("relative inline-flex",e),...a,children:t}));Jf.displayName="IndicatorWrapper";var tg=cva("relative overflow-auto",{variants:{orientation:{vertical:"",horizontal:"",both:""},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"vertical",size:"md"}}),ag=U.forwardRef(({className:e,orientation:t,size:a,hideScrollbar:r=false,shadowColor:n="rgba(0, 0, 0, 0.1)",children:i,...s},l)=>{let d=U.useRef(null),[m,u]=U.useState({top:false,bottom:false,left:false,right:false});U.useImperativeHandle(l,()=>d.current);let c=U.useCallback(()=>{let h=d.current;if(!h)return;let{scrollTop:w,scrollLeft:f,scrollHeight:y,scrollWidth:P,clientHeight:x,clientWidth:S}=h;u({top:w>0,bottom:w<y-x-1,left:f>0,right:f<P-S-1});},[]);U.useEffect(()=>{let h=d.current;if(h)return c(),h.addEventListener("scroll",c),window.addEventListener("resize",c),()=>{h.removeEventListener("scroll",c),window.removeEventListener("resize",c);}},[c]);let p={sm:"20px",md:"40px",lg:"60px"}[a??"md"],v=t==="vertical"||t==="both",N=t==="horizontal"||t==="both",b={maskImage:[v&&m.top&&`linear-gradient(to bottom, transparent, black ${p})`,v&&m.bottom&&`linear-gradient(to top, transparent, black ${p})`,N&&m.left&&`linear-gradient(to right, transparent, black ${p})`,N&&m.right&&`linear-gradient(to left, transparent, black ${p})`].filter(Boolean).join(", ")||void 0,maskComposite:"intersect",WebkitMaskComposite:"source-in"};return jsx("div",{ref:d,className:o(tg({orientation:t,size:a}),r&&"scrollbar-hide [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",e),style:b,...s,children:i})});ag.displayName="ScrollShadow";var ng=U.forwardRef(({className:e,...t},a)=>jsx(og.Root,{ref:a,className:o(e),...t}));ng.displayName="VisuallyHidden";var ig=cva("inline-flex items-center justify-center font-mono font-medium",{variants:{variant:{default:"rounded border border-border bg-muted text-muted-foreground shadow-sm",outline:"rounded border border-border text-foreground",ghost:"text-muted-foreground"},size:{sm:"min-w-[1.25rem] px-1 py-0.5 text-[10px]",md:"min-w-[1.5rem] px-1.5 py-0.5 text-xs",lg:"min-w-[2rem] px-2 py-1 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),LN={cmd:"\u2318",command:"\u2318",ctrl:"\u2303",control:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7",enter:"\u21B5",return:"\u21B5",backspace:"\u232B",delete:"\u2326",escape:"\u238B",esc:"\u238B",tab:"\u21E5",space:"\u2423",up:"\u2191",down:"\u2193",left:"\u2190",right:"\u2192",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2912",end:"\u2913",capslock:"\u21EA"},IN=e=>{let t=e.toLowerCase();return LN[t]||e.toUpperCase()},sg=U.forwardRef(({className:e,variant:t,size:a,keys:r,children:n,...i},s)=>{let l=()=>r?(Array.isArray(r)?r:[r]).map((m,u)=>jsxs(U.Fragment,{children:[u>0&&jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsx("span",{children:IN(m)})]},u)):n;return jsx("kbd",{ref:s,className:o(ig({variant:t,size:a}),e),...i,children:l()})});sg.displayName="Kbd";var dg=U.forwardRef(({className:e,size:t,axis:a="both",style:r,...n},i)=>{let s=typeof t=="number"?`${t}px`:t,l={...r,...t?{width:a==="vertical"?void 0:s,height:a==="horizontal"?void 0:s,minWidth:a==="vertical"?void 0:s,minHeight:a==="horizontal"?void 0:s,flexShrink:0}:{flex:"1 1 auto"}};return jsx("div",{ref:i,"aria-hidden":"true",className:o(e),style:l,...n})});dg.displayName="Spacer";var cg=cva("inline-flex items-center justify-center rounded-md transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-input hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-7 w-7",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),mg=U.forwardRef(({className:e,variant:t,size:a,value:r,successDuration:n=2e3,onCopySuccess:i,onCopyError:s,copyIcon:l,successIcon:d,...m},u)=>{let[c,g]=U.useState(false),p={sm:14,md:16,lg:20}[a??"md"],v=async()=>{try{await navigator.clipboard.writeText(r),g(!0),i?.(),setTimeout(()=>{g(!1);},n);}catch(N){s?.(N);}};return jsx("button",{ref:u,type:"button",className:o(cg({variant:t,size:a}),e),onClick:v,"aria-label":c?"Copied":"Copy to clipboard",...m,children:c?d??jsx(Check,{className:"text-success",style:{width:p,height:p}}):l??jsx(Copy,{style:{width:p,height:p}})})});mg.displayName="CopyButton";var ug=cva("flex flex-col bg-background",{variants:{variant:{default:"border rounded-lg",bordered:"border-2 rounded-lg",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"md"}}),WN=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],$N=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function _N(e,t,a){let r=new Date(e,t,1),n=new Date(e,t+1,0),i=[],s=r.getDay()-a;s<0&&(s+=7);for(let d=s-1;d>=0;d--)i.push(new Date(e,t,-d));for(let d=1;d<=n.getDate();d++)i.push(new Date(e,t,d));let l=42-i.length;for(let d=1;d<=l;d++)i.push(new Date(e,t+1,d));return i}function KN(e,t){let a=[],n=e.getDay()-t;n<0&&(n+=7);let i=new Date(e);i.setDate(e.getDate()-n);for(let s=0;s<7;s++){let l=new Date(i);l.setDate(i.getDate()+s),a.push(l);}return a}function Yn(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Un(e){return Yn(e,new Date)}function pg(e,t){return e.filter(a=>{let r=new Date(a.start),n=new Date(a.end);return Yn(r,t)||Yn(n,t)||r<t&&n>t})}var fg=U.forwardRef(({className:e,variant:t,size:a,events:r=[],view:n="month",onViewChange:i,date:s,onDateChange:l,onEventClick:d,onSlotClick:m,weekStartsOn:u=0,locale:c="en-US",...g},p)=>{let[v,N]=U.useState(new Date),b=s??v,h=R=>{l?l(R):N(R);},w=u===1?$N:WN,f=()=>{let R=new Date(b);n==="month"?R.setMonth(R.getMonth()-1):n==="week"?R.setDate(R.getDate()-7):R.setDate(R.getDate()-1),h(R);},y=()=>{let R=new Date(b);n==="month"?R.setMonth(R.getMonth()+1):n==="week"?R.setDate(R.getDate()+7):R.setDate(R.getDate()+1),h(R);},P=()=>{h(new Date);},x=()=>n==="day"?b.toLocaleDateString(c,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):b.toLocaleDateString(c,{year:"numeric",month:"long"}),S=()=>{let R=_N(b.getFullYear(),b.getMonth(),u);return jsxs("div",{className:"flex-1 flex flex-col",children:[jsx("div",{className:"grid grid-cols-7 border-b",children:w.map(C=>jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:C},C))}),jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:R.map((C,D)=>{let T=pg(r,C),I=C.getMonth()===b.getMonth();return jsxs("div",{className:o("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!I&&"bg-muted/30"),onClick:()=>m?.(C),children:[jsx("div",{className:o("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",Un(C)&&"bg-primary text-primary-foreground",!I&&"text-muted-foreground"),children:C.getDate()}),jsxs("div",{className:"space-y-0.5",children:[T.slice(0,3).map(L=>jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:L.color||"hsl(var(--primary))",color:"white"},onClick:V=>{V.stopPropagation(),d?.(L);},children:L.title},L.id)),T.length>3&&jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",T.length-3," more"]})]})]},D)})})]})},k=()=>{let R=KN(b,u),C=Array.from({length:24},(D,T)=>T);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsxs("div",{className:"grid grid-cols-[60px_repeat(7,1fr)] border-b",children:[jsx("div",{className:"p-2"}),R.map((D,T)=>jsxs("div",{className:o("p-2 text-center border-l",Un(D)&&"bg-primary/10"),children:[jsx("div",{className:"text-xs text-muted-foreground",children:w[T]}),jsx("div",{className:o("text-lg font-semibold",Un(D)&&"text-primary"),children:D.getDate()})]},T))]}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:C.map(D=>jsxs(U.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[D.toString().padStart(2,"0"),":00"]}),R.map((T,I)=>{let L=new Date(T);L.setHours(D,0,0,0);let V=r.filter(E=>{let A=new Date(E.start);return Yn(A,T)&&A.getHours()===D});return jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(L),children:V.map(E=>jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:E.color||"hsl(var(--primary))",color:"white"},onClick:A=>{A.stopPropagation(),d?.(E);},children:E.title},E.id))},I)})]},D))})})]})},M=()=>{let R=Array.from({length:24},(D,T)=>T),C=pg(r,b);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsx("div",{className:"p-4 border-b text-center",children:jsx("div",{className:o("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",Un(b)&&"bg-primary text-primary-foreground"),children:b.getDate()})}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_1fr]",children:R.map(D=>{let T=new Date(b);T.setHours(D,0,0,0);let I=C.filter(L=>new Date(L.start).getHours()===D);return jsxs(U.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[D.toString().padStart(2,"0"),":00"]}),jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(T),children:I.map(L=>jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:L.color||"hsl(var(--primary))",color:"white"},onClick:V=>{V.stopPropagation(),d?.(L);},children:L.title},L.id))})]},D)})})})]})};return jsxs("div",{ref:p,className:o(ug({variant:t,size:a,className:e})),...g,children:[jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(O,{variant:"bordered",size:"sm",onClick:P,children:"Today"}),jsx(O,{variant:"ghost",size:"icon",onClick:f,children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(O,{variant:"ghost",size:"icon",onClick:y,children:jsx(ChevronRight,{className:"h-4 w-4"})}),jsx("h2",{className:"text-lg font-semibold ml-2",children:x()})]}),jsx("div",{className:"flex items-center gap-1 border rounded-lg p-1",children:["month","week","day"].map(R=>jsx(O,{variant:n===R?"solid":"ghost",size:"sm",onClick:()=>i?.(R),children:R.charAt(0).toUpperCase()+R.slice(1)},R))})]}),n==="month"&&S(),n==="week"&&k(),n==="day"&&M()]})});fg.displayName="FullCalendar";var Io=cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),Eo=["hsl(var(--primary))","hsl(var(--chart-1, 220 70% 50%))","hsl(var(--chart-2, 160 60% 45%))","hsl(var(--chart-3, 30 80% 55%))","hsl(var(--chart-4, 280 65% 60%))"],gg=U.forwardRef(({className:e,size:t,data:a,dataKeys:r,colors:n=Eo,showGrid:i=true,showLegend:s=true,showTooltip:l=true,xAxisKey:d="name",curveType:m="monotone",...u},c)=>jsx("div",{ref:c,className:o(Io({size:t,className:e})),...u,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(LineChart,{data:a,children:[i&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:d,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),l&&jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),s&&jsx(Legend,{}),r.map((g,p)=>jsx(Line,{type:m,dataKey:g,stroke:n[p%n.length],strokeWidth:2,dot:{fill:n[p%n.length],strokeWidth:0},activeDot:{r:6}},g))]})})}));gg.displayName="LineChart";var bg=U.forwardRef(({className:e,size:t,data:a,dataKeys:r,colors:n=Eo,showGrid:i=true,showLegend:s=true,showTooltip:l=true,xAxisKey:d="name",stacked:m=false,layout:u="horizontal",...c},g)=>jsx("div",{ref:g,className:o(Io({size:t,className:e})),...c,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(BarChart,{data:a,layout:u,children:[i&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:u==="horizontal"?d:void 0,type:u==="horizontal"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{dataKey:u==="vertical"?d:void 0,type:u==="vertical"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),l&&jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),s&&jsx(Legend,{}),r.map((p,v)=>jsx(Bar,{dataKey:p,fill:n[v%n.length],stackId:m?"stack":void 0,radius:[4,4,0,0]},p))]})})}));bg.displayName="BarChart";var vg=U.forwardRef(({className:e,size:t,data:a,dataKey:r="value",nameKey:n="name",colors:i=Eo,innerRadius:s=0,outerRadius:l=80,showLegend:d=true,showTooltip:m=true,showLabels:u=false,...c},g)=>jsx("div",{ref:g,className:o(Io({size:t,className:e})),...c,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(PieChart,{children:[m&&jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"}}),d&&jsx(Legend,{}),jsx(Pie,{data:a,dataKey:r,nameKey:n,cx:"50%",cy:"50%",innerRadius:s,outerRadius:l,label:u,labelLine:u,children:a.map((p,v)=>jsx(Cell,{fill:i[v%i.length]},`cell-${v}`))})]})})}));vg.displayName="PieChart";var hg=U.forwardRef(({className:e,size:t,data:a,dataKeys:r,colors:n=Eo,showGrid:i=true,showLegend:s=true,showTooltip:l=true,xAxisKey:d="name",stacked:m=false,curveType:u="monotone",...c},g)=>jsx("div",{ref:g,className:o(Io({size:t,className:e})),...c,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(AreaChart,{data:a,children:[i&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:d,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),l&&jsx(Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),s&&jsx(Legend,{}),r.map((p,v)=>jsx(Area,{type:u,dataKey:p,stroke:n[v%n.length],fill:n[v%n.length],fillOpacity:.3,stackId:m?"stack":void 0},p))]})})}));hg.displayName="AreaChart";var Rg=cva("flex gap-4 overflow-x-auto p-4",{variants:{variant:{default:"bg-muted/30",bordered:"border rounded-lg bg-background",ghost:""}},defaultVariants:{variant:"default"}}),wg=cva("flex flex-col min-w-[280px] w-[280px] rounded-lg",{variants:{variant:{default:"bg-muted/50",bordered:"border bg-background",ghost:"bg-transparent"}},defaultVariants:{variant:"default"}}),Xs=cva("rounded-lg p-3 cursor-grab active:cursor-grabbing transition-all",{variants:{variant:{default:"bg-background border shadow-sm hover:shadow-md",bordered:"border-2 bg-background hover:border-primary/50",ghost:"bg-muted/50 hover:bg-muted"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg",false:""}},defaultVariants:{variant:"default",isDragging:false}});function fP({card:e,columnId:t,variant:a,renderCard:r,onCardClick:n}){let{attributes:i,listeners:s,setNodeRef:l,transform:d,transition:m,isDragging:u}=useSortable({id:e.id,data:{columnId:t}}),c={transform:CSS.Transform.toString(d),transition:m};return jsx("div",{ref:l,style:c,className:o(Xs({variant:a,isDragging:u})),onClick:()=>n?.(e,t),...i,...s,children:r?r(e,t):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:e.title}),e.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description})]})]})})}function gP({column:e,variant:t,renderCard:a,onCardClick:r,onAddCard:n,showAddCard:i,columnHeight:s}){return jsxs("div",{className:o(wg({variant:t})),children:[jsxs("div",{className:"flex items-center justify-between p-3 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[e.color&&jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),jsx("h3",{className:"font-semibold text-sm",children:e.title}),jsx("span",{className:"text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded-full",children:e.cards.length})]}),i&&jsx(O,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>n?.(e.id),children:jsx(Plus,{className:"h-4 w-4"})})]}),jsx(dt,{style:{height:s},children:jsxs("div",{className:"p-2 space-y-2",children:[jsx(SortableContext,{items:e.cards.map(l=>l.id),strategy:verticalListSortingStrategy,children:e.cards.map(l=>jsx(fP,{card:l,columnId:e.id,variant:t,renderCard:a,onCardClick:r},l.id))}),e.cards.length===0&&jsx("div",{className:"h-20 border-2 border-dashed rounded-lg flex items-center justify-center text-muted-foreground text-sm",children:"Drop here"})]})})]})}var Ng=U.forwardRef(({className:e,variant:t,columns:a,onCardMove:r,onCardClick:n,onAddCard:i,renderCard:s,showAddCard:l=true,columnHeight:d=500,...m},u)=>{let[c,g]=U.useState(null),[p,v]=U.useState(null),N=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),b=y=>a.find(P=>P.cards.some(x=>x.id===y));return jsxs(DndContext,{sensors:N,collisionDetection:closestCorners,onDragStart:y=>{let{active:P}=y,x=b(P.id);if(x){let S=x.cards.find(k=>k.id===P.id);S&&(g(S),v(x.id));}},onDragOver:y=>{let{active:P,over:x}=y;if(!x)return;let S=P.id,k=x.id,M=b(S),R=b(k)||a.find(T=>T.id===k);if(!M||!R||M.id===R.id)return;let C=R.cards.findIndex(T=>T.id===k),D=C===-1?R.cards.length:C;r?.(S,M.id,R.id,D);},onDragEnd:y=>{let{active:P,over:x}=y;if(x&&P.id!==x.id){let S=b(P.id),k=b(x.id)||a.find(M=>M.id===x.id);if(S&&k){let M=k.cards.findIndex(C=>C.id===x.id),R=M===-1?k.cards.length:M;r?.(P.id,S.id,k.id,R);}}g(null),v(null);},children:[jsx("div",{ref:u,className:o(Rg({variant:t,className:e})),...m,children:a.map(y=>jsx(gP,{column:y,variant:t,renderCard:s,onCardClick:n,onAddCard:i,showAddCard:l,columnHeight:d},y.id))}),jsx(DragOverlay,{children:c&&p&&jsx("div",{className:o(Xs({variant:t,isDragging:true})),children:s?s(c,p):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:c.title}),c.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:c.description})]})]})})})]})});Ng.displayName="KanbanBoard";var Pg=cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),Cg=U.createContext(null);function qs(){let e=U.useContext(Cg);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Sg=U.forwardRef(({className:e,variant:t,children:a,opts:r,plugins:n,orientation:i="horizontal",showArrows:s=true,showDots:l=true,setApi:d,...m},u)=>{let[c,g]=bP({...r,axis:i==="horizontal"?"x":"y"},n),[p,v]=U.useState(false),[N,b]=U.useState(false),[h,w]=U.useState(0),[f,y]=U.useState([]),P=U.useCallback(R=>{R&&(w(R.selectedScrollSnap()),v(R.canScrollPrev()),b(R.canScrollNext()));},[]),x=U.useCallback(()=>{g?.scrollPrev();},[g]),S=U.useCallback(()=>{g?.scrollNext();},[g]),k=U.useCallback(R=>{g?.scrollTo(R);},[g]),M=U.useCallback(R=>{R.key==="ArrowLeft"?(R.preventDefault(),x()):R.key==="ArrowRight"&&(R.preventDefault(),S());},[x,S]);return U.useEffect(()=>{!g||!d||d(g);},[g,d]),U.useEffect(()=>{if(g)return y(g.scrollSnapList()),P(g),g.on("reInit",P),g.on("select",P),()=>{g?.off("select",P);}},[g,P]),jsx(Cg.Provider,{value:{carouselRef:c,api:g,scrollPrev:x,scrollNext:S,canScrollPrev:p,canScrollNext:N,selectedIndex:h,scrollSnaps:f,scrollTo:k},children:jsxs("div",{ref:u,className:o(Pg({variant:t,className:e})),onKeyDownCapture:M,role:"region","aria-roledescription":"carousel",...m,children:[jsx("div",{ref:c,className:"overflow-hidden",children:jsx("div",{className:o("flex",i==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:a})}),s&&jsxs(Fragment,{children:[jsx(Zs,{}),jsx(Qs,{})]}),l&&f.length>1&&jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:f.map((R,C)=>jsx("button",{className:o("w-2 h-2 rounded-full transition-all",C===h?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>k(C),"aria-label":`Go to slide ${C+1}`},C))})]})})});Sg.displayName="Carousel";var Tg=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("flex",e),...t}));Tg.displayName="CarouselContent";var Mg=U.forwardRef(({className:e,basis:t="basis-full",...a},r)=>jsx("div",{ref:r,role:"group","aria-roledescription":"slide",className:o("min-w-0 shrink-0 grow-0 pl-4",t,e),...a}));Mg.displayName="CarouselItem";var Zs=U.forwardRef(({className:e,variant:t="bordered",size:a="icon",...r},n)=>{let{scrollPrev:i,canScrollPrev:s}=qs();return jsxs(O,{ref:n,variant:t,size:a,className:o("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:i,...r,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Previous slide"})]})});Zs.displayName="CarouselPrevious";var Qs=U.forwardRef(({className:e,variant:t="bordered",size:a="icon",...r},n)=>{let{scrollNext:i,canScrollNext:s}=qs();return jsxs(O,{ref:n,variant:t,size:a,className:o("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:i,...r,children:[jsx(ChevronRight,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Next slide"})]})});Qs.displayName="CarouselNext";var kg=cva("flex flex-col bg-popover border rounded-lg shadow-md",{variants:{size:{sm:"w-64 h-72",md:"w-80 h-96",lg:"w-96 h-[480px]"}},defaultVariants:{size:"md"}}),Jn={recent:{icon:"\u{1F550}",name:"Recent"},smileys:{icon:"\u{1F600}",name:"Smileys & Emotion"},people:{icon:"\u{1F44B}",name:"People & Body"},animals:{icon:"\u{1F43B}",name:"Animals & Nature"},food:{icon:"\u{1F354}",name:"Food & Drink"},travel:{icon:"\u{1F697}",name:"Travel & Places"},activities:{icon:"\u26BD",name:"Activities"},objects:{icon:"\u{1F4A1}",name:"Objects"},symbols:{icon:"\u2764\uFE0F",name:"Symbols"},flags:{icon:"\u{1F3F3}\uFE0F",name:"Flags"}},el={smileys:["\u{1F600}","\u{1F603}","\u{1F604}","\u{1F601}","\u{1F606}","\u{1F605}","\u{1F923}","\u{1F602}","\u{1F642}","\u{1F643}","\u{1F609}","\u{1F60A}","\u{1F607}","\u{1F970}","\u{1F60D}","\u{1F929}","\u{1F618}","\u{1F617}","\u263A\uFE0F","\u{1F61A}","\u{1F60B}","\u{1F61B}","\u{1F61C}","\u{1F92A}","\u{1F61D}","\u{1F911}","\u{1F917}","\u{1F92D}","\u{1F92B}","\u{1F914}","\u{1F910}","\u{1F928}","\u{1F610}","\u{1F611}","\u{1F636}","\u{1F60F}","\u{1F612}","\u{1F644}","\u{1F62C}","\u{1F925}","\u{1F60C}","\u{1F614}","\u{1F62A}","\u{1F924}","\u{1F634}","\u{1F637}","\u{1F912}","\u{1F915}","\u{1F922}","\u{1F92E}","\u{1F927}","\u{1F975}","\u{1F976}","\u{1F974}","\u{1F635}","\u{1F92F}","\u{1F920}","\u{1F973}","\u{1F978}","\u{1F60E}","\u{1F913}","\u{1F9D0}","\u{1F615}","\u{1F61F}","\u{1F641}","\u2639\uFE0F","\u{1F62E}","\u{1F62F}","\u{1F632}","\u{1F633}","\u{1F97A}","\u{1F626}","\u{1F627}","\u{1F628}","\u{1F630}","\u{1F625}","\u{1F622}","\u{1F62D}","\u{1F631}","\u{1F616}","\u{1F623}","\u{1F61E}","\u{1F613}","\u{1F629}","\u{1F62B}","\u{1F971}","\u{1F624}","\u{1F621}","\u{1F620}","\u{1F92C}","\u{1F608}","\u{1F47F}","\u{1F480}","\u2620\uFE0F","\u{1F4A9}","\u{1F921}","\u{1F479}","\u{1F47A}","\u{1F47B}","\u{1F47D}"],people:["\u{1F44B}","\u{1F91A}","\u{1F590}\uFE0F","\u270B","\u{1F596}","\u{1F44C}","\u{1F90C}","\u{1F90F}","\u270C\uFE0F","\u{1F91E}","\u{1F91F}","\u{1F918}","\u{1F919}","\u{1F448}","\u{1F449}","\u{1F446}","\u{1F595}","\u{1F447}","\u261D\uFE0F","\u{1F44D}","\u{1F44E}","\u270A","\u{1F44A}","\u{1F91B}","\u{1F91C}","\u{1F44F}","\u{1F64C}","\u{1F450}","\u{1F932}","\u{1F91D}","\u{1F64F}","\u270D\uFE0F","\u{1F485}","\u{1F933}","\u{1F4AA}","\u{1F9BE}","\u{1F9BF}","\u{1F9B5}","\u{1F9B6}","\u{1F442}","\u{1F9BB}","\u{1F443}","\u{1F9E0}","\u{1FAC0}","\u{1FAC1}","\u{1F9B7}","\u{1F9B4}","\u{1F440}","\u{1F441}\uFE0F","\u{1F445}","\u{1F444}","\u{1F476}","\u{1F9D2}","\u{1F466}","\u{1F467}","\u{1F9D1}","\u{1F471}","\u{1F468}","\u{1F9D4}","\u{1F469}","\u{1F9D3}","\u{1F474}","\u{1F475}","\u{1F64D}","\u{1F64E}","\u{1F645}","\u{1F646}","\u{1F481}","\u{1F64B}","\u{1F9CF}","\u{1F647}","\u{1F926}","\u{1F937}","\u{1F46E}","\u{1F575}\uFE0F","\u{1F482}","\u{1F977}","\u{1F477}","\u{1F934}","\u{1F478}"],animals:["\u{1F436}","\u{1F431}","\u{1F42D}","\u{1F439}","\u{1F430}","\u{1F98A}","\u{1F43B}","\u{1F43C}","\u{1F428}","\u{1F42F}","\u{1F981}","\u{1F42E}","\u{1F437}","\u{1F43D}","\u{1F438}","\u{1F435}","\u{1F648}","\u{1F649}","\u{1F64A}","\u{1F412}","\u{1F414}","\u{1F427}","\u{1F426}","\u{1F424}","\u{1F423}","\u{1F425}","\u{1F986}","\u{1F985}","\u{1F989}","\u{1F987}","\u{1F43A}","\u{1F417}","\u{1F434}","\u{1F984}","\u{1F41D}","\u{1FAB1}","\u{1F41B}","\u{1F98B}","\u{1F40C}","\u{1F41E}","\u{1F41C}","\u{1FAB0}","\u{1FAB2}","\u{1FAB3}","\u{1F99F}","\u{1F997}","\u{1F577}\uFE0F","\u{1F578}\uFE0F","\u{1F982}","\u{1F422}","\u{1F40D}","\u{1F98E}","\u{1F996}","\u{1F995}","\u{1F419}","\u{1F991}","\u{1F990}","\u{1F99E}","\u{1F980}","\u{1F421}","\u{1F420}","\u{1F41F}","\u{1F42C}","\u{1F433}","\u{1F40B}","\u{1F988}","\u{1F40A}","\u{1F405}","\u{1F406}","\u{1F993}","\u{1F98D}","\u{1F9A7}","\u{1F9A3}","\u{1F418}","\u{1F99B}","\u{1F98F}","\u{1F42A}","\u{1F42B}","\u{1F992}","\u{1F998}"],food:["\u{1F347}","\u{1F348}","\u{1F349}","\u{1F34A}","\u{1F34B}","\u{1F34C}","\u{1F34D}","\u{1F96D}","\u{1F34E}","\u{1F34F}","\u{1F350}","\u{1F351}","\u{1F352}","\u{1F353}","\u{1FAD0}","\u{1F95D}","\u{1F345}","\u{1FAD2}","\u{1F965}","\u{1F951}","\u{1F346}","\u{1F954}","\u{1F955}","\u{1F33D}","\u{1F336}\uFE0F","\u{1FAD1}","\u{1F952}","\u{1F96C}","\u{1F966}","\u{1F9C4}","\u{1F9C5}","\u{1F344}","\u{1F95C}","\u{1F330}","\u{1F35E}","\u{1F950}","\u{1F956}","\u{1FAD3}","\u{1F968}","\u{1F96F}","\u{1F95E}","\u{1F9C7}","\u{1F9C0}","\u{1F356}","\u{1F357}","\u{1F969}","\u{1F953}","\u{1F354}","\u{1F35F}","\u{1F355}","\u{1F32D}","\u{1F96A}","\u{1F32E}","\u{1F32F}","\u{1FAD4}","\u{1F959}","\u{1F9C6}","\u{1F95A}","\u{1F373}","\u{1F958}","\u{1F372}","\u{1FAD5}","\u{1F963}","\u{1F957}","\u{1F37F}","\u{1F9C8}","\u{1F9C2}","\u{1F96B}","\u{1F371}","\u{1F358}","\u{1F359}","\u{1F35A}","\u{1F35B}","\u{1F35C}","\u{1F35D}","\u{1F360}","\u{1F362}","\u{1F363}","\u{1F364}","\u{1F365}"],travel:["\u{1F697}","\u{1F695}","\u{1F699}","\u{1F68C}","\u{1F68E}","\u{1F3CE}\uFE0F","\u{1F693}","\u{1F691}","\u{1F692}","\u{1F690}","\u{1F6FB}","\u{1F69A}","\u{1F69B}","\u{1F69C}","\u{1F9AF}","\u{1F9BD}","\u{1F9BC}","\u{1F6F4}","\u{1F6B2}","\u{1F6F5}","\u{1F3CD}\uFE0F","\u{1F6FA}","\u{1F6A8}","\u{1F694}","\u{1F68D}","\u{1F698}","\u{1F696}","\u{1F6A1}","\u{1F6A0}","\u{1F69F}","\u{1F683}","\u{1F68B}","\u{1F69E}","\u{1F69D}","\u{1F684}","\u{1F685}","\u{1F688}","\u{1F682}","\u{1F686}","\u{1F687}","\u{1F68A}","\u{1F689}","\u2708\uFE0F","\u{1F6EB}","\u{1F6EC}","\u{1F6E9}\uFE0F","\u{1F4BA}","\u{1F6F0}\uFE0F","\u{1F680}","\u{1F6F8}","\u{1F681}","\u{1F6F6}","\u26F5","\u{1F6A4}","\u{1F6E5}\uFE0F","\u{1F6F3}\uFE0F","\u26F4\uFE0F","\u{1F6A2}","\u2693","\u{1FA9D}","\u26FD","\u{1F6A7}","\u{1F6A6}","\u{1F6A5}","\u{1F68F}","\u{1F5FA}\uFE0F","\u{1F5FF}","\u{1F5FD}","\u{1F5FC}","\u{1F3F0}","\u{1F3EF}","\u{1F3DF}\uFE0F","\u{1F3A1}","\u{1F3A2}","\u{1F3A0}","\u26F2","\u26F1\uFE0F","\u{1F3D6}\uFE0F","\u{1F3DD}\uFE0F","\u{1F3DC}\uFE0F"],activities:["\u26BD","\u{1F3C0}","\u{1F3C8}","\u26BE","\u{1F94E}","\u{1F3BE}","\u{1F3D0}","\u{1F3C9}","\u{1F94F}","\u{1F3B1}","\u{1FA80}","\u{1F3D3}","\u{1F3F8}","\u{1F3D2}","\u{1F3D1}","\u{1F94D}","\u{1F3CF}","\u{1FA83}","\u{1F945}","\u26F3","\u{1FA81}","\u{1F3F9}","\u{1F3A3}","\u{1F93F}","\u{1F94A}","\u{1F94B}","\u{1F3BD}","\u{1F6F9}","\u{1F6FC}","\u{1F6F7}","\u26F8\uFE0F","\u{1F94C}","\u{1F3BF}","\u26F7\uFE0F","\u{1F3C2}","\u{1FA82}","\u{1F3CB}\uFE0F","\u{1F93C}","\u{1F938}","\u26F9\uFE0F","\u{1F93A}","\u{1F93E}","\u{1F3CC}\uFE0F","\u{1F3C7}","\u26D1\uFE0F","\u{1F9D8}","\u{1F3C4}","\u{1F3CA}","\u{1F93D}","\u{1F6A3}","\u{1F9D7}","\u{1F6B5}","\u{1F6B4}","\u{1F3C6}","\u{1F947}","\u{1F948}","\u{1F949}","\u{1F3C5}","\u{1F396}\uFE0F","\u{1F3F5}\uFE0F","\u{1F397}\uFE0F","\u{1F3AB}","\u{1F39F}\uFE0F","\u{1F3AA}","\u{1F939}","\u{1F3AD}","\u{1FA70}","\u{1F3A8}","\u{1F3AC}","\u{1F3A4}","\u{1F3A7}","\u{1F3BC}","\u{1F3B9}","\u{1F941}","\u{1FA98}","\u{1F3B7}","\u{1F3BA}","\u{1FA97}","\u{1F3B8}","\u{1FA95}"],objects:["\u231A","\u{1F4F1}","\u{1F4F2}","\u{1F4BB}","\u2328\uFE0F","\u{1F5A5}\uFE0F","\u{1F5A8}\uFE0F","\u{1F5B1}\uFE0F","\u{1F5B2}\uFE0F","\u{1F579}\uFE0F","\u{1F5DC}\uFE0F","\u{1F4BD}","\u{1F4BE}","\u{1F4BF}","\u{1F4C0}","\u{1F4FC}","\u{1F4F7}","\u{1F4F8}","\u{1F4F9}","\u{1F3A5}","\u{1F4FD}\uFE0F","\u{1F39E}\uFE0F","\u{1F4DE}","\u260E\uFE0F","\u{1F4DF}","\u{1F4E0}","\u{1F4FA}","\u{1F4FB}","\u{1F399}\uFE0F","\u{1F39A}\uFE0F","\u{1F39B}\uFE0F","\u{1F9ED}","\u23F1\uFE0F","\u23F2\uFE0F","\u23F0","\u{1F570}\uFE0F","\u231B","\u23F3","\u{1F4E1}","\u{1F50B}","\u{1F50C}","\u{1F4A1}","\u{1F526}","\u{1F56F}\uFE0F","\u{1FA94}","\u{1F9EF}","\u{1F6E2}\uFE0F","\u{1F4B8}","\u{1F4B5}","\u{1F4B4}","\u{1F4B6}","\u{1F4B7}","\u{1FA99}","\u{1F4B0}","\u{1F4B3}","\u{1F48E}","\u2696\uFE0F","\u{1FA9C}","\u{1F9F0}","\u{1FA9B}","\u{1F527}","\u{1F528}","\u2692\uFE0F","\u{1F6E0}\uFE0F","\u26CF\uFE0F","\u{1FA9A}","\u{1F529}","\u2699\uFE0F","\u{1FAA4}","\u{1F9F1}","\u26D3\uFE0F","\u{1F9F2}","\u{1F52B}","\u{1F4A3}","\u{1F9E8}","\u{1FA93}","\u{1F52A}","\u{1F5E1}\uFE0F","\u2694\uFE0F","\u{1F6E1}\uFE0F"],symbols:["\u2764\uFE0F","\u{1F9E1}","\u{1F49B}","\u{1F49A}","\u{1F499}","\u{1F49C}","\u{1F5A4}","\u{1F90D}","\u{1F90E}","\u{1F494}","\u2763\uFE0F","\u{1F495}","\u{1F49E}","\u{1F493}","\u{1F497}","\u{1F496}","\u{1F498}","\u{1F49D}","\u{1F49F}","\u262E\uFE0F","\u271D\uFE0F","\u262A\uFE0F","\u{1F549}\uFE0F","\u2638\uFE0F","\u2721\uFE0F","\u{1F52F}","\u{1F54E}","\u262F\uFE0F","\u2626\uFE0F","\u{1F6D0}","\u26CE","\u2648","\u2649","\u264A","\u264B","\u264C","\u264D","\u264E","\u264F","\u2650","\u2651","\u2652","\u2653","\u{1F194}","\u269B\uFE0F","\u{1F251}","\u2622\uFE0F","\u2623\uFE0F","\u{1F4F4}","\u{1F4F3}","\u{1F236}","\u{1F21A}","\u{1F238}","\u{1F23A}","\u{1F237}\uFE0F","\u2734\uFE0F","\u{1F19A}","\u{1F4AE}","\u{1F250}","\u3299\uFE0F","\u3297\uFE0F","\u{1F234}","\u{1F235}","\u{1F239}","\u{1F232}","\u{1F170}\uFE0F","\u{1F171}\uFE0F","\u{1F18E}","\u{1F191}","\u{1F17E}\uFE0F","\u{1F198}","\u274C","\u2B55","\u{1F6D1}","\u26D4","\u{1F4DB}","\u{1F6AB}","\u{1F4AF}","\u{1F4A2}","\u2668\uFE0F"],flags:["\u{1F3F3}\uFE0F","\u{1F3F4}","\u{1F3C1}","\u{1F6A9}","\u{1F3F3}\uFE0F\u200D\u{1F308}","\u{1F3F3}\uFE0F\u200D\u26A7\uFE0F","\u{1F1FA}\u{1F1F3}","\u{1F1E6}\u{1F1EB}","\u{1F1E6}\u{1F1F1}","\u{1F1E9}\u{1F1FF}","\u{1F1E6}\u{1F1F8}","\u{1F1E6}\u{1F1E9}","\u{1F1E6}\u{1F1F4}","\u{1F1E6}\u{1F1EE}","\u{1F1E6}\u{1F1F6}","\u{1F1E6}\u{1F1EC}","\u{1F1E6}\u{1F1F7}","\u{1F1E6}\u{1F1F2}","\u{1F1E6}\u{1F1FC}","\u{1F1E6}\u{1F1FA}","\u{1F1E6}\u{1F1F9}","\u{1F1E6}\u{1F1FF}","\u{1F1E7}\u{1F1F8}","\u{1F1E7}\u{1F1ED}","\u{1F1E7}\u{1F1E9}","\u{1F1E7}\u{1F1E7}","\u{1F1E7}\u{1F1FE}","\u{1F1E7}\u{1F1EA}","\u{1F1E7}\u{1F1FF}","\u{1F1E7}\u{1F1EF}","\u{1F1E7}\u{1F1F2}","\u{1F1E7}\u{1F1F9}","\u{1F1E7}\u{1F1F4}","\u{1F1E7}\u{1F1E6}","\u{1F1E7}\u{1F1FC}","\u{1F1E7}\u{1F1F7}","\u{1F1E7}\u{1F1F3}","\u{1F1E7}\u{1F1EC}","\u{1F1E7}\u{1F1EB}","\u{1F1E7}\u{1F1EE}","\u{1F1E8}\u{1F1FB}","\u{1F1F0}\u{1F1ED}","\u{1F1E8}\u{1F1F2}","\u{1F1E8}\u{1F1E6}","\u{1F1E8}\u{1F1EB}","\u{1F1F9}\u{1F1E9}","\u{1F1E8}\u{1F1F1}","\u{1F1E8}\u{1F1F3}","\u{1F1E8}\u{1F1F4}","\u{1F1F0}\u{1F1F2}","\u{1F1E8}\u{1F1EC}","\u{1F1E8}\u{1F1E9}","\u{1F1E8}\u{1F1F7}","\u{1F1ED}\u{1F1F7}","\u{1F1E8}\u{1F1FA}","\u{1F1E8}\u{1F1FE}","\u{1F1E8}\u{1F1FF}","\u{1F1E9}\u{1F1F0}","\u{1F1E9}\u{1F1EF}","\u{1F1E9}\u{1F1F2}","\u{1F1E9}\u{1F1F4}","\u{1F1EA}\u{1F1E8}","\u{1F1EA}\u{1F1EC}","\u{1F1F8}\u{1F1FB}","\u{1F1EC}\u{1F1F6}","\u{1F1EA}\u{1F1F7}","\u{1F1EA}\u{1F1EA}","\u{1F1EA}\u{1F1F9}","\u{1F1EA}\u{1F1FA}","\u{1F1EB}\u{1F1EF}","\u{1F1EB}\u{1F1EE}","\u{1F1EB}\u{1F1F7}","\u{1F1EC}\u{1F1E6}","\u{1F1EC}\u{1F1F2}","\u{1F1EC}\u{1F1EA}","\u{1F1E9}\u{1F1EA}","\u{1F1EC}\u{1F1ED}","\u{1F1EC}\u{1F1F7}","\u{1F1EC}\u{1F1F9}","\u{1F1EC}\u{1F1F3}"]},Dg=U.forwardRef(({className:e,size:t,onEmojiSelect:a,recentEmojis:r=[],defaultCategory:n="smileys",showSearch:i=true,showCategories:s=true,...l},d)=>{let[m,u]=U.useState(r.length>0?"recent":n),[c,g]=U.useState(""),v=c?Object.values(el).flat().filter(b=>b.toLowerCase().includes(c.toLowerCase())):m==="recent"?r:el[m]||[],N=b=>{a?.(b);};return jsxs("div",{ref:d,className:o(kg({size:t,className:e})),...l,children:[i&&jsx("div",{className:"p-2 border-b",children:jsxs("div",{className:"relative",children:[jsx(Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),jsx(Jo,{placeholder:"Search emojis...",value:c,onChange:b=>g(b.target.value),className:"pl-8 h-8"})]})}),s&&!c&&jsx("div",{className:"flex border-b px-1",children:Object.entries(Jn).map(([b,{icon:h}])=>b==="recent"&&r.length===0?null:jsx("button",{className:o("flex-1 p-2 text-lg hover:bg-accent rounded transition-colors",m===b&&"bg-accent"),onClick:()=>u(b),title:Jn[b].name,children:h},b))}),!c&&jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:Jn[m].name}),jsx(dt,{className:"flex-1",children:jsxs("div",{className:"grid grid-cols-8 gap-1 p-2",children:[v.map((b,h)=>jsx("button",{className:"w-8 h-8 flex items-center justify-center text-xl hover:bg-accent rounded transition-colors",onClick:()=>N(b),children:b},`${b}-${h}`)),v.length===0&&jsx("div",{className:"col-span-8 py-8 text-center text-muted-foreground text-sm",children:"No emojis found"})]})})]})});Dg.displayName="EmojiPicker";var Vg=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),jP=cva("flex flex-wrap items-center gap-0.5 p-1 border-b",{variants:{size:{sm:"p-0.5",md:"p-1",lg:"p-1.5"}},defaultVariants:{size:"md"}}),XP=cva("flex-1 overflow-auto prose prose-sm max-w-none dark:prose-invert [&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[inherit] [&_.ProseMirror.is-editor-empty:first-child::before]:text-muted-foreground [&_.ProseMirror.is-editor-empty:first-child::before]:content-[attr(data-placeholder)] [&_.ProseMirror.is-editor-empty:first-child::before]:float-left [&_.ProseMirror.is-editor-empty:first-child::before]:pointer-events-none [&_.ProseMirror.is-editor-empty:first-child::before]:h-0",{variants:{size:{sm:"min-h-[100px] [&_.ProseMirror]:p-2 text-sm",md:"min-h-[150px] [&_.ProseMirror]:p-3 text-sm",lg:"min-h-[200px] [&_.ProseMirror]:p-4 text-base"}},defaultVariants:{size:"md"}}),Pe=({icon:e,title:t,isActive:a,onClick:r,disabled:n})=>jsxs(Ga,{children:[jsx(Wa,{asChild:true,children:jsx(O,{type:"button",variant:a?"solid":"ghost",size:"icon",className:"h-7 w-7",onClick:r,disabled:n,children:e})}),jsx(ca,{side:"top",className:"text-xs",children:t})]}),Lg=U.forwardRef(({className:e,variant:t,size:a,value:r="",onChange:n,placeholder:i="Start writing...",readOnly:s=false,showToolbar:l=true,minHeight:d,maxHeight:m,onEditorReady:u,...c},g)=>{let p=useEditor({extensions:[CP.configure({heading:{levels:[1,2,3]}}),SP.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),TP,MP.configure({types:["heading","paragraph"]}),kP.configure({placeholder:i})],content:r,editable:!s,onUpdate:({editor:N})=>{n?.(N.getHTML());},onCreate:({editor:N})=>{u?.(N);}});U.useEffect(()=>{p&&r!==p.getHTML()&&p.commands.setContent(r);},[r,p]),U.useEffect(()=>{p&&p.setEditable(!s);},[s,p]);let v=()=>{if(!p)return;let N=p.getAttributes("link").href,b=window.prompt("URL",N);if(b!==null){if(b===""){p.chain().focus().extendMarkRange("link").unsetLink().run();return}p.chain().focus().extendMarkRange("link").setLink({href:b}).run();}};return p?jsx(Oa,{children:jsxs("div",{ref:g,className:o(Vg({variant:t,size:a,className:e})),...c,children:[l&&!s&&jsxs("div",{className:o(jP({size:a})),children:[jsx(Pe,{icon:jsx(Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsx(Pe,{icon:jsx(Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsx(da,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Pe,{icon:jsx(Heading1,{className:"h-4 w-4"}),title:"Heading 1",isActive:p.isActive("heading",{level:1}),onClick:()=>p.chain().focus().toggleHeading({level:1}).run()}),jsx(Pe,{icon:jsx(Heading2,{className:"h-4 w-4"}),title:"Heading 2",isActive:p.isActive("heading",{level:2}),onClick:()=>p.chain().focus().toggleHeading({level:2}).run()}),jsx(Pe,{icon:jsx(Heading3,{className:"h-4 w-4"}),title:"Heading 3",isActive:p.isActive("heading",{level:3}),onClick:()=>p.chain().focus().toggleHeading({level:3}).run()}),jsx(da,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Pe,{icon:jsx(Bold,{className:"h-4 w-4"}),title:"Bold (Ctrl+B)",isActive:p.isActive("bold"),onClick:()=>p.chain().focus().toggleBold().run()}),jsx(Pe,{icon:jsx(Italic,{className:"h-4 w-4"}),title:"Italic (Ctrl+I)",isActive:p.isActive("italic"),onClick:()=>p.chain().focus().toggleItalic().run()}),jsx(Pe,{icon:jsx(Underline,{className:"h-4 w-4"}),title:"Underline (Ctrl+U)",isActive:p.isActive("underline"),onClick:()=>p.chain().focus().toggleUnderline().run()}),jsx(Pe,{icon:jsx(Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsx(da,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Pe,{icon:jsx(List,{className:"h-4 w-4"}),title:"Bullet List",isActive:p.isActive("bulletList"),onClick:()=>p.chain().focus().toggleBulletList().run()}),jsx(Pe,{icon:jsx(ListOrdered,{className:"h-4 w-4"}),title:"Numbered List",isActive:p.isActive("orderedList"),onClick:()=>p.chain().focus().toggleOrderedList().run()}),jsx(da,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Pe,{icon:jsx(AlignLeft,{className:"h-4 w-4"}),title:"Align Left",isActive:p.isActive({textAlign:"left"}),onClick:()=>p.chain().focus().setTextAlign("left").run()}),jsx(Pe,{icon:jsx(AlignCenter,{className:"h-4 w-4"}),title:"Align Center",isActive:p.isActive({textAlign:"center"}),onClick:()=>p.chain().focus().setTextAlign("center").run()}),jsx(Pe,{icon:jsx(AlignRight,{className:"h-4 w-4"}),title:"Align Right",isActive:p.isActive({textAlign:"right"}),onClick:()=>p.chain().focus().setTextAlign("right").run()}),jsx(da,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Pe,{icon:jsx(Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsx(Pe,{icon:jsx(Code,{className:"h-4 w-4"}),title:"Code Block",isActive:p.isActive("codeBlock"),onClick:()=>p.chain().focus().toggleCodeBlock().run()}),jsx(da,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Pe,{icon:jsx(Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:v}),jsx(Pe,{icon:jsx(Unlink,{className:"h-4 w-4"}),title:"Remove Link",onClick:()=>p.chain().focus().unsetLink().run(),disabled:!p.isActive("link")})]}),jsx(EditorContent,{editor:p,className:o(XP({size:a})),style:{minHeight:d,maxHeight:m}})]})}):null});Lg.displayName="RichTextEditor";var Eg=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function rC(e,t,a){return centerCrop(makeAspectCrop({unit:"%",width:90},a,e,t),e,t)}async function Ig(e,t,a=0,r=1){let n=document.createElement("canvas"),i=n.getContext("2d");if(!i)return null;let s=e.naturalWidth/e.width,l=e.naturalHeight/e.height,d=window.devicePixelRatio||1;n.width=Math.floor(t.width*s*d),n.height=Math.floor(t.height*l*d),i.scale(d,d),i.imageSmoothingQuality="high";let m=t.x*s,u=t.y*l,c=a*Math.PI/180,g=e.naturalWidth/2,p=e.naturalHeight/2;return i.save(),i.translate(-m,-u),i.translate(g,p),i.rotate(c),i.scale(r,r),i.translate(-g,-p),i.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),i.restore(),new Promise(v=>{n.toBlob(N=>{v(N);},"image/png");})}var Hg=U.forwardRef(({className:e,variant:t,src:a,aspectRatio:r,onCropChange:n,onCropComplete:i,showZoom:s=true,showRotation:l=true,minZoom:d=1,maxZoom:m=3,circularCrop:u=false,initialCrop:c,...g},p)=>{let v=U.useRef(null),[N,b]=U.useState(),[h,w]=U.useState(),[f,y]=U.useState(1),[P,x]=U.useState(0),S=C=>{let{width:D,height:T}=C.currentTarget;if(r){let I=rC(D,T,r);b(I);}else b(c||{unit:"%",x:10,y:10,width:80,height:80});},k=C=>{b(C),n?.(C);},M=async C=>{if(w(C),i&&v.current&&C.width&&C.height){let D=await Ig(v.current,C,P,f);i(D);}},R=()=>{x(C=>(C+90)%360);};return U.useEffect(()=>{h&&v.current&&i&&Ig(v.current,h,P,f).then(C=>{i(C);});},[f,P,h,i]),jsxs("div",{ref:p,className:o(Eg({variant:t,className:e})),...g,children:[jsx("div",{className:"flex-1 flex items-center justify-center p-4 bg-muted/30 min-h-[300px]",children:jsx(qP,{crop:N,onChange:k,onComplete:M,aspect:r,circularCrop:u,className:"max-h-[400px]",children:jsx("img",{ref:v,src:a,alt:"Crop preview",onLoad:S,style:{transform:`scale(${f}) rotate(${P}deg)`,maxHeight:"400px"}})})}),jsxs("div",{className:"flex items-center gap-4 p-3 border-t",children:[s&&jsxs("div",{className:"flex items-center gap-2 flex-1",children:[jsx(ZoomOut,{className:"h-4 w-4 text-muted-foreground"}),jsx(cn,{value:[f],onValueChange:([C])=>y(C),min:d,max:m,step:.1,className:"flex-1"}),jsx(ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),l&&jsx(O,{variant:"bordered",size:"icon",onClick:R,children:jsx(RotateCw,{className:"h-4 w-4"})})]})]})});Hg.displayName="ImageCropper";var ol=cva("inline-block",{variants:{variant:{default:"",bordered:"border rounded-lg p-2",card:"border rounded-lg p-4 bg-card shadow-sm"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),iC={sm:96,md:128,lg:192},zg=U.forwardRef(({className:e,variant:t,size:a,value:r,qrSize:n,fgColor:i="currentColor",bgColor:s="transparent",level:l="M",includeMargin:d=false,title:m,logo:u,logoSize:c=40,logoPadding:g=4,logoBackgroundColor:p="white",...v},N)=>{let b=n??iC[a??"md"];return r?jsx("div",{ref:N,className:o(ol({variant:t,size:a,className:e})),...v,children:jsxs("div",{className:"relative inline-block",children:[jsx(oC,{value:r,size:b,fgColor:i,bgColor:s,level:l,title:m,style:{padding:d?16:0}}),u&&jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded",style:{padding:g,backgroundColor:p},children:jsx("img",{src:u,alt:"Logo",style:{width:c,height:c,objectFit:"contain"}})})]})}):jsx("div",{ref:N,className:o(ol({variant:t,size:a,className:e})),...v,children:jsx("div",{className:"flex items-center justify-center bg-muted text-muted-foreground text-xs rounded",style:{width:b,height:b},children:"No data"})})});zg.displayName="QRCode";var Bg=({children:e,defaultTheme:t="system",storageKey:a="reever-ui-theme",enableSystem:r=true,disableTransitionOnChange:n=false,attribute:i="class",forcedTheme:s,themes:l=["light","dark"]})=>jsx(ThemeProvider,{defaultTheme:t,storageKey:a,enableSystem:r,disableTransitionOnChange:n,attribute:i,forcedTheme:s,themes:l,children:e});Bg.displayName="ThemeProvider";var uC=cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),Fg=U.forwardRef(({className:e,variant:t="ghost",size:a="md",mode:r="dropdown"},n)=>{let{theme:i,setTheme:s,resolvedTheme:l}=useTheme(),[d,m]=U.useState(false);U.useEffect(()=>{m(true);},[]);let u=()=>{let c=["light","dark","system"],p=(c.indexOf(i||"system")+1)%c.length;s(c[p]);};return d?r==="cycle"?jsxs(O,{ref:n,variant:t==="default"?"bordered":t,size:"icon",className:o("h-9 w-9",e),onClick:u,children:[l==="dark"?jsx(Moon,{className:"h-4 w-4"}):jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]}):jsxs($a,{children:[jsx(_a,{asChild:true,children:jsxs(O,{ref:n,variant:t==="default"?"bordered":t,size:"icon",className:o("h-9 w-9",e),children:[jsx(Sun,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsx(Moon,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),jsxs(pa,{align:"end",children:[jsxs(xt,{onClick:()=>s("light"),children:[jsx(Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxs(xt,{onClick:()=>s("dark"),children:[jsx(Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxs(xt,{onClick:()=>s("system"),children:[jsx(Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxs(O,{ref:n,variant:t==="default"?"bordered":t,size:"icon",className:o("h-9 w-9",e),disabled:true,children:[jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})});Fg.displayName="ThemeToggle";var Gg=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),Wg=cva("flex w-full rounded-md border border-input bg-background ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-12 px-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),$g=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),_g=U.forwardRef(({className:e,label:t,description:a,errorMessage:r,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,startContent:c,endContent:g,id:p,...v},N)=>{let b=U.useId(),h=p||b,w=`${h}-description`,f=`${h}-error`,y=i&&r;return jsxs("div",{className:o(Gg({size:s}),e),children:[t&&jsxs(zi.Root,{htmlFor:h,className:o($g({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[c&&jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:c}),jsx("input",{ref:N,id:h,"aria-invalid":i,"aria-describedby":y?f:a?w:void 0,"aria-required":n,className:o(Wg({size:s,isInvalid:i}),c&&"pl-10",g&&"pr-10",d),...v}),g&&jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:g})]}),a&&!y&&jsx("p",{id:w,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a}),y&&jsx("p",{id:f,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:r})]})});_g.displayName="TextField";var jg=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),bC=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 text-center [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",{variants:{size:{sm:"h-8 px-8 py-1.5 text-xs",md:"h-10 px-10 py-2 text-sm",lg:"h-12 px-12 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),Kg=cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Ug=cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),vC=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Xg=U.forwardRef(({className:e,label:t,description:a,errorMessage:r,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,min:c,max:g,step:p=1,value:v,defaultValue:N,onChange:b,showButtons:h=true,formatOptions:w,disabled:f,id:y,...P},x)=>{let S=U.useId(),k=y||S,M=`${k}-description`,R=`${k}-error`,[C,D]=U.useState(N),T=v!==void 0?v:C,I=i&&r,L=U.useCallback(J=>{J!==void 0&&(c!==void 0&&J<c&&(J=c),g!==void 0&&J>g&&(J=g)),v===void 0&&D(J),b?.(J);},[v,c,g,b]),V=()=>{let J=(T??0)+p;L(J);},E=()=>{let J=(T??0)-p;L(J);},A=J=>{let nt=J.target.value;if(nt==="")L(void 0);else {let z=parseFloat(nt);isNaN(z)||L(z);}},B=J=>{J.key==="ArrowUp"?(J.preventDefault(),V()):J.key==="ArrowDown"&&(J.preventDefault(),E());},H=U.useMemo(()=>T===void 0?"":w?new Intl.NumberFormat(void 0,w).format(T):T.toString(),[T,w]),Q=c!==void 0&&T!==void 0&&T<=c,te=g!==void 0&&T!==void 0&&T>=g;return jsxs("div",{className:o(jg({size:s}),e),children:[t&&jsxs(zi.Root,{htmlFor:k,className:o(vC({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[h&&jsx("button",{type:"button",onClick:E,disabled:f||Q,className:o(Kg({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:o(Ug({size:s}))})}),jsx("input",{ref:x,id:k,type:"text",inputMode:"decimal",value:H,onChange:A,onKeyDown:B,"aria-invalid":i,"aria-describedby":I?R:a?M:void 0,"aria-required":n,"aria-valuemin":c,"aria-valuemax":g,"aria-valuenow":T,disabled:f,className:o(bC({size:s,isInvalid:i}),!h&&"px-3",d),...P}),h&&jsx("button",{type:"button",onClick:V,disabled:f||te,className:o(Kg({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:o(Ug({size:s}))})})]}),a&&!I&&jsx("p",{id:M,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a}),I&&jsx("p",{id:R,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:r})]})});Xg.displayName="NumberField";var Qg=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),yC=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-12 pl-12 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),qg=cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),RC=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),wC=cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",{variants:{size:{sm:"h-5 w-5 right-1.5",md:"h-6 w-6 right-2",lg:"h-7 w-7 right-2.5"}},defaultVariants:{size:"md"}}),Jg=U.forwardRef(({className:e,label:t,description:a,errorMessage:r,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,value:c,defaultValue:g="",onChange:p,onClear:v,onSearch:N,showClearButton:b=true,showSearchIcon:h=true,disabled:w,placeholder:f="Search...",id:y,...P},x)=>{let S=U.useId(),k=y||S,M=`${k}-description`,R=`${k}-error`,[C,D]=U.useState(g),T=c!==void 0?c:C,I=i&&r,L=T.length>0,V=B=>{let H=B.target.value;c===void 0&&D(H),p?.(H);},E=()=>{c===void 0&&D(""),p?.(""),v?.();},A=B=>{B.key==="Enter"?(B.preventDefault(),N?.(T)):B.key==="Escape"&&L&&(B.preventDefault(),E());};return jsxs("div",{className:o(Qg({size:s}),e),children:[t&&jsxs(zi.Root,{htmlFor:k,className:o(RC({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[h&&jsx(Search,{className:o(qg({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsx("input",{ref:x,id:k,type:"search",value:T,onChange:V,onKeyDown:A,placeholder:f,"aria-invalid":i,"aria-describedby":I?R:a?M:void 0,"aria-required":n,disabled:w,className:o(yC({size:s,isInvalid:i}),!h&&"pl-3",!b&&"pr-3",d),...P}),b&&L&&!w&&jsx("button",{type:"button",onClick:E,className:o(wC({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsx(X,{className:o(qg({size:s}))})})]}),a&&!I&&jsx("p",{id:M,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a}),I&&jsx("p",{id:R,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:r})]})});Jg.displayName="SearchField";var tb=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),PC=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 pl-8 pr-3 py-1.5 text-xs",md:"h-10 pl-10 pr-3 py-2 text-sm",lg:"h-12 pl-12 pr-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),CC=cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),SC=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),cl=(e,t="yyyy-MM-dd")=>{if(!e)return "";let a=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(a)).replace("MM",r).replace("dd",n)},TC=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},ab=U.forwardRef(({className:e,label:t,description:a,errorMessage:r,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,value:c,defaultValue:g,onChange:p,minDate:v,maxDate:N,dateFormat:b="yyyy-MM-dd",showIcon:h=true,disabled:w,id:f,...y},P)=>{let x=U.useId(),S=f||x,k=`${S}-description`,M=`${S}-error`,[R,C]=U.useState(g??null),D=c!==void 0?c:R,T=i&&r,I=A=>{let B=TC(A.target.value);c===void 0&&C(B),p?.(B);},L=D?cl(D,"yyyy-MM-dd"):"",V=v?cl(v,"yyyy-MM-dd"):void 0,E=N?cl(N,"yyyy-MM-dd"):void 0;return jsxs("div",{className:o(tb({size:s}),e),children:[t&&jsxs(zi.Root,{htmlFor:S,className:o(SC({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[h&&jsx(Calendar,{className:o(CC({size:s}),"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none")}),jsx("input",{ref:P,id:S,type:"date",value:L,onChange:I,min:V,max:E,"aria-invalid":i,"aria-describedby":T?M:a?k:void 0,"aria-required":n,disabled:w,className:o(PC({size:s,isInvalid:i}),!h&&"pl-3",d),...y})]}),a&&!T&&jsx("p",{id:k,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a}),T&&jsx("p",{id:M,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:r})]})});ab.displayName="DateField";var ob=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),kC=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 pl-8 pr-3 py-1.5 text-xs",md:"h-10 pl-10 pr-3 py-2 text-sm",lg:"h-12 pl-12 pr-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),DC=cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),VC=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),pl=(e,t)=>{if(!e)return "";let a=String(e.hour).padStart(2,"0"),r=String(e.minute).padStart(2,"0");if(t&&e.second!==void 0){let n=String(e.second).padStart(2,"0");return `${a}:${r}:${n}`}return `${a}:${r}`},LC=(e,t)=>{if(!e)return null;let a=e.split(":");if(a.length<2)return null;let r=parseInt(a[0],10),n=parseInt(a[1],10),i=t&&a[2]?parseInt(a[2],10):void 0;return isNaN(r)||isNaN(n)?null:{hour:r,minute:n,second:i}},nb=U.forwardRef(({className:e,label:t,description:a,errorMessage:r,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,value:c,defaultValue:g,onChange:p,minTime:v,maxTime:N,showSeconds:b=false,showIcon:h=true,hourCycle:w=24,disabled:f,id:y,...P},x)=>{let S=U.useId(),k=y||S,M=`${k}-description`,R=`${k}-error`,[C,D]=U.useState(g??null),T=c!==void 0?c:C,I=i&&r,L=B=>{let H=LC(B.target.value,b);c===void 0&&D(H),p?.(H);},V=pl(T,b),E=v?pl(v,b):void 0,A=N?pl(N,b):void 0;return jsxs("div",{className:o(ob({size:s}),e),children:[t&&jsxs(zi.Root,{htmlFor:k,className:o(VC({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[h&&jsx(Clock,{className:o(DC({size:s}),"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none")}),jsx("input",{ref:x,id:k,type:"time",value:V,onChange:L,min:E,max:A,step:b?1:60,"aria-invalid":i,"aria-describedby":I?R:a?M:void 0,"aria-required":n,disabled:f,className:o(kC({size:s,isInvalid:i}),!h&&"pl-3",d),...P})]}),a&&!I&&jsx("p",{id:M,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a}),I&&jsx("p",{id:R,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:r})]})});nb.displayName="TimeField";var lb=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),IC=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 font-mono uppercase",{variants:{size:{sm:"h-8 pl-10 pr-3 py-1.5 text-xs",md:"h-10 pl-12 pr-3 py-2 text-sm",lg:"h-12 pl-14 pr-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),EC=cva("absolute left-2 top-1/2 -translate-y-1/2 rounded border border-input overflow-hidden",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),HC=cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),ib=e=>/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e),AC=e=>(e.startsWith("#")||(e="#"+e),e.length===4&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),e.toUpperCase()),db=U.forwardRef(({className:e,label:t,description:a,errorMessage:r,isRequired:n,isInvalid:i,size:s,labelClassName:l,inputClassName:d,descriptionClassName:m,errorClassName:u,value:c,defaultValue:g="#000000",onChange:p,showSwatch:v=true,showPicker:N=true,allowAlpha:b=false,disabled:h,id:w,...f},y)=>{let P=U.useId(),x=w||P,S=`${x}-picker`,k=`${x}-description`,M=`${x}-error`,[R,C]=U.useState(g),D=c!==void 0?c:R,T=i&&r,I=A=>{let B=A.target.value;B&&!B.startsWith("#")&&(B="#"+B),c===void 0&&C(B),p?.(B);},L=A=>{let B=A.target.value.toUpperCase();c===void 0&&C(B),p?.(B);},V=()=>{if(D&&ib(D)){let A=AC(D);A!==D&&(c===void 0&&C(A),p?.(A));}},E=ib(D)?D:"#000000";return jsxs("div",{className:o(lb({size:s}),e),children:[t&&jsxs(zi.Root,{htmlFor:x,className:o(HC({size:s}),l),children:[t,n&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[v&&jsx("div",{className:o(EC({size:s})),children:N?jsxs("label",{htmlFor:S,className:"block h-full w-full cursor-pointer",children:[jsx("input",{id:S,type:"color",value:E,onChange:L,disabled:h,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0",tabIndex:-1}),jsx("div",{className:"h-full w-full",style:{backgroundColor:E}})]}):jsx("div",{className:"h-full w-full",style:{backgroundColor:E}})}),jsx("input",{ref:y,id:x,type:"text",value:D,onChange:I,onBlur:V,placeholder:"#000000",maxLength:b?9:7,"aria-invalid":i,"aria-describedby":T?M:a?k:void 0,"aria-required":n,disabled:h,className:o(IC({size:s,isInvalid:i}),!v&&"pl-3",d),...f})]}),a&&!T&&jsx("p",{id:k,className:o("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a}),T&&jsx("p",{id:M,role:"alert",className:o("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",u),children:r})]})});db.displayName="ColorField";var mb=cva("inline-flex",{variants:{variant:{default:"",attached:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px"},orientation:{horizontal:"flex-row",vertical:"flex-col [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:ml-0"},spacing:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3"}},compoundVariants:[{variant:"attached",spacing:["sm","md","lg"],className:"gap-0"}],defaultVariants:{variant:"default",orientation:"horizontal",spacing:"sm"}}),pb=U.createContext({});function BC(){return U.useContext(pb)}var ub=U.forwardRef(({className:e,variant:t,orientation:a,spacing:r,disabled:n,children:i,...s},l)=>jsx(pb.Provider,{value:{disabled:n},children:jsx("div",{ref:l,role:"group",className:o(mb({variant:t,orientation:a,spacing:r,className:e})),...s,children:i})}));ub.displayName="ButtonGroup";var gb=cva("inline-flex items-center justify-center transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",soft:"bg-primary/10 text-primary hover:bg-primary/20",surface:"bg-muted text-muted-foreground hover:bg-muted/80"},size:{sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10",xl:"h-12 w-12"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"ghost",size:"md",radius:"md"}}),bb=U.forwardRef(({className:e,variant:t,size:a,radius:r,isLoading:n,disabled:i,children:s,...l},d)=>{let m={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5",xl:"h-6 w-6"}[a??"md"];return jsx("button",{ref:d,type:"button",disabled:i||n,className:o(gb({variant:t,size:a,radius:r,className:e})),...l,children:n?jsxs("svg",{className:o("animate-spin",m),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):jsx("span",{className:o("[&>svg]:h-full [&>svg]:w-full",m),children:s})})});bb.displayName="IconButton";var hb=cva("inline-flex items-center",{variants:{variant:{default:"gap-1",compact:"gap-0.5",attached:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px gap-0"},orientation:{horizontal:"flex-row",vertical:"flex-col [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:ml-0"},size:{sm:"",md:"",lg:""},density:{compact:"gap-0.5",regular:"gap-1",spacious:"gap-2"}},defaultVariants:{variant:"default",orientation:"horizontal",size:"md",density:"regular"}}),xb=U.forwardRef(({className:e,variant:t,orientation:a,size:r,density:n,items:i,maxVisibleItems:s,isDisabled:l,onAction:d,showLabels:m=false,renderItem:u,...c},g)=>{let p=s&&s<i.length?i.slice(0,s):i,v=s&&s<i.length?i.slice(s):[],N={sm:"h-8 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-4 text-base"}[r??"md"],b={sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10"}[r??"md"],h={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[r??"md"],w=(y,P)=>{P&&P(),d&&d(y);},f=y=>jsxs("button",{type:"button",disabled:l||y.isDisabled,onClick:()=>w(y.key,y.onPress),className:o("inline-flex items-center justify-center gap-2 rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50",m?N:b),"aria-label":y.label,children:[y.icon&&jsx("span",{className:h,children:y.icon}),m&&jsx("span",{children:y.label})]},y.key);return jsxs("div",{ref:g,role:"group",className:o(hb({variant:t,orientation:a,size:r,density:n,className:e})),...c,children:[p.map(y=>u?u(y):f(y)),v.length>0&&jsxs($a,{children:[jsx(_a,{asChild:true,children:jsx("button",{type:"button",disabled:l,className:o("inline-flex items-center justify-center rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50",b),"aria-label":"More actions",children:jsx(MoreHorizontal,{className:h})})}),jsx(pa,{align:"end",children:v.map(y=>jsxs(xt,{disabled:y.isDisabled,onClick:()=>w(y.key,y.onPress),children:[y.icon&&jsx("span",{className:o(h,"mr-2"),children:y.icon}),y.label]},y.key))})]})]})});xb.displayName="ActionGroup";var Nb=cva("inline-flex items-center gap-2",{variants:{variant:{neutral:"[--status-color:theme(colors.muted.foreground)]",info:"[--status-color:theme(colors.blue.500)]",positive:"[--status-color:theme(colors.green.500)]",notice:"[--status-color:theme(colors.yellow.500)]",negative:"[--status-color:theme(colors.red.500)]"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"neutral",size:"md"}}),$C=cva("rounded-full bg-[--status-color] flex-shrink-0",{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2.5 w-2.5"},pulse:{true:"animate-pulse",false:""}},defaultVariants:{size:"md",pulse:false}}),Pb=U.forwardRef(({className:e,variant:t,size:a,pulse:r=false,hideLabel:n=false,children:i,...s},l)=>jsxs("span",{ref:l,role:"status",className:o(Nb({variant:t,size:a,className:e})),...s,children:[jsx("span",{className:o($C({size:a,pulse:r})),"aria-hidden":"true"}),!n&&i&&jsx("span",{className:"text-foreground",children:i})]}));Pb.displayName="StatusLight";var Sb=cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-3 max-w-xs",md:"gap-4 max-w-sm",lg:"gap-5 max-w-md"}},defaultVariants:{size:"md"}}),KC=cva("text-muted-foreground",{variants:{size:{sm:"[&>svg]:h-16 [&>svg]:w-16",md:"[&>svg]:h-24 [&>svg]:w-24",lg:"[&>svg]:h-32 [&>svg]:w-32"}},defaultVariants:{size:"md"}}),UC=cva("font-semibold text-foreground",{variants:{size:{sm:"text-base",md:"text-lg",lg:"text-xl"}},defaultVariants:{size:"md"}}),YC=cva("text-muted-foreground",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Tb=U.forwardRef(({className:e,size:t,illustration:a,heading:r,description:n,children:i,...s},l)=>jsxs("div",{ref:l,className:o(Sb({size:t,className:e})),...s,children:[a&&jsx("div",{className:o(KC({size:t})),"aria-hidden":"true",children:a}),r&&jsx("h3",{className:o(UC({size:t})),children:r}),n&&jsx("p",{className:o(YC({size:t})),children:n}),i&&jsx("div",{className:"mt-2",children:i})]}));Tb.displayName="IllustratedMessage";var Db=cva("relative flex gap-3 rounded-lg border p-4 text-sm",{variants:{variant:{info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-100 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-950 dark:text-green-100 [&>svg]:text-green-600 dark:[&>svg]:text-green-400",warning:"border-yellow-200 bg-yellow-50 text-yellow-900 dark:border-yellow-800 dark:bg-yellow-950 dark:text-yellow-100 [&>svg]:text-yellow-600 dark:[&>svg]:text-yellow-400",error:"border-red-200 bg-red-50 text-red-900 dark:border-red-800 dark:bg-red-950 dark:text-red-100 [&>svg]:text-red-600 dark:[&>svg]:text-red-400",neutral:"border-border bg-muted text-foreground [&>svg]:text-muted-foreground"}},defaultVariants:{variant:"info"}}),eS={info:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle,neutral:Info},Vb=U.forwardRef(({className:e,variant:t,title:a,icon:r,hideIcon:n=false,isDismissible:i=false,onDismiss:s,actions:l,children:d,...m},u)=>{let[c,g]=U.useState(true);if(!c)return null;let p=eS[t??"info"],v=()=>{g(false),s?.();};return jsxs("div",{ref:u,role:"alert",className:o(Db({variant:t,className:e})),...m,children:[!n&&jsx("div",{className:"flex-shrink-0",children:r||jsx(p,{className:"h-5 w-5"})}),jsxs("div",{className:"flex-1 space-y-1",children:[a&&jsx("div",{className:"font-medium",children:a}),d&&jsx("div",{className:"opacity-90",children:d}),l&&jsx("div",{className:"mt-3 flex gap-2",children:l})]}),i&&jsx("button",{type:"button",onClick:v,className:"absolute right-2 top-2 rounded-md p-1 opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Dismiss",children:jsx(X,{className:"h-4 w-4"})})]})});Vb.displayName="InlineAlert";var Lb=cva("fixed flex items-center gap-2 rounded-lg border bg-background shadow-lg transition-all duration-200",{variants:{position:{bottom:"bottom-4 left-1/2 -translate-x-1/2",top:"top-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4"},size:{sm:"px-3 py-2 gap-1.5",md:"px-4 py-2.5 gap-2",lg:"px-5 py-3 gap-3"}},defaultVariants:{position:"bottom",size:"md"}}),Ib=U.forwardRef(({className:e,position:t,size:a,selectedCount:r=0,isOpen:n=true,onClose:i,showClose:s=true,selectedText:l,children:d,...m},u)=>{if(!n||r===0)return null;let c=()=>typeof l=="function"?l(r):l||`${r} item${r>1?"s":""} selected`;return jsxs("div",{ref:u,role:"toolbar","aria-label":"Actions for selected items",className:o(Lb({position:t,size:a,className:e})),...m,children:[jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:c()}),jsx("div",{className:"h-4 w-px bg-border"}),jsx("div",{className:"flex items-center gap-1",children:d}),s&&jsxs(Fragment,{children:[jsx("div",{className:"h-4 w-px bg-border"}),jsx("button",{type:"button",onClick:i,className:"rounded-md p-1 text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors","aria-label":"Close action bar",children:jsx(X,{className:"h-4 w-4"})})]})]})});Ib.displayName="ActionBar";var Eb=U.forwardRef(({className:e,icon:t,children:a,...r},n)=>jsxs("button",{ref:n,type:"button",className:o("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50",e),...r,children:[t&&jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:t}),a]}));Eb.displayName="ActionBarButton";var Hb=cva("inline-flex items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",subtle:"text-muted-foreground hover:text-foreground hover:bg-muted"},size:{sm:"h-7 w-7",md:"h-8 w-8",lg:"h-9 w-9"}},defaultVariants:{variant:"ghost",size:"md"}});function sS(e){return "items"in e}var Ab=U.forwardRef(({items:e,align:t="end",side:a="bottom",iconOrientation:r="vertical",trigger:n,variant:i,size:s,onAction:l,"aria-label":d="More actions",triggerClassName:m,disabled:u},c)=>{let g={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}[s??"md"],p=r==="horizontal"?MoreHorizontal:MoreVertical,v=b=>{b.onSelect?.(),l?.(b.key);},N=b=>jsxs(xt,{disabled:b.isDisabled,onClick:()=>v(b),className:o(b.isDestructive&&"text-destructive focus:text-destructive"),children:[b.icon&&jsx("span",{className:"mr-2 h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:b.icon}),jsx("span",{className:"flex-1",children:b.label}),b.shortcut&&jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:b.shortcut})]},b.key);return jsxs($a,{children:[jsx(_a,{asChild:true,children:n||jsx("button",{ref:c,type:"button",disabled:u,className:o(Hb({variant:i,size:s}),m),"aria-label":d,children:jsx(p,{className:g})})}),jsx(pa,{align:t,side:a,children:e.map((b,h)=>sS(b)?jsxs(U.Fragment,{children:[h>0&&jsx(nn,{}),b.items.map(N)]},b.key):N(b))})]})});Ab.displayName="ActionMenu";var Fb=cva("flex flex-col",{variants:{variant:{default:"gap-1",bordered:"border rounded-lg divide-y",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),Ob=cva("flex items-center gap-3 transition-colors cursor-pointer",{variants:{variant:{default:"rounded-md hover:bg-accent",bordered:"hover:bg-accent",cards:"rounded-lg border hover:border-primary/50 hover:bg-accent/50"},size:{sm:"px-2 py-1.5 text-sm",md:"px-3 py-2",lg:"px-4 py-3 text-lg"},isSelected:{true:"bg-accent",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"cards",isSelected:true,className:"border-primary bg-accent"}],defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function Gb({className:e,variant:t,size:a,items:r,selectedKeys:n,selectionMode:i="none",onSelectionChange:s,allowsDragging:l=false,onReorder:d,showCheckbox:m=false,renderItem:u,emptyContent:c,...g}){let[p,v]=U.useState(new Set),[N,b]=U.useState(null),[h,w]=U.useState(null),f=U.useMemo(()=>n?n instanceof Set?n:new Set(n):p,[n,p]),y=k=>{if(i==="none")return;let M;i==="single"?M=f.has(k)?new Set:new Set([k]):(M=new Set(f),M.has(k)?M.delete(k):M.add(k)),n||v(M),s?.(M);},P=(k,M)=>{b(M),k.dataTransfer.effectAllowed="move";},x=(k,M)=>{k.preventDefault(),N!==M&&w(M);},S=()=>{if(N&&h&&N!==h){let k=r.findIndex(D=>D.key===N),M=r.findIndex(D=>D.key===h),R=[...r],[C]=R.splice(k,1);R.splice(M,0,C),d?.(R);}b(null),w(null);};return r.length===0?jsx("div",{className:o("flex items-center justify-center p-8 text-muted-foreground",e),children:c||"No items"}):jsx("div",{role:"listbox","aria-multiselectable":i==="multiple",className:o(Fb({variant:t,size:a,className:e})),...g,children:r.map(k=>{let M=f.has(k.key),R=N===k.key,C=h===k.key;return u?jsx("div",{role:"option","aria-selected":M,onClick:()=>y(k.key),children:u(k,M)},k.key):jsxs("div",{role:"option","aria-selected":M,"aria-disabled":k.isDisabled,draggable:l&&!k.isDisabled,onDragStart:D=>P(D,k.key),onDragOver:D=>x(D,k.key),onDragEnd:S,onClick:()=>!k.isDisabled&&y(k.key),className:o(Ob({variant:t,size:a,isSelected:M,isDisabled:k.isDisabled}),R&&"opacity-50",C&&"border-t-2 border-t-primary"),children:[l&&jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground cursor-grab"}),m&&i!=="none"&&jsx("div",{className:o("flex h-4 w-4 items-center justify-center rounded border",M?"bg-primary border-primary text-primary-foreground":"border-input"),children:M&&jsx(Check,{className:"h-3 w-3"})}),k.icon&&jsx("span",{className:"h-5 w-5 text-muted-foreground [&>svg]:h-full [&>svg]:w-full",children:k.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:k.label}),k.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:k.description})]})]},k.key)})})}Gb.displayName="ListView";var $b=cva("relative flex w-full touch-none select-none",{variants:{orientation:{horizontal:"items-center",vertical:"flex-col justify-center h-full"},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"horizontal",size:"md"}}),cS=cva("relative grow overflow-hidden rounded-full bg-secondary",{variants:{orientation:{horizontal:"w-full",vertical:"w-2 h-full"},size:{sm:"h-1",md:"h-2",lg:"h-3"}},compoundVariants:[{orientation:"vertical",size:"sm",className:"w-1 h-full"},{orientation:"vertical",size:"md",className:"w-2 h-full"},{orientation:"vertical",size:"lg",className:"w-3 h-full"}],defaultVariants:{orientation:"horizontal",size:"md"}}),Wb=cva("block rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{size:"md"}}),_b=U.forwardRef(({className:e,orientation:t="horizontal",size:a,value:r,defaultValue:n=[25,75],onValueChange:i,onValueCommit:s,showLabels:l=false,formatLabel:d=b=>String(b),trackColor:m="primary",min:u=0,max:c=100,step:g=1,disabled:p,...v},N)=>{let[b,h]=U.useState(n),w=r??b,f=x=>{let S=x;r||h(S),i?.(S);},y=x=>{s?.(x);},P={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[m];return jsxs("div",{className:"relative w-full",children:[l&&jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsx("span",{children:d(w[0])}),jsx("span",{children:d(w[1])})]}),jsxs(zt.Root,{ref:N,value:w,onValueChange:f,onValueCommit:y,min:u,max:c,step:g,disabled:p,orientation:t??"horizontal",className:o($b({orientation:t,size:a,className:e})),...v,children:[jsx(zt.Track,{className:o(cS({orientation:t,size:a})),children:jsx(zt.Range,{className:o("absolute rounded-full",P,{"h-full":t==="horizontal","w-full":t==="vertical"})})}),jsx(zt.Thumb,{className:o(Wb({size:a}))}),jsx(zt.Thumb,{className:o(Wb({size:a}))})]})]})});_b.displayName="RangeSlider";var Yb=cva("inline-flex items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{help:"text-muted-foreground hover:text-foreground",info:"text-blue-500 hover:text-blue-600",warning:"text-yellow-500 hover:text-yellow-600"},size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"help",size:"md"}}),fS=cva("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none animate-in fade-in-0 zoom-in-95",{variants:{size:{sm:"w-56 text-xs",md:"w-72 text-sm",lg:"w-80 text-base"}},defaultVariants:{size:"md"}}),gS={help:HelpCircle,info:Info,warning:AlertCircle},jb=U.forwardRef(({variant:e="help",size:t,title:a,children:r,trigger:n,side:i="top",align:s="center",open:l,onOpenChange:d,learnMoreUrl:m,learnMoreText:u="Learn more",triggerClassName:c,contentClassName:g},p)=>{let v=gS[e??"help"];return jsxs(st.Root,{open:l,onOpenChange:d,children:[jsx(st.Trigger,{asChild:true,children:n||jsx("button",{ref:p,type:"button",className:o(Yb({variant:e,size:t}),c),"aria-label":"Help",children:jsx(v,{className:"h-full w-full"})})}),jsx(st.Portal,{children:jsxs(st.Content,{side:i,align:s,sideOffset:8,className:o(fS({size:t}),g),children:[a&&jsx("div",{className:"mb-2 font-semibold text-foreground",children:a}),jsx("div",{className:"text-muted-foreground",children:r}),m&&jsxs("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block text-primary hover:underline",children:[u," \u2192"]}),jsx(st.Arrow,{className:"fill-popover"})]})})]})});jb.displayName="ContextualHelp";var qb=cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),yl=cva("inline-flex items-center gap-1 rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-background hover:bg-accent",soft:"bg-primary/10 text-primary",surface:"bg-muted text-muted-foreground"},size:{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},isSelected:{true:"",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"outline",isSelected:true,className:"border-primary bg-primary/5"},{variant:"soft",isSelected:true,className:"bg-primary/20"},{variant:"surface",isSelected:true,className:"bg-muted/80 ring-2 ring-primary/20"}],defaultVariants:{variant:"soft",size:"md",isSelected:false,isDisabled:false}});function Zb({className:e,spacing:t,variant:a,size:r,items:n,selectedKeys:i,selectionMode:s="none",onSelectionChange:l,allowsRemoving:d=false,onRemove:m,label:u,description:c,errorMessage:g,maxTags:p,...v}){let[N,b]=U.useState(new Set),h=U.useMemo(()=>i?i instanceof Set?i:new Set(i):N,[i,N]),w=x=>{if(s==="none")return;let S;s==="single"?S=h.has(x)?new Set:new Set([x]):(S=new Set(h),S.has(x)?S.delete(x):S.add(x)),i||b(S),l?.(S);},f=(x,S)=>{S.stopPropagation(),m?.(x);},y=p?n.slice(0,p):n,P=p?Math.max(0,n.length-p):0;return jsxs("div",{className:"flex flex-col gap-1.5",children:[u&&jsx("span",{className:"text-sm font-medium text-foreground",children:u}),c&&jsx("span",{className:"text-sm text-muted-foreground",children:c}),jsxs("div",{role:"group","aria-label":u,className:o(qb({spacing:t}),e),...v,children:[y.map(x=>{let S=h.has(x.key),k=s!=="none";return jsxs("span",{role:k?"button":void 0,tabIndex:k&&!x.isDisabled?0:void 0,"aria-pressed":k?S:void 0,onClick:()=>!x.isDisabled&&w(x.key),onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&!x.isDisabled&&(M.preventDefault(),w(x.key));},style:x.color?{backgroundColor:x.color}:void 0,className:o(yl({variant:x.color?void 0:a,size:r,isSelected:S,isDisabled:x.isDisabled}),k&&!x.isDisabled&&"cursor-pointer hover:opacity-80",x.color&&"text-white"),children:[x.icon&&jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:x.icon}),x.label,d&&!x.isDisabled&&jsx("button",{type:"button",onClick:M=>f(x.key,M),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${x.label}`,children:jsx(X,{className:"h-3 w-3"})})]},x.key)}),P>0&&jsxs("span",{className:o(yl({variant:"surface",size:r}),"cursor-default"),children:["+",P," more"]})]}),g&&jsx("span",{className:"text-sm text-destructive",children:g})]})}Zb.displayName="TagGroup";var ev=cva("grid",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",auto:"grid-cols-[repeat(auto-fill,minmax(150px,1fr))]"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{columns:"auto",gap:"md"}}),tv=cva("relative flex flex-col rounded-lg border transition-all cursor-pointer",{variants:{variant:{default:"hover:border-primary/50 hover:bg-accent/50",card:"bg-card shadow-sm hover:shadow-md hover:border-primary/50"},size:{sm:"p-2",md:"p-3",lg:"p-4"},isSelected:{true:"border-primary bg-accent ring-2 ring-primary/20",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function av({className:e,columns:t,gap:a,items:r,selectedKeys:n,selectionMode:i="none",onSelectionChange:s,showSelectionIndicator:l=true,itemVariant:d="default",itemSize:m="md",renderItem:u,emptyContent:c,...g}){let[p,v]=U.useState(new Set),N=U.useMemo(()=>n?n instanceof Set?n:new Set(n):p,[n,p]),b=h=>{if(i==="none")return;let w;i==="single"?w=N.has(h)?new Set:new Set([h]):(w=new Set(N),w.has(h)?w.delete(h):w.add(h)),n||v(w),s?.(w);};return r.length===0?jsx("div",{className:o("flex items-center justify-center p-8 text-muted-foreground",e),children:c||"No items"}):jsx("div",{role:"grid","aria-multiselectable":i==="multiple",className:o(ev({columns:t,gap:a,className:e})),...g,children:r.map(h=>{let w=N.has(h.key);return u?jsx("div",{role:"gridcell","aria-selected":w,onClick:()=>b(h.key),children:u(h,w)},h.key):jsxs("div",{role:"gridcell","aria-selected":w,"aria-disabled":h.isDisabled,onClick:()=>!h.isDisabled&&b(h.key),className:o(tv({variant:d,size:m,isSelected:w,isDisabled:h.isDisabled})),children:[l&&i!=="none"&&w&&jsx("div",{className:"absolute top-2 right-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:jsx(Check,{className:"h-3 w-3"})}),h.thumbnail&&jsx("div",{className:"mb-2 aspect-square w-full overflow-hidden rounded-md bg-muted",children:h.thumbnail}),jsxs("div",{className:"min-w-0",children:[jsx("div",{className:"truncate font-medium",children:h.label}),h.description&&jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:h.description})]})]},h.key)})})}av.displayName="GridList";var ov=cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),hS=cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),xS=cva("h-full transition-all duration-300 ease-out",{variants:{color:{primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500",auto:""},rounded:{true:"rounded-full",false:"rounded-l-full"}},defaultVariants:{color:"primary",rounded:true}}),vi=U.forwardRef(({className:e,size:t,value:a,min:r=0,max:n=100,optimum:i,low:s,high:l,label:d,showValueLabel:m=false,formatValue:u,color:c="primary",trackVariant:g="default",...p},v)=>{let N=Math.min(100,Math.max(0,(a-r)/(n-r)*100)),b=()=>{if(c!=="auto")return "";let w=(a-r)/(n-r),f=s!==void 0?(s-r)/(n-r):.25,y=l!==void 0?(l-r)/(n-r):.75;return (i!==void 0?(i-r)/(n-r):1)>=.5?w<=f?"bg-red-500":w<=y?"bg-yellow-500":"bg-green-500":w>=y?"bg-red-500":w>=f?"bg-yellow-500":"bg-green-500"},h=u?u(a,N):`${Math.round(N)}%`;return jsxs("div",{ref:v,className:o("w-full",e),...p,children:[(d||m)&&jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[d&&jsx("span",{className:"text-sm font-medium text-foreground",children:d}),m&&jsx("span",{className:"text-sm text-muted-foreground",children:h})]}),jsx("div",{role:"meter","aria-valuenow":a,"aria-valuemin":r,"aria-valuemax":n,"aria-label":d,className:o(ov({size:t})),children:jsx("div",{className:o(hS({variant:g})),children:jsx("div",{className:o(xS({color:c==="auto"?void 0:c,rounded:N>=100}),c==="auto"&&b()),style:{width:`${N}%`}})})})]})});vi.displayName="Meter";var nv=U.forwardRef((e,t)=>jsx(vi,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));nv.displayName="DiskUsageMeter";var iv=U.forwardRef((e,t)=>jsx(vi,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));iv.displayName="BatteryMeter";var lv=cva("flex flex-wrap",{variants:{size:{sm:"gap-1",md:"gap-1.5",lg:"gap-2"},layout:{wrap:"flex-wrap",grid:"grid"}},defaultVariants:{size:"md",layout:"wrap"}}),dv=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],cv=["#f8fafc","#f1f5f9","#e2e8f0","#cbd5e1","#94a3b8","#64748b","#475569","#334155","#1e293b","#0f172a","#fef2f2","#fee2e2","#fecaca","#fca5a5","#f87171","#ef4444","#dc2626","#b91c1c","#991b1b","#7f1d1d","#fff7ed","#ffedd5","#fed7aa","#fdba74","#fb923c","#f97316","#ea580c","#c2410c","#9a3412","#7c2d12","#fefce8","#fef9c3","#fef08a","#fde047","#facc15","#eab308","#ca8a04","#a16207","#854d0e","#713f12","#f0fdf4","#dcfce7","#bbf7d0","#86efac","#4ade80","#22c55e","#16a34a","#15803d","#166534","#14532d","#eff6ff","#dbeafe","#bfdbfe","#93c5fd","#60a5fa","#3b82f6","#2563eb","#1d4ed8","#1e40af","#1e3a8a","#faf5ff","#f3e8ff","#e9d5ff","#d8b4fe","#c084fc","#a855f7","#9333ea","#7e22ce","#6b21a8","#581c87","#fdf2f8","#fce7f3","#fbcfe8","#f9a8d4","#f472b6","#ec4899","#db2777","#be185d","#9d174d","#831843"],mv=["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#9e9e9e","#607d8b"],pv=U.forwardRef(({value:e,defaultValue:t,onChange:a,colors:r="default",customColors:n,size:i,layout:s,swatchSize:l="md",swatchShape:d="square",columns:m,disabled:u,showSelection:c=true,className:g,...p},v)=>{let[N,b]=U.useState(t),h=e!==void 0?e:N,f=(()=>{if(n)return n;if(Array.isArray(r))return r;switch(r){case "tailwind":return cv;case "material":return mv;default:return dv}})(),y=x=>{u||(e===void 0&&b(x),a?.(x));},P=s==="grid"&&m?{gridTemplateColumns:`repeat(${m}, 1fr)`}:{};return jsx("div",{ref:v,role:"listbox","aria-label":"Color palette",className:o(lv({size:i,layout:s}),g),style:P,...p,children:f.map((x,S)=>jsx(kr,{color:x,size:l,shape:d,isSelected:c&&h?.toLowerCase()===x.toLowerCase(),onSelect:y,disabled:u,role:"option","aria-selected":h?.toLowerCase()===x.toLowerCase()},`${x}-${S}`))})});pv.displayName="ColorSwatchPicker";var uv=cva("relative rounded-md border border-input overflow-hidden cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64",full:"h-full w-full"}},defaultVariants:{size:"md"}}),yi=(e,t,a)=>{let r=n=>{let i=(n+e/60)%6;return a-a*t*Math.max(Math.min(i,4-i,1),0)};return [Math.round(r(5)*255),Math.round(r(3)*255),Math.round(r(1)*255)]},fv=(e,t,a)=>{e/=255,t/=255,a/=255;let r=Math.max(e,t,a),n=Math.min(e,t,a),i=r-n,s=0,l=r===0?0:i/r,d=r;if(i!==0)switch(r){case e:s=((t-a)/i+(t<a?6:0))*60;break;case t:s=((a-e)/i+2)*60;break;case a:s=((e-t)/i+4)*60;break}return [s,l,d]},gv=e=>{let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null},bv=(e,t,a)=>"#"+[e,t,a].map(r=>r.toString(16).padStart(2,"0")).join(""),vv=U.forwardRef(({hue:e,saturation:t,brightness:a,value:r,defaultValue:n="#ff0000",onChange:i,onColorChange:s,size:l,disabled:d,thumbSize:m=16,className:u,...c},g)=>{let p=U.useRef(null),[v,N]=U.useState(false),b=U.useCallback(H=>{let Q=gv(H);return Q?fv(...Q):[0,1,1]},[]),[h,w]=U.useState(()=>b(r||n)),f=e??h[0],y=t??h[1],P=a??h[2];U.useEffect(()=>{if(r){let H=b(r);w(H);}},[r,b]);let x=U.useCallback((H,Q)=>{if(d||!p.current)return;let te=p.current.getBoundingClientRect(),J=Math.max(0,Math.min(1,(H-te.left)/te.width)),nt=Math.max(0,Math.min(1,(Q-te.top)/te.height)),z=J,F=1-nt;t===void 0&&a===void 0&&w([f,z,F]),i?.({hue:f,saturation:z,brightness:F});let ae=yi(f,z,F);s?.(bv(...ae));},[d,f,t,a,i,s]),S=H=>{d||(H.preventDefault(),N(true),H.target.setPointerCapture(H.pointerId),x(H.clientX,H.clientY));},k=H=>{v&&x(H.clientX,H.clientY);},M=H=>{N(false),H.target.releasePointerCapture(H.pointerId);},[R,C,D]=yi(f,1,1),T=`rgb(${R}, ${C}, ${D})`,I=y*100,L=(1-P)*100,[V,E,A]=yi(f,y,P),B=`rgb(${V}, ${E}, ${A})`;return jsx("div",{ref:g,className:o(uv({size:l}),d&&"cursor-not-allowed opacity-50",u),...c,children:jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:T},onPointerDown:S,onPointerMove:k,onPointerUp:M,onPointerLeave:M,children:[jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to right, white, transparent)"}}),jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, black)"}}),jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:m,height:m,left:`calc(${I}% - ${m/2}px)`,top:`calc(${L}% - ${m/2}px)`,backgroundColor:B,boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});vv.displayName="ColorArea";var xv=cva("relative rounded-full cursor-pointer touch-none select-none",{variants:{orientation:{horizontal:"w-full",vertical:"h-full"},size:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",size:"sm",className:"h-3"},{orientation:"horizontal",size:"md",className:"h-4"},{orientation:"horizontal",size:"lg",className:"h-5"},{orientation:"vertical",size:"sm",className:"w-3"},{orientation:"vertical",size:"md",className:"w-4"},{orientation:"vertical",size:"lg",className:"w-5"}],defaultVariants:{orientation:"horizontal",size:"md"}}),PS=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cg fill='%23ccc'%3E%3Crect width='4' height='4'/%3E%3Crect x='4' y='4' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E")`,hv="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",yv=U.forwardRef(({value:e,defaultValue:t,onChange:a,channel:r="hue",baseColor:n="#ff0000",orientation:i,size:s,disabled:l,thumbSize:d=18,showBorder:m=true,className:u,...c},g)=>{let p=U.useRef(null),[v,N]=U.useState(false),b=()=>{switch(r){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[h,w]=U.useState(t??b()),f=e??h,y=r==="hue"?f/360:f,P=U.useCallback((T,I)=>{if(l||!p.current)return;let L=p.current.getBoundingClientRect(),V=i!=="vertical",E;V?E=Math.max(0,Math.min(1,(T-L.left)/L.width)):E=Math.max(0,Math.min(1,1-(I-L.top)/L.height));let A=r==="hue"?E*360:E;e===void 0&&w(A),a?.(A);},[l,i,r,e,a]),x=T=>{l||(T.preventDefault(),N(true),T.target.setPointerCapture(T.pointerId),P(T.clientX,T.clientY));},S=T=>{v&&P(T.clientX,T.clientY);},k=T=>{N(false),T.target.releasePointerCapture(T.pointerId);},M=()=>{let T=i!=="vertical",I=T?"to right":"to top";switch(r){case "hue":return T?hv:"linear-gradient(to top, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)";case "alpha":return `linear-gradient(${I}, transparent, ${n})`;case "saturation":return `linear-gradient(${I}, #808080, ${n})`;case "brightness":return `linear-gradient(${I}, #000000, ${n})`;default:return hv}},R=()=>r==="hue"?`hsl(${f}, 100%, 50%)`:n,C=i!=="vertical",D=y*100;return jsx("div",{ref:g,className:o(xv({orientation:i,size:s}),l&&"cursor-not-allowed opacity-50",u),...c,children:jsxs("div",{ref:p,className:o("absolute inset-0 rounded-full overflow-hidden",m&&"border border-input"),style:{backgroundImage:r==="alpha"?PS:void 0,backgroundSize:r==="alpha"?"8px 8px":void 0},onPointerDown:x,onPointerMove:S,onPointerUp:k,onPointerLeave:k,children:[jsx("div",{className:"absolute inset-0 rounded-full",style:{background:M()}}),jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:d,height:d,...C?{left:`calc(${D}% - ${d/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${D}% - ${d/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:R(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});yv.displayName="ColorSlider";var Rv=cva("relative cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64"}},defaultVariants:{size:"md"}}),TS=(e,t,a)=>{let r=e-a,n=t-a,i=Math.atan2(n,r)*180/Math.PI+90;return i<0&&(i+=360),i},wv=U.forwardRef(({value:e,defaultValue:t=0,onChange:a,size:r,disabled:n,innerRadius:i=.6,thumbSize:s=20,showCenter:l=true,className:d,...m},u)=>{let c=U.useRef(null),[g,p]=U.useState(false),[v,N]=U.useState(t),b=e??v,h=U.useCallback((x,S)=>{if(n||!c.current)return;let k=c.current.getBoundingClientRect(),M=k.width/2,R=x-k.left,C=S-k.top,D=TS(R,C,M);e===void 0&&N(D),a?.(D);},[n,e,a]),w=x=>{n||(x.preventDefault(),p(true),x.target.setPointerCapture(x.pointerId),h(x.clientX,x.clientY));},f=x=>{g&&h(x.clientX,x.clientY);},y=x=>{p(false),x.target.releasePointerCapture(x.pointerId);},P=()=>{let x=[];for(let S=0;S<=360;S+=30)x.push(`hsl(${S}, 100%, 50%) ${S}deg`);return `conic-gradient(from 270deg, ${x.join(", ")})`};return jsx("div",{ref:u,className:o(Rv({size:r}),n&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:c,className:"absolute inset-0 rounded-full",style:{background:P()},onPointerDown:w,onPointerMove:f,onPointerUp:y,onPointerLeave:y,children:[i<1&&jsx("div",{className:"absolute bg-background rounded-full",style:{top:`${(1-i)*50}%`,left:`${(1-i)*50}%`,width:`${i*100}%`,height:`${i*100}%`}}),l&&i<1&&jsx("div",{className:"absolute rounded-full border-2 border-input bg-background",style:{width:8,height:8,top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),jsx(MS,{hue:b,innerRadius:i,thumbSize:s})]})})});wv.displayName="ColorWheel";var MS=({hue:e,innerRadius:t,thumbSize:a})=>{let r=(1-(1-t)/2)*50,n=(e-90)*Math.PI/180,i=50+r*Math.cos(n),s=50+r*Math.sin(n);return jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:a,height:a,left:`calc(${i}% - ${a/2}px)`,top:`calc(${s}% - ${a/2}px)`,backgroundColor:`hsl(${e}, 100%, 50%)`,boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})};var Nv=cva("flex",{variants:{direction:{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"},gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},inline:{true:"inline-flex",false:"flex"}},defaultVariants:{direction:"row",align:"stretch",justify:"start",wrap:"nowrap",gap:0,inline:false}}),_o=U.forwardRef(({className:e,direction:t,align:a,justify:r,wrap:n,gap:i,inline:s,as:l="div",...d},m)=>jsx(l,{ref:m,className:o(Nv({direction:t,align:a,justify:r,wrap:n,gap:i,inline:s,className:e})),...d}));_o.displayName="Flex";var Pv=U.forwardRef(({gap:e=2,align:t="center",...a},r)=>jsx(_o,{ref:r,direction:"row",gap:e,align:t,...a}));Pv.displayName="HStack";var Cv=U.forwardRef(({gap:e=2,align:t="stretch",...a},r)=>jsx(_o,{ref:r,direction:"column",gap:e,align:t,...a}));Cv.displayName="VStack";var Sv=U.forwardRef((e,t)=>jsx(_o,{ref:t,align:"center",justify:"center",...e}));Sv.displayName="Center";var Mv=cva("grid",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12",none:"grid-cols-none",auto:"grid-cols-[repeat(auto-fill,minmax(200px,1fr))]"},rows:{1:"grid-rows-1",2:"grid-rows-2",3:"grid-rows-3",4:"grid-rows-4",5:"grid-rows-5",6:"grid-rows-6",none:"grid-rows-none"},gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},gapX:{0:"gap-x-0",1:"gap-x-1",2:"gap-x-2",3:"gap-x-3",4:"gap-x-4",5:"gap-x-5",6:"gap-x-6",8:"gap-x-8",10:"gap-x-10",12:"gap-x-12"},gapY:{0:"gap-y-0",1:"gap-y-1",2:"gap-y-2",3:"gap-y-3",4:"gap-y-4",5:"gap-y-5",6:"gap-y-6",8:"gap-y-8",10:"gap-y-10",12:"gap-y-12"},flow:{row:"grid-flow-row",col:"grid-flow-col",dense:"grid-flow-dense","row-dense":"grid-flow-row-dense","col-dense":"grid-flow-col-dense"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-items-start",center:"justify-items-center",end:"justify-items-end",stretch:"justify-items-stretch"},placeItems:{start:"place-items-start",center:"place-items-center",end:"place-items-end",stretch:"place-items-stretch"}},defaultVariants:{columns:1,gap:4,flow:"row",align:"stretch",justify:"stretch"}}),wi=U.forwardRef(({className:e,columns:t,rows:a,gap:r,gapX:n,gapY:i,flow:s,align:l,justify:d,placeItems:m,as:u="div",minChildWidth:c,style:g,...p},v)=>{let N=c?{...g,gridTemplateColumns:`repeat(auto-fill, minmax(${c}, 1fr))`}:g;return jsx(u,{ref:v,className:o(Mv({columns:c?void 0:t,rows:a,gap:r,gapX:n,gapY:i,flow:s,align:l,justify:d,placeItems:m,className:e})),style:N,...p})});wi.displayName="Grid";var kv=cva("",{variants:{colSpan:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",full:"col-span-full"},rowSpan:{1:"row-span-1",2:"row-span-2",3:"row-span-3",4:"row-span-4",5:"row-span-5",6:"row-span-6",full:"row-span-full"},colStart:{1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12",13:"col-start-13",auto:"col-start-auto"},colEnd:{1:"col-end-1",2:"col-end-2",3:"col-end-3",4:"col-end-4",5:"col-end-5",6:"col-end-6",7:"col-end-7",8:"col-end-8",9:"col-end-9",10:"col-end-10",11:"col-end-11",12:"col-end-12",13:"col-end-13",auto:"col-end-auto"},rowStart:{1:"row-start-1",2:"row-start-2",3:"row-start-3",4:"row-start-4",5:"row-start-5",6:"row-start-6",7:"row-start-7",auto:"row-start-auto"},rowEnd:{1:"row-end-1",2:"row-end-2",3:"row-end-3",4:"row-end-4",5:"row-end-5",6:"row-end-6",7:"row-end-7",auto:"row-end-auto"}}}),Dv=U.forwardRef(({className:e,colSpan:t,rowSpan:a,colStart:r,colEnd:n,rowStart:i,rowEnd:s,as:l="div",...d},m)=>jsx(l,{ref:m,className:o(kv({colSpan:t,rowSpan:a,colStart:r,colEnd:n,rowStart:i,rowEnd:s,className:e})),...d}));Dv.displayName="GridItem";var Vv=U.forwardRef(({columns:e=2,className:t,...a},r)=>{if(typeof e=="number")return jsx(wi,{ref:r,columns:e,className:t,...a});let n=o(e.sm&&`sm:grid-cols-${e.sm}`,e.md&&`md:grid-cols-${e.md}`,e.lg&&`lg:grid-cols-${e.lg}`,e.xl&&`xl:grid-cols-${e.xl}`);return jsx(wi,{ref:r,columns:1,className:o(n,t),...a})});Vv.displayName="SimpleGrid";var Iv=cva("rounded-lg",{variants:{variant:{default:"bg-muted",subtle:"bg-muted/50",outline:"border border-border bg-transparent",filled:"bg-accent",sunken:"bg-muted shadow-inner"},size:{sm:"p-3",md:"p-4",lg:"p-6",xl:"p-8"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"default",size:"md",radius:"lg"}}),Ev=U.forwardRef(({className:e,variant:t,size:a,radius:r,as:n="div",...i},s)=>jsx(n,{ref:s,className:o(Iv({variant:t,size:a,radius:r,className:e})),...i}));Ev.displayName="Well";var Av=cva("flex",{variants:{orientation:{horizontal:"flex-row items-center gap-2",vertical:"flex-col gap-1"},size:{sm:"",md:"",lg:""},align:{start:"items-start",center:"items-center",end:"items-end"}},compoundVariants:[{orientation:"horizontal",align:"start",className:"items-start"},{orientation:"horizontal",align:"center",className:"items-center"},{orientation:"horizontal",align:"end",className:"items-end"}],defaultVariants:{orientation:"vertical",size:"md",align:"start"}}),IS=cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),ES=cva("text-foreground",{variants:{size:{sm:"text-sm",md:"text-base",lg:"text-lg"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},mono:{true:"font-mono",false:""}},defaultVariants:{size:"md",weight:"normal",mono:false}}),zv=U.forwardRef(({className:e,orientation:t,size:a,align:r,label:n,value:i,valueWeight:s,mono:l,labelWidth:d,labelClassName:m,valueClassName:u,showColon:c=false,copyable:g=false,onCopy:p,...v},N)=>{let b=async()=>{if(!(!g||i===null||i===void 0))try{let h=typeof i=="string"?i:String(i);await navigator.clipboard.writeText(h),p?.();}catch{}};return jsxs("div",{ref:N,className:o(Av({orientation:t,size:a,align:r,className:e})),...v,children:[jsxs("span",{className:o(IS({size:a}),m),style:d?{width:d,flexShrink:0}:void 0,children:[n,c&&":"]}),jsx("span",{className:o(ES({size:a,weight:s,mono:l}),g&&"cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 transition-colors",u),onClick:g?b:void 0,role:g?"button":void 0,tabIndex:g?0:void 0,onKeyDown:g?h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),b());}:void 0,children:i})]})});zv.displayName="LabeledValue";var Bv=cva("",{variants:{orientation:{horizontal:"flex flex-row flex-wrap",vertical:"flex flex-col"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"vertical",gap:"md"}}),Fv=U.forwardRef(({className:e,orientation:t,gap:a,...r},n)=>jsx("div",{ref:n,className:o(Bv({orientation:t,gap:a,className:e})),...r}));Fv.displayName="LabeledValueGroup";var $v=cva("flex items-center rounded-md border border-input bg-background ring-offset-background transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",{variants:{size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),Xr=cva("text-muted-foreground shrink-0",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),_v=U.forwardRef(({value:e,defaultValue:t="",onChange:a,onSearch:r,onSelect:n,suggestions:i=[],recentSearches:s=[],onClearRecentSearches:l,trendingSearches:d=[],isLoading:m,showClear:u=true,showIcon:c=true,popoverWidth:g="trigger",emptyMessage:p="No results found",size:v,variant:N,className:b,placeholder:h="Search...",disabled:w,...f},y)=>{let[P,x]=U.useState(false),[S,k]=U.useState(t),M=e!==void 0?e:S,R=U.useRef(null);U.useImperativeHandle(y,()=>R.current);let C=M.length>0,D=P&&(i.length>0||s.length>0||d.length>0||C),T=H=>{e===void 0&&k(H),a?.(H);},I=()=>{T(""),R.current?.focus();},L=H=>{H?.preventDefault(),M.trim()&&(r?.(M.trim()),x(false));},V=H=>{T(H.label),n?.(H),x(false);},E=H=>{T(H),r?.(H),x(false);},A=H=>{T(H),r?.(H),x(false);},B=U.useMemo(()=>{let H={};return i.forEach(Q=>{let te=Q.category||"Results";H[te]||(H[te]=[]),H[te].push(Q);}),H},[i]);return jsxs(ve,{open:D,onOpenChange:x,children:[jsx(Re,{asChild:true,children:jsxs("form",{onSubmit:L,className:o($v({size:v,variant:N}),b),children:[c&&jsx(Search,{className:o(Xr({size:v}),"ml-3")}),jsx("input",{ref:R,type:"text",value:M,onChange:H=>T(H.target.value),onFocus:()=>x(true),placeholder:h,disabled:w,className:o("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!c&&"pl-3"),...f}),u&&C&&!w&&jsx("button",{type:"button",onClick:I,className:o("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",Xr({size:v})),children:jsx(X,{className:"h-full w-full"})})]})}),jsx(ue,{className:"p-0",style:{width:g==="trigger"?"var(--radix-popover-trigger-width)":g},align:"start",onOpenAutoFocus:H=>H.preventDefault(),children:jsxs(Command,{className:"rounded-lg border-0",children:[s.length>0&&!C&&jsxs("div",{className:"p-2",children:[jsxs("div",{className:"flex items-center justify-between px-2 py-1.5",children:[jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Recent"}),l&&jsx("button",{type:"button",onClick:l,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),s.map((H,Q)=>jsxs("button",{type:"button",onClick:()=>E(H),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(Clock,{className:o(Xr({size:v}))}),jsx("span",{className:"flex-1 text-left truncate",children:H}),jsx(ArrowRight,{className:o(Xr({size:v}),"opacity-0 group-hover:opacity-100")})]},Q))]}),d.length>0&&!C&&jsxs("div",{className:"border-t p-2",children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Trending"})}),d.map((H,Q)=>jsxs("button",{type:"button",onClick:()=>A(H),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(TrendingUp,{className:o(Xr({size:v}))}),jsx("span",{className:"flex-1 text-left truncate",children:H})]},Q))]}),C&&jsx("div",{className:"p-2",children:m?jsx("div",{className:"flex items-center justify-center py-6",children:jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):i.length>0?Object.entries(B).map(([H,Q])=>jsxs("div",{children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:H})}),Q.map(te=>jsxs("button",{type:"button",onClick:()=>V(te),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[te.icon||jsx(Search,{className:o(Xr({size:v}))}),jsxs("div",{className:"flex-1 text-left",children:[jsx("div",{className:"truncate",children:te.label}),te.description&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:te.description})]})]},te.id))]},H)):jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});_v.displayName="SearchBar";var Kv={Pages:jsx(File,{className:"h-4 w-4"}),Files:jsx(Folder,{className:"h-4 w-4"}),Settings:jsx(Settings,{className:"h-4 w-4"}),Users:jsx(User,{className:"h-4 w-4"}),Tags:jsx(Hash,{className:"h-4 w-4"})},Uv=U.forwardRef(({open:e,onOpenChange:t,items:a=[],recentItems:r=[],placeholder:n="Search...",isLoading:i,emptyMessage:s="No results found.",filter:l,shortcut:d="\u2318K",onSelect:m,footer:u},c)=>{let[g,p]=U.useState(""),v=U.useRef(null);U.useEffect(()=>{e||p("");},[e]);let N=U.useMemo(()=>{let f={};return a.forEach(y=>{let P=y.category||"Results";f[P]||(f[P]=[]),f[P].push(y);}),f},[a]),b=f=>{f.onSelect?.(),m?.(f),t?.(false);},h=g.length>0,w=!h&&r.length>0;return jsx(oe.Root,{open:e,onOpenChange:t,children:jsxs(oe.Portal,{children:[jsx(oe.Overlay,{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),jsx(oe.Content,{ref:c,className:"fixed left-1/2 top-[20%] z-50 w-full max-w-2xl -translate-x-1/2 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-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2",children:jsxs(Command,{className:"overflow-hidden rounded-xl border bg-background shadow-2xl",filter:l,shouldFilter:!l,children:[jsxs("div",{className:"flex items-center border-b px-4",children:[jsx(Search,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),jsx(Command.Input,{ref:v,value:g,onValueChange:p,placeholder:n,className:"flex h-14 w-full bg-transparent px-4 py-4 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),g&&jsx("button",{type:"button",onClick:()=>p(""),className:"rounded-sm p-1 text-muted-foreground hover:text-foreground",children:jsx(X,{className:"h-4 w-4"})})]}),jsx(Command.List,{className:"max-h-[400px] overflow-y-auto p-2",children:i?jsx("div",{className:"flex items-center justify-center py-10",children:jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):jsxs(Fragment,{children:[w&&jsxs(Command.Group,{heading:"Recent",children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Recent"}),r.map(f=>jsxs(Command.Item,{value:f.label,onSelect:()=>b(f),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:f.icon||Kv[f.category||""]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:f.label}),f.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:f.description})]}),f.shortcut&&jsx("div",{className:"flex items-center gap-1",children:f.shortcut.map((y,P)=>jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:y},P))})]},f.id))]}),h&&Object.entries(N).map(([f,y])=>jsxs(Command.Group,{heading:f,children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:f}),y.map(P=>jsxs(Command.Item,{value:`${P.label} ${P.keywords?.join(" ")||""}`,onSelect:()=>b(P),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:P.icon||Kv[f]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:P.label}),P.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:P.description})]}),jsx(ArrowRight,{className:"h-4 w-4 text-muted-foreground opacity-0 group-aria-selected:opacity-100"})]},P.id))]},f)),jsx(Command.Empty,{className:"py-10 text-center text-sm text-muted-foreground",children:s})]})}),u?jsx("div",{className:"border-t px-4 py-3",children:u}):jsxs("div",{className:"flex items-center justify-between border-t px-4 py-3 text-xs text-muted-foreground",children:[jsxs("div",{className:"flex items-center gap-4",children:[jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u2191\u2193"}),"Navigate"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u21B5"}),"Select"]}),jsxs("span",{className:"flex items-center gap-1",children:[jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"Esc"}),"Close"]})]}),jsxs("span",{className:"flex items-center gap-1",children:["Press ",jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:d})," to open"]})]})]})})]})})});Uv.displayName="SpotlightSearch";function YS(e="k"){let[t,a]=U.useState(false);return U.useEffect(()=>{let r=n=>{(n.metaKey||n.ctrlKey)&&n.key===e&&(n.preventDefault(),a(i=>!i));};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),{open:t,setOpen:a,toggle:()=>a(r=>!r)}}var tT=cva("",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),aT={default:"bg-muted",info:"bg-blue-500/10 text-blue-600 dark:text-blue-400",success:"bg-green-500/10 text-green-600 dark:text-green-400",warning:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",error:"bg-red-500/10 text-red-600 dark:text-red-400"},rT=e=>{let t=typeof e=="string"?new Date(e):e,r=new Date().getTime()-t.getTime(),n=Math.floor(r/6e4),i=Math.floor(r/36e5),s=Math.floor(r/864e5);return n<1?"Just now":n<60?`${n}m ago`:i<24?`${i}h ago`:s<7?`${s}d ago`:t.toLocaleDateString()},Yv=U.forwardRef(({notifications:e=[],onNotificationClick:t,onMarkAsRead:a,onMarkAllAsRead:r,onDismiss:n,onClearAll:i,showSettings:s,onSettingsClick:l,trigger:d,align:m="end",emptyMessage:u="No notifications",maxHeight:c=400,className:g},p)=>{let[v,N]=U.useState(false),b=e.filter(f=>!f.read).length,h=e.length>0,w=f=>{f.read||a?.(f.id),t?.(f);};return jsxs(ve,{open:v,onOpenChange:N,children:[jsx(Re,{asChild:true,children:d||jsxs("button",{ref:p,className:o("relative inline-flex h-10 w-10 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",g),children:[jsx(Bell,{className:"h-5 w-5"}),b>0&&jsx("span",{className:"absolute -right-1 -top-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-[10px] font-medium text-primary-foreground",children:b>99?"99+":b})]})}),jsxs(ue,{className:"w-80 p-0 sm:w-96",align:m,sideOffset:8,children:[jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("h3",{className:"font-semibold",children:"Notifications"}),b>0&&jsxs(no,{variant:"soft",className:"h-5 px-1.5 text-xs",children:[b," new"]})]}),jsxs("div",{className:"flex items-center gap-1",children:[h&&r&&b>0&&jsx("button",{type:"button",onClick:r,className:"rounded-sm p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Mark all as read",children:jsx(CheckCheck,{className:"h-4 w-4"})}),h&&i&&jsx("button",{type:"button",onClick:i,className:"rounded-sm p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Clear all",children:jsx(Trash2,{className:"h-4 w-4"})}),s&&l&&jsx("button",{type:"button",onClick:l,className:"rounded-sm p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Settings",children:jsx(Settings,{className:"h-4 w-4"})})]})]}),h?jsx(dt,{style:{maxHeight:c},children:jsx("div",{className:"divide-y",children:e.map(f=>jsxs("div",{className:o("group relative flex gap-3 px-4 py-3 transition-colors hover:bg-muted/50",!f.read&&"bg-muted/30"),children:[jsx("div",{className:o("flex h-9 w-9 shrink-0 items-center justify-center rounded-full",f.avatar?"overflow-hidden":aT[f.type||"default"]),children:f.avatar?jsx("img",{src:f.avatar,alt:"",className:"h-full w-full object-cover"}):f.icon?f.icon:jsx(Bell,{className:"h-4 w-4"})}),jsxs("button",{type:"button",onClick:()=>w(f),className:"flex-1 text-left",children:[jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsx("p",{className:o("text-sm",!f.read&&"font-medium"),children:f.title}),!f.read&&jsx("span",{className:"mt-1.5 h-2 w-2 shrink-0 rounded-full bg-primary"})]}),f.description&&jsx("p",{className:"mt-0.5 text-xs text-muted-foreground line-clamp-2",children:f.description}),jsx("p",{className:"mt-1 text-[10px] text-muted-foreground",children:rT(f.timestamp)})]}),jsxs("div",{className:"absolute right-2 top-2 flex gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[!f.read&&a&&jsx("button",{type:"button",onClick:y=>{y.stopPropagation(),a(f.id);},className:"rounded-sm p-1 text-muted-foreground hover:bg-background hover:text-foreground",title:"Mark as read",children:jsx(Check,{className:"h-3.5 w-3.5"})}),(n||f.onDismiss)&&jsx("button",{type:"button",onClick:y=>{y.stopPropagation(),f.onDismiss?.(),n?.(f.id);},className:"rounded-sm p-1 text-muted-foreground hover:bg-background hover:text-foreground",title:"Dismiss",children:jsx(X,{className:"h-3.5 w-3.5"})})]})]},f.id))})}):jsxs("div",{className:"flex flex-col items-center justify-center py-10 text-center",children:[jsx(Bell,{className:"h-10 w-10 text-muted-foreground/50"}),jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:u})]})]})]})});Yv.displayName="NotificationCenter";var Xv=cva("relative flex items-center justify-center gap-3 px-4 py-2.5 text-sm",{variants:{variant:{default:"bg-muted text-foreground",primary:"bg-primary text-primary-foreground",info:"bg-blue-500 text-white",success:"bg-green-500 text-white",warning:"bg-yellow-500 text-black",danger:"bg-red-500 text-white",gradient:"bg-gradient-to-r from-primary via-purple-500 to-pink-500 text-white"},position:{top:"fixed top-0 left-0 right-0 z-50",relative:"relative"}},defaultVariants:{variant:"default",position:"relative"}}),cT={default:Megaphone,primary:Megaphone,info:Info,success:CheckCircle,warning:AlertTriangle,danger:XCircle,gradient:Megaphone},qv=U.forwardRef(({message:e,showIcon:t=true,icon:a,dismissible:r=true,onDismiss:n,action:i,variant:s="default",position:l,animate:d,autoDismiss:m,storageKey:u,className:c,...g},p)=>{let[v,N]=U.useState(true),[b,h]=U.useState(false);U.useEffect(()=>{u&&localStorage.getItem(`banner-${u}`)==="true"&&N(false);},[u]),U.useEffect(()=>{if(m&&v){let y=setTimeout(()=>{w();},m);return ()=>clearTimeout(y)}},[m,v]);let w=()=>{h(true),setTimeout(()=>{N(false),u&&localStorage.setItem(`banner-${u}`,"true"),n?.();},200);};if(!v)return null;let f=a?null:cT[s||"default"];return jsxs("div",{ref:p,className:o(Xv({variant:s,position:l}),d&&"animate-pulse",b&&"animate-out fade-out slide-out-to-top duration-200",c),role:"banner",...g,children:[t&&jsx("span",{className:"shrink-0",children:a||f&&jsx(f,{className:"h-4 w-4"})}),jsx("span",{className:"text-center font-medium",children:e}),i&&(i.href?jsxs("a",{href:i.href,className:"group inline-flex shrink-0 items-center gap-1 font-semibold underline-offset-4 hover:underline",children:[i.label,jsx(ArrowRight,{className:"h-3.5 w-3.5 transition-transform group-hover:translate-x-0.5"})]}):jsxs("button",{type:"button",onClick:i.onClick,className:"group inline-flex shrink-0 items-center gap-1 font-semibold underline-offset-4 hover:underline",children:[i.label,jsx(ArrowRight,{className:"h-3.5 w-3.5 transition-transform group-hover:translate-x-0.5"})]})),r&&jsx("button",{type:"button",onClick:w,className:o("absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-1 transition-opacity hover:opacity-70",l==="relative"&&"right-4"),"aria-label":"Dismiss banner",children:jsx(X,{className:"h-4 w-4"})})]})});qv.displayName="AnnouncementBanner";var Ko=cva("inline-flex items-center justify-center rounded-full shadow-lg transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-muted",ghost:"bg-background hover:bg-muted shadow-md"},size:{sm:"h-10 w-10",md:"h-14 w-14",lg:"h-16 w-16"},position:{"bottom-right":"fixed bottom-6 right-6","bottom-left":"fixed bottom-6 left-6","bottom-center":"fixed bottom-6 left-1/2 -translate-x-1/2",relative:"relative"}},defaultVariants:{variant:"default",size:"md",position:"bottom-right"}}),pT=cva("transition-transform duration-200",{variants:{size:{sm:"h-4 w-4",md:"h-6 w-6",lg:"h-7 w-7"}},defaultVariants:{size:"md"}}),kl=U.forwardRef(({icon:e,label:t="Action button",extended:a,extendedLabel:r,actions:n,direction:i="up",showTooltip:s=true,closeIcon:l,animation:d="rotate",variant:m,size:u,position:c,className:g,onClick:p,disabled:v,...N},b)=>{let[h,w]=U.useState(false),f=n&&n.length>0,y=M=>{f&&w(!h),p?.(M);},P=M=>{M.onClick?.(),w(false);},x={up:{container:"flex-col-reverse bottom-full mb-3",item:"mb-3"},down:{container:"flex-col top-full mt-3",item:"mt-3"},left:{container:"flex-row-reverse right-full mr-3",item:"mr-3"},right:{container:"flex-row left-full ml-3",item:"ml-3"}},S=d==="rotate"&&h?"rotate-45":"",k=d==="scale"&&h?"scale-0":"scale-100";return jsxs("div",{className:o("z-50",c!=="relative"&&c&&Ko({position:c})),children:[f&&h&&jsx("div",{className:o("absolute flex items-center gap-2",x[i].container),children:n.map((M,R)=>jsxs("div",{className:o("flex items-center gap-2 animate-in fade-in zoom-in duration-200",i==="up"||i==="down"?"flex-row":"flex-col"),style:{animationDelay:`${R*50}ms`},children:[s&&(i==="up"||i==="down")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:M.label}),M.href?jsx("a",{href:M.href,className:o(Ko({variant:M.variant||"secondary",size:u==="lg"?"md":"sm"})),"aria-label":M.label,children:M.icon}):jsx("button",{type:"button",onClick:()=>P(M),className:o(Ko({variant:M.variant||"secondary",size:u==="lg"?"md":"sm"})),"aria-label":M.label,children:M.icon}),s&&(i==="left"||i==="right")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:M.label})]},M.id))}),jsxs("button",{ref:b,type:"button",onClick:y,disabled:v,className:o(Ko({variant:m,size:u,position:"relative"}),a&&"px-6 gap-2",g),"aria-label":t,"aria-expanded":f?h:void 0,...N,children:[h&&l?l:jsx("span",{className:o(pT({size:u}),S,k,"transition-all duration-200"),children:e||jsx(Plus,{})}),a&&r&&jsx("span",{className:"font-medium",children:r})]}),f&&h&&jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>w(false)})]})});kl.displayName="FloatingActionButton";var uT=kl;var Jv=cva("fixed bottom-0 left-0 right-0 z-50 flex items-center justify-around border-t bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/80 safe-area-inset-bottom",{variants:{variant:{default:"border-border",elevated:"border-transparent shadow-lg",filled:"border-transparent bg-primary text-primary-foreground"},size:{sm:"h-14",md:"h-16",lg:"h-20"}},defaultVariants:{variant:"default",size:"md"}}),fT=cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors",{variants:{variant:{default:"text-muted-foreground hover:text-foreground",elevated:"text-muted-foreground hover:text-foreground",filled:"text-primary-foreground/70 hover:text-primary-foreground"},size:{sm:"py-1.5",md:"py-2",lg:"py-3"},isActive:{true:"",false:""}},compoundVariants:[{variant:"default",isActive:true,className:"text-primary"},{variant:"elevated",isActive:true,className:"text-primary"},{variant:"filled",isActive:true,className:"text-primary-foreground"}],defaultVariants:{variant:"default",size:"md",isActive:false}}),gT=cva("transition-transform",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-7 w-7"},isActive:{true:"scale-110",false:""}},defaultVariants:{size:"md",isActive:false}}),bT=cva("font-medium transition-opacity",{variants:{size:{sm:"text-[10px]",md:"text-xs",lg:"text-sm"},showLabel:{always:"opacity-100",active:"",never:"sr-only"},isActive:{true:"",false:""}},compoundVariants:[{showLabel:"active",isActive:true,className:"opacity-100"},{showLabel:"active",isActive:false,className:"opacity-0 h-0"}],defaultVariants:{size:"md",showLabel:"always",isActive:false}}),eh=U.forwardRef(({className:e,variant:t,size:a,items:r,activeKey:n,defaultActiveKey:i,onChange:s,showLabels:l="always",hideOnScroll:d=false,...m},u)=>{let[c,g]=U.useState(i??r[0]?.key),[p,v]=U.useState(true),N=U.useRef(0),b=n??c;U.useEffect(()=>{if(!d)return;let w=()=>{let f=window.scrollY,y=f>N.current,P=f<N.current;y&&f>100?v(false):P&&v(true),N.current=f;};return window.addEventListener("scroll",w,{passive:true}),()=>window.removeEventListener("scroll",w)},[d]);let h=w=>{n===void 0&&g(w.key),s?.(w.key),w.onClick?.();};return jsx("nav",{ref:u,role:"navigation","aria-label":"Bottom navigation",className:o(Jv({variant:t,size:a,className:e}),"transition-transform duration-300",!p&&"translate-y-full"),...m,children:r.map(w=>{let f=b===w.key,y=f&&w.activeIcon?w.activeIcon:w.icon,P=jsxs(Fragment,{children:[jsxs("span",{className:"relative",children:[jsx("span",{className:o(gT({size:a,isActive:f})),children:y}),w.badge!==void 0&&jsx("span",{className:"absolute -right-2 -top-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-destructive px-1 text-[10px] font-medium text-destructive-foreground",children:typeof w.badge=="number"&&w.badge>99?"99+":w.badge})]}),jsx("span",{className:o(bT({size:a,showLabel:l,isActive:f})),children:w.label})]}),x=o(fT({variant:t,size:a,isActive:f}));return w.href?jsx("a",{href:w.href,className:x,"aria-current":f?"page":void 0,onClick:()=>h(w),children:P},w.key):jsx("button",{type:"button",className:x,"aria-current":f?"page":void 0,onClick:()=>h(w),children:P},w.key)})})});eh.displayName="BottomNavigation";var rh=cva("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[20px] border-t bg-background",{variants:{size:{sm:"max-h-[50vh]",md:"max-h-[70vh]",lg:"max-h-[85vh]",full:"max-h-[100vh] rounded-t-none"}},defaultVariants:{size:"md"}}),oh=cva("flex w-full items-center gap-3 px-4 py-3.5 text-left transition-colors focus-visible:outline-none focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-accent",destructive:"text-destructive hover:bg-destructive/10"}},defaultVariants:{variant:"default"}}),nh=U.forwardRef(({open:e,onOpenChange:t,trigger:a,title:r,description:n,items:i,cancelLabel:s="Cancel",onCancel:l,showCancel:d=true,children:m,size:u,closeOnSelect:c=true,onAction:g},p)=>{let v=b=>{b.isDisabled||(b.onSelect?.(),g?.(b.key),c&&t?.(false));},N=()=>{l?.(),t?.(false);};return jsxs(Drawer.Root,{open:e,onOpenChange:t,children:[a&&jsx(Drawer.Trigger,{asChild:true,children:a}),jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/40"}),jsxs(Drawer.Content,{ref:p,className:o(rh({size:u})),children:[jsx("div",{className:"mx-auto mt-4 h-1.5 w-12 flex-shrink-0 rounded-full bg-muted"}),(r||n)&&jsxs("div",{className:"px-4 py-3 text-center",children:[r&&jsx(Drawer.Title,{className:"text-base font-semibold",children:r}),n&&jsx(Drawer.Description,{className:"mt-1 text-sm text-muted-foreground",children:n})]}),jsx("div",{className:"flex-1 overflow-y-auto",children:m||jsx("div",{className:"divide-y",children:i?.map(b=>jsxs("button",{type:"button",disabled:b.isDisabled,onClick:()=>v(b),className:o(oh({variant:b.isDestructive?"destructive":"default"})),children:[b.icon&&jsx("span",{className:"h-5 w-5 flex-shrink-0 [&>svg]:h-full [&>svg]:w-full",children:b.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"font-medium",children:b.label}),b.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:b.description})]})]},b.key))})}),d&&jsx("div",{className:"border-t p-2 pb-safe",children:jsx("button",{type:"button",onClick:N,className:"w-full rounded-lg bg-muted py-3.5 text-center font-semibold transition-colors hover:bg-muted/80",children:s})})]})]})]})});nh.displayName="ActionSheet";var sh=cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),Vl=cva("flex h-full items-center justify-center px-4 text-white font-medium transition-opacity",{variants:{variant:{primary:"bg-primary",secondary:"bg-secondary text-secondary-foreground",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500"},size:{sm:"min-w-16",md:"min-w-20",lg:"min-w-24"}},defaultVariants:{variant:"primary",size:"md"}}),lh=U.forwardRef(({className:e,variant:t,leftActions:a=[],rightActions:r=[],actionSize:n="md",threshold:i=.3,onSwipeEnd:s,disabled:l=false,fullSwipeAction:d,children:m,...u},c)=>{let g=U.useRef(null),[p,v]=U.useState(0),[N,b]=U.useState(false),h=U.useRef(0),w=U.useRef(0),f=a.length*(n==="sm"?64:n==="lg"?96:80),y=r.length*(n==="sm"?64:n==="lg"?96:80),P=R=>{l||(b(true),h.current=R.touches[0].clientX,w.current=p);},x=R=>{if(!N||l)return;let D=R.touches[0].clientX-h.current,T=w.current+D;(T>0&&a.length===0||T<0&&r.length===0)&&(T=0),T>f?T=f+(T-f)*.3:T<-y&&(T=-y+(T+y)*.3),v(T);},S=()=>{if(!N)return;b(false);let R=g.current?.offsetWidth||0,C=Math.abs(p)/R;if(d&&C>.6){d==="right"&&p>0&&a[0]?(a[0].onAction?.(),s?.("right",a[0].key)):d==="left"&&p<0&&r[0]&&(r[0].onAction?.(),s?.("left",r[0].key)),v(0);return}p>f*i&&a.length>0?(v(f),s?.("right")):p<-y*i&&r.length>0?(v(-y),s?.("left")):v(0);},k=(R,C)=>{R.onAction?.(),s?.(C,R.key),v(0);},M=()=>{v(0);};return jsxs("div",{ref:c,className:o(sh({variant:t,className:e})),...u,children:[a.length>0&&jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:f},children:a.map(R=>jsxs("button",{type:"button",onClick:()=>k(R,"right"),className:o(Vl({variant:R.variant,size:n})),style:{opacity:Math.min(1,p/f)},children:[R.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:R.icon}),!R.icon&&R.label]},R.key))}),r.length>0&&jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:y},children:r.map(R=>jsxs("button",{type:"button",onClick:()=>k(R,"left"),className:o(Vl({variant:R.variant,size:n})),style:{opacity:Math.min(1,Math.abs(p)/y)},children:[R.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:R.icon}),!R.icon&&R.label]},R.key))}),jsx("div",{ref:g,className:o("relative bg-background",N?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:P,onTouchMove:x,onTouchEnd:S,onClick:p!==0?M:void 0,children:m})]})});lh.displayName="SwipeActions";var ch=cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),yT=cva("absolute left-1/2 -translate-x-1/2 flex items-center justify-center transition-all duration-200",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"}},defaultVariants:{size:"md"}}),mh=U.forwardRef(({className:e,variant:t,onRefresh:a,pullThreshold:r=80,maxPullDistance:n=120,loadingIndicator:i,pullIndicator:s,indicatorSize:l="md",disabled:d=false,pullText:m="Pull to refresh",releaseText:u="Release to refresh",refreshingText:c="Refreshing...",children:g,...p},v)=>{let N=U.useRef(null),[b,h]=U.useState(0),[w,f]=U.useState("idle"),y=U.useRef(0),P=U.useRef(false),x=()=>d||w==="refreshing"?false:(N.current?.scrollTop??window.scrollY)<=0,S=D=>{x()&&(y.current=D.touches[0].clientY,P.current=true);},k=D=>{if(!P.current||!x())return;let I=D.touches[0].clientY-y.current;if(I<0){h(0),f("idle");return}let V=Math.min(I*.5,n);h(V),f(V>=r?"ready":"pulling");},M=async()=>{if(P.current)if(P.current=false,w==="ready"){f("refreshing"),h(r*.6);try{await a();}finally{f("idle"),h(0);}}else f("idle"),h(0);},R={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[l],C=()=>{if(w==="refreshing")return i||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(Loader2,{className:o(R,"animate-spin text-primary")}),jsx("span",{className:"text-xs text-muted-foreground",children:c})]});let D=Math.min(b/r*180,180);return s||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(ArrowDown,{className:o(R,"text-muted-foreground transition-transform"),style:{transform:`rotate(${D}deg)`}}),jsx("span",{className:"text-xs text-muted-foreground",children:w==="ready"?u:m})]})};return jsxs("div",{ref:v,className:o(ch({variant:t,className:e})),...p,children:[jsx("div",{className:o(yT({size:l}),"z-10",w==="idle"&&b===0&&"opacity-0"),style:{top:Math.max(b-60,-60),opacity:Math.min(b/(r*.5),1)},children:C()}),jsx("div",{ref:N,className:o("transition-transform duration-200",w==="refreshing"&&"ease-out"),style:{transform:`translateY(${b}px)`,transition:P.current?"none":void 0},onTouchStart:S,onTouchMove:k,onTouchEnd:M,children:g})]})});mh.displayName="PullToRefresh";var uh=cva("flex min-h-screen w-full",{variants:{layout:{default:"flex-col",sidebar:"flex-row"}},defaultVariants:{layout:"default"}}),fh=U.forwardRef(({className:e,layout:t="default",header:a,footer:r,sidebar:n,aside:i,sidebarCollapsed:s=false,sidebarWidth:l="16rem",sidebarCollapsedWidth:d="4rem",asideWidth:m="16rem",fixed:u=false,children:c,...g},p)=>{let v=s?d:l;return jsxs("div",{ref:p,className:o(uh({layout:t}),e),style:{"--app-shell-sidebar-width":v,"--app-shell-aside-width":m},...g,children:[a&&jsx(Il,{fixed:u,hasSidebar:!!n,children:a}),jsxs("div",{className:"flex flex-1",children:[n&&jsx(El,{collapsed:s,fixed:u,children:n}),jsx("main",{className:o("flex-1 flex flex-col min-h-0",u&&a&&"pt-14",u&&r&&"pb-14"),children:c}),i&&jsx(Hl,{fixed:u,children:i})]}),r&&jsx(Al,{fixed:u,hasSidebar:!!n,children:r})]})});fh.displayName="AppShell";var Il=U.forwardRef(({className:e,fixed:t,hasSidebar:a,children:r,...n},i)=>jsx("header",{ref:i,className:o("flex h-14 items-center border-b bg-background px-4",t&&"fixed top-0 right-0 z-40",t&&a&&"left-[var(--app-shell-sidebar-width)]",t&&!a&&"left-0",e),...n,children:r}));Il.displayName="AppShellHeader";var El=U.forwardRef(({className:e,collapsed:t,fixed:a,children:r,...n},i)=>jsx("aside",{ref:i,className:o("w-[var(--app-shell-sidebar-width)] shrink-0 border-r bg-background transition-[width] duration-200",a&&"fixed left-0 top-0 bottom-0 z-50",e),"data-collapsed":t,...n,children:r}));El.displayName="AppShellSidebar";var Hl=U.forwardRef(({className:e,fixed:t,children:a,...r},n)=>jsx("aside",{ref:n,className:o("w-[var(--app-shell-aside-width)] shrink-0 border-l bg-background",t&&"fixed right-0 top-14 bottom-0 z-40",e),...r,children:a}));Hl.displayName="AppShellAside";var Al=U.forwardRef(({className:e,fixed:t,hasSidebar:a,children:r,...n},i)=>jsx("footer",{ref:i,className:o("flex h-14 items-center border-t bg-background px-4",t&&"fixed bottom-0 right-0 z-40",t&&a&&"left-[var(--app-shell-sidebar-width)]",t&&!a&&"left-0",e),...n,children:r}));Al.displayName="AppShellFooter";var gh=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("flex-1 overflow-auto p-4",e),...t}));gh.displayName="AppShellMain";var vh=cva("flex min-h-screen w-full bg-muted/40",{variants:{variant:{default:"",bordered:"[&_[data-slot=sidebar]]:border-r [&_[data-slot=header]]:border-b",filled:"[&_[data-slot=sidebar]]:bg-background [&_[data-slot=header]]:bg-background"}},defaultVariants:{variant:"bordered"}}),hh=U.forwardRef(({className:e,variant:t,navigation:a,logo:r,userMenu:n,headerActions:i,breadcrumb:s,defaultCollapsed:l=false,collapsed:d,onCollapsedChange:m,children:u,...c},g)=>{let[p,v]=U.useState(l),[N,b]=U.useState(false),h=d??p,w=U.useCallback(f=>{v(f),m?.(f);},[m]);return jsxs("div",{ref:g,className:o(vh({variant:t}),e),...c,children:[jsxs("aside",{"data-slot":"sidebar","data-collapsed":h,className:o("hidden lg:flex flex-col fixed inset-y-0 left-0 z-50 bg-background transition-[width] duration-200",h?"w-16":"w-64"),children:[jsx("div",{className:"flex h-14 items-center border-b px-4",children:r}),jsx("nav",{className:"flex-1 overflow-auto py-4",children:a}),n&&jsx("div",{className:"border-t p-4",children:n})]}),jsx(po,{open:N,onOpenChange:b,children:jsxs(vr,{side:"left",className:"w-64 p-0",children:[jsx("div",{className:"flex h-14 items-center border-b px-4",children:r}),jsx("nav",{className:"flex-1 overflow-auto py-4",children:a}),n&&jsx("div",{className:"border-t p-4",children:n})]})}),jsxs("div",{className:o("flex flex-1 flex-col transition-[margin-left] duration-200",h?"lg:ml-16":"lg:ml-64"),children:[jsxs("header",{"data-slot":"header",className:"sticky top-0 z-40 flex h-14 items-center gap-4 bg-background px-4 lg:px-6",children:[jsxs(O,{variant:"ghost",size:"icon",className:"lg:hidden",onClick:()=>b(true),children:[jsx(Menu,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Toggle menu"})]}),jsxs(O,{variant:"ghost",size:"icon",className:"hidden lg:flex",onClick:()=>w(!h),children:[jsx(Menu,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Toggle sidebar"})]}),s&&jsx("div",{className:"flex-1",children:s}),i&&jsx("div",{className:"flex items-center gap-2",children:i})]}),jsx("main",{className:"flex-1 p-4 lg:p-6",children:u})]})]})});hh.displayName="DashboardLayout";var xh=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("space-y-6",e),...t}));xh.displayName="DashboardPage";var yh=U.forwardRef(({className:e,title:t,description:a,actions:r,children:n,...i},s)=>jsxs("div",{ref:s,className:o("flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",e),...i,children:[jsxs("div",{className:"space-y-1",children:[t&&jsx("h1",{className:"text-2xl font-bold tracking-tight",children:t}),a&&jsx("p",{className:"text-muted-foreground",children:a}),n]}),r&&jsx("div",{className:"flex items-center gap-2",children:r})]}));yh.displayName="DashboardPageHeader";var Rh=U.forwardRef(({className:e,columns:t=4,...a},r)=>jsx("div",{ref:r,className:o("grid gap-4",{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}[t],e),...a}));Rh.displayName="DashboardGrid";var ki=cva("min-h-screen w-full",{variants:{variant:{centered:"flex items-center justify-center bg-muted/40",split:"flex flex-col lg:flex-row",cover:"relative flex items-center justify-center"}},defaultVariants:{variant:"centered"}}),wh=U.forwardRef(({className:e,variant:t="centered",logo:a,sideContent:r,backgroundImage:n,sidePosition:i="left",footer:s,children:l,...d},m)=>t==="split"?jsxs("div",{ref:m,className:o(ki({variant:t}),e),...d,children:[jsx("div",{className:o("hidden lg:flex lg:w-1/2 flex-col bg-primary text-primary-foreground",i==="right"&&"order-2"),children:r||jsxs("div",{className:"flex flex-1 flex-col items-center justify-center p-8",children:[a&&jsx("div",{className:"mb-8",children:a}),jsxs("div",{className:"max-w-md text-center",children:[jsx("h2",{className:"text-3xl font-bold",children:"Welcome back"}),jsx("p",{className:"mt-4 text-primary-foreground/80",children:"Sign in to your account to continue"})]})]})}),jsxs("div",{className:o("flex flex-1 flex-col lg:w-1/2",i==="right"&&"order-1"),children:[a&&jsx("div",{className:"flex items-center justify-center p-6 lg:hidden",children:a}),jsx("div",{className:"flex flex-1 items-center justify-center p-6",children:jsx("div",{className:"w-full max-w-md space-y-6",children:l})}),s&&jsx("div",{className:"p-6 text-center text-sm text-muted-foreground",children:s})]})]}):t==="cover"?jsxs("div",{ref:m,className:o(ki({variant:t}),e),style:n?{backgroundImage:`url(${n})`,backgroundSize:"cover",backgroundPosition:"center"}:void 0,...d,children:[n&&jsx("div",{className:"absolute inset-0 bg-background/80 backdrop-blur-sm"}),jsxs("div",{className:"relative z-10 w-full max-w-md p-6",children:[a&&jsx("div",{className:"mb-8 flex justify-center",children:a}),jsx("div",{className:"rounded-lg border bg-card p-6 shadow-lg",children:l}),s&&jsx("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:s})]})]}):jsx("div",{ref:m,className:o(ki({variant:t}),e),...d,children:jsxs("div",{className:"w-full max-w-md p-6",children:[a&&jsx("div",{className:"mb-8 flex justify-center",children:a}),jsx("div",{className:"rounded-lg border bg-card p-6 shadow-sm",children:l}),s&&jsx("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:s})]})}));wh.displayName="AuthLayout";var Nh=U.forwardRef(({className:e,...t},a)=>jsx("form",{ref:a,className:o("space-y-4",e),...t}));Nh.displayName="AuthForm";var Ph=U.forwardRef(({className:e,title:t,description:a,children:r,...n},i)=>jsxs("div",{ref:i,className:o("space-y-2 text-center",e),...n,children:[t&&jsx("h1",{className:"text-2xl font-bold",children:t}),a&&jsx("p",{className:"text-muted-foreground",children:a}),r]}));Ph.displayName="AuthHeader";var Ch=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("flex flex-col gap-2 text-center text-sm",e),...t}));Ch.displayName="AuthFooterLinks";var Sh=U.forwardRef(({className:e,text:t="or continue with",...a},r)=>jsxs("div",{ref:r,className:o("relative my-4",e),...a,children:[jsx("div",{className:"absolute inset-0 flex items-center",children:jsx("span",{className:"w-full border-t"})}),jsx("div",{className:"relative flex justify-center text-xs uppercase",children:jsx("span",{className:"bg-card px-2 text-muted-foreground",children:t})})]}));Sh.displayName="AuthDivider";var Th=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("grid grid-cols-2 gap-2",e),...t}));Th.displayName="AuthSocialButtons";var Di=cva("w-full",{variants:{variant:{sidebar:"flex flex-col lg:flex-row gap-8",tabs:"space-y-6",stacked:"space-y-8"}},defaultVariants:{variant:"sidebar"}}),Mh=U.forwardRef(({className:e,variant:t="sidebar",navigation:a,title:r,description:n,children:i,...s},l)=>t==="sidebar"?jsxs("div",{ref:l,className:o(Di({variant:t}),e),...s,children:[a&&jsx("aside",{className:"lg:w-64 shrink-0",children:jsx("nav",{className:"flex flex-col gap-1",children:a})}),jsxs("div",{className:"flex-1 space-y-6",children:[(r||n)&&jsx(Yo,{title:r,description:n}),i]})]}):t==="tabs"?jsxs("div",{ref:l,className:o(Di({variant:t}),e),...s,children:[(r||n)&&jsx(Yo,{title:r,description:n}),a,jsx("div",{className:"pt-4",children:i})]}):jsxs("div",{ref:l,className:o(Di({variant:t}),e),...s,children:[(r||n)&&jsx(Yo,{title:r,description:n}),i]}));Mh.displayName="SettingsLayout";var Yo=U.forwardRef(({className:e,title:t,description:a,children:r,...n},i)=>jsxs("div",{ref:i,className:o("space-y-1",e),...n,children:[t&&jsx("h1",{className:"text-2xl font-bold",children:t}),a&&jsx("p",{className:"text-muted-foreground",children:a}),r]}));Yo.displayName="SettingsHeader";var kh=U.forwardRef(({className:e,title:t,description:a,children:r,...n},i)=>jsxs("div",{ref:i,className:o("space-y-4",e),...n,children:[(t||a)&&jsxs("div",{className:"space-y-1",children:[t&&jsx("h2",{className:"text-lg font-medium",children:t}),a&&jsx("p",{className:"text-sm text-muted-foreground",children:a})]}),r]}));kh.displayName="SettingsSection";var Dh=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("rounded-lg border bg-card p-6",e),...t}));Dh.displayName="SettingsCard";var Vh=U.forwardRef(({className:e,label:t,description:a,htmlFor:r,children:n,...i},s)=>jsxs("div",{ref:s,className:o("flex flex-col gap-4 py-4 sm:flex-row sm:items-center sm:justify-between","border-b last:border-0 first:pt-0 last:pb-0",e),...i,children:[jsxs("div",{className:"space-y-0.5",children:[t&&jsx("label",{htmlFor:r,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:t}),a&&jsx("p",{className:"text-sm text-muted-foreground",children:a})]}),jsx("div",{className:"shrink-0",children:n})]}));Vh.displayName="SettingsRow";var Lh=U.forwardRef(({className:e,active:t,icon:a,children:r,...n},i)=>jsxs("button",{ref:i,type:"button",className:o("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors","hover:bg-muted",t&&"bg-muted",e),...n,children:[a&&jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:a}),r]}));Lh.displayName="SettingsNavItem";var Ih=U.forwardRef(({className:e,...t},a)=>jsx("div",{ref:a,className:o("h-px bg-border my-4",e),...t}));Ih.displayName="SettingsSeparator";var fr=(e,t,a)=>({duration:e,delay:t,ease:a||[.4,0,.2,1]}),CT={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},Eh=U.forwardRef(({show:e=true,children:t,duration:a=.3,delay:r=0,ease:n,className:i,unmountOnExit:s=true,initialOpacity:l=0,onAnimationStart:d,onAnimationComplete:m},u)=>{let c=jsx(motion.div,{ref:u,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:CT,custom:l,transition:fr(a,r,n),className:o(i),onAnimationStart:d,onAnimationComplete:m,children:t});return s?jsx(AnimatePresence,{children:e&&c}):c});Eh.displayName="Fade";var ST=(e,t)=>{let a=typeof t=="number"?`${t}px`:t,r={up:{y:a},down:{y:`-${a}`},left:{x:a},right:{x:`-${a}`}};return {hidden:{opacity:0,...r[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...r[e]}}},Hh=U.forwardRef(({show:e=true,children:t,duration:a=.3,delay:r=0,ease:n,className:i,unmountOnExit:s=true,direction:l="up",offset:d=20,onAnimationStart:m,onAnimationComplete:u},c)=>{let g=U.useMemo(()=>ST(l,d),[l,d]),p=jsx(motion.div,{ref:c,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:g,transition:fr(a,r,n),className:o(i),onAnimationStart:m,onAnimationComplete:u,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});Hh.displayName="Slide";var TT={center:"center center",top:"center top",bottom:"center bottom",left:"left center",right:"right center","top-left":"left top","top-right":"right top","bottom-left":"left bottom","bottom-right":"right bottom"},MT={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},Ah=U.forwardRef(({show:e=true,children:t,duration:a=.3,delay:r=0,ease:n,className:i,unmountOnExit:s=true,initialScale:l=.9,origin:d="center",onAnimationStart:m,onAnimationComplete:u},c)=>{let g=jsx(motion.div,{ref:c,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:MT,custom:l,transition:fr(a,r,n),className:o(i),style:{transformOrigin:TT[d]},onAnimationStart:m,onAnimationComplete:u,children:t});return s?jsx(AnimatePresence,{children:e&&g}):g});Ah.displayName="Scale";var zh=U.forwardRef(({show:e=true,children:t,duration:a=.3,delay:r=0,ease:n,className:i,horizontal:s=false,startingSize:l=0,animateOpacity:d=true,onAnimationStart:m,onAnimationComplete:u},c)=>{let g=s?"width":"height",p={hidden:{[g]:l,opacity:d?0:1},visible:{[g]:"auto",opacity:1},exit:{[g]:l,opacity:d?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:c,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:fr(a,r,n),className:o("overflow-hidden",i),onAnimationStart:m,onAnimationComplete:u,children:t})})});zh.displayName="Collapse";var Bh=U.forwardRef(({show:e=true,children:t,duration:a=.4,delay:r=0,ease:n,className:i,initialWidth:s=0,initialHeight:l=0,animateOpacity:d=true,onAnimationStart:m,onAnimationComplete:u},c)=>{let g={hidden:{width:s,height:l,opacity:d?0:1},visible:{width:"auto",height:"auto",opacity:1},exit:{width:s,height:l,opacity:d?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:c,initial:"hidden",animate:"visible",exit:"exit",variants:g,transition:fr(a,r,n),className:o("overflow-hidden",i),onAnimationStart:m,onAnimationComplete:u,children:t})})});Bh.displayName="Expand";var Fh=U.forwardRef(({show:e=true,children:t,duration:a=.3,delay:r=0,ease:n,className:i,unmountOnExit:s=true,initialRotation:l=-180,finalRotation:d=0,onAnimationStart:m,onAnimationComplete:u},c)=>{let g={hidden:{opacity:0,rotate:l},visible:{opacity:1,rotate:d},exit:{opacity:0,rotate:l}},p=jsx(motion.div,{ref:c,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:g,transition:fr(a,r,n),className:o(i),onAnimationStart:m,onAnimationComplete:u,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});Fh.displayName="Rotate";var Oh=U.forwardRef(({front:e,back:t,direction:a="horizontal",flipped:r=false,duration:n=.6,delay:i=0,ease:s,className:l,onAnimationStart:d,onAnimationComplete:m},u)=>{let c=a==="horizontal"?"rotateY":"rotateX";return jsx("div",{ref:u,className:o("relative",l),style:{perspective:1e3},children:jsxs(motion.div,{animate:{[c]:r?180:0},transition:fr(n,i,s),style:{transformStyle:"preserve-3d"},onAnimationStart:d,onAnimationComplete:m,children:[jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden"},children:e}),jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden",transform:`${c}(180deg)`},children:t})]})})});Oh.displayName="Flip";var Gh=U.forwardRef(({color:e="currentColor",duration:t=.6,children:a,className:r,disabled:n=false},i)=>{let[s,l]=U.useState([]),d=U.useRef(null),m=c=>{if(n)return;let g=d.current;if(!g)return;let p=g.getBoundingClientRect(),v=c.clientX-p.left,N=c.clientY-p.top,b=Math.max(p.width,p.height)*2,h={id:Date.now(),x:v,y:N,size:b};l(w=>[...w,h]);},u=c=>{l(g=>g.filter(p=>p.id!==c));};return jsxs("div",{ref:i,className:o("relative overflow-hidden",r),onClick:m,children:[jsx("div",{ref:d,className:"relative z-0",children:a}),jsx(AnimatePresence,{children:s.map(c=>jsx(motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>u(c.id),className:"pointer-events-none absolute rounded-full",style:{left:c.x-c.size/2,top:c.y-c.size/2,width:c.size,height:c.size,backgroundColor:e}},c.id))})]})});Gh.displayName="Ripple";var Wh=U.forwardRef(({children:e,animate:t=true,height:a=10,duration:r=.5,count:n=0,className:i,triggerOnHover:s=false},l)=>{let[d,m]=U.useState(false),u=s?d:t,c={idle:{y:0},bounce:{y:[0,-a,0],transition:{duration:r,ease:"easeInOut",repeat:n===0?1/0:n-1,repeatType:"loop"}}};return jsx(motion.div,{ref:l,variants:c,initial:"idle",animate:u?"bounce":"idle",className:o(i),onMouseEnter:()=>s&&m(true),onMouseLeave:()=>s&&m(false),children:e})});Wh.displayName="Bounce";var VT={subtle:[0,-2,2,-2,2,-1,1,0],normal:[0,-5,5,-5,5,-3,3,0],strong:[0,-10,10,-10,10,-5,5,0]},$h=U.forwardRef(({children:e,animate:t=true,intensity:a="normal",duration:r=.5,count:n=1,className:i,triggerOnHover:s=false},l)=>{let[d,m]=U.useState(false),u=s?d:t,c={idle:{x:0},shake:{x:VT[a],transition:{duration:r,ease:"easeInOut",repeat:n-1}}};return jsx(motion.div,{ref:l,variants:c,initial:"idle",animate:u?"shake":"idle",className:o(i),onMouseEnter:()=>s&&m(true),onMouseLeave:()=>s&&m(false),children:e})});$h.displayName="Shake";var LT={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},_h=U.forwardRef(({children:e,animate:t=true,speed:a="normal",className:r},n)=>jsx("div",{ref:n,className:o(t&&LT[a],r),children:e}));_h.displayName="Pulse";var Kh=U.forwardRef(({children:e,animate:t=true,angle:a=10,duration:r=.3,count:n=0,className:i,triggerOnHover:s=false},l)=>{let[d,m]=U.useState(false),u=s?d:t,c={idle:{rotate:0},wiggle:{rotate:[0,-a,a,-a,a,0],transition:{duration:r,ease:"easeInOut",repeat:n===0?1/0:n-1,repeatType:"loop"}}};return jsx(motion.div,{ref:l,variants:c,initial:"idle",animate:u?"wiggle":"idle",className:o(i),onMouseEnter:()=>s&&m(true),onMouseLeave:()=>s&&m(false),children:e})});Kh.displayName="Wiggle";var Uh=U.forwardRef(({children:e,animate:t=false,scale:a=1.2,duration:r=.2,className:n,triggerOnHover:i=false,triggerOnClick:s=false},l)=>{let[d,m]=U.useState(false),u=t||d,c={type:"spring",stiffness:400,damping:17,duration:r},g=()=>{s&&(m(true),setTimeout(()=>m(false),r*1e3));};return jsx(motion.div,{ref:l,animate:{scale:u?a:1},transition:c,className:o(n),onMouseEnter:()=>i&&m(true),onMouseLeave:()=>i&&m(false),onClick:g,children:e})});Uh.displayName="Pop";var zT=(e,t,a,r)=>{let n=e.toFixed(t),[i,s]=n.split("."),l=i.replace(/\B(?=(\d{3})+(?!\d))/g,a);return s?`${l}${r}${s}`:l},Yh=U.forwardRef(({value:e,from:t=0,duration:a=2,decimals:r=0,prefix:n="",suffix:i="",separator:s=",",decimalSeparator:l=".",animateOnView:d=true,delay:m=0,className:u,onComplete:c},g)=>{let p=U.useRef(null),v=useInView(p,{once:true}),[N,b]=U.useState(!d);U.useEffect(()=>{if(d&&v){let y=setTimeout(()=>b(true),m*1e3);return ()=>clearTimeout(y)}},[d,v,m]);let h={damping:30,stiffness:100,duration:a*1e3},w=useSpring(N?e:t,h),f=useTransform(w,y=>zT(y,r,s,l));return U.useEffect(()=>{N&&w.set(e);},[N,e,w]),U.useEffect(()=>{let y=w.on("change",P=>{Math.abs(P-e)<.01&&c&&c();});return ()=>y()},[w,e,c]),jsx("span",{ref:p,className:o(u),children:jsxs("span",{ref:g,children:[n,jsx(motion.span,{children:f}),i]})})});Yh.displayName="Counter";var jh=U.forwardRef(({text:e,speed:t=50,delay:a=0,pauseBetween:r=1500,cursor:n=true,cursorChar:i="|",loop:s=false,deleteSpeed:l=30,animateOnView:d=true,className:m,cursorClassName:u,onComplete:c},g)=>{let p=Array.isArray(e)?e:[e],[v,N]=U.useState(""),[b,h]=U.useState(0),[w,f]=U.useState(false),[y,P]=U.useState(false),x=U.useRef(null),S=useInView(x,{once:true}),[k,M]=U.useState(!d);return U.useEffect(()=>{if(d&&S){let R=setTimeout(()=>M(true),a*1e3);return ()=>clearTimeout(R)}},[d,S,a]),U.useEffect(()=>{if(!k||y)return;let R=p[b],C;return w?v.length>0?C=setTimeout(()=>{N(v.slice(0,-1));},l):(f(false),h(D=>(D+1)%p.length)):v.length<R.length?C=setTimeout(()=>{N(R.slice(0,v.length+1));},t):b<p.length-1||s?C=setTimeout(()=>{f(true);},r):(P(true),c?.()),()=>clearTimeout(C)},[k,v,b,w,y,p,t,l,r,s,c]),jsxs("span",{ref:x,className:o(m),children:[jsx("span",{ref:g,children:v}),n&&jsx(motion.span,{animate:{opacity:[1,0]},transition:{duration:.8,repeat:1/0,repeatType:"reverse"},className:o("ml-0.5",u),children:i})]})});jh.displayName="Typewriter";var Xh=U.forwardRef(({children:e,direction:t="up",stagger:a=.05,duration:r=.5,delay:n=0,splitBy:i="word",animateOnView:s=true,className:l},d)=>{let m=U.useRef(null),u=useInView(m,{once:true,amount:.5}),c=s?u:true,g=typeof e=="string"?e:"",p=i==="word"?g.split(" "):g.split(""),v={up:{y:20},down:{y:-20},left:{x:20},right:{x:-20}},N={hidden:{},visible:{transition:{staggerChildren:a,delayChildren:n}}},b={hidden:{opacity:0,...v[t]},visible:{opacity:1,x:0,y:0,transition:{duration:r,ease:"easeInOut"}}};return jsx(motion.div,{ref:d,className:o("inline-flex flex-wrap",l),variants:N,initial:"hidden",animate:c?"visible":"hidden",children:jsx("span",{ref:m,children:p.map((h,w)=>jsxs(motion.span,{variants:b,className:"inline-block",children:[h,i==="word"&&w<p.length-1&&"\xA0"]},w))})})});Xh.displayName="TextReveal";var qh=U.forwardRef(({words:e,duration:t=2,animation:a="slide",animationDuration:r=.5,className:n,loop:i=true},s)=>{let[l,d]=U.useState(0);U.useEffect(()=>{if(!i&&l===e.length-1)return;let u=setInterval(()=>{d(c=>(c+1)%e.length);},t*1e3);return ()=>clearInterval(u)},[e.length,t,i,l]);let m=()=>{switch(a){case "fade":return {initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};case "slide":return {initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20}};case "scale":return {initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.2}};case "blur":return {initial:{opacity:0,filter:"blur(10px)"},animate:{opacity:1,filter:"blur(0px)"},exit:{opacity:0,filter:"blur(10px)"}}}};return jsx("span",{ref:s,className:o("relative inline-block",n),children:jsx(AnimatePresence,{mode:"wait",children:jsx(motion.span,{variants:m(),initial:"initial",animate:"animate",exit:"exit",transition:{duration:r},className:"inline-block",children:e[l]},e[l])})})});qh.displayName="WordRotate";var ex=U.forwardRef(({children:e,direction:t="up",distance:a=50,duration:r=.6,delay:n=0,once:i=true,threshold:s=.1,className:l,scale:d,rotate:m,blur:u,ease:c=[.4,0,.2,1]},g)=>{let p=U.useRef(null),v=useInView(p,{once:i,amount:s}),b={up:{x:0,y:a},down:{x:0,y:-a},left:{x:a,y:0},right:{x:-a,y:0},none:{x:0,y:0}}[t],h={hidden:{opacity:0,x:b.x,y:b.y,scale:d??1,rotate:m??0,filter:u?`blur(${u}px)`:"blur(0px)"},visible:{opacity:1,x:0,y:0,scale:1,rotate:0,filter:"blur(0px)",transition:{duration:r,delay:n,ease:c}}};return jsx("div",{ref:p,children:jsx(motion.div,{ref:g,variants:h,initial:"hidden",animate:v?"visible":"hidden",className:o(l),children:e})})});ex.displayName="ScrollReveal";var tx=U.forwardRef(({position:e="top",size:t=4,color:a="hsl(var(--primary))",backgroundColor:r="transparent",zIndex:n=50,className:i,container:s,showPercentage:l=false,useSpring:d=true},m)=>{let{scrollYProgress:u}=useScroll({container:s}),c=useSpring(u,{stiffness:100,damping:30,restDelta:.001}),g=d?c:u,p=e==="top"||e==="bottom",v={top:{top:0,left:0,right:0,height:t},bottom:{bottom:0,left:0,right:0,height:t},left:{top:0,left:0,bottom:0,width:t},right:{top:0,right:0,bottom:0,width:t}},N=p?"scaleX":"scaleY",b=p?"left":"top";return jsxs("div",{ref:m,className:o("fixed",i),style:{...v[e],zIndex:n,backgroundColor:r},children:[jsx(motion.div,{className:"h-full w-full",style:{[N]:g,transformOrigin:b,backgroundColor:a}}),l&&jsx(FT,{progress:g,position:e})]})});tx.displayName="ScrollProgress";var FT=({progress:e,position:t})=>{let a=useTransform(e,s=>Math.round(s*100)),[r,n]=U.useState(0);return U.useEffect(()=>{let s=a.on("change",n);return ()=>s()},[a]),jsxs("span",{className:o("fixed rounded bg-background/80 px-2 py-1 text-xs font-medium backdrop-blur-sm",{top:"top-2 right-4",bottom:"bottom-2 right-4",left:"top-4 left-2",right:"top-4 right-2"}[t]),children:[r,"%"]})},ax=U.forwardRef(({children:e,speed:t=.5,direction:a="vertical",className:r,container:n},i)=>{let s=U.useRef(null),{scrollYProgress:l}=useScroll({target:s,container:n,offset:["start end","end start"]}),d=[-100*t,100*t],m=useTransform(l,[0,1],d),u=useSpring(m,{stiffness:100,damping:30}),c=a==="horizontal"?u:0,g=a==="vertical"?u:0;return jsx("div",{ref:s,className:o("overflow-hidden",r),children:jsx(motion.div,{ref:i,style:{x:c,y:g},children:e})})});ax.displayName="Parallax";var nx=U.forwardRef(({children:e,width:t,height:a,duration:r=1.5,direction:n="right",baseColor:i="hsl(var(--muted))",highlightColor:s="hsl(var(--muted-foreground) / 0.1)",borderRadius:l,className:d,active:m=true},u)=>{let c={left:"to left",right:"to right",top:"to top",bottom:"to bottom"},g={left:"shimmer-left",right:"shimmer-right",top:"shimmer-top",bottom:"shimmer-bottom"};return jsxs("div",{ref:u,className:o("relative overflow-hidden",d),style:{width:t,height:a,borderRadius:l,backgroundColor:i},children:[e,m&&jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(${c[n]}, transparent, ${s}, transparent)`,animation:`${g[n]} ${r}s infinite`}}),jsx("style",{children:`
2
2
  @keyframes shimmer-right {
3
3
  0% { transform: translateX(-100%); }
4
4
  100% { transform: translateX(100%); }