@reeverdev/ui 0.2.192 → 0.2.194

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,11 +1,11 @@
1
- import*as X from'react';import {createContext,useState,useEffect,useContext,useCallback,useRef,useMemo}from'react';import {cva}from'class-variance-authority';import {AlertCircle,AlertTriangle,CheckCircle2,Info,Minus,Check,X as X$1,ChevronDown,Search,ChevronRight,Circle,ChevronsUpDown,PanelLeft,PanelLeftOpen,PanelRightOpen,PanelLeftClose,PanelRightClose,EyeOff,Eye,Plus,Heart,Star,TrendingUp,TrendingDown,Upload,Clock,Menu,ExternalLink,ArrowUp,File,Folder,FolderOpen,Loader2,Copy,Calendar,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,HelpCircle,ArrowRight,Hash,User,Settings,Bell,CheckCircle,Trash2,Image as Image$1,FileVideo,FileAudio,FileText,FileArchive,ChevronUp,ArrowDown}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import*as Ba from'react-dom';import {Toaster}from'sonner';export{toast}from'sonner';import {Drawer}from'vaul';import {DayPicker,useDayPicker}from'react-day-picker';import {getMonth,getYear,setMonth,setYear}from'date-fns';import {Command}from'cmdk';import {Panel,Group,Separator}from'react-resizable-panels';import {HexColorPicker,HexColorInput}from'react-colorful';import {themes,Highlight}from'prism-react-renderer';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 zM from'embla-carousel-react';import {useEditor,EditorContent}from'@tiptap/react';import WM from'@tiptap/starter-kit';import _M from'@tiptap/extension-link';import YM from'@tiptap/extension-underline';import XM from'@tiptap/extension-text-align';import qM from'@tiptap/extension-placeholder';import vN,{centerCrop,makeAspectCrop}from'react-image-crop';import'react-image-crop/dist/ReactCrop.css';import MN from'react-qr-code';import {useTheme,ThemeProvider}from'next-themes';export{useTheme}from'next-themes';import {motion,AnimatePresence,useInView,useMotionValue,useTransform,animate,useScroll,useSpring}from'framer-motion';import So from'canvas-confetti';function u(...e){return twMerge(clsx(e))}var Gy=cva("relative w-full p-4",{variants:{variant:{solid:"border",bordered:"border bg-transparent",flat:""},type:{default:"",success:"",warning:"",error:""},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},compoundVariants:[{variant:"solid",type:"default",className:"!border-primary bg-primary text-primary-foreground [&>svg]:text-primary-foreground"},{variant:"bordered",type:"default",className:"!border-primary text-primary [&>svg]:text-primary"},{variant:"flat",type:"default",className:"bg-primary/10 text-primary [&>svg]:text-primary"},{variant:"solid",type:"success",className:"!border-green-600 bg-green-600 text-white dark:!border-green-500 dark:bg-green-500 [&>svg]:text-white"},{variant:"bordered",type:"success",className:"!border-green-600 text-green-600 dark:!border-green-500 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"flat",type:"success",className:"bg-green-600/10 text-green-600 dark:bg-green-500/10 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"solid",type:"warning",className:"!border-amber-600 bg-amber-600 text-white dark:!border-amber-500 dark:bg-amber-500 [&>svg]:text-white"},{variant:"bordered",type:"warning",className:"!border-amber-600 text-amber-600 dark:!border-amber-500 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"flat",type:"warning",className:"bg-amber-600/10 text-amber-600 dark:bg-amber-500/10 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"solid",type:"error",className:"!border-red-600 bg-red-600 text-white dark:!border-red-500 dark:bg-red-500 [&>svg]:text-white"},{variant:"bordered",type:"error",className:"!border-red-600 text-red-600 dark:!border-red-500 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"},{variant:"flat",type:"error",className:"bg-red-600/10 text-red-600 dark:bg-red-500/10 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"}],defaultVariants:{variant:"solid",type:"default",radius:"md"}}),Uy={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},jy=X.forwardRef(({className:e,variant:t="solid",type:n="default",radius:r="md",icon:o,hideIcon:a=false,endContent:s,children:i,...l},c)=>{let d=Uy[n],m=!a,f=o!==void 0?o:d?jsx(d,{className:"h-4 w-4"}):null;return jsxs("div",{ref:c,role:"alert",className:u(Gy({variant:t,type:n,radius:r}),s&&"flex items-center justify-between",e),...l,children:[jsxs("div",{className:"flex items-start gap-3",children:[m&&f&&jsx("span",{className:"mt-0.5 shrink-0",children:f}),jsx("div",{children:i})]}),s&&jsx("div",{className:"shrink-0 ml-4",children:s})]})});jy.displayName="Alert";var Wy=X.forwardRef(({className:e,...t},n)=>jsx("h5",{ref:n,className:u("mb-1 font-medium leading-none tracking-tight",e),...t}));Wy.displayName="AlertTitle";var _y=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("text-sm [&_p]:leading-relaxed",e),...t}));_y.displayName="AlertDescription";var Yy=cva("absolute rounded-full flex items-center justify-center font-semibold",{variants:{variant:{solid:"",bordered:"border"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"",md:"",lg:""},placement:{"top-right":"-top-1 -right-1","top-left":"-top-1 -left-1","bottom-right":"-bottom-1 -right-1","bottom-left":"-bottom-1 -left-1"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900"},{variant:"solid",color:"success",className:"bg-green-600 text-white dark:bg-green-500"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white dark:bg-amber-500"},{variant:"solid",color:"danger",className:"bg-red-600 text-white dark:bg-red-500"},{variant:"solid",color:"info",className:"bg-blue-600 text-white dark:bg-blue-500"},{variant:"bordered",color:"default",className:"bg-white border-zinc-800 text-zinc-800 dark:bg-zinc-900 dark:border-zinc-200 dark:text-zinc-200"},{variant:"bordered",color:"success",className:"bg-white border-green-600 text-green-600 dark:bg-zinc-900 dark:border-green-500 dark:text-green-500"},{variant:"bordered",color:"warning",className:"bg-white border-amber-600 text-amber-600 dark:bg-zinc-900 dark:border-amber-500 dark:text-amber-500"},{variant:"bordered",color:"danger",className:"bg-white border-red-600 text-red-600 dark:bg-zinc-900 dark:border-red-500 dark:text-red-500"},{variant:"bordered",color:"info",className:"bg-white border-blue-600 text-blue-600 dark:bg-zinc-900 dark:border-blue-500 dark:text-blue-500"},{size:"sm",className:"min-w-4 h-4 text-[10px] px-1"},{size:"md",className:"min-w-5 h-5 text-xs px-1"},{size:"lg",className:"min-w-6 h-6 text-sm px-1.5"}],defaultVariants:{variant:"solid",color:"default",size:"md",placement:"top-right"}}),Xy={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},qy={default:"bg-zinc-800 dark:bg-zinc-200",success:"bg-green-600 dark:bg-green-500",warning:"bg-amber-600 dark:bg-amber-500",danger:"bg-red-600 dark:bg-red-500",info:"bg-blue-600 dark:bg-blue-500"},Zy=X.forwardRef(({className:e,children:t,content:n,variant:r="solid",color:o="default",size:a="md",placement:s="top-right",isDot:i=false,showPing:l=false,...c},d)=>jsxs("div",{ref:d,className:u("relative inline-flex",e),...c,children:[t,jsxs("span",{className:u(Yy({variant:r,color:o,size:i?void 0:a,placement:s}),i&&Xy[a||"md"],i&&"min-w-0 p-0"),children:[l&&jsx("span",{className:u("absolute inset-0 rounded-full animate-ping opacity-75",qy[o||"default"])}),!i&&n]})]}));Zy.displayName="Badge";var Qy=cva("inline-flex items-center gap-1 font-medium rounded-full",{variants:{color:{default:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-white",success:"bg-green-600/20 text-green-700 dark:bg-green-500/20 dark:text-green-500",warning:"bg-amber-600/20 text-amber-700 dark:bg-amber-500/20 dark:text-amber-500",danger:"bg-red-600/20 text-red-700 dark:bg-red-500/20 dark:text-red-500",info:"bg-blue-600/20 text-blue-700 dark:bg-blue-500/20 dark:text-blue-500"},size:{sm:"px-2 py-0.5 text-[10px]",md:"px-2.5 py-0.5 text-xs",lg:"px-3 py-1 text-sm"}},defaultVariants:{color:"default",size:"md"}}),Jy=X.forwardRef(({className:e,color:t,size:n,...r},o)=>jsx("span",{ref:o,className:u(Qy({color:t,size:n}),e),...r}));Jy.displayName="TextBadge";var Qc=cva("animate-spin",{variants:{size:{sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},color:{default:"text-foreground",primary:"text-primary",muted:"text-muted-foreground",success:"text-success",warning:"text-warning",danger:"text-danger",white:"text-white"}},defaultVariants:{size:"md",color:"default"}}),t0={sm:"text-xs",md:"text-sm",lg:"text-base"},Na=X.forwardRef(({className:e,size:t="md",color:n,label:r="Loading",text:o,textPosition:a="right",customColor:s,...i},l)=>{let c=jsxs("svg",{className:u(Qc({size:t,color:s?void 0:n})),style:s?{color:s}:void 0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",role:"status","aria-label":r,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"})]});if(!o)return jsx("div",{ref:l,className:u("inline-flex",e),...i,children:c});let d=jsx("span",{className:u("text-muted-foreground",t0[t]),children:o}),m=a==="top"||a==="bottom";return jsxs("div",{ref:l,className:u("inline-flex items-center",m?"flex-col gap-2":"flex-row gap-3",(a==="left"||a==="top")&&(m?"flex-col-reverse":"flex-row-reverse"),e),...i,children:[c,d]})});Na.displayName="Spinner";var ed=cva("inline-flex",{variants:{variant:{default:"",attached:""},orientation:{horizontal:"flex-row",vertical:"flex-col"},spacing:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3"}},compoundVariants:[{variant:"attached",spacing:["sm","md","lg"],className:"gap-0"},{variant:"attached",orientation:"horizontal",className:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px"},{variant:"attached",orientation:"vertical",className:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px"}],defaultVariants:{variant:"default",orientation:"horizontal",spacing:"sm"}}),td=X.createContext({});function vi(){return X.useContext(td)}var nd=X.forwardRef(({className:e,variant:t,orientation:n,spacing:r,disabled:o,children:a,...s},i)=>jsx(td.Provider,{value:{disabled:o},children:jsx("div",{ref:i,role:"group",className:u(ed({variant:t,orientation:n,spacing:r,className:e})),...s,children:a})}));nd.displayName="ButtonGroup";var qr=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-all duration-200 ease-out 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 active:scale-[0.97] [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{solid:"",bordered:"border bg-transparent hover:opacity-70",light:"bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800",flat:"bg-zinc-100 dark:bg-zinc-800 hover:opacity-70",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"h-9 px-3 text-xs",md:"h-10 px-4",lg:"h-11 px-5 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white hover:bg-zinc-700 dark:bg-zinc-200 dark:text-zinc-900 dark:hover:bg-zinc-300"},{variant:"bordered",color:"default",className:"border-zinc-300 dark:border-zinc-700 text-zinc-900 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:"text-zinc-900 hover:bg-zinc-900 hover:text-white hover:border-zinc-900 dark:text-white dark:hover:bg-white dark:hover:text-zinc-900 dark:hover:border-white"},{variant:"solid",color:"success",className:"bg-green-600 text-white hover:bg-green-700 dark:bg-green-700 dark:text-white dark:hover:bg-green-600"},{variant:"bordered",color:"success",className:"border-green-600 dark:border-green-500 text-green-600 dark:text-green-500"},{variant:"light",color:"success",className:"text-green-600 hover:bg-green-600/10 dark:text-green-500 dark:hover:bg-green-500/10"},{variant:"flat",color:"success",className:"bg-green-600/20 text-green-700 dark:bg-green-500/20 dark:text-green-500"},{variant:"ghost",color:"success",className:"text-green-600 hover:bg-green-600 hover:text-white hover:border-green-600 dark:text-green-500 dark:hover:bg-green-500 dark:hover:text-white dark:hover:border-green-500"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white hover:bg-amber-700 dark:bg-amber-700 dark:text-white dark:hover:bg-amber-600"},{variant:"bordered",color:"warning",className:"border-amber-600 dark:border-amber-500 text-amber-600 dark:text-amber-500"},{variant:"light",color:"warning",className:"text-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:hover:bg-amber-500/10"},{variant:"flat",color:"warning",className:"bg-amber-600/20 text-amber-700 dark:bg-amber-500/20 dark:text-amber-500"},{variant:"ghost",color:"warning",className:"text-amber-600 hover:bg-amber-600 hover:text-white hover:border-amber-600 dark:text-amber-500 dark:hover:bg-amber-500 dark:hover:text-white dark:hover:border-amber-500"},{variant:"solid",color:"danger",className:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:text-white dark:hover:bg-red-600"},{variant:"bordered",color:"danger",className:"border-red-600 dark:border-red-500 text-red-600 dark:text-red-500"},{variant:"light",color:"danger",className:"text-red-600 hover:bg-red-600/10 dark:text-red-500 dark:hover:bg-red-500/10"},{variant:"flat",color:"danger",className:"bg-red-600/20 text-red-700 dark:bg-red-500/20 dark:text-red-500"},{variant:"ghost",color:"danger",className:"text-red-600 hover:bg-red-600 hover:text-white hover:border-red-600 dark:text-red-500 dark:hover:bg-red-500 dark:hover:text-white dark:hover:border-red-500"},{variant:"solid",color:"info",className:"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-700 dark:text-white dark:hover:bg-blue-600"},{variant:"bordered",color:"info",className:"border-blue-600 dark:border-blue-500 text-blue-600 dark:text-blue-500"},{variant:"light",color:"info",className:"text-blue-600 hover:bg-blue-600/10 dark:text-blue-500 dark:hover:bg-blue-500/10"},{variant:"flat",color:"info",className:"bg-blue-600/20 text-blue-700 dark:bg-blue-500/20 dark:text-blue-500"},{variant:"ghost",color:"info",className:"text-blue-600 hover:bg-blue-600 hover:text-white hover:border-blue-600 dark:text-blue-500 dark:hover:bg-blue-500 dark:hover:text-white dark:hover:border-blue-500"}],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"md"}}),ae=X.forwardRef(({className:e,variant:t,color:n,size:r,radius:o,href:a,loading:s=false,startContent:i,endContent:l,children:c,disabled:d,style:m,isIconOnly:f,...p},g)=>{let h=vi(),b=d||h.disabled||s,v=m,x=f?r==="sm"?"!px-0 !w-9":r==="lg"?"!px-0 !w-11":"!px-0 !w-10":"",w=s?jsxs(Fragment,{children:[jsx(Na,{size:"sm",color:t==="solid"?"white":"default"}),c]}):jsxs(Fragment,{children:[i,c,l]});return a?b?jsx("span",{role:"link","aria-disabled":"true",className:u(qr({variant:t,color:n,size:r,radius:o,className:e}),x,"pointer-events-none opacity-50 cursor-not-allowed"),style:v,children:w}):jsx("a",{href:a,className:u(qr({variant:t,color:n,size:r,radius:o,className:e}),x),style:v,...p,children:w}):jsx("button",{type:"button",className:u(qr({variant:t,color:n,size:r,radius:o,className:e}),x),ref:g,disabled:b,style:v,...p,children:w})});ae.displayName="Button";var sd=cva("border bg-card text-card-foreground shadow-sm",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{radius:"lg"}}),id=X.forwardRef(({className:e,radius:t,...n},r)=>jsx("div",{ref:r,className:u(sd({radius:t,className:e})),...n}));id.displayName="Card";var ld=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex flex-col space-y-1.5 p-6",e),...t}));ld.displayName="CardHeader";var cd=X.forwardRef(({className:e,...t},n)=>jsx("h3",{ref:n,className:u("text-2xl font-semibold leading-none tracking-tight",e),...t}));cd.displayName="CardTitle";var dd=X.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));dd.displayName="CardDescription";var ud=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("p-6 pt-0",e),...t}));ud.displayName="CardContent";var md=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center p-6 pt-0",e),...t}));md.displayName="CardFooter";var Oo=X.forwardRef(({className:e,checked:t,defaultChecked:n=false,onCheckedChange:r,disabled:o,required:a,name:s,value:i="on",text:l,description:c,onKeyDown:d,...m},f)=>{let[p,g]=X.useState(n),h=t!==void 0,b=h?t:p,[v,x]=X.useState(false),y=X.useId(),w=()=>{if(o)return;let P=b==="indeterminate"?true:!b;h||g(P),r?.(P);},C=P=>{P.key==="Enter"&&P.preventDefault(),d?.(P);},R=b===true,N=b==="indeterminate",T=jsxs(Fragment,{children:[jsx("button",{type:"button",role:"checkbox",id:l?y:void 0,"aria-checked":N?"mixed":R,"aria-required":a,disabled:o,ref:f,className:u("peer h-4 w-4 shrink-0 rounded-sm border border-primary focus-visible:outline-none cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 transition-colors",R&&"bg-primary text-primary-foreground",N&&"bg-background text-foreground",!l&&e),style:{borderColor:v?"var(--color-foreground)":void 0},onClick:w,onKeyDown:C,onFocus:()=>x(true),onBlur:()=>x(false),...m,children:(R||N)&&jsx("span",{className:"flex items-center justify-center text-current",children:N?jsx(Minus,{className:"h-4 w-4"}):jsx(Check,{className:"h-4 w-4"})})}),s&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:s,value:i,checked:R,required:a,disabled:o,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]});return l?jsxs("div",{className:u("flex items-start gap-2",e),children:[T,jsxs("div",{className:"flex flex-col gap-0.5",children:[jsx("label",{htmlFor:y,className:u("text-sm font-medium leading-none cursor-pointer",o&&"cursor-not-allowed opacity-50"),children:l}),c&&jsx("p",{className:"text-xs text-muted-foreground",children:c})]})]}):T});Oo.displayName="Checkbox";var c0=cva("flex w-full border border-input bg-background px-3 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-11 py-2.5 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",radius:"md"}}),Pa=X.forwardRef(({className:e,type:t,size:n,radius:r,label:o,isRequired:a,description:s,errorMessage:i,isInvalid:l,onFocus:c,onBlur:d,style:m,...f},p)=>{let[g,h]=X.useState(false),b=X.useId(),v=f.id||b,x=l||!!i,y=jsx("input",{id:v,type:t,className:u(c0({size:n,radius:r}),x&&"border-danger focus:border-danger",!o&&e),ref:p,required:a,"aria-invalid":x,"aria-describedby":s||i?`${v}-description`:void 0,style:{...m,borderColor:x?void 0:g?"var(--color-foreground)":void 0},onFocus:w=>{h(true),c?.(w);},onBlur:w=>{h(false),d?.(w);},...f});return !o&&!s&&!i?y:jsxs("div",{className:u("flex flex-col gap-1.5",e),children:[o&&jsxs("label",{htmlFor:v,className:"text-sm font-medium leading-none",children:[o,a&&jsx("span",{className:"text-danger ml-1",children:"*"})]}),y,(s||i)&&jsx("p",{id:`${v}-description`,className:u("text-xs",x?"text-danger":"text-muted-foreground"),children:i||s})]})});Pa.displayName="Input";var u0=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Cr=X.forwardRef(({className:e,...t},n)=>jsx("label",{ref:n,className:u(u0(),e),...t}));Cr.displayName="Label";var jn=X.forwardRef(({className:e,orientation:t="horizontal",decorative:n=true,text:r,...o},a)=>{let s=n?{role:"none"}:{role:"separator","aria-orientation":t};return r&&t==="horizontal"?jsxs("div",{className:u("flex items-center gap-4",e),children:[jsx("div",{...s,className:"shrink-0 bg-border h-[1px] flex-1"}),jsx("span",{className:"text-sm text-muted-foreground",children:r}),jsx("div",{...s,className:"shrink-0 bg-border h-[1px] flex-1"})]}):jsx("div",{ref:a,...s,className:u("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o})});jn.displayName="Separator";var f0="peer inline-flex 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",La={default:"bg-zinc-800 dark:bg-zinc-200",success:"bg-green-600 dark:bg-green-500",warning:"bg-amber-600 dark:bg-amber-500",danger:"bg-red-600 dark:bg-red-500",info:"bg-blue-600 dark:bg-blue-500"},bd={sm:{track:"h-5 w-9",thumb:"h-4 w-4",translate:"translate-x-4"},md:{track:"h-6 w-11",thumb:"h-5 w-5",translate:"translate-x-5"},lg:{track:"h-7 w-14",thumb:"h-6 w-6",translate:"translate-x-7"}},vd=X.forwardRef(({className:e,color:t,size:n="md",customColor:r,checked:o,defaultChecked:a=false,onCheckedChange:s,disabled:i,required:l,name:c,value:d="on",onKeyDown:m,style:f,...p},g)=>{let[h,b]=X.useState(a),v=o!==void 0,x=v?o:h,y=()=>{if(i)return;let N=!x;v||b(N),s?.(N);},w=N=>{N.key==="Enter"&&N.preventDefault(),m?.(N);},C=t&&La[t]?La[t]:La.default,R=bd[n]||bd.md;return jsxs(Fragment,{children:[jsx("button",{type:"button",role:"switch","aria-checked":x,"aria-required":l,"data-state":x?"checked":"unchecked",disabled:i,ref:g,className:u(f0,R.track,x?r?"":C:"bg-input",e),style:r&&x?{backgroundColor:r,...f}:f,onClick:y,onKeyDown:w,...p,children:jsx("span",{className:u("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",R.thumb,x?R.translate:"translate-x-0")})}),c&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:c,value:d,checked:x,required:l,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});vd.displayName="Switch";var h0=cva("flex min-h-[80px] w-full border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{radius:"md"}}),hd=X.forwardRef(({className:e,radius:t,onFocus:n,onBlur:r,style:o,...a},s)=>{let[i,l]=X.useState(false);return jsx("textarea",{className:u(h0({radius:t,className:e})),ref:s,style:{...o,borderColor:i?"var(--color-foreground)":void 0},onFocus:c=>{l(true),n?.(c);},onBlur:c=>{l(false),r?.(c);},...a})});hd.displayName="Textarea";var yd=cva("rounded-md bg-muted",{variants:{variant:{pulse:"animate-pulse",shimmer:"skeleton-shimmer",static:""}},defaultVariants:{variant:"pulse"}}),Ha=X.forwardRef(({className:e,variant:t,...n},r)=>jsx("div",{ref:r,className:u(yd({variant:t,className:e})),...n}));Ha.displayName="Skeleton";var C0=cva("relative flex shrink-0 overflow-hidden cursor-pointer",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",radius:"full"}}),Rd=X.createContext(null),wd=()=>{let e=X.useContext(Rd);if(!e)throw new Error("Avatar components must be used within an Avatar");return e},Tr=X.forwardRef(({className:e,size:t,radius:n,...r},o)=>{let[a,s]=X.useState("idle");return jsx(Rd.Provider,{value:{imageLoadingStatus:a,onImageLoadingStatusChange:s},children:jsx("span",{ref:o,className:u(C0({size:t,radius:n,className:e})),...r})})});Tr.displayName="Avatar";var Jr=X.forwardRef(({className:e,src:t,alt:n,onLoadingStatusChange:r,...o},a)=>{let{imageLoadingStatus:s,onImageLoadingStatusChange:i}=wd();return X.useEffect(()=>{if(!t){i("error");return}i("loading"),r?.("loading");let l=new Image;l.src=t,l.onload=()=>{i("loaded"),r?.("loaded");},l.onerror=()=>{i("error"),r?.("error");};},[t,i,r]),s!=="loaded"?null:jsx("img",{ref:a,src:t,alt:n,className:u("aspect-square h-full w-full object-cover",e),...o})});Jr.displayName="AvatarImage";var Mr=X.forwardRef(({className:e,delayMs:t=0,children:n,...r},o)=>{let{imageLoadingStatus:a}=wd(),[s,i]=X.useState(t===0);return X.useEffect(()=>{if(t>0){let l=setTimeout(()=>i(true),t);return ()=>clearTimeout(l)}},[t]),a==="loaded"||!s?null:jsx("span",{ref:o,className:u("flex h-full w-full items-center justify-center bg-muted",e),...r,children:n})});Mr.displayName="AvatarFallback";var Td=X.createContext({delayDuration:700,skipDelayDuration:300}),Wn=({children:e,delayDuration:t=700,skipDelayDuration:n=300})=>jsx(Td.Provider,{value:{delayDuration:t,skipDelayDuration:n},children:e});Wn.displayName="TooltipProvider";var Md=X.createContext(null),Nd=()=>{let e=X.useContext(Md);if(!e)throw new Error("Tooltip components must be used within a Tooltip");return e},_n=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,delayDuration:o})=>{let a=X.useContext(Td),[s,i]=X.useState(n),l=t!==void 0,c=l?t:s,d=X.useRef(null),m=X.useId(),f=X.useRef(null),p=o??a.delayDuration,g=X.useCallback(h=>{f.current&&clearTimeout(f.current),h?f.current=setTimeout(()=>{l||i(true),r?.(true);},p):(l||i(false),r?.(false));},[l,r,p]);return X.useEffect(()=>()=>{f.current&&clearTimeout(f.current);},[]),jsx(Md.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentId:m},children:e})};_n.displayName="Tooltip";var Yn=X.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l,contentId:c,open:d}=Nd();return jsx("button",{ref:h=>{l.current=h,typeof s=="function"?s(h):s&&(s.current=h);},type:"button","aria-describedby":d?c:void 0,onMouseEnter:h=>{t?.(h),i(true);},onMouseLeave:h=>{n?.(h),i(false);},onFocus:h=>{r?.(h),i(true);},onBlur:h=>{o?.(h),i(false);},...a,children:e})});Yn.displayName="TooltipTrigger";var Xn=X.forwardRef(({className:e,side:t="top",sideOffset:n=4,align:r="center",alignOffset:o=0,children:a,...s},i)=>{let{open:l,triggerRef:c,contentId:d}=Nd(),[m,f]=X.useState({top:0,left:0}),[p,g]=X.useState(false),h=X.useRef(null);if(X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!l||!c.current||!h.current)return;let v=c.current.getBoundingClientRect(),x=h.current.getBoundingClientRect(),y=0,w=0;switch(t){case "top":y=v.top-x.height-n;break;case "bottom":y=v.bottom+n;break;case "left":w=v.left-x.width-n;break;case "right":w=v.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":w=v.left+o;break;case "center":w=v.left+v.width/2-x.width/2;break;case "end":w=v.right-x.width-o;break}else switch(r){case "start":y=v.top+o;break;case "center":y=v.top+v.height/2-x.height/2;break;case "end":y=v.bottom-x.height-o;break}f({top:y,left:w});},[l,t,n,r,o,c]),!p||!l)return null;let b={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[t];return Ba.createPortal(jsx("div",{ref:v=>{h.current=v,typeof i=="function"?i(v):i&&(i.current=v);},id:d,role:"tooltip","data-side":t,className:u("fixed z-50 overflow-hidden rounded-md px-3 py-1.5 text-xs bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",b,e),style:{top:m.top,left:m.left},...s,children:a}),document.body)});Xn.displayName="TooltipContent";var T0={sm:"20px",md:"40px",lg:"60px"},ke=X.forwardRef(({className:e,orientation:t="vertical",visibility:n="visible",showShadow:r=false,shadowSize:o="md",children:a,style:s,...i},l)=>{let c=X.useRef(null),[d,m]=X.useState(false),[f,p]=X.useState({top:false,bottom:false,left:false,right:false}),g=X.useId().replace(/:/g,"");X.useImperativeHandle(l,()=>c.current);let h=X.useCallback(()=>{let C=c.current;if(!C||!r)return;let{scrollTop:R,scrollLeft:N,scrollHeight:T,scrollWidth:P,clientHeight:k,clientWidth:E}=C;p({top:R>0,bottom:R<T-k-1,left:N>0,right:N<P-E-1});},[r]);X.useEffect(()=>{if(!r)return;let C=c.current;if(C)return h(),C.addEventListener("scroll",h),window.addEventListener("resize",h),()=>{C.removeEventListener("scroll",h),window.removeEventListener("resize",h);}},[r,h]);let b=n==="visible"||n==="hover"&&d,v=b?"rgba(0,0,0,0.3)":"transparent",x=b?"rgba(255,255,255,0.3)":"transparent",y=`
1
+ import*as X from'react';import {createContext,useState,useEffect,useContext,useCallback,useRef,useMemo}from'react';import {cva}from'class-variance-authority';import {AlertCircle,AlertTriangle,CheckCircle2,Info,Minus,Check,X as X$1,ChevronDown,Search,ChevronRight,Circle,ChevronsUpDown,PanelLeft,PanelLeftOpen,PanelRightOpen,PanelLeftClose,PanelRightClose,EyeOff,Eye,Plus,Heart,Star,TrendingUp,TrendingDown,Upload,Clock,Menu,ExternalLink,ArrowUp,File,Folder,FolderOpen,Loader2,Copy,Calendar,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,HelpCircle,ArrowRight,Hash,User,Settings,Bell,CheckCircle,Trash2,Image as Image$1,FileVideo,FileAudio,FileText,FileArchive,ChevronUp,ArrowDown}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import*as Ba from'react-dom';import {Toaster}from'sonner';export{toast}from'sonner';import {Drawer}from'vaul';import {DayPicker,useDayPicker}from'react-day-picker';import {getMonth,getYear,setMonth,setYear}from'date-fns';import {Command}from'cmdk';import {Panel,Group,Separator}from'react-resizable-panels';import {HexColorPicker,HexColorInput}from'react-colorful';import {themes,Highlight}from'prism-react-renderer';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 MM from'embla-carousel-react';import {useEditor,EditorContent}from'@tiptap/react';import IM from'@tiptap/starter-kit';import VM from'@tiptap/extension-link';import AM from'@tiptap/extension-underline';import zM from'@tiptap/extension-text-align';import OM from'@tiptap/extension-placeholder';import aN,{centerCrop,makeAspectCrop}from'react-image-crop';import'react-image-crop/dist/ReactCrop.css';import pN from'react-qr-code';import {useTheme,ThemeProvider}from'next-themes';export{useTheme}from'next-themes';import {motion,AnimatePresence,useInView,useMotionValue,useTransform,animate,useScroll,useSpring}from'framer-motion';import So from'canvas-confetti';function u(...e){return twMerge(clsx(e))}var Sy=cva("relative w-full p-4",{variants:{variant:{solid:"border",bordered:"border bg-transparent",flat:""},type:{default:"",success:"",warning:"",error:""},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},compoundVariants:[{variant:"solid",type:"default",className:"!border-primary bg-primary text-primary-foreground [&>svg]:text-primary-foreground"},{variant:"bordered",type:"default",className:"!border-primary text-primary [&>svg]:text-primary"},{variant:"flat",type:"default",className:"bg-primary/10 text-primary [&>svg]:text-primary"},{variant:"solid",type:"success",className:"!border-green-600 bg-green-600 text-white dark:!border-green-500 dark:bg-green-500 [&>svg]:text-white"},{variant:"bordered",type:"success",className:"!border-green-600 text-green-600 dark:!border-green-500 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"flat",type:"success",className:"bg-green-600/10 text-green-600 dark:bg-green-500/10 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"solid",type:"warning",className:"!border-amber-600 bg-amber-600 text-white dark:!border-amber-500 dark:bg-amber-500 [&>svg]:text-white"},{variant:"bordered",type:"warning",className:"!border-amber-600 text-amber-600 dark:!border-amber-500 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"flat",type:"warning",className:"bg-amber-600/10 text-amber-600 dark:bg-amber-500/10 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"solid",type:"error",className:"!border-red-600 bg-red-600 text-white dark:!border-red-500 dark:bg-red-500 [&>svg]:text-white"},{variant:"bordered",type:"error",className:"!border-red-600 text-red-600 dark:!border-red-500 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"},{variant:"flat",type:"error",className:"bg-red-600/10 text-red-600 dark:bg-red-500/10 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"}],defaultVariants:{variant:"solid",type:"default",radius:"md"}}),Dy={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},Hy=X.forwardRef(({className:e,variant:t="solid",type:n="default",radius:r="md",icon:o,hideIcon:a=false,endContent:s,children:i,...l},c)=>{let d=Dy[n],m=!a,f=o!==void 0?o:d?jsx(d,{className:"h-4 w-4"}):null;return jsxs("div",{ref:c,role:"alert",className:u(Sy({variant:t,type:n,radius:r}),s&&"flex items-center justify-between",e),...l,children:[jsxs("div",{className:"flex items-start gap-3",children:[m&&f&&jsx("span",{className:"mt-0.5 shrink-0",children:f}),jsx("div",{children:i})]}),s&&jsx("div",{className:"shrink-0 ml-4",children:s})]})});Hy.displayName="Alert";var Iy=X.forwardRef(({className:e,...t},n)=>jsx("h5",{ref:n,className:u("mb-1 font-medium leading-none tracking-tight",e),...t}));Iy.displayName="AlertTitle";var Vy=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("text-sm [&_p]:leading-relaxed",e),...t}));Vy.displayName="AlertDescription";var Ay=cva("absolute rounded-full flex items-center justify-center font-semibold",{variants:{variant:{solid:"",bordered:"border"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"",md:"",lg:""},placement:{"top-right":"-top-1 -right-1","top-left":"-top-1 -left-1","bottom-right":"-bottom-1 -right-1","bottom-left":"-bottom-1 -left-1"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900"},{variant:"solid",color:"success",className:"bg-green-600 text-white dark:bg-green-500"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white dark:bg-amber-500"},{variant:"solid",color:"danger",className:"bg-red-600 text-white dark:bg-red-500"},{variant:"solid",color:"info",className:"bg-blue-600 text-white dark:bg-blue-500"},{variant:"bordered",color:"default",className:"bg-white border-zinc-800 text-zinc-800 dark:bg-zinc-900 dark:border-zinc-200 dark:text-zinc-200"},{variant:"bordered",color:"success",className:"bg-white border-green-600 text-green-600 dark:bg-zinc-900 dark:border-green-500 dark:text-green-500"},{variant:"bordered",color:"warning",className:"bg-white border-amber-600 text-amber-600 dark:bg-zinc-900 dark:border-amber-500 dark:text-amber-500"},{variant:"bordered",color:"danger",className:"bg-white border-red-600 text-red-600 dark:bg-zinc-900 dark:border-red-500 dark:text-red-500"},{variant:"bordered",color:"info",className:"bg-white border-blue-600 text-blue-600 dark:bg-zinc-900 dark:border-blue-500 dark:text-blue-500"},{size:"sm",className:"min-w-4 h-4 text-[10px] px-1"},{size:"md",className:"min-w-5 h-5 text-xs px-1"},{size:"lg",className:"min-w-6 h-6 text-sm px-1.5"}],defaultVariants:{variant:"solid",color:"default",size:"md",placement:"top-right"}}),zy={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},Oy={default:"bg-zinc-800 dark:bg-zinc-200",success:"bg-green-600 dark:bg-green-500",warning:"bg-amber-600 dark:bg-amber-500",danger:"bg-red-600 dark:bg-red-500",info:"bg-blue-600 dark:bg-blue-500"},By=X.forwardRef(({className:e,children:t,content:n,variant:r="solid",color:o="default",size:a="md",placement:s="top-right",isDot:i=false,showPing:l=false,...c},d)=>jsxs("div",{ref:d,className:u("relative inline-flex",e),...c,children:[t,jsxs("span",{className:u(Ay({variant:r,color:o,size:i?void 0:a,placement:s}),i&&zy[a||"md"],i&&"min-w-0 p-0"),children:[l&&jsx("span",{className:u("absolute inset-0 rounded-full animate-ping opacity-75",Oy[o||"default"])}),!i&&n]})]}));By.displayName="Badge";var Fy=cva("inline-flex items-center gap-1 font-medium rounded-full",{variants:{color:{default:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-white",success:"bg-green-600/20 text-green-700 dark:bg-green-500/20 dark:text-green-500",warning:"bg-amber-600/20 text-amber-700 dark:bg-amber-500/20 dark:text-amber-500",danger:"bg-red-600/20 text-red-700 dark:bg-red-500/20 dark:text-red-500",info:"bg-blue-600/20 text-blue-700 dark:bg-blue-500/20 dark:text-blue-500"},size:{sm:"px-2 py-0.5 text-[10px]",md:"px-2.5 py-0.5 text-xs",lg:"px-3 py-1 text-sm"}},defaultVariants:{color:"default",size:"md"}}),Ky=X.forwardRef(({className:e,color:t,size:n,...r},o)=>jsx("span",{ref:o,className:u(Fy({color:t,size:n}),e),...r}));Ky.displayName="TextBadge";var _c=cva("animate-spin",{variants:{size:{sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},color:{default:"text-foreground",primary:"text-primary",muted:"text-muted-foreground",success:"text-success",warning:"text-warning",danger:"text-danger",white:"text-white"}},defaultVariants:{size:"md",color:"default"}}),Gy={sm:"text-xs",md:"text-sm",lg:"text-base"},Na=X.forwardRef(({className:e,size:t="md",color:n,label:r="Loading",text:o,textPosition:a="right",customColor:s,...i},l)=>{let c=jsxs("svg",{className:u(_c({size:t,color:s?void 0:n})),style:s?{color:s}:void 0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",role:"status","aria-label":r,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"})]});if(!o)return jsx("div",{ref:l,className:u("inline-flex",e),...i,children:c});let d=jsx("span",{className:u("text-muted-foreground",Gy[t]),children:o}),m=a==="top"||a==="bottom";return jsxs("div",{ref:l,className:u("inline-flex items-center",m?"flex-col gap-2":"flex-row gap-3",(a==="left"||a==="top")&&(m?"flex-col-reverse":"flex-row-reverse"),e),...i,children:[c,d]})});Na.displayName="Spinner";var Xc=cva("inline-flex",{variants:{variant:{default:"",attached:""},orientation:{horizontal:"flex-row",vertical:"flex-col"},spacing:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3"}},compoundVariants:[{variant:"attached",spacing:["sm","md","lg"],className:"gap-0"},{variant:"attached",orientation:"horizontal",className:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px"},{variant:"attached",orientation:"vertical",className:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px"}],defaultVariants:{variant:"default",orientation:"horizontal",spacing:"sm"}}),qc=X.createContext({});function bi(){return X.useContext(qc)}var Zc=X.forwardRef(({className:e,variant:t,orientation:n,spacing:r,disabled:o,children:a,...s},i)=>jsx(qc.Provider,{value:{disabled:o},children:jsx("div",{ref:i,role:"group",className:u(Xc({variant:t,orientation:n,spacing:r,className:e})),...s,children:a})}));Zc.displayName="ButtonGroup";var qr=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-all duration-200 ease-out 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 active:scale-[0.97] [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{solid:"",bordered:"border bg-transparent hover:opacity-70",light:"bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800",flat:"bg-zinc-100 dark:bg-zinc-800 hover:opacity-70",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent"},color:{default:"",success:"",warning:"",danger:"",info:""},size:{sm:"h-9 px-3 text-xs",md:"h-10 px-4",lg:"h-11 px-5 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},compoundVariants:[{variant:"solid",color:"default",className:"bg-zinc-800 text-white hover:bg-zinc-700 dark:bg-zinc-200 dark:text-zinc-900 dark:hover:bg-zinc-300"},{variant:"bordered",color:"default",className:"border-zinc-300 dark:border-zinc-700 text-zinc-900 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:"text-zinc-900 hover:bg-zinc-900 hover:text-white hover:border-zinc-900 dark:text-white dark:hover:bg-white dark:hover:text-zinc-900 dark:hover:border-white"},{variant:"solid",color:"success",className:"bg-green-600 text-white hover:bg-green-700 dark:bg-green-700 dark:text-white dark:hover:bg-green-600"},{variant:"bordered",color:"success",className:"border-green-600 dark:border-green-500 text-green-600 dark:text-green-500"},{variant:"light",color:"success",className:"text-green-600 hover:bg-green-600/10 dark:text-green-500 dark:hover:bg-green-500/10"},{variant:"flat",color:"success",className:"bg-green-600/20 text-green-700 dark:bg-green-500/20 dark:text-green-500"},{variant:"ghost",color:"success",className:"text-green-600 hover:bg-green-600 hover:text-white hover:border-green-600 dark:text-green-500 dark:hover:bg-green-500 dark:hover:text-white dark:hover:border-green-500"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white hover:bg-amber-700 dark:bg-amber-700 dark:text-white dark:hover:bg-amber-600"},{variant:"bordered",color:"warning",className:"border-amber-600 dark:border-amber-500 text-amber-600 dark:text-amber-500"},{variant:"light",color:"warning",className:"text-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:hover:bg-amber-500/10"},{variant:"flat",color:"warning",className:"bg-amber-600/20 text-amber-700 dark:bg-amber-500/20 dark:text-amber-500"},{variant:"ghost",color:"warning",className:"text-amber-600 hover:bg-amber-600 hover:text-white hover:border-amber-600 dark:text-amber-500 dark:hover:bg-amber-500 dark:hover:text-white dark:hover:border-amber-500"},{variant:"solid",color:"danger",className:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:text-white dark:hover:bg-red-600"},{variant:"bordered",color:"danger",className:"border-red-600 dark:border-red-500 text-red-600 dark:text-red-500"},{variant:"light",color:"danger",className:"text-red-600 hover:bg-red-600/10 dark:text-red-500 dark:hover:bg-red-500/10"},{variant:"flat",color:"danger",className:"bg-red-600/20 text-red-700 dark:bg-red-500/20 dark:text-red-500"},{variant:"ghost",color:"danger",className:"text-red-600 hover:bg-red-600 hover:text-white hover:border-red-600 dark:text-red-500 dark:hover:bg-red-500 dark:hover:text-white dark:hover:border-red-500"},{variant:"solid",color:"info",className:"bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-700 dark:text-white dark:hover:bg-blue-600"},{variant:"bordered",color:"info",className:"border-blue-600 dark:border-blue-500 text-blue-600 dark:text-blue-500"},{variant:"light",color:"info",className:"text-blue-600 hover:bg-blue-600/10 dark:text-blue-500 dark:hover:bg-blue-500/10"},{variant:"flat",color:"info",className:"bg-blue-600/20 text-blue-700 dark:bg-blue-500/20 dark:text-blue-500"},{variant:"ghost",color:"info",className:"text-blue-600 hover:bg-blue-600 hover:text-white hover:border-blue-600 dark:text-blue-500 dark:hover:bg-blue-500 dark:hover:text-white dark:hover:border-blue-500"}],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"md"}}),ae=X.forwardRef(({className:e,variant:t,color:n,size:r,radius:o,href:a,loading:s=false,startContent:i,endContent:l,children:c,disabled:d,style:m,isIconOnly:f,...p},g)=>{let h=bi(),b=d||h.disabled||s,v=m,y=f?r==="sm"?"!px-0 !w-9":r==="lg"?"!px-0 !w-11":"!px-0 !w-10":"",w=s?jsxs(Fragment,{children:[jsx(Na,{size:"sm",color:t==="solid"?"white":"default"}),c]}):jsxs(Fragment,{children:[i,c,l]});return a?b?jsx("span",{role:"link","aria-disabled":"true",className:u(qr({variant:t,color:n,size:r,radius:o,className:e}),y,"pointer-events-none opacity-50 cursor-not-allowed"),style:v,children:w}):jsx("a",{href:a,className:u(qr({variant:t,color:n,size:r,radius:o,className:e}),y),style:v,...p,children:w}):jsx("button",{type:"button",className:u(qr({variant:t,color:n,size:r,radius:o,className:e}),y),ref:g,disabled:b,style:v,...p,children:w})});ae.displayName="Button";var td=cva("border bg-card text-card-foreground shadow-sm",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{radius:"lg"}}),nd=X.forwardRef(({className:e,radius:t,...n},r)=>jsx("div",{ref:r,className:u(td({radius:t,className:e})),...n}));nd.displayName="Card";var rd=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex flex-col space-y-1.5 p-6",e),...t}));rd.displayName="CardHeader";var od=X.forwardRef(({className:e,...t},n)=>jsx("h3",{ref:n,className:u("text-2xl font-semibold leading-none tracking-tight",e),...t}));od.displayName="CardTitle";var ad=X.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));ad.displayName="CardDescription";var sd=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("p-6 pt-0",e),...t}));sd.displayName="CardContent";var id=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center p-6 pt-0",e),...t}));id.displayName="CardFooter";var Oo=X.forwardRef(({className:e,checked:t,defaultChecked:n=false,onCheckedChange:r,disabled:o,required:a,name:s,value:i="on",text:l,description:c,onKeyDown:d,...m},f)=>{let[p,g]=X.useState(n),h=t!==void 0,b=h?t:p,[v,y]=X.useState(false),x=X.useId(),w=()=>{if(o)return;let k=b==="indeterminate"?true:!b;h||g(k),r?.(k);},C=k=>{k.key==="Enter"&&k.preventDefault(),d?.(k);},R=b===true,T=b==="indeterminate",M=jsxs(Fragment,{children:[jsx("button",{type:"button",role:"checkbox",id:l?x:void 0,"aria-checked":T?"mixed":R,"aria-required":a,disabled:o,ref:f,className:u("peer h-4 w-4 shrink-0 rounded-sm border border-primary focus-visible:outline-none cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 transition-colors",R&&"bg-primary text-primary-foreground",T&&"bg-background text-foreground",!l&&e),style:{borderColor:v?"var(--color-foreground)":void 0},onClick:w,onKeyDown:C,onFocus:()=>y(true),onBlur:()=>y(false),...m,children:(R||T)&&jsx("span",{className:"flex items-center justify-center text-current",children:T?jsx(Minus,{className:"h-4 w-4"}):jsx(Check,{className:"h-4 w-4"})})}),s&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:s,value:i,checked:R,required:a,disabled:o,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]});return l?jsxs("div",{className:u("flex items-start gap-2",e),children:[M,jsxs("div",{className:"flex flex-col gap-0.5",children:[jsx("label",{htmlFor:x,className:u("text-sm font-medium leading-none cursor-pointer",o&&"cursor-not-allowed opacity-50"),children:l}),c&&jsx("p",{className:"text-xs text-muted-foreground",children:c})]})]}):M});Oo.displayName="Checkbox";var Zy=cva("flex w-full border border-input bg-background px-3 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-11 py-2.5 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",radius:"md"}}),Pa=X.forwardRef(({className:e,type:t,size:n,radius:r,label:o,isRequired:a,description:s,errorMessage:i,isInvalid:l,onFocus:c,onBlur:d,style:m,...f},p)=>{let[g,h]=X.useState(false),b=X.useId(),v=f.id||b,y=l||!!i,x=jsx("input",{id:v,type:t,className:u(Zy({size:n,radius:r}),y&&"border-danger focus:border-danger",!o&&e),ref:p,required:a,"aria-invalid":y,"aria-describedby":s||i?`${v}-description`:void 0,style:{...m,borderColor:y?void 0:g?"var(--color-foreground)":void 0},onFocus:w=>{h(true),c?.(w);},onBlur:w=>{h(false),d?.(w);},...f});return !o&&!s&&!i?x:jsxs("div",{className:u("flex flex-col gap-1.5",e),children:[o&&jsxs("label",{htmlFor:v,className:"text-sm font-medium leading-none",children:[o,a&&jsx("span",{className:"text-danger ml-1",children:"*"})]}),x,(s||i)&&jsx("p",{id:`${v}-description`,className:u("text-xs",y?"text-danger":"text-muted-foreground"),children:i||s})]})});Pa.displayName="Input";var Jy=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Cr=X.forwardRef(({className:e,...t},n)=>jsx("label",{ref:n,className:u(Jy(),e),...t}));Cr.displayName="Label";var jn=X.forwardRef(({className:e,orientation:t="horizontal",decorative:n=true,text:r,...o},a)=>{let s=n?{role:"none"}:{role:"separator","aria-orientation":t};return r&&t==="horizontal"?jsxs("div",{className:u("flex items-center gap-4",e),children:[jsx("div",{...s,className:"shrink-0 bg-border h-[1px] flex-1"}),jsx("span",{className:"text-sm text-muted-foreground",children:r}),jsx("div",{...s,className:"shrink-0 bg-border h-[1px] flex-1"})]}):jsx("div",{ref:a,...s,className:u("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o})});jn.displayName="Separator";var n0="peer inline-flex 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",La={default:"bg-zinc-800 dark:bg-zinc-200",success:"bg-green-600 dark:bg-green-500",warning:"bg-amber-600 dark:bg-amber-500",danger:"bg-red-600 dark:bg-red-500",info:"bg-blue-600 dark:bg-blue-500"},ud={sm:{track:"h-5 w-9",thumb:"h-4 w-4",translate:"translate-x-4"},md:{track:"h-6 w-11",thumb:"h-5 w-5",translate:"translate-x-5"},lg:{track:"h-7 w-14",thumb:"h-6 w-6",translate:"translate-x-7"}},md=X.forwardRef(({className:e,color:t,size:n="md",customColor:r,checked:o,defaultChecked:a=false,onCheckedChange:s,disabled:i,required:l,name:c,value:d="on",onKeyDown:m,style:f,...p},g)=>{let[h,b]=X.useState(a),v=o!==void 0,y=v?o:h,x=()=>{if(i)return;let T=!y;v||b(T),s?.(T);},w=T=>{T.key==="Enter"&&T.preventDefault(),m?.(T);},C=t&&La[t]?La[t]:La.default,R=ud[n]||ud.md;return jsxs(Fragment,{children:[jsx("button",{type:"button",role:"switch","aria-checked":y,"aria-required":l,"data-state":y?"checked":"unchecked",disabled:i,ref:g,className:u(n0,R.track,y?r?"":C:"bg-input",e),style:r&&y?{backgroundColor:r,...f}:f,onClick:x,onKeyDown:w,...p,children:jsx("span",{className:u("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",R.thumb,y?R.translate:"translate-x-0")})}),c&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:c,value:d,checked:y,required:l,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});md.displayName="Switch";var s0=cva("flex min-h-[80px] w-full border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{radius:"md"}}),pd=X.forwardRef(({className:e,radius:t,onFocus:n,onBlur:r,style:o,...a},s)=>{let[i,l]=X.useState(false);return jsx("textarea",{className:u(s0({radius:t,className:e})),ref:s,style:{...o,borderColor:i?"var(--color-foreground)":void 0},onFocus:c=>{l(true),n?.(c);},onBlur:c=>{l(false),r?.(c);},...a})});pd.displayName="Textarea";var gd=cva("rounded-md bg-muted",{variants:{variant:{pulse:"animate-pulse",shimmer:"skeleton-shimmer",static:""}},defaultVariants:{variant:"pulse"}}),Ha=X.forwardRef(({className:e,variant:t,...n},r)=>jsx("div",{ref:r,className:u(gd({variant:t,className:e})),...n}));Ha.displayName="Skeleton";var u0=cva("relative flex shrink-0 overflow-hidden cursor-pointer",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",radius:"full"}}),bd=X.createContext(null),vd=()=>{let e=X.useContext(bd);if(!e)throw new Error("Avatar components must be used within an Avatar");return e},Tr=X.forwardRef(({className:e,size:t,radius:n,...r},o)=>{let[a,s]=X.useState("idle");return jsx(bd.Provider,{value:{imageLoadingStatus:a,onImageLoadingStatusChange:s},children:jsx("span",{ref:o,className:u(u0({size:t,radius:n,className:e})),...r})})});Tr.displayName="Avatar";var Jr=X.forwardRef(({className:e,src:t,alt:n,onLoadingStatusChange:r,...o},a)=>{let{imageLoadingStatus:s,onImageLoadingStatusChange:i}=vd();return X.useEffect(()=>{if(!t){i("error");return}i("loading"),r?.("loading");let l=new Image;l.src=t,l.onload=()=>{i("loaded"),r?.("loaded");},l.onerror=()=>{i("error"),r?.("error");};},[t,i,r]),s!=="loaded"?null:jsx("img",{ref:a,src:t,alt:n,className:u("aspect-square h-full w-full object-cover",e),...o})});Jr.displayName="AvatarImage";var Mr=X.forwardRef(({className:e,delayMs:t=0,children:n,...r},o)=>{let{imageLoadingStatus:a}=vd(),[s,i]=X.useState(t===0);return X.useEffect(()=>{if(t>0){let l=setTimeout(()=>i(true),t);return ()=>clearTimeout(l)}},[t]),a==="loaded"||!s?null:jsx("span",{ref:o,className:u("flex h-full w-full items-center justify-center bg-muted",e),...r,children:n})});Mr.displayName="AvatarFallback";var xd=X.createContext({delayDuration:700,skipDelayDuration:300}),Wn=({children:e,delayDuration:t=700,skipDelayDuration:n=300})=>jsx(xd.Provider,{value:{delayDuration:t,skipDelayDuration:n},children:e});Wn.displayName="TooltipProvider";var yd=X.createContext(null),Rd=()=>{let e=X.useContext(yd);if(!e)throw new Error("Tooltip components must be used within a Tooltip");return e},_n=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,delayDuration:o})=>{let a=X.useContext(xd),[s,i]=X.useState(n),l=t!==void 0,c=l?t:s,d=X.useRef(null),m=X.useId(),f=X.useRef(null),p=o??a.delayDuration,g=X.useCallback(h=>{f.current&&clearTimeout(f.current),h?f.current=setTimeout(()=>{l||i(true),r?.(true);},p):(l||i(false),r?.(false));},[l,r,p]);return X.useEffect(()=>()=>{f.current&&clearTimeout(f.current);},[]),jsx(yd.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentId:m},children:e})};_n.displayName="Tooltip";var Yn=X.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l,contentId:c,open:d}=Rd();return jsx("button",{ref:h=>{l.current=h,typeof s=="function"?s(h):s&&(s.current=h);},type:"button","aria-describedby":d?c:void 0,onMouseEnter:h=>{t?.(h),i(true);},onMouseLeave:h=>{n?.(h),i(false);},onFocus:h=>{r?.(h),i(true);},onBlur:h=>{o?.(h),i(false);},...a,children:e})});Yn.displayName="TooltipTrigger";var Xn=X.forwardRef(({className:e,side:t="top",sideOffset:n=4,align:r="center",alignOffset:o=0,children:a,...s},i)=>{let{open:l,triggerRef:c,contentId:d}=Rd(),[m,f]=X.useState({top:0,left:0}),[p,g]=X.useState(false),h=X.useRef(null);if(X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!l||!c.current||!h.current)return;let v=c.current.getBoundingClientRect(),y=h.current.getBoundingClientRect(),x=0,w=0;switch(t){case "top":x=v.top-y.height-n;break;case "bottom":x=v.bottom+n;break;case "left":w=v.left-y.width-n;break;case "right":w=v.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":w=v.left+o;break;case "center":w=v.left+v.width/2-y.width/2;break;case "end":w=v.right-y.width-o;break}else switch(r){case "start":x=v.top+o;break;case "center":x=v.top+v.height/2-y.height/2;break;case "end":x=v.bottom-y.height-o;break}f({top:x,left:w});},[l,t,n,r,o,c]),!p||!l)return null;let b={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[t];return Ba.createPortal(jsx("div",{ref:v=>{h.current=v,typeof i=="function"?i(v):i&&(i.current=v);},id:d,role:"tooltip","data-side":t,className:u("fixed z-50 overflow-hidden rounded-md px-3 py-1.5 text-xs bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",b,e),style:{top:m.top,left:m.left},...s,children:a}),document.body)});Xn.displayName="TooltipContent";var m0={sm:"20px",md:"40px",lg:"60px"},ke=X.forwardRef(({className:e,orientation:t="vertical",visibility:n="visible",showShadow:r=false,shadowSize:o="md",children:a,style:s,...i},l)=>{let c=X.useRef(null),[d,m]=X.useState(false),[f,p]=X.useState({top:false,bottom:false,left:false,right:false}),g=X.useId().replace(/:/g,"");X.useImperativeHandle(l,()=>c.current);let h=X.useCallback(()=>{let C=c.current;if(!C||!r)return;let{scrollTop:R,scrollLeft:T,scrollHeight:M,scrollWidth:k,clientHeight:P,clientWidth:E}=C;p({top:R>0,bottom:R<M-P-1,left:T>0,right:T<k-E-1});},[r]);X.useEffect(()=>{if(!r)return;let C=c.current;if(C)return h(),C.addEventListener("scroll",h),window.addEventListener("resize",h),()=>{C.removeEventListener("scroll",h),window.removeEventListener("resize",h);}},[r,h]);let b=n==="visible"||n==="hover"&&d,v=b?"rgba(0,0,0,0.3)":"transparent",y=b?"rgba(255,255,255,0.3)":"transparent",x=`
2
2
  #${g} {
3
3
  scrollbar-width: thin;
4
4
  scrollbar-color: ${v} transparent;
5
5
  }
6
6
  .dark #${g},
7
7
  #${g}.dark {
8
- scrollbar-color: ${x} transparent;
8
+ scrollbar-color: ${y} transparent;
9
9
  }
10
10
  #${g}::-webkit-scrollbar {
11
11
  width: 6px;
@@ -24,7 +24,7 @@ import*as X from'react';import {createContext,useState,useEffect,useContext,useC
24
24
  }
25
25
  .dark #${g}::-webkit-scrollbar-thumb,
26
26
  #${g}.dark::-webkit-scrollbar-thumb {
27
- background: ${x};
27
+ background: ${y};
28
28
  }
29
29
  #${g}::-webkit-scrollbar-corner {
30
30
  background: transparent;
@@ -40,7 +40,7 @@ import*as X from'react';import {createContext,useState,useEffect,useContext,useC
40
40
  scrollbar-width: none;
41
41
  }
42
42
  `:""}
43
- `;return jsxs(Fragment,{children:[jsx("style",{dangerouslySetInnerHTML:{__html:y}}),jsx("div",{ref:c,id:g,onMouseEnter:()=>m(true),onMouseLeave:()=>m(false),style:{...s,...(()=>{if(!r)return {};let C=T0[o],R=t==="vertical"||t==="both",N=t==="horizontal"||t==="both",T=[R&&f.top&&`linear-gradient(to bottom, transparent, black ${C})`,R&&f.bottom&&`linear-gradient(to top, transparent, black ${C})`,N&&f.left&&`linear-gradient(to right, transparent, black ${C})`,N&&f.right&&`linear-gradient(to left, transparent, black ${C})`].filter(Boolean);return T.length===0?{}:{maskImage:T.join(", "),WebkitMaskImage:T.join(", "),maskComposite:"intersect",WebkitMaskComposite:"source-in"}})()},className:u(t==="vertical"&&"h-full w-full overflow-y-auto overflow-x-hidden",t==="horizontal"&&"w-full overflow-x-auto overflow-y-hidden",t==="both"&&"h-full w-full overflow-auto",e),...i,children:a})]})});ke.displayName="ScrollArea";var Sd=cva("flex w-full cursor-pointer items-center justify-between border border-zinc-300 dark:border-zinc-700 bg-background px-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"min-h-9 py-1.5 text-xs",md:"min-h-10 py-2",lg:"min-h-11 py-2.5 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",radius:"md"}}),Aa=X.forwardRef(({options:e,multiple:t=false,value:n,defaultValue:r,onValueChange:o,placeholder:a="Select...",searchable:s=false,searchPlaceholder:i="Search...",emptyText:l="No results found.",disabled:c=false,clearable:d=false,maxDisplayItems:m=3,maxDropdownHeight:f=240,size:p,radius:g,className:h,...b},v)=>{let[x,y]=X.useState(false),[w,C]=X.useState(""),[R,N]=X.useState(r||""),[T,P]=X.useState(r||[]),[k,E]=X.useState({top:0,left:0,width:0}),M=X.useRef(null),S=X.useRef(null),H=X.useRef(null),D=X.useRef(null),L=n!==void 0?n:R,I=n!==void 0?n:T,V=n!==void 0,O=B=>{d&&L===B?(V||N(""),o?.("")):(V||N(B),o?.(B)),y(false),C("");},A=B=>{let Z=I.includes(B)?I.filter(ue=>ue!==B):[...I,B];V||P(Z),o?.(Z);},K=(B,Z)=>{Z.stopPropagation();let ue=I.filter(U=>U!==B);V||P(ue),o?.(ue);},$=B=>{B.stopPropagation(),t?(V||P([]),o?.([])):(V||N(""),o?.(""));},G=e.find(B=>B.value===L),Y=e.filter(B=>I.includes(B.value)),F=Y.slice(0,m),z=Y.length-m,j=s?e.filter(B=>B.label.toLowerCase().includes(w.toLowerCase())):e;X.useEffect(()=>{if(x&&S.current){let B=S.current.getBoundingClientRect();E({top:B.bottom+4,left:B.left,width:B.width}),s&&setTimeout(()=>D.current?.focus(),0);}x||C("");},[x,s]),X.useEffect(()=>{let B=Z=>{let ue=Z.target,U=M.current&&!M.current.contains(ue),Ce=H.current&&!H.current.contains(ue);U&&Ce&&(y(false),C(""));};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[]),X.useEffect(()=>{if(!x)return;let B=Z=>{H.current?.contains(Z.target)||(y(false),C(""));};return window.addEventListener("scroll",B,true),()=>window.removeEventListener("scroll",B,true)},[x]);let W=t?I.length>0:!!L;return jsxs("div",{ref:M,className:u("relative",h),...b,children:[jsxs("div",{ref:B=>{S.current=B,typeof v=="function"?v(B):v&&(v.current=B);},role:"combobox","aria-expanded":x,"aria-haspopup":"listbox","aria-disabled":c,onClick:()=>!c&&y(!x),className:u(Sd({size:p,radius:g}),t&&"flex-wrap gap-1",c&&"cursor-not-allowed opacity-50"),children:[!t&&jsx("span",{className:u(!G&&"text-muted-foreground"),children:G?G.label:a}),t&&jsx(Fragment,{children:Y.length===0?jsx("span",{className:"text-muted-foreground",children:a}):jsxs(Fragment,{children:[F.map(B=>jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground",children:[B.label,jsx("span",{role:"button",tabIndex:0,onClick:Z=>K(B.value,Z),onKeyDown:Z=>{(Z.key==="Enter"||Z.key===" ")&&K(B.value,Z);},className:"rounded-full hover:bg-secondary-foreground/20 cursor-pointer",children:jsx(X$1,{className:"h-3 w-3"})})]},B.value)),z>0&&jsxs("span",{className:"text-xs text-muted-foreground",children:["+",z," more"]})]})}),jsxs("div",{className:"ml-auto flex items-center gap-1",children:[d&&W&&jsx("span",{role:"button",tabIndex:0,onClick:$,onKeyDown:B=>{(B.key==="Enter"||B.key===" ")&&$(B);},className:"rounded-full p-0.5 hover:bg-muted cursor-pointer",children:jsx(X$1,{className:"h-4 w-4 opacity-50"})}),jsx(ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",x&&"rotate-180")})]})]}),x&&!c&&typeof document<"u"&&Ba.createPortal(jsxs("div",{ref:H,className:"fixed z-[9999] overflow-hidden rounded-md border border-zinc-300 dark:border-zinc-700 bg-background shadow-md",style:{top:k.top,left:k.left,minWidth:k.width},children:[s&&jsxs("div",{className:"flex items-center border-b border-zinc-300 dark:border-zinc-700 px-3",children:[jsx(Search,{className:"h-4 w-4 opacity-50 mr-2"}),jsx("input",{ref:D,type:"text",value:w,onChange:B=>C(B.target.value),placeholder:i,className:"flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground"})]}),jsx(ke,{style:{maxHeight:f},onWheel:B=>B.stopPropagation(),children:jsx("div",{className:"p-1",children:j.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l}):j.map(B=>{let Z=t?I.includes(B.value):L===B.value;return jsxs("div",{role:"option","aria-selected":Z,onClick:()=>{B.disabled||(t?A(B.value):O(B.value));},className:u("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800",B.disabled&&"pointer-events-none opacity-50"),children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:Z&&jsx(Check,{className:"h-4 w-4"})}),B.label]},B.value)})})})]}),document.body)]})});Aa.displayName="Select";var Dd=X.createContext(null),Bo=()=>{let e=X.useContext(Dd);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e},wi=X.createContext({radius:"md"}),Ci=X.createContext(null),Cn=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),[s,i]=X.useState(-1),l=t!==void 0,c=l?t:o,d=X.useRef(null),m=X.useRef(null),f=X.useId(),p=X.useRef(new Map),g=X.useCallback(v=>{l||a(v),r?.(v),v||i(-1);},[l,r]),h=X.useCallback((v,x)=>{p.current.set(v,x);},[]),b=X.useCallback(v=>{p.current.delete(v);},[]);return jsx(Dd.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentRef:m,contentId:f,activeIndex:s,setActiveIndex:i,items:p,registerItem:h,unregisterItem:b},children:e})};Cn.displayName="Dropdown";var Tn=X.forwardRef(({children:e,onClick:t,onKeyDown:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=Bo();return jsx("div",{ref:m=>{i.current=m,typeof o=="function"?o(m):o&&(o.current=m);},role:"button",tabIndex:0,"aria-expanded":a,"aria-haspopup":"menu","aria-controls":a?l:void 0,onClick:m=>{t?.(m),s(!a);},onKeyDown:m=>{n?.(m),(m.key==="ArrowDown"||m.key==="ArrowUp")&&(m.preventDefault(),s(true)),(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),s(!a));},className:"inline-flex",...r,children:e})});Tn.displayName="DropdownTrigger";var D0={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-2xl"},Mn=X.forwardRef(({className:e,side:t="bottom",sideOffset:n=4,align:r="start",alignOffset:o=0,collisionPadding:a=8,onInteractOutside:s,onEscapeKeyDown:i,loop:l=true,radius:c="md",children:d,...m},f)=>{let{open:p,onOpenChange:g,triggerRef:h,contentRef:b,contentId:v,activeIndex:x,setActiveIndex:y,items:w}=Bo(),[C,R]=X.useState({top:0,left:0}),[N,T]=X.useState(t),[P,k]=X.useState(false),E=X.useRef(0);if(X.useEffect(()=>{k(true);},[]),X.useEffect(()=>{p&&(E.current=w.current.size);},[p,w]),X.useEffect(()=>{if(!p||!h.current||!b.current)return;let S=()=>{if(!h.current||!b.current)return;let H=h.current.getBoundingClientRect(),D=b.current.getBoundingClientRect(),L=window.innerWidth,I=window.innerHeight,V=0,O=0,A=t;switch(t){case "top":V=H.top-D.height-n,V<a&&(V=H.bottom+n,A="bottom");break;case "bottom":V=H.bottom+n,V+D.height>I-a&&(V=H.top-D.height-n,A="top");break;case "left":O=H.left-D.width-n,O<a&&(O=H.right+n,A="right");break;case "right":O=H.right+n,O+D.width>L-a&&(O=H.left-D.width-n,A="left");break}if(A==="top"||A==="bottom"){switch(r){case "start":O=H.left+o;break;case "center":O=H.left+H.width/2-D.width/2;break;case "end":O=H.right-D.width-o;break}O<a?O=a:O+D.width>L-a&&(O=L-D.width-a);}else {switch(r){case "start":V=H.top+o;break;case "center":V=H.top+H.height/2-D.height/2;break;case "end":V=H.bottom-D.height-o;break}V<a?V=a:V+D.height>I-a&&(V=I-D.height-a);}R({top:V,left:O}),T(A);};return S(),window.addEventListener("resize",S),window.addEventListener("scroll",S,true),()=>{window.removeEventListener("resize",S),window.removeEventListener("scroll",S,true);}},[p,t,n,r,o,a,h]),X.useEffect(()=>{if(!p)return;let S=H=>{let D=H.target;b.current&&!b.current.contains(D)&&h.current&&!h.current.contains(D)&&(s?.(),g(false));};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[p,g,s,h,b]),X.useEffect(()=>{if(!p)return;let S=H=>{let D=Array.from(w.current.entries()).sort(([I],[V])=>I-V).map(([,I])=>I),L=D.length;if(L!==0)switch(H.key){case "Escape":H.preventDefault(),i?.(),g(false),h.current?.focus();break;case "ArrowDown":H.preventDefault(),x===-1||x>=L-1?y(l?0:Math.min(x+1,L-1)):y(x+1);break;case "ArrowUp":H.preventDefault(),x<=0?y(l?L-1:0):y(x-1);break;case "Home":H.preventDefault(),y(0);break;case "End":H.preventDefault(),y(L-1);break;case "Enter":case " ":H.preventDefault(),x>=0&&x<L&&D[x]?.click();break;case "Tab":g(false);break}};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[p,g,i,x,y,w,l,h]),X.useEffect(()=>{p&&x>=0&&Array.from(w.current.entries()).sort(([H],[D])=>H-D).map(([,H])=>H)[x]?.focus();},[p,x,w]),!P||!p)return null;let M={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[N];return Ba.createPortal(jsx("div",{ref:S=>{b.current=S,typeof f=="function"?f(S):f&&(f.current=S);},id:v,role:"menu","aria-orientation":"vertical","data-state":p?"open":"closed","data-side":N,"data-dropdown-content":"",className:u("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md outline-none",D0[c],M,e),style:{top:C.top,left:C.left},...m,children:jsx(wi.Provider,{value:{radius:c},children:d})}),document.body)});Mn.displayName="DropdownContent";var Hd=0,Id={none:"rounded-none",sm:"rounded-sm",md:"rounded-sm",lg:"rounded-md",full:"rounded-lg"},$t=X.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,onMouseEnter:a,startContent:s,endContent:i,children:l,...c},d)=>{let{onOpenChange:m,activeIndex:f,setActiveIndex:p,registerItem:g,unregisterItem:h}=Bo(),{radius:b}=X.useContext(wi),[v]=X.useState(()=>Hd++),x=X.useRef(null);X.useEffect(()=>(!n&&x.current&&g(v,x.current),()=>{h(v);}),[n,v,g,h]);let y=R=>{if(n){R.preventDefault();return}o?.(R),r?.(),m(false);},w=R=>{a?.(R),n||p(v);};return jsxs("div",{ref:R=>{x.current=R,typeof d=="function"?d(R):d&&(d.current=R);},role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,"data-highlighted":f===v?"":void 0,className:u("relative flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",Id[b],t&&"pl-8",!n&&"cursor-pointer",e),onClick:y,onMouseEnter:w,...c,children:[s,l&&jsx("span",{className:"flex-1",children:l}),i]})});$t.displayName="DropdownItem";var Ti=X.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:u("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));Ti.displayName="DropdownSection";var Vd=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));Vd.displayName="DropdownSeparator";var Ad=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest opacity-60",e),...t});Ad.displayName="DropdownShortcut";var zd=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));zd.displayName="DropdownGroup";var Od=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),{contentRef:s}=Bo(),i=t!==void 0,l=i?t:o,c=X.useRef(null),d=X.useCallback(m=>{i||a(m),r?.(m);},[i,r]);return jsx(Ci.Provider,{value:{open:l,onOpenChange:d,triggerRef:c,parentMenuRef:s},children:e})};Od.displayName="DropdownSub";var Bd=X.forwardRef(({className:e,inset:t,disabled:n,children:r,onMouseEnter:o,onMouseLeave:a,onKeyDown:s,...i},l)=>{let c=X.useContext(Ci),{setActiveIndex:d,registerItem:m,unregisterItem:f}=Bo(),{radius:p}=X.useContext(wi),[g]=X.useState(()=>Hd++),h=X.useRef(null);if(!c)throw new Error("DropdownSubTrigger must be used within DropdownSub");let{open:b,onOpenChange:v,triggerRef:x}=c;X.useEffect(()=>(!n&&h.current&&m(g,h.current),()=>{f(g);}),[n,g,m,f]);let y=R=>{o?.(R),n||(d(g),v(true));},w=R=>{a?.(R);},C=R=>{s?.(R),(R.key==="ArrowRight"||R.key==="Enter"||R.key===" ")&&(R.preventDefault(),v(true));};return jsxs("div",{ref:R=>{h.current=R,x.current=R,typeof l=="function"?l(R):l&&(l.current=R);},role:"menuitem","aria-haspopup":"menu","aria-expanded":b,tabIndex:n?-1:0,"aria-disabled":n,"data-state":b?"open":"closed","data-disabled":n?"":void 0,className:u("flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[state=open]:bg-accent","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",Id[p],t&&"pl-8",!n&&"cursor-pointer",e),onMouseEnter:y,onMouseLeave:w,onKeyDown:C,...i,children:[r,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});Bd.displayName="DropdownSubTrigger";var Fd=X.forwardRef(({className:e,sideOffset:t=2,alignOffset:n=-4,collisionPadding:r=8,onMouseEnter:o,onMouseLeave:a,...s},i)=>{let l=X.useContext(Ci);if(!l)throw new Error("DropdownSubContent must be used within DropdownSub");let{open:c,onOpenChange:d,triggerRef:m,parentMenuRef:f}=l,[p,g]=X.useState({top:0,left:0}),[h,b]=X.useState(false),v=X.useRef(null),x=X.useRef(null);X.useEffect(()=>{b(true);},[]),X.useEffect(()=>{if(!c||!m.current||!v.current)return;(()=>{if(!m.current||!v.current)return;let R=m.current.getBoundingClientRect(),N=v.current.getBoundingClientRect(),T=window.innerWidth,P=window.innerHeight,k=R.top+n,E=R.right+t;E+N.width>T-r&&(E=R.left-N.width-t),k+N.height>P-r&&(k=P-N.height-r),k<r&&(k=r),g({top:k,left:E});})();},[c,t,n,r,m]);let y=C=>{o?.(C),x.current&&(clearTimeout(x.current),x.current=null),d(true);},w=C=>{a?.(C);let R=C.relatedTarget;m.current?.contains(R)||f?.current?.contains(R)||(x.current=setTimeout(()=>{d(false);},100));};return X.useEffect(()=>()=>{x.current&&clearTimeout(x.current);},[]),!h||!c?null:Ba.createPortal(jsx("div",{ref:C=>{v.current=C,typeof i=="function"?i(C):i&&(i.current=C);},role:"menu","data-state":c?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:p.top,left:p.left},onMouseEnter:y,onMouseLeave:w,...s}),document.body)});Fd.displayName="DropdownSubContent";var H0=Ti;var Gd=X.createContext(null),Mi=()=>{let e=X.useContext(Gd);if(!e)throw new Error("Popover components must be used within a Popover");return e},ot=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),s=t!==void 0,i=s?t:o,l=X.useRef(null),c=X.useId(),d=X.useCallback(m=>{s||a(m),r?.(m);},[s,r]);return jsx(Gd.Provider,{value:{open:i,onOpenChange:d,triggerRef:l,contentId:c},children:e})};ot.displayName="Popover";var qn=X.forwardRef(({children:e,onClick:t,asChild:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=Mi(),c=f=>{t?.(f),s(!a);},d=f=>{i.current=f,typeof o=="function"?o(f):o&&(o.current=f);},m={"aria-expanded":a,"aria-haspopup":"dialog","aria-controls":a?l:void 0,onClick:c,...r};return n&&X.isValidElement(e)?X.cloneElement(e,{...m,ref:d,onClick:f=>{e.props.onClick?.(f),c(f);}}):jsx("button",{ref:d,type:"button",...m,children:e})});qn.displayName="PopoverTrigger";var an=X.forwardRef(({children:e,...t},n)=>{let{triggerRef:r}=Mi();return jsx("div",{ref:o=>{r.current=o,typeof n=="function"?n(o):n&&(n.current=o);},...t,children:e})});an.displayName="PopoverAnchor";var at=X.forwardRef(({className:e,style:t,side:n="bottom",sideOffset:r=4,align:o="center",alignOffset:a=0,onInteractOutside:s,onEscapeKeyDown:i,onOpenAutoFocus:l,onCloseAutoFocus:c,children:d,...m},f)=>{let{open:p,onOpenChange:g,triggerRef:h,contentId:b}=Mi(),[v,x]=X.useState({top:0,left:0}),[y,w]=X.useState(false),[C,R]=X.useState(null);if(X.useEffect(()=>{w(true);},[]),X.useEffect(()=>{if(!p||!h.current||!C)return;let T=()=>{if(!h.current||!C)return;let P=h.current.getBoundingClientRect(),k=C.getBoundingClientRect(),E=0,M=0;switch(n){case "top":E=P.top-k.height-r;break;case "bottom":E=P.bottom+r;break;case "left":M=P.left-k.width-r;break;case "right":M=P.right+r;break}if(n==="top"||n==="bottom")switch(o){case "start":M=P.left+a;break;case "center":M=P.left+P.width/2-k.width/2;break;case "end":M=P.right-k.width-a;break}else switch(o){case "start":E=P.top+a;break;case "center":E=P.top+P.height/2-k.height/2;break;case "end":E=P.bottom-k.height-a;break}x({top:E,left:M});};return T(),window.addEventListener("resize",T),window.addEventListener("scroll",T,true),()=>{window.removeEventListener("resize",T),window.removeEventListener("scroll",T,true);}},[p,n,r,o,a,h,C]),X.useEffect(()=>{if(!p)return;let T=P=>{let k=P.target;C&&C.contains(k)||h.current&&h.current.contains(k)||k.closest?.("[data-dropdown-content], [data-popover-content]")||(s?.(),g(false));};return document.addEventListener("mouseup",T),()=>document.removeEventListener("mouseup",T)},[p,g,s,h,C]),X.useEffect(()=>{if(!p)return;let T=P=>{P.key==="Escape"&&(i?.(),g(false));};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[p,g,i]),!y||!p)return null;let N={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[n];return Ba.createPortal(jsx("div",{ref:T=>{R(P=>P!==T?T:P),typeof f=="function"?f(T):f&&(f.current=T);},id:b,role:"dialog","data-state":p?"open":"closed","data-side":n,className:u("fixed z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",N,e),style:{...t,top:v.top,left:v.left},...m,children:d}),document.body)});at.displayName="PopoverContent";var Ud=X.createContext(null),ki=()=>{let e=X.useContext(Ud);if(!e)throw new Error("Tabs components must be used within a Tabs");return e},jd=X.forwardRef(({className:e,value:t,defaultValue:n="",onValueChange:r,variant:o="solid",radius:a="md",orientation:s="horizontal",children:i,...l},c)=>{let[d,m]=X.useState(n),f=t!==void 0,p=f?t:d,g=h=>{f||m(h),r?.(h);};return jsx(Ud.Provider,{value:{value:p,onValueChange:g,variant:o,radius:a,orientation:s},children:jsx("div",{ref:c,"data-orientation":s,className:u(s==="vertical"&&"flex gap-4",e),...l,children:i})})});jd.displayName="Tabs";var Ni={none:{list:"rounded-none",trigger:"rounded-none",indicator:"rounded-none"},sm:{list:"rounded-md",trigger:"rounded-sm",indicator:"rounded-sm"},md:{list:"rounded-lg",trigger:"rounded-md",indicator:"rounded-md"},lg:{list:"rounded-xl",trigger:"rounded-lg",indicator:"rounded-lg"},full:{list:"rounded-full",trigger:"rounded-full",indicator:"rounded-full"}},Wd=X.forwardRef(({className:e,children:t,...n},r)=>{let{variant:o,radius:a,orientation:s,value:i}=ki(),l=X.useRef(null),[c,d]=X.useState({opacity:0});X.useEffect(()=>{let g=l.current;if(!g)return;let h=()=>{let v=g.querySelector('[data-state="active"]');if(v){let x=g.getBoundingClientRect(),y=v.getBoundingClientRect(),w=s==="vertical";o==="underline"?d(w?{width:2,height:y.height,transform:`translateY(${y.top-x.top}px)`,opacity:1}:{width:y.width,height:2,transform:`translateX(${y.left-x.left}px)`,opacity:1}):o==="solid"&&d(w?{width:y.width,height:y.height,transform:`translateY(${y.top-x.top}px)`,opacity:1}:{width:y.width,height:y.height,transform:`translateX(${y.left-x.left}px)`,opacity:1});}};h();let b=new ResizeObserver(h);return b.observe(g),()=>{b.disconnect();}},[o,s,i]);let m={solid:"bg-muted p-1",underline:"border-b border-border bg-transparent p-0 !rounded-none",bordered:"bg-transparent p-0 gap-1 !rounded-none"},f=s==="vertical",p=()=>o==="solid"?f?"top-0 left-1 bg-background shadow":"top-1 left-1 bg-background shadow":o==="underline"?f?"top-0 left-0 bg-primary !rounded-full":"bottom-0 left-0 bg-primary !rounded-full":"";return jsxs("div",{ref:g=>{l.current=g,typeof r=="function"?r(g):r&&(r.current=g);},role:"tablist","aria-orientation":s,className:u("relative inline-flex h-9 items-center justify-center text-muted-foreground",f&&"flex-col h-auto w-auto",Ni[a].list,m[o],e),...n,children:[(o==="solid"||o==="underline")&&jsx("span",{className:u("absolute transition-all duration-200 ease-out",Ni[a].indicator,p()),style:c,"aria-hidden":"true"}),t]})});Wd.displayName="TabsList";var _d=X.forwardRef(({className:e,value:t,disabled:n,onClick:r,...o},a)=>{let{value:s,onValueChange:i,variant:l,radius:c}=ki(),d=s===t,m={solid:"data-[state=active]:text-foreground",underline:"!rounded-none border-b-2 border-transparent pb-2 data-[state=active]:text-foreground",bordered:"border border-transparent data-[state=active]:border-current data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm"};return jsx("button",{type:"button",role:"tab",ref:a,"aria-selected":d,"data-state":d?"active":"inactive",disabled:n,className:u("relative z-10 inline-flex items-center justify-center whitespace-nowrap px-3 py-1 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",Ni[c].trigger,m[l],e),onClick:f=>{r?.(f),i(t);},...o})});_d.displayName="TabsTrigger";var Yd=X.forwardRef(({className:e,value:t,children:n,...r},o)=>{let{value:a}=ki(),s=a===t;return s?jsx("div",{ref:o,role:"tabpanel","data-state":s?"active":"inactive",className:u("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...r,children:n}):null});Yd.displayName="TabsContent";var Xd=[{label:"At least 8 characters",test:e=>e.length>=8},{label:"Contains uppercase",test:e=>/[A-Z]/.test(e)},{label:"Contains lowercase",test:e=>/[a-z]/.test(e)},{label:"Contains number",test:e=>/[0-9]/.test(e)},{label:"Contains special character",test:e=>/[!@#$%^&*(),.?":{}|<>]/.test(e)}];function V0(e,t=Xd){return e?t.filter(r=>r.test(e)).length/t.length:0}function A0(e){return e<.4?"bg-red-500":e<.7?"bg-yellow-500":"bg-green-500"}function z0(e){return e<.4?"Weak":e<.7?"Medium":"Strong"}var Ko=0,Pi=null;function Gt(){Ko===0&&(Pi=document.body.style.overflow,document.body.style.overflow="hidden"),Ko++;}function Ut(){Ko--,Ko<=0&&(Ko=0,document.body.style.overflow=Pi??"",Pi=null);}var Zd=X.createContext(null),Oa=()=>{let e=X.useContext(Zd);if(!e)throw new Error("Sheet components must be used within a Sheet");return e},Qd=({open:e,defaultOpen:t=false,onOpenChange:n,children:r})=>{let[o,a]=X.useState(t),s=e!==void 0,i=s?e:o,l=X.useCallback(c=>{s||a(c),n?.(c);},[s,n]);return jsx(Zd.Provider,{value:{open:i,onOpenChange:l},children:r})};Qd.displayName="Sheet";var Jd=X.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=Oa();return jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(true);},...n,children:t})});Jd.displayName="SheetTrigger";var eu=X.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=Oa();return jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(false);},...n,children:t})});eu.displayName="SheetClose";var Li=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};Li.displayName="SheetPortal";var tu=X.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Oa();return r?jsx("div",{ref:n,className:u("fixed inset-0 z-50 bg-black/80",r?"animate-in fade-in-0":"animate-out fade-out-0",e),onClick:()=>o(false),"aria-hidden":"true",...t}):null});tu.displayName="SheetOverlay";var nu=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition-transform duration-300 ease-in-out",{variants:{side:{top:"inset-x-0 top-0 border-b",bottom:"inset-x-0 bottom-0 border-t",left:"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),F0=(e,t)=>({top:t?"animate-in slide-in-from-top":"animate-out slide-out-to-top",bottom:t?"animate-in slide-in-from-bottom":"animate-out slide-out-to-bottom",left:t?"animate-in slide-in-from-left":"animate-out slide-out-to-left",right:t?"animate-in slide-in-from-right":"animate-out slide-out-to-right"})[e],ru=X.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:r,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c}=Oa(),[d,m]=X.useState(false),[,f]=X.useState(false);return X.useEffect(()=>{if(l)m(true),f(true),Gt();else {f(true);let p=setTimeout(()=>{m(false),f(false);},300);return ()=>clearTimeout(p)}return ()=>{Ut();}},[l]),X.useEffect(()=>{let p=g=>{g.key==="Escape"&&l&&(o?.(),c(false));};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[l,c,o]),!d&&!l?null:jsxs(Li,{children:[jsx("div",{className:u("fixed inset-0 z-50 bg-black/80 transition-opacity duration-300",l?"opacity-100":"opacity-0"),onClick:()=>{a?.(),c(false);},"aria-hidden":"true"}),jsxs("div",{ref:i,role:"dialog","aria-modal":"true",className:u(nu({side:e}),F0(e,l),t),...s,children:[!r&&jsxs("button",{type:"button",onClick:()=>c(false),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 cursor-pointer",children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]}),n]})]})});ru.displayName="SheetContent";var ou=({className:e,...t})=>jsx("div",{className:u("flex flex-col space-y-2 text-center sm:text-left",e),...t});ou.displayName="SheetHeader";var au=({className:e,...t})=>jsx("div",{className:u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});au.displayName="SheetFooter";var su=X.forwardRef(({className:e,...t},n)=>jsx("h2",{ref:n,className:u("text-lg font-semibold text-foreground",e),...t}));su.displayName="SheetTitle";var iu=X.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));iu.displayName="SheetDescription";var G0=({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 lu=X.createContext(null),Fa=()=>{let e=X.useContext(lu);if(!e)throw new Error("ContextMenu components must be used within a ContextMenu");return e},Si=X.createContext(null),cu=({children:e,onOpenChange:t})=>{let[n,r]=X.useState(false),[o,a]=X.useState({x:0,y:0}),s=X.useId(),i=X.useCallback(l=>{r(l),t?.(l);},[t]);return jsx(lu.Provider,{value:{open:n,onOpenChange:i,position:o,setPosition:a,contentId:s},children:e})};cu.displayName="ContextMenu";var du=X.forwardRef(({children:e,onContextMenu:t,...n},r)=>{let{onOpenChange:o,setPosition:a}=Fa(),s=i=>{i.preventDefault(),a({x:i.clientX,y:i.clientY}),o(true);};return jsx("div",{ref:r,onContextMenu:i=>{t?.(i),s(i);},...n,children:e})});du.displayName="ContextMenuTrigger";var uu=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));uu.displayName="ContextMenuGroup";var mu=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};mu.displayName="ContextMenuPortal";var pu=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),s=t!==void 0,i=s?t:o,l=X.useRef(null),c=X.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(Si.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};pu.displayName="ContextMenuSub";var fu=X.forwardRef(({className:e,onInteractOutside:t,onEscapeKeyDown:n,children:r,...o},a)=>{let{open:s,onOpenChange:i,position:l,contentId:c}=Fa(),[d,m]=X.useState(false),[f,p]=X.useState(l),g=X.useRef(null);return X.useEffect(()=>{m(true);},[]),X.useEffect(()=>{if(!s||!g.current){p(l);return}let b=g.current.getBoundingClientRect(),{x:v,y:x}=l;v+b.width>window.innerWidth&&(v=window.innerWidth-b.width-8),x+b.height>window.innerHeight&&(x=window.innerHeight-b.height-8),p({x:v,y:x});},[s,l]),X.useEffect(()=>{if(!s)return;let h=b=>{let v=b.target;g.current&&!g.current.contains(v)&&(t?.(),i(false));};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[s,i,t]),X.useEffect(()=>{if(!s)return;let h=b=>{b.key==="Escape"&&(n?.(),i(false));};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[s,i,n]),!d||!s?null:Ba.createPortal(jsx("div",{ref:h=>{g.current=h,typeof a=="function"?a(h):a&&(a.current=h);},id:c,role:"menu","aria-orientation":"vertical","data-state":s?"open":"closed",className:u("fixed z-50 max-h-[calc(100vh-2rem)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-md","animate-in fade-in-0 zoom-in-95",e),style:{top:f.y,left:f.x},...o,children:r}),document.body)});fu.displayName="ContextMenuContent";var gu=X.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let i=X.useContext(Si);if(!i)throw new Error("ContextMenuSubTrigger must be used within ContextMenuSub");let{open:l,onOpenChange:c,triggerRef:d}=i,m=p=>{r?.(p),c(true);},f=p=>{o?.(p),c(false);};return jsxs("div",{ref:p=>{d.current=p,typeof s=="function"?s(p):s&&(s.current=p);},role:"menuitem","aria-haspopup":"menu","aria-expanded":l,"data-state":l?"open":"closed",className:u("flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[state=open]:bg-zinc-100 dark:data-[state=open]:bg-zinc-800",t&&"pl-8",e),onMouseEnter:m,onMouseLeave:f,...a,children:[n,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});gu.displayName="ContextMenuSubTrigger";var bu=X.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let s=X.useContext(Si);if(!s)throw new Error("ContextMenuSubContent must be used within ContextMenuSub");let{open:i,onOpenChange:l,triggerRef:c}=s,[d,m]=X.useState({top:0,left:0}),[f,p]=X.useState(false),g=X.useRef(null);X.useEffect(()=>{p(true);},[]),X.useEffect(()=>{if(!i||!c.current||!g.current)return;(()=>{if(!c.current||!g.current)return;let x=c.current.getBoundingClientRect(),y=g.current.getBoundingClientRect(),w=x.top,C=x.right+t;C+y.width>window.innerWidth&&(C=x.left-y.width-t),m({top:w,left:C});})();},[i,t,c]);let h=v=>{n?.(v),l(true);},b=v=>{r?.(v),l(false);};return !f||!i?null:Ba.createPortal(jsx("div",{ref:v=>{g.current=v,typeof a=="function"?a(v):a&&(a.current=v);},role:"menu","data-state":i?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:d.top,left:d.left},onMouseEnter:h,onMouseLeave:b,...o}),document.body)});bu.displayName="ContextMenuSubContent";var vu=X.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{onOpenChange:i}=Fa(),l=c=>{if(n){c.preventDefault();return}o?.(c),r?.(),i(false);};return jsx("div",{ref:s,role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,className:u("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",t&&"pl-8",e),onClick:l,...a})});vu.displayName="ContextMenuItem";var hu=X.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{onOpenChange:l}=Fa(),c=d=>{if(o){d.preventDefault();return}a?.(d),r?.(!n),l(false);};return jsxs("div",{ref:i,role:"menuitemcheckbox","aria-checked":n,tabIndex:o?-1:0,"aria-disabled":o,"data-disabled":o?"":void 0,"data-state":n?"checked":"unchecked",className:u("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),onClick:c,...s,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n&&jsx(Check,{className:"h-4 w-4"})}),t]})});hu.displayName="ContextMenuCheckboxItem";var xu=X.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:u("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));xu.displayName="ContextMenuSection";var yu=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-border",e),...t}));yu.displayName="ContextMenuSeparator";var Ru=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Ru.displayName="ContextMenuShortcut";var Cu=X.createContext(null),Y0=()=>{let e=X.useContext(Cu);if(!e)throw new Error("RadioGroupItem must be used within a RadioGroup");return e},Tu=X.forwardRef(({className:e,value:t,defaultValue:n="",onValueChange:r,name:o,disabled:a,required:s,orientation:i="vertical",children:l,...c},d)=>{let[m,f]=X.useState(n),p=t!==void 0,g=p?t:m,h=X.useId(),b=v=>{p||f(v),r?.(v);};return jsx("div",{ref:d,role:"radiogroup","aria-required":s,"aria-orientation":i,className:u(i==="vertical"?"grid gap-2":"flex gap-4",e),...c,children:jsx(Cu.Provider,{value:{name:o||h,value:g,onValueChange:b,disabled:a,required:s},children:l})})});Tu.displayName="RadioGroup";var Mu=X.forwardRef(({className:e,value:t,disabled:n,...r},o)=>{let a=Y0(),s=a.value===t,i=n||a.disabled;return jsxs(Fragment,{children:[jsx("button",{type:"button",role:"radio","aria-checked":s,disabled:i,ref:o,className:u("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 cursor-pointer",e),onClick:()=>a.onValueChange(t),...r,children:s&&jsx("span",{className:"flex items-center justify-center",children:jsx(Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}),jsx("input",{type:"radio","aria-hidden":true,tabIndex:-1,name:a.name,value:t,checked:s,required:a.required,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});Mu.displayName="RadioGroupItem";var $a=cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors 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 gap-2",{variants:{variant:{solid:"bg-transparent hover:bg-muted data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",bordered:"border border-current 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"}}),Nu=X.forwardRef(({className:e,variant:t,size:n,pressed:r,defaultPressed:o=false,onPressedChange:a,disabled:s,onKeyDown:i,...l},c)=>{let[d,m]=X.useState(o),f=r!==void 0,p=f?r:d,g=()=>{if(s)return;let b=!p;f||m(b),a?.(b);},h=b=>{b.key==="Enter"&&b.preventDefault(),i?.(b);};return jsx("button",{type:"button","aria-pressed":p,"data-state":p?"on":"off",disabled:s,ref:c,className:u($a({variant:t,size:n,className:e})),onClick:g,onKeyDown:h,...l})});Nu.displayName="Toggle";var ku=X.createContext(null),J0=()=>{let e=X.useContext(ku);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e},Pu=X.forwardRef(({className:e,variant:t,size:n,type:r,value:o,defaultValue:a,onValueChange:s,disabled:i,children:l,...c},d)=>{let[m,f]=X.useState(()=>r==="single"?a?[a]:[]:a||[]),p=o!==void 0,g=p?r==="single"?o?[o]:[]:o:m,h=b=>{if(r==="single"){let v=g.includes(b)?[]:[b];p||f(v),s?.(v[0]||"");}else {let v=g.includes(b)?g.filter(x=>x!==b):[...g,b];p||f(v),s?.(v);}};return jsx("div",{ref:d,role:"group",className:u("flex items-center justify-center gap-1",e),...c,children:jsx(ku.Provider,{value:{type:r,variant:t,size:n,value:g,onValueChange:h,disabled:i},children:l})})});Pu.displayName="ToggleGroup";var Eu=X.forwardRef(({className:e,children:t,variant:n,size:r,value:o,disabled:a,...s},i)=>{let l=J0(),c=l.value.includes(o),d=a||l.disabled;return jsx("button",{type:"button",role:"radio","aria-checked":c,"aria-pressed":c,"data-state":c?"on":"off",disabled:d,ref:i,className:u($a({variant:l.variant||n,size:l.size||r}),e),onClick:()=>l.onValueChange(o),...s,children:t})});Eu.displayName="ToggleGroupItem";var Ua=X.forwardRef(({className:e,value:t,defaultValue:n=[0],onValueChange:r,onValueCommit:o,min:a=0,max:s=100,step:i=1,disabled:l=false,orientation:c="horizontal",name:d,...m},f)=>{let[p,g]=X.useState(n),h=t!==void 0,b=h?t:p,v=X.useRef(null),[x,y]=X.useState(false),[w,C]=X.useState(null),R=(H,D)=>{if(!v.current)return b[0];let L=v.current.getBoundingClientRect(),I;c==="horizontal"?I=(H-L.left)/L.width:I=1-(D-L.top)/L.height,I=Math.max(0,Math.min(1,I));let V=a+I*(s-a),O=Math.round(V/i)*i;return Math.max(a,Math.min(s,O))},N=(H,D)=>{let L=[...b];L[D]=H,D>0&&H<b[D-1]&&(L[D]=b[D-1]),D<b.length-1&&H>b[D+1]&&(L[D]=b[D+1]),h||g(L),r?.(L);},T=(H,D)=>{l||(H.preventDefault(),y(true),C(D),H.target.setPointerCapture(H.pointerId));},P=H=>{if(!x||w===null||l)return;let D=R(H.clientX,H.clientY);N(D,w);},k=()=>{x&&(y(false),C(null),o?.(b));},E=H=>{if(l)return;let D=R(H.clientX,H.clientY),L=0,I=Math.abs(b[0]-D);for(let V=1;V<b.length;V++){let O=Math.abs(b[V]-D);O<I&&(I=O,L=V);}N(D,L),o?.([...b.slice(0,L),D,...b.slice(L+1)]);},M=(H,D)=>{if(l)return;let L=b[D];switch(H.key){case "ArrowRight":case "ArrowUp":H.preventDefault(),L=Math.min(s,b[D]+i);break;case "ArrowLeft":case "ArrowDown":H.preventDefault(),L=Math.max(a,b[D]-i);break;case "Home":H.preventDefault(),L=a;break;case "End":H.preventDefault(),L=s;break;default:return}N(L,D),o?.([...b.slice(0,D),L,...b.slice(D+1)]);},S=H=>(H-a)/(s-a)*100;return jsxs("div",{ref:f,className:u("relative flex touch-none select-none items-center",c==="vertical"&&"flex-col h-full w-5",l&&"opacity-50 pointer-events-none",e),...m,children:[jsx("div",{ref:v,className:u("relative grow overflow-hidden rounded-full bg-secondary",c==="horizontal"?"h-2 w-full":"h-full w-2"),onClick:E,children:jsx("div",{className:"absolute bg-primary",style:c==="horizontal"?{left:b.length>1?`${S(b[0])}%`:0,right:`${100-S(b[b.length-1])}%`,top:0,bottom:0}:{bottom:b.length>1?`${S(b[0])}%`:0,top:`${100-S(b[b.length-1])}%`,left:0,right:0}})}),b.map((H,D)=>jsx("div",{role:"slider",tabIndex:l?-1:0,"aria-valuemin":a,"aria-valuemax":s,"aria-valuenow":H,"aria-orientation":c,"aria-disabled":l,className:u("absolute 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 cursor-grab",x&&w===D&&"cursor-grabbing"),style:c==="horizontal"?{left:`calc(${S(H)}% - 10px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${S(H)}% - 10px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:L=>T(L,D),onPointerMove:P,onPointerUp:k,onPointerCancel:k,onKeyDown:L=>M(L,D)},D)),d&&b.map((H,D)=>jsx("input",{type:"hidden",name:b.length>1?`${d}[${D}]`:d,value:H},D))]})});Ua.displayName="Slider";var Lu=X.createContext(null),Su=()=>{let e=X.useContext(Lu);if(!e)throw new Error("AccordionItem must be used within an Accordion");return e},Hi=X.createContext(null),Du=()=>{let e=X.useContext(Hi);if(!e)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return e},Hu=X.forwardRef(({className:e,type:t="multiple",value:n,defaultValue:r,onValueChange:o,collapsible:a=true,disabled:s,children:i,...l},c)=>{let[d,m]=X.useState(()=>t==="single"?r?[r]:[]:r||[]),f=X.useRef(new Map),p=X.useRef([]),g=n!==void 0,h=g?t==="single"?n?[n]:[]:n:d,b=w=>{if(t==="single"){let R=h.includes(w)&&a?[]:[w];g||m(R),o?.(R[0]||"");}else {let C=h.includes(w)?h.filter(R=>R!==w):[...h,w];g||m(C),o?.(C);}},v=X.useCallback((w,C)=>{f.current.set(w,C),p.current.includes(w)||p.current.push(w);},[]),x=X.useCallback(w=>{f.current.delete(w),p.current=p.current.filter(C=>C!==w);},[]),y=X.useCallback(w=>{let C=p.current;if(C.length===0)return;let R=document.activeElement,N;f.current.forEach((M,S)=>{M===R&&(N=S);});let T=N?C.indexOf(N):-1,P;switch(w){case "first":P=0;break;case "last":P=C.length-1;break;case "next":P=T===-1?0:(T+1)%C.length;break;case "prev":P=T===-1?C.length-1:(T-1+C.length)%C.length;break}let k=C[P];f.current.get(k)?.focus();},[]);return jsx(Lu.Provider,{value:{type:t,value:h,onValueChange:b,collapsible:a,disabled:s,registerTrigger:v,unregisterTrigger:x,focusTrigger:y},children:jsx("div",{ref:c,"data-orientation":"vertical",className:u("w-full",e),...l,children:i})})});Hu.displayName="Accordion";var Iu=X.forwardRef(({className:e,value:t,disabled:n,title:r,subtitle:o,startContent:a,children:s,...i},l)=>{let c=Su(),d=c.value.includes(t),m=n||c.disabled||false,f=X.useId(),p=X.useId();return r!==void 0?jsx(Hi.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children:jsxs("div",{ref:l,"data-state":d?"open":"closed","data-disabled":m?"":void 0,className:u("border-b",m&&"opacity-50",e),...i,children:[jsx(Vu,{children:jsxs("div",{className:"flex items-center gap-3",children:[a,jsxs("div",{className:"flex flex-col items-start",children:[jsx("span",{className:"text-sm font-medium",children:r}),o&&jsx("span",{className:"text-xs text-muted-foreground",children:o})]})]})}),jsx(Au,{children:s})]})}):jsx(Hi.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children:jsx("div",{ref:l,"data-state":d?"open":"closed","data-disabled":m?"":void 0,className:u("border-b",m&&"opacity-50",e),...i,children:s})})});Iu.displayName="AccordionItem";var Vu=X.forwardRef(({className:e,children:t,onClick:n,onKeyDown:r,...o},a)=>{let s=Su(),{value:i,isOpen:l,isDisabled:c,contentId:d,triggerId:m}=Du(),f=X.useRef(null);X.useEffect(()=>{let g=f.current;return g&&!c&&s.registerTrigger(i,g),()=>{s.unregisterTrigger(i);}},[i,c,s]);let p=g=>{switch(r?.(g),g.key){case "ArrowDown":g.preventDefault(),s.focusTrigger("next");break;case "ArrowUp":g.preventDefault(),s.focusTrigger("prev");break;case "Home":g.preventDefault(),s.focusTrigger("first");break;case "End":g.preventDefault(),s.focusTrigger("last");break}};return jsx("h3",{className:"flex",children:jsxs("button",{type:"button",ref:g=>{f.current=g,typeof a=="function"?a(g):a&&(a.current=g);},id:m,"aria-controls":d,"aria-expanded":l,disabled:c,"data-state":l?"open":"closed",className:u("flex flex-1 items-center justify-between py-4 font-medium transition-all text-left cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),onClick:g=>{n?.(g),s.onValueChange(i);},onKeyDown:p,...o,children:[t,jsx(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})})});Vu.displayName="AccordionTrigger";var Au=X.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{isOpen:a,contentId:s,triggerId:i,isDisabled:l}=Du();return jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:u("grid transition-[grid-template-rows] duration-200 ease-out",a?"grid-rows-[1fr]":"grid-rows-[0fr]",e),style:n,...r,children:jsx("div",{className:"overflow-hidden",children:jsx("div",{className:"pb-4 pt-0 text-sm",children:t})})})});Au.displayName="AccordionContent";var Ou=X.createContext(null),Bu=()=>{let e=X.useContext(Ou);if(!e)throw new Error("Collapsible components must be used within a Collapsible");return e},Fu=X.forwardRef(({className:e,open:t,defaultOpen:n=false,onOpenChange:r,disabled:o,title:a,children:s,...i},l)=>{let[c,d]=X.useState(n),m=t!==void 0,f=m?t:c,p=X.useId(),g=X.useId(),h=b=>{o||(m||d(b),r?.(b));};return jsx(Ou.Provider,{value:{open:f,onOpenChange:h,disabled:o,contentId:p,triggerId:g},children:jsxs("div",{ref:l,"data-state":f?"open":"closed","data-disabled":o?"":void 0,className:u("space-y-2",e),...i,children:[a&&jsxs("div",{className:"flex items-center justify-between space-x-4 px-4",children:[jsx("h4",{className:"text-sm font-semibold",children:a}),jsx(Ii,{})]}),s]})})});Fu.displayName="Collapsible";var Ii=X.forwardRef(({className:e,children:t,onClick:n,...r},o)=>{let{open:a,onOpenChange:s,disabled:i,contentId:l,triggerId:c}=Bu();return jsx(ae,{ref:o,id:c,"aria-controls":l,"aria-expanded":a,disabled:i,"data-state":a?"open":"closed","data-disabled":i?"":void 0,variant:"light",size:"sm",isIconOnly:true,className:e,onClick:d=>{n?.(d),s(!a);},...r,children:t??jsx(ChevronsUpDown,{className:u("h-4 w-4 transition-transform duration-200",a&&"rotate-180")})})});Ii.displayName="CollapsibleTrigger";var Ku=X.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{open:a,contentId:s,triggerId:i,disabled:l}=Bu(),c=X.useRef(null),[d,m]=X.useState(0),[f,p]=X.useState(false),[g,h]=X.useState(a);X.useEffect(()=>{a?(h(true),m(0),p(true),requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.current&&m(c.current.scrollHeight);});})):(p(true),c.current?(m(c.current.scrollHeight),requestAnimationFrame(()=>{m(0);})):m(0));},[a]);let b=()=>{p(false),a||h(false);};return g?jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:u("overflow-hidden",e),style:{...n,height:f?d:a?"auto":0,transition:f?"height 0.25s ease-out, opacity 0.25s ease-out":void 0,opacity:a?1:0},onTransitionEnd:b,...r,children:jsx("div",{ref:c,className:"space-y-2",children:t})}):null});Ku.displayName="CollapsibleContent";var _a=X.forwardRef(({className:e,value:t=0,max:n=100,label:r,showPercentage:o=false,formatPercentage:a=l=>`${Math.round(l)}%`,...s},i)=>{let l=Math.min(Math.max(t/n*100,0),100);return jsxs("div",{ref:i,className:"w-full",children:[(r||o)&&jsxs("div",{className:"flex justify-between text-sm mb-2",children:[r&&jsx("span",{className:"text-muted-foreground",children:r}),o&&jsx("span",{className:u("text-muted-foreground",!r&&"ml-auto"),children:a(l)})]}),jsx("div",{role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":n,"aria-label":typeof r=="string"?r:void 0,className:u("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...s,children:jsx("div",{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-l}%)`}})})]})});_a.displayName="Progress";var ju=X.createContext(null),Wu=()=>{let e=X.useContext(ju);if(!e)throw new Error("HoverCard components must be used within a HoverCard");return e},_u=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,openDelay:o=700,closeDelay:a=300,closeOnScroll:s=true})=>{let[i,l]=X.useState(n),c=t!==void 0,d=c?t:i,m=X.useRef(null),f=X.useId(),p=X.useRef(null),g=X.useRef(null),h=X.useCallback(b=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),b?p.current=setTimeout(()=>{c||l(true),r?.(true);},o):g.current=setTimeout(()=>{c||l(false),r?.(false);},a);},[c,r,o,a]);return X.useEffect(()=>{if(!s||!d)return;let b=()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),c||l(false),r?.(false);};return window.addEventListener("scroll",b,true),()=>window.removeEventListener("scroll",b,true)},[s,d,c,r]),X.useEffect(()=>()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current);},[]),jsx(ju.Provider,{value:{open:d,onOpenChange:h,triggerRef:m,contentId:f},children:e})};_u.displayName="HoverCard";var Yu=X.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l}=Wu();return jsx("a",{ref:p=>{l.current=p,typeof s=="function"?s(p):s&&(s.current=p);},onMouseEnter:p=>{t?.(p),i(true);},onMouseLeave:p=>{n?.(p),i(false);},onFocus:p=>{r?.(p),i(true);},onBlur:p=>{o?.(p),i(false);},...a,children:e})});Yu.displayName="HoverCardTrigger";var Xu=X.forwardRef(({className:e,side:t="bottom",sideOffset:n=4,align:r="center",alignOffset:o=0,onMouseEnter:a,onMouseLeave:s,children:i,...l},c)=>{let{open:d,onOpenChange:m,triggerRef:f,contentId:p}=Wu(),[g,h]=X.useState({top:0,left:0}),[b,v]=X.useState(false),x=X.useRef(null);X.useEffect(()=>{v(true);},[]),X.useEffect(()=>{if(!d||!f.current||!x.current)return;(()=>{if(!f.current||!x.current)return;let N=f.current.getBoundingClientRect(),T=x.current.getBoundingClientRect(),P=0,k=0;switch(t){case "top":P=N.top-T.height-n;break;case "bottom":P=N.bottom+n;break;case "left":k=N.left-T.width-n;break;case "right":k=N.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":k=N.left+o;break;case "center":k=N.left+N.width/2-T.width/2;break;case "end":k=N.right-T.width-o;break}else switch(r){case "start":P=N.top+o;break;case "center":P=N.top+N.height/2-T.height/2;break;case "end":P=N.bottom-T.height-o;break}h({top:P,left:k});})();},[d,t,n,r,o,f]);let y=R=>{a?.(R),m(true);},w=R=>{s?.(R),m(false);};if(!b||!d)return null;let C={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[t];return Ba.createPortal(jsx("div",{ref:R=>{x.current=R,typeof c=="function"?c(R):c&&(c.current=R);},id:p,"data-state":d?"open":"closed","data-side":t,className:u("fixed z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",C,e),style:{top:g.top,left:g.left},onMouseEnter:y,onMouseLeave:w,...l,children:i}),document.body)});Xu.displayName="HoverCardContent";var qu=X.createContext({size:"md",variant:"default",radius:"md"}),Xa=()=>X.useContext(qu);cva("",{variants:{size:{sm:"",md:"",lg:""},variant:{default:"",bordered:"",filled:""},radius:{none:"",sm:"",md:"",lg:"",full:""}},defaultVariants:{size:"md",variant:"default",radius:"md"}});var aR=cva("flex flex-wrap items-center break-words",{variants:{size:{sm:"gap-1 text-xs",md:"gap-1.5 text-sm sm:gap-2",lg:"gap-2 text-base sm:gap-3"},variant:{default:"text-muted-foreground",bordered:"text-muted-foreground px-3 py-1.5 border",filled:"text-muted-foreground bg-muted px-3 py-1.5"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",variant:"default",radius:"md"}}),sR=cva("",{variants:{size:{sm:"[&>svg]:h-3 [&>svg]:w-3",md:"[&>svg]:h-3.5 [&>svg]:w-3.5",lg:"[&>svg]:h-4 [&>svg]:w-4"}},defaultVariants:{size:"md"}}),iR=cva("flex items-center justify-center",{variants:{size:{sm:"h-6 w-6 [&>svg]:h-3 [&>svg]:w-3",md:"h-8 w-8 [&>svg]:h-4 [&>svg]:w-4",lg:"h-10 w-10 [&>svg]:h-5 [&>svg]:w-5"}},defaultVariants:{size:"md"}}),Zu=X.forwardRef(({size:e="md",variant:t="default",radius:n="md",children:r,...o},a)=>jsx(qu.Provider,{value:{size:e,variant:t,radius:n},children:jsx("nav",{ref:a,"aria-label":"breadcrumb",...o,children:r})}));Zu.displayName="Breadcrumb";var Qu=X.forwardRef(({className:e,...t},n)=>{let{size:r,variant:o,radius:a}=Xa();return jsx("ol",{ref:n,className:u(aR({size:r,variant:o,radius:o==="default"?void 0:a}),e),...t})});Qu.displayName="BreadcrumbList";var Ju=X.forwardRef(({className:e,...t},n)=>{let{size:r}=Xa();return jsx("li",{ref:n,className:u("inline-flex items-center",r==="sm"&&"gap-1",r==="md"&&"gap-1.5",r==="lg"&&"gap-2",e),...t})});Ju.displayName="BreadcrumbItem";var em=X.forwardRef(({className:e,...t},n)=>jsx("a",{ref:n,className:u("transition-colors hover:text-foreground cursor-pointer",e),...t}));em.displayName="BreadcrumbLink";var tm=X.forwardRef(({className:e,...t},n)=>jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:u("font-medium text-foreground",e),...t}));tm.displayName="BreadcrumbPage";var nm=({children:e,className:t,...n})=>{let{size:r}=Xa();return jsx("li",{role:"presentation","aria-hidden":"true",className:u(sR({size:r}),"text-muted-foreground/60",t),...n,children:e??jsx(ChevronRight,{})})};nm.displayName="BreadcrumbSeparator";var rm=({className:e,...t})=>{let{size:n}=Xa();return jsxs("span",{role:"presentation","aria-hidden":"true",className:u(iR({size:n}),e),...t,children:[jsx(MoreHorizontal,{}),jsx("span",{className:"sr-only",children:"More"})]})};rm.displayName="BreadcrumbEllipsis";var sm=X.forwardRef(({ratio:e=1,className:t,style:n,children:r,...o},a)=>jsx("div",{ref:a,className:u("relative w-full",t),style:{...n,paddingBottom:`${100/e}%`},...o,children:jsx("div",{className:"absolute inset-0",children:r})}));sm.displayName="AspectRatio";var cm=X.createContext(null),Ai=()=>{let e=X.useContext(cm);if(!e)throw new Error("NavigationMenu components must be used within a NavigationMenu");return e},dm=X.createContext(null),um=()=>{let e=X.useContext(dm);if(!e)throw new Error("NavigationMenuItem components must be used within a NavigationMenuItem");return e},mm=X.forwardRef(({className:e,orientation:t="horizontal",children:n,...r},o)=>{let[a,s]=X.useState(null);return jsx(cm.Provider,{value:{activeItem:a,setActiveItem:s,orientation:t},children:jsxs("nav",{ref:o,className:u("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...r,children:[n,jsx(zi,{})]})})});mm.displayName="NavigationMenu";var pm=X.forwardRef(({className:e,...t},n)=>{let{orientation:r}=Ai();return jsx("ul",{ref:n,className:u("group flex flex-1 list-none items-center justify-center gap-1",r==="vertical"&&"flex-col items-start",e),...t})});pm.displayName="NavigationMenuList";var fm=X.forwardRef(({className:e,children:t,...n},r)=>{let{activeItem:o,setActiveItem:a}=Ai(),s=X.useId(),i=X.useRef(null),l=o===s,c=X.useCallback(d=>{a(d?s:null);},[s,a]);return jsx(dm.Provider,{value:{itemId:s,triggerRef:i,open:l,onOpenChange:c},children:jsx("li",{ref:r,className:u("relative",e),...n,children:t})})});fm.displayName="NavigationMenuItem";var gm=cva("group inline-flex h-9 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-[state=open]:bg-accent/50"),bm=X.forwardRef(({className:e,children:t,onMouseEnter:n,onClick:r,...o},a)=>{let{triggerRef:s,open:i,onOpenChange:l}=um(),c=m=>{n?.(m),l(true);},d=m=>{r?.(m),l(!i);};return jsxs("button",{ref:m=>{s.current=m,typeof a=="function"?a(m):a&&(a.current=m);},type:"button","data-state":i?"open":"closed",className:u(gm(),"group",e),onMouseEnter:c,onClick:d,"aria-expanded":i,...o,children:[t,jsx(ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})});bm.displayName="NavigationMenuTrigger";var vm=X.forwardRef(({className:e,onMouseEnter:t,onMouseLeave:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i}=um(),l=X.useRef(null),[c,d]=X.useState({top:0,left:0});X.useEffect(()=>{if(!a||!i.current)return;let p=()=>{if(!i.current)return;let g=i.current.getBoundingClientRect();d({top:g.bottom+4,left:g.left});};return p(),window.addEventListener("resize",p),window.addEventListener("scroll",p,true),()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p,true);}},[a,i]);let m=p=>{t?.(p),s(true);},f=p=>{n?.(p),s(false);};return a?Ba.createPortal(jsx("div",{ref:p=>{l.current=p,typeof o=="function"?o(p):o&&(o.current=p);},"data-state":a?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-4 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:c.top,left:c.left},onMouseEnter:m,onMouseLeave:f,...r}),document.body):null});vm.displayName="NavigationMenuContent";var hm=cva("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"),xm=X.forwardRef(({className:e,active:t,...n},r)=>jsx("a",{ref:r,className:u(hm(),t&&"bg-accent text-accent-foreground",e),...n}));xm.displayName="NavigationMenuLink";var zi=X.forwardRef((e,t)=>null);zi.displayName="NavigationMenuViewport";var ym=X.forwardRef(({className:e,...t},n)=>{let{activeItem:r}=Ai();return r?jsx("div",{ref:n,className:u("top-full z-[1] flex h-2.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"})}):null});ym.displayName="NavigationMenuIndicator";var Tm=cva("inline-flex items-center justify-center rounded-full cursor-pointer transition-colors hover:bg-muted/50 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-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Nt=X.forwardRef(({className:e,size:t,...n},r)=>{let a={sm:14,md:16,lg:20}[t??"md"];return jsx("button",{ref:r,type:"button",className:u(Tm({size:t}),e),"aria-label":"Close",...n,children:jsx(X$1,{style:{width:a,height:a}})})});Nt.displayName="CloseButton";var qa=X.createContext(null);function hR(){let e=X.useContext(qa);if(!e)throw new Error("useDrawer must be used within a DrawerProvider.");return e}function kn(){return X.useContext(qa)}var xR="16rem",yR="18rem",RR="3rem",wR="b",CR={xs:"256px",sm:"320px",md:"384px",lg:"448px",xl:"512px","2xl":"576px","3xl":"672px","4xl":"768px","5xl":"896px",full:"100%"},TR={xs:"20vh",sm:"30vh",md:"40vh",lg:"50vh",xl:"60vh","2xl":"70vh","3xl":"75vh","4xl":"80vh","5xl":"90vh",full:"100vh"},Oi=X.forwardRef(({defaultOpen:e=false,open:t,onOpenChange:n,placement:r="left",size:o="md",backdrop:a="opaque",isDismissable:s=true,hideCloseButton:i=false,collapsible:l="offcanvas",mode:c,className:d,style:m,children:f,...p},g)=>{let h=c??"overlay",b=h==="overlay",[v,x]=X.useState(false),[y,w]=X.useState(false),[C,R]=X.useState(e),N=t??C,T=X.useCallback(M=>{let S=typeof M=="function"?M(N):M;n?n(S):R(S);},[n,N]);X.useEffect(()=>{let M=()=>{x(window.innerWidth<768);};return M(),window.addEventListener("resize",M),()=>window.removeEventListener("resize",M)},[]);let P=X.useCallback(()=>b?T(M=>!M):v?w(M=>!M):T(M=>!M),[v,T,w,b]);X.useEffect(()=>{if(b)return;let M=S=>{S.key===wR&&(S.metaKey||S.ctrlKey)&&(S.preventDefault(),P());};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[P,b]);let k=N?"expanded":"collapsed",E=X.useMemo(()=>({placement:r,state:k,open:N,setOpen:T,isMobile:v,openMobile:y,setOpenMobile:w,toggleDrawer:P,collapsible:l,mode:h,size:o,backdrop:a,isDismissable:s,hideCloseButton:i}),[r,k,N,T,v,y,w,P,l,h,o,a,s,i]);return b?jsx(qa.Provider,{value:E,children:jsx(Drawer.Root,{open:N,onOpenChange:T,direction:r,dismissible:s,children:f})}):jsx(qa.Provider,{value:E,children:jsx(Wn,{delayDuration:0,children:jsx("div",{ref:g,style:{"--drawer-width":xR,"--drawer-width-icon":RR,...m},className:u("group/drawer-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-muted/50",d),...p,children:f})})})});Oi.displayName="Drawer";var Nm=X.forwardRef(({variant:e="default",embedded:t=false,className:n,children:r,...o},a)=>{let s=kn();if(!s)return jsx("div",{ref:a,className:u("flex h-full flex-col bg-background text-foreground",n),...o,children:r});let{placement:i,collapsible:l,isMobile:c,state:d,openMobile:m,setOpenMobile:f}=s;if(i==="bottom"||i==="top")return jsx(Fragment,{children:r});if(l==="none")return jsx("div",{ref:a,className:u("flex h-full w-[--drawer-width] flex-col bg-background text-foreground border-r",i==="right"&&"border-l border-r-0",n),...o,children:r});if(c&&!t)return jsx(MR,{open:m,onOpenChange:f,placement:i,children:r});if(t){let g=d==="collapsed",h=l==="offcanvas",b=l==="icon";return jsx("div",{ref:a,className:u("group peer text-foreground relative"),"data-state":d,"data-collapsible":g?l:"","data-variant":e,"data-placement":i,"data-embedded":"true",children:jsx("div",{className:u("flex h-full flex-col overflow-hidden transition-[width,opacity] duration-200 ease-out",h?g?"w-0 opacity-0":"w-[--drawer-width] opacity-100":b&&g?"w-[--drawer-width-icon]":"w-[--drawer-width]",n),...o,children:jsx("div",{"data-drawer":"drawer",className:u("flex h-full w-full flex-col bg-background transition-opacity duration-200",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border",e==="default"&&i==="left"&&"border-r",e==="default"&&i==="right"&&"border-l"),children:r})})})}return jsxs("div",{ref:a,className:"group peer hidden md:block text-foreground","data-state":d,"data-collapsible":d==="collapsed"?l:"","data-variant":e,"data-placement":i,children:[jsx("div",{className:u("duration-200 relative h-svh w-[--drawer-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0",i==="right"&&"group-data-[placement=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--drawer-width-icon]")}),jsx("div",{className:u("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--drawer-width] transition-[left,right,width] ease-linear md:flex",i==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--drawer-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--drawer-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--drawer-width-icon] group-data-[placement=left]:border-r group-data-[placement=right]:border-l",n),...o,children:jsx("div",{"data-drawer":"drawer",className:u("flex h-full w-full flex-col bg-background",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border"),children:r})})]})});Nm.displayName="DrawerSidebar";var MR=({children:e,open:t,onOpenChange:n,placement:r})=>{let[o,a]=X.useState(false);return X.useEffect(()=>{a(true);},[]),X.useEffect(()=>{if(t)return Gt(),()=>Ut()},[t]),!o||!t?null:Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/80 animate-in fade-in-0",onClick:()=>n(false)}),jsx("div",{className:u("fixed z-50 bg-background p-0 text-foreground shadow-lg","animate-in",r==="left"&&"inset-y-0 left-0 h-full w-[--drawer-width] slide-in-from-left",r==="right"&&"inset-y-0 right-0 h-full w-[--drawer-width] slide-in-from-right"),style:{"--drawer-width":yR},children:jsx("div",{className:"flex h-full w-full flex-col",children:e})})]}),document.body)},km=X.forwardRef(({className:e,onClick:t,...n},r)=>{let o=kn();if(o?.mode==="overlay")return jsx(Drawer.Trigger,{ref:r,className:e,onClick:t,...n});let a=o?.toggleDrawer;return jsxs("button",{ref:r,type:"button","data-drawer":"trigger",className:u("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-accent transition-colors cursor-pointer",e),onClick:s=>{t?.(s),a?.();},...n,children:[jsx(PanelLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle Drawer"})]})});km.displayName="DrawerTrigger";var Pm=X.forwardRef(({className:e,children:t,...n},r)=>{let o=kn(),a=o?.mode==="overlay",s=o?.placement||"left",i=o?.size||"md",l=o?.backdrop||"opaque";if(a){let c=s==="top"||s==="bottom",d=s==="left"||s==="right",m=d?CR[i]:TR[i],f={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},p={top:"inset-x-0 top-0 rounded-b-[10px]",bottom:"inset-x-0 bottom-0 rounded-t-[10px]",left:"inset-y-0 left-0 rounded-r-[10px]",right:"inset-y-0 right-0 rounded-l-[10px]"};return jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:u("fixed inset-0 z-50",f[l])}),jsxs(Drawer.Content,{ref:r,className:u("fixed z-50 flex flex-col border bg-background",p[s],e),style:{...d?{width:m,height:"100%"}:{},...c?{maxHeight:m}:{},...n.style},...n,children:[c&&jsx("div",{className:u("mx-auto h-2 w-[100px] rounded-full bg-muted",s==="top"?"mb-4 mt-auto":"mt-4")}),t]})]})}return jsx("div",{ref:r,className:u("flex flex-col h-full",e),...n,children:t})});Pm.displayName="DrawerContent";var Em=X.forwardRef(({className:e,hideCloseButton:t,children:n,...r},o)=>{let a=kn(),s=a?.hideCloseButton??false,i=!t&&!s;return jsxs("div",{ref:o,"data-drawer":"header",className:u("flex flex-col gap-2 p-4 relative",e),...r,children:[n,i&&jsx(Nt,{className:"absolute right-4 top-4",onClick:()=>a?.setOpen(false)})]})});Em.displayName="DrawerHeader";var Lm=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"body",className:u("flex min-h-0 flex-1 flex-col gap-2 overflow-auto p-4 group-data-[collapsible=icon]:overflow-hidden",e),...t}));Lm.displayName="DrawerBody";var Sm=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"footer",className:u("flex flex-col gap-2 p-4 mt-auto",e),...t}));Sm.displayName="DrawerFooter";var Dm=X.forwardRef(({className:e,...t},n)=>kn()?.mode==="overlay"?jsx(Drawer.Title,{ref:n,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}):jsx("h2",{ref:n,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}));Dm.displayName="DrawerTitle";var Hm=X.forwardRef(({className:e,...t},n)=>kn()?.mode==="overlay"?jsx(Drawer.Description,{ref:n,className:u("text-sm text-muted-foreground",e),...t}):jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));Hm.displayName="DrawerDescription";var Im=X.forwardRef(({className:e,onClick:t,...n},r)=>{let o=kn();return jsx(Nt,{ref:r,className:e,onClick:a=>{t?.(a),o?.setOpen(false);},...n})});Im.displayName="DrawerClose";var Vm=X.forwardRef(({className:e,onClick:t,showLabel:n=true,...r},o)=>{let a=kn();if(!a)return null;let{toggleDrawer:s,state:i,placement:l}=a,c=i==="collapsed",d=l==="left",m=d?PanelLeftOpen:PanelRightOpen,f=d?PanelLeftClose:PanelRightClose;return jsxs("button",{ref:o,type:"button","data-drawer":"toggle","data-state":i,className:u("flex items-center gap-2 w-full px-2 py-2 rounded-md text-sm text-muted-foreground","hover:bg-accent hover:text-accent-foreground","transition-colors cursor-pointer","group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0",e),onClick:p=>{t?.(p),s();},...r,children:[c?jsx(m,{className:"h-4 w-4 shrink-0"}):jsx(f,{className:"h-4 w-4 shrink-0"}),n&&jsx("span",{className:"group-data-[collapsible=icon]:hidden truncate",children:c?"Expand":"Collapse"})]})});Vm.displayName="DrawerToggle";var Am=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"separator",className:u("mx-4 h-px bg-border",e),...t}));Am.displayName="DrawerSeparator";var zm=X.forwardRef(({className:e,...t},n)=>jsx("ul",{ref:n,"data-drawer":"menu",className:u("flex w-full min-w-0 flex-col gap-1",e),...t}));zm.displayName="DrawerMenu";var Om=X.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,"data-drawer":"menu-item",className:u("group/menu-item relative",e),...t}));Om.displayName="DrawerMenuItem";var Bm=cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-ring transition-[width,height,padding] hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 active:bg-accent active:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-accent data-[active=true]:font-medium data-[active=true]:text-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:{default:"hover:bg-accent hover:text-accent-foreground",bordered:"bg-background shadow-[0_0_0_1px_currentColor] hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent/50 hover:text-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:"default",size:"md"}}),Fm=X.forwardRef(({isActive:e=false,variant:t="default",size:n="md",tooltip:r,className:o,children:a,...s},i)=>{let l=kn(),c=l?.isMobile??false,d=l?.state??"expanded",m=jsx("button",{ref:i,type:"button","data-drawer":"menu-button","data-size":n,"data-active":e,className:u(Bm({variant:t,size:n}),o),...s,children:a});return r?jsxs(_n,{children:[jsx(Yn,{children:m}),jsx(Xn,{side:"right",align:"center",hidden:d!=="collapsed"||c,...typeof r=="string"?{children:r}:r})]}):m});Fm.displayName="DrawerMenuButton";var Km=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"group",className:u("relative flex w-full min-w-0 flex-col p-2",e),...t}));Km.displayName="DrawerGroup";var $m=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"group-label",className:u("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-muted-foreground outline-none transition-[margin,opacity] ease-linear","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...t}));$m.displayName="DrawerGroupLabel";var Gm=X.forwardRef(({className:e,...t},n)=>jsx("main",{ref:n,className:u("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}));Gm.displayName="DrawerInset";var NR=Oi;var jm=X.forwardRef(({className:e,...t},n)=>jsx("div",{className:"relative w-full overflow-auto",children:jsx("table",{ref:n,className:u("w-full caption-bottom text-sm",e),...t})}));jm.displayName="Table";var Wm=X.forwardRef(({className:e,...t},n)=>jsx("thead",{ref:n,className:u("[&_tr]:border-b",e),...t}));Wm.displayName="TableHeader";var _m=X.forwardRef(({className:e,...t},n)=>jsx("tbody",{ref:n,className:u("[&_tr:last-child]:border-0",e),...t}));_m.displayName="TableBody";var Ym=X.forwardRef(({className:e,...t},n)=>jsx("tfoot",{ref:n,className:u("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Ym.displayName="TableFooter";var Xm=X.forwardRef(({className:e,...t},n)=>jsx("tr",{ref:n,className:u("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Xm.displayName="TableRow";var qm=X.forwardRef(({className:e,...t},n)=>jsx("th",{ref:n,className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));qm.displayName="TableHead";var Zm=X.forwardRef(({className:e,...t},n)=>jsx("td",{ref:n,className:u("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Zm.displayName="TableCell";var Qm=X.forwardRef(({className:e,...t},n)=>jsx("caption",{ref:n,className:u("mt-4 text-sm text-muted-foreground",e),...t}));Qm.displayName="TableCaption";function DR({className:e,data:t,columns:n,selectable:r=false,selectedKeys:o,onSelectionChange:a,getRowKey:s=(w,C)=>String(C),sortable:i=false,sortState:l,onSortChange:c,paginated:d=false,pageSizeOptions:m=[10,20,50],paginationState:f,onPaginationChange:p,emptyContent:g="No data",loading:h=false,striped:b=false,hoverable:v=true,...x},y){let[w,C]=X.useState(new Set),[R,N]=X.useState({columnId:null,direction:null}),[T,P]=X.useState({pageIndex:0,pageSize:m[0]||10}),k=o??w,E=l??R,M=f??T,S=F=>{a?a(F):C(F);},H=F=>{c?c(F):N(F);},D=F=>{p?p(F):P(F);},L=X.useMemo(()=>{if(!E.columnId||!E.direction)return t;let F=n.find(z=>z.id===E.columnId);return F?[...t].sort((z,j)=>{let W=F.accessor(z),B=F.accessor(j);if(W===B)return 0;if(W==null)return 1;if(B==null)return -1;let Z=String(W).localeCompare(String(B),void 0,{numeric:true});return E.direction==="asc"?Z:-Z}):t},[t,E,n]),I=X.useMemo(()=>{if(!d)return L;let F=M.pageIndex*M.pageSize;return L.slice(F,F+M.pageSize)},[L,d,M]),V=Math.ceil(L.length/M.pageSize),O=F=>{if(F===true){let z=new Set(I.map((j,W)=>s(j,W)));S(z);}else S(new Set);},A=(F,z)=>{let j=new Set(k);z?j.add(F):j.delete(F),S(j);},K=I.length>0&&I.every((F,z)=>k.has(s(F,z))),$=I.some((F,z)=>k.has(s(F,z))),G=F=>{if(!n.find(W=>W.id===F)?.sortable&&!i)return;let j="asc";E.columnId===F&&(E.direction==="asc"?j="desc":E.direction==="desc"&&(j=null)),H({columnId:j?F:null,direction:j});},Y=F=>E.columnId!==F?jsx(ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):E.direction==="asc"?jsx(ChevronUp,{className:"h-4 w-4"}):jsx(ChevronDown,{className:"h-4 w-4"});return jsxs("div",{ref:y,className:u("w-full",e),...x,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(Oo,{checked:K?true:$?"indeterminate":false,onCheckedChange:O,"aria-label":"Select all"})}),n.map(F=>{let z=F.sortable??i;return jsx("th",{className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground",z&&"cursor-pointer select-none hover:text-foreground"),style:{width:F.width},onClick:()=>z&&G(F.id),children:jsxs("div",{className:"flex items-center gap-2",children:[F.header,z&&Y(F.id)]})},F.id)})]})}),jsx("tbody",{className:"[&_tr:last-child]:border-0",children:h?jsx("tr",{children:jsx("td",{colSpan:n.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:"Loading..."})}):I.length===0?jsx("tr",{children:jsx("td",{colSpan:n.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:g})}):I.map((F,z)=>{let j=s(F,z),W=k.has(j);return jsxs("tr",{className:u("border-b transition-colors",v&&"hover:bg-muted/50",b&&z%2===1&&"bg-muted/30",W&&"bg-muted"),"data-state":W?"selected":void 0,children:[r&&jsx("td",{className:"w-12 px-4",children:jsx(Oo,{checked:W,onCheckedChange:B=>A(j,!!B),"aria-label":`Select row ${z+1}`})}),n.map(B=>jsx("td",{className:"p-4 align-middle",children:B.cell?B.cell(F,z):B.accessor(F)},B.id))]},j)})})]})}),d&&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:M.pageSize,onChange:F=>D({pageIndex:0,pageSize:Number(F.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:m.map(F=>jsx("option",{value:F,children:F},F))})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",M.pageIndex+1," of ",V||1]}),jsxs("div",{className:"flex gap-1",children:[jsx(ae,{variant:"light",size:"sm",isIconOnly:true,onClick:()=>D({...M,pageIndex:M.pageIndex-1}),disabled:M.pageIndex===0,"aria-label":"Previous page",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"light",size:"sm",isIconOnly:true,onClick:()=>D({...M,pageIndex:M.pageIndex+1}),disabled:M.pageIndex>=V-1,"aria-label":"Next page",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var HR=X.forwardRef(DR);var Bi=["January","February","March","April","May","June","July","August","September","October","November","December"];function FR({currentMonth:e,onMonthChange:t,startYear:n,endYear:r}){let o=getMonth(e),a=getYear(e),s=c=>{let d=setMonth(e,c);t(d);},i=c=>{let d=setYear(e,c);t(d);},l=X.useMemo(()=>{let c=[];for(let d=r;d>=n;d--)c.push(d);return c},[n,r]);return jsxs("div",{className:"flex items-center gap-1",children:[jsxs(Cn,{children:[jsx(Tn,{children:jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-1.5 py-1 rounded-md","text-xs font-medium w-[85px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsx("span",{className:"truncate",children:Bi[o]}),jsx(ChevronDown,{className:"h-3 w-3 text-muted-foreground shrink-0"})]})}),jsx(Mn,{className:"min-w-[120px] p-0",children:jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:Bi.map((c,d)=>jsx($t,{onSelect:()=>s(d),className:u("text-xs",o===d&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]}),jsxs(Cn,{children:[jsx(Tn,{children:jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-1.5 py-1 rounded-md","text-xs font-medium w-[60px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsx("span",{children:a}),jsx(ChevronDown,{className:"h-3 w-3 text-muted-foreground shrink-0"})]})}),jsx(Mn,{className:"min-w-[80px] p-0",children:jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:l.map(c=>jsx($t,{onSelect:()=>i(c),className:u("text-xs",a===c&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]})]})}function KR(e,t,n){return function({calendarMonth:o}){let{goToMonth:a,nextMonth:s,previousMonth:i}=useDayPicker();if(e)return jsxs("div",{className:"flex items-center justify-between gap-1 mb-2",children:[jsx(FR,{currentMonth:o.date,onMonthChange:a,startYear:t,endYear:n}),jsxs("div",{className:"flex items-center",children:[jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:u("h-6 w-6 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsx(ChevronLeft,{className:"h-3.5 w-3.5"})}),jsx("button",{type:"button",disabled:!s,onClick:()=>s&&a(s),className:u("h-6 w-6 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsx(ChevronRight,{className:"h-3.5 w-3.5"})})]})]});let l=Bi[o.date.getMonth()],c=o.date.getFullYear();return jsxs("div",{className:"flex items-center justify-between gap-2 h-10 mb-2",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("span",{className:"text-sm font-medium w-[90px]",children:l}),jsx("span",{className:"text-sm font-medium w-[50px]",children:c})]}),jsxs("div",{className:"flex items-center gap-1",children:[jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:u("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx("button",{type:"button",disabled:!s,onClick:()=>s&&a(s),className:u("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})}}function to({className:e,classNames:t,showOutsideDays:n=true,showMonthAndYearPickers:r=false,startYear:o=1900,endYear:a=new Date().getFullYear()+50,components:s,...i}){let l=X.useMemo(()=>KR(r,o,a),[r,o,a]);return jsx(DayPicker,{showOutsideDays:n,className:u("p-4",e),classNames:{months:"flex flex-col sm:flex-row gap-4",month:"flex flex-col gap-2",month_caption:"sr-only",nav:"hidden",month_grid:"w-full border-collapse",weekdays:"flex",weekday:"text-muted-foreground w-8 font-normal text-xs text-center",week:"flex w-full mt-0.5",day:u("relative h-8 w-8 p-0 text-center text-sm","flex items-center justify-center","focus-within:relative focus-within:z-20","[&:has([aria-selected]:not(.outside-day))]:bg-accent","first:[&:has([aria-selected]:not(.outside-day))]:rounded-l-md","last:[&:has([aria-selected]:not(.outside-day))]:rounded-r-md"),day_button:u("size-8 p-0 font-normal rounded-md text-sm","inline-flex items-center justify-center","hover:bg-primary/10","focus:outline-none","transition-colors cursor-pointer"),range_start:"rounded-l-md",range_end:"rounded-r-md",selected:u("bg-primary text-primary-foreground rounded-md","hover:bg-primary/90 hover:!text-primary-foreground","focus:bg-primary focus:text-primary-foreground","[&.outside-day]:!bg-transparent [&.outside-day]:!text-muted-foreground/50"),today:"bg-accent text-accent-foreground rounded-md",outside:"outside-day text-muted-foreground/50 !bg-transparent",disabled:"text-muted-foreground/30 cursor-not-allowed",range_middle:"rounded-none bg-muted text-foreground",hidden:"invisible",...t},modifiersStyles:{range_middle:{backgroundColor:"var(--color-muted)",color:"var(--color-foreground)",borderRadius:0}},components:{...s,MonthCaption:l},...i})}to.displayName="Calendar";var np=({className:e,...t})=>jsx("nav",{role:"navigation","aria-label":"pagination",className:u("mx-auto flex w-full justify-center",e),...t});np.displayName="Pagination";var rp=X.forwardRef(({className:e,...t},n)=>jsx("ul",{ref:n,className:u("flex flex-row items-center gap-1",e),...t}));rp.displayName="PaginationContent";var op=X.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,className:u("",e),...t}));op.displayName="PaginationItem";var Za=({className:e,isActive:t,size:n="sm",isIconOnly:r=true,...o})=>jsx("a",{"aria-current":t?"page":void 0,className:u(qr({variant:t?"solid":"light",size:n}),r&&"!px-0 !w-9",e),...o});Za.displayName="PaginationLink";var ap=({className:e,...t})=>jsxs(Za,{"aria-label":"Go to previous page",size:"md",className:u("gap-1 pl-2.5",e),...t,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{children:"Previous"})]});ap.displayName="PaginationPrevious";var sp=({className:e,...t})=>jsxs(Za,{"aria-label":"Go to next page",size:"md",className:u("gap-1 pr-2.5",e),...t,children:[jsx("span",{children:"Next"}),jsx(ChevronRight,{className:"h-4 w-4"})]});sp.displayName="PaginationNext";var ip=({className:e,...t})=>jsxs("span",{"aria-hidden":true,className:u("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"})]});ip.displayName="PaginationEllipsis";var $o=X.forwardRef(({className:e,...t},n)=>jsx("span",{ref:n,className:u("absolute h-px w-px p-0 -m-px overflow-hidden whitespace-nowrap border-0","[clip:rect(0,0,0,0)]",e),...t}));$o.displayName="VisuallyHidden";var cp={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},WR={auto:"top-[50%] translate-y-[-50%]",center:"top-[50%] translate-y-[-50%]",top:"top-4 translate-y-0",bottom:"top-auto bottom-4 translate-y-0","top-center":"top-[20%] translate-y-0","bottom-center":"top-auto bottom-[20%] translate-y-0"},dp=cva("fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),Gi=cva("fixed left-[50%] z-50 grid translate-x-[-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 sm:rounded-lg",{variants:{size:{xs:"w-full max-w-xs",sm:"w-full max-w-sm",md:"w-full max-w-md",lg:"w-full max-w-lg",xl:"w-full max-w-xl","2xl":"w-full max-w-2xl","3xl":"w-full max-w-3xl","4xl":"w-full max-w-4xl","5xl":"w-full max-w-5xl",full:"w-[calc(100vw-2rem)] h-[calc(100vh-2rem)] max-w-none"}},defaultVariants:{size:"md"}}),Ja=X.createContext(null),Pr=()=>{let e=X.useContext(Ja);if(!e)throw new Error("Modal components must be used within a Modal");return e},mp=X.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r="Modal",children:o,hideCloseButton:a=false,isDismissable:s=true,isKeyboardDismissDisabled:i=false,backdrop:l="opaque",placement:c="center",scrollBehavior:d="inside",size:m,className:f},p)=>{let[g,h]=X.useState(false),b=e!==void 0,v=b?e:g,[x,y]=X.useState(false),w=X.useRef(null),C=X.useId(),R=X.useId();X.useEffect(()=>{y(true);},[]);let N=X.useCallback(E=>{b||h(E),t?.(E);},[b,t]);X.useEffect(()=>{if(v)return Gt(),()=>Ut()},[v]),X.useEffect(()=>{if(!v||i)return;let E=M=>{M.key==="Escape"&&N(false);};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[v,i,N]);let T=E=>{s&&E.target===E.currentTarget&&N(false);},P=n?X.isValidElement(n)?X.cloneElement(n,{onClick:E=>{n.props.onClick?.(E),N(true);}}):jsx("button",{type:"button",onClick:()=>N(true),children:n}):null,k=()=>!x||!v?null:d==="outside"?Ba.createPortal(jsx("div",{"data-state":v?"open":"closed",className:u(dp(),cp[l],"overflow-y-auto flex items-start justify-center py-4"),onClick:T,children:jsxs("div",{ref:E=>{w.current=E,typeof p=="function"?p(E):p&&(p.current=E);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":R,"data-state":v?"open":"closed",className:u("relative z-50 grid gap-4 border bg-background p-6 shadow-lg sm:rounded-lg dark:border-0",m==="xs"&&"w-full max-w-xs",m==="sm"&&"w-full max-w-sm",m==="md"&&"w-full max-w-md",m==="lg"&&"w-full max-w-lg",m==="xl"&&"w-full max-w-xl",m==="2xl"&&"w-full max-w-2xl",m==="3xl"&&"w-full max-w-3xl",m==="4xl"&&"w-full max-w-4xl",m==="5xl"&&"w-full max-w-5xl",m==="full"&&"w-[calc(100vw-2rem)] min-h-[calc(100vh-2rem)]",!m&&"w-full max-w-md",f),children:[jsx($o,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(Nt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>N(false)})]})}),document.body):Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{"data-state":v?"open":"closed",className:u(dp(),cp[l]),onClick:T,"aria-hidden":"true"}),jsxs("div",{ref:E=>{w.current=E,typeof p=="function"?p(E):p&&(p.current=E);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":R,"data-state":v?"open":"closed",className:u(Gi({size:m}),WR[c],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",f),children:[jsx($o,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(Nt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>N(false)})]})]}),document.body);return jsxs(Ja.Provider,{value:{open:v,onOpenChange:N,scrollBehavior:d,titleId:C,descriptionId:R},children:[P,k()]})});mp.displayName="Modal";var es=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,scrollBehavior:o="inside"})=>{let[a,s]=X.useState(n),i=t!==void 0,l=i?t:a,c=X.useId(),d=X.useId(),m=X.useCallback(f=>{i||s(f),r?.(f);},[i,r]);return jsx(Ja.Provider,{value:{open:l,onOpenChange:m,scrollBehavior:o,titleId:c,descriptionId:d},children:e})};es.displayName="ModalRoot";var pp=X.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=Pr();return jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(true);},...n,children:e})});pp.displayName="ModalTrigger";var Ui=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};Ui.displayName="ModalPortal";var ji=X.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Pr();return r?jsx("div",{ref:n,"data-state":r?"open":"closed",className:u("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),onClick:()=>o(false),"aria-hidden":"true",...t}):null});ji.displayName="ModalOverlay";var fp=X.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=Pr();return jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(false);},...n,children:e})});fp.displayName="ModalClose";var ts=X.forwardRef(({className:e,children:t,size:n,showCloseButton:r=true,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c,titleId:d,descriptionId:m}=Pr(),[f,p]=X.useState(false);return X.useEffect(()=>{p(true);},[]),X.useEffect(()=>{if(l)return Gt(),()=>Ut()},[l]),X.useEffect(()=>{if(!l)return;let g=h=>{h.key==="Escape"&&(o?.(),c(false));};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[l,c,o]),!f||!l?null:jsxs(Ui,{children:[jsx(ji,{}),jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":m,"data-state":l?"open":"closed",className:u(Gi({size:n}),"top-[50%] translate-y-[-50%]",e),...s,children:[t,r&&jsx(Nt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>c(false)})]})]})});ts.displayName="ModalContent";var gp=({className:e,...t})=>jsx("div",{className:u("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});gp.displayName="ModalHeader";var bp=({className:e,children:t})=>(X.useContext(Ja)?.scrollBehavior??"inside")==="inside"?jsx(ke,{className:u("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsx("div",{className:u(e),children:t});bp.displayName="ModalBody";var vp=({className:e,children:t,...n})=>{let{onOpenChange:r}=Pr();return jsx("div",{className:u("flex-shrink-0 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n,children:X.Children.map(t,o=>X.isValidElement(o)?X.cloneElement(o,{onClick:a=>{o.props.onClick?.(a),r(false);}}):o)})};vp.displayName="ModalFooter";var hp=X.forwardRef(({className:e,...t},n)=>{let{titleId:r}=Pr();return jsx("h2",{ref:n,id:r,className:u("text-lg font-semibold leading-none tracking-tight",e),...t})});hp.displayName="ModalTitle";var xp=X.forwardRef(({className:e,...t},n)=>{let{descriptionId:r}=Pr();return jsx("p",{ref:n,id:r,className:u("text-sm text-muted-foreground",e),...t})});xp.displayName="ModalDescription";var Wi=X.forwardRef(({className:e,...t},n)=>jsx(Command,{ref:n,className:u("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Wi.displayName=Command.displayName;var XR=({children:e,...t})=>jsx(es,{...t,children:jsx(ts,{className:"overflow-hidden p-0 shadow-lg",showCloseButton:false,children:jsx(Wi,{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})})}),yp=X.forwardRef(({className:e,...t},n)=>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:n,className:u("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})]}));yp.displayName=Command.Input.displayName;var Rp=X.forwardRef(({className:e,children:t,...n},r)=>jsx(ke,{className:"max-h-[300px]",children:jsx(Command.List,{ref:r,className:u("overflow-hidden",e),...n,children:t})}));Rp.displayName=Command.List.displayName;var wp=X.forwardRef((e,t)=>jsx(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));wp.displayName=Command.Empty.displayName;var Cp=X.forwardRef(({className:e,...t},n)=>jsx(Command.Group,{ref:n,className:u("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}));Cp.displayName=Command.Group.displayName;var Tp=X.forwardRef(({className:e,...t},n)=>jsx(Command.Separator,{ref:n,className:u("-mx-1 h-px bg-border",e),...t}));Tp.displayName=Command.Separator.displayName;var Mp=X.forwardRef(({className:e,children:t,startContent:n,endContent:r,...o},a)=>jsxs(Command.Item,{ref:a,className:u("relative flex cursor-default select-none items-center gap-2 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),...o,children:[n,t&&jsx("span",{className:"flex-1",children:t}),r]}));Mp.displayName=Command.Item.displayName;var Np=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Np.displayName="CommandShortcut";var QR={sm:{input:"h-9 px-2 text-xs",button:"h-9 w-9",icon:"h-3.5 w-3.5"},md:{input:"h-10 px-3 text-sm",button:"h-10 w-10",icon:"h-4 w-4"},lg:{input:"h-11 px-4 text-base",button:"h-11 w-11",icon:"h-5 w-5"}},JR={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},Pp=X.forwardRef(({className:e,showToggle:t=true,disabled:n,onFocus:r,onBlur:o,style:a,size:s="md",radius:i="md",...l},c)=>{let[d,m]=X.useState(false),[f,p]=X.useState(false),g=QR[s],h=JR[i];return jsxs("div",{className:"relative",children:[jsx("input",{type:d?"text":"password",className:u("flex w-full border border-input bg-background py-2 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",g.input,h,t&&"pr-10",e),ref:c,disabled:n,style:{...a,borderColor:f?"var(--color-foreground)":void 0},onFocus:b=>{p(true),r?.(b);},onBlur:b=>{p(false),o?.(b);},...l}),t&&jsx("button",{type:"button",className:u("absolute right-0 top-0 px-3 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",g.button),onClick:()=>m(!d),disabled:n,tabIndex:-1,"aria-label":d?"Hide password":"Show password",children:d?jsx(EyeOff,{className:g.icon}):jsx(Eye,{className:g.icon})})]})});Pp.displayName="PasswordInput";var rw={sm:{wrapper:"h-9",input:"h-9 text-xs",button:"h-9 w-9",icon:"h-3.5 w-3.5"},md:{wrapper:"h-10",input:"h-10 text-sm",button:"h-10 w-10",icon:"h-4 w-4"},lg:{wrapper:"h-11",input:"h-11 text-base",button:"h-11 w-11",icon:"h-5 w-5"}},ow={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},Ep=X.forwardRef(({className:e,showButtons:t=true,step:n=1,min:r,max:o,value:a,defaultValue:s,onChange:i,disabled:l,size:c="md",radius:d="md",...m},f)=>{let[p,g]=X.useState(s),[h,b]=X.useState(false),v=a!==void 0,x=v?a:p,y=rw[c],w=ow[d],C=M=>{M!==void 0&&(r!==void 0&&M<r&&(M=r),o!==void 0&&M>o&&(M=o)),v||g(M),i?.(M);},R=()=>{C((x??0)+n);},N=()=>{C((x??0)-n);},T=M=>{let S=M.target.value;if(S==="")C(void 0);else {let H=parseFloat(S);isNaN(H)||C(H);}},P=M=>{M.key==="ArrowUp"?(M.preventDefault(),R()):M.key==="ArrowDown"&&(M.preventDefault(),N());},k=r===void 0||(x??0)>r,E=o===void 0||(x??0)<o;return t?jsxs("div",{className:u("relative flex items-center border transition-colors",y.wrapper,w,h?"border-foreground":"border-input",l&&"opacity-50",e),children:[jsx("button",{type:"button",className:u("shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",y.button),onClick:N,disabled:l||!k,tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:y.icon})}),jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:u("min-w-0 flex-1 bg-background text-center focus:outline-none disabled:cursor-not-allowed",y.input),ref:f,value:x??"",onChange:T,onKeyDown:P,disabled:l,onFocus:()=>b(true),onBlur:()=>b(false),...m}),jsx("button",{type:"button",className:u("shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",y.button),onClick:R,disabled:l||!E,tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:y.icon})})]}):jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:u("flex w-full bg-background px-3 py-2 text-center border placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",y.input,w,h?"border-foreground":"border-input",e),ref:f,value:x??"",onChange:T,onKeyDown:P,disabled:l,onFocus:()=>b(true),onBlur:()=>b(false),...m})});Ep.displayName="NumberInput";var Hp=cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),Lp=cva("border-2 border-background ring-0 cursor-pointer transition-transform duration-200 hover:-translate-y-1",{variants:{size:{sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-12 w-12 text-base"}},defaultVariants:{size:"md"}}),Ip=X.forwardRef(({className:e,items:t,max:n=5,size:r,showTooltips:o=false,...a},s)=>{let i=t.slice(0,n),l=t.length-n,c=(m,f)=>{let p=jsxs(Tr,{className:u(Lp({size:r})),children:[m.src&&jsx(Jr,{src:m.src,alt:m.alt||""}),jsx(Mr,{className:"text-xs",children:m.fallback||m.alt?.charAt(0)?.toUpperCase()||"?"})]},f);return o&&m.alt?jsxs(_n,{children:[jsx(Yn,{children:p}),jsx(Xn,{className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",children:m.alt})]},f):p},d=jsxs("div",{ref:s,className:u(Hp({size:r,className:e})),...a,children:[i.map((m,f)=>c(m,f)),l>0&&jsx(Tr,{className:u(Lp({size:r})),children:jsxs(Mr,{className:"bg-muted text-muted-foreground",children:["+",l]})})]});return o?jsx(Wn,{delayDuration:300,children:d}):d});Ip.displayName="AvatarGroup";var Vp=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"}}),Ap=X.forwardRef(({className:e,value:t,defaultValue:n=0,onValueChange:r,max:o=5,size:a,icon:s="star",allowHalf:i=false,readOnly:l=false,disabled:c=false,filledColor:d,emptyColor:m,...f},p)=>{let[g,h]=X.useState(n),[b,v]=X.useState(null),x=t!==void 0,y=x?t:g,w=b!==null?b:y,C=S=>{l||c||(x||h(S),r?.(S));},R=(S,H=false)=>{let D=i&&H?S+.5:S+1;C(D);},N=(S,H)=>{if(l||c)return;let D=S.currentTarget.getBoundingClientRect(),L=i&&S.clientX<D.left+D.width/2;v(L?H+.5:H+1);},T=()=>{v(null);},P=s==="heart"?Heart:Star,k=S=>w>=S+1?"full":w>=S+.5?"half":"empty",E=d?{color:d,fill:d}:{},M=m?{color:m}:{};return jsx("div",{ref:p,className:u(Vp({size:a,className:e}),c&&"opacity-50 cursor-not-allowed"),onMouseLeave:T,role:"radiogroup","aria-label":"Rating",...f,children:Array.from({length:o},(S,H)=>{let D=k(H);return jsxs("button",{type:"button",className:u("relative focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",!l&&!c&&"cursor-pointer hover:scale-110 transition-transform"),onClick:L=>{let I=L.currentTarget.getBoundingClientRect(),V=i&&L.clientX<I.left+I.width/2;R(H,V);},onMouseMove:L=>N(L,H),disabled:c||l,"aria-label":`Rate ${H+1} out of ${o}`,role:"radio","aria-checked":y===H+1,children:[jsx(P,{className:u("text-muted-foreground/30",D!=="empty"&&"absolute inset-0"),style:D==="empty"?M:void 0}),D!=="empty"&&jsx(P,{className:u("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",D==="half"&&"clip-path-half"),style:{...E,clipPath:D==="half"?"inset(0 50% 0 0)":void 0}})]},H)})})});Ap.displayName="Rating";var Op=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 cursor-default",{variants:{variant:{solid:"border-transparent text-primary-foreground",bordered:"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:""},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-md",md:"rounded-lg",lg:"rounded-xl",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-green-600 text-white hover:bg-green-700 dark:bg-green-700 dark:hover:bg-green-600"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white hover:bg-amber-700 dark:bg-amber-700 dark:hover:bg-amber-600"},{variant:"solid",color:"danger",className:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:hover:bg-red-600"},{variant:"bordered",color:"primary",className:"text-primary !border-primary hover:bg-primary/10"},{variant:"bordered",color:"secondary",className:"text-secondary-foreground !border-secondary hover:bg-secondary/10"},{variant:"bordered",color:"success",className:"text-green-600 !border-green-600 hover:bg-green-600/10 dark:text-green-500 dark:!border-green-500"},{variant:"bordered",color:"warning",className:"text-amber-600 !border-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:!border-amber-500"},{variant:"bordered",color:"danger",className:"text-red-600 !border-red-600 hover:bg-red-600/10 dark:text-red-500 dark:!border-red-500"},{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-green-600 hover:bg-green-600/10 dark:text-green-500 dark:hover:bg-green-500/10"},{variant:"ghost",color:"warning",className:"text-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:hover:bg-amber-500/10"},{variant:"ghost",color:"danger",className:"text-red-600 hover:bg-red-600/10 dark:text-red-500 dark:hover:bg-red-500/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-green-600/15 text-green-600 hover:bg-green-600/20 dark:bg-green-500/15 dark:text-green-500 dark:hover:bg-green-500/20"},{variant:"soft",color:"warning",className:"bg-amber-600/15 text-amber-600 hover:bg-amber-600/20 dark:bg-amber-500/15 dark:text-amber-500 dark:hover:bg-amber-500/20"},{variant:"soft",color:"danger",className:"bg-red-600/15 text-red-600 hover:bg-red-600/20 dark:bg-red-500/15 dark:text-red-500 dark:hover:bg-red-500/20"}],defaultVariants:{variant:"solid",color:"primary",size:"md",radius:"full",clickable:false}}),uw={sm:"sm",md:"sm",lg:"sm"},Bp=X.forwardRef(({className:e,variant:t,color:n,size:r,radius:o,clickable:a,startContent:s,endContent:i,closable:l,onClose:c,disabled:d,children:m,onClick:f,...p},g)=>{let h=a||!!f,b=v=>{v.stopPropagation(),c?.();};return jsxs("div",{ref:g,role:h?"button":void 0,tabIndex:h&&!d?0:void 0,"aria-disabled":d,onClick:d?void 0:f,onKeyDown:h&&!d?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),f?.(v));}:void 0,className:u(Op({variant:t,color:n,size:r,radius:o,clickable:h}),d&&"opacity-50 cursor-not-allowed",e),...p,children:[s&&jsx("span",{className:"shrink-0",children:s}),jsx("span",{className:"truncate",children:m}),i&&jsx("span",{className:"shrink-0",children:i}),l&&jsx(Nt,{size:uw[r??"md"],onClick:b,disabled:d,className:"ml-0.5 h-4 w-4"})]})});Bp.displayName="Chip";var Fp=createContext({direction:"horizontal"}),xw=({className:e,direction:t="horizontal",children:n,...r})=>jsx(Fp.Provider,{value:{direction:t},children:jsx(Group,{orientation:t,className:u("flex h-full w-full data-[orientation=vertical]:flex-col",e),...r,children:n})}),yw=Panel,Rw=({withHandle:e,className:t,...n})=>{let{direction:r}=useContext(Fp),o=r==="vertical";return jsx(Separator,{className:u("relative flex shrink-0 items-center justify-center bg-border outline-none",o?"h-px w-full after:absolute after:inset-x-0 after:top-1/2 after:h-1 after:-translate-y-1/2":"w-px after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2",t),...n,children:e&&jsx("div",{className:u("z-10 flex items-center justify-center rounded-sm border bg-border",o?"h-3 w-4 rotate-90":"h-4 w-3"),children:jsx(GripVertical,{className:"h-2.5 w-2.5"})})})};var Up=cva("relative inline-flex items-center justify-center",{variants:{size:{sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-24 w-24"},color:{default:"",primary:"",success:"",warning:"",danger:""}},defaultVariants:{size:"md",color:"default"}}),Cw={sm:{size:32,strokeWidth:3,fontSize:"text-[10px]"},md:{size:48,strokeWidth:4,fontSize:"text-xs"},lg:{size:64,strokeWidth:5,fontSize:"text-sm"},xl:{size:96,strokeWidth:6,fontSize:"text-base"}},Kp={default:"var(--color-foreground, #18181b)",primary:"var(--color-primary, #18181b)",success:"var(--color-success, #16a34a)",warning:"var(--color-warning, #d97706)",danger:"var(--color-danger, #dc2626)"},jp=X.forwardRef(({className:e,size:t="md",color:n="default",value:r,max:o=100,showValue:a=false,formatValue:s=d=>`${Math.round(d)}%`,trackClassName:i,...l},c)=>{let d=Math.min(100,Math.max(0,r/o*100)),m=Cw[t],f=(m.size-m.strokeWidth)/2,p=2*Math.PI*f,g=p-d/100*p;return jsxs("div",{ref:c,className:u(Up({size:t,color:n}),e),role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":o,...l,children:[jsxs("svg",{width:m.size,height:m.size,viewBox:`0 0 ${m.size} ${m.size}`,fill:"none",children:[jsx("circle",{className:u("stroke-muted",i),cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none"}),jsx("circle",{cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none",strokeLinecap:"round",stroke:Kp[n]||Kp.default,strokeDasharray:`${p} ${p}`,strokeDashoffset:g,style:{transformOrigin:"center",transform:"rotate(-90deg)",transition:"stroke-dashoffset 0.3s ease-in-out"}})]}),a&&jsx("span",{className:u("absolute font-medium text-foreground",m.fontSize),children:s(d)})]})});jp.displayName="CircularProgress";var Wp=X.createContext(null),Nw=()=>{let e=X.useContext(Wp);if(!e)throw new Error("OTP components must be used within InputOTP");return e},_p=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"}}),Yp=X.forwardRef(({className:e,containerClassName:t,maxLength:n,value:r,defaultValue:o="",onChange:a,onComplete:s,pattern:i,disabled:l=false,size:c,radius:d="md",children:m,...f},p)=>{let[g,h]=X.useState(o),[b,v]=X.useState(0),[x,y]=X.useState(false),w=X.useRef(null),C=r!==void 0?r:g;X.useImperativeHandle(p,()=>w.current),X.useEffect(()=>{v(Math.min(C.length,n-1));},[C,n]),X.useEffect(()=>{C.length===n&&s&&s(C);},[C,n,s]);let R=M=>{let S=M.target.value;if(i&&S){let H=new RegExp(i.replace("^","").replace("$","").replace("+",""));S=S.split("").filter(D=>H.test(D)).join("");}S=S.slice(0,n),r===void 0&&h(S),a?.(S);},N=M=>{M.key==="ArrowLeft"?v(S=>Math.max(0,S-1)):M.key==="ArrowRight"&&v(S=>Math.min(C.length,n-1,S+1));},T=()=>{w.current?.focus();},P=()=>{y(true),v(Math.min(C.length,n-1));},k=()=>{y(false);},E={value:C,activeIndex:x?b:-1,maxLength:n,disabled:l,radius:d};return jsx(Wp.Provider,{value:E,children:jsxs("div",{className:u(_p({size:c}),t),onClick:T,"data-otp-container":true,children:[jsx("input",{ref:w,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:C,onChange:R,onKeyDown:N,onFocus:P,onBlur:k,disabled:l,maxLength:n,className:u("absolute opacity-0 pointer-events-none w-0 h-0",e),...f}),m]})})});Yp.displayName="InputOTP";var Xp=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center",e),...t}));Xp.displayName="InputOTPGroup";var kw={none:"first:rounded-l-none",sm:"first:rounded-l-md",md:"first:rounded-l-lg",lg:"first:rounded-l-xl",full:"first:rounded-l-full"},Pw={none:"last:rounded-r-none",sm:"last:rounded-r-md",md:"last:rounded-r-lg",lg:"last:rounded-r-xl",full:"last:rounded-r-full"},qp=X.forwardRef(({index:e,className:t,...n},r)=>{let{value:o,activeIndex:a,disabled:s,radius:i}=Nw(),l=o[e]||"",c=a===e,d=c&&o.length===e;return jsxs("div",{ref:r,"data-otp-slot":true,"data-active":c,"data-filled":!!l,className:u("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm font-medium transition-all first:border-l",kw[i],Pw[i],c&&"z-10 border-foreground",s&&"cursor-not-allowed opacity-50",t),...n,children:[l,d&&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"})})]})});qp.displayName="InputOTPSlot";var Zp=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("text-muted-foreground",e),...t,children:jsx(Minus,{className:"h-4 w-4"})}));Zp.displayName="InputOTPSeparator";var ef=cva("inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors",{variants:{variant:{solid:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900",bordered:"border border-zinc-300 bg-transparent dark:border-zinc-700",light:"bg-transparent text-zinc-800 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800",flat:"bg-zinc-100 text-zinc-800 dark:bg-zinc-800 dark:text-white",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent hover:bg-zinc-900 hover:text-white hover:border-zinc-900 dark:hover:bg-white dark:hover:text-zinc-900 dark:hover:border-white"},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:"flat",size:"md"}}),tf=X.forwardRef(({className:e,variant:t,size:n,value:r=[],onChange:o,placeholder:a="Add tag...",maxTags:s,minTagLength:i=1,maxTagLength:l=50,triggerKeys:c=["Enter",",","Tab"],allowDuplicates:d=false,disabled:m,readOnly:f,renderTag:p,...g},h)=>{let[b,v]=X.useState(""),x=X.useRef(null);X.useImperativeHandle(h,()=>x.current);let y=k=>{let E=k.trim();if(E.length<i||E.length>l||s&&r.length>=s||!d&&r.some(S=>S.text.toLowerCase()===E.toLowerCase()))return;let M={id:crypto.randomUUID(),text:E};o?.([...r,M]),v("");},w=k=>{m||f||o?.(r.filter(E=>E.id!==k));},C=k=>{if(c.includes(k.key)){if(k.key==="Tab"&&!b)return;k.preventDefault(),y(b);}k.key==="Backspace"&&!b&&r.length>0&&w(r[r.length-1].id);},R=k=>{let E=k.target.value;if(E.includes(",")){E.split(",").forEach(S=>{S.trim()&&y(S);});return}v(E);},N=k=>{k.preventDefault(),k.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(S=>{y(S);});},T=()=>{x.current?.focus();},P=s?r.length>=s:false;return jsxs("div",{className:u("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",m&&"cursor-not-allowed opacity-50",e),onClick:T,children:[r.map(k=>p?p(k,()=>w(k.id)):jsxs("span",{className:u(ef({variant:t,size:n})),children:[k.text,!m&&!f&&jsx("button",{type:"button",onClick:E=>{E.stopPropagation(),w(k.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${k.text}`,children:jsx(X$1,{className:"h-3 w-3"})})]},k.id)),!P&&!f&&jsx("input",{ref:x,type:"text",value:b,onChange:R,onKeyDown:C,onPaste:N,placeholder:r.length===0?a:"",disabled:m,className:u("flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed","min-w-[80px]"),...g})]})});tf.displayName="TagInput";var rf=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"}}),of=X.forwardRef(({className:e,size:t,icon:n,title:r,description:o,action:a,children:s,...i},l)=>jsxs("div",{ref:l,className:u(rf({size:t,className:e})),...i,children:[n&&jsx("div",{className:"text-muted-foreground [&>svg]:h-10 [&>svg]:w-10",children:n}),r&&jsx("h3",{className:"text-lg font-semibold text-foreground",children:r}),o&&jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:o}),a&&jsx("div",{className:"mt-2",children:a}),s]}));of.displayName="EmptyState";var sf=cva("border p-6 text-card-foreground shadow-sm",{variants:{variant:{solid:"bg-zinc-800 text-white border-zinc-800 dark:bg-zinc-200 dark:text-zinc-900 dark:border-zinc-200",bordered:"border border-zinc-300 bg-transparent dark:border-zinc-700",light:"bg-transparent border-transparent shadow-none",flat:"bg-zinc-100 border-transparent dark:bg-zinc-800",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent hover:bg-zinc-900 hover:text-white hover:border-zinc-900 dark:hover:bg-white dark:hover:text-zinc-900 dark:hover:border-white"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"bordered",radius:"md"}}),lf=X.forwardRef(({className:e,variant:t,radius:n,label:r,value:o,icon:a,trend:s,trendValue:i,description:l,...c},d)=>{let m=s==="up"?TrendingUp:s==="down"?TrendingDown:Minus,f=s==="up"?"text-green-500":s==="down"?"text-red-500":"text-muted-foreground";return jsxs("div",{ref:d,className:u(sf({variant:t,radius:n,className:e})),...c,children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("p",{className:u("text-sm font-medium",t==="solid"?"opacity-80":"text-muted-foreground"),children:r}),a&&jsx("div",{className:u("[&>svg]:h-4 [&>svg]:w-4",t==="solid"?"opacity-80":"text-muted-foreground"),children:a})]}),jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[jsx("p",{className:"text-2xl font-bold",children:o}),s&&i&&jsxs("span",{className:u("flex items-center gap-0.5 text-sm",f),children:[jsx(m,{className:"h-3 w-3"}),i]})]}),l&&jsx("p",{className:u("mt-1 text-xs",t==="solid"?"opacity-70":"text-muted-foreground"),children:l})]})});lf.displayName="StatCard";var qi=cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",striped:"gap-2 [&>*:nth-child(odd)]:bg-muted/50",filled:"gap-2 bg-muted/30 rounded-lg p-2"},size:{sm:"[&>*]:py-2 [&>*]:px-3",md:"[&>*]:py-3 [&>*]:px-4",lg:"[&>*]:py-4 [&>*]:px-5"}},defaultVariants:{variant:"default",size:"md"}}),Bw=({checked:e,disabled:t,onClick:n})=>jsx("button",{type:"button",role:"checkbox","aria-checked":e,disabled:t,onClick:r=>{r.stopPropagation(),t||n(r);},className:u("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",e&&"bg-primary text-primary-foreground",t&&"cursor-not-allowed opacity-50"),children:e&&jsx("span",{className:"flex items-center justify-center text-current",children:jsx(Check,{className:"h-3 w-3"})})});function Fw({className:e,variant:t,size:n,items:r,renderItem:o,draggable:a=false,onReorder:s,showHandle:i=true,dragIcon:l,selectable:c=false,multiple:d=false,selectedKeys:m,defaultSelectedKeys:f=[],onSelect:p,checkable:g=false,checkedKeys:h,defaultCheckedKeys:b=[],onCheck:v,children:x,...y},w){let[C,R]=X.useState(null),[N,T]=X.useState(null),[P,k]=X.useState(new Set(f)),E=m!==void 0,M=E?new Set(m):P,[S,H]=X.useState(new Set(b)),D=h!==void 0,L=D?new Set(h):S,I=(z,j)=>{R(j),z.dataTransfer.effectAllowed="move",z.dataTransfer.setData("text/plain",String(j));},V=(z,j)=>{z.preventDefault(),!(C===null||C===j)&&T(j);},O=()=>{T(null);},A=(z,j)=>{if(z.preventDefault(),!r||C===null||C===j){R(null),T(null);return}let W=[...r],[B]=W.splice(C,1);W.splice(j,0,B),s?.(W),R(null),T(null);},K=()=>{R(null),T(null);},$=X.useCallback((z,j)=>{if(!r)return;let W=new Set(M),B=!W.has(z.id);d?B?W.add(z.id):W.delete(z.id):(W.clear(),B&&W.add(z.id)),E||k(W);let Z=r.filter(ue=>W.has(ue.id));p?.(Array.from(W),{selected:B,selectedItems:Z,item:z,event:j});},[r,M,d,E,p]),G=X.useCallback((z,j)=>{if(!r)return;let W=new Set(L),B=!W.has(z.id);B?W.add(z.id):W.delete(z.id),D||H(W);let Z=r.filter(ue=>W.has(ue.id));v?.(Array.from(W),{checked:B,checkedItems:Z,item:z,event:j});},[r,L,D,v]);return (a||c||g)&&r&&o?jsx("div",{ref:w,role:"list",className:u(qi({variant:t,size:n,className:e})),...y,children:r.map((z,j)=>{let W=M.has(z.id),B=L.has(z.id);return jsxs("div",{role:"listitem","aria-selected":c?W:void 0,draggable:a,onDragStart:a?U=>I(U,j):void 0,onDragOver:a?U=>V(U,j):void 0,onDragLeave:a?O:void 0,onDrop:a?U=>A(U,j):void 0,onDragEnd:a?K:void 0,onClick:c&&!g?U=>$(z,U):void 0,className:u("flex items-center gap-3 transition-all",a&&"cursor-move",c&&!g&&"cursor-pointer hover:bg-muted/50",g&&"cursor-pointer hover:bg-muted/50",C===j&&"opacity-50 scale-[1.02] z-10",N===j&&"border-primary border-dashed border rounded-md",W&&c&&!g&&"bg-primary/10"),children:[a&&i&&l!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:l??jsx(GripVertical,{className:"h-5 w-5"})}),g&&jsx(Bw,{checked:B,onClick:U=>G(z,U)}),jsx("div",{className:"flex-1 min-w-0",children:o(z,j)})]},z.id)})}):jsx("div",{ref:w,role:"list",className:u(qi({variant:t,size:n,className:e})),...y,children:x})}var Kw=X.forwardRef(Fw),df=cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),uf=X.forwardRef(({className:e,interactive:t,leading:n,trailing:r,children:o,...a},s)=>jsxs("div",{ref:s,role:"listitem",className:u(df({interactive:t,className:e})),...a,children:[n&&jsx("div",{className:"flex-shrink-0 text-muted-foreground",children:n}),jsx("div",{className:"flex-1 min-w-0",children:o}),r&&jsx("div",{className:"flex-shrink-0 whitespace-nowrap",children:r})]}));uf.displayName="ListItem";var mf=X.forwardRef(({className:e,primary:t,secondary:n,children:r,...o},a)=>jsxs("div",{ref:a,className:u("min-w-0",e),...o,children:[t&&jsx("p",{className:"text-sm font-medium leading-none truncate",children:t}),n&&jsx("p",{className:"mt-1 text-sm text-muted-foreground truncate",children:n}),r]}));mf.displayName="ListItemText";var gf=cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),bf=X.forwardRef(({className:e,position:t,...n},r)=>jsx("div",{ref:r,"data-position":t,className:u(gf({position:t,className:e})),...n}));bf.displayName="Timeline";var vf=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"}}),hf=X.forwardRef(({className:e,variant:t,hideSeparator:n=false,hideConnector:r=false,dot:o,children:a,...s},i)=>jsxs("div",{ref:i,className:u(vf({variant:t,className:e})),...s,children:[!n&&jsxs("div",{className:"flex flex-col items-center",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:o}),!r&&jsx("div",{className:"w-0.5 flex-1 bg-border"})]}),a]}));hf.displayName="TimelineItem";var xf=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex-1 pt-0.5",e),...t}));xf.displayName="TimelineContent";var yf=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));yf.displayName="TimelineOpposite";var wf=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}}),Cf=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",{variants:{size:{sm:"h-6 text-xs px-2.5",md:"h-8 text-sm px-3",lg:"h-10 text-base px-4"},selected:{true:"bg-background text-foreground shadow-sm",false:""}},defaultVariants:{size:"md",selected:false}}),Tf=X.createContext({}),Mf=X.forwardRef(({className:e,size:t="md",fullWidth:n,children:r,value:o,defaultValue:a,onValueChange:s,disabled:i,...l},c)=>{let[d,m]=X.useState(a),f=o!==void 0?o:d,p=X.useCallback(g=>{o===void 0&&m(g),s?.(g);},[o,s]);return jsx(Tf.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:i},children:jsx("div",{ref:c,role:"group",className:u(wf({size:t,fullWidth:n,className:e})),...l,children:r})})});Mf.displayName="SegmentedControl";var Nf=X.forwardRef(({className:e,children:t,value:n,disabled:r,...o},a)=>{let s=X.useContext(Tf),i=s.value===n,l=r||s.disabled;return jsx("button",{ref:a,type:"button",role:"radio","aria-checked":i,"data-state":i?"on":"off",disabled:l,onClick:()=>{l||s.onValueChange?.(n);},className:u(Cf({size:s.size,selected:i}),"flex-1",e),...o,children:t})});Nf.displayName="SegmentedControlItem";var kf=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"}}),Pf=e=>{let t=e.type;return t.startsWith("image/")?Image$1: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},is=e=>{if(e===0)return "0 Bytes";let t=1024,n=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]},Ef=(e,t,n)=>{let r=[];return t&&e.size>t&&r.push({code:"file-too-large",message:`File is larger than ${is(t)}`}),n&&n.length>0&&(n.some(a=>{if(a.startsWith("."))return e.name.toLowerCase().endsWith(a.toLowerCase());if(a.endsWith("/*")){let s=a.slice(0,-2);return e.type.startsWith(s)}return e.type===a})||r.push({code:"file-invalid-type",message:`File type not accepted. Accepted: ${n.join(", ")}`})),r},Lf=X.forwardRef(({className:e,variant:t,size:n,onFilesChange:r,onFilesRejected:o,onFileRemove:a,files:s=[],showFileList:i=true,children:l,maxSize:c=10*1024*1024,accept:d,multiple:m=true,disabled:f,...p},g)=>{let[h,b]=X.useState(false),[v,x]=X.useState(false),[y,w]=X.useState([]),C=X.useRef(null),R=X.useCallback(L=>{if(!L||L.length===0)return;let I=Array.from(L),V=[],O=[];(m?I:[I[0]]).forEach(K=>{let $=Ef(K,c,d);$.length>0?O.push({file:K,errors:$}):V.push(K);}),w(O),V.length>0&&r?.(V),O.length>0&&o?.(O);},[c,d,m,r,o]),N=X.useCallback(L=>{if(L.preventDefault(),L.stopPropagation(),!f&&(b(true),L.dataTransfer.items)){let V=Array.from(L.dataTransfer.items).some(O=>{if(O.kind!=="file")return true;if(d&&d.length>0){let A=O.type;return !d.some(K=>K.endsWith("/*")?A.startsWith(K.slice(0,-2)):A===K)}return false});x(V);}},[f,d]),T=X.useCallback(L=>{L.preventDefault(),L.stopPropagation(),!f&&(L.dataTransfer.dropEffect="copy");},[f]),P=X.useCallback(L=>{L.preventDefault(),L.stopPropagation();let I=L.currentTarget.getBoundingClientRect(),V=L.clientX,O=L.clientY;(V<I.left||V>I.right||O<I.top||O>I.bottom)&&(b(false),x(false));},[]),k=X.useCallback(L=>{L.preventDefault(),L.stopPropagation(),b(false),x(false),!f&&R(L.dataTransfer.files);},[f,R]),E=X.useCallback(()=>{f||C.current?.click();},[f]),M=X.useCallback(L=>{R(L.target.files),L.target.value="";},[R]),S=X.useCallback(L=>{f||(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),C.current?.click());},[f]),H=v?"error":h?"active":t,D=d?.join(",");return jsxs("div",{ref:g,className:u("space-y-4",e),...p,children:[jsxs("div",{role:"button",tabIndex:f?-1:0,onDragEnter:N,onDragOver:T,onDragLeave:P,onDrop:k,onClick:E,onKeyDown:S,className:u(kf({variant:H,size:n}),f&&"opacity-50 cursor-not-allowed",!f&&"cursor-pointer focus:outline-none"),"aria-disabled":f,children:[jsx("input",{ref:C,type:"file",accept:D,multiple:m,disabled:f,onChange:M,className:"sr-only",tabIndex:-1}),l||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:h?"Drop files here":"Drop files or click to upload"}),jsxs("p",{className:"text-xs text-muted-foreground",children:[c&&`Max ${is(c)}`,d&&d.length>0&&` \u2022 ${d.join(", ")}`]})]})]})]}),y.length>0&&jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:y.map(({file:L,errors:I})=>jsxs("div",{children:[jsx("span",{className:"font-medium",children:L.name}),":"," ",I.map(V=>V.message).join(", ")]},L.name))}),i&&s.length>0&&jsx("div",{className:"space-y-2",children:s.map(L=>{let I=Pf(L.file);return jsxs("div",{className:u("flex items-center gap-3 rounded-lg border p-3",L.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(I,{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:L.file.name}),jsxs("p",{className:"text-xs text-muted-foreground",children:[is(L.file.size),L.error&&jsx("span",{className:"ml-2 text-danger",children:L.error})]}),L.progress!==void 0&&L.progress<100&&jsx(_a,{value:L.progress,className:"mt-2 h-1"})]}),jsxs(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-foreground",onClick:V=>{V.stopPropagation(),a?.(L.file);},children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Remove"})]})]},L.id)})})]})});Lf.displayName="FileUpload";var Zw=`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")`,Df=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}}),qo=X.forwardRef(({color:e,isSelected:t,showTransparency:n=true,onSelect:r,size:o,shape:a,interactive:s,className:i,onClick:l,disabled:c,selectedRingColor:d,...m},f)=>jsx("button",{ref:f,type:"button",disabled:c,onClick:h=>{l?.(h),r?.(e);},className:u(Df({size:o,shape:a,interactive:s??(!!r||!!l)}),t&&"ring-2 ring-offset-2",i),style:{backgroundImage:n?Zw:void 0,backgroundSize:n?"8px 8px":void 0,...t&&{"--tw-ring-color":d||"var(--color-foreground)"}},"aria-label":`Color ${e}`,"aria-pressed":t,...m,children:jsx("span",{className:"absolute inset-0 rounded-[inherit]",style:{backgroundColor:e}})}));qo.displayName="ColorSwatch";var Hf=cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),If=X.forwardRef(({value:e,defaultValue:t,onChange:n,layout:r,columns:o=6,colors:a,swatchSize:s="md",swatchShape:i="square",disabled:l,selectedRingColor:c,className:d,style:m,...f},p)=>{let[g,h]=X.useState(t),b=e??g,v=X.useCallback(y=>{l||(e===void 0&&h(y),n?.(y));},[e,n,l]),x=y=>y.toLowerCase();return jsx("div",{ref:p,role:"listbox","aria-label":"Color options",className:u(Hf({layout:r}),d),style:{...r==="grid"?{gridTemplateColumns:`repeat(${o}, 1fr)`}:{},...m},...f,children:a.map(y=>{let w=b?x(b)===x(y):false;return jsx(qo,{role:"option",color:y,size:s,shape:i,isSelected:w,onSelect:v,disabled:l,selectedRingColor:c,"aria-selected":w},y)})})});If.displayName="ColorSwatchPicker";var eC=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],Vf={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},Af=X.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:n,disabled:r,presets:o=eC,showInput:a=true,size:s="md",className:i,variant:l="full"},c)=>{let[d,m]=X.useState(e??t),f=X.useId();X.useEffect(()=>{e!==void 0&&m(e);},[e]);let p=b=>{m(b),n?.(b);},g=b=>{m(b),n?.(b);},h=b=>{let v=b.target.value.toUpperCase();m(v),n?.(v);};return l==="simple"?jsxs("label",{className:u("relative rounded-md border border-input shadow-sm transition-colors cursor-pointer hover:border-foreground focus-within:border-foreground overflow-hidden",r&&"opacity-50 cursor-not-allowed",Vf[s],i),children:[jsx("input",{type:"color",value:d,onChange:h,disabled:r,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed",id:f}),jsx("div",{className:"h-full w-full",style:{backgroundColor:d}})]}):jsxs(ot,{children:[jsx(qn,{ref:c,disabled:r,className:u("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",Vf[s],i),style:{backgroundColor:d},"aria-label":`Color picker, current color: ${d}`}),jsx(at,{className:"w-auto p-3",align:"start",children:jsxs("div",{className:"space-y-3",children:[jsx(HexColorPicker,{color:d,onChange:p,className:"!w-[200px]"}),a&&jsxs("div",{className:"space-y-1.5",children:[jsx(Cr,{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:d}}),jsx(HexColorInput,{id:"color-input",color:d,onChange:p,prefixed:true,className:"flex h-9 w-full rounded-md border border-input bg-background text-foreground px-3 py-2 font-mono text-sm uppercase focus:outline-none focus:border-foreground disabled:cursor-not-allowed disabled:opacity-50"})]})]}),o.length>0&&jsxs("div",{className:"space-y-1.5",children:[jsx(Cr,{className:"text-xs",children:"Presets"}),jsx("div",{className:"flex flex-wrap gap-1.5",children:o.map(b=>jsx(qo,{color:b,size:"sm",isSelected:d.toLowerCase()===b.toLowerCase(),onSelect:g},b))})]})]})})]})});Af.displayName="ColorPicker";var zf=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"}}),Ji=e=>String(e).padStart(2,"0"),aC=e=>{let[t,n]=e.split(":").map(Number);return {hours:t||0,minutes:n||0}},sC=(e,t)=>`${Ji(e)}:${Ji(t)}`,Of=X.forwardRef(({className:e,size:t,value:n,onChange:r,use24Hour:o=true,minuteStep:a=1,showPicker:s=true,minTime:i,maxTime:l,disabled:c,...d},m)=>{let[f,p]=X.useState(n??""),[g,h]=X.useState(false);X.useEffect(()=>{n!==void 0&&p(n);},[n]);let{hours:b,minutes:v}=aC(f||"00:00"),x=P=>{let k=P.target.value;p(k),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(k)&&r?.(k);},y=(P,k)=>{let E=Math.max(0,Math.min(23,P)),M=Math.max(0,Math.min(59,k)),S=sC(E,M);p(S),r?.(S);},w=()=>y(b+1,v),C=()=>y(b-1,v),R=()=>y(b,v+a),N=()=>y(b,v-a),T=({value:P,onIncrement:k,onDecrement:E})=>jsxs("div",{className:"flex flex-col items-center",children:[jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:k,disabled:c,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:Ji(P)}),jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:E,disabled:c,children:jsx(ChevronDown,{className:"h-4 w-4"})})]});return jsxs("div",{className:"relative flex items-center",children:[jsx("input",{ref:m,type:"time",value:f,onChange:x,disabled:c,className:u(zf({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...d}),s&&jsxs(ot,{open:g,onOpenChange:h,children:[jsxs(qn,{type:"button",className:"absolute right-1 h-7 w-7 p-0 inline-flex items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:c,children:[jsx(Clock,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Pick time"})]}),jsxs(at,{className:"w-auto p-4",align:"end",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(T,{value:b,onIncrement:w,onDecrement:C,max:23}),jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsx(T,{value:v,onIncrement:R,onDecrement:N,max:59})]}),jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsx(ae,{variant:"bordered",size:"sm",onClick:()=>{let P=new Date;y(P.getHours(),P.getMinutes());},children:"Now"}),jsx(ae,{size:"sm",onClick:()=>h(false),children:"Done"})]})]})]})]})});Of.displayName="TimeInput";var Bf=cva("flex h-10 w-full border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors 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"}}),lC={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},cC=(e,t)=>{try{return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(a=>a.type==="currency")?.value??e}catch{return e}},el=(e,t,n,r)=>{let o=e.toFixed(t),[a,s]=o.split("."),i=a.replace(/\B(?=(\d{3})+(?!\d))/g,n);return s?`${i}${r}${s}`:i},Ff=(e,t,n)=>{if(!e)return;let r=e.replace(new RegExp(`\\${t}`,"g"),"");r=r.replace(n,"."),r=r.replace(/[^0-9.-]/g,"");let o=parseFloat(r);return isNaN(o)?void 0:o},Kf=X.forwardRef(({className:e,size:t,value:n,defaultValue:r,onChange:o,currency:a="USD",locale:s="en-US",decimals:i=2,min:l,max:c,showCurrency:d=true,currencyPosition:m="prefix",currencySymbol:f,thousandSeparator:p=",",decimalSeparator:g=".",radius:h="md",disabled:b,placeholder:v,...x},y)=>{let[w,C]=X.useState(r),[R,N]=X.useState(""),[T,P]=X.useState(false),k=n!==void 0?n:w,E=f??cC(a,s);X.useEffect(()=>{!T&&k!==void 0&&N(el(k,i,p,g));},[k,i,p,g,T]);let M=I=>{let V=I.target.value;if(!V){N(""),n===void 0&&C(void 0),o?.(void 0);return}if(!new RegExp(`^[0-9${p}${g}.-]*$`).test(V))return;N(V);let A=Ff(V,p,g);if(A!==void 0){let K=A;l!==void 0&&A<l&&(K=l),c!==void 0&&A>c&&(K=c),n===void 0&&C(K),o?.(K);}},S=()=>{P(true),k!==void 0&&N(k.toString().replace(".",g));},H=()=>{P(false),N(k!==void 0?el(k,i,p,g):"");},D=d&&m==="prefix"&&jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:E}),L=d&&m==="suffix"&&jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:E});return jsxs("div",{className:"relative flex items-center",children:[D&&jsx("div",{className:"absolute left-3 pointer-events-none",children:D}),jsx("input",{ref:y,type:"text",inputMode:"decimal",value:R,onChange:M,onFocus:S,onBlur:H,disabled:b,placeholder:v??`0${g}${"0".repeat(i)}`,className:u(Bf({size:t}),lC[h],D&&"pl-8",L&&"pr-8","text-right",e),style:{borderColor:T?"var(--color-foreground)":void 0},...x}),L&&jsx("div",{className:"absolute right-3 pointer-events-none",children:L})]})});Kf.displayName="CurrencyInput";var $f=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors 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"}}),tl={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:"#####-####"}},mC=(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}},rr=e=>["#","A","*"].includes(e),cs=(e,t,n)=>{let r="",o=0;for(let a=0;a<t.length&&o<=e.length;a++){let s=t[a];if(rr(s)){if(o<e.length){let i=e[o];mC(i,s)?(r+=i,o++):(o++,a--);}}else (o<e.length||n)&&(r+=s);}return r},nl=(e,t)=>{let n="";for(let r=0;r<e.length&&r<t.length;r++){let o=t[r];rr(o)&&(n+=e[r]);}return n},Gf=(e,t)=>e.split("").map(n=>rr(n)?t:n).join(""),pC=(e,t,n)=>{let r=0;for(let i=0;i<n&&i<e.length&&i<t.length;i++)rr(t[i])&&r++;let a=0,s=0;for(let i=0;i<t.length&&s<r;i++)a++,rr(t[i])&&s++;for(;a<t.length&&!rr(t[a]);)a++;return Math.min(a,e.length)},Uf=X.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,mask:a,maskPlaceholder:s="_",showMaskPlaceholder:i=false,includeMaskChars:l=false,disabled:c,placeholder:d,...m},f)=>{let p=typeof a=="string"&&a in tl?tl[a].mask:a,[g,h]=X.useState(r),[b,v]=X.useState(""),[x,y]=X.useState(false),w=X.useRef(null),C=n!==void 0?n:g;X.useImperativeHandle(f,()=>w.current),X.useEffect(()=>{let P=cs(C,p,true);v(P);},[C,p]);let R=P=>{let k=P.target.value,E=P.target.selectionStart??0,M=k.replace(/[^\w]/g,""),S=cs(M,p,true),H=nl(S,p);v(S),n===void 0&&h(l?S:H),o?.(H,S),requestAnimationFrame(()=>{if(w.current){let D=pC(S,p,E);w.current.setSelectionRange(D,D);}});},N=P=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(P.key)||P.ctrlKey||P.metaKey)return;let k=w.current;if(!k)return;let E=k.selectionStart??0;if(P.key==="Backspace"&&E>0){let M=E-1;for(;M>0&&!rr(p[M]);)M--;let S=nl(b,p),H=0;for(let I=0;I<M&&I<p.length;I++)rr(p[I])&&H++;let D=S.slice(0,Math.max(0,H-1))+S.slice(H),L=cs(D,p,true);v(L),n===void 0&&h(l?L:D),o?.(D,L),P.preventDefault(),requestAnimationFrame(()=>{w.current&&w.current.setSelectionRange(M,M);});}},T=i?Gf(p,s):d;return jsx("input",{ref:w,type:"text",value:b,onChange:R,onKeyDown:N,onFocus:()=>y(true),onBlur:()=>y(false),disabled:c,placeholder:T,className:u($f({size:t}),e),style:{borderColor:x?"var(--color-foreground)":void 0},...m})});Uf.displayName="MaskedInput";var hC=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors 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"}}),Wf=[{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:"AT",name:"Austria",dialCode:"+43",flag:"\u{1F1E6}\u{1F1F9}",format:"### #######"},{code:"BE",name:"Belgium",dialCode:"+32",flag:"\u{1F1E7}\u{1F1EA}",format:"### ## ## ##"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"\u{1F1E7}\u{1F1F7}",format:"(##) #####-####"},{code:"BG",name:"Bulgaria",dialCode:"+359",flag:"\u{1F1E7}\u{1F1EC}",format:"### ### ###"},{code:"CA",name:"Canada",dialCode:"+1",flag:"\u{1F1E8}\u{1F1E6}",format:"(###) ###-####"},{code:"CN",name:"China",dialCode:"+86",flag:"\u{1F1E8}\u{1F1F3}",format:"### #### ####"},{code:"HR",name:"Croatia",dialCode:"+385",flag:"\u{1F1ED}\u{1F1F7}",format:"## ### ####"},{code:"CZ",name:"Czech Republic",dialCode:"+420",flag:"\u{1F1E8}\u{1F1FF}",format:"### ### ###"},{code:"DK",name:"Denmark",dialCode:"+45",flag:"\u{1F1E9}\u{1F1F0}",format:"## ## ## ##"},{code:"EG",name:"Egypt",dialCode:"+20",flag:"\u{1F1EA}\u{1F1EC}",format:"### ### ####"},{code:"FI",name:"Finland",dialCode:"+358",flag:"\u{1F1EB}\u{1F1EE}",format:"## ### ####"},{code:"FR",name:"France",dialCode:"+33",flag:"\u{1F1EB}\u{1F1F7}",format:"# ## ## ## ##"},{code:"DE",name:"Germany",dialCode:"+49",flag:"\u{1F1E9}\u{1F1EA}",format:"#### #######"},{code:"GR",name:"Greece",dialCode:"+30",flag:"\u{1F1EC}\u{1F1F7}",format:"### ### ####"},{code:"HK",name:"Hong Kong",dialCode:"+852",flag:"\u{1F1ED}\u{1F1F0}",format:"#### ####"},{code:"HU",name:"Hungary",dialCode:"+36",flag:"\u{1F1ED}\u{1F1FA}",format:"## ### ####"},{code:"IN",name:"India",dialCode:"+91",flag:"\u{1F1EE}\u{1F1F3}",format:"##### #####"},{code:"IL",name:"Israel",dialCode:"+972",flag:"\u{1F1EE}\u{1F1F1}",format:"##-###-####"},{code:"IT",name:"Italy",dialCode:"+39",flag:"\u{1F1EE}\u{1F1F9}",format:"### ### ####"},{code:"JP",name:"Japan",dialCode:"+81",flag:"\u{1F1EF}\u{1F1F5}",format:"##-####-####"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"\u{1F1F2}\u{1F1FD}",format:"### ### ####"},{code:"NL",name:"Netherlands",dialCode:"+31",flag:"\u{1F1F3}\u{1F1F1}",format:"## ########"},{code:"NZ",name:"New Zealand",dialCode:"+64",flag:"\u{1F1F3}\u{1F1FF}",format:"## ### ####"},{code:"NG",name:"Nigeria",dialCode:"+234",flag:"\u{1F1F3}\u{1F1EC}",format:"### ### ####"},{code:"NO",name:"Norway",dialCode:"+47",flag:"\u{1F1F3}\u{1F1F4}",format:"### ## ###"},{code:"PK",name:"Pakistan",dialCode:"+92",flag:"\u{1F1F5}\u{1F1F0}",format:"### #######"},{code:"PL",name:"Poland",dialCode:"+48",flag:"\u{1F1F5}\u{1F1F1}",format:"### ### ###"},{code:"PT",name:"Portugal",dialCode:"+351",flag:"\u{1F1F5}\u{1F1F9}",format:"### ### ###"},{code:"RO",name:"Romania",dialCode:"+40",flag:"\u{1F1F7}\u{1F1F4}",format:"### ### ###"},{code:"RU",name:"Russia",dialCode:"+7",flag:"\u{1F1F7}\u{1F1FA}",format:"(###) ###-##-##"},{code:"SA",name:"Saudi Arabia",dialCode:"+966",flag:"\u{1F1F8}\u{1F1E6}",format:"## ### ####"},{code:"RS",name:"Serbia",dialCode:"+381",flag:"\u{1F1F7}\u{1F1F8}",format:"## ### ####"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"\u{1F1F8}\u{1F1EC}",format:"#### ####"},{code:"SK",name:"Slovakia",dialCode:"+421",flag:"\u{1F1F8}\u{1F1F0}",format:"### ### ###"},{code:"SI",name:"Slovenia",dialCode:"+386",flag:"\u{1F1F8}\u{1F1EE}",format:"## ### ###"},{code:"ZA",name:"South Africa",dialCode:"+27",flag:"\u{1F1FF}\u{1F1E6}",format:"## ### ####"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"\u{1F1F0}\u{1F1F7}",format:"##-####-####"},{code:"ES",name:"Spain",dialCode:"+34",flag:"\u{1F1EA}\u{1F1F8}",format:"### ### ###"},{code:"SE",name:"Sweden",dialCode:"+46",flag:"\u{1F1F8}\u{1F1EA}",format:"##-### ## ##"},{code:"CH",name:"Switzerland",dialCode:"+41",flag:"\u{1F1E8}\u{1F1ED}",format:"## ### ## ##"},{code:"TW",name:"Taiwan",dialCode:"+886",flag:"\u{1F1F9}\u{1F1FC}",format:"### ### ###"},{code:"TR",name:"Turkey",dialCode:"+90",flag:"\u{1F1F9}\u{1F1F7}",format:"(###) ### ## ##"},{code:"UA",name:"Ukraine",dialCode:"+380",flag:"\u{1F1FA}\u{1F1E6}",format:"## ### ## ##"},{code:"AE",name:"United Arab Emirates",dialCode:"+971",flag:"\u{1F1E6}\u{1F1EA}",format:"## ### ####"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"\u{1F1EC}\u{1F1E7}",format:"#### ### ####"},{code:"US",name:"United States",dialCode:"+1",flag:"\u{1F1FA}\u{1F1F8}",format:"(###) ###-####"}],ds=(e,t)=>{let n=e.replace(/\D/g,""),r="",o=0;for(let a=0;a<t.length&&o<n.length;a++)t[a]==="#"?(r+=n[o],o++):r+=t[a];return r},xC=e=>e.replace(/#/g,"_"),_f=X.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,country:a,defaultCountry:s="TR",onCountryChange:i,countries:l=Wf,showCountrySelect:c=true,showDialCode:d=false,disabled:m,placeholder:f,radius:p="md",...g},h)=>{let[b,v]=X.useState(r),[x,y]=X.useState(a??s),[w,C]=X.useState(false),[R,N]=X.useState(false),[T,P]=X.useState(false),[k,E]=X.useState({top:0,left:0,width:0}),M=X.useRef(null),S=X.useRef(null),H=n!==void 0?n:b,D=a??x,L=l.find(G=>G.code===D)??l[0],I=ds(H,L.format);X.useEffect(()=>{P(true);},[]),X.useEffect(()=>{if(R&&M.current){let G=M.current.getBoundingClientRect();E({top:G.bottom+4,left:G.left,width:Math.max(G.width,280)});}},[R]),X.useEffect(()=>{if(!R)return;let G=Y=>{M.current&&!M.current.contains(Y.target)&&S.current&&!S.current.contains(Y.target)&&N(false);};return document.addEventListener("mousedown",G),()=>document.removeEventListener("mousedown",G)},[R]),X.useEffect(()=>{if(!R)return;let G=Y=>{Y.key==="Escape"&&N(false);};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[R]);let V=G=>{let F=G.target.value.replace(/\D/g,"");n===void 0&&v(F);let z=ds(F,L.format),j=`${L.dialCode} ${z}`;o?.(F,j,L);},O=G=>{let Y=l.find(j=>j.code===G);if(!Y)return;a===void 0&&y(G),i?.(Y);let F=ds(H,Y.format),z=`${Y.dialCode} ${F}`;o?.(H,z,Y),N(false);},A=t==="sm"?"h-9":t==="lg"?"h-11":"h-10",K=w||R;return jsxs("div",{className:u("flex border bg-background transition-colors",{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}[p],m&&"cursor-not-allowed opacity-50"),style:{borderColor:K?"var(--color-foreground)":"var(--color-border)"},children:[c&&jsxs(Fragment,{children:[jsxs("button",{ref:M,type:"button",disabled:m,onClick:()=>N(!R),className:u("flex items-center justify-between bg-transparent px-3 py-2 text-sm focus:outline-none disabled:cursor-not-allowed disabled:opacity-50","w-[100px] shrink-0 border-r",A),style:{borderColor:K?"var(--color-foreground)":"var(--color-border)"},children:[jsxs("span",{className:"flex items-center gap-1.5",children:[jsx("span",{children:L.flag}),jsx("span",{className:"text-xs text-muted-foreground",children:L.dialCode})]}),jsx(ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",R&&"rotate-180")})]}),T&&R&&Ba.createPortal(jsx("div",{ref:S,className:"fixed z-50 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",style:{top:k.top,left:k.left,minWidth:k.width},children:jsx(ke,{style:{maxHeight:300},children:jsx("div",{className:"p-1",children:l.map(G=>jsxs("div",{role:"option","aria-selected":G.code===D,onClick:()=>O(G.code),className:"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:G.code===D&&jsx(Check,{className:"h-4 w-4"})}),jsxs("span",{className:"flex items-center gap-2",children:[jsx("span",{children:G.flag}),jsx("span",{className:"flex-1",children:G.name}),jsx("span",{className:"text-xs text-muted-foreground",children:G.dialCode})]})]},G.code))})})}),document.body)]}),jsxs("div",{className:"relative flex-1",children:[d&&!c&&jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:L.dialCode}),jsx("input",{ref:h,type:"tel",inputMode:"tel",value:I,onChange:V,onFocus:()=>C(true),onBlur:()=>C(false),disabled:m,placeholder:f??xC(L.format),className:u("flex h-10 w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",t==="sm"&&"h-8 px-2 text-xs",t==="lg"&&"h-12 px-4 text-base",d&&!c&&"pl-12",e),...g})]})]})});_f.displayName="PhoneInput";var Xf=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",bordered:"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:"bordered",size:"md",sticky:false}}),qf=X.forwardRef(({className:e,variant:t,size:n,sticky:r,brand:o,children:a,mobileBreakpoint:s="md",...i},l)=>{let[c,d]=X.useState(false),m={sm:"hidden sm:flex",md:"hidden md:flex",lg:"hidden lg:flex"}[s],f={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden"}[s];return jsxs("nav",{ref:l,className:u(Xf({variant:t,size:n,sticky:r,className:e})),...i,children:[jsxs("div",{className:"flex items-center justify-between w-full",children:[o&&jsx("div",{className:"flex-shrink-0",children:o}),jsx("div",{className:u("items-center gap-4 flex-1 justify-end",m),children:a}),jsx("button",{type:"button",className:u("p-2 rounded-md hover:bg-accent hover:text-accent-foreground transition-colors",f),onClick:()=>d(!c),"aria-label":c?"Close menu":"Open menu","aria-expanded":c,children:c?jsx(X$1,{className:"h-5 w-5"}):jsx(Menu,{className:"h-5 w-5"})})]}),c&&jsx("div",{className:u("absolute top-full left-0 right-0 flex flex-col gap-2 p-4 bg-background border-b border-border shadow-lg",f),children:a})]})});qf.displayName="Navbar";var Zf=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center gap-2 font-semibold text-lg",e),...t}));Zf.displayName="NavbarBrand";var Qf=X.forwardRef(({className:e,justify:t="start",...n},r)=>{let o={start:"justify-start",center:"justify-center",end:"justify-end"}[t];return jsx("div",{ref:r,className:u("flex items-center gap-4",o,e),...n})});Qf.displayName="NavbarContent";var Jf=X.forwardRef(({className:e,isActive:t,...n},r)=>jsx("div",{ref:r,className:u("flex items-center",t&&"text-primary font-medium",e),...n}));Jf.displayName="NavbarItem";var eg=X.forwardRef(({className:e,isActive:t,...n},r)=>jsx("a",{ref:r,className:u("text-sm font-medium transition-colors hover:text-primary",t?"text-primary":"text-muted-foreground",e),...n}));eg.displayName="NavbarLink";var ng=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",bordered:"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:"bordered",size:"md",underline:"hover"}}),rg=X.forwardRef(({className:e,variant:t,size:n,underline:r,isExternal:o,showExternalIcon:a=true,isDisabled:s,children:i,...l},c)=>{let d=o?{target:"_blank",rel:"noopener noreferrer"}:{};return jsxs("a",{ref:c,className:u(ng({variant:t,size:n,underline:r,className:e}),s&&"pointer-events-none opacity-50"),"aria-disabled":s,...d,...l,children:[i,o&&a&&jsx(ExternalLink,{className:"h-3 w-3 ml-0.5","aria-hidden":"true"})]})});rg.displayName="Link";var og=cva("fixed z-50 transition-all duration-300",{variants:{position:{"bottom-right":"bottom-6 right-6","bottom-left":"bottom-6 left-6","bottom-center":"bottom-6 left-1/2 -translate-x-1/2"}},defaultVariants:{position:"bottom-right"}}),ag=X.forwardRef(({className:e,position:t,threshold:n=400,icon:r,behavior:o="smooth",variant:a="solid",color:s="default",size:i="md",radius:l="full",target:c,onVisibilityChange:d,onClick:m,...f},p)=>{let[g,h]=X.useState(false);X.useEffect(()=>{let x=c?.current||window,y=()=>{let C=(c?.current?c.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>n;C!==g&&(h(C),d?.(C));};return x.addEventListener("scroll",y,{passive:true}),y(),()=>{x.removeEventListener("scroll",y);}},[n,c,g,d]);let b=x=>{c?.current?c.current.scrollTo({top:0,behavior:o}):window.scrollTo({top:0,behavior:o}),m?.(x);},v=i==="sm"?"h-4 w-4":i==="lg"?"h-6 w-6":"h-5 w-5";return jsx("div",{className:u(og({position:t}),g?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",e),children:jsx(ae,{ref:p,type:"button",variant:a,color:s,size:i,isIconOnly:true,radius:l,onClick:b,"aria-label":"Back to top",className:"shadow-lg",...f,children:r||jsx(ArrowUp,{className:v})})})});ag.displayName="BackTop";var HC=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),IC=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),sg=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"}},defaultVariants:{radius:"sm"}}),ps=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-xl"}},defaultVariants:{radius:"sm"}}),ig=X.createContext(null),ar=()=>{let e=X.useContext(ig);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},lg=X.createContext(null),Qo=()=>{let e=X.useContext(lg);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},ol=X.createContext(null),cg=X.createContext(null),dg=X.forwardRef(({className:e,children:t,radius:n="sm",...r},o)=>{let[a,s]=X.useState(null);return jsx(ig.Provider,{value:{activeMenu:a,setActiveMenu:s,radius:n},children:jsx("div",{ref:o,role:"menubar",className:u("flex h-10 items-center space-x-1 border bg-background p-1",HC({radius:n}),e),...r,children:t})})});dg.displayName="Menubar";var ug=({children:e})=>{let{activeMenu:t,setActiveMenu:n}=ar(),r=X.useId(),o=X.useRef(null),a=t===r,s=X.useCallback(i=>{n(i?r:null);},[r,n]);return jsx(lg.Provider,{value:{menuId:r,triggerRef:o,open:a,onOpenChange:s},children:e})};ug.displayName="MenubarMenu";var mg=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));mg.displayName="MenubarGroup";var pg=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};pg.displayName="MenubarPortal";var fg=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),s=t!==void 0,i=s?t:o,l=X.useRef(null),c=X.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(ol.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};fg.displayName="MenubarSub";var gg=X.forwardRef(({value:e="",onValueChange:t,className:n,...r},o)=>jsx(cg.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsx("div",{ref:o,role:"group",className:n,...r})}));gg.displayName="MenubarRadioGroup";var bg=X.forwardRef(({className:e,onClick:t,onMouseEnter:n,...r},o)=>{let{activeMenu:a,setActiveMenu:s,radius:i}=ar(),{menuId:l,triggerRef:c,open:d,onOpenChange:m}=Qo(),f=g=>{t?.(g),m(!d);},p=g=>{n?.(g),a&&a!==l&&(s(l),document.activeElement instanceof HTMLElement&&document.activeElement.blur());};return jsx("button",{ref:g=>{c.current=g,typeof o=="function"?o(g):o&&(o.current=g);},type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":d,"data-state":d?"open":"closed",className:u("flex cursor-default select-none items-center px-3 py-1.5 text-sm font-medium outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",IC({radius:i}),e),onClick:f,onMouseEnter:p,...r})});bg.displayName="MenubarTrigger";var vg=X.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let{radius:i}=ar(),l=X.useContext(ol);if(!l)throw new Error("MenubarSubTrigger must be used within MenubarSub");let{open:c,onOpenChange:d,triggerRef:m}=l,f=g=>{r?.(g),d(true);},p=g=>{o?.(g),d(false);};return jsxs("div",{ref:g=>{m.current=g,typeof s=="function"?s(g):s&&(s.current=g);},role:"menuitem","aria-haspopup":"menu","aria-expanded":c,"data-state":c?"open":"closed",className:u("flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",ps({radius:i}),t&&"pl-8",e),onMouseEnter:f,onMouseLeave:p,...a,children:[n,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});vg.displayName="MenubarSubTrigger";var hg=X.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let{radius:s}=ar(),i=X.useContext(ol);if(!i)throw new Error("MenubarSubContent must be used within MenubarSub");let{open:l,onOpenChange:c,triggerRef:d}=i,[m,f]=X.useState({top:0,left:0}),[p,g]=X.useState(false),h=X.useRef(null);X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!l||!d.current||!h.current)return;(()=>{if(!d.current||!h.current)return;let y=d.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),C=y.top,R=y.right+t;R+w.width>window.innerWidth&&(R=y.left-w.width-t),f({top:C,left:R});})();},[l,t,d]);let b=x=>{n?.(x),c(true);},v=x=>{r?.(x),c(false);};return !p||!l?null:Ba.createPortal(jsx("div",{ref:x=>{h.current=x,typeof a=="function"?a(x):a&&(a.current=x);},role:"menu","data-state":l?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",sg({radius:s}),e),style:{top:m.top,left:m.left},onMouseEnter:b,onMouseLeave:v,...o}),document.body)});hg.displayName="MenubarSubContent";var xg=X.forwardRef(({className:e,align:t="start",alignOffset:n=-4,sideOffset:r=8,children:o,...a},s)=>{let{radius:i}=ar(),{triggerRef:l,open:c,onOpenChange:d}=Qo(),[m,f]=X.useState({top:0,left:0}),[p,g]=X.useState(false),h=X.useRef(null);return X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!c||!l.current||!h.current)return;let b=()=>{if(!l.current||!h.current)return;let v=l.current.getBoundingClientRect(),x=h.current.getBoundingClientRect(),y=v.bottom+r,w=v.left+n;t==="center"?w=v.left+v.width/2-x.width/2:t==="end"&&(w=v.right-x.width-n),f({top:y,left:w});};return b(),window.addEventListener("resize",b),window.addEventListener("scroll",b,true),()=>{window.removeEventListener("resize",b),window.removeEventListener("scroll",b,true);}},[c,t,n,r,l]),X.useEffect(()=>{if(!c)return;let b=v=>{let x=v.target;h.current&&!h.current.contains(x)&&l.current&&!l.current.contains(x)&&d(false);};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[c,d,l]),X.useEffect(()=>{if(!c)return;let b=v=>{v.key==="Escape"&&d(false);};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[c,d]),!p||!c?null:Ba.createPortal(jsx("div",{ref:b=>{h.current=b,typeof s=="function"?s(b):s&&(s.current=b);},role:"menu","data-state":c?"open":"closed",className:u("fixed z-50 min-w-[12rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",sg({radius:i}),e),style:{top:m.top,left:m.left},...a,children:o}),document.body)});xg.displayName="MenubarContent";var yg=X.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{radius:i}=ar(),{onOpenChange:l}=Qo(),c=d=>{if(n){d.preventDefault();return}o?.(d),r?.(),l(false);};return jsx("div",{ref:s,role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,className:u("relative flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ps({radius:i}),t&&"pl-8",!n&&"cursor-pointer",e),onClick:c,...a})});yg.displayName="MenubarItem";var Rg=X.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{radius:l}=ar(),{onOpenChange:c}=Qo(),d=m=>{if(o){m.preventDefault();return}a?.(m),r?.(!n),c(false);};return jsxs("div",{ref:i,role:"menuitemcheckbox","aria-checked":n,tabIndex:o?-1:0,"aria-disabled":o,"data-disabled":o?"":void 0,"data-state":n?"checked":"unchecked",className:u("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ps({radius:l}),!o&&"cursor-pointer",e),onClick:d,...s,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n&&jsx(Check,{className:"h-4 w-4"})}),t]})});Rg.displayName="MenubarCheckboxItem";var wg=X.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{radius:i}=ar(),{onOpenChange:l}=Qo(),c=X.useContext(cg),d=c?.value===n,m=f=>{if(r){f.preventDefault();return}o?.(f),c?.onValueChange(n),l(false);};return jsxs("div",{ref:s,role:"menuitemradio","aria-checked":d,tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,"data-state":d?"checked":"unchecked",className:u("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ps({radius:i}),!r&&"cursor-pointer",e),onClick:m,...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d&&jsx(Circle,{className:"h-2 w-2 fill-current"})}),t]})});wg.displayName="MenubarRadioItem";var Cg=X.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:u("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Cg.displayName="MenubarLabel";var Tg=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));Tg.displayName="MenubarSeparator";var Mg=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Mg.displayName="MenubarShortcut";var Ng=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"}}),kg=X.forwardRef(({className:e,orientation:t,size:n,currentStep:r=0,children:o,...a},s)=>{let i=X.Children.toArray(o);return jsx("div",{ref:s,className:u(Ng({orientation:t,size:n,className:e})),...a,children:i.map((l,c)=>X.isValidElement(l)?X.cloneElement(l,{...l.props,stepNumber:c+1,status:l.props.status||(c<r?"completed":c===r?"current":"upcoming"),isLast:c===i.length-1,orientation:t,size:n}):l)})});kg.displayName="Steps";var Pg=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"}}),AC=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"}}),zC=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"}}),Eg=X.forwardRef(({className:e,orientation:t="horizontal",size:n="md",title:r,description:o,icon:a,status:s="upcoming",stepNumber:i,isLast:l,...c},d)=>jsxs("div",{ref:d,className:u(Pg({orientation:t,size:n,className:e}),!l&&t==="horizontal"&&"flex-1"),...c,children:[jsx("div",{className:u("flex items-center",t==="vertical"&&"flex-col items-start"),children:jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:u(AC({status:s,size:n})),children:s==="completed"?jsx(Check,{className:n==="sm"?"h-3 w-3":n==="lg"?"h-5 w-5":"h-4 w-4"}):a||i}),(r||o)&&jsxs("div",{className:"flex flex-col",children:[r&&jsx("span",{className:u("font-medium",n==="sm"&&"text-sm",n==="lg"&&"text-lg",s==="upcoming"&&"text-muted-foreground"),children:r}),o&&jsx("span",{className:u("text-muted-foreground",n==="sm"&&"text-xs",n==="md"&&"text-sm",n==="lg"&&"text-base"),children:o})]})]})}),!l&&jsx("div",{className:u(zC({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Eg.displayName="Step";var Sg=cva("flex flex-col select-none",{variants:{variant:{default:"",bordered:"rounded-lg border",filled:"bg-muted/30 rounded-lg p-2"},size:{sm:"[--tree-indent:16px] [--tree-item-height:28px] text-xs",md:"[--tree-indent:20px] [--tree-item-height:32px] text-sm",lg:"[--tree-indent:24px] [--tree-item-height:40px] text-base"}},defaultVariants:{variant:"default",size:"md"}}),Dg=cva("flex items-center py-1.5 px-2 rounded-sm transition-colors",{variants:{size:{sm:"py-1 px-1.5 text-sm min-h-[var(--tree-item-height)]",md:"py-1.5 px-2 text-sm min-h-[var(--tree-item-height)]",lg:"py-2 px-3 text-base min-h-[var(--tree-item-height)]"},isSelected:{true:"bg-primary/10 text-primary",false:""},isDragging:{true:"opacity-50",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed",false:""},isHoverable:{true:"hover:bg-muted/50 cursor-pointer",false:""}},defaultVariants:{size:"md",isSelected:false,isDragging:false,isDisabled:false,isHoverable:true}}),Hg=X.createContext(null),jC=()=>{let e=X.useContext(Hg);if(!e)throw new Error("TreeNodeComponent must be used within Tree");return e},WC=({checked:e,indeterminate:t,disabled:n,onClick:r})=>jsx("button",{type:"button",role:"checkbox","aria-checked":t?"mixed":e,disabled:n,onClick:o=>{o.stopPropagation(),n||r(o);},className:u("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",(e||t)&&"bg-primary text-primary-foreground",n&&"cursor-not-allowed opacity-50"),children:(e||t)&&jsx("span",{className:"flex items-center justify-center text-current",children:t?jsx(Minus,{className:"h-3 w-3"}):jsx(Check,{className:"h-3 w-3"})})}),Ig=({node:e,level:t,isLast:n=false,parentIsLastPath:r=[]})=>{let{expandedKeys:o,toggleExpand:a,selectedKeys:s,handleSelect:i,selectable:l,checkedKeys:c,halfCheckedKeys:d,handleCheck:m,checkable:f,draggable:p,draggedNode:g,setDraggedNode:h,dragOverKey:b,dragOverPosition:v,setDragOver:x,handleDrop:y,allowDrop:w,onDragStart:C,onDragOver:R,onDragEnter:N,onDragLeave:T,onDragEnd:P,showLine:k,showIcon:E,showHandle:M,dragIcon:S,icon:H,leafIcon:D,folderIcon:L,folderOpenIcon:I,blockNode:V,disabled:O,size:A,getAllKeys:K}=jC(),$=e.children&&e.children.length>0,G=e.isLeaf??!$,Y=o.has(e.key),F=s.has(e.key),z=c.has(e.key),j=d.has(e.key),W=g?.key===e.key,B=b===e.key,Z=!!(O||e.disabled),ue=l&&e.selectable!==false,U=f&&e.checkable!==false,Ce=X.useMemo(()=>Z?false:typeof p=="boolean"?p:typeof p=="function"?p(e):p&&typeof p=="object"?p.nodeDraggable?p.nodeDraggable(e):true:false,[p,e,Z]),Q=X.useMemo(()=>S!==void 0?S:typeof p=="object"&&p.icon!==void 0?p.icon:jsx(GripVertical,{className:"h-4 w-4"}),[S,p]),le=X.useMemo(()=>e.icon?e.icon:H?typeof H=="function"?H({expanded:Y,isLeaf:G}):H:G?D:Y?I:L,[e.icon,H,Y,G,D,L,I]),Fe=q=>{if(!Ce)return;q.stopPropagation(),q.dataTransfer.effectAllowed="move";let De=q.currentTarget,de=De.cloneNode(true),je=document.documentElement.classList.contains("dark"),We=je?"#0a0a0a":"#ffffff",Gn=je?"#27272a":"#e4e4e7";de.style.cssText=`
43
+ `;return jsxs(Fragment,{children:[jsx("style",{dangerouslySetInnerHTML:{__html:x}}),jsx("div",{ref:c,id:g,onMouseEnter:()=>m(true),onMouseLeave:()=>m(false),style:{...s,...(()=>{if(!r)return {};let C=m0[o],R=t==="vertical"||t==="both",T=t==="horizontal"||t==="both",M=[R&&f.top&&`linear-gradient(to bottom, transparent, black ${C})`,R&&f.bottom&&`linear-gradient(to top, transparent, black ${C})`,T&&f.left&&`linear-gradient(to right, transparent, black ${C})`,T&&f.right&&`linear-gradient(to left, transparent, black ${C})`].filter(Boolean);return M.length===0?{}:{maskImage:M.join(", "),WebkitMaskImage:M.join(", "),maskComposite:"intersect",WebkitMaskComposite:"source-in"}})()},className:u(t==="vertical"&&"h-full w-full overflow-y-auto overflow-x-hidden",t==="horizontal"&&"w-full overflow-x-auto overflow-y-hidden",t==="both"&&"h-full w-full overflow-auto",e),...i,children:a})]})});ke.displayName="ScrollArea";var Nd=cva("flex w-full cursor-pointer items-center justify-between border border-zinc-300 dark:border-zinc-700 bg-background px-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"min-h-9 py-1.5 text-xs",md:"min-h-10 py-2",lg:"min-h-11 py-2.5 text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",radius:"md"}}),Aa=X.forwardRef(({options:e,multiple:t=false,value:n,defaultValue:r,onValueChange:o,placeholder:a="Select...",searchable:s=false,searchPlaceholder:i="Search...",emptyText:l="No results found.",disabled:c=false,clearable:d=false,maxDisplayItems:m=3,maxDropdownHeight:f=240,size:p,radius:g,className:h,...b},v)=>{let[y,x]=X.useState(false),[w,C]=X.useState(""),[R,T]=X.useState(r||""),[M,k]=X.useState(r||[]),[P,E]=X.useState({top:0,left:0,width:0}),N=X.useRef(null),S=X.useRef(null),H=X.useRef(null),D=X.useRef(null),L=n!==void 0?n:R,I=n!==void 0?n:M,V=n!==void 0,O=B=>{d&&L===B?(V||T(""),o?.("")):(V||T(B),o?.(B)),x(false),C("");},A=B=>{let Z=I.includes(B)?I.filter(ue=>ue!==B):[...I,B];V||k(Z),o?.(Z);},K=(B,Z)=>{Z.stopPropagation();let ue=I.filter(U=>U!==B);V||k(ue),o?.(ue);},$=B=>{B.stopPropagation(),t?(V||k([]),o?.([])):(V||T(""),o?.(""));},G=e.find(B=>B.value===L),Y=e.filter(B=>I.includes(B.value)),F=Y.slice(0,m),z=Y.length-m,j=s?e.filter(B=>B.label.toLowerCase().includes(w.toLowerCase())):e;X.useEffect(()=>{if(y&&S.current){let B=S.current.getBoundingClientRect();E({top:B.bottom+4,left:B.left,width:B.width}),s&&setTimeout(()=>D.current?.focus(),0);}y||C("");},[y,s]),X.useEffect(()=>{let B=Z=>{let ue=Z.target,U=N.current&&!N.current.contains(ue),Ce=H.current&&!H.current.contains(ue);U&&Ce&&(x(false),C(""));};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[]),X.useEffect(()=>{if(!y)return;let B=Z=>{H.current?.contains(Z.target)||(x(false),C(""));};return window.addEventListener("scroll",B,true),()=>window.removeEventListener("scroll",B,true)},[y]);let W=t?I.length>0:!!L;return jsxs("div",{ref:N,className:u("relative",h),...b,children:[jsxs("div",{ref:B=>{S.current=B,typeof v=="function"?v(B):v&&(v.current=B);},role:"combobox","aria-expanded":y,"aria-haspopup":"listbox","aria-disabled":c,onClick:()=>!c&&x(!y),className:u(Nd({size:p,radius:g}),t&&"flex-wrap gap-1",c&&"cursor-not-allowed opacity-50"),children:[!t&&jsx("span",{className:u(!G&&"text-muted-foreground"),children:G?G.label:a}),t&&jsx(Fragment,{children:Y.length===0?jsx("span",{className:"text-muted-foreground",children:a}):jsxs(Fragment,{children:[F.map(B=>jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground",children:[B.label,jsx("span",{role:"button",tabIndex:0,onClick:Z=>K(B.value,Z),onKeyDown:Z=>{(Z.key==="Enter"||Z.key===" ")&&K(B.value,Z);},className:"rounded-full hover:bg-secondary-foreground/20 cursor-pointer",children:jsx(X$1,{className:"h-3 w-3"})})]},B.value)),z>0&&jsxs("span",{className:"text-xs text-muted-foreground",children:["+",z," more"]})]})}),jsxs("div",{className:"ml-auto flex items-center gap-1",children:[d&&W&&jsx("span",{role:"button",tabIndex:0,onClick:$,onKeyDown:B=>{(B.key==="Enter"||B.key===" ")&&$(B);},className:"rounded-full p-0.5 hover:bg-muted cursor-pointer",children:jsx(X$1,{className:"h-4 w-4 opacity-50"})}),jsx(ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",y&&"rotate-180")})]})]}),y&&!c&&typeof document<"u"&&Ba.createPortal(jsxs("div",{ref:H,className:"fixed z-[9999] overflow-hidden rounded-md border border-zinc-300 dark:border-zinc-700 bg-background shadow-md",style:{top:P.top,left:P.left,minWidth:P.width},children:[s&&jsxs("div",{className:"flex items-center border-b border-zinc-300 dark:border-zinc-700 px-3",children:[jsx(Search,{className:"h-4 w-4 opacity-50 mr-2"}),jsx("input",{ref:D,type:"text",value:w,onChange:B=>C(B.target.value),placeholder:i,className:"flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground"})]}),jsx(ke,{style:{maxHeight:f},onWheel:B=>B.stopPropagation(),children:jsx("div",{className:"p-1",children:j.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l}):j.map(B=>{let Z=t?I.includes(B.value):L===B.value;return jsxs("div",{role:"option","aria-selected":Z,onClick:()=>{B.disabled||(t?A(B.value):O(B.value));},className:u("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800",B.disabled&&"pointer-events-none opacity-50"),children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:Z&&jsx(Check,{className:"h-4 w-4"})}),B.label]},B.value)})})})]}),document.body)]})});Aa.displayName="Select";var kd=X.createContext(null),Bo=()=>{let e=X.useContext(kd);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e},Ri=X.createContext({radius:"md"}),wi=X.createContext(null),Cn=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),[s,i]=X.useState(-1),l=t!==void 0,c=l?t:o,d=X.useRef(null),m=X.useRef(null),f=X.useId(),p=X.useRef(new Map),g=X.useCallback(v=>{l||a(v),r?.(v),v||i(-1);},[l,r]),h=X.useCallback((v,y)=>{p.current.set(v,y);},[]),b=X.useCallback(v=>{p.current.delete(v);},[]);return jsx(kd.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentRef:m,contentId:f,activeIndex:s,setActiveIndex:i,items:p,registerItem:h,unregisterItem:b},children:e})};Cn.displayName="Dropdown";var Tn=X.forwardRef(({children:e,onClick:t,onKeyDown:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=Bo();return jsx("div",{ref:m=>{i.current=m,typeof o=="function"?o(m):o&&(o.current=m);},role:"button",tabIndex:0,"aria-expanded":a,"aria-haspopup":"menu","aria-controls":a?l:void 0,onClick:m=>{t?.(m),s(!a);},onKeyDown:m=>{n?.(m),(m.key==="ArrowDown"||m.key==="ArrowUp")&&(m.preventDefault(),s(true)),(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),s(!a));},className:"inline-flex",...r,children:e})});Tn.displayName="DropdownTrigger";var y0={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-2xl"},Mn=X.forwardRef(({className:e,side:t="bottom",sideOffset:n=4,align:r="start",alignOffset:o=0,collisionPadding:a=8,onInteractOutside:s,onEscapeKeyDown:i,loop:l=true,radius:c="md",children:d,...m},f)=>{let{open:p,onOpenChange:g,triggerRef:h,contentRef:b,contentId:v,activeIndex:y,setActiveIndex:x,items:w}=Bo(),[C,R]=X.useState({top:0,left:0}),[T,M]=X.useState(t),[k,P]=X.useState(false),E=X.useRef(0);if(X.useEffect(()=>{P(true);},[]),X.useEffect(()=>{p&&(E.current=w.current.size);},[p,w]),X.useEffect(()=>{if(!p||!h.current||!b.current)return;let S=()=>{if(!h.current||!b.current)return;let H=h.current.getBoundingClientRect(),D=b.current.getBoundingClientRect(),L=window.innerWidth,I=window.innerHeight,V=0,O=0,A=t;switch(t){case "top":V=H.top-D.height-n,V<a&&(V=H.bottom+n,A="bottom");break;case "bottom":V=H.bottom+n,V+D.height>I-a&&(V=H.top-D.height-n,A="top");break;case "left":O=H.left-D.width-n,O<a&&(O=H.right+n,A="right");break;case "right":O=H.right+n,O+D.width>L-a&&(O=H.left-D.width-n,A="left");break}if(A==="top"||A==="bottom"){switch(r){case "start":O=H.left+o;break;case "center":O=H.left+H.width/2-D.width/2;break;case "end":O=H.right-D.width-o;break}O<a?O=a:O+D.width>L-a&&(O=L-D.width-a);}else {switch(r){case "start":V=H.top+o;break;case "center":V=H.top+H.height/2-D.height/2;break;case "end":V=H.bottom-D.height-o;break}V<a?V=a:V+D.height>I-a&&(V=I-D.height-a);}R({top:V,left:O}),M(A);};return S(),window.addEventListener("resize",S),window.addEventListener("scroll",S,true),()=>{window.removeEventListener("resize",S),window.removeEventListener("scroll",S,true);}},[p,t,n,r,o,a,h]),X.useEffect(()=>{if(!p)return;let S=H=>{let D=H.target;b.current&&!b.current.contains(D)&&h.current&&!h.current.contains(D)&&(s?.(),g(false));};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[p,g,s,h,b]),X.useEffect(()=>{if(!p)return;let S=H=>{let D=Array.from(w.current.entries()).sort(([I],[V])=>I-V).map(([,I])=>I),L=D.length;if(L!==0)switch(H.key){case "Escape":H.preventDefault(),i?.(),g(false),h.current?.focus();break;case "ArrowDown":H.preventDefault(),y===-1||y>=L-1?x(l?0:Math.min(y+1,L-1)):x(y+1);break;case "ArrowUp":H.preventDefault(),y<=0?x(l?L-1:0):x(y-1);break;case "Home":H.preventDefault(),x(0);break;case "End":H.preventDefault(),x(L-1);break;case "Enter":case " ":H.preventDefault(),y>=0&&y<L&&D[y]?.click();break;case "Tab":g(false);break}};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[p,g,i,y,x,w,l,h]),X.useEffect(()=>{p&&y>=0&&Array.from(w.current.entries()).sort(([H],[D])=>H-D).map(([,H])=>H)[y]?.focus();},[p,y,w]),!k||!p)return null;let N={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[T];return Ba.createPortal(jsx("div",{ref:S=>{b.current=S,typeof f=="function"?f(S):f&&(f.current=S);},id:v,role:"menu","aria-orientation":"vertical","data-state":p?"open":"closed","data-side":T,"data-dropdown-content":"",className:u("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md outline-none",y0[c],N,e),style:{top:C.top,left:C.left},...m,children:jsx(Ri.Provider,{value:{radius:c},children:d})}),document.body)});Mn.displayName="DropdownContent";var Pd=0,Ed={none:"rounded-none",sm:"rounded-sm",md:"rounded-sm",lg:"rounded-md",full:"rounded-lg"},$t=X.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,onMouseEnter:a,startContent:s,endContent:i,children:l,...c},d)=>{let{onOpenChange:m,activeIndex:f,setActiveIndex:p,registerItem:g,unregisterItem:h}=Bo(),{radius:b}=X.useContext(Ri),[v]=X.useState(()=>Pd++),y=X.useRef(null);X.useEffect(()=>(!n&&y.current&&g(v,y.current),()=>{h(v);}),[n,v,g,h]);let x=R=>{if(n){R.preventDefault();return}o?.(R),r?.(),m(false);},w=R=>{a?.(R),n||p(v);};return jsxs("div",{ref:R=>{y.current=R,typeof d=="function"?d(R):d&&(d.current=R);},role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,"data-highlighted":f===v?"":void 0,className:u("relative flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",Ed[b],t&&"pl-8",!n&&"cursor-pointer",e),onClick:x,onMouseEnter:w,...c,children:[s,l&&jsx("span",{className:"flex-1",children:l}),i]})});$t.displayName="DropdownItem";var Ci=X.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:u("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));Ci.displayName="DropdownSection";var Ld=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));Ld.displayName="DropdownSeparator";var Sd=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest opacity-60",e),...t});Sd.displayName="DropdownShortcut";var Dd=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));Dd.displayName="DropdownGroup";var Hd=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),{contentRef:s}=Bo(),i=t!==void 0,l=i?t:o,c=X.useRef(null),d=X.useCallback(m=>{i||a(m),r?.(m);},[i,r]);return jsx(wi.Provider,{value:{open:l,onOpenChange:d,triggerRef:c,parentMenuRef:s},children:e})};Hd.displayName="DropdownSub";var Id=X.forwardRef(({className:e,inset:t,disabled:n,children:r,onMouseEnter:o,onMouseLeave:a,onKeyDown:s,...i},l)=>{let c=X.useContext(wi),{setActiveIndex:d,registerItem:m,unregisterItem:f}=Bo(),{radius:p}=X.useContext(Ri),[g]=X.useState(()=>Pd++),h=X.useRef(null);if(!c)throw new Error("DropdownSubTrigger must be used within DropdownSub");let{open:b,onOpenChange:v,triggerRef:y}=c;X.useEffect(()=>(!n&&h.current&&m(g,h.current),()=>{f(g);}),[n,g,m,f]);let x=R=>{o?.(R),n||(d(g),v(true));},w=R=>{a?.(R);},C=R=>{s?.(R),(R.key==="ArrowRight"||R.key==="Enter"||R.key===" ")&&(R.preventDefault(),v(true));};return jsxs("div",{ref:R=>{h.current=R,y.current=R,typeof l=="function"?l(R):l&&(l.current=R);},role:"menuitem","aria-haspopup":"menu","aria-expanded":b,tabIndex:n?-1:0,"aria-disabled":n,"data-state":b?"open":"closed","data-disabled":n?"":void 0,className:u("flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[state=open]:bg-accent","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",Ed[p],t&&"pl-8",!n&&"cursor-pointer",e),onMouseEnter:x,onMouseLeave:w,onKeyDown:C,...i,children:[r,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});Id.displayName="DropdownSubTrigger";var Vd=X.forwardRef(({className:e,sideOffset:t=2,alignOffset:n=-4,collisionPadding:r=8,onMouseEnter:o,onMouseLeave:a,...s},i)=>{let l=X.useContext(wi);if(!l)throw new Error("DropdownSubContent must be used within DropdownSub");let{open:c,onOpenChange:d,triggerRef:m,parentMenuRef:f}=l,[p,g]=X.useState({top:0,left:0}),[h,b]=X.useState(false),v=X.useRef(null),y=X.useRef(null);X.useEffect(()=>{b(true);},[]),X.useEffect(()=>{if(!c||!m.current||!v.current)return;(()=>{if(!m.current||!v.current)return;let R=m.current.getBoundingClientRect(),T=v.current.getBoundingClientRect(),M=window.innerWidth,k=window.innerHeight,P=R.top+n,E=R.right+t;E+T.width>M-r&&(E=R.left-T.width-t),P+T.height>k-r&&(P=k-T.height-r),P<r&&(P=r),g({top:P,left:E});})();},[c,t,n,r,m]);let x=C=>{o?.(C),y.current&&(clearTimeout(y.current),y.current=null),d(true);},w=C=>{a?.(C);let R=C.relatedTarget;m.current?.contains(R)||f?.current?.contains(R)||(y.current=setTimeout(()=>{d(false);},100));};return X.useEffect(()=>()=>{y.current&&clearTimeout(y.current);},[]),!h||!c?null:Ba.createPortal(jsx("div",{ref:C=>{v.current=C,typeof i=="function"?i(C):i&&(i.current=C);},role:"menu","data-state":c?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:p.top,left:p.left},onMouseEnter:x,onMouseLeave:w,...s}),document.body)});Vd.displayName="DropdownSubContent";var R0=Ci;var Od=X.createContext(null),Ti=()=>{let e=X.useContext(Od);if(!e)throw new Error("Popover components must be used within a Popover");return e},ot=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),s=t!==void 0,i=s?t:o,l=X.useRef(null),c=X.useId(),d=X.useCallback(m=>{s||a(m),r?.(m);},[s,r]);return jsx(Od.Provider,{value:{open:i,onOpenChange:d,triggerRef:l,contentId:c},children:e})};ot.displayName="Popover";var qn=X.forwardRef(({children:e,onClick:t,asChild:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=Ti(),c=f=>{t?.(f),s(!a);},d=f=>{i.current=f,typeof o=="function"?o(f):o&&(o.current=f);},m={"aria-expanded":a,"aria-haspopup":"dialog","aria-controls":a?l:void 0,onClick:c,...r};return n&&X.isValidElement(e)?X.cloneElement(e,{...m,ref:d,onClick:f=>{e.props.onClick?.(f),c(f);}}):jsx("button",{ref:d,type:"button",...m,children:e})});qn.displayName="PopoverTrigger";var an=X.forwardRef(({children:e,...t},n)=>{let{triggerRef:r}=Ti();return jsx("div",{ref:o=>{r.current=o,typeof n=="function"?n(o):n&&(n.current=o);},...t,children:e})});an.displayName="PopoverAnchor";var at=X.forwardRef(({className:e,style:t,side:n="bottom",sideOffset:r=4,align:o="center",alignOffset:a=0,onInteractOutside:s,onEscapeKeyDown:i,onOpenAutoFocus:l,onCloseAutoFocus:c,children:d,...m},f)=>{let{open:p,onOpenChange:g,triggerRef:h,contentId:b}=Ti(),[v,y]=X.useState({top:0,left:0}),[x,w]=X.useState(false),[C,R]=X.useState(null);if(X.useEffect(()=>{w(true);},[]),X.useEffect(()=>{if(!p||!h.current||!C)return;let M=()=>{if(!h.current||!C)return;let k=h.current.getBoundingClientRect(),P=C.getBoundingClientRect(),E=0,N=0;switch(n){case "top":E=k.top-P.height-r;break;case "bottom":E=k.bottom+r;break;case "left":N=k.left-P.width-r;break;case "right":N=k.right+r;break}if(n==="top"||n==="bottom")switch(o){case "start":N=k.left+a;break;case "center":N=k.left+k.width/2-P.width/2;break;case "end":N=k.right-P.width-a;break}else switch(o){case "start":E=k.top+a;break;case "center":E=k.top+k.height/2-P.height/2;break;case "end":E=k.bottom-P.height-a;break}y({top:E,left:N});};return M(),window.addEventListener("resize",M),window.addEventListener("scroll",M,true),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",M,true);}},[p,n,r,o,a,h,C]),X.useEffect(()=>{if(!p)return;let M=k=>{let P=k.target;C&&C.contains(P)||h.current&&h.current.contains(P)||P.closest?.("[data-dropdown-content], [data-popover-content]")||(s?.(),g(false));};return document.addEventListener("mouseup",M),()=>document.removeEventListener("mouseup",M)},[p,g,s,h,C]),X.useEffect(()=>{if(!p)return;let M=k=>{k.key==="Escape"&&(i?.(),g(false));};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[p,g,i]),!x||!p)return null;let T={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[n];return Ba.createPortal(jsx("div",{ref:M=>{R(k=>k!==M?M:k),typeof f=="function"?f(M):f&&(f.current=M);},id:b,role:"dialog","data-state":p?"open":"closed","data-side":n,className:u("fixed z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",T,e),style:{...t,top:v.top,left:v.left},...m,children:d}),document.body)});at.displayName="PopoverContent";var Bd=X.createContext(null),Ni=()=>{let e=X.useContext(Bd);if(!e)throw new Error("Tabs components must be used within a Tabs");return e},Fd=X.forwardRef(({className:e,value:t,defaultValue:n="",onValueChange:r,variant:o="solid",radius:a="md",orientation:s="horizontal",children:i,...l},c)=>{let[d,m]=X.useState(n),f=t!==void 0,p=f?t:d,g=h=>{f||m(h),r?.(h);};return jsx(Bd.Provider,{value:{value:p,onValueChange:g,variant:o,radius:a,orientation:s},children:jsx("div",{ref:c,"data-orientation":s,className:u(s==="vertical"&&"flex gap-4",e),...l,children:i})})});Fd.displayName="Tabs";var Mi={none:{list:"rounded-none",trigger:"rounded-none",indicator:"rounded-none"},sm:{list:"rounded-md",trigger:"rounded-sm",indicator:"rounded-sm"},md:{list:"rounded-lg",trigger:"rounded-md",indicator:"rounded-md"},lg:{list:"rounded-xl",trigger:"rounded-lg",indicator:"rounded-lg"},full:{list:"rounded-full",trigger:"rounded-full",indicator:"rounded-full"}},Kd=X.forwardRef(({className:e,children:t,...n},r)=>{let{variant:o,radius:a,orientation:s,value:i}=Ni(),l=X.useRef(null),[c,d]=X.useState({opacity:0});X.useEffect(()=>{let g=l.current;if(!g)return;let h=()=>{let v=g.querySelector('[data-state="active"]');if(v){let y=g.getBoundingClientRect(),x=v.getBoundingClientRect(),w=s==="vertical";o==="underline"?d(w?{width:2,height:x.height,transform:`translateY(${x.top-y.top}px)`,opacity:1}:{width:x.width,height:2,transform:`translateX(${x.left-y.left}px)`,opacity:1}):o==="solid"&&d(w?{width:x.width,height:x.height,transform:`translateY(${x.top-y.top}px)`,opacity:1}:{width:x.width,height:x.height,transform:`translateX(${x.left-y.left}px)`,opacity:1});}};h();let b=new ResizeObserver(h);return b.observe(g),()=>{b.disconnect();}},[o,s,i]);let m={solid:"bg-muted p-1",underline:"border-b border-border bg-transparent p-0 !rounded-none",bordered:"bg-transparent p-0 gap-1 !rounded-none"},f=s==="vertical",p=()=>o==="solid"?f?"top-0 left-1 bg-background shadow":"top-1 left-1 bg-background shadow":o==="underline"?f?"top-0 left-0 bg-primary !rounded-full":"bottom-0 left-0 bg-primary !rounded-full":"";return jsxs("div",{ref:g=>{l.current=g,typeof r=="function"?r(g):r&&(r.current=g);},role:"tablist","aria-orientation":s,className:u("relative inline-flex h-9 items-center justify-center text-muted-foreground",f&&"flex-col h-auto w-auto",Mi[a].list,m[o],e),...n,children:[(o==="solid"||o==="underline")&&jsx("span",{className:u("absolute transition-all duration-200 ease-out",Mi[a].indicator,p()),style:c,"aria-hidden":"true"}),t]})});Kd.displayName="TabsList";var $d=X.forwardRef(({className:e,value:t,disabled:n,onClick:r,...o},a)=>{let{value:s,onValueChange:i,variant:l,radius:c}=Ni(),d=s===t,m={solid:"data-[state=active]:text-foreground",underline:"!rounded-none border-b-2 border-transparent pb-2 data-[state=active]:text-foreground",bordered:"border border-transparent data-[state=active]:border-current data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm"};return jsx("button",{type:"button",role:"tab",ref:a,"aria-selected":d,"data-state":d?"active":"inactive",disabled:n,className:u("relative z-10 inline-flex items-center justify-center whitespace-nowrap px-3 py-1 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",Mi[c].trigger,m[l],e),onClick:f=>{r?.(f),i(t);},...o})});$d.displayName="TabsTrigger";var Gd=X.forwardRef(({className:e,value:t,children:n,...r},o)=>{let{value:a}=Ni(),s=a===t;return s?jsx("div",{ref:o,role:"tabpanel","data-state":s?"active":"inactive",className:u("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...r,children:n}):null});Gd.displayName="TabsContent";var Ud=[{label:"At least 8 characters",test:e=>e.length>=8},{label:"Contains uppercase",test:e=>/[A-Z]/.test(e)},{label:"Contains lowercase",test:e=>/[a-z]/.test(e)},{label:"Contains number",test:e=>/[0-9]/.test(e)},{label:"Contains special character",test:e=>/[!@#$%^&*(),.?":{}|<>]/.test(e)}];function C0(e,t=Ud){return e?t.filter(r=>r.test(e)).length/t.length:0}function T0(e){return e<.4?"bg-red-500":e<.7?"bg-yellow-500":"bg-green-500"}function M0(e){return e<.4?"Weak":e<.7?"Medium":"Strong"}var Ko=0,ki=null;function Gt(){Ko===0&&(ki=document.body.style.overflow,document.body.style.overflow="hidden"),Ko++;}function Ut(){Ko--,Ko<=0&&(Ko=0,document.body.style.overflow=ki??"",ki=null);}var Wd=X.createContext(null),Oa=()=>{let e=X.useContext(Wd);if(!e)throw new Error("Sheet components must be used within a Sheet");return e},_d=({open:e,defaultOpen:t=false,onOpenChange:n,children:r})=>{let[o,a]=X.useState(t),s=e!==void 0,i=s?e:o,l=X.useCallback(c=>{s||a(c),n?.(c);},[s,n]);return jsx(Wd.Provider,{value:{open:i,onOpenChange:l},children:r})};_d.displayName="Sheet";var Yd=X.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=Oa();return jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(true);},...n,children:t})});Yd.displayName="SheetTrigger";var Xd=X.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=Oa();return jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(false);},...n,children:t})});Xd.displayName="SheetClose";var Ei=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};Ei.displayName="SheetPortal";var qd=X.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Oa();return r?jsx("div",{ref:n,className:u("fixed inset-0 z-50 bg-black/80",r?"animate-in fade-in-0":"animate-out fade-out-0",e),onClick:()=>o(false),"aria-hidden":"true",...t}):null});qd.displayName="SheetOverlay";var Zd=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition-transform duration-300 ease-in-out",{variants:{side:{top:"inset-x-0 top-0 border-b",bottom:"inset-x-0 bottom-0 border-t",left:"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),P0=(e,t)=>({top:t?"animate-in slide-in-from-top":"animate-out slide-out-to-top",bottom:t?"animate-in slide-in-from-bottom":"animate-out slide-out-to-bottom",left:t?"animate-in slide-in-from-left":"animate-out slide-out-to-left",right:t?"animate-in slide-in-from-right":"animate-out slide-out-to-right"})[e],Qd=X.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:r,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c}=Oa(),[d,m]=X.useState(false),[,f]=X.useState(false);return X.useEffect(()=>{if(l)m(true),f(true),Gt();else {f(true);let p=setTimeout(()=>{m(false),f(false);},300);return ()=>clearTimeout(p)}return ()=>{Ut();}},[l]),X.useEffect(()=>{let p=g=>{g.key==="Escape"&&l&&(o?.(),c(false));};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[l,c,o]),!d&&!l?null:jsxs(Ei,{children:[jsx("div",{className:u("fixed inset-0 z-50 bg-black/80 transition-opacity duration-300",l?"opacity-100":"opacity-0"),onClick:()=>{a?.(),c(false);},"aria-hidden":"true"}),jsxs("div",{ref:i,role:"dialog","aria-modal":"true",className:u(Zd({side:e}),P0(e,l),t),...s,children:[!r&&jsxs("button",{type:"button",onClick:()=>c(false),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 cursor-pointer",children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]}),n]})]})});Qd.displayName="SheetContent";var Jd=({className:e,...t})=>jsx("div",{className:u("flex flex-col space-y-2 text-center sm:text-left",e),...t});Jd.displayName="SheetHeader";var eu=({className:e,...t})=>jsx("div",{className:u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});eu.displayName="SheetFooter";var tu=X.forwardRef(({className:e,...t},n)=>jsx("h2",{ref:n,className:u("text-lg font-semibold text-foreground",e),...t}));tu.displayName="SheetTitle";var nu=X.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));nu.displayName="SheetDescription";var S0=({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 ru=X.createContext(null),Fa=()=>{let e=X.useContext(ru);if(!e)throw new Error("ContextMenu components must be used within a ContextMenu");return e},Li=X.createContext(null),ou=({children:e,onOpenChange:t})=>{let[n,r]=X.useState(false),[o,a]=X.useState({x:0,y:0}),s=X.useId(),i=X.useCallback(l=>{r(l),t?.(l);},[t]);return jsx(ru.Provider,{value:{open:n,onOpenChange:i,position:o,setPosition:a,contentId:s},children:e})};ou.displayName="ContextMenu";var au=X.forwardRef(({children:e,onContextMenu:t,...n},r)=>{let{onOpenChange:o,setPosition:a}=Fa(),s=i=>{i.preventDefault(),a({x:i.clientX,y:i.clientY}),o(true);};return jsx("div",{ref:r,onContextMenu:i=>{t?.(i),s(i);},...n,children:e})});au.displayName="ContextMenuTrigger";var su=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));su.displayName="ContextMenuGroup";var iu=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};iu.displayName="ContextMenuPortal";var lu=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),s=t!==void 0,i=s?t:o,l=X.useRef(null),c=X.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(Li.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};lu.displayName="ContextMenuSub";var cu=X.forwardRef(({className:e,onInteractOutside:t,onEscapeKeyDown:n,children:r,...o},a)=>{let{open:s,onOpenChange:i,position:l,contentId:c}=Fa(),[d,m]=X.useState(false),[f,p]=X.useState(l),g=X.useRef(null);return X.useEffect(()=>{m(true);},[]),X.useEffect(()=>{if(!s||!g.current){p(l);return}let b=g.current.getBoundingClientRect(),{x:v,y}=l;v+b.width>window.innerWidth&&(v=window.innerWidth-b.width-8),y+b.height>window.innerHeight&&(y=window.innerHeight-b.height-8),p({x:v,y});},[s,l]),X.useEffect(()=>{if(!s)return;let h=b=>{let v=b.target;g.current&&!g.current.contains(v)&&(t?.(),i(false));};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[s,i,t]),X.useEffect(()=>{if(!s)return;let h=b=>{b.key==="Escape"&&(n?.(),i(false));};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[s,i,n]),!d||!s?null:Ba.createPortal(jsx("div",{ref:h=>{g.current=h,typeof a=="function"?a(h):a&&(a.current=h);},id:c,role:"menu","aria-orientation":"vertical","data-state":s?"open":"closed",className:u("fixed z-50 max-h-[calc(100vh-2rem)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-md","animate-in fade-in-0 zoom-in-95",e),style:{top:f.y,left:f.x},...o,children:r}),document.body)});cu.displayName="ContextMenuContent";var du=X.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let i=X.useContext(Li);if(!i)throw new Error("ContextMenuSubTrigger must be used within ContextMenuSub");let{open:l,onOpenChange:c,triggerRef:d}=i,m=p=>{r?.(p),c(true);},f=p=>{o?.(p),c(false);};return jsxs("div",{ref:p=>{d.current=p,typeof s=="function"?s(p):s&&(s.current=p);},role:"menuitem","aria-haspopup":"menu","aria-expanded":l,"data-state":l?"open":"closed",className:u("flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[state=open]:bg-zinc-100 dark:data-[state=open]:bg-zinc-800",t&&"pl-8",e),onMouseEnter:m,onMouseLeave:f,...a,children:[n,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});du.displayName="ContextMenuSubTrigger";var uu=X.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let s=X.useContext(Li);if(!s)throw new Error("ContextMenuSubContent must be used within ContextMenuSub");let{open:i,onOpenChange:l,triggerRef:c}=s,[d,m]=X.useState({top:0,left:0}),[f,p]=X.useState(false),g=X.useRef(null);X.useEffect(()=>{p(true);},[]),X.useEffect(()=>{if(!i||!c.current||!g.current)return;(()=>{if(!c.current||!g.current)return;let y=c.current.getBoundingClientRect(),x=g.current.getBoundingClientRect(),w=y.top,C=y.right+t;C+x.width>window.innerWidth&&(C=y.left-x.width-t),m({top:w,left:C});})();},[i,t,c]);let h=v=>{n?.(v),l(true);},b=v=>{r?.(v),l(false);};return !f||!i?null:Ba.createPortal(jsx("div",{ref:v=>{g.current=v,typeof a=="function"?a(v):a&&(a.current=v);},role:"menu","data-state":i?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:d.top,left:d.left},onMouseEnter:h,onMouseLeave:b,...o}),document.body)});uu.displayName="ContextMenuSubContent";var mu=X.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{onOpenChange:i}=Fa(),l=c=>{if(n){c.preventDefault();return}o?.(c),r?.(),i(false);};return jsx("div",{ref:s,role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,className:u("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",t&&"pl-8",e),onClick:l,...a})});mu.displayName="ContextMenuItem";var pu=X.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{onOpenChange:l}=Fa(),c=d=>{if(o){d.preventDefault();return}a?.(d),r?.(!n),l(false);};return jsxs("div",{ref:i,role:"menuitemcheckbox","aria-checked":n,tabIndex:o?-1:0,"aria-disabled":o,"data-disabled":o?"":void 0,"data-state":n?"checked":"unchecked",className:u("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),onClick:c,...s,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n&&jsx(Check,{className:"h-4 w-4"})}),t]})});pu.displayName="ContextMenuCheckboxItem";var fu=X.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:u("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));fu.displayName="ContextMenuSection";var gu=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-border",e),...t}));gu.displayName="ContextMenuSeparator";var bu=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});bu.displayName="ContextMenuShortcut";var hu=X.createContext(null),A0=()=>{let e=X.useContext(hu);if(!e)throw new Error("RadioGroupItem must be used within a RadioGroup");return e},xu=X.forwardRef(({className:e,value:t,defaultValue:n="",onValueChange:r,name:o,disabled:a,required:s,orientation:i="vertical",children:l,...c},d)=>{let[m,f]=X.useState(n),p=t!==void 0,g=p?t:m,h=X.useId(),b=v=>{p||f(v),r?.(v);};return jsx("div",{ref:d,role:"radiogroup","aria-required":s,"aria-orientation":i,className:u(i==="vertical"?"grid gap-2":"flex gap-4",e),...c,children:jsx(hu.Provider,{value:{name:o||h,value:g,onValueChange:b,disabled:a,required:s},children:l})})});xu.displayName="RadioGroup";var yu=X.forwardRef(({className:e,value:t,disabled:n,...r},o)=>{let a=A0(),s=a.value===t,i=n||a.disabled;return jsxs(Fragment,{children:[jsx("button",{type:"button",role:"radio","aria-checked":s,disabled:i,ref:o,className:u("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 cursor-pointer",e),onClick:()=>a.onValueChange(t),...r,children:s&&jsx("span",{className:"flex items-center justify-center",children:jsx(Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}),jsx("input",{type:"radio","aria-hidden":true,tabIndex:-1,name:a.name,value:t,checked:s,required:a.required,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});yu.displayName="RadioGroupItem";var $a=cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors 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 gap-2",{variants:{variant:{solid:"bg-transparent hover:bg-muted data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",bordered:"border border-current 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"}}),Ru=X.forwardRef(({className:e,variant:t,size:n,pressed:r,defaultPressed:o=false,onPressedChange:a,disabled:s,onKeyDown:i,...l},c)=>{let[d,m]=X.useState(o),f=r!==void 0,p=f?r:d,g=()=>{if(s)return;let b=!p;f||m(b),a?.(b);},h=b=>{b.key==="Enter"&&b.preventDefault(),i?.(b);};return jsx("button",{type:"button","aria-pressed":p,"data-state":p?"on":"off",disabled:s,ref:c,className:u($a({variant:t,size:n,className:e})),onClick:g,onKeyDown:h,...l})});Ru.displayName="Toggle";var wu=X.createContext(null),K0=()=>{let e=X.useContext(wu);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e},Cu=X.forwardRef(({className:e,variant:t,size:n,type:r,value:o,defaultValue:a,onValueChange:s,disabled:i,children:l,...c},d)=>{let[m,f]=X.useState(()=>r==="single"?a?[a]:[]:a||[]),p=o!==void 0,g=p?r==="single"?o?[o]:[]:o:m,h=b=>{if(r==="single"){let v=g.includes(b)?[]:[b];p||f(v),s?.(v[0]||"");}else {let v=g.includes(b)?g.filter(y=>y!==b):[...g,b];p||f(v),s?.(v);}};return jsx("div",{ref:d,role:"group",className:u("flex items-center justify-center gap-1",e),...c,children:jsx(wu.Provider,{value:{type:r,variant:t,size:n,value:g,onValueChange:h,disabled:i},children:l})})});Cu.displayName="ToggleGroup";var Tu=X.forwardRef(({className:e,children:t,variant:n,size:r,value:o,disabled:a,...s},i)=>{let l=K0(),c=l.value.includes(o),d=a||l.disabled;return jsx("button",{type:"button",role:"radio","aria-checked":c,"aria-pressed":c,"data-state":c?"on":"off",disabled:d,ref:i,className:u($a({variant:l.variant||n,size:l.size||r}),e),onClick:()=>l.onValueChange(o),...s,children:t})});Tu.displayName="ToggleGroupItem";var Ua=X.forwardRef(({className:e,value:t,defaultValue:n=[0],onValueChange:r,onValueCommit:o,min:a=0,max:s=100,step:i=1,disabled:l=false,orientation:c="horizontal",name:d,...m},f)=>{let[p,g]=X.useState(n),h=t!==void 0,b=h?t:p,v=X.useRef(null),[y,x]=X.useState(false),[w,C]=X.useState(null),R=(H,D)=>{if(!v.current)return b[0];let L=v.current.getBoundingClientRect(),I;c==="horizontal"?I=(H-L.left)/L.width:I=1-(D-L.top)/L.height,I=Math.max(0,Math.min(1,I));let V=a+I*(s-a),O=Math.round(V/i)*i;return Math.max(a,Math.min(s,O))},T=(H,D)=>{let L=[...b];L[D]=H,D>0&&H<b[D-1]&&(L[D]=b[D-1]),D<b.length-1&&H>b[D+1]&&(L[D]=b[D+1]),h||g(L),r?.(L);},M=(H,D)=>{l||(H.preventDefault(),x(true),C(D),H.target.setPointerCapture(H.pointerId));},k=H=>{if(!y||w===null||l)return;let D=R(H.clientX,H.clientY);T(D,w);},P=()=>{y&&(x(false),C(null),o?.(b));},E=H=>{if(l)return;let D=R(H.clientX,H.clientY),L=0,I=Math.abs(b[0]-D);for(let V=1;V<b.length;V++){let O=Math.abs(b[V]-D);O<I&&(I=O,L=V);}T(D,L),o?.([...b.slice(0,L),D,...b.slice(L+1)]);},N=(H,D)=>{if(l)return;let L=b[D];switch(H.key){case "ArrowRight":case "ArrowUp":H.preventDefault(),L=Math.min(s,b[D]+i);break;case "ArrowLeft":case "ArrowDown":H.preventDefault(),L=Math.max(a,b[D]-i);break;case "Home":H.preventDefault(),L=a;break;case "End":H.preventDefault(),L=s;break;default:return}T(L,D),o?.([...b.slice(0,D),L,...b.slice(D+1)]);},S=H=>(H-a)/(s-a)*100;return jsxs("div",{ref:f,className:u("relative flex touch-none select-none items-center",c==="vertical"&&"flex-col h-full w-5",l&&"opacity-50 pointer-events-none",e),...m,children:[jsx("div",{ref:v,className:u("relative grow overflow-hidden rounded-full bg-secondary",c==="horizontal"?"h-2 w-full":"h-full w-2"),onClick:E,children:jsx("div",{className:"absolute bg-primary",style:c==="horizontal"?{left:b.length>1?`${S(b[0])}%`:0,right:`${100-S(b[b.length-1])}%`,top:0,bottom:0}:{bottom:b.length>1?`${S(b[0])}%`:0,top:`${100-S(b[b.length-1])}%`,left:0,right:0}})}),b.map((H,D)=>jsx("div",{role:"slider",tabIndex:l?-1:0,"aria-valuemin":a,"aria-valuemax":s,"aria-valuenow":H,"aria-orientation":c,"aria-disabled":l,className:u("absolute 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 cursor-grab",y&&w===D&&"cursor-grabbing"),style:c==="horizontal"?{left:`calc(${S(H)}% - 10px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${S(H)}% - 10px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:L=>M(L,D),onPointerMove:k,onPointerUp:P,onPointerCancel:P,onKeyDown:L=>N(L,D)},D)),d&&b.map((H,D)=>jsx("input",{type:"hidden",name:b.length>1?`${d}[${D}]`:d,value:H},D))]})});Ua.displayName="Slider";var Mu=X.createContext(null),Nu=()=>{let e=X.useContext(Mu);if(!e)throw new Error("AccordionItem must be used within an Accordion");return e},Di=X.createContext(null),ku=()=>{let e=X.useContext(Di);if(!e)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return e},Pu=X.forwardRef(({className:e,type:t="multiple",value:n,defaultValue:r,onValueChange:o,collapsible:a=true,disabled:s,children:i,...l},c)=>{let[d,m]=X.useState(()=>t==="single"?r?[r]:[]:r||[]),f=X.useRef(new Map),p=X.useRef([]),g=n!==void 0,h=g?t==="single"?n?[n]:[]:n:d,b=w=>{if(t==="single"){let R=h.includes(w)&&a?[]:[w];g||m(R),o?.(R[0]||"");}else {let C=h.includes(w)?h.filter(R=>R!==w):[...h,w];g||m(C),o?.(C);}},v=X.useCallback((w,C)=>{f.current.set(w,C),p.current.includes(w)||p.current.push(w);},[]),y=X.useCallback(w=>{f.current.delete(w),p.current=p.current.filter(C=>C!==w);},[]),x=X.useCallback(w=>{let C=p.current;if(C.length===0)return;let R=document.activeElement,T;f.current.forEach((N,S)=>{N===R&&(T=S);});let M=T?C.indexOf(T):-1,k;switch(w){case "first":k=0;break;case "last":k=C.length-1;break;case "next":k=M===-1?0:(M+1)%C.length;break;case "prev":k=M===-1?C.length-1:(M-1+C.length)%C.length;break}let P=C[k];f.current.get(P)?.focus();},[]);return jsx(Mu.Provider,{value:{type:t,value:h,onValueChange:b,collapsible:a,disabled:s,registerTrigger:v,unregisterTrigger:y,focusTrigger:x},children:jsx("div",{ref:c,"data-orientation":"vertical",className:u("w-full",e),...l,children:i})})});Pu.displayName="Accordion";var Eu=X.forwardRef(({className:e,value:t,disabled:n,title:r,subtitle:o,startContent:a,children:s,...i},l)=>{let c=Nu(),d=c.value.includes(t),m=n||c.disabled||false,f=X.useId(),p=X.useId();return r!==void 0?jsx(Di.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children:jsxs("div",{ref:l,"data-state":d?"open":"closed","data-disabled":m?"":void 0,className:u("border-b",m&&"opacity-50",e),...i,children:[jsx(Lu,{children:jsxs("div",{className:"flex items-center gap-3",children:[a,jsxs("div",{className:"flex flex-col items-start",children:[jsx("span",{className:"text-sm font-medium",children:r}),o&&jsx("span",{className:"text-xs text-muted-foreground",children:o})]})]})}),jsx(Su,{children:s})]})}):jsx(Di.Provider,{value:{value:t,isOpen:d,isDisabled:m,contentId:f,triggerId:p},children:jsx("div",{ref:l,"data-state":d?"open":"closed","data-disabled":m?"":void 0,className:u("border-b",m&&"opacity-50",e),...i,children:s})})});Eu.displayName="AccordionItem";var Lu=X.forwardRef(({className:e,children:t,onClick:n,onKeyDown:r,...o},a)=>{let s=Nu(),{value:i,isOpen:l,isDisabled:c,contentId:d,triggerId:m}=ku(),f=X.useRef(null);X.useEffect(()=>{let g=f.current;return g&&!c&&s.registerTrigger(i,g),()=>{s.unregisterTrigger(i);}},[i,c,s]);let p=g=>{switch(r?.(g),g.key){case "ArrowDown":g.preventDefault(),s.focusTrigger("next");break;case "ArrowUp":g.preventDefault(),s.focusTrigger("prev");break;case "Home":g.preventDefault(),s.focusTrigger("first");break;case "End":g.preventDefault(),s.focusTrigger("last");break}};return jsx("h3",{className:"flex",children:jsxs("button",{type:"button",ref:g=>{f.current=g,typeof a=="function"?a(g):a&&(a.current=g);},id:m,"aria-controls":d,"aria-expanded":l,disabled:c,"data-state":l?"open":"closed",className:u("flex flex-1 items-center justify-between py-4 font-medium transition-all text-left cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),onClick:g=>{n?.(g),s.onValueChange(i);},onKeyDown:p,...o,children:[t,jsx(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})})});Lu.displayName="AccordionTrigger";var Su=X.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{isOpen:a,contentId:s,triggerId:i,isDisabled:l}=ku();return jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:u("grid transition-[grid-template-rows] duration-200 ease-out",a?"grid-rows-[1fr]":"grid-rows-[0fr]",e),style:n,...r,children:jsx("div",{className:"overflow-hidden",children:jsx("div",{className:"pb-4 pt-0 text-sm",children:t})})})});Su.displayName="AccordionContent";var Hu=X.createContext(null),Iu=()=>{let e=X.useContext(Hu);if(!e)throw new Error("Collapsible components must be used within a Collapsible");return e},Vu=X.forwardRef(({className:e,open:t,defaultOpen:n=false,onOpenChange:r,disabled:o,title:a,children:s,...i},l)=>{let[c,d]=X.useState(n),m=t!==void 0,f=m?t:c,p=X.useId(),g=X.useId(),h=b=>{o||(m||d(b),r?.(b));};return jsx(Hu.Provider,{value:{open:f,onOpenChange:h,disabled:o,contentId:p,triggerId:g},children:jsxs("div",{ref:l,"data-state":f?"open":"closed","data-disabled":o?"":void 0,className:u("space-y-2",e),...i,children:[a&&jsxs("div",{className:"flex items-center justify-between space-x-4 px-4",children:[jsx("h4",{className:"text-sm font-semibold",children:a}),jsx(Hi,{})]}),s]})})});Vu.displayName="Collapsible";var Hi=X.forwardRef(({className:e,children:t,onClick:n,...r},o)=>{let{open:a,onOpenChange:s,disabled:i,contentId:l,triggerId:c}=Iu();return jsx(ae,{ref:o,id:c,"aria-controls":l,"aria-expanded":a,disabled:i,"data-state":a?"open":"closed","data-disabled":i?"":void 0,variant:"light",size:"sm",isIconOnly:true,className:e,onClick:d=>{n?.(d),s(!a);},...r,children:t??jsx(ChevronsUpDown,{className:u("h-4 w-4 transition-transform duration-200",a&&"rotate-180")})})});Hi.displayName="CollapsibleTrigger";var Au=X.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{open:a,contentId:s,triggerId:i,disabled:l}=Iu(),c=X.useRef(null),[d,m]=X.useState(0),[f,p]=X.useState(false),[g,h]=X.useState(a);X.useEffect(()=>{a?(h(true),m(0),p(true),requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.current&&m(c.current.scrollHeight);});})):(p(true),c.current?(m(c.current.scrollHeight),requestAnimationFrame(()=>{m(0);})):m(0));},[a]);let b=()=>{p(false),a||h(false);};return g?jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:u("overflow-hidden",e),style:{...n,height:f?d:a?"auto":0,transition:f?"height 0.25s ease-out, opacity 0.25s ease-out":void 0,opacity:a?1:0},onTransitionEnd:b,...r,children:jsx("div",{ref:c,className:"space-y-2",children:t})}):null});Au.displayName="CollapsibleContent";var _a=X.forwardRef(({className:e,value:t=0,max:n=100,label:r,showPercentage:o=false,formatPercentage:a=l=>`${Math.round(l)}%`,...s},i)=>{let l=Math.min(Math.max(t/n*100,0),100);return jsxs("div",{ref:i,className:"w-full",children:[(r||o)&&jsxs("div",{className:"flex justify-between text-sm mb-2",children:[r&&jsx("span",{className:"text-muted-foreground",children:r}),o&&jsx("span",{className:u("text-muted-foreground",!r&&"ml-auto"),children:a(l)})]}),jsx("div",{role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":n,"aria-label":typeof r=="string"?r:void 0,className:u("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...s,children:jsx("div",{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-l}%)`}})})]})});_a.displayName="Progress";var Fu=X.createContext(null),Ku=()=>{let e=X.useContext(Fu);if(!e)throw new Error("HoverCard components must be used within a HoverCard");return e},$u=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,openDelay:o=700,closeDelay:a=300,closeOnScroll:s=true})=>{let[i,l]=X.useState(n),c=t!==void 0,d=c?t:i,m=X.useRef(null),f=X.useId(),p=X.useRef(null),g=X.useRef(null),h=X.useCallback(b=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),b?p.current=setTimeout(()=>{c||l(true),r?.(true);},o):g.current=setTimeout(()=>{c||l(false),r?.(false);},a);},[c,r,o,a]);return X.useEffect(()=>{if(!s||!d)return;let b=()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),c||l(false),r?.(false);};return window.addEventListener("scroll",b,true),()=>window.removeEventListener("scroll",b,true)},[s,d,c,r]),X.useEffect(()=>()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current);},[]),jsx(Fu.Provider,{value:{open:d,onOpenChange:h,triggerRef:m,contentId:f},children:e})};$u.displayName="HoverCard";var Gu=X.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l}=Ku();return jsx("a",{ref:p=>{l.current=p,typeof s=="function"?s(p):s&&(s.current=p);},onMouseEnter:p=>{t?.(p),i(true);},onMouseLeave:p=>{n?.(p),i(false);},onFocus:p=>{r?.(p),i(true);},onBlur:p=>{o?.(p),i(false);},...a,children:e})});Gu.displayName="HoverCardTrigger";var Uu=X.forwardRef(({className:e,side:t="bottom",sideOffset:n=4,align:r="center",alignOffset:o=0,onMouseEnter:a,onMouseLeave:s,children:i,...l},c)=>{let{open:d,onOpenChange:m,triggerRef:f,contentId:p}=Ku(),[g,h]=X.useState({top:0,left:0}),[b,v]=X.useState(false),y=X.useRef(null);X.useEffect(()=>{v(true);},[]),X.useEffect(()=>{if(!d||!f.current||!y.current)return;(()=>{if(!f.current||!y.current)return;let T=f.current.getBoundingClientRect(),M=y.current.getBoundingClientRect(),k=0,P=0;switch(t){case "top":k=T.top-M.height-n;break;case "bottom":k=T.bottom+n;break;case "left":P=T.left-M.width-n;break;case "right":P=T.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":P=T.left+o;break;case "center":P=T.left+T.width/2-M.width/2;break;case "end":P=T.right-M.width-o;break}else switch(r){case "start":k=T.top+o;break;case "center":k=T.top+T.height/2-M.height/2;break;case "end":k=T.bottom-M.height-o;break}h({top:k,left:P});})();},[d,t,n,r,o,f]);let x=R=>{a?.(R),m(true);},w=R=>{s?.(R),m(false);};if(!b||!d)return null;let C={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[t];return Ba.createPortal(jsx("div",{ref:R=>{y.current=R,typeof c=="function"?c(R):c&&(c.current=R);},id:p,"data-state":d?"open":"closed","data-side":t,className:u("fixed z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",C,e),style:{top:g.top,left:g.left},onMouseEnter:x,onMouseLeave:w,...l,children:i}),document.body)});Uu.displayName="HoverCardContent";var ju=X.createContext({size:"md",variant:"default",radius:"md"}),Xa=()=>X.useContext(ju);cva("",{variants:{size:{sm:"",md:"",lg:""},variant:{default:"",bordered:"",filled:""},radius:{none:"",sm:"",md:"",lg:"",full:""}},defaultVariants:{size:"md",variant:"default",radius:"md"}});var _0=cva("flex flex-wrap items-center break-words",{variants:{size:{sm:"gap-1 text-xs",md:"gap-1.5 text-sm sm:gap-2",lg:"gap-2 text-base sm:gap-3"},variant:{default:"text-muted-foreground",bordered:"text-muted-foreground px-3 py-1.5 border",filled:"text-muted-foreground bg-muted px-3 py-1.5"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{size:"md",variant:"default",radius:"md"}}),Y0=cva("",{variants:{size:{sm:"[&>svg]:h-3 [&>svg]:w-3",md:"[&>svg]:h-3.5 [&>svg]:w-3.5",lg:"[&>svg]:h-4 [&>svg]:w-4"}},defaultVariants:{size:"md"}}),X0=cva("flex items-center justify-center",{variants:{size:{sm:"h-6 w-6 [&>svg]:h-3 [&>svg]:w-3",md:"h-8 w-8 [&>svg]:h-4 [&>svg]:w-4",lg:"h-10 w-10 [&>svg]:h-5 [&>svg]:w-5"}},defaultVariants:{size:"md"}}),Wu=X.forwardRef(({size:e="md",variant:t="default",radius:n="md",children:r,...o},a)=>jsx(ju.Provider,{value:{size:e,variant:t,radius:n},children:jsx("nav",{ref:a,"aria-label":"breadcrumb",...o,children:r})}));Wu.displayName="Breadcrumb";var _u=X.forwardRef(({className:e,...t},n)=>{let{size:r,variant:o,radius:a}=Xa();return jsx("ol",{ref:n,className:u(_0({size:r,variant:o,radius:o==="default"?void 0:a}),e),...t})});_u.displayName="BreadcrumbList";var Yu=X.forwardRef(({className:e,...t},n)=>{let{size:r}=Xa();return jsx("li",{ref:n,className:u("inline-flex items-center",r==="sm"&&"gap-1",r==="md"&&"gap-1.5",r==="lg"&&"gap-2",e),...t})});Yu.displayName="BreadcrumbItem";var Xu=X.forwardRef(({className:e,...t},n)=>jsx("a",{ref:n,className:u("transition-colors hover:text-foreground cursor-pointer",e),...t}));Xu.displayName="BreadcrumbLink";var qu=X.forwardRef(({className:e,...t},n)=>jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:u("font-medium text-foreground",e),...t}));qu.displayName="BreadcrumbPage";var Zu=({children:e,className:t,...n})=>{let{size:r}=Xa();return jsx("li",{role:"presentation","aria-hidden":"true",className:u(Y0({size:r}),"text-muted-foreground/60",t),...n,children:e??jsx(ChevronRight,{})})};Zu.displayName="BreadcrumbSeparator";var Qu=({className:e,...t})=>{let{size:n}=Xa();return jsxs("span",{role:"presentation","aria-hidden":"true",className:u(X0({size:n}),e),...t,children:[jsx(MoreHorizontal,{}),jsx("span",{className:"sr-only",children:"More"})]})};Qu.displayName="BreadcrumbEllipsis";var tm=X.forwardRef(({ratio:e=1,className:t,style:n,children:r,...o},a)=>jsx("div",{ref:a,className:u("relative w-full",t),style:{...n,paddingBottom:`${100/e}%`},...o,children:jsx("div",{className:"absolute inset-0",children:r})}));tm.displayName="AspectRatio";var om=X.createContext(null),Vi=()=>{let e=X.useContext(om);if(!e)throw new Error("NavigationMenu components must be used within a NavigationMenu");return e},am=X.createContext(null),sm=()=>{let e=X.useContext(am);if(!e)throw new Error("NavigationMenuItem components must be used within a NavigationMenuItem");return e},im=X.forwardRef(({className:e,orientation:t="horizontal",children:n,...r},o)=>{let[a,s]=X.useState(null);return jsx(om.Provider,{value:{activeItem:a,setActiveItem:s,orientation:t},children:jsxs("nav",{ref:o,className:u("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...r,children:[n,jsx(Ai,{})]})})});im.displayName="NavigationMenu";var lm=X.forwardRef(({className:e,...t},n)=>{let{orientation:r}=Vi();return jsx("ul",{ref:n,className:u("group flex flex-1 list-none items-center justify-center gap-1",r==="vertical"&&"flex-col items-start",e),...t})});lm.displayName="NavigationMenuList";var cm=X.forwardRef(({className:e,children:t,...n},r)=>{let{activeItem:o,setActiveItem:a}=Vi(),s=X.useId(),i=X.useRef(null),l=o===s,c=X.useCallback(d=>{a(d?s:null);},[s,a]);return jsx(am.Provider,{value:{itemId:s,triggerRef:i,open:l,onOpenChange:c},children:jsx("li",{ref:r,className:u("relative",e),...n,children:t})})});cm.displayName="NavigationMenuItem";var dm=cva("group inline-flex h-9 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-[state=open]:bg-accent/50"),um=X.forwardRef(({className:e,children:t,onMouseEnter:n,onClick:r,...o},a)=>{let{triggerRef:s,open:i,onOpenChange:l}=sm(),c=m=>{n?.(m),l(true);},d=m=>{r?.(m),l(!i);};return jsxs("button",{ref:m=>{s.current=m,typeof a=="function"?a(m):a&&(a.current=m);},type:"button","data-state":i?"open":"closed",className:u(dm(),"group",e),onMouseEnter:c,onClick:d,"aria-expanded":i,...o,children:[t,jsx(ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})});um.displayName="NavigationMenuTrigger";var mm=X.forwardRef(({className:e,onMouseEnter:t,onMouseLeave:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i}=sm(),l=X.useRef(null),[c,d]=X.useState({top:0,left:0});X.useEffect(()=>{if(!a||!i.current)return;let p=()=>{if(!i.current)return;let g=i.current.getBoundingClientRect();d({top:g.bottom+4,left:g.left});};return p(),window.addEventListener("resize",p),window.addEventListener("scroll",p,true),()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p,true);}},[a,i]);let m=p=>{t?.(p),s(true);},f=p=>{n?.(p),s(false);};return a?Ba.createPortal(jsx("div",{ref:p=>{l.current=p,typeof o=="function"?o(p):o&&(o.current=p);},"data-state":a?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-4 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:c.top,left:c.left},onMouseEnter:m,onMouseLeave:f,...r}),document.body):null});mm.displayName="NavigationMenuContent";var pm=cva("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"),fm=X.forwardRef(({className:e,active:t,...n},r)=>jsx("a",{ref:r,className:u(pm(),t&&"bg-accent text-accent-foreground",e),...n}));fm.displayName="NavigationMenuLink";var Ai=X.forwardRef((e,t)=>null);Ai.displayName="NavigationMenuViewport";var gm=X.forwardRef(({className:e,...t},n)=>{let{activeItem:r}=Vi();return r?jsx("div",{ref:n,className:u("top-full z-[1] flex h-2.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"})}):null});gm.displayName="NavigationMenuIndicator";var xm=cva("inline-flex items-center justify-center rounded-full cursor-pointer transition-colors hover:bg-muted/50 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-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Nt=X.forwardRef(({className:e,size:t,...n},r)=>{let a={sm:14,md:16,lg:20}[t??"md"];return jsx("button",{ref:r,type:"button",className:u(xm({size:t}),e),"aria-label":"Close",...n,children:jsx(X$1,{style:{width:a,height:a}})})});Nt.displayName="CloseButton";var qa=X.createContext(null);function sR(){let e=X.useContext(qa);if(!e)throw new Error("useDrawer must be used within a DrawerProvider.");return e}function kn(){return X.useContext(qa)}var iR="16rem",lR="18rem",cR="3rem",dR="b",uR={xs:"256px",sm:"320px",md:"384px",lg:"448px",xl:"512px","2xl":"576px","3xl":"672px","4xl":"768px","5xl":"896px",full:"100%"},mR={xs:"20vh",sm:"30vh",md:"40vh",lg:"50vh",xl:"60vh","2xl":"70vh","3xl":"75vh","4xl":"80vh","5xl":"90vh",full:"100vh"},zi=X.forwardRef(({defaultOpen:e=false,open:t,onOpenChange:n,placement:r="left",size:o="md",backdrop:a="opaque",isDismissable:s=true,hideCloseButton:i=false,collapsible:l="offcanvas",mode:c,className:d,style:m,children:f,...p},g)=>{let h=c??"overlay",b=h==="overlay",[v,y]=X.useState(false),[x,w]=X.useState(false),[C,R]=X.useState(e),T=t??C,M=X.useCallback(N=>{let S=typeof N=="function"?N(T):N;n?n(S):R(S);},[n,T]);X.useEffect(()=>{let N=()=>{y(window.innerWidth<768);};return N(),window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[]);let k=X.useCallback(()=>b?M(N=>!N):v?w(N=>!N):M(N=>!N),[v,M,w,b]);X.useEffect(()=>{if(b)return;let N=S=>{S.key===dR&&(S.metaKey||S.ctrlKey)&&(S.preventDefault(),k());};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[k,b]);let P=T?"expanded":"collapsed",E=X.useMemo(()=>({placement:r,state:P,open:T,setOpen:M,isMobile:v,openMobile:x,setOpenMobile:w,toggleDrawer:k,collapsible:l,mode:h,size:o,backdrop:a,isDismissable:s,hideCloseButton:i}),[r,P,T,M,v,x,w,k,l,h,o,a,s,i]);return b?jsx(qa.Provider,{value:E,children:jsx(Drawer.Root,{open:T,onOpenChange:M,direction:r,dismissible:s,children:f})}):jsx(qa.Provider,{value:E,children:jsx(Wn,{delayDuration:0,children:jsx("div",{ref:g,style:{"--drawer-width":iR,"--drawer-width-icon":cR,...m},className:u("group/drawer-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-muted/50",d),...p,children:f})})})});zi.displayName="Drawer";var Rm=X.forwardRef(({variant:e="default",embedded:t=false,className:n,children:r,...o},a)=>{let s=kn();if(!s)return jsx("div",{ref:a,className:u("flex h-full flex-col bg-background text-foreground",n),...o,children:r});let{placement:i,collapsible:l,isMobile:c,state:d,openMobile:m,setOpenMobile:f}=s;if(i==="bottom"||i==="top")return jsx(Fragment,{children:r});if(l==="none")return jsx("div",{ref:a,className:u("flex h-full w-[--drawer-width] flex-col bg-background text-foreground border-r",i==="right"&&"border-l border-r-0",n),...o,children:r});if(c&&!t)return jsx(pR,{open:m,onOpenChange:f,placement:i,children:r});if(t){let g=d==="collapsed",h=l==="offcanvas",b=l==="icon";return jsx("div",{ref:a,className:u("group peer text-foreground relative"),"data-state":d,"data-collapsible":g?l:"","data-variant":e,"data-placement":i,"data-embedded":"true",children:jsx("div",{className:u("flex h-full flex-col overflow-hidden transition-[width,opacity] duration-200 ease-out",h?g?"w-0 opacity-0":"w-[--drawer-width] opacity-100":b&&g?"w-[--drawer-width-icon]":"w-[--drawer-width]",n),...o,children:jsx("div",{"data-drawer":"drawer",className:u("flex h-full w-full flex-col bg-background transition-opacity duration-200",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border",e==="default"&&i==="left"&&"border-r",e==="default"&&i==="right"&&"border-l"),children:r})})})}return jsxs("div",{ref:a,className:"group peer hidden md:block text-foreground","data-state":d,"data-collapsible":d==="collapsed"?l:"","data-variant":e,"data-placement":i,children:[jsx("div",{className:u("duration-200 relative h-svh w-[--drawer-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0",i==="right"&&"group-data-[placement=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--drawer-width-icon]")}),jsx("div",{className:u("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--drawer-width] transition-[left,right,width] ease-linear md:flex",i==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--drawer-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--drawer-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--drawer-width-icon] group-data-[placement=left]:border-r group-data-[placement=right]:border-l",n),...o,children:jsx("div",{"data-drawer":"drawer",className:u("flex h-full w-full flex-col bg-background",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border"),children:r})})]})});Rm.displayName="DrawerSidebar";var pR=({children:e,open:t,onOpenChange:n,placement:r})=>{let[o,a]=X.useState(false);return X.useEffect(()=>{a(true);},[]),X.useEffect(()=>{if(t)return Gt(),()=>Ut()},[t]),!o||!t?null:Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{className:"fixed inset-0 z-50 bg-black/80 animate-in fade-in-0",onClick:()=>n(false)}),jsx("div",{className:u("fixed z-50 bg-background p-0 text-foreground shadow-lg","animate-in",r==="left"&&"inset-y-0 left-0 h-full w-[--drawer-width] slide-in-from-left",r==="right"&&"inset-y-0 right-0 h-full w-[--drawer-width] slide-in-from-right"),style:{"--drawer-width":lR},children:jsx("div",{className:"flex h-full w-full flex-col",children:e})})]}),document.body)},wm=X.forwardRef(({className:e,onClick:t,...n},r)=>{let o=kn();if(o?.mode==="overlay")return jsx(Drawer.Trigger,{ref:r,className:e,onClick:t,...n});let a=o?.toggleDrawer;return jsxs("button",{ref:r,type:"button","data-drawer":"trigger",className:u("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-accent transition-colors cursor-pointer",e),onClick:s=>{t?.(s),a?.();},...n,children:[jsx(PanelLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle Drawer"})]})});wm.displayName="DrawerTrigger";var Cm=X.forwardRef(({className:e,children:t,...n},r)=>{let o=kn(),a=o?.mode==="overlay",s=o?.placement||"left",i=o?.size||"md",l=o?.backdrop||"opaque";if(a){let c=s==="top"||s==="bottom",d=s==="left"||s==="right",m=d?uR[i]:mR[i],f={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},p={top:"inset-x-0 top-0 rounded-b-[10px]",bottom:"inset-x-0 bottom-0 rounded-t-[10px]",left:"inset-y-0 left-0 rounded-r-[10px]",right:"inset-y-0 right-0 rounded-l-[10px]"};return jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:u("fixed inset-0 z-50",f[l])}),jsxs(Drawer.Content,{ref:r,className:u("fixed z-50 flex flex-col border bg-background",p[s],e),style:{...d?{width:m,height:"100%"}:{},...c?{maxHeight:m}:{},...n.style},...n,children:[c&&jsx("div",{className:u("mx-auto h-2 w-[100px] rounded-full bg-muted",s==="top"?"mb-4 mt-auto":"mt-4")}),t]})]})}return jsx("div",{ref:r,className:u("flex flex-col h-full",e),...n,children:t})});Cm.displayName="DrawerContent";var Tm=X.forwardRef(({className:e,hideCloseButton:t,children:n,...r},o)=>{let a=kn(),s=a?.hideCloseButton??false,i=!t&&!s;return jsxs("div",{ref:o,"data-drawer":"header",className:u("flex flex-col gap-2 p-4 relative",e),...r,children:[n,i&&jsx(Nt,{className:"absolute right-4 top-4",onClick:()=>a?.setOpen(false)})]})});Tm.displayName="DrawerHeader";var Mm=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"body",className:u("flex min-h-0 flex-1 flex-col gap-2 overflow-auto p-4 group-data-[collapsible=icon]:overflow-hidden",e),...t}));Mm.displayName="DrawerBody";var Nm=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"footer",className:u("flex flex-col gap-2 p-4 mt-auto",e),...t}));Nm.displayName="DrawerFooter";var km=X.forwardRef(({className:e,...t},n)=>kn()?.mode==="overlay"?jsx(Drawer.Title,{ref:n,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}):jsx("h2",{ref:n,className:u("text-lg font-semibold leading-none tracking-tight",e),...t}));km.displayName="DrawerTitle";var Pm=X.forwardRef(({className:e,...t},n)=>kn()?.mode==="overlay"?jsx(Drawer.Description,{ref:n,className:u("text-sm text-muted-foreground",e),...t}):jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));Pm.displayName="DrawerDescription";var Em=X.forwardRef(({className:e,onClick:t,...n},r)=>{let o=kn();return jsx(Nt,{ref:r,className:e,onClick:a=>{t?.(a),o?.setOpen(false);},...n})});Em.displayName="DrawerClose";var Lm=X.forwardRef(({className:e,onClick:t,showLabel:n=true,...r},o)=>{let a=kn();if(!a)return null;let{toggleDrawer:s,state:i,placement:l}=a,c=i==="collapsed",d=l==="left",m=d?PanelLeftOpen:PanelRightOpen,f=d?PanelLeftClose:PanelRightClose;return jsxs("button",{ref:o,type:"button","data-drawer":"toggle","data-state":i,className:u("flex items-center gap-2 w-full px-2 py-2 rounded-md text-sm text-muted-foreground","hover:bg-accent hover:text-accent-foreground","transition-colors cursor-pointer","group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0",e),onClick:p=>{t?.(p),s();},...r,children:[c?jsx(m,{className:"h-4 w-4 shrink-0"}):jsx(f,{className:"h-4 w-4 shrink-0"}),n&&jsx("span",{className:"group-data-[collapsible=icon]:hidden truncate",children:c?"Expand":"Collapse"})]})});Lm.displayName="DrawerToggle";var Sm=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"separator",className:u("mx-4 h-px bg-border",e),...t}));Sm.displayName="DrawerSeparator";var Dm=X.forwardRef(({className:e,...t},n)=>jsx("ul",{ref:n,"data-drawer":"menu",className:u("flex w-full min-w-0 flex-col gap-1",e),...t}));Dm.displayName="DrawerMenu";var Hm=X.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,"data-drawer":"menu-item",className:u("group/menu-item relative",e),...t}));Hm.displayName="DrawerMenuItem";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-ring transition-[width,height,padding] hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 active:bg-accent active:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-accent data-[active=true]:font-medium data-[active=true]:text-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:{default:"hover:bg-accent hover:text-accent-foreground",bordered:"bg-background shadow-[0_0_0_1px_currentColor] hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent/50 hover:text-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:"default",size:"md"}}),Vm=X.forwardRef(({isActive:e=false,variant:t="default",size:n="md",tooltip:r,className:o,children:a,...s},i)=>{let l=kn(),c=l?.isMobile??false,d=l?.state??"expanded",m=jsx("button",{ref:i,type:"button","data-drawer":"menu-button","data-size":n,"data-active":e,className:u(Im({variant:t,size:n}),o),...s,children:a});return r?jsxs(_n,{children:[jsx(Yn,{children:m}),jsx(Xn,{side:"right",align:"center",hidden:d!=="collapsed"||c,...typeof r=="string"?{children:r}:r})]}):m});Vm.displayName="DrawerMenuButton";var Am=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"group",className:u("relative flex w-full min-w-0 flex-col p-2",e),...t}));Am.displayName="DrawerGroup";var zm=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"group-label",className:u("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-muted-foreground outline-none transition-[margin,opacity] ease-linear","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...t}));zm.displayName="DrawerGroupLabel";var Om=X.forwardRef(({className:e,...t},n)=>jsx("main",{ref:n,className:u("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}));Om.displayName="DrawerInset";var fR=zi;var Fm=X.forwardRef(({className:e,...t},n)=>jsx("div",{className:"relative w-full overflow-auto",children:jsx("table",{ref:n,className:u("w-full caption-bottom text-sm",e),...t})}));Fm.displayName="Table";var Km=X.forwardRef(({className:e,...t},n)=>jsx("thead",{ref:n,className:u("[&_tr]:border-b",e),...t}));Km.displayName="TableHeader";var $m=X.forwardRef(({className:e,...t},n)=>jsx("tbody",{ref:n,className:u("[&_tr:last-child]:border-0",e),...t}));$m.displayName="TableBody";var Gm=X.forwardRef(({className:e,...t},n)=>jsx("tfoot",{ref:n,className:u("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Gm.displayName="TableFooter";var Um=X.forwardRef(({className:e,...t},n)=>jsx("tr",{ref:n,className:u("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Um.displayName="TableRow";var jm=X.forwardRef(({className:e,...t},n)=>jsx("th",{ref:n,className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));jm.displayName="TableHead";var Wm=X.forwardRef(({className:e,...t},n)=>jsx("td",{ref:n,className:u("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Wm.displayName="TableCell";var _m=X.forwardRef(({className:e,...t},n)=>jsx("caption",{ref:n,className:u("mt-4 text-sm text-muted-foreground",e),...t}));_m.displayName="TableCaption";function yR({className:e,data:t,columns:n,selectable:r=false,selectedKeys:o,onSelectionChange:a,getRowKey:s=(w,C)=>String(C),sortable:i=false,sortState:l,onSortChange:c,paginated:d=false,pageSizeOptions:m=[10,20,50],paginationState:f,onPaginationChange:p,emptyContent:g="No data",loading:h=false,striped:b=false,hoverable:v=true,...y},x){let[w,C]=X.useState(new Set),[R,T]=X.useState({columnId:null,direction:null}),[M,k]=X.useState({pageIndex:0,pageSize:m[0]||10}),P=o??w,E=l??R,N=f??M,S=F=>{a?a(F):C(F);},H=F=>{c?c(F):T(F);},D=F=>{p?p(F):k(F);},L=X.useMemo(()=>{if(!E.columnId||!E.direction)return t;let F=n.find(z=>z.id===E.columnId);return F?[...t].sort((z,j)=>{let W=F.accessor(z),B=F.accessor(j);if(W===B)return 0;if(W==null)return 1;if(B==null)return -1;let Z=String(W).localeCompare(String(B),void 0,{numeric:true});return E.direction==="asc"?Z:-Z}):t},[t,E,n]),I=X.useMemo(()=>{if(!d)return L;let F=N.pageIndex*N.pageSize;return L.slice(F,F+N.pageSize)},[L,d,N]),V=Math.ceil(L.length/N.pageSize),O=F=>{if(F===true){let z=new Set(I.map((j,W)=>s(j,W)));S(z);}else S(new Set);},A=(F,z)=>{let j=new Set(P);z?j.add(F):j.delete(F),S(j);},K=I.length>0&&I.every((F,z)=>P.has(s(F,z))),$=I.some((F,z)=>P.has(s(F,z))),G=F=>{if(!n.find(W=>W.id===F)?.sortable&&!i)return;let j="asc";E.columnId===F&&(E.direction==="asc"?j="desc":E.direction==="desc"&&(j=null)),H({columnId:j?F:null,direction:j});},Y=F=>E.columnId!==F?jsx(ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):E.direction==="asc"?jsx(ChevronUp,{className:"h-4 w-4"}):jsx(ChevronDown,{className:"h-4 w-4"});return jsxs("div",{ref:x,className:u("w-full",e),...y,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(Oo,{checked:K?true:$?"indeterminate":false,onCheckedChange:O,"aria-label":"Select all"})}),n.map(F=>{let z=F.sortable??i;return jsx("th",{className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground",z&&"cursor-pointer select-none hover:text-foreground"),style:{width:F.width},onClick:()=>z&&G(F.id),children:jsxs("div",{className:"flex items-center gap-2",children:[F.header,z&&Y(F.id)]})},F.id)})]})}),jsx("tbody",{className:"[&_tr:last-child]:border-0",children:h?jsx("tr",{children:jsx("td",{colSpan:n.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:"Loading..."})}):I.length===0?jsx("tr",{children:jsx("td",{colSpan:n.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:g})}):I.map((F,z)=>{let j=s(F,z),W=P.has(j);return jsxs("tr",{className:u("border-b transition-colors",v&&"hover:bg-muted/50",b&&z%2===1&&"bg-muted/30",W&&"bg-muted"),"data-state":W?"selected":void 0,children:[r&&jsx("td",{className:"w-12 px-4",children:jsx(Oo,{checked:W,onCheckedChange:B=>A(j,!!B),"aria-label":`Select row ${z+1}`})}),n.map(B=>jsx("td",{className:"p-4 align-middle",children:B.cell?B.cell(F,z):B.accessor(F)},B.id))]},j)})})]})}),d&&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:N.pageSize,onChange:F=>D({pageIndex:0,pageSize:Number(F.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:m.map(F=>jsx("option",{value:F,children:F},F))})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",N.pageIndex+1," of ",V||1]}),jsxs("div",{className:"flex gap-1",children:[jsx(ae,{variant:"light",size:"sm",isIconOnly:true,onClick:()=>D({...N,pageIndex:N.pageIndex-1}),disabled:N.pageIndex===0,"aria-label":"Previous page",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"light",size:"sm",isIconOnly:true,onClick:()=>D({...N,pageIndex:N.pageIndex+1}),disabled:N.pageIndex>=V-1,"aria-label":"Next page",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var RR=X.forwardRef(yR);var Oi=["January","February","March","April","May","June","July","August","September","October","November","December"];function PR({currentMonth:e,onMonthChange:t,startYear:n,endYear:r}){let o=getMonth(e),a=getYear(e),s=c=>{let d=setMonth(e,c);t(d);},i=c=>{let d=setYear(e,c);t(d);},l=X.useMemo(()=>{let c=[];for(let d=r;d>=n;d--)c.push(d);return c},[n,r]);return jsxs("div",{className:"flex items-center gap-1",children:[jsxs(Cn,{children:[jsx(Tn,{children:jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-1.5 py-1 rounded-md","text-xs font-medium w-[85px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsx("span",{className:"truncate",children:Oi[o]}),jsx(ChevronDown,{className:"h-3 w-3 text-muted-foreground shrink-0"})]})}),jsx(Mn,{className:"min-w-[120px] p-0",children:jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:Oi.map((c,d)=>jsx($t,{onSelect:()=>s(d),className:u("text-xs",o===d&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]}),jsxs(Cn,{children:[jsx(Tn,{children:jsxs("div",{className:u("inline-flex items-center justify-between gap-1 px-1.5 py-1 rounded-md","text-xs font-medium w-[60px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer"),children:[jsx("span",{children:a}),jsx(ChevronDown,{className:"h-3 w-3 text-muted-foreground shrink-0"})]})}),jsx(Mn,{className:"min-w-[80px] p-0",children:jsx(ke,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:l.map(c=>jsx($t,{onSelect:()=>i(c),className:u("text-xs",a===c&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]})]})}function ER(e,t,n){return function({calendarMonth:o}){let{goToMonth:a,nextMonth:s,previousMonth:i}=useDayPicker();if(e)return jsxs("div",{className:"flex items-center justify-between gap-1 mb-2",children:[jsx(PR,{currentMonth:o.date,onMonthChange:a,startYear:t,endYear:n}),jsxs("div",{className:"flex items-center",children:[jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:u("h-6 w-6 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsx(ChevronLeft,{className:"h-3.5 w-3.5"})}),jsx("button",{type:"button",disabled:!s,onClick:()=>s&&a(s),className:u("h-6 w-6 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsx(ChevronRight,{className:"h-3.5 w-3.5"})})]})]});let l=Oi[o.date.getMonth()],c=o.date.getFullYear();return jsxs("div",{className:"flex items-center justify-between gap-2 h-10 mb-2",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("span",{className:"text-sm font-medium w-[90px]",children:l}),jsx("span",{className:"text-sm font-medium w-[50px]",children:c})]}),jsxs("div",{className:"flex items-center gap-1",children:[jsx("button",{type:"button",disabled:!i,onClick:()=>i&&a(i),className:u("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx("button",{type:"button",disabled:!s,onClick:()=>s&&a(s),className:u("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})}}function to({className:e,classNames:t,showOutsideDays:n=true,showMonthAndYearPickers:r=false,startYear:o=1900,endYear:a=new Date().getFullYear()+50,components:s,...i}){let l=X.useMemo(()=>ER(r,o,a),[r,o,a]);return jsx(DayPicker,{showOutsideDays:n,className:u("p-4",e),classNames:{months:"flex flex-col sm:flex-row gap-4",month:"flex flex-col gap-2",month_caption:"sr-only",nav:"hidden",month_grid:"w-full border-collapse",weekdays:"flex",weekday:"text-muted-foreground w-8 font-normal text-xs text-center",week:"flex w-full mt-0.5",day:u("relative h-8 w-8 p-0 text-center text-sm","flex items-center justify-center","focus-within:relative focus-within:z-20","[&:has([aria-selected]:not(.outside-day))]:bg-accent","first:[&:has([aria-selected]:not(.outside-day))]:rounded-l-md","last:[&:has([aria-selected]:not(.outside-day))]:rounded-r-md"),day_button:u("size-8 p-0 font-normal rounded-md text-sm","inline-flex items-center justify-center","hover:bg-primary/10","focus:outline-none","transition-colors cursor-pointer"),range_start:"rounded-l-md",range_end:"rounded-r-md",selected:u("bg-primary text-primary-foreground rounded-md","hover:bg-primary/90 hover:!text-primary-foreground","focus:bg-primary focus:text-primary-foreground","[&.outside-day]:!bg-transparent [&.outside-day]:!text-muted-foreground/50"),today:"bg-accent text-accent-foreground rounded-md",outside:"outside-day text-muted-foreground/50 !bg-transparent",disabled:"text-muted-foreground/30 cursor-not-allowed",range_middle:"rounded-none bg-muted text-foreground",hidden:"invisible",...t},modifiersStyles:{range_middle:{backgroundColor:"var(--color-muted)",color:"var(--color-foreground)",borderRadius:0}},components:{...s,MonthCaption:l},...i})}to.displayName="Calendar";var Zm=({className:e,...t})=>jsx("nav",{role:"navigation","aria-label":"pagination",className:u("mx-auto flex w-full justify-center",e),...t});Zm.displayName="Pagination";var Qm=X.forwardRef(({className:e,...t},n)=>jsx("ul",{ref:n,className:u("flex flex-row items-center gap-1",e),...t}));Qm.displayName="PaginationContent";var Jm=X.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,className:u("",e),...t}));Jm.displayName="PaginationItem";var Za=({className:e,isActive:t,size:n="sm",isIconOnly:r=true,...o})=>jsx("a",{"aria-current":t?"page":void 0,className:u(qr({variant:t?"solid":"light",size:n}),r&&"!px-0 !w-9",e),...o});Za.displayName="PaginationLink";var ep=({className:e,...t})=>jsxs(Za,{"aria-label":"Go to previous page",size:"md",className:u("gap-1 pl-2.5",e),...t,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{children:"Previous"})]});ep.displayName="PaginationPrevious";var tp=({className:e,...t})=>jsxs(Za,{"aria-label":"Go to next page",size:"md",className:u("gap-1 pr-2.5",e),...t,children:[jsx("span",{children:"Next"}),jsx(ChevronRight,{className:"h-4 w-4"})]});tp.displayName="PaginationNext";var np=({className:e,...t})=>jsxs("span",{"aria-hidden":true,className:u("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"})]});np.displayName="PaginationEllipsis";var $o=X.forwardRef(({className:e,...t},n)=>jsx("span",{ref:n,className:u("absolute h-px w-px p-0 -m-px overflow-hidden whitespace-nowrap border-0","[clip:rect(0,0,0,0)]",e),...t}));$o.displayName="VisuallyHidden";var op={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},IR={auto:"top-[50%] translate-y-[-50%]",center:"top-[50%] translate-y-[-50%]",top:"top-4 translate-y-0",bottom:"top-auto bottom-4 translate-y-0","top-center":"top-[20%] translate-y-0","bottom-center":"top-auto bottom-[20%] translate-y-0"},ap=cva("fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),$i=cva("fixed left-[50%] z-50 grid translate-x-[-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 sm:rounded-lg",{variants:{size:{xs:"w-full max-w-xs",sm:"w-full max-w-sm",md:"w-full max-w-md",lg:"w-full max-w-lg",xl:"w-full max-w-xl","2xl":"w-full max-w-2xl","3xl":"w-full max-w-3xl","4xl":"w-full max-w-4xl","5xl":"w-full max-w-5xl",full:"w-[calc(100vw-2rem)] h-[calc(100vh-2rem)] max-w-none"}},defaultVariants:{size:"md"}}),Ja=X.createContext(null),Pr=()=>{let e=X.useContext(Ja);if(!e)throw new Error("Modal components must be used within a Modal");return e},ip=X.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r="Modal",children:o,hideCloseButton:a=false,isDismissable:s=true,isKeyboardDismissDisabled:i=false,backdrop:l="opaque",placement:c="center",scrollBehavior:d="inside",size:m,className:f},p)=>{let[g,h]=X.useState(false),b=e!==void 0,v=b?e:g,[y,x]=X.useState(false),w=X.useRef(null),C=X.useId(),R=X.useId();X.useEffect(()=>{x(true);},[]);let T=X.useCallback(E=>{b||h(E),t?.(E);},[b,t]);X.useEffect(()=>{if(v)return Gt(),()=>Ut()},[v]),X.useEffect(()=>{if(!v||i)return;let E=N=>{N.key==="Escape"&&T(false);};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[v,i,T]);let M=E=>{s&&E.target===E.currentTarget&&T(false);},k=n?X.isValidElement(n)?X.cloneElement(n,{onClick:E=>{n.props.onClick?.(E),T(true);}}):jsx("button",{type:"button",onClick:()=>T(true),children:n}):null,P=()=>!y||!v?null:d==="outside"?Ba.createPortal(jsx("div",{"data-state":v?"open":"closed",className:u(ap(),op[l],"overflow-y-auto flex items-start justify-center py-4"),onClick:M,children:jsxs("div",{ref:E=>{w.current=E,typeof p=="function"?p(E):p&&(p.current=E);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":R,"data-state":v?"open":"closed",className:u("relative z-50 grid gap-4 border bg-background p-6 shadow-lg sm:rounded-lg dark:border-0",m==="xs"&&"w-full max-w-xs",m==="sm"&&"w-full max-w-sm",m==="md"&&"w-full max-w-md",m==="lg"&&"w-full max-w-lg",m==="xl"&&"w-full max-w-xl",m==="2xl"&&"w-full max-w-2xl",m==="3xl"&&"w-full max-w-3xl",m==="4xl"&&"w-full max-w-4xl",m==="5xl"&&"w-full max-w-5xl",m==="full"&&"w-[calc(100vw-2rem)] min-h-[calc(100vh-2rem)]",!m&&"w-full max-w-md",f),children:[jsx($o,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(Nt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>T(false)})]})}),document.body):Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{"data-state":v?"open":"closed",className:u(ap(),op[l]),onClick:M,"aria-hidden":"true"}),jsxs("div",{ref:E=>{w.current=E,typeof p=="function"?p(E):p&&(p.current=E);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":R,"data-state":v?"open":"closed",className:u($i({size:m}),IR[c],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",f),children:[jsx($o,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(Nt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>T(false)})]})]}),document.body);return jsxs(Ja.Provider,{value:{open:v,onOpenChange:T,scrollBehavior:d,titleId:C,descriptionId:R},children:[k,P()]})});ip.displayName="Modal";var es=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,scrollBehavior:o="inside"})=>{let[a,s]=X.useState(n),i=t!==void 0,l=i?t:a,c=X.useId(),d=X.useId(),m=X.useCallback(f=>{i||s(f),r?.(f);},[i,r]);return jsx(Ja.Provider,{value:{open:l,onOpenChange:m,scrollBehavior:o,titleId:c,descriptionId:d},children:e})};es.displayName="ModalRoot";var lp=X.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=Pr();return jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(true);},...n,children:e})});lp.displayName="ModalTrigger";var Gi=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};Gi.displayName="ModalPortal";var Ui=X.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Pr();return r?jsx("div",{ref:n,"data-state":r?"open":"closed",className:u("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),onClick:()=>o(false),"aria-hidden":"true",...t}):null});Ui.displayName="ModalOverlay";var cp=X.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=Pr();return jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(false);},...n,children:e})});cp.displayName="ModalClose";var ts=X.forwardRef(({className:e,children:t,size:n,showCloseButton:r=true,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c,titleId:d,descriptionId:m}=Pr(),[f,p]=X.useState(false);return X.useEffect(()=>{p(true);},[]),X.useEffect(()=>{if(l)return Gt(),()=>Ut()},[l]),X.useEffect(()=>{if(!l)return;let g=h=>{h.key==="Escape"&&(o?.(),c(false));};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[l,c,o]),!f||!l?null:jsxs(Gi,{children:[jsx(Ui,{}),jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":m,"data-state":l?"open":"closed",className:u($i({size:n}),"top-[50%] translate-y-[-50%]",e),...s,children:[t,r&&jsx(Nt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>c(false)})]})]})});ts.displayName="ModalContent";var dp=({className:e,...t})=>jsx("div",{className:u("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});dp.displayName="ModalHeader";var up=({className:e,children:t})=>(X.useContext(Ja)?.scrollBehavior??"inside")==="inside"?jsx(ke,{className:u("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsx("div",{className:u(e),children:t});up.displayName="ModalBody";var mp=({className:e,children:t,...n})=>{let{onOpenChange:r}=Pr();return jsx("div",{className:u("flex-shrink-0 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n,children:X.Children.map(t,o=>X.isValidElement(o)?X.cloneElement(o,{onClick:a=>{o.props.onClick?.(a),r(false);}}):o)})};mp.displayName="ModalFooter";var pp=X.forwardRef(({className:e,...t},n)=>{let{titleId:r}=Pr();return jsx("h2",{ref:n,id:r,className:u("text-lg font-semibold leading-none tracking-tight",e),...t})});pp.displayName="ModalTitle";var fp=X.forwardRef(({className:e,...t},n)=>{let{descriptionId:r}=Pr();return jsx("p",{ref:n,id:r,className:u("text-sm text-muted-foreground",e),...t})});fp.displayName="ModalDescription";var ji=X.forwardRef(({className:e,...t},n)=>jsx(Command,{ref:n,className:u("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));ji.displayName=Command.displayName;var zR=({children:e,...t})=>jsx(es,{...t,children:jsx(ts,{className:"overflow-hidden p-0 shadow-lg",showCloseButton:false,children:jsx(ji,{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})})}),gp=X.forwardRef(({className:e,...t},n)=>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:n,className:u("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})]}));gp.displayName=Command.Input.displayName;var bp=X.forwardRef(({className:e,children:t,...n},r)=>jsx(ke,{className:"max-h-[300px]",children:jsx(Command.List,{ref:r,className:u("overflow-hidden",e),...n,children:t})}));bp.displayName=Command.List.displayName;var vp=X.forwardRef((e,t)=>jsx(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));vp.displayName=Command.Empty.displayName;var hp=X.forwardRef(({className:e,...t},n)=>jsx(Command.Group,{ref:n,className:u("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}));hp.displayName=Command.Group.displayName;var xp=X.forwardRef(({className:e,...t},n)=>jsx(Command.Separator,{ref:n,className:u("-mx-1 h-px bg-border",e),...t}));xp.displayName=Command.Separator.displayName;var yp=X.forwardRef(({className:e,children:t,startContent:n,endContent:r,...o},a)=>jsxs(Command.Item,{ref:a,className:u("relative flex cursor-default select-none items-center gap-2 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),...o,children:[n,t&&jsx("span",{className:"flex-1",children:t}),r]}));yp.displayName=Command.Item.displayName;var Rp=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Rp.displayName="CommandShortcut";var FR={sm:{input:"h-9 px-2 text-xs",button:"h-9 w-9",icon:"h-3.5 w-3.5"},md:{input:"h-10 px-3 text-sm",button:"h-10 w-10",icon:"h-4 w-4"},lg:{input:"h-11 px-4 text-base",button:"h-11 w-11",icon:"h-5 w-5"}},KR={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},Cp=X.forwardRef(({className:e,showToggle:t=true,disabled:n,onFocus:r,onBlur:o,style:a,size:s="md",radius:i="md",...l},c)=>{let[d,m]=X.useState(false),[f,p]=X.useState(false),g=FR[s],h=KR[i];return jsxs("div",{className:"relative",children:[jsx("input",{type:d?"text":"password",className:u("flex w-full border border-input bg-background py-2 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",g.input,h,t&&"pr-10",e),ref:c,disabled:n,style:{...a,borderColor:f?"var(--color-foreground)":void 0},onFocus:b=>{p(true),r?.(b);},onBlur:b=>{p(false),o?.(b);},...l}),t&&jsx("button",{type:"button",className:u("absolute right-0 top-0 px-3 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",g.button),onClick:()=>m(!d),disabled:n,tabIndex:-1,"aria-label":d?"Hide password":"Show password",children:d?jsx(EyeOff,{className:g.icon}):jsx(Eye,{className:g.icon})})]})});Cp.displayName="PasswordInput";var jR={sm:{wrapper:"h-9",input:"h-9 text-xs",button:"h-9 w-9",icon:"h-3.5 w-3.5"},md:{wrapper:"h-10",input:"h-10 text-sm",button:"h-10 w-10",icon:"h-4 w-4"},lg:{wrapper:"h-11",input:"h-11 text-base",button:"h-11 w-11",icon:"h-5 w-5"}},WR={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},Tp=X.forwardRef(({className:e,showButtons:t=true,step:n=1,min:r,max:o,value:a,defaultValue:s,onChange:i,disabled:l,size:c="md",radius:d="md",...m},f)=>{let[p,g]=X.useState(s),[h,b]=X.useState(false),v=a!==void 0,y=v?a:p,x=jR[c],w=WR[d],C=N=>{N!==void 0&&(r!==void 0&&N<r&&(N=r),o!==void 0&&N>o&&(N=o)),v||g(N),i?.(N);},R=()=>{C((y??0)+n);},T=()=>{C((y??0)-n);},M=N=>{let S=N.target.value;if(S==="")C(void 0);else {let H=parseFloat(S);isNaN(H)||C(H);}},k=N=>{N.key==="ArrowUp"?(N.preventDefault(),R()):N.key==="ArrowDown"&&(N.preventDefault(),T());},P=r===void 0||(y??0)>r,E=o===void 0||(y??0)<o;return t?jsxs("div",{className:u("relative flex items-center border transition-colors",x.wrapper,w,h?"border-foreground":"border-input",l&&"opacity-50",e),children:[jsx("button",{type:"button",className:u("shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",x.button),onClick:T,disabled:l||!P,tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:x.icon})}),jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:u("min-w-0 flex-1 bg-background text-center focus:outline-none disabled:cursor-not-allowed",x.input),ref:f,value:y??"",onChange:M,onKeyDown:k,disabled:l,onFocus:()=>b(true),onBlur:()=>b(false),...m}),jsx("button",{type:"button",className:u("shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",x.button),onClick:R,disabled:l||!E,tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:x.icon})})]}):jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:u("flex w-full bg-background px-3 py-2 text-center border placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",x.input,w,h?"border-foreground":"border-input",e),ref:f,value:y??"",onChange:M,onKeyDown:k,disabled:l,onFocus:()=>b(true),onBlur:()=>b(false),...m})});Tp.displayName="NumberInput";var Pp=cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),Mp=cva("border-2 border-background ring-0 cursor-pointer transition-transform duration-200 hover:-translate-y-1",{variants:{size:{sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-12 w-12 text-base"}},defaultVariants:{size:"md"}}),Ep=X.forwardRef(({className:e,items:t,max:n=5,size:r,showTooltips:o=false,...a},s)=>{let i=t.slice(0,n),l=t.length-n,c=(m,f)=>{let p=jsxs(Tr,{className:u(Mp({size:r})),children:[m.src&&jsx(Jr,{src:m.src,alt:m.alt||""}),jsx(Mr,{className:"text-xs",children:m.fallback||m.alt?.charAt(0)?.toUpperCase()||"?"})]},f);return o&&m.alt?jsxs(_n,{children:[jsx(Yn,{children:p}),jsx(Xn,{className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",children:m.alt})]},f):p},d=jsxs("div",{ref:s,className:u(Pp({size:r,className:e})),...a,children:[i.map((m,f)=>c(m,f)),l>0&&jsx(Tr,{className:u(Mp({size:r})),children:jsxs(Mr,{className:"bg-muted text-muted-foreground",children:["+",l]})})]});return o?jsx(Wn,{delayDuration:300,children:d}):d});Ep.displayName="AvatarGroup";var Lp=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"}}),Sp=X.forwardRef(({className:e,value:t,defaultValue:n=0,onValueChange:r,max:o=5,size:a,icon:s="star",allowHalf:i=false,readOnly:l=false,disabled:c=false,filledColor:d,emptyColor:m,...f},p)=>{let[g,h]=X.useState(n),[b,v]=X.useState(null),y=t!==void 0,x=y?t:g,w=b!==null?b:x,C=S=>{l||c||(y||h(S),r?.(S));},R=(S,H=false)=>{let D=i&&H?S+.5:S+1;C(D);},T=(S,H)=>{if(l||c)return;let D=S.currentTarget.getBoundingClientRect(),L=i&&S.clientX<D.left+D.width/2;v(L?H+.5:H+1);},M=()=>{v(null);},k=s==="heart"?Heart:Star,P=S=>w>=S+1?"full":w>=S+.5?"half":"empty",E=d?{color:d,fill:d}:{},N=m?{color:m}:{};return jsx("div",{ref:p,className:u(Lp({size:a,className:e}),c&&"opacity-50 cursor-not-allowed"),onMouseLeave:M,role:"radiogroup","aria-label":"Rating",...f,children:Array.from({length:o},(S,H)=>{let D=P(H);return jsxs("button",{type:"button",className:u("relative focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",!l&&!c&&"cursor-pointer hover:scale-110 transition-transform"),onClick:L=>{let I=L.currentTarget.getBoundingClientRect(),V=i&&L.clientX<I.left+I.width/2;R(H,V);},onMouseMove:L=>T(L,H),disabled:c||l,"aria-label":`Rate ${H+1} out of ${o}`,role:"radio","aria-checked":x===H+1,children:[jsx(k,{className:u("text-muted-foreground/30",D!=="empty"&&"absolute inset-0"),style:D==="empty"?N:void 0}),D!=="empty"&&jsx(k,{className:u("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",D==="half"&&"clip-path-half"),style:{...E,clipPath:D==="half"?"inset(0 50% 0 0)":void 0}})]},H)})})});Sp.displayName="Rating";var Hp=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 cursor-default",{variants:{variant:{solid:"border-transparent text-primary-foreground",bordered:"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:""},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-md",md:"rounded-lg",lg:"rounded-xl",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-green-600 text-white hover:bg-green-700 dark:bg-green-700 dark:hover:bg-green-600"},{variant:"solid",color:"warning",className:"bg-amber-600 text-white hover:bg-amber-700 dark:bg-amber-700 dark:hover:bg-amber-600"},{variant:"solid",color:"danger",className:"bg-red-600 text-white hover:bg-red-700 dark:bg-red-700 dark:hover:bg-red-600"},{variant:"bordered",color:"primary",className:"text-primary !border-primary hover:bg-primary/10"},{variant:"bordered",color:"secondary",className:"text-secondary-foreground !border-secondary hover:bg-secondary/10"},{variant:"bordered",color:"success",className:"text-green-600 !border-green-600 hover:bg-green-600/10 dark:text-green-500 dark:!border-green-500"},{variant:"bordered",color:"warning",className:"text-amber-600 !border-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:!border-amber-500"},{variant:"bordered",color:"danger",className:"text-red-600 !border-red-600 hover:bg-red-600/10 dark:text-red-500 dark:!border-red-500"},{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-green-600 hover:bg-green-600/10 dark:text-green-500 dark:hover:bg-green-500/10"},{variant:"ghost",color:"warning",className:"text-amber-600 hover:bg-amber-600/10 dark:text-amber-500 dark:hover:bg-amber-500/10"},{variant:"ghost",color:"danger",className:"text-red-600 hover:bg-red-600/10 dark:text-red-500 dark:hover:bg-red-500/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-green-600/15 text-green-600 hover:bg-green-600/20 dark:bg-green-500/15 dark:text-green-500 dark:hover:bg-green-500/20"},{variant:"soft",color:"warning",className:"bg-amber-600/15 text-amber-600 hover:bg-amber-600/20 dark:bg-amber-500/15 dark:text-amber-500 dark:hover:bg-amber-500/20"},{variant:"soft",color:"danger",className:"bg-red-600/15 text-red-600 hover:bg-red-600/20 dark:bg-red-500/15 dark:text-red-500 dark:hover:bg-red-500/20"}],defaultVariants:{variant:"solid",color:"primary",size:"md",radius:"full",clickable:false}}),JR={sm:"sm",md:"sm",lg:"sm"},Ip=X.forwardRef(({className:e,variant:t,color:n,size:r,radius:o,clickable:a,startContent:s,endContent:i,closable:l,onClose:c,disabled:d,children:m,onClick:f,...p},g)=>{let h=a||!!f,b=v=>{v.stopPropagation(),c?.();};return jsxs("div",{ref:g,role:h?"button":void 0,tabIndex:h&&!d?0:void 0,"aria-disabled":d,onClick:d?void 0:f,onKeyDown:h&&!d?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),f?.(v));}:void 0,className:u(Hp({variant:t,color:n,size:r,radius:o,clickable:h}),d&&"opacity-50 cursor-not-allowed",e),...p,children:[s&&jsx("span",{className:"shrink-0",children:s}),jsx("span",{className:"truncate",children:m}),i&&jsx("span",{className:"shrink-0",children:i}),l&&jsx(Nt,{size:JR[r??"md"],onClick:b,disabled:d,className:"ml-0.5 h-4 w-4"})]})});Ip.displayName="Chip";var Vp=createContext({direction:"horizontal"}),iw=({className:e,direction:t="horizontal",children:n,...r})=>jsx(Vp.Provider,{value:{direction:t},children:jsx(Group,{orientation:t,className:u("flex h-full w-full data-[orientation=vertical]:flex-col",e),...r,children:n})}),lw=Panel,cw=({withHandle:e,className:t,...n})=>{let{direction:r}=useContext(Vp),o=r==="vertical";return jsx(Separator,{className:u("relative flex shrink-0 items-center justify-center bg-border outline-none",o?"h-px w-full after:absolute after:inset-x-0 after:top-1/2 after:h-1 after:-translate-y-1/2":"w-px after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2",t),...n,children:e&&jsx("div",{className:u("z-10 flex items-center justify-center rounded-sm border bg-border",o?"h-3 w-4 rotate-90":"h-4 w-3"),children:jsx(GripVertical,{className:"h-2.5 w-2.5"})})})};var Bp=cva("relative inline-flex items-center justify-center",{variants:{size:{sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-24 w-24"},color:{default:"",primary:"",success:"",warning:"",danger:""}},defaultVariants:{size:"md",color:"default"}}),uw={sm:{size:32,strokeWidth:3,fontSize:"text-[10px]"},md:{size:48,strokeWidth:4,fontSize:"text-xs"},lg:{size:64,strokeWidth:5,fontSize:"text-sm"},xl:{size:96,strokeWidth:6,fontSize:"text-base"}},Ap={default:"var(--color-foreground, #18181b)",primary:"var(--color-primary, #18181b)",success:"var(--color-success, #16a34a)",warning:"var(--color-warning, #d97706)",danger:"var(--color-danger, #dc2626)"},Fp=X.forwardRef(({className:e,size:t="md",color:n="default",value:r,max:o=100,showValue:a=false,formatValue:s=d=>`${Math.round(d)}%`,trackClassName:i,...l},c)=>{let d=Math.min(100,Math.max(0,r/o*100)),m=uw[t],f=(m.size-m.strokeWidth)/2,p=2*Math.PI*f,g=p-d/100*p;return jsxs("div",{ref:c,className:u(Bp({size:t,color:n}),e),role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":o,...l,children:[jsxs("svg",{width:m.size,height:m.size,viewBox:`0 0 ${m.size} ${m.size}`,fill:"none",children:[jsx("circle",{className:u("stroke-muted",i),cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none"}),jsx("circle",{cx:m.size/2,cy:m.size/2,r:f,strokeWidth:m.strokeWidth,fill:"none",strokeLinecap:"round",stroke:Ap[n]||Ap.default,strokeDasharray:`${p} ${p}`,strokeDashoffset:g,style:{transformOrigin:"center",transform:"rotate(-90deg)",transition:"stroke-dashoffset 0.3s ease-in-out"}})]}),a&&jsx("span",{className:u("absolute font-medium text-foreground",m.fontSize),children:s(d)})]})});Fp.displayName="CircularProgress";var Kp=X.createContext(null),fw=()=>{let e=X.useContext(Kp);if(!e)throw new Error("OTP components must be used within InputOTP");return e},$p=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"}}),Gp=X.forwardRef(({className:e,containerClassName:t,maxLength:n,value:r,defaultValue:o="",onChange:a,onComplete:s,pattern:i,disabled:l=false,size:c,radius:d="md",children:m,...f},p)=>{let[g,h]=X.useState(o),[b,v]=X.useState(0),[y,x]=X.useState(false),w=X.useRef(null),C=r!==void 0?r:g;X.useImperativeHandle(p,()=>w.current),X.useEffect(()=>{v(Math.min(C.length,n-1));},[C,n]),X.useEffect(()=>{C.length===n&&s&&s(C);},[C,n,s]);let R=N=>{let S=N.target.value;if(i&&S){let H=new RegExp(i.replace("^","").replace("$","").replace("+",""));S=S.split("").filter(D=>H.test(D)).join("");}S=S.slice(0,n),r===void 0&&h(S),a?.(S);},T=N=>{N.key==="ArrowLeft"?v(S=>Math.max(0,S-1)):N.key==="ArrowRight"&&v(S=>Math.min(C.length,n-1,S+1));},M=()=>{w.current?.focus();},k=()=>{x(true),v(Math.min(C.length,n-1));},P=()=>{x(false);},E={value:C,activeIndex:y?b:-1,maxLength:n,disabled:l,radius:d};return jsx(Kp.Provider,{value:E,children:jsxs("div",{className:u($p({size:c}),t),onClick:M,"data-otp-container":true,children:[jsx("input",{ref:w,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:C,onChange:R,onKeyDown:T,onFocus:k,onBlur:P,disabled:l,maxLength:n,className:u("absolute opacity-0 pointer-events-none w-0 h-0",e),...f}),m]})})});Gp.displayName="InputOTP";var Up=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center",e),...t}));Up.displayName="InputOTPGroup";var gw={none:"first:rounded-l-none",sm:"first:rounded-l-md",md:"first:rounded-l-lg",lg:"first:rounded-l-xl",full:"first:rounded-l-full"},bw={none:"last:rounded-r-none",sm:"last:rounded-r-md",md:"last:rounded-r-lg",lg:"last:rounded-r-xl",full:"last:rounded-r-full"},jp=X.forwardRef(({index:e,className:t,...n},r)=>{let{value:o,activeIndex:a,disabled:s,radius:i}=fw(),l=o[e]||"",c=a===e,d=c&&o.length===e;return jsxs("div",{ref:r,"data-otp-slot":true,"data-active":c,"data-filled":!!l,className:u("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm font-medium transition-all first:border-l",gw[i],bw[i],c&&"z-10 border-foreground",s&&"cursor-not-allowed opacity-50",t),...n,children:[l,d&&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"})})]})});jp.displayName="InputOTPSlot";var Wp=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("text-muted-foreground",e),...t,children:jsx(Minus,{className:"h-4 w-4"})}));Wp.displayName="InputOTPSeparator";var Xp=cva("inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors",{variants:{variant:{solid:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900",bordered:"border border-zinc-300 bg-transparent dark:border-zinc-700",light:"bg-transparent text-zinc-800 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800",flat:"bg-zinc-100 text-zinc-800 dark:bg-zinc-800 dark:text-white",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent hover:bg-zinc-900 hover:text-white hover:border-zinc-900 dark:hover:bg-white dark:hover:text-zinc-900 dark:hover:border-white"},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:"flat",size:"md"}}),qp=X.forwardRef(({className:e,variant:t,size:n,value:r=[],onChange:o,placeholder:a="Add tag...",maxTags:s,minTagLength:i=1,maxTagLength:l=50,triggerKeys:c=["Enter",",","Tab"],allowDuplicates:d=false,disabled:m,readOnly:f,renderTag:p,...g},h)=>{let[b,v]=X.useState(""),y=X.useRef(null);X.useImperativeHandle(h,()=>y.current);let x=P=>{let E=P.trim();if(E.length<i||E.length>l||s&&r.length>=s||!d&&r.some(S=>S.text.toLowerCase()===E.toLowerCase()))return;let N={id:crypto.randomUUID(),text:E};o?.([...r,N]),v("");},w=P=>{m||f||o?.(r.filter(E=>E.id!==P));},C=P=>{if(c.includes(P.key)){if(P.key==="Tab"&&!b)return;P.preventDefault(),x(b);}P.key==="Backspace"&&!b&&r.length>0&&w(r[r.length-1].id);},R=P=>{let E=P.target.value;if(E.includes(",")){E.split(",").forEach(S=>{S.trim()&&x(S);});return}v(E);},T=P=>{P.preventDefault(),P.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(S=>{x(S);});},M=()=>{y.current?.focus();},k=s?r.length>=s:false;return jsxs("div",{className:u("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",m&&"cursor-not-allowed opacity-50",e),onClick:M,children:[r.map(P=>p?p(P,()=>w(P.id)):jsxs("span",{className:u(Xp({variant:t,size:n})),children:[P.text,!m&&!f&&jsx("button",{type:"button",onClick:E=>{E.stopPropagation(),w(P.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${P.text}`,children:jsx(X$1,{className:"h-3 w-3"})})]},P.id)),!k&&!f&&jsx("input",{ref:y,type:"text",value:b,onChange:R,onKeyDown:C,onPaste:T,placeholder:r.length===0?a:"",disabled:m,className:u("flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed","min-w-[80px]"),...g})]})});qp.displayName="TagInput";var Qp=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"}}),Jp=X.forwardRef(({className:e,size:t,icon:n,title:r,description:o,action:a,children:s,...i},l)=>jsxs("div",{ref:l,className:u(Qp({size:t,className:e})),...i,children:[n&&jsx("div",{className:"text-muted-foreground [&>svg]:h-10 [&>svg]:w-10",children:n}),r&&jsx("h3",{className:"text-lg font-semibold text-foreground",children:r}),o&&jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:o}),a&&jsx("div",{className:"mt-2",children:a}),s]}));Jp.displayName="EmptyState";var tf=cva("border p-6 text-card-foreground shadow-sm",{variants:{variant:{solid:"bg-zinc-800 text-white border-zinc-800 dark:bg-zinc-200 dark:text-zinc-900 dark:border-zinc-200",bordered:"border border-zinc-300 bg-transparent dark:border-zinc-700",light:"bg-transparent border-transparent shadow-none",flat:"bg-zinc-100 border-transparent dark:bg-zinc-800",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent hover:bg-zinc-900 hover:text-white hover:border-zinc-900 dark:hover:bg-white dark:hover:text-zinc-900 dark:hover:border-white"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"bordered",radius:"md"}}),nf=X.forwardRef(({className:e,variant:t,radius:n,label:r,value:o,icon:a,trend:s,trendValue:i,description:l,...c},d)=>{let m=s==="up"?TrendingUp:s==="down"?TrendingDown:Minus,f=s==="up"?"text-green-500":s==="down"?"text-red-500":"text-muted-foreground";return jsxs("div",{ref:d,className:u(tf({variant:t,radius:n,className:e})),...c,children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("p",{className:u("text-sm font-medium",t==="solid"?"opacity-80":"text-muted-foreground"),children:r}),a&&jsx("div",{className:u("[&>svg]:h-4 [&>svg]:w-4",t==="solid"?"opacity-80":"text-muted-foreground"),children:a})]}),jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[jsx("p",{className:"text-2xl font-bold",children:o}),s&&i&&jsxs("span",{className:u("flex items-center gap-0.5 text-sm",f),children:[jsx(m,{className:"h-3 w-3"}),i]})]}),l&&jsx("p",{className:u("mt-1 text-xs",t==="solid"?"opacity-70":"text-muted-foreground"),children:l})]})});nf.displayName="StatCard";var Xi=cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",striped:"gap-2 [&>*:nth-child(odd)]:bg-muted/50",filled:"gap-2 bg-muted/30 rounded-lg p-2"},size:{sm:"[&>*]:py-2 [&>*]:px-3",md:"[&>*]:py-3 [&>*]:px-4",lg:"[&>*]:py-4 [&>*]:px-5"}},defaultVariants:{variant:"default",size:"md"}}),kw=({checked:e,disabled:t,onClick:n})=>jsx("button",{type:"button",role:"checkbox","aria-checked":e,disabled:t,onClick:r=>{r.stopPropagation(),t||n(r);},className:u("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",e&&"bg-primary text-primary-foreground",t&&"cursor-not-allowed opacity-50"),children:e&&jsx("span",{className:"flex items-center justify-center text-current",children:jsx(Check,{className:"h-3 w-3"})})});function Pw({className:e,variant:t,size:n,items:r,renderItem:o,draggable:a=false,onReorder:s,showHandle:i=true,dragIcon:l,selectable:c=false,multiple:d=false,selectedKeys:m,defaultSelectedKeys:f=[],onSelect:p,checkable:g=false,checkedKeys:h,defaultCheckedKeys:b=[],onCheck:v,children:y,...x},w){let[C,R]=X.useState(null),[T,M]=X.useState(null),[k,P]=X.useState(new Set(f)),E=m!==void 0,N=E?new Set(m):k,[S,H]=X.useState(new Set(b)),D=h!==void 0,L=D?new Set(h):S,I=(z,j)=>{R(j),z.dataTransfer.effectAllowed="move",z.dataTransfer.setData("text/plain",String(j));},V=(z,j)=>{z.preventDefault(),!(C===null||C===j)&&M(j);},O=()=>{M(null);},A=(z,j)=>{if(z.preventDefault(),!r||C===null||C===j){R(null),M(null);return}let W=[...r],[B]=W.splice(C,1);W.splice(j,0,B),s?.(W),R(null),M(null);},K=()=>{R(null),M(null);},$=X.useCallback((z,j)=>{if(!r)return;let W=new Set(N),B=!W.has(z.id);d?B?W.add(z.id):W.delete(z.id):(W.clear(),B&&W.add(z.id)),E||P(W);let Z=r.filter(ue=>W.has(ue.id));p?.(Array.from(W),{selected:B,selectedItems:Z,item:z,event:j});},[r,N,d,E,p]),G=X.useCallback((z,j)=>{if(!r)return;let W=new Set(L),B=!W.has(z.id);B?W.add(z.id):W.delete(z.id),D||H(W);let Z=r.filter(ue=>W.has(ue.id));v?.(Array.from(W),{checked:B,checkedItems:Z,item:z,event:j});},[r,L,D,v]);return (a||c||g)&&r&&o?jsx("div",{ref:w,role:"list",className:u(Xi({variant:t,size:n,className:e})),...x,children:r.map((z,j)=>{let W=N.has(z.id),B=L.has(z.id);return jsxs("div",{role:"listitem","aria-selected":c?W:void 0,draggable:a,onDragStart:a?U=>I(U,j):void 0,onDragOver:a?U=>V(U,j):void 0,onDragLeave:a?O:void 0,onDrop:a?U=>A(U,j):void 0,onDragEnd:a?K:void 0,onClick:c&&!g?U=>$(z,U):void 0,className:u("flex items-center gap-3 transition-all",a&&"cursor-move",c&&!g&&"cursor-pointer hover:bg-muted/50",g&&"cursor-pointer hover:bg-muted/50",C===j&&"opacity-50 scale-[1.02] z-10",T===j&&"border-primary border-dashed border rounded-md",W&&c&&!g&&"bg-primary/10"),children:[a&&i&&l!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:l??jsx(GripVertical,{className:"h-5 w-5"})}),g&&jsx(kw,{checked:B,onClick:U=>G(z,U)}),jsx("div",{className:"flex-1 min-w-0",children:o(z,j)})]},z.id)})}):jsx("div",{ref:w,role:"list",className:u(Xi({variant:t,size:n,className:e})),...x,children:y})}var Ew=X.forwardRef(Pw),of=cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),af=X.forwardRef(({className:e,interactive:t,leading:n,trailing:r,children:o,...a},s)=>jsxs("div",{ref:s,role:"listitem",className:u(of({interactive:t,className:e})),...a,children:[n&&jsx("div",{className:"flex-shrink-0 text-muted-foreground",children:n}),jsx("div",{className:"flex-1 min-w-0",children:o}),r&&jsx("div",{className:"flex-shrink-0 whitespace-nowrap",children:r})]}));af.displayName="ListItem";var sf=X.forwardRef(({className:e,primary:t,secondary:n,children:r,...o},a)=>jsxs("div",{ref:a,className:u("min-w-0",e),...o,children:[t&&jsx("p",{className:"text-sm font-medium leading-none truncate",children:t}),n&&jsx("p",{className:"mt-1 text-sm text-muted-foreground truncate",children:n}),r]}));sf.displayName="ListItemText";var df=cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),uf=X.forwardRef(({className:e,position:t,...n},r)=>jsx("div",{ref:r,"data-position":t,className:u(df({position:t,className:e})),...n}));uf.displayName="Timeline";var mf=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"}}),pf=X.forwardRef(({className:e,variant:t,hideSeparator:n=false,hideConnector:r=false,dot:o,children:a,...s},i)=>jsxs("div",{ref:i,className:u(mf({variant:t,className:e})),...s,children:[!n&&jsxs("div",{className:"flex flex-col items-center",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:o}),!r&&jsx("div",{className:"w-0.5 flex-1 bg-border"})]}),a]}));pf.displayName="TimelineItem";var ff=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex-1 pt-0.5",e),...t}));ff.displayName="TimelineContent";var gf=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));gf.displayName="TimelineOpposite";var vf=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}}),hf=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",{variants:{size:{sm:"h-6 text-xs px-2.5",md:"h-8 text-sm px-3",lg:"h-10 text-base px-4"},selected:{true:"bg-background text-foreground shadow-sm",false:""}},defaultVariants:{size:"md",selected:false}}),xf=X.createContext({}),yf=X.forwardRef(({className:e,size:t="md",fullWidth:n,children:r,value:o,defaultValue:a,onValueChange:s,disabled:i,...l},c)=>{let[d,m]=X.useState(a),f=o!==void 0?o:d,p=X.useCallback(g=>{o===void 0&&m(g),s?.(g);},[o,s]);return jsx(xf.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:i},children:jsx("div",{ref:c,role:"group",className:u(vf({size:t,fullWidth:n,className:e})),...l,children:r})})});yf.displayName="SegmentedControl";var Rf=X.forwardRef(({className:e,children:t,value:n,disabled:r,...o},a)=>{let s=X.useContext(xf),i=s.value===n,l=r||s.disabled;return jsx("button",{ref:a,type:"button",role:"radio","aria-checked":i,"data-state":i?"on":"off",disabled:l,onClick:()=>{l||s.onValueChange?.(n);},className:u(hf({size:s.size,selected:i}),"flex-1",e),...o,children:t})});Rf.displayName="SegmentedControlItem";var wf=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"}}),Cf=e=>{let t=e.type;return t.startsWith("image/")?Image$1: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},is=e=>{if(e===0)return "0 Bytes";let t=1024,n=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]},Tf=(e,t,n)=>{let r=[];return t&&e.size>t&&r.push({code:"file-too-large",message:`File is larger than ${is(t)}`}),n&&n.length>0&&(n.some(a=>{if(a.startsWith("."))return e.name.toLowerCase().endsWith(a.toLowerCase());if(a.endsWith("/*")){let s=a.slice(0,-2);return e.type.startsWith(s)}return e.type===a})||r.push({code:"file-invalid-type",message:`File type not accepted. Accepted: ${n.join(", ")}`})),r},Mf=X.forwardRef(({className:e,variant:t,size:n,onFilesChange:r,onFilesRejected:o,onFileRemove:a,files:s=[],showFileList:i=true,children:l,maxSize:c=10*1024*1024,accept:d,multiple:m=true,disabled:f,...p},g)=>{let[h,b]=X.useState(false),[v,y]=X.useState(false),[x,w]=X.useState([]),C=X.useRef(null),R=X.useCallback(L=>{if(!L||L.length===0)return;let I=Array.from(L),V=[],O=[];(m?I:[I[0]]).forEach(K=>{let $=Tf(K,c,d);$.length>0?O.push({file:K,errors:$}):V.push(K);}),w(O),V.length>0&&r?.(V),O.length>0&&o?.(O);},[c,d,m,r,o]),T=X.useCallback(L=>{if(L.preventDefault(),L.stopPropagation(),!f&&(b(true),L.dataTransfer.items)){let V=Array.from(L.dataTransfer.items).some(O=>{if(O.kind!=="file")return true;if(d&&d.length>0){let A=O.type;return !d.some(K=>K.endsWith("/*")?A.startsWith(K.slice(0,-2)):A===K)}return false});y(V);}},[f,d]),M=X.useCallback(L=>{L.preventDefault(),L.stopPropagation(),!f&&(L.dataTransfer.dropEffect="copy");},[f]),k=X.useCallback(L=>{L.preventDefault(),L.stopPropagation();let I=L.currentTarget.getBoundingClientRect(),V=L.clientX,O=L.clientY;(V<I.left||V>I.right||O<I.top||O>I.bottom)&&(b(false),y(false));},[]),P=X.useCallback(L=>{L.preventDefault(),L.stopPropagation(),b(false),y(false),!f&&R(L.dataTransfer.files);},[f,R]),E=X.useCallback(()=>{f||C.current?.click();},[f]),N=X.useCallback(L=>{R(L.target.files),L.target.value="";},[R]),S=X.useCallback(L=>{f||(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),C.current?.click());},[f]),H=v?"error":h?"active":t,D=d?.join(",");return jsxs("div",{ref:g,className:u("space-y-4",e),...p,children:[jsxs("div",{role:"button",tabIndex:f?-1:0,onDragEnter:T,onDragOver:M,onDragLeave:k,onDrop:P,onClick:E,onKeyDown:S,className:u(wf({variant:H,size:n}),f&&"opacity-50 cursor-not-allowed",!f&&"cursor-pointer focus:outline-none"),"aria-disabled":f,children:[jsx("input",{ref:C,type:"file",accept:D,multiple:m,disabled:f,onChange:N,className:"sr-only",tabIndex:-1}),l||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:h?"Drop files here":"Drop files or click to upload"}),jsxs("p",{className:"text-xs text-muted-foreground",children:[c&&`Max ${is(c)}`,d&&d.length>0&&` \u2022 ${d.join(", ")}`]})]})]})]}),x.length>0&&jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:x.map(({file:L,errors:I})=>jsxs("div",{children:[jsx("span",{className:"font-medium",children:L.name}),":"," ",I.map(V=>V.message).join(", ")]},L.name))}),i&&s.length>0&&jsx("div",{className:"space-y-2",children:s.map(L=>{let I=Cf(L.file);return jsxs("div",{className:u("flex items-center gap-3 rounded-lg border p-3",L.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(I,{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:L.file.name}),jsxs("p",{className:"text-xs text-muted-foreground",children:[is(L.file.size),L.error&&jsx("span",{className:"ml-2 text-danger",children:L.error})]}),L.progress!==void 0&&L.progress<100&&jsx(_a,{value:L.progress,className:"mt-2 h-1"})]}),jsxs(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-foreground",onClick:V=>{V.stopPropagation(),a?.(L.file);},children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Remove"})]})]},L.id)})})]})});Mf.displayName="FileUpload";var Bw=`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")`,kf=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}}),qo=X.forwardRef(({color:e,isSelected:t,showTransparency:n=true,onSelect:r,size:o,shape:a,interactive:s,className:i,onClick:l,disabled:c,selectedRingColor:d,...m},f)=>jsx("button",{ref:f,type:"button",disabled:c,onClick:h=>{l?.(h),r?.(e);},className:u(kf({size:o,shape:a,interactive:s??(!!r||!!l)}),t&&"ring-2 ring-offset-2",i),style:{backgroundImage:n?Bw:void 0,backgroundSize:n?"8px 8px":void 0,...t&&{"--tw-ring-color":d||"var(--color-foreground)"}},"aria-label":`Color ${e}`,"aria-pressed":t,...m,children:jsx("span",{className:"absolute inset-0 rounded-[inherit]",style:{backgroundColor:e}})}));qo.displayName="ColorSwatch";var Pf=cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),Ef=X.forwardRef(({value:e,defaultValue:t,onChange:n,layout:r,columns:o=6,colors:a,swatchSize:s="md",swatchShape:i="square",disabled:l,selectedRingColor:c,className:d,style:m,...f},p)=>{let[g,h]=X.useState(t),b=e??g,v=X.useCallback(x=>{l||(e===void 0&&h(x),n?.(x));},[e,n,l]),y=x=>x.toLowerCase();return jsx("div",{ref:p,role:"listbox","aria-label":"Color options",className:u(Pf({layout:r}),d),style:{...r==="grid"?{gridTemplateColumns:`repeat(${o}, 1fr)`}:{},...m},...f,children:a.map(x=>{let w=b?y(b)===y(x):false;return jsx(qo,{role:"option",color:x,size:s,shape:i,isSelected:w,onSelect:v,disabled:l,selectedRingColor:c,"aria-selected":w},x)})})});Ef.displayName="ColorSwatchPicker";var $w=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],Lf={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},Sf=X.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:n,disabled:r,presets:o=$w,showInput:a=true,size:s="md",className:i,variant:l="full"},c)=>{let[d,m]=X.useState(e??t),f=X.useId();X.useEffect(()=>{e!==void 0&&m(e);},[e]);let p=b=>{m(b),n?.(b);},g=b=>{m(b),n?.(b);},h=b=>{let v=b.target.value.toUpperCase();m(v),n?.(v);};return l==="simple"?jsxs("label",{className:u("relative rounded-md border border-input shadow-sm transition-colors cursor-pointer hover:border-foreground focus-within:border-foreground overflow-hidden",r&&"opacity-50 cursor-not-allowed",Lf[s],i),children:[jsx("input",{type:"color",value:d,onChange:h,disabled:r,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed",id:f}),jsx("div",{className:"h-full w-full",style:{backgroundColor:d}})]}):jsxs(ot,{children:[jsx(qn,{ref:c,disabled:r,className:u("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",Lf[s],i),style:{backgroundColor:d},"aria-label":`Color picker, current color: ${d}`}),jsx(at,{className:"w-auto p-3",align:"start",children:jsxs("div",{className:"space-y-3",children:[jsx(HexColorPicker,{color:d,onChange:p,className:"!w-[200px]"}),a&&jsxs("div",{className:"space-y-1.5",children:[jsx(Cr,{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:d}}),jsx(HexColorInput,{id:"color-input",color:d,onChange:p,prefixed:true,className:"flex h-9 w-full rounded-md border border-input bg-background text-foreground px-3 py-2 font-mono text-sm uppercase focus:outline-none focus:border-foreground disabled:cursor-not-allowed disabled:opacity-50"})]})]}),o.length>0&&jsxs("div",{className:"space-y-1.5",children:[jsx(Cr,{className:"text-xs",children:"Presets"}),jsx("div",{className:"flex flex-wrap gap-1.5",children:o.map(b=>jsx(qo,{color:b,size:"sm",isSelected:d.toLowerCase()===b.toLowerCase(),onSelect:g},b))})]})]})})]})});Sf.displayName="ColorPicker";var Df=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"}}),Qi=e=>String(e).padStart(2,"0"),_w=e=>{let[t,n]=e.split(":").map(Number);return {hours:t||0,minutes:n||0}},Yw=(e,t)=>`${Qi(e)}:${Qi(t)}`,Hf=X.forwardRef(({className:e,size:t,value:n,onChange:r,use24Hour:o=true,minuteStep:a=1,showPicker:s=true,minTime:i,maxTime:l,disabled:c,...d},m)=>{let[f,p]=X.useState(n??""),[g,h]=X.useState(false);X.useEffect(()=>{n!==void 0&&p(n);},[n]);let{hours:b,minutes:v}=_w(f||"00:00"),y=k=>{let P=k.target.value;p(P),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(P)&&r?.(P);},x=(k,P)=>{let E=Math.max(0,Math.min(23,k)),N=Math.max(0,Math.min(59,P)),S=Yw(E,N);p(S),r?.(S);},w=()=>x(b+1,v),C=()=>x(b-1,v),R=()=>x(b,v+a),T=()=>x(b,v-a),M=({value:k,onIncrement:P,onDecrement:E})=>jsxs("div",{className:"flex flex-col items-center",children:[jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:P,disabled:c,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:Qi(k)}),jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:E,disabled:c,children:jsx(ChevronDown,{className:"h-4 w-4"})})]});return jsxs("div",{className:"relative flex items-center",children:[jsx("input",{ref:m,type:"time",value:f,onChange:y,disabled:c,className:u(Df({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...d}),s&&jsxs(ot,{open:g,onOpenChange:h,children:[jsxs(qn,{type:"button",className:"absolute right-1 h-7 w-7 p-0 inline-flex items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:c,children:[jsx(Clock,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Pick time"})]}),jsxs(at,{className:"w-auto p-4",align:"end",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(M,{value:b,onIncrement:w,onDecrement:C,max:23}),jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsx(M,{value:v,onIncrement:R,onDecrement:T,max:59})]}),jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsx(ae,{variant:"bordered",size:"sm",onClick:()=>{let k=new Date;x(k.getHours(),k.getMinutes());},children:"Now"}),jsx(ae,{size:"sm",onClick:()=>h(false),children:"Done"})]})]})]})]})});Hf.displayName="TimeInput";var If=cva("flex h-10 w-full border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors 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"}}),qw={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"},Zw=(e,t)=>{try{return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(a=>a.type==="currency")?.value??e}catch{return e}},Ji=(e,t,n,r)=>{let o=e.toFixed(t),[a,s]=o.split("."),i=a.replace(/\B(?=(\d{3})+(?!\d))/g,n);return s?`${i}${r}${s}`:i},Vf=(e,t,n)=>{if(!e)return;let r=e.replace(new RegExp(`\\${t}`,"g"),"");r=r.replace(n,"."),r=r.replace(/[^0-9.-]/g,"");let o=parseFloat(r);return isNaN(o)?void 0:o},Af=X.forwardRef(({className:e,size:t,value:n,defaultValue:r,onChange:o,currency:a="USD",locale:s="en-US",decimals:i=2,min:l,max:c,showCurrency:d=true,currencyPosition:m="prefix",currencySymbol:f,thousandSeparator:p=",",decimalSeparator:g=".",radius:h="md",disabled:b,placeholder:v,...y},x)=>{let[w,C]=X.useState(r),[R,T]=X.useState(""),[M,k]=X.useState(false),P=n!==void 0?n:w,E=f??Zw(a,s);X.useEffect(()=>{!M&&P!==void 0&&T(Ji(P,i,p,g));},[P,i,p,g,M]);let N=I=>{let V=I.target.value;if(!V){T(""),n===void 0&&C(void 0),o?.(void 0);return}if(!new RegExp(`^[0-9${p}${g}.-]*$`).test(V))return;T(V);let A=Vf(V,p,g);if(A!==void 0){let K=A;l!==void 0&&A<l&&(K=l),c!==void 0&&A>c&&(K=c),n===void 0&&C(K),o?.(K);}},S=()=>{k(true),P!==void 0&&T(P.toString().replace(".",g));},H=()=>{k(false),T(P!==void 0?Ji(P,i,p,g):"");},D=d&&m==="prefix"&&jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:E}),L=d&&m==="suffix"&&jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:E});return jsxs("div",{className:"relative flex items-center",children:[D&&jsx("div",{className:"absolute left-3 pointer-events-none",children:D}),jsx("input",{ref:x,type:"text",inputMode:"decimal",value:R,onChange:N,onFocus:S,onBlur:H,disabled:b,placeholder:v??`0${g}${"0".repeat(i)}`,className:u(If({size:t}),qw[h],D&&"pl-8",L&&"pr-8","text-right",e),style:{borderColor:M?"var(--color-foreground)":void 0},...y}),L&&jsx("div",{className:"absolute right-3 pointer-events-none",children:L})]})});Af.displayName="CurrencyInput";var zf=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors 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"}}),el={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:"#####-####"}},eC=(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}},rr=e=>["#","A","*"].includes(e),cs=(e,t,n)=>{let r="",o=0;for(let a=0;a<t.length&&o<=e.length;a++){let s=t[a];if(rr(s)){if(o<e.length){let i=e[o];eC(i,s)?(r+=i,o++):(o++,a--);}}else (o<e.length||n)&&(r+=s);}return r},tl=(e,t)=>{let n="";for(let r=0;r<e.length&&r<t.length;r++){let o=t[r];rr(o)&&(n+=e[r]);}return n},Of=(e,t)=>e.split("").map(n=>rr(n)?t:n).join(""),tC=(e,t,n)=>{let r=0;for(let i=0;i<n&&i<e.length&&i<t.length;i++)rr(t[i])&&r++;let a=0,s=0;for(let i=0;i<t.length&&s<r;i++)a++,rr(t[i])&&s++;for(;a<t.length&&!rr(t[a]);)a++;return Math.min(a,e.length)},Bf=X.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,mask:a,maskPlaceholder:s="_",showMaskPlaceholder:i=false,includeMaskChars:l=false,disabled:c,placeholder:d,...m},f)=>{let p=typeof a=="string"&&a in el?el[a].mask:a,[g,h]=X.useState(r),[b,v]=X.useState(""),[y,x]=X.useState(false),w=X.useRef(null),C=n!==void 0?n:g;X.useImperativeHandle(f,()=>w.current),X.useEffect(()=>{let k=cs(C,p,true);v(k);},[C,p]);let R=k=>{let P=k.target.value,E=k.target.selectionStart??0,N=P.replace(/[^\w]/g,""),S=cs(N,p,true),H=tl(S,p);v(S),n===void 0&&h(l?S:H),o?.(H,S),requestAnimationFrame(()=>{if(w.current){let D=tC(S,p,E);w.current.setSelectionRange(D,D);}});},T=k=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(k.key)||k.ctrlKey||k.metaKey)return;let P=w.current;if(!P)return;let E=P.selectionStart??0;if(k.key==="Backspace"&&E>0){let N=E-1;for(;N>0&&!rr(p[N]);)N--;let S=tl(b,p),H=0;for(let I=0;I<N&&I<p.length;I++)rr(p[I])&&H++;let D=S.slice(0,Math.max(0,H-1))+S.slice(H),L=cs(D,p,true);v(L),n===void 0&&h(l?L:D),o?.(D,L),k.preventDefault(),requestAnimationFrame(()=>{w.current&&w.current.setSelectionRange(N,N);});}},M=i?Of(p,s):d;return jsx("input",{ref:w,type:"text",value:b,onChange:R,onKeyDown:T,onFocus:()=>x(true),onBlur:()=>x(false),disabled:c,placeholder:M,className:u(zf({size:t}),e),style:{borderColor:y?"var(--color-foreground)":void 0},...m})});Bf.displayName="MaskedInput";var sC=cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors 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"}}),Kf=[{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:"AT",name:"Austria",dialCode:"+43",flag:"\u{1F1E6}\u{1F1F9}",format:"### #######"},{code:"BE",name:"Belgium",dialCode:"+32",flag:"\u{1F1E7}\u{1F1EA}",format:"### ## ## ##"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"\u{1F1E7}\u{1F1F7}",format:"(##) #####-####"},{code:"BG",name:"Bulgaria",dialCode:"+359",flag:"\u{1F1E7}\u{1F1EC}",format:"### ### ###"},{code:"CA",name:"Canada",dialCode:"+1",flag:"\u{1F1E8}\u{1F1E6}",format:"(###) ###-####"},{code:"CN",name:"China",dialCode:"+86",flag:"\u{1F1E8}\u{1F1F3}",format:"### #### ####"},{code:"HR",name:"Croatia",dialCode:"+385",flag:"\u{1F1ED}\u{1F1F7}",format:"## ### ####"},{code:"CZ",name:"Czech Republic",dialCode:"+420",flag:"\u{1F1E8}\u{1F1FF}",format:"### ### ###"},{code:"DK",name:"Denmark",dialCode:"+45",flag:"\u{1F1E9}\u{1F1F0}",format:"## ## ## ##"},{code:"EG",name:"Egypt",dialCode:"+20",flag:"\u{1F1EA}\u{1F1EC}",format:"### ### ####"},{code:"FI",name:"Finland",dialCode:"+358",flag:"\u{1F1EB}\u{1F1EE}",format:"## ### ####"},{code:"FR",name:"France",dialCode:"+33",flag:"\u{1F1EB}\u{1F1F7}",format:"# ## ## ## ##"},{code:"DE",name:"Germany",dialCode:"+49",flag:"\u{1F1E9}\u{1F1EA}",format:"#### #######"},{code:"GR",name:"Greece",dialCode:"+30",flag:"\u{1F1EC}\u{1F1F7}",format:"### ### ####"},{code:"HK",name:"Hong Kong",dialCode:"+852",flag:"\u{1F1ED}\u{1F1F0}",format:"#### ####"},{code:"HU",name:"Hungary",dialCode:"+36",flag:"\u{1F1ED}\u{1F1FA}",format:"## ### ####"},{code:"IN",name:"India",dialCode:"+91",flag:"\u{1F1EE}\u{1F1F3}",format:"##### #####"},{code:"IL",name:"Israel",dialCode:"+972",flag:"\u{1F1EE}\u{1F1F1}",format:"##-###-####"},{code:"IT",name:"Italy",dialCode:"+39",flag:"\u{1F1EE}\u{1F1F9}",format:"### ### ####"},{code:"JP",name:"Japan",dialCode:"+81",flag:"\u{1F1EF}\u{1F1F5}",format:"##-####-####"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"\u{1F1F2}\u{1F1FD}",format:"### ### ####"},{code:"NL",name:"Netherlands",dialCode:"+31",flag:"\u{1F1F3}\u{1F1F1}",format:"## ########"},{code:"NZ",name:"New Zealand",dialCode:"+64",flag:"\u{1F1F3}\u{1F1FF}",format:"## ### ####"},{code:"NG",name:"Nigeria",dialCode:"+234",flag:"\u{1F1F3}\u{1F1EC}",format:"### ### ####"},{code:"NO",name:"Norway",dialCode:"+47",flag:"\u{1F1F3}\u{1F1F4}",format:"### ## ###"},{code:"PK",name:"Pakistan",dialCode:"+92",flag:"\u{1F1F5}\u{1F1F0}",format:"### #######"},{code:"PL",name:"Poland",dialCode:"+48",flag:"\u{1F1F5}\u{1F1F1}",format:"### ### ###"},{code:"PT",name:"Portugal",dialCode:"+351",flag:"\u{1F1F5}\u{1F1F9}",format:"### ### ###"},{code:"RO",name:"Romania",dialCode:"+40",flag:"\u{1F1F7}\u{1F1F4}",format:"### ### ###"},{code:"RU",name:"Russia",dialCode:"+7",flag:"\u{1F1F7}\u{1F1FA}",format:"(###) ###-##-##"},{code:"SA",name:"Saudi Arabia",dialCode:"+966",flag:"\u{1F1F8}\u{1F1E6}",format:"## ### ####"},{code:"RS",name:"Serbia",dialCode:"+381",flag:"\u{1F1F7}\u{1F1F8}",format:"## ### ####"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"\u{1F1F8}\u{1F1EC}",format:"#### ####"},{code:"SK",name:"Slovakia",dialCode:"+421",flag:"\u{1F1F8}\u{1F1F0}",format:"### ### ###"},{code:"SI",name:"Slovenia",dialCode:"+386",flag:"\u{1F1F8}\u{1F1EE}",format:"## ### ###"},{code:"ZA",name:"South Africa",dialCode:"+27",flag:"\u{1F1FF}\u{1F1E6}",format:"## ### ####"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"\u{1F1F0}\u{1F1F7}",format:"##-####-####"},{code:"ES",name:"Spain",dialCode:"+34",flag:"\u{1F1EA}\u{1F1F8}",format:"### ### ###"},{code:"SE",name:"Sweden",dialCode:"+46",flag:"\u{1F1F8}\u{1F1EA}",format:"##-### ## ##"},{code:"CH",name:"Switzerland",dialCode:"+41",flag:"\u{1F1E8}\u{1F1ED}",format:"## ### ## ##"},{code:"TW",name:"Taiwan",dialCode:"+886",flag:"\u{1F1F9}\u{1F1FC}",format:"### ### ###"},{code:"TR",name:"Turkey",dialCode:"+90",flag:"\u{1F1F9}\u{1F1F7}",format:"(###) ### ## ##"},{code:"UA",name:"Ukraine",dialCode:"+380",flag:"\u{1F1FA}\u{1F1E6}",format:"## ### ## ##"},{code:"AE",name:"United Arab Emirates",dialCode:"+971",flag:"\u{1F1E6}\u{1F1EA}",format:"## ### ####"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"\u{1F1EC}\u{1F1E7}",format:"#### ### ####"},{code:"US",name:"United States",dialCode:"+1",flag:"\u{1F1FA}\u{1F1F8}",format:"(###) ###-####"}],ds=(e,t)=>{let n=e.replace(/\D/g,""),r="",o=0;for(let a=0;a<t.length&&o<n.length;a++)t[a]==="#"?(r+=n[o],o++):r+=t[a];return r},iC=e=>e.replace(/#/g,"_"),$f=X.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,country:a,defaultCountry:s="TR",onCountryChange:i,countries:l=Kf,showCountrySelect:c=true,showDialCode:d=false,disabled:m,placeholder:f,radius:p="md",...g},h)=>{let[b,v]=X.useState(r),[y,x]=X.useState(a??s),[w,C]=X.useState(false),[R,T]=X.useState(false),[M,k]=X.useState(false),[P,E]=X.useState({top:0,left:0,width:0}),N=X.useRef(null),S=X.useRef(null),H=n!==void 0?n:b,D=a??y,L=l.find(G=>G.code===D)??l[0],I=ds(H,L.format);X.useEffect(()=>{k(true);},[]),X.useEffect(()=>{if(R&&N.current){let G=N.current.getBoundingClientRect();E({top:G.bottom+4,left:G.left,width:Math.max(G.width,280)});}},[R]),X.useEffect(()=>{if(!R)return;let G=Y=>{N.current&&!N.current.contains(Y.target)&&S.current&&!S.current.contains(Y.target)&&T(false);};return document.addEventListener("mousedown",G),()=>document.removeEventListener("mousedown",G)},[R]),X.useEffect(()=>{if(!R)return;let G=Y=>{Y.key==="Escape"&&T(false);};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[R]);let V=G=>{let F=G.target.value.replace(/\D/g,"");n===void 0&&v(F);let z=ds(F,L.format),j=`${L.dialCode} ${z}`;o?.(F,j,L);},O=G=>{let Y=l.find(j=>j.code===G);if(!Y)return;a===void 0&&x(G),i?.(Y);let F=ds(H,Y.format),z=`${Y.dialCode} ${F}`;o?.(H,z,Y),T(false);},A=t==="sm"?"h-9":t==="lg"?"h-11":"h-10",K=w||R;return jsxs("div",{className:u("flex border bg-background transition-colors",{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}[p],m&&"cursor-not-allowed opacity-50"),style:{borderColor:K?"var(--color-foreground)":"var(--color-border)"},children:[c&&jsxs(Fragment,{children:[jsxs("button",{ref:N,type:"button",disabled:m,onClick:()=>T(!R),className:u("flex items-center justify-between bg-transparent px-3 py-2 text-sm focus:outline-none disabled:cursor-not-allowed disabled:opacity-50","w-[100px] shrink-0 border-r",A),style:{borderColor:K?"var(--color-foreground)":"var(--color-border)"},children:[jsxs("span",{className:"flex items-center gap-1.5",children:[jsx("span",{children:L.flag}),jsx("span",{className:"text-xs text-muted-foreground",children:L.dialCode})]}),jsx(ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",R&&"rotate-180")})]}),M&&R&&Ba.createPortal(jsx("div",{ref:S,className:"fixed z-50 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",style:{top:P.top,left:P.left,minWidth:P.width},children:jsx(ke,{style:{maxHeight:300},children:jsx("div",{className:"p-1",children:l.map(G=>jsxs("div",{role:"option","aria-selected":G.code===D,onClick:()=>O(G.code),className:"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:G.code===D&&jsx(Check,{className:"h-4 w-4"})}),jsxs("span",{className:"flex items-center gap-2",children:[jsx("span",{children:G.flag}),jsx("span",{className:"flex-1",children:G.name}),jsx("span",{className:"text-xs text-muted-foreground",children:G.dialCode})]})]},G.code))})})}),document.body)]}),jsxs("div",{className:"relative flex-1",children:[d&&!c&&jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:L.dialCode}),jsx("input",{ref:h,type:"tel",inputMode:"tel",value:I,onChange:V,onFocus:()=>C(true),onBlur:()=>C(false),disabled:m,placeholder:f??iC(L.format),className:u("flex h-10 w-full bg-transparent px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",t==="sm"&&"h-8 px-2 text-xs",t==="lg"&&"h-12 px-4 text-base",d&&!c&&"pl-12",e),...g})]})]})});$f.displayName="PhoneInput";var Uf=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",bordered:"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:"bordered",size:"md",sticky:false}}),jf=X.forwardRef(({className:e,variant:t,size:n,sticky:r,brand:o,children:a,mobileBreakpoint:s="md",...i},l)=>{let[c,d]=X.useState(false),m={sm:"hidden sm:flex",md:"hidden md:flex",lg:"hidden lg:flex"}[s],f={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden"}[s];return jsxs("nav",{ref:l,className:u(Uf({variant:t,size:n,sticky:r,className:e})),...i,children:[jsxs("div",{className:"flex items-center justify-between w-full",children:[o&&jsx("div",{className:"flex-shrink-0",children:o}),jsx("div",{className:u("items-center gap-4 flex-1 justify-end",m),children:a}),jsx("button",{type:"button",className:u("p-2 rounded-md hover:bg-accent hover:text-accent-foreground transition-colors",f),onClick:()=>d(!c),"aria-label":c?"Close menu":"Open menu","aria-expanded":c,children:c?jsx(X$1,{className:"h-5 w-5"}):jsx(Menu,{className:"h-5 w-5"})})]}),c&&jsx("div",{className:u("absolute top-full left-0 right-0 flex flex-col gap-2 p-4 bg-background border-b border-border shadow-lg",f),children:a})]})});jf.displayName="Navbar";var Wf=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center gap-2 font-semibold text-lg",e),...t}));Wf.displayName="NavbarBrand";var _f=X.forwardRef(({className:e,justify:t="start",...n},r)=>{let o={start:"justify-start",center:"justify-center",end:"justify-end"}[t];return jsx("div",{ref:r,className:u("flex items-center gap-4",o,e),...n})});_f.displayName="NavbarContent";var Yf=X.forwardRef(({className:e,isActive:t,...n},r)=>jsx("div",{ref:r,className:u("flex items-center",t&&"text-primary font-medium",e),...n}));Yf.displayName="NavbarItem";var Xf=X.forwardRef(({className:e,isActive:t,...n},r)=>jsx("a",{ref:r,className:u("text-sm font-medium transition-colors hover:text-primary",t?"text-primary":"text-muted-foreground",e),...n}));Xf.displayName="NavbarLink";var Zf=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",bordered:"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:"bordered",size:"md",underline:"hover"}}),Qf=X.forwardRef(({className:e,variant:t,size:n,underline:r,isExternal:o,showExternalIcon:a=true,isDisabled:s,children:i,...l},c)=>{let d=o?{target:"_blank",rel:"noopener noreferrer"}:{};return jsxs("a",{ref:c,className:u(Zf({variant:t,size:n,underline:r,className:e}),s&&"pointer-events-none opacity-50"),"aria-disabled":s,...d,...l,children:[i,o&&a&&jsx(ExternalLink,{className:"h-3 w-3 ml-0.5","aria-hidden":"true"})]})});Qf.displayName="Link";var Jf=cva("fixed z-50 transition-all duration-300",{variants:{position:{"bottom-right":"bottom-6 right-6","bottom-left":"bottom-6 left-6","bottom-center":"bottom-6 left-1/2 -translate-x-1/2"}},defaultVariants:{position:"bottom-right"}}),eg=X.forwardRef(({className:e,position:t,threshold:n=400,icon:r,behavior:o="smooth",variant:a="solid",color:s="default",size:i="md",radius:l="full",target:c,onVisibilityChange:d,onClick:m,...f},p)=>{let[g,h]=X.useState(false);X.useEffect(()=>{let y=c?.current||window,x=()=>{let C=(c?.current?c.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>n;C!==g&&(h(C),d?.(C));};return y.addEventListener("scroll",x,{passive:true}),x(),()=>{y.removeEventListener("scroll",x);}},[n,c,g,d]);let b=y=>{c?.current?c.current.scrollTo({top:0,behavior:o}):window.scrollTo({top:0,behavior:o}),m?.(y);},v=i==="sm"?"h-4 w-4":i==="lg"?"h-6 w-6":"h-5 w-5";return jsx("div",{className:u(Jf({position:t}),g?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",e),children:jsx(ae,{ref:p,type:"button",variant:a,color:s,size:i,isIconOnly:true,radius:l,onClick:b,"aria-label":"Back to top",className:"shadow-lg",...f,children:r||jsx(ArrowUp,{className:v})})})});eg.displayName="BackTop";var RC=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),wC=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),tg=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"}},defaultVariants:{radius:"sm"}}),ps=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-xl"}},defaultVariants:{radius:"sm"}}),ng=X.createContext(null),ar=()=>{let e=X.useContext(ng);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},rg=X.createContext(null),Qo=()=>{let e=X.useContext(rg);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},rl=X.createContext(null),og=X.createContext(null),ag=X.forwardRef(({className:e,children:t,radius:n="sm",...r},o)=>{let[a,s]=X.useState(null);return jsx(ng.Provider,{value:{activeMenu:a,setActiveMenu:s,radius:n},children:jsx("div",{ref:o,role:"menubar",className:u("flex h-10 items-center space-x-1 border bg-background p-1",RC({radius:n}),e),...r,children:t})})});ag.displayName="Menubar";var sg=({children:e})=>{let{activeMenu:t,setActiveMenu:n}=ar(),r=X.useId(),o=X.useRef(null),a=t===r,s=X.useCallback(i=>{n(i?r:null);},[r,n]);return jsx(rg.Provider,{value:{menuId:r,triggerRef:o,open:a,onOpenChange:s},children:e})};sg.displayName="MenubarMenu";var ig=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));ig.displayName="MenubarGroup";var lg=({children:e,container:t})=>{let[n,r]=X.useState(false);return X.useEffect(()=>{r(true);},[]),n?Ba.createPortal(e,t||document.body):null};lg.displayName="MenubarPortal";var cg=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=X.useState(n),s=t!==void 0,i=s?t:o,l=X.useRef(null),c=X.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(rl.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};cg.displayName="MenubarSub";var dg=X.forwardRef(({value:e="",onValueChange:t,className:n,...r},o)=>jsx(og.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsx("div",{ref:o,role:"group",className:n,...r})}));dg.displayName="MenubarRadioGroup";var ug=X.forwardRef(({className:e,onClick:t,onMouseEnter:n,...r},o)=>{let{activeMenu:a,setActiveMenu:s,radius:i}=ar(),{menuId:l,triggerRef:c,open:d,onOpenChange:m}=Qo(),f=g=>{t?.(g),m(!d);},p=g=>{n?.(g),a&&a!==l&&(s(l),document.activeElement instanceof HTMLElement&&document.activeElement.blur());};return jsx("button",{ref:g=>{c.current=g,typeof o=="function"?o(g):o&&(o.current=g);},type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":d,"data-state":d?"open":"closed",className:u("flex cursor-default select-none items-center px-3 py-1.5 text-sm font-medium outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",wC({radius:i}),e),onClick:f,onMouseEnter:p,...r})});ug.displayName="MenubarTrigger";var mg=X.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let{radius:i}=ar(),l=X.useContext(rl);if(!l)throw new Error("MenubarSubTrigger must be used within MenubarSub");let{open:c,onOpenChange:d,triggerRef:m}=l,f=g=>{r?.(g),d(true);},p=g=>{o?.(g),d(false);};return jsxs("div",{ref:g=>{m.current=g,typeof s=="function"?s(g):s&&(s.current=g);},role:"menuitem","aria-haspopup":"menu","aria-expanded":c,"data-state":c?"open":"closed",className:u("flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",ps({radius:i}),t&&"pl-8",e),onMouseEnter:f,onMouseLeave:p,...a,children:[n,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});mg.displayName="MenubarSubTrigger";var pg=X.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let{radius:s}=ar(),i=X.useContext(rl);if(!i)throw new Error("MenubarSubContent must be used within MenubarSub");let{open:l,onOpenChange:c,triggerRef:d}=i,[m,f]=X.useState({top:0,left:0}),[p,g]=X.useState(false),h=X.useRef(null);X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!l||!d.current||!h.current)return;(()=>{if(!d.current||!h.current)return;let x=d.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),C=x.top,R=x.right+t;R+w.width>window.innerWidth&&(R=x.left-w.width-t),f({top:C,left:R});})();},[l,t,d]);let b=y=>{n?.(y),c(true);},v=y=>{r?.(y),c(false);};return !p||!l?null:Ba.createPortal(jsx("div",{ref:y=>{h.current=y,typeof a=="function"?a(y):a&&(a.current=y);},role:"menu","data-state":l?"open":"closed",className:u("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",tg({radius:s}),e),style:{top:m.top,left:m.left},onMouseEnter:b,onMouseLeave:v,...o}),document.body)});pg.displayName="MenubarSubContent";var fg=X.forwardRef(({className:e,align:t="start",alignOffset:n=-4,sideOffset:r=8,children:o,...a},s)=>{let{radius:i}=ar(),{triggerRef:l,open:c,onOpenChange:d}=Qo(),[m,f]=X.useState({top:0,left:0}),[p,g]=X.useState(false),h=X.useRef(null);return X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!c||!l.current||!h.current)return;let b=()=>{if(!l.current||!h.current)return;let v=l.current.getBoundingClientRect(),y=h.current.getBoundingClientRect(),x=v.bottom+r,w=v.left+n;t==="center"?w=v.left+v.width/2-y.width/2:t==="end"&&(w=v.right-y.width-n),f({top:x,left:w});};return b(),window.addEventListener("resize",b),window.addEventListener("scroll",b,true),()=>{window.removeEventListener("resize",b),window.removeEventListener("scroll",b,true);}},[c,t,n,r,l]),X.useEffect(()=>{if(!c)return;let b=v=>{let y=v.target;h.current&&!h.current.contains(y)&&l.current&&!l.current.contains(y)&&d(false);};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[c,d,l]),X.useEffect(()=>{if(!c)return;let b=v=>{v.key==="Escape"&&d(false);};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[c,d]),!p||!c?null:Ba.createPortal(jsx("div",{ref:b=>{h.current=b,typeof s=="function"?s(b):s&&(s.current=b);},role:"menu","data-state":c?"open":"closed",className:u("fixed z-50 min-w-[12rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",tg({radius:i}),e),style:{top:m.top,left:m.left},...a,children:o}),document.body)});fg.displayName="MenubarContent";var gg=X.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{radius:i}=ar(),{onOpenChange:l}=Qo(),c=d=>{if(n){d.preventDefault();return}o?.(d),r?.(),l(false);};return jsx("div",{ref:s,role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,className:u("relative flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ps({radius:i}),t&&"pl-8",!n&&"cursor-pointer",e),onClick:c,...a})});gg.displayName="MenubarItem";var bg=X.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{radius:l}=ar(),{onOpenChange:c}=Qo(),d=m=>{if(o){m.preventDefault();return}a?.(m),r?.(!n),c(false);};return jsxs("div",{ref:i,role:"menuitemcheckbox","aria-checked":n,tabIndex:o?-1:0,"aria-disabled":o,"data-disabled":o?"":void 0,"data-state":n?"checked":"unchecked",className:u("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ps({radius:l}),!o&&"cursor-pointer",e),onClick:d,...s,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n&&jsx(Check,{className:"h-4 w-4"})}),t]})});bg.displayName="MenubarCheckboxItem";var vg=X.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{radius:i}=ar(),{onOpenChange:l}=Qo(),c=X.useContext(og),d=c?.value===n,m=f=>{if(r){f.preventDefault();return}o?.(f),c?.onValueChange(n),l(false);};return jsxs("div",{ref:s,role:"menuitemradio","aria-checked":d,tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,"data-state":d?"checked":"unchecked",className:u("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ps({radius:i}),!r&&"cursor-pointer",e),onClick:m,...a,children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d&&jsx(Circle,{className:"h-2 w-2 fill-current"})}),t]})});vg.displayName="MenubarRadioItem";var hg=X.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:u("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));hg.displayName="MenubarLabel";var xg=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));xg.displayName="MenubarSeparator";var yg=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});yg.displayName="MenubarShortcut";var Rg=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"}}),wg=X.forwardRef(({className:e,orientation:t,size:n,currentStep:r=0,children:o,...a},s)=>{let i=X.Children.toArray(o);return jsx("div",{ref:s,className:u(Rg({orientation:t,size:n,className:e})),...a,children:i.map((l,c)=>X.isValidElement(l)?X.cloneElement(l,{...l.props,stepNumber:c+1,status:l.props.status||(c<r?"completed":c===r?"current":"upcoming"),isLast:c===i.length-1,orientation:t,size:n}):l)})});wg.displayName="Steps";var Cg=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"}}),TC=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"}}),MC=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"}}),Tg=X.forwardRef(({className:e,orientation:t="horizontal",size:n="md",title:r,description:o,icon:a,status:s="upcoming",stepNumber:i,isLast:l,...c},d)=>jsxs("div",{ref:d,className:u(Cg({orientation:t,size:n,className:e}),!l&&t==="horizontal"&&"flex-1"),...c,children:[jsx("div",{className:u("flex items-center",t==="vertical"&&"flex-col items-start"),children:jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:u(TC({status:s,size:n})),children:s==="completed"?jsx(Check,{className:n==="sm"?"h-3 w-3":n==="lg"?"h-5 w-5":"h-4 w-4"}):a||i}),(r||o)&&jsxs("div",{className:"flex flex-col",children:[r&&jsx("span",{className:u("font-medium",n==="sm"&&"text-sm",n==="lg"&&"text-lg",s==="upcoming"&&"text-muted-foreground"),children:r}),o&&jsx("span",{className:u("text-muted-foreground",n==="sm"&&"text-xs",n==="md"&&"text-sm",n==="lg"&&"text-base"),children:o})]})]})}),!l&&jsx("div",{className:u(MC({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Tg.displayName="Step";var Ng=cva("flex flex-col select-none",{variants:{variant:{default:"",bordered:"rounded-lg border",filled:"bg-muted/30 rounded-lg p-2"},size:{sm:"[--tree-indent:16px] [--tree-item-height:28px] text-xs",md:"[--tree-indent:20px] [--tree-item-height:32px] text-sm",lg:"[--tree-indent:24px] [--tree-item-height:40px] text-base"}},defaultVariants:{variant:"default",size:"md"}}),kg=cva("flex items-center py-1.5 px-2 rounded-sm transition-colors",{variants:{size:{sm:"py-1 px-1.5 text-sm min-h-[var(--tree-item-height)]",md:"py-1.5 px-2 text-sm min-h-[var(--tree-item-height)]",lg:"py-2 px-3 text-base min-h-[var(--tree-item-height)]"},isSelected:{true:"bg-primary/10 text-primary",false:""},isDragging:{true:"opacity-50",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed",false:""},isHoverable:{true:"hover:bg-muted/50 cursor-pointer",false:""}},defaultVariants:{size:"md",isSelected:false,isDragging:false,isDisabled:false,isHoverable:true}}),Pg=X.createContext(null),HC=()=>{let e=X.useContext(Pg);if(!e)throw new Error("TreeNodeComponent must be used within Tree");return e},IC=({checked:e,indeterminate:t,disabled:n,onClick:r})=>jsx("button",{type:"button",role:"checkbox","aria-checked":t?"mixed":e,disabled:n,onClick:o=>{o.stopPropagation(),n||r(o);},className:u("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",(e||t)&&"bg-primary text-primary-foreground",n&&"cursor-not-allowed opacity-50"),children:(e||t)&&jsx("span",{className:"flex items-center justify-center text-current",children:t?jsx(Minus,{className:"h-3 w-3"}):jsx(Check,{className:"h-3 w-3"})})}),Eg=({node:e,level:t,isLast:n=false,parentIsLastPath:r=[]})=>{let{expandedKeys:o,toggleExpand:a,selectedKeys:s,handleSelect:i,selectable:l,checkedKeys:c,halfCheckedKeys:d,handleCheck:m,checkable:f,draggable:p,draggedNode:g,setDraggedNode:h,dragOverKey:b,dragOverPosition:v,setDragOver:y,handleDrop:x,allowDrop:w,onDragStart:C,onDragOver:R,onDragEnter:T,onDragLeave:M,onDragEnd:k,showLine:P,showIcon:E,showHandle:N,dragIcon:S,icon:H,leafIcon:D,folderIcon:L,folderOpenIcon:I,blockNode:V,disabled:O,size:A,getAllKeys:K}=HC(),$=e.children&&e.children.length>0,G=e.isLeaf??!$,Y=o.has(e.key),F=s.has(e.key),z=c.has(e.key),j=d.has(e.key),W=g?.key===e.key,B=b===e.key,Z=!!(O||e.disabled),ue=l&&e.selectable!==false,U=f&&e.checkable!==false,Ce=X.useMemo(()=>Z?false:typeof p=="boolean"?p:typeof p=="function"?p(e):p&&typeof p=="object"?p.nodeDraggable?p.nodeDraggable(e):true:false,[p,e,Z]),Q=X.useMemo(()=>S!==void 0?S:typeof p=="object"&&p.icon!==void 0?p.icon:jsx(GripVertical,{className:"h-4 w-4"}),[S,p]),le=X.useMemo(()=>e.icon?e.icon:H?typeof H=="function"?H({expanded:Y,isLeaf:G}):H:G?D:Y?I:L,[e.icon,H,Y,G,D,L,I]),Fe=q=>{if(!Ce)return;q.stopPropagation(),q.dataTransfer.effectAllowed="move";let De=q.currentTarget,de=De.cloneNode(true),je=document.documentElement.classList.contains("dark"),We=je?"#0a0a0a":"#ffffff",Gn=je?"#27272a":"#e4e4e7";de.style.cssText=`
44
44
  position: fixed;
45
45
  top: -9999px;
46
46
  left: -9999px;
@@ -52,7 +52,7 @@ import*as X from'react';import {createContext,useState,useEffect,useContext,useC
52
52
  width: ${De.offsetWidth}px;
53
53
  opacity: 1;
54
54
  z-index: 9999;
55
- `,document.body.appendChild(de),q.dataTransfer.setDragImage(de,20,15),setTimeout(()=>{document.body.removeChild(de);},0),h(e),C?.({event:q,node:e});},pe=q=>{if(q.preventDefault(),q.stopPropagation(),!g||g.key===e.key||Z)return;let De=q.currentTarget.getBoundingClientRect(),de=q.clientY-De.top,je=De.height,We;de<je*.25?We=-1:de>je*.75?We=1:We=0,!(w&&!w({dropNode:e,dropPosition:We,dragNode:g}))&&(x(e.key,We),R?.({event:q,node:e}));},Ct=q=>{q.preventDefault(),q.stopPropagation(),!(!g||g.key===e.key)&&N?.({event:q,node:e,expandedKeys:K()});},bt=q=>{q.stopPropagation(),T?.({event:q,node:e});},yn=q=>{q.preventDefault(),q.stopPropagation(),!(!g||g.key===e.key||Z)&&(v!==null&&y(e,v),h(null),x(null,null));},Ke=q=>{h(null),x(null,null),P?.({event:q,node:e});},on=q=>{Z||ue&&i(e.key,e,q);},Tt=q=>{q.stopPropagation(),!Z&&!G&&a(e.key,e);},_=X.useMemo(()=>{if(!B||v===null)return "";switch(v){case -1:return "before:absolute before:left-0 before:right-0 before:top-0 before:h-0.5 before:bg-foreground";case 1:return "after:absolute after:left-0 after:right-0 after:bottom-0 after:h-0.5 after:bg-foreground";case 0:return "ring-2 ring-foreground ring-inset";default:return ""}},[B,v]),oe=[...r,n];return jsxs("div",{className:"relative",children:[k&&t>0&&jsxs(Fragment,{children:[r.map((q,De)=>!q&&jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${De} * var(--tree-indent) + 12px)`,top:0,bottom:0}},De)),jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:0,height:n?"calc(var(--tree-item-height) / 2)":"100%"}}),jsx("div",{className:"absolute border-t border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:"calc(var(--tree-item-height) / 2)",width:"calc(var(--tree-indent) - 4px)"}})]}),jsxs("div",{role:"treeitem","aria-expanded":G?void 0:Y,"aria-selected":ue?F:void 0,"aria-disabled":Z,draggable:Ce,onDragStart:Fe,onDragOver:pe,onDragEnter:Ct,onDragLeave:bt,onDrop:yn,onDragEnd:Ke,onClick:on,className:u("relative",Dg({size:A,isSelected:F,isDragging:W,isDisabled:Z,isHoverable:ue&&!Z}),_,V&&"flex-1"),style:{paddingLeft:`calc(${t} * var(--tree-indent) + 8px)`},children:[Ce&&M&&Q!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:Q}),jsx("button",{type:"button",onClick:Tt,className:u("flex-shrink-0 p-0.5 rounded hover:bg-muted/80 transition-transform",G&&"invisible"),tabIndex:-1,children:jsx(ChevronRight,{className:u("h-4 w-4 transition-transform duration-200",Y&&"rotate-90")})}),U&&jsx(WC,{checked:z,indeterminate:j,disabled:Z,onClick:q=>m(e.key,e,q)}),E&&le&&jsx("div",{className:"flex-shrink-0 text-muted-foreground ml-1",children:le}),jsx("div",{className:u("flex-1 min-w-0 truncate ml-1",V&&"flex-none"),children:e.label})]}),$&&Y&&jsx("div",{role:"group",children:e.children.map((q,De)=>jsx(Ig,{node:q,level:t+1,isLast:De===e.children.length-1,parentIsLastPath:oe},q.key))})]})},_C=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return n(e),t},YC=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return e.children&&n(e.children),t},Vg=(e,t)=>{if(!e.children)return false;for(let n of e.children)if(n.key===t||Vg(n,t))return true;return false},Ag=X.forwardRef(({className:e,variant:t,size:n,data:r,draggable:o=false,allowDrop:a,expandedKeys:s,defaultExpandedKeys:i=[],defaultExpandAll:l=false,onExpand:c,selectable:d=true,multiple:m=false,selectedKeys:f,defaultSelectedKeys:p=[],onSelect:g,checkable:h=false,checkStrictly:b=false,checkedKeys:v,defaultCheckedKeys:x=[],onCheck:y,showLine:w=false,showIcon:C=false,showHandle:R=true,dragIcon:N,icon:T,leafIcon:P=jsx(File,{className:"h-4 w-4"}),folderIcon:k=jsx(Folder,{className:"h-4 w-4"}),folderOpenIcon:E=jsx(FolderOpen,{className:"h-4 w-4"}),onDragStart:M,onDragEnter:S,onDragOver:H,onDragLeave:D,onDragEnd:L,onDrop:I,blockNode:V=false,disabled:O=false,...A},K)=>{let $=X.useCallback(()=>l?new Set(_C(r)):new Set(i),[l,i,r]),[G,Y]=X.useState($),F=s!==void 0,z=F?new Set(s):G,j=X.useCallback((ve,Ye)=>{let Kt=new Set(z),ze=!Kt.has(ve);ze?Kt.add(ve):Kt.delete(ve),F||Y(Kt),c?.(Array.from(Kt),{expanded:ze,node:Ye});},[z,F,c]),[W,B]=X.useState(new Set(p)),Z=f!==void 0,ue=Z?new Set(f):W,U=X.useCallback((ve,Ye,Kt)=>{let ze=new Set(ue),Rn=!ze.has(ve);m?Rn?ze.add(ve):ze.delete(ve):(ze.clear(),Rn&&ze.add(ve)),Z||B(ze);let Wr=[],zo=Ca=>{for(let _r of Ca)ze.has(_r.key)&&Wr.push(_r),_r.children&&zo(_r.children);};zo(r),g?.(Array.from(ze),{selected:Rn,selectedNodes:Wr,node:Ye,event:Kt});},[ue,m,Z,g,r]),[Ce,Q]=X.useState(new Set(x)),[le,Fe]=X.useState(new Set),pe=v!==void 0,Ct=pe?new Set(Array.isArray(v)?v:v.checked):Ce,bt=pe&&!Array.isArray(v)?new Set(v.halfChecked):le,yn=X.useCallback((ve,Ye,Kt)=>{let ze=new Set(Ct),Rn=new Set(bt),Wr=!ze.has(ve);if(Wr?(ze.add(ve),Rn.delete(ve)):ze.delete(ve),!b&&Ye.children){let gi=YC(Ye);for(let Un of gi)Wr?(ze.add(Un),Rn.delete(Un)):ze.delete(Un);}pe||(Q(ze),Fe(Rn));let zo=[],Ca=gi=>{for(let Un of gi)ze.has(Un.key)&&zo.push(Un),Un.children&&Ca(Un.children);};Ca(r);let _r=b?{checked:Array.from(ze),halfChecked:Array.from(Rn)}:Array.from(ze);y?.(_r,{checked:Wr,checkedNodes:zo,node:Ye,event:Kt,halfCheckedKeys:Array.from(Rn)});},[Ct,bt,b,pe,y,r]),[Ke,on]=X.useState(null),[Tt,_]=X.useState(null),[oe,q]=X.useState(null),De=X.useCallback((ve,Ye)=>{_(ve),q(Ye);},[]),de=X.useCallback((ve,Ye)=>{!Ke||!I||Ye===0&&Vg(Ke,ve.key)||I({event:{},node:ve,dragNode:Ke,dropPosition:Ye,dropToGap:Ye!==0});},[Ke,I]),je=X.useCallback(()=>Array.from(z),[z]),We={expandedKeys:z,toggleExpand:j,selectedKeys:ue,handleSelect:U,selectable:d,multiple:m,checkedKeys:Ct,halfCheckedKeys:bt,handleCheck:yn,checkable:h,checkStrictly:b,draggable:o,draggedNode:Ke,setDraggedNode:on,dragOverKey:Tt,dragOverPosition:oe,setDragOver:De,handleDrop:de,allowDrop:a,onDragStart:M,onDragEnter:S,onDragOver:H,onDragLeave:D,onDragEnd:L,showLine:w,showIcon:C,showHandle:R,dragIcon:N,icon:T,leafIcon:P,folderIcon:k,folderOpenIcon:E,blockNode:V,disabled:O,size:n,data:r,getAllKeys:je},Gn=ve=>{let Ye=ve.relatedTarget,Kt=ve.currentTarget;(!Ye||!Kt.contains(Ye))&&De(null,null);};return jsx(Hg.Provider,{value:We,children:jsx("div",{ref:K,role:"tree","aria-multiselectable":m||h,className:u(Sg({variant:t,size:n,className:e})),onDragLeave:Gn,...A,children:r.map((ve,Ye)=>jsx(Ig,{node:ve,level:0,isLast:Ye===r.length-1},ve.key))})})});Ag.displayName="Tree";var Og=cva("flex rounded-md border border-input bg-background text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-11 px-4 text-base"},fullWidth:{true:"w-full",false:"w-fit min-w-48"}},defaultVariants:{size:"md",fullWidth:false}}),eT=({text:e,query:t})=>{if(!t)return jsx(Fragment,{children:e});let n=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),r=e.split(n);return jsx(Fragment,{children:r.map((o,a)=>n.test(o)?jsx("mark",{className:"bg-primary/20 text-foreground rounded-sm",children:o},a):jsx("span",{children:o},a))})},tT=(e,t)=>{let[n,r]=X.useState(e);return X.useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n},Bg=X.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,onSelect:a,options:s=[],loadOptions:i,debounceMs:l=300,minChars:c=0,placeholder:d="Type to search...",emptyText:m="No results found.",loadingText:f="Loading...",clearable:p=false,allowCustomValue:g=true,maxHeight:h=200,highlightMatch:b=true,fullWidth:v=false,disabled:x,...y},w)=>{let[C,R]=X.useState(false),[N,T]=X.useState(r),[P,k]=X.useState([]),[E,M]=X.useState(false),[S,H]=X.useState(false),[D,L]=X.useState(0),I=X.useRef(null),V=X.useRef(null),O=n!==void 0?n:N,A=tT(O,l);X.useEffect(()=>{let U=V.current;if(!U)return;let Ce=()=>{L(U.offsetWidth);};Ce();let Q=new ResizeObserver(Ce);return Q.observe(U),()=>{Q.disconnect();}},[]),X.useImperativeHandle(w,()=>I.current);let K=i?P:s,$=X.useMemo(()=>i?K:K.filter(U=>U.label.toLowerCase().includes(O.toLowerCase())),[K,O,i]);X.useEffect(()=>{if(!i)return;if(A.length<c){k([]);return}let U=false;return (async()=>{M(true);try{let Q=await i(A);U||k(Q);}catch{U||k([]);}finally{U||M(false);}})(),()=>{U=true;}},[A,i,c]);let G=U=>{n===void 0&&T(U),o?.(U);},Y=U=>{let Ce=U.target.value;G(Ce),Ce.length>=c&&R(true);},F=U=>{G(U.label),a?.(U),R(false);},z=()=>{G(""),I.current?.focus();},j=()=>{H(true),R(true);},W=()=>{H(false);},B=U=>{U.key==="Escape"&&R(false),U.key==="ArrowDown"&&!C&&$.length>0&&R(true);},Z=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",ue=p&&O?"pr-8":"pr-3";return jsxs(ot,{open:C,onOpenChange:R,children:[jsxs(an,{ref:V,className:u("relative",v?"w-full":"w-fit"),children:[jsx("input",{ref:I,type:"text",value:O,onChange:Y,onFocus:j,onBlur:W,onKeyDown:B,disabled:x,placeholder:d,className:u(Og({size:t,fullWidth:v}),ue,e),style:{borderColor:S?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":C,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...y}),p&&O&&!x&&jsx("button",{type:"button",onClick:z,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:jsx(X$1,{className:Z})})]}),jsx(at,{className:"p-0",align:"start",style:{width:D>0?D:void 0},onOpenAutoFocus:U=>U.preventDefault(),children:jsx(Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsx(ke,{style:{maxHeight:h},children:jsx(Command.List,{id:"autocomplete-list",className:"p-1",children:E?jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsx(Loader2,{className:u(Z,"animate-spin")}),f]}):$.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:m}):$.map(U=>jsxs(Command.Item,{value:U.value,disabled:U.disabled,onSelect:()=>F(U),className:u("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:u("mr-2 h-4 w-4 shrink-0",O===U.label?"opacity-100":"opacity-0")}),jsx("span",{className:"flex-1",children:b?jsx(eT,{text:U.label,query:O}):U.label})]},U.value))})})})})]})});Bg.displayName="Autocomplete";var cl=X.createContext(null),dl=X.createContext(null),ul=()=>{let e=X.useContext(cl);if(!e)throw new Error("useFormContext must be used within a Form");return e},bs=()=>{let e=X.useContext(dl);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},nT={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:n=>typeof n=="string"&&n.length>=e,message:t??`Must be at least ${e} characters`}),maxLength:(e,t)=>({validate:n=>typeof n=="string"&&n.length<=e,message:t??`Must be at most ${e} characters`}),min:(e,t)=>({validate:n=>typeof n=="number"&&n>=e,message:t??`Must be at least ${e}`}),max:(e,t)=>({validate:n=>typeof n=="number"&&n<=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:n=>typeof n=="string"&&e.test(n),message:t}),custom:(e,t)=>({validate:e,message:t})},Fg=X.forwardRef(({defaultValues:e={},onSubmit:t,onError:n,validateOnBlur:r=true,validateOnChange:o=false,children:a,className:s,...i},l)=>{let[c,d]=X.useState(e),[m,f]=X.useState({}),[p,g]=X.useState({}),[h,b]=X.useState({}),[v,x]=X.useState(false),y=X.useRef(new Map),w=X.useCallback((D,L)=>{y.current.set(D,L);},[]),C=X.useCallback(D=>{y.current.delete(D);},[]),R=X.useCallback(D=>{let L=y.current.get(D)||[],I=c[D];for(let V of L)if(!V.validate(I))return f(O=>({...O,[D]:V.message})),false;return f(V=>({...V,[D]:null})),true},[c]),N=X.useCallback(()=>{let D=true,L={};return y.current.forEach((I,V)=>{let O=c[V];for(let A of I)if(!A.validate(O)){L[V]=A.message,D=false;break}L[V]||(L[V]=null);}),f(L),D},[c]),T=X.useCallback((D,L)=>{d(I=>({...I,[D]:L})),b(I=>({...I,[D]:true})),o&&setTimeout(()=>{R(D);},0);},[o,R]),P=X.useCallback((D,L)=>{f(I=>({...I,[D]:L}));},[]),k=X.useCallback((D,L)=>{g(I=>({...I,[D]:L})),L&&r&&R(D);},[r,R]),E=X.useCallback(D=>({value:c[D],error:m[D]??null,touched:p[D]??false,dirty:h[D]??false}),[c,m,p,h]),M=X.useCallback(()=>{d(e),f({}),g({}),b({});},[e]),S=async D=>{D.preventDefault();let L={};if(y.current.forEach((V,O)=>{L[O]=true;}),g(L),!N()){n?.(m);return}if(t){x(true);try{await t(c);}finally{x(false);}}},H={values:c,errors:m,touched:p,dirty:h,isSubmitting:v,setValue:T,setError:P,setTouched:k,validateField:R,validateAll:N,registerField:w,unregisterField:C,getFieldState:E,reset:M};return jsx(cl.Provider,{value:H,children:jsx("form",{ref:l,onSubmit:S,className:u("space-y-4",s),...i,children:a})})});Fg.displayName="Form";var Kg=({name:e,rules:t=[],defaultValue:n,children:r})=>{let o=ul(),a=X.useId();X.useEffect(()=>(o.registerField(e,t),n!==void 0&&o.values[e]===void 0&&o.setValue(e,n),()=>{o.unregisterField(e);}),[e,t,n,o]);let s=o.getFieldState(e),i={name:e,id:`${a}-${e}`,value:s.value,error:s.error,touched:s.touched,dirty:s.dirty};return jsx(dl.Provider,{value:i,children:r})};Kg.displayName="FormField";var $g=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("space-y-1.5",e),...t}));$g.displayName="FormItem";var Gg=X.forwardRef(({className:e,required:t,children:n,...r},o)=>{let{id:a,error:s,touched:i}=bs();return jsxs(Cr,{ref:o,htmlFor:a,className:u(s&&i&&"text-danger",e),...r,children:[n,t&&jsx("span",{className:"ml-1 text-danger",children:"*"})]})});Gg.displayName="FormLabel";var Ug=({children:e})=>{let{name:t,id:n,error:r,touched:o}=bs(),a=ul(),s=a.getFieldState(t),i=c=>{let d=c.target,m=d.type==="checkbox"?d.checked:d.value;a.setValue(t,m);},l=()=>{a.setTouched(t,true);};return X.cloneElement(e,{id:n,name:t,value:s.value??"",onChange:i,onBlur:l,"aria-invalid":r&&o?"true":void 0,"aria-describedby":r&&o?`${n}-error`:void 0})};Ug.displayName="FormControl";var jg=X.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-xs text-muted-foreground",e),...t}));jg.displayName="FormDescription";var Wg=X.forwardRef(({className:e,message:t,...n},r)=>{let{id:o,error:a,touched:s}=bs(),i=t??(s?a:null);return i?jsx("p",{ref:r,id:`${o}-error`,className:u("text-xs text-danger",e),role:"alert",...n,children:i}):null});Wg.displayName="FormMessage";var Yg=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"}}),Xg=X.forwardRef(({className:e,size:t,name:n,description:r,avatarUrl:o,avatarFallback:a,trailing:s,...i},l)=>{let c=a||n.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2);return jsxs("div",{ref:l,className:u(Yg({size:t,className:e})),...i,children:[jsxs(Tr,{"data-user-avatar":true,children:[o&&jsx(Jr,{src:o,alt:n}),jsx(Mr,{children:c})]}),jsxs("div",{className:"flex flex-col min-w-0",children:[jsx("span",{className:"text-sm font-medium leading-none truncate",children:n}),r&&jsx("span",{className:"text-sm text-muted-foreground truncate",children:r})]}),s&&jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});Xg.displayName="User";var Zg=cva("font-mono",{variants:{variant:{solid:"bg-primary text-primary-foreground",bordered:"border border-current bg-transparent",light:"bg-muted/50 text-foreground",flat:"bg-muted text-foreground",ghost:"bg-transparent text-foreground"},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"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"flat",size:"md",radius:"sm"}}),Qg=X.forwardRef(({className:e,variant:t,size:n,radius:r,...o},a)=>jsx("code",{ref:a,className:u(Zg({variant:t,size:n,radius:r,className:e})),...o}));Qg.displayName="Code";function nb(e){let[t,n]=useState(false);return useEffect(()=>{if(e){n(e==="dark");return}let r=()=>{n(document.documentElement.classList.contains("dark"));};r();let o=new MutationObserver(r);return o.observe(document.documentElement,{attributes:true,attributeFilter:["class"]}),()=>o.disconnect()},[e]),t}var rb=X.forwardRef(({code:e,language:t="bash",showLineNumbers:n=false,className:r,noBorder:o=false,filename:a,theme:s,hideCopyButton:i=false},l)=>{let[c,d]=useState(false),f=nb(s)?themes.oneDark:themes.oneLight,p=async()=>{await navigator.clipboard.writeText(e),d(true),setTimeout(()=>d(false),2e3);};return jsxs("div",{ref:l,className:u("overflow-hidden",!o&&"rounded-lg border border-border",r),children:[a&&jsx("div",{className:"flex items-center px-4 py-2 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:jsx("span",{className:"text-sm text-muted-foreground font-mono",children:a})}),jsxs("div",{className:"relative",children:[jsx(Highlight,{theme:f,code:e.trim(),language:t,children:({tokens:g,getLineProps:h,getTokenProps:b})=>jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:g.map((v,x)=>jsxs("div",{...h({line:v}),children:[n&&jsx("span",{className:"inline-block w-8 text-zinc-400 dark:text-zinc-600 select-none text-right mr-4",children:x+1}),v.map((y,w)=>jsx("span",{...b({token:y})},w))]},x))})}),!i&&jsx("button",{onClick:p,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:c?jsx(Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsx(Copy,{className:"h-4 w-4"})})]})]})});rb.displayName="CodeBlock";var ob=X.forwardRef(({tabs:e,className:t,theme:n},r)=>{let[o,a]=useState(0),[s,i]=useState(false),c=nb(n)?themes.oneDark:themes.oneLight,d=async()=>{await navigator.clipboard.writeText(e[o].code),i(true),setTimeout(()=>i(false),2e3);},m=e[o],f=m.language||"bash";return jsxs("div",{ref:r,className:u("rounded-lg border border-border overflow-hidden",t),children:[jsx("div",{className:"flex items-center gap-1 px-2 py-1.5 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:e.map((p,g)=>jsxs("button",{type:"button",onClick:()=>a(g),className:u("flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-colors cursor-pointer",o===g?"bg-zinc-200 dark:bg-zinc-800 text-zinc-900 dark:text-white":"text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-200 hover:bg-zinc-200/50 dark:hover:bg-zinc-800/50"),children:[p.icon,p.name]},p.name))}),jsxs("div",{className:"relative",children:[jsx(Highlight,{theme:c,code:m.code.trim(),language:f,children:({tokens:p,getLineProps:g,getTokenProps:h})=>jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:p.map((b,v)=>jsx("div",{...g({line:b}),children:b.map((x,y)=>jsx("span",{...h({token:x})},y))},v))})}),jsx("button",{onClick:d,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:s?jsx(Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsx(Copy,{className:"h-4 w-4"})})]})]})});ob.displayName="TabbedCodeBlock";var ab=cva("relative flex items-center gap-2 font-mono rounded-lg border",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",bordered:"bg-transparent border-current",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"}}),sb=X.forwardRef(({className:e,variant:t,size:n,code:r,copyable:o=true,copyLabel:a="Copy",onCopy:s,symbol:i="$",hideSymbol:l=false,...c},d)=>{let[m,f]=X.useState(false),p=async()=>{try{await navigator.clipboard.writeText(r),f(!0),s?.(),setTimeout(()=>f(!1),2e3);}catch(g){console.error("Failed to copy:",g);}};return jsxs("div",{ref:d,className:u(ab({variant:t,size:n,className:e})),...c,children:[!l&&jsx("span",{className:"text-muted-foreground select-none",children:i}),jsx("code",{className:"flex-1 truncate",children:r}),o&&jsx("button",{type:"button",onClick:p,className:u("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":m?"Copied":a,children:m?jsx(Check,{className:"h-4 w-4 text-green-500"}):jsx(Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});sb.displayName="Snippet";var gl=cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"md"}}),ib=X.forwardRef(({className:e,radius:t,src:n,alt:r,fallback:o,showSkeleton:a=true,onLoad:s,onError:i,fit:l="cover",aspectRatio:c,style:d,...m},f)=>{let[p,g]=X.useState("loading");X.useEffect(()=>{n&&g("loading");},[n]);let h=()=>{g("loaded"),s?.();},b=()=>{g("error"),i?.();},v={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}[l];return p==="error"&&o?jsx("div",{className:u(gl({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:c,...d},children:o}):jsxs("div",{className:u(gl({radius:t}),"relative",e),style:{aspectRatio:c,...d},children:[p==="loading"&&a&&jsx(Ha,{className:"absolute inset-0 h-full w-full"}),jsx("img",{ref:f,src:n,alt:r,onLoad:h,onError:b,className:u("h-full w-full transition-opacity duration-300",v,p==="loading"?"opacity-0":"opacity-100"),...m})]})});ib.displayName="Image";var db=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"}}),ub=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"}}),mb=X.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),pb=X.forwardRef(({className:e,size:t="md",value:n,defaultValue:r="",onValueChange:o,multiple:a=false,children:s,...i},l)=>{let[c,d]=X.useState(r),m=n??c,f=p=>{let g;if(a){let h=Array.isArray(m)?m:[m].filter(Boolean);h.includes(p)?g=h.filter(b=>b!==p):g=[...h,p];}else g=p;o?o(g):d(g);};return jsx(mb.Provider,{value:{value:m,onValueChange:f,multiple:a,size:t??"md"},children:jsx("div",{ref:l,role:"listbox","aria-multiselectable":a,className:u(db({size:t,className:e})),...i,children:s})})});pb.displayName="Listbox";var fb=X.forwardRef(({className:e,value:t,disabled:n,icon:r,description:o,children:a,...s},i)=>{let{value:l,onValueChange:c,multiple:d,size:m}=X.useContext(mb),f=d?Array.isArray(l)&&l.includes(t):l===t,p=()=>{n||c(t);},g=h=>{(h.key==="Enter"||h.key===" ")&&!n&&(h.preventDefault(),c(t));};return jsxs("div",{ref:i,role:"option","aria-selected":f,"data-disabled":n?"":void 0,tabIndex:n?-1:0,className:u(ub({size:m}),f&&"bg-accent text-accent-foreground",e),onClick:p,onKeyDown:g,...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:a}),o&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:o})]}),f&&jsx(Check,{className:"ml-2 h-4 w-4 flex-shrink-0"})]})});fb.displayName="ListboxItem";var bb=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"}}),vb=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 bT({className:e,variant:t,size:n,items:r,onReorder:o,renderItem:a,showHandle:s=true,disabled:i=false,...l},c){let[d,m]=X.useState(null),[f,p]=X.useState(null),g=(y,w)=>{i||(m(w),y.dataTransfer.effectAllowed="move",y.dataTransfer.setData("text/plain",String(w)));},h=(y,w)=>{y.preventDefault(),!(i||d===null||d===w)&&p(w);},b=()=>{p(null);},v=(y,w)=>{if(y.preventDefault(),i||d===null||d===w){m(null),p(null);return}let C=[...r],[R]=C.splice(d,1);C.splice(w,0,R),o?.(C),m(null),p(null);},x=()=>{m(null),p(null);};return jsx("div",{ref:c,className:u(bb({variant:t,size:n,className:e})),...l,children:r.map((y,w)=>jsxs("div",{draggable:!i,onDragStart:C=>g(C,w),onDragOver:C=>h(C,w),onDragLeave:b,onDrop:C=>v(C,w),onDragEnd:x,className:u(vb({variant:t,size:n,isDragging:d===w,isDragOver:f===w}),!i&&"cursor-move"),children:[s&&jsx("div",{className:u("flex-shrink-0 text-muted-foreground",i?"opacity-30":"cursor-grab active:cursor-grabbing"),children:jsx(GripVertical,{className:"h-5 w-5"})}),jsx("div",{className:"flex-1 min-w-0",children:a(y,w)})]},y.id))})}var vT=X.forwardRef(bT);var yb=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}}),RT={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},Rb=X.forwardRef(({className:e,variant:t,loading:n=true,size:r="md",spinner:o,text:a,children:s,...i},l)=>jsxs("div",{ref:l,className:u("relative",e),...i,children:[s,jsx("div",{className:u(yb({variant:t,visible:n})),"aria-hidden":!n,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[o||jsx(Loader2,{className:u(RT[r],"animate-spin text-primary")}),a&&jsx("span",{className:"text-sm text-muted-foreground",children:a})]})})]}));Rb.displayName="LoadingOverlay";var wb=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"}}),Cb=X.forwardRef(({className:e,color:t,isLoading:n=false,progress:r,showSpinner:o=false,...a},s)=>{let[i,l]=X.useState(0),[c,d]=X.useState(false),m=X.useRef(null);return X.useEffect(()=>{if(r!==void 0){l(r),d(r>0&&r<100);return}return n?(d(true),l(10),m.current=setInterval(()=>{l(f=>{if(f>=90)return f;let p=Math.random()*10;return Math.min(f+p,90)});},500)):i>0&&(l(100),setTimeout(()=>{d(false),l(0);},200)),()=>{m.current&&clearInterval(m.current);}},[n,r]),!c&&r===void 0||r!==void 0&&(r<=0||r>=100)?null:jsxs(Fragment,{children:[jsx("div",{ref:s,className:u(wb({color:t,className:e})),style:{width:`${i}%`},role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,...a,children:jsx("div",{className:"absolute right-0 h-full w-24 -translate-y-1 rotate-3 bg-inherit opacity-50 blur-sm"})}),o&&c&&jsx("div",{className:"fixed top-4 right-4 z-[9999]",children:jsx("div",{className:u("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")})})]})});Cb.displayName="NProgress";var kb=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}}),Tb={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},kT={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},Pb=X.forwardRef(({className:e,variant:t="spinner",size:n="md",fullScreen:r,text:o,color:a="primary",...s},i)=>{let l={primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"}[a],c=()=>{switch(t){case "dots":return jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(d=>jsx("div",{className:u(kT[n||"md"],"animate-bounce rounded-full bg-current",l),style:{animationDelay:`${d*.15}s`}},d))});case "pulse":return jsx("div",{className:u(Tb[n||"md"],"animate-pulse rounded-full bg-current",l)});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:u(Tb[n||"md"],"animate-spin",l)})}};return jsx("div",{ref:i,className:u(kb({variant:t,size:n,fullScreen:r,className:e})),role:"status","aria-label":o||"Loading",...s,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[c(),o&&jsx("span",{className:u("text-sm",l),children:o})]})})});Pb.displayName="Loading";var ET=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),LT=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-11 py-2.5 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"},showPickerIcon:{true:"",false:""}},compoundVariants:[{size:"sm",showPickerIcon:true,className:"pl-3 pr-8"},{size:"sm",showPickerIcon:false,className:"px-3"},{size:"md",showPickerIcon:true,className:"pl-3 pr-10"},{size:"md",showPickerIcon:false,className:"px-3"},{size:"lg",showPickerIcon:true,className:"pl-4 pr-12"},{size:"lg",showPickerIcon:false,className:"px-4"}],defaultVariants:{size:"md",isInvalid:false,fullWidth:false,showPickerIcon:true}}),ST=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"}}),DT=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"}}),Ms={"dd/MM/yyyy":"/","MM/dd/yyyy":"/","yyyy-MM-dd":"-","dd.MM.yyyy":"."},hl={"dd/MM/yyyy":["day","month","year"],"MM/dd/yyyy":["month","day","year"],"yyyy-MM-dd":["year","month","day"],"dd.MM.yyyy":["day","month","year"]},vl=(e,t)=>String(e).padStart(t,"0"),Eb=(e,t)=>{if(!e)return "";let n=vl(e.getDate(),2),r=vl(e.getMonth()+1,2),o=vl(e.getFullYear(),4),a=Ms[t],s=hl[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},ws=(e,t)=>{let n=Ms[t],r=e.split(n);if(r.length!==3)return null;let o=hl[t],a={};if(o.forEach((i,l)=>{a[i]=parseInt(r[l],10);}),isNaN(a.day)||isNaN(a.month)||isNaN(a.year)||a.month<1||a.month>12||a.day<1||a.day>31||a.year<1e3||a.year>9999)return null;let s=new Date(a.year,a.month-1,a.day);return s.getFullYear()!==a.year||s.getMonth()!==a.month-1||s.getDate()!==a.day?null:s},HT=e=>{let t=Ms[e];return hl[e].map(r=>r==="year"?"####":"##").join(t)},na=(e,t)=>{if(!e?.from)return "";let n=Eb(e.from,t),r=e.to?Eb(e.to,t):"";return n&&r?`${n} - ${r}`:n},Lb=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:b="dd.MM.yyyy",showPickerIcon:v=true,mode:x="text",fullWidth:y=false,numberOfMonths:w=2,align:C="start",disabled:R,placeholder:N,id:T,...P},k)=>{let E=X.useId(),M=T||E,S=`${M}-description`,H=`${M}-error`,[D,L]=X.useState(f),[I,V]=X.useState(""),[O,A]=X.useState(false),[K,$]=X.useState(false),G=m!==void 0?m:D,Y=a&&r,F=HT(b),z=Ms[b],j=" - ";X.useEffect(()=>{K||V(na(G,b));},[G,b,K]);let W=le=>{m===void 0&&L(le),p?.(le);},B=le=>{W(le),V(na(le,b)),le?.from&&le?.to&&A(false);},Z=le=>{let Fe=le.target.value;Fe=Fe.replace(new RegExp(`[^0-9\\${z}\\s-]`,"g"),"");let pe=`${F}${j}${F}`,Ct=Fe.replace(new RegExp(`[\\${z}\\s-]`,"g"),""),bt="",yn=0;for(let Ke=0;Ke<pe.length&&yn<Ct.length;Ke++)pe[Ke]==="#"?(bt+=Ct[yn],yn++):bt+=pe[Ke];if(V(bt),bt.length===pe.length){let Ke=bt.split(j);if(Ke.length===2){let on=ws(Ke[0].trim(),b),Tt=ws(Ke[1].trim(),b);if(on&&Tt){if(g&&(on<g||Tt<g)||h&&(on>h||Tt>h))return;on<=Tt&&W({from:on,to:Tt});}}}},ue=()=>{$(true);},U=()=>{$(false);let le=`${F}${j}${F}`;if(I.length!==le.length)V(na(G,b));else {let Fe=I.split(j);if(Fe.length!==2)V(na(G,b));else {let pe=ws(Fe[0].trim(),b),Ct=ws(Fe[1].trim(),b);(!pe||!Ct||pe>Ct)&&V(na(G,b));}}},Ce=()=>{R||A(true);},Q=()=>{!R&&x==="picker"&&v&&A(true);};return jsxs("div",{className:u(ET({size:s}),e),children:[t&&jsxs("label",{htmlFor:M,className:u(DT({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs(ot,{open:v&&O,onOpenChange:A,children:[jsxs(an,{className:u("relative",y?"w-full":"w-fit"),children:[jsx("input",{ref:k,id:M,type:"text",inputMode:x==="text"?"numeric":void 0,value:I,onChange:x==="text"?Z:void 0,onClick:Q,onFocus:ue,onBlur:U,readOnly:x==="picker","aria-invalid":a,"aria-describedby":Y?H:n?S:void 0,"aria-required":o,disabled:R,placeholder:N||`${b.toLowerCase()} - ${b.toLowerCase()}`,className:u(LT({size:s,isInvalid:a,fullWidth:y,showPickerIcon:v}),x==="picker"&&v&&"cursor-pointer",l),style:{borderColor:K||v&&O?"var(--color-foreground)":void 0},...P}),v&&jsx("button",{type:"button",onClick:Ce,disabled:R,className:"absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",tabIndex:-1,"aria-label":"Open calendar",children:jsx(Calendar,{className:u(ST({size:s}))})})]}),v&&jsx(at,{className:"w-auto p-0",align:C,children:jsx(to,{mode:"range",selected:G,onSelect:B,numberOfMonths:w,disabled:le=>!!(g&&le<g||h&&le>h),defaultMonth:G?.from,showMonthAndYearPickers:true})})]}),n&&!Y&&jsx("p",{id:S,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),Y&&jsx("p",{id:H,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Lb.displayName="DateRangePicker";var uo=e=>String(e).padStart(2,"0"),Sb=X.forwardRef(({value:e,onValueChange:t,placeholder:n="Pick a time",use24Hour:r=true,minuteStep:o=1,disabled:a=false,className:s},i)=>{let[l,c]=X.useState(false),d=r?Array.from({length:24},(y,w)=>w):Array.from({length:12},(y,w)=>w+1),m=Array.from({length:Math.floor(60/o)},(y,w)=>w*o),f=y=>{if(!y)return n;if(r)return `${uo(y.hours)}:${uo(y.minutes)}`;let w=y.hours%12||12,C=y.hours>=12?"PM":"AM";return `${uo(w)}:${uo(y.minutes)} ${C}`},p=y=>{let w=e?.minutes??0,C=y;if(!r&&e){let R=e.hours>=12;R&&y!==12?C=y+12:!R&&y===12&&(C=0);}t?.({hours:C,minutes:w});},g=y=>{let w=e?.hours??0;t?.({hours:w,minutes:y});},h=y=>{if(!e)return;let w=e.hours;y==="AM"&&e.hours>=12?w=e.hours-12:y==="PM"&&e.hours<12&&(w=e.hours+12),t?.({hours:w,minutes:e.minutes});},b=()=>{let y=new Date;t?.({hours:y.getHours(),minutes:y.getMinutes()});},v=e?e.hours>=12?"PM":"AM":void 0,x=e?r?e.hours:e.hours%12||12:void 0;return jsxs(ot,{open:l,onOpenChange:c,children:[jsxs(qn,{ref:i,disabled:a,className:u("inline-flex items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal hover:bg-accent hover:text-accent-foreground w-full text-left",!e&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",s),children:[jsx(Clock,{className:"h-4 w-4"}),f(e)]}),jsxs(at,{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(ke,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:d.map(y=>jsx(ae,{variant:x===y?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(y),children:uo(y)},y))})})]}),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(ke,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:m.map(y=>jsx(ae,{variant:e?.minutes===y?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>g(y),children:uo(y)},y))})})]}),!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(ae,{variant:v==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("AM"),children:"AM"}),jsx(ae,{variant:v==="PM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("PM"),children:"PM"})]})]})]}),jsxs("div",{className:"flex justify-between border-t p-2",children:[jsx(ae,{variant:"ghost",size:"sm",onClick:b,children:"Now"}),jsx(ae,{size:"sm",onClick:()=>c(false),children:"Done"})]})]})]})});Sb.displayName="TimePicker";var Db=cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function AT({className:e,variant:t,items:n,itemHeight:r,height:o,overscan:a=3,renderItem:s,getItemKey:i,gap:l=0,onScrollChange:c,...d},m){let f=X.useRef(null),[p,g]=X.useState(0);X.useImperativeHandle(m,()=>f.current);let h=n.length*(r+l)-l,b=r+l,v=Math.max(0,Math.floor(p/b)-a),x=Math.ceil(o/b)+2*a,y=Math.min(n.length-1,v+x),w=R=>{let N=R.currentTarget.scrollTop;g(N),c?.(N);},C=X.useMemo(()=>{let R=[];for(let N=v;N<=y;N++)n[N]!==void 0&&R.push({item:n[N],index:N,style:{position:"absolute",top:N*b,left:0,right:0,height:r}});return R},[n,v,y,b,r]);return jsx("div",{ref:f,className:u(Db({variant:t,className:e})),style:{height:o,position:"relative"},onScroll:w,...d,children:jsx("div",{style:{height:h,position:"relative"},children:C.map(({item:R,index:N,style:T})=>jsx("div",{style:T,children:s(R,N)},i?i(R,N):N))})})}var zT=X.forwardRef(AT);var yl=cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),Rl=cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),Ib=X.forwardRef(({className:e,variant:t,size:n,children:r,onLoadMore:o,hasMore:a,isLoading:s=false,loader:i,threshold:l=100,rootMargin:c,useWindow:d=false,endMessage:m,scrollbarVisibility:f="visible",...p},g)=>{let h=X.useRef(null),b=X.useRef(null),v=X.useRef(false);X.useImperativeHandle(g,()=>h.current),X.useEffect(()=>{let w=b.current;if(!w)return;let C=new IntersectionObserver(R=>{let[N]=R;N.isIntersecting&&a&&!s&&!v.current&&(v.current=true,Promise.resolve(o()).finally(()=>{v.current=false;}));},{root:d?null:h.current,rootMargin:c||`${l}px`,threshold:0});return C.observe(w),()=>{C.disconnect();}},[a,s,o,l,c,d]);let x=jsx("div",{className:u(Rl({size:n})),children:jsx(Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})}),y=jsxs(Fragment,{children:[r,jsx("div",{ref:b,className:"h-px w-full"}),s&&(i||x),!a&&!s&&m&&jsx("div",{className:u(Rl({size:n}),"text-muted-foreground text-sm"),children:m})]});return d?jsx("div",{ref:h,className:u(yl({variant:t,className:e})),...p,children:y}):jsx(ke,{ref:h,visibility:f,className:u(yl({variant:t,className:e})),...p,children:y})});Ib.displayName="InfiniteScroll";var qT=e=>e.map(t=>typeof t=="string"?{src:t}:t),wl=X.forwardRef(({images:e,open:t,onOpenChange:n,initialIndex:r=0,onIndexChange:o,trigger:a,showThumbnails:s=true,showZoom:i=true,showRotate:l=true,showDownload:c=true,showFullscreen:d=true,showNavigation:m=true,showCounter:f=true,closeOnBackdropClick:p=true,className:g},h)=>{let b=X.useMemo(()=>qT(e),[e]),[v,x]=X.useState(r),[y,w]=X.useState(1),[C,R]=X.useState(0),[N,T]=X.useState(false),[P,k]=X.useState(false),[E,M]=X.useState({x:0,y:0}),[S,H]=X.useState({x:0,y:0}),[D,L]=X.useState(false),I=X.useRef(null),V=b[v];X.useEffect(()=>{L(true);},[]),X.useEffect(()=>{x(r);},[r]),X.useEffect(()=>{o?.(v);},[v,o]),X.useEffect(()=>{w(1),R(0),M({x:0,y:0});},[v]),X.useEffect(()=>{if(t)return Gt(),()=>Ut()},[t]);let O=X.useCallback(()=>{x(Q=>Q>0?Q-1:b.length-1);},[b.length]),A=X.useCallback(()=>{x(Q=>Q<b.length-1?Q+1:0);},[b.length]),K=()=>{w(Q=>Math.min(Q+.5,4));},$=()=>{w(Q=>{let le=Math.max(Q-.5,.5);return le===1&&M({x:0,y:0}),le});},G=()=>{R(Q=>(Q+90)%360);},Y=async()=>{if(V)try{let le=await(await fetch(V.src)).blob(),Fe=URL.createObjectURL(le),pe=document.createElement("a");pe.href=Fe,pe.download=V.alt||`image-${v+1}`,document.body.appendChild(pe),pe.click(),document.body.removeChild(pe),URL.revokeObjectURL(Fe);}catch{window.open(V.src,"_blank");}},F=async()=>{if(I.current)if(N)try{await document.exitFullscreen(),T(!1);}catch{}else try{await I.current.requestFullscreen(),T(!0);}catch{}},z=Q=>{y>1&&(k(true),H({x:Q.clientX-E.x,y:Q.clientY-E.y}));},j=Q=>{P&&y>1&&M({x:Q.clientX-S.x,y:Q.clientY-S.y});},W=()=>{k(false);},B=()=>{n?.(false);},Z=Q=>{p&&Q.target===Q.currentTarget&&B();},ue=X.useCallback(Q=>{switch(Q.key){case "ArrowLeft":O();break;case "ArrowRight":A();break;case "Escape":n?.(false);break;case "+":case "=":K();break;case "-":$();break}},[O,A,n]);if(X.useEffect(()=>{if(t)return window.addEventListener("keydown",ue),()=>window.removeEventListener("keydown",ue)},[t,ue]),X.useEffect(()=>{let Q=()=>{T(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",Q),()=>document.removeEventListener("fullscreenchange",Q)},[]),b.length===0)return null;let U=a?X.isValidElement(a)?X.cloneElement(a,{onClick:Q=>{a.props.onClick?.(Q),n?.(true);}}):jsx("button",{type:"button",onClick:()=>n?.(true),children:a}):null;return jsxs(Fragment,{children:[U,!D||!t?null:Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{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","data-state":t?"open":"closed",onClick:Z}),jsxs("div",{ref:h,className:u("fixed inset-0 z-50 flex flex-col outline-none",g),children:[jsxs("div",{className:"flex items-center justify-between p-4 text-white",children:[jsxs("div",{className:"flex items-center gap-2",children:[f&&b.length>1&&jsxs("span",{className:"text-sm",children:[v+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:[i&&jsxs(Fragment,{children:[jsx("button",{onClick:$,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(y*100),"%"]}),jsx("button",{onClick:K,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom in",children:jsx(ZoomIn,{className:"h-5 w-5"})})]}),l&&jsx("button",{onClick:G,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Rotate",children:jsx(RotateCw,{className:"h-5 w-5"})}),c&&jsx("button",{onClick:Y,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Download",children:jsx(Download,{className:"h-5 w-5"})}),d&&jsx("button",{onClick:F,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:N?"Exit fullscreen":"Fullscreen",children:N?jsx(Minimize2,{className:"h-5 w-5"}):jsx(Maximize2,{className:"h-5 w-5"})}),jsxs("button",{onClick:B,className:"rounded-full p-2 hover:bg-white/10 transition-colors ml-2",children:[jsx(X$1,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}),jsxs("div",{ref:I,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:z,onMouseMove:j,onMouseUp:W,onMouseLeave:W,children:[m&&b.length>1&&jsxs(Fragment,{children:[jsx("button",{onClick:O,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:u("max-h-full max-w-full object-contain transition-transform duration-200",P?"cursor-grabbing":y>1?"cursor-grab":""),style:{transform:`translate(${E.x}px, ${E.y}px) scale(${y}) rotate(${C}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((Q,le)=>jsx("button",{onClick:()=>x(le),className:u("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",v===le?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsx("img",{src:Q.src,alt:Q.alt||`Thumbnail ${le+1}`,className:"h-full w-full object-cover"})},le))})]})]}),document.body)]})});wl.displayName="ImageViewer";var Ab=({children:e,images:t,index:n=0,className:r})=>{let[o,a]=X.useState(false);return jsxs(Fragment,{children:[jsx("button",{onClick:()=>a(true),className:u("cursor-zoom-in",r),children:e}),jsx(wl,{images:t,open:o,onOpenChange:a,initialIndex:n})]})};Ab.displayName="ImageViewerTrigger";var zb=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",bordered:"rounded border border-current 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"}}),QT={cmd:"\u2318",command:"\u2318",meta:"\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"},JT={cmd:"meta",command:"meta",ctrl:"control",alt:"alt",option:"alt",shift:"shift",enter:"enter",return:"enter",backspace:"backspace",delete:"delete",escape:"escape",esc:"escape",tab:"tab",space:" ",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",pageup:"pageup",pagedown:"pagedown",home:"home",end:"end"},eM=e=>{let t=e.toLowerCase();return QT[t]||e.toUpperCase()},oa=e=>{let t=e.toLowerCase();return JT[t]||t},ks=e=>{let t=oa(e);return ["meta","control","alt","shift"].includes(t)},Ob=X.forwardRef(({className:e,variant:t,size:n,keys:r,children:o,onPress:a,disabled:s,preventDefault:i=true,...l},c)=>{X.useEffect(()=>{if(!a||!r||s)return;let m=Array.isArray(r)?r:[r],f=m.filter(ks).map(oa),p=m.filter(h=>!ks(h)).map(oa),g=h=>{let b=f.includes("meta")===h.metaKey,v=f.includes("control")===h.ctrlKey,x=f.includes("alt")===h.altKey,y=f.includes("shift")===h.shiftKey,w=p.length===0||p.includes(h.key.toLowerCase());b&&v&&x&&y&&w&&(i&&h.preventDefault(),a(h));};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[r,a,s,i]);let d=()=>r?(Array.isArray(r)?r:[r]).map((f,p)=>jsxs(X.Fragment,{children:[p>0&&jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsx("span",{children:eM(f)})]},p)):o;return jsx("kbd",{ref:c,className:u(zb({variant:t,size:n}),s&&"opacity-50",e),...l,children:d()})});Ob.displayName="Kbd";function tM(e,t,n={}){let{disabled:r=false,preventDefault:o=true}=n;X.useEffect(()=>{if(r)return;let a=Array.isArray(e)?e:[e],s=a.filter(ks).map(oa),i=a.filter(c=>!ks(c)).map(oa),l=c=>{let d=s.includes("meta")===c.metaKey,m=s.includes("control")===c.ctrlKey,f=s.includes("alt")===c.altKey,p=s.includes("shift")===c.shiftKey,g=i.length===0||i.includes(c.key.toLowerCase());d&&m&&f&&p&&g&&(o&&c.preventDefault(),t(c));};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,t,r,o]);}var Bb=cva("inline-flex items-center justify-center rounded-full cursor-pointer transition-colors hover:bg-muted/50 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-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Fb=X.forwardRef(({className:e,size:t,value:n,successDuration:r=2e3,onCopySuccess:o,onCopyError:a,copyIcon:s,successIcon:i,...l},c)=>{let[d,m]=X.useState(false),p={sm:14,md:16,lg:20}[t??"md"],g=async()=>{try{await navigator.clipboard.writeText(n),m(!0),o?.(),setTimeout(()=>{m(!1);},r);}catch(h){a?.(h);}};return jsx("button",{ref:c,type:"button",className:u(Bb({size:t}),e),onClick:g,"aria-label":d?"Copied":"Copy to clipboard",...l,children:d?i??jsx(Check,{className:"text-success",style:{width:p,height:p}}):s??jsx(Copy,{style:{width:p,height:p}})})});Fb.displayName="CopyButton";var $b=cva("flex flex-col bg-background",{variants:{variant:{default:"border",bordered:"border border-zinc-300 dark:border-zinc-700",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"default",size:"md",radius:"md"}}),cM=[{value:"month",label:"Month"},{value:"week",label:"Week"},{value:"day",label:"Day"}],dM=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],uM=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function mM(e,t,n){let r=new Date(e,t,1),o=new Date(e,t+1,0),a=[],s=r.getDay()-n;s<0&&(s+=7);for(let l=s-1;l>=0;l--)a.push(new Date(e,t,-l));for(let l=1;l<=o.getDate();l++)a.push(new Date(e,t,l));let i=42-a.length;for(let l=1;l<=i;l++)a.push(new Date(e,t+1,l));return a}function pM(e,t){let n=[],o=e.getDay()-t;o<0&&(o+=7);let a=new Date(e);a.setDate(e.getDate()-o);for(let s=0;s<7;s++){let i=new Date(a);i.setDate(a.getDate()+s),n.push(i);}return n}function fo(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function po(e){return fo(e,new Date)}function Kb(e,t){return e.filter(n=>{let r=new Date(n.start),o=new Date(n.end);return fo(r,t)||fo(o,t)||r<t&&o>t})}var Gb=X.forwardRef(({className:e,variant:t,size:n,radius:r,events:o=[],view:a="month",onViewChange:s,viewOptions:i=cM,date:l,onDateChange:c,onEventClick:d,onSlotClick:m,weekStartsOn:f=0,locale:p="en-US",...g},h)=>{let[b,v]=X.useState(new Date),x=l??b,y=M=>{c?c(M):v(M);},w=f===1?uM:dM,C=()=>{let M=new Date(x);a==="month"?M.setMonth(M.getMonth()-1):a==="week"?M.setDate(M.getDate()-7):M.setDate(M.getDate()-1),y(M);},R=()=>{let M=new Date(x);a==="month"?M.setMonth(M.getMonth()+1):a==="week"?M.setDate(M.getDate()+7):M.setDate(M.getDate()+1),y(M);},N=()=>{y(new Date);},T=()=>a==="day"?x.toLocaleDateString(p,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):x.toLocaleDateString(p,{year:"numeric",month:"long"}),P=()=>{let M=mM(x.getFullYear(),x.getMonth(),f);return jsxs("div",{className:"flex-1 flex flex-col",children:[jsx("div",{className:"grid grid-cols-7 border-b",children:w.map(S=>jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:S},S))}),jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:M.map((S,H)=>{let D=Kb(o,S),L=S.getMonth()===x.getMonth(),I=fo(S,x);return jsxs("div",{className:u("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!L&&"bg-muted/30",I&&"bg-accent"),onClick:()=>m?.(S),children:[jsx("div",{className:u("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",po(S)&&"bg-primary text-primary-foreground",!L&&"text-muted-foreground"),children:S.getDate()}),jsxs("div",{className:"space-y-0.5",children:[D.slice(0,3).map(V=>jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:V.color||"hsl(var(--primary))",color:"white"},onClick:O=>{O.stopPropagation(),d?.(V);},children:V.title},V.id)),D.length>3&&jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",D.length-3," more"]})]})]},H)})})]})},k=()=>{let M=pM(x,f),S=Array.from({length:24},(H,D)=>D);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"}),M.map((H,D)=>{let L=fo(H,x);return jsxs("div",{className:u("p-2 text-center border-l cursor-pointer hover:bg-accent/50",po(H)&&"bg-primary/10",L&&!po(H)&&"bg-accent"),onClick:()=>m?.(H),children:[jsx("div",{className:"text-xs text-muted-foreground",children:w[D]}),jsx("div",{className:u("text-lg font-semibold",po(H)&&"text-primary",L&&!po(H)&&"text-primary"),children:H.getDate()})]},D)})]}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:S.map(H=>jsxs(X.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[H.toString().padStart(2,"0"),":00"]}),M.map((D,L)=>{let I=new Date(D);I.setHours(H,0,0,0);let V=o.filter(O=>{let A=new Date(O.start);return fo(A,D)&&A.getHours()===H});return jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(I),children:V.map(O=>jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:O.color||"hsl(var(--primary))",color:"white"},onClick:A=>{A.stopPropagation(),d?.(O);},children:O.title},O.id))},L)})]},H))})})]})},E=()=>{let M=Array.from({length:24},(H,D)=>D),S=Kb(o,x);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:u("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",po(x)&&"bg-primary text-primary-foreground"),children:x.getDate()})}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_1fr]",children:M.map(H=>{let D=new Date(x);D.setHours(H,0,0,0);let L=S.filter(I=>new Date(I.start).getHours()===H);return jsxs(X.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[H.toString().padStart(2,"0"),":00"]}),jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(D),children:L.map(I=>jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:I.color||"hsl(var(--primary))",color:"white"},onClick:V=>{V.stopPropagation(),d?.(I);},children:I.title},I.id))})]},H)})})})]})};return jsxs("div",{ref:h,className:u($b({variant:t,size:n,radius:r,className:e})),...g,children:[jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsx("h2",{className:"text-lg font-semibold",children:T()}),jsxs("div",{className:"flex items-center gap-2",children:[jsx(ae,{variant:"bordered",size:"sm",radius:"md",onClick:N,children:"Today"}),jsx(Aa,{options:i,value:a,onValueChange:M=>s?.(M),size:"sm",radius:"md",className:"w-[120px]"}),jsx(ae,{variant:"light",size:"sm",radius:"md",isIconOnly:true,onClick:C,children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"light",size:"sm",radius:"md",isIconOnly:true,onClick:R,children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]}),a==="month"&&P(),a==="week"&&k(),a==="day"&&E()]})});Gb.displayName="FullCalendar";var Ds=({active:e,payload:t,label:n})=>!e||!t||!t.length?null:jsxs("div",{className:"border bg-card text-card-foreground shadow-sm rounded-lg p-3 min-w-[120px]",children:[n&&jsx("p",{className:"text-sm font-medium mb-2 text-card-foreground",children:n}),jsx("div",{className:"space-y-1",children:t.map((r,o)=>jsxs("div",{className:"flex items-center justify-between gap-4",children:[jsx("span",{className:"text-sm",style:{color:r.color},children:r.name}),jsx("span",{className:"text-sm font-medium text-card-foreground",children:typeof r.value=="number"?r.value.toLocaleString():r.value})]},o))})]}),sa=cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),ia=["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%))"],Ub=X.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=ia,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",curveType:c="monotone",...d},m)=>jsx("div",{ref:m,className:u(sa({size:t,className:e})),...d,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(LineChart,{data:n,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ds,{})}),s&&jsx(Legend,{}),r.map((f,p)=>jsx(Line,{type:c,dataKey:f,stroke:o[p%o.length],strokeWidth:2,dot:{fill:o[p%o.length],strokeWidth:0},activeDot:{r:6}},f))]})})}));Ub.displayName="LineChart";var jb=X.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=ia,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,layout:d="horizontal",...m},f)=>jsx("div",{ref:f,className:u(sa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(BarChart,{data:n,layout:d,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:d==="horizontal"?l:void 0,type:d==="horizontal"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{dataKey:d==="vertical"?l:void 0,type:d==="vertical"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ds,{})}),s&&jsx(Legend,{}),r.map((p,g)=>jsx(Bar,{dataKey:p,fill:o[g%o.length],stackId:c?"stack":void 0,radius:[4,4,0,0]},p))]})})}));jb.displayName="BarChart";var Wb=X.forwardRef(({className:e,size:t,data:n,dataKey:r="value",nameKey:o="name",colors:a=ia,innerRadius:s=0,outerRadius:i=80,showLegend:l=true,showTooltip:c=true,showLabels:d=false,...m},f)=>jsx("div",{ref:f,className:u(sa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(PieChart,{children:[c&&jsx(Tooltip,{content:jsx(Ds,{})}),l&&jsx(Legend,{}),jsx(Pie,{data:n,dataKey:r,nameKey:o,cx:"50%",cy:"50%",innerRadius:s,outerRadius:i,label:d,labelLine:d,children:n.map((p,g)=>jsx(Cell,{fill:a[g%a.length]},`cell-${g}`))})]})})}));Wb.displayName="PieChart";var _b=X.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=ia,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,curveType:d="monotone",...m},f)=>jsx("div",{ref:f,className:u(sa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(AreaChart,{data:n,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ds,{})}),s&&jsx(Legend,{}),r.map((p,g)=>jsx(Area,{type:d,dataKey:p,stroke:o[g%o.length],fill:o[g%o.length],fillOpacity:.3,stackId:c?"stack":void 0},p))]})})}));_b.displayName="AreaChart";var Pl=cva("flex gap-4 overflow-x-auto p-4",{variants:{variant:{default:"bg-muted/30",bordered:"border bg-background",ghost:""}},defaultVariants:{variant:"default"}}),Zb=cva("flex flex-col min-w-[280px] w-[280px]",{variants:{variant:{default:"",bordered:"border",ghost:""}},defaultVariants:{variant:"default"}}),Ll=cva("p-3 cursor-grab active:cursor-grabbing transition-all",{variants:{variant:{default:"bg-background border shadow-sm hover:shadow-md",bordered:"border border-zinc-300 dark:border-zinc-700 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}}),Sl={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"};function AM({card:e,columnId:t,variant:n,radius:r,renderCard:o,onCardClick:a}){let{attributes:s,listeners:i,setNodeRef:l,transform:c,transition:d,isDragging:m}=useSortable({id:e.id,data:{columnId:t}}),f={transform:CSS.Transform.toString(c),transition:d};return jsx("div",{ref:l,style:f,className:u(Ll({variant:n,isDragging:m}),Sl[r]),onClick:()=>a?.(e,t),...s,...i,children:o?o(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 Xb({column:e,variant:t,radius:n,renderCard:r,onCardClick:o,onAddCard:a,showAddCard:s,addCardLabel:i,columnHeight:l}){return jsxs("div",{className:u(Zb({variant:t}),Sl[n]),style:{backgroundColor:e.backgroundColor||"transparent"},children:[jsx("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})]})}),jsx(ke,{style:{height:l},className:"flex-1",children:jsxs("div",{className:"p-2 space-y-2",children:[jsx(SortableContext,{items:e.cards.map(c=>c.id),strategy:verticalListSortingStrategy,children:e.cards.map(c=>jsx(AM,{card:c,columnId:e.id,variant:t,radius:n,renderCard:r,onCardClick:o},c.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"})]})}),s&&jsx("div",{className:"p-2 border-t",children:jsxs(ae,{variant:"light",size:"sm",className:"w-full justify-start",onClick:c=>{c.stopPropagation(),c.preventDefault(),a?.(e.id);},children:[jsx(Plus,{className:"h-4 w-4 mr-2"}),i]})})]})}var Qb=X.forwardRef(({className:e,variant:t,columns:n,onCardMove:r,onCardClick:o,onAddCard:a,renderCard:s,showAddCard:i=true,addCardLabel:l="Add card",columnHeight:c=500,radius:d="md",...m},f)=>{let[p,g]=X.useState(false),[h,b]=X.useState(null),[v,x]=X.useState(null);X.useEffect(()=>{g(true);},[]);let y=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates}));if(!p)return jsx("div",{ref:f,className:u(Pl({variant:t,className:e})),...m,children:n.map(T=>jsx(Xb,{column:T,variant:t,radius:d,renderCard:s,onCardClick:o,onAddCard:a,showAddCard:i,addCardLabel:l,columnHeight:c},T.id))});let w=T=>n.find(P=>P.cards.some(k=>k.id===T));return jsxs(DndContext,{sensors:y,collisionDetection:closestCorners,onDragStart:T=>{let{active:P}=T,k=w(P.id);if(k){let E=k.cards.find(M=>M.id===P.id);E&&(b(E),x(k.id));}},onDragOver:T=>{let{active:P,over:k}=T;if(!k)return;let E=P.id,M=k.id,S=w(E),H=w(M)||n.find(I=>I.id===M);if(!S||!H||S.id===H.id)return;let D=H.cards.findIndex(I=>I.id===M),L=D===-1?H.cards.length:D;r?.(E,S.id,H.id,L);},onDragEnd:T=>{let{active:P,over:k}=T;if(k&&P.id!==k.id){let E=w(P.id),M=w(k.id)||n.find(S=>S.id===k.id);if(E&&M){let S=M.cards.findIndex(D=>D.id===k.id),H=S===-1?M.cards.length:S;r?.(P.id,E.id,M.id,H);}}b(null),x(null);},children:[jsx("div",{ref:f,className:u(Pl({variant:t,className:e})),...m,children:n.map(T=>jsx(Xb,{column:T,variant:t,radius:d,renderCard:s,onCardClick:o,onAddCard:a,showAddCard:i,addCardLabel:l,columnHeight:c},T.id))}),jsx(DragOverlay,{children:h&&v&&jsx("div",{className:u(Ll({variant:t,isDragging:true}),Sl[d]),children:s?s(h,v):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:h.title}),h.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:h.description})]})]})})})]})});Qb.displayName="KanbanBoard";var Jb=cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),ev=X.createContext(null);function Is(){let e=X.useContext(ev);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var tv=X.forwardRef(({className:e,variant:t,children:n,opts:r,plugins:o,orientation:a="horizontal",showArrows:s=true,showDots:i=true,setApi:l,...c},d)=>{let[m,f]=zM({...r,axis:a==="horizontal"?"x":"y"},o),[p,g]=X.useState(false),[h,b]=X.useState(false),[v,x]=X.useState(0),[y,w]=X.useState([]),C=X.useCallback(k=>{k&&(x(k.selectedScrollSnap()),g(k.canScrollPrev()),b(k.canScrollNext()));},[]),R=X.useCallback(()=>{f?.scrollPrev();},[f]),N=X.useCallback(()=>{f?.scrollNext();},[f]),T=X.useCallback(k=>{f?.scrollTo(k);},[f]),P=X.useCallback(k=>{k.key==="ArrowLeft"?(k.preventDefault(),R()):k.key==="ArrowRight"&&(k.preventDefault(),N());},[R,N]);return X.useEffect(()=>{!f||!l||l(f);},[f,l]),X.useEffect(()=>{if(f)return w(f.scrollSnapList()),C(f),f.on("reInit",C),f.on("select",C),()=>{f?.off("select",C);}},[f,C]),jsx(ev.Provider,{value:{carouselRef:m,api:f,scrollPrev:R,scrollNext:N,canScrollPrev:p,canScrollNext:h,selectedIndex:v,scrollSnaps:y,scrollTo:T,orientation:a},children:jsxs("div",{ref:d,className:u(Jb({variant:t,className:e})),onKeyDownCapture:P,role:"region","aria-roledescription":"carousel",...c,children:[jsx("div",{ref:m,className:"overflow-hidden",children:jsx("div",{className:u("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:n})}),s&&jsxs(Fragment,{children:[jsx(Dl,{}),jsx(Hl,{})]}),i&&y.length>1&&jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:y.map((k,E)=>jsx("button",{className:u("w-2 h-2 rounded-full transition-all",E===v?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>T(E),"aria-label":`Go to slide ${E+1}`},E))})]})})});tv.displayName="Carousel";var nv=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex",e),...t}));nv.displayName="CarouselContent";var rv=X.forwardRef(({className:e,basis:t="basis-full",...n},r)=>{let{orientation:o}=Is();return jsx("div",{ref:r,role:"group","aria-roledescription":"slide",className:u("min-w-0 shrink-0 grow-0",o==="horizontal"?"pl-4":"pt-4",t,e),...n})});rv.displayName="CarouselItem";var Dl=X.forwardRef(({className:e,variant:t="bordered",size:n="sm",isIconOnly:r=true,...o},a)=>{let{scrollPrev:s,canScrollPrev:i}=Is();return jsxs(ae,{ref:a,variant:t,size:n,isIconOnly:r,className:u("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!i,onClick:s,...o,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Previous slide"})]})});Dl.displayName="CarouselPrevious";var Hl=X.forwardRef(({className:e,variant:t="bordered",size:n="sm",isIconOnly:r=true,...o},a)=>{let{scrollNext:s,canScrollNext:i}=Is();return jsxs(ae,{ref:a,variant:t,size:n,isIconOnly:r,className:u("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!i,onClick:s,...o,children:[jsx(ChevronRight,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Next slide"})]})});Hl.displayName="CarouselNext";var ov=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"}}),Vs={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"}},Vl={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}"]},av=X.forwardRef(({className:e,size:t,onEmojiSelect:n,recentEmojis:r=[],defaultCategory:o="smileys",showSearch:a=true,showCategories:s=true,...i},l)=>{let[c,d]=X.useState(r.length>0?"recent":o),[m,f]=X.useState(""),g=m?Object.values(Vl).flat().filter(b=>b.toLowerCase().includes(m.toLowerCase())):c==="recent"?r:Vl[c]||[],h=b=>{n?.(b);};return jsxs("div",{ref:l,className:u(ov({size:t,className:e})),...i,children:[a&&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(Pa,{placeholder:"Search emojis...",value:m,onChange:b=>f(b.target.value),className:"pl-8 h-8"})]})}),s&&!m&&jsx(ke,{orientation:"horizontal",className:"border-b",children:jsx("div",{className:"flex px-1",children:Object.entries(Vs).map(([b,{icon:v}])=>b==="recent"&&r.length===0?null:jsx("button",{className:u("shrink-0 p-2 text-lg hover:bg-accent rounded transition-colors",c===b&&"bg-accent"),onClick:()=>d(b),title:Vs[b].name,children:v},b))})}),!m&&jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:Vs[c].name}),jsx(ke,{className:"flex-1",children:jsxs("div",{className:"grid grid-cols-8 gap-1 p-2",children:[g.map((b,v)=>jsx("button",{className:"w-8 h-8 flex items-center justify-center text-xl hover:bg-accent rounded transition-colors",onClick:()=>h(b),children:b},`${b}-${v}`)),g.length===0&&jsx("div",{className:"col-span-8 py-8 text-center text-muted-foreground text-sm",children:"No emojis found"})]})})]})});av.displayName="EmojiPicker";var sv=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border border-zinc-300 dark:border-zinc-700",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),gN=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"}}),bN=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"}}),Xe=({icon:e,title:t,isActive:n,onClick:r,disabled:o})=>jsxs(_n,{children:[jsx(Yn,{children:jsx(ae,{type:"button",variant:n?"solid":"ghost",size:"sm",isIconOnly:true,className:"h-7 w-7",onClick:r,disabled:o,children:e})}),jsx(Xn,{side:"top",className:"text-xs",children:t})]}),iv=X.forwardRef(({className:e,variant:t,size:n,value:r="",onChange:o,placeholder:a="Start writing...",readOnly:s=false,showToolbar:i=true,minHeight:l,maxHeight:c,onEditorReady:d,...m},f)=>{let p=useEditor({extensions:[WM.configure({heading:{levels:[1,2,3]}}),_M.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),YM,XM.configure({types:["heading","paragraph"]}),qM.configure({placeholder:a})],content:r,editable:!s,onUpdate:({editor:h})=>{o?.(h.getHTML());},onCreate:({editor:h})=>{d?.(h);}});X.useEffect(()=>{p&&r!==p.getHTML()&&p.commands.setContent(r);},[r,p]),X.useEffect(()=>{p&&p.setEditable(!s);},[s,p]);let g=()=>{if(!p)return;let h=p.getAttributes("link").href,b=window.prompt("URL",h);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(Wn,{children:jsxs("div",{ref:f,className:u(sv({variant:t,size:n,className:e})),...m,children:[i&&!s&&jsxs("div",{className:u(gN({size:n})),children:[jsx(Xe,{icon:jsx(Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsx(Xe,{icon:jsx(Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{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(Xe,{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(Xe,{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(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Bold,{className:"h-4 w-4"}),title:"Bold (Ctrl+B)",isActive:p.isActive("bold"),onClick:()=>p.chain().focus().toggleBold().run()}),jsx(Xe,{icon:jsx(Italic,{className:"h-4 w-4"}),title:"Italic (Ctrl+I)",isActive:p.isActive("italic"),onClick:()=>p.chain().focus().toggleItalic().run()}),jsx(Xe,{icon:jsx(Underline,{className:"h-4 w-4"}),title:"Underline (Ctrl+U)",isActive:p.isActive("underline"),onClick:()=>p.chain().focus().toggleUnderline().run()}),jsx(Xe,{icon:jsx(Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(List,{className:"h-4 w-4"}),title:"Bullet List",isActive:p.isActive("bulletList"),onClick:()=>p.chain().focus().toggleBulletList().run()}),jsx(Xe,{icon:jsx(ListOrdered,{className:"h-4 w-4"}),title:"Numbered List",isActive:p.isActive("orderedList"),onClick:()=>p.chain().focus().toggleOrderedList().run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(AlignLeft,{className:"h-4 w-4"}),title:"Align Left",isActive:p.isActive({textAlign:"left"}),onClick:()=>p.chain().focus().setTextAlign("left").run()}),jsx(Xe,{icon:jsx(AlignCenter,{className:"h-4 w-4"}),title:"Align Center",isActive:p.isActive({textAlign:"center"}),onClick:()=>p.chain().focus().setTextAlign("center").run()}),jsx(Xe,{icon:jsx(AlignRight,{className:"h-4 w-4"}),title:"Align Right",isActive:p.isActive({textAlign:"right"}),onClick:()=>p.chain().focus().setTextAlign("right").run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsx(Xe,{icon:jsx(Code,{className:"h-4 w-4"}),title:"Code Block",isActive:p.isActive("codeBlock"),onClick:()=>p.chain().focus().toggleCodeBlock().run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:g}),jsx(Xe,{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:u(bN({size:n})),style:{minHeight:l,maxHeight:c}})]})}):null});iv.displayName="RichTextEditor";var cv=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border border-zinc-300 dark:border-zinc-700",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function TN(e,t,n){return centerCrop(makeAspectCrop({unit:"%",width:90},n,e,t),e,t)}async function lv(e,t,n=0,r=1){let o=document.createElement("canvas"),a=o.getContext("2d");if(!a)return null;let s=e.naturalWidth/e.width,i=e.naturalHeight/e.height,l=window.devicePixelRatio||1;o.width=Math.floor(t.width*s*l),o.height=Math.floor(t.height*i*l),a.scale(l,l),a.imageSmoothingQuality="high";let c=t.x*s,d=t.y*i,m=n*Math.PI/180,f=e.naturalWidth/2,p=e.naturalHeight/2;return a.save(),a.translate(-c,-d),a.translate(f,p),a.rotate(m),a.scale(r,r),a.translate(-f,-p),a.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),a.restore(),new Promise(g=>{o.toBlob(h=>{g(h);},"image/png");})}var dv=X.forwardRef(({className:e,variant:t,src:n,aspectRatio:r,onCropChange:o,onCropComplete:a,showZoom:s=true,showRotation:i=true,minZoom:l=1,maxZoom:c=3,circularCrop:d=false,initialCrop:m,...f},p)=>{let g=X.useRef(null),[h,b]=X.useState(),[v,x]=X.useState(),[y,w]=X.useState(1),[C,R]=X.useState(0),N=E=>{let{width:M,height:S}=E.currentTarget;if(r){let H=TN(M,S,r);b(H);}else b(m||{unit:"%",x:10,y:10,width:80,height:80});},T=E=>{b(E),o?.(E);},P=async E=>{if(x(E),a&&g.current&&E.width&&E.height){let M=await lv(g.current,E,C,y);a(M);}},k=()=>{R(E=>(E+90)%360);};return X.useEffect(()=>{v&&g.current&&a&&lv(g.current,v,C,y).then(E=>{a(E);});},[y,C,v,a]),jsxs("div",{ref:p,className:u(cv({variant:t,className:e})),...f,children:[jsx("div",{className:"flex-1 flex items-center justify-center p-4 bg-muted/30 min-h-[300px]",children:jsx(vN,{crop:h,onChange:T,onComplete:P,aspect:r,circularCrop:d,className:"max-h-[400px]",children:jsx("img",{ref:g,src:n,alt:"Crop preview",crossOrigin:"anonymous",onLoad:N,style:{transform:`scale(${y}) rotate(${C}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(Ua,{value:[y],onValueChange:([E])=>w(E),min:l,max:c,step:.1,className:"flex-1"}),jsx(ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),i&&jsx(ae,{variant:"bordered",size:"sm",isIconOnly:true,onClick:k,children:jsx(RotateCw,{className:"h-4 w-4"})})]})]})});dv.displayName="ImageCropper";var Bl=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"}}),kN={sm:96,md:128,lg:192},mv=X.forwardRef(({className:e,variant:t,size:n,value:r,qrSize:o,fgColor:a="currentColor",bgColor:s="transparent",level:i="M",includeMargin:l=false,title:c,logo:d,logoSize:m=40,logoPadding:f=4,logoBackgroundColor:p="white",...g},h)=>{let b=o??kN[n??"md"];return r?jsx("div",{ref:h,className:u(Bl({variant:t,size:n,className:e})),...g,children:jsxs("div",{className:"relative inline-block",children:[jsx(MN,{value:r,size:b,fgColor:a,bgColor:s,level:i,title:c,style:{padding:l?16:0}}),d&&jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded",style:{padding:f,backgroundColor:p},children:jsx("img",{src:d,alt:"Logo",style:{width:m,height:m,objectFit:"contain"}})})]})}):jsx("div",{ref:h,className:u(Bl({variant:t,size:n,className:e})),...g,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"})})});mv.displayName="QRCode";var pv=({children:e,defaultTheme:t="system",storageKey:n="reever-ui-theme",enableSystem:r=true,disableTransitionOnChange:o=false,attribute:a="class",forcedTheme:s,themes:i=["light","dark"]})=>jsx(ThemeProvider,{defaultTheme:t,storageKey:n,enableSystem:r,disableTransitionOnChange:o,attribute:a,forcedTheme:s,themes:i,children:e});pv.displayName="ThemeProvider";var IN=cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),fv=X.forwardRef(({className:e,variant:t="ghost",size:n="md",mode:r="dropdown"},o)=>{let{theme:a,setTheme:s,resolvedTheme:i}=useTheme(),[l,c]=X.useState(false);X.useEffect(()=>{c(true);},[]);let d=()=>{let m=["light","dark","system"],p=(m.indexOf(a||"system")+1)%m.length;s(m[p]);};return l?r==="cycle"?jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"sm",isIconOnly:true,className:e,onClick:d,children:[i==="dark"?jsx(Moon,{className:"h-4 w-4"}):jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]}):jsxs(Cn,{children:[jsx(Tn,{children:jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"sm",isIconOnly:true,className: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(Mn,{align:"end",children:[jsxs($t,{onClick:()=>s("light"),children:[jsx(Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxs($t,{onClick:()=>s("dark"),children:[jsx(Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxs($t,{onClick:()=>s("system"),children:[jsx(Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"sm",isIconOnly:true,className:e,disabled:true,children:[jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})});fv.displayName="ThemeToggle";var gv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),bv=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-9 px-2.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-11 px-4 py-2.5 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),vv=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"}}),hv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,startContent:m,endContent:f,id:p,...g},h)=>{let b=X.useId(),v=p||b,x=`${v}-description`,y=`${v}-error`,w=a&&r;return jsxs("div",{className:u(gv({size:s}),e),children:[t&&jsxs("label",{htmlFor:v,className:u(vv({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[m&&jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:m}),jsx("input",{ref:h,id:v,"aria-invalid":a,"aria-describedby":w?y:n?x:void 0,"aria-required":o,className:u(bv({size:s,isInvalid:a}),m&&"pl-10",f&&"pr-10",l),...g}),f&&jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:f})]}),n&&!w&&jsx("p",{id:x,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),w&&jsx("p",{id:y,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});hv.displayName="TextField";var Rv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),zN=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors 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:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit min-w-24"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),xv=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"}}),yv=cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),ON=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"}}),wv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,min:m,max:f,step:p=1,value:g,defaultValue:h,onChange:b,showButtons:v=true,formatOptions:x,fullWidth:y=false,disabled:w,id:C,...R},N)=>{let T=X.useId(),P=C||T,k=`${P}-description`,E=`${P}-error`,[M,S]=X.useState(h),[H,D]=X.useState(false),L=g!==void 0?g:M,I=a&&r,V=X.useCallback(z=>{z!==void 0&&(m!==void 0&&z<m&&(z=m),f!==void 0&&z>f&&(z=f)),g===void 0&&S(z),b?.(z);},[g,m,f,b]),O=()=>{let z=(L??0)+p;V(z);},A=()=>{let z=(L??0)-p;V(z);},K=z=>{let j=z.target.value;if(j==="")V(void 0);else {let W=parseFloat(j);isNaN(W)||V(W);}},$=z=>{z.key==="ArrowUp"?(z.preventDefault(),O()):z.key==="ArrowDown"&&(z.preventDefault(),A());},G=X.useMemo(()=>L===void 0?"":x?new Intl.NumberFormat(void 0,x).format(L):L.toString(),[L,x]),Y=m!==void 0&&L!==void 0&&L<=m,F=f!==void 0&&L!==void 0&&L>=f;return jsxs("div",{className:u(Rv({size:s}),e),children:[t&&jsxs("label",{htmlFor:P,className:u(ON({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[v&&jsx("button",{type:"button",onClick:A,disabled:w||Y,className:u(xv({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:u(yv({size:s}))})}),jsx("input",{ref:N,id:P,type:"text",inputMode:"decimal",value:G,onChange:K,onKeyDown:$,onFocus:()=>D(true),onBlur:()=>D(false),"aria-invalid":a,"aria-describedby":I?E:n?k:void 0,"aria-required":o,"aria-valuemin":m,"aria-valuemax":f,"aria-valuenow":L,disabled:w,className:u(zN({size:s,isInvalid:a,fullWidth:y}),!v&&"px-3",l),style:{borderColor:H?"var(--color-foreground)":void 0},...R}),v&&jsx("button",{type:"button",onClick:O,disabled:w||F,className:u(xv({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:u(yv({size:s}))})})]}),n&&!I&&jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),I&&jsx("p",{id:E,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});wv.displayName="NumberField";var Tv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),KN=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-9 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-11 pl-12 pr-12 py-2.5 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),Cv=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"}}),$N=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"}}),GN=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"}}),Mv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f="",onChange:p,onClear:g,onSearch:h,showClearButton:b=true,showSearchIcon:v=true,disabled:x,placeholder:y="Search...",id:w,...C},R)=>{let N=X.useId(),T=w||N,P=`${T}-description`,k=`${T}-error`,[E,M]=X.useState(f),S=m!==void 0?m:E,H=a&&r,D=S.length>0,L=O=>{let A=O.target.value;m===void 0&&M(A),p?.(A);},I=()=>{m===void 0&&M(""),p?.(""),g?.();},V=O=>{O.key==="Enter"?(O.preventDefault(),h?.(S)):O.key==="Escape"&&D&&(O.preventDefault(),I());};return jsxs("div",{className:u(Tv({size:s}),e),children:[t&&jsxs("label",{htmlFor:T,className:u($N({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[v&&jsx(Search,{className:u(Cv({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsx("input",{ref:R,id:T,type:"search",value:S,onChange:L,onKeyDown:V,placeholder:y,"aria-invalid":a,"aria-describedby":H?k:n?P:void 0,"aria-required":o,disabled:x,className:u(KN({size:s,isInvalid:a}),!v&&"pl-3",!b&&"pr-3",l),...C}),b&&D&&!x&&jsx("button",{type:"button",onClick:I,className:u(GN({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsx(X$1,{className:u(Cv({size:s}))})})]}),n&&!H&&jsx("p",{id:P,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),H&&jsx("p",{id:k,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Mv.displayName="SearchField";var Nv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),jN=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-11 py-2.5 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"},showPickerIcon:{true:"",false:""}},compoundVariants:[{size:"sm",showPickerIcon:true,className:"pl-3 pr-8"},{size:"sm",showPickerIcon:false,className:"px-3"},{size:"md",showPickerIcon:true,className:"pl-3 pr-10"},{size:"md",showPickerIcon:false,className:"px-3"},{size:"lg",showPickerIcon:true,className:"pl-4 pr-12"},{size:"lg",showPickerIcon:false,className:"px-4"}],defaultVariants:{size:"md",isInvalid:false,fullWidth:false,showPickerIcon:true}}),WN=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"}}),_N=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"}}),Fs={"dd/MM/yyyy":"/","MM/dd/yyyy":"/","yyyy-MM-dd":"-","dd.MM.yyyy":"."},_l={"dd/MM/yyyy":["day","month","year"],"MM/dd/yyyy":["month","day","year"],"yyyy-MM-dd":["year","month","day"],"dd.MM.yyyy":["day","month","year"]},jl=(e,t)=>String(e).padStart(t,"0"),ma=(e,t)=>{if(!e)return "";let n=jl(e.getDate(),2),r=jl(e.getMonth()+1,2),o=jl(e.getFullYear(),4),a=Fs[t],s=_l[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},Wl=(e,t)=>{let n=Fs[t],r=e.split(n);if(r.length!==3)return null;let o=_l[t],a={};if(o.forEach((i,l)=>{a[i]=parseInt(r[l],10);}),isNaN(a.day)||isNaN(a.month)||isNaN(a.year)||a.month<1||a.month>12||a.day<1||a.day>31||a.year<1e3||a.year>9999)return null;let s=new Date(a.year,a.month-1,a.day);return s.getFullYear()!==a.year||s.getMonth()!==a.month-1||s.getDate()!==a.day?null:s},YN=e=>{let t=Fs[e];return _l[e].map(r=>r==="year"?"####":"##").join(t)},Ks=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:b="dd.MM.yyyy",showPickerIcon:v=true,mode:x="text",fullWidth:y=false,disabled:w,placeholder:C,id:R,...N},T)=>{let P=X.useId(),k=R||P,E=`${k}-description`,M=`${k}-error`,[S,H]=X.useState(f??null),[D,L]=X.useState(""),[I,V]=X.useState(false),[O,A]=X.useState(false),K=m!==void 0?m:S,$=a&&r,G=Fs[b],Y=YN(b);X.useEffect(()=>{O||L(ma(K,b));},[K,b,O]);let F=U=>{m===void 0&&H(U),p?.(U);},z=U=>{let Ce=U??null;F(Ce),L(ma(Ce,b)),V(false);},j=U=>{let Ce=U.target.value;Ce=Ce.replace(new RegExp(`[^0-9\\${G}]`,"g"),"");let Q=Ce.replace(new RegExp(`\\${G}`,"g"),""),le="",Fe=0;for(let pe=0;pe<Y.length&&Fe<Q.length;pe++)Y[pe]==="#"?(le+=Q[Fe],Fe++):le+=Y[pe];if(L(le),le.length===Y.length){let pe=Wl(le,b);if(pe){if(g&&pe<g||h&&pe>h)return;F(pe);}}},W=()=>{A(true);},B=()=>{A(false),D.length!==Y.length?L(ma(K,b)):Wl(D,b)||L(ma(K,b));},Z=()=>{w||V(true);},ue=()=>{!w&&x==="picker"&&v&&V(true);};return jsxs("div",{className:u(Nv({size:s}),e),children:[t&&jsxs("label",{htmlFor:k,className:u(_N({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs(ot,{open:v&&I,onOpenChange:V,children:[jsxs(an,{className:u("relative",y?"w-full":"w-fit"),children:[jsx("input",{ref:T,id:k,type:"text",inputMode:x==="text"?"numeric":void 0,value:D,onChange:x==="text"?j:void 0,onClick:ue,onFocus:W,onBlur:B,readOnly:x==="picker","aria-invalid":a,"aria-describedby":$?M:n?E:void 0,"aria-required":o,disabled:w,placeholder:C||b.toLowerCase(),className:u(jN({size:s,isInvalid:a,fullWidth:y,showPickerIcon:v}),x==="picker"&&v&&"cursor-pointer",l),style:{borderColor:O||v&&I?"var(--color-foreground)":void 0},...N}),v&&jsx("button",{type:"button",onClick:Z,disabled:w,className:"absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",tabIndex:-1,"aria-label":"Open calendar",children:jsx(Calendar,{className:u(WN({size:s}))})})]}),v&&jsx(at,{className:"w-auto p-0",align:"start",children:jsx(to,{mode:"single",selected:K??void 0,onSelect:z,disabled:U=>!!(g&&U<g||h&&U>h),defaultMonth:K??void 0,showMonthAndYearPickers:true})})]}),n&&!$&&jsx("p",{id:E,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),$&&jsx("p",{id:M,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Ks.displayName="DatePicker";var XN=Ks,qN=Ks;var kv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),ZN=cva("inline-flex items-center rounded-md border border-input bg-background transition-colors",{variants:{size:{sm:"h-8 px-2 gap-0.5 text-xs",md:"h-10 px-3 gap-1 text-sm",lg:"h-12 px-4 gap-1.5 text-base"},isInvalid:{true:"border-danger",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:""},fullWidth:{true:"w-full justify-center",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,disabled:false,fullWidth:false}}),QN=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"}}),Pv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minTime:g,maxTime:h,showSeconds:b=false,hourCycle:v=24,disabled:x,fullWidth:y=false,id:w,...C},R)=>{let N=X.useId(),T=w||N,P=`${T}-description`,k=`${T}-error`,E=X.useRef(null),M=X.useRef(null),S=X.useRef(null),H=X.useRef(null),[D,L]=X.useState(f??null),I=m!==void 0?m:D,V=a&&r,O=_=>v===24?_:_===0?12:_>12?_-12:_,A=_=>_>=12?"PM":"AM",K=(_,oe)=>oe==="AM"?_===12?0:_:_===12?12:_+12,[$,G]=X.useState(I?String(O(I.hour)).padStart(2,"0"):""),[Y,F]=X.useState(I?String(I.minute).padStart(2,"0"):""),[z,j]=X.useState(I?.second!==void 0?String(I.second).padStart(2,"0"):""),[W,B]=X.useState(I?A(I.hour):"AM"),[Z,ue]=X.useState(false);X.useEffect(()=>{m!==void 0&&(m?(G(String(O(m.hour)).padStart(2,"0")),F(String(m.minute).padStart(2,"0")),m.second!==void 0&&j(String(m.second).padStart(2,"0")),B(A(m.hour))):(G(""),F(""),j("")));},[m,v]);let U=(_,oe,q,De)=>{let de=parseInt(_,10),je=parseInt(oe,10),We=b?parseInt(q,10):void 0;if(isNaN(de)||isNaN(je)||b&&isNaN(We)){m===void 0&&L(null),p?.(null);return}let ve={hour:v===12?K(de,De):de,minute:je,...b&&We!==void 0&&{second:We}};m===void 0&&L(ve),p?.(ve);},Ce=_=>{let oe=_.target.value.replace(/\D/g,"").slice(0,2);G(oe);let q=v===24?23:12,De=v===24?0:1;if(oe.length===2){let de=parseInt(oe,10);de>=De&&de<=q&&(M.current?.focus(),M.current?.select());}},Q=_=>{let oe=_.target.value.replace(/\D/g,"").slice(0,2);if(F(oe),oe.length===2){let q=parseInt(oe,10);q>=0&&q<=59&&(b?(S.current?.focus(),S.current?.select()):v===12&&H.current?.focus());}},le=_=>{let oe=_.target.value.replace(/\D/g,"").slice(0,2);j(oe),oe.length===2&&v===12&&H.current?.focus();},Fe=()=>{if($){let _=parseInt($,10),oe=v===24?23:12,De=Math.min(Math.max(_,v===24?0:1),oe),de=String(De).padStart(2,"0");G(de),U(de,Y,z,W);}},pe=()=>{if(Y){let _=parseInt(Y,10),oe=Math.min(Math.max(_,0),59),q=String(oe).padStart(2,"0");F(q),U($,q,z,W);}},Ct=()=>{if(z){let _=parseInt(z,10),oe=Math.min(Math.max(_,0),59),q=String(oe).padStart(2,"0");j(q),U($,Y,q,W);}},bt=()=>{let _=W==="AM"?"PM":"AM";B(_),U($,Y,z,_);},yn=_=>{let oe=_.key.toLowerCase();oe==="a"?(_.preventDefault(),W!=="AM"&&(B("AM"),U($,Y,z,"AM"))):oe==="p"?(_.preventDefault(),W!=="PM"&&(B("PM"),U($,Y,z,"PM"))):oe==="arrowup"||oe==="arrowdown"?(_.preventDefault(),bt()):oe==="arrowleft"&&(_.preventDefault(),b?(S.current?.focus(),S.current?.select()):(M.current?.focus(),M.current?.select()));},Ke=(_,oe)=>{if(_.key==="ArrowUp"||_.key==="ArrowDown"){_.preventDefault();let q=_.key==="ArrowUp"?1:-1;if(oe==="hour"){let De=parseInt($,10)||0,de=v===24?23:12,je=v===24?0:1,We=De+q;We>de&&(We=je),We<je&&(We=de);let Gn=String(We).padStart(2,"0");G(Gn),U(Gn,Y,z,W);}else if(oe==="minute"){let de=(parseInt(Y,10)||0)+q;de>59&&(de=0),de<0&&(de=59);let je=String(de).padStart(2,"0");F(je),U($,je,z,W);}else if(oe==="second"){let de=(parseInt(z,10)||0)+q;de>59&&(de=0),de<0&&(de=59);let je=String(de).padStart(2,"0");j(je),U($,Y,je,W);}}_.key==="ArrowRight"&&(_.preventDefault(),oe==="hour"?(M.current?.focus(),M.current?.select()):oe==="minute"&&b?(S.current?.focus(),S.current?.select()):(oe==="minute"&&!b&&v===12||oe==="second"&&v===12)&&H.current?.focus()),_.key==="ArrowLeft"&&(_.preventDefault(),oe==="minute"?(E.current?.focus(),E.current?.select()):oe==="second"&&(M.current?.focus(),M.current?.select())),_.key==="Backspace"&&_.currentTarget.value===""&&(oe==="minute"?E.current?.focus():oe==="second"&&M.current?.focus());},Tt=u((()=>{switch(s){case "sm":return "w-5";case "lg":return "w-7";default:return "w-6"}})(),"bg-transparent text-center outline-none placeholder:text-muted-foreground tabular-nums",x&&"cursor-not-allowed");return jsxs("div",{ref:R,className:u(kv({size:s}),e),...C,children:[t&&jsxs("label",{htmlFor:T,className:u(QN({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:u(ZN({size:s,isInvalid:a,disabled:x,fullWidth:y}),l),style:{borderColor:Z?"var(--color-foreground)":void 0},onFocus:()=>ue(true),onBlur:_=>{_.currentTarget.contains(_.relatedTarget)||ue(false);},children:[jsx("input",{ref:E,id:T,type:"text",inputMode:"numeric",placeholder:v===24?"HH":"hh",value:$,onChange:Ce,onBlur:Fe,onKeyDown:_=>Ke(_,"hour"),onFocus:_=>_.target.select(),"aria-label":"Hour","aria-invalid":a,"aria-describedby":V?k:n?P:void 0,"aria-required":o,disabled:x,className:Tt}),jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:M,type:"text",inputMode:"numeric",placeholder:"mm",value:Y,onChange:Q,onBlur:pe,onKeyDown:_=>Ke(_,"minute"),onFocus:_=>_.target.select(),"aria-label":"Minute",disabled:x,className:Tt}),b&&jsxs(Fragment,{children:[jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:S,type:"text",inputMode:"numeric",placeholder:"ss",value:z,onChange:le,onBlur:Ct,onKeyDown:_=>Ke(_,"second"),onFocus:_=>_.target.select(),"aria-label":"Second",disabled:x,className:Tt})]}),v===12&&jsx("button",{ref:H,type:"button",onClick:bt,onKeyDown:yn,disabled:x,className:u("ml-0.5 rounded text-muted-foreground hover:text-foreground focus:outline-none focus:text-foreground transition-colors tabular-nums",s==="sm"?"w-6":s==="lg"?"w-8":"w-7",x&&"cursor-not-allowed"),"aria-label":"AM/PM",children:W})]}),n&&!V&&jsx("p",{id:P,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),V&&jsx("p",{id:k,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Pv.displayName="TimeField";var Lv=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"}}),Sv=X.forwardRef(({className:e,variant:t,orientation:n,size:r,density:o,items:a,maxVisibleItems:s,isDisabled:i,onAction:l,showLabels:c=false,renderItem:d,...m},f)=>{let p=s&&s<a.length?a.slice(0,s):a,g=s&&s<a.length?a.slice(s):[],h={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"],v={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[r??"md"],x=(w,C)=>{C&&C(),l&&l(w);},y=w=>jsxs("button",{type:"button",disabled:i||w.isDisabled,onClick:()=>x(w.key,w.onPress),className:u("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",c?h:b),"aria-label":w.label,children:[w.icon&&jsx("span",{className:v,children:w.icon}),c&&jsx("span",{children:w.label})]},w.key);return jsxs("div",{ref:f,role:"group",className:u(Lv({variant:t,orientation:n,size:r,density:o,className:e})),...m,children:[p.map(w=>d?d(w):y(w)),g.length>0&&jsxs(Cn,{children:[jsx(Tn,{"aria-label":"More actions",className:u("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",i&&"pointer-events-none opacity-50",b),children:jsx(MoreHorizontal,{className:v})}),jsx(Mn,{align:"end",children:g.map(w=>jsxs($t,{disabled:w.isDisabled,onClick:()=>x(w.key,w.onPress),children:[w.icon&&jsx("span",{className:u(v,"mr-2"),children:w.icon}),w.label]},w.key))})]})]})});Sv.displayName="ActionGroup";var Vv=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"}}),nk=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}}),Av=X.forwardRef(({className:e,variant:t,size:n,pulse:r=false,hideLabel:o=false,children:a,...s},i)=>jsxs("span",{ref:i,role:"status",className:u(Vv({variant:t,size:n,className:e})),...s,children:[jsx("span",{className:u(nk({size:n,pulse:r})),"aria-hidden":"true"}),!o&&a&&jsx("span",{className:"text-foreground",children:a})]}));Av.displayName="StatusLight";var zv=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"}}),Ov=X.forwardRef(({className:e,position:t,size:n,selectedCount:r=0,isOpen:o=true,onClose:a,showClose:s=true,selectedText:i,children:l,...c},d)=>{if(!o||r===0)return null;let m=()=>typeof i=="function"?i(r):i||`${r} item${r>1?"s":""} selected`;return jsxs("div",{ref:d,role:"toolbar","aria-label":"Actions for selected items",className:u(zv({position:t,size:n,className:e})),...c,children:[jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:m()}),jsx("div",{className:"h-4 w-px bg-border"}),jsx("div",{className:"flex items-center gap-1",children:l}),s&&jsxs(Fragment,{children:[jsx("div",{className:"h-4 w-px bg-border"}),jsx(Nt,{size:"sm",onClick:a,"aria-label":"Close action bar"})]})]})});Ov.displayName="ActionBar";var Bv=X.forwardRef(({className:e,icon:t,children:n,...r},o)=>jsxs("button",{ref:o,type:"button",className:u("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}),n]}));Bv.displayName="ActionBarButton";var $v=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"}}),Gv=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 Uv({className:e,variant:t,size:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,allowsDragging:i=false,onReorder:l,showCheckbox:c=false,renderItem:d,emptyContent:m,...f}){let[p,g]=X.useState(new Set),[h,b]=X.useState(null),[v,x]=X.useState(null),y=X.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),w=T=>{if(a==="none")return;let P;a==="single"?P=y.has(T)?new Set:new Set([T]):(P=new Set(y),P.has(T)?P.delete(T):P.add(T)),o||g(P),s?.(P);},C=(T,P)=>{b(P),T.dataTransfer.effectAllowed="move";},R=(T,P)=>{T.preventDefault(),h!==P&&x(P);},N=()=>{if(h&&v&&h!==v){let T=r.findIndex(M=>M.key===h),P=r.findIndex(M=>M.key===v),k=[...r],[E]=k.splice(T,1);k.splice(P,0,E),l?.(k);}b(null),x(null);};return r.length===0?jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsx("div",{role:"listbox","aria-multiselectable":a==="multiple",className:u($v({variant:t,size:n,className:e})),...f,children:r.map(T=>{let P=y.has(T.key),k=h===T.key,E=v===T.key;return d?jsx("div",{role:"option","aria-selected":P,onClick:()=>w(T.key),children:d(T,P)},T.key):jsxs("div",{role:"option","aria-selected":P,"aria-disabled":T.isDisabled,draggable:i&&!T.isDisabled,onDragStart:M=>C(M,T.key),onDragOver:M=>R(M,T.key),onDragEnd:N,onClick:()=>!T.isDisabled&&w(T.key),className:u(Gv({variant:t,size:n,isSelected:P,isDisabled:T.isDisabled}),k&&"opacity-50",E&&"border-t-2 border-t-primary"),children:[i&&jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground cursor-grab"}),c&&a!=="none"&&jsx("div",{className:u("flex h-4 w-4 items-center justify-center rounded border",P?"bg-primary border-primary text-primary-foreground":"border-input"),children:P&&jsx(Check,{className:"h-3 w-3"})}),T.icon&&jsx("span",{className:"h-5 w-5 text-muted-foreground [&>svg]:h-full [&>svg]:w-full",children:T.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:T.label}),T.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:T.description})]})]},T.key)})})}Uv.displayName="ListView";var jv=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"}}),lk=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"}}),ck=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 cursor-grab",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{size:"md"}}),Wv=X.forwardRef(({className:e,orientation:t="horizontal",size:n="md",value:r,defaultValue:o=[25,75],onValueChange:a,onValueCommit:s,min:i=0,max:l=100,step:c=1,disabled:d=false,showLabels:m=false,formatLabel:f=v=>String(v),trackColor:p="primary",name:g,...h},b)=>{let[v,x]=X.useState(o),y=r!==void 0,w=y?r:v,C=X.useRef(null),[R,N]=X.useState(false),[T,P]=X.useState(null),k=(A,K)=>{if(!C.current)return w[0];let $=C.current.getBoundingClientRect(),G;t==="horizontal"?G=(A-$.left)/$.width:G=1-(K-$.top)/$.height,G=Math.max(0,Math.min(1,G));let Y=i+G*(l-i),F=Math.round(Y/c)*c;return Math.max(i,Math.min(l,F))},E=(A,K)=>{let $=[...w];$[K]=A,K===0&&A>w[1]&&($[0]=w[1]),K===1&&A<w[0]&&($[1]=w[0]),y||x($),a?.($);},M=(A,K)=>{d||(A.preventDefault(),N(true),P(K),A.target.setPointerCapture(A.pointerId));},S=A=>{if(!R||T===null||d)return;let K=k(A.clientX,A.clientY);E(K,T);},H=()=>{R&&(N(false),P(null),s?.(w));},D=A=>{if(d)return;let K=k(A.clientX,A.clientY),$=Math.abs(w[0]-K),G=Math.abs(w[1]-K),Y=$<=G?0:1;E(K,Y);let F=[...w];F[Y]=K,s?.(F);},L=(A,K)=>{if(d)return;let $=w[K];switch(A.key){case "ArrowRight":case "ArrowUp":A.preventDefault(),$=Math.min(l,w[K]+c);break;case "ArrowLeft":case "ArrowDown":A.preventDefault(),$=Math.max(i,w[K]-c);break;case "Home":A.preventDefault(),$=i;break;case "End":A.preventDefault(),$=l;break;default:return}E($,K);let G=[...w];G[K]=$,s?.(G);},I=A=>(A-i)/(l-i)*100,V={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[p],O={sm:14,md:20,lg:24}[n||"md"];return jsxs("div",{className:"relative w-full",children:[m&&jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsx("span",{children:f(w[0])}),jsx("span",{children:f(w[1])})]}),jsxs("div",{ref:b,className:u(jv({orientation:t,size:n}),d&&"opacity-50 pointer-events-none",e),...h,children:[jsx("div",{ref:C,className:u(lk({orientation:t,size:n})),onClick:D,children:jsx("div",{className:u("absolute rounded-full",V,{"h-full":t==="horizontal","w-full":t==="vertical"}),style:t==="horizontal"?{left:`${I(w[0])}%`,right:`${100-I(w[1])}%`,top:0,bottom:0}:{bottom:`${I(w[0])}%`,top:`${100-I(w[1])}%`,left:0,right:0}})}),w.map((A,K)=>jsx("div",{role:"slider",tabIndex:d?-1:0,"aria-valuemin":i,"aria-valuemax":l,"aria-valuenow":A,"aria-orientation":t||void 0,"aria-disabled":d,className:u(ck({size:n}),R&&T===K&&"cursor-grabbing"),style:t==="horizontal"?{position:"absolute",left:`calc(${I(A)}% - ${O/2}px)`,top:"50%",transform:"translateY(-50%)"}:{position:"absolute",bottom:`calc(${I(A)}% - ${O/2}px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:$=>M($,K),onPointerMove:S,onPointerUp:H,onPointerCancel:H,onKeyDown:$=>L($,K)},K)),g&&jsxs(Fragment,{children:[jsx("input",{type:"hidden",name:`${g}[0]`,value:w[0]}),jsx("input",{type:"hidden",name:`${g}[1]`,value:w[1]})]})]})]})});Wv.displayName="RangeSlider";var Jl=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"}}),fk=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"}}),gk={help:HelpCircle,info:Info,warning:AlertCircle},Xv=X.forwardRef(({variant:e="help",size:t,title:n,children:r,trigger:o,side:a="top",align:s="center",open:i,onOpenChange:l,learnMoreUrl:c,learnMoreText:d="Learn more",triggerClassName:m,contentClassName:f},p)=>{let[g,h]=X.useState(false),[b,v]=X.useState(false),[x,y]=X.useState({top:0,left:0}),w=X.useRef(null),C=X.useRef(null),R=i!==void 0?i:g,N=X.useCallback(E=>{i===void 0&&h(E),l?.(E);},[i,l]);X.useEffect(()=>{v(true);},[]),X.useEffect(()=>{if(!R||!w.current)return;let E=()=>{let M=w.current.getBoundingClientRect(),S=C.current?.getBoundingClientRect(),H=S?.width||288,D=S?.height||100,L=8,I=0,V=0;switch(a){case "top":I=M.top-D-L,V=M.left+M.width/2-H/2;break;case "bottom":I=M.bottom+L,V=M.left+M.width/2-H/2;break;case "left":I=M.top+M.height/2-D/2,V=M.left-H-L;break;case "right":I=M.top+M.height/2-D/2,V=M.right+L;break}if(a==="top"||a==="bottom")switch(s){case "start":V=M.left;break;case "center":V=M.left+M.width/2-H/2;break;case "end":V=M.right-H;break}if(a==="left"||a==="right")switch(s){case "start":I=M.top;break;case "center":I=M.top+M.height/2-D/2;break;case "end":I=M.bottom-D;break}V=Math.max(8,Math.min(V,window.innerWidth-H-8)),I=Math.max(8,Math.min(I,window.innerHeight-D-8)),y({top:I,left:V});};return E(),requestAnimationFrame(E),window.addEventListener("resize",E),window.addEventListener("scroll",E,true),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,true);}},[R,a,s]),X.useEffect(()=>{if(!R)return;let E=M=>{C.current&&!C.current.contains(M.target)&&w.current&&!w.current.contains(M.target)&&N(false);};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[R,N]),X.useEffect(()=>{if(!R)return;let E=M=>{M.key==="Escape"&&N(false);};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[R,N]);let T=gk[e??"help"],P=()=>{N(!R);},k=()=>{switch(a){case "top":return "bottom center";case "bottom":return "top center";case "left":return "right center";case "right":return "left center";default:return "center center"}};return jsxs(Fragment,{children:[o?X.isValidElement(o)?X.cloneElement(o,{ref:w,onClick:E=>{o.props.onClick?.(E),P();}}):jsx("button",{ref:w,type:"button",onClick:P,className:u(Jl({variant:e,size:t}),m),"aria-label":"Help",children:o}):jsx("button",{ref:E=>{w.current=E,typeof p=="function"?p(E):p&&(p.current=E);},type:"button",onClick:P,className:u(Jl({variant:e,size:t}),m),"aria-label":"Help",children:jsx(T,{className:"h-full w-full"})}),b&&R&&Ba.createPortal(jsxs("div",{ref:C,className:u(fk({size:t}),f),style:{position:"fixed",top:x.top,left:x.left,transformOrigin:k()},role:"tooltip",children:[n&&jsx("div",{className:"mb-2 font-semibold text-foreground",children:n}),jsx("div",{className:"text-muted-foreground",children:r}),c&&jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block text-primary hover:underline",children:[d," \u2192"]}),jsx("div",{className:"absolute h-2 w-2 rotate-45 border bg-popover",style:{...a==="top"&&{bottom:-4,left:"50%",marginLeft:-4,borderTop:"none",borderLeft:"none"},...a==="bottom"&&{top:-4,left:"50%",marginLeft:-4,borderBottom:"none",borderRight:"none"},...a==="left"&&{right:-4,top:"50%",marginTop:-4,borderBottom:"none",borderLeft:"none"},...a==="right"&&{left:-4,top:"50%",marginTop:-4,borderTop:"none",borderRight:"none"}}})]}),document.body)]})});Xv.displayName="ContextualHelp";var Zv=cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),ec=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",bordered:"border border-current 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:"bordered",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 Qv({className:e,spacing:t,variant:n,size:r,items:o,selectedKeys:a,selectionMode:s="none",onSelectionChange:i,allowsRemoving:l=false,onRemove:c,label:d,description:m,errorMessage:f,maxTags:p,...g}){let[h,b]=X.useState(new Set),v=X.useMemo(()=>a?a instanceof Set?a:new Set(a):h,[a,h]),x=R=>{if(s==="none")return;let N;s==="single"?N=v.has(R)?new Set:new Set([R]):(N=new Set(v),N.has(R)?N.delete(R):N.add(R)),a||b(N),i?.(N);},y=(R,N)=>{N.stopPropagation(),c?.(R);},w=p?o.slice(0,p):o,C=p?Math.max(0,o.length-p):0;return jsxs("div",{className:"flex flex-col gap-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:m}),jsxs("div",{role:"group","aria-label":d,className:u(Zv({spacing:t}),e),...g,children:[w.map(R=>{let N=v.has(R.key),T=s!=="none";return jsxs("span",{role:T?"button":void 0,tabIndex:T&&!R.isDisabled?0:void 0,"aria-pressed":T?N:void 0,onClick:()=>!R.isDisabled&&x(R.key),onKeyDown:P=>{(P.key==="Enter"||P.key===" ")&&!R.isDisabled&&(P.preventDefault(),x(R.key));},style:R.color?{backgroundColor:R.color}:void 0,className:u(ec({variant:R.color?void 0:n,size:r,isSelected:N,isDisabled:R.isDisabled}),T&&!R.isDisabled&&"cursor-pointer hover:opacity-80",R.color&&"text-white"),children:[R.icon&&jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:R.icon}),R.label,l&&!R.isDisabled&&jsx("button",{type:"button",onClick:P=>y(R.key,P),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${R.label}`,children:jsx(X$1,{className:"h-3 w-3"})})]},R.key)}),C>0&&jsxs("span",{className:u(ec({variant:"surface",size:r}),"cursor-default"),children:["+",C," more"]})]}),f&&jsx("span",{className:"text-sm text-danger",children:f})]})}Qv.displayName="TagGroup";var th=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"}}),nh=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 rh({className:e,columns:t,gap:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,showSelectionIndicator:i=true,itemVariant:l="default",itemSize:c="md",renderItem:d,emptyContent:m,...f}){let[p,g]=X.useState(new Set),h=X.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),b=v=>{if(a==="none")return;let x;a==="single"?x=h.has(v)?new Set:new Set([v]):(x=new Set(h),x.has(v)?x.delete(v):x.add(v)),o||g(x),s?.(x);};return r.length===0?jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsx("div",{role:"grid","aria-multiselectable":a==="multiple",className:u(th({columns:t,gap:n,className:e})),...f,children:r.map(v=>{let x=h.has(v.key);return d?jsx("div",{role:"gridcell","aria-selected":x,onClick:()=>b(v.key),children:d(v,x)},v.key):jsxs("div",{role:"gridcell","aria-selected":x,"aria-disabled":v.isDisabled,onClick:()=>!v.isDisabled&&b(v.key),className:u(nh({variant:l,size:c,isSelected:x,isDisabled:v.isDisabled})),children:[i&&a!=="none"&&x&&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"})}),v.thumbnail&&jsx("div",{className:"mb-2 aspect-square w-full overflow-hidden rounded-md bg-muted",children:v.thumbnail}),jsxs("div",{className:"min-w-0",children:[jsx("div",{className:"truncate font-medium",children:v.label}),v.description&&jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:v.description})]})]},v.key)})})}rh.displayName="GridList";var ah=cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),xk=cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),yk=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}}),Xs=X.forwardRef(({className:e,size:t,value:n,min:r=0,max:o=100,optimum:a,low:s,high:i,label:l,showValueLabel:c=false,formatValue:d,color:m="primary",trackVariant:f="default",...p},g)=>{let h=Math.min(100,Math.max(0,(n-r)/(o-r)*100)),b=()=>{if(m!=="auto")return "";let x=(n-r)/(o-r),y=s!==void 0?(s-r)/(o-r):.25,w=i!==void 0?(i-r)/(o-r):.75;return (a!==void 0?(a-r)/(o-r):1)>=.5?x<=y?"bg-red-500":x<=w?"bg-yellow-500":"bg-green-500":x>=w?"bg-red-500":x>=y?"bg-yellow-500":"bg-green-500"},v=d?d(n,h):`${Math.round(h)}%`;return jsxs("div",{ref:g,className:u("w-full",e),...p,children:[(l||c)&&jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[l&&jsx("span",{className:"text-sm font-medium text-foreground",children:l}),c&&jsx("span",{className:"text-sm text-muted-foreground",children:v})]}),jsx("div",{role:"meter","aria-valuenow":n,"aria-valuemin":r,"aria-valuemax":o,"aria-label":l,className:u(ah({size:t})),children:jsx("div",{className:u(xk({variant:f})),children:jsx("div",{className:u(yk({color:m==="auto"?void 0:m,rounded:h>=100}),m==="auto"&&b()),style:{width:`${h}%`}})})})]})});Xs.displayName="Meter";var sh=X.forwardRef((e,t)=>jsx(Xs,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));sh.displayName="DiskUsageMeter";var ih=X.forwardRef((e,t)=>jsx(Xs,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));ih.displayName="BatteryMeter";var lh=cva("relative rounded-lg 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 min-h-48"}},defaultVariants:{size:"md"}}),Zs=(e,t,n)=>{let r=o=>{let a=(o+e/60)%6;return n-n*t*Math.max(Math.min(a,4-a,1),0)};return [Math.round(r(5)*255),Math.round(r(3)*255),Math.round(r(1)*255)]},ch=(e,t,n)=>{e/=255,t/=255,n/=255;let r=Math.max(e,t,n),o=Math.min(e,t,n),a=r-o,s=0,i=r===0?0:a/r,l=r;if(a!==0)switch(r){case e:s=((t-n)/a+(t<n?6:0))*60;break;case t:s=((n-e)/a+2)*60;break;case n:s=((e-t)/a+4)*60;break}return [s,i,l]},dh=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},uh=(e,t,n)=>"#"+[e,t,n].map(r=>r.toString(16).padStart(2,"0")).join(""),mh=X.forwardRef(({hue:e,saturation:t,brightness:n,value:r,defaultValue:o="#ff0000",onChange:a,onColorChange:s,size:i,disabled:l,thumbSize:c=18,className:d,...m},f)=>{let p=X.useRef(null),[g,h]=X.useState(false),b=X.useCallback(A=>{let K=dh(A);return K?ch(...K):[0,1,1]},[]),[v,x]=X.useState(()=>b(r||o)),y=e??v[0],w=t??v[1],C=n??v[2];X.useEffect(()=>{if(r){let A=b(r);x(A);}},[r,b]);let R=X.useCallback((A,K)=>{if(l||!p.current)return;let $=p.current.getBoundingClientRect(),G=Math.max(0,Math.min(1,(A-$.left)/$.width)),Y=Math.max(0,Math.min(1,(K-$.top)/$.height)),F=G,z=1-Y;t===void 0&&n===void 0&&x([y,F,z]),a?.({hue:y,saturation:F,brightness:z});let j=Zs(y,F,z);s?.(uh(...j));},[l,y,t,n,a,s]),N=A=>{l||(A.preventDefault(),h(true),A.target.setPointerCapture(A.pointerId),R(A.clientX,A.clientY));},T=A=>{g&&R(A.clientX,A.clientY);},P=A=>{h(false),A.target.releasePointerCapture(A.pointerId);},[k,E,M]=Zs(y,1,1),S=`rgb(${k}, ${E}, ${M})`,H=w*100,D=(1-C)*100,[L,I,V]=Zs(y,w,C),O=`rgb(${L}, ${I}, ${V})`;return jsx("div",{ref:f,className:u(lh({size:i}),l&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:S},onPointerDown:N,onPointerMove:T,onPointerUp:P,onPointerLeave:P,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 pointer-events-none",style:{width:c,height:c,left:`calc(${H}% - ${c/2}px)`,top:`calc(${D}% - ${c/2}px)`,backgroundColor:O,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});mh.displayName="ColorArea";var fh=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"}}),Tk=`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")`,ph="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",gh=X.forwardRef(({value:e,defaultValue:t,onChange:n,channel:r="hue",baseColor:o="#ff0000",orientation:a,size:s,disabled:i,thumbSize:l=18,showBorder:c=true,className:d,...m},f)=>{let p=X.useRef(null),[g,h]=X.useState(false),b=()=>{switch(r){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[v,x]=X.useState(t??b()),y=e??v,w=r==="hue"?y/360:y,C=X.useCallback((S,H)=>{if(i||!p.current)return;let D=p.current.getBoundingClientRect(),L=a!=="vertical",I;L?I=Math.max(0,Math.min(1,(S-D.left)/D.width)):I=Math.max(0,Math.min(1,1-(H-D.top)/D.height));let V=r==="hue"?I*360:I;e===void 0&&x(V),n?.(V);},[i,a,r,e,n]),R=S=>{i||(S.preventDefault(),h(true),S.target.setPointerCapture(S.pointerId),C(S.clientX,S.clientY));},N=S=>{g&&C(S.clientX,S.clientY);},T=S=>{h(false),S.target.releasePointerCapture(S.pointerId);},P=()=>{let S=a!=="vertical",H=S?"to right":"to top";switch(r){case "hue":return S?ph:"linear-gradient(to top, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)";case "alpha":return `linear-gradient(${H}, transparent, ${o})`;case "saturation":return `linear-gradient(${H}, #808080, ${o})`;case "brightness":return `linear-gradient(${H}, #000000, ${o})`;default:return ph}},k=()=>r==="hue"?`hsl(${y}, 100%, 50%)`:o,E=a!=="vertical",M=w*100;return jsx("div",{ref:f,className:u(fh({orientation:a,size:s}),i&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:p,className:u("absolute inset-0 rounded-full overflow-hidden",c&&"border border-input"),style:{backgroundImage:r==="alpha"?Tk:void 0,backgroundSize:r==="alpha"?"8px 8px":void 0},onPointerDown:R,onPointerMove:N,onPointerUp:T,onPointerLeave:T,children:[jsx("div",{className:"absolute inset-0 rounded-full",style:{background:P()}}),jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:l,height:l,...E?{left:`calc(${M}% - ${l/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${M}% - ${l/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:k(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});gh.displayName="ColorSlider";var bh=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"}}),kk=(e,t,n)=>{let r=e-n,o=t-n,a=Math.atan2(o,r)*180/Math.PI+90;return a<0&&(a+=360),a},vh=X.forwardRef(({value:e,defaultValue:t=0,onChange:n,size:r,disabled:o,innerRadius:a=.6,thumbSize:s=20,showCenter:i=true,className:l,...c},d)=>{let m=X.useRef(null),[f,p]=X.useState(false),[g,h]=X.useState(t),b=e??g,v=X.useCallback((R,N)=>{if(o||!m.current)return;let T=m.current.getBoundingClientRect(),P=T.width/2,k=R-T.left,E=N-T.top,M=kk(k,E,P);e===void 0&&h(M),n?.(M);},[o,e,n]),x=R=>{o||(R.preventDefault(),p(true),R.target.setPointerCapture(R.pointerId),v(R.clientX,R.clientY));},y=R=>{f&&v(R.clientX,R.clientY);},w=R=>{p(false),R.target.releasePointerCapture(R.pointerId);},C=()=>{let R=[];for(let N=0;N<=360;N+=30)R.push(`hsl(${N}, 100%, 50%) ${N}deg`);return `conic-gradient(from 270deg, ${R.join(", ")})`};return jsx("div",{ref:d,className:u(bh({size:r}),o&&"cursor-not-allowed opacity-50",l),...c,children:jsxs("div",{ref:m,className:"absolute inset-0 rounded-full",style:{background:C()},onPointerDown:x,onPointerMove:y,onPointerUp:w,onPointerLeave:w,children:[a<1&&jsx("div",{className:"absolute bg-background rounded-full",style:{top:`${(1-a)*50}%`,left:`${(1-a)*50}%`,width:`${a*100}%`,height:`${a*100}%`}}),i&&a<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(Pk,{hue:b,innerRadius:a,thumbSize:s})]})})});vh.displayName="ColorWheel";var Pk=({hue:e,innerRadius:t,thumbSize:n})=>{let r=(1-(1-t)/2)*50,o=(e-90)*Math.PI/180,a=50+r*Math.cos(o),s=50+r*Math.sin(o);return jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:n,height:n,left:`calc(${a}% - ${n/2}px)`,top:`calc(${s}% - ${n/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 xh=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"}}),Lk=cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Sk=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}}),yh=X.forwardRef(({className:e,orientation:t,size:n,align:r,label:o,value:a,valueWeight:s,mono:i,labelWidth:l,labelClassName:c,valueClassName:d,showColon:m=false,copyable:f=false,onCopy:p,...g},h)=>{let b=async()=>{if(!(!f||a===null||a===void 0))try{let v=typeof a=="string"?a:String(a);await navigator.clipboard.writeText(v),p?.();}catch{}};return jsxs("div",{ref:h,className:u(xh({orientation:t,size:n,align:r,className:e})),...g,children:[jsxs("span",{className:u(Lk({size:n}),c),style:l?{width:l,flexShrink:0}:void 0,children:[o,m&&":"]}),jsx("span",{className:u(Sk({size:n,weight:s,mono:i}),f&&"cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 transition-colors",d),onClick:f?b:void 0,role:f?"button":void 0,tabIndex:f?0:void 0,onKeyDown:f?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),b());}:void 0,children:a})]})});yh.displayName="LabeledValue";var Rh=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"}}),wh=X.forwardRef(({className:e,orientation:t,gap:n,...r},o)=>jsx("div",{ref:o,className:u(Rh({orientation:t,gap:n,className:e})),...r}));wh.displayName="LabeledValueGroup";var Nh=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-9 text-xs",md:"h-10 text-sm",lg:"h-11 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),Mo=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"}}),kh=X.forwardRef(({value:e,defaultValue:t="",onChange:n,onSearch:r,onSelect:o,suggestions:a=[],recentSearches:s=[],onClearRecentSearches:i,trendingSearches:l=[],isLoading:c,showClear:d=true,showIcon:m=true,popoverWidth:f="trigger",emptyMessage:p="No results found",size:g,variant:h,className:b,placeholder:v="Search...",disabled:x,...y},w)=>{let[C,R]=X.useState(false),[N,T]=X.useState(t),P=e!==void 0?e:N,k=X.useRef(null);X.useImperativeHandle(w,()=>k.current);let E=P.length>0,M=C&&(a.length>0||s.length>0||l.length>0||E),S=A=>{e===void 0&&T(A),n?.(A);},H=()=>{S(""),k.current?.focus();},D=A=>{A?.preventDefault(),P.trim()&&(r?.(P.trim()),R(false));},L=A=>{S(A.label),o?.(A),R(false);},I=A=>{S(A),r?.(A),R(false);},V=A=>{S(A),r?.(A),R(false);},O=X.useMemo(()=>{let A={};return a.forEach(K=>{let $=K.category||"Results";A[$]||(A[$]=[]),A[$].push(K);}),A},[a]);return jsxs(ot,{open:M,onOpenChange:R,children:[jsx(an,{children:jsxs("form",{onSubmit:D,className:u(Nh({size:g,variant:h}),b),children:[m&&jsx(Search,{className:u(Mo({size:g}),"ml-3")}),jsx("input",{ref:k,type:"text",value:P,onChange:A=>S(A.target.value),onFocus:()=>R(true),placeholder:v,disabled:x,className:u("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!m&&"pl-3"),...y}),d&&E&&!x&&jsx("button",{type:"button",onClick:H,className:u("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",Mo({size:g})),children:jsx(X$1,{className:"h-full w-full"})})]})}),jsx(at,{className:"p-0",style:{width:f==="trigger"?"var(--radix-popover-trigger-width)":f},align:"start",onOpenAutoFocus:A=>A.preventDefault(),children:jsxs(Command,{className:"rounded-lg border-0",children:[s.length>0&&!E&&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"}),i&&jsx("button",{type:"button",onClick:i,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),s.map((A,K)=>jsxs("button",{type:"button",onClick:()=>I(A),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(Clock,{className:u(Mo({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:A}),jsx(ArrowRight,{className:u(Mo({size:g}),"opacity-0 group-hover:opacity-100")})]},K))]}),l.length>0&&!E&&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"})}),l.map((A,K)=>jsxs("button",{type:"button",onClick:()=>V(A),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(TrendingUp,{className:u(Mo({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:A})]},K))]}),E&&jsx("div",{className:"p-2",children:c?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"})}):a.length>0?Object.entries(O).map(([A,K])=>jsxs("div",{children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:A})}),K.map($=>jsxs("button",{type:"button",onClick:()=>L($),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[$.icon||jsx(Search,{className:u(Mo({size:g}))}),jsxs("div",{className:"flex-1 text-left",children:[jsx("div",{className:"truncate",children:$.label}),$.description&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:$.description})]})]},$.id))]},A)):jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});kh.displayName="SearchBar";var Ph={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"})},Sh=X.forwardRef(({open:e,onOpenChange:t,items:n=[],recentItems:r=[],placeholder:o="Search...",isLoading:a,emptyMessage:s="No results found.",filter:i,shortcut:l="\u2318K",onSelect:c,footer:d},m)=>{let[f,p]=X.useState(""),g=X.useRef(null),[h,b]=X.useState(false);X.useEffect(()=>{b(true);},[]),X.useEffect(()=>{e||p("");},[e]),X.useEffect(()=>{if(!e)return;let R=N=>{N.key==="Escape"&&t?.(false);};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[e,t]),X.useEffect(()=>{if(e)return Gt(),()=>Ut()},[e]);let v=X.useMemo(()=>{let R={};return n.forEach(N=>{let T=N.category||"Results";R[T]||(R[T]=[]),R[T].push(N);}),R},[n]),x=R=>{R.onSelect?.(),c?.(R),t?.(false);},y=()=>{t?.(false);},w=f.length>0,C=!w&&r.length>0;return !h||!e?null:Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{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","data-state":e?"open":"closed",onClick:y}),jsx("div",{ref:m,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","data-state":e?"open":"closed",children:jsxs(Command,{className:"overflow-hidden rounded-xl border bg-background shadow-2xl",filter:i,shouldFilter:!i,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:g,value:f,onValueChange:p,placeholder:o,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"}),f&&jsx("button",{type:"button",onClick:()=>p(""),className:"rounded-sm p-1 text-muted-foreground hover:text-foreground",children:jsx(X$1,{className:"h-4 w-4"})})]}),jsx(Command.List,{className:"max-h-[400px] overflow-y-auto p-2",children:a?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:[C&&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(R=>jsxs(Command.Item,{value:R.label,onSelect:()=>x(R),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:R.icon||Ph[R.category||""]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:R.label}),R.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:R.description})]}),R.shortcut&&jsx("div",{className:"flex items-center gap-1",children:R.shortcut.map((N,T)=>jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:N},T))})]},R.id))]}),w&&Object.entries(v).map(([R,N])=>jsxs(Command.Group,{heading:R,children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:R}),N.map(T=>jsxs(Command.Item,{value:`${T.label} ${T.keywords?.join(" ")||""}`,onSelect:()=>x(T),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:T.icon||Ph[R]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:T.label}),T.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:T.description})]}),jsx(ArrowRight,{className:"h-4 w-4 text-muted-foreground opacity-0 group-aria-selected:opacity-100"})]},T.id))]},R)),jsx(Command.Empty,{className:"py-10 text-center text-sm text-muted-foreground",children:s})]})}),d?jsx("div",{className:"border-t px-4 py-3",children:d}):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:l})," to open"]})]})]})})]}),document.body)});Sh.displayName="SpotlightSearch";function Uk(e="k"){let[t,n]=X.useState(false);return X.useEffect(()=>{let r=o=>{(o.metaKey||o.ctrlKey)&&o.key===e&&(o.preventDefault(),n(a=>!a));};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),{open:t,setOpen:n,toggle:()=>n(r=>!r)}}var Ih=X.createContext(null),Js=()=>{let e=X.useContext(Ih);if(!e)throw new Error("useNotificationCenter must be used within a NotificationCenterProvider");return e},Qk=({children:e,notifications:t,onNotificationsChange:n})=>{let[r,o]=X.useState([]),[a,s]=X.useState(false),i=X.useRef(null),l=t!==void 0,c=l?t:r,d=X.useCallback(b=>{l?n?.(b):o(b);},[l,n]),m=c.filter(b=>!b.read).length,f=X.useCallback(b=>{d(c.map(v=>v.id===b?{...v,read:true}:v));},[c,d]),p=X.useCallback(()=>{d(c.map(b=>({...b,read:true})));},[c,d]),g=X.useCallback(b=>{d(c.filter(v=>v.id!==b));},[c,d]),h=X.useCallback(()=>{d([]);},[d]);return jsx(Ih.Provider,{value:{notifications:c,unreadCount:m,markAsRead:f,markAllAsRead:p,removeNotification:g,clearAll:h,open:a,setOpen:s,triggerRef:i},children:e})},Vh=X.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("relative inline-block",e),...n,children:t}));Vh.displayName="NotificationCenter";var Ah=X.forwardRef(({className:e,showBadge:t=true,children:n,onClick:r,...o},a)=>{let{unreadCount:s,open:i,setOpen:l,triggerRef:c}=Js(),d=f=>{r?.(f),l(!i);},m=s>99?"99+":String(s);return jsxs("button",{ref:f=>{c.current=f,typeof a=="function"?a(f):a&&(a.current=f);},type:"button",onClick:d,"aria-label":"Notifications"+(s>0?", "+s+" unread":""),className:u("relative inline-flex items-center justify-center rounded-md p-2 text-muted-foreground hover:bg-accent hover:text-accent-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",e),...o,children:[n||jsx(Bell,{className:"h-5 w-5"}),t&&s>0&&jsx("span",{className:"absolute -top-1 -right-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-destructive px-1 text-xs font-medium text-danger-foreground",children:m})]})});Ah.displayName="NotificationCenterTrigger";var zh=X.forwardRef(({className:e,align:t="end",sideOffset:n=8,emptyMessage:r="No notifications",children:o,...a},s)=>{let{open:i,setOpen:l,notifications:c,markAllAsRead:d,clearAll:m,triggerRef:f}=Js(),[p,g]=X.useState(false),h=X.useRef(null),[b,v]=X.useState({top:0,left:0});return X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!i||!f.current||!h.current)return;let x=()=>{if(!f.current||!h.current)return;let y=f.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),C=y.bottom+n,R=y.left;t==="center"?R=y.left+y.width/2-w.width/2:t==="end"&&(R=y.right-w.width),R+w.width>window.innerWidth-16&&(R=window.innerWidth-w.width-16),R<16&&(R=16),v({top:C,left:R});};return x(),window.addEventListener("resize",x),window.addEventListener("scroll",x,true),()=>{window.removeEventListener("resize",x),window.removeEventListener("scroll",x,true);}},[i,f,t,n]),X.useEffect(()=>{if(!i)return;let x=w=>{h.current&&!h.current.contains(w.target)&&f.current&&!f.current.contains(w.target)&&l(false);},y=w=>{w.key==="Escape"&&l(false);};return document.addEventListener("mousedown",x),document.addEventListener("keydown",y),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("keydown",y);}},[i,l,f]),!p||!i?null:Ba.createPortal(jsxs("div",{ref:x=>{h.current=x,typeof s=="function"?s(x):s&&(s.current=x);},className:u("fixed z-50 w-80 sm:w-96 max-h-[70vh] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:b.top,left:b.left},...a,children:[jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[jsx("h3",{className:"font-semibold",children:"Notifications"}),jsxs("div",{className:"flex items-center gap-2",children:[c.length>0&&jsxs(Fragment,{children:[jsx("button",{type:"button",onClick:d,className:"text-xs text-muted-foreground hover:text-foreground",children:"Mark all read"}),jsx("button",{type:"button",onClick:m,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear all"})]}),jsx("button",{type:"button",onClick:()=>l(false),className:"rounded-md p-1 hover:bg-accent",children:jsx(X$1,{className:"h-4 w-4"})})]})]}),jsx("div",{className:"max-h-[calc(70vh-60px)] overflow-y-auto",children:o||(c.length===0?jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-muted-foreground",children:[jsx(Bell,{className:"h-10 w-10 mb-2 opacity-50"}),jsx("p",{className:"text-sm",children:r})]}):c.map(x=>jsx(ac,{notification:x},x.id)))})]}),document.body)});zh.displayName="NotificationCenterContent";var Jk={info:"border-l-blue-500",success:"border-l-green-500",warning:"border-l-yellow-500",error:"border-l-red-500"},eP={info:Info,success:CheckCircle,warning:AlertTriangle,error:AlertCircle},ac=({notification:e,onMarkAsRead:t,onRemove:n})=>{let{markAsRead:r,removeNotification:o}=Js(),{id:a,title:s,description:i,type:l="info",timestamp:c,read:d,avatar:m,action:f}=e,p=eP[l],g=()=>{t?t():r(a);},h=()=>{n?n():o(a);},b=v=>{if(!v)return null;let x=typeof v=="string"?new Date(v):v,w=new Date().getTime()-x.getTime(),C=Math.floor(w/6e4),R=Math.floor(w/36e5),N=Math.floor(w/864e5);return C<1?"Just now":C<60?C+"m ago":R<24?R+"h ago":N<7?N+"d ago":x.toLocaleDateString()};return jsxs("div",{className:u("group relative flex gap-3 border-b border-l-4 px-4 py-3 transition-colors hover:bg-accent/50",Jk[l],!d&&"bg-accent/20"),children:[jsx("div",{className:"flex-shrink-0",children:m||jsx("div",{className:u("flex h-8 w-8 items-center justify-center rounded-full",l==="info"&&"bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-400",l==="success"&&"bg-green-100 text-green-600 dark:bg-green-900 dark:text-green-400",l==="warning"&&"bg-yellow-100 text-yellow-600 dark:bg-yellow-900 dark:text-yellow-400",l==="error"&&"bg-red-100 text-red-600 dark:bg-red-900 dark:text-red-400"),children:jsx(p,{className:"h-4 w-4"})})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsx("p",{className:u("text-sm font-medium",!d&&"font-semibold"),children:s}),!d&&jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full bg-primary"})]}),i&&jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-2",children:i}),jsxs("div",{className:"mt-2 flex items-center gap-3",children:[c&&jsx("span",{className:"text-xs text-muted-foreground",children:b(c)}),f&&jsx("button",{type:"button",onClick:f.onClick,className:"text-xs font-medium text-primary hover:underline",children:f.label})]})]}),jsx("div",{className:"flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:jsxs("div",{className:"flex gap-1",children:[!d&&jsx("button",{type:"button",onClick:g,className:"rounded-md p-1 hover:bg-accent",title:"Mark as read",children:jsx(Check,{className:"h-4 w-4"})}),jsx("button",{type:"button",onClick:h,className:"rounded-md p-1 hover:bg-accent text-danger",title:"Remove",children:jsx(Trash2,{className:"h-4 w-4"})})]})})]})};ac.displayName="NotificationItem";var Oh=X.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("divide-y",e),...n,children:t}));Oh.displayName="NotificationList";var Bh=cva("relative flex items-center justify-center gap-3 px-4 py-2.5 text-sm",{variants:{variant:{solid:"",flat:""},type:{default:"",success:"",warning:"",error:""},position:{top:"fixed top-0 left-0 right-0 z-50",relative:"relative"}},compoundVariants:[{variant:"solid",type:"default",className:"bg-primary text-primary-foreground [&>svg]:text-primary-foreground"},{variant:"flat",type:"default",className:"bg-primary/10 text-primary [&>svg]:text-primary"},{variant:"solid",type:"success",className:"bg-green-600 text-white dark:bg-green-500 [&>svg]:text-white"},{variant:"flat",type:"success",className:"bg-green-600/10 text-green-600 dark:bg-green-500/10 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"solid",type:"warning",className:"bg-amber-600 text-white dark:bg-amber-500 [&>svg]:text-white"},{variant:"flat",type:"warning",className:"bg-amber-600/10 text-amber-600 dark:bg-amber-500/10 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"solid",type:"error",className:"bg-red-600 text-white dark:bg-red-500 [&>svg]:text-white"},{variant:"flat",type:"error",className:"bg-red-600/10 text-red-600 dark:bg-red-500/10 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"}],defaultVariants:{variant:"solid",type:"default",position:"relative"}}),lP={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},Fh=X.forwardRef(({message:e,type:t="default",variant:n="solid",showIcon:r=false,icon:o,dismissible:a=true,onDismiss:s,endContent:i,position:l,animate:c,autoDismiss:d,storageKey:m,className:f,...p},g)=>{let[h,b]=X.useState(true),[v,x]=X.useState(false);X.useEffect(()=>{m&&localStorage.getItem(`banner-${m}`)==="true"&&b(false);},[m]),X.useEffect(()=>{if(d&&h){let R=setTimeout(()=>{y();},d);return ()=>clearTimeout(R)}},[d,h]);let y=()=>{x(true),setTimeout(()=>{b(false),m&&localStorage.setItem(`banner-${m}`,"true"),s?.();},200);};if(!h)return null;let w=lP[t],C=r?o!==void 0?o:w?jsx(w,{className:"h-4 w-4"}):null:null;return jsxs("div",{ref:g,className:u(Bh({variant:n,type:t,position:l}),c&&"animate-pulse",v&&"animate-out fade-out slide-out-to-top duration-200",f),role:"banner",...p,children:[C&&jsx("span",{className:"shrink-0",children:C}),jsx("span",{className:"text-center font-medium",children:e}),i&&jsx("div",{className:"shrink-0 ml-2",children:i}),a&&jsx("button",{type:"button",onClick:y,className:u("absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-1 transition-opacity hover:opacity-70 cursor-pointer",l==="relative"&&"right-4"),"aria-label":"Dismiss banner",children:jsx(X$1,{className:"h-4 w-4"})})]})});Fh.displayName="Banner";var fa=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:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",bordered:"border border-zinc-300 dark:border-zinc-700 bg-transparent text-primary hover:opacity-70",light:"bg-transparent text-primary hover:bg-primary/10",flat:"bg-primary/20 text-primary hover:opacity-70",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent text-primary hover:bg-primary hover:text-primary-foreground hover:border-primary"},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:"solid",size:"md",position:"bottom-right"}}),uP=cva("transition-transform duration-200 [&>svg]:h-full [&>svg]:w-full",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),ic=X.forwardRef(({icon:e,label:t="Action button",extended:n,extendedLabel:r,actions:o,direction:a="up",showTooltip:s=true,closeIcon:i,animation:l="rotate",variant:c,size:d,position:m,className:f,onClick:p,disabled:g,...h},b)=>{let[v,x]=X.useState(false),y=o&&o.length>0,w=P=>{y&&x(!v),p?.(P);},C=P=>{P.onClick?.(),x(false);},R={up:{container:"flex-col-reverse bottom-full mb-3 gap-3",item:""},down:{container:"flex-col top-full mt-3 gap-3",item:""},left:{container:"flex-row-reverse right-full mr-3 gap-3",item:""},right:{container:"flex-row left-full ml-3 gap-3",item:""}},N=l==="rotate"&&v?"rotate-45":"",T=l==="scale"&&v?"scale-0":"scale-100";return jsxs("div",{className:u("relative z-50",m!=="relative"&&m&&fa({position:m})),children:[y&&v&&jsx("div",{className:u("absolute left-1/2 -translate-x-1/2 flex items-center",R[a].container),children:o.map((P,k)=>jsxs("div",{className:u("flex items-center gap-2 animate-in fade-in zoom-in duration-200",a==="up"||a==="down"?"flex-row":"flex-col"),style:{animationDelay:`${k*50}ms`},children:[s&&(a==="up"||a==="down")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:P.label}),P.href?jsx("a",{href:P.href,className:u(fa({variant:P.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":P.label,children:P.icon}):jsx("button",{type:"button",onClick:()=>C(P),className:u(fa({variant:P.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":P.label,children:P.icon}),s&&(a==="left"||a==="right")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:P.label})]},P.id))}),jsxs("button",{ref:b,type:"button",onClick:w,disabled:g,className:u(fa({variant:c,size:d,position:"relative"}),n&&"w-auto px-6 gap-2",f),"aria-label":t,"aria-expanded":y?v:void 0,...h,children:[v&&i?i:jsx("span",{className:u(uP({size:d}),N,T,"transition-all duration-200"),children:e||jsx(Plus,{})}),n&&r&&jsx("span",{className:"font-medium",children:r})]}),y&&v&&jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>x(false)})]})});ic.displayName="FloatingActionButton";var mP=ic;var jh=cva("fixed bottom-0 left-0 right-0 z-50 flex items-center justify-around border-t bg-background safe-area-pb",{variants:{variant:{default:"border-border",elevated:"border-transparent shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.1)]",filled:"border-transparent bg-primary text-primary-foreground"},size:{sm:"h-14",md:"h-16",lg:"h-20"}},defaultVariants:{variant:"default",size:"md"}}),$h=cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors cursor-pointer",{variants:{variant:{default:"",elevated:"",filled:""}},defaultVariants:{variant:"default"}}),Wh=X.forwardRef(({className:e,variant:t,size:n,items:r,value:o,defaultValue:a,onValueChange:s,showLabels:i="all",renderItem:l,...c},d)=>{let[m,f]=X.useState(a||r[0]?.key),p=o!==void 0,g=p?o:m,h=y=>{y.disabled||(p||f(y.key),s?.(y.key));},b=y=>t==="filled"?y?"text-primary-foreground":"text-primary-foreground/60 hover:text-primary-foreground/80":y?"text-primary":"text-muted-foreground hover:text-foreground",v=()=>{switch(n){case "sm":return "h-5 w-5";case "lg":return "h-7 w-7";default:return "h-6 w-6"}},x=()=>{switch(n){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsx("nav",{ref:d,className:u(jh({variant:t,size:n}),e),role:"navigation","aria-label":"Bottom navigation",...c,children:r.map(y=>{let w=g===y.key,C=i==="all"||i==="active"&&w,R=w&&y.activeIcon?y.activeIcon:y.icon;if(l)return jsx("div",{onClick:()=>h(y),className:u($h({variant:t}),y.disabled&&"opacity-50 cursor-not-allowed"),children:l(y,w)},y.key);let N=jsxs("div",{onClick:()=>!y.href&&h(y),className:u($h({variant:t}),b(w),y.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":w?"page":void 0,"aria-disabled":y.disabled,tabIndex:y.disabled?-1:0,onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),h(y));},children:[jsxs("div",{className:"relative",children:[jsx("span",{className:u(v(),"[&>svg]:h-full [&>svg]:w-full"),children:R}),y.badge!==void 0&&y.badge>0&&jsx("span",{className:"absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-medium text-white",children:y.badge>99?"99+":y.badge}),y.showDot&&jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2 w-2 rounded-full bg-red-500"})]}),C&&y.label&&jsx("span",{className:u(x(),"font-medium truncate max-w-full px-1"),children:y.label})]},y.key);return y.href&&!y.disabled?jsx("a",{href:y.href,onClick:()=>h(y),className:u("flex flex-1 flex-col items-center justify-center gap-1 no-underline",b(w)),children:N},y.key):N})})});Wh.displayName="BottomNavigation";var fP="fixed inset-x-0 bottom-0 z-50 mt-24 flex h-fit max-h-[90vh] flex-col rounded-t-[20px] border-t border-border/40 dark:border-border/20 bg-background",Yh=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-danger hover:bg-destructive/10"}},defaultVariants:{variant:"default"}}),Xh=X.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r,description:o,items:a,cancelLabel:s="Cancel",onCancel:i,showCancel:l=true,children:c,closeOnSelect:d=true,onAction:m},f)=>{let p=g=>{g.isDisabled||(g.onSelect?.(),m?.(g.key),d&&t?.(false));};return jsxs(Drawer.Root,{open:e,onOpenChange:t,children:[n&&jsx(Drawer.Trigger,{asChild:true,children:n}),jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/40"}),jsxs(Drawer.Content,{ref:f,className:fP,children:[jsx("div",{className:"mx-auto mt-4 h-1.5 w-12 flex-shrink-0 rounded-full bg-muted"}),(r||o)&&jsxs("div",{className:"px-4 py-3 text-center",children:[r&&jsx(Drawer.Title,{className:"text-base font-semibold",children:r}),o&&jsx(Drawer.Description,{className:"mt-1 text-sm text-muted-foreground",children:o})]}),jsx("div",{className:"flex-1 overflow-y-auto",children:c||jsx("div",{className:"divide-y divide-border/40 dark:divide-border/20",children:a?.map(g=>jsxs("button",{type:"button",disabled:g.isDisabled,onClick:()=>p(g),className:u(Yh({variant:g.isDestructive?"destructive":"default"})),children:[g.icon&&jsx("span",{className:"h-5 w-5 flex-shrink-0 [&>svg]:h-full [&>svg]:w-full",children:g.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"font-medium",children:g.label}),g.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:g.description})]})]},g.key))})}),l&&jsx("div",{className:"border-t border-border/40 dark:border-border/20 p-2 pb-safe",children:jsx(Drawer.Close,{asChild:true,children:jsx("button",{type:"button",onClick:i,className:"w-full rounded-lg bg-muted py-3.5 text-center font-semibold transition-colors hover:bg-muted/80",children:s})})})]})]})]})});Xh.displayName="ActionSheet";var Zh=cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),cc=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"}}),Qh=X.forwardRef(({className:e,variant:t,leftActions:n=[],rightActions:r=[],actionSize:o="md",threshold:a=.3,onSwipeEnd:s,disabled:i=false,fullSwipeAction:l,children:c,...d},m)=>{let f=X.useRef(null),[p,g]=X.useState(0),[h,b]=X.useState(false),v=X.useRef(0),x=X.useRef(0),y=n.length*(o==="sm"?64:o==="lg"?96:80),w=r.length*(o==="sm"?64:o==="lg"?96:80),C=k=>{i||(b(true),v.current=k.touches[0].clientX,x.current=p);},R=k=>{if(!h||i)return;let M=k.touches[0].clientX-v.current,S=x.current+M;(S>0&&n.length===0||S<0&&r.length===0)&&(S=0),S>y?S=y+(S-y)*.3:S<-w&&(S=-w+(S+w)*.3),g(S);},N=()=>{if(!h)return;b(false);let k=f.current?.offsetWidth||0,E=Math.abs(p)/k;if(l&&E>.6){l==="right"&&p>0&&n[0]?(n[0].onAction?.(),s?.("right",n[0].key)):l==="left"&&p<0&&r[0]&&(r[0].onAction?.(),s?.("left",r[0].key)),g(0);return}p>y*a&&n.length>0?(g(y),s?.("right")):p<-w*a&&r.length>0?(g(-w),s?.("left")):g(0);},T=(k,E)=>{k.onAction?.(),s?.(E,k.key),g(0);},P=()=>{g(0);};return jsxs("div",{ref:m,className:u(Zh({variant:t,className:e})),...d,children:[n.length>0&&p>0&&jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:y},children:n.map(k=>jsxs("button",{type:"button",onClick:()=>T(k,"right"),className:u(cc({variant:k.variant,size:o})),style:{opacity:Math.min(1,p/y)},children:[k.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:k.icon}),!k.icon&&k.label]},k.key))}),r.length>0&&p<0&&jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:w},children:r.map(k=>jsxs("button",{type:"button",onClick:()=>T(k,"left"),className:u(cc({variant:k.variant,size:o})),style:{opacity:Math.min(1,Math.abs(p)/w)},children:[k.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:k.icon}),!k.icon&&k.label]},k.key))}),jsx("div",{ref:f,className:u("relative bg-background",h?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:C,onTouchMove:R,onTouchEnd:N,onClick:p!==0?P:void 0,children:c})]})});Qh.displayName="SwipeActions";var ex=cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),vP=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"}}),tx=X.forwardRef(({className:e,variant:t,onRefresh:n,pullThreshold:r=80,maxPullDistance:o=120,loadingIndicator:a,pullIndicator:s,indicatorSize:i="md",disabled:l=false,pullText:c="Pull to refresh",releaseText:d="Release to refresh",refreshingText:m="Refreshing...",children:f,...p},g)=>{let h=X.useRef(null),[b,v]=X.useState(0),[x,y]=X.useState("idle"),w=X.useRef(0),C=X.useRef(false),R=()=>l||x==="refreshing"?false:(h.current?.scrollTop??window.scrollY)<=0,N=M=>{R()&&(w.current=M.touches[0].clientY,C.current=true);},T=M=>{if(!C.current||!R())return;let H=M.touches[0].clientY-w.current;if(H<0){v(0),y("idle");return}let L=Math.min(H*.5,o);v(L),y(L>=r?"ready":"pulling");},P=async()=>{if(C.current)if(C.current=false,x==="ready"){y("refreshing"),v(r*.6);try{await n();}finally{y("idle"),v(0);}}else y("idle"),v(0);},k={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[i],E=()=>{if(x==="refreshing")return a||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(Loader2,{className:u(k,"animate-spin text-primary")}),jsx("span",{className:"text-xs text-muted-foreground",children:m})]});let M=Math.min(b/r*180,180);return s||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(ArrowDown,{className:u(k,"text-muted-foreground transition-transform"),style:{transform:`rotate(${M}deg)`}}),jsx("span",{className:"text-xs text-muted-foreground",children:x==="ready"?d:c})]})};return jsxs("div",{ref:g,className:u(ex({variant:t,className:e})),...p,children:[jsx("div",{className:u(vP({size:i}),"z-10",x==="idle"&&b===0&&"opacity-0"),style:{top:Math.max(b-60,-60),opacity:Math.min(b/(r*.5),1)},children:E()}),jsx("div",{ref:h,className:u("transition-transform duration-200",x==="refreshing"&&"ease-out"),style:{transform:`translateY(${b}px)`,transition:C.current?"none":void 0},onTouchStart:N,onTouchMove:T,onTouchEnd:P,children:f})]})});tx.displayName="PullToRefresh";var Gr=(e,t,n)=>({duration:e,delay:t,ease:n||[.4,0,.2,1]}),hP={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},nx=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialOpacity:i=0,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=jsx(motion.div,{ref:d,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:hP,custom:i,transition:Gr(n,r,o),className:u(a),onAnimationStart:l,onAnimationComplete:c,children:t});return s?jsx(AnimatePresence,{children:e&&m}):m});nx.displayName="Fade";var xP=(e,t)=>{let n=typeof t=="number"?`${t}px`:t,r={up:{y:n},down:{y:`-${n}`},left:{x:n},right:{x:`-${n}`}};return {hidden:{opacity:0,...r[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...r[e]}}},rx=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,direction:i="up",offset:l=20,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=X.useMemo(()=>xP(i,l),[i,l]),p=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:Gr(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});rx.displayName="Slide";var yP={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"},RP={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},ox=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialScale:i=.9,origin:l="center",onAnimationStart:c,onAnimationComplete:d},m)=>{let f=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:RP,custom:i,transition:Gr(n,r,o),className:u(a),style:{transformOrigin:yP[l]},onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&f}):f});ox.displayName="Scale";var ax=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,horizontal:s=false,startingSize:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=s?"width":"height",p={hidden:{[f]:i,opacity:l?0:1},visible:{[f]:"auto",opacity:1},exit:{[f]:i,opacity:l?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:Gr(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});ax.displayName="Collapse";var sx=X.forwardRef(({show:e=true,children:t,duration:n=.4,delay:r=0,ease:o,className:a,initialWidth:s=0,initialHeight:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{width:s,height:i,opacity:l?0:1},visible:{width:"auto",height:"auto",opacity:1},exit:{width:s,height:i,opacity:l?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:f,transition:Gr(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});sx.displayName="Expand";var ix=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialRotation:i=-180,finalRotation:l=0,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{opacity:0,rotate:i},visible:{opacity:1,rotate:l},exit:{opacity:0,rotate:i}},p=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:Gr(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});ix.displayName="Rotate";var lx=X.forwardRef(({front:e,back:t,direction:n="horizontal",flipped:r=false,duration:o=.6,delay:a=0,ease:s,className:i,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=n==="horizontal"?"rotateY":"rotateX";return jsx("div",{ref:d,className:u("relative",i),style:{perspective:1e3},children:jsxs(motion.div,{animate:{[m]:r?180:0},transition:Gr(o,a,s),style:{transformStyle:"preserve-3d"},onAnimationStart:l,onAnimationComplete:c,children:[jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden"},children:e}),jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden",transform:`${m}(180deg)`},children:t})]})})});lx.displayName="Flip";var cx=X.forwardRef(({color:e="currentColor",duration:t=.6,children:n,className:r,disabled:o=false},a)=>{let[s,i]=X.useState([]),l=X.useRef(null),c=m=>{if(o)return;let f=l.current;if(!f)return;let p=f.getBoundingClientRect(),g=m.clientX-p.left,h=m.clientY-p.top,b=Math.max(p.width,p.height)*2,v={id:Date.now(),x:g,y:h,size:b};i(x=>[...x,v]);},d=m=>{i(f=>f.filter(p=>p.id!==m));};return jsxs("div",{ref:a,className:u("relative overflow-hidden rounded-[inherit]",r),onClick:c,children:[jsx("div",{ref:l,className:"relative z-0",children:n}),jsx(AnimatePresence,{children:s.map(m=>jsx(motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>d(m.id),className:"pointer-events-none absolute rounded-full",style:{left:m.x-m.size/2,top:m.y-m.size/2,width:m.size,height:m.size,backgroundColor:e}},m.id))})]})});cx.displayName="Ripple";var dx=X.forwardRef(({children:e,animate:t=true,height:n=10,duration:r=.5,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=X.useState(false),d=s?l:t,m={idle:{y:0},bounce:{y:[0,-n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"bounce":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});dx.displayName="Bounce";var TP={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]},ux=X.forwardRef(({children:e,animate:t=true,intensity:n="normal",duration:r=.5,count:o=1,className:a,triggerOnHover:s=false},i)=>{let[l,c]=X.useState(false),d=s?l:t,m={idle:{x:0},shake:{x:TP[n],transition:{duration:r,ease:"easeInOut",repeat:o-1}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"shake":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});ux.displayName="Shake";var MP={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},mx=X.forwardRef(({children:e,animate:t=true,speed:n="normal",className:r},o)=>jsx("div",{ref:o,className:u(t&&MP[n],r),children:e}));mx.displayName="Pulse";var px=X.forwardRef(({children:e,animate:t=true,angle:n=10,duration:r=.3,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=X.useState(false),d=s?l:t,m={idle:{rotate:0},wiggle:{rotate:[0,-n,n,-n,n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"wiggle":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});px.displayName="Wiggle";var fx=X.forwardRef(({children:e,animate:t=false,scale:n=1.2,duration:r=.2,className:o,triggerOnHover:a=false,triggerOnClick:s=false},i)=>{let[l,c]=X.useState(false),d=t||l,m={type:"spring",stiffness:400,damping:17,duration:r},f=()=>{s&&(c(true),setTimeout(()=>c(false),r*1e3));};return jsx(motion.div,{ref:i,animate:{scale:d?n:1},transition:m,className:u(o),onMouseEnter:()=>a&&c(true),onMouseLeave:()=>a&&c(false),onClick:f,children:e})});fx.displayName="Pop";var SP=(e,t,n,r)=>{let o=e.toFixed(t),[a,s]=o.split("."),i=a.replace(/\B(?=(\d{3})+(?!\d))/g,n);return s?`${i}${r}${s}`:i},gx=X.forwardRef(({value:e,from:t=0,duration:n=2,decimals:r=0,prefix:o="",suffix:a="",separator:s=",",decimalSeparator:i=".",animateOnView:l=true,delay:c=0,className:d,onComplete:m},f)=>{let p=X.useRef(null),g=useInView(p,{once:true}),[h,b]=X.useState(!l);X.useEffect(()=>{if(l&&g){let y=setTimeout(()=>b(true),c*1e3);return ()=>clearTimeout(y)}},[l,g,c]);let v=useMotionValue(t),x=useTransform(v,y=>SP(y,r,s,i));return X.useEffect(()=>{if(h){let y=animate(v,e,{duration:n,ease:"easeOut",onComplete:m});return ()=>y.stop()}},[h,e,n,v,m]),jsx("span",{ref:p,className:u(d),children:jsxs("span",{ref:f,children:[o,jsx(motion.span,{children:x}),a]})})});gx.displayName="Counter";var bx=X.forwardRef(({text:e,speed:t=50,delay:n=0,pauseBetween:r=1500,cursor:o=true,cursorChar:a="|",loop:s=false,deleteSpeed:i=30,animateOnView:l=true,className:c,cursorClassName:d,onComplete:m},f)=>{let p=Array.isArray(e)?e:[e],[g,h]=X.useState(""),[b,v]=X.useState(0),[x,y]=X.useState(false),[w,C]=X.useState(false),R=X.useRef(null),N=useInView(R,{once:true}),[T,P]=X.useState(!l);return X.useEffect(()=>{if(l&&N){let k=setTimeout(()=>P(true),n*1e3);return ()=>clearTimeout(k)}},[l,N,n]),X.useEffect(()=>{if(!T||w)return;let k=p[b],E;return x?g.length>0?E=setTimeout(()=>{h(g.slice(0,-1));},i):(y(false),v(M=>(M+1)%p.length)):g.length<k.length?E=setTimeout(()=>{h(k.slice(0,g.length+1));},t):b<p.length-1||s?E=setTimeout(()=>{y(true);},r):(C(true),m?.()),()=>clearTimeout(E)},[T,g,b,x,w,p,t,i,r,s,m]),jsxs("span",{ref:R,className:u(c),children:[jsx("span",{ref:f,children:g}),o&&jsx(motion.span,{animate:{opacity:[1,0]},transition:{duration:.8,repeat:1/0,repeatType:"reverse"},className:u("ml-0.5",d),children:a})]})});bx.displayName="Typewriter";var vx=X.forwardRef(({children:e,direction:t="up",stagger:n=.05,duration:r=.5,delay:o=0,splitBy:a="word",animateOnView:s=true,className:i},l)=>{let c=X.useRef(null),d=useInView(c,{once:true,amount:.5}),m=s?d:true,f=typeof e=="string"?e:"",p=a==="word"?f.split(" "):f.split(""),g={up:{y:20},down:{y:-20},left:{x:20},right:{x:-20}},h={hidden:{},visible:{transition:{staggerChildren:n,delayChildren:o}}},b={hidden:{opacity:0,...g[t]},visible:{opacity:1,x:0,y:0,transition:{duration:r,ease:"easeInOut"}}};return jsx(motion.div,{ref:l,className:u("inline-flex flex-wrap",i),variants:h,initial:"hidden",animate:m?"visible":"hidden",children:jsx("span",{ref:c,children:p.map((v,x)=>jsxs(motion.span,{variants:b,className:"inline-block",children:[v,a==="word"&&x<p.length-1&&"\xA0"]},x))})})});vx.displayName="TextReveal";var hx=X.forwardRef(({words:e,duration:t=2,animation:n="slide",animationDuration:r=.5,className:o,loop:a=true},s)=>{let[i,l]=X.useState(0);X.useEffect(()=>{if(!a&&i===e.length-1)return;let d=setInterval(()=>{l(m=>(m+1)%e.length);},t*1e3);return ()=>clearInterval(d)},[e.length,t,a,i]);let c=()=>{switch(n){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:u("relative inline-block",o),children:jsx(AnimatePresence,{mode:"wait",children:jsx(motion.span,{variants:c(),initial:"initial",animate:"animate",exit:"exit",transition:{duration:r},className:"inline-block",children:e[i]},e[i])})})});hx.displayName="WordRotate";var wx=X.forwardRef(({children:e,direction:t="up",distance:n=50,duration:r=.6,delay:o=0,once:a=true,threshold:s=.1,className:i,scale:l,rotate:c,blur:d,ease:m=[.4,0,.2,1]},f)=>{let p=X.useRef(null),g=useInView(p,{once:a,amount:s}),b={up:{x:0,y:n},down:{x:0,y:-n},left:{x:n,y:0},right:{x:-n,y:0},none:{x:0,y:0}}[t],v={hidden:{opacity:0,x:b.x,y:b.y,scale:l??1,rotate:c??0,filter:d?`blur(${d}px)`:"blur(0px)"},visible:{opacity:1,x:0,y:0,scale:1,rotate:0,filter:"blur(0px)",transition:{duration:r,delay:o,ease:m}}};return jsx("div",{ref:p,children:jsx(motion.div,{ref:f,variants:v,initial:"hidden",animate:g?"visible":"hidden",className:u(i),children:e})})});wx.displayName="ScrollReveal";var Cx=X.forwardRef(({position:e="top",size:t=4,color:n="hsl(var(--primary))",backgroundColor:r="transparent",zIndex:o=50,className:a,container:s,showPercentage:i=false,useSpring:l=true},c)=>{let{scrollYProgress:d}=useScroll({container:s}),m=useSpring(d,{stiffness:100,damping:30,restDelta:.001}),f=l?m:d,p=e==="top"||e==="bottom",g={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}},h=p?"scaleX":"scaleY",b=p?"left":"top";return jsxs("div",{ref:c,className:u("fixed",a),style:{...g[e],zIndex:o,backgroundColor:r},children:[jsx(motion.div,{className:"h-full w-full",style:{[h]:f,transformOrigin:b,backgroundColor:n}}),i&&jsx(HP,{progress:f,position:e})]})});Cx.displayName="ScrollProgress";var HP=({progress:e,position:t})=>{let n=useTransform(e,s=>Math.round(s*100)),[r,o]=X.useState(0);return X.useEffect(()=>{let s=n.on("change",o);return ()=>s()},[n]),jsxs("span",{className:u("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,"%"]})},Tx=X.forwardRef(({children:e,speed:t=.5,direction:n="vertical",className:r,container:o},a)=>{let s=X.useRef(null),{scrollYProgress:i}=useScroll({target:s,container:o,offset:["start end","end start"]}),l=[-100*t,100*t],c=useTransform(i,[0,1],l),d=useSpring(c,{stiffness:100,damping:30}),m=n==="horizontal"?d:0,f=n==="vertical"?d:0;return jsx("div",{ref:s,className:u("overflow-hidden",r),children:jsx(motion.div,{ref:a,style:{x:m,y:f},children:e})})});Tx.displayName="Parallax";var kx=X.forwardRef(({children:e,width:t,height:n,duration:r=1.5,direction:o="right",baseColor:a="hsl(var(--muted))",highlightColor:s="hsl(var(--muted-foreground) / 0.1)",borderRadius:i,className:l,active:c=true},d)=>{let m={left:"to left",right:"to right",top:"to top",bottom:"to bottom"},f={left:"shimmer-left",right:"shimmer-right",top:"shimmer-top",bottom:"shimmer-bottom"};return jsxs("div",{ref:d,className:u("relative overflow-hidden",l),style:{width:t,height:n,borderRadius:i,backgroundColor:a},children:[e,c&&jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(${m[o]}, transparent, ${s}, transparent)`,animation:`${f[o]} ${r}s infinite`}}),jsx("style",{children:`
55
+ `,document.body.appendChild(de),q.dataTransfer.setDragImage(de,20,15),setTimeout(()=>{document.body.removeChild(de);},0),h(e),C?.({event:q,node:e});},pe=q=>{if(q.preventDefault(),q.stopPropagation(),!g||g.key===e.key||Z)return;let De=q.currentTarget.getBoundingClientRect(),de=q.clientY-De.top,je=De.height,We;de<je*.25?We=-1:de>je*.75?We=1:We=0,!(w&&!w({dropNode:e,dropPosition:We,dragNode:g}))&&(y(e.key,We),R?.({event:q,node:e}));},Ct=q=>{q.preventDefault(),q.stopPropagation(),!(!g||g.key===e.key)&&T?.({event:q,node:e,expandedKeys:K()});},bt=q=>{q.stopPropagation(),M?.({event:q,node:e});},yn=q=>{q.preventDefault(),q.stopPropagation(),!(!g||g.key===e.key||Z)&&(v!==null&&x(e,v),h(null),y(null,null));},Ke=q=>{h(null),y(null,null),k?.({event:q,node:e});},on=q=>{Z||ue&&i(e.key,e,q);},Tt=q=>{q.stopPropagation(),!Z&&!G&&a(e.key,e);},_=X.useMemo(()=>{if(!B||v===null)return "";switch(v){case -1:return "before:absolute before:left-0 before:right-0 before:top-0 before:h-0.5 before:bg-foreground";case 1:return "after:absolute after:left-0 after:right-0 after:bottom-0 after:h-0.5 after:bg-foreground";case 0:return "ring-2 ring-foreground ring-inset";default:return ""}},[B,v]),oe=[...r,n];return jsxs("div",{className:"relative",children:[P&&t>0&&jsxs(Fragment,{children:[r.map((q,De)=>!q&&jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${De} * var(--tree-indent) + 12px)`,top:0,bottom:0}},De)),jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:0,height:n?"calc(var(--tree-item-height) / 2)":"100%"}}),jsx("div",{className:"absolute border-t border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:"calc(var(--tree-item-height) / 2)",width:"calc(var(--tree-indent) - 4px)"}})]}),jsxs("div",{role:"treeitem","aria-expanded":G?void 0:Y,"aria-selected":ue?F:void 0,"aria-disabled":Z,draggable:Ce,onDragStart:Fe,onDragOver:pe,onDragEnter:Ct,onDragLeave:bt,onDrop:yn,onDragEnd:Ke,onClick:on,className:u("relative",kg({size:A,isSelected:F,isDragging:W,isDisabled:Z,isHoverable:ue&&!Z}),_,V&&"flex-1"),style:{paddingLeft:`calc(${t} * var(--tree-indent) + 8px)`},children:[Ce&&N&&Q!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:Q}),jsx("button",{type:"button",onClick:Tt,className:u("flex-shrink-0 p-0.5 rounded hover:bg-muted/80 transition-transform",G&&"invisible"),tabIndex:-1,children:jsx(ChevronRight,{className:u("h-4 w-4 transition-transform duration-200",Y&&"rotate-90")})}),U&&jsx(IC,{checked:z,indeterminate:j,disabled:Z,onClick:q=>m(e.key,e,q)}),E&&le&&jsx("div",{className:"flex-shrink-0 text-muted-foreground ml-1",children:le}),jsx("div",{className:u("flex-1 min-w-0 truncate ml-1",V&&"flex-none"),children:e.label})]}),$&&Y&&jsx("div",{role:"group",children:e.children.map((q,De)=>jsx(Eg,{node:q,level:t+1,isLast:De===e.children.length-1,parentIsLastPath:oe},q.key))})]})},VC=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return n(e),t},AC=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return e.children&&n(e.children),t},Lg=(e,t)=>{if(!e.children)return false;for(let n of e.children)if(n.key===t||Lg(n,t))return true;return false},Sg=X.forwardRef(({className:e,variant:t,size:n,data:r,draggable:o=false,allowDrop:a,expandedKeys:s,defaultExpandedKeys:i=[],defaultExpandAll:l=false,onExpand:c,selectable:d=true,multiple:m=false,selectedKeys:f,defaultSelectedKeys:p=[],onSelect:g,checkable:h=false,checkStrictly:b=false,checkedKeys:v,defaultCheckedKeys:y=[],onCheck:x,showLine:w=false,showIcon:C=false,showHandle:R=true,dragIcon:T,icon:M,leafIcon:k=jsx(File,{className:"h-4 w-4"}),folderIcon:P=jsx(Folder,{className:"h-4 w-4"}),folderOpenIcon:E=jsx(FolderOpen,{className:"h-4 w-4"}),onDragStart:N,onDragEnter:S,onDragOver:H,onDragLeave:D,onDragEnd:L,onDrop:I,blockNode:V=false,disabled:O=false,...A},K)=>{let $=X.useCallback(()=>l?new Set(VC(r)):new Set(i),[l,i,r]),[G,Y]=X.useState($),F=s!==void 0,z=F?new Set(s):G,j=X.useCallback((ve,Ye)=>{let Kt=new Set(z),ze=!Kt.has(ve);ze?Kt.add(ve):Kt.delete(ve),F||Y(Kt),c?.(Array.from(Kt),{expanded:ze,node:Ye});},[z,F,c]),[W,B]=X.useState(new Set(p)),Z=f!==void 0,ue=Z?new Set(f):W,U=X.useCallback((ve,Ye,Kt)=>{let ze=new Set(ue),Rn=!ze.has(ve);m?Rn?ze.add(ve):ze.delete(ve):(ze.clear(),Rn&&ze.add(ve)),Z||B(ze);let Wr=[],zo=Ca=>{for(let _r of Ca)ze.has(_r.key)&&Wr.push(_r),_r.children&&zo(_r.children);};zo(r),g?.(Array.from(ze),{selected:Rn,selectedNodes:Wr,node:Ye,event:Kt});},[ue,m,Z,g,r]),[Ce,Q]=X.useState(new Set(y)),[le,Fe]=X.useState(new Set),pe=v!==void 0,Ct=pe?new Set(Array.isArray(v)?v:v.checked):Ce,bt=pe&&!Array.isArray(v)?new Set(v.halfChecked):le,yn=X.useCallback((ve,Ye,Kt)=>{let ze=new Set(Ct),Rn=new Set(bt),Wr=!ze.has(ve);if(Wr?(ze.add(ve),Rn.delete(ve)):ze.delete(ve),!b&&Ye.children){let fi=AC(Ye);for(let Un of fi)Wr?(ze.add(Un),Rn.delete(Un)):ze.delete(Un);}pe||(Q(ze),Fe(Rn));let zo=[],Ca=fi=>{for(let Un of fi)ze.has(Un.key)&&zo.push(Un),Un.children&&Ca(Un.children);};Ca(r);let _r=b?{checked:Array.from(ze),halfChecked:Array.from(Rn)}:Array.from(ze);x?.(_r,{checked:Wr,checkedNodes:zo,node:Ye,event:Kt,halfCheckedKeys:Array.from(Rn)});},[Ct,bt,b,pe,x,r]),[Ke,on]=X.useState(null),[Tt,_]=X.useState(null),[oe,q]=X.useState(null),De=X.useCallback((ve,Ye)=>{_(ve),q(Ye);},[]),de=X.useCallback((ve,Ye)=>{!Ke||!I||Ye===0&&Lg(Ke,ve.key)||I({event:{},node:ve,dragNode:Ke,dropPosition:Ye,dropToGap:Ye!==0});},[Ke,I]),je=X.useCallback(()=>Array.from(z),[z]),We={expandedKeys:z,toggleExpand:j,selectedKeys:ue,handleSelect:U,selectable:d,multiple:m,checkedKeys:Ct,halfCheckedKeys:bt,handleCheck:yn,checkable:h,checkStrictly:b,draggable:o,draggedNode:Ke,setDraggedNode:on,dragOverKey:Tt,dragOverPosition:oe,setDragOver:De,handleDrop:de,allowDrop:a,onDragStart:N,onDragEnter:S,onDragOver:H,onDragLeave:D,onDragEnd:L,showLine:w,showIcon:C,showHandle:R,dragIcon:T,icon:M,leafIcon:k,folderIcon:P,folderOpenIcon:E,blockNode:V,disabled:O,size:n,data:r,getAllKeys:je},Gn=ve=>{let Ye=ve.relatedTarget,Kt=ve.currentTarget;(!Ye||!Kt.contains(Ye))&&De(null,null);};return jsx(Pg.Provider,{value:We,children:jsx("div",{ref:K,role:"tree","aria-multiselectable":m||h,className:u(Ng({variant:t,size:n,className:e})),onDragLeave:Gn,...A,children:r.map((ve,Ye)=>jsx(Eg,{node:ve,level:0,isLast:Ye===r.length-1},ve.key))})})});Sg.displayName="Tree";var Hg=cva("flex rounded-md border border-input bg-background text-sm placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-11 px-4 text-base"},fullWidth:{true:"w-full",false:"w-fit min-w-48"}},defaultVariants:{size:"md",fullWidth:false}}),$C=({text:e,query:t})=>{if(!t)return jsx(Fragment,{children:e});let n=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),r=e.split(n);return jsx(Fragment,{children:r.map((o,a)=>n.test(o)?jsx("mark",{className:"bg-primary/20 text-foreground rounded-sm",children:o},a):jsx("span",{children:o},a))})},GC=(e,t)=>{let[n,r]=X.useState(e);return X.useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n},Ig=X.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,onSelect:a,options:s=[],loadOptions:i,debounceMs:l=300,minChars:c=0,placeholder:d="Type to search...",emptyText:m="No results found.",loadingText:f="Loading...",clearable:p=false,allowCustomValue:g=true,maxHeight:h=200,highlightMatch:b=true,fullWidth:v=false,disabled:y,...x},w)=>{let[C,R]=X.useState(false),[T,M]=X.useState(r),[k,P]=X.useState([]),[E,N]=X.useState(false),[S,H]=X.useState(false),[D,L]=X.useState(0),I=X.useRef(null),V=X.useRef(null),O=n!==void 0?n:T,A=GC(O,l);X.useEffect(()=>{let U=V.current;if(!U)return;let Ce=()=>{L(U.offsetWidth);};Ce();let Q=new ResizeObserver(Ce);return Q.observe(U),()=>{Q.disconnect();}},[]),X.useImperativeHandle(w,()=>I.current);let K=i?k:s,$=X.useMemo(()=>i?K:K.filter(U=>U.label.toLowerCase().includes(O.toLowerCase())),[K,O,i]);X.useEffect(()=>{if(!i)return;if(A.length<c){P([]);return}let U=false;return (async()=>{N(true);try{let Q=await i(A);U||P(Q);}catch{U||P([]);}finally{U||N(false);}})(),()=>{U=true;}},[A,i,c]);let G=U=>{n===void 0&&M(U),o?.(U);},Y=U=>{let Ce=U.target.value;G(Ce),Ce.length>=c&&R(true);},F=U=>{G(U.label),a?.(U),R(false);},z=()=>{G(""),I.current?.focus();},j=()=>{H(true),R(true);},W=()=>{H(false);},B=U=>{U.key==="Escape"&&R(false),U.key==="ArrowDown"&&!C&&$.length>0&&R(true);},Z=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",ue=p&&O?"pr-8":"pr-3";return jsxs(ot,{open:C,onOpenChange:R,children:[jsxs(an,{ref:V,className:u("relative",v?"w-full":"w-fit"),children:[jsx("input",{ref:I,type:"text",value:O,onChange:Y,onFocus:j,onBlur:W,onKeyDown:B,disabled:y,placeholder:d,className:u(Hg({size:t,fullWidth:v}),ue,e),style:{borderColor:S?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":C,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...x}),p&&O&&!y&&jsx("button",{type:"button",onClick:z,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:jsx(X$1,{className:Z})})]}),jsx(at,{className:"p-0",align:"start",style:{width:D>0?D:void 0},onOpenAutoFocus:U=>U.preventDefault(),children:jsx(Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsx(ke,{style:{maxHeight:h},children:jsx(Command.List,{id:"autocomplete-list",className:"p-1",children:E?jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsx(Loader2,{className:u(Z,"animate-spin")}),f]}):$.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:m}):$.map(U=>jsxs(Command.Item,{value:U.value,disabled:U.disabled,onSelect:()=>F(U),className:u("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:u("mr-2 h-4 w-4 shrink-0",O===U.label?"opacity-100":"opacity-0")}),jsx("span",{className:"flex-1",children:b?jsx($C,{text:U.label,query:O}):U.label})]},U.value))})})})})]})});Ig.displayName="Autocomplete";var ll=X.createContext(null),cl=X.createContext(null),dl=()=>{let e=X.useContext(ll);if(!e)throw new Error("useFormContext must be used within a Form");return e},bs=()=>{let e=X.useContext(cl);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},UC={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:n=>typeof n=="string"&&n.length>=e,message:t??`Must be at least ${e} characters`}),maxLength:(e,t)=>({validate:n=>typeof n=="string"&&n.length<=e,message:t??`Must be at most ${e} characters`}),min:(e,t)=>({validate:n=>typeof n=="number"&&n>=e,message:t??`Must be at least ${e}`}),max:(e,t)=>({validate:n=>typeof n=="number"&&n<=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:n=>typeof n=="string"&&e.test(n),message:t}),custom:(e,t)=>({validate:e,message:t})},Vg=X.forwardRef(({defaultValues:e={},onSubmit:t,onError:n,validateOnBlur:r=true,validateOnChange:o=false,children:a,className:s,...i},l)=>{let[c,d]=X.useState(e),[m,f]=X.useState({}),[p,g]=X.useState({}),[h,b]=X.useState({}),[v,y]=X.useState(false),x=X.useRef(new Map),w=X.useCallback((D,L)=>{x.current.set(D,L);},[]),C=X.useCallback(D=>{x.current.delete(D);},[]),R=X.useCallback(D=>{let L=x.current.get(D)||[],I=c[D];for(let V of L)if(!V.validate(I))return f(O=>({...O,[D]:V.message})),false;return f(V=>({...V,[D]:null})),true},[c]),T=X.useCallback(()=>{let D=true,L={};return x.current.forEach((I,V)=>{let O=c[V];for(let A of I)if(!A.validate(O)){L[V]=A.message,D=false;break}L[V]||(L[V]=null);}),f(L),D},[c]),M=X.useCallback((D,L)=>{d(I=>({...I,[D]:L})),b(I=>({...I,[D]:true})),o&&setTimeout(()=>{R(D);},0);},[o,R]),k=X.useCallback((D,L)=>{f(I=>({...I,[D]:L}));},[]),P=X.useCallback((D,L)=>{g(I=>({...I,[D]:L})),L&&r&&R(D);},[r,R]),E=X.useCallback(D=>({value:c[D],error:m[D]??null,touched:p[D]??false,dirty:h[D]??false}),[c,m,p,h]),N=X.useCallback(()=>{d(e),f({}),g({}),b({});},[e]),S=async D=>{D.preventDefault();let L={};if(x.current.forEach((V,O)=>{L[O]=true;}),g(L),!T()){n?.(m);return}if(t){y(true);try{await t(c);}finally{y(false);}}},H={values:c,errors:m,touched:p,dirty:h,isSubmitting:v,setValue:M,setError:k,setTouched:P,validateField:R,validateAll:T,registerField:w,unregisterField:C,getFieldState:E,reset:N};return jsx(ll.Provider,{value:H,children:jsx("form",{ref:l,onSubmit:S,className:u("space-y-4",s),...i,children:a})})});Vg.displayName="Form";var Ag=({name:e,rules:t=[],defaultValue:n,children:r})=>{let o=dl(),a=X.useId();X.useEffect(()=>(o.registerField(e,t),n!==void 0&&o.values[e]===void 0&&o.setValue(e,n),()=>{o.unregisterField(e);}),[e,t,n,o]);let s=o.getFieldState(e),i={name:e,id:`${a}-${e}`,value:s.value,error:s.error,touched:s.touched,dirty:s.dirty};return jsx(cl.Provider,{value:i,children:r})};Ag.displayName="FormField";var zg=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("space-y-1.5",e),...t}));zg.displayName="FormItem";var Og=X.forwardRef(({className:e,required:t,children:n,...r},o)=>{let{id:a,error:s,touched:i}=bs();return jsxs(Cr,{ref:o,htmlFor:a,className:u(s&&i&&"text-danger",e),...r,children:[n,t&&jsx("span",{className:"ml-1 text-danger",children:"*"})]})});Og.displayName="FormLabel";var Bg=({children:e})=>{let{name:t,id:n,error:r,touched:o}=bs(),a=dl(),s=a.getFieldState(t),i=c=>{let d=c.target,m=d.type==="checkbox"?d.checked:d.value;a.setValue(t,m);},l=()=>{a.setTouched(t,true);};return X.cloneElement(e,{id:n,name:t,value:s.value??"",onChange:i,onBlur:l,"aria-invalid":r&&o?"true":void 0,"aria-describedby":r&&o?`${n}-error`:void 0})};Bg.displayName="FormControl";var Fg=X.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-xs text-muted-foreground",e),...t}));Fg.displayName="FormDescription";var Kg=X.forwardRef(({className:e,message:t,...n},r)=>{let{id:o,error:a,touched:s}=bs(),i=t??(s?a:null);return i?jsx("p",{ref:r,id:`${o}-error`,className:u("text-xs text-danger",e),role:"alert",...n,children:i}):null});Kg.displayName="FormMessage";var Gg=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"}}),Ug=X.forwardRef(({className:e,size:t,name:n,description:r,avatarUrl:o,avatarFallback:a,trailing:s,...i},l)=>{let c=a||n.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2);return jsxs("div",{ref:l,className:u(Gg({size:t,className:e})),...i,children:[jsxs(Tr,{"data-user-avatar":true,children:[o&&jsx(Jr,{src:o,alt:n}),jsx(Mr,{children:c})]}),jsxs("div",{className:"flex flex-col min-w-0",children:[jsx("span",{className:"text-sm font-medium leading-none truncate",children:n}),r&&jsx("span",{className:"text-sm text-muted-foreground truncate",children:r})]}),s&&jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});Ug.displayName="User";var Wg=cva("font-mono",{variants:{variant:{solid:"bg-primary text-primary-foreground",bordered:"border border-current bg-transparent",light:"bg-muted/50 text-foreground",flat:"bg-muted text-foreground",ghost:"bg-transparent text-foreground"},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"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"flat",size:"md",radius:"sm"}}),_g=X.forwardRef(({className:e,variant:t,size:n,radius:r,...o},a)=>jsx("code",{ref:a,className:u(Wg({variant:t,size:n,radius:r,className:e})),...o}));_g.displayName="Code";function Zg(e){let[t,n]=useState(false);return useEffect(()=>{if(e){n(e==="dark");return}let r=()=>{n(document.documentElement.classList.contains("dark"));};r();let o=new MutationObserver(r);return o.observe(document.documentElement,{attributes:true,attributeFilter:["class"]}),()=>o.disconnect()},[e]),t}var Qg=X.forwardRef(({code:e,language:t="bash",showLineNumbers:n=false,className:r,noBorder:o=false,filename:a,theme:s,hideCopyButton:i=false},l)=>{let[c,d]=useState(false),f=Zg(s)?themes.oneDark:themes.oneLight,p=async()=>{await navigator.clipboard.writeText(e),d(true),setTimeout(()=>d(false),2e3);};return jsxs("div",{ref:l,className:u("overflow-hidden",!o&&"rounded-lg border border-border",r),children:[a&&jsx("div",{className:"flex items-center px-4 py-2 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:jsx("span",{className:"text-sm text-muted-foreground font-mono",children:a})}),jsxs("div",{className:"relative",children:[jsx(Highlight,{theme:f,code:e.trim(),language:t,children:({tokens:g,getLineProps:h,getTokenProps:b})=>jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:g.map((v,y)=>jsxs("div",{...h({line:v}),children:[n&&jsx("span",{className:"inline-block w-8 text-zinc-400 dark:text-zinc-600 select-none text-right mr-4",children:y+1}),v.map((x,w)=>jsx("span",{...b({token:x})},w))]},y))})}),!i&&jsx("button",{onClick:p,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:c?jsx(Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsx(Copy,{className:"h-4 w-4"})})]})]})});Qg.displayName="CodeBlock";var Jg=X.forwardRef(({tabs:e,className:t,theme:n},r)=>{let[o,a]=useState(0),[s,i]=useState(false),c=Zg(n)?themes.oneDark:themes.oneLight,d=async()=>{await navigator.clipboard.writeText(e[o].code),i(true),setTimeout(()=>i(false),2e3);},m=e[o],f=m.language||"bash";return jsxs("div",{ref:r,className:u("rounded-lg border border-border overflow-hidden",t),children:[jsx("div",{className:"flex items-center gap-1 px-2 py-1.5 border-b border-border bg-zinc-100 dark:bg-zinc-900",children:e.map((p,g)=>jsxs("button",{type:"button",onClick:()=>a(g),className:u("flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-colors cursor-pointer",o===g?"bg-zinc-200 dark:bg-zinc-800 text-zinc-900 dark:text-white":"text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-200 hover:bg-zinc-200/50 dark:hover:bg-zinc-800/50"),children:[p.icon,p.name]},p.name))}),jsxs("div",{className:"relative",children:[jsx(Highlight,{theme:c,code:m.code.trim(),language:f,children:({tokens:p,getLineProps:g,getTokenProps:h})=>jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:p.map((b,v)=>jsx("div",{...g({line:b}),children:b.map((y,x)=>jsx("span",{...h({token:y})},x))},v))})}),jsx("button",{onClick:d,type:"button",className:"absolute top-3 right-3 p-2 rounded-md transition-colors cursor-pointer bg-zinc-200 dark:bg-zinc-800 hover:bg-zinc-300 dark:hover:bg-zinc-700 text-zinc-600 dark:text-zinc-400 hover:text-zinc-800 dark:hover:text-zinc-200",title:"Copy to clipboard",children:s?jsx(Check,{className:"h-4 w-4 text-zinc-900 dark:text-white"}):jsx(Copy,{className:"h-4 w-4"})})]})]})});Jg.displayName="TabbedCodeBlock";var eb=cva("relative flex items-center gap-2 font-mono rounded-lg border",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",bordered:"bg-transparent border-current",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"}}),tb=X.forwardRef(({className:e,variant:t,size:n,code:r,copyable:o=true,copyLabel:a="Copy",onCopy:s,symbol:i="$",hideSymbol:l=false,...c},d)=>{let[m,f]=X.useState(false),p=async()=>{try{await navigator.clipboard.writeText(r),f(!0),s?.(),setTimeout(()=>f(!1),2e3);}catch(g){console.error("Failed to copy:",g);}};return jsxs("div",{ref:d,className:u(eb({variant:t,size:n,className:e})),...c,children:[!l&&jsx("span",{className:"text-muted-foreground select-none",children:i}),jsx("code",{className:"flex-1 truncate",children:r}),o&&jsx("button",{type:"button",onClick:p,className:u("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":m?"Copied":a,children:m?jsx(Check,{className:"h-4 w-4 text-green-500"}):jsx(Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});tb.displayName="Snippet";var fl=cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"md"}}),nb=X.forwardRef(({className:e,radius:t,src:n,alt:r,fallback:o,showSkeleton:a=true,onLoad:s,onError:i,fit:l="cover",aspectRatio:c,style:d,...m},f)=>{let[p,g]=X.useState("loading");X.useEffect(()=>{n&&g("loading");},[n]);let h=()=>{g("loaded"),s?.();},b=()=>{g("error"),i?.();},v={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}[l];return p==="error"&&o?jsx("div",{className:u(fl({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:c,...d},children:o}):jsxs("div",{className:u(fl({radius:t}),"relative",e),style:{aspectRatio:c,...d},children:[p==="loading"&&a&&jsx(Ha,{className:"absolute inset-0 h-full w-full"}),jsx("img",{ref:f,src:n,alt:r,onLoad:h,onError:b,className:u("h-full w-full transition-opacity duration-300",v,p==="loading"?"opacity-0":"opacity-100"),...m})]})});nb.displayName="Image";var ab=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"}}),sb=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"}}),ib=X.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),lb=X.forwardRef(({className:e,size:t="md",value:n,defaultValue:r="",onValueChange:o,multiple:a=false,children:s,...i},l)=>{let[c,d]=X.useState(r),m=n??c,f=p=>{let g;if(a){let h=Array.isArray(m)?m:[m].filter(Boolean);h.includes(p)?g=h.filter(b=>b!==p):g=[...h,p];}else g=p;o?o(g):d(g);};return jsx(ib.Provider,{value:{value:m,onValueChange:f,multiple:a,size:t??"md"},children:jsx("div",{ref:l,role:"listbox","aria-multiselectable":a,className:u(ab({size:t,className:e})),...i,children:s})})});lb.displayName="Listbox";var cb=X.forwardRef(({className:e,value:t,disabled:n,icon:r,description:o,children:a,...s},i)=>{let{value:l,onValueChange:c,multiple:d,size:m}=X.useContext(ib),f=d?Array.isArray(l)&&l.includes(t):l===t,p=()=>{n||c(t);},g=h=>{(h.key==="Enter"||h.key===" ")&&!n&&(h.preventDefault(),c(t));};return jsxs("div",{ref:i,role:"option","aria-selected":f,"data-disabled":n?"":void 0,tabIndex:n?-1:0,className:u(sb({size:m}),f&&"bg-accent text-accent-foreground",e),onClick:p,onKeyDown:g,...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:a}),o&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:o})]}),f&&jsx(Check,{className:"ml-2 h-4 w-4 flex-shrink-0"})]})});cb.displayName="ListboxItem";var ub=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"}}),mb=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 oT({className:e,variant:t,size:n,items:r,onReorder:o,renderItem:a,showHandle:s=true,disabled:i=false,...l},c){let[d,m]=X.useState(null),[f,p]=X.useState(null),g=(x,w)=>{i||(m(w),x.dataTransfer.effectAllowed="move",x.dataTransfer.setData("text/plain",String(w)));},h=(x,w)=>{x.preventDefault(),!(i||d===null||d===w)&&p(w);},b=()=>{p(null);},v=(x,w)=>{if(x.preventDefault(),i||d===null||d===w){m(null),p(null);return}let C=[...r],[R]=C.splice(d,1);C.splice(w,0,R),o?.(C),m(null),p(null);},y=()=>{m(null),p(null);};return jsx("div",{ref:c,className:u(ub({variant:t,size:n,className:e})),...l,children:r.map((x,w)=>jsxs("div",{draggable:!i,onDragStart:C=>g(C,w),onDragOver:C=>h(C,w),onDragLeave:b,onDrop:C=>v(C,w),onDragEnd:y,className:u(mb({variant:t,size:n,isDragging:d===w,isDragOver:f===w}),!i&&"cursor-move"),children:[s&&jsx("div",{className:u("flex-shrink-0 text-muted-foreground",i?"opacity-30":"cursor-grab active:cursor-grabbing"),children:jsx(GripVertical,{className:"h-5 w-5"})}),jsx("div",{className:"flex-1 min-w-0",children:a(x,w)})]},x.id))})}var aT=X.forwardRef(oT);var gb=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}}),cT={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},bb=X.forwardRef(({className:e,variant:t,loading:n=true,size:r="md",spinner:o,text:a,children:s,...i},l)=>jsxs("div",{ref:l,className:u("relative",e),...i,children:[s,jsx("div",{className:u(gb({variant:t,visible:n})),"aria-hidden":!n,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[o||jsx(Loader2,{className:u(cT[r],"animate-spin text-primary")}),a&&jsx("span",{className:"text-sm text-muted-foreground",children:a})]})})]}));bb.displayName="LoadingOverlay";var vb=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"}}),hb=X.forwardRef(({className:e,color:t,isLoading:n=false,progress:r,showSpinner:o=false,...a},s)=>{let[i,l]=X.useState(0),[c,d]=X.useState(false),m=X.useRef(null);return X.useEffect(()=>{if(r!==void 0){l(r),d(r>0&&r<100);return}return n?(d(true),l(10),m.current=setInterval(()=>{l(f=>{if(f>=90)return f;let p=Math.random()*10;return Math.min(f+p,90)});},500)):i>0&&(l(100),setTimeout(()=>{d(false),l(0);},200)),()=>{m.current&&clearInterval(m.current);}},[n,r]),!c&&r===void 0||r!==void 0&&(r<=0||r>=100)?null:jsxs(Fragment,{children:[jsx("div",{ref:s,className:u(vb({color:t,className:e})),style:{width:`${i}%`},role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,...a,children:jsx("div",{className:"absolute right-0 h-full w-24 -translate-y-1 rotate-3 bg-inherit opacity-50 blur-sm"})}),o&&c&&jsx("div",{className:"fixed top-4 right-4 z-[9999]",children:jsx("div",{className:u("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")})})]})});hb.displayName="NProgress";var wb=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}}),xb={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},gT={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},Cb=X.forwardRef(({className:e,variant:t="spinner",size:n="md",fullScreen:r,text:o,color:a="primary",...s},i)=>{let l={primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"}[a],c=()=>{switch(t){case "dots":return jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(d=>jsx("div",{className:u(gT[n||"md"],"animate-bounce rounded-full bg-current",l),style:{animationDelay:`${d*.15}s`}},d))});case "pulse":return jsx("div",{className:u(xb[n||"md"],"animate-pulse rounded-full bg-current",l)});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:u(xb[n||"md"],"animate-spin",l)})}};return jsx("div",{ref:i,className:u(wb({variant:t,size:n,fullScreen:r,className:e})),role:"status","aria-label":o||"Loading",...s,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[c(),o&&jsx("span",{className:u("text-sm",l),children:o})]})})});Cb.displayName="Loading";var vT=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),hT=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-11 py-2.5 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"},showPickerIcon:{true:"",false:""}},compoundVariants:[{size:"sm",showPickerIcon:true,className:"pl-3 pr-8"},{size:"sm",showPickerIcon:false,className:"px-3"},{size:"md",showPickerIcon:true,className:"pl-3 pr-10"},{size:"md",showPickerIcon:false,className:"px-3"},{size:"lg",showPickerIcon:true,className:"pl-4 pr-12"},{size:"lg",showPickerIcon:false,className:"px-4"}],defaultVariants:{size:"md",isInvalid:false,fullWidth:false,showPickerIcon:true}}),xT=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"}}),yT=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"}}),Ms={"dd/MM/yyyy":"/","MM/dd/yyyy":"/","yyyy-MM-dd":"-","dd.MM.yyyy":"."},vl={"dd/MM/yyyy":["day","month","year"],"MM/dd/yyyy":["month","day","year"],"yyyy-MM-dd":["year","month","day"],"dd.MM.yyyy":["day","month","year"]},bl=(e,t)=>String(e).padStart(t,"0"),Tb=(e,t)=>{if(!e)return "";let n=bl(e.getDate(),2),r=bl(e.getMonth()+1,2),o=bl(e.getFullYear(),4),a=Ms[t],s=vl[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},ws=(e,t)=>{let n=Ms[t],r=e.split(n);if(r.length!==3)return null;let o=vl[t],a={};if(o.forEach((i,l)=>{a[i]=parseInt(r[l],10);}),isNaN(a.day)||isNaN(a.month)||isNaN(a.year)||a.month<1||a.month>12||a.day<1||a.day>31||a.year<1e3||a.year>9999)return null;let s=new Date(a.year,a.month-1,a.day);return s.getFullYear()!==a.year||s.getMonth()!==a.month-1||s.getDate()!==a.day?null:s},RT=e=>{let t=Ms[e];return vl[e].map(r=>r==="year"?"####":"##").join(t)},na=(e,t)=>{if(!e?.from)return "";let n=Tb(e.from,t),r=e.to?Tb(e.to,t):"";return n&&r?`${n} - ${r}`:n},Mb=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:b="dd.MM.yyyy",showPickerIcon:v=true,mode:y="text",fullWidth:x=false,numberOfMonths:w=2,align:C="start",disabled:R,placeholder:T,id:M,...k},P)=>{let E=X.useId(),N=M||E,S=`${N}-description`,H=`${N}-error`,[D,L]=X.useState(f),[I,V]=X.useState(""),[O,A]=X.useState(false),[K,$]=X.useState(false),G=m!==void 0?m:D,Y=a&&r,F=RT(b),z=Ms[b],j=" - ";X.useEffect(()=>{K||V(na(G,b));},[G,b,K]);let W=le=>{m===void 0&&L(le),p?.(le);},B=le=>{W(le),V(na(le,b)),le?.from&&le?.to&&A(false);},Z=le=>{let Fe=le.target.value;Fe=Fe.replace(new RegExp(`[^0-9\\${z}\\s-]`,"g"),"");let pe=`${F}${j}${F}`,Ct=Fe.replace(new RegExp(`[\\${z}\\s-]`,"g"),""),bt="",yn=0;for(let Ke=0;Ke<pe.length&&yn<Ct.length;Ke++)pe[Ke]==="#"?(bt+=Ct[yn],yn++):bt+=pe[Ke];if(V(bt),bt.length===pe.length){let Ke=bt.split(j);if(Ke.length===2){let on=ws(Ke[0].trim(),b),Tt=ws(Ke[1].trim(),b);if(on&&Tt){if(g&&(on<g||Tt<g)||h&&(on>h||Tt>h))return;on<=Tt&&W({from:on,to:Tt});}}}},ue=()=>{$(true);},U=()=>{$(false);let le=`${F}${j}${F}`;if(I.length!==le.length)V(na(G,b));else {let Fe=I.split(j);if(Fe.length!==2)V(na(G,b));else {let pe=ws(Fe[0].trim(),b),Ct=ws(Fe[1].trim(),b);(!pe||!Ct||pe>Ct)&&V(na(G,b));}}},Ce=()=>{R||A(true);},Q=()=>{!R&&y==="picker"&&v&&A(true);};return jsxs("div",{className:u(vT({size:s}),e),children:[t&&jsxs("label",{htmlFor:N,className:u(yT({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs(ot,{open:v&&O,onOpenChange:A,children:[jsxs(an,{className:u("relative",x?"w-full":"w-fit"),children:[jsx("input",{ref:P,id:N,type:"text",inputMode:y==="text"?"numeric":void 0,value:I,onChange:y==="text"?Z:void 0,onClick:Q,onFocus:ue,onBlur:U,readOnly:y==="picker","aria-invalid":a,"aria-describedby":Y?H:n?S:void 0,"aria-required":o,disabled:R,placeholder:T||`${b.toLowerCase()} - ${b.toLowerCase()}`,className:u(hT({size:s,isInvalid:a,fullWidth:x,showPickerIcon:v}),y==="picker"&&v&&"cursor-pointer",l),style:{borderColor:K||v&&O?"var(--color-foreground)":void 0},...k}),v&&jsx("button",{type:"button",onClick:Ce,disabled:R,className:"absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",tabIndex:-1,"aria-label":"Open calendar",children:jsx(Calendar,{className:u(xT({size:s}))})})]}),v&&jsx(at,{className:"w-auto p-0",align:C,children:jsx(to,{mode:"range",selected:G,onSelect:B,numberOfMonths:w,disabled:le=>!!(g&&le<g||h&&le>h),defaultMonth:G?.from,showMonthAndYearPickers:true})})]}),n&&!Y&&jsx("p",{id:S,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),Y&&jsx("p",{id:H,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Mb.displayName="DateRangePicker";var uo=e=>String(e).padStart(2,"0"),Nb=X.forwardRef(({value:e,onValueChange:t,placeholder:n="Pick a time",use24Hour:r=true,minuteStep:o=1,disabled:a=false,className:s},i)=>{let[l,c]=X.useState(false),d=r?Array.from({length:24},(x,w)=>w):Array.from({length:12},(x,w)=>w+1),m=Array.from({length:Math.floor(60/o)},(x,w)=>w*o),f=x=>{if(!x)return n;if(r)return `${uo(x.hours)}:${uo(x.minutes)}`;let w=x.hours%12||12,C=x.hours>=12?"PM":"AM";return `${uo(w)}:${uo(x.minutes)} ${C}`},p=x=>{let w=e?.minutes??0,C=x;if(!r&&e){let R=e.hours>=12;R&&x!==12?C=x+12:!R&&x===12&&(C=0);}t?.({hours:C,minutes:w});},g=x=>{let w=e?.hours??0;t?.({hours:w,minutes:x});},h=x=>{if(!e)return;let w=e.hours;x==="AM"&&e.hours>=12?w=e.hours-12:x==="PM"&&e.hours<12&&(w=e.hours+12),t?.({hours:w,minutes:e.minutes});},b=()=>{let x=new Date;t?.({hours:x.getHours(),minutes:x.getMinutes()});},v=e?e.hours>=12?"PM":"AM":void 0,y=e?r?e.hours:e.hours%12||12:void 0;return jsxs(ot,{open:l,onOpenChange:c,children:[jsxs(qn,{ref:i,disabled:a,className:u("inline-flex items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-normal hover:bg-accent hover:text-accent-foreground w-full text-left",!e&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",s),children:[jsx(Clock,{className:"h-4 w-4"}),f(e)]}),jsxs(at,{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(ke,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:d.map(x=>jsx(ae,{variant:y===x?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(x),children:uo(x)},x))})})]}),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(ke,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:m.map(x=>jsx(ae,{variant:e?.minutes===x?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>g(x),children:uo(x)},x))})})]}),!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(ae,{variant:v==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("AM"),children:"AM"}),jsx(ae,{variant:v==="PM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("PM"),children:"PM"})]})]})]}),jsxs("div",{className:"flex justify-between border-t p-2",children:[jsx(ae,{variant:"ghost",size:"sm",onClick:b,children:"Now"}),jsx(ae,{size:"sm",onClick:()=>c(false),children:"Done"})]})]})]})});Nb.displayName="TimePicker";var kb=cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function TT({className:e,variant:t,items:n,itemHeight:r,height:o,overscan:a=3,renderItem:s,getItemKey:i,gap:l=0,onScrollChange:c,...d},m){let f=X.useRef(null),[p,g]=X.useState(0);X.useImperativeHandle(m,()=>f.current);let h=n.length*(r+l)-l,b=r+l,v=Math.max(0,Math.floor(p/b)-a),y=Math.ceil(o/b)+2*a,x=Math.min(n.length-1,v+y),w=R=>{let T=R.currentTarget.scrollTop;g(T),c?.(T);},C=X.useMemo(()=>{let R=[];for(let T=v;T<=x;T++)n[T]!==void 0&&R.push({item:n[T],index:T,style:{position:"absolute",top:T*b,left:0,right:0,height:r}});return R},[n,v,x,b,r]);return jsx("div",{ref:f,className:u(kb({variant:t,className:e})),style:{height:o,position:"relative"},onScroll:w,...d,children:jsx("div",{style:{height:h,position:"relative"},children:C.map(({item:R,index:T,style:M})=>jsx("div",{style:M,children:s(R,T)},i?i(R,T):T))})})}var MT=X.forwardRef(TT);var xl=cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),yl=cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),Eb=X.forwardRef(({className:e,variant:t,size:n,children:r,onLoadMore:o,hasMore:a,isLoading:s=false,loader:i,threshold:l=100,rootMargin:c,useWindow:d=false,endMessage:m,scrollbarVisibility:f="visible",...p},g)=>{let h=X.useRef(null),b=X.useRef(null),v=X.useRef(false);X.useImperativeHandle(g,()=>h.current),X.useEffect(()=>{let w=b.current;if(!w)return;let C=new IntersectionObserver(R=>{let[T]=R;T.isIntersecting&&a&&!s&&!v.current&&(v.current=true,Promise.resolve(o()).finally(()=>{v.current=false;}));},{root:d?null:h.current,rootMargin:c||`${l}px`,threshold:0});return C.observe(w),()=>{C.disconnect();}},[a,s,o,l,c,d]);let y=jsx("div",{className:u(yl({size:n})),children:jsx(Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})}),x=jsxs(Fragment,{children:[r,jsx("div",{ref:b,className:"h-px w-full"}),s&&(i||y),!a&&!s&&m&&jsx("div",{className:u(yl({size:n}),"text-muted-foreground text-sm"),children:m})]});return d?jsx("div",{ref:h,className:u(xl({variant:t,className:e})),...p,children:x}):jsx(ke,{ref:h,visibility:f,className:u(xl({variant:t,className:e})),...p,children:x})});Eb.displayName="InfiniteScroll";var OT=e=>e.map(t=>typeof t=="string"?{src:t}:t),Rl=X.forwardRef(({images:e,open:t,onOpenChange:n,initialIndex:r=0,onIndexChange:o,trigger:a,showThumbnails:s=true,showZoom:i=true,showRotate:l=true,showDownload:c=true,showFullscreen:d=true,showNavigation:m=true,showCounter:f=true,closeOnBackdropClick:p=true,className:g},h)=>{let b=X.useMemo(()=>OT(e),[e]),[v,y]=X.useState(r),[x,w]=X.useState(1),[C,R]=X.useState(0),[T,M]=X.useState(false),[k,P]=X.useState(false),[E,N]=X.useState({x:0,y:0}),[S,H]=X.useState({x:0,y:0}),[D,L]=X.useState(false),I=X.useRef(null),V=b[v];X.useEffect(()=>{L(true);},[]),X.useEffect(()=>{y(r);},[r]),X.useEffect(()=>{o?.(v);},[v,o]),X.useEffect(()=>{w(1),R(0),N({x:0,y:0});},[v]),X.useEffect(()=>{if(t)return Gt(),()=>Ut()},[t]);let O=X.useCallback(()=>{y(Q=>Q>0?Q-1:b.length-1);},[b.length]),A=X.useCallback(()=>{y(Q=>Q<b.length-1?Q+1:0);},[b.length]),K=()=>{w(Q=>Math.min(Q+.5,4));},$=()=>{w(Q=>{let le=Math.max(Q-.5,.5);return le===1&&N({x:0,y:0}),le});},G=()=>{R(Q=>(Q+90)%360);},Y=async()=>{if(V)try{let le=await(await fetch(V.src)).blob(),Fe=URL.createObjectURL(le),pe=document.createElement("a");pe.href=Fe,pe.download=V.alt||`image-${v+1}`,document.body.appendChild(pe),pe.click(),document.body.removeChild(pe),URL.revokeObjectURL(Fe);}catch{window.open(V.src,"_blank");}},F=async()=>{if(I.current)if(T)try{await document.exitFullscreen(),M(!1);}catch{}else try{await I.current.requestFullscreen(),M(!0);}catch{}},z=Q=>{x>1&&(P(true),H({x:Q.clientX-E.x,y:Q.clientY-E.y}));},j=Q=>{k&&x>1&&N({x:Q.clientX-S.x,y:Q.clientY-S.y});},W=()=>{P(false);},B=()=>{n?.(false);},Z=Q=>{p&&Q.target===Q.currentTarget&&B();},ue=X.useCallback(Q=>{switch(Q.key){case "ArrowLeft":O();break;case "ArrowRight":A();break;case "Escape":n?.(false);break;case "+":case "=":K();break;case "-":$();break}},[O,A,n]);if(X.useEffect(()=>{if(t)return window.addEventListener("keydown",ue),()=>window.removeEventListener("keydown",ue)},[t,ue]),X.useEffect(()=>{let Q=()=>{M(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",Q),()=>document.removeEventListener("fullscreenchange",Q)},[]),b.length===0)return null;let U=a?X.isValidElement(a)?X.cloneElement(a,{onClick:Q=>{a.props.onClick?.(Q),n?.(true);}}):jsx("button",{type:"button",onClick:()=>n?.(true),children:a}):null;return jsxs(Fragment,{children:[U,!D||!t?null:Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{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","data-state":t?"open":"closed",onClick:Z}),jsxs("div",{ref:h,className:u("fixed inset-0 z-50 flex flex-col outline-none",g),children:[jsxs("div",{className:"flex items-center justify-between p-4 text-white",children:[jsxs("div",{className:"flex items-center gap-2",children:[f&&b.length>1&&jsxs("span",{className:"text-sm",children:[v+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:[i&&jsxs(Fragment,{children:[jsx("button",{onClick:$,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(x*100),"%"]}),jsx("button",{onClick:K,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom in",children:jsx(ZoomIn,{className:"h-5 w-5"})})]}),l&&jsx("button",{onClick:G,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Rotate",children:jsx(RotateCw,{className:"h-5 w-5"})}),c&&jsx("button",{onClick:Y,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Download",children:jsx(Download,{className:"h-5 w-5"})}),d&&jsx("button",{onClick:F,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:T?"Exit fullscreen":"Fullscreen",children:T?jsx(Minimize2,{className:"h-5 w-5"}):jsx(Maximize2,{className:"h-5 w-5"})}),jsxs("button",{onClick:B,className:"rounded-full p-2 hover:bg-white/10 transition-colors ml-2",children:[jsx(X$1,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}),jsxs("div",{ref:I,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:z,onMouseMove:j,onMouseUp:W,onMouseLeave:W,children:[m&&b.length>1&&jsxs(Fragment,{children:[jsx("button",{onClick:O,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:u("max-h-full max-w-full object-contain transition-transform duration-200",k?"cursor-grabbing":x>1?"cursor-grab":""),style:{transform:`translate(${E.x}px, ${E.y}px) scale(${x}) rotate(${C}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((Q,le)=>jsx("button",{onClick:()=>y(le),className:u("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",v===le?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsx("img",{src:Q.src,alt:Q.alt||`Thumbnail ${le+1}`,className:"h-full w-full object-cover"})},le))})]})]}),document.body)]})});Rl.displayName="ImageViewer";var Sb=({children:e,images:t,index:n=0,className:r})=>{let[o,a]=X.useState(false);return jsxs(Fragment,{children:[jsx("button",{onClick:()=>a(true),className:u("cursor-zoom-in",r),children:e}),jsx(Rl,{images:t,open:o,onOpenChange:a,initialIndex:n})]})};Sb.displayName="ImageViewerTrigger";var Db=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",bordered:"rounded border border-current 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"}}),FT={cmd:"\u2318",command:"\u2318",meta:"\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"},KT={cmd:"meta",command:"meta",ctrl:"control",alt:"alt",option:"alt",shift:"shift",enter:"enter",return:"enter",backspace:"backspace",delete:"delete",escape:"escape",esc:"escape",tab:"tab",space:" ",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",pageup:"pageup",pagedown:"pagedown",home:"home",end:"end"},$T=e=>{let t=e.toLowerCase();return FT[t]||e.toUpperCase()},oa=e=>{let t=e.toLowerCase();return KT[t]||t},ks=e=>{let t=oa(e);return ["meta","control","alt","shift"].includes(t)},Hb=X.forwardRef(({className:e,variant:t,size:n,keys:r,children:o,onPress:a,disabled:s,preventDefault:i=true,...l},c)=>{X.useEffect(()=>{if(!a||!r||s)return;let m=Array.isArray(r)?r:[r],f=m.filter(ks).map(oa),p=m.filter(h=>!ks(h)).map(oa),g=h=>{let b=f.includes("meta")===h.metaKey,v=f.includes("control")===h.ctrlKey,y=f.includes("alt")===h.altKey,x=f.includes("shift")===h.shiftKey,w=p.length===0||p.includes(h.key.toLowerCase());b&&v&&y&&x&&w&&(i&&h.preventDefault(),a(h));};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[r,a,s,i]);let d=()=>r?(Array.isArray(r)?r:[r]).map((f,p)=>jsxs(X.Fragment,{children:[p>0&&jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsx("span",{children:$T(f)})]},p)):o;return jsx("kbd",{ref:c,className:u(Db({variant:t,size:n}),s&&"opacity-50",e),...l,children:d()})});Hb.displayName="Kbd";function GT(e,t,n={}){let{disabled:r=false,preventDefault:o=true}=n;X.useEffect(()=>{if(r)return;let a=Array.isArray(e)?e:[e],s=a.filter(ks).map(oa),i=a.filter(c=>!ks(c)).map(oa),l=c=>{let d=s.includes("meta")===c.metaKey,m=s.includes("control")===c.ctrlKey,f=s.includes("alt")===c.altKey,p=s.includes("shift")===c.shiftKey,g=i.length===0||i.includes(c.key.toLowerCase());d&&m&&f&&p&&g&&(o&&c.preventDefault(),t(c));};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,t,r,o]);}var Ib=cva("inline-flex items-center justify-center rounded-full cursor-pointer transition-colors hover:bg-muted/50 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-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),Vb=X.forwardRef(({className:e,size:t,value:n,successDuration:r=2e3,onCopySuccess:o,onCopyError:a,copyIcon:s,successIcon:i,...l},c)=>{let[d,m]=X.useState(false),p={sm:14,md:16,lg:20}[t??"md"],g=async()=>{try{await navigator.clipboard.writeText(n),m(!0),o?.(),setTimeout(()=>{m(!1);},r);}catch(h){a?.(h);}};return jsx("button",{ref:c,type:"button",className:u(Ib({size:t}),e),onClick:g,"aria-label":d?"Copied":"Copy to clipboard",...l,children:d?i??jsx(Check,{className:"text-success",style:{width:p,height:p}}):s??jsx(Copy,{style:{width:p,height:p}})})});Vb.displayName="CopyButton";var zb=cva("flex flex-col bg-background",{variants:{variant:{default:"border",bordered:"border border-zinc-300 dark:border-zinc-700",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"default",size:"md",radius:"md"}}),ZT=[{value:"month",label:"Month"},{value:"week",label:"Week"},{value:"day",label:"Day"}],QT=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],JT=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function eM(e,t,n){let r=new Date(e,t,1),o=new Date(e,t+1,0),a=[],s=r.getDay()-n;s<0&&(s+=7);for(let l=s-1;l>=0;l--)a.push(new Date(e,t,-l));for(let l=1;l<=o.getDate();l++)a.push(new Date(e,t,l));let i=42-a.length;for(let l=1;l<=i;l++)a.push(new Date(e,t+1,l));return a}function tM(e,t){let n=[],o=e.getDay()-t;o<0&&(o+=7);let a=new Date(e);a.setDate(e.getDate()-o);for(let s=0;s<7;s++){let i=new Date(a);i.setDate(a.getDate()+s),n.push(i);}return n}function fo(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function po(e){return fo(e,new Date)}function Ab(e,t){return e.filter(n=>{let r=new Date(n.start),o=new Date(n.end);return fo(r,t)||fo(o,t)||r<t&&o>t})}var Ob=X.forwardRef(({className:e,variant:t,size:n,radius:r,events:o=[],view:a="month",onViewChange:s,viewOptions:i=ZT,date:l,onDateChange:c,onEventClick:d,onSlotClick:m,weekStartsOn:f=0,locale:p="en-US",...g},h)=>{let[b,v]=X.useState(new Date),y=l??b,x=N=>{c?c(N):v(N);},w=f===1?JT:QT,C=()=>{let N=new Date(y);a==="month"?N.setMonth(N.getMonth()-1):a==="week"?N.setDate(N.getDate()-7):N.setDate(N.getDate()-1),x(N);},R=()=>{let N=new Date(y);a==="month"?N.setMonth(N.getMonth()+1):a==="week"?N.setDate(N.getDate()+7):N.setDate(N.getDate()+1),x(N);},T=()=>{x(new Date);},M=()=>a==="day"?y.toLocaleDateString(p,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):y.toLocaleDateString(p,{year:"numeric",month:"long"}),k=()=>{let N=eM(y.getFullYear(),y.getMonth(),f);return jsxs("div",{className:"flex-1 flex flex-col",children:[jsx("div",{className:"grid grid-cols-7 border-b",children:w.map(S=>jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:S},S))}),jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:N.map((S,H)=>{let D=Ab(o,S),L=S.getMonth()===y.getMonth(),I=fo(S,y);return jsxs("div",{className:u("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!L&&"bg-muted/30",I&&"bg-accent"),onClick:()=>m?.(S),children:[jsx("div",{className:u("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",po(S)&&"bg-primary text-primary-foreground",!L&&"text-muted-foreground"),children:S.getDate()}),jsxs("div",{className:"space-y-0.5",children:[D.slice(0,3).map(V=>jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:V.color||"hsl(var(--primary))",color:"white"},onClick:O=>{O.stopPropagation(),d?.(V);},children:V.title},V.id)),D.length>3&&jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",D.length-3," more"]})]})]},H)})})]})},P=()=>{let N=tM(y,f),S=Array.from({length:24},(H,D)=>D);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"}),N.map((H,D)=>{let L=fo(H,y);return jsxs("div",{className:u("p-2 text-center border-l cursor-pointer hover:bg-accent/50",po(H)&&"bg-primary/10",L&&!po(H)&&"bg-accent"),onClick:()=>m?.(H),children:[jsx("div",{className:"text-xs text-muted-foreground",children:w[D]}),jsx("div",{className:u("text-lg font-semibold",po(H)&&"text-primary",L&&!po(H)&&"text-primary"),children:H.getDate()})]},D)})]}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:S.map(H=>jsxs(X.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[H.toString().padStart(2,"0"),":00"]}),N.map((D,L)=>{let I=new Date(D);I.setHours(H,0,0,0);let V=o.filter(O=>{let A=new Date(O.start);return fo(A,D)&&A.getHours()===H});return jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(I),children:V.map(O=>jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:O.color||"hsl(var(--primary))",color:"white"},onClick:A=>{A.stopPropagation(),d?.(O);},children:O.title},O.id))},L)})]},H))})})]})},E=()=>{let N=Array.from({length:24},(H,D)=>D),S=Ab(o,y);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:u("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",po(y)&&"bg-primary text-primary-foreground"),children:y.getDate()})}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_1fr]",children:N.map(H=>{let D=new Date(y);D.setHours(H,0,0,0);let L=S.filter(I=>new Date(I.start).getHours()===H);return jsxs(X.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[H.toString().padStart(2,"0"),":00"]}),jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>m?.(D),children:L.map(I=>jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:I.color||"hsl(var(--primary))",color:"white"},onClick:V=>{V.stopPropagation(),d?.(I);},children:I.title},I.id))})]},H)})})})]})};return jsxs("div",{ref:h,className:u(zb({variant:t,size:n,radius:r,className:e})),...g,children:[jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsx("h2",{className:"text-lg font-semibold",children:M()}),jsxs("div",{className:"flex items-center gap-2",children:[jsx(ae,{variant:"bordered",size:"sm",radius:"md",onClick:T,children:"Today"}),jsx(Aa,{options:i,value:a,onValueChange:N=>s?.(N),size:"sm",radius:"md",className:"w-[120px]"}),jsx(ae,{variant:"light",size:"sm",radius:"md",isIconOnly:true,onClick:C,children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"light",size:"sm",radius:"md",isIconOnly:true,onClick:R,children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]}),a==="month"&&k(),a==="week"&&P(),a==="day"&&E()]})});Ob.displayName="FullCalendar";var Ds=({active:e,payload:t,label:n})=>!e||!t||!t.length?null:jsxs("div",{className:"border bg-card text-card-foreground shadow-sm rounded-lg p-3 min-w-[120px]",children:[n&&jsx("p",{className:"text-sm font-medium mb-2 text-card-foreground",children:n}),jsx("div",{className:"space-y-1",children:t.map((r,o)=>jsxs("div",{className:"flex items-center justify-between gap-4",children:[jsx("span",{className:"text-sm",style:{color:r.color},children:r.name}),jsx("span",{className:"text-sm font-medium text-card-foreground",children:typeof r.value=="number"?r.value.toLocaleString():r.value})]},o))})]}),sa=cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),ia=["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%))"],Bb=X.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=ia,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",curveType:c="monotone",...d},m)=>jsx("div",{ref:m,className:u(sa({size:t,className:e})),...d,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(LineChart,{data:n,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ds,{})}),s&&jsx(Legend,{}),r.map((f,p)=>jsx(Line,{type:c,dataKey:f,stroke:o[p%o.length],strokeWidth:2,dot:{fill:o[p%o.length],strokeWidth:0},activeDot:{r:6}},f))]})})}));Bb.displayName="LineChart";var Fb=X.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=ia,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,layout:d="horizontal",...m},f)=>jsx("div",{ref:f,className:u(sa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(BarChart,{data:n,layout:d,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:d==="horizontal"?l:void 0,type:d==="horizontal"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{dataKey:d==="vertical"?l:void 0,type:d==="vertical"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ds,{})}),s&&jsx(Legend,{}),r.map((p,g)=>jsx(Bar,{dataKey:p,fill:o[g%o.length],stackId:c?"stack":void 0,radius:[4,4,0,0]},p))]})})}));Fb.displayName="BarChart";var Kb=X.forwardRef(({className:e,size:t,data:n,dataKey:r="value",nameKey:o="name",colors:a=ia,innerRadius:s=0,outerRadius:i=80,showLegend:l=true,showTooltip:c=true,showLabels:d=false,...m},f)=>jsx("div",{ref:f,className:u(sa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(PieChart,{children:[c&&jsx(Tooltip,{content:jsx(Ds,{})}),l&&jsx(Legend,{}),jsx(Pie,{data:n,dataKey:r,nameKey:o,cx:"50%",cy:"50%",innerRadius:s,outerRadius:i,label:d,labelLine:d,children:n.map((p,g)=>jsx(Cell,{fill:a[g%a.length]},`cell-${g}`))})]})})}));Kb.displayName="PieChart";var $b=X.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=ia,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,curveType:d="monotone",...m},f)=>jsx("div",{ref:f,className:u(sa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(AreaChart,{data:n,children:[a&&jsx(CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsx(XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsx(YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&jsx(Tooltip,{content:jsx(Ds,{})}),s&&jsx(Legend,{}),r.map((p,g)=>jsx(Area,{type:d,dataKey:p,stroke:o[g%o.length],fill:o[g%o.length],fillOpacity:.3,stackId:c?"stack":void 0},p))]})})}));$b.displayName="AreaChart";var kl={none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"};function TM({card:e,columnId:t,radius:n,renderCard:r,onCardClick:o}){let{attributes:a,listeners:s,setNodeRef:i,transform:l,transition:c,isDragging:d}=useSortable({id:e.id,data:{columnId:t}}),m={transform:CSS.Transform.toString(l),transition:c};return jsx("div",{ref:i,style:m,className:u("p-3 cursor-grab active:cursor-grabbing transition-all bg-background border shadow-sm hover:shadow-md",d&&"opacity-50 scale-[1.02] shadow-lg",kl[n]),onClick:()=>o?.(e,t),...a,...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 Ub({column:e,radius:t,renderCard:n,onCardClick:r,onAddCard:o,showAddCard:a,addCardLabel:s,columnHeight:i}){return jsxs("div",{className:u("flex flex-col min-w-[280px] w-[280px]",kl[t]),style:{backgroundColor:e.backgroundColor||"transparent"},children:[jsx("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})]})}),jsx(ke,{style:{height:i},className:"flex-1",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(TM,{card:l,columnId:e.id,radius:t,renderCard:n,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"})]})}),a&&jsx("div",{className:"p-2 border-t",children:jsxs(ae,{variant:"light",size:"sm",className:"w-full justify-start",onClick:l=>{l.stopPropagation(),l.preventDefault(),o?.(e.id);},children:[jsx(Plus,{className:"h-4 w-4 mr-2"}),s]})})]})}var Wb=X.forwardRef(({className:e,columns:t,onCardMove:n,onCardClick:r,onAddCard:o,renderCard:a,showAddCard:s=true,addCardLabel:i="Add card",columnHeight:l=500,radius:c="md",...d},m)=>{let[f,p]=X.useState(false),[g,h]=X.useState(null),[b,v]=X.useState(null);X.useEffect(()=>{p(true);},[]);let y=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates}));if(!f)return jsx("div",{ref:m,className:u("flex gap-4 overflow-x-auto p-4 bg-muted/30",e),...d,children:t.map(T=>jsx(Ub,{column:T,radius:c,renderCard:a,onCardClick:r,onAddCard:o,showAddCard:s,addCardLabel:i,columnHeight:l},T.id))});let x=T=>t.find(M=>M.cards.some(k=>k.id===T));return jsxs(DndContext,{sensors:y,collisionDetection:closestCorners,onDragStart:T=>{let{active:M}=T,k=x(M.id);if(k){let P=k.cards.find(E=>E.id===M.id);P&&(h(P),v(k.id));}},onDragOver:T=>{let{active:M,over:k}=T;if(!k)return;let P=M.id,E=k.id,N=x(P),S=x(E)||t.find(L=>L.id===E);if(!N||!S||N.id===S.id)return;let H=S.cards.findIndex(L=>L.id===E),D=H===-1?S.cards.length:H;n?.(P,N.id,S.id,D);},onDragEnd:T=>{let{active:M,over:k}=T;if(k&&M.id!==k.id){let P=x(M.id),E=x(k.id)||t.find(N=>N.id===k.id);if(P&&E){let N=E.cards.findIndex(H=>H.id===k.id),S=N===-1?E.cards.length:N;n?.(M.id,P.id,E.id,S);}}h(null),v(null);},children:[jsx("div",{ref:m,className:u("flex gap-4 overflow-x-auto p-4 bg-muted/30",e),...d,children:t.map(T=>jsx(Ub,{column:T,radius:c,renderCard:a,onCardClick:r,onAddCard:o,showAddCard:s,addCardLabel:i,columnHeight:l},T.id))}),jsx(DragOverlay,{children:g&&b&&jsx("div",{className:u("p-3 cursor-grab active:cursor-grabbing transition-all bg-background border shadow-lg opacity-50 scale-[1.02]",kl[c]),children:a?a(g,b):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:g.title}),g.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:g.description})]})]})})})]})});Wb.displayName="KanbanBoard";var _b=cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),Yb=X.createContext(null);function Is(){let e=X.useContext(Yb);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Xb=X.forwardRef(({className:e,variant:t,children:n,opts:r,plugins:o,orientation:a="horizontal",showArrows:s=true,showDots:i=true,setApi:l,...c},d)=>{let[m,f]=MM({...r,axis:a==="horizontal"?"x":"y"},o),[p,g]=X.useState(false),[h,b]=X.useState(false),[v,y]=X.useState(0),[x,w]=X.useState([]),C=X.useCallback(P=>{P&&(y(P.selectedScrollSnap()),g(P.canScrollPrev()),b(P.canScrollNext()));},[]),R=X.useCallback(()=>{f?.scrollPrev();},[f]),T=X.useCallback(()=>{f?.scrollNext();},[f]),M=X.useCallback(P=>{f?.scrollTo(P);},[f]),k=X.useCallback(P=>{P.key==="ArrowLeft"?(P.preventDefault(),R()):P.key==="ArrowRight"&&(P.preventDefault(),T());},[R,T]);return X.useEffect(()=>{!f||!l||l(f);},[f,l]),X.useEffect(()=>{if(f)return w(f.scrollSnapList()),C(f),f.on("reInit",C),f.on("select",C),()=>{f?.off("select",C);}},[f,C]),jsx(Yb.Provider,{value:{carouselRef:m,api:f,scrollPrev:R,scrollNext:T,canScrollPrev:p,canScrollNext:h,selectedIndex:v,scrollSnaps:x,scrollTo:M,orientation:a},children:jsxs("div",{ref:d,className:u(_b({variant:t,className:e})),onKeyDownCapture:k,role:"region","aria-roledescription":"carousel",...c,children:[jsx("div",{ref:m,className:"overflow-hidden",children:jsx("div",{className:u("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:n})}),s&&jsxs(Fragment,{children:[jsx(Pl,{}),jsx(El,{})]}),i&&x.length>1&&jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:x.map((P,E)=>jsx("button",{className:u("w-2 h-2 rounded-full transition-all",E===v?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>M(E),"aria-label":`Go to slide ${E+1}`},E))})]})})});Xb.displayName="Carousel";var qb=X.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex",e),...t}));qb.displayName="CarouselContent";var Zb=X.forwardRef(({className:e,basis:t="basis-full",...n},r)=>{let{orientation:o}=Is();return jsx("div",{ref:r,role:"group","aria-roledescription":"slide",className:u("min-w-0 shrink-0 grow-0",o==="horizontal"?"pl-4":"pt-4",t,e),...n})});Zb.displayName="CarouselItem";var Pl=X.forwardRef(({className:e,variant:t="bordered",size:n="sm",isIconOnly:r=true,...o},a)=>{let{scrollPrev:s,canScrollPrev:i}=Is();return jsxs(ae,{ref:a,variant:t,size:n,isIconOnly:r,className:u("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!i,onClick:s,...o,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Previous slide"})]})});Pl.displayName="CarouselPrevious";var El=X.forwardRef(({className:e,variant:t="bordered",size:n="sm",isIconOnly:r=true,...o},a)=>{let{scrollNext:s,canScrollNext:i}=Is();return jsxs(ae,{ref:a,variant:t,size:n,isIconOnly:r,className:u("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!i,onClick:s,...o,children:[jsx(ChevronRight,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Next slide"})]})});El.displayName="CarouselNext";var Qb=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"}}),Vs={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"}},Sl={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}"]},Jb=X.forwardRef(({className:e,size:t,onEmojiSelect:n,recentEmojis:r=[],defaultCategory:o="smileys",showSearch:a=true,showCategories:s=true,...i},l)=>{let[c,d]=X.useState(r.length>0?"recent":o),[m,f]=X.useState(""),g=m?Object.values(Sl).flat().filter(b=>b.toLowerCase().includes(m.toLowerCase())):c==="recent"?r:Sl[c]||[],h=b=>{n?.(b);};return jsxs("div",{ref:l,className:u(Qb({size:t,className:e})),...i,children:[a&&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(Pa,{placeholder:"Search emojis...",value:m,onChange:b=>f(b.target.value),className:"pl-8 h-8"})]})}),s&&!m&&jsx(ke,{orientation:"horizontal",className:"border-b",children:jsx("div",{className:"flex px-1",children:Object.entries(Vs).map(([b,{icon:v}])=>b==="recent"&&r.length===0?null:jsx("button",{className:u("shrink-0 p-2 text-lg hover:bg-accent rounded transition-colors",c===b&&"bg-accent"),onClick:()=>d(b),title:Vs[b].name,children:v},b))})}),!m&&jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:Vs[c].name}),jsx(ke,{className:"flex-1",children:jsxs("div",{className:"grid grid-cols-8 gap-1 p-2",children:[g.map((b,v)=>jsx("button",{className:"w-8 h-8 flex items-center justify-center text-xl hover:bg-accent rounded transition-colors",onClick:()=>h(b),children:b},`${b}-${v}`)),g.length===0&&jsx("div",{className:"col-span-8 py-8 text-center text-muted-foreground text-sm",children:"No emojis found"})]})})]})});Jb.displayName="EmojiPicker";var ev=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border border-zinc-300 dark:border-zinc-700",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),rN=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"}}),oN=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"}}),Xe=({icon:e,title:t,isActive:n,onClick:r,disabled:o})=>jsxs(_n,{children:[jsx(Yn,{children:jsx(ae,{type:"button",variant:n?"solid":"ghost",size:"sm",isIconOnly:true,className:"h-7 w-7",onClick:r,disabled:o,children:e})}),jsx(Xn,{side:"top",className:"text-xs",children:t})]}),tv=X.forwardRef(({className:e,variant:t,size:n,value:r="",onChange:o,placeholder:a="Start writing...",readOnly:s=false,showToolbar:i=true,minHeight:l,maxHeight:c,onEditorReady:d,...m},f)=>{let p=useEditor({extensions:[IM.configure({heading:{levels:[1,2,3]}}),VM.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),AM,zM.configure({types:["heading","paragraph"]}),OM.configure({placeholder:a})],content:r,editable:!s,onUpdate:({editor:h})=>{o?.(h.getHTML());},onCreate:({editor:h})=>{d?.(h);}});X.useEffect(()=>{p&&r!==p.getHTML()&&p.commands.setContent(r);},[r,p]),X.useEffect(()=>{p&&p.setEditable(!s);},[s,p]);let g=()=>{if(!p)return;let h=p.getAttributes("link").href,b=window.prompt("URL",h);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(Wn,{children:jsxs("div",{ref:f,className:u(ev({variant:t,size:n,className:e})),...m,children:[i&&!s&&jsxs("div",{className:u(rN({size:n})),children:[jsx(Xe,{icon:jsx(Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsx(Xe,{icon:jsx(Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{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(Xe,{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(Xe,{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(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Bold,{className:"h-4 w-4"}),title:"Bold (Ctrl+B)",isActive:p.isActive("bold"),onClick:()=>p.chain().focus().toggleBold().run()}),jsx(Xe,{icon:jsx(Italic,{className:"h-4 w-4"}),title:"Italic (Ctrl+I)",isActive:p.isActive("italic"),onClick:()=>p.chain().focus().toggleItalic().run()}),jsx(Xe,{icon:jsx(Underline,{className:"h-4 w-4"}),title:"Underline (Ctrl+U)",isActive:p.isActive("underline"),onClick:()=>p.chain().focus().toggleUnderline().run()}),jsx(Xe,{icon:jsx(Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(List,{className:"h-4 w-4"}),title:"Bullet List",isActive:p.isActive("bulletList"),onClick:()=>p.chain().focus().toggleBulletList().run()}),jsx(Xe,{icon:jsx(ListOrdered,{className:"h-4 w-4"}),title:"Numbered List",isActive:p.isActive("orderedList"),onClick:()=>p.chain().focus().toggleOrderedList().run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(AlignLeft,{className:"h-4 w-4"}),title:"Align Left",isActive:p.isActive({textAlign:"left"}),onClick:()=>p.chain().focus().setTextAlign("left").run()}),jsx(Xe,{icon:jsx(AlignCenter,{className:"h-4 w-4"}),title:"Align Center",isActive:p.isActive({textAlign:"center"}),onClick:()=>p.chain().focus().setTextAlign("center").run()}),jsx(Xe,{icon:jsx(AlignRight,{className:"h-4 w-4"}),title:"Align Right",isActive:p.isActive({textAlign:"right"}),onClick:()=>p.chain().focus().setTextAlign("right").run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsx(Xe,{icon:jsx(Code,{className:"h-4 w-4"}),title:"Code Block",isActive:p.isActive("codeBlock"),onClick:()=>p.chain().focus().toggleCodeBlock().run()}),jsx(jn,{orientation:"vertical",className:"h-6 mx-1"}),jsx(Xe,{icon:jsx(Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:g}),jsx(Xe,{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:u(oN({size:n})),style:{minHeight:l,maxHeight:c}})]})}):null});tv.displayName="RichTextEditor";var rv=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border border-zinc-300 dark:border-zinc-700",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function mN(e,t,n){return centerCrop(makeAspectCrop({unit:"%",width:90},n,e,t),e,t)}async function nv(e,t,n=0,r=1){let o=document.createElement("canvas"),a=o.getContext("2d");if(!a)return null;let s=e.naturalWidth/e.width,i=e.naturalHeight/e.height,l=window.devicePixelRatio||1;o.width=Math.floor(t.width*s*l),o.height=Math.floor(t.height*i*l),a.scale(l,l),a.imageSmoothingQuality="high";let c=t.x*s,d=t.y*i,m=n*Math.PI/180,f=e.naturalWidth/2,p=e.naturalHeight/2;return a.save(),a.translate(-c,-d),a.translate(f,p),a.rotate(m),a.scale(r,r),a.translate(-f,-p),a.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),a.restore(),new Promise(g=>{o.toBlob(h=>{g(h);},"image/png");})}var ov=X.forwardRef(({className:e,variant:t,src:n,aspectRatio:r,onCropChange:o,onCropComplete:a,showZoom:s=true,showRotation:i=true,minZoom:l=1,maxZoom:c=3,circularCrop:d=false,initialCrop:m,...f},p)=>{let g=X.useRef(null),[h,b]=X.useState(),[v,y]=X.useState(),[x,w]=X.useState(1),[C,R]=X.useState(0),T=E=>{let{width:N,height:S}=E.currentTarget;if(r){let H=mN(N,S,r);b(H);}else b(m||{unit:"%",x:10,y:10,width:80,height:80});},M=E=>{b(E),o?.(E);},k=async E=>{if(y(E),a&&g.current&&E.width&&E.height){let N=await nv(g.current,E,C,x);a(N);}},P=()=>{R(E=>(E+90)%360);};return X.useEffect(()=>{v&&g.current&&a&&nv(g.current,v,C,x).then(E=>{a(E);});},[x,C,v,a]),jsxs("div",{ref:p,className:u(rv({variant:t,className:e})),...f,children:[jsx("div",{className:"flex-1 flex items-center justify-center p-4 bg-muted/30 min-h-[300px]",children:jsx(aN,{crop:h,onChange:M,onComplete:k,aspect:r,circularCrop:d,className:"max-h-[400px]",children:jsx("img",{ref:g,src:n,alt:"Crop preview",crossOrigin:"anonymous",onLoad:T,style:{transform:`scale(${x}) rotate(${C}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(Ua,{value:[x],onValueChange:([E])=>w(E),min:l,max:c,step:.1,className:"flex-1"}),jsx(ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),i&&jsx(ae,{variant:"bordered",size:"sm",isIconOnly:true,onClick:P,children:jsx(RotateCw,{className:"h-4 w-4"})})]})]})});ov.displayName="ImageCropper";var Vl=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"}}),gN={sm:96,md:128,lg:192},sv=X.forwardRef(({className:e,variant:t,size:n,value:r,qrSize:o,fgColor:a="currentColor",bgColor:s="transparent",level:i="M",includeMargin:l=false,title:c,logo:d,logoSize:m=40,logoPadding:f=4,logoBackgroundColor:p="white",...g},h)=>{let b=o??gN[n??"md"];return r?jsx("div",{ref:h,className:u(Vl({variant:t,size:n,className:e})),...g,children:jsxs("div",{className:"relative inline-block",children:[jsx(pN,{value:r,size:b,fgColor:a,bgColor:s,level:i,title:c,style:{padding:l?16:0}}),d&&jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded",style:{padding:f,backgroundColor:p},children:jsx("img",{src:d,alt:"Logo",style:{width:m,height:m,objectFit:"contain"}})})]})}):jsx("div",{ref:h,className:u(Vl({variant:t,size:n,className:e})),...g,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"})})});sv.displayName="QRCode";var iv=({children:e,defaultTheme:t="system",storageKey:n="reever-ui-theme",enableSystem:r=true,disableTransitionOnChange:o=false,attribute:a="class",forcedTheme:s,themes:i=["light","dark"]})=>jsx(ThemeProvider,{defaultTheme:t,storageKey:n,enableSystem:r,disableTransitionOnChange:o,attribute:a,forcedTheme:s,themes:i,children:e});iv.displayName="ThemeProvider";var wN=cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),lv=X.forwardRef(({className:e,variant:t="ghost",size:n="md",mode:r="dropdown"},o)=>{let{theme:a,setTheme:s,resolvedTheme:i}=useTheme(),[l,c]=X.useState(false);X.useEffect(()=>{c(true);},[]);let d=()=>{let m=["light","dark","system"],p=(m.indexOf(a||"system")+1)%m.length;s(m[p]);};return l?r==="cycle"?jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"sm",isIconOnly:true,className:e,onClick:d,children:[i==="dark"?jsx(Moon,{className:"h-4 w-4"}):jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]}):jsxs(Cn,{children:[jsx(Tn,{children:jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"sm",isIconOnly:true,className: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(Mn,{align:"end",children:[jsxs($t,{onClick:()=>s("light"),children:[jsx(Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxs($t,{onClick:()=>s("dark"),children:[jsx(Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxs($t,{onClick:()=>s("system"),children:[jsx(Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxs(ae,{ref:o,variant:t==="default"?"bordered":t,size:"sm",isIconOnly:true,className:e,disabled:true,children:[jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})});lv.displayName="ThemeToggle";var cv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),dv=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-9 px-2.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-11 px-4 py-2.5 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),uv=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"}}),mv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,startContent:m,endContent:f,id:p,...g},h)=>{let b=X.useId(),v=p||b,y=`${v}-description`,x=`${v}-error`,w=a&&r;return jsxs("div",{className:u(cv({size:s}),e),children:[t&&jsxs("label",{htmlFor:v,className:u(uv({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[m&&jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:m}),jsx("input",{ref:h,id:v,"aria-invalid":a,"aria-describedby":w?x:n?y:void 0,"aria-required":o,className:u(dv({size:s,isInvalid:a}),m&&"pl-10",f&&"pr-10",l),...g}),f&&jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:f})]}),n&&!w&&jsx("p",{id:y,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),w&&jsx("p",{id:x,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});mv.displayName="TextField";var gv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),MN=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors 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:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit min-w-24"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),pv=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"}}),fv=cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),NN=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"}}),bv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,min:m,max:f,step:p=1,value:g,defaultValue:h,onChange:b,showButtons:v=true,formatOptions:y,fullWidth:x=false,disabled:w,id:C,...R},T)=>{let M=X.useId(),k=C||M,P=`${k}-description`,E=`${k}-error`,[N,S]=X.useState(h),[H,D]=X.useState(false),L=g!==void 0?g:N,I=a&&r,V=X.useCallback(z=>{z!==void 0&&(m!==void 0&&z<m&&(z=m),f!==void 0&&z>f&&(z=f)),g===void 0&&S(z),b?.(z);},[g,m,f,b]),O=()=>{let z=(L??0)+p;V(z);},A=()=>{let z=(L??0)-p;V(z);},K=z=>{let j=z.target.value;if(j==="")V(void 0);else {let W=parseFloat(j);isNaN(W)||V(W);}},$=z=>{z.key==="ArrowUp"?(z.preventDefault(),O()):z.key==="ArrowDown"&&(z.preventDefault(),A());},G=X.useMemo(()=>L===void 0?"":y?new Intl.NumberFormat(void 0,y).format(L):L.toString(),[L,y]),Y=m!==void 0&&L!==void 0&&L<=m,F=f!==void 0&&L!==void 0&&L>=f;return jsxs("div",{className:u(gv({size:s}),e),children:[t&&jsxs("label",{htmlFor:k,className:u(NN({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[v&&jsx("button",{type:"button",onClick:A,disabled:w||Y,className:u(pv({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:u(fv({size:s}))})}),jsx("input",{ref:T,id:k,type:"text",inputMode:"decimal",value:G,onChange:K,onKeyDown:$,onFocus:()=>D(true),onBlur:()=>D(false),"aria-invalid":a,"aria-describedby":I?E:n?P:void 0,"aria-required":o,"aria-valuemin":m,"aria-valuemax":f,"aria-valuenow":L,disabled:w,className:u(MN({size:s,isInvalid:a,fullWidth:x}),!v&&"px-3",l),style:{borderColor:H?"var(--color-foreground)":void 0},...R}),v&&jsx("button",{type:"button",onClick:O,disabled:w||F,className:u(pv({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:u(fv({size:s}))})})]}),n&&!I&&jsx("p",{id:P,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),I&&jsx("p",{id:E,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});bv.displayName="NumberField";var hv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),EN=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-9 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-11 pl-12 pr-12 py-2.5 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),vv=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"}}),LN=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"}}),SN=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"}}),xv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f="",onChange:p,onClear:g,onSearch:h,showClearButton:b=true,showSearchIcon:v=true,disabled:y,placeholder:x="Search...",id:w,...C},R)=>{let T=X.useId(),M=w||T,k=`${M}-description`,P=`${M}-error`,[E,N]=X.useState(f),S=m!==void 0?m:E,H=a&&r,D=S.length>0,L=O=>{let A=O.target.value;m===void 0&&N(A),p?.(A);},I=()=>{m===void 0&&N(""),p?.(""),g?.();},V=O=>{O.key==="Enter"?(O.preventDefault(),h?.(S)):O.key==="Escape"&&D&&(O.preventDefault(),I());};return jsxs("div",{className:u(hv({size:s}),e),children:[t&&jsxs("label",{htmlFor:M,className:u(LN({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[v&&jsx(Search,{className:u(vv({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsx("input",{ref:R,id:M,type:"search",value:S,onChange:L,onKeyDown:V,placeholder:x,"aria-invalid":a,"aria-describedby":H?P:n?k:void 0,"aria-required":o,disabled:y,className:u(EN({size:s,isInvalid:a}),!v&&"pl-3",!b&&"pr-3",l),...C}),b&&D&&!y&&jsx("button",{type:"button",onClick:I,className:u(SN({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsx(X$1,{className:u(vv({size:s}))})})]}),n&&!H&&jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),H&&jsx("p",{id:P,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});xv.displayName="SearchField";var yv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),HN=cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-9 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-11 py-2.5 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"},showPickerIcon:{true:"",false:""}},compoundVariants:[{size:"sm",showPickerIcon:true,className:"pl-3 pr-8"},{size:"sm",showPickerIcon:false,className:"px-3"},{size:"md",showPickerIcon:true,className:"pl-3 pr-10"},{size:"md",showPickerIcon:false,className:"px-3"},{size:"lg",showPickerIcon:true,className:"pl-4 pr-12"},{size:"lg",showPickerIcon:false,className:"px-4"}],defaultVariants:{size:"md",isInvalid:false,fullWidth:false,showPickerIcon:true}}),IN=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"}}),VN=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"}}),Fs={"dd/MM/yyyy":"/","MM/dd/yyyy":"/","yyyy-MM-dd":"-","dd.MM.yyyy":"."},Gl={"dd/MM/yyyy":["day","month","year"],"MM/dd/yyyy":["month","day","year"],"yyyy-MM-dd":["year","month","day"],"dd.MM.yyyy":["day","month","year"]},Kl=(e,t)=>String(e).padStart(t,"0"),ma=(e,t)=>{if(!e)return "";let n=Kl(e.getDate(),2),r=Kl(e.getMonth()+1,2),o=Kl(e.getFullYear(),4),a=Fs[t],s=Gl[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},$l=(e,t)=>{let n=Fs[t],r=e.split(n);if(r.length!==3)return null;let o=Gl[t],a={};if(o.forEach((i,l)=>{a[i]=parseInt(r[l],10);}),isNaN(a.day)||isNaN(a.month)||isNaN(a.year)||a.month<1||a.month>12||a.day<1||a.day>31||a.year<1e3||a.year>9999)return null;let s=new Date(a.year,a.month-1,a.day);return s.getFullYear()!==a.year||s.getMonth()!==a.month-1||s.getDate()!==a.day?null:s},AN=e=>{let t=Fs[e];return Gl[e].map(r=>r==="year"?"####":"##").join(t)},Ks=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:b="dd.MM.yyyy",showPickerIcon:v=true,mode:y="text",fullWidth:x=false,disabled:w,placeholder:C,id:R,...T},M)=>{let k=X.useId(),P=R||k,E=`${P}-description`,N=`${P}-error`,[S,H]=X.useState(f??null),[D,L]=X.useState(""),[I,V]=X.useState(false),[O,A]=X.useState(false),K=m!==void 0?m:S,$=a&&r,G=Fs[b],Y=AN(b);X.useEffect(()=>{O||L(ma(K,b));},[K,b,O]);let F=U=>{m===void 0&&H(U),p?.(U);},z=U=>{let Ce=U??null;F(Ce),L(ma(Ce,b)),V(false);},j=U=>{let Ce=U.target.value;Ce=Ce.replace(new RegExp(`[^0-9\\${G}]`,"g"),"");let Q=Ce.replace(new RegExp(`\\${G}`,"g"),""),le="",Fe=0;for(let pe=0;pe<Y.length&&Fe<Q.length;pe++)Y[pe]==="#"?(le+=Q[Fe],Fe++):le+=Y[pe];if(L(le),le.length===Y.length){let pe=$l(le,b);if(pe){if(g&&pe<g||h&&pe>h)return;F(pe);}}},W=()=>{A(true);},B=()=>{A(false),D.length!==Y.length?L(ma(K,b)):$l(D,b)||L(ma(K,b));},Z=()=>{w||V(true);},ue=()=>{!w&&y==="picker"&&v&&V(true);};return jsxs("div",{className:u(yv({size:s}),e),children:[t&&jsxs("label",{htmlFor:P,className:u(VN({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs(ot,{open:v&&I,onOpenChange:V,children:[jsxs(an,{className:u("relative",x?"w-full":"w-fit"),children:[jsx("input",{ref:M,id:P,type:"text",inputMode:y==="text"?"numeric":void 0,value:D,onChange:y==="text"?j:void 0,onClick:ue,onFocus:W,onBlur:B,readOnly:y==="picker","aria-invalid":a,"aria-describedby":$?N:n?E:void 0,"aria-required":o,disabled:w,placeholder:C||b.toLowerCase(),className:u(HN({size:s,isInvalid:a,fullWidth:x,showPickerIcon:v}),y==="picker"&&v&&"cursor-pointer",l),style:{borderColor:O||v&&I?"var(--color-foreground)":void 0},...T}),v&&jsx("button",{type:"button",onClick:Z,disabled:w,className:"absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",tabIndex:-1,"aria-label":"Open calendar",children:jsx(Calendar,{className:u(IN({size:s}))})})]}),v&&jsx(at,{className:"w-auto p-0",align:"start",children:jsx(to,{mode:"single",selected:K??void 0,onSelect:z,disabled:U=>!!(g&&U<g||h&&U>h),defaultMonth:K??void 0,showMonthAndYearPickers:true})})]}),n&&!$&&jsx("p",{id:E,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),$&&jsx("p",{id:N,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Ks.displayName="DatePicker";var zN=Ks,ON=Ks;var Rv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),BN=cva("inline-flex items-center rounded-md border border-input bg-background transition-colors",{variants:{size:{sm:"h-8 px-2 gap-0.5 text-xs",md:"h-10 px-3 gap-1 text-sm",lg:"h-12 px-4 gap-1.5 text-base"},isInvalid:{true:"border-danger",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:""},fullWidth:{true:"w-full justify-center",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,disabled:false,fullWidth:false}}),FN=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"}}),wv=X.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minTime:g,maxTime:h,showSeconds:b=false,hourCycle:v=24,disabled:y,fullWidth:x=false,id:w,...C},R)=>{let T=X.useId(),M=w||T,k=`${M}-description`,P=`${M}-error`,E=X.useRef(null),N=X.useRef(null),S=X.useRef(null),H=X.useRef(null),[D,L]=X.useState(f??null),I=m!==void 0?m:D,V=a&&r,O=_=>v===24?_:_===0?12:_>12?_-12:_,A=_=>_>=12?"PM":"AM",K=(_,oe)=>oe==="AM"?_===12?0:_:_===12?12:_+12,[$,G]=X.useState(I?String(O(I.hour)).padStart(2,"0"):""),[Y,F]=X.useState(I?String(I.minute).padStart(2,"0"):""),[z,j]=X.useState(I?.second!==void 0?String(I.second).padStart(2,"0"):""),[W,B]=X.useState(I?A(I.hour):"AM"),[Z,ue]=X.useState(false);X.useEffect(()=>{m!==void 0&&(m?(G(String(O(m.hour)).padStart(2,"0")),F(String(m.minute).padStart(2,"0")),m.second!==void 0&&j(String(m.second).padStart(2,"0")),B(A(m.hour))):(G(""),F(""),j("")));},[m,v]);let U=(_,oe,q,De)=>{let de=parseInt(_,10),je=parseInt(oe,10),We=b?parseInt(q,10):void 0;if(isNaN(de)||isNaN(je)||b&&isNaN(We)){m===void 0&&L(null),p?.(null);return}let ve={hour:v===12?K(de,De):de,minute:je,...b&&We!==void 0&&{second:We}};m===void 0&&L(ve),p?.(ve);},Ce=_=>{let oe=_.target.value.replace(/\D/g,"").slice(0,2);G(oe);let q=v===24?23:12,De=v===24?0:1;if(oe.length===2){let de=parseInt(oe,10);de>=De&&de<=q&&(N.current?.focus(),N.current?.select());}},Q=_=>{let oe=_.target.value.replace(/\D/g,"").slice(0,2);if(F(oe),oe.length===2){let q=parseInt(oe,10);q>=0&&q<=59&&(b?(S.current?.focus(),S.current?.select()):v===12&&H.current?.focus());}},le=_=>{let oe=_.target.value.replace(/\D/g,"").slice(0,2);j(oe),oe.length===2&&v===12&&H.current?.focus();},Fe=()=>{if($){let _=parseInt($,10),oe=v===24?23:12,De=Math.min(Math.max(_,v===24?0:1),oe),de=String(De).padStart(2,"0");G(de),U(de,Y,z,W);}},pe=()=>{if(Y){let _=parseInt(Y,10),oe=Math.min(Math.max(_,0),59),q=String(oe).padStart(2,"0");F(q),U($,q,z,W);}},Ct=()=>{if(z){let _=parseInt(z,10),oe=Math.min(Math.max(_,0),59),q=String(oe).padStart(2,"0");j(q),U($,Y,q,W);}},bt=()=>{let _=W==="AM"?"PM":"AM";B(_),U($,Y,z,_);},yn=_=>{let oe=_.key.toLowerCase();oe==="a"?(_.preventDefault(),W!=="AM"&&(B("AM"),U($,Y,z,"AM"))):oe==="p"?(_.preventDefault(),W!=="PM"&&(B("PM"),U($,Y,z,"PM"))):oe==="arrowup"||oe==="arrowdown"?(_.preventDefault(),bt()):oe==="arrowleft"&&(_.preventDefault(),b?(S.current?.focus(),S.current?.select()):(N.current?.focus(),N.current?.select()));},Ke=(_,oe)=>{if(_.key==="ArrowUp"||_.key==="ArrowDown"){_.preventDefault();let q=_.key==="ArrowUp"?1:-1;if(oe==="hour"){let De=parseInt($,10)||0,de=v===24?23:12,je=v===24?0:1,We=De+q;We>de&&(We=je),We<je&&(We=de);let Gn=String(We).padStart(2,"0");G(Gn),U(Gn,Y,z,W);}else if(oe==="minute"){let de=(parseInt(Y,10)||0)+q;de>59&&(de=0),de<0&&(de=59);let je=String(de).padStart(2,"0");F(je),U($,je,z,W);}else if(oe==="second"){let de=(parseInt(z,10)||0)+q;de>59&&(de=0),de<0&&(de=59);let je=String(de).padStart(2,"0");j(je),U($,Y,je,W);}}_.key==="ArrowRight"&&(_.preventDefault(),oe==="hour"?(N.current?.focus(),N.current?.select()):oe==="minute"&&b?(S.current?.focus(),S.current?.select()):(oe==="minute"&&!b&&v===12||oe==="second"&&v===12)&&H.current?.focus()),_.key==="ArrowLeft"&&(_.preventDefault(),oe==="minute"?(E.current?.focus(),E.current?.select()):oe==="second"&&(N.current?.focus(),N.current?.select())),_.key==="Backspace"&&_.currentTarget.value===""&&(oe==="minute"?E.current?.focus():oe==="second"&&N.current?.focus());},Tt=u((()=>{switch(s){case "sm":return "w-5";case "lg":return "w-7";default:return "w-6"}})(),"bg-transparent text-center outline-none placeholder:text-muted-foreground tabular-nums",y&&"cursor-not-allowed");return jsxs("div",{ref:R,className:u(Rv({size:s}),e),...C,children:[t&&jsxs("label",{htmlFor:M,className:u(FN({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:u(BN({size:s,isInvalid:a,disabled:y,fullWidth:x}),l),style:{borderColor:Z?"var(--color-foreground)":void 0},onFocus:()=>ue(true),onBlur:_=>{_.currentTarget.contains(_.relatedTarget)||ue(false);},children:[jsx("input",{ref:E,id:M,type:"text",inputMode:"numeric",placeholder:v===24?"HH":"hh",value:$,onChange:Ce,onBlur:Fe,onKeyDown:_=>Ke(_,"hour"),onFocus:_=>_.target.select(),"aria-label":"Hour","aria-invalid":a,"aria-describedby":V?P:n?k:void 0,"aria-required":o,disabled:y,className:Tt}),jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:N,type:"text",inputMode:"numeric",placeholder:"mm",value:Y,onChange:Q,onBlur:pe,onKeyDown:_=>Ke(_,"minute"),onFocus:_=>_.target.select(),"aria-label":"Minute",disabled:y,className:Tt}),b&&jsxs(Fragment,{children:[jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:S,type:"text",inputMode:"numeric",placeholder:"ss",value:z,onChange:le,onBlur:Ct,onKeyDown:_=>Ke(_,"second"),onFocus:_=>_.target.select(),"aria-label":"Second",disabled:y,className:Tt})]}),v===12&&jsx("button",{ref:H,type:"button",onClick:bt,onKeyDown:yn,disabled:y,className:u("ml-0.5 rounded text-muted-foreground hover:text-foreground focus:outline-none focus:text-foreground transition-colors tabular-nums",s==="sm"?"w-6":s==="lg"?"w-8":"w-7",y&&"cursor-not-allowed"),"aria-label":"AM/PM",children:W})]}),n&&!V&&jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),V&&jsx("p",{id:P,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});wv.displayName="TimeField";var Tv=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"}}),Mv=X.forwardRef(({className:e,variant:t,orientation:n,size:r,density:o,items:a,maxVisibleItems:s,isDisabled:i,onAction:l,showLabels:c=false,renderItem:d,...m},f)=>{let p=s&&s<a.length?a.slice(0,s):a,g=s&&s<a.length?a.slice(s):[],h={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"],v={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[r??"md"],y=(w,C)=>{C&&C(),l&&l(w);},x=w=>jsxs("button",{type:"button",disabled:i||w.isDisabled,onClick:()=>y(w.key,w.onPress),className:u("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",c?h:b),"aria-label":w.label,children:[w.icon&&jsx("span",{className:v,children:w.icon}),c&&jsx("span",{children:w.label})]},w.key);return jsxs("div",{ref:f,role:"group",className:u(Tv({variant:t,orientation:n,size:r,density:o,className:e})),...m,children:[p.map(w=>d?d(w):x(w)),g.length>0&&jsxs(Cn,{children:[jsx(Tn,{"aria-label":"More actions",className:u("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",i&&"pointer-events-none opacity-50",b),children:jsx(MoreHorizontal,{className:v})}),jsx(Mn,{align:"end",children:g.map(w=>jsxs($t,{disabled:w.isDisabled,onClick:()=>y(w.key,w.onPress),children:[w.icon&&jsx("span",{className:u(v,"mr-2"),children:w.icon}),w.label]},w.key))})]})]})});Mv.displayName="ActionGroup";var Ev=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"}}),UN=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}}),Lv=X.forwardRef(({className:e,variant:t,size:n,pulse:r=false,hideLabel:o=false,children:a,...s},i)=>jsxs("span",{ref:i,role:"status",className:u(Ev({variant:t,size:n,className:e})),...s,children:[jsx("span",{className:u(UN({size:n,pulse:r})),"aria-hidden":"true"}),!o&&a&&jsx("span",{className:"text-foreground",children:a})]}));Lv.displayName="StatusLight";var Sv=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"}}),Dv=X.forwardRef(({className:e,position:t,size:n,selectedCount:r=0,isOpen:o=true,onClose:a,showClose:s=true,selectedText:i,children:l,...c},d)=>{if(!o||r===0)return null;let m=()=>typeof i=="function"?i(r):i||`${r} item${r>1?"s":""} selected`;return jsxs("div",{ref:d,role:"toolbar","aria-label":"Actions for selected items",className:u(Sv({position:t,size:n,className:e})),...c,children:[jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:m()}),jsx("div",{className:"h-4 w-px bg-border"}),jsx("div",{className:"flex items-center gap-1",children:l}),s&&jsxs(Fragment,{children:[jsx("div",{className:"h-4 w-px bg-border"}),jsx(Nt,{size:"sm",onClick:a,"aria-label":"Close action bar"})]})]})});Dv.displayName="ActionBar";var Hv=X.forwardRef(({className:e,icon:t,children:n,...r},o)=>jsxs("button",{ref:o,type:"button",className:u("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}),n]}));Hv.displayName="ActionBarButton";var Av=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"}}),zv=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 Ov({className:e,variant:t,size:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,allowsDragging:i=false,onReorder:l,showCheckbox:c=false,renderItem:d,emptyContent:m,...f}){let[p,g]=X.useState(new Set),[h,b]=X.useState(null),[v,y]=X.useState(null),x=X.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),w=M=>{if(a==="none")return;let k;a==="single"?k=x.has(M)?new Set:new Set([M]):(k=new Set(x),k.has(M)?k.delete(M):k.add(M)),o||g(k),s?.(k);},C=(M,k)=>{b(k),M.dataTransfer.effectAllowed="move";},R=(M,k)=>{M.preventDefault(),h!==k&&y(k);},T=()=>{if(h&&v&&h!==v){let M=r.findIndex(N=>N.key===h),k=r.findIndex(N=>N.key===v),P=[...r],[E]=P.splice(M,1);P.splice(k,0,E),l?.(P);}b(null),y(null);};return r.length===0?jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsx("div",{role:"listbox","aria-multiselectable":a==="multiple",className:u(Av({variant:t,size:n,className:e})),...f,children:r.map(M=>{let k=x.has(M.key),P=h===M.key,E=v===M.key;return d?jsx("div",{role:"option","aria-selected":k,onClick:()=>w(M.key),children:d(M,k)},M.key):jsxs("div",{role:"option","aria-selected":k,"aria-disabled":M.isDisabled,draggable:i&&!M.isDisabled,onDragStart:N=>C(N,M.key),onDragOver:N=>R(N,M.key),onDragEnd:T,onClick:()=>!M.isDisabled&&w(M.key),className:u(zv({variant:t,size:n,isSelected:k,isDisabled:M.isDisabled}),P&&"opacity-50",E&&"border-t-2 border-t-primary"),children:[i&&jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground cursor-grab"}),c&&a!=="none"&&jsx("div",{className:u("flex h-4 w-4 items-center justify-center rounded border",k?"bg-primary border-primary text-primary-foreground":"border-input"),children:k&&jsx(Check,{className:"h-3 w-3"})}),M.icon&&jsx("span",{className:"h-5 w-5 text-muted-foreground [&>svg]:h-full [&>svg]:w-full",children:M.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"truncate",children:M.label}),M.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:M.description})]})]},M.key)})})}Ov.displayName="ListView";var Bv=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"}}),qN=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"}}),ZN=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 cursor-grab",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{size:"md"}}),Fv=X.forwardRef(({className:e,orientation:t="horizontal",size:n="md",value:r,defaultValue:o=[25,75],onValueChange:a,onValueCommit:s,min:i=0,max:l=100,step:c=1,disabled:d=false,showLabels:m=false,formatLabel:f=v=>String(v),trackColor:p="primary",name:g,...h},b)=>{let[v,y]=X.useState(o),x=r!==void 0,w=x?r:v,C=X.useRef(null),[R,T]=X.useState(false),[M,k]=X.useState(null),P=(A,K)=>{if(!C.current)return w[0];let $=C.current.getBoundingClientRect(),G;t==="horizontal"?G=(A-$.left)/$.width:G=1-(K-$.top)/$.height,G=Math.max(0,Math.min(1,G));let Y=i+G*(l-i),F=Math.round(Y/c)*c;return Math.max(i,Math.min(l,F))},E=(A,K)=>{let $=[...w];$[K]=A,K===0&&A>w[1]&&($[0]=w[1]),K===1&&A<w[0]&&($[1]=w[0]),x||y($),a?.($);},N=(A,K)=>{d||(A.preventDefault(),T(true),k(K),A.target.setPointerCapture(A.pointerId));},S=A=>{if(!R||M===null||d)return;let K=P(A.clientX,A.clientY);E(K,M);},H=()=>{R&&(T(false),k(null),s?.(w));},D=A=>{if(d)return;let K=P(A.clientX,A.clientY),$=Math.abs(w[0]-K),G=Math.abs(w[1]-K),Y=$<=G?0:1;E(K,Y);let F=[...w];F[Y]=K,s?.(F);},L=(A,K)=>{if(d)return;let $=w[K];switch(A.key){case "ArrowRight":case "ArrowUp":A.preventDefault(),$=Math.min(l,w[K]+c);break;case "ArrowLeft":case "ArrowDown":A.preventDefault(),$=Math.max(i,w[K]-c);break;case "Home":A.preventDefault(),$=i;break;case "End":A.preventDefault(),$=l;break;default:return}E($,K);let G=[...w];G[K]=$,s?.(G);},I=A=>(A-i)/(l-i)*100,V={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[p],O={sm:14,md:20,lg:24}[n||"md"];return jsxs("div",{className:"relative w-full",children:[m&&jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsx("span",{children:f(w[0])}),jsx("span",{children:f(w[1])})]}),jsxs("div",{ref:b,className:u(Bv({orientation:t,size:n}),d&&"opacity-50 pointer-events-none",e),...h,children:[jsx("div",{ref:C,className:u(qN({orientation:t,size:n})),onClick:D,children:jsx("div",{className:u("absolute rounded-full",V,{"h-full":t==="horizontal","w-full":t==="vertical"}),style:t==="horizontal"?{left:`${I(w[0])}%`,right:`${100-I(w[1])}%`,top:0,bottom:0}:{bottom:`${I(w[0])}%`,top:`${100-I(w[1])}%`,left:0,right:0}})}),w.map((A,K)=>jsx("div",{role:"slider",tabIndex:d?-1:0,"aria-valuemin":i,"aria-valuemax":l,"aria-valuenow":A,"aria-orientation":t||void 0,"aria-disabled":d,className:u(ZN({size:n}),R&&M===K&&"cursor-grabbing"),style:t==="horizontal"?{position:"absolute",left:`calc(${I(A)}% - ${O/2}px)`,top:"50%",transform:"translateY(-50%)"}:{position:"absolute",bottom:`calc(${I(A)}% - ${O/2}px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:$=>N($,K),onPointerMove:S,onPointerUp:H,onPointerCancel:H,onKeyDown:$=>L($,K)},K)),g&&jsxs(Fragment,{children:[jsx("input",{type:"hidden",name:`${g}[0]`,value:w[0]}),jsx("input",{type:"hidden",name:`${g}[1]`,value:w[1]})]})]})]})});Fv.displayName="RangeSlider";var Xl=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"}}),nk=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"}}),rk={help:HelpCircle,info:Info,warning:AlertCircle},Gv=X.forwardRef(({variant:e="help",size:t,title:n,children:r,trigger:o,side:a="top",align:s="center",open:i,onOpenChange:l,learnMoreUrl:c,learnMoreText:d="Learn more",triggerClassName:m,contentClassName:f},p)=>{let[g,h]=X.useState(false),[b,v]=X.useState(false),[y,x]=X.useState({top:0,left:0}),w=X.useRef(null),C=X.useRef(null),R=i!==void 0?i:g,T=X.useCallback(E=>{i===void 0&&h(E),l?.(E);},[i,l]);X.useEffect(()=>{v(true);},[]),X.useEffect(()=>{if(!R||!w.current)return;let E=()=>{let N=w.current.getBoundingClientRect(),S=C.current?.getBoundingClientRect(),H=S?.width||288,D=S?.height||100,L=8,I=0,V=0;switch(a){case "top":I=N.top-D-L,V=N.left+N.width/2-H/2;break;case "bottom":I=N.bottom+L,V=N.left+N.width/2-H/2;break;case "left":I=N.top+N.height/2-D/2,V=N.left-H-L;break;case "right":I=N.top+N.height/2-D/2,V=N.right+L;break}if(a==="top"||a==="bottom")switch(s){case "start":V=N.left;break;case "center":V=N.left+N.width/2-H/2;break;case "end":V=N.right-H;break}if(a==="left"||a==="right")switch(s){case "start":I=N.top;break;case "center":I=N.top+N.height/2-D/2;break;case "end":I=N.bottom-D;break}V=Math.max(8,Math.min(V,window.innerWidth-H-8)),I=Math.max(8,Math.min(I,window.innerHeight-D-8)),x({top:I,left:V});};return E(),requestAnimationFrame(E),window.addEventListener("resize",E),window.addEventListener("scroll",E,true),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,true);}},[R,a,s]),X.useEffect(()=>{if(!R)return;let E=N=>{C.current&&!C.current.contains(N.target)&&w.current&&!w.current.contains(N.target)&&T(false);};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[R,T]),X.useEffect(()=>{if(!R)return;let E=N=>{N.key==="Escape"&&T(false);};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[R,T]);let M=rk[e??"help"],k=()=>{T(!R);},P=()=>{switch(a){case "top":return "bottom center";case "bottom":return "top center";case "left":return "right center";case "right":return "left center";default:return "center center"}};return jsxs(Fragment,{children:[o?X.isValidElement(o)?X.cloneElement(o,{ref:w,onClick:E=>{o.props.onClick?.(E),k();}}):jsx("button",{ref:w,type:"button",onClick:k,className:u(Xl({variant:e,size:t}),m),"aria-label":"Help",children:o}):jsx("button",{ref:E=>{w.current=E,typeof p=="function"?p(E):p&&(p.current=E);},type:"button",onClick:k,className:u(Xl({variant:e,size:t}),m),"aria-label":"Help",children:jsx(M,{className:"h-full w-full"})}),b&&R&&Ba.createPortal(jsxs("div",{ref:C,className:u(nk({size:t}),f),style:{position:"fixed",top:y.top,left:y.left,transformOrigin:P()},role:"tooltip",children:[n&&jsx("div",{className:"mb-2 font-semibold text-foreground",children:n}),jsx("div",{className:"text-muted-foreground",children:r}),c&&jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block text-primary hover:underline",children:[d," \u2192"]}),jsx("div",{className:"absolute h-2 w-2 rotate-45 border bg-popover",style:{...a==="top"&&{bottom:-4,left:"50%",marginLeft:-4,borderTop:"none",borderLeft:"none"},...a==="bottom"&&{top:-4,left:"50%",marginLeft:-4,borderBottom:"none",borderRight:"none"},...a==="left"&&{right:-4,top:"50%",marginTop:-4,borderBottom:"none",borderLeft:"none"},...a==="right"&&{left:-4,top:"50%",marginTop:-4,borderTop:"none",borderRight:"none"}}})]}),document.body)]})});Gv.displayName="ContextualHelp";var jv=cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),ql=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",bordered:"border border-current 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:"bordered",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 Wv({className:e,spacing:t,variant:n,size:r,items:o,selectedKeys:a,selectionMode:s="none",onSelectionChange:i,allowsRemoving:l=false,onRemove:c,label:d,description:m,errorMessage:f,maxTags:p,...g}){let[h,b]=X.useState(new Set),v=X.useMemo(()=>a?a instanceof Set?a:new Set(a):h,[a,h]),y=R=>{if(s==="none")return;let T;s==="single"?T=v.has(R)?new Set:new Set([R]):(T=new Set(v),T.has(R)?T.delete(R):T.add(R)),a||b(T),i?.(T);},x=(R,T)=>{T.stopPropagation(),c?.(R);},w=p?o.slice(0,p):o,C=p?Math.max(0,o.length-p):0;return jsxs("div",{className:"flex flex-col gap-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:m}),jsxs("div",{role:"group","aria-label":d,className:u(jv({spacing:t}),e),...g,children:[w.map(R=>{let T=v.has(R.key),M=s!=="none";return jsxs("span",{role:M?"button":void 0,tabIndex:M&&!R.isDisabled?0:void 0,"aria-pressed":M?T:void 0,onClick:()=>!R.isDisabled&&y(R.key),onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&!R.isDisabled&&(k.preventDefault(),y(R.key));},style:R.color?{backgroundColor:R.color}:void 0,className:u(ql({variant:R.color?void 0:n,size:r,isSelected:T,isDisabled:R.isDisabled}),M&&!R.isDisabled&&"cursor-pointer hover:opacity-80",R.color&&"text-white"),children:[R.icon&&jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:R.icon}),R.label,l&&!R.isDisabled&&jsx("button",{type:"button",onClick:k=>x(R.key,k),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${R.label}`,children:jsx(X$1,{className:"h-3 w-3"})})]},R.key)}),C>0&&jsxs("span",{className:u(ql({variant:"surface",size:r}),"cursor-default"),children:["+",C," more"]})]}),f&&jsx("span",{className:"text-sm text-danger",children:f})]})}Wv.displayName="TagGroup";var Xv=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"}}),qv=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 Zv({className:e,columns:t,gap:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,showSelectionIndicator:i=true,itemVariant:l="default",itemSize:c="md",renderItem:d,emptyContent:m,...f}){let[p,g]=X.useState(new Set),h=X.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),b=v=>{if(a==="none")return;let y;a==="single"?y=h.has(v)?new Set:new Set([v]):(y=new Set(h),y.has(v)?y.delete(v):y.add(v)),o||g(y),s?.(y);};return r.length===0?jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsx("div",{role:"grid","aria-multiselectable":a==="multiple",className:u(Xv({columns:t,gap:n,className:e})),...f,children:r.map(v=>{let y=h.has(v.key);return d?jsx("div",{role:"gridcell","aria-selected":y,onClick:()=>b(v.key),children:d(v,y)},v.key):jsxs("div",{role:"gridcell","aria-selected":y,"aria-disabled":v.isDisabled,onClick:()=>!v.isDisabled&&b(v.key),className:u(qv({variant:l,size:c,isSelected:y,isDisabled:v.isDisabled})),children:[i&&a!=="none"&&y&&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"})}),v.thumbnail&&jsx("div",{className:"mb-2 aspect-square w-full overflow-hidden rounded-md bg-muted",children:v.thumbnail}),jsxs("div",{className:"min-w-0",children:[jsx("div",{className:"truncate font-medium",children:v.label}),v.description&&jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:v.description})]})]},v.key)})})}Zv.displayName="GridList";var Jv=cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),ik=cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),lk=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}}),Xs=X.forwardRef(({className:e,size:t,value:n,min:r=0,max:o=100,optimum:a,low:s,high:i,label:l,showValueLabel:c=false,formatValue:d,color:m="primary",trackVariant:f="default",...p},g)=>{let h=Math.min(100,Math.max(0,(n-r)/(o-r)*100)),b=()=>{if(m!=="auto")return "";let y=(n-r)/(o-r),x=s!==void 0?(s-r)/(o-r):.25,w=i!==void 0?(i-r)/(o-r):.75;return (a!==void 0?(a-r)/(o-r):1)>=.5?y<=x?"bg-red-500":y<=w?"bg-yellow-500":"bg-green-500":y>=w?"bg-red-500":y>=x?"bg-yellow-500":"bg-green-500"},v=d?d(n,h):`${Math.round(h)}%`;return jsxs("div",{ref:g,className:u("w-full",e),...p,children:[(l||c)&&jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[l&&jsx("span",{className:"text-sm font-medium text-foreground",children:l}),c&&jsx("span",{className:"text-sm text-muted-foreground",children:v})]}),jsx("div",{role:"meter","aria-valuenow":n,"aria-valuemin":r,"aria-valuemax":o,"aria-label":l,className:u(Jv({size:t})),children:jsx("div",{className:u(ik({variant:f})),children:jsx("div",{className:u(lk({color:m==="auto"?void 0:m,rounded:h>=100}),m==="auto"&&b()),style:{width:`${h}%`}})})})]})});Xs.displayName="Meter";var eh=X.forwardRef((e,t)=>jsx(Xs,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));eh.displayName="DiskUsageMeter";var th=X.forwardRef((e,t)=>jsx(Xs,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));th.displayName="BatteryMeter";var nh=cva("relative rounded-lg 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 min-h-48"}},defaultVariants:{size:"md"}}),Zs=(e,t,n)=>{let r=o=>{let a=(o+e/60)%6;return n-n*t*Math.max(Math.min(a,4-a,1),0)};return [Math.round(r(5)*255),Math.round(r(3)*255),Math.round(r(1)*255)]},rh=(e,t,n)=>{e/=255,t/=255,n/=255;let r=Math.max(e,t,n),o=Math.min(e,t,n),a=r-o,s=0,i=r===0?0:a/r,l=r;if(a!==0)switch(r){case e:s=((t-n)/a+(t<n?6:0))*60;break;case t:s=((n-e)/a+2)*60;break;case n:s=((e-t)/a+4)*60;break}return [s,i,l]},oh=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},ah=(e,t,n)=>"#"+[e,t,n].map(r=>r.toString(16).padStart(2,"0")).join(""),sh=X.forwardRef(({hue:e,saturation:t,brightness:n,value:r,defaultValue:o="#ff0000",onChange:a,onColorChange:s,size:i,disabled:l,thumbSize:c=18,className:d,...m},f)=>{let p=X.useRef(null),[g,h]=X.useState(false),b=X.useCallback(A=>{let K=oh(A);return K?rh(...K):[0,1,1]},[]),[v,y]=X.useState(()=>b(r||o)),x=e??v[0],w=t??v[1],C=n??v[2];X.useEffect(()=>{if(r){let A=b(r);y(A);}},[r,b]);let R=X.useCallback((A,K)=>{if(l||!p.current)return;let $=p.current.getBoundingClientRect(),G=Math.max(0,Math.min(1,(A-$.left)/$.width)),Y=Math.max(0,Math.min(1,(K-$.top)/$.height)),F=G,z=1-Y;t===void 0&&n===void 0&&y([x,F,z]),a?.({hue:x,saturation:F,brightness:z});let j=Zs(x,F,z);s?.(ah(...j));},[l,x,t,n,a,s]),T=A=>{l||(A.preventDefault(),h(true),A.target.setPointerCapture(A.pointerId),R(A.clientX,A.clientY));},M=A=>{g&&R(A.clientX,A.clientY);},k=A=>{h(false),A.target.releasePointerCapture(A.pointerId);},[P,E,N]=Zs(x,1,1),S=`rgb(${P}, ${E}, ${N})`,H=w*100,D=(1-C)*100,[L,I,V]=Zs(x,w,C),O=`rgb(${L}, ${I}, ${V})`;return jsx("div",{ref:f,className:u(nh({size:i}),l&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:S},onPointerDown:T,onPointerMove:M,onPointerUp:k,onPointerLeave:k,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 pointer-events-none",style:{width:c,height:c,left:`calc(${H}% - ${c/2}px)`,top:`calc(${D}% - ${c/2}px)`,backgroundColor:O,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});sh.displayName="ColorArea";var lh=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"}}),mk=`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")`,ih="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",ch=X.forwardRef(({value:e,defaultValue:t,onChange:n,channel:r="hue",baseColor:o="#ff0000",orientation:a,size:s,disabled:i,thumbSize:l=18,showBorder:c=true,className:d,...m},f)=>{let p=X.useRef(null),[g,h]=X.useState(false),b=()=>{switch(r){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[v,y]=X.useState(t??b()),x=e??v,w=r==="hue"?x/360:x,C=X.useCallback((S,H)=>{if(i||!p.current)return;let D=p.current.getBoundingClientRect(),L=a!=="vertical",I;L?I=Math.max(0,Math.min(1,(S-D.left)/D.width)):I=Math.max(0,Math.min(1,1-(H-D.top)/D.height));let V=r==="hue"?I*360:I;e===void 0&&y(V),n?.(V);},[i,a,r,e,n]),R=S=>{i||(S.preventDefault(),h(true),S.target.setPointerCapture(S.pointerId),C(S.clientX,S.clientY));},T=S=>{g&&C(S.clientX,S.clientY);},M=S=>{h(false),S.target.releasePointerCapture(S.pointerId);},k=()=>{let S=a!=="vertical",H=S?"to right":"to top";switch(r){case "hue":return S?ih:"linear-gradient(to top, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)";case "alpha":return `linear-gradient(${H}, transparent, ${o})`;case "saturation":return `linear-gradient(${H}, #808080, ${o})`;case "brightness":return `linear-gradient(${H}, #000000, ${o})`;default:return ih}},P=()=>r==="hue"?`hsl(${x}, 100%, 50%)`:o,E=a!=="vertical",N=w*100;return jsx("div",{ref:f,className:u(lh({orientation:a,size:s}),i&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:p,className:u("absolute inset-0 rounded-full overflow-hidden",c&&"border border-input"),style:{backgroundImage:r==="alpha"?mk:void 0,backgroundSize:r==="alpha"?"8px 8px":void 0},onPointerDown:R,onPointerMove:T,onPointerUp:M,onPointerLeave:M,children:[jsx("div",{className:"absolute inset-0 rounded-full",style:{background:k()}}),jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:l,height:l,...E?{left:`calc(${N}% - ${l/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${N}% - ${l/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:P(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});ch.displayName="ColorSlider";var dh=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"}}),gk=(e,t,n)=>{let r=e-n,o=t-n,a=Math.atan2(o,r)*180/Math.PI+90;return a<0&&(a+=360),a},uh=X.forwardRef(({value:e,defaultValue:t=0,onChange:n,size:r,disabled:o,innerRadius:a=.6,thumbSize:s=20,showCenter:i=true,className:l,...c},d)=>{let m=X.useRef(null),[f,p]=X.useState(false),[g,h]=X.useState(t),b=e??g,v=X.useCallback((R,T)=>{if(o||!m.current)return;let M=m.current.getBoundingClientRect(),k=M.width/2,P=R-M.left,E=T-M.top,N=gk(P,E,k);e===void 0&&h(N),n?.(N);},[o,e,n]),y=R=>{o||(R.preventDefault(),p(true),R.target.setPointerCapture(R.pointerId),v(R.clientX,R.clientY));},x=R=>{f&&v(R.clientX,R.clientY);},w=R=>{p(false),R.target.releasePointerCapture(R.pointerId);},C=()=>{let R=[];for(let T=0;T<=360;T+=30)R.push(`hsl(${T}, 100%, 50%) ${T}deg`);return `conic-gradient(from 270deg, ${R.join(", ")})`};return jsx("div",{ref:d,className:u(dh({size:r}),o&&"cursor-not-allowed opacity-50",l),...c,children:jsxs("div",{ref:m,className:"absolute inset-0 rounded-full",style:{background:C()},onPointerDown:y,onPointerMove:x,onPointerUp:w,onPointerLeave:w,children:[a<1&&jsx("div",{className:"absolute bg-background rounded-full",style:{top:`${(1-a)*50}%`,left:`${(1-a)*50}%`,width:`${a*100}%`,height:`${a*100}%`}}),i&&a<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(bk,{hue:b,innerRadius:a,thumbSize:s})]})})});uh.displayName="ColorWheel";var bk=({hue:e,innerRadius:t,thumbSize:n})=>{let r=(1-(1-t)/2)*50,o=(e-90)*Math.PI/180,a=50+r*Math.cos(o),s=50+r*Math.sin(o);return jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:n,height:n,left:`calc(${a}% - ${n/2}px)`,top:`calc(${s}% - ${n/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 fh=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-9 text-xs",md:"h-10 text-sm",lg:"h-11 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),Mo=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"}}),gh=X.forwardRef(({value:e,defaultValue:t="",onChange:n,onSearch:r,onSelect:o,suggestions:a=[],recentSearches:s=[],onClearRecentSearches:i,trendingSearches:l=[],isLoading:c,showClear:d=true,showIcon:m=true,popoverWidth:f="trigger",emptyMessage:p="No results found",size:g,variant:h,className:b,placeholder:v="Search...",disabled:y,...x},w)=>{let[C,R]=X.useState(false),[T,M]=X.useState(t),k=e!==void 0?e:T,P=X.useRef(null);X.useImperativeHandle(w,()=>P.current);let E=k.length>0,N=C&&(a.length>0||s.length>0||l.length>0||E),S=A=>{e===void 0&&M(A),n?.(A);},H=()=>{S(""),P.current?.focus();},D=A=>{A?.preventDefault(),k.trim()&&(r?.(k.trim()),R(false));},L=A=>{S(A.label),o?.(A),R(false);},I=A=>{S(A),r?.(A),R(false);},V=A=>{S(A),r?.(A),R(false);},O=X.useMemo(()=>{let A={};return a.forEach(K=>{let $=K.category||"Results";A[$]||(A[$]=[]),A[$].push(K);}),A},[a]);return jsxs(ot,{open:N,onOpenChange:R,children:[jsx(an,{children:jsxs("form",{onSubmit:D,className:u(fh({size:g,variant:h}),b),children:[m&&jsx(Search,{className:u(Mo({size:g}),"ml-3")}),jsx("input",{ref:P,type:"text",value:k,onChange:A=>S(A.target.value),onFocus:()=>R(true),placeholder:v,disabled:y,className:u("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!m&&"pl-3"),...x}),d&&E&&!y&&jsx("button",{type:"button",onClick:H,className:u("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",Mo({size:g})),children:jsx(X$1,{className:"h-full w-full"})})]})}),jsx(at,{className:"p-0",style:{width:f==="trigger"?"var(--radix-popover-trigger-width)":f},align:"start",onOpenAutoFocus:A=>A.preventDefault(),children:jsxs(Command,{className:"rounded-lg border-0",children:[s.length>0&&!E&&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"}),i&&jsx("button",{type:"button",onClick:i,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),s.map((A,K)=>jsxs("button",{type:"button",onClick:()=>I(A),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(Clock,{className:u(Mo({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:A}),jsx(ArrowRight,{className:u(Mo({size:g}),"opacity-0 group-hover:opacity-100")})]},K))]}),l.length>0&&!E&&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"})}),l.map((A,K)=>jsxs("button",{type:"button",onClick:()=>V(A),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(TrendingUp,{className:u(Mo({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:A})]},K))]}),E&&jsx("div",{className:"p-2",children:c?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"})}):a.length>0?Object.entries(O).map(([A,K])=>jsxs("div",{children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:A})}),K.map($=>jsxs("button",{type:"button",onClick:()=>L($),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[$.icon||jsx(Search,{className:u(Mo({size:g}))}),jsxs("div",{className:"flex-1 text-left",children:[jsx("div",{className:"truncate",children:$.label}),$.description&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:$.description})]})]},$.id))]},A)):jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});gh.displayName="SearchBar";var bh={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"})},xh=X.forwardRef(({open:e,onOpenChange:t,items:n=[],recentItems:r=[],placeholder:o="Search...",isLoading:a,emptyMessage:s="No results found.",filter:i,shortcut:l="\u2318K",onSelect:c,footer:d},m)=>{let[f,p]=X.useState(""),g=X.useRef(null),[h,b]=X.useState(false);X.useEffect(()=>{b(true);},[]),X.useEffect(()=>{e||p("");},[e]),X.useEffect(()=>{if(!e)return;let R=T=>{T.key==="Escape"&&t?.(false);};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[e,t]),X.useEffect(()=>{if(e)return Gt(),()=>Ut()},[e]);let v=X.useMemo(()=>{let R={};return n.forEach(T=>{let M=T.category||"Results";R[M]||(R[M]=[]),R[M].push(T);}),R},[n]),y=R=>{R.onSelect?.(),c?.(R),t?.(false);},x=()=>{t?.(false);},w=f.length>0,C=!w&&r.length>0;return !h||!e?null:Ba.createPortal(jsxs(Fragment,{children:[jsx("div",{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","data-state":e?"open":"closed",onClick:x}),jsx("div",{ref:m,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","data-state":e?"open":"closed",children:jsxs(Command,{className:"overflow-hidden rounded-xl border bg-background shadow-2xl",filter:i,shouldFilter:!i,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:g,value:f,onValueChange:p,placeholder:o,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"}),f&&jsx("button",{type:"button",onClick:()=>p(""),className:"rounded-sm p-1 text-muted-foreground hover:text-foreground",children:jsx(X$1,{className:"h-4 w-4"})})]}),jsx(Command.List,{className:"max-h-[400px] overflow-y-auto p-2",children:a?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:[C&&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(R=>jsxs(Command.Item,{value:R.label,onSelect:()=>y(R),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:R.icon||bh[R.category||""]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:R.label}),R.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:R.description})]}),R.shortcut&&jsx("div",{className:"flex items-center gap-1",children:R.shortcut.map((T,M)=>jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:T},M))})]},R.id))]}),w&&Object.entries(v).map(([R,T])=>jsxs(Command.Group,{heading:R,children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:R}),T.map(M=>jsxs(Command.Item,{value:`${M.label} ${M.keywords?.join(" ")||""}`,onSelect:()=>y(M),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:M.icon||bh[R]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:M.label}),M.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:M.description})]}),jsx(ArrowRight,{className:"h-4 w-4 text-muted-foreground opacity-0 group-aria-selected:opacity-100"})]},M.id))]},R)),jsx(Command.Empty,{className:"py-10 text-center text-sm text-muted-foreground",children:s})]})}),d?jsx("div",{className:"border-t px-4 py-3",children:d}):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:l})," to open"]})]})]})})]}),document.body)});xh.displayName="SpotlightSearch";function Lk(e="k"){let[t,n]=X.useState(false);return X.useEffect(()=>{let r=o=>{(o.metaKey||o.ctrlKey)&&o.key===e&&(o.preventDefault(),n(a=>!a));};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),{open:t,setOpen:n,toggle:()=>n(r=>!r)}}var wh=X.createContext(null),Qs=()=>{let e=X.useContext(wh);if(!e)throw new Error("useNotificationCenter must be used within a NotificationCenterProvider");return e},Ok=({children:e,notifications:t,onNotificationsChange:n})=>{let[r,o]=X.useState([]),[a,s]=X.useState(false),i=X.useRef(null),l=t!==void 0,c=l?t:r,d=X.useCallback(b=>{l?n?.(b):o(b);},[l,n]),m=c.filter(b=>!b.read).length,f=X.useCallback(b=>{d(c.map(v=>v.id===b?{...v,read:true}:v));},[c,d]),p=X.useCallback(()=>{d(c.map(b=>({...b,read:true})));},[c,d]),g=X.useCallback(b=>{d(c.filter(v=>v.id!==b));},[c,d]),h=X.useCallback(()=>{d([]);},[d]);return jsx(wh.Provider,{value:{notifications:c,unreadCount:m,markAsRead:f,markAllAsRead:p,removeNotification:g,clearAll:h,open:a,setOpen:s,triggerRef:i},children:e})},Ch=X.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("relative inline-block",e),...n,children:t}));Ch.displayName="NotificationCenter";var Th=X.forwardRef(({className:e,showBadge:t=true,children:n,onClick:r,...o},a)=>{let{unreadCount:s,open:i,setOpen:l,triggerRef:c}=Qs(),d=f=>{r?.(f),l(!i);},m=s>99?"99+":String(s);return jsxs("button",{ref:f=>{c.current=f,typeof a=="function"?a(f):a&&(a.current=f);},type:"button",onClick:d,"aria-label":"Notifications"+(s>0?", "+s+" unread":""),className:u("relative inline-flex items-center justify-center rounded-md p-2 text-muted-foreground hover:bg-accent hover:text-accent-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",e),...o,children:[n||jsx(Bell,{className:"h-5 w-5"}),t&&s>0&&jsx("span",{className:"absolute -top-1 -right-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-destructive px-1 text-xs font-medium text-danger-foreground",children:m})]})});Th.displayName="NotificationCenterTrigger";var Mh=X.forwardRef(({className:e,align:t="end",sideOffset:n=8,emptyMessage:r="No notifications",children:o,...a},s)=>{let{open:i,setOpen:l,notifications:c,markAllAsRead:d,clearAll:m,triggerRef:f}=Qs(),[p,g]=X.useState(false),h=X.useRef(null),[b,v]=X.useState({top:0,left:0});return X.useEffect(()=>{g(true);},[]),X.useEffect(()=>{if(!i||!f.current||!h.current)return;let y=()=>{if(!f.current||!h.current)return;let x=f.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),C=x.bottom+n,R=x.left;t==="center"?R=x.left+x.width/2-w.width/2:t==="end"&&(R=x.right-w.width),R+w.width>window.innerWidth-16&&(R=window.innerWidth-w.width-16),R<16&&(R=16),v({top:C,left:R});};return y(),window.addEventListener("resize",y),window.addEventListener("scroll",y,true),()=>{window.removeEventListener("resize",y),window.removeEventListener("scroll",y,true);}},[i,f,t,n]),X.useEffect(()=>{if(!i)return;let y=w=>{h.current&&!h.current.contains(w.target)&&f.current&&!f.current.contains(w.target)&&l(false);},x=w=>{w.key==="Escape"&&l(false);};return document.addEventListener("mousedown",y),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",y),document.removeEventListener("keydown",x);}},[i,l,f]),!p||!i?null:Ba.createPortal(jsxs("div",{ref:y=>{h.current=y,typeof s=="function"?s(y):s&&(s.current=y);},className:u("fixed z-50 w-80 sm:w-96 max-h-[70vh] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:b.top,left:b.left},...a,children:[jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[jsx("h3",{className:"font-semibold",children:"Notifications"}),jsxs("div",{className:"flex items-center gap-2",children:[c.length>0&&jsxs(Fragment,{children:[jsx("button",{type:"button",onClick:d,className:"text-xs text-muted-foreground hover:text-foreground",children:"Mark all read"}),jsx("button",{type:"button",onClick:m,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear all"})]}),jsx("button",{type:"button",onClick:()=>l(false),className:"rounded-md p-1 hover:bg-accent",children:jsx(X$1,{className:"h-4 w-4"})})]})]}),jsx("div",{className:"max-h-[calc(70vh-60px)] overflow-y-auto",children:o||(c.length===0?jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-muted-foreground",children:[jsx(Bell,{className:"h-10 w-10 mb-2 opacity-50"}),jsx("p",{className:"text-sm",children:r})]}):c.map(y=>jsx(ec,{notification:y},y.id)))})]}),document.body)});Mh.displayName="NotificationCenterContent";var Bk={info:"border-l-blue-500",success:"border-l-green-500",warning:"border-l-yellow-500",error:"border-l-red-500"},Fk={info:Info,success:CheckCircle,warning:AlertTriangle,error:AlertCircle},ec=({notification:e,onMarkAsRead:t,onRemove:n})=>{let{markAsRead:r,removeNotification:o}=Qs(),{id:a,title:s,description:i,type:l="info",timestamp:c,read:d,avatar:m,action:f}=e,p=Fk[l],g=()=>{t?t():r(a);},h=()=>{n?n():o(a);},b=v=>{if(!v)return null;let y=typeof v=="string"?new Date(v):v,w=new Date().getTime()-y.getTime(),C=Math.floor(w/6e4),R=Math.floor(w/36e5),T=Math.floor(w/864e5);return C<1?"Just now":C<60?C+"m ago":R<24?R+"h ago":T<7?T+"d ago":y.toLocaleDateString()};return jsxs("div",{className:u("group relative flex gap-3 border-b border-l-4 px-4 py-3 transition-colors hover:bg-accent/50",Bk[l],!d&&"bg-accent/20"),children:[jsx("div",{className:"flex-shrink-0",children:m||jsx("div",{className:u("flex h-8 w-8 items-center justify-center rounded-full",l==="info"&&"bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-400",l==="success"&&"bg-green-100 text-green-600 dark:bg-green-900 dark:text-green-400",l==="warning"&&"bg-yellow-100 text-yellow-600 dark:bg-yellow-900 dark:text-yellow-400",l==="error"&&"bg-red-100 text-red-600 dark:bg-red-900 dark:text-red-400"),children:jsx(p,{className:"h-4 w-4"})})}),jsxs("div",{className:"flex-1 min-w-0",children:[jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsx("p",{className:u("text-sm font-medium",!d&&"font-semibold"),children:s}),!d&&jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full bg-primary"})]}),i&&jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-2",children:i}),jsxs("div",{className:"mt-2 flex items-center gap-3",children:[c&&jsx("span",{className:"text-xs text-muted-foreground",children:b(c)}),f&&jsx("button",{type:"button",onClick:f.onClick,className:"text-xs font-medium text-primary hover:underline",children:f.label})]})]}),jsx("div",{className:"flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:jsxs("div",{className:"flex gap-1",children:[!d&&jsx("button",{type:"button",onClick:g,className:"rounded-md p-1 hover:bg-accent",title:"Mark as read",children:jsx(Check,{className:"h-4 w-4"})}),jsx("button",{type:"button",onClick:h,className:"rounded-md p-1 hover:bg-accent text-danger",title:"Remove",children:jsx(Trash2,{className:"h-4 w-4"})})]})})]})};ec.displayName="NotificationItem";var Nh=X.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("divide-y",e),...n,children:t}));Nh.displayName="NotificationList";var kh=cva("relative flex items-center justify-center gap-3 px-4 py-2.5 text-sm",{variants:{variant:{solid:"",flat:""},type:{default:"",success:"",warning:"",error:""},position:{top:"fixed top-0 left-0 right-0 z-50",relative:"relative"}},compoundVariants:[{variant:"solid",type:"default",className:"bg-primary text-primary-foreground [&>svg]:text-primary-foreground"},{variant:"flat",type:"default",className:"bg-primary/10 text-primary [&>svg]:text-primary"},{variant:"solid",type:"success",className:"bg-green-600 text-white dark:bg-green-500 [&>svg]:text-white"},{variant:"flat",type:"success",className:"bg-green-600/10 text-green-600 dark:bg-green-500/10 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"solid",type:"warning",className:"bg-amber-600 text-white dark:bg-amber-500 [&>svg]:text-white"},{variant:"flat",type:"warning",className:"bg-amber-600/10 text-amber-600 dark:bg-amber-500/10 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"solid",type:"error",className:"bg-red-600 text-white dark:bg-red-500 [&>svg]:text-white"},{variant:"flat",type:"error",className:"bg-red-600/10 text-red-600 dark:bg-red-500/10 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"}],defaultVariants:{variant:"solid",type:"default",position:"relative"}}),Yk={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},Ph=X.forwardRef(({message:e,type:t="default",variant:n="solid",showIcon:r=false,icon:o,dismissible:a=true,onDismiss:s,endContent:i,position:l,animate:c,autoDismiss:d,storageKey:m,className:f,...p},g)=>{let[h,b]=X.useState(true),[v,y]=X.useState(false);X.useEffect(()=>{m&&localStorage.getItem(`banner-${m}`)==="true"&&b(false);},[m]),X.useEffect(()=>{if(d&&h){let R=setTimeout(()=>{x();},d);return ()=>clearTimeout(R)}},[d,h]);let x=()=>{y(true),setTimeout(()=>{b(false),m&&localStorage.setItem(`banner-${m}`,"true"),s?.();},200);};if(!h)return null;let w=Yk[t],C=r?o!==void 0?o:w?jsx(w,{className:"h-4 w-4"}):null:null;return jsxs("div",{ref:g,className:u(kh({variant:n,type:t,position:l}),c&&"animate-pulse",v&&"animate-out fade-out slide-out-to-top duration-200",f),role:"banner",...p,children:[C&&jsx("span",{className:"shrink-0",children:C}),jsx("span",{className:"text-center font-medium",children:e}),i&&jsx("div",{className:"shrink-0 ml-2",children:i}),a&&jsx("button",{type:"button",onClick:x,className:u("absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-1 transition-opacity hover:opacity-70 cursor-pointer",l==="relative"&&"right-4"),"aria-label":"Dismiss banner",children:jsx(X$1,{className:"h-4 w-4"})})]})});Ph.displayName="Banner";var fa=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:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",bordered:"border border-zinc-300 dark:border-zinc-700 bg-transparent text-primary hover:opacity-70",light:"bg-transparent text-primary hover:bg-primary/10",flat:"bg-primary/20 text-primary hover:opacity-70",ghost:"border border-zinc-300 dark:border-zinc-700 bg-transparent text-primary hover:bg-primary hover:text-primary-foreground hover:border-primary"},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:"solid",size:"md",position:"bottom-right"}}),Zk=cva("transition-transform duration-200 [&>svg]:h-full [&>svg]:w-full",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),nc=X.forwardRef(({icon:e,label:t="Action button",extended:n,extendedLabel:r,actions:o,direction:a="up",showTooltip:s=true,closeIcon:i,animation:l="rotate",variant:c,size:d,position:m,className:f,onClick:p,disabled:g,...h},b)=>{let[v,y]=X.useState(false),x=o&&o.length>0,w=k=>{x&&y(!v),p?.(k);},C=k=>{k.onClick?.(),y(false);},R={up:{container:"flex-col-reverse bottom-full mb-3 gap-3",item:""},down:{container:"flex-col top-full mt-3 gap-3",item:""},left:{container:"flex-row-reverse right-full mr-3 gap-3",item:""},right:{container:"flex-row left-full ml-3 gap-3",item:""}},T=l==="rotate"&&v?"rotate-45":"",M=l==="scale"&&v?"scale-0":"scale-100";return jsxs("div",{className:u("relative z-50",m!=="relative"&&m&&fa({position:m})),children:[x&&v&&jsx("div",{className:u("absolute left-1/2 -translate-x-1/2 flex items-center",R[a].container),children:o.map((k,P)=>jsxs("div",{className:u("flex items-center gap-2 animate-in fade-in zoom-in duration-200",a==="up"||a==="down"?"flex-row":"flex-col"),style:{animationDelay:`${P*50}ms`},children:[s&&(a==="up"||a==="down")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:k.label}),k.href?jsx("a",{href:k.href,className:u(fa({variant:k.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":k.label,children:k.icon}):jsx("button",{type:"button",onClick:()=>C(k),className:u(fa({variant:k.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":k.label,children:k.icon}),s&&(a==="left"||a==="right")&&jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:k.label})]},k.id))}),jsxs("button",{ref:b,type:"button",onClick:w,disabled:g,className:u(fa({variant:c,size:d,position:"relative"}),n&&"w-auto px-6 gap-2",f),"aria-label":t,"aria-expanded":x?v:void 0,...h,children:[v&&i?i:jsx("span",{className:u(Zk({size:d}),T,M,"transition-all duration-200"),children:e||jsx(Plus,{})}),n&&r&&jsx("span",{className:"font-medium",children:r})]}),x&&v&&jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>y(false)})]})});nc.displayName="FloatingActionButton";var Qk=nc;var Hh=cva("fixed bottom-0 left-0 right-0 z-50 flex items-center justify-around border-t bg-background safe-area-pb",{variants:{variant:{default:"border-border",elevated:"border-transparent shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.1)]",filled:"border-transparent bg-primary text-primary-foreground"},size:{sm:"h-14",md:"h-16",lg:"h-20"}},defaultVariants:{variant:"default",size:"md"}}),Lh=cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors cursor-pointer",{variants:{variant:{default:"",elevated:"",filled:""}},defaultVariants:{variant:"default"}}),Ih=X.forwardRef(({className:e,variant:t,size:n,items:r,value:o,defaultValue:a,onValueChange:s,showLabels:i="all",renderItem:l,...c},d)=>{let[m,f]=X.useState(a||r[0]?.key),p=o!==void 0,g=p?o:m,h=x=>{x.disabled||(p||f(x.key),s?.(x.key));},b=x=>t==="filled"?x?"text-primary-foreground":"text-primary-foreground/60 hover:text-primary-foreground/80":x?"text-primary":"text-muted-foreground hover:text-foreground",v=()=>{switch(n){case "sm":return "h-5 w-5";case "lg":return "h-7 w-7";default:return "h-6 w-6"}},y=()=>{switch(n){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsx("nav",{ref:d,className:u(Hh({variant:t,size:n}),e),role:"navigation","aria-label":"Bottom navigation",...c,children:r.map(x=>{let w=g===x.key,C=i==="all"||i==="active"&&w,R=w&&x.activeIcon?x.activeIcon:x.icon;if(l)return jsx("div",{onClick:()=>h(x),className:u(Lh({variant:t}),x.disabled&&"opacity-50 cursor-not-allowed"),children:l(x,w)},x.key);let T=jsxs("div",{onClick:()=>!x.href&&h(x),className:u(Lh({variant:t}),b(w),x.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":w?"page":void 0,"aria-disabled":x.disabled,tabIndex:x.disabled?-1:0,onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),h(x));},children:[jsxs("div",{className:"relative",children:[jsx("span",{className:u(v(),"[&>svg]:h-full [&>svg]:w-full"),children:R}),x.badge!==void 0&&x.badge>0&&jsx("span",{className:"absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-medium text-white",children:x.badge>99?"99+":x.badge}),x.showDot&&jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2 w-2 rounded-full bg-red-500"})]}),C&&x.label&&jsx("span",{className:u(y(),"font-medium truncate max-w-full px-1"),children:x.label})]},x.key);return x.href&&!x.disabled?jsx("a",{href:x.href,onClick:()=>h(x),className:u("flex flex-1 flex-col items-center justify-center gap-1 no-underline",b(w)),children:T},x.key):T})})});Ih.displayName="BottomNavigation";var eP="fixed inset-x-0 bottom-0 z-50 mt-24 flex h-fit max-h-[90vh] flex-col rounded-t-[20px] border-t border-border/40 dark:border-border/20 bg-background",Ah=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-danger hover:bg-destructive/10"}},defaultVariants:{variant:"default"}}),zh=X.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r,description:o,items:a,cancelLabel:s="Cancel",onCancel:i,showCancel:l=true,children:c,closeOnSelect:d=true,onAction:m},f)=>{let p=g=>{g.isDisabled||(g.onSelect?.(),m?.(g.key),d&&t?.(false));};return jsxs(Drawer.Root,{open:e,onOpenChange:t,children:[n&&jsx(Drawer.Trigger,{asChild:true,children:n}),jsxs(Drawer.Portal,{children:[jsx(Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/40"}),jsxs(Drawer.Content,{ref:f,className:eP,children:[jsx("div",{className:"mx-auto mt-4 h-1.5 w-12 flex-shrink-0 rounded-full bg-muted"}),(r||o)&&jsxs("div",{className:"px-4 py-3 text-center",children:[r&&jsx(Drawer.Title,{className:"text-base font-semibold",children:r}),o&&jsx(Drawer.Description,{className:"mt-1 text-sm text-muted-foreground",children:o})]}),jsx("div",{className:"flex-1 overflow-y-auto",children:c||jsx("div",{className:"divide-y divide-border/40 dark:divide-border/20",children:a?.map(g=>jsxs("button",{type:"button",disabled:g.isDisabled,onClick:()=>p(g),className:u(Ah({variant:g.isDestructive?"destructive":"default"})),children:[g.icon&&jsx("span",{className:"h-5 w-5 flex-shrink-0 [&>svg]:h-full [&>svg]:w-full",children:g.icon}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"font-medium",children:g.label}),g.description&&jsx("div",{className:"text-sm text-muted-foreground truncate",children:g.description})]})]},g.key))})}),l&&jsx("div",{className:"border-t border-border/40 dark:border-border/20 p-2 pb-safe",children:jsx(Drawer.Close,{asChild:true,children:jsx("button",{type:"button",onClick:i,className:"w-full rounded-lg bg-muted py-3.5 text-center font-semibold transition-colors hover:bg-muted/80",children:s})})})]})]})]})});zh.displayName="ActionSheet";var Bh=cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),oc=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"}}),Fh=X.forwardRef(({className:e,variant:t,leftActions:n=[],rightActions:r=[],actionSize:o="md",threshold:a=.3,onSwipeEnd:s,disabled:i=false,fullSwipeAction:l,children:c,...d},m)=>{let f=X.useRef(null),[p,g]=X.useState(0),[h,b]=X.useState(false),v=X.useRef(0),y=X.useRef(0),x=n.length*(o==="sm"?64:o==="lg"?96:80),w=r.length*(o==="sm"?64:o==="lg"?96:80),C=P=>{i||(b(true),v.current=P.touches[0].clientX,y.current=p);},R=P=>{if(!h||i)return;let N=P.touches[0].clientX-v.current,S=y.current+N;(S>0&&n.length===0||S<0&&r.length===0)&&(S=0),S>x?S=x+(S-x)*.3:S<-w&&(S=-w+(S+w)*.3),g(S);},T=()=>{if(!h)return;b(false);let P=f.current?.offsetWidth||0,E=Math.abs(p)/P;if(l&&E>.6){l==="right"&&p>0&&n[0]?(n[0].onAction?.(),s?.("right",n[0].key)):l==="left"&&p<0&&r[0]&&(r[0].onAction?.(),s?.("left",r[0].key)),g(0);return}p>x*a&&n.length>0?(g(x),s?.("right")):p<-w*a&&r.length>0?(g(-w),s?.("left")):g(0);},M=(P,E)=>{P.onAction?.(),s?.(E,P.key),g(0);},k=()=>{g(0);};return jsxs("div",{ref:m,className:u(Bh({variant:t,className:e})),...d,children:[n.length>0&&p>0&&jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:x},children:n.map(P=>jsxs("button",{type:"button",onClick:()=>M(P,"right"),className:u(oc({variant:P.variant,size:o})),style:{opacity:Math.min(1,p/x)},children:[P.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:P.icon}),!P.icon&&P.label]},P.key))}),r.length>0&&p<0&&jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:w},children:r.map(P=>jsxs("button",{type:"button",onClick:()=>M(P,"left"),className:u(oc({variant:P.variant,size:o})),style:{opacity:Math.min(1,Math.abs(p)/w)},children:[P.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:P.icon}),!P.icon&&P.label]},P.key))}),jsx("div",{ref:f,className:u("relative bg-background",h?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:C,onTouchMove:R,onTouchEnd:T,onClick:p!==0?k:void 0,children:c})]})});Fh.displayName="SwipeActions";var $h=cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),rP=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"}}),Gh=X.forwardRef(({className:e,variant:t,onRefresh:n,pullThreshold:r=80,maxPullDistance:o=120,loadingIndicator:a,pullIndicator:s,indicatorSize:i="md",disabled:l=false,pullText:c="Pull to refresh",releaseText:d="Release to refresh",refreshingText:m="Refreshing...",children:f,...p},g)=>{let h=X.useRef(null),[b,v]=X.useState(0),[y,x]=X.useState("idle"),w=X.useRef(0),C=X.useRef(false),R=()=>l||y==="refreshing"?false:(h.current?.scrollTop??window.scrollY)<=0,T=N=>{R()&&(w.current=N.touches[0].clientY,C.current=true);},M=N=>{if(!C.current||!R())return;let H=N.touches[0].clientY-w.current;if(H<0){v(0),x("idle");return}let L=Math.min(H*.5,o);v(L),x(L>=r?"ready":"pulling");},k=async()=>{if(C.current)if(C.current=false,y==="ready"){x("refreshing"),v(r*.6);try{await n();}finally{x("idle"),v(0);}}else x("idle"),v(0);},P={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[i],E=()=>{if(y==="refreshing")return a||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(Loader2,{className:u(P,"animate-spin text-primary")}),jsx("span",{className:"text-xs text-muted-foreground",children:m})]});let N=Math.min(b/r*180,180);return s||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(ArrowDown,{className:u(P,"text-muted-foreground transition-transform"),style:{transform:`rotate(${N}deg)`}}),jsx("span",{className:"text-xs text-muted-foreground",children:y==="ready"?d:c})]})};return jsxs("div",{ref:g,className:u($h({variant:t,className:e})),...p,children:[jsx("div",{className:u(rP({size:i}),"z-10",y==="idle"&&b===0&&"opacity-0"),style:{top:Math.max(b-60,-60),opacity:Math.min(b/(r*.5),1)},children:E()}),jsx("div",{ref:h,className:u("transition-transform duration-200",y==="refreshing"&&"ease-out"),style:{transform:`translateY(${b}px)`,transition:C.current?"none":void 0},onTouchStart:T,onTouchMove:M,onTouchEnd:k,children:f})]})});Gh.displayName="PullToRefresh";var Gr=(e,t,n)=>({duration:e,delay:t,ease:n||[.4,0,.2,1]}),oP={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},Uh=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialOpacity:i=0,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=jsx(motion.div,{ref:d,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:oP,custom:i,transition:Gr(n,r,o),className:u(a),onAnimationStart:l,onAnimationComplete:c,children:t});return s?jsx(AnimatePresence,{children:e&&m}):m});Uh.displayName="Fade";var aP=(e,t)=>{let n=typeof t=="number"?`${t}px`:t,r={up:{y:n},down:{y:`-${n}`},left:{x:n},right:{x:`-${n}`}};return {hidden:{opacity:0,...r[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...r[e]}}},jh=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,direction:i="up",offset:l=20,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=X.useMemo(()=>aP(i,l),[i,l]),p=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:Gr(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});jh.displayName="Slide";var sP={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"},iP={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},Wh=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialScale:i=.9,origin:l="center",onAnimationStart:c,onAnimationComplete:d},m)=>{let f=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:iP,custom:i,transition:Gr(n,r,o),className:u(a),style:{transformOrigin:sP[l]},onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&f}):f});Wh.displayName="Scale";var _h=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,horizontal:s=false,startingSize:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=s?"width":"height",p={hidden:{[f]:i,opacity:l?0:1},visible:{[f]:"auto",opacity:1},exit:{[f]:i,opacity:l?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:Gr(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});_h.displayName="Collapse";var Yh=X.forwardRef(({show:e=true,children:t,duration:n=.4,delay:r=0,ease:o,className:a,initialWidth:s=0,initialHeight:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{width:s,height:i,opacity:l?0:1},visible:{width:"auto",height:"auto",opacity:1},exit:{width:s,height:i,opacity:l?0:1}};return jsx(AnimatePresence,{initial:false,children:e&&jsx(motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:f,transition:Gr(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});Yh.displayName="Expand";var Xh=X.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialRotation:i=-180,finalRotation:l=0,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{opacity:0,rotate:i},visible:{opacity:1,rotate:l},exit:{opacity:0,rotate:i}},p=jsx(motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:Gr(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});Xh.displayName="Rotate";var qh=X.forwardRef(({front:e,back:t,direction:n="horizontal",flipped:r=false,duration:o=.6,delay:a=0,ease:s,className:i,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=n==="horizontal"?"rotateY":"rotateX";return jsx("div",{ref:d,className:u("relative",i),style:{perspective:1e3},children:jsxs(motion.div,{animate:{[m]:r?180:0},transition:Gr(o,a,s),style:{transformStyle:"preserve-3d"},onAnimationStart:l,onAnimationComplete:c,children:[jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden"},children:e}),jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden",transform:`${m}(180deg)`},children:t})]})})});qh.displayName="Flip";var Zh=X.forwardRef(({color:e="currentColor",duration:t=.6,children:n,className:r,disabled:o=false},a)=>{let[s,i]=X.useState([]),l=X.useRef(null),c=m=>{if(o)return;let f=l.current;if(!f)return;let p=f.getBoundingClientRect(),g=m.clientX-p.left,h=m.clientY-p.top,b=Math.max(p.width,p.height)*2,v={id:Date.now(),x:g,y:h,size:b};i(y=>[...y,v]);},d=m=>{i(f=>f.filter(p=>p.id!==m));};return jsxs("div",{ref:a,className:u("relative overflow-hidden rounded-[inherit]",r),onClick:c,children:[jsx("div",{ref:l,className:"relative z-0",children:n}),jsx(AnimatePresence,{children:s.map(m=>jsx(motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>d(m.id),className:"pointer-events-none absolute rounded-full",style:{left:m.x-m.size/2,top:m.y-m.size/2,width:m.size,height:m.size,backgroundColor:e}},m.id))})]})});Zh.displayName="Ripple";var Qh=X.forwardRef(({children:e,animate:t=true,height:n=10,duration:r=.5,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=X.useState(false),d=s?l:t,m={idle:{y:0},bounce:{y:[0,-n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"bounce":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});Qh.displayName="Bounce";var dP={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]},Jh=X.forwardRef(({children:e,animate:t=true,intensity:n="normal",duration:r=.5,count:o=1,className:a,triggerOnHover:s=false},i)=>{let[l,c]=X.useState(false),d=s?l:t,m={idle:{x:0},shake:{x:dP[n],transition:{duration:r,ease:"easeInOut",repeat:o-1}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"shake":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});Jh.displayName="Shake";var uP={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},ex=X.forwardRef(({children:e,animate:t=true,speed:n="normal",className:r},o)=>jsx("div",{ref:o,className:u(t&&uP[n],r),children:e}));ex.displayName="Pulse";var tx=X.forwardRef(({children:e,animate:t=true,angle:n=10,duration:r=.3,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=X.useState(false),d=s?l:t,m={idle:{rotate:0},wiggle:{rotate:[0,-n,n,-n,n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsx(motion.div,{ref:i,variants:m,initial:"idle",animate:d?"wiggle":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});tx.displayName="Wiggle";var nx=X.forwardRef(({children:e,animate:t=false,scale:n=1.2,duration:r=.2,className:o,triggerOnHover:a=false,triggerOnClick:s=false},i)=>{let[l,c]=X.useState(false),d=t||l,m={type:"spring",stiffness:400,damping:17,duration:r},f=()=>{s&&(c(true),setTimeout(()=>c(false),r*1e3));};return jsx(motion.div,{ref:i,animate:{scale:d?n:1},transition:m,className:u(o),onMouseEnter:()=>a&&c(true),onMouseLeave:()=>a&&c(false),onClick:f,children:e})});nx.displayName="Pop";var vP=(e,t,n,r)=>{let o=e.toFixed(t),[a,s]=o.split("."),i=a.replace(/\B(?=(\d{3})+(?!\d))/g,n);return s?`${i}${r}${s}`:i},rx=X.forwardRef(({value:e,from:t=0,duration:n=2,decimals:r=0,prefix:o="",suffix:a="",separator:s=",",decimalSeparator:i=".",animateOnView:l=true,delay:c=0,className:d,onComplete:m},f)=>{let p=X.useRef(null),g=useInView(p,{once:true}),[h,b]=X.useState(!l);X.useEffect(()=>{if(l&&g){let x=setTimeout(()=>b(true),c*1e3);return ()=>clearTimeout(x)}},[l,g,c]);let v=useMotionValue(t),y=useTransform(v,x=>vP(x,r,s,i));return X.useEffect(()=>{if(h){let x=animate(v,e,{duration:n,ease:"easeOut",onComplete:m});return ()=>x.stop()}},[h,e,n,v,m]),jsx("span",{ref:p,className:u(d),children:jsxs("span",{ref:f,children:[o,jsx(motion.span,{children:y}),a]})})});rx.displayName="Counter";var ox=X.forwardRef(({text:e,speed:t=50,delay:n=0,pauseBetween:r=1500,cursor:o=true,cursorChar:a="|",loop:s=false,deleteSpeed:i=30,animateOnView:l=true,className:c,cursorClassName:d,onComplete:m},f)=>{let p=Array.isArray(e)?e:[e],[g,h]=X.useState(""),[b,v]=X.useState(0),[y,x]=X.useState(false),[w,C]=X.useState(false),R=X.useRef(null),T=useInView(R,{once:true}),[M,k]=X.useState(!l);return X.useEffect(()=>{if(l&&T){let P=setTimeout(()=>k(true),n*1e3);return ()=>clearTimeout(P)}},[l,T,n]),X.useEffect(()=>{if(!M||w)return;let P=p[b],E;return y?g.length>0?E=setTimeout(()=>{h(g.slice(0,-1));},i):(x(false),v(N=>(N+1)%p.length)):g.length<P.length?E=setTimeout(()=>{h(P.slice(0,g.length+1));},t):b<p.length-1||s?E=setTimeout(()=>{x(true);},r):(C(true),m?.()),()=>clearTimeout(E)},[M,g,b,y,w,p,t,i,r,s,m]),jsxs("span",{ref:R,className:u(c),children:[jsx("span",{ref:f,children:g}),o&&jsx(motion.span,{animate:{opacity:[1,0]},transition:{duration:.8,repeat:1/0,repeatType:"reverse"},className:u("ml-0.5",d),children:a})]})});ox.displayName="Typewriter";var ax=X.forwardRef(({children:e,direction:t="up",stagger:n=.05,duration:r=.5,delay:o=0,splitBy:a="word",animateOnView:s=true,className:i},l)=>{let c=X.useRef(null),d=useInView(c,{once:true,amount:.5}),m=s?d:true,f=typeof e=="string"?e:"",p=a==="word"?f.split(" "):f.split(""),g={up:{y:20},down:{y:-20},left:{x:20},right:{x:-20}},h={hidden:{},visible:{transition:{staggerChildren:n,delayChildren:o}}},b={hidden:{opacity:0,...g[t]},visible:{opacity:1,x:0,y:0,transition:{duration:r,ease:"easeInOut"}}};return jsx(motion.div,{ref:l,className:u("inline-flex flex-wrap",i),variants:h,initial:"hidden",animate:m?"visible":"hidden",children:jsx("span",{ref:c,children:p.map((v,y)=>jsxs(motion.span,{variants:b,className:"inline-block",children:[v,a==="word"&&y<p.length-1&&"\xA0"]},y))})})});ax.displayName="TextReveal";var sx=X.forwardRef(({words:e,duration:t=2,animation:n="slide",animationDuration:r=.5,className:o,loop:a=true},s)=>{let[i,l]=X.useState(0);X.useEffect(()=>{if(!a&&i===e.length-1)return;let d=setInterval(()=>{l(m=>(m+1)%e.length);},t*1e3);return ()=>clearInterval(d)},[e.length,t,a,i]);let c=()=>{switch(n){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:u("relative inline-block",o),children:jsx(AnimatePresence,{mode:"wait",children:jsx(motion.span,{variants:c(),initial:"initial",animate:"animate",exit:"exit",transition:{duration:r},className:"inline-block",children:e[i]},e[i])})})});sx.displayName="WordRotate";var dx=X.forwardRef(({children:e,direction:t="up",distance:n=50,duration:r=.6,delay:o=0,once:a=true,threshold:s=.1,className:i,scale:l,rotate:c,blur:d,ease:m=[.4,0,.2,1]},f)=>{let p=X.useRef(null),g=useInView(p,{once:a,amount:s}),b={up:{x:0,y:n},down:{x:0,y:-n},left:{x:n,y:0},right:{x:-n,y:0},none:{x:0,y:0}}[t],v={hidden:{opacity:0,x:b.x,y:b.y,scale:l??1,rotate:c??0,filter:d?`blur(${d}px)`:"blur(0px)"},visible:{opacity:1,x:0,y:0,scale:1,rotate:0,filter:"blur(0px)",transition:{duration:r,delay:o,ease:m}}};return jsx("div",{ref:p,children:jsx(motion.div,{ref:f,variants:v,initial:"hidden",animate:g?"visible":"hidden",className:u(i),children:e})})});dx.displayName="ScrollReveal";var ux=X.forwardRef(({position:e="top",size:t=4,color:n="hsl(var(--primary))",backgroundColor:r="transparent",zIndex:o=50,className:a,container:s,showPercentage:i=false,useSpring:l=true},c)=>{let{scrollYProgress:d}=useScroll({container:s}),m=useSpring(d,{stiffness:100,damping:30,restDelta:.001}),f=l?m:d,p=e==="top"||e==="bottom",g={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}},h=p?"scaleX":"scaleY",b=p?"left":"top";return jsxs("div",{ref:c,className:u("fixed",a),style:{...g[e],zIndex:o,backgroundColor:r},children:[jsx(motion.div,{className:"h-full w-full",style:{[h]:f,transformOrigin:b,backgroundColor:n}}),i&&jsx(xP,{progress:f,position:e})]})});ux.displayName="ScrollProgress";var xP=({progress:e,position:t})=>{let n=useTransform(e,s=>Math.round(s*100)),[r,o]=X.useState(0);return X.useEffect(()=>{let s=n.on("change",o);return ()=>s()},[n]),jsxs("span",{className:u("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,"%"]})},mx=X.forwardRef(({children:e,speed:t=.5,direction:n="vertical",className:r,container:o},a)=>{let s=X.useRef(null),{scrollYProgress:i}=useScroll({target:s,container:o,offset:["start end","end start"]}),l=[-100*t,100*t],c=useTransform(i,[0,1],l),d=useSpring(c,{stiffness:100,damping:30}),m=n==="horizontal"?d:0,f=n==="vertical"?d:0;return jsx("div",{ref:s,className:u("overflow-hidden",r),children:jsx(motion.div,{ref:a,style:{x:m,y:f},children:e})})});mx.displayName="Parallax";var gx=X.forwardRef(({children:e,width:t,height:n,duration:r=1.5,direction:o="right",baseColor:a="hsl(var(--muted))",highlightColor:s="hsl(var(--muted-foreground) / 0.1)",borderRadius:i,className:l,active:c=true},d)=>{let m={left:"to left",right:"to right",top:"to top",bottom:"to bottom"},f={left:"shimmer-left",right:"shimmer-right",top:"shimmer-top",bottom:"shimmer-bottom"};return jsxs("div",{ref:d,className:u("relative overflow-hidden",l),style:{width:t,height:n,borderRadius:i,backgroundColor:a},children:[e,c&&jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(${m[o]}, transparent, ${s}, transparent)`,animation:`${f[o]} ${r}s infinite`}}),jsx("style",{children:`
56
56
  @keyframes shimmer-right {
57
57
  0% { transform: translateX(-100%); }
58
58
  100% { transform: translateX(100%); }
@@ -69,5 +69,5 @@ import*as X from'react';import {createContext,useState,useEffect,useContext,useC
69
69
  0% { transform: translateY(-100%); }
70
70
  100% { transform: translateY(100%); }
71
71
  }
72
- `})]})});kx.displayName="Shimmer";var IP={sm:24,md:40,lg:56,xl:80},VP={default:{circle:"stroke-muted-foreground",check:"stroke-foreground"},success:{circle:"stroke-green-500",check:"stroke-green-500"},primary:{circle:"stroke-primary",check:"stroke-primary"},outline:{circle:"stroke-border",check:"stroke-foreground"}},Px=X.forwardRef(({show:e=true,size:t="md",variant:n="success",strokeWidth:r=2,duration:o=.6,delay:a=0,className:s,onComplete:i},l)=>{let c=IP[t],d=VP[n],m={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a,ease:"easeOut"}}},f={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a+o*.4,ease:"easeOut"}}};return jsxs("svg",{ref:l,width:c,height:c,viewBox:"0 0 50 50",className:u(s),children:[jsx(motion.circle,{cx:"25",cy:"25",r:"22",fill:"none",strokeWidth:r,className:d.circle,variants:m,initial:"hidden",animate:e?"visible":"hidden"}),jsx(motion.path,{d:"M14 27 L22 35 L36 18",fill:"none",strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round",className:d.check,variants:f,initial:"hidden",animate:e?"visible":"hidden",onAnimationComplete:()=>e&&i?.()})]})});Px.displayName="Checkmark";var Do={particleCount:100,spread:70,startVelocity:30,decay:.95,gravity:1,colors:["#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff"],origin:{x:.5,y:.5},shapes:["square","circle"],scalar:1,drift:0,ticks:200},Ex=X.forwardRef(({autoTrigger:e=false,delay:t=0,options:n={},children:r,onTrigger:o},a)=>{let s=X.useCallback(()=>{let i={...Do,...n};So(i),o?.();},[n,o]);return X.useEffect(()=>{if(e){let i=setTimeout(s,t);return ()=>clearTimeout(i)}},[e,t,s]),r?jsx("div",{ref:a,onClick:s,className:"inline-block cursor-pointer",children:r}):null});Ex.displayName="Confetti";var AP=()=>{let e=X.useCallback(r=>{let o={...Do,...r};So(o);},[]),t=X.useCallback(()=>{let o=Date.now()+3e3,a=setInterval(()=>{let s=o-Date.now();if(s<=0){clearInterval(a);return}let i=50*(s/3e3);So({...Do,particleCount:i,origin:{x:Math.random()*.4+.1,y:Math.random()-.2}}),So({...Do,particleCount:i,origin:{x:Math.random()*.4+.5,y:Math.random()-.2}});},250);},[]),n=X.useCallback((r="both")=>{let o={x:0,y:1},a={x:1,y:1};(r==="left"||r==="both")&&So({...Do,particleCount:50,angle:60,spread:55,origin:o}),(r==="right"||r==="both")&&So({...Do,particleCount:50,angle:120,spread:55,origin:a});},[]);return {fire:e,fireworks:t,cannon:n}},Lx=X.forwardRef(({children:e,color:t="hsl(var(--primary))",intensity:n=20,spread:r=0,animate:o=false,duration:a=2,className:s},i)=>{let l={boxShadow:`0 0 ${n}px ${r}px ${t}`};return o?jsx(motion.div,{ref:i,className:u("rounded-[inherit]",s),animate:{boxShadow:[`0 0 ${n}px ${r}px ${t}`,`0 0 ${n*1.5}px ${r+5}px ${t}`,`0 0 ${n}px ${r}px ${t}`]},transition:{duration:a,repeat:1/0,ease:"easeInOut"},children:e}):jsx("div",{ref:i,className:u("rounded-[inherit]",s),style:l,children:e})});Lx.displayName="Glow";var Nx=(e,t)=>({id:Math.random().toString(36).substr(2,9),x:`${Math.random()*100}%`,y:`${Math.random()*100}%`,size:Math.random()*(t-e)+e,delay:Math.random()*2}),Sx=X.forwardRef(({children:e,count:t=10,color:n="hsl(var(--primary))",minSize:r=4,maxSize:o=8,duration:a=1.5,className:s},i)=>{let[l,c]=X.useState([]);return X.useEffect(()=>{let d=Array.from({length:t},()=>Nx(r,o));c(d);let m=setInterval(()=>{c(f=>{let p=[...f],g=Math.floor(Math.random()*t);return p[g]=Nx(r,o),p});},a*500);return ()=>clearInterval(m)},[t,r,o,a]),jsxs("div",{ref:i,className:u("relative inline-block",s),children:[e,l.map(d=>jsx(motion.svg,{className:"pointer-events-none absolute",style:{left:d.x,top:d.y,width:d.size,height:d.size},viewBox:"0 0 24 24",initial:{scale:0,opacity:0,rotate:0},animate:{scale:[0,1,0],opacity:[0,1,0],rotate:[0,180]},transition:{duration:a,delay:d.delay,repeat:1/0,ease:"easeInOut"},children:jsx("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z",fill:n})},d.id))]})});Sx.displayName="Sparkles";var Dx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h1",{ref:r,className:u("scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",e),...n,children:t}));Dx.displayName="H1";var Hx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h2",{ref:r,className:u("scroll-m-20 text-3xl font-semibold tracking-tight",e),...n,children:t}));Hx.displayName="H2";var Ix=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h3",{ref:r,className:u("scroll-m-20 text-2xl font-semibold tracking-tight",e),...n,children:t}));Ix.displayName="H3";var Vx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h4",{ref:r,className:u("scroll-m-20 text-xl font-semibold tracking-tight",e),...n,children:t}));Vx.displayName="H4";var Ax=X.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("leading-7 [&:not(:first-child)]:mt-6",e),...n,children:t}));Ax.displayName="Paragraph";var zx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("blockquote",{ref:r,className:u("mt-6 border-l-2 pl-6 italic",e),...n,children:t}));zx.displayName="Blockquote";var Ox=X.forwardRef(({className:e,children:t,...n},r)=>jsx("code",{ref:r,className:u("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",e),...n,children:t}));Ox.displayName="InlineCode";var Bx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("text-xl text-muted-foreground",e),...n,children:t}));Bx.displayName="Lead";var Fx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("text-lg font-semibold",e),...n,children:t}));Fx.displayName="Large";var Kx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("small",{ref:r,className:u("text-sm font-medium leading-none",e),...n,children:t}));Kx.displayName="Small";var $x=X.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("text-sm text-muted-foreground",e),...n,children:t}));$x.displayName="Muted";var Gx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("ul",{ref:r,className:u("my-6 ml-6 list-disc [&>li]:mt-2",e),...n,children:t}));Gx.displayName="UL";function Ho(e){let t=useCallback(o=>typeof window<"u"?window.matchMedia(o).matches:false,[]),[n,r]=useState(()=>t(e));return useEffect(()=>{let o=window.matchMedia(e),a=()=>{r(o.matches);};return r(o.matches),o.addEventListener("change",a),()=>{o.removeEventListener("change",a);}},[e]),n}function FP(){return Ho("(max-width: 767px)")}function KP(){return Ho("(min-width: 768px) and (max-width: 1023px)")}function $P(){return Ho("(min-width: 1024px)")}function GP(){return Ho("(prefers-color-scheme: dark)")?"dark":"light"}function UP(){return Ho("(prefers-reduced-motion: reduce)")}function ha(e={}){let{initialWidth:t=0,initialHeight:n=0,debounce:r=0,includeScrollbar:o=true}=e,[a,s]=useState(()=>typeof window>"u"?{width:t,height:n}:{width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight}),i=useRef(null),l=useCallback(()=>{let c=()=>{s({width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight});};r>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(c,r)):c();},[r,o]);return useEffect(()=>(l(),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l),i.current&&clearTimeout(i.current);}),[l]),a}function XP(){let{width:e}=ha();return e}function qP(){let{height:e}=ha();return e}function ZP(e){let{width:t}=ha();return t>=e}function QP(){let{width:e}=ha();return {isSm:e>=640,isMd:e>=768,isLg:e>=1024,isXl:e>=1280,is2xl:e>=1536}}function tE(e,t){let n=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading localStorage key "${e}":`,i),t}},[t,e]),[r,o]=useState(n),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting localStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(r):i;o(l),window.localStorage.setItem(e,JSON.stringify(l)),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:JSON.stringify(l)}));}catch(l){console.warn(`Error setting localStorage key "${e}":`,l);}},[e,r]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(e),o(t),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:null}));}catch(i){console.warn(`Error removing localStorage key "${e}":`,i);}},[e,t]);return useEffect(()=>{let i=l=>{if(l.key===e&&l.newValue!==null)try{o(JSON.parse(l.newValue));}catch{o(l.newValue);}else l.key===e&&l.newValue===null&&o(t);};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i);}},[e,t]),[r,a,s]}function rE(e,t){let n=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.sessionStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading sessionStorage key "${e}":`,i),t}},[t,e]),[r,o]=useState(n),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting sessionStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(r):i;o(l),window.sessionStorage.setItem(e,JSON.stringify(l));}catch(l){console.warn(`Error setting sessionStorage key "${e}":`,l);}},[e,r]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.sessionStorage.removeItem(e),o(t);}catch(i){console.warn(`Error removing sessionStorage key "${e}":`,i);}},[e,t]);return [r,a,s]}function sE(e,t=500){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function iE(e,t=500){let n=useRef(null),r=useRef(e);return useEffect(()=>{r.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]),useCallback((...a)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...a);},t);},[t])}function lE(e,t=500){let n=useRef(null),r=useRef(e),o=useRef(null);useEffect(()=>{r.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]);let a=useCallback((...c)=>{o.current=c,n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...c),n.current=null,o.current=null;},t);},[t]),s=useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null,o.current=null);},[]),i=useCallback(()=>{n.current&&o.current&&(clearTimeout(n.current),r.current(...o.current),n.current=null,o.current=null);},[]),l=useCallback(()=>n.current!==null,[]);return {debouncedCallback:a,cancel:s,flush:i,isPending:l}}function uE(e,t=500){let[n,r]=useState(e),o=useRef(Date.now());return useEffect(()=>{let a=Date.now();if(a>=o.current+t)o.current=a,r(e);else {let s=setTimeout(()=>{o.current=Date.now(),r(e);},t-(a-o.current));return ()=>clearTimeout(s)}},[e,t]),n}function mE(e,t=500){let n=useRef(0),r=useRef(null),o=useRef(e);return useEffect(()=>{o.current=e;},[e]),useEffect(()=>()=>{r.current&&clearTimeout(r.current);},[]),useCallback((...s)=>{let i=Date.now();i-n.current>=t?(o.current(...s),n.current=i):(r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{o.current(...s),n.current=Date.now();},t-(i-n.current)));},[t])}function fE(e,t=true){let n=useRef(null);return useEffect(()=>{if(!t)return;let r=o=>{let a=n.current;!a||a.contains(o.target)||e(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e,t]),n}function gE(e,t,n=true){useEffect(()=>{if(!n)return;let r=o=>{e.some(s=>{let i=s.current;return i&&i.contains(o.target)})||t(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e,t,n]);}function bE(e=2e3){let[t,n]=useState(null),[r,o]=useState(false),[a,s]=useState(false),i=useCallback(()=>{n(null),o(false);},[]),l=useCallback(async c=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;s(true);try{return await navigator.clipboard.writeText(c),n(c),o(!0),e>0&&setTimeout(()=>{o(!1);},e),!0}catch(d){return console.warn("Copy to clipboard failed:",d),n(null),o(false),false}finally{s(false);}},[e]);return {copiedValue:t,success:r,isLoading:a,copy:l,reset:i}}function vE(){return useCallback(async e=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.warn("Copy to clipboard failed:",t),false}},[])}function jx(e){let t=e.toLowerCase().split("+");return {key:t[t.length-1],ctrl:t.includes("ctrl")||t.includes("control"),alt:t.includes("alt")||t.includes("option"),shift:t.includes("shift"),meta:t.includes("meta")||t.includes("cmd")||t.includes("command")}}function Wx(e,t){let n=e.key.toLowerCase(),r=n===" "?"space":n==="escape"?"esc":n,o=t.key==="space"?" ":t.key;return (r===o||e.code.toLowerCase()===`key${o}`)&&e.ctrlKey===t.ctrl&&e.altKey===t.alt&&e.shiftKey===t.shift&&e.metaKey===t.meta}function hE(e,t,n={}){let{enabled:r=true,preventDefault:o=true,stopPropagation:a=false,target:s=null}=n,i=useRef(t);i.current=t;let l=jx(e);useEffect(()=>{if(!r)return;let c=m=>{Wx(m,l)&&(o&&m.preventDefault(),a&&m.stopPropagation(),i.current(m));},d=s||document;return d.addEventListener("keydown",c),()=>{d.removeEventListener("keydown",c);}},[r,o,a,s,l]);}function xE(e,t={}){let{enabled:n=true,preventDefault:r=true,stopPropagation:o=false,target:a=null}=t,s=useRef(e);s.current=e;let i=Object.entries(e).map(([l,c])=>({parsed:jx(l),handler:c}));useEffect(()=>{if(!n)return;let l=d=>{for(let{parsed:m,handler:f}of i)if(Wx(d,m)){r&&d.preventDefault(),o&&d.stopPropagation(),f(d);break}},c=a||document;return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l);}},[n,r,o,a,i]);}function yE(e){let t=useRef(false);return useEffect(()=>{let n=o=>{o.key===e&&(t.current=true);},r=o=>{o.key===e&&(t.current=false);};return document.addEventListener("keydown",n),document.addEventListener("keyup",r),()=>{document.removeEventListener("keydown",n),document.removeEventListener("keyup",r);}},[e]),t.current}function RE(e,t,n,r){let o=useRef(t);o.current=t,useEffect(()=>{let a;if(n==null?a=window:"current"in n?a=n.current:a=n,!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,r),()=>{a?.removeEventListener(e,s,r);}},[e,n,r]);}function wE(e,t,n){let r=useRef(null),o=useRef(t);return o.current=t,useEffect(()=>{let a=r.current;if(!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,n),()=>{a.removeEventListener(e,s,n);}},[e,n]),r}function CE(e,t,n={}){let{target:r,event:o="keydown",enabled:a=true}=n,s=useRef(t);s.current=t,useEffect(()=>{if(!a)return;let i=r?.current||window,l=c=>{c.key===e&&s.current(c);};return i.addEventListener(o,l),()=>{i.removeEventListener(o,l);}},[e,r,o,a]);}function TE(e,t={}){let{threshold:n=500,onStart:r,onCancel:o,enabled:a=true}=t,s=useRef(null),i=useRef(false),l=useRef(null),c=useCallback(m=>{a&&(l.current=m,i.current=false,r?.(m),s.current=setTimeout(()=>{i.current=true,l.current&&e(l.current);},n));},[e,n,r,a]),d=useCallback(m=>{a&&(s.current&&(clearTimeout(s.current),s.current=null),i.current||o?.(m),i.current=false,l.current=null);},[o,a]);return {onMouseDown:c,onMouseUp:d,onMouseLeave:d,onTouchStart:c,onTouchEnd:d}}function ME(e){let t=useRef(null),[n,r]=useState(false),o=useCallback(()=>{r(true),e?.onHoverStart?.();},[e]),a=useCallback(()=>{r(false),e?.onHoverEnd?.();},[e]);return useEffect(()=>{let s=t.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[o,a]),{ref:t,isHovered:n}}function NE(e,t){let[n,r]=useState(false),o=useCallback(()=>{r(true),t?.onHoverStart?.();},[t]),a=useCallback(()=>{r(false),t?.onHoverEnd?.();},[t]);return useEffect(()=>{let s=e.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[e,o,a]),n}function kE(){let[e,t]=useState(false);return {isHovered:e,hoverProps:{onMouseEnter:()=>t(true),onMouseLeave:()=>t(false)}}}function PE(e=0){let t=useRef(null),[n,r]=useState(false),o=useRef(null);return useEffect(()=>{let a=t.current;if(!a)return;let s=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(true);},e);},i=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(false);},e);};return a.addEventListener("mouseenter",s),a.addEventListener("mouseleave",i),()=>{a.removeEventListener("mouseenter",s),a.removeEventListener("mouseleave",i),o.current&&clearTimeout(o.current);}},[e]),{ref:t,isHovered:n}}function LE(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let n=r=>{t({x:r.clientX,y:r.clientY});};return window.addEventListener("mousemove",n),()=>{window.removeEventListener("mousemove",n);}},[]),e}function SE(e={}){let{enabled:t=true,resetOnLeave:n=false}=e,r=useRef(null),[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=r.current;if(!s||!t)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{n&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),n&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),n&&s.removeEventListener("mouseleave",l);}},[t,n]),{ref:r,...o}}function DE(e,t={}){let{enabled:n=true,resetOnLeave:r=false}=t,[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=e.current;if(!s||!n)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{r&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),r&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),r&&s.removeEventListener("mouseleave",l);}},[e,n,r]),o}var Xx=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"].join(",");function HE(e={}){let{enabled:t=true,initialFocus:n,returnFocus:r=true,autoFocus:o=true}=e,a=useRef(null),s=useRef(null),i=useCallback(()=>{let c=a.current;return c?Array.from(c.querySelectorAll(Xx)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);return useEffect(()=>{if(!t)return;let c=a.current;if(c){if(s.current=document.activeElement,o)if(n?.current)n.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),r&&s.current&&s.current.focus();}}},[t,n,r,o,l,i]),a}function IE(e,t={}){let{enabled:n=true,initialFocus:r,returnFocus:o=true,autoFocus:a=true}=t,s=useRef(null),i=useCallback(()=>{let c=e.current;return c?Array.from(c.querySelectorAll(Xx)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[e]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);useEffect(()=>{if(!n)return;let c=e.current;if(c){if(s.current=document.activeElement,a)if(r?.current)r.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),o&&s.current&&s.current.focus();}}},[e,n,r,o,a,l,i]);}function VE(e={}){let{threshold:t=0,throttle:n=0,element:r}=e,[o,a]=useState({x:0,y:0,isScrolled:false,directionY:0,directionX:0,isAtBottom:false,isAtTop:true,progress:0}),s=useRef(0),i=useRef(0),l=useRef(false),c=useRef(0),d=useCallback(()=>{let f=r?.current,p=f?f.scrollTop:window.scrollY,g=f?f.scrollLeft:window.scrollX,h=f?f.scrollHeight-f.clientHeight:document.documentElement.scrollHeight-window.innerHeight,b=p>s.current?1:p<s.current?-1:0,v=g>i.current?1:g<i.current?-1:0;s.current=p,i.current=g,a({x:g,y:p,isScrolled:p>t,directionY:b,directionX:v,isAtBottom:p>=h-1,isAtTop:p<=0,progress:h>0?p/h:0}),l.current=false;},[r,t]),m=useCallback(()=>{let f=Date.now();if(n>0&&f-c.current<n){l.current||(l.current=true,requestAnimationFrame(d));return}c.current=f,l.current||(l.current=true,requestAnimationFrame(d));},[n,d]);return useEffect(()=>{let f=r?.current||window;return f.addEventListener("scroll",m,{passive:true}),d(),()=>{f.removeEventListener("scroll",m);}},[r,m,d]),o}function AE(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let n=()=>{t({x:window.scrollX,y:window.scrollY});};return window.addEventListener("scroll",n,{passive:true}),n(),()=>{window.removeEventListener("scroll",n);}},[]),e}function ty(e={}){let{autoLock:t=false,lockX:n=true}=e,r=useRef(false),o=useRef({x:0,y:0}),a=useRef(null),s=useCallback(()=>{if(typeof document>"u"||r.current)return;let{body:l}=document,c=window.scrollY,d=window.scrollX;o.current={x:d,y:c},a.current={overflow:l.style.overflow,overflowX:l.style.overflowX,overflowY:l.style.overflowY,position:l.style.position,top:l.style.top,left:l.style.left,width:l.style.width},l.style.overflow="hidden",n&&(l.style.overflowX="hidden"),l.style.overflowY="hidden",l.style.position="fixed",l.style.top=`-${c}px`,l.style.left=n?`-${d}px`:"0",l.style.width="100%",r.current=true;},[n]),i=useCallback(()=>{if(typeof document>"u"||!r.current)return;let{body:l}=document,c=a.current;c&&(l.style.overflow=c.overflow,l.style.overflowX=c.overflowX,l.style.overflowY=c.overflowY,l.style.position=c.position,l.style.top=c.top,l.style.left=c.left,l.style.width=c.width),window.scrollTo(o.current.x,o.current.y),r.current=false;},[]);return useEffect(()=>(t&&s(),()=>{i();}),[t,s,i]),{lock:s,unlock:i,isLocked:r.current}}function zE(e=true){let{lock:t,unlock:n}=ty();useEffect(()=>{e?t():n();},[e,t,n]);}function oy(e={}){let{root:t=null,rootMargin:n="0px",threshold:r=0,once:o=false,enabled:a=true}=e,s=useRef(null),[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=s.current;if(!c||!a)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),o&&m.isIntersecting&&d.disconnect();},{root:t,rootMargin:n,threshold:r});return d.observe(c),()=>{d.disconnect();}},[t,n,r,o,a]),{ref:s,...i}}function BE(e,t={}){let{root:n=null,rootMargin:r="0px",threshold:o=0,once:a=false,enabled:s=true}=t,[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=e.current;if(!c||!s)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),a&&m.isIntersecting&&d.disconnect();},{root:n,rootMargin:r,threshold:o});return d.observe(c),()=>{d.disconnect();}},[e,n,r,o,a,s]),i}function FE(e="200px"){let{ref:t,isIntersecting:n}=oy({rootMargin:e,once:true});return {ref:t,isVisible:n}}function KE(e,t={}){let{enabled:n=true,childList:r=true,attributes:o=true,characterData:a=false,subtree:s=false,attributeOldValue:i=false,characterDataOldValue:l=false,attributeFilter:c}=t,d=useRef(null),m=useRef(e);return m.current=e,useEffect(()=>{let f=d.current;if(!f||!n)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:r,attributes:o,characterData:a,subtree:s,attributeOldValue:i,characterDataOldValue:l,attributeFilter:c}),()=>{p.disconnect();}},[n,r,o,a,s,i,l,c]),d}function $E(e,t,n={}){let{enabled:r=true,childList:o=true,attributes:a=true,characterData:s=false,subtree:i=false,attributeOldValue:l=false,characterDataOldValue:c=false,attributeFilter:d}=n,m=useRef(t);m.current=t,useEffect(()=>{let f=e.current;if(!f||!r)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:o,attributes:a,characterData:s,subtree:i,attributeOldValue:l,characterDataOldValue:c,attributeFilter:d}),()=>{p.disconnect();}},[e,r,o,a,s,i,l,c,d]);}function GE(e={}){let{enabled:t=true,box:n="content-box",debounce:r=0}=e,o=useRef(null),[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;n==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});r>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,r)):p();},[n,r]);return useEffect(()=>{let c=o.current;if(!c||!t)return;let d=new ResizeObserver(l);d.observe(c,{box:n});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[t,n,l]),{ref:o,...a}}function UE(e,t={}){let{enabled:n=true,box:r="content-box",debounce:o=0}=t,[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;r==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});o>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,o)):p();},[r,o]);return useEffect(()=>{let c=e.current;if(!c||!n)return;let d=new ResizeObserver(l);d.observe(c,{box:r});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[e,n,r,l]),a}function jE(){let e=useRef(null),t=useCallback(()=>{let n=e.current;if(!n)return {width:0,height:0};let r=n.getBoundingClientRect();return {width:r.width,height:r.height}},[]);return {ref:e,measure:t}}function ly(e={}){let{defaultOpen:t=false,isOpen:n,onOpen:r,onClose:o,onChange:a,id:s}=e,[i,l]=useState(t),c=n!==void 0,d=c?n:i,m=useCallback(()=>{c||l(true),r?.(),a?.(true);},[c,r,a]),f=useCallback(()=>{c||l(false),o?.(),a?.(false);},[c,o,a]),p=useCallback(()=>{d?f():m();},[d,m,f]),g=useCallback(v=>{v?m():f();},[m,f]),h=useCallback(()=>({onClick:p,"aria-expanded":d,...s&&{"aria-controls":s}}),[p,d,s]),b=useCallback(()=>({hidden:!d,...s&&{id:s}}),[d,s]);return useMemo(()=>({isOpen:d,open:m,close:f,toggle:p,setIsOpen:g,getButtonProps:h,getDisclosureProps:b}),[d,m,f,p,g,h,b])}function YE(e){return ly({...e,defaultOpen:true})}function XE(e=false){let[t,n]=useState(e),r=useCallback(()=>{n(o=>!o);},[]);return [t,r,n]}function qE(e,t=0){let[n,r]=useState(t),o=useCallback(()=>{r(i=>(i+1)%e.length);},[e.length]),a=useCallback(()=>{r(i=>(i-1+e.length)%e.length);},[e.length]),s=useCallback(i=>{let l=e.indexOf(i);l!==-1&&r(l);},[e]);return useMemo(()=>({value:e[n],index:n,next:o,prev:a,setIndex:r,setValue:s}),[e,n,o,a,s])}function ZE(e=false){let[t,n]=useState(e),r=useCallback(()=>n(s=>!s),[]),o=useCallback(()=>n(true),[]),a=useCallback(()=>n(false),[]);return useMemo(()=>({value:t,toggle:r,on:o,off:a,set:n}),[t,r,o,a])}function JE(e=0,t={}){let{min:n=-1/0,max:r=1/0,step:o=1}=t,a=useCallback(g=>Math.min(Math.max(g,n),r),[n,r]),[s,i]=useState(()=>a(e)),l=useCallback(()=>{i(g=>a(g+o));},[a,o]),c=useCallback(()=>{i(g=>a(g-o));},[a,o]),d=useCallback(g=>{i(a(g));},[a]),m=useCallback(()=>{i(a(e));},[a,e]),f=s<=n,p=s>=r;return useMemo(()=>({count:s,increment:l,decrement:c,set:d,reset:m,isMin:f,isMax:p}),[s,l,c,d,m,f,p])}function eL(e=0){let[t,n]=useState(e),r=useCallback(()=>n(o=>o+1),[]);return [t,r]}function tL(e){let t=useRef(void 0);return useEffect(()=>{t.current=e;},[e]),t.current}function nL(e,t){let n=useRef(t);return useEffect(()=>{n.current=e;},[e]),n.current}function rL(e){let t=useRef(void 0),n=useRef(e),r=n.current!==e;return useEffect(()=>{t.current=n.current,n.current=e;},[e]),{current:e,previous:t.current,hasChanged:r}}function sL(e=[]){let[t,n]=useState(e),r=useCallback(C=>{n(C);},[]),o=useCallback(C=>{n(R=>[...R,C]);},[]),a=useCallback(C=>{n(R=>[...R,...C]);},[]),s=useCallback((C,R)=>{n(N=>{let T=[...N];return T.splice(C,0,R),T});},[]),i=useCallback((C,R)=>{n(N=>{let T=[...N];return T[C]=R,T});},[]),l=useCallback(C=>{n(R=>R.filter((N,T)=>T!==C));},[]),c=useCallback(C=>{n(R=>{let N=R.indexOf(C);return N===-1?R:R.filter((T,P)=>P!==N)});},[]),d=useCallback(C=>{n(R=>R.filter(N=>!C(N)));},[]),m=useCallback(()=>{let C;return n(R=>R.length===0?R:(C=R[0],R.slice(1))),C},[]),f=useCallback(C=>{n(R=>[C,...R]);},[]),p=useCallback(()=>{let C;return n(R=>R.length===0?R:(C=R[R.length-1],R.slice(0,-1))),C},[]),g=useCallback(()=>{n([]);},[]),h=useCallback(()=>{n(e);},[e]),b=useCallback((C,R)=>{n(N=>{let T=[...N],[P]=T.splice(C,1);return T.splice(R,0,P),T});},[]),v=useCallback((C,R)=>{n(N=>{let T=[...N];return [T[C],T[R]]=[T[R],T[C]],T});},[]),x=useCallback(C=>t.filter(C),[t]),y=useCallback(C=>t.find(C),[t]),w=useCallback(C=>t.includes(C),[t]);return useMemo(()=>({list:t,set:r,push:o,pushMany:a,insertAt:s,updateAt:i,removeAt:l,remove:c,removeWhere:d,shift:m,unshift:f,pop:p,clear:g,reset:h,move:b,swap:v,filter:x,find:y,includes:w,length:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i,l,c,d,m,f,p,g,h,b,v,x,y,w])}function iL(e=[]){let[t,n]=useState(()=>new Map(e)),r=useCallback(p=>t.get(p),[t]),o=useCallback((p,g)=>{n(h=>{let b=new Map(h);return b.set(p,g),b});},[]),a=useCallback(p=>{n(g=>{let h=new Map(g);return p.forEach(([b,v])=>h.set(b,v)),h});},[]),s=useCallback(p=>t.has(p),[t]),i=useCallback(p=>{n(g=>{let h=new Map(g);return h.delete(p),h});},[]),l=useCallback(()=>{n(new Map);},[]),c=useCallback(()=>{n(new Map(e));},[e]),d=useCallback(()=>Array.from(t.keys()),[t]),m=useCallback(()=>Array.from(t.values()),[t]),f=useCallback(()=>Array.from(t.entries()),[t]);return useMemo(()=>({map:t,get:r,set:o,setMany:a,has:s,delete:i,clear:l,reset:c,keys:d,values:m,entries:f,size:t.size,isEmpty:t.size===0}),[t,r,o,a,s,i,l,c,d,m,f])}function lL(e={}){let[t,n]=useState(e),r=useCallback(d=>t[d],[t]),o=useCallback((d,m)=>{n(f=>({...f,[d]:m}));},[]),a=useCallback(d=>{n(m=>({...m,...d}));},[]),s=useCallback(d=>{n(m=>{let{[d]:f,...p}=m;return p});},[]),i=useCallback(()=>{n({});},[]),l=useCallback(()=>{n(e);},[e]),c=useCallback(d=>d in t,[t]);return useMemo(()=>({value:t,get:r,set:o,setAll:a,remove:s,clear:i,reset:l,has:c,keys:Object.keys(t),values:Object.values(t)}),[t,r,o,a,s,i,l,c])}function fy(e=[]){let[t,n]=useState(()=>new Set(e)),r=useCallback(m=>{n(f=>{let p=new Set(f);return p.add(m),p});},[]),o=useCallback(m=>{n(f=>{let p=new Set(f);return m.forEach(g=>p.add(g)),p});},[]),a=useCallback(m=>{n(f=>{let p=new Set(f);return p.delete(m),p});},[]),s=useCallback(m=>t.has(m),[t]),i=useCallback(m=>{n(f=>{let p=new Set(f);return p.has(m)?p.delete(m):p.add(m),p});},[]),l=useCallback(()=>{n(new Set);},[]),c=useCallback(()=>{n(new Set(e));},[e]),d=useCallback(()=>Array.from(t),[t]);return useMemo(()=>({set:t,add:r,addMany:o,remove:a,has:s,toggle:i,clear:l,reset:c,values:d,size:t.size,isEmpty:t.size===0}),[t,r,o,a,s,i,l,c,d])}function dL(e=[]){let{add:t,remove:n,has:r,toggle:o,clear:a,addMany:s,values:i,size:l}=fy(e);return useMemo(()=>({selected:i(),isSelected:r,select:t,deselect:n,toggle:o,selectAll:s,deselectAll:a,count:l,isEmpty:l===0}),[i,r,t,n,o,s,a,l])}function uL(e=[]){let[t,n]=useState(e),r=useCallback(c=>{n(d=>[...d,c]);},[]),o=useCallback(c=>{n(d=>[...d,...c]);},[]),a=useCallback(()=>{let c;return n(d=>d.length===0?d:(c=d[0],d.slice(1))),c},[]),s=useCallback(()=>t[0],[t]),i=useCallback(()=>t[t.length-1],[t]),l=useCallback(()=>{n([]);},[]);return useMemo(()=>({queue:t,enqueue:r,enqueueMany:o,dequeue:a,peek:s,peekLast:i,clear:l,size:t.length,isEmpty:t.length===0,hasItems:t.length>0}),[t,r,o,a,s,i,l])}function mL(e=[]){let[t,n]=useState(e),r=useCallback(l=>{n(c=>[...c,l]);},[]),o=useCallback(l=>{n(c=>[...c,...l]);},[]),a=useCallback(()=>{let l;return n(c=>c.length===0?c:(l=c[c.length-1],c.slice(0,-1))),l},[]),s=useCallback(()=>t[t.length-1],[t]),i=useCallback(()=>{n([]);},[]);return useMemo(()=>({stack:t,push:r,pushMany:o,pop:a,peek:s,clear:i,size:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i])}function hy(e,t=false){let[n,r]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true}),o=useRef(true),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{r(c=>({...c,isLoading:true,isIdle:false,isError:false,error:null}));try{let c=await a.current(...l);return o.current&&r({data:c,error:null,isLoading:!1,isSuccess:!0,isError:!1,isIdle:!1}),c}catch(c){let d=c instanceof Error?c:new Error(String(c));return o.current&&r({data:null,error:d,isLoading:false,isSuccess:false,isError:true,isIdle:false}),null}},[]),i=useCallback(()=>{r({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true});},[]);return useEffect(()=>(o.current=true,t&&s(),()=>{o.current=false;}),[t,s]),{...n,execute:s,reset:i}}function fL(e,t=3,n=1e3){let[r,o]=useState(0),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{let c=null;for(let d=0;d<=t;d++)try{return o(d),await a.current(...l)}catch(m){c=m instanceof Error?m:new Error(String(m)),d<t&&await new Promise(f=>setTimeout(f,n));}throw c},[t,n]);return {...hy(s,false),retryCount:r}}var Ry=new Map,gL=300*1e3;function bL(e,t={}){let{immediate:n=true,init:r,transform:o,deps:a=[],enabled:s=true,refetchInterval:i,cacheKey:l}=t,[c,d]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),m=useRef(null),f=useRef(true),p=useCallback(async()=>{if(!e||!s)return;let h=l||e,b=Ry.get(h);if(b&&Date.now()-b.timestamp<gL){d({data:b.data,error:null,isLoading:false,isSuccess:true,isError:false});return}m.current&&m.current.abort(),m.current=new AbortController,d(v=>({...v,isLoading:true,error:null}));try{let v=await fetch(e,{...r,signal:m.current.signal});if(!v.ok)throw new Error(`HTTP error! status: ${v.status}`);let x=await v.json(),y=o?o(x):x;Ry.set(h,{data:y,timestamp:Date.now()}),f.current&&d({data:y,error:null,isLoading:!1,isSuccess:!0,isError:!1});}catch(v){if(v instanceof Error&&v.name==="AbortError")return;let x=v instanceof Error?v:new Error(String(v));f.current&&d({data:null,error:x,isLoading:false,isSuccess:false,isError:true});}},[e,s,r,o,l]),g=useCallback(()=>{m.current&&m.current.abort();},[]);return useEffect(()=>(f.current=true,n&&s&&p(),()=>{f.current=false,g();}),[e,n,s,...a]),useEffect(()=>{if(!i||!s)return;let h=setInterval(p,i);return ()=>{clearInterval(h);}},[i,s,p]),{...c,refetch:p,abort:g}}function vL(e,t={}){let{transform:n,...r}=t,[o,a]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),s=useCallback(async l=>{a(c=>({...c,isLoading:true,error:null}));try{let c=await fetch(e,{...r,method:r.method||"POST",headers:{"Content-Type":"application/json",...r.headers},body:l?JSON.stringify(l):void 0});if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);let d=await c.json(),m=n?n(d):d;return a({data:m,error:null,isLoading:!1,isSuccess:!0,isError:!1}),m}catch(c){let d=c instanceof Error?c:new Error(String(c));return a({data:null,error:d,isLoading:false,isSuccess:false,isError:true}),null}},[e,r,n]),i=useCallback(()=>{a({data:null,error:null,isLoading:false,isSuccess:false,isError:false});},[]);return {...o,mutate:s,reset:i}}function pi(e,t){let n=useRef(e);n.current=e,useEffect(()=>{if(t===null)return;let r=setInterval(()=>{n.current();},t);return ()=>{clearInterval(r);}},[t]);}function xL(e,t){let[n,r]=useState(false);pi(e,n?t:null);let o=useCallback(()=>r(true),[]),a=useCallback(()=>r(false),[]),s=useCallback(()=>r(i=>!i),[]);return {start:o,stop:a,toggle:s,isRunning:n}}function yL(e,t={}){let{interval:n=1e3,onComplete:r,autoStart:o=false}=t,[a,s]=useState(e),[i,l]=useState(o),c=useRef(r);c.current=r;let d=a<=0;pi(()=>{s(g=>{let h=g-1;return h<=0?(l(false),c.current?.(),0):h});},i&&!d?n:null);let m=useCallback(()=>{d||l(true);},[d]),f=useCallback(()=>{l(false);},[]),p=useCallback(g=>{s(g??e),l(false);},[e]);return {seconds:a,isRunning:i,isComplete:d,start:m,pause:f,reset:p}}function RL(e={}){let{interval:t=1e3,maxSeconds:n,autoStart:r=false}=e,[o,a]=useState(0),[s,i]=useState(r),l=s&&(n===void 0||o<n);pi(()=>{a(p=>p+1);},l?t:null);let c=useCallback(()=>i(true),[]),d=useCallback(()=>i(false),[]),m=useCallback(()=>i(p=>!p),[]),f=useCallback(()=>{a(0),i(false);},[]);return {seconds:o,isRunning:s,start:c,stop:d,reset:f,toggle:m}}function Ty(e,t){let n=useRef(e);n.current=e,useEffect(()=>{if(t===null)return;let r=setTimeout(()=>{n.current();},t);return ()=>{clearTimeout(r);}},[t]);}function wL(e,t){let[n,r]=useState(false),o=useRef(null),a=useRef(e);a.current=e;let s=useCallback(()=>{o.current&&(clearTimeout(o.current),o.current=null),r(false);},[]),i=useCallback(()=>{s(),r(true),o.current=setTimeout(()=>{a.current(),r(false);},t);},[t,s]),l=useCallback(()=>{i();},[i]);return useEffect(()=>()=>{o.current&&clearTimeout(o.current);},[]),{start:i,cancel:s,reset:l,isScheduled:n}}function CL(e,t){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function TL(e,t=true){let[n,r]=useState(false);return Ty(()=>{r(true);},t?e:null),n}function ML(e,t=true){let[n,r]=useState(t),[o,a]=useState(0),[s,i]=useState(0),l=useRef(e);l.current=e;let c=useRef(null),d=useRef(0),m=useRef(0),f=useRef(0),p=useRef(0),g=useCallback(v=>{let x=d.current?v-d.current:0;d.current=v,p.current++,v-f.current>=1e3&&(a(p.current),p.current=0,f.current=v),m.current++,i(m.current),l.current(x,v),c.current=requestAnimationFrame(g);},[]),h=useCallback(()=>{c.current===null&&(d.current=0,f.current=performance.now(),p.current=0,c.current=requestAnimationFrame(g),r(true));},[g]),b=useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null,r(false));},[]);return useEffect(()=>(t&&h(),()=>{c.current!==null&&cancelAnimationFrame(c.current);}),[t,h]),{start:h,stop:b,isRunning:n,frameCount:s,fps:o}}function NL(e,t={}){let{duration:n=300,easing:r="easeOutCubic"}=t,[o,a]=useState(e),s=useRef(e),i=useRef(null),l=useRef(null),c={linear:d=>d,easeInCubic:d=>d*d*d,easeOutCubic:d=>1-Math.pow(1-d,3),easeInOutCubic:d=>d<.5?4*d*d*d:1-Math.pow(-2*d+2,3)/2};return useEffect(()=>{if(o===e)return;s.current=o,i.current=null;let d=m=>{i.current===null&&(i.current=m);let f=m-i.current,p=Math.min(f/n,1),g=c[r](p),h=s.current+(e-s.current)*g;a(h),p<1&&(l.current=requestAnimationFrame(d));};return l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,n,r]),o}function kL(e,t={}){let{stiffness:n=100,damping:r=10,mass:o=1}=t,[a,s]=useState(e),i=useRef(0),l=useRef(null),c=useRef(null);return useEffect(()=>{if(Math.abs(a-e)<.01&&Math.abs(i.current)<.01){s(e);return}let d=m=>{c.current===null&&(c.current=m);let f=Math.min((m-c.current)/1e3,.064);c.current=m;let p=(e-a)*n,g=i.current*r,h=(p-g)/o;i.current+=h*f;let b=a+i.current*f;s(b),Math.abs(b-e)>.01||Math.abs(i.current)>.01?l.current=requestAnimationFrame(d):(s(e),i.current=0);};return c.current=null,l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,n,r,o,a]),a}var Py=["mousemove","mousedown","resize","keydown","touchstart","wheel","scroll"];function PL(e,t={}){let{events:n=Py,initialState:r=false,enabled:o=true}=t,[a,s]=useState(r),i=useRef(null),l=useCallback(()=>{s(false),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{s(true);},e);},[e]);return useEffect(()=>{if(o)return l(),n.forEach(c=>{window.addEventListener(c,l);}),()=>{i.current&&clearTimeout(i.current),n.forEach(c=>{window.removeEventListener(c,l);});}},[o,n,l]),a}function EL(e,t,n,r={}){let{events:o=Py,initialState:a=false,enabled:s=true}=r,[i,l]=useState(a),c=useRef(null),d=useRef(a),m=useCallback(()=>{d.current&&(d.current=false,n?.()),l(false),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{d.current=true,l(true),t?.();},e);},[e,t,n]);return useEffect(()=>{if(s)return m(),o.forEach(f=>{window.addEventListener(f,m);}),()=>{c.current&&clearTimeout(c.current),o.forEach(f=>{window.removeEventListener(f,m);});}},[s,o,m]),i}function Ly(){let[e,t]=useState(()=>typeof document>"u"?"visible":document.visibilityState);return useEffect(()=>{let n=()=>{t(document.visibilityState);};return document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}},[]),e}function DL(){return Ly()==="visible"}function HL(e,t){let n=useCallback(()=>{document.visibilityState==="visible"?e?.():t?.();},[e,t]);useEffect(()=>(document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}),[n]);}function IL(){let[e,t]=useState(()=>typeof navigator>"u"?true:navigator.onLine);return useEffect(()=>{let n=()=>t(true),r=()=>t(false);return window.addEventListener("online",n),window.addEventListener("offline",r),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r);}},[]),e}function VL(e,t){let[n,r]=useState(()=>typeof navigator>"u"?true:navigator.onLine),o=useCallback(()=>{r(true),e?.();},[e]),a=useCallback(()=>{r(false),t?.();},[t]);return useEffect(()=>(window.addEventListener("online",o),window.addEventListener("offline",a),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",a);}),[o,a]),n}function Iy(e){let[t,n]=useState(false),r=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),o=useCallback(async()=>{let i=e?.current||document.documentElement;try{i.requestFullscreen?await i.requestFullscreen():i.webkitRequestFullscreen?await i.webkitRequestFullscreen():i.mozRequestFullScreen?await i.mozRequestFullScreen():i.msRequestFullscreen&&await i.msRequestFullscreen();}catch(l){console.error("Failed to enter fullscreen:",l);}},[e]),a=useCallback(async()=>{try{document.exitFullscreen?await document.exitFullscreen():document.webkitExitFullscreen?await document.webkitExitFullscreen():document.mozCancelFullScreen?await document.mozCancelFullScreen():document.msExitFullscreen&&await document.msExitFullscreen();}catch(i){console.error("Failed to exit fullscreen:",i);}},[]),s=useCallback(async()=>{t?await a():await o();},[t,o,a]);return useEffect(()=>{let i=()=>{n(!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement));};return document.addEventListener("fullscreenchange",i),document.addEventListener("webkitfullscreenchange",i),document.addEventListener("mozfullscreenchange",i),document.addEventListener("MSFullscreenChange",i),()=>{document.removeEventListener("fullscreenchange",i),document.removeEventListener("webkitfullscreenchange",i),document.removeEventListener("mozfullscreenchange",i),document.removeEventListener("MSFullscreenChange",i);}},[]),{isFullscreen:t,enter:o,exit:a,toggle:s,isSupported:r}}function BL(){let e=useRef(null),t=Iy(e);return {ref:e,...t}}function $L(e={}){let{watch:t=false,immediate:n=true,enableHighAccuracy:r=true,maximumAge:o=0,timeout:a=1e4}=e,[s,i]=useState({isLoading:false,position:null,error:null,latitude:null,longitude:null,accuracy:null,altitude:null,altitudeAccuracy:null,heading:null,speed:null,timestamp:null}),l=typeof navigator<"u"&&"geolocation"in navigator,c=useCallback(f=>{i({isLoading:false,position:f,error:null,latitude:f.coords.latitude,longitude:f.coords.longitude,accuracy:f.coords.accuracy,altitude:f.coords.altitude,altitudeAccuracy:f.coords.altitudeAccuracy,heading:f.coords.heading,speed:f.coords.speed,timestamp:f.timestamp});},[]),d=useCallback(f=>{i(p=>({...p,isLoading:false,error:f}));},[]),m=useCallback(()=>{l&&(i(f=>({...f,isLoading:true,error:null})),navigator.geolocation.getCurrentPosition(c,d,{enableHighAccuracy:r,maximumAge:o,timeout:a}));},[l,c,d,r,o,a]);return useEffect(()=>{if(l&&(n&&m(),t)){let f=navigator.geolocation.watchPosition(c,d,{enableHighAccuracy:r,maximumAge:o,timeout:a});return ()=>{navigator.geolocation.clearWatch(f);}}},[t,n,l,m,c,d,r,o,a]),{...s,getCurrentPosition:m,isSupported:l}}function GL(e,t,n,r){if(e===null||t===null||n===null||r===null)return null;let o=6371e3,a=e*Math.PI/180,s=n*Math.PI/180,i=(n-e)*Math.PI/180,l=(r-t)*Math.PI/180,c=Math.sin(i/2)*Math.sin(i/2)+Math.cos(a)*Math.cos(s)*Math.sin(l/2)*Math.sin(l/2),d=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c));return o*d}function UL(e){let[t,n]=useState(null),[r,o]=useState(true),a=typeof navigator<"u"&&"permissions"in navigator,s=useCallback(async()=>{if(!a)return o(false),null;try{o(!0);let i=await navigator.permissions.query({name:e});return n(i.state),o(!1),i.state}catch(i){return console.error(`Permission query failed for ${e}:`,i),o(false),null}},[e,a]);return useEffect(()=>{if(!a){o(false);return}let i=null,l=()=>{i&&n(i.state);};return navigator.permissions.query({name:e}).then(c=>{i=c,n(c.state),o(false),c.addEventListener("change",l);}).catch(()=>{o(false);}),()=>{i&&i.removeEventListener("change",l);}},[e,a]),{state:t,isGranted:t==="granted",isDenied:t==="denied",isPrompt:t==="prompt",isLoading:r,isSupported:a,query:s}}function jL(){let[e,t]=useState(typeof Notification<"u"?Notification.permission:"default"),n=typeof Notification<"u",r=useCallback(async()=>{if(!n)return "default";let o=await Notification.requestPermission();return t(o),o},[n]);return useEffect(()=>{n&&t(Notification.permission);},[n]),{permission:e,request:r,isSupported:n}}function WL(e){let[t,n]=useState(null),[r,o]=useState(null),[a,s]=useState(false),i=typeof navigator<"u"&&"mediaDevices"in navigator,l=useCallback(async()=>{if(!i)return null;s(true),o(null);try{let d=await navigator.mediaDevices.getUserMedia(e);return n(d),s(!1),d}catch(d){let m=d instanceof Error?d:new Error(String(d));return o(m),s(false),null}},[e,i]),c=useCallback(()=>{t&&(t.getTracks().forEach(d=>d.stop()),n(null));},[t]);return useEffect(()=>()=>{t&&t.getTracks().forEach(d=>d.stop());},[t]),{stream:t,error:r,isLoading:a,request:l,stop:c,isSupported:i}}function YL(e={}){let{voice:t=null,rate:n=1,pitch:r=1,volume:o=1,lang:a="en-US"}=e,[s,i]=useState(false),[l,c]=useState(false),[d,m]=useState([]),f=typeof window<"u"&&"speechSynthesis"in window;useEffect(()=>{if(!f)return;let v=()=>{m(window.speechSynthesis.getVoices());};return v(),window.speechSynthesis.addEventListener("voiceschanged",v),()=>{window.speechSynthesis.removeEventListener("voiceschanged",v);}},[f]);let p=useCallback(v=>{if(!f)return;window.speechSynthesis.cancel();let x=new SpeechSynthesisUtterance(v);x.voice=t,x.rate=n,x.pitch=r,x.volume=o,x.lang=a,x.onstart=()=>i(true),x.onend=()=>{i(false),c(false);},x.onerror=()=>{i(false),c(false);},window.speechSynthesis.speak(x);},[f,t,n,r,o,a]),g=useCallback(()=>{f&&(window.speechSynthesis.cancel(),i(false),c(false));},[f]),h=useCallback(()=>{f&&(window.speechSynthesis.pause(),c(true));},[f]),b=useCallback(()=>{f&&(window.speechSynthesis.resume(),c(false));},[f]);return {speak:p,stop:g,pause:h,resume:b,isSpeaking:s,isPaused:l,isSupported:f,voices:d}}function XL(e={}){let{lang:t="en-US",continuous:n=false,interimResults:r=true}=e,[o,a]=useState(false),[s,i]=useState(""),[l,c]=useState(""),[d,m]=useState(null),f=useRef(null),p=typeof window<"u"?window.SpeechRecognition||window.webkitSpeechRecognition:null,g=p!==null;useEffect(()=>{if(!g||!p)return;let y=new p;return y.lang=t,y.continuous=n,y.interimResults=r,y.onstart=()=>{a(true),m(null);},y.onend=()=>{a(false);},y.onerror=w=>{m(new Error(w.error)),a(false);},y.onresult=w=>{let C="",R="";for(let N=w.resultIndex;N<w.results.length;N++){let T=w.results[N];T.isFinal?R+=T[0].transcript:C+=T[0].transcript;}R&&i(N=>N+R),c(C);},f.current=y,()=>{y.abort();}},[g,p,t,n,r]);let h=useCallback(()=>{if(f.current&&!o)try{f.current.start();}catch{}},[o]),b=useCallback(()=>{f.current&&f.current.stop();},[]),v=useCallback(()=>{f.current&&f.current.abort();},[]),x=useCallback(()=>{i(""),c(""),m(null);},[]);return {start:h,stop:b,abort:v,isListening:o,transcript:s,interimTranscript:l,isSupported:g,error:d,reset:x}}export{Hu as Accordion,Iu as AccordionItem,Ov as ActionBar,Bv as ActionBarButton,Sv as ActionGroup,Xh as ActionSheet,jy as Alert,_y as AlertDescription,Wy as AlertTitle,_b as AreaChart,sm as AspectRatio,Bg as Autocomplete,Tr as Avatar,Mr as AvatarFallback,Ip as AvatarGroup,Jr as AvatarImage,ag as BackTop,Zy as Badge,Fh as Banner,jb as BarChart,ih as BatteryMeter,zx as Blockquote,Wh as BottomNavigation,dx as Bounce,Zu as Breadcrumb,rm as BreadcrumbEllipsis,Ju as BreadcrumbItem,em as BreadcrumbLink,Qu as BreadcrumbList,tm as BreadcrumbPage,nm as BreadcrumbSeparator,ae as Button,nd as ButtonGroup,Wf as COUNTRIES,to as Calendar,id as Card,ud as CardContent,dd as CardDescription,md as CardFooter,ld as CardHeader,cd as CardTitle,tv as Carousel,nv as CarouselContent,rv as CarouselItem,Hl as CarouselNext,Dl as CarouselPrevious,Oo as Checkbox,Px as Checkmark,Bp as Chip,jp as CircularProgress,Nt as CloseButton,Qg as Code,rb as CodeBlock,ax as Collapse,Fu as Collapsible,Ku as CollapsibleContent,Ii as CollapsibleTrigger,mh as ColorArea,Af as ColorPicker,gh as ColorSlider,qo as ColorSwatch,If as ColorSwatchPicker,vh as ColorWheel,Wi as Command,XR as CommandDialog,wp as CommandEmpty,Cp as CommandGroup,yp as CommandInput,Mp as CommandItem,Rp as CommandList,Tp as CommandSeparator,Np as CommandShortcut,Ex as Confetti,cu as ContextMenu,hu as ContextMenuCheckboxItem,fu as ContextMenuContent,uu as ContextMenuGroup,vu as ContextMenuItem,mu as ContextMenuPortal,xu as ContextMenuSection,yu as ContextMenuSeparator,Ru as ContextMenuShortcut,pu as ContextMenuSub,bu as ContextMenuSubContent,gu as ContextMenuSubTrigger,du as ContextMenuTrigger,Xv as ContextualHelp,Fb as CopyButton,gx as Counter,Kf as CurrencyInput,ia as DEFAULT_COLORS,HR as DataTable,qN as DateField,XN as DateInput,Ks as DatePicker,Lb as DateRangePicker,sh as DiskUsageMeter,Oi as Drawer,Lm as DrawerBody,Im as DrawerClose,Pm as DrawerContent,Hm as DrawerDescription,Sm as DrawerFooter,Km as DrawerGroup,$m as DrawerGroupLabel,Em as DrawerHeader,Gm as DrawerInset,zm as DrawerMenu,Fm as DrawerMenuButton,Om as DrawerMenuItem,NR as DrawerProvider,Am as DrawerSeparator,Nm as DrawerSidebar,Dm as DrawerTitle,Vm as DrawerToggle,km as DrawerTrigger,Cn as Dropdown,Mn as DropdownContent,zd as DropdownGroup,$t as DropdownItem,H0 as DropdownLabel,Ti as DropdownSection,Vd as DropdownSeparator,Ad as DropdownShortcut,Od as DropdownSub,Fd as DropdownSubContent,Bd as DropdownSubTrigger,Tn as DropdownTrigger,Vl as EMOJIS,Vs as EMOJI_CATEGORIES,av as EmojiPicker,of as EmptyState,sx as Expand,mP as FAB,nx as Fade,dl as FieldContext,Lf as FileUpload,lx as Flip,ic as FloatingActionButton,Fg as Form,cl as FormContext,Ug as FormControl,jg as FormDescription,Kg as FormField,$g as FormItem,Gg as FormLabel,Wg as FormMessage,Gb as FullCalendar,Lx as Glow,rh as GridList,Dx as H1,Hx as H2,Ix as H3,Vx as H4,_u as HoverCard,Xu as HoverCardContent,Yu as HoverCardTrigger,ib as Image,dv as ImageCropper,wl as ImageViewer,Ab as ImageViewerTrigger,Ib as InfiniteScroll,Ox as InlineCode,Pa as Input,Yp as InputOTP,Xp as InputOTPGroup,Zp as InputOTPSeparator,qp as InputOTPSlot,Qb as KanbanBoard,Ob as Kbd,Cr as Label,yh as LabeledValue,wh as LabeledValueGroup,Fx as Large,Bx as Lead,Ub as LineChart,rg as Link,Kw as List,uf as ListItem,mf as ListItemText,Uv as ListView,pb as Listbox,fb as ListboxItem,Pb as Loading,Rb as LoadingOverlay,tl as MASK_PRESETS,Uf as MaskedInput,dg as Menubar,Rg as MenubarCheckboxItem,xg as MenubarContent,mg as MenubarGroup,yg as MenubarItem,Cg as MenubarLabel,ug as MenubarMenu,pg as MenubarPortal,gg as MenubarRadioGroup,wg as MenubarRadioItem,Tg as MenubarSeparator,Mg as MenubarShortcut,fg as MenubarSub,hg as MenubarSubContent,vg as MenubarSubTrigger,bg as MenubarTrigger,Xs as Meter,mp as Modal,bp as ModalBody,fp as ModalClose,ts as ModalContent,xp as ModalDescription,vp as ModalFooter,gp as ModalHeader,ji as ModalOverlay,Ui as ModalPortal,es as ModalRoot,hp as ModalTitle,pp as ModalTrigger,$x as Muted,Cb as NProgress,qf as Navbar,Zf as NavbarBrand,Qf as NavbarContent,Jf as NavbarItem,eg as NavbarLink,mm as NavigationMenu,vm as NavigationMenuContent,ym as NavigationMenuIndicator,fm as NavigationMenuItem,xm as NavigationMenuLink,pm as NavigationMenuList,bm as NavigationMenuTrigger,zi as NavigationMenuViewport,Vh as NotificationCenter,zh as NotificationCenterContent,Qk as NotificationCenterProvider,Ah as NotificationCenterTrigger,ac as NotificationItem,Oh as NotificationList,wv as NumberField,Ep as NumberInput,np as Pagination,rp as PaginationContent,ip as PaginationEllipsis,op as PaginationItem,Za as PaginationLink,sp as PaginationNext,ap as PaginationPrevious,Ax as Paragraph,Tx as Parallax,Pp as PasswordInput,_f as PhoneInput,Wb as PieChart,fx as Pop,ot as Popover,an as PopoverAnchor,at as PopoverContent,qn as PopoverTrigger,_a as Progress,tx as PullToRefresh,mx as Pulse,mv as QRCode,Tu as RadioGroup,Mu as RadioGroupItem,Wv as RangeSlider,Ap as Rating,Rw as ResizableHandle,yw as ResizablePanel,xw as ResizablePanelGroup,iv as RichTextEditor,cx as Ripple,ix as Rotate,ox as Scale,ke as ScrollArea,Cx as ScrollProgress,wx as ScrollReveal,kh as SearchBar,Mv as SearchField,Mf as SegmentedControl,Nf as SegmentedControlItem,Aa as Select,jn as Separator,ux as Shake,Qd as Sheet,eu as SheetClose,ru as SheetContent,iu as SheetDescription,au as SheetFooter,ou as SheetHeader,tu as SheetOverlay,Li as SheetPortal,su as SheetTitle,Jd as SheetTrigger,kx as Shimmer,Ha as Skeleton,rx as Slide,Ua as Slider,Kx as Small,sb as Snippet,vT as SortableList,Sx as Sparkles,Na as Spinner,Sh as SpotlightSearch,lf as StatCard,Av as StatusLight,Eg as Step,kg as Steps,Qh as SwipeActions,vd as Switch,ob as TabbedCodeBlock,jm as Table,_m as TableBody,Qm as TableCaption,Zm as TableCell,Ym as TableFooter,qm as TableHead,Wm as TableHeader,Xm as TableRow,jd as Tabs,Yd as TabsContent,Wd as TabsList,_d as TabsTrigger,Qv as TagGroup,tf as TagInput,Jy as TextBadge,hv as TextField,vx as TextReveal,hd as Textarea,pv as ThemeProvider,fv as ThemeToggle,Pv as TimeField,Of as TimeInput,Sb as TimePicker,bf as Timeline,xf as TimelineContent,hf as TimelineItem,yf as TimelineOpposite,G0 as Toaster,Nu as Toggle,Pu as ToggleGroup,Eu as ToggleGroupItem,_n as Tooltip,Xn as TooltipContent,Wn as TooltipProvider,Yn as TooltipTrigger,Ag as Tree,bx as Typewriter,Gx as UL,Xg as User,zT as VirtualList,px as Wiggle,hx as WordRotate,zv as actionBarVariants,Lv as actionGroupVariants,Yh as actionSheetItemVariants,Gy as alertVariants,cs as applyMask,Og as autocompleteInputVariants,Hp as avatarGroupVariants,og as backTopVariants,Yy as badgeIndicatorVariants,Bh as bannerVariants,jh as bottomNavigationVariants,ed as buttonGroupVariants,qr as buttonVariants,V0 as calculatePasswordStrength,sd as cardVariants,Jb as carouselVariants,sa as chartContainerVariants,Op as chipVariants,Up as circularProgressVariants,Tm as closeButtonVariants,u as cn,Zg as codeVariants,lh as colorAreaVariants,fh as colorSliderVariants,Hf as colorSwatchPickerVariants,Df as colorSwatchVariants,bh as colorWheelVariants,Jl as contextualHelpTriggerVariants,Bb as copyButtonVariants,Bf as currencyInputVariants,Nv as datePickerVariants,Xd as defaultPasswordRequirements,Bm as drawerMenuButtonVariants,ov as emojiPickerVariants,rf as emptyStateVariants,fa as fabVariants,kf as fileUploadVariants,el as formatCurrency,ma as formatDate,is as formatFileSize,ds as formatPhoneNumber,$b as fullCalendarVariants,Pf as getFileIcon,Gf as getMaskPlaceholder,A0 as getPasswordStrengthColor,z0 as getPasswordStrengthLabel,nh as gridListItemVariants,th as gridListVariants,dh as hexToRgb,Zs as hsvToRgb,cv as imageCropperVariants,gl as imageVariants,Rl as infiniteScrollLoaderVariants,yl as infiniteScrollVariants,_p as inputOTPVariants,bv as inputSizeVariants,Pl as kanbanBoardVariants,Ll as kanbanCardVariants,Zb as kanbanColumnVariants,zb as kbdVariants,vv as labelSizeVariants,Rh as labeledValueGroupVariants,xh as labeledValueVariants,ng as linkVariants,df as listItemVariants,qi as listVariants,Gv as listViewItemVariants,$v as listViewVariants,ub as listboxItemVariants,db as listboxVariants,yb as loadingOverlayVariants,kb as loadingVariants,$f as maskedInputVariants,ah as meterVariants,Gi as modalContentVariants,Xf as navbarVariants,hm as navigationMenuLinkStyle,gm as navigationMenuTriggerStyle,wb as nprogressVariants,Rv as numberFieldVariants,Wl as parseDate,Ff as parseFormattedValue,hC as phoneInputVariants,ex as pullToRefreshVariants,Bl as qrCodeVariants,jv as rangeSliderVariants,Vp as ratingVariants,uh as rgbToHex,ch as rgbToHsv,sv as richTextEditorVariants,Nh as searchBarVariants,Tv as searchFieldVariants,Cf as segmentedControlItemVariants,wf as segmentedControlVariants,Sd as selectVariants,nu as sheetVariants,yd as skeletonVariants,ab as snippetVariants,vb as sortableItemVariants,bb as sortableListVariants,Qc as spinnerVariants,sf as statCardVariants,Vv as statusLightVariants,Pg as stepVariants,Ng as stepsVariants,cc as swipeActionVariants,Zh as swipeActionsVariants,La as switchColors,ec as tagGroupItemVariants,Zv as tagGroupVariants,ef as tagVariants,Qy as textBadgeVariants,gv as textFieldVariants,IN as themeToggleVariants,kv as timeFieldVariants,zf as timeInputVariants,vf as timelineItemVariants,gf as timelineVariants,$a as toggleVariants,Dg as treeItemVariants,Sg as treeVariants,nl as unmask,NL as useAnimatedValue,hy as useAsync,fL as useAsyncRetry,zE as useBodyScrollLock,ZE as useBooleanToggle,ZP as useBreakpoint,QP as useBreakpoints,vi as useButtonGroup,Is as useCarousel,fE as useClickOutside,gE as useClickOutsideMultiple,AP as useConfetti,vE as useCopy,bE as useCopyToClipboard,yL as useCountdown,JE as useCounter,qE as useCycle,sE as useDebounce,iE as useDebouncedCallback,lE as useDebouncedCallbackWithControls,CL as useDelayedValue,ly as useDisclosure,YE as useDisclosureOpen,GL as useDistance,DL as useDocumentIsVisible,Ly as useDocumentVisibility,HL as useDocumentVisibilityCallback,hR as useDrawer,jE as useElementSize,RE as useEventListener,wE as useEventListenerRef,bL as useFetch,bs as useFieldContext,HE as useFocusTrap,IE as useFocusTrapRef,ul as useFormContext,Iy as useFullscreen,BL as useFullscreenRef,$L as useGeolocation,hE as useHotkeys,xE as useHotkeysMap,ME as useHover,PE as useHoverDelay,kE as useHoverProps,NE as useHoverRef,PL as useIdle,EL as useIdleCallback,eL as useIncrementCounter,oy as useIntersectionObserver,BE as useIntersectionObserverRef,pi as useInterval,xL as useIntervalControls,$P as useIsDesktop,FP as useIsMobile,KP as useIsTablet,CE as useKeyPress,yE as useKeyPressed,tM as useKeyboardShortcut,FE as useLazyLoad,sL as useList,tE as useLocalStorage,TE as useLongPress,iL as useMap,WL as useMediaPermission,Ho as useMediaQuery,LE as useMouse,SE as useMouseElement,DE as useMouseElementRef,vL as useMutation,KE as useMutationObserver,$E as useMutationObserverRef,Js as useNotificationCenter,jL as useNotificationPermission,IL as useOnlineStatus,VL as useOnlineStatusCallback,UL as usePermission,GP as usePrefersColorScheme,UP as usePrefersReducedMotion,tL as usePrevious,rL as usePreviousDistinct,nL as usePreviousWithInitial,uL as useQueue,ML as useRafLoop,lL as useRecord,GE as useResizeObserver,UE as useResizeObserverRef,ty as useScrollLock,VE as useScrollPosition,dL as useSelection,rE as useSessionStorage,fy as useSet,XL as useSpeechRecognition,YL as useSpeechSynthesis,Uk as useSpotlight,kL as useSpringValue,mL as useStack,uE as useThrottle,mE as useThrottledCallback,Ty as useTimeout,wL as useTimeoutControls,TL as useTimeoutFlag,RL as useTimer,XE as useToggle,qP as useWindowHeight,AE as useWindowScroll,ha as useWindowSize,XP as useWindowWidth,Yg as userVariants,Ef as validateFile,nT as validators,Db as virtualListVariants};//# sourceMappingURL=index.js.map
72
+ `})]})});gx.displayName="Shimmer";var yP={sm:24,md:40,lg:56,xl:80},RP={default:{circle:"stroke-muted-foreground",check:"stroke-foreground"},success:{circle:"stroke-green-500",check:"stroke-green-500"},primary:{circle:"stroke-primary",check:"stroke-primary"},outline:{circle:"stroke-border",check:"stroke-foreground"}},bx=X.forwardRef(({show:e=true,size:t="md",variant:n="success",strokeWidth:r=2,duration:o=.6,delay:a=0,className:s,onComplete:i},l)=>{let c=yP[t],d=RP[n],m={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a,ease:"easeOut"}}},f={hidden:{pathLength:0,opacity:0},visible:{pathLength:1,opacity:1,transition:{duration:o*.5,delay:a+o*.4,ease:"easeOut"}}};return jsxs("svg",{ref:l,width:c,height:c,viewBox:"0 0 50 50",className:u(s),children:[jsx(motion.circle,{cx:"25",cy:"25",r:"22",fill:"none",strokeWidth:r,className:d.circle,variants:m,initial:"hidden",animate:e?"visible":"hidden"}),jsx(motion.path,{d:"M14 27 L22 35 L36 18",fill:"none",strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round",className:d.check,variants:f,initial:"hidden",animate:e?"visible":"hidden",onAnimationComplete:()=>e&&i?.()})]})});bx.displayName="Checkmark";var Do={particleCount:100,spread:70,startVelocity:30,decay:.95,gravity:1,colors:["#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff"],origin:{x:.5,y:.5},shapes:["square","circle"],scalar:1,drift:0,ticks:200},vx=X.forwardRef(({autoTrigger:e=false,delay:t=0,options:n={},children:r,onTrigger:o},a)=>{let s=X.useCallback(()=>{let i={...Do,...n};So(i),o?.();},[n,o]);return X.useEffect(()=>{if(e){let i=setTimeout(s,t);return ()=>clearTimeout(i)}},[e,t,s]),r?jsx("div",{ref:a,onClick:s,className:"inline-block cursor-pointer",children:r}):null});vx.displayName="Confetti";var wP=()=>{let e=X.useCallback(r=>{let o={...Do,...r};So(o);},[]),t=X.useCallback(()=>{let o=Date.now()+3e3,a=setInterval(()=>{let s=o-Date.now();if(s<=0){clearInterval(a);return}let i=50*(s/3e3);So({...Do,particleCount:i,origin:{x:Math.random()*.4+.1,y:Math.random()-.2}}),So({...Do,particleCount:i,origin:{x:Math.random()*.4+.5,y:Math.random()-.2}});},250);},[]),n=X.useCallback((r="both")=>{let o={x:0,y:1},a={x:1,y:1};(r==="left"||r==="both")&&So({...Do,particleCount:50,angle:60,spread:55,origin:o}),(r==="right"||r==="both")&&So({...Do,particleCount:50,angle:120,spread:55,origin:a});},[]);return {fire:e,fireworks:t,cannon:n}},hx=X.forwardRef(({children:e,color:t="hsl(var(--primary))",intensity:n=20,spread:r=0,animate:o=false,duration:a=2,className:s},i)=>{let l={boxShadow:`0 0 ${n}px ${r}px ${t}`};return o?jsx(motion.div,{ref:i,className:u("rounded-[inherit]",s),animate:{boxShadow:[`0 0 ${n}px ${r}px ${t}`,`0 0 ${n*1.5}px ${r+5}px ${t}`,`0 0 ${n}px ${r}px ${t}`]},transition:{duration:a,repeat:1/0,ease:"easeInOut"},children:e}):jsx("div",{ref:i,className:u("rounded-[inherit]",s),style:l,children:e})});hx.displayName="Glow";var fx=(e,t)=>({id:Math.random().toString(36).substr(2,9),x:`${Math.random()*100}%`,y:`${Math.random()*100}%`,size:Math.random()*(t-e)+e,delay:Math.random()*2}),xx=X.forwardRef(({children:e,count:t=10,color:n="hsl(var(--primary))",minSize:r=4,maxSize:o=8,duration:a=1.5,className:s},i)=>{let[l,c]=X.useState([]);return X.useEffect(()=>{let d=Array.from({length:t},()=>fx(r,o));c(d);let m=setInterval(()=>{c(f=>{let p=[...f],g=Math.floor(Math.random()*t);return p[g]=fx(r,o),p});},a*500);return ()=>clearInterval(m)},[t,r,o,a]),jsxs("div",{ref:i,className:u("relative inline-block",s),children:[e,l.map(d=>jsx(motion.svg,{className:"pointer-events-none absolute",style:{left:d.x,top:d.y,width:d.size,height:d.size},viewBox:"0 0 24 24",initial:{scale:0,opacity:0,rotate:0},animate:{scale:[0,1,0],opacity:[0,1,0],rotate:[0,180]},transition:{duration:a,delay:d.delay,repeat:1/0,ease:"easeInOut"},children:jsx("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z",fill:n})},d.id))]})});xx.displayName="Sparkles";var yx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h1",{ref:r,className:u("scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",e),...n,children:t}));yx.displayName="H1";var Rx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h2",{ref:r,className:u("scroll-m-20 text-3xl font-semibold tracking-tight",e),...n,children:t}));Rx.displayName="H2";var wx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h3",{ref:r,className:u("scroll-m-20 text-2xl font-semibold tracking-tight",e),...n,children:t}));wx.displayName="H3";var Cx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("h4",{ref:r,className:u("scroll-m-20 text-xl font-semibold tracking-tight",e),...n,children:t}));Cx.displayName="H4";var Tx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("leading-7 [&:not(:first-child)]:mt-6",e),...n,children:t}));Tx.displayName="Paragraph";var Mx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("blockquote",{ref:r,className:u("mt-6 border-l-2 pl-6 italic",e),...n,children:t}));Mx.displayName="Blockquote";var Nx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("code",{ref:r,className:u("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",e),...n,children:t}));Nx.displayName="InlineCode";var kx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("text-xl text-muted-foreground",e),...n,children:t}));kx.displayName="Lead";var Px=X.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("text-lg font-semibold",e),...n,children:t}));Px.displayName="Large";var Ex=X.forwardRef(({className:e,children:t,...n},r)=>jsx("small",{ref:r,className:u("text-sm font-medium leading-none",e),...n,children:t}));Ex.displayName="Small";var Lx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("text-sm text-muted-foreground",e),...n,children:t}));Lx.displayName="Muted";var Sx=X.forwardRef(({className:e,children:t,...n},r)=>jsx("ul",{ref:r,className:u("my-6 ml-6 list-disc [&>li]:mt-2",e),...n,children:t}));Sx.displayName="UL";function Ho(e){let t=useCallback(o=>typeof window<"u"?window.matchMedia(o).matches:false,[]),[n,r]=useState(()=>t(e));return useEffect(()=>{let o=window.matchMedia(e),a=()=>{r(o.matches);};return r(o.matches),o.addEventListener("change",a),()=>{o.removeEventListener("change",a);}},[e]),n}function NP(){return Ho("(max-width: 767px)")}function kP(){return Ho("(min-width: 768px) and (max-width: 1023px)")}function PP(){return Ho("(min-width: 1024px)")}function EP(){return Ho("(prefers-color-scheme: dark)")?"dark":"light"}function LP(){return Ho("(prefers-reduced-motion: reduce)")}function ha(e={}){let{initialWidth:t=0,initialHeight:n=0,debounce:r=0,includeScrollbar:o=true}=e,[a,s]=useState(()=>typeof window>"u"?{width:t,height:n}:{width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight}),i=useRef(null),l=useCallback(()=>{let c=()=>{s({width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight});};r>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(c,r)):c();},[r,o]);return useEffect(()=>(l(),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l),i.current&&clearTimeout(i.current);}),[l]),a}function VP(){let{width:e}=ha();return e}function AP(){let{height:e}=ha();return e}function zP(e){let{width:t}=ha();return t>=e}function OP(){let{width:e}=ha();return {isSm:e>=640,isMd:e>=768,isLg:e>=1024,isXl:e>=1280,is2xl:e>=1536}}function KP(e,t){let n=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading localStorage key "${e}":`,i),t}},[t,e]),[r,o]=useState(n),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting localStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(r):i;o(l),window.localStorage.setItem(e,JSON.stringify(l)),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:JSON.stringify(l)}));}catch(l){console.warn(`Error setting localStorage key "${e}":`,l);}},[e,r]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(e),o(t),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:null}));}catch(i){console.warn(`Error removing localStorage key "${e}":`,i);}},[e,t]);return useEffect(()=>{let i=l=>{if(l.key===e&&l.newValue!==null)try{o(JSON.parse(l.newValue));}catch{o(l.newValue);}else l.key===e&&l.newValue===null&&o(t);};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i);}},[e,t]),[r,a,s]}function GP(e,t){let n=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.sessionStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading sessionStorage key "${e}":`,i),t}},[t,e]),[r,o]=useState(n),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting sessionStorage key "${e}" even though environment is not a browser`);return}try{let l=i instanceof Function?i(r):i;o(l),window.sessionStorage.setItem(e,JSON.stringify(l));}catch(l){console.warn(`Error setting sessionStorage key "${e}":`,l);}},[e,r]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.sessionStorage.removeItem(e),o(t);}catch(i){console.warn(`Error removing sessionStorage key "${e}":`,i);}},[e,t]);return [r,a,s]}function WP(e,t=500){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function _P(e,t=500){let n=useRef(null),r=useRef(e);return useEffect(()=>{r.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]),useCallback((...a)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...a);},t);},[t])}function YP(e,t=500){let n=useRef(null),r=useRef(e),o=useRef(null);useEffect(()=>{r.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]);let a=useCallback((...c)=>{o.current=c,n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...c),n.current=null,o.current=null;},t);},[t]),s=useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null,o.current=null);},[]),i=useCallback(()=>{n.current&&o.current&&(clearTimeout(n.current),r.current(...o.current),n.current=null,o.current=null);},[]),l=useCallback(()=>n.current!==null,[]);return {debouncedCallback:a,cancel:s,flush:i,isPending:l}}function ZP(e,t=500){let[n,r]=useState(e),o=useRef(Date.now());return useEffect(()=>{let a=Date.now();if(a>=o.current+t)o.current=a,r(e);else {let s=setTimeout(()=>{o.current=Date.now(),r(e);},t-(a-o.current));return ()=>clearTimeout(s)}},[e,t]),n}function QP(e,t=500){let n=useRef(0),r=useRef(null),o=useRef(e);return useEffect(()=>{o.current=e;},[e]),useEffect(()=>()=>{r.current&&clearTimeout(r.current);},[]),useCallback((...s)=>{let i=Date.now();i-n.current>=t?(o.current(...s),n.current=i):(r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{o.current(...s),n.current=Date.now();},t-(i-n.current)));},[t])}function eE(e,t=true){let n=useRef(null);return useEffect(()=>{if(!t)return;let r=o=>{let a=n.current;!a||a.contains(o.target)||e(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e,t]),n}function tE(e,t,n=true){useEffect(()=>{if(!n)return;let r=o=>{e.some(s=>{let i=s.current;return i&&i.contains(o.target)})||t(o);};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r);}},[e,t,n]);}function nE(e=2e3){let[t,n]=useState(null),[r,o]=useState(false),[a,s]=useState(false),i=useCallback(()=>{n(null),o(false);},[]),l=useCallback(async c=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;s(true);try{return await navigator.clipboard.writeText(c),n(c),o(!0),e>0&&setTimeout(()=>{o(!1);},e),!0}catch(d){return console.warn("Copy to clipboard failed:",d),n(null),o(false),false}finally{s(false);}},[e]);return {copiedValue:t,success:r,isLoading:a,copy:l,reset:i}}function rE(){return useCallback(async e=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.warn("Copy to clipboard failed:",t),false}},[])}function Hx(e){let t=e.toLowerCase().split("+");return {key:t[t.length-1],ctrl:t.includes("ctrl")||t.includes("control"),alt:t.includes("alt")||t.includes("option"),shift:t.includes("shift"),meta:t.includes("meta")||t.includes("cmd")||t.includes("command")}}function Ix(e,t){let n=e.key.toLowerCase(),r=n===" "?"space":n==="escape"?"esc":n,o=t.key==="space"?" ":t.key;return (r===o||e.code.toLowerCase()===`key${o}`)&&e.ctrlKey===t.ctrl&&e.altKey===t.alt&&e.shiftKey===t.shift&&e.metaKey===t.meta}function oE(e,t,n={}){let{enabled:r=true,preventDefault:o=true,stopPropagation:a=false,target:s=null}=n,i=useRef(t);i.current=t;let l=Hx(e);useEffect(()=>{if(!r)return;let c=m=>{Ix(m,l)&&(o&&m.preventDefault(),a&&m.stopPropagation(),i.current(m));},d=s||document;return d.addEventListener("keydown",c),()=>{d.removeEventListener("keydown",c);}},[r,o,a,s,l]);}function aE(e,t={}){let{enabled:n=true,preventDefault:r=true,stopPropagation:o=false,target:a=null}=t,s=useRef(e);s.current=e;let i=Object.entries(e).map(([l,c])=>({parsed:Hx(l),handler:c}));useEffect(()=>{if(!n)return;let l=d=>{for(let{parsed:m,handler:f}of i)if(Ix(d,m)){r&&d.preventDefault(),o&&d.stopPropagation(),f(d);break}},c=a||document;return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l);}},[n,r,o,a,i]);}function sE(e){let t=useRef(false);return useEffect(()=>{let n=o=>{o.key===e&&(t.current=true);},r=o=>{o.key===e&&(t.current=false);};return document.addEventListener("keydown",n),document.addEventListener("keyup",r),()=>{document.removeEventListener("keydown",n),document.removeEventListener("keyup",r);}},[e]),t.current}function iE(e,t,n,r){let o=useRef(t);o.current=t,useEffect(()=>{let a;if(n==null?a=window:"current"in n?a=n.current:a=n,!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,r),()=>{a?.removeEventListener(e,s,r);}},[e,n,r]);}function lE(e,t,n){let r=useRef(null),o=useRef(t);return o.current=t,useEffect(()=>{let a=r.current;if(!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,n),()=>{a.removeEventListener(e,s,n);}},[e,n]),r}function cE(e,t,n={}){let{target:r,event:o="keydown",enabled:a=true}=n,s=useRef(t);s.current=t,useEffect(()=>{if(!a)return;let i=r?.current||window,l=c=>{c.key===e&&s.current(c);};return i.addEventListener(o,l),()=>{i.removeEventListener(o,l);}},[e,r,o,a]);}function dE(e,t={}){let{threshold:n=500,onStart:r,onCancel:o,enabled:a=true}=t,s=useRef(null),i=useRef(false),l=useRef(null),c=useCallback(m=>{a&&(l.current=m,i.current=false,r?.(m),s.current=setTimeout(()=>{i.current=true,l.current&&e(l.current);},n));},[e,n,r,a]),d=useCallback(m=>{a&&(s.current&&(clearTimeout(s.current),s.current=null),i.current||o?.(m),i.current=false,l.current=null);},[o,a]);return {onMouseDown:c,onMouseUp:d,onMouseLeave:d,onTouchStart:c,onTouchEnd:d}}function uE(e){let t=useRef(null),[n,r]=useState(false),o=useCallback(()=>{r(true),e?.onHoverStart?.();},[e]),a=useCallback(()=>{r(false),e?.onHoverEnd?.();},[e]);return useEffect(()=>{let s=t.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[o,a]),{ref:t,isHovered:n}}function mE(e,t){let[n,r]=useState(false),o=useCallback(()=>{r(true),t?.onHoverStart?.();},[t]),a=useCallback(()=>{r(false),t?.onHoverEnd?.();},[t]);return useEffect(()=>{let s=e.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[e,o,a]),n}function pE(){let[e,t]=useState(false);return {isHovered:e,hoverProps:{onMouseEnter:()=>t(true),onMouseLeave:()=>t(false)}}}function fE(e=0){let t=useRef(null),[n,r]=useState(false),o=useRef(null);return useEffect(()=>{let a=t.current;if(!a)return;let s=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(true);},e);},i=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r(false);},e);};return a.addEventListener("mouseenter",s),a.addEventListener("mouseleave",i),()=>{a.removeEventListener("mouseenter",s),a.removeEventListener("mouseleave",i),o.current&&clearTimeout(o.current);}},[e]),{ref:t,isHovered:n}}function bE(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let n=r=>{t({x:r.clientX,y:r.clientY});};return window.addEventListener("mousemove",n),()=>{window.removeEventListener("mousemove",n);}},[]),e}function vE(e={}){let{enabled:t=true,resetOnLeave:n=false}=e,r=useRef(null),[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=r.current;if(!s||!t)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{n&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),n&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),n&&s.removeEventListener("mouseleave",l);}},[t,n]),{ref:r,...o}}function hE(e,t={}){let{enabled:n=true,resetOnLeave:r=false}=t,[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=e.current;if(!s||!n)return;let i=c=>{let d=s.getBoundingClientRect();a({x:c.clientX,y:c.clientY,elementX:c.clientX-d.left,elementY:c.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:c.pageX,pageY:c.pageY});},l=()=>{r&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),r&&s.addEventListener("mouseleave",l),()=>{s.removeEventListener("mousemove",i),r&&s.removeEventListener("mouseleave",l);}},[e,n,r]),o}var zx=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"].join(",");function xE(e={}){let{enabled:t=true,initialFocus:n,returnFocus:r=true,autoFocus:o=true}=e,a=useRef(null),s=useRef(null),i=useCallback(()=>{let c=a.current;return c?Array.from(c.querySelectorAll(zx)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);return useEffect(()=>{if(!t)return;let c=a.current;if(c){if(s.current=document.activeElement,o)if(n?.current)n.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),r&&s.current&&s.current.focus();}}},[t,n,r,o,l,i]),a}function yE(e,t={}){let{enabled:n=true,initialFocus:r,returnFocus:o=true,autoFocus:a=true}=t,s=useRef(null),i=useCallback(()=>{let c=e.current;return c?Array.from(c.querySelectorAll(zx)).filter(d=>d.offsetParent!==null&&getComputedStyle(d).visibility!=="hidden"):[]},[e]),l=useCallback(c=>{if(c.key!=="Tab")return;let d=i();if(d.length===0)return;let m=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===m&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),m.focus());},[i]);useEffect(()=>{if(!n)return;let c=e.current;if(c){if(s.current=document.activeElement,a)if(r?.current)r.current.focus();else {let d=i();d.length>0&&d[0].focus();}return c.addEventListener("keydown",l),()=>{c.removeEventListener("keydown",l),o&&s.current&&s.current.focus();}}},[e,n,r,o,a,l,i]);}function RE(e={}){let{threshold:t=0,throttle:n=0,element:r}=e,[o,a]=useState({x:0,y:0,isScrolled:false,directionY:0,directionX:0,isAtBottom:false,isAtTop:true,progress:0}),s=useRef(0),i=useRef(0),l=useRef(false),c=useRef(0),d=useCallback(()=>{let f=r?.current,p=f?f.scrollTop:window.scrollY,g=f?f.scrollLeft:window.scrollX,h=f?f.scrollHeight-f.clientHeight:document.documentElement.scrollHeight-window.innerHeight,b=p>s.current?1:p<s.current?-1:0,v=g>i.current?1:g<i.current?-1:0;s.current=p,i.current=g,a({x:g,y:p,isScrolled:p>t,directionY:b,directionX:v,isAtBottom:p>=h-1,isAtTop:p<=0,progress:h>0?p/h:0}),l.current=false;},[r,t]),m=useCallback(()=>{let f=Date.now();if(n>0&&f-c.current<n){l.current||(l.current=true,requestAnimationFrame(d));return}c.current=f,l.current||(l.current=true,requestAnimationFrame(d));},[n,d]);return useEffect(()=>{let f=r?.current||window;return f.addEventListener("scroll",m,{passive:true}),d(),()=>{f.removeEventListener("scroll",m);}},[r,m,d]),o}function wE(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let n=()=>{t({x:window.scrollX,y:window.scrollY});};return window.addEventListener("scroll",n,{passive:true}),n(),()=>{window.removeEventListener("scroll",n);}},[]),e}function Gx(e={}){let{autoLock:t=false,lockX:n=true}=e,r=useRef(false),o=useRef({x:0,y:0}),a=useRef(null),s=useCallback(()=>{if(typeof document>"u"||r.current)return;let{body:l}=document,c=window.scrollY,d=window.scrollX;o.current={x:d,y:c},a.current={overflow:l.style.overflow,overflowX:l.style.overflowX,overflowY:l.style.overflowY,position:l.style.position,top:l.style.top,left:l.style.left,width:l.style.width},l.style.overflow="hidden",n&&(l.style.overflowX="hidden"),l.style.overflowY="hidden",l.style.position="fixed",l.style.top=`-${c}px`,l.style.left=n?`-${d}px`:"0",l.style.width="100%",r.current=true;},[n]),i=useCallback(()=>{if(typeof document>"u"||!r.current)return;let{body:l}=document,c=a.current;c&&(l.style.overflow=c.overflow,l.style.overflowX=c.overflowX,l.style.overflowY=c.overflowY,l.style.position=c.position,l.style.top=c.top,l.style.left=c.left,l.style.width=c.width),window.scrollTo(o.current.x,o.current.y),r.current=false;},[]);return useEffect(()=>(t&&s(),()=>{i();}),[t,s,i]),{lock:s,unlock:i,isLocked:r.current}}function CE(e=true){let{lock:t,unlock:n}=Gx();useEffect(()=>{e?t():n();},[e,t,n]);}function Wx(e={}){let{root:t=null,rootMargin:n="0px",threshold:r=0,once:o=false,enabled:a=true}=e,s=useRef(null),[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=s.current;if(!c||!a)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),o&&m.isIntersecting&&d.disconnect();},{root:t,rootMargin:n,threshold:r});return d.observe(c),()=>{d.disconnect();}},[t,n,r,o,a]),{ref:s,...i}}function ME(e,t={}){let{root:n=null,rootMargin:r="0px",threshold:o=0,once:a=false,enabled:s=true}=t,[i,l]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let c=e.current;if(!c||!s)return;let d=new IntersectionObserver(([m])=>{l({isIntersecting:m.isIntersecting,entry:m}),a&&m.isIntersecting&&d.disconnect();},{root:n,rootMargin:r,threshold:o});return d.observe(c),()=>{d.disconnect();}},[e,n,r,o,a,s]),i}function NE(e="200px"){let{ref:t,isIntersecting:n}=Wx({rootMargin:e,once:true});return {ref:t,isVisible:n}}function kE(e,t={}){let{enabled:n=true,childList:r=true,attributes:o=true,characterData:a=false,subtree:s=false,attributeOldValue:i=false,characterDataOldValue:l=false,attributeFilter:c}=t,d=useRef(null),m=useRef(e);return m.current=e,useEffect(()=>{let f=d.current;if(!f||!n)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:r,attributes:o,characterData:a,subtree:s,attributeOldValue:i,characterDataOldValue:l,attributeFilter:c}),()=>{p.disconnect();}},[n,r,o,a,s,i,l,c]),d}function PE(e,t,n={}){let{enabled:r=true,childList:o=true,attributes:a=true,characterData:s=false,subtree:i=false,attributeOldValue:l=false,characterDataOldValue:c=false,attributeFilter:d}=n,m=useRef(t);m.current=t,useEffect(()=>{let f=e.current;if(!f||!r)return;let p=new MutationObserver((g,h)=>{m.current(g,h);});return p.observe(f,{childList:o,attributes:a,characterData:s,subtree:i,attributeOldValue:l,characterDataOldValue:c,attributeFilter:d}),()=>{p.disconnect();}},[e,r,o,a,s,i,l,c,d]);}function EE(e={}){let{enabled:t=true,box:n="content-box",debounce:r=0}=e,o=useRef(null),[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;n==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});r>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,r)):p();},[n,r]);return useEffect(()=>{let c=o.current;if(!c||!t)return;let d=new ResizeObserver(l);d.observe(c,{box:n});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[t,n,l]),{ref:o,...a}}function LE(e,t={}){let{enabled:n=true,box:r="content-box",debounce:o=0}=t,[a,s]=useState({width:0,height:0}),i=useRef(null),l=useCallback(c=>{let d=c[0];if(!d)return;let m,f;r==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:m,height:f});o>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(p,o)):p();},[r,o]);return useEffect(()=>{let c=e.current;if(!c||!n)return;let d=new ResizeObserver(l);d.observe(c,{box:r});let m=c.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[e,n,r,l]),a}function SE(){let e=useRef(null),t=useCallback(()=>{let n=e.current;if(!n)return {width:0,height:0};let r=n.getBoundingClientRect();return {width:r.width,height:r.height}},[]);return {ref:e,measure:t}}function qx(e={}){let{defaultOpen:t=false,isOpen:n,onOpen:r,onClose:o,onChange:a,id:s}=e,[i,l]=useState(t),c=n!==void 0,d=c?n:i,m=useCallback(()=>{c||l(true),r?.(),a?.(true);},[c,r,a]),f=useCallback(()=>{c||l(false),o?.(),a?.(false);},[c,o,a]),p=useCallback(()=>{d?f():m();},[d,m,f]),g=useCallback(v=>{v?m():f();},[m,f]),h=useCallback(()=>({onClick:p,"aria-expanded":d,...s&&{"aria-controls":s}}),[p,d,s]),b=useCallback(()=>({hidden:!d,...s&&{id:s}}),[d,s]);return useMemo(()=>({isOpen:d,open:m,close:f,toggle:p,setIsOpen:g,getButtonProps:h,getDisclosureProps:b}),[d,m,f,p,g,h,b])}function IE(e){return qx({...e,defaultOpen:true})}function VE(e=false){let[t,n]=useState(e),r=useCallback(()=>{n(o=>!o);},[]);return [t,r,n]}function AE(e,t=0){let[n,r]=useState(t),o=useCallback(()=>{r(i=>(i+1)%e.length);},[e.length]),a=useCallback(()=>{r(i=>(i-1+e.length)%e.length);},[e.length]),s=useCallback(i=>{let l=e.indexOf(i);l!==-1&&r(l);},[e]);return useMemo(()=>({value:e[n],index:n,next:o,prev:a,setIndex:r,setValue:s}),[e,n,o,a,s])}function zE(e=false){let[t,n]=useState(e),r=useCallback(()=>n(s=>!s),[]),o=useCallback(()=>n(true),[]),a=useCallback(()=>n(false),[]);return useMemo(()=>({value:t,toggle:r,on:o,off:a,set:n}),[t,r,o,a])}function BE(e=0,t={}){let{min:n=-1/0,max:r=1/0,step:o=1}=t,a=useCallback(g=>Math.min(Math.max(g,n),r),[n,r]),[s,i]=useState(()=>a(e)),l=useCallback(()=>{i(g=>a(g+o));},[a,o]),c=useCallback(()=>{i(g=>a(g-o));},[a,o]),d=useCallback(g=>{i(a(g));},[a]),m=useCallback(()=>{i(a(e));},[a,e]),f=s<=n,p=s>=r;return useMemo(()=>({count:s,increment:l,decrement:c,set:d,reset:m,isMin:f,isMax:p}),[s,l,c,d,m,f,p])}function FE(e=0){let[t,n]=useState(e),r=useCallback(()=>n(o=>o+1),[]);return [t,r]}function KE(e){let t=useRef(void 0);return useEffect(()=>{t.current=e;},[e]),t.current}function $E(e,t){let n=useRef(t);return useEffect(()=>{n.current=e;},[e]),n.current}function GE(e){let t=useRef(void 0),n=useRef(e),r=n.current!==e;return useEffect(()=>{t.current=n.current,n.current=e;},[e]),{current:e,previous:t.current,hasChanged:r}}function WE(e=[]){let[t,n]=useState(e),r=useCallback(C=>{n(C);},[]),o=useCallback(C=>{n(R=>[...R,C]);},[]),a=useCallback(C=>{n(R=>[...R,...C]);},[]),s=useCallback((C,R)=>{n(T=>{let M=[...T];return M.splice(C,0,R),M});},[]),i=useCallback((C,R)=>{n(T=>{let M=[...T];return M[C]=R,M});},[]),l=useCallback(C=>{n(R=>R.filter((T,M)=>M!==C));},[]),c=useCallback(C=>{n(R=>{let T=R.indexOf(C);return T===-1?R:R.filter((M,k)=>k!==T)});},[]),d=useCallback(C=>{n(R=>R.filter(T=>!C(T)));},[]),m=useCallback(()=>{let C;return n(R=>R.length===0?R:(C=R[0],R.slice(1))),C},[]),f=useCallback(C=>{n(R=>[C,...R]);},[]),p=useCallback(()=>{let C;return n(R=>R.length===0?R:(C=R[R.length-1],R.slice(0,-1))),C},[]),g=useCallback(()=>{n([]);},[]),h=useCallback(()=>{n(e);},[e]),b=useCallback((C,R)=>{n(T=>{let M=[...T],[k]=M.splice(C,1);return M.splice(R,0,k),M});},[]),v=useCallback((C,R)=>{n(T=>{let M=[...T];return [M[C],M[R]]=[M[R],M[C]],M});},[]),y=useCallback(C=>t.filter(C),[t]),x=useCallback(C=>t.find(C),[t]),w=useCallback(C=>t.includes(C),[t]);return useMemo(()=>({list:t,set:r,push:o,pushMany:a,insertAt:s,updateAt:i,removeAt:l,remove:c,removeWhere:d,shift:m,unshift:f,pop:p,clear:g,reset:h,move:b,swap:v,filter:y,find:x,includes:w,length:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i,l,c,d,m,f,p,g,h,b,v,y,x,w])}function _E(e=[]){let[t,n]=useState(()=>new Map(e)),r=useCallback(p=>t.get(p),[t]),o=useCallback((p,g)=>{n(h=>{let b=new Map(h);return b.set(p,g),b});},[]),a=useCallback(p=>{n(g=>{let h=new Map(g);return p.forEach(([b,v])=>h.set(b,v)),h});},[]),s=useCallback(p=>t.has(p),[t]),i=useCallback(p=>{n(g=>{let h=new Map(g);return h.delete(p),h});},[]),l=useCallback(()=>{n(new Map);},[]),c=useCallback(()=>{n(new Map(e));},[e]),d=useCallback(()=>Array.from(t.keys()),[t]),m=useCallback(()=>Array.from(t.values()),[t]),f=useCallback(()=>Array.from(t.entries()),[t]);return useMemo(()=>({map:t,get:r,set:o,setMany:a,has:s,delete:i,clear:l,reset:c,keys:d,values:m,entries:f,size:t.size,isEmpty:t.size===0}),[t,r,o,a,s,i,l,c,d,m,f])}function YE(e={}){let[t,n]=useState(e),r=useCallback(d=>t[d],[t]),o=useCallback((d,m)=>{n(f=>({...f,[d]:m}));},[]),a=useCallback(d=>{n(m=>({...m,...d}));},[]),s=useCallback(d=>{n(m=>{let{[d]:f,...p}=m;return p});},[]),i=useCallback(()=>{n({});},[]),l=useCallback(()=>{n(e);},[e]),c=useCallback(d=>d in t,[t]);return useMemo(()=>({value:t,get:r,set:o,setAll:a,remove:s,clear:i,reset:l,has:c,keys:Object.keys(t),values:Object.values(t)}),[t,r,o,a,s,i,l,c])}function ny(e=[]){let[t,n]=useState(()=>new Set(e)),r=useCallback(m=>{n(f=>{let p=new Set(f);return p.add(m),p});},[]),o=useCallback(m=>{n(f=>{let p=new Set(f);return m.forEach(g=>p.add(g)),p});},[]),a=useCallback(m=>{n(f=>{let p=new Set(f);return p.delete(m),p});},[]),s=useCallback(m=>t.has(m),[t]),i=useCallback(m=>{n(f=>{let p=new Set(f);return p.has(m)?p.delete(m):p.add(m),p});},[]),l=useCallback(()=>{n(new Set);},[]),c=useCallback(()=>{n(new Set(e));},[e]),d=useCallback(()=>Array.from(t),[t]);return useMemo(()=>({set:t,add:r,addMany:o,remove:a,has:s,toggle:i,clear:l,reset:c,values:d,size:t.size,isEmpty:t.size===0}),[t,r,o,a,s,i,l,c,d])}function qE(e=[]){let{add:t,remove:n,has:r,toggle:o,clear:a,addMany:s,values:i,size:l}=ny(e);return useMemo(()=>({selected:i(),isSelected:r,select:t,deselect:n,toggle:o,selectAll:s,deselectAll:a,count:l,isEmpty:l===0}),[i,r,t,n,o,s,a,l])}function ZE(e=[]){let[t,n]=useState(e),r=useCallback(c=>{n(d=>[...d,c]);},[]),o=useCallback(c=>{n(d=>[...d,...c]);},[]),a=useCallback(()=>{let c;return n(d=>d.length===0?d:(c=d[0],d.slice(1))),c},[]),s=useCallback(()=>t[0],[t]),i=useCallback(()=>t[t.length-1],[t]),l=useCallback(()=>{n([]);},[]);return useMemo(()=>({queue:t,enqueue:r,enqueueMany:o,dequeue:a,peek:s,peekLast:i,clear:l,size:t.length,isEmpty:t.length===0,hasItems:t.length>0}),[t,r,o,a,s,i,l])}function QE(e=[]){let[t,n]=useState(e),r=useCallback(l=>{n(c=>[...c,l]);},[]),o=useCallback(l=>{n(c=>[...c,...l]);},[]),a=useCallback(()=>{let l;return n(c=>c.length===0?c:(l=c[c.length-1],c.slice(0,-1))),l},[]),s=useCallback(()=>t[t.length-1],[t]),i=useCallback(()=>{n([]);},[]);return useMemo(()=>({stack:t,push:r,pushMany:o,pop:a,peek:s,clear:i,size:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i])}function sy(e,t=false){let[n,r]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true}),o=useRef(true),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{r(c=>({...c,isLoading:true,isIdle:false,isError:false,error:null}));try{let c=await a.current(...l);return o.current&&r({data:c,error:null,isLoading:!1,isSuccess:!0,isError:!1,isIdle:!1}),c}catch(c){let d=c instanceof Error?c:new Error(String(c));return o.current&&r({data:null,error:d,isLoading:false,isSuccess:false,isError:true,isIdle:false}),null}},[]),i=useCallback(()=>{r({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true});},[]);return useEffect(()=>(o.current=true,t&&s(),()=>{o.current=false;}),[t,s]),{...n,execute:s,reset:i}}function eL(e,t=3,n=1e3){let[r,o]=useState(0),a=useRef(e);a.current=e;let s=useCallback(async(...l)=>{let c=null;for(let d=0;d<=t;d++)try{return o(d),await a.current(...l)}catch(m){c=m instanceof Error?m:new Error(String(m)),d<t&&await new Promise(f=>setTimeout(f,n));}throw c},[t,n]);return {...sy(s,false),retryCount:r}}var cy=new Map,tL=300*1e3;function nL(e,t={}){let{immediate:n=true,init:r,transform:o,deps:a=[],enabled:s=true,refetchInterval:i,cacheKey:l}=t,[c,d]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),m=useRef(null),f=useRef(true),p=useCallback(async()=>{if(!e||!s)return;let h=l||e,b=cy.get(h);if(b&&Date.now()-b.timestamp<tL){d({data:b.data,error:null,isLoading:false,isSuccess:true,isError:false});return}m.current&&m.current.abort(),m.current=new AbortController,d(v=>({...v,isLoading:true,error:null}));try{let v=await fetch(e,{...r,signal:m.current.signal});if(!v.ok)throw new Error(`HTTP error! status: ${v.status}`);let y=await v.json(),x=o?o(y):y;cy.set(h,{data:x,timestamp:Date.now()}),f.current&&d({data:x,error:null,isLoading:!1,isSuccess:!0,isError:!1});}catch(v){if(v instanceof Error&&v.name==="AbortError")return;let y=v instanceof Error?v:new Error(String(v));f.current&&d({data:null,error:y,isLoading:false,isSuccess:false,isError:true});}},[e,s,r,o,l]),g=useCallback(()=>{m.current&&m.current.abort();},[]);return useEffect(()=>(f.current=true,n&&s&&p(),()=>{f.current=false,g();}),[e,n,s,...a]),useEffect(()=>{if(!i||!s)return;let h=setInterval(p,i);return ()=>{clearInterval(h);}},[i,s,p]),{...c,refetch:p,abort:g}}function rL(e,t={}){let{transform:n,...r}=t,[o,a]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),s=useCallback(async l=>{a(c=>({...c,isLoading:true,error:null}));try{let c=await fetch(e,{...r,method:r.method||"POST",headers:{"Content-Type":"application/json",...r.headers},body:l?JSON.stringify(l):void 0});if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);let d=await c.json(),m=n?n(d):d;return a({data:m,error:null,isLoading:!1,isSuccess:!0,isError:!1}),m}catch(c){let d=c instanceof Error?c:new Error(String(c));return a({data:null,error:d,isLoading:false,isSuccess:false,isError:true}),null}},[e,r,n]),i=useCallback(()=>{a({data:null,error:null,isLoading:false,isSuccess:false,isError:false});},[]);return {...o,mutate:s,reset:i}}function mi(e,t){let n=useRef(e);n.current=e,useEffect(()=>{if(t===null)return;let r=setInterval(()=>{n.current();},t);return ()=>{clearInterval(r);}},[t]);}function aL(e,t){let[n,r]=useState(false);mi(e,n?t:null);let o=useCallback(()=>r(true),[]),a=useCallback(()=>r(false),[]),s=useCallback(()=>r(i=>!i),[]);return {start:o,stop:a,toggle:s,isRunning:n}}function sL(e,t={}){let{interval:n=1e3,onComplete:r,autoStart:o=false}=t,[a,s]=useState(e),[i,l]=useState(o),c=useRef(r);c.current=r;let d=a<=0;mi(()=>{s(g=>{let h=g-1;return h<=0?(l(false),c.current?.(),0):h});},i&&!d?n:null);let m=useCallback(()=>{d||l(true);},[d]),f=useCallback(()=>{l(false);},[]),p=useCallback(g=>{s(g??e),l(false);},[e]);return {seconds:a,isRunning:i,isComplete:d,start:m,pause:f,reset:p}}function iL(e={}){let{interval:t=1e3,maxSeconds:n,autoStart:r=false}=e,[o,a]=useState(0),[s,i]=useState(r),l=s&&(n===void 0||o<n);mi(()=>{a(p=>p+1);},l?t:null);let c=useCallback(()=>i(true),[]),d=useCallback(()=>i(false),[]),m=useCallback(()=>i(p=>!p),[]),f=useCallback(()=>{a(0),i(false);},[]);return {seconds:o,isRunning:s,start:c,stop:d,reset:f,toggle:m}}function my(e,t){let n=useRef(e);n.current=e,useEffect(()=>{if(t===null)return;let r=setTimeout(()=>{n.current();},t);return ()=>{clearTimeout(r);}},[t]);}function lL(e,t){let[n,r]=useState(false),o=useRef(null),a=useRef(e);a.current=e;let s=useCallback(()=>{o.current&&(clearTimeout(o.current),o.current=null),r(false);},[]),i=useCallback(()=>{s(),r(true),o.current=setTimeout(()=>{a.current(),r(false);},t);},[t,s]),l=useCallback(()=>{i();},[i]);return useEffect(()=>()=>{o.current&&clearTimeout(o.current);},[]),{start:i,cancel:s,reset:l,isScheduled:n}}function cL(e,t){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function dL(e,t=true){let[n,r]=useState(false);return my(()=>{r(true);},t?e:null),n}function uL(e,t=true){let[n,r]=useState(t),[o,a]=useState(0),[s,i]=useState(0),l=useRef(e);l.current=e;let c=useRef(null),d=useRef(0),m=useRef(0),f=useRef(0),p=useRef(0),g=useCallback(v=>{let y=d.current?v-d.current:0;d.current=v,p.current++,v-f.current>=1e3&&(a(p.current),p.current=0,f.current=v),m.current++,i(m.current),l.current(y,v),c.current=requestAnimationFrame(g);},[]),h=useCallback(()=>{c.current===null&&(d.current=0,f.current=performance.now(),p.current=0,c.current=requestAnimationFrame(g),r(true));},[g]),b=useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null,r(false));},[]);return useEffect(()=>(t&&h(),()=>{c.current!==null&&cancelAnimationFrame(c.current);}),[t,h]),{start:h,stop:b,isRunning:n,frameCount:s,fps:o}}function mL(e,t={}){let{duration:n=300,easing:r="easeOutCubic"}=t,[o,a]=useState(e),s=useRef(e),i=useRef(null),l=useRef(null),c={linear:d=>d,easeInCubic:d=>d*d*d,easeOutCubic:d=>1-Math.pow(1-d,3),easeInOutCubic:d=>d<.5?4*d*d*d:1-Math.pow(-2*d+2,3)/2};return useEffect(()=>{if(o===e)return;s.current=o,i.current=null;let d=m=>{i.current===null&&(i.current=m);let f=m-i.current,p=Math.min(f/n,1),g=c[r](p),h=s.current+(e-s.current)*g;a(h),p<1&&(l.current=requestAnimationFrame(d));};return l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,n,r]),o}function pL(e,t={}){let{stiffness:n=100,damping:r=10,mass:o=1}=t,[a,s]=useState(e),i=useRef(0),l=useRef(null),c=useRef(null);return useEffect(()=>{if(Math.abs(a-e)<.01&&Math.abs(i.current)<.01){s(e);return}let d=m=>{c.current===null&&(c.current=m);let f=Math.min((m-c.current)/1e3,.064);c.current=m;let p=(e-a)*n,g=i.current*r,h=(p-g)/o;i.current+=h*f;let b=a+i.current*f;s(b),Math.abs(b-e)>.01||Math.abs(i.current)>.01?l.current=requestAnimationFrame(d):(s(e),i.current=0);};return c.current=null,l.current=requestAnimationFrame(d),()=>{l.current!==null&&cancelAnimationFrame(l.current);}},[e,n,r,o,a]),a}var by=["mousemove","mousedown","resize","keydown","touchstart","wheel","scroll"];function fL(e,t={}){let{events:n=by,initialState:r=false,enabled:o=true}=t,[a,s]=useState(r),i=useRef(null),l=useCallback(()=>{s(false),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{s(true);},e);},[e]);return useEffect(()=>{if(o)return l(),n.forEach(c=>{window.addEventListener(c,l);}),()=>{i.current&&clearTimeout(i.current),n.forEach(c=>{window.removeEventListener(c,l);});}},[o,n,l]),a}function gL(e,t,n,r={}){let{events:o=by,initialState:a=false,enabled:s=true}=r,[i,l]=useState(a),c=useRef(null),d=useRef(a),m=useCallback(()=>{d.current&&(d.current=false,n?.()),l(false),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{d.current=true,l(true),t?.();},e);},[e,t,n]);return useEffect(()=>{if(s)return m(),o.forEach(f=>{window.addEventListener(f,m);}),()=>{c.current&&clearTimeout(c.current),o.forEach(f=>{window.removeEventListener(f,m);});}},[s,o,m]),i}function hy(){let[e,t]=useState(()=>typeof document>"u"?"visible":document.visibilityState);return useEffect(()=>{let n=()=>{t(document.visibilityState);};return document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}},[]),e}function hL(){return hy()==="visible"}function xL(e,t){let n=useCallback(()=>{document.visibilityState==="visible"?e?.():t?.();},[e,t]);useEffect(()=>(document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}),[n]);}function yL(){let[e,t]=useState(()=>typeof navigator>"u"?true:navigator.onLine);return useEffect(()=>{let n=()=>t(true),r=()=>t(false);return window.addEventListener("online",n),window.addEventListener("offline",r),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r);}},[]),e}function RL(e,t){let[n,r]=useState(()=>typeof navigator>"u"?true:navigator.onLine),o=useCallback(()=>{r(true),e?.();},[e]),a=useCallback(()=>{r(false),t?.();},[t]);return useEffect(()=>(window.addEventListener("online",o),window.addEventListener("offline",a),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",a);}),[o,a]),n}function wy(e){let[t,n]=useState(false),r=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),o=useCallback(async()=>{let i=e?.current||document.documentElement;try{i.requestFullscreen?await i.requestFullscreen():i.webkitRequestFullscreen?await i.webkitRequestFullscreen():i.mozRequestFullScreen?await i.mozRequestFullScreen():i.msRequestFullscreen&&await i.msRequestFullscreen();}catch(l){console.error("Failed to enter fullscreen:",l);}},[e]),a=useCallback(async()=>{try{document.exitFullscreen?await document.exitFullscreen():document.webkitExitFullscreen?await document.webkitExitFullscreen():document.mozCancelFullScreen?await document.mozCancelFullScreen():document.msExitFullscreen&&await document.msExitFullscreen();}catch(i){console.error("Failed to exit fullscreen:",i);}},[]),s=useCallback(async()=>{t?await a():await o();},[t,o,a]);return useEffect(()=>{let i=()=>{n(!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement));};return document.addEventListener("fullscreenchange",i),document.addEventListener("webkitfullscreenchange",i),document.addEventListener("mozfullscreenchange",i),document.addEventListener("MSFullscreenChange",i),()=>{document.removeEventListener("fullscreenchange",i),document.removeEventListener("webkitfullscreenchange",i),document.removeEventListener("mozfullscreenchange",i),document.removeEventListener("MSFullscreenChange",i);}},[]),{isFullscreen:t,enter:o,exit:a,toggle:s,isSupported:r}}function ML(){let e=useRef(null),t=wy(e);return {ref:e,...t}}function PL(e={}){let{watch:t=false,immediate:n=true,enableHighAccuracy:r=true,maximumAge:o=0,timeout:a=1e4}=e,[s,i]=useState({isLoading:false,position:null,error:null,latitude:null,longitude:null,accuracy:null,altitude:null,altitudeAccuracy:null,heading:null,speed:null,timestamp:null}),l=typeof navigator<"u"&&"geolocation"in navigator,c=useCallback(f=>{i({isLoading:false,position:f,error:null,latitude:f.coords.latitude,longitude:f.coords.longitude,accuracy:f.coords.accuracy,altitude:f.coords.altitude,altitudeAccuracy:f.coords.altitudeAccuracy,heading:f.coords.heading,speed:f.coords.speed,timestamp:f.timestamp});},[]),d=useCallback(f=>{i(p=>({...p,isLoading:false,error:f}));},[]),m=useCallback(()=>{l&&(i(f=>({...f,isLoading:true,error:null})),navigator.geolocation.getCurrentPosition(c,d,{enableHighAccuracy:r,maximumAge:o,timeout:a}));},[l,c,d,r,o,a]);return useEffect(()=>{if(l&&(n&&m(),t)){let f=navigator.geolocation.watchPosition(c,d,{enableHighAccuracy:r,maximumAge:o,timeout:a});return ()=>{navigator.geolocation.clearWatch(f);}}},[t,n,l,m,c,d,r,o,a]),{...s,getCurrentPosition:m,isSupported:l}}function EL(e,t,n,r){if(e===null||t===null||n===null||r===null)return null;let o=6371e3,a=e*Math.PI/180,s=n*Math.PI/180,i=(n-e)*Math.PI/180,l=(r-t)*Math.PI/180,c=Math.sin(i/2)*Math.sin(i/2)+Math.cos(a)*Math.cos(s)*Math.sin(l/2)*Math.sin(l/2),d=2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c));return o*d}function LL(e){let[t,n]=useState(null),[r,o]=useState(true),a=typeof navigator<"u"&&"permissions"in navigator,s=useCallback(async()=>{if(!a)return o(false),null;try{o(!0);let i=await navigator.permissions.query({name:e});return n(i.state),o(!1),i.state}catch(i){return console.error(`Permission query failed for ${e}:`,i),o(false),null}},[e,a]);return useEffect(()=>{if(!a){o(false);return}let i=null,l=()=>{i&&n(i.state);};return navigator.permissions.query({name:e}).then(c=>{i=c,n(c.state),o(false),c.addEventListener("change",l);}).catch(()=>{o(false);}),()=>{i&&i.removeEventListener("change",l);}},[e,a]),{state:t,isGranted:t==="granted",isDenied:t==="denied",isPrompt:t==="prompt",isLoading:r,isSupported:a,query:s}}function SL(){let[e,t]=useState(typeof Notification<"u"?Notification.permission:"default"),n=typeof Notification<"u",r=useCallback(async()=>{if(!n)return "default";let o=await Notification.requestPermission();return t(o),o},[n]);return useEffect(()=>{n&&t(Notification.permission);},[n]),{permission:e,request:r,isSupported:n}}function DL(e){let[t,n]=useState(null),[r,o]=useState(null),[a,s]=useState(false),i=typeof navigator<"u"&&"mediaDevices"in navigator,l=useCallback(async()=>{if(!i)return null;s(true),o(null);try{let d=await navigator.mediaDevices.getUserMedia(e);return n(d),s(!1),d}catch(d){let m=d instanceof Error?d:new Error(String(d));return o(m),s(false),null}},[e,i]),c=useCallback(()=>{t&&(t.getTracks().forEach(d=>d.stop()),n(null));},[t]);return useEffect(()=>()=>{t&&t.getTracks().forEach(d=>d.stop());},[t]),{stream:t,error:r,isLoading:a,request:l,stop:c,isSupported:i}}function IL(e={}){let{voice:t=null,rate:n=1,pitch:r=1,volume:o=1,lang:a="en-US"}=e,[s,i]=useState(false),[l,c]=useState(false),[d,m]=useState([]),f=typeof window<"u"&&"speechSynthesis"in window;useEffect(()=>{if(!f)return;let v=()=>{m(window.speechSynthesis.getVoices());};return v(),window.speechSynthesis.addEventListener("voiceschanged",v),()=>{window.speechSynthesis.removeEventListener("voiceschanged",v);}},[f]);let p=useCallback(v=>{if(!f)return;window.speechSynthesis.cancel();let y=new SpeechSynthesisUtterance(v);y.voice=t,y.rate=n,y.pitch=r,y.volume=o,y.lang=a,y.onstart=()=>i(true),y.onend=()=>{i(false),c(false);},y.onerror=()=>{i(false),c(false);},window.speechSynthesis.speak(y);},[f,t,n,r,o,a]),g=useCallback(()=>{f&&(window.speechSynthesis.cancel(),i(false),c(false));},[f]),h=useCallback(()=>{f&&(window.speechSynthesis.pause(),c(true));},[f]),b=useCallback(()=>{f&&(window.speechSynthesis.resume(),c(false));},[f]);return {speak:p,stop:g,pause:h,resume:b,isSpeaking:s,isPaused:l,isSupported:f,voices:d}}function VL(e={}){let{lang:t="en-US",continuous:n=false,interimResults:r=true}=e,[o,a]=useState(false),[s,i]=useState(""),[l,c]=useState(""),[d,m]=useState(null),f=useRef(null),p=typeof window<"u"?window.SpeechRecognition||window.webkitSpeechRecognition:null,g=p!==null;useEffect(()=>{if(!g||!p)return;let x=new p;return x.lang=t,x.continuous=n,x.interimResults=r,x.onstart=()=>{a(true),m(null);},x.onend=()=>{a(false);},x.onerror=w=>{m(new Error(w.error)),a(false);},x.onresult=w=>{let C="",R="";for(let T=w.resultIndex;T<w.results.length;T++){let M=w.results[T];M.isFinal?R+=M[0].transcript:C+=M[0].transcript;}R&&i(T=>T+R),c(C);},f.current=x,()=>{x.abort();}},[g,p,t,n,r]);let h=useCallback(()=>{if(f.current&&!o)try{f.current.start();}catch{}},[o]),b=useCallback(()=>{f.current&&f.current.stop();},[]),v=useCallback(()=>{f.current&&f.current.abort();},[]),y=useCallback(()=>{i(""),c(""),m(null);},[]);return {start:h,stop:b,abort:v,isListening:o,transcript:s,interimTranscript:l,isSupported:g,error:d,reset:y}}export{Pu as Accordion,Eu as AccordionItem,Dv as ActionBar,Hv as ActionBarButton,Mv as ActionGroup,zh as ActionSheet,Hy as Alert,Vy as AlertDescription,Iy as AlertTitle,$b as AreaChart,tm as AspectRatio,Ig as Autocomplete,Tr as Avatar,Mr as AvatarFallback,Ep as AvatarGroup,Jr as AvatarImage,eg as BackTop,By as Badge,Ph as Banner,Fb as BarChart,th as BatteryMeter,Mx as Blockquote,Ih as BottomNavigation,Qh as Bounce,Wu as Breadcrumb,Qu as BreadcrumbEllipsis,Yu as BreadcrumbItem,Xu as BreadcrumbLink,_u as BreadcrumbList,qu as BreadcrumbPage,Zu as BreadcrumbSeparator,ae as Button,Zc as ButtonGroup,Kf as COUNTRIES,to as Calendar,nd as Card,sd as CardContent,ad as CardDescription,id as CardFooter,rd as CardHeader,od as CardTitle,Xb as Carousel,qb as CarouselContent,Zb as CarouselItem,El as CarouselNext,Pl as CarouselPrevious,Oo as Checkbox,bx as Checkmark,Ip as Chip,Fp as CircularProgress,Nt as CloseButton,_g as Code,Qg as CodeBlock,_h as Collapse,Vu as Collapsible,Au as CollapsibleContent,Hi as CollapsibleTrigger,sh as ColorArea,Sf as ColorPicker,ch as ColorSlider,qo as ColorSwatch,Ef as ColorSwatchPicker,uh as ColorWheel,ji as Command,zR as CommandDialog,vp as CommandEmpty,hp as CommandGroup,gp as CommandInput,yp as CommandItem,bp as CommandList,xp as CommandSeparator,Rp as CommandShortcut,vx as Confetti,ou as ContextMenu,pu as ContextMenuCheckboxItem,cu as ContextMenuContent,su as ContextMenuGroup,mu as ContextMenuItem,iu as ContextMenuPortal,fu as ContextMenuSection,gu as ContextMenuSeparator,bu as ContextMenuShortcut,lu as ContextMenuSub,uu as ContextMenuSubContent,du as ContextMenuSubTrigger,au as ContextMenuTrigger,Gv as ContextualHelp,Vb as CopyButton,rx as Counter,Af as CurrencyInput,ia as DEFAULT_COLORS,RR as DataTable,ON as DateField,zN as DateInput,Ks as DatePicker,Mb as DateRangePicker,eh as DiskUsageMeter,zi as Drawer,Mm as DrawerBody,Em as DrawerClose,Cm as DrawerContent,Pm as DrawerDescription,Nm as DrawerFooter,Am as DrawerGroup,zm as DrawerGroupLabel,Tm as DrawerHeader,Om as DrawerInset,Dm as DrawerMenu,Vm as DrawerMenuButton,Hm as DrawerMenuItem,fR as DrawerProvider,Sm as DrawerSeparator,Rm as DrawerSidebar,km as DrawerTitle,Lm as DrawerToggle,wm as DrawerTrigger,Cn as Dropdown,Mn as DropdownContent,Dd as DropdownGroup,$t as DropdownItem,R0 as DropdownLabel,Ci as DropdownSection,Ld as DropdownSeparator,Sd as DropdownShortcut,Hd as DropdownSub,Vd as DropdownSubContent,Id as DropdownSubTrigger,Tn as DropdownTrigger,Sl as EMOJIS,Vs as EMOJI_CATEGORIES,Jb as EmojiPicker,Jp as EmptyState,Yh as Expand,Qk as FAB,Uh as Fade,cl as FieldContext,Mf as FileUpload,qh as Flip,nc as FloatingActionButton,Vg as Form,ll as FormContext,Bg as FormControl,Fg as FormDescription,Ag as FormField,zg as FormItem,Og as FormLabel,Kg as FormMessage,Ob as FullCalendar,hx as Glow,Zv as GridList,yx as H1,Rx as H2,wx as H3,Cx as H4,$u as HoverCard,Uu as HoverCardContent,Gu as HoverCardTrigger,nb as Image,ov as ImageCropper,Rl as ImageViewer,Sb as ImageViewerTrigger,Eb as InfiniteScroll,Nx as InlineCode,Pa as Input,Gp as InputOTP,Up as InputOTPGroup,Wp as InputOTPSeparator,jp as InputOTPSlot,Wb as KanbanBoard,Hb as Kbd,Cr as Label,Px as Large,kx as Lead,Bb as LineChart,Qf as Link,Ew as List,af as ListItem,sf as ListItemText,Ov as ListView,lb as Listbox,cb as ListboxItem,Cb as Loading,bb as LoadingOverlay,el as MASK_PRESETS,Bf as MaskedInput,ag as Menubar,bg as MenubarCheckboxItem,fg as MenubarContent,ig as MenubarGroup,gg as MenubarItem,hg as MenubarLabel,sg as MenubarMenu,lg as MenubarPortal,dg as MenubarRadioGroup,vg as MenubarRadioItem,xg as MenubarSeparator,yg as MenubarShortcut,cg as MenubarSub,pg as MenubarSubContent,mg as MenubarSubTrigger,ug as MenubarTrigger,Xs as Meter,ip as Modal,up as ModalBody,cp as ModalClose,ts as ModalContent,fp as ModalDescription,mp as ModalFooter,dp as ModalHeader,Ui as ModalOverlay,Gi as ModalPortal,es as ModalRoot,pp as ModalTitle,lp as ModalTrigger,Lx as Muted,hb as NProgress,jf as Navbar,Wf as NavbarBrand,_f as NavbarContent,Yf as NavbarItem,Xf as NavbarLink,im as NavigationMenu,mm as NavigationMenuContent,gm as NavigationMenuIndicator,cm as NavigationMenuItem,fm as NavigationMenuLink,lm as NavigationMenuList,um as NavigationMenuTrigger,Ai as NavigationMenuViewport,Ch as NotificationCenter,Mh as NotificationCenterContent,Ok as NotificationCenterProvider,Th as NotificationCenterTrigger,ec as NotificationItem,Nh as NotificationList,bv as NumberField,Tp as NumberInput,Zm as Pagination,Qm as PaginationContent,np as PaginationEllipsis,Jm as PaginationItem,Za as PaginationLink,tp as PaginationNext,ep as PaginationPrevious,Tx as Paragraph,mx as Parallax,Cp as PasswordInput,$f as PhoneInput,Kb as PieChart,nx as Pop,ot as Popover,an as PopoverAnchor,at as PopoverContent,qn as PopoverTrigger,_a as Progress,Gh as PullToRefresh,ex as Pulse,sv as QRCode,xu as RadioGroup,yu as RadioGroupItem,Fv as RangeSlider,Sp as Rating,cw as ResizableHandle,lw as ResizablePanel,iw as ResizablePanelGroup,tv as RichTextEditor,Zh as Ripple,Xh as Rotate,Wh as Scale,ke as ScrollArea,ux as ScrollProgress,dx as ScrollReveal,gh as SearchBar,xv as SearchField,yf as SegmentedControl,Rf as SegmentedControlItem,Aa as Select,jn as Separator,Jh as Shake,_d as Sheet,Xd as SheetClose,Qd as SheetContent,nu as SheetDescription,eu as SheetFooter,Jd as SheetHeader,qd as SheetOverlay,Ei as SheetPortal,tu as SheetTitle,Yd as SheetTrigger,gx as Shimmer,Ha as Skeleton,jh as Slide,Ua as Slider,Ex as Small,tb as Snippet,aT as SortableList,xx as Sparkles,Na as Spinner,xh as SpotlightSearch,nf as StatCard,Lv as StatusLight,Tg as Step,wg as Steps,Fh as SwipeActions,md as Switch,Jg as TabbedCodeBlock,Fm as Table,$m as TableBody,_m as TableCaption,Wm as TableCell,Gm as TableFooter,jm as TableHead,Km as TableHeader,Um as TableRow,Fd as Tabs,Gd as TabsContent,Kd as TabsList,$d as TabsTrigger,Wv as TagGroup,qp as TagInput,Ky as TextBadge,mv as TextField,ax as TextReveal,pd as Textarea,iv as ThemeProvider,lv as ThemeToggle,wv as TimeField,Hf as TimeInput,Nb as TimePicker,uf as Timeline,ff as TimelineContent,pf as TimelineItem,gf as TimelineOpposite,S0 as Toaster,Ru as Toggle,Cu as ToggleGroup,Tu as ToggleGroupItem,_n as Tooltip,Xn as TooltipContent,Wn as TooltipProvider,Yn as TooltipTrigger,Sg as Tree,ox as Typewriter,Sx as UL,Ug as User,MT as VirtualList,tx as Wiggle,sx as WordRotate,Sv as actionBarVariants,Tv as actionGroupVariants,Ah as actionSheetItemVariants,Sy as alertVariants,cs as applyMask,Hg as autocompleteInputVariants,Pp as avatarGroupVariants,Jf as backTopVariants,Ay as badgeIndicatorVariants,kh as bannerVariants,Hh as bottomNavigationVariants,Xc as buttonGroupVariants,qr as buttonVariants,C0 as calculatePasswordStrength,td as cardVariants,_b as carouselVariants,sa as chartContainerVariants,Hp as chipVariants,Bp as circularProgressVariants,xm as closeButtonVariants,u as cn,Wg as codeVariants,nh as colorAreaVariants,lh as colorSliderVariants,Pf as colorSwatchPickerVariants,kf as colorSwatchVariants,dh as colorWheelVariants,Xl as contextualHelpTriggerVariants,Ib as copyButtonVariants,If as currencyInputVariants,yv as datePickerVariants,Ud as defaultPasswordRequirements,Im as drawerMenuButtonVariants,Qb as emojiPickerVariants,Qp as emptyStateVariants,fa as fabVariants,wf as fileUploadVariants,Ji as formatCurrency,ma as formatDate,is as formatFileSize,ds as formatPhoneNumber,zb as fullCalendarVariants,Cf as getFileIcon,Of as getMaskPlaceholder,T0 as getPasswordStrengthColor,M0 as getPasswordStrengthLabel,qv as gridListItemVariants,Xv as gridListVariants,oh as hexToRgb,Zs as hsvToRgb,rv as imageCropperVariants,fl as imageVariants,yl as infiniteScrollLoaderVariants,xl as infiniteScrollVariants,$p as inputOTPVariants,dv as inputSizeVariants,Db as kbdVariants,uv as labelSizeVariants,Zf as linkVariants,of as listItemVariants,Xi as listVariants,zv as listViewItemVariants,Av as listViewVariants,sb as listboxItemVariants,ab as listboxVariants,gb as loadingOverlayVariants,wb as loadingVariants,zf as maskedInputVariants,Jv as meterVariants,$i as modalContentVariants,Uf as navbarVariants,pm as navigationMenuLinkStyle,dm as navigationMenuTriggerStyle,vb as nprogressVariants,gv as numberFieldVariants,$l as parseDate,Vf as parseFormattedValue,sC as phoneInputVariants,$h as pullToRefreshVariants,Vl as qrCodeVariants,Bv as rangeSliderVariants,Lp as ratingVariants,ah as rgbToHex,rh as rgbToHsv,ev as richTextEditorVariants,fh as searchBarVariants,hv as searchFieldVariants,hf as segmentedControlItemVariants,vf as segmentedControlVariants,Nd as selectVariants,Zd as sheetVariants,gd as skeletonVariants,eb as snippetVariants,mb as sortableItemVariants,ub as sortableListVariants,_c as spinnerVariants,tf as statCardVariants,Ev as statusLightVariants,Cg as stepVariants,Rg as stepsVariants,oc as swipeActionVariants,Bh as swipeActionsVariants,La as switchColors,ql as tagGroupItemVariants,jv as tagGroupVariants,Xp as tagVariants,Fy as textBadgeVariants,cv as textFieldVariants,wN as themeToggleVariants,Rv as timeFieldVariants,Df as timeInputVariants,mf as timelineItemVariants,df as timelineVariants,$a as toggleVariants,kg as treeItemVariants,Ng as treeVariants,tl as unmask,mL as useAnimatedValue,sy as useAsync,eL as useAsyncRetry,CE as useBodyScrollLock,zE as useBooleanToggle,zP as useBreakpoint,OP as useBreakpoints,bi as useButtonGroup,Is as useCarousel,eE as useClickOutside,tE as useClickOutsideMultiple,wP as useConfetti,rE as useCopy,nE as useCopyToClipboard,sL as useCountdown,BE as useCounter,AE as useCycle,WP as useDebounce,_P as useDebouncedCallback,YP as useDebouncedCallbackWithControls,cL as useDelayedValue,qx as useDisclosure,IE as useDisclosureOpen,EL as useDistance,hL as useDocumentIsVisible,hy as useDocumentVisibility,xL as useDocumentVisibilityCallback,sR as useDrawer,SE as useElementSize,iE as useEventListener,lE as useEventListenerRef,nL as useFetch,bs as useFieldContext,xE as useFocusTrap,yE as useFocusTrapRef,dl as useFormContext,wy as useFullscreen,ML as useFullscreenRef,PL as useGeolocation,oE as useHotkeys,aE as useHotkeysMap,uE as useHover,fE as useHoverDelay,pE as useHoverProps,mE as useHoverRef,fL as useIdle,gL as useIdleCallback,FE as useIncrementCounter,Wx as useIntersectionObserver,ME as useIntersectionObserverRef,mi as useInterval,aL as useIntervalControls,PP as useIsDesktop,NP as useIsMobile,kP as useIsTablet,cE as useKeyPress,sE as useKeyPressed,GT as useKeyboardShortcut,NE as useLazyLoad,WE as useList,KP as useLocalStorage,dE as useLongPress,_E as useMap,DL as useMediaPermission,Ho as useMediaQuery,bE as useMouse,vE as useMouseElement,hE as useMouseElementRef,rL as useMutation,kE as useMutationObserver,PE as useMutationObserverRef,Qs as useNotificationCenter,SL as useNotificationPermission,yL as useOnlineStatus,RL as useOnlineStatusCallback,LL as usePermission,EP as usePrefersColorScheme,LP as usePrefersReducedMotion,KE as usePrevious,GE as usePreviousDistinct,$E as usePreviousWithInitial,ZE as useQueue,uL as useRafLoop,YE as useRecord,EE as useResizeObserver,LE as useResizeObserverRef,Gx as useScrollLock,RE as useScrollPosition,qE as useSelection,GP as useSessionStorage,ny as useSet,VL as useSpeechRecognition,IL as useSpeechSynthesis,Lk as useSpotlight,pL as useSpringValue,QE as useStack,ZP as useThrottle,QP as useThrottledCallback,my as useTimeout,lL as useTimeoutControls,dL as useTimeoutFlag,iL as useTimer,VE as useToggle,AP as useWindowHeight,wE as useWindowScroll,ha as useWindowSize,VP as useWindowWidth,Gg as userVariants,Tf as validateFile,UC as validators,kb as virtualListVariants};//# sourceMappingURL=index.js.map
73
73
  //# sourceMappingURL=index.js.map