@reeverdev/ui 0.2.170 → 0.2.172
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.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import*as _ 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,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 za 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 YM from'embla-carousel-react';import {useEditor,EditorContent}from'@tiptap/react';import rN from'@tiptap/starter-kit';import oN from'@tiptap/extension-link';import aN from'@tiptap/extension-underline';import sN from'@tiptap/extension-text-align';import iN from'@tiptap/extension-placeholder';import PN,{centerCrop,makeAspectCrop}from'react-image-crop';import'react-image-crop/dist/ReactCrop.css';import AN 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 Eo from'canvas-confetti';function u(...e){return twMerge(clsx(e))}var s0=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"}}),i0={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},l0=_.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=i0[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(s0({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})]})});l0.displayName="Alert";var c0=_.forwardRef(({className:e,...t},n)=>jsx("h5",{ref:n,className:u("mb-1 font-medium leading-none tracking-tight",e),...t}));c0.displayName="AlertTitle";var d0=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("text-sm [&_p]:leading-relaxed",e),...t}));d0.displayName="AlertDescription";var u0=cva("absolute rounded-full flex items-center justify-center font-semibold",{variants:{variant:{solid:"",bordered:"border-2"},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"}}),m0={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},p0=_.forwardRef(({className:e,children:t,content:n,variant:r="solid",color:o="default",size:a="md",placement:s="top-right",isDot:i=false,...l},c)=>jsxs("div",{ref:c,className:u("relative inline-flex",e),...l,children:[t,jsx("span",{className:u(u0({variant:r,color:o,size:i?void 0:a,placement:s}),i&&m0[a||"md"],i&&"min-w-0 p-0"),children:!i&&n})]}));p0.displayName="Badge";var f0=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"}}),g0=_.forwardRef(({className:e,color:t,size:n,...r},o)=>jsx("span",{ref:o,className:u(f0({color:t,size:n}),e),...r}));g0.displayName="TextBadge";var Jc=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"}}),h0={sm:"text-xs",md:"text-sm",lg:"text-base"},Ma=_.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(Jc({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",h0[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]})});Ma.displayName="Spinner";var td=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"}}),nd=_.createContext({});function Ri(){return _.useContext(nd)}var rd=_.forwardRef(({className:e,variant:t,orientation:n,spacing:r,disabled:o,children:a,...s},i)=>jsx(nd.Provider,{value:{disabled:o},children:jsx("div",{ref:i,role:"group",className:u(td({variant:t,orientation:n,spacing:r,className:e})),...s,children:a})}));rd.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-2 border-current 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-2 border-current 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",icon:"h-10 w-10"},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:"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 dark:text-white dark:hover:bg-white dark:hover:text-zinc-900"},{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:"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 dark:text-green-500 dark:hover:bg-green-500 dark:hover:text-white"},{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:"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 dark:text-amber-500 dark:hover:bg-amber-500 dark:hover:text-white"},{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:"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 dark:text-red-500 dark:hover:bg-red-500 dark:hover:text-white"},{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:"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 dark:text-blue-500 dark:hover:bg-blue-500 dark:hover:text-white"}],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"md"}}),ae=_.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=Ri(),b=d||h.disabled||s,v=m,w=f?r==="sm"?"!px-0 !w-9":r==="lg"?"!px-0 !w-11":"!px-0 !w-10":"",R=s?jsxs(Fragment,{children:[jsx(Ma,{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}),w,"pointer-events-none opacity-50 cursor-not-allowed"),style:v,children:R}):jsx("a",{href:a,className:u(qr({variant:t,color:n,size:r,radius:o,className:e}),w),style:v,...p,children:R}):jsx("button",{type:"button",className:u(qr({variant:t,color:n,size:r,radius:o,className:e}),w),ref:g,disabled:b,style:v,...p,children:R})});ae.displayName="Button";var id=cva("border bg-card text-card-foreground shadow-sm",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"lg"}}),ld=_.forwardRef(({className:e,radius:t,...n},r)=>jsx("div",{ref:r,className:u(id({radius:t,className:e})),...n}));ld.displayName="Card";var cd=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex flex-col space-y-1.5 p-6",e),...t}));cd.displayName="CardHeader";var dd=_.forwardRef(({className:e,...t},n)=>jsx("h3",{ref:n,className:u("text-2xl font-semibold leading-none tracking-tight",e),...t}));dd.displayName="CardTitle";var ud=_.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));ud.displayName="CardDescription";var md=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("p-6 pt-0",e),...t}));md.displayName="CardContent";var pd=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center p-6 pt-0",e),...t}));pd.displayName="CardFooter";var Ao=_.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]=_.useState(n),h=t!==void 0,b=h?t:p,[v,w]=_.useState(false),x=_.useId(),R=()=>{if(o)return;let k=b==="indeterminate"?true:!b;h||g(k),r?.(k);},C=k=>{k.key==="Enter"&&k.preventDefault(),d?.(k);},y=b===true,N=b==="indeterminate",T=jsxs(Fragment,{children:[jsx("button",{type:"button",role:"checkbox",id:l?x:void 0,"aria-checked":N?"mixed":y,"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",y&&"bg-primary text-primary-foreground",N&&"bg-background text-foreground",!l&&e),style:{borderColor:v?"var(--color-foreground)":void 0},onClick:R,onKeyDown:C,onFocus:()=>w(true),onBlur:()=>w(false),...m,children:(y||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:y,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: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})]})]}):T});Ao.displayName="Checkbox";var N0=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 file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),ka=_.forwardRef(({className:e,type:t,radius:n,label:r,isRequired:o,description:a,errorMessage:s,isInvalid:i,onFocus:l,onBlur:c,style:d,...m},f)=>{let[p,g]=_.useState(false),h=_.useId(),b=m.id||h,v=i||!!s,w=jsx("input",{id:b,type:t,className:u(N0({radius:n}),v&&"border-danger focus:border-danger",!r&&e),ref:f,required:o,"aria-invalid":v,"aria-describedby":a||s?`${b}-description`:void 0,style:{...d,borderColor:v?void 0:p?"var(--color-foreground)":void 0},onFocus:x=>{g(true),l?.(x);},onBlur:x=>{g(false),c?.(x);},...m});return !r&&!a&&!s?w:jsxs("div",{className:u("flex flex-col gap-1.5",e),children:[r&&jsxs("label",{htmlFor:b,className:"text-sm font-medium leading-none",children:[r,o&&jsx("span",{className:"text-danger ml-1",children:"*"})]}),w,(a||s)&&jsx("p",{id:`${b}-description`,className:u("text-xs",v?"text-danger":"text-muted-foreground"),children:s||a})]})});ka.displayName="Input";var P0=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),wr=_.forwardRef(({className:e,...t},n)=>jsx("label",{ref:n,className:u(P0(),e),...t}));wr.displayName="Label";var Wn=_.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})});Wn.displayName="Separator";var S0="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",Ea={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"},vd={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"}},hd=_.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]=_.useState(a),v=o!==void 0,w=v?o:h,x=()=>{if(i)return;let N=!w;v||b(N),s?.(N);},R=N=>{N.key==="Enter"&&N.preventDefault(),m?.(N);},C=t&&Ea[t]?Ea[t]:Ea.default,y=vd[n]||vd.md;return jsxs(Fragment,{children:[jsx("button",{type:"button",role:"switch","aria-checked":w,"aria-required":l,"data-state":w?"checked":"unchecked",disabled:i,ref:g,className:u(S0,y.track,w?r?"":C:"bg-input",e),style:r&&w?{backgroundColor:r,...f}:f,onClick:x,onKeyDown:R,...p,children:jsx("span",{className:u("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",y.thumb,w?y.translate:"translate-x-0")})}),c&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:c,value:d,checked:w,required:l,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});hd.displayName="Switch";var V0=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-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"md"}}),xd=_.forwardRef(({className:e,radius:t,onFocus:n,onBlur:r,style:o,...a},s)=>{let[i,l]=_.useState(false);return jsx("textarea",{className:u(V0({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})});xd.displayName="Textarea";var Rd=cva("rounded-md bg-muted",{variants:{variant:{pulse:"animate-pulse",shimmer:"skeleton-shimmer",static:""}},defaultVariants:{variant:"pulse"}}),Da=_.forwardRef(({className:e,variant:t,...n},r)=>jsx("div",{ref:r,className:u(Rd({variant:t,className:e})),...n}));Da.displayName="Skeleton";var F0=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-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",radius:"full"}}),wd=_.createContext(null),Cd=()=>{let e=_.useContext(wd);if(!e)throw new Error("Avatar components must be used within an Avatar");return e},Cr=_.forwardRef(({className:e,size:t,radius:n,...r},o)=>{let[a,s]=_.useState("idle");return jsx(wd.Provider,{value:{imageLoadingStatus:a,onImageLoadingStatusChange:s},children:jsx("span",{ref:o,className:u(F0({size:t,radius:n,className:e})),...r})})});Cr.displayName="Avatar";var Jr=_.forwardRef(({className:e,src:t,alt:n,onLoadingStatusChange:r,...o},a)=>{let{imageLoadingStatus:s,onImageLoadingStatusChange:i}=Cd();return _.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 Tr=_.forwardRef(({className:e,delayMs:t=0,children:n,...r},o)=>{let{imageLoadingStatus:a}=Cd(),[s,i]=_.useState(t===0);return _.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})});Tr.displayName="AvatarFallback";var Md=_.createContext({delayDuration:700,skipDelayDuration:300}),jn=({children:e,delayDuration:t=700,skipDelayDuration:n=300})=>jsx(Md.Provider,{value:{delayDuration:t,skipDelayDuration:n},children:e});jn.displayName="TooltipProvider";var Nd=_.createContext(null),kd=()=>{let e=_.useContext(Nd);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=_.useContext(Md),[s,i]=_.useState(n),l=t!==void 0,c=l?t:s,d=_.useRef(null),m=_.useId(),f=_.useRef(null),p=o??a.delayDuration,g=_.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 _.useEffect(()=>()=>{f.current&&clearTimeout(f.current);},[]),jsx(Nd.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentId:m},children:e})};_n.displayName="Tooltip";var Yn=_.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l,contentId:c,open:d}=kd();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=_.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}=kd(),[m,f]=_.useState({top:0,left:0}),[p,g]=_.useState(false),h=_.useRef(null);if(_.useEffect(()=>{g(true);},[]),_.useEffect(()=>{if(!l||!c.current||!h.current)return;let v=c.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),x=0,R=0;switch(t){case "top":x=v.top-w.height-n;break;case "bottom":x=v.bottom+n;break;case "left":R=v.left-w.width-n;break;case "right":R=v.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":R=v.left+o;break;case "center":R=v.left+v.width/2-w.width/2;break;case "end":R=v.right-w.width-o;break}else switch(r){case "start":x=v.top+o;break;case "center":x=v.top+v.height/2-w.height/2;break;case "end":x=v.bottom-w.height-o;break}f({top:x,left:R});},[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 za.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 De=_.forwardRef(({className:e,orientation:t="vertical",visibility:n="visible",children:r,style:o,...a},s)=>{let[i,l]=_.useState(false),c=_.useId().replace(/:/g,""),d=n==="visible"||n==="hover"&&i,m=d?"rgba(0,0,0,0.3)":"transparent",f=d?"rgba(255,255,255,0.3)":"transparent",p=`
|
|
1
|
+
import*as _ 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,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 Oa 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 XM from'embla-carousel-react';import {useEditor,EditorContent}from'@tiptap/react';import oN from'@tiptap/starter-kit';import aN from'@tiptap/extension-link';import sN from'@tiptap/extension-underline';import iN from'@tiptap/extension-text-align';import lN from'@tiptap/extension-placeholder';import EN,{centerCrop,makeAspectCrop}from'react-image-crop';import'react-image-crop/dist/ReactCrop.css';import zN 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 Eo from'canvas-confetti';function m(...e){return twMerge(clsx(e))}var s0=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"}}),i0={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},l0=_.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=i0[n],u=!a,f=o!==void 0?o:d?jsx(d,{className:"h-4 w-4"}):null;return jsxs("div",{ref:c,role:"alert",className:m(s0({variant:t,type:n,radius:r}),s&&"flex items-center justify-between",e),...l,children:[jsxs("div",{className:"flex items-start gap-3",children:[u&&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})]})});l0.displayName="Alert";var c0=_.forwardRef(({className:e,...t},n)=>jsx("h5",{ref:n,className:m("mb-1 font-medium leading-none tracking-tight",e),...t}));c0.displayName="AlertTitle";var d0=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("text-sm [&_p]:leading-relaxed",e),...t}));d0.displayName="AlertDescription";var u0=cva("absolute rounded-full flex items-center justify-center font-semibold",{variants:{variant:{solid:"",bordered:"border-2"},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"}}),m0={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},p0=_.forwardRef(({className:e,children:t,content:n,variant:r="solid",color:o="default",size:a="md",placement:s="top-right",isDot:i=false,...l},c)=>jsxs("div",{ref:c,className:m("relative inline-flex",e),...l,children:[t,jsx("span",{className:m(u0({variant:r,color:o,size:i?void 0:a,placement:s}),i&&m0[a||"md"],i&&"min-w-0 p-0"),children:!i&&n})]}));p0.displayName="Badge";var f0=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"}}),g0=_.forwardRef(({className:e,color:t,size:n,...r},o)=>jsx("span",{ref:o,className:m(f0({color:t,size:n}),e),...r}));g0.displayName="TextBadge";var ed=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"}}),h0={sm:"text-xs",md:"text-sm",lg:"text-base"},Ma=_.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:m(ed({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:m("inline-flex",e),...i,children:c});let d=jsx("span",{className:m("text-muted-foreground",h0[t]),children:o}),u=a==="top"||a==="bottom";return jsxs("div",{ref:l,className:m("inline-flex items-center",u?"flex-col gap-2":"flex-row gap-3",(a==="left"||a==="top")&&(u?"flex-col-reverse":"flex-row-reverse"),e),...i,children:[c,d]})});Ma.displayName="Spinner";var nd=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"}}),rd=_.createContext({});function wi(){return _.useContext(rd)}var od=_.forwardRef(({className:e,variant:t,orientation:n,spacing:r,disabled:o,children:a,...s},i)=>jsx(rd.Provider,{value:{disabled:o},children:jsx("div",{ref:i,role:"group",className:m(nd({variant:t,orientation:n,spacing:r,className:e})),...s,children:a})}));od.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-2 border-current 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-2 border-current 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:"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 dark:text-white dark:hover:bg-white dark:hover:text-zinc-900"},{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:"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 dark:text-green-500 dark:hover:bg-green-500 dark:hover:text-white"},{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:"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 dark:text-amber-500 dark:hover:bg-amber-500 dark:hover:text-white"},{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:"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 dark:text-red-500 dark:hover:bg-red-500 dark:hover:text-white"},{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:"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 dark:text-blue-500 dark:hover:bg-blue-500 dark:hover:text-white"}],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"md"}}),ae=_.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:u,isIconOnly:f,...p},g)=>{let h=wi(),v=d||h.disabled||s,b=u,w=f?r==="sm"?"!px-0 !w-9":r==="lg"?"!px-0 !w-11":"!px-0 !w-10":"",R=s?jsxs(Fragment,{children:[jsx(Ma,{size:"sm",color:t==="solid"?"white":"default"}),c]}):jsxs(Fragment,{children:[i,c,l]});return a?v?jsx("span",{role:"link","aria-disabled":"true",className:m(qr({variant:t,color:n,size:r,radius:o,className:e}),w,"pointer-events-none opacity-50 cursor-not-allowed"),style:b,children:R}):jsx("a",{href:a,className:m(qr({variant:t,color:n,size:r,radius:o,className:e}),w),style:b,...p,children:R}):jsx("button",{type:"button",className:m(qr({variant:t,color:n,size:r,radius:o,className:e}),w),ref:g,disabled:v,style:b,...p,children:R})});ae.displayName="Button";var ld=cva("border bg-card text-card-foreground shadow-sm",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"lg"}}),cd=_.forwardRef(({className:e,radius:t,...n},r)=>jsx("div",{ref:r,className:m(ld({radius:t,className:e})),...n}));cd.displayName="Card";var dd=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex flex-col space-y-1.5 p-6",e),...t}));dd.displayName="CardHeader";var ud=_.forwardRef(({className:e,...t},n)=>jsx("h3",{ref:n,className:m("text-2xl font-semibold leading-none tracking-tight",e),...t}));ud.displayName="CardTitle";var md=_.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:m("text-sm text-muted-foreground",e),...t}));md.displayName="CardDescription";var pd=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("p-6 pt-0",e),...t}));pd.displayName="CardContent";var fd=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex items-center p-6 pt-0",e),...t}));fd.displayName="CardFooter";var Ao=_.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,...u},f)=>{let[p,g]=_.useState(n),h=t!==void 0,v=h?t:p,[b,w]=_.useState(false),x=_.useId(),R=()=>{if(o)return;let k=v==="indeterminate"?true:!v;h||g(k),r?.(k);},C=k=>{k.key==="Enter"&&k.preventDefault(),d?.(k);},y=v===true,N=v==="indeterminate",T=jsxs(Fragment,{children:[jsx("button",{type:"button",role:"checkbox",id:l?x:void 0,"aria-checked":N?"mixed":y,"aria-required":a,disabled:o,ref:f,className:m("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",y&&"bg-primary text-primary-foreground",N&&"bg-background text-foreground",!l&&e),style:{borderColor:b?"var(--color-foreground)":void 0},onClick:R,onKeyDown:C,onFocus:()=>w(true),onBlur:()=>w(false),...u,children:(y||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:y,required:a,disabled:o,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]});return l?jsxs("div",{className:m("flex items-start gap-2",e),children:[T,jsxs("div",{className:"flex flex-col gap-0.5",children:[jsx("label",{htmlFor:x,className:m("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});Ao.displayName="Checkbox";var N0=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 file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),ka=_.forwardRef(({className:e,type:t,radius:n,label:r,isRequired:o,description:a,errorMessage:s,isInvalid:i,onFocus:l,onBlur:c,style:d,...u},f)=>{let[p,g]=_.useState(false),h=_.useId(),v=u.id||h,b=i||!!s,w=jsx("input",{id:v,type:t,className:m(N0({radius:n}),b&&"border-danger focus:border-danger",!r&&e),ref:f,required:o,"aria-invalid":b,"aria-describedby":a||s?`${v}-description`:void 0,style:{...d,borderColor:b?void 0:p?"var(--color-foreground)":void 0},onFocus:x=>{g(true),l?.(x);},onBlur:x=>{g(false),c?.(x);},...u});return !r&&!a&&!s?w:jsxs("div",{className:m("flex flex-col gap-1.5",e),children:[r&&jsxs("label",{htmlFor:v,className:"text-sm font-medium leading-none",children:[r,o&&jsx("span",{className:"text-danger ml-1",children:"*"})]}),w,(a||s)&&jsx("p",{id:`${v}-description`,className:m("text-xs",b?"text-danger":"text-muted-foreground"),children:s||a})]})});ka.displayName="Input";var P0=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),wr=_.forwardRef(({className:e,...t},n)=>jsx("label",{ref:n,className:m(P0(),e),...t}));wr.displayName="Label";var Wn=_.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:m("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:m("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o})});Wn.displayName="Separator";var S0="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",Ea={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"},hd={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"}},xd=_.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:u,style:f,...p},g)=>{let[h,v]=_.useState(a),b=o!==void 0,w=b?o:h,x=()=>{if(i)return;let N=!w;b||v(N),s?.(N);},R=N=>{N.key==="Enter"&&N.preventDefault(),u?.(N);},C=t&&Ea[t]?Ea[t]:Ea.default,y=hd[n]||hd.md;return jsxs(Fragment,{children:[jsx("button",{type:"button",role:"switch","aria-checked":w,"aria-required":l,"data-state":w?"checked":"unchecked",disabled:i,ref:g,className:m(S0,y.track,w?r?"":C:"bg-input",e),style:r&&w?{backgroundColor:r,...f}:f,onClick:x,onKeyDown:R,...p,children:jsx("span",{className:m("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",y.thumb,w?y.translate:"translate-x-0")})}),c&&jsx("input",{type:"checkbox","aria-hidden":true,tabIndex:-1,name:c,value:d,checked:w,required:l,disabled:i,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});xd.displayName="Switch";var V0=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-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"md"}}),yd=_.forwardRef(({className:e,radius:t,onFocus:n,onBlur:r,style:o,...a},s)=>{let[i,l]=_.useState(false);return jsx("textarea",{className:m(V0({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})});yd.displayName="Textarea";var wd=cva("rounded-md bg-muted",{variants:{variant:{pulse:"animate-pulse",shimmer:"skeleton-shimmer",static:""}},defaultVariants:{variant:"pulse"}}),Da=_.forwardRef(({className:e,variant:t,...n},r)=>jsx("div",{ref:r,className:m(wd({variant:t,className:e})),...n}));Da.displayName="Skeleton";var F0=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-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",radius:"full"}}),Cd=_.createContext(null),Td=()=>{let e=_.useContext(Cd);if(!e)throw new Error("Avatar components must be used within an Avatar");return e},Cr=_.forwardRef(({className:e,size:t,radius:n,...r},o)=>{let[a,s]=_.useState("idle");return jsx(Cd.Provider,{value:{imageLoadingStatus:a,onImageLoadingStatusChange:s},children:jsx("span",{ref:o,className:m(F0({size:t,radius:n,className:e})),...r})})});Cr.displayName="Avatar";var Jr=_.forwardRef(({className:e,src:t,alt:n,onLoadingStatusChange:r,...o},a)=>{let{imageLoadingStatus:s,onImageLoadingStatusChange:i}=Td();return _.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:m("aspect-square h-full w-full object-cover",e),...o})});Jr.displayName="AvatarImage";var Tr=_.forwardRef(({className:e,delayMs:t=0,children:n,...r},o)=>{let{imageLoadingStatus:a}=Td(),[s,i]=_.useState(t===0);return _.useEffect(()=>{if(t>0){let l=setTimeout(()=>i(true),t);return ()=>clearTimeout(l)}},[t]),a==="loaded"||!s?null:jsx("span",{ref:o,className:m("flex h-full w-full items-center justify-center bg-muted",e),...r,children:n})});Tr.displayName="AvatarFallback";var Nd=_.createContext({delayDuration:700,skipDelayDuration:300}),jn=({children:e,delayDuration:t=700,skipDelayDuration:n=300})=>jsx(Nd.Provider,{value:{delayDuration:t,skipDelayDuration:n},children:e});jn.displayName="TooltipProvider";var kd=_.createContext(null),Pd=()=>{let e=_.useContext(kd);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=_.useContext(Nd),[s,i]=_.useState(n),l=t!==void 0,c=l?t:s,d=_.useRef(null),u=_.useId(),f=_.useRef(null),p=o??a.delayDuration,g=_.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 _.useEffect(()=>()=>{f.current&&clearTimeout(f.current);},[]),jsx(kd.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentId:u},children:e})};_n.displayName="Tooltip";var Yn=_.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l,contentId:c,open:d}=Pd();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=_.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}=Pd(),[u,f]=_.useState({top:0,left:0}),[p,g]=_.useState(false),h=_.useRef(null);if(_.useEffect(()=>{g(true);},[]),_.useEffect(()=>{if(!l||!c.current||!h.current)return;let b=c.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),x=0,R=0;switch(t){case "top":x=b.top-w.height-n;break;case "bottom":x=b.bottom+n;break;case "left":R=b.left-w.width-n;break;case "right":R=b.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":R=b.left+o;break;case "center":R=b.left+b.width/2-w.width/2;break;case "end":R=b.right-w.width-o;break}else switch(r){case "start":x=b.top+o;break;case "center":x=b.top+b.height/2-w.height/2;break;case "end":x=b.bottom-w.height-o;break}f({top:x,left:R});},[l,t,n,r,o,c]),!p||!l)return null;let v={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 Oa.createPortal(jsx("div",{ref:b=>{h.current=b,typeof i=="function"?i(b):i&&(i.current=b);},id:d,role:"tooltip","data-side":t,className:m("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",v,e),style:{top:u.top,left:u.left},...s,children:a}),document.body)});Xn.displayName="TooltipContent";var De=_.forwardRef(({className:e,orientation:t="vertical",visibility:n="visible",children:r,style:o,...a},s)=>{let[i,l]=_.useState(false),c=_.useId().replace(/:/g,""),d=n==="visible"||n==="hover"&&i,u=d?"rgba(0,0,0,0.3)":"transparent",f=d?"rgba(255,255,255,0.3)":"transparent",p=`
|
|
2
2
|
#${c} {
|
|
3
3
|
scrollbar-width: thin;
|
|
4
|
-
scrollbar-color: ${
|
|
4
|
+
scrollbar-color: ${u} transparent;
|
|
5
5
|
}
|
|
6
6
|
.dark #${c},
|
|
7
7
|
#${c}.dark {
|
|
@@ -18,7 +18,7 @@ import*as _ from'react';import {createContext,useState,useEffect,useContext,useC
|
|
|
18
18
|
box-shadow: none;
|
|
19
19
|
}
|
|
20
20
|
#${c}::-webkit-scrollbar-thumb {
|
|
21
|
-
background: ${
|
|
21
|
+
background: ${u};
|
|
22
22
|
border-radius: 9999px;
|
|
23
23
|
border: none;
|
|
24
24
|
}
|
|
@@ -40,7 +40,7 @@ import*as _ 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:p}}),jsx("div",{ref:s,id:c,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),style:o,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),...a,children:r})]})});De.displayName="ScrollArea";var Dd=cva("flex min-h-10 w-full cursor-pointer items-center justify-between border border-zinc-300 dark:border-zinc-700 bg-background px-3 py-2 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),Hd=_.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,radius:p,className:g,...h},b)=>{let[v,w]=_.useState(false),[x,R]=_.useState(""),[C,y]=_.useState(r||""),[N,T]=_.useState(r||[]),[k,M]=_.useState({top:0,left:0,width:0}),P=_.useRef(null),E=_.useRef(null),D=_.useRef(null),H=_.useRef(null),L=n!==void 0?n:C,S=n!==void 0?n:N,V=n!==void 0,A=z=>{d&&L===z?(V||y(""),o?.("")):(V||y(z),o?.(z)),w(false),R("");},B=z=>{let j=S.includes(z)?S.filter(oe=>oe!==z):[...S,z];V||T(j),o?.(j);},I=(z,j)=>{j.stopPropagation();let oe=S.filter(ge=>ge!==z);V||T(oe),o?.(oe);},F=z=>{z.stopPropagation(),t?(V||T([]),o?.([])):(V||y(""),o?.(""));},K=e.find(z=>z.value===L),Y=e.filter(z=>S.includes(z.value)),q=Y.slice(0,m),$=Y.length-m,O=s?e.filter(z=>z.label.toLowerCase().includes(x.toLowerCase())):e;_.useEffect(()=>{if(v&&E.current){let z=E.current.getBoundingClientRect();M({top:z.bottom+4,left:z.left,width:z.width}),s&&setTimeout(()=>H.current?.focus(),0);}v||R("");},[v,s]),_.useEffect(()=>{let z=j=>{let oe=j.target,ge=P.current&&!P.current.contains(oe),G=D.current&&!D.current.contains(oe);ge&&G&&(w(false),R(""));};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[]),_.useEffect(()=>{if(!v)return;let z=j=>{D.current?.contains(j.target)||(w(false),R(""));};return window.addEventListener("scroll",z,true),()=>window.removeEventListener("scroll",z,true)},[v]);let W=t?S.length>0:!!L;return jsxs("div",{ref:P,className:u("relative",g),...h,children:[jsxs("div",{ref:z=>{E.current=z,typeof b=="function"?b(z):b&&(b.current=z);},role:"combobox","aria-expanded":v,"aria-haspopup":"listbox","aria-disabled":c,onClick:()=>!c&&w(!v),className:u(Dd({radius:p}),t&&"flex-wrap gap-1",c&&"cursor-not-allowed opacity-50"),children:[!t&&jsx("span",{className:u(!K&&"text-muted-foreground"),children:K?K.label:a}),t&&jsx(Fragment,{children:Y.length===0?jsx("span",{className:"text-muted-foreground",children:a}):jsxs(Fragment,{children:[q.map(z=>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:[z.label,jsx("span",{role:"button",tabIndex:0,onClick:j=>I(z.value,j),onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&I(z.value,j);},className:"rounded-full hover:bg-secondary-foreground/20 cursor-pointer",children:jsx(X,{className:"h-3 w-3"})})]},z.value)),$>0&&jsxs("span",{className:"text-xs text-muted-foreground",children:["+",$," more"]})]})}),jsxs("div",{className:"ml-auto flex items-center gap-1",children:[d&&W&&jsx("span",{role:"button",tabIndex:0,onClick:F,onKeyDown:z=>{(z.key==="Enter"||z.key===" ")&&F(z);},className:"rounded-full p-0.5 hover:bg-muted cursor-pointer",children:jsx(X,{className:"h-4 w-4 opacity-50"})}),jsx(ChevronDown,{className:u("h-4 w-4 opacity-50 transition-transform",v&&"rotate-180")})]})]}),v&&!c&&typeof document<"u"&&za.createPortal(jsxs("div",{ref:D,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:H,type:"text",value:x,onChange:z=>R(z.target.value),placeholder:i,className:"flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground"})]}),jsx(De,{style:{maxHeight:f},onWheel:z=>z.stopPropagation(),children:jsx("div",{className:"p-1",children:O.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l}):O.map(z=>{let j=t?S.includes(z.value):L===z.value;return jsxs("div",{role:"option","aria-selected":j,onClick:()=>{z.disabled||(t?B(z.value):A(z.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",z.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:j&&jsx(Check,{className:"h-4 w-4"})}),z.label]},z.value)})})})]}),document.body)]})});Hd.displayName="Select";var Id=_.createContext(null),zo=()=>{let e=_.useContext(Id);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e},Ni=_.createContext({radius:"md"}),ki=_.createContext(null),Cn=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=_.useState(n),[s,i]=_.useState(-1),l=t!==void 0,c=l?t:o,d=_.useRef(null),m=_.useRef(null),f=_.useId(),p=_.useRef(new Map),g=_.useCallback(v=>{l||a(v),r?.(v),v||i(-1);},[l,r]),h=_.useCallback((v,w)=>{p.current.set(v,w);},[]),b=_.useCallback(v=>{p.current.delete(v);},[]);return jsx(Id.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=_.forwardRef(({children:e,onClick:t,onKeyDown:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=zo();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=_.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:w,setActiveIndex:x,items:R}=zo(),[C,y]=_.useState({top:0,left:0}),[N,T]=_.useState(t),[k,M]=_.useState(false),P=_.useRef(0);if(_.useEffect(()=>{M(true);},[]),_.useEffect(()=>{p&&(P.current=R.current.size);},[p,R]),_.useEffect(()=>{if(!p||!h.current||!b.current)return;let D=()=>{if(!h.current||!b.current)return;let H=h.current.getBoundingClientRect(),L=b.current.getBoundingClientRect(),S=window.innerWidth,V=window.innerHeight,A=0,B=0,I=t;switch(t){case "top":A=H.top-L.height-n,A<a&&(A=H.bottom+n,I="bottom");break;case "bottom":A=H.bottom+n,A+L.height>V-a&&(A=H.top-L.height-n,I="top");break;case "left":B=H.left-L.width-n,B<a&&(B=H.right+n,I="right");break;case "right":B=H.right+n,B+L.width>S-a&&(B=H.left-L.width-n,I="left");break}if(I==="top"||I==="bottom"){switch(r){case "start":B=H.left+o;break;case "center":B=H.left+H.width/2-L.width/2;break;case "end":B=H.right-L.width-o;break}B<a?B=a:B+L.width>S-a&&(B=S-L.width-a);}else {switch(r){case "start":A=H.top+o;break;case "center":A=H.top+H.height/2-L.height/2;break;case "end":A=H.bottom-L.height-o;break}A<a?A=a:A+L.height>V-a&&(A=V-L.height-a);}y({top:A,left:B}),T(I);};return D(),window.addEventListener("resize",D),window.addEventListener("scroll",D,true),()=>{window.removeEventListener("resize",D),window.removeEventListener("scroll",D,true);}},[p,t,n,r,o,a,h]),_.useEffect(()=>{if(!p)return;let D=H=>{let L=H.target;b.current&&!b.current.contains(L)&&h.current&&!h.current.contains(L)&&(s?.(),g(false));};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[p,g,s,h,b]),_.useEffect(()=>{if(!p)return;let D=H=>{let L=Array.from(R.current.entries()).sort(([V],[A])=>V-A).map(([,V])=>V),S=L.length;if(S!==0)switch(H.key){case "Escape":H.preventDefault(),i?.(),g(false),h.current?.focus();break;case "ArrowDown":H.preventDefault(),w===-1||w>=S-1?x(l?0:Math.min(w+1,S-1)):x(w+1);break;case "ArrowUp":H.preventDefault(),w<=0?x(l?S-1:0):x(w-1);break;case "Home":H.preventDefault(),x(0);break;case "End":H.preventDefault(),x(S-1);break;case "Enter":case " ":H.preventDefault(),w>=0&&w<S&&L[w]?.click();break;case "Tab":g(false);break}};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[p,g,i,w,x,R,l,h]),_.useEffect(()=>{p&&w>=0&&Array.from(R.current.entries()).sort(([H],[L])=>H-L).map(([,H])=>H)[w]?.focus();},[p,w,R]),!k||!p)return null;let E={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 za.createPortal(jsx("div",{ref:D=>{b.current=D,typeof f=="function"?f(D):f&&(f.current=D);},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",Y0[c],E,e),style:{top:C.top,left:C.left},...m,children:jsx(Ni.Provider,{value:{radius:c},children:d})}),document.body)});Mn.displayName="DropdownContent";var Vd=0,Ad={none:"rounded-none",sm:"rounded-sm",md:"rounded-sm",lg:"rounded-md",full:"rounded-lg"},$t=_.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}=zo(),{radius:b}=_.useContext(Ni),[v]=_.useState(()=>Vd++),w=_.useRef(null);_.useEffect(()=>(!n&&w.current&&g(v,w.current),()=>{h(v);}),[n,v,g,h]);let x=y=>{if(n){y.preventDefault();return}o?.(y),r?.(),m(false);},R=y=>{a?.(y),n||p(v);};return jsxs("div",{ref:y=>{w.current=y,typeof d=="function"?d(y):d&&(d.current=y);},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",Ad[b],t&&"pl-8",!n&&"cursor-pointer",e),onClick:x,onMouseEnter:R,...c,children:[s,l&&jsx("span",{className:"flex-1",children:l}),i]})});$t.displayName="DropdownItem";var Pi=_.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}));Pi.displayName="DropdownSection";var zd=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));zd.displayName="DropdownSeparator";var Od=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest opacity-60",e),...t});Od.displayName="DropdownShortcut";var Bd=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));Bd.displayName="DropdownGroup";var Fd=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=_.useState(n),{contentRef:s}=zo(),i=t!==void 0,l=i?t:o,c=_.useRef(null),d=_.useCallback(m=>{i||a(m),r?.(m);},[i,r]);return jsx(ki.Provider,{value:{open:l,onOpenChange:d,triggerRef:c,parentMenuRef:s},children:e})};Fd.displayName="DropdownSub";var Kd=_.forwardRef(({className:e,inset:t,disabled:n,children:r,onMouseEnter:o,onMouseLeave:a,onKeyDown:s,...i},l)=>{let c=_.useContext(ki),{setActiveIndex:d,registerItem:m,unregisterItem:f}=zo(),{radius:p}=_.useContext(Ni),[g]=_.useState(()=>Vd++),h=_.useRef(null);if(!c)throw new Error("DropdownSubTrigger must be used within DropdownSub");let{open:b,onOpenChange:v,triggerRef:w}=c;_.useEffect(()=>(!n&&h.current&&m(g,h.current),()=>{f(g);}),[n,g,m,f]);let x=y=>{o?.(y),n||(d(g),v(true));},R=y=>{a?.(y);},C=y=>{s?.(y),(y.key==="ArrowRight"||y.key==="Enter"||y.key===" ")&&(y.preventDefault(),v(true));};return jsxs("div",{ref:y=>{h.current=y,w.current=y,typeof l=="function"?l(y):l&&(l.current=y);},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",Ad[p],t&&"pl-8",!n&&"cursor-pointer",e),onMouseEnter:x,onMouseLeave:R,onKeyDown:C,...i,children:[r,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});Kd.displayName="DropdownSubTrigger";var $d=_.forwardRef(({className:e,sideOffset:t=2,alignOffset:n=-4,collisionPadding:r=8,onMouseEnter:o,onMouseLeave:a,...s},i)=>{let l=_.useContext(ki);if(!l)throw new Error("DropdownSubContent must be used within DropdownSub");let{open:c,onOpenChange:d,triggerRef:m,parentMenuRef:f}=l,[p,g]=_.useState({top:0,left:0}),[h,b]=_.useState(false),v=_.useRef(null),w=_.useRef(null);_.useEffect(()=>{b(true);},[]),_.useEffect(()=>{if(!c||!m.current||!v.current)return;(()=>{if(!m.current||!v.current)return;let y=m.current.getBoundingClientRect(),N=v.current.getBoundingClientRect(),T=window.innerWidth,k=window.innerHeight,M=y.top+n,P=y.right+t;P+N.width>T-r&&(P=y.left-N.width-t),M+N.height>k-r&&(M=k-N.height-r),M<r&&(M=r),g({top:M,left:P});})();},[c,t,n,r,m]);let x=C=>{o?.(C),w.current&&(clearTimeout(w.current),w.current=null),d(true);},R=C=>{a?.(C);let y=C.relatedTarget;m.current?.contains(y)||f?.current?.contains(y)||(w.current=setTimeout(()=>{d(false);},100));};return _.useEffect(()=>()=>{w.current&&clearTimeout(w.current);},[]),!h||!c?null:za.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:R,...s}),document.body)});$d.displayName="DropdownSubContent";var X0=Pi;var Wd=_.createContext(null),Ei=()=>{let e=_.useContext(Wd);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]=_.useState(n),s=t!==void 0,i=s?t:o,l=_.useRef(null),c=_.useId(),d=_.useCallback(m=>{s||a(m),r?.(m);},[s,r]);return jsx(Wd.Provider,{value:{open:i,onOpenChange:d,triggerRef:l,contentId:c},children:e})};ot.displayName="Popover";var qn=_.forwardRef(({children:e,onClick:t,asChild:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=Ei(),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&&_.isValidElement(e)?_.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=_.forwardRef(({children:e,...t},n)=>{let{triggerRef:r}=Ei();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=_.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}=Ei(),[v,w]=_.useState({top:0,left:0}),[x,R]=_.useState(false),[C,y]=_.useState(null);if(_.useEffect(()=>{R(true);},[]),_.useEffect(()=>{if(!p||!h.current||!C)return;let T=()=>{if(!h.current||!C)return;let k=h.current.getBoundingClientRect(),M=C.getBoundingClientRect(),P=0,E=0;switch(n){case "top":P=k.top-M.height-r;break;case "bottom":P=k.bottom+r;break;case "left":E=k.left-M.width-r;break;case "right":E=k.right+r;break}if(n==="top"||n==="bottom")switch(o){case "start":E=k.left+a;break;case "center":E=k.left+k.width/2-M.width/2;break;case "end":E=k.right-M.width-a;break}else switch(o){case "start":P=k.top+a;break;case "center":P=k.top+k.height/2-M.height/2;break;case "end":P=k.bottom-M.height-a;break}w({top:P,left:E});};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]),_.useEffect(()=>{if(!p)return;let T=k=>{let M=k.target;C&&C.contains(M)||h.current&&h.current.contains(M)||M.closest?.("[data-dropdown-content], [data-popover-content]")||(s?.(),g(false));};return document.addEventListener("mouseup",T),()=>document.removeEventListener("mouseup",T)},[p,g,s,h,C]),_.useEffect(()=>{if(!p)return;let T=k=>{k.key==="Escape"&&(i?.(),g(false));};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[p,g,i]),!x||!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 za.createPortal(jsx("div",{ref:T=>{y(k=>k!==T?T:k),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 jd=_.createContext(null),Si=()=>{let e=_.useContext(jd);if(!e)throw new Error("Tabs components must be used within a Tabs");return e},_d=_.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]=_.useState(n),f=t!==void 0,p=f?t:d,g=h=>{f||m(h),r?.(h);};return jsx(jd.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})})});_d.displayName="Tabs";var Li={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"}},Yd=_.forwardRef(({className:e,children:t,...n},r)=>{let{variant:o,radius:a,orientation:s,value:i}=Si(),l=_.useRef(null),[c,d]=_.useState({opacity:0});_.useEffect(()=>{let g=l.current;if(!g)return;let h=()=>{let v=g.querySelector('[data-state="active"]');if(v){let w=g.getBoundingClientRect(),x=v.getBoundingClientRect(),R=s==="vertical";o==="underline"?d(R?{width:2,height:x.height,transform:`translateY(${x.top-w.top}px)`,opacity:1}:{width:x.width,height:2,transform:`translateX(${x.left-w.left}px)`,opacity:1}):o==="solid"&&d(R?{width:x.width,height:x.height,transform:`translateY(${x.top-w.top}px)`,opacity:1}:{width:x.width,height:x.height,transform:`translateX(${x.left-w.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",Li[a].list,m[o],e),...n,children:[(o==="solid"||o==="underline")&&jsx("span",{className:u("absolute transition-all duration-200 ease-out",Li[a].indicator,p()),style:c,"aria-hidden":"true"}),t]})});Yd.displayName="TabsList";var Xd=_.forwardRef(({className:e,value:t,disabled:n,onClick:r,...o},a)=>{let{value:s,onValueChange:i,variant:l,radius:c}=Si(),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",Li[c].trigger,m[l],e),onClick:f=>{r?.(f),i(t);},...o})});Xd.displayName="TabsTrigger";var qd=_.forwardRef(({className:e,value:t,children:n,...r},o)=>{let{value:a}=Si(),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});qd.displayName="TabsContent";var Zd=[{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 Z0(e,t=Zd){return e?t.filter(r=>r.test(e)).length/t.length:0}function Q0(e){return e<.4?"bg-red-500":e<.7?"bg-yellow-500":"bg-green-500"}function J0(e){return e<.4?"Weak":e<.7?"Medium":"Strong"}var Bo=0,Di=null;function Gt(){Bo===0&&(Di=document.body.style.overflow,document.body.style.overflow="hidden"),Bo++;}function Ut(){Bo--,Bo<=0&&(Bo=0,document.body.style.overflow=Di??"",Di=null);}var Jd=_.createContext(null),Aa=()=>{let e=_.useContext(Jd);if(!e)throw new Error("Sheet components must be used within a Sheet");return e},eu=({open:e,defaultOpen:t=false,onOpenChange:n,children:r})=>{let[o,a]=_.useState(t),s=e!==void 0,i=s?e:o,l=_.useCallback(c=>{s||a(c),n?.(c);},[s,n]);return jsx(Jd.Provider,{value:{open:i,onOpenChange:l},children:r})};eu.displayName="Sheet";var tu=_.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=Aa();return jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(true);},...n,children:t})});tu.displayName="SheetTrigger";var nu=_.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=Aa();return jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(false);},...n,children:t})});nu.displayName="SheetClose";var Ii=({children:e,container:t})=>{let[n,r]=_.useState(false);return _.useEffect(()=>{r(true);},[]),n?za.createPortal(e,t||document.body):null};Ii.displayName="SheetPortal";var ru=_.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Aa();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});ru.displayName="SheetOverlay";var ou=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"}}),nR=(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],au=_.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:r,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c}=Aa(),[d,m]=_.useState(false),[,f]=_.useState(false);return _.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]),_.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(Ii,{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(ou({side:e}),nR(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,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]}),n]})]})});au.displayName="SheetContent";var su=({className:e,...t})=>jsx("div",{className:u("flex flex-col space-y-2 text-center sm:text-left",e),...t});su.displayName="SheetHeader";var iu=({className:e,...t})=>jsx("div",{className:u("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});iu.displayName="SheetFooter";var lu=_.forwardRef(({className:e,...t},n)=>jsx("h2",{ref:n,className:u("text-lg font-semibold text-foreground",e),...t}));lu.displayName="SheetTitle";var cu=_.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...t}));cu.displayName="SheetDescription";var aR=({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 du=_.createContext(null),Oa=()=>{let e=_.useContext(du);if(!e)throw new Error("ContextMenu components must be used within a ContextMenu");return e},Vi=_.createContext(null),uu=({children:e,onOpenChange:t})=>{let[n,r]=_.useState(false),[o,a]=_.useState({x:0,y:0}),s=_.useId(),i=_.useCallback(l=>{r(l),t?.(l);},[t]);return jsx(du.Provider,{value:{open:n,onOpenChange:i,position:o,setPosition:a,contentId:s},children:e})};uu.displayName="ContextMenu";var mu=_.forwardRef(({children:e,onContextMenu:t,...n},r)=>{let{onOpenChange:o,setPosition:a}=Oa(),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})});mu.displayName="ContextMenuTrigger";var pu=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));pu.displayName="ContextMenuGroup";var fu=({children:e,container:t})=>{let[n,r]=_.useState(false);return _.useEffect(()=>{r(true);},[]),n?za.createPortal(e,t||document.body):null};fu.displayName="ContextMenuPortal";var gu=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=_.useState(n),s=t!==void 0,i=s?t:o,l=_.useRef(null),c=_.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(Vi.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};gu.displayName="ContextMenuSub";var bu=_.forwardRef(({className:e,onInteractOutside:t,onEscapeKeyDown:n,children:r,...o},a)=>{let{open:s,onOpenChange:i,position:l,contentId:c}=Oa(),[d,m]=_.useState(false),[f,p]=_.useState(l),g=_.useRef(null);return _.useEffect(()=>{m(true);},[]),_.useEffect(()=>{if(!s||!g.current){p(l);return}let b=g.current.getBoundingClientRect(),{x:v,y:w}=l;v+b.width>window.innerWidth&&(v=window.innerWidth-b.width-8),w+b.height>window.innerHeight&&(w=window.innerHeight-b.height-8),p({x:v,y:w});},[s,l]),_.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]),_.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:za.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)});bu.displayName="ContextMenuContent";var vu=_.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let i=_.useContext(Vi);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"})]})});vu.displayName="ContextMenuSubTrigger";var hu=_.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let s=_.useContext(Vi);if(!s)throw new Error("ContextMenuSubContent must be used within ContextMenuSub");let{open:i,onOpenChange:l,triggerRef:c}=s,[d,m]=_.useState({top:0,left:0}),[f,p]=_.useState(false),g=_.useRef(null);_.useEffect(()=>{p(true);},[]),_.useEffect(()=>{if(!i||!c.current||!g.current)return;(()=>{if(!c.current||!g.current)return;let w=c.current.getBoundingClientRect(),x=g.current.getBoundingClientRect(),R=w.top,C=w.right+t;C+x.width>window.innerWidth&&(C=w.left-x.width-t),m({top:R,left:C});})();},[i,t,c]);let h=v=>{n?.(v),l(true);},b=v=>{r?.(v),l(false);};return !f||!i?null:za.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)});hu.displayName="ContextMenuSubContent";var xu=_.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{onOpenChange:i}=Oa(),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})});xu.displayName="ContextMenuItem";var yu=_.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{onOpenChange:l}=Oa(),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]})});yu.displayName="ContextMenuCheckboxItem";var Ru=_.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}));Ru.displayName="ContextMenuSection";var wu=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-border",e),...t}));wu.displayName="ContextMenuSeparator";var Cu=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Cu.displayName="ContextMenuShortcut";var Mu=_.createContext(null),dR=()=>{let e=_.useContext(Mu);if(!e)throw new Error("RadioGroupItem must be used within a RadioGroup");return e},Nu=_.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]=_.useState(n),p=t!==void 0,g=p?t:m,h=_.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(Mu.Provider,{value:{name:o||h,value:g,onValueChange:b,disabled:a,required:s},children:l})})});Nu.displayName="RadioGroup";var ku=_.forwardRef(({className:e,value:t,disabled:n,...r},o)=>{let a=dR(),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}})]})});ku.displayName="RadioGroupItem";var Fa=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"}}),Pu=_.forwardRef(({className:e,variant:t,size:n,pressed:r,defaultPressed:o=false,onPressedChange:a,disabled:s,onKeyDown:i,...l},c)=>{let[d,m]=_.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(Fa({variant:t,size:n,className:e})),onClick:g,onKeyDown:h,...l})});Pu.displayName="Toggle";var Eu=_.createContext(null),gR=()=>{let e=_.useContext(Eu);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e},Lu=_.forwardRef(({className:e,variant:t,size:n,type:r,value:o,defaultValue:a,onValueChange:s,disabled:i,children:l,...c},d)=>{let[m,f]=_.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(w=>w!==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(Eu.Provider,{value:{type:r,variant:t,size:n,value:g,onValueChange:h,disabled:i},children:l})})});Lu.displayName="ToggleGroup";var Su=_.forwardRef(({className:e,children:t,variant:n,size:r,value:o,disabled:a,...s},i)=>{let l=gR(),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(Fa({variant:l.variant||n,size:l.size||r}),e),onClick:()=>l.onValueChange(o),...s,children:t})});Su.displayName="ToggleGroupItem";var $a=_.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]=_.useState(n),h=t!==void 0,b=h?t:p,v=_.useRef(null),[w,x]=_.useState(false),[R,C]=_.useState(null),y=(H,L)=>{if(!v.current)return b[0];let S=v.current.getBoundingClientRect(),V;c==="horizontal"?V=(H-S.left)/S.width:V=1-(L-S.top)/S.height,V=Math.max(0,Math.min(1,V));let A=a+V*(s-a),B=Math.round(A/i)*i;return Math.max(a,Math.min(s,B))},N=(H,L)=>{let S=[...b];S[L]=H,L>0&&H<b[L-1]&&(S[L]=b[L-1]),L<b.length-1&&H>b[L+1]&&(S[L]=b[L+1]),h||g(S),r?.(S);},T=(H,L)=>{l||(H.preventDefault(),x(true),C(L),H.target.setPointerCapture(H.pointerId));},k=H=>{if(!w||R===null||l)return;let L=y(H.clientX,H.clientY);N(L,R);},M=()=>{w&&(x(false),C(null),o?.(b));},P=H=>{if(l)return;let L=y(H.clientX,H.clientY),S=0,V=Math.abs(b[0]-L);for(let A=1;A<b.length;A++){let B=Math.abs(b[A]-L);B<V&&(V=B,S=A);}N(L,S),o?.([...b.slice(0,S),L,...b.slice(S+1)]);},E=(H,L)=>{if(l)return;let S=b[L];switch(H.key){case "ArrowRight":case "ArrowUp":H.preventDefault(),S=Math.min(s,b[L]+i);break;case "ArrowLeft":case "ArrowDown":H.preventDefault(),S=Math.max(a,b[L]-i);break;case "Home":H.preventDefault(),S=a;break;case "End":H.preventDefault(),S=s;break;default:return}N(S,L),o?.([...b.slice(0,L),S,...b.slice(L+1)]);},D=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:P,children:jsx("div",{className:"absolute bg-primary",style:c==="horizontal"?{left:b.length>1?`${D(b[0])}%`:0,right:`${100-D(b[b.length-1])}%`,top:0,bottom:0}:{bottom:b.length>1?`${D(b[0])}%`:0,top:`${100-D(b[b.length-1])}%`,left:0,right:0}})}),b.map((H,L)=>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",w&&R===L&&"cursor-grabbing"),style:c==="horizontal"?{left:`calc(${D(H)}% - 10px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${D(H)}% - 10px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:S=>T(S,L),onPointerMove:k,onPointerUp:M,onPointerCancel:M,onKeyDown:S=>E(S,L)},L)),d&&b.map((H,L)=>jsx("input",{type:"hidden",name:b.length>1?`${d}[${L}]`:d,value:H},L))]})});$a.displayName="Slider";var Du=_.createContext(null),Hu=()=>{let e=_.useContext(Du);if(!e)throw new Error("AccordionItem must be used within an Accordion");return e},zi=_.createContext(null),Iu=()=>{let e=_.useContext(zi);if(!e)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return e},Vu=_.forwardRef(({className:e,type:t="multiple",value:n,defaultValue:r,onValueChange:o,collapsible:a=true,disabled:s,children:i,...l},c)=>{let[d,m]=_.useState(()=>t==="single"?r?[r]:[]:r||[]),f=_.useRef(new Map),p=_.useRef([]),g=n!==void 0,h=g?t==="single"?n?[n]:[]:n:d,b=R=>{if(t==="single"){let y=h.includes(R)&&a?[]:[R];g||m(y),o?.(y[0]||"");}else {let C=h.includes(R)?h.filter(y=>y!==R):[...h,R];g||m(C),o?.(C);}},v=_.useCallback((R,C)=>{f.current.set(R,C),p.current.includes(R)||p.current.push(R);},[]),w=_.useCallback(R=>{f.current.delete(R),p.current=p.current.filter(C=>C!==R);},[]),x=_.useCallback(R=>{let C=p.current;if(C.length===0)return;let y=document.activeElement,N;f.current.forEach((E,D)=>{E===y&&(N=D);});let T=N?C.indexOf(N):-1,k;switch(R){case "first":k=0;break;case "last":k=C.length-1;break;case "next":k=T===-1?0:(T+1)%C.length;break;case "prev":k=T===-1?C.length-1:(T-1+C.length)%C.length;break}let M=C[k];f.current.get(M)?.focus();},[]);return jsx(Du.Provider,{value:{type:t,value:h,onValueChange:b,collapsible:a,disabled:s,registerTrigger:v,unregisterTrigger:w,focusTrigger:x},children:jsx("div",{ref:c,"data-orientation":"vertical",className:u("w-full",e),...l,children:i})})});Vu.displayName="Accordion";var Au=_.forwardRef(({className:e,value:t,disabled:n,title:r,subtitle:o,startContent:a,children:s,...i},l)=>{let c=Hu(),d=c.value.includes(t),m=n||c.disabled||false,f=_.useId(),p=_.useId();return r!==void 0?jsx(zi.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(zu,{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(Ou,{children:s})]})}):jsx(zi.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})})});Au.displayName="AccordionItem";var zu=_.forwardRef(({className:e,children:t,onClick:n,onKeyDown:r,...o},a)=>{let s=Hu(),{value:i,isOpen:l,isDisabled:c,contentId:d,triggerId:m}=Iu(),f=_.useRef(null);_.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"})]})})});zu.displayName="AccordionTrigger";var Ou=_.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{isOpen:a,contentId:s,triggerId:i,isDisabled:l}=Iu();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})})})});Ou.displayName="AccordionContent";var Fu=_.createContext(null),Ku=()=>{let e=_.useContext(Fu);if(!e)throw new Error("Collapsible components must be used within a Collapsible");return e},$u=_.forwardRef(({className:e,open:t,defaultOpen:n=false,onOpenChange:r,disabled:o,title:a,children:s,...i},l)=>{let[c,d]=_.useState(n),m=t!==void 0,f=m?t:c,p=_.useId(),g=_.useId(),h=b=>{o||(m||d(b),r?.(b));};return jsx(Fu.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(Oi,{})]}),s]})})});$u.displayName="Collapsible";var Oi=_.forwardRef(({className:e,children:t,onClick:n,...r},o)=>{let{open:a,onOpenChange:s,disabled:i,contentId:l,triggerId:c}=Ku();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")})})});Oi.displayName="CollapsibleTrigger";var Gu=_.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{open:a,contentId:s,triggerId:i,disabled:l}=Ku(),c=_.useRef(null),[d,m]=_.useState(0),[f,p]=_.useState(false),[g,h]=_.useState(a);_.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});Gu.displayName="CollapsibleContent";var Wa=_.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}%)`}})})]})});Wa.displayName="Progress";var _u=_.createContext(null),Yu=()=>{let e=_.useContext(_u);if(!e)throw new Error("HoverCard components must be used within a HoverCard");return e},Xu=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,openDelay:o=700,closeDelay:a=300,closeOnScroll:s=true})=>{let[i,l]=_.useState(n),c=t!==void 0,d=c?t:i,m=_.useRef(null),f=_.useId(),p=_.useRef(null),g=_.useRef(null),h=_.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 _.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]),_.useEffect(()=>()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current);},[]),jsx(_u.Provider,{value:{open:d,onOpenChange:h,triggerRef:m,contentId:f},children:e})};Xu.displayName="HoverCard";var qu=_.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l}=Yu();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})});qu.displayName="HoverCardTrigger";var Zu=_.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}=Yu(),[g,h]=_.useState({top:0,left:0}),[b,v]=_.useState(false),w=_.useRef(null);_.useEffect(()=>{v(true);},[]),_.useEffect(()=>{if(!d||!f.current||!w.current)return;(()=>{if(!f.current||!w.current)return;let N=f.current.getBoundingClientRect(),T=w.current.getBoundingClientRect(),k=0,M=0;switch(t){case "top":k=N.top-T.height-n;break;case "bottom":k=N.bottom+n;break;case "left":M=N.left-T.width-n;break;case "right":M=N.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":M=N.left+o;break;case "center":M=N.left+N.width/2-T.width/2;break;case "end":M=N.right-T.width-o;break}else switch(r){case "start":k=N.top+o;break;case "center":k=N.top+N.height/2-T.height/2;break;case "end":k=N.bottom-T.height-o;break}h({top:k,left:M});})();},[d,t,n,r,o,f]);let x=y=>{a?.(y),m(true);},R=y=>{s?.(y),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 za.createPortal(jsx("div",{ref:y=>{w.current=y,typeof c=="function"?c(y):c&&(c.current=y);},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:R,...l,children:i}),document.body)});Zu.displayName="HoverCardContent";var Qu=_.createContext({size:"md",variant:"default",radius:"md"}),_a=()=>_.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 RR=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-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",variant:"default",radius:"md"}}),wR=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"}}),CR=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"}}),Ju=_.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})}));Ju.displayName="Breadcrumb";var em=_.forwardRef(({className:e,...t},n)=>{let{size:r,variant:o,radius:a}=_a();return jsx("ol",{ref:n,className:u(RR({size:r,variant:o,radius:o==="default"?void 0:a}),e),...t})});em.displayName="BreadcrumbList";var tm=_.forwardRef(({className:e,...t},n)=>{let{size:r}=_a();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})});tm.displayName="BreadcrumbItem";var nm=_.forwardRef(({className:e,...t},n)=>jsx("a",{ref:n,className:u("transition-colors hover:text-foreground cursor-pointer",e),...t}));nm.displayName="BreadcrumbLink";var rm=_.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}));rm.displayName="BreadcrumbPage";var om=({children:e,className:t,...n})=>{let{size:r}=_a();return jsx("li",{role:"presentation","aria-hidden":"true",className:u(wR({size:r}),"text-muted-foreground/60",t),...n,children:e??jsx(ChevronRight,{})})};om.displayName="BreadcrumbSeparator";var am=({className:e,...t})=>{let{size:n}=_a();return jsxs("span",{role:"presentation","aria-hidden":"true",className:u(CR({size:n}),e),...t,children:[jsx(MoreHorizontal,{}),jsx("span",{className:"sr-only",children:"More"})]})};am.displayName="BreadcrumbEllipsis";var lm=_.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})}));lm.displayName="AspectRatio";var um=_.createContext(null),Fi=()=>{let e=_.useContext(um);if(!e)throw new Error("NavigationMenu components must be used within a NavigationMenu");return e},mm=_.createContext(null),pm=()=>{let e=_.useContext(mm);if(!e)throw new Error("NavigationMenuItem components must be used within a NavigationMenuItem");return e},fm=_.forwardRef(({className:e,orientation:t="horizontal",children:n,...r},o)=>{let[a,s]=_.useState(null);return jsx(um.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(Ki,{})]})})});fm.displayName="NavigationMenu";var gm=_.forwardRef(({className:e,...t},n)=>{let{orientation:r}=Fi();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})});gm.displayName="NavigationMenuList";var bm=_.forwardRef(({className:e,children:t,...n},r)=>{let{activeItem:o,setActiveItem:a}=Fi(),s=_.useId(),i=_.useRef(null),l=o===s,c=_.useCallback(d=>{a(d?s:null);},[s,a]);return jsx(mm.Provider,{value:{itemId:s,triggerRef:i,open:l,onOpenChange:c},children:jsx("li",{ref:r,className:u("relative",e),...n,children:t})})});bm.displayName="NavigationMenuItem";var vm=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"),hm=_.forwardRef(({className:e,children:t,onMouseEnter:n,onClick:r,...o},a)=>{let{triggerRef:s,open:i,onOpenChange:l}=pm(),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(vm(),"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"})]})});hm.displayName="NavigationMenuTrigger";var xm=_.forwardRef(({className:e,onMouseEnter:t,onMouseLeave:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i}=pm(),l=_.useRef(null),[c,d]=_.useState({top:0,left:0});_.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?za.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});xm.displayName="NavigationMenuContent";var ym=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"),Rm=_.forwardRef(({className:e,active:t,...n},r)=>jsx("a",{ref:r,className:u(ym(),t&&"bg-accent text-accent-foreground",e),...n}));Rm.displayName="NavigationMenuLink";var Ki=_.forwardRef((e,t)=>null);Ki.displayName="NavigationMenuViewport";var wm=_.forwardRef(({className:e,...t},n)=>{let{activeItem:r}=Fi();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});wm.displayName="NavigationMenuIndicator";var Nm=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"}}),Mt=_.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(Nm({size:t}),e),"aria-label":"Close",...n,children:jsx(X,{style:{width:a,height:a}})})});Mt.displayName="CloseButton";var Ya=_.createContext(null);function IR(){let e=_.useContext(Ya);if(!e)throw new Error("useDrawer must be used within a DrawerProvider.");return e}function kn(){return _.useContext(Ya)}var VR="16rem",AR="18rem",zR="3rem",OR="b",BR={xs:"256px",sm:"320px",md:"384px",lg:"448px",xl:"512px","2xl":"576px","3xl":"672px","4xl":"768px","5xl":"896px",full:"100%"},FR={xs:"20vh",sm:"30vh",md:"40vh",lg:"50vh",xl:"60vh","2xl":"70vh","3xl":"75vh","4xl":"80vh","5xl":"90vh",full:"100vh"},$i=_.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,w]=_.useState(false),[x,R]=_.useState(false),[C,y]=_.useState(e),N=t??C,T=_.useCallback(E=>{let D=typeof E=="function"?E(N):E;n?n(D):y(D);},[n,N]);_.useEffect(()=>{let E=()=>{w(window.innerWidth<768);};return E(),window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]);let k=_.useCallback(()=>b?T(E=>!E):v?R(E=>!E):T(E=>!E),[v,T,R,b]);_.useEffect(()=>{if(b)return;let E=D=>{D.key===OR&&(D.metaKey||D.ctrlKey)&&(D.preventDefault(),k());};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[k,b]);let M=N?"expanded":"collapsed",P=_.useMemo(()=>({placement:r,state:M,open:N,setOpen:T,isMobile:v,openMobile:x,setOpenMobile:R,toggleDrawer:k,collapsible:l,mode:h,size:o,backdrop:a,isDismissable:s,hideCloseButton:i}),[r,M,N,T,v,x,R,k,l,h,o,a,s,i]);return b?jsx(Ya.Provider,{value:P,children:jsx(Drawer.Root,{open:N,onOpenChange:T,direction:r,dismissible:s,children:f})}):jsx(Ya.Provider,{value:P,children:jsx(jn,{delayDuration:0,children:jsx("div",{ref:g,style:{"--drawer-width":VR,"--drawer-width-icon":zR,...m},className:u("group/drawer-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-muted/50",d),...p,children:f})})})});$i.displayName="Drawer";var Pm=_.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(KR,{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})})]})});Pm.displayName="DrawerSidebar";var KR=({children:e,open:t,onOpenChange:n,placement:r})=>{let[o,a]=_.useState(false);return _.useEffect(()=>{a(true);},[]),_.useEffect(()=>{if(t)return Gt(),()=>Ut()},[t]),!o||!t?null:za.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":AR},children:jsx("div",{className:"flex h-full w-full flex-col",children:e})})]}),document.body)},Em=_.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"})]})});Em.displayName="DrawerTrigger";var Lm=_.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?BR[i]:FR[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})});Lm.displayName="DrawerContent";var Sm=_.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(Mt,{className:"absolute right-4 top-4",onClick:()=>a?.setOpen(false)})]})});Sm.displayName="DrawerHeader";var Dm=_.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}));Dm.displayName="DrawerBody";var Hm=_.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}));Hm.displayName="DrawerFooter";var Im=_.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}));Im.displayName="DrawerTitle";var Vm=_.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}));Vm.displayName="DrawerDescription";var Am=_.forwardRef(({className:e,onClick:t,...n},r)=>{let o=kn();return jsx(Mt,{ref:r,className:e,onClick:a=>{t?.(a),o?.setOpen(false);},...n})});Am.displayName="DrawerClose";var zm=_.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"})]})});zm.displayName="DrawerToggle";var Om=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"separator",className:u("mx-4 h-px bg-border",e),...t}));Om.displayName="DrawerSeparator";var Bm=_.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}));Bm.displayName="DrawerMenu";var Fm=_.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,"data-drawer":"menu-item",className:u("group/menu-item relative",e),...t}));Fm.displayName="DrawerMenuItem";var Km=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"}}),$m=_.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(Km({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});$m.displayName="DrawerMenuButton";var Gm=_.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}));Gm.displayName="DrawerGroup";var Um=_.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}));Um.displayName="DrawerGroupLabel";var Wm=_.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}));Wm.displayName="DrawerInset";var $R=$i;var _m=_.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})}));_m.displayName="Table";var Ym=_.forwardRef(({className:e,...t},n)=>jsx("thead",{ref:n,className:u("[&_tr]:border-b",e),...t}));Ym.displayName="TableHeader";var Xm=_.forwardRef(({className:e,...t},n)=>jsx("tbody",{ref:n,className:u("[&_tr:last-child]:border-0",e),...t}));Xm.displayName="TableBody";var qm=_.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}));qm.displayName="TableFooter";var Zm=_.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}));Zm.displayName="TableRow";var Qm=_.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 Jm=_.forwardRef(({className:e,...t},n)=>jsx("td",{ref:n,className:u("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Jm.displayName="TableCell";var ep=_.forwardRef(({className:e,...t},n)=>jsx("caption",{ref:n,className:u("mt-4 text-sm text-muted-foreground",e),...t}));ep.displayName="TableCaption";function YR({className:e,data:t,columns:n,selectable:r=false,selectedKeys:o,onSelectionChange:a,getRowKey:s=(R,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,...w},x){let[R,C]=_.useState(new Set),[y,N]=_.useState({columnId:null,direction:null}),[T,k]=_.useState({pageIndex:0,pageSize:m[0]||10}),M=o??R,P=l??y,E=f??T,D=$=>{a?a($):C($);},H=$=>{c?c($):N($);},L=$=>{p?p($):k($);},S=_.useMemo(()=>{if(!P.columnId||!P.direction)return t;let $=n.find(O=>O.id===P.columnId);return $?[...t].sort((O,W)=>{let z=$.accessor(O),j=$.accessor(W);if(z===j)return 0;if(z==null)return 1;if(j==null)return -1;let oe=String(z).localeCompare(String(j),void 0,{numeric:true});return P.direction==="asc"?oe:-oe}):t},[t,P,n]),V=_.useMemo(()=>{if(!d)return S;let $=E.pageIndex*E.pageSize;return S.slice($,$+E.pageSize)},[S,d,E]),A=Math.ceil(S.length/E.pageSize),B=$=>{if($===true){let O=new Set(V.map((W,z)=>s(W,z)));D(O);}else D(new Set);},I=($,O)=>{let W=new Set(M);O?W.add($):W.delete($),D(W);},F=V.length>0&&V.every(($,O)=>M.has(s($,O))),K=V.some(($,O)=>M.has(s($,O))),Y=$=>{if(!n.find(z=>z.id===$)?.sortable&&!i)return;let W="asc";P.columnId===$&&(P.direction==="asc"?W="desc":P.direction==="desc"&&(W=null)),H({columnId:W?$:null,direction:W});},q=$=>P.columnId!==$?jsx(ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):P.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),...w,children:[jsx("div",{className:"relative w-full overflow-auto rounded-md border",children:jsxs("table",{className:"w-full caption-bottom text-sm",children:[jsx("thead",{className:"[&_tr]:border-b bg-muted/50",children:jsxs("tr",{children:[r&&jsx("th",{className:"h-12 w-12 px-4",children:jsx(Ao,{checked:F?true:K?"indeterminate":false,onCheckedChange:B,"aria-label":"Select all"})}),n.map($=>{let O=$.sortable??i;return jsx("th",{className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground",O&&"cursor-pointer select-none hover:text-foreground"),style:{width:$.width},onClick:()=>O&&Y($.id),children:jsxs("div",{className:"flex items-center gap-2",children:[$.header,O&&q($.id)]})},$.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..."})}):V.length===0?jsx("tr",{children:jsx("td",{colSpan:n.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:g})}):V.map(($,O)=>{let W=s($,O),z=M.has(W);return jsxs("tr",{className:u("border-b transition-colors",v&&"hover:bg-muted/50",b&&O%2===1&&"bg-muted/30",z&&"bg-muted"),"data-state":z?"selected":void 0,children:[r&&jsx("td",{className:"w-12 px-4",children:jsx(Ao,{checked:z,onCheckedChange:j=>I(W,!!j),"aria-label":`Select row ${O+1}`})}),n.map(j=>jsx("td",{className:"p-4 align-middle",children:j.cell?j.cell($,O):j.accessor($)},j.id))]},W)})})]})}),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:E.pageSize,onChange:$=>L({pageIndex:0,pageSize:Number($.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:m.map($=>jsx("option",{value:$,children:$},$))})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",E.pageIndex+1," of ",A||1]}),jsxs("div",{className:"flex gap-1",children:[jsx(ae,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>L({...E,pageIndex:E.pageIndex-1}),disabled:E.pageIndex===0,"aria-label":"Previous page",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>L({...E,pageIndex:E.pageIndex+1}),disabled:E.pageIndex>=A-1,"aria-label":"Next page",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var XR=_.forwardRef(YR);var Gi=["January","February","March","April","May","June","July","August","September","October","November","December"];function nw({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=_.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:Gi[o]}),jsx(ChevronDown,{className:"h-3 w-3 text-muted-foreground shrink-0"})]})}),jsx(Mn,{className:"min-w-[120px] p-0",children:jsx(De,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:Gi.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(De,{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 rw(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(nw,{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=Gi[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 no({className:e,classNames:t,showOutsideDays:n=true,showMonthAndYearPickers:r=false,startYear:o=1900,endYear:a=new Date().getFullYear()+50,components:s,...i}){let l=_.useMemo(()=>rw(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})}no.displayName="Calendar";var op=({className:e,...t})=>jsx("nav",{role:"navigation","aria-label":"pagination",className:u("mx-auto flex w-full justify-center",e),...t});op.displayName="Pagination";var ap=_.forwardRef(({className:e,...t},n)=>jsx("ul",{ref:n,className:u("flex flex-row items-center gap-1",e),...t}));ap.displayName="PaginationContent";var sp=_.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,className:u("",e),...t}));sp.displayName="PaginationItem";var Xa=({className:e,isActive:t,size:n="icon",...r})=>jsx("a",{"aria-current":t?"page":void 0,className:u(qr({variant:t?"solid":"light",size:n}),e),...r});Xa.displayName="PaginationLink";var ip=({className:e,...t})=>jsxs(Xa,{"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"})]});ip.displayName="PaginationPrevious";var lp=({className:e,...t})=>jsxs(Xa,{"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"})]});lp.displayName="PaginationNext";var cp=({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"})]});cp.displayName="PaginationEllipsis";var Fo=_.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}));Fo.displayName="VisuallyHidden";var up={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},lw={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"},mp=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"}}),Za=_.createContext(null),kr=()=>{let e=_.useContext(Za);if(!e)throw new Error("Modal components must be used within a Modal");return e},fp=_.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]=_.useState(false),b=e!==void 0,v=b?e:g,[w,x]=_.useState(false),R=_.useRef(null),C=_.useId(),y=_.useId();_.useEffect(()=>{x(true);},[]);let N=_.useCallback(P=>{b||h(P),t?.(P);},[b,t]);_.useEffect(()=>{if(v)return Gt(),()=>Ut()},[v]),_.useEffect(()=>{if(!v||i)return;let P=E=>{E.key==="Escape"&&N(false);};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[v,i,N]);let T=P=>{s&&P.target===P.currentTarget&&N(false);},k=n?_.isValidElement(n)?_.cloneElement(n,{onClick:P=>{n.props.onClick?.(P),N(true);}}):jsx("button",{type:"button",onClick:()=>N(true),children:n}):null,M=()=>!w||!v?null:d==="outside"?za.createPortal(jsx("div",{"data-state":v?"open":"closed",className:u(mp(),up[l],"overflow-y-auto flex items-start justify-center py-4"),onClick:T,children:jsxs("div",{ref:P=>{R.current=P,typeof p=="function"?p(P):p&&(p.current=P);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":y,"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(Fo,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(Mt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>N(false)})]})}),document.body):za.createPortal(jsxs(Fragment,{children:[jsx("div",{"data-state":v?"open":"closed",className:u(mp(),up[l]),onClick:T,"aria-hidden":"true"}),jsxs("div",{ref:P=>{R.current=P,typeof p=="function"?p(P):p&&(p.current=P);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":y,"data-state":v?"open":"closed",className:u(_i({size:m}),lw[c],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",f),children:[jsx(Fo,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(Mt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>N(false)})]})]}),document.body);return jsxs(Za.Provider,{value:{open:v,onOpenChange:N,scrollBehavior:d,titleId:C,descriptionId:y},children:[k,M()]})});fp.displayName="Modal";var Qa=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,scrollBehavior:o="inside"})=>{let[a,s]=_.useState(n),i=t!==void 0,l=i?t:a,c=_.useId(),d=_.useId(),m=_.useCallback(f=>{i||s(f),r?.(f);},[i,r]);return jsx(Za.Provider,{value:{open:l,onOpenChange:m,scrollBehavior:o,titleId:c,descriptionId:d},children:e})};Qa.displayName="ModalRoot";var gp=_.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=kr();return jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(true);},...n,children:e})});gp.displayName="ModalTrigger";var Yi=({children:e,container:t})=>{let[n,r]=_.useState(false);return _.useEffect(()=>{r(true);},[]),n?za.createPortal(e,t||document.body):null};Yi.displayName="ModalPortal";var Xi=_.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=kr();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});Xi.displayName="ModalOverlay";var bp=_.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=kr();return jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(false);},...n,children:e})});bp.displayName="ModalClose";var Ja=_.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}=kr(),[f,p]=_.useState(false);return _.useEffect(()=>{p(true);},[]),_.useEffect(()=>{if(l)return Gt(),()=>Ut()},[l]),_.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(Yi,{children:[jsx(Xi,{}),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(Mt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>c(false)})]})]})});Ja.displayName="ModalContent";var vp=({className:e,...t})=>jsx("div",{className:u("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});vp.displayName="ModalHeader";var hp=({className:e,children:t})=>(_.useContext(Za)?.scrollBehavior??"inside")==="inside"?jsx(De,{className:u("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsx("div",{className:u(e),children:t});hp.displayName="ModalBody";var xp=({className:e,children:t,...n})=>{let{onOpenChange:r}=kr();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:_.Children.map(t,o=>_.isValidElement(o)?_.cloneElement(o,{onClick:a=>{o.props.onClick?.(a),r(false);}}):o)})};xp.displayName="ModalFooter";var yp=_.forwardRef(({className:e,...t},n)=>{let{titleId:r}=kr();return jsx("h2",{ref:n,id:r,className:u("text-lg font-semibold leading-none tracking-tight",e),...t})});yp.displayName="ModalTitle";var Rp=_.forwardRef(({className:e,...t},n)=>{let{descriptionId:r}=kr();return jsx("p",{ref:n,id:r,className:u("text-sm text-muted-foreground",e),...t})});Rp.displayName="ModalDescription";var qi=_.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}));qi.displayName=Command.displayName;var uw=({children:e,...t})=>jsx(Qa,{...t,children:jsx(Ja,{className:"overflow-hidden p-0 shadow-lg",showCloseButton:false,children:jsx(qi,{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})})}),wp=_.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})]}));wp.displayName=Command.Input.displayName;var Cp=_.forwardRef(({className:e,children:t,...n},r)=>jsx(De,{className:"max-h-[300px]",children:jsx(Command.List,{ref:r,className:u("overflow-hidden",e),...n,children:t})}));Cp.displayName=Command.List.displayName;var Tp=_.forwardRef((e,t)=>jsx(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Tp.displayName=Command.Empty.displayName;var Mp=_.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}));Mp.displayName=Command.Group.displayName;var Np=_.forwardRef(({className:e,...t},n)=>jsx(Command.Separator,{ref:n,className:u("-mx-1 h-px bg-border",e),...t}));Np.displayName=Command.Separator.displayName;var kp=_.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]}));kp.displayName=Command.Item.displayName;var Pp=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Pp.displayName="CommandShortcut";var Lp=_.forwardRef(({className:e,showToggle:t=true,disabled:n,onFocus:r,onBlur:o,style:a,...s},i)=>{let[l,c]=_.useState(false),[d,m]=_.useState(false);return jsxs("div",{className:"relative",children:[jsx("input",{type:l?"text":"password",className:u("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 file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",t&&"pr-10",e),ref:i,disabled:n,style:{...a,borderColor:d?"var(--color-foreground)":void 0},onFocus:f=>{m(true),r?.(f);},onBlur:f=>{m(false),o?.(f);},...s}),t&&jsx("button",{type:"button",className:"absolute right-0 top-0 h-10 w-10 px-3 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>c(!l),disabled:n,tabIndex:-1,"aria-label":l?"Hide password":"Show password",children:l?jsx(EyeOff,{className:"h-4 w-4"}):jsx(Eye,{className:"h-4 w-4"})})]})});Lp.displayName="PasswordInput";var Sp=_.forwardRef(({className:e,showButtons:t=true,step:n=1,min:r,max:o,value:a,defaultValue:s,onChange:i,disabled:l,...c},d)=>{let[m,f]=_.useState(s),[p,g]=_.useState(false),h=a!==void 0,b=h?a:m,v=T=>{T!==void 0&&(r!==void 0&&T<r&&(T=r),o!==void 0&&T>o&&(T=o)),h||f(T),i?.(T);},w=()=>{v((b??0)+n);},x=()=>{v((b??0)-n);},R=T=>{let k=T.target.value;if(k==="")v(void 0);else {let M=parseFloat(k);isNaN(M)||v(M);}},C=T=>{T.key==="ArrowUp"?(T.preventDefault(),w()):T.key==="ArrowDown"&&(T.preventDefault(),x());},y=r===void 0||(b??0)>r,N=o===void 0||(b??0)<o;return t?jsxs("div",{className:u("relative flex items-center rounded-md border transition-colors",p?"border-foreground":"border-input",l&&"opacity-50",e),children:[jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:x,disabled:l||!y,tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:"h-4 w-4"})}),jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:"min-w-0 flex-1 h-10 bg-background text-sm text-center focus:outline-none disabled:cursor-not-allowed",ref:d,value:b??"",onChange:R,onKeyDown:C,disabled:l,onFocus:()=>g(true),onBlur:()=>g(false),...c}),jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:w,disabled:l||!N,tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:"h-4 w-4"})})]}):jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:u("flex h-10 w-full bg-background px-3 py-2 text-sm text-center border rounded-md placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",p?"border-foreground":"border-input",e),ref:d,value:b??"",onChange:R,onKeyDown:C,disabled:l,onFocus:()=>g(true),onBlur:()=>g(false),...c})});Sp.displayName="NumberInput";var Vp=cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),Dp=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"}}),Ap=_.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(Cr,{className:u(Dp({size:r})),children:[m.src&&jsx(Jr,{src:m.src,alt:m.alt||""}),jsx(Tr,{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(Vp({size:r,className:e})),...a,children:[i.map((m,f)=>c(m,f)),l>0&&jsx(Cr,{className:u(Dp({size:r})),children:jsxs(Tr,{className:"bg-muted text-muted-foreground",children:["+",l]})})]});return o?jsx(jn,{delayDuration:300,children:d}):d});Ap.displayName="AvatarGroup";var zp=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"}}),Op=_.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]=_.useState(n),[b,v]=_.useState(null),w=t!==void 0,x=w?t:g,R=b!==null?b:x,C=D=>{l||c||(w||h(D),r?.(D));},y=(D,H=false)=>{let L=i&&H?D+.5:D+1;C(L);},N=(D,H)=>{if(l||c)return;let L=D.currentTarget.getBoundingClientRect(),S=i&&D.clientX<L.left+L.width/2;v(S?H+.5:H+1);},T=()=>{v(null);},k=s==="heart"?Heart:Star,M=D=>R>=D+1?"full":R>=D+.5?"half":"empty",P=d?{color:d,fill:d}:{},E=m?{color:m}:{};return jsx("div",{ref:p,className:u(zp({size:a,className:e}),c&&"opacity-50 cursor-not-allowed"),onMouseLeave:T,role:"radiogroup","aria-label":"Rating",...f,children:Array.from({length:o},(D,H)=>{let L=M(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:S=>{let V=S.currentTarget.getBoundingClientRect(),A=i&&S.clientX<V.left+V.width/2;y(H,A);},onMouseMove:S=>N(S,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",L!=="empty"&&"absolute inset-0"),style:L==="empty"?E:void 0}),L!=="empty"&&jsx(k,{className:u("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",L==="half"&&"clip-path-half"),style:{...P,clipPath:L==="half"?"inset(0 50% 0 0)":void 0}})]},H)})})});Op.displayName="Rating";var Fp=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-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},clickable:{true:"cursor-pointer",false:""}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"solid",color:"success",className:"bg-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}}),Cw={sm:"sm",md:"sm",lg:"sm"},Kp=_.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(Fp({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(Mt,{size:Cw[r??"md"],onClick:b,disabled:d,className:"ml-0.5 h-4 w-4"})]})});Kp.displayName="Chip";var $p=createContext({direction:"horizontal"}),Sw=({className:e,direction:t="horizontal",children:n,...r})=>jsx($p.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})}),Dw=Panel,Hw=({withHandle:e,className:t,...n})=>{let{direction:r}=useContext($p),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 jp=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"}}),Vw={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"}},Gp={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)"},_p=_.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=Vw[t],f=(m.size-m.strokeWidth)/2,p=2*Math.PI*f,g=p-d/100*p;return jsxs("div",{ref:c,className:u(jp({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:Gp[n]||Gp.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)})]})});_p.displayName="CircularProgress";var Yp=_.createContext(null),Ow=()=>{let e=_.useContext(Yp);if(!e)throw new Error("OTP components must be used within InputOTP");return e},Xp=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"}}),qp=_.forwardRef(({className:e,containerClassName:t,maxLength:n,value:r,defaultValue:o="",onChange:a,onComplete:s,pattern:i,disabled:l=false,size:c,children:d,...m},f)=>{let[p,g]=_.useState(o),[h,b]=_.useState(0),[v,w]=_.useState(false),x=_.useRef(null),R=r!==void 0?r:p;_.useImperativeHandle(f,()=>x.current),_.useEffect(()=>{b(Math.min(R.length,n-1));},[R,n]),_.useEffect(()=>{R.length===n&&s&&s(R);},[R,n,s]);let C=P=>{let E=P.target.value;if(i&&E){let D=new RegExp(i.replace("^","").replace("$","").replace("+",""));E=E.split("").filter(H=>D.test(H)).join("");}E=E.slice(0,n),r===void 0&&g(E),a?.(E);},y=P=>{P.key==="ArrowLeft"?b(E=>Math.max(0,E-1)):P.key==="ArrowRight"&&b(E=>Math.min(R.length,n-1,E+1));},N=()=>{x.current?.focus();},T=()=>{w(true),b(Math.min(R.length,n-1));},k=()=>{w(false);},M={value:R,activeIndex:v?h:-1,maxLength:n,disabled:l};return jsx(Yp.Provider,{value:M,children:jsxs("div",{className:u(Xp({size:c}),t),onClick:N,"data-otp-container":true,children:[jsx("input",{ref:x,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:R,onChange:C,onKeyDown:y,onFocus:T,onBlur:k,disabled:l,maxLength:n,className:u("absolute opacity-0 pointer-events-none w-0 h-0",e),...m}),d]})})});qp.displayName="InputOTP";var Zp=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center",e),...t}));Zp.displayName="InputOTPGroup";var Qp=_.forwardRef(({index:e,className:t,...n},r)=>{let{value:o,activeIndex:a,disabled:s}=Ow(),i=o[e]||"",l=a===e,c=l&&o.length===e;return jsxs("div",{ref:r,"data-otp-slot":true,"data-active":l,"data-filled":!!i,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:rounded-l-md first:border-l last:rounded-r-md",l&&"z-10 border-foreground",s&&"cursor-not-allowed opacity-50",t),...n,children:[i,c&&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 Jp=_.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"})}));Jp.displayName="InputOTPSeparator";var nf=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-2 border-zinc-300 bg-transparent dark:border-zinc-600",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-2 border-zinc-800 bg-transparent dark: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"}}),rf=_.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]=_.useState(""),w=_.useRef(null);_.useImperativeHandle(h,()=>w.current);let x=M=>{let P=M.trim();if(P.length<i||P.length>l||s&&r.length>=s||!d&&r.some(D=>D.text.toLowerCase()===P.toLowerCase()))return;let E={id:crypto.randomUUID(),text:P};o?.([...r,E]),v("");},R=M=>{m||f||o?.(r.filter(P=>P.id!==M));},C=M=>{if(c.includes(M.key)){if(M.key==="Tab"&&!b)return;M.preventDefault(),x(b);}M.key==="Backspace"&&!b&&r.length>0&&R(r[r.length-1].id);},y=M=>{let P=M.target.value;if(P.includes(",")){P.split(",").forEach(D=>{D.trim()&&x(D);});return}v(P);},N=M=>{M.preventDefault(),M.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(D=>{x(D);});},T=()=>{w.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:T,children:[r.map(M=>p?p(M,()=>R(M.id)):jsxs("span",{className:u(nf({variant:t,size:n})),children:[M.text,!m&&!f&&jsx("button",{type:"button",onClick:P=>{P.stopPropagation(),R(M.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${M.text}`,children:jsx(X,{className:"h-3 w-3"})})]},M.id)),!k&&!f&&jsx("input",{ref:w,type:"text",value:b,onChange:y,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})]})});rf.displayName="TagInput";var af=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"}}),sf=_.forwardRef(({className:e,size:t,icon:n,title:r,description:o,action:a,children:s,...i},l)=>jsxs("div",{ref:l,className:u(af({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]}));sf.displayName="EmptyState";var cf=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-2 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-2 border-zinc-900 bg-transparent dark:border-white"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"bordered",radius:"md"}}),df=_.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(cf({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})]})});df.displayName="StatCard";var el=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"}}),Xw=({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 qw({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:w,...x},R){let[C,y]=_.useState(null),[N,T]=_.useState(null),[k,M]=_.useState(new Set(f)),P=m!==void 0,E=P?new Set(m):k,[D,H]=_.useState(new Set(b)),L=h!==void 0,S=L?new Set(h):D,V=(O,W)=>{y(W),O.dataTransfer.effectAllowed="move",O.dataTransfer.setData("text/plain",String(W));},A=(O,W)=>{O.preventDefault(),!(C===null||C===W)&&T(W);},B=()=>{T(null);},I=(O,W)=>{if(O.preventDefault(),!r||C===null||C===W){y(null),T(null);return}let z=[...r],[j]=z.splice(C,1);z.splice(W,0,j),s?.(z),y(null),T(null);},F=()=>{y(null),T(null);},K=_.useCallback((O,W)=>{if(!r)return;let z=new Set(E),j=!z.has(O.id);d?j?z.add(O.id):z.delete(O.id):(z.clear(),j&&z.add(O.id)),P||M(z);let oe=r.filter(ge=>z.has(ge.id));p?.(Array.from(z),{selected:j,selectedItems:oe,item:O,event:W});},[r,E,d,P,p]),Y=_.useCallback((O,W)=>{if(!r)return;let z=new Set(S),j=!z.has(O.id);j?z.add(O.id):z.delete(O.id),L||H(z);let oe=r.filter(ge=>z.has(ge.id));v?.(Array.from(z),{checked:j,checkedItems:oe,item:O,event:W});},[r,S,L,v]);return (a||c||g)&&r&&o?jsx("div",{ref:R,role:"list",className:u(el({variant:t,size:n,className:e})),...x,children:r.map((O,W)=>{let z=E.has(O.id),j=S.has(O.id);return jsxs("div",{role:"listitem","aria-selected":c?z:void 0,draggable:a,onDragStart:a?G=>V(G,W):void 0,onDragOver:a?G=>A(G,W):void 0,onDragLeave:a?B:void 0,onDrop:a?G=>I(G,W):void 0,onDragEnd:a?F:void 0,onClick:c&&!g?G=>K(O,G):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===W&&"opacity-50 scale-[1.02] z-10",N===W&&"border-primary border-dashed border rounded-md",z&&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(Xw,{checked:j,onClick:G=>Y(O,G)}),jsx("div",{className:"flex-1 min-w-0",children:o(O,W)})]},O.id)})}):jsx("div",{ref:R,role:"list",className:u(el({variant:t,size:n,className:e})),...x,children:w})}var Zw=_.forwardRef(qw),mf=cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),pf=_.forwardRef(({className:e,interactive:t,leading:n,trailing:r,children:o,...a},s)=>jsxs("div",{ref:s,role:"listitem",className:u(mf({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})]}));pf.displayName="ListItem";var ff=_.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]}));ff.displayName="ListItemText";var vf=cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),hf=_.forwardRef(({className:e,position:t,...n},r)=>jsx("div",{ref:r,"data-position":t,className:u(vf({position:t,className:e})),...n}));hf.displayName="Timeline";var xf=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"}}),yf=_.forwardRef(({className:e,variant:t,hideSeparator:n=false,hideConnector:r=false,dot:o,children:a,...s},i)=>jsxs("div",{ref:i,className:u(xf({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]}));yf.displayName="TimelineItem";var Rf=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex-1 pt-0.5",e),...t}));Rf.displayName="TimelineContent";var wf=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));wf.displayName="TimelineOpposite";var Tf=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}}),Mf=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}}),Nf=_.createContext({}),kf=_.forwardRef(({className:e,size:t="md",fullWidth:n,children:r,value:o,defaultValue:a,onValueChange:s,disabled:i,...l},c)=>{let[d,m]=_.useState(a),f=o!==void 0?o:d,p=_.useCallback(g=>{o===void 0&&m(g),s?.(g);},[o,s]);return jsx(Nf.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:i},children:jsx("div",{ref:c,role:"group",className:u(Tf({size:t,fullWidth:n,className:e})),...l,children:r})})});kf.displayName="SegmentedControl";var Pf=_.forwardRef(({className:e,children:t,value:n,disabled:r,...o},a)=>{let s=_.useContext(Nf),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(Mf({size:s.size,selected:i}),"flex-1",e),...o,children:t})});Pf.displayName="SegmentedControlItem";var Ef=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"}}),Lf=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},as=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]},Sf=(e,t,n)=>{let r=[];return t&&e.size>t&&r.push({code:"file-too-large",message:`File is larger than ${as(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},Df=_.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]=_.useState(false),[v,w]=_.useState(false),[x,R]=_.useState([]),C=_.useRef(null),y=_.useCallback(S=>{if(!S||S.length===0)return;let V=Array.from(S),A=[],B=[];(m?V:[V[0]]).forEach(F=>{let K=Sf(F,c,d);K.length>0?B.push({file:F,errors:K}):A.push(F);}),R(B),A.length>0&&r?.(A),B.length>0&&o?.(B);},[c,d,m,r,o]),N=_.useCallback(S=>{if(S.preventDefault(),S.stopPropagation(),!f&&(b(true),S.dataTransfer.items)){let A=Array.from(S.dataTransfer.items).some(B=>{if(B.kind!=="file")return true;if(d&&d.length>0){let I=B.type;return !d.some(F=>F.endsWith("/*")?I.startsWith(F.slice(0,-2)):I===F)}return false});w(A);}},[f,d]),T=_.useCallback(S=>{S.preventDefault(),S.stopPropagation(),!f&&(S.dataTransfer.dropEffect="copy");},[f]),k=_.useCallback(S=>{S.preventDefault(),S.stopPropagation();let V=S.currentTarget.getBoundingClientRect(),A=S.clientX,B=S.clientY;(A<V.left||A>V.right||B<V.top||B>V.bottom)&&(b(false),w(false));},[]),M=_.useCallback(S=>{S.preventDefault(),S.stopPropagation(),b(false),w(false),!f&&y(S.dataTransfer.files);},[f,y]),P=_.useCallback(()=>{f||C.current?.click();},[f]),E=_.useCallback(S=>{y(S.target.files),S.target.value="";},[y]),D=_.useCallback(S=>{f||(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),C.current?.click());},[f]),H=v?"error":h?"active":t,L=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:k,onDrop:M,onClick:P,onKeyDown:D,className:u(Ef({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:L,multiple:m,disabled:f,onChange:E,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 ${as(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:S,errors:V})=>jsxs("div",{children:[jsx("span",{className:"font-medium",children:S.name}),":"," ",V.map(A=>A.message).join(", ")]},S.name))}),i&&s.length>0&&jsx("div",{className:"space-y-2",children:s.map(S=>{let V=Lf(S.file);return jsxs("div",{className:u("flex items-center gap-3 rounded-lg border p-3",S.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(V,{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:S.file.name}),jsxs("p",{className:"text-xs text-muted-foreground",children:[as(S.file.size),S.error&&jsx("span",{className:"ml-2 text-danger",children:S.error})]}),S.progress!==void 0&&S.progress<100&&jsx(Wa,{value:S.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:A=>{A.stopPropagation(),a?.(S.file);},children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Remove"})]})]},S.id)})})]})});Df.displayName="FileUpload";var iC=`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")`,If=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}}),Yo=_.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(If({size:o,shape:a,interactive:s??(!!r||!!l)}),t&&"ring-2 ring-offset-2",i),style:{backgroundImage:n?iC: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}})}));Yo.displayName="ColorSwatch";var Vf=cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),Af=_.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]=_.useState(t),b=e??g,v=_.useCallback(x=>{l||(e===void 0&&h(x),n?.(x));},[e,n,l]),w=x=>x.toLowerCase();return jsx("div",{ref:p,role:"listbox","aria-label":"Color options",className:u(Vf({layout:r}),d),style:{...r==="grid"?{gridTemplateColumns:`repeat(${o}, 1fr)`}:{},...m},...f,children:a.map(x=>{let R=b?w(b)===w(x):false;return jsx(Yo,{role:"option",color:x,size:s,shape:i,isSelected:R,onSelect:v,disabled:l,selectedRingColor:c,"aria-selected":R},x)})})});Af.displayName="ColorSwatchPicker";var dC=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],zf={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},Of=_.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:n,disabled:r,presets:o=dC,showInput:a=true,size:s="md",className:i,variant:l="full"},c)=>{let[d,m]=_.useState(e??t),f=_.useId();_.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",zf[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",zf[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(wr,{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(wr,{className:"text-xs",children:"Presets"}),jsx("div",{className:"flex flex-wrap gap-1.5",children:o.map(b=>jsx(Yo,{color:b,size:"sm",isSelected:d.toLowerCase()===b.toLowerCase(),onSelect:g},b))})]})]})})]})});Of.displayName="ColorPicker";var Bf=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"}}),rl=e=>String(e).padStart(2,"0"),gC=e=>{let[t,n]=e.split(":").map(Number);return {hours:t||0,minutes:n||0}},bC=(e,t)=>`${rl(e)}:${rl(t)}`,Ff=_.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]=_.useState(n??""),[g,h]=_.useState(false);_.useEffect(()=>{n!==void 0&&p(n);},[n]);let{hours:b,minutes:v}=gC(f||"00:00"),w=k=>{let M=k.target.value;p(M),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(M)&&r?.(M);},x=(k,M)=>{let P=Math.max(0,Math.min(23,k)),E=Math.max(0,Math.min(59,M)),D=bC(P,E);p(D),r?.(D);},R=()=>x(b+1,v),C=()=>x(b-1,v),y=()=>x(b,v+a),N=()=>x(b,v-a),T=({value:k,onIncrement:M,onDecrement:P})=>jsxs("div",{className:"flex flex-col items-center",children:[jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:M,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:rl(k)}),jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:P,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:w,disabled:c,className:u(Bf({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:R,onDecrement:C,max:23}),jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsx(T,{value:v,onIncrement:y,onDecrement:N,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"})]})]})]})]})});Ff.displayName="TimeInput";var Kf=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"}}),hC=(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}},ol=(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},$f=(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},Gf=_.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=".",disabled:h,placeholder:b,...v},w)=>{let[x,R]=_.useState(r),[C,y]=_.useState(""),[N,T]=_.useState(false),k=n!==void 0?n:x,M=f??hC(a,s);_.useEffect(()=>{!N&&k!==void 0&&y(ol(k,i,p,g));},[k,i,p,g,N]);let P=S=>{let V=S.target.value;if(!V){y(""),n===void 0&&R(void 0),o?.(void 0);return}if(!new RegExp(`^[0-9${p}${g}.-]*$`).test(V))return;y(V);let B=$f(V,p,g);if(B!==void 0){let I=B;l!==void 0&&B<l&&(I=l),c!==void 0&&B>c&&(I=c),n===void 0&&R(I),o?.(I);}},E=()=>{T(true),k!==void 0&&y(k.toString().replace(".",g));},D=()=>{T(false),y(k!==void 0?ol(k,i,p,g):"");},H=d&&m==="prefix"&&jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:M}),L=d&&m==="suffix"&&jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:M});return jsxs("div",{className:"relative flex items-center",children:[H&&jsx("div",{className:"absolute left-3 pointer-events-none",children:H}),jsx("input",{ref:w,type:"text",inputMode:"decimal",value:C,onChange:P,onFocus:E,onBlur:D,disabled:h,placeholder:b??`0${g}${"0".repeat(i)}`,className:u(Kf({size:t}),H&&"pl-8",L&&"pr-8","text-right",e),style:{borderColor:N?"var(--color-foreground)":void 0},...v}),L&&jsx("div",{className:"absolute right-3 pointer-events-none",children:L})]})});Gf.displayName="CurrencyInput";var Uf=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"}}),al={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:"#####-####"}},RC=(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),is=(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];RC(i,s)?(r+=i,o++):(o++,a--);}}else (o<e.length||n)&&(r+=s);}return r},sl=(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},Wf=(e,t)=>e.split("").map(n=>rr(n)?t:n).join(""),wC=(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)},jf=_.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 al?al[a].mask:a,[g,h]=_.useState(r),[b,v]=_.useState(""),[w,x]=_.useState(false),R=_.useRef(null),C=n!==void 0?n:g;_.useImperativeHandle(f,()=>R.current),_.useEffect(()=>{let k=is(C,p,true);v(k);},[C,p]);let y=k=>{let M=k.target.value,P=k.target.selectionStart??0,E=M.replace(/[^\w]/g,""),D=is(E,p,true),H=sl(D,p);v(D),n===void 0&&h(l?D:H),o?.(H,D),requestAnimationFrame(()=>{if(R.current){let L=wC(D,p,P);R.current.setSelectionRange(L,L);}});},N=k=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(k.key)||k.ctrlKey||k.metaKey)return;let M=R.current;if(!M)return;let P=M.selectionStart??0;if(k.key==="Backspace"&&P>0){let E=P-1;for(;E>0&&!rr(p[E]);)E--;let D=sl(b,p),H=0;for(let V=0;V<E&&V<p.length;V++)rr(p[V])&&H++;let L=D.slice(0,Math.max(0,H-1))+D.slice(H),S=is(L,p,true);v(S),n===void 0&&h(l?S:L),o?.(L,S),k.preventDefault(),requestAnimationFrame(()=>{R.current&&R.current.setSelectionRange(E,E);});}},T=i?Wf(p,s):d;return jsx("input",{ref:R,type:"text",value:b,onChange:y,onKeyDown:N,onFocus:()=>x(true),onBlur:()=>x(false),disabled:c,placeholder:T,className:u(Uf({size:t}),e),style:{borderColor:w?"var(--color-foreground)":void 0},...m})});jf.displayName="MaskedInput";var Yf=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"}}),Xf=[{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:"(###) ###-####"}],ls=(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},kC=e=>e.replace(/#/g,"_"),qf=_.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,country:a,defaultCountry:s="TR",onCountryChange:i,countries:l=Xf,showCountrySelect:c=true,showDialCode:d=false,disabled:m,placeholder:f,...p},g)=>{let[h,b]=_.useState(r),[v,w]=_.useState(a??s),[x,R]=_.useState(false),[C,y]=_.useState(false),[N,T]=_.useState(false),[k,M]=_.useState({top:0,left:0,width:0}),P=_.useRef(null),E=_.useRef(null),D=n!==void 0?n:h,H=a??v,L=l.find(I=>I.code===H)??l[0],S=ls(D,L.format);_.useEffect(()=>{T(true);},[]),_.useEffect(()=>{if(C&&P.current){let I=P.current.getBoundingClientRect();M({top:I.bottom+4,left:I.left,width:Math.max(I.width,280)});}},[C]),_.useEffect(()=>{if(!C)return;let I=F=>{P.current&&!P.current.contains(F.target)&&E.current&&!E.current.contains(F.target)&&y(false);};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[C]),_.useEffect(()=>{if(!C)return;let I=F=>{F.key==="Escape"&&y(false);};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[C]);let V=I=>{let K=I.target.value.replace(/\D/g,"");n===void 0&&b(K);let Y=ls(K,L.format),q=`${L.dialCode} ${Y}`;o?.(K,q,L);},A=I=>{let F=l.find(q=>q.code===I);if(!F)return;a===void 0&&w(I),i?.(F);let K=ls(D,F.format),Y=`${F.dialCode} ${K}`;o?.(D,Y,F),y(false);};return jsxs("div",{className:"flex",children:[c&&jsxs(Fragment,{children:[jsxs("button",{ref:P,type:"button",disabled:m,onClick:()=>y(!C),className:u("flex items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","w-[100px] rounded-r-none border-r-0 shrink-0",t==="sm"?"h-8":t==="lg"?"h-12":"h-10"),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",C&&"rotate-180")})]}),N&&C&&za.createPortal(jsx("div",{ref:E,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(De,{style:{maxHeight:300},children:jsx("div",{className:"p-1",children:l.map(I=>jsxs("div",{role:"option","aria-selected":I.code===H,onClick:()=>A(I.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:I.code===H&&jsx(Check,{className:"h-4 w-4"})}),jsxs("span",{className:"flex items-center gap-2",children:[jsx("span",{children:I.flag}),jsx("span",{className:"flex-1",children:I.name}),jsx("span",{className:"text-xs text-muted-foreground",children:I.dialCode})]})]},I.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:g,type:"tel",inputMode:"tel",value:S,onChange:V,onFocus:()=>R(true),onBlur:()=>R(false),disabled:m,placeholder:f??kC(L.format),className:u(Yf({size:t}),c&&"rounded-l-none",d&&!c&&"pl-12",e),style:{borderColor:x?"var(--color-foreground)":void 0},...p})]})]})});qf.displayName="PhoneInput";var Qf=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=_.forwardRef(({className:e,variant:t,size:n,sticky:r,brand:o,children:a,mobileBreakpoint:s="md",...i},l)=>{let[c,d]=_.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(Qf({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,{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 eg=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex items-center gap-2 font-semibold text-lg",e),...t}));eg.displayName="NavbarBrand";var tg=_.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})});tg.displayName="NavbarContent";var ng=_.forwardRef(({className:e,isActive:t,...n},r)=>jsx("div",{ref:r,className:u("flex items-center",t&&"text-primary font-medium",e),...n}));ng.displayName="NavbarItem";var rg=_.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}));rg.displayName="NavbarLink";var ag=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"}}),sg=_.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(ag({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"})]})});sg.displayName="Link";var ig=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"}}),lg=_.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]=_.useState(false);_.useEffect(()=>{let w=c?.current||window,x=()=>{let C=(c?.current?c.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>n;C!==g&&(h(C),d?.(C));};return w.addEventListener("scroll",x,{passive:true}),x(),()=>{w.removeEventListener("scroll",x);}},[n,c,g,d]);let b=w=>{c?.current?c.current.scrollTo({top:0,behavior:o}):window.scrollTo({top:0,behavior:o}),m?.(w);},v=i==="sm"?"h-4 w-4":i==="lg"?"h-6 w-6":"h-5 w-5";return jsx("div",{className:u(ig({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:"icon",radius:l,onClick:b,"aria-label":"Back to top",className:u("shadow-lg",i==="sm"&&"h-9 w-9",i==="md"&&"h-10 w-10",i==="lg"&&"h-12 w-12"),...f,children:r||jsx(ArrowUp,{className:v})})})});lg.displayName="BackTop";var KC=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),$C=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),cg=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"}},defaultVariants:{radius:"sm"}}),us=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-xl"}},defaultVariants:{radius:"sm"}}),dg=_.createContext(null),ar=()=>{let e=_.useContext(dg);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},ug=_.createContext(null),qo=()=>{let e=_.useContext(ug);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},ll=_.createContext(null),mg=_.createContext(null),pg=_.forwardRef(({className:e,children:t,radius:n="sm",...r},o)=>{let[a,s]=_.useState(null);return jsx(dg.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",KC({radius:n}),e),...r,children:t})})});pg.displayName="Menubar";var fg=({children:e})=>{let{activeMenu:t,setActiveMenu:n}=ar(),r=_.useId(),o=_.useRef(null),a=t===r,s=_.useCallback(i=>{n(i?r:null);},[r,n]);return jsx(ug.Provider,{value:{menuId:r,triggerRef:o,open:a,onOpenChange:s},children:e})};fg.displayName="MenubarMenu";var gg=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));gg.displayName="MenubarGroup";var bg=({children:e,container:t})=>{let[n,r]=_.useState(false);return _.useEffect(()=>{r(true);},[]),n?za.createPortal(e,t||document.body):null};bg.displayName="MenubarPortal";var vg=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=_.useState(n),s=t!==void 0,i=s?t:o,l=_.useRef(null),c=_.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(ll.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};vg.displayName="MenubarSub";var hg=_.forwardRef(({value:e="",onValueChange:t,className:n,...r},o)=>jsx(mg.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsx("div",{ref:o,role:"group",className:n,...r})}));hg.displayName="MenubarRadioGroup";var xg=_.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",$C({radius:i}),e),onClick:f,onMouseEnter:p,...r})});xg.displayName="MenubarTrigger";var yg=_.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let{radius:i}=ar(),l=_.useContext(ll);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",us({radius:i}),t&&"pl-8",e),onMouseEnter:f,onMouseLeave:p,...a,children:[n,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});yg.displayName="MenubarSubTrigger";var Rg=_.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let{radius:s}=ar(),i=_.useContext(ll);if(!i)throw new Error("MenubarSubContent must be used within MenubarSub");let{open:l,onOpenChange:c,triggerRef:d}=i,[m,f]=_.useState({top:0,left:0}),[p,g]=_.useState(false),h=_.useRef(null);_.useEffect(()=>{g(true);},[]),_.useEffect(()=>{if(!l||!d.current||!h.current)return;(()=>{if(!d.current||!h.current)return;let x=d.current.getBoundingClientRect(),R=h.current.getBoundingClientRect(),C=x.top,y=x.right+t;y+R.width>window.innerWidth&&(y=x.left-R.width-t),f({top:C,left:y});})();},[l,t,d]);let b=w=>{n?.(w),c(true);},v=w=>{r?.(w),c(false);};return !p||!l?null:za.createPortal(jsx("div",{ref:w=>{h.current=w,typeof a=="function"?a(w):a&&(a.current=w);},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",cg({radius:s}),e),style:{top:m.top,left:m.left},onMouseEnter:b,onMouseLeave:v,...o}),document.body)});Rg.displayName="MenubarSubContent";var wg=_.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]=_.useState({top:0,left:0}),[p,g]=_.useState(false),h=_.useRef(null);return _.useEffect(()=>{g(true);},[]),_.useEffect(()=>{if(!c||!l.current||!h.current)return;let b=()=>{if(!l.current||!h.current)return;let v=l.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),x=v.bottom+r,R=v.left+n;t==="center"?R=v.left+v.width/2-w.width/2:t==="end"&&(R=v.right-w.width-n),f({top:x,left:R});};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]),_.useEffect(()=>{if(!c)return;let b=v=>{let w=v.target;h.current&&!h.current.contains(w)&&l.current&&!l.current.contains(w)&&d(false);};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[c,d,l]),_.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:za.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",cg({radius:i}),e),style:{top:m.top,left:m.left},...a,children:o}),document.body)});wg.displayName="MenubarContent";var Cg=_.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",us({radius:i}),t&&"pl-8",!n&&"cursor-pointer",e),onClick:c,...a})});Cg.displayName="MenubarItem";var Tg=_.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",us({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]})});Tg.displayName="MenubarCheckboxItem";var Mg=_.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{radius:i}=ar(),{onOpenChange:l}=qo(),c=_.useContext(mg),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",us({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]})});Mg.displayName="MenubarRadioItem";var Ng=_.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}));Ng.displayName="MenubarLabel";var kg=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:u("-mx-1 my-1 h-px bg-muted",e),...t}));kg.displayName="MenubarSeparator";var Pg=({className:e,...t})=>jsx("span",{className:u("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Pg.displayName="MenubarShortcut";var Eg=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"}}),Lg=_.forwardRef(({className:e,orientation:t,size:n,currentStep:r=0,children:o,...a},s)=>{let i=_.Children.toArray(o);return jsx("div",{ref:s,className:u(Eg({orientation:t,size:n,className:e})),...a,children:i.map((l,c)=>_.isValidElement(l)?_.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)})});Lg.displayName="Steps";var Sg=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"}}),UC=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"}}),WC=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"}}),Dg=_.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(Sg({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(UC({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(WC({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Dg.displayName="Step";var Ig=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"}}),Vg=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}}),Ag=_.createContext(null),JC=()=>{let e=_.useContext(Ag);if(!e)throw new Error("TreeNodeComponent must be used within Tree");return e},eT=({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"})})}),zg=({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:w,handleDrop:x,allowDrop:R,onDragStart:C,onDragOver:y,onDragEnter:N,onDragLeave:T,onDragEnd:k,showLine:M,showIcon:P,showHandle:E,dragIcon:D,icon:H,leafIcon:L,folderIcon:S,folderOpenIcon:V,blockNode:A,disabled:B,size:I,getAllKeys:F}=JC(),K=e.children&&e.children.length>0,Y=e.isLeaf??!K,q=o.has(e.key),$=s.has(e.key),O=c.has(e.key),W=d.has(e.key),z=g?.key===e.key,j=b===e.key,oe=!!(B||e.disabled),ge=l&&e.selectable!==false,G=f&&e.checkable!==false,Pe=_.useMemo(()=>oe?false:typeof p=="boolean"?p:typeof p=="function"?p(e):p&&typeof p=="object"?p.nodeDraggable?p.nodeDraggable(e):true:false,[p,e,oe]),Z=_.useMemo(()=>D!==void 0?D:typeof p=="object"&&p.icon!==void 0?p.icon:jsx(GripVertical,{className:"h-4 w-4"}),[D,p]),le=_.useMemo(()=>e.icon?e.icon:H?typeof H=="function"?H({expanded:q,isLeaf:Y}):H:Y?L:q?V:S,[e.icon,H,q,Y,L,S,V]),Be=X=>{if(!Pe)return;X.stopPropagation(),X.dataTransfer.effectAllowed="move";let Se=X.currentTarget,de=Se.cloneNode(true),We=document.documentElement.classList.contains("dark"),je=We?"#0a0a0a":"#ffffff",Gn=We?"#27272a":"#e4e4e7";de.style.cssText=`
|
|
43
|
+
`;return jsxs(Fragment,{children:[jsx("style",{dangerouslySetInnerHTML:{__html:p}}),jsx("div",{ref:s,id:c,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),style:o,className:m(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),...a,children:r})]})});De.displayName="ScrollArea";var Hd=cva("flex min-h-10 w-full cursor-pointer items-center justify-between border border-zinc-300 dark:border-zinc-700 bg-background px-3 py-2 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),Va=_.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:u=3,maxDropdownHeight:f=240,radius:p,className:g,...h},v)=>{let[b,w]=_.useState(false),[x,R]=_.useState(""),[C,y]=_.useState(r||""),[N,T]=_.useState(r||[]),[k,E]=_.useState({top:0,left:0,width:0}),M=_.useRef(null),P=_.useRef(null),S=_.useRef(null),H=_.useRef(null),D=n!==void 0?n:C,L=n!==void 0?n:N,V=n!==void 0,A=z=>{d&&D===z?(V||y(""),o?.("")):(V||y(z),o?.(z)),w(false),R("");},B=z=>{let j=L.includes(z)?L.filter(oe=>oe!==z):[...L,z];V||T(j),o?.(j);},I=(z,j)=>{j.stopPropagation();let oe=L.filter(ge=>ge!==z);V||T(oe),o?.(oe);},F=z=>{z.stopPropagation(),t?(V||T([]),o?.([])):(V||y(""),o?.(""));},K=e.find(z=>z.value===D),Y=e.filter(z=>L.includes(z.value)),q=Y.slice(0,u),$=Y.length-u,O=s?e.filter(z=>z.label.toLowerCase().includes(x.toLowerCase())):e;_.useEffect(()=>{if(b&&P.current){let z=P.current.getBoundingClientRect();E({top:z.bottom+4,left:z.left,width:z.width}),s&&setTimeout(()=>H.current?.focus(),0);}b||R("");},[b,s]),_.useEffect(()=>{let z=j=>{let oe=j.target,ge=M.current&&!M.current.contains(oe),G=S.current&&!S.current.contains(oe);ge&&G&&(w(false),R(""));};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[]),_.useEffect(()=>{if(!b)return;let z=j=>{S.current?.contains(j.target)||(w(false),R(""));};return window.addEventListener("scroll",z,true),()=>window.removeEventListener("scroll",z,true)},[b]);let W=t?L.length>0:!!D;return jsxs("div",{ref:M,className:m("relative",g),...h,children:[jsxs("div",{ref:z=>{P.current=z,typeof v=="function"?v(z):v&&(v.current=z);},role:"combobox","aria-expanded":b,"aria-haspopup":"listbox","aria-disabled":c,onClick:()=>!c&&w(!b),className:m(Hd({radius:p}),t&&"flex-wrap gap-1",c&&"cursor-not-allowed opacity-50"),children:[!t&&jsx("span",{className:m(!K&&"text-muted-foreground"),children:K?K.label:a}),t&&jsx(Fragment,{children:Y.length===0?jsx("span",{className:"text-muted-foreground",children:a}):jsxs(Fragment,{children:[q.map(z=>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:[z.label,jsx("span",{role:"button",tabIndex:0,onClick:j=>I(z.value,j),onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&I(z.value,j);},className:"rounded-full hover:bg-secondary-foreground/20 cursor-pointer",children:jsx(X,{className:"h-3 w-3"})})]},z.value)),$>0&&jsxs("span",{className:"text-xs text-muted-foreground",children:["+",$," more"]})]})}),jsxs("div",{className:"ml-auto flex items-center gap-1",children:[d&&W&&jsx("span",{role:"button",tabIndex:0,onClick:F,onKeyDown:z=>{(z.key==="Enter"||z.key===" ")&&F(z);},className:"rounded-full p-0.5 hover:bg-muted cursor-pointer",children:jsx(X,{className:"h-4 w-4 opacity-50"})}),jsx(ChevronDown,{className:m("h-4 w-4 opacity-50 transition-transform",b&&"rotate-180")})]})]}),b&&!c&&typeof document<"u"&&Oa.createPortal(jsxs("div",{ref:S,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:H,type:"text",value:x,onChange:z=>R(z.target.value),placeholder:i,className:"flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground"})]}),jsx(De,{style:{maxHeight:f},onWheel:z=>z.stopPropagation(),children:jsx("div",{className:"p-1",children:O.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l}):O.map(z=>{let j=t?L.includes(z.value):D===z.value;return jsxs("div",{role:"option","aria-selected":j,onClick:()=>{z.disabled||(t?B(z.value):A(z.value));},className:m("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",z.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:j&&jsx(Check,{className:"h-4 w-4"})}),z.label]},z.value)})})})]}),document.body)]})});Va.displayName="Select";var Id=_.createContext(null),zo=()=>{let e=_.useContext(Id);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e},ki=_.createContext({radius:"md"}),Pi=_.createContext(null),Cn=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=_.useState(n),[s,i]=_.useState(-1),l=t!==void 0,c=l?t:o,d=_.useRef(null),u=_.useRef(null),f=_.useId(),p=_.useRef(new Map),g=_.useCallback(b=>{l||a(b),r?.(b),b||i(-1);},[l,r]),h=_.useCallback((b,w)=>{p.current.set(b,w);},[]),v=_.useCallback(b=>{p.current.delete(b);},[]);return jsx(Id.Provider,{value:{open:c,onOpenChange:g,triggerRef:d,contentRef:u,contentId:f,activeIndex:s,setActiveIndex:i,items:p,registerItem:h,unregisterItem:v},children:e})};Cn.displayName="Dropdown";var Tn=_.forwardRef(({children:e,onClick:t,onKeyDown:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=zo();return jsx("div",{ref:u=>{i.current=u,typeof o=="function"?o(u):o&&(o.current=u);},role:"button",tabIndex:0,"aria-expanded":a,"aria-haspopup":"menu","aria-controls":a?l:void 0,onClick:u=>{t?.(u),s(!a);},onKeyDown:u=>{n?.(u),(u.key==="ArrowDown"||u.key==="ArrowUp")&&(u.preventDefault(),s(true)),(u.key==="Enter"||u.key===" ")&&(u.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=_.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,...u},f)=>{let{open:p,onOpenChange:g,triggerRef:h,contentRef:v,contentId:b,activeIndex:w,setActiveIndex:x,items:R}=zo(),[C,y]=_.useState({top:0,left:0}),[N,T]=_.useState(t),[k,E]=_.useState(false),M=_.useRef(0);if(_.useEffect(()=>{E(true);},[]),_.useEffect(()=>{p&&(M.current=R.current.size);},[p,R]),_.useEffect(()=>{if(!p||!h.current||!v.current)return;let S=()=>{if(!h.current||!v.current)return;let H=h.current.getBoundingClientRect(),D=v.current.getBoundingClientRect(),L=window.innerWidth,V=window.innerHeight,A=0,B=0,I=t;switch(t){case "top":A=H.top-D.height-n,A<a&&(A=H.bottom+n,I="bottom");break;case "bottom":A=H.bottom+n,A+D.height>V-a&&(A=H.top-D.height-n,I="top");break;case "left":B=H.left-D.width-n,B<a&&(B=H.right+n,I="right");break;case "right":B=H.right+n,B+D.width>L-a&&(B=H.left-D.width-n,I="left");break}if(I==="top"||I==="bottom"){switch(r){case "start":B=H.left+o;break;case "center":B=H.left+H.width/2-D.width/2;break;case "end":B=H.right-D.width-o;break}B<a?B=a:B+D.width>L-a&&(B=L-D.width-a);}else {switch(r){case "start":A=H.top+o;break;case "center":A=H.top+H.height/2-D.height/2;break;case "end":A=H.bottom-D.height-o;break}A<a?A=a:A+D.height>V-a&&(A=V-D.height-a);}y({top:A,left:B}),T(I);};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]),_.useEffect(()=>{if(!p)return;let S=H=>{let D=H.target;v.current&&!v.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,v]),_.useEffect(()=>{if(!p)return;let S=H=>{let D=Array.from(R.current.entries()).sort(([V],[A])=>V-A).map(([,V])=>V),L=D.length;if(L!==0)switch(H.key){case "Escape":H.preventDefault(),i?.(),g(false),h.current?.focus();break;case "ArrowDown":H.preventDefault(),w===-1||w>=L-1?x(l?0:Math.min(w+1,L-1)):x(w+1);break;case "ArrowUp":H.preventDefault(),w<=0?x(l?L-1:0):x(w-1);break;case "Home":H.preventDefault(),x(0);break;case "End":H.preventDefault(),x(L-1);break;case "Enter":case " ":H.preventDefault(),w>=0&&w<L&&D[w]?.click();break;case "Tab":g(false);break}};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[p,g,i,w,x,R,l,h]),_.useEffect(()=>{p&&w>=0&&Array.from(R.current.entries()).sort(([H],[D])=>H-D).map(([,H])=>H)[w]?.focus();},[p,w,R]),!k||!p)return null;let P={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 Oa.createPortal(jsx("div",{ref:S=>{v.current=S,typeof f=="function"?f(S):f&&(f.current=S);},id:b,role:"menu","aria-orientation":"vertical","data-state":p?"open":"closed","data-side":N,"data-dropdown-content":"",className:m("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md outline-none",Y0[c],P,e),style:{top:C.top,left:C.left},...u,children:jsx(ki.Provider,{value:{radius:c},children:d})}),document.body)});Mn.displayName="DropdownContent";var Vd=0,Ad={none:"rounded-none",sm:"rounded-sm",md:"rounded-sm",lg:"rounded-md",full:"rounded-lg"},$t=_.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,onMouseEnter:a,startContent:s,endContent:i,children:l,...c},d)=>{let{onOpenChange:u,activeIndex:f,setActiveIndex:p,registerItem:g,unregisterItem:h}=zo(),{radius:v}=_.useContext(ki),[b]=_.useState(()=>Vd++),w=_.useRef(null);_.useEffect(()=>(!n&&w.current&&g(b,w.current),()=>{h(b);}),[n,b,g,h]);let x=y=>{if(n){y.preventDefault();return}o?.(y),r?.(),u(false);},R=y=>{a?.(y),n||p(b);};return jsxs("div",{ref:y=>{w.current=y,typeof d=="function"?d(y):d&&(d.current=y);},role:"menuitem",tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,"data-highlighted":f===b?"":void 0,className:m("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",Ad[v],t&&"pl-8",!n&&"cursor-pointer",e),onClick:x,onMouseEnter:R,...c,children:[s,l&&jsx("span",{className:"flex-1",children:l}),i]})});$t.displayName="DropdownItem";var Ei=_.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:m("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));Ei.displayName="DropdownSection";var zd=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:m("-mx-1 my-1 h-px bg-muted",e),...t}));zd.displayName="DropdownSeparator";var Od=({className:e,...t})=>jsx("span",{className:m("ml-auto text-xs tracking-widest opacity-60",e),...t});Od.displayName="DropdownShortcut";var Bd=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));Bd.displayName="DropdownGroup";var Fd=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=_.useState(n),{contentRef:s}=zo(),i=t!==void 0,l=i?t:o,c=_.useRef(null),d=_.useCallback(u=>{i||a(u),r?.(u);},[i,r]);return jsx(Pi.Provider,{value:{open:l,onOpenChange:d,triggerRef:c,parentMenuRef:s},children:e})};Fd.displayName="DropdownSub";var Kd=_.forwardRef(({className:e,inset:t,disabled:n,children:r,onMouseEnter:o,onMouseLeave:a,onKeyDown:s,...i},l)=>{let c=_.useContext(Pi),{setActiveIndex:d,registerItem:u,unregisterItem:f}=zo(),{radius:p}=_.useContext(ki),[g]=_.useState(()=>Vd++),h=_.useRef(null);if(!c)throw new Error("DropdownSubTrigger must be used within DropdownSub");let{open:v,onOpenChange:b,triggerRef:w}=c;_.useEffect(()=>(!n&&h.current&&u(g,h.current),()=>{f(g);}),[n,g,u,f]);let x=y=>{o?.(y),n||(d(g),b(true));},R=y=>{a?.(y);},C=y=>{s?.(y),(y.key==="ArrowRight"||y.key==="Enter"||y.key===" ")&&(y.preventDefault(),b(true));};return jsxs("div",{ref:y=>{h.current=y,w.current=y,typeof l=="function"?l(y):l&&(l.current=y);},role:"menuitem","aria-haspopup":"menu","aria-expanded":v,tabIndex:n?-1:0,"aria-disabled":n,"data-state":v?"open":"closed","data-disabled":n?"":void 0,className:m("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",Ad[p],t&&"pl-8",!n&&"cursor-pointer",e),onMouseEnter:x,onMouseLeave:R,onKeyDown:C,...i,children:[r,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});Kd.displayName="DropdownSubTrigger";var $d=_.forwardRef(({className:e,sideOffset:t=2,alignOffset:n=-4,collisionPadding:r=8,onMouseEnter:o,onMouseLeave:a,...s},i)=>{let l=_.useContext(Pi);if(!l)throw new Error("DropdownSubContent must be used within DropdownSub");let{open:c,onOpenChange:d,triggerRef:u,parentMenuRef:f}=l,[p,g]=_.useState({top:0,left:0}),[h,v]=_.useState(false),b=_.useRef(null),w=_.useRef(null);_.useEffect(()=>{v(true);},[]),_.useEffect(()=>{if(!c||!u.current||!b.current)return;(()=>{if(!u.current||!b.current)return;let y=u.current.getBoundingClientRect(),N=b.current.getBoundingClientRect(),T=window.innerWidth,k=window.innerHeight,E=y.top+n,M=y.right+t;M+N.width>T-r&&(M=y.left-N.width-t),E+N.height>k-r&&(E=k-N.height-r),E<r&&(E=r),g({top:E,left:M});})();},[c,t,n,r,u]);let x=C=>{o?.(C),w.current&&(clearTimeout(w.current),w.current=null),d(true);},R=C=>{a?.(C);let y=C.relatedTarget;u.current?.contains(y)||f?.current?.contains(y)||(w.current=setTimeout(()=>{d(false);},100));};return _.useEffect(()=>()=>{w.current&&clearTimeout(w.current);},[]),!h||!c?null:Oa.createPortal(jsx("div",{ref:C=>{b.current=C,typeof i=="function"?i(C):i&&(i.current=C);},role:"menu","data-state":c?"open":"closed",className:m("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:R,...s}),document.body)});$d.displayName="DropdownSubContent";var X0=Ei;var Wd=_.createContext(null),Li=()=>{let e=_.useContext(Wd);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]=_.useState(n),s=t!==void 0,i=s?t:o,l=_.useRef(null),c=_.useId(),d=_.useCallback(u=>{s||a(u),r?.(u);},[s,r]);return jsx(Wd.Provider,{value:{open:i,onOpenChange:d,triggerRef:l,contentId:c},children:e})};ot.displayName="Popover";var qn=_.forwardRef(({children:e,onClick:t,asChild:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i,contentId:l}=Li(),c=f=>{t?.(f),s(!a);},d=f=>{i.current=f,typeof o=="function"?o(f):o&&(o.current=f);},u={"aria-expanded":a,"aria-haspopup":"dialog","aria-controls":a?l:void 0,onClick:c,...r};return n&&_.isValidElement(e)?_.cloneElement(e,{...u,ref:d,onClick:f=>{e.props.onClick?.(f),c(f);}}):jsx("button",{ref:d,type:"button",...u,children:e})});qn.displayName="PopoverTrigger";var an=_.forwardRef(({children:e,...t},n)=>{let{triggerRef:r}=Li();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=_.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,...u},f)=>{let{open:p,onOpenChange:g,triggerRef:h,contentId:v}=Li(),[b,w]=_.useState({top:0,left:0}),[x,R]=_.useState(false),[C,y]=_.useState(null);if(_.useEffect(()=>{R(true);},[]),_.useEffect(()=>{if(!p||!h.current||!C)return;let T=()=>{if(!h.current||!C)return;let k=h.current.getBoundingClientRect(),E=C.getBoundingClientRect(),M=0,P=0;switch(n){case "top":M=k.top-E.height-r;break;case "bottom":M=k.bottom+r;break;case "left":P=k.left-E.width-r;break;case "right":P=k.right+r;break}if(n==="top"||n==="bottom")switch(o){case "start":P=k.left+a;break;case "center":P=k.left+k.width/2-E.width/2;break;case "end":P=k.right-E.width-a;break}else switch(o){case "start":M=k.top+a;break;case "center":M=k.top+k.height/2-E.height/2;break;case "end":M=k.bottom-E.height-a;break}w({top:M,left:P});};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]),_.useEffect(()=>{if(!p)return;let T=k=>{let E=k.target;C&&C.contains(E)||h.current&&h.current.contains(E)||E.closest?.("[data-dropdown-content], [data-popover-content]")||(s?.(),g(false));};return document.addEventListener("mouseup",T),()=>document.removeEventListener("mouseup",T)},[p,g,s,h,C]),_.useEffect(()=>{if(!p)return;let T=k=>{k.key==="Escape"&&(i?.(),g(false));};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[p,g,i]),!x||!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 Oa.createPortal(jsx("div",{ref:T=>{y(k=>k!==T?T:k),typeof f=="function"?f(T):f&&(f.current=T);},id:v,role:"dialog","data-state":p?"open":"closed","data-side":n,className:m("fixed z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",N,e),style:{...t,top:b.top,left:b.left},...u,children:d}),document.body)});at.displayName="PopoverContent";var jd=_.createContext(null),Di=()=>{let e=_.useContext(jd);if(!e)throw new Error("Tabs components must be used within a Tabs");return e},_d=_.forwardRef(({className:e,value:t,defaultValue:n="",onValueChange:r,variant:o="solid",radius:a="md",orientation:s="horizontal",children:i,...l},c)=>{let[d,u]=_.useState(n),f=t!==void 0,p=f?t:d,g=h=>{f||u(h),r?.(h);};return jsx(jd.Provider,{value:{value:p,onValueChange:g,variant:o,radius:a,orientation:s},children:jsx("div",{ref:c,"data-orientation":s,className:m(s==="vertical"&&"flex gap-4",e),...l,children:i})})});_d.displayName="Tabs";var Si={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"}},Yd=_.forwardRef(({className:e,children:t,...n},r)=>{let{variant:o,radius:a,orientation:s,value:i}=Di(),l=_.useRef(null),[c,d]=_.useState({opacity:0});_.useEffect(()=>{let g=l.current;if(!g)return;let h=()=>{let b=g.querySelector('[data-state="active"]');if(b){let w=g.getBoundingClientRect(),x=b.getBoundingClientRect(),R=s==="vertical";o==="underline"?d(R?{width:2,height:x.height,transform:`translateY(${x.top-w.top}px)`,opacity:1}:{width:x.width,height:2,transform:`translateX(${x.left-w.left}px)`,opacity:1}):o==="solid"&&d(R?{width:x.width,height:x.height,transform:`translateY(${x.top-w.top}px)`,opacity:1}:{width:x.width,height:x.height,transform:`translateX(${x.left-w.left}px)`,opacity:1});}};h();let v=new ResizeObserver(h);return v.observe(g),()=>{v.disconnect();}},[o,s,i]);let u={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:m("relative inline-flex h-9 items-center justify-center text-muted-foreground",f&&"flex-col h-auto w-auto",Si[a].list,u[o],e),...n,children:[(o==="solid"||o==="underline")&&jsx("span",{className:m("absolute transition-all duration-200 ease-out",Si[a].indicator,p()),style:c,"aria-hidden":"true"}),t]})});Yd.displayName="TabsList";var Xd=_.forwardRef(({className:e,value:t,disabled:n,onClick:r,...o},a)=>{let{value:s,onValueChange:i,variant:l,radius:c}=Di(),d=s===t,u={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:m("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",Si[c].trigger,u[l],e),onClick:f=>{r?.(f),i(t);},...o})});Xd.displayName="TabsTrigger";var qd=_.forwardRef(({className:e,value:t,children:n,...r},o)=>{let{value:a}=Di(),s=a===t;return s?jsx("div",{ref:o,role:"tabpanel","data-state":s?"active":"inactive",className:m("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});qd.displayName="TabsContent";var Zd=[{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 Z0(e,t=Zd){return e?t.filter(r=>r.test(e)).length/t.length:0}function Q0(e){return e<.4?"bg-red-500":e<.7?"bg-yellow-500":"bg-green-500"}function J0(e){return e<.4?"Weak":e<.7?"Medium":"Strong"}var Bo=0,Hi=null;function Gt(){Bo===0&&(Hi=document.body.style.overflow,document.body.style.overflow="hidden"),Bo++;}function Ut(){Bo--,Bo<=0&&(Bo=0,document.body.style.overflow=Hi??"",Hi=null);}var Jd=_.createContext(null),za=()=>{let e=_.useContext(Jd);if(!e)throw new Error("Sheet components must be used within a Sheet");return e},eu=({open:e,defaultOpen:t=false,onOpenChange:n,children:r})=>{let[o,a]=_.useState(t),s=e!==void 0,i=s?e:o,l=_.useCallback(c=>{s||a(c),n?.(c);},[s,n]);return jsx(Jd.Provider,{value:{open:i,onOpenChange:l},children:r})};eu.displayName="Sheet";var tu=_.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=za();return jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(true);},...n,children:t})});tu.displayName="SheetTrigger";var nu=_.forwardRef(({onClick:e,children:t,...n},r)=>{let{onOpenChange:o}=za();return jsx("button",{ref:r,type:"button",onClick:s=>{e?.(s),o(false);},...n,children:t})});nu.displayName="SheetClose";var Vi=({children:e,container:t})=>{let[n,r]=_.useState(false);return _.useEffect(()=>{r(true);},[]),n?Oa.createPortal(e,t||document.body):null};Vi.displayName="SheetPortal";var ru=_.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=za();return r?jsx("div",{ref:n,className:m("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});ru.displayName="SheetOverlay";var ou=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"}}),nR=(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],au=_.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:r,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c}=za(),[d,u]=_.useState(false),[,f]=_.useState(false);return _.useEffect(()=>{if(l)u(true),f(true),Gt();else {f(true);let p=setTimeout(()=>{u(false),f(false);},300);return ()=>clearTimeout(p)}return ()=>{Ut();}},[l]),_.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(Vi,{children:[jsx("div",{className:m("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:m(ou({side:e}),nR(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,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]}),n]})]})});au.displayName="SheetContent";var su=({className:e,...t})=>jsx("div",{className:m("flex flex-col space-y-2 text-center sm:text-left",e),...t});su.displayName="SheetHeader";var iu=({className:e,...t})=>jsx("div",{className:m("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});iu.displayName="SheetFooter";var lu=_.forwardRef(({className:e,...t},n)=>jsx("h2",{ref:n,className:m("text-lg font-semibold text-foreground",e),...t}));lu.displayName="SheetTitle";var cu=_.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:m("text-sm text-muted-foreground",e),...t}));cu.displayName="SheetDescription";var aR=({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 du=_.createContext(null),Ba=()=>{let e=_.useContext(du);if(!e)throw new Error("ContextMenu components must be used within a ContextMenu");return e},Ai=_.createContext(null),uu=({children:e,onOpenChange:t})=>{let[n,r]=_.useState(false),[o,a]=_.useState({x:0,y:0}),s=_.useId(),i=_.useCallback(l=>{r(l),t?.(l);},[t]);return jsx(du.Provider,{value:{open:n,onOpenChange:i,position:o,setPosition:a,contentId:s},children:e})};uu.displayName="ContextMenu";var mu=_.forwardRef(({children:e,onContextMenu:t,...n},r)=>{let{onOpenChange:o,setPosition:a}=Ba(),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})});mu.displayName="ContextMenuTrigger";var pu=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));pu.displayName="ContextMenuGroup";var fu=({children:e,container:t})=>{let[n,r]=_.useState(false);return _.useEffect(()=>{r(true);},[]),n?Oa.createPortal(e,t||document.body):null};fu.displayName="ContextMenuPortal";var gu=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=_.useState(n),s=t!==void 0,i=s?t:o,l=_.useRef(null),c=_.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(Ai.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};gu.displayName="ContextMenuSub";var bu=_.forwardRef(({className:e,onInteractOutside:t,onEscapeKeyDown:n,children:r,...o},a)=>{let{open:s,onOpenChange:i,position:l,contentId:c}=Ba(),[d,u]=_.useState(false),[f,p]=_.useState(l),g=_.useRef(null);return _.useEffect(()=>{u(true);},[]),_.useEffect(()=>{if(!s||!g.current){p(l);return}let v=g.current.getBoundingClientRect(),{x:b,y:w}=l;b+v.width>window.innerWidth&&(b=window.innerWidth-v.width-8),w+v.height>window.innerHeight&&(w=window.innerHeight-v.height-8),p({x:b,y:w});},[s,l]),_.useEffect(()=>{if(!s)return;let h=v=>{let b=v.target;g.current&&!g.current.contains(b)&&(t?.(),i(false));};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[s,i,t]),_.useEffect(()=>{if(!s)return;let h=v=>{v.key==="Escape"&&(n?.(),i(false));};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[s,i,n]),!d||!s?null:Oa.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:m("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)});bu.displayName="ContextMenuContent";var vu=_.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let i=_.useContext(Ai);if(!i)throw new Error("ContextMenuSubTrigger must be used within ContextMenuSub");let{open:l,onOpenChange:c,triggerRef:d}=i,u=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:m("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:u,onMouseLeave:f,...a,children:[n,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});vu.displayName="ContextMenuSubTrigger";var hu=_.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let s=_.useContext(Ai);if(!s)throw new Error("ContextMenuSubContent must be used within ContextMenuSub");let{open:i,onOpenChange:l,triggerRef:c}=s,[d,u]=_.useState({top:0,left:0}),[f,p]=_.useState(false),g=_.useRef(null);_.useEffect(()=>{p(true);},[]),_.useEffect(()=>{if(!i||!c.current||!g.current)return;(()=>{if(!c.current||!g.current)return;let w=c.current.getBoundingClientRect(),x=g.current.getBoundingClientRect(),R=w.top,C=w.right+t;C+x.width>window.innerWidth&&(C=w.left-x.width-t),u({top:R,left:C});})();},[i,t,c]);let h=b=>{n?.(b),l(true);},v=b=>{r?.(b),l(false);};return !f||!i?null:Oa.createPortal(jsx("div",{ref:b=>{g.current=b,typeof a=="function"?a(b):a&&(a.current=b);},role:"menu","data-state":i?"open":"closed",className:m("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:v,...o}),document.body)});hu.displayName="ContextMenuSubContent";var xu=_.forwardRef(({className:e,inset:t,disabled:n,onSelect:r,onClick:o,...a},s)=>{let{onOpenChange:i}=Ba(),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:m("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})});xu.displayName="ContextMenuItem";var yu=_.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{onOpenChange:l}=Ba(),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:m("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]})});yu.displayName="ContextMenuCheckboxItem";var Ru=_.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:m("px-2 py-1.5 text-xs font-medium text-muted-foreground",t&&"pl-8",e),...n}));Ru.displayName="ContextMenuSection";var wu=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:m("-mx-1 my-1 h-px bg-border",e),...t}));wu.displayName="ContextMenuSeparator";var Cu=({className:e,...t})=>jsx("span",{className:m("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Cu.displayName="ContextMenuShortcut";var Mu=_.createContext(null),dR=()=>{let e=_.useContext(Mu);if(!e)throw new Error("RadioGroupItem must be used within a RadioGroup");return e},Nu=_.forwardRef(({className:e,value:t,defaultValue:n="",onValueChange:r,name:o,disabled:a,required:s,orientation:i="vertical",children:l,...c},d)=>{let[u,f]=_.useState(n),p=t!==void 0,g=p?t:u,h=_.useId(),v=b=>{p||f(b),r?.(b);};return jsx("div",{ref:d,role:"radiogroup","aria-required":s,"aria-orientation":i,className:m(i==="vertical"?"grid gap-2":"flex gap-4",e),...c,children:jsx(Mu.Provider,{value:{name:o||h,value:g,onValueChange:v,disabled:a,required:s},children:l})})});Nu.displayName="RadioGroup";var ku=_.forwardRef(({className:e,value:t,disabled:n,...r},o)=>{let a=dR(),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:m("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}})]})});ku.displayName="RadioGroupItem";var Ka=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"}}),Pu=_.forwardRef(({className:e,variant:t,size:n,pressed:r,defaultPressed:o=false,onPressedChange:a,disabled:s,onKeyDown:i,...l},c)=>{let[d,u]=_.useState(o),f=r!==void 0,p=f?r:d,g=()=>{if(s)return;let v=!p;f||u(v),a?.(v);},h=v=>{v.key==="Enter"&&v.preventDefault(),i?.(v);};return jsx("button",{type:"button","aria-pressed":p,"data-state":p?"on":"off",disabled:s,ref:c,className:m(Ka({variant:t,size:n,className:e})),onClick:g,onKeyDown:h,...l})});Pu.displayName="Toggle";var Eu=_.createContext(null),gR=()=>{let e=_.useContext(Eu);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e},Lu=_.forwardRef(({className:e,variant:t,size:n,type:r,value:o,defaultValue:a,onValueChange:s,disabled:i,children:l,...c},d)=>{let[u,f]=_.useState(()=>r==="single"?a?[a]:[]:a||[]),p=o!==void 0,g=p?r==="single"?o?[o]:[]:o:u,h=v=>{if(r==="single"){let b=g.includes(v)?[]:[v];p||f(b),s?.(b[0]||"");}else {let b=g.includes(v)?g.filter(w=>w!==v):[...g,v];p||f(b),s?.(b);}};return jsx("div",{ref:d,role:"group",className:m("flex items-center justify-center gap-1",e),...c,children:jsx(Eu.Provider,{value:{type:r,variant:t,size:n,value:g,onValueChange:h,disabled:i},children:l})})});Lu.displayName="ToggleGroup";var Su=_.forwardRef(({className:e,children:t,variant:n,size:r,value:o,disabled:a,...s},i)=>{let l=gR(),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:m(Ka({variant:l.variant||n,size:l.size||r}),e),onClick:()=>l.onValueChange(o),...s,children:t})});Su.displayName="ToggleGroupItem";var Ga=_.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,...u},f)=>{let[p,g]=_.useState(n),h=t!==void 0,v=h?t:p,b=_.useRef(null),[w,x]=_.useState(false),[R,C]=_.useState(null),y=(H,D)=>{if(!b.current)return v[0];let L=b.current.getBoundingClientRect(),V;c==="horizontal"?V=(H-L.left)/L.width:V=1-(D-L.top)/L.height,V=Math.max(0,Math.min(1,V));let A=a+V*(s-a),B=Math.round(A/i)*i;return Math.max(a,Math.min(s,B))},N=(H,D)=>{let L=[...v];L[D]=H,D>0&&H<v[D-1]&&(L[D]=v[D-1]),D<v.length-1&&H>v[D+1]&&(L[D]=v[D+1]),h||g(L),r?.(L);},T=(H,D)=>{l||(H.preventDefault(),x(true),C(D),H.target.setPointerCapture(H.pointerId));},k=H=>{if(!w||R===null||l)return;let D=y(H.clientX,H.clientY);N(D,R);},E=()=>{w&&(x(false),C(null),o?.(v));},M=H=>{if(l)return;let D=y(H.clientX,H.clientY),L=0,V=Math.abs(v[0]-D);for(let A=1;A<v.length;A++){let B=Math.abs(v[A]-D);B<V&&(V=B,L=A);}N(D,L),o?.([...v.slice(0,L),D,...v.slice(L+1)]);},P=(H,D)=>{if(l)return;let L=v[D];switch(H.key){case "ArrowRight":case "ArrowUp":H.preventDefault(),L=Math.min(s,v[D]+i);break;case "ArrowLeft":case "ArrowDown":H.preventDefault(),L=Math.max(a,v[D]-i);break;case "Home":H.preventDefault(),L=a;break;case "End":H.preventDefault(),L=s;break;default:return}N(L,D),o?.([...v.slice(0,D),L,...v.slice(D+1)]);},S=H=>(H-a)/(s-a)*100;return jsxs("div",{ref:f,className:m("relative flex touch-none select-none items-center",c==="vertical"&&"flex-col h-full w-5",l&&"opacity-50 pointer-events-none",e),...u,children:[jsx("div",{ref:b,className:m("relative grow overflow-hidden rounded-full bg-secondary",c==="horizontal"?"h-2 w-full":"h-full w-2"),onClick:M,children:jsx("div",{className:"absolute bg-primary",style:c==="horizontal"?{left:v.length>1?`${S(v[0])}%`:0,right:`${100-S(v[v.length-1])}%`,top:0,bottom:0}:{bottom:v.length>1?`${S(v[0])}%`:0,top:`${100-S(v[v.length-1])}%`,left:0,right:0}})}),v.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:m("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",w&&R===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:k,onPointerUp:E,onPointerCancel:E,onKeyDown:L=>P(L,D)},D)),d&&v.map((H,D)=>jsx("input",{type:"hidden",name:v.length>1?`${d}[${D}]`:d,value:H},D))]})});Ga.displayName="Slider";var Du=_.createContext(null),Hu=()=>{let e=_.useContext(Du);if(!e)throw new Error("AccordionItem must be used within an Accordion");return e},Oi=_.createContext(null),Iu=()=>{let e=_.useContext(Oi);if(!e)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return e},Vu=_.forwardRef(({className:e,type:t="multiple",value:n,defaultValue:r,onValueChange:o,collapsible:a=true,disabled:s,children:i,...l},c)=>{let[d,u]=_.useState(()=>t==="single"?r?[r]:[]:r||[]),f=_.useRef(new Map),p=_.useRef([]),g=n!==void 0,h=g?t==="single"?n?[n]:[]:n:d,v=R=>{if(t==="single"){let y=h.includes(R)&&a?[]:[R];g||u(y),o?.(y[0]||"");}else {let C=h.includes(R)?h.filter(y=>y!==R):[...h,R];g||u(C),o?.(C);}},b=_.useCallback((R,C)=>{f.current.set(R,C),p.current.includes(R)||p.current.push(R);},[]),w=_.useCallback(R=>{f.current.delete(R),p.current=p.current.filter(C=>C!==R);},[]),x=_.useCallback(R=>{let C=p.current;if(C.length===0)return;let y=document.activeElement,N;f.current.forEach((P,S)=>{P===y&&(N=S);});let T=N?C.indexOf(N):-1,k;switch(R){case "first":k=0;break;case "last":k=C.length-1;break;case "next":k=T===-1?0:(T+1)%C.length;break;case "prev":k=T===-1?C.length-1:(T-1+C.length)%C.length;break}let E=C[k];f.current.get(E)?.focus();},[]);return jsx(Du.Provider,{value:{type:t,value:h,onValueChange:v,collapsible:a,disabled:s,registerTrigger:b,unregisterTrigger:w,focusTrigger:x},children:jsx("div",{ref:c,"data-orientation":"vertical",className:m("w-full",e),...l,children:i})})});Vu.displayName="Accordion";var Au=_.forwardRef(({className:e,value:t,disabled:n,title:r,subtitle:o,startContent:a,children:s,...i},l)=>{let c=Hu(),d=c.value.includes(t),u=n||c.disabled||false,f=_.useId(),p=_.useId();return r!==void 0?jsx(Oi.Provider,{value:{value:t,isOpen:d,isDisabled:u,contentId:f,triggerId:p},children:jsxs("div",{ref:l,"data-state":d?"open":"closed","data-disabled":u?"":void 0,className:m("border-b",u&&"opacity-50",e),...i,children:[jsx(zu,{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(Ou,{children:s})]})}):jsx(Oi.Provider,{value:{value:t,isOpen:d,isDisabled:u,contentId:f,triggerId:p},children:jsx("div",{ref:l,"data-state":d?"open":"closed","data-disabled":u?"":void 0,className:m("border-b",u&&"opacity-50",e),...i,children:s})})});Au.displayName="AccordionItem";var zu=_.forwardRef(({className:e,children:t,onClick:n,onKeyDown:r,...o},a)=>{let s=Hu(),{value:i,isOpen:l,isDisabled:c,contentId:d,triggerId:u}=Iu(),f=_.useRef(null);_.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:u,"aria-controls":d,"aria-expanded":l,disabled:c,"data-state":l?"open":"closed",className:m("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"})]})})});zu.displayName="AccordionTrigger";var Ou=_.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{isOpen:a,contentId:s,triggerId:i,isDisabled:l}=Iu();return jsx("div",{ref:o,id:s,role:"region","aria-labelledby":i,"data-state":a?"open":"closed","data-disabled":l?"":void 0,className:m("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})})})});Ou.displayName="AccordionContent";var Fu=_.createContext(null),Ku=()=>{let e=_.useContext(Fu);if(!e)throw new Error("Collapsible components must be used within a Collapsible");return e},$u=_.forwardRef(({className:e,open:t,defaultOpen:n=false,onOpenChange:r,disabled:o,title:a,children:s,...i},l)=>{let[c,d]=_.useState(n),u=t!==void 0,f=u?t:c,p=_.useId(),g=_.useId(),h=v=>{o||(u||d(v),r?.(v));};return jsx(Fu.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:m("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(Bi,{})]}),s]})})});$u.displayName="Collapsible";var Bi=_.forwardRef(({className:e,children:t,onClick:n,...r},o)=>{let{open:a,onOpenChange:s,disabled:i,contentId:l,triggerId:c}=Ku();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:m("h-4 w-4 transition-transform duration-200",a&&"rotate-180")})})});Bi.displayName="CollapsibleTrigger";var Gu=_.forwardRef(({className:e,children:t,style:n,...r},o)=>{let{open:a,contentId:s,triggerId:i,disabled:l}=Ku(),c=_.useRef(null),[d,u]=_.useState(0),[f,p]=_.useState(false),[g,h]=_.useState(a);_.useEffect(()=>{a?(h(true),u(0),p(true),requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.current&&u(c.current.scrollHeight);});})):(p(true),c.current?(u(c.current.scrollHeight),requestAnimationFrame(()=>{u(0);})):u(0));},[a]);let v=()=>{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:m("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:v,...r,children:jsx("div",{ref:c,className:"space-y-2",children:t})}):null});Gu.displayName="CollapsibleContent";var ja=_.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:m("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:m("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}%)`}})})]})});ja.displayName="Progress";var _u=_.createContext(null),Yu=()=>{let e=_.useContext(_u);if(!e)throw new Error("HoverCard components must be used within a HoverCard");return e},Xu=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,openDelay:o=700,closeDelay:a=300,closeOnScroll:s=true})=>{let[i,l]=_.useState(n),c=t!==void 0,d=c?t:i,u=_.useRef(null),f=_.useId(),p=_.useRef(null),g=_.useRef(null),h=_.useCallback(v=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),v?p.current=setTimeout(()=>{c||l(true),r?.(true);},o):g.current=setTimeout(()=>{c||l(false),r?.(false);},a);},[c,r,o,a]);return _.useEffect(()=>{if(!s||!d)return;let v=()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current),c||l(false),r?.(false);};return window.addEventListener("scroll",v,true),()=>window.removeEventListener("scroll",v,true)},[s,d,c,r]),_.useEffect(()=>()=>{p.current&&clearTimeout(p.current),g.current&&clearTimeout(g.current);},[]),jsx(_u.Provider,{value:{open:d,onOpenChange:h,triggerRef:u,contentId:f},children:e})};Xu.displayName="HoverCard";var qu=_.forwardRef(({children:e,onMouseEnter:t,onMouseLeave:n,onFocus:r,onBlur:o,...a},s)=>{let{onOpenChange:i,triggerRef:l}=Yu();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})});qu.displayName="HoverCardTrigger";var Zu=_.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:u,triggerRef:f,contentId:p}=Yu(),[g,h]=_.useState({top:0,left:0}),[v,b]=_.useState(false),w=_.useRef(null);_.useEffect(()=>{b(true);},[]),_.useEffect(()=>{if(!d||!f.current||!w.current)return;(()=>{if(!f.current||!w.current)return;let N=f.current.getBoundingClientRect(),T=w.current.getBoundingClientRect(),k=0,E=0;switch(t){case "top":k=N.top-T.height-n;break;case "bottom":k=N.bottom+n;break;case "left":E=N.left-T.width-n;break;case "right":E=N.right+n;break}if(t==="top"||t==="bottom")switch(r){case "start":E=N.left+o;break;case "center":E=N.left+N.width/2-T.width/2;break;case "end":E=N.right-T.width-o;break}else switch(r){case "start":k=N.top+o;break;case "center":k=N.top+N.height/2-T.height/2;break;case "end":k=N.bottom-T.height-o;break}h({top:k,left:E});})();},[d,t,n,r,o,f]);let x=y=>{a?.(y),u(true);},R=y=>{s?.(y),u(false);};if(!v||!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 Oa.createPortal(jsx("div",{ref:y=>{w.current=y,typeof c=="function"?c(y):c&&(c.current=y);},id:p,"data-state":d?"open":"closed","data-side":t,className:m("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:R,...l,children:i}),document.body)});Zu.displayName="HoverCardContent";var Qu=_.createContext({size:"md",variant:"default",radius:"md"}),Ya=()=>_.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 RR=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-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",variant:"default",radius:"md"}}),wR=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"}}),CR=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"}}),Ju=_.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})}));Ju.displayName="Breadcrumb";var em=_.forwardRef(({className:e,...t},n)=>{let{size:r,variant:o,radius:a}=Ya();return jsx("ol",{ref:n,className:m(RR({size:r,variant:o,radius:o==="default"?void 0:a}),e),...t})});em.displayName="BreadcrumbList";var tm=_.forwardRef(({className:e,...t},n)=>{let{size:r}=Ya();return jsx("li",{ref:n,className:m("inline-flex items-center",r==="sm"&&"gap-1",r==="md"&&"gap-1.5",r==="lg"&&"gap-2",e),...t})});tm.displayName="BreadcrumbItem";var nm=_.forwardRef(({className:e,...t},n)=>jsx("a",{ref:n,className:m("transition-colors hover:text-foreground cursor-pointer",e),...t}));nm.displayName="BreadcrumbLink";var rm=_.forwardRef(({className:e,...t},n)=>jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:m("font-medium text-foreground",e),...t}));rm.displayName="BreadcrumbPage";var om=({children:e,className:t,...n})=>{let{size:r}=Ya();return jsx("li",{role:"presentation","aria-hidden":"true",className:m(wR({size:r}),"text-muted-foreground/60",t),...n,children:e??jsx(ChevronRight,{})})};om.displayName="BreadcrumbSeparator";var am=({className:e,...t})=>{let{size:n}=Ya();return jsxs("span",{role:"presentation","aria-hidden":"true",className:m(CR({size:n}),e),...t,children:[jsx(MoreHorizontal,{}),jsx("span",{className:"sr-only",children:"More"})]})};am.displayName="BreadcrumbEllipsis";var lm=_.forwardRef(({ratio:e=1,className:t,style:n,children:r,...o},a)=>jsx("div",{ref:a,className:m("relative w-full",t),style:{...n,paddingBottom:`${100/e}%`},...o,children:jsx("div",{className:"absolute inset-0",children:r})}));lm.displayName="AspectRatio";var um=_.createContext(null),Ki=()=>{let e=_.useContext(um);if(!e)throw new Error("NavigationMenu components must be used within a NavigationMenu");return e},mm=_.createContext(null),pm=()=>{let e=_.useContext(mm);if(!e)throw new Error("NavigationMenuItem components must be used within a NavigationMenuItem");return e},fm=_.forwardRef(({className:e,orientation:t="horizontal",children:n,...r},o)=>{let[a,s]=_.useState(null);return jsx(um.Provider,{value:{activeItem:a,setActiveItem:s,orientation:t},children:jsxs("nav",{ref:o,className:m("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...r,children:[n,jsx($i,{})]})})});fm.displayName="NavigationMenu";var gm=_.forwardRef(({className:e,...t},n)=>{let{orientation:r}=Ki();return jsx("ul",{ref:n,className:m("group flex flex-1 list-none items-center justify-center gap-1",r==="vertical"&&"flex-col items-start",e),...t})});gm.displayName="NavigationMenuList";var bm=_.forwardRef(({className:e,children:t,...n},r)=>{let{activeItem:o,setActiveItem:a}=Ki(),s=_.useId(),i=_.useRef(null),l=o===s,c=_.useCallback(d=>{a(d?s:null);},[s,a]);return jsx(mm.Provider,{value:{itemId:s,triggerRef:i,open:l,onOpenChange:c},children:jsx("li",{ref:r,className:m("relative",e),...n,children:t})})});bm.displayName="NavigationMenuItem";var vm=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"),hm=_.forwardRef(({className:e,children:t,onMouseEnter:n,onClick:r,...o},a)=>{let{triggerRef:s,open:i,onOpenChange:l}=pm(),c=u=>{n?.(u),l(true);},d=u=>{r?.(u),l(!i);};return jsxs("button",{ref:u=>{s.current=u,typeof a=="function"?a(u):a&&(a.current=u);},type:"button","data-state":i?"open":"closed",className:m(vm(),"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"})]})});hm.displayName="NavigationMenuTrigger";var xm=_.forwardRef(({className:e,onMouseEnter:t,onMouseLeave:n,...r},o)=>{let{open:a,onOpenChange:s,triggerRef:i}=pm(),l=_.useRef(null),[c,d]=_.useState({top:0,left:0});_.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 u=p=>{t?.(p),s(true);},f=p=>{n?.(p),s(false);};return a?Oa.createPortal(jsx("div",{ref:p=>{l.current=p,typeof o=="function"?o(p):o&&(o.current=p);},"data-state":a?"open":"closed",className:m("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:u,onMouseLeave:f,...r}),document.body):null});xm.displayName="NavigationMenuContent";var ym=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"),Rm=_.forwardRef(({className:e,active:t,...n},r)=>jsx("a",{ref:r,className:m(ym(),t&&"bg-accent text-accent-foreground",e),...n}));Rm.displayName="NavigationMenuLink";var $i=_.forwardRef((e,t)=>null);$i.displayName="NavigationMenuViewport";var wm=_.forwardRef(({className:e,...t},n)=>{let{activeItem:r}=Ki();return r?jsx("div",{ref:n,className:m("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});wm.displayName="NavigationMenuIndicator";var Nm=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"}}),Mt=_.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:m(Nm({size:t}),e),"aria-label":"Close",...n,children:jsx(X,{style:{width:a,height:a}})})});Mt.displayName="CloseButton";var Xa=_.createContext(null);function IR(){let e=_.useContext(Xa);if(!e)throw new Error("useDrawer must be used within a DrawerProvider.");return e}function kn(){return _.useContext(Xa)}var VR="16rem",AR="18rem",zR="3rem",OR="b",BR={xs:"256px",sm:"320px",md:"384px",lg:"448px",xl:"512px","2xl":"576px","3xl":"672px","4xl":"768px","5xl":"896px",full:"100%"},FR={xs:"20vh",sm:"30vh",md:"40vh",lg:"50vh",xl:"60vh","2xl":"70vh","3xl":"75vh","4xl":"80vh","5xl":"90vh",full:"100vh"},Gi=_.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:u,children:f,...p},g)=>{let h=c??"overlay",v=h==="overlay",[b,w]=_.useState(false),[x,R]=_.useState(false),[C,y]=_.useState(e),N=t??C,T=_.useCallback(P=>{let S=typeof P=="function"?P(N):P;n?n(S):y(S);},[n,N]);_.useEffect(()=>{let P=()=>{w(window.innerWidth<768);};return P(),window.addEventListener("resize",P),()=>window.removeEventListener("resize",P)},[]);let k=_.useCallback(()=>v?T(P=>!P):b?R(P=>!P):T(P=>!P),[b,T,R,v]);_.useEffect(()=>{if(v)return;let P=S=>{S.key===OR&&(S.metaKey||S.ctrlKey)&&(S.preventDefault(),k());};return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)},[k,v]);let E=N?"expanded":"collapsed",M=_.useMemo(()=>({placement:r,state:E,open:N,setOpen:T,isMobile:b,openMobile:x,setOpenMobile:R,toggleDrawer:k,collapsible:l,mode:h,size:o,backdrop:a,isDismissable:s,hideCloseButton:i}),[r,E,N,T,b,x,R,k,l,h,o,a,s,i]);return v?jsx(Xa.Provider,{value:M,children:jsx(Drawer.Root,{open:N,onOpenChange:T,direction:r,dismissible:s,children:f})}):jsx(Xa.Provider,{value:M,children:jsx(jn,{delayDuration:0,children:jsx("div",{ref:g,style:{"--drawer-width":VR,"--drawer-width-icon":zR,...u},className:m("group/drawer-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-muted/50",d),...p,children:f})})})});Gi.displayName="Drawer";var Pm=_.forwardRef(({variant:e="default",embedded:t=false,className:n,children:r,...o},a)=>{let s=kn();if(!s)return jsx("div",{ref:a,className:m("flex h-full flex-col bg-background text-foreground",n),...o,children:r});let{placement:i,collapsible:l,isMobile:c,state:d,openMobile:u,setOpenMobile:f}=s;if(i==="bottom"||i==="top")return jsx(Fragment,{children:r});if(l==="none")return jsx("div",{ref:a,className:m("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(KR,{open:u,onOpenChange:f,placement:i,children:r});if(t){let g=d==="collapsed",h=l==="offcanvas",v=l==="icon";return jsx("div",{ref:a,className:m("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:m("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":v&&g?"w-[--drawer-width-icon]":"w-[--drawer-width]",n),...o,children:jsx("div",{"data-drawer":"drawer",className:m("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:m("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:m("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:m("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})})]})});Pm.displayName="DrawerSidebar";var KR=({children:e,open:t,onOpenChange:n,placement:r})=>{let[o,a]=_.useState(false);return _.useEffect(()=>{a(true);},[]),_.useEffect(()=>{if(t)return Gt(),()=>Ut()},[t]),!o||!t?null:Oa.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:m("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":AR},children:jsx("div",{className:"flex h-full w-full flex-col",children:e})})]}),document.body)},Em=_.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:m("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"})]})});Em.displayName="DrawerTrigger";var Lm=_.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",u=d?BR[i]:FR[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:m("fixed inset-0 z-50",f[l])}),jsxs(Drawer.Content,{ref:r,className:m("fixed z-50 flex flex-col border bg-background",p[s],e),style:{...d?{width:u,height:"100%"}:{},...c?{maxHeight:u}:{},...n.style},...n,children:[c&&jsx("div",{className:m("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:m("flex flex-col h-full",e),...n,children:t})});Lm.displayName="DrawerContent";var Sm=_.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:m("flex flex-col gap-2 p-4 relative",e),...r,children:[n,i&&jsx(Mt,{className:"absolute right-4 top-4",onClick:()=>a?.setOpen(false)})]})});Sm.displayName="DrawerHeader";var Dm=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"body",className:m("flex min-h-0 flex-1 flex-col gap-2 overflow-auto p-4 group-data-[collapsible=icon]:overflow-hidden",e),...t}));Dm.displayName="DrawerBody";var Hm=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"footer",className:m("flex flex-col gap-2 p-4 mt-auto",e),...t}));Hm.displayName="DrawerFooter";var Im=_.forwardRef(({className:e,...t},n)=>kn()?.mode==="overlay"?jsx(Drawer.Title,{ref:n,className:m("text-lg font-semibold leading-none tracking-tight",e),...t}):jsx("h2",{ref:n,className:m("text-lg font-semibold leading-none tracking-tight",e),...t}));Im.displayName="DrawerTitle";var Vm=_.forwardRef(({className:e,...t},n)=>kn()?.mode==="overlay"?jsx(Drawer.Description,{ref:n,className:m("text-sm text-muted-foreground",e),...t}):jsx("p",{ref:n,className:m("text-sm text-muted-foreground",e),...t}));Vm.displayName="DrawerDescription";var Am=_.forwardRef(({className:e,onClick:t,...n},r)=>{let o=kn();return jsx(Mt,{ref:r,className:e,onClick:a=>{t?.(a),o?.setOpen(false);},...n})});Am.displayName="DrawerClose";var zm=_.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",u=d?PanelLeftOpen:PanelRightOpen,f=d?PanelLeftClose:PanelRightClose;return jsxs("button",{ref:o,type:"button","data-drawer":"toggle","data-state":i,className:m("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(u,{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"})]})});zm.displayName="DrawerToggle";var Om=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"separator",className:m("mx-4 h-px bg-border",e),...t}));Om.displayName="DrawerSeparator";var Bm=_.forwardRef(({className:e,...t},n)=>jsx("ul",{ref:n,"data-drawer":"menu",className:m("flex w-full min-w-0 flex-col gap-1",e),...t}));Bm.displayName="DrawerMenu";var Fm=_.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,"data-drawer":"menu-item",className:m("group/menu-item relative",e),...t}));Fm.displayName="DrawerMenuItem";var Km=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"}}),$m=_.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",u=jsx("button",{ref:i,type:"button","data-drawer":"menu-button","data-size":n,"data-active":e,className:m(Km({variant:t,size:n}),o),...s,children:a});return r?jsxs(_n,{children:[jsx(Yn,{children:u}),jsx(Xn,{side:"right",align:"center",hidden:d!=="collapsed"||c,...typeof r=="string"?{children:r}:r})]}):u});$m.displayName="DrawerMenuButton";var Gm=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"group",className:m("relative flex w-full min-w-0 flex-col p-2",e),...t}));Gm.displayName="DrawerGroup";var Um=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,"data-drawer":"group-label",className:m("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}));Um.displayName="DrawerGroupLabel";var Wm=_.forwardRef(({className:e,...t},n)=>jsx("main",{ref:n,className:m("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));Wm.displayName="DrawerInset";var $R=Gi;var _m=_.forwardRef(({className:e,...t},n)=>jsx("div",{className:"relative w-full overflow-auto",children:jsx("table",{ref:n,className:m("w-full caption-bottom text-sm",e),...t})}));_m.displayName="Table";var Ym=_.forwardRef(({className:e,...t},n)=>jsx("thead",{ref:n,className:m("[&_tr]:border-b",e),...t}));Ym.displayName="TableHeader";var Xm=_.forwardRef(({className:e,...t},n)=>jsx("tbody",{ref:n,className:m("[&_tr:last-child]:border-0",e),...t}));Xm.displayName="TableBody";var qm=_.forwardRef(({className:e,...t},n)=>jsx("tfoot",{ref:n,className:m("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));qm.displayName="TableFooter";var Zm=_.forwardRef(({className:e,...t},n)=>jsx("tr",{ref:n,className:m("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Zm.displayName="TableRow";var Qm=_.forwardRef(({className:e,...t},n)=>jsx("th",{ref:n,className:m("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Qm.displayName="TableHead";var Jm=_.forwardRef(({className:e,...t},n)=>jsx("td",{ref:n,className:m("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Jm.displayName="TableCell";var ep=_.forwardRef(({className:e,...t},n)=>jsx("caption",{ref:n,className:m("mt-4 text-sm text-muted-foreground",e),...t}));ep.displayName="TableCaption";function YR({className:e,data:t,columns:n,selectable:r=false,selectedKeys:o,onSelectionChange:a,getRowKey:s=(R,C)=>String(C),sortable:i=false,sortState:l,onSortChange:c,paginated:d=false,pageSizeOptions:u=[10,20,50],paginationState:f,onPaginationChange:p,emptyContent:g="No data",loading:h=false,striped:v=false,hoverable:b=true,...w},x){let[R,C]=_.useState(new Set),[y,N]=_.useState({columnId:null,direction:null}),[T,k]=_.useState({pageIndex:0,pageSize:u[0]||10}),E=o??R,M=l??y,P=f??T,S=$=>{a?a($):C($);},H=$=>{c?c($):N($);},D=$=>{p?p($):k($);},L=_.useMemo(()=>{if(!M.columnId||!M.direction)return t;let $=n.find(O=>O.id===M.columnId);return $?[...t].sort((O,W)=>{let z=$.accessor(O),j=$.accessor(W);if(z===j)return 0;if(z==null)return 1;if(j==null)return -1;let oe=String(z).localeCompare(String(j),void 0,{numeric:true});return M.direction==="asc"?oe:-oe}):t},[t,M,n]),V=_.useMemo(()=>{if(!d)return L;let $=P.pageIndex*P.pageSize;return L.slice($,$+P.pageSize)},[L,d,P]),A=Math.ceil(L.length/P.pageSize),B=$=>{if($===true){let O=new Set(V.map((W,z)=>s(W,z)));S(O);}else S(new Set);},I=($,O)=>{let W=new Set(E);O?W.add($):W.delete($),S(W);},F=V.length>0&&V.every(($,O)=>E.has(s($,O))),K=V.some(($,O)=>E.has(s($,O))),Y=$=>{if(!n.find(z=>z.id===$)?.sortable&&!i)return;let W="asc";M.columnId===$&&(M.direction==="asc"?W="desc":M.direction==="desc"&&(W=null)),H({columnId:W?$:null,direction:W});},q=$=>M.columnId!==$?jsx(ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):M.direction==="asc"?jsx(ChevronUp,{className:"h-4 w-4"}):jsx(ChevronDown,{className:"h-4 w-4"});return jsxs("div",{ref:x,className:m("w-full",e),...w,children:[jsx("div",{className:"relative w-full overflow-auto rounded-md border",children:jsxs("table",{className:"w-full caption-bottom text-sm",children:[jsx("thead",{className:"[&_tr]:border-b bg-muted/50",children:jsxs("tr",{children:[r&&jsx("th",{className:"h-12 w-12 px-4",children:jsx(Ao,{checked:F?true:K?"indeterminate":false,onCheckedChange:B,"aria-label":"Select all"})}),n.map($=>{let O=$.sortable??i;return jsx("th",{className:m("h-12 px-4 text-left align-middle font-medium text-muted-foreground",O&&"cursor-pointer select-none hover:text-foreground"),style:{width:$.width},onClick:()=>O&&Y($.id),children:jsxs("div",{className:"flex items-center gap-2",children:[$.header,O&&q($.id)]})},$.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..."})}):V.length===0?jsx("tr",{children:jsx("td",{colSpan:n.length+(r?1:0),className:"h-24 text-center text-muted-foreground",children:g})}):V.map(($,O)=>{let W=s($,O),z=E.has(W);return jsxs("tr",{className:m("border-b transition-colors",b&&"hover:bg-muted/50",v&&O%2===1&&"bg-muted/30",z&&"bg-muted"),"data-state":z?"selected":void 0,children:[r&&jsx("td",{className:"w-12 px-4",children:jsx(Ao,{checked:z,onCheckedChange:j=>I(W,!!j),"aria-label":`Select row ${O+1}`})}),n.map(j=>jsx("td",{className:"p-4 align-middle",children:j.cell?j.cell($,O):j.accessor($)},j.id))]},W)})})]})}),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:P.pageSize,onChange:$=>D({pageIndex:0,pageSize:Number($.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:u.map($=>jsx("option",{value:$,children:$},$))})]}),jsxs("div",{className:"flex items-center gap-2",children:[jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",P.pageIndex+1," of ",A||1]}),jsxs("div",{className:"flex gap-1",children:[jsx(ae,{variant:"light",size:"sm",isIconOnly:true,onClick:()=>D({...P,pageIndex:P.pageIndex-1}),disabled:P.pageIndex===0,"aria-label":"Previous page",children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"light",size:"sm",isIconOnly:true,onClick:()=>D({...P,pageIndex:P.pageIndex+1}),disabled:P.pageIndex>=A-1,"aria-label":"Next page",children:jsx(ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var XR=_.forwardRef(YR);var Ui=["January","February","March","April","May","June","July","August","September","October","November","December"];function nw({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=_.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:m("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:Ui[o]}),jsx(ChevronDown,{className:"h-3 w-3 text-muted-foreground shrink-0"})]})}),jsx(Mn,{className:"min-w-[120px] p-0",children:jsx(De,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:Ui.map((c,d)=>jsx($t,{onSelect:()=>s(d),className:m("text-xs",o===d&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]}),jsxs(Cn,{children:[jsx(Tn,{children:jsxs("div",{className:m("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(De,{className:"h-[200px]",children:jsx("div",{className:"p-1",children:l.map(c=>jsx($t,{onSelect:()=>i(c),className:m("text-xs",a===c&&"bg-primary/10 text-primary font-medium"),children:c},c))})})})]})]})}function rw(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(nw,{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:m("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:m("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=Ui[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:m("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:m("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 no({className:e,classNames:t,showOutsideDays:n=true,showMonthAndYearPickers:r=false,startYear:o=1900,endYear:a=new Date().getFullYear()+50,components:s,...i}){let l=_.useMemo(()=>rw(r,o,a),[r,o,a]);return jsx(DayPicker,{showOutsideDays:n,className:m("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:m("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:m("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:m("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})}no.displayName="Calendar";var op=({className:e,...t})=>jsx("nav",{role:"navigation","aria-label":"pagination",className:m("mx-auto flex w-full justify-center",e),...t});op.displayName="Pagination";var ap=_.forwardRef(({className:e,...t},n)=>jsx("ul",{ref:n,className:m("flex flex-row items-center gap-1",e),...t}));ap.displayName="PaginationContent";var sp=_.forwardRef(({className:e,...t},n)=>jsx("li",{ref:n,className:m("",e),...t}));sp.displayName="PaginationItem";var qa=({className:e,isActive:t,size:n="sm",isIconOnly:r=true,...o})=>jsx("a",{"aria-current":t?"page":void 0,className:m(qr({variant:t?"solid":"light",size:n}),r&&"!px-0 !w-9",e),...o});qa.displayName="PaginationLink";var ip=({className:e,...t})=>jsxs(qa,{"aria-label":"Go to previous page",size:"md",className:m("gap-1 pl-2.5",e),...t,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{children:"Previous"})]});ip.displayName="PaginationPrevious";var lp=({className:e,...t})=>jsxs(qa,{"aria-label":"Go to next page",size:"md",className:m("gap-1 pr-2.5",e),...t,children:[jsx("span",{children:"Next"}),jsx(ChevronRight,{className:"h-4 w-4"})]});lp.displayName="PaginationNext";var cp=({className:e,...t})=>jsxs("span",{"aria-hidden":true,className:m("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"})]});cp.displayName="PaginationEllipsis";var Fo=_.forwardRef(({className:e,...t},n)=>jsx("span",{ref:n,className:m("absolute h-px w-px p-0 -m-px overflow-hidden whitespace-nowrap border-0","[clip:rect(0,0,0,0)]",e),...t}));Fo.displayName="VisuallyHidden";var up={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},lw={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"},mp=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"),Yi=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"}}),Qa=_.createContext(null),kr=()=>{let e=_.useContext(Qa);if(!e)throw new Error("Modal components must be used within a Modal");return e},fp=_.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:u,className:f},p)=>{let[g,h]=_.useState(false),v=e!==void 0,b=v?e:g,[w,x]=_.useState(false),R=_.useRef(null),C=_.useId(),y=_.useId();_.useEffect(()=>{x(true);},[]);let N=_.useCallback(M=>{v||h(M),t?.(M);},[v,t]);_.useEffect(()=>{if(b)return Gt(),()=>Ut()},[b]),_.useEffect(()=>{if(!b||i)return;let M=P=>{P.key==="Escape"&&N(false);};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[b,i,N]);let T=M=>{s&&M.target===M.currentTarget&&N(false);},k=n?_.isValidElement(n)?_.cloneElement(n,{onClick:M=>{n.props.onClick?.(M),N(true);}}):jsx("button",{type:"button",onClick:()=>N(true),children:n}):null,E=()=>!w||!b?null:d==="outside"?Oa.createPortal(jsx("div",{"data-state":b?"open":"closed",className:m(mp(),up[l],"overflow-y-auto flex items-start justify-center py-4"),onClick:T,children:jsxs("div",{ref:M=>{R.current=M,typeof p=="function"?p(M):p&&(p.current=M);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":y,"data-state":b?"open":"closed",className:m("relative z-50 grid gap-4 border bg-background p-6 shadow-lg sm:rounded-lg dark:border-0",u==="xs"&&"w-full max-w-xs",u==="sm"&&"w-full max-w-sm",u==="md"&&"w-full max-w-md",u==="lg"&&"w-full max-w-lg",u==="xl"&&"w-full max-w-xl",u==="2xl"&&"w-full max-w-2xl",u==="3xl"&&"w-full max-w-3xl",u==="4xl"&&"w-full max-w-4xl",u==="5xl"&&"w-full max-w-5xl",u==="full"&&"w-[calc(100vw-2rem)] min-h-[calc(100vh-2rem)]",!u&&"w-full max-w-md",f),children:[jsx(Fo,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(Mt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>N(false)})]})}),document.body):Oa.createPortal(jsxs(Fragment,{children:[jsx("div",{"data-state":b?"open":"closed",className:m(mp(),up[l]),onClick:T,"aria-hidden":"true"}),jsxs("div",{ref:M=>{R.current=M,typeof p=="function"?p(M):p&&(p.current=M);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":y,"data-state":b?"open":"closed",className:m(Yi({size:u}),lw[c],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",f),children:[jsx(Fo,{children:jsx("h2",{id:C,children:r})}),o,!a&&jsx(Mt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>N(false)})]})]}),document.body);return jsxs(Qa.Provider,{value:{open:b,onOpenChange:N,scrollBehavior:d,titleId:C,descriptionId:y},children:[k,E()]})});fp.displayName="Modal";var Ja=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,scrollBehavior:o="inside"})=>{let[a,s]=_.useState(n),i=t!==void 0,l=i?t:a,c=_.useId(),d=_.useId(),u=_.useCallback(f=>{i||s(f),r?.(f);},[i,r]);return jsx(Qa.Provider,{value:{open:l,onOpenChange:u,scrollBehavior:o,titleId:c,descriptionId:d},children:e})};Ja.displayName="ModalRoot";var gp=_.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=kr();return jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(true);},...n,children:e})});gp.displayName="ModalTrigger";var Xi=({children:e,container:t})=>{let[n,r]=_.useState(false);return _.useEffect(()=>{r(true);},[]),n?Oa.createPortal(e,t||document.body):null};Xi.displayName="ModalPortal";var qi=_.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=kr();return r?jsx("div",{ref:n,"data-state":r?"open":"closed",className:m("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});qi.displayName="ModalOverlay";var bp=_.forwardRef(({children:e,onClick:t,...n},r)=>{let{onOpenChange:o}=kr();return jsx("button",{ref:r,type:"button",onClick:s=>{t?.(s),o(false);},...n,children:e})});bp.displayName="ModalClose";var es=_.forwardRef(({className:e,children:t,size:n,showCloseButton:r=true,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c,titleId:d,descriptionId:u}=kr(),[f,p]=_.useState(false);return _.useEffect(()=>{p(true);},[]),_.useEffect(()=>{if(l)return Gt(),()=>Ut()},[l]),_.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(Xi,{children:[jsx(qi,{}),jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":u,"data-state":l?"open":"closed",className:m(Yi({size:n}),"top-[50%] translate-y-[-50%]",e),...s,children:[t,r&&jsx(Mt,{size:"sm",className:"absolute right-4 top-4 z-10",onClick:()=>c(false)})]})]})});es.displayName="ModalContent";var vp=({className:e,...t})=>jsx("div",{className:m("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});vp.displayName="ModalHeader";var hp=({className:e,children:t})=>(_.useContext(Qa)?.scrollBehavior??"inside")==="inside"?jsx(De,{className:m("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsx("div",{className:m(e),children:t});hp.displayName="ModalBody";var xp=({className:e,children:t,...n})=>{let{onOpenChange:r}=kr();return jsx("div",{className:m("flex-shrink-0 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n,children:_.Children.map(t,o=>_.isValidElement(o)?_.cloneElement(o,{onClick:a=>{o.props.onClick?.(a),r(false);}}):o)})};xp.displayName="ModalFooter";var yp=_.forwardRef(({className:e,...t},n)=>{let{titleId:r}=kr();return jsx("h2",{ref:n,id:r,className:m("text-lg font-semibold leading-none tracking-tight",e),...t})});yp.displayName="ModalTitle";var Rp=_.forwardRef(({className:e,...t},n)=>{let{descriptionId:r}=kr();return jsx("p",{ref:n,id:r,className:m("text-sm text-muted-foreground",e),...t})});Rp.displayName="ModalDescription";var Zi=_.forwardRef(({className:e,...t},n)=>jsx(Command,{ref:n,className:m("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Zi.displayName=Command.displayName;var uw=({children:e,...t})=>jsx(Ja,{...t,children:jsx(es,{className:"overflow-hidden p-0 shadow-lg",showCloseButton:false,children:jsx(Zi,{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})})}),wp=_.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:m("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})]}));wp.displayName=Command.Input.displayName;var Cp=_.forwardRef(({className:e,children:t,...n},r)=>jsx(De,{className:"max-h-[300px]",children:jsx(Command.List,{ref:r,className:m("overflow-hidden",e),...n,children:t})}));Cp.displayName=Command.List.displayName;var Tp=_.forwardRef((e,t)=>jsx(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Tp.displayName=Command.Empty.displayName;var Mp=_.forwardRef(({className:e,...t},n)=>jsx(Command.Group,{ref:n,className:m("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}));Mp.displayName=Command.Group.displayName;var Np=_.forwardRef(({className:e,...t},n)=>jsx(Command.Separator,{ref:n,className:m("-mx-1 h-px bg-border",e),...t}));Np.displayName=Command.Separator.displayName;var kp=_.forwardRef(({className:e,children:t,startContent:n,endContent:r,...o},a)=>jsxs(Command.Item,{ref:a,className:m("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]}));kp.displayName=Command.Item.displayName;var Pp=({className:e,...t})=>jsx("span",{className:m("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Pp.displayName="CommandShortcut";var Lp=_.forwardRef(({className:e,showToggle:t=true,disabled:n,onFocus:r,onBlur:o,style:a,...s},i)=>{let[l,c]=_.useState(false),[d,u]=_.useState(false);return jsxs("div",{className:"relative",children:[jsx("input",{type:l?"text":"password",className:m("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 file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",t&&"pr-10",e),ref:i,disabled:n,style:{...a,borderColor:d?"var(--color-foreground)":void 0},onFocus:f=>{u(true),r?.(f);},onBlur:f=>{u(false),o?.(f);},...s}),t&&jsx("button",{type:"button",className:"absolute right-0 top-0 h-10 w-10 px-3 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>c(!l),disabled:n,tabIndex:-1,"aria-label":l?"Hide password":"Show password",children:l?jsx(EyeOff,{className:"h-4 w-4"}):jsx(Eye,{className:"h-4 w-4"})})]})});Lp.displayName="PasswordInput";var Sp=_.forwardRef(({className:e,showButtons:t=true,step:n=1,min:r,max:o,value:a,defaultValue:s,onChange:i,disabled:l,...c},d)=>{let[u,f]=_.useState(s),[p,g]=_.useState(false),h=a!==void 0,v=h?a:u,b=T=>{T!==void 0&&(r!==void 0&&T<r&&(T=r),o!==void 0&&T>o&&(T=o)),h||f(T),i?.(T);},w=()=>{b((v??0)+n);},x=()=>{b((v??0)-n);},R=T=>{let k=T.target.value;if(k==="")b(void 0);else {let E=parseFloat(k);isNaN(E)||b(E);}},C=T=>{T.key==="ArrowUp"?(T.preventDefault(),w()):T.key==="ArrowDown"&&(T.preventDefault(),x());},y=r===void 0||(v??0)>r,N=o===void 0||(v??0)<o;return t?jsxs("div",{className:m("relative flex items-center rounded-md border transition-colors",p?"border-foreground":"border-input",l&&"opacity-50",e),children:[jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:x,disabled:l||!y,tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:"h-4 w-4"})}),jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:"min-w-0 flex-1 h-10 bg-background text-sm text-center focus:outline-none disabled:cursor-not-allowed",ref:d,value:v??"",onChange:R,onKeyDown:C,disabled:l,onFocus:()=>g(true),onBlur:()=>g(false),...c}),jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:w,disabled:l||!N,tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:"h-4 w-4"})})]}):jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:m("flex h-10 w-full bg-background px-3 py-2 text-sm text-center border rounded-md placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",p?"border-foreground":"border-input",e),ref:d,value:v??"",onChange:R,onKeyDown:C,disabled:l,onFocus:()=>g(true),onBlur:()=>g(false),...c})});Sp.displayName="NumberInput";var Vp=cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),Dp=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"}}),Ap=_.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=(u,f)=>{let p=jsxs(Cr,{className:m(Dp({size:r})),children:[u.src&&jsx(Jr,{src:u.src,alt:u.alt||""}),jsx(Tr,{className:"text-xs",children:u.fallback||u.alt?.charAt(0)?.toUpperCase()||"?"})]},f);return o&&u.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:u.alt})]},f):p},d=jsxs("div",{ref:s,className:m(Vp({size:r,className:e})),...a,children:[i.map((u,f)=>c(u,f)),l>0&&jsx(Cr,{className:m(Dp({size:r})),children:jsxs(Tr,{className:"bg-muted text-muted-foreground",children:["+",l]})})]});return o?jsx(jn,{delayDuration:300,children:d}):d});Ap.displayName="AvatarGroup";var zp=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"}}),Op=_.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:u,...f},p)=>{let[g,h]=_.useState(n),[v,b]=_.useState(null),w=t!==void 0,x=w?t:g,R=v!==null?v:x,C=S=>{l||c||(w||h(S),r?.(S));},y=(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;b(L?H+.5:H+1);},T=()=>{b(null);},k=s==="heart"?Heart:Star,E=S=>R>=S+1?"full":R>=S+.5?"half":"empty",M=d?{color:d,fill:d}:{},P=u?{color:u}:{};return jsx("div",{ref:p,className:m(zp({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=E(H);return jsxs("button",{type:"button",className:m("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 V=L.currentTarget.getBoundingClientRect(),A=i&&L.clientX<V.left+V.width/2;y(H,A);},onMouseMove:L=>N(L,H),disabled:c||l,"aria-label":`Rate ${H+1} out of ${o}`,role:"radio","aria-checked":x===H+1,children:[jsx(k,{className:m("text-muted-foreground/30",D!=="empty"&&"absolute inset-0"),style:D==="empty"?P:void 0}),D!=="empty"&&jsx(k,{className:m("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",D==="half"&&"clip-path-half"),style:{...M,clipPath:D==="half"?"inset(0 50% 0 0)":void 0}})]},H)})})});Op.displayName="Rating";var Fp=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-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},clickable:{true:"cursor-pointer",false:""}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"solid",color:"success",className:"bg-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}}),Cw={sm:"sm",md:"sm",lg:"sm"},Kp=_.forwardRef(({className:e,variant:t,color:n,size:r,radius:o,clickable:a,startContent:s,endContent:i,closable:l,onClose:c,disabled:d,children:u,onClick:f,...p},g)=>{let h=a||!!f,v=b=>{b.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?b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),f?.(b));}:void 0,className:m(Fp({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:u}),i&&jsx("span",{className:"shrink-0",children:i}),l&&jsx(Mt,{size:Cw[r??"md"],onClick:v,disabled:d,className:"ml-0.5 h-4 w-4"})]})});Kp.displayName="Chip";var $p=createContext({direction:"horizontal"}),Sw=({className:e,direction:t="horizontal",children:n,...r})=>jsx($p.Provider,{value:{direction:t},children:jsx(Group,{orientation:t,className:m("flex h-full w-full data-[orientation=vertical]:flex-col",e),...r,children:n})}),Dw=Panel,Hw=({withHandle:e,className:t,...n})=>{let{direction:r}=useContext($p),o=r==="vertical";return jsx(Separator,{className:m("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:m("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 jp=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"}}),Vw={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"}},Gp={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)"},_p=_.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)),u=Vw[t],f=(u.size-u.strokeWidth)/2,p=2*Math.PI*f,g=p-d/100*p;return jsxs("div",{ref:c,className:m(jp({size:t,color:n}),e),role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":o,...l,children:[jsxs("svg",{width:u.size,height:u.size,viewBox:`0 0 ${u.size} ${u.size}`,fill:"none",children:[jsx("circle",{className:m("stroke-muted",i),cx:u.size/2,cy:u.size/2,r:f,strokeWidth:u.strokeWidth,fill:"none"}),jsx("circle",{cx:u.size/2,cy:u.size/2,r:f,strokeWidth:u.strokeWidth,fill:"none",strokeLinecap:"round",stroke:Gp[n]||Gp.default,strokeDasharray:`${p} ${p}`,strokeDashoffset:g,style:{transformOrigin:"center",transform:"rotate(-90deg)",transition:"stroke-dashoffset 0.3s ease-in-out"}})]}),a&&jsx("span",{className:m("absolute font-medium text-foreground",u.fontSize),children:s(d)})]})});_p.displayName="CircularProgress";var Yp=_.createContext(null),Ow=()=>{let e=_.useContext(Yp);if(!e)throw new Error("OTP components must be used within InputOTP");return e},Xp=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"}}),qp=_.forwardRef(({className:e,containerClassName:t,maxLength:n,value:r,defaultValue:o="",onChange:a,onComplete:s,pattern:i,disabled:l=false,size:c,children:d,...u},f)=>{let[p,g]=_.useState(o),[h,v]=_.useState(0),[b,w]=_.useState(false),x=_.useRef(null),R=r!==void 0?r:p;_.useImperativeHandle(f,()=>x.current),_.useEffect(()=>{v(Math.min(R.length,n-1));},[R,n]),_.useEffect(()=>{R.length===n&&s&&s(R);},[R,n,s]);let C=M=>{let P=M.target.value;if(i&&P){let S=new RegExp(i.replace("^","").replace("$","").replace("+",""));P=P.split("").filter(H=>S.test(H)).join("");}P=P.slice(0,n),r===void 0&&g(P),a?.(P);},y=M=>{M.key==="ArrowLeft"?v(P=>Math.max(0,P-1)):M.key==="ArrowRight"&&v(P=>Math.min(R.length,n-1,P+1));},N=()=>{x.current?.focus();},T=()=>{w(true),v(Math.min(R.length,n-1));},k=()=>{w(false);},E={value:R,activeIndex:b?h:-1,maxLength:n,disabled:l};return jsx(Yp.Provider,{value:E,children:jsxs("div",{className:m(Xp({size:c}),t),onClick:N,"data-otp-container":true,children:[jsx("input",{ref:x,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:R,onChange:C,onKeyDown:y,onFocus:T,onBlur:k,disabled:l,maxLength:n,className:m("absolute opacity-0 pointer-events-none w-0 h-0",e),...u}),d]})})});qp.displayName="InputOTP";var Zp=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex items-center",e),...t}));Zp.displayName="InputOTPGroup";var Qp=_.forwardRef(({index:e,className:t,...n},r)=>{let{value:o,activeIndex:a,disabled:s}=Ow(),i=o[e]||"",l=a===e,c=l&&o.length===e;return jsxs("div",{ref:r,"data-otp-slot":true,"data-active":l,"data-filled":!!i,className:m("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm font-medium transition-all first:rounded-l-md first:border-l last:rounded-r-md",l&&"z-10 border-foreground",s&&"cursor-not-allowed opacity-50",t),...n,children:[i,c&&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 Jp=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:m("text-muted-foreground",e),...t,children:jsx(Minus,{className:"h-4 w-4"})}));Jp.displayName="InputOTPSeparator";var nf=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-2 border-zinc-300 bg-transparent dark:border-zinc-600",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-2 border-zinc-800 bg-transparent dark: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"}}),rf=_.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:u,readOnly:f,renderTag:p,...g},h)=>{let[v,b]=_.useState(""),w=_.useRef(null);_.useImperativeHandle(h,()=>w.current);let x=E=>{let M=E.trim();if(M.length<i||M.length>l||s&&r.length>=s||!d&&r.some(S=>S.text.toLowerCase()===M.toLowerCase()))return;let P={id:crypto.randomUUID(),text:M};o?.([...r,P]),b("");},R=E=>{u||f||o?.(r.filter(M=>M.id!==E));},C=E=>{if(c.includes(E.key)){if(E.key==="Tab"&&!v)return;E.preventDefault(),x(v);}E.key==="Backspace"&&!v&&r.length>0&&R(r[r.length-1].id);},y=E=>{let M=E.target.value;if(M.includes(",")){M.split(",").forEach(S=>{S.trim()&&x(S);});return}b(M);},N=E=>{E.preventDefault(),E.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(S=>{x(S);});},T=()=>{w.current?.focus();},k=s?r.length>=s:false;return jsxs("div",{className:m("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",u&&"cursor-not-allowed opacity-50",e),onClick:T,children:[r.map(E=>p?p(E,()=>R(E.id)):jsxs("span",{className:m(nf({variant:t,size:n})),children:[E.text,!u&&!f&&jsx("button",{type:"button",onClick:M=>{M.stopPropagation(),R(E.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${E.text}`,children:jsx(X,{className:"h-3 w-3"})})]},E.id)),!k&&!f&&jsx("input",{ref:w,type:"text",value:v,onChange:y,onKeyDown:C,onPaste:N,placeholder:r.length===0?a:"",disabled:u,className:m("flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed","min-w-[80px]"),...g})]})});rf.displayName="TagInput";var af=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"}}),sf=_.forwardRef(({className:e,size:t,icon:n,title:r,description:o,action:a,children:s,...i},l)=>jsxs("div",{ref:l,className:m(af({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]}));sf.displayName="EmptyState";var cf=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-2 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-2 border-zinc-900 bg-transparent dark:border-white"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"bordered",radius:"md"}}),df=_.forwardRef(({className:e,variant:t,radius:n,label:r,value:o,icon:a,trend:s,trendValue:i,description:l,...c},d)=>{let u=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:m(cf({variant:t,radius:n,className:e})),...c,children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("p",{className:m("text-sm font-medium",t==="solid"?"opacity-80":"text-muted-foreground"),children:r}),a&&jsx("div",{className:m("[&>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:m("flex items-center gap-0.5 text-sm",f),children:[jsx(u,{className:"h-3 w-3"}),i]})]}),l&&jsx("p",{className:m("mt-1 text-xs",t==="solid"?"opacity-70":"text-muted-foreground"),children:l})]})});df.displayName="StatCard";var tl=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"}}),Xw=({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:m("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 qw({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:u,defaultSelectedKeys:f=[],onSelect:p,checkable:g=false,checkedKeys:h,defaultCheckedKeys:v=[],onCheck:b,children:w,...x},R){let[C,y]=_.useState(null),[N,T]=_.useState(null),[k,E]=_.useState(new Set(f)),M=u!==void 0,P=M?new Set(u):k,[S,H]=_.useState(new Set(v)),D=h!==void 0,L=D?new Set(h):S,V=(O,W)=>{y(W),O.dataTransfer.effectAllowed="move",O.dataTransfer.setData("text/plain",String(W));},A=(O,W)=>{O.preventDefault(),!(C===null||C===W)&&T(W);},B=()=>{T(null);},I=(O,W)=>{if(O.preventDefault(),!r||C===null||C===W){y(null),T(null);return}let z=[...r],[j]=z.splice(C,1);z.splice(W,0,j),s?.(z),y(null),T(null);},F=()=>{y(null),T(null);},K=_.useCallback((O,W)=>{if(!r)return;let z=new Set(P),j=!z.has(O.id);d?j?z.add(O.id):z.delete(O.id):(z.clear(),j&&z.add(O.id)),M||E(z);let oe=r.filter(ge=>z.has(ge.id));p?.(Array.from(z),{selected:j,selectedItems:oe,item:O,event:W});},[r,P,d,M,p]),Y=_.useCallback((O,W)=>{if(!r)return;let z=new Set(L),j=!z.has(O.id);j?z.add(O.id):z.delete(O.id),D||H(z);let oe=r.filter(ge=>z.has(ge.id));b?.(Array.from(z),{checked:j,checkedItems:oe,item:O,event:W});},[r,L,D,b]);return (a||c||g)&&r&&o?jsx("div",{ref:R,role:"list",className:m(tl({variant:t,size:n,className:e})),...x,children:r.map((O,W)=>{let z=P.has(O.id),j=L.has(O.id);return jsxs("div",{role:"listitem","aria-selected":c?z:void 0,draggable:a,onDragStart:a?G=>V(G,W):void 0,onDragOver:a?G=>A(G,W):void 0,onDragLeave:a?B:void 0,onDrop:a?G=>I(G,W):void 0,onDragEnd:a?F:void 0,onClick:c&&!g?G=>K(O,G):void 0,className:m("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===W&&"opacity-50 scale-[1.02] z-10",N===W&&"border-primary border-dashed border rounded-md",z&&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(Xw,{checked:j,onClick:G=>Y(O,G)}),jsx("div",{className:"flex-1 min-w-0",children:o(O,W)})]},O.id)})}):jsx("div",{ref:R,role:"list",className:m(tl({variant:t,size:n,className:e})),...x,children:w})}var Zw=_.forwardRef(qw),mf=cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),pf=_.forwardRef(({className:e,interactive:t,leading:n,trailing:r,children:o,...a},s)=>jsxs("div",{ref:s,role:"listitem",className:m(mf({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})]}));pf.displayName="ListItem";var ff=_.forwardRef(({className:e,primary:t,secondary:n,children:r,...o},a)=>jsxs("div",{ref:a,className:m("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]}));ff.displayName="ListItemText";var vf=cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),hf=_.forwardRef(({className:e,position:t,...n},r)=>jsx("div",{ref:r,"data-position":t,className:m(vf({position:t,className:e})),...n}));hf.displayName="Timeline";var xf=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"}}),yf=_.forwardRef(({className:e,variant:t,hideSeparator:n=false,hideConnector:r=false,dot:o,children:a,...s},i)=>jsxs("div",{ref:i,className:m(xf({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]}));yf.displayName="TimelineItem";var Rf=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex-1 pt-0.5",e),...t}));Rf.displayName="TimelineContent";var wf=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));wf.displayName="TimelineOpposite";var Tf=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}}),Mf=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}}),Nf=_.createContext({}),kf=_.forwardRef(({className:e,size:t="md",fullWidth:n,children:r,value:o,defaultValue:a,onValueChange:s,disabled:i,...l},c)=>{let[d,u]=_.useState(a),f=o!==void 0?o:d,p=_.useCallback(g=>{o===void 0&&u(g),s?.(g);},[o,s]);return jsx(Nf.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:i},children:jsx("div",{ref:c,role:"group",className:m(Tf({size:t,fullWidth:n,className:e})),...l,children:r})})});kf.displayName="SegmentedControl";var Pf=_.forwardRef(({className:e,children:t,value:n,disabled:r,...o},a)=>{let s=_.useContext(Nf),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:m(Mf({size:s.size,selected:i}),"flex-1",e),...o,children:t})});Pf.displayName="SegmentedControlItem";var Ef=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"}}),Lf=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},ss=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]},Sf=(e,t,n)=>{let r=[];return t&&e.size>t&&r.push({code:"file-too-large",message:`File is larger than ${ss(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},Df=_.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:u=true,disabled:f,...p},g)=>{let[h,v]=_.useState(false),[b,w]=_.useState(false),[x,R]=_.useState([]),C=_.useRef(null),y=_.useCallback(L=>{if(!L||L.length===0)return;let V=Array.from(L),A=[],B=[];(u?V:[V[0]]).forEach(F=>{let K=Sf(F,c,d);K.length>0?B.push({file:F,errors:K}):A.push(F);}),R(B),A.length>0&&r?.(A),B.length>0&&o?.(B);},[c,d,u,r,o]),N=_.useCallback(L=>{if(L.preventDefault(),L.stopPropagation(),!f&&(v(true),L.dataTransfer.items)){let A=Array.from(L.dataTransfer.items).some(B=>{if(B.kind!=="file")return true;if(d&&d.length>0){let I=B.type;return !d.some(F=>F.endsWith("/*")?I.startsWith(F.slice(0,-2)):I===F)}return false});w(A);}},[f,d]),T=_.useCallback(L=>{L.preventDefault(),L.stopPropagation(),!f&&(L.dataTransfer.dropEffect="copy");},[f]),k=_.useCallback(L=>{L.preventDefault(),L.stopPropagation();let V=L.currentTarget.getBoundingClientRect(),A=L.clientX,B=L.clientY;(A<V.left||A>V.right||B<V.top||B>V.bottom)&&(v(false),w(false));},[]),E=_.useCallback(L=>{L.preventDefault(),L.stopPropagation(),v(false),w(false),!f&&y(L.dataTransfer.files);},[f,y]),M=_.useCallback(()=>{f||C.current?.click();},[f]),P=_.useCallback(L=>{y(L.target.files),L.target.value="";},[y]),S=_.useCallback(L=>{f||(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),C.current?.click());},[f]),H=b?"error":h?"active":t,D=d?.join(",");return jsxs("div",{ref:g,className:m("space-y-4",e),...p,children:[jsxs("div",{role:"button",tabIndex:f?-1:0,onDragEnter:N,onDragOver:T,onDragLeave:k,onDrop:E,onClick:M,onKeyDown:S,className:m(Ef({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:u,disabled:f,onChange:P,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 ${ss(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:V})=>jsxs("div",{children:[jsx("span",{className:"font-medium",children:L.name}),":"," ",V.map(A=>A.message).join(", ")]},L.name))}),i&&s.length>0&&jsx("div",{className:"space-y-2",children:s.map(L=>{let V=Lf(L.file);return jsxs("div",{className:m("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(V,{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:[ss(L.file.size),L.error&&jsx("span",{className:"ml-2 text-danger",children:L.error})]}),L.progress!==void 0&&L.progress<100&&jsx(ja,{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:A=>{A.stopPropagation(),a?.(L.file);},children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Remove"})]})]},L.id)})})]})});Df.displayName="FileUpload";var iC=`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")`,If=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}}),Yo=_.forwardRef(({color:e,isSelected:t,showTransparency:n=true,onSelect:r,size:o,shape:a,interactive:s,className:i,onClick:l,disabled:c,selectedRingColor:d,...u},f)=>jsx("button",{ref:f,type:"button",disabled:c,onClick:h=>{l?.(h),r?.(e);},className:m(If({size:o,shape:a,interactive:s??(!!r||!!l)}),t&&"ring-2 ring-offset-2",i),style:{backgroundImage:n?iC:void 0,backgroundSize:n?"8px 8px":void 0,...t&&{"--tw-ring-color":d||"var(--color-foreground)"}},"aria-label":`Color ${e}`,"aria-pressed":t,...u,children:jsx("span",{className:"absolute inset-0 rounded-[inherit]",style:{backgroundColor:e}})}));Yo.displayName="ColorSwatch";var Vf=cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),Af=_.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:u,...f},p)=>{let[g,h]=_.useState(t),v=e??g,b=_.useCallback(x=>{l||(e===void 0&&h(x),n?.(x));},[e,n,l]),w=x=>x.toLowerCase();return jsx("div",{ref:p,role:"listbox","aria-label":"Color options",className:m(Vf({layout:r}),d),style:{...r==="grid"?{gridTemplateColumns:`repeat(${o}, 1fr)`}:{},...u},...f,children:a.map(x=>{let R=v?w(v)===w(x):false;return jsx(Yo,{role:"option",color:x,size:s,shape:i,isSelected:R,onSelect:b,disabled:l,selectedRingColor:c,"aria-selected":R},x)})})});Af.displayName="ColorSwatchPicker";var dC=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],zf={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},Of=_.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:n,disabled:r,presets:o=dC,showInput:a=true,size:s="md",className:i,variant:l="full"},c)=>{let[d,u]=_.useState(e??t),f=_.useId();_.useEffect(()=>{e!==void 0&&u(e);},[e]);let p=v=>{u(v),n?.(v);},g=v=>{u(v),n?.(v);},h=v=>{let b=v.target.value.toUpperCase();u(b),n?.(b);};return l==="simple"?jsxs("label",{className:m("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",zf[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:m("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",zf[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(wr,{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(wr,{className:"text-xs",children:"Presets"}),jsx("div",{className:"flex flex-wrap gap-1.5",children:o.map(v=>jsx(Yo,{color:v,size:"sm",isSelected:d.toLowerCase()===v.toLowerCase(),onSelect:g},v))})]})]})})]})});Of.displayName="ColorPicker";var Bf=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"}}),ol=e=>String(e).padStart(2,"0"),gC=e=>{let[t,n]=e.split(":").map(Number);return {hours:t||0,minutes:n||0}},bC=(e,t)=>`${ol(e)}:${ol(t)}`,Ff=_.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},u)=>{let[f,p]=_.useState(n??""),[g,h]=_.useState(false);_.useEffect(()=>{n!==void 0&&p(n);},[n]);let{hours:v,minutes:b}=gC(f||"00:00"),w=k=>{let E=k.target.value;p(E),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(E)&&r?.(E);},x=(k,E)=>{let M=Math.max(0,Math.min(23,k)),P=Math.max(0,Math.min(59,E)),S=bC(M,P);p(S),r?.(S);},R=()=>x(v+1,b),C=()=>x(v-1,b),y=()=>x(v,b+a),N=()=>x(v,b-a),T=({value:k,onIncrement:E,onDecrement:M})=>jsxs("div",{className:"flex flex-col items-center",children:[jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:E,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:ol(k)}),jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:M,disabled:c,children:jsx(ChevronDown,{className:"h-4 w-4"})})]});return jsxs("div",{className:"relative flex items-center",children:[jsx("input",{ref:u,type:"time",value:f,onChange:w,disabled:c,className:m(Bf({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:v,onIncrement:R,onDecrement:C,max:23}),jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsx(T,{value:b,onIncrement:y,onDecrement:N,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"})]})]})]})]})});Ff.displayName="TimeInput";var Kf=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"}}),hC=(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}},al=(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},$f=(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},Gf=_.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:u="prefix",currencySymbol:f,thousandSeparator:p=",",decimalSeparator:g=".",disabled:h,placeholder:v,...b},w)=>{let[x,R]=_.useState(r),[C,y]=_.useState(""),[N,T]=_.useState(false),k=n!==void 0?n:x,E=f??hC(a,s);_.useEffect(()=>{!N&&k!==void 0&&y(al(k,i,p,g));},[k,i,p,g,N]);let M=L=>{let V=L.target.value;if(!V){y(""),n===void 0&&R(void 0),o?.(void 0);return}if(!new RegExp(`^[0-9${p}${g}.-]*$`).test(V))return;y(V);let B=$f(V,p,g);if(B!==void 0){let I=B;l!==void 0&&B<l&&(I=l),c!==void 0&&B>c&&(I=c),n===void 0&&R(I),o?.(I);}},P=()=>{T(true),k!==void 0&&y(k.toString().replace(".",g));},S=()=>{T(false),y(k!==void 0?al(k,i,p,g):"");},H=d&&u==="prefix"&&jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:E}),D=d&&u==="suffix"&&jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:E});return jsxs("div",{className:"relative flex items-center",children:[H&&jsx("div",{className:"absolute left-3 pointer-events-none",children:H}),jsx("input",{ref:w,type:"text",inputMode:"decimal",value:C,onChange:M,onFocus:P,onBlur:S,disabled:h,placeholder:v??`0${g}${"0".repeat(i)}`,className:m(Kf({size:t}),H&&"pl-8",D&&"pr-8","text-right",e),style:{borderColor:N?"var(--color-foreground)":void 0},...b}),D&&jsx("div",{className:"absolute right-3 pointer-events-none",children:D})]})});Gf.displayName="CurrencyInput";var Uf=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"}}),sl={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:"#####-####"}},RC=(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),ls=(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];RC(i,s)?(r+=i,o++):(o++,a--);}}else (o<e.length||n)&&(r+=s);}return r},il=(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},Wf=(e,t)=>e.split("").map(n=>rr(n)?t:n).join(""),wC=(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)},jf=_.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,...u},f)=>{let p=typeof a=="string"&&a in sl?sl[a].mask:a,[g,h]=_.useState(r),[v,b]=_.useState(""),[w,x]=_.useState(false),R=_.useRef(null),C=n!==void 0?n:g;_.useImperativeHandle(f,()=>R.current),_.useEffect(()=>{let k=ls(C,p,true);b(k);},[C,p]);let y=k=>{let E=k.target.value,M=k.target.selectionStart??0,P=E.replace(/[^\w]/g,""),S=ls(P,p,true),H=il(S,p);b(S),n===void 0&&h(l?S:H),o?.(H,S),requestAnimationFrame(()=>{if(R.current){let D=wC(S,p,M);R.current.setSelectionRange(D,D);}});},N=k=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(k.key)||k.ctrlKey||k.metaKey)return;let E=R.current;if(!E)return;let M=E.selectionStart??0;if(k.key==="Backspace"&&M>0){let P=M-1;for(;P>0&&!rr(p[P]);)P--;let S=il(v,p),H=0;for(let V=0;V<P&&V<p.length;V++)rr(p[V])&&H++;let D=S.slice(0,Math.max(0,H-1))+S.slice(H),L=ls(D,p,true);b(L),n===void 0&&h(l?L:D),o?.(D,L),k.preventDefault(),requestAnimationFrame(()=>{R.current&&R.current.setSelectionRange(P,P);});}},T=i?Wf(p,s):d;return jsx("input",{ref:R,type:"text",value:v,onChange:y,onKeyDown:N,onFocus:()=>x(true),onBlur:()=>x(false),disabled:c,placeholder:T,className:m(Uf({size:t}),e),style:{borderColor:w?"var(--color-foreground)":void 0},...u})});jf.displayName="MaskedInput";var Yf=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"}}),Xf=[{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:"(###) ###-####"}],cs=(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},kC=e=>e.replace(/#/g,"_"),qf=_.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,country:a,defaultCountry:s="TR",onCountryChange:i,countries:l=Xf,showCountrySelect:c=true,showDialCode:d=false,disabled:u,placeholder:f,...p},g)=>{let[h,v]=_.useState(r),[b,w]=_.useState(a??s),[x,R]=_.useState(false),[C,y]=_.useState(false),[N,T]=_.useState(false),[k,E]=_.useState({top:0,left:0,width:0}),M=_.useRef(null),P=_.useRef(null),S=n!==void 0?n:h,H=a??b,D=l.find(I=>I.code===H)??l[0],L=cs(S,D.format);_.useEffect(()=>{T(true);},[]),_.useEffect(()=>{if(C&&M.current){let I=M.current.getBoundingClientRect();E({top:I.bottom+4,left:I.left,width:Math.max(I.width,280)});}},[C]),_.useEffect(()=>{if(!C)return;let I=F=>{M.current&&!M.current.contains(F.target)&&P.current&&!P.current.contains(F.target)&&y(false);};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[C]),_.useEffect(()=>{if(!C)return;let I=F=>{F.key==="Escape"&&y(false);};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[C]);let V=I=>{let K=I.target.value.replace(/\D/g,"");n===void 0&&v(K);let Y=cs(K,D.format),q=`${D.dialCode} ${Y}`;o?.(K,q,D);},A=I=>{let F=l.find(q=>q.code===I);if(!F)return;a===void 0&&w(I),i?.(F);let K=cs(S,F.format),Y=`${F.dialCode} ${K}`;o?.(S,Y,F),y(false);};return jsxs("div",{className:"flex",children:[c&&jsxs(Fragment,{children:[jsxs("button",{ref:M,type:"button",disabled:u,onClick:()=>y(!C),className:m("flex items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","w-[100px] rounded-r-none border-r-0 shrink-0",t==="sm"?"h-8":t==="lg"?"h-12":"h-10"),children:[jsxs("span",{className:"flex items-center gap-1.5",children:[jsx("span",{children:D.flag}),jsx("span",{className:"text-xs text-muted-foreground",children:D.dialCode})]}),jsx(ChevronDown,{className:m("h-4 w-4 opacity-50 transition-transform",C&&"rotate-180")})]}),N&&C&&Oa.createPortal(jsx("div",{ref:P,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(De,{style:{maxHeight:300},children:jsx("div",{className:"p-1",children:l.map(I=>jsxs("div",{role:"option","aria-selected":I.code===H,onClick:()=>A(I.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:I.code===H&&jsx(Check,{className:"h-4 w-4"})}),jsxs("span",{className:"flex items-center gap-2",children:[jsx("span",{children:I.flag}),jsx("span",{className:"flex-1",children:I.name}),jsx("span",{className:"text-xs text-muted-foreground",children:I.dialCode})]})]},I.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:D.dialCode}),jsx("input",{ref:g,type:"tel",inputMode:"tel",value:L,onChange:V,onFocus:()=>R(true),onBlur:()=>R(false),disabled:u,placeholder:f??kC(D.format),className:m(Yf({size:t}),c&&"rounded-l-none",d&&!c&&"pl-12",e),style:{borderColor:x?"var(--color-foreground)":void 0},...p})]})]})});qf.displayName="PhoneInput";var Qf=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=_.forwardRef(({className:e,variant:t,size:n,sticky:r,brand:o,children:a,mobileBreakpoint:s="md",...i},l)=>{let[c,d]=_.useState(false),u={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:m(Qf({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:m("items-center gap-4 flex-1 justify-end",u),children:a}),jsx("button",{type:"button",className:m("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,{className:"h-5 w-5"}):jsx(Menu,{className:"h-5 w-5"})})]}),c&&jsx("div",{className:m("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 eg=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex items-center gap-2 font-semibold text-lg",e),...t}));eg.displayName="NavbarBrand";var tg=_.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:m("flex items-center gap-4",o,e),...n})});tg.displayName="NavbarContent";var ng=_.forwardRef(({className:e,isActive:t,...n},r)=>jsx("div",{ref:r,className:m("flex items-center",t&&"text-primary font-medium",e),...n}));ng.displayName="NavbarItem";var rg=_.forwardRef(({className:e,isActive:t,...n},r)=>jsx("a",{ref:r,className:m("text-sm font-medium transition-colors hover:text-primary",t?"text-primary":"text-muted-foreground",e),...n}));rg.displayName="NavbarLink";var ag=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"}}),sg=_.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:m(ag({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"})]})});sg.displayName="Link";var ig=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"}}),lg=_.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:u,...f},p)=>{let[g,h]=_.useState(false);_.useEffect(()=>{let w=c?.current||window,x=()=>{let C=(c?.current?c.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>n;C!==g&&(h(C),d?.(C));};return w.addEventListener("scroll",x,{passive:true}),x(),()=>{w.removeEventListener("scroll",x);}},[n,c,g,d]);let v=w=>{c?.current?c.current.scrollTo({top:0,behavior:o}):window.scrollTo({top:0,behavior:o}),u?.(w);},b=i==="sm"?"h-4 w-4":i==="lg"?"h-6 w-6":"h-5 w-5";return jsx("div",{className:m(ig({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:v,"aria-label":"Back to top",className:"shadow-lg",...f,children:r||jsx(ArrowUp,{className:b})})})});lg.displayName="BackTop";var KC=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),$C=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),cg=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"}},defaultVariants:{radius:"sm"}}),ms=cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-xl"}},defaultVariants:{radius:"sm"}}),dg=_.createContext(null),ar=()=>{let e=_.useContext(dg);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},ug=_.createContext(null),qo=()=>{let e=_.useContext(ug);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},cl=_.createContext(null),mg=_.createContext(null),pg=_.forwardRef(({className:e,children:t,radius:n="sm",...r},o)=>{let[a,s]=_.useState(null);return jsx(dg.Provider,{value:{activeMenu:a,setActiveMenu:s,radius:n},children:jsx("div",{ref:o,role:"menubar",className:m("flex h-10 items-center space-x-1 border bg-background p-1",KC({radius:n}),e),...r,children:t})})});pg.displayName="Menubar";var fg=({children:e})=>{let{activeMenu:t,setActiveMenu:n}=ar(),r=_.useId(),o=_.useRef(null),a=t===r,s=_.useCallback(i=>{n(i?r:null);},[r,n]);return jsx(ug.Provider,{value:{menuId:r,triggerRef:o,open:a,onOpenChange:s},children:e})};fg.displayName="MenubarMenu";var gg=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"group",className:e,...t}));gg.displayName="MenubarGroup";var bg=({children:e,container:t})=>{let[n,r]=_.useState(false);return _.useEffect(()=>{r(true);},[]),n?Oa.createPortal(e,t||document.body):null};bg.displayName="MenubarPortal";var vg=({children:e,open:t,defaultOpen:n=false,onOpenChange:r})=>{let[o,a]=_.useState(n),s=t!==void 0,i=s?t:o,l=_.useRef(null),c=_.useCallback(d=>{s||a(d),r?.(d);},[s,r]);return jsx(cl.Provider,{value:{open:i,onOpenChange:c,triggerRef:l},children:e})};vg.displayName="MenubarSub";var hg=_.forwardRef(({value:e="",onValueChange:t,className:n,...r},o)=>jsx(mg.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsx("div",{ref:o,role:"group",className:n,...r})}));hg.displayName="MenubarRadioGroup";var xg=_.forwardRef(({className:e,onClick:t,onMouseEnter:n,...r},o)=>{let{activeMenu:a,setActiveMenu:s,radius:i}=ar(),{menuId:l,triggerRef:c,open:d,onOpenChange:u}=qo(),f=g=>{t?.(g),u(!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:m("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",$C({radius:i}),e),onClick:f,onMouseEnter:p,...r})});xg.displayName="MenubarTrigger";var yg=_.forwardRef(({className:e,inset:t,children:n,onMouseEnter:r,onMouseLeave:o,...a},s)=>{let{radius:i}=ar(),l=_.useContext(cl);if(!l)throw new Error("MenubarSubTrigger must be used within MenubarSub");let{open:c,onOpenChange:d,triggerRef:u}=l,f=g=>{r?.(g),d(true);},p=g=>{o?.(g),d(false);};return jsxs("div",{ref:g=>{u.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:m("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",ms({radius:i}),t&&"pl-8",e),onMouseEnter:f,onMouseLeave:p,...a,children:[n,jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]})});yg.displayName="MenubarSubTrigger";var Rg=_.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:n,onMouseLeave:r,...o},a)=>{let{radius:s}=ar(),i=_.useContext(cl);if(!i)throw new Error("MenubarSubContent must be used within MenubarSub");let{open:l,onOpenChange:c,triggerRef:d}=i,[u,f]=_.useState({top:0,left:0}),[p,g]=_.useState(false),h=_.useRef(null);_.useEffect(()=>{g(true);},[]),_.useEffect(()=>{if(!l||!d.current||!h.current)return;(()=>{if(!d.current||!h.current)return;let x=d.current.getBoundingClientRect(),R=h.current.getBoundingClientRect(),C=x.top,y=x.right+t;y+R.width>window.innerWidth&&(y=x.left-R.width-t),f({top:C,left:y});})();},[l,t,d]);let v=w=>{n?.(w),c(true);},b=w=>{r?.(w),c(false);};return !p||!l?null:Oa.createPortal(jsx("div",{ref:w=>{h.current=w,typeof a=="function"?a(w):a&&(a.current=w);},role:"menu","data-state":l?"open":"closed",className:m("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",cg({radius:s}),e),style:{top:u.top,left:u.left},onMouseEnter:v,onMouseLeave:b,...o}),document.body)});Rg.displayName="MenubarSubContent";var wg=_.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(),[u,f]=_.useState({top:0,left:0}),[p,g]=_.useState(false),h=_.useRef(null);return _.useEffect(()=>{g(true);},[]),_.useEffect(()=>{if(!c||!l.current||!h.current)return;let v=()=>{if(!l.current||!h.current)return;let b=l.current.getBoundingClientRect(),w=h.current.getBoundingClientRect(),x=b.bottom+r,R=b.left+n;t==="center"?R=b.left+b.width/2-w.width/2:t==="end"&&(R=b.right-w.width-n),f({top:x,left:R});};return v(),window.addEventListener("resize",v),window.addEventListener("scroll",v,true),()=>{window.removeEventListener("resize",v),window.removeEventListener("scroll",v,true);}},[c,t,n,r,l]),_.useEffect(()=>{if(!c)return;let v=b=>{let w=b.target;h.current&&!h.current.contains(w)&&l.current&&!l.current.contains(w)&&d(false);};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[c,d,l]),_.useEffect(()=>{if(!c)return;let v=b=>{b.key==="Escape"&&d(false);};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[c,d]),!p||!c?null:Oa.createPortal(jsx("div",{ref:v=>{h.current=v,typeof s=="function"?s(v):s&&(s.current=v);},role:"menu","data-state":c?"open":"closed",className:m("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",cg({radius:i}),e),style:{top:u.top,left:u.left},...a,children:o}),document.body)});wg.displayName="MenubarContent";var Cg=_.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:m("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",ms({radius:i}),t&&"pl-8",!n&&"cursor-pointer",e),onClick:c,...a})});Cg.displayName="MenubarItem";var Tg=_.forwardRef(({className:e,children:t,checked:n=false,onCheckedChange:r,disabled:o,onClick:a,...s},i)=>{let{radius:l}=ar(),{onOpenChange:c}=qo(),d=u=>{if(o){u.preventDefault();return}a?.(u),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:m("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",ms({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]})});Tg.displayName="MenubarCheckboxItem";var Mg=_.forwardRef(({className:e,children:t,value:n,disabled:r,onClick:o,...a},s)=>{let{radius:i}=ar(),{onOpenChange:l}=qo(),c=_.useContext(mg),d=c?.value===n,u=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:m("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",ms({radius:i}),!r&&"cursor-pointer",e),onClick:u,...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]})});Mg.displayName="MenubarRadioItem";var Ng=_.forwardRef(({className:e,inset:t,...n},r)=>jsx("div",{ref:r,className:m("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Ng.displayName="MenubarLabel";var kg=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,role:"separator",className:m("-mx-1 my-1 h-px bg-muted",e),...t}));kg.displayName="MenubarSeparator";var Pg=({className:e,...t})=>jsx("span",{className:m("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Pg.displayName="MenubarShortcut";var Eg=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"}}),Lg=_.forwardRef(({className:e,orientation:t,size:n,currentStep:r=0,children:o,...a},s)=>{let i=_.Children.toArray(o);return jsx("div",{ref:s,className:m(Eg({orientation:t,size:n,className:e})),...a,children:i.map((l,c)=>_.isValidElement(l)?_.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)})});Lg.displayName="Steps";var Sg=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"}}),UC=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"}}),WC=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"}}),Dg=_.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:m(Sg({orientation:t,size:n,className:e}),!l&&t==="horizontal"&&"flex-1"),...c,children:[jsx("div",{className:m("flex items-center",t==="vertical"&&"flex-col items-start"),children:jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:m(UC({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:m("font-medium",n==="sm"&&"text-sm",n==="lg"&&"text-lg",s==="upcoming"&&"text-muted-foreground"),children:r}),o&&jsx("span",{className:m("text-muted-foreground",n==="sm"&&"text-xs",n==="md"&&"text-sm",n==="lg"&&"text-base"),children:o})]})]})}),!l&&jsx("div",{className:m(WC({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Dg.displayName="Step";var Ig=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"}}),Vg=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}}),Ag=_.createContext(null),JC=()=>{let e=_.useContext(Ag);if(!e)throw new Error("TreeNodeComponent must be used within Tree");return e},eT=({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:m("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"})})}),zg=({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:u,checkable:f,draggable:p,draggedNode:g,setDraggedNode:h,dragOverKey:v,dragOverPosition:b,setDragOver:w,handleDrop:x,allowDrop:R,onDragStart:C,onDragOver:y,onDragEnter:N,onDragLeave:T,onDragEnd:k,showLine:E,showIcon:M,showHandle:P,dragIcon:S,icon:H,leafIcon:D,folderIcon:L,folderOpenIcon:V,blockNode:A,disabled:B,size:I,getAllKeys:F}=JC(),K=e.children&&e.children.length>0,Y=e.isLeaf??!K,q=o.has(e.key),$=s.has(e.key),O=c.has(e.key),W=d.has(e.key),z=g?.key===e.key,j=v===e.key,oe=!!(B||e.disabled),ge=l&&e.selectable!==false,G=f&&e.checkable!==false,Pe=_.useMemo(()=>oe?false:typeof p=="boolean"?p:typeof p=="function"?p(e):p&&typeof p=="object"?p.nodeDraggable?p.nodeDraggable(e):true:false,[p,e,oe]),Z=_.useMemo(()=>S!==void 0?S:typeof p=="object"&&p.icon!==void 0?p.icon:jsx(GripVertical,{className:"h-4 w-4"}),[S,p]),le=_.useMemo(()=>e.icon?e.icon:H?typeof H=="function"?H({expanded:q,isLeaf:Y}):H:Y?D:q?V:L,[e.icon,H,q,Y,D,L,V]),Be=X=>{if(!Pe)return;X.stopPropagation(),X.dataTransfer.effectAllowed="move";let Se=X.currentTarget,de=Se.cloneNode(true),We=document.documentElement.classList.contains("dark"),je=We?"#0a0a0a":"#ffffff",Gn=We?"#27272a":"#e4e4e7";de.style.cssText=`
|
|
44
44
|
position: fixed;
|
|
45
45
|
top: -9999px;
|
|
46
46
|
left: -9999px;
|
|
@@ -52,7 +52,7 @@ import*as _ from'react';import {createContext,useState,useEffect,useContext,useC
|
|
|
52
52
|
width: ${Se.offsetWidth}px;
|
|
53
53
|
opacity: 1;
|
|
54
54
|
z-index: 9999;
|
|
55
|
-
`,document.body.appendChild(de),X.dataTransfer.setDragImage(de,20,15),setTimeout(()=>{document.body.removeChild(de);},0),h(e),C?.({event:X,node:e});},me=X=>{if(X.preventDefault(),X.stopPropagation(),!g||g.key===e.key||oe)return;let Se=X.currentTarget.getBoundingClientRect(),de=X.clientY-Se.top,We=Se.height,je;de<We*.25?je=-1:de>We*.75?je=1:je=0,!(R&&!R({dropNode:e,dropPosition:je,dragNode:g}))&&(w(e.key,je),y?.({event:X,node:e}));},wt=X=>{X.preventDefault(),X.stopPropagation(),!(!g||g.key===e.key)&&N?.({event:X,node:e,expandedKeys:F()});},gt=X=>{X.stopPropagation(),T?.({event:X,node:e});},yn=X=>{X.preventDefault(),X.stopPropagation(),!(!g||g.key===e.key||oe)&&(v!==null&&x(e,v),h(null),w(null,null));},Fe=X=>{h(null),w(null,null),k?.({event:X,node:e});},on=X=>{oe||ge&&i(e.key,e,X);},Ct=X=>{X.stopPropagation(),!oe&&!Y&&a(e.key,e);},U=_.useMemo(()=>{if(!j||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 ""}},[j,v]),re=[...r,n];return jsxs("div",{className:"relative",children:[M&&t>0&&jsxs(Fragment,{children:[r.map((X,Se)=>!X&&jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${Se} * var(--tree-indent) + 12px)`,top:0,bottom:0}},Se)),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":Y?void 0:q,"aria-selected":ge?$:void 0,"aria-disabled":oe,draggable:Pe,onDragStart:Be,onDragOver:me,onDragEnter:wt,onDragLeave:gt,onDrop:yn,onDragEnd:Fe,onClick:on,className:u("relative",Vg({size:I,isSelected:$,isDragging:z,isDisabled:oe,isHoverable:ge&&!oe}),U,A&&"flex-1"),style:{paddingLeft:`calc(${t} * var(--tree-indent) + 8px)`},children:[Pe&&E&&Z!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:Z}),jsx("button",{type:"button",onClick:Ct,className:u("flex-shrink-0 p-0.5 rounded hover:bg-muted/80 transition-transform",Y&&"invisible"),tabIndex:-1,children:jsx(ChevronRight,{className:u("h-4 w-4 transition-transform duration-200",q&&"rotate-90")})}),G&&jsx(eT,{checked:O,indeterminate:W,disabled:oe,onClick:X=>m(e.key,e,X)}),P&&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",A&&"flex-none"),children:e.label})]}),K&&q&&jsx("div",{role:"group",children:e.children.map((X,Se)=>jsx(zg,{node:X,level:t+1,isLast:Se===e.children.length-1,parentIsLastPath:re},X.key))})]})},tT=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return n(e),t},nT=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},Og=(e,t)=>{if(!e.children)return false;for(let n of e.children)if(n.key===t||Og(n,t))return true;return false},Bg=_.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:w=[],onCheck:x,showLine:R=false,showIcon:C=false,showHandle:y=true,dragIcon:N,icon:T,leafIcon:k=jsx(File,{className:"h-4 w-4"}),folderIcon:M=jsx(Folder,{className:"h-4 w-4"}),folderOpenIcon:P=jsx(FolderOpen,{className:"h-4 w-4"}),onDragStart:E,onDragEnter:D,onDragOver:H,onDragLeave:L,onDragEnd:S,onDrop:V,blockNode:A=false,disabled:B=false,...I},F)=>{let K=_.useCallback(()=>l?new Set(tT(r)):new Set(i),[l,i,r]),[Y,q]=_.useState(K),$=s!==void 0,O=$?new Set(s):Y,W=_.useCallback((ve,Ye)=>{let Kt=new Set(O),Ae=!Kt.has(ve);Ae?Kt.add(ve):Kt.delete(ve),$||q(Kt),c?.(Array.from(Kt),{expanded:Ae,node:Ye});},[O,$,c]),[z,j]=_.useState(new Set(p)),oe=f!==void 0,ge=oe?new Set(f):z,G=_.useCallback((ve,Ye,Kt)=>{let Ae=new Set(ge),Rn=!Ae.has(ve);m?Rn?Ae.add(ve):Ae.delete(ve):(Ae.clear(),Rn&&Ae.add(ve)),oe||j(Ae);let jr=[],Vo=wa=>{for(let _r of wa)Ae.has(_r.key)&&jr.push(_r),_r.children&&Vo(_r.children);};Vo(r),g?.(Array.from(Ae),{selected:Rn,selectedNodes:jr,node:Ye,event:Kt});},[ge,m,oe,g,r]),[Pe,Z]=_.useState(new Set(w)),[le,Be]=_.useState(new Set),me=v!==void 0,wt=me?new Set(Array.isArray(v)?v:v.checked):Pe,gt=me&&!Array.isArray(v)?new Set(v.halfChecked):le,yn=_.useCallback((ve,Ye,Kt)=>{let Ae=new Set(wt),Rn=new Set(gt),jr=!Ae.has(ve);if(jr?(Ae.add(ve),Rn.delete(ve)):Ae.delete(ve),!b&&Ye.children){let xi=nT(Ye);for(let Un of xi)jr?(Ae.add(Un),Rn.delete(Un)):Ae.delete(Un);}me||(Z(Ae),Be(Rn));let Vo=[],wa=xi=>{for(let Un of xi)Ae.has(Un.key)&&Vo.push(Un),Un.children&&wa(Un.children);};wa(r);let _r=b?{checked:Array.from(Ae),halfChecked:Array.from(Rn)}:Array.from(Ae);x?.(_r,{checked:jr,checkedNodes:Vo,node:Ye,event:Kt,halfCheckedKeys:Array.from(Rn)});},[wt,gt,b,me,x,r]),[Fe,on]=_.useState(null),[Ct,U]=_.useState(null),[re,X]=_.useState(null),Se=_.useCallback((ve,Ye)=>{U(ve),X(Ye);},[]),de=_.useCallback((ve,Ye)=>{!Fe||!V||Ye===0&&Og(Fe,ve.key)||V({event:{},node:ve,dragNode:Fe,dropPosition:Ye,dropToGap:Ye!==0});},[Fe,V]),We=_.useCallback(()=>Array.from(O),[O]),je={expandedKeys:O,toggleExpand:W,selectedKeys:ge,handleSelect:G,selectable:d,multiple:m,checkedKeys:wt,halfCheckedKeys:gt,handleCheck:yn,checkable:h,checkStrictly:b,draggable:o,draggedNode:Fe,setDraggedNode:on,dragOverKey:Ct,dragOverPosition:re,setDragOver:Se,handleDrop:de,allowDrop:a,onDragStart:E,onDragEnter:D,onDragOver:H,onDragLeave:L,onDragEnd:S,showLine:R,showIcon:C,showHandle:y,dragIcon:N,icon:T,leafIcon:k,folderIcon:M,folderOpenIcon:P,blockNode:A,disabled:B,size:n,data:r,getAllKeys:We},Gn=ve=>{let Ye=ve.relatedTarget,Kt=ve.currentTarget;(!Ye||!Kt.contains(Ye))&&Se(null,null);};return jsx(Ag.Provider,{value:je,children:jsx("div",{ref:F,role:"tree","aria-multiselectable":m||h,className:u(Ig({variant:t,size:n,className:e})),onDragLeave:Gn,...I,children:r.map((ve,Ye)=>jsx(zg,{node:ve,level:0,isLast:Ye===r.length-1},ve.key))})})});Bg.displayName="Tree";var Kg=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-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"},fullWidth:{true:"w-full",false:"w-fit min-w-48"}},defaultVariants:{size:"md",fullWidth:false}}),lT=({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))})},cT=(e,t)=>{let[n,r]=_.useState(e);return _.useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n},$g=_.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:w,...x},R)=>{let[C,y]=_.useState(false),[N,T]=_.useState(r),[k,M]=_.useState([]),[P,E]=_.useState(false),[D,H]=_.useState(false),[L,S]=_.useState(0),V=_.useRef(null),A=_.useRef(null),B=n!==void 0?n:N,I=cT(B,l);_.useEffect(()=>{let G=A.current;if(!G)return;let Pe=()=>{S(G.offsetWidth);};Pe();let Z=new ResizeObserver(Pe);return Z.observe(G),()=>{Z.disconnect();}},[]),_.useImperativeHandle(R,()=>V.current);let F=i?k:s,K=_.useMemo(()=>i?F:F.filter(G=>G.label.toLowerCase().includes(B.toLowerCase())),[F,B,i]);_.useEffect(()=>{if(!i)return;if(I.length<c){M([]);return}let G=false;return (async()=>{E(true);try{let Z=await i(I);G||M(Z);}catch{G||M([]);}finally{G||E(false);}})(),()=>{G=true;}},[I,i,c]);let Y=G=>{n===void 0&&T(G),o?.(G);},q=G=>{let Pe=G.target.value;Y(Pe),Pe.length>=c&&y(true);},$=G=>{Y(G.label),a?.(G),y(false);},O=()=>{Y(""),V.current?.focus();},W=()=>{H(true),y(true);},z=()=>{H(false);},j=G=>{G.key==="Escape"&&y(false),G.key==="ArrowDown"&&!C&&K.length>0&&y(true);},oe=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",ge=p&&B?"pr-8":"pr-3";return jsxs(ot,{open:C,onOpenChange:y,children:[jsxs(an,{ref:A,className:u("relative",v?"w-full":"w-fit"),children:[jsx("input",{ref:V,type:"text",value:B,onChange:q,onFocus:W,onBlur:z,onKeyDown:j,disabled:w,placeholder:d,className:u(Kg({size:t,fullWidth:v}),ge,e),style:{borderColor:D?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":C,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...x}),p&&B&&!w&&jsx("button",{type:"button",onClick:O,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:jsx(X,{className:oe})})]}),jsx(at,{className:"p-0",align:"start",style:{width:L>0?L:void 0},onOpenAutoFocus:G=>G.preventDefault(),children:jsx(Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsx(De,{style:{maxHeight:h},children:jsx(Command.List,{id:"autocomplete-list",className:"p-1",children:P?jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsx(Loader2,{className:u(oe,"animate-spin")}),f]}):K.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:m}):K.map(G=>jsxs(Command.Item,{value:G.value,disabled:G.disabled,onSelect:()=>$(G),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",B===G.label?"opacity-100":"opacity-0")}),jsx("span",{className:"flex-1",children:b?jsx(lT,{text:G.label,query:B}):G.label})]},G.value))})})})})]})});$g.displayName="Autocomplete";var pl=_.createContext(null),fl=_.createContext(null),gl=()=>{let e=_.useContext(pl);if(!e)throw new Error("useFormContext must be used within a Form");return e},fs=()=>{let e=_.useContext(fl);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},dT={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})},Gg=_.forwardRef(({defaultValues:e={},onSubmit:t,onError:n,validateOnBlur:r=true,validateOnChange:o=false,children:a,className:s,...i},l)=>{let[c,d]=_.useState(e),[m,f]=_.useState({}),[p,g]=_.useState({}),[h,b]=_.useState({}),[v,w]=_.useState(false),x=_.useRef(new Map),R=_.useCallback((L,S)=>{x.current.set(L,S);},[]),C=_.useCallback(L=>{x.current.delete(L);},[]),y=_.useCallback(L=>{let S=x.current.get(L)||[],V=c[L];for(let A of S)if(!A.validate(V))return f(B=>({...B,[L]:A.message})),false;return f(A=>({...A,[L]:null})),true},[c]),N=_.useCallback(()=>{let L=true,S={};return x.current.forEach((V,A)=>{let B=c[A];for(let I of V)if(!I.validate(B)){S[A]=I.message,L=false;break}S[A]||(S[A]=null);}),f(S),L},[c]),T=_.useCallback((L,S)=>{d(V=>({...V,[L]:S})),b(V=>({...V,[L]:true})),o&&setTimeout(()=>{y(L);},0);},[o,y]),k=_.useCallback((L,S)=>{f(V=>({...V,[L]:S}));},[]),M=_.useCallback((L,S)=>{g(V=>({...V,[L]:S})),S&&r&&y(L);},[r,y]),P=_.useCallback(L=>({value:c[L],error:m[L]??null,touched:p[L]??false,dirty:h[L]??false}),[c,m,p,h]),E=_.useCallback(()=>{d(e),f({}),g({}),b({});},[e]),D=async L=>{L.preventDefault();let S={};if(x.current.forEach((A,B)=>{S[B]=true;}),g(S),!N()){n?.(m);return}if(t){w(true);try{await t(c);}finally{w(false);}}},H={values:c,errors:m,touched:p,dirty:h,isSubmitting:v,setValue:T,setError:k,setTouched:M,validateField:y,validateAll:N,registerField:R,unregisterField:C,getFieldState:P,reset:E};return jsx(pl.Provider,{value:H,children:jsx("form",{ref:l,onSubmit:D,className:u("space-y-4",s),...i,children:a})})});Gg.displayName="Form";var Ug=({name:e,rules:t=[],defaultValue:n,children:r})=>{let o=gl(),a=_.useId();_.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(fl.Provider,{value:i,children:r})};Ug.displayName="FormField";var Wg=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("space-y-1.5",e),...t}));Wg.displayName="FormItem";var jg=_.forwardRef(({className:e,required:t,children:n,...r},o)=>{let{id:a,error:s,touched:i}=fs();return jsxs(wr,{ref:o,htmlFor:a,className:u(s&&i&&"text-danger",e),...r,children:[n,t&&jsx("span",{className:"ml-1 text-danger",children:"*"})]})});jg.displayName="FormLabel";var _g=({children:e})=>{let{name:t,id:n,error:r,touched:o}=fs(),a=gl(),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 _.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})};_g.displayName="FormControl";var Yg=_.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:u("text-xs text-muted-foreground",e),...t}));Yg.displayName="FormDescription";var Xg=_.forwardRef(({className:e,message:t,...n},r)=>{let{id:o,error:a,touched:s}=fs(),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});Xg.displayName="FormMessage";var Zg=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"}}),Qg=_.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(Zg({size:t,className:e})),...i,children:[jsxs(Cr,{"data-user-avatar":true,children:[o&&jsx(Jr,{src:o,alt:n}),jsx(Tr,{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})]})});Qg.displayName="User";var eb=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-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"flat",size:"md",radius:"sm"}}),tb=_.forwardRef(({className:e,variant:t,size:n,radius:r,...o},a)=>jsx("code",{ref:a,className:u(eb({variant:t,size:n,radius:r,className:e})),...o}));tb.displayName="Code";function ab(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 sb=_.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=ab(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,w)=>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:w+1}),v.map((x,R)=>jsx("span",{...b({token:x})},R))]},w))})}),!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"})})]})]})});sb.displayName="CodeBlock";var ib=_.forwardRef(({tabs:e,className:t,theme:n},r)=>{let[o,a]=useState(0),[s,i]=useState(false),c=ab(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((w,x)=>jsx("span",{...h({token:w})},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"})})]})]})});ib.displayName="TabbedCodeBlock";var lb=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"}}),cb=_.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]=_.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(lb({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"})})]})});cb.displayName="Snippet";var xl=cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),db=_.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]=_.useState("loading");_.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(xl({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:c,...d},children:o}):jsxs("div",{className:u(xl({radius:t}),"relative",e),style:{aspectRatio:c,...d},children:[p==="loading"&&a&&jsx(Da,{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})]})});db.displayName="Image";var pb=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"}}),fb=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"}}),gb=_.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),bb=_.forwardRef(({className:e,size:t="md",value:n,defaultValue:r="",onValueChange:o,multiple:a=false,children:s,...i},l)=>{let[c,d]=_.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(gb.Provider,{value:{value:m,onValueChange:f,multiple:a,size:t??"md"},children:jsx("div",{ref:l,role:"listbox","aria-multiselectable":a,className:u(pb({size:t,className:e})),...i,children:s})})});bb.displayName="Listbox";var vb=_.forwardRef(({className:e,value:t,disabled:n,icon:r,description:o,children:a,...s},i)=>{let{value:l,onValueChange:c,multiple:d,size:m}=_.useContext(gb),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(fb({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"})]})});vb.displayName="ListboxItem";var xb=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"}}),yb=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 TT({className:e,variant:t,size:n,items:r,onReorder:o,renderItem:a,showHandle:s=true,disabled:i=false,...l},c){let[d,m]=_.useState(null),[f,p]=_.useState(null),g=(x,R)=>{i||(m(R),x.dataTransfer.effectAllowed="move",x.dataTransfer.setData("text/plain",String(R)));},h=(x,R)=>{x.preventDefault(),!(i||d===null||d===R)&&p(R);},b=()=>{p(null);},v=(x,R)=>{if(x.preventDefault(),i||d===null||d===R){m(null),p(null);return}let C=[...r],[y]=C.splice(d,1);C.splice(R,0,y),o?.(C),m(null),p(null);},w=()=>{m(null),p(null);};return jsx("div",{ref:c,className:u(xb({variant:t,size:n,className:e})),...l,children:r.map((x,R)=>jsxs("div",{draggable:!i,onDragStart:C=>g(C,R),onDragOver:C=>h(C,R),onDragLeave:b,onDrop:C=>v(C,R),onDragEnd:w,className:u(yb({variant:t,size:n,isDragging:d===R,isDragOver:f===R}),!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,R)})]},x.id))})}var MT=_.forwardRef(TT);var Cb=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}}),ET={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},Tb=_.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(Cb({variant:t,visible:n})),"aria-hidden":!n,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[o||jsx(Loader2,{className:u(ET[r],"animate-spin text-primary")}),a&&jsx("span",{className:"text-sm text-muted-foreground",children:a})]})})]}));Tb.displayName="LoadingOverlay";var Mb=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"}}),Nb=_.forwardRef(({className:e,color:t,isLoading:n=false,progress:r,showSpinner:o=false,...a},s)=>{let[i,l]=_.useState(0),[c,d]=_.useState(false),m=_.useRef(null);return _.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(Mb({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")})})]})});Nb.displayName="NProgress";var Lb=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}}),kb={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},VT={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},Sb=_.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(VT[n||"md"],"animate-bounce rounded-full bg-current",l),style:{animationDelay:`${d*.15}s`}},d))});case "pulse":return jsx("div",{className:u(kb[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(kb[n||"md"],"animate-spin",l)})}};return jsx("div",{ref:i,className:u(Lb({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})]})})});Sb.displayName="Loading";var zT=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),OT=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-8 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-12 py-3 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}}),BT=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"}}),FT=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"}}),Cs={"dd/MM/yyyy":"/","MM/dd/yyyy":"/","yyyy-MM-dd":"-","dd.MM.yyyy":"."},wl={"dd/MM/yyyy":["day","month","year"],"MM/dd/yyyy":["month","day","year"],"yyyy-MM-dd":["year","month","day"],"dd.MM.yyyy":["day","month","year"]},Rl=(e,t)=>String(e).padStart(t,"0"),Db=(e,t)=>{if(!e)return "";let n=Rl(e.getDate(),2),r=Rl(e.getMonth()+1,2),o=Rl(e.getFullYear(),4),a=Cs[t],s=wl[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},ys=(e,t)=>{let n=Cs[t],r=e.split(n);if(r.length!==3)return null;let o=wl[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},KT=e=>{let t=Cs[e];return wl[e].map(r=>r==="year"?"####":"##").join(t)},ea=(e,t)=>{if(!e?.from)return "";let n=Db(e.from,t),r=e.to?Db(e.to,t):"";return n&&r?`${n} - ${r}`:n},Hb=_.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:w="text",fullWidth:x=false,numberOfMonths:R=2,align:C="start",disabled:y,placeholder:N,id:T,...k},M)=>{let P=_.useId(),E=T||P,D=`${E}-description`,H=`${E}-error`,[L,S]=_.useState(f),[V,A]=_.useState(""),[B,I]=_.useState(false),[F,K]=_.useState(false),Y=m!==void 0?m:L,q=a&&r,$=KT(b),O=Cs[b],W=" - ";_.useEffect(()=>{F||A(ea(Y,b));},[Y,b,F]);let z=le=>{m===void 0&&S(le),p?.(le);},j=le=>{z(le),A(ea(le,b)),le?.from&&le?.to&&I(false);},oe=le=>{let Be=le.target.value;Be=Be.replace(new RegExp(`[^0-9\\${O}\\s-]`,"g"),"");let me=`${$}${W}${$}`,wt=Be.replace(new RegExp(`[\\${O}\\s-]`,"g"),""),gt="",yn=0;for(let Fe=0;Fe<me.length&&yn<wt.length;Fe++)me[Fe]==="#"?(gt+=wt[yn],yn++):gt+=me[Fe];if(A(gt),gt.length===me.length){let Fe=gt.split(W);if(Fe.length===2){let on=ys(Fe[0].trim(),b),Ct=ys(Fe[1].trim(),b);if(on&&Ct){if(g&&(on<g||Ct<g)||h&&(on>h||Ct>h))return;on<=Ct&&z({from:on,to:Ct});}}}},ge=()=>{K(true);},G=()=>{K(false);let le=`${$}${W}${$}`;if(V.length!==le.length)A(ea(Y,b));else {let Be=V.split(W);if(Be.length!==2)A(ea(Y,b));else {let me=ys(Be[0].trim(),b),wt=ys(Be[1].trim(),b);(!me||!wt||me>wt)&&A(ea(Y,b));}}},Pe=()=>{y||I(true);},Z=()=>{!y&&w==="picker"&&v&&I(true);};return jsxs("div",{className:u(zT({size:s}),e),children:[t&&jsxs("label",{htmlFor:E,className:u(FT({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs(ot,{open:v&&B,onOpenChange:I,children:[jsxs(an,{className:u("relative",x?"w-full":"w-fit"),children:[jsx("input",{ref:M,id:E,type:"text",inputMode:w==="text"?"numeric":void 0,value:V,onChange:w==="text"?oe:void 0,onClick:Z,onFocus:ge,onBlur:G,readOnly:w==="picker","aria-invalid":a,"aria-describedby":q?H:n?D:void 0,"aria-required":o,disabled:y,placeholder:N||`${b.toLowerCase()} - ${b.toLowerCase()}`,className:u(OT({size:s,isInvalid:a,fullWidth:x,showPickerIcon:v}),w==="picker"&&v&&"cursor-pointer",l),style:{borderColor:F||v&&B?"var(--color-foreground)":void 0},...k}),v&&jsx("button",{type:"button",onClick:Pe,disabled:y,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(BT({size:s}))})})]}),v&&jsx(at,{className:"w-auto p-0",align:C,children:jsx(no,{mode:"range",selected:Y,onSelect:j,numberOfMonths:R,disabled:le=>!!(g&&le<g||h&&le>h),defaultMonth:Y?.from,showMonthAndYearPickers:true})})]}),n&&!q&&jsx("p",{id:D,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),q&&jsx("p",{id:H,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Hb.displayName="DateRangePicker";var mo=e=>String(e).padStart(2,"0"),Ib=_.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]=_.useState(false),d=r?Array.from({length:24},(x,R)=>R):Array.from({length:12},(x,R)=>R+1),m=Array.from({length:Math.floor(60/o)},(x,R)=>R*o),f=x=>{if(!x)return n;if(r)return `${mo(x.hours)}:${mo(x.minutes)}`;let R=x.hours%12||12,C=x.hours>=12?"PM":"AM";return `${mo(R)}:${mo(x.minutes)} ${C}`},p=x=>{let R=e?.minutes??0,C=x;if(!r&&e){let y=e.hours>=12;y&&x!==12?C=x+12:!y&&x===12&&(C=0);}t?.({hours:C,minutes:R});},g=x=>{let R=e?.hours??0;t?.({hours:R,minutes:x});},h=x=>{if(!e)return;let R=e.hours;x==="AM"&&e.hours>=12?R=e.hours-12:x==="PM"&&e.hours<12&&(R=e.hours+12),t?.({hours:R,minutes:e.minutes});},b=()=>{let x=new Date;t?.({hours:x.getHours(),minutes:x.getMinutes()});},v=e?e.hours>=12?"PM":"AM":void 0,w=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(De,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:d.map(x=>jsx(ae,{variant:w===x?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(x),children:mo(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(De,{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:mo(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"})]})]})]})});Ib.displayName="TimePicker";var Vb=cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function UT({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=_.useRef(null),[p,g]=_.useState(0);_.useImperativeHandle(m,()=>f.current);let h=n.length*(r+l)-l,b=r+l,v=Math.max(0,Math.floor(p/b)-a),w=Math.ceil(o/b)+2*a,x=Math.min(n.length-1,v+w),R=y=>{let N=y.currentTarget.scrollTop;g(N),c?.(N);},C=_.useMemo(()=>{let y=[];for(let N=v;N<=x;N++)n[N]!==void 0&&y.push({item:n[N],index:N,style:{position:"absolute",top:N*b,left:0,right:0,height:r}});return y},[n,v,x,b,r]);return jsx("div",{ref:f,className:u(Vb({variant:t,className:e})),style:{height:o,position:"relative"},onScroll:R,...d,children:jsx("div",{style:{height:h,position:"relative"},children:C.map(({item:y,index:N,style:T})=>jsx("div",{style:T,children:s(y,N)},i?i(y,N):N))})})}var WT=_.forwardRef(UT);var zb=cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),Tl=cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),Ob=_.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,...f},p)=>{let g=_.useRef(null),h=_.useRef(null),b=_.useRef(false);_.useImperativeHandle(p,()=>g.current),_.useEffect(()=>{let w=h.current;if(!w)return;let x=new IntersectionObserver(R=>{let[C]=R;C.isIntersecting&&a&&!s&&!b.current&&(b.current=true,Promise.resolve(o()).finally(()=>{b.current=false;}));},{root:d?null:g.current,rootMargin:c||`${l}px`,threshold:0});return x.observe(w),()=>{x.disconnect();}},[a,s,o,l,c,d]);let v=jsx("div",{className:u(Tl({size:n})),children:jsx(Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})});return jsxs("div",{ref:g,className:u(zb({variant:t,className:e})),...f,children:[r,jsx("div",{ref:h,className:"h-px w-full"}),s&&(i||v),!a&&!s&&m&&jsx("div",{className:u(Tl({size:n}),"text-muted-foreground text-sm"),children:m})]})});Ob.displayName="InfiniteScroll";var rM=e=>e.map(t=>typeof t=="string"?{src:t}:t),Ml=_.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=_.useMemo(()=>rM(e),[e]),[v,w]=_.useState(r),[x,R]=_.useState(1),[C,y]=_.useState(0),[N,T]=_.useState(false),[k,M]=_.useState(false),[P,E]=_.useState({x:0,y:0}),[D,H]=_.useState({x:0,y:0}),[L,S]=_.useState(false),V=_.useRef(null),A=b[v];_.useEffect(()=>{S(true);},[]),_.useEffect(()=>{w(r);},[r]),_.useEffect(()=>{o?.(v);},[v,o]),_.useEffect(()=>{R(1),y(0),E({x:0,y:0});},[v]),_.useEffect(()=>{if(t)return Gt(),()=>Ut()},[t]);let B=_.useCallback(()=>{w(Z=>Z>0?Z-1:b.length-1);},[b.length]),I=_.useCallback(()=>{w(Z=>Z<b.length-1?Z+1:0);},[b.length]),F=()=>{R(Z=>Math.min(Z+.5,4));},K=()=>{R(Z=>{let le=Math.max(Z-.5,.5);return le===1&&E({x:0,y:0}),le});},Y=()=>{y(Z=>(Z+90)%360);},q=async()=>{if(A)try{let le=await(await fetch(A.src)).blob(),Be=URL.createObjectURL(le),me=document.createElement("a");me.href=Be,me.download=A.alt||`image-${v+1}`,document.body.appendChild(me),me.click(),document.body.removeChild(me),URL.revokeObjectURL(Be);}catch{window.open(A.src,"_blank");}},$=async()=>{if(V.current)if(N)try{await document.exitFullscreen(),T(!1);}catch{}else try{await V.current.requestFullscreen(),T(!0);}catch{}},O=Z=>{x>1&&(M(true),H({x:Z.clientX-P.x,y:Z.clientY-P.y}));},W=Z=>{k&&x>1&&E({x:Z.clientX-D.x,y:Z.clientY-D.y});},z=()=>{M(false);},j=()=>{n?.(false);},oe=Z=>{p&&Z.target===Z.currentTarget&&j();},ge=_.useCallback(Z=>{switch(Z.key){case "ArrowLeft":B();break;case "ArrowRight":I();break;case "Escape":n?.(false);break;case "+":case "=":F();break;case "-":K();break}},[B,I,n]);if(_.useEffect(()=>{if(t)return window.addEventListener("keydown",ge),()=>window.removeEventListener("keydown",ge)},[t,ge]),_.useEffect(()=>{let Z=()=>{T(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",Z),()=>document.removeEventListener("fullscreenchange",Z)},[]),b.length===0)return null;let G=a?_.isValidElement(a)?_.cloneElement(a,{onClick:Z=>{a.props.onClick?.(Z),n?.(true);}}):jsx("button",{type:"button",onClick:()=>n?.(true),children:a}):null;return jsxs(Fragment,{children:[G,!L||!t?null:za.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:oe}),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]}),A?.title&&jsx("span",{className:"ml-4 text-sm font-medium",children:A.title})]}),jsxs("div",{className:"flex items-center gap-1",children:[i&&jsxs(Fragment,{children:[jsx("button",{onClick:K,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:F,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:Y,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:q,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:$,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:j,className:"rounded-full p-2 hover:bg-white/10 transition-colors ml-2",children:[jsx(X,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}),jsxs("div",{ref:V,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:O,onMouseMove:W,onMouseUp:z,onMouseLeave:z,children:[m&&b.length>1&&jsxs(Fragment,{children:[jsx("button",{onClick:B,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:I,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:A?.src,alt:A?.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(${P.x}px, ${P.y}px) scale(${x}) rotate(${C}deg)`},draggable:false})]}),A?.description&&jsx("div",{className:"p-4 text-center text-white text-sm",children:A.description}),s&&b.length>1&&jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:b.map((Z,le)=>jsx("button",{onClick:()=>w(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:Z.src,alt:Z.alt||`Thumbnail ${le+1}`,className:"h-full w-full object-cover"})},le))})]})]}),document.body)]})});Ml.displayName="ImageViewer";var Fb=({children:e,images:t,index:n=0,className:r})=>{let[o,a]=_.useState(false);return jsxs(Fragment,{children:[jsx("button",{onClick:()=>a(true),className:u("cursor-zoom-in",r),children:e}),jsx(Ml,{images:t,open:o,onOpenChange:a,initialIndex:n})]})};Fb.displayName="ImageViewerTrigger";var Kb=cva("absolute rounded-full border-2 border-background",{variants:{color:{default:"bg-muted-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},size:{sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3"},position:{"top-right":"top-0 right-0 -translate-y-1/3 translate-x-1/3","top-left":"top-0 left-0 -translate-y-1/3 -translate-x-1/3","bottom-right":"bottom-0 right-0 translate-y-1/3 translate-x-1/3","bottom-left":"bottom-0 left-0 translate-y-1/3 -translate-x-1/3"},ping:{true:"",false:""}},defaultVariants:{color:"primary",size:"md",position:"top-right",ping:false}}),$b=_.forwardRef(({className:e,color:t,size:n,position:r,ping:o,content:a,show:s=true,offset:i,style:l,...c},d)=>{if(!s)return null;let m=a!=null;return jsxs("span",{ref:d,className:u(Kb({color:t,size:m?void 0:n,position:r,ping:o}),m&&"flex h-auto w-auto min-w-[1.25rem] items-center justify-center px-1 py-0.5 text-[10px] font-medium text-white",e),style:{...l,...i!==void 0&&{transform:`translate(${r?.includes("right")?i:-i}px, ${r?.includes("top")?-i:i}px)`}},...c,children:[o&&jsx("span",{className:u("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",t==="default"&&"bg-muted-foreground",t==="primary"&&"bg-primary",t==="secondary"&&"bg-secondary",t==="success"&&"bg-success",t==="warning"&&"bg-warning",t==="danger"&&"bg-danger")}),a]})});$b.displayName="Indicator";var Gb=_.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("relative inline-flex",e),...n,children:t}));Gb.displayName="IndicatorWrapper";var Wb=cva("relative overflow-auto",{variants:{orientation:{vertical:"",horizontal:"",both:""},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"vertical",size:"md"}}),jb=_.forwardRef(({className:e,orientation:t,size:n,hideScrollbar:r=false,shadowColor:o="rgba(0, 0, 0, 0.1)",children:a,...s},i)=>{let l=_.useRef(null),[c,d]=_.useState({top:false,bottom:false,left:false,right:false});_.useImperativeHandle(i,()=>l.current);let m=_.useCallback(()=>{let v=l.current;if(!v)return;let{scrollTop:w,scrollLeft:x,scrollHeight:R,scrollWidth:C,clientHeight:y,clientWidth:N}=v;d({top:w>0,bottom:w<R-y-1,left:x>0,right:x<C-N-1});},[]);_.useEffect(()=>{let v=l.current;if(v)return m(),v.addEventListener("scroll",m),window.addEventListener("resize",m),()=>{v.removeEventListener("scroll",m),window.removeEventListener("resize",m);}},[m]);let p={sm:"20px",md:"40px",lg:"60px"}[n??"md"],g=t==="vertical"||t==="both",h=t==="horizontal"||t==="both",b={maskImage:[g&&c.top&&`linear-gradient(to bottom, transparent, black ${p})`,g&&c.bottom&&`linear-gradient(to top, transparent, black ${p})`,h&&c.left&&`linear-gradient(to right, transparent, black ${p})`,h&&c.right&&`linear-gradient(to left, transparent, black ${p})`].filter(Boolean).join(", ")||void 0,maskComposite:"intersect",WebkitMaskComposite:"source-in"};return jsx("div",{ref:l,className:u(Wb({orientation:t,size:n}),r&&"scrollbar-hide [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",e),style:b,...s,children:a})});jb.displayName="ScrollShadow";var _b=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"}}),cM={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"},dM={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"},uM=e=>{let t=e.toLowerCase();return cM[t]||e.toUpperCase()},na=e=>{let t=e.toLowerCase();return dM[t]||t},Ns=e=>{let t=na(e);return ["meta","control","alt","shift"].includes(t)},Yb=_.forwardRef(({className:e,variant:t,size:n,keys:r,children:o,onPress:a,disabled:s,preventDefault:i=true,...l},c)=>{_.useEffect(()=>{if(!a||!r||s)return;let m=Array.isArray(r)?r:[r],f=m.filter(Ns).map(na),p=m.filter(h=>!Ns(h)).map(na),g=h=>{let b=f.includes("meta")===h.metaKey,v=f.includes("control")===h.ctrlKey,w=f.includes("alt")===h.altKey,x=f.includes("shift")===h.shiftKey,R=p.length===0||p.includes(h.key.toLowerCase());b&&v&&w&&x&&R&&(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(_.Fragment,{children:[p>0&&jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsx("span",{children:uM(f)})]},p)):o;return jsx("kbd",{ref:c,className:u(_b({variant:t,size:n}),s&&"opacity-50",e),...l,children:d()})});Yb.displayName="Kbd";function mM(e,t,n={}){let{disabled:r=false,preventDefault:o=true}=n;_.useEffect(()=>{if(r)return;let a=Array.isArray(e)?e:[e],s=a.filter(Ns).map(na),i=a.filter(c=>!Ns(c)).map(na),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 Xb=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"}}),qb=_.forwardRef(({className:e,size:t,value:n,successDuration:r=2e3,onCopySuccess:o,onCopyError:a,copyIcon:s,successIcon:i,...l},c)=>{let[d,m]=_.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(Xb({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}})})});qb.displayName="CopyButton";var Qb=cva("flex flex-col bg-background",{variants:{variant:{default:"border rounded-lg",bordered:"border-2 rounded-lg",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"md"}}),yM=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],RM=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function wM(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 CM(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 Es(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Ps(e){return Es(e,new Date)}function Zb(e,t){return e.filter(n=>{let r=new Date(n.start),o=new Date(n.end);return Es(r,t)||Es(o,t)||r<t&&o>t})}var Jb=_.forwardRef(({className:e,variant:t,size:n,events:r=[],view:o="month",onViewChange:a,date:s,onDateChange:i,onEventClick:l,onSlotClick:c,weekStartsOn:d=0,locale:m="en-US",...f},p)=>{let[g,h]=_.useState(new Date),b=s??g,v=M=>{i?i(M):h(M);},w=d===1?RM:yM,x=()=>{let M=new Date(b);o==="month"?M.setMonth(M.getMonth()-1):o==="week"?M.setDate(M.getDate()-7):M.setDate(M.getDate()-1),v(M);},R=()=>{let M=new Date(b);o==="month"?M.setMonth(M.getMonth()+1):o==="week"?M.setDate(M.getDate()+7):M.setDate(M.getDate()+1),v(M);},C=()=>{v(new Date);},y=()=>o==="day"?b.toLocaleDateString(m,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):b.toLocaleDateString(m,{year:"numeric",month:"long"}),N=()=>{let M=wM(b.getFullYear(),b.getMonth(),d);return jsxs("div",{className:"flex-1 flex flex-col",children:[jsx("div",{className:"grid grid-cols-7 border-b",children:w.map(P=>jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:P},P))}),jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:M.map((P,E)=>{let D=Zb(r,P),H=P.getMonth()===b.getMonth();return jsxs("div",{className:u("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!H&&"bg-muted/30"),onClick:()=>c?.(P),children:[jsx("div",{className:u("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",Ps(P)&&"bg-primary text-primary-foreground",!H&&"text-muted-foreground"),children:P.getDate()}),jsxs("div",{className:"space-y-0.5",children:[D.slice(0,3).map(L=>jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:L.color||"hsl(var(--primary))",color:"white"},onClick:S=>{S.stopPropagation(),l?.(L);},children:L.title},L.id)),D.length>3&&jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",D.length-3," more"]})]})]},E)})})]})},T=()=>{let M=CM(b,d),P=Array.from({length:24},(E,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((E,D)=>jsxs("div",{className:u("p-2 text-center border-l",Ps(E)&&"bg-primary/10"),children:[jsx("div",{className:"text-xs text-muted-foreground",children:w[D]}),jsx("div",{className:u("text-lg font-semibold",Ps(E)&&"text-primary"),children:E.getDate()})]},D))]}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:P.map(E=>jsxs(_.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[E.toString().padStart(2,"0"),":00"]}),M.map((D,H)=>{let L=new Date(D);L.setHours(E,0,0,0);let S=r.filter(V=>{let A=new Date(V.start);return Es(A,D)&&A.getHours()===E});return jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>c?.(L),children:S.map(V=>jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:V.color||"hsl(var(--primary))",color:"white"},onClick:A=>{A.stopPropagation(),l?.(V);},children:V.title},V.id))},H)})]},E))})})]})},k=()=>{let M=Array.from({length:24},(E,D)=>D),P=Zb(r,b);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsx("div",{className:"p-4 border-b text-center",children:jsx("div",{className:u("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",Ps(b)&&"bg-primary text-primary-foreground"),children:b.getDate()})}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_1fr]",children:M.map(E=>{let D=new Date(b);D.setHours(E,0,0,0);let H=P.filter(L=>new Date(L.start).getHours()===E);return jsxs(_.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[E.toString().padStart(2,"0"),":00"]}),jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>c?.(D),children:H.map(L=>jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:L.color||"hsl(var(--primary))",color:"white"},onClick:S=>{S.stopPropagation(),l?.(L);},children:L.title},L.id))})]},E)})})})]})};return jsxs("div",{ref:p,className:u(Qb({variant:t,size:n,className:e})),...f,children:[jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(ae,{variant:"flat",size:"sm",onClick:C,children:"Today"}),jsx(ae,{variant:"flat",size:"icon",onClick:x,children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"flat",size:"icon",onClick:R,children:jsx(ChevronRight,{className:"h-4 w-4"})}),jsx("h2",{className:"text-lg font-semibold ml-2",children:y()})]}),jsx("div",{className:"flex items-center gap-1 border rounded-lg p-1",children:["month","week","day"].map(M=>jsx(ae,{variant:o===M?"solid":"ghost",size:"sm",onClick:()=>a?.(M),children:M.charAt(0).toUpperCase()+M.slice(1)},M))})]}),o==="month"&&N(),o==="week"&&T(),o==="day"&&k()]})});Jb.displayName="FullCalendar";var Hs=({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))})]}),oa=cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),aa=["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%))"],ev=_.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=aa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",curveType:c="monotone",...d},m)=>jsx("div",{ref:m,className:u(oa({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(Hs,{})}),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))]})})}));ev.displayName="LineChart";var tv=_.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=aa,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(oa({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(Hs,{})}),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))]})})}));tv.displayName="BarChart";var nv=_.forwardRef(({className:e,size:t,data:n,dataKey:r="value",nameKey:o="name",colors:a=aa,innerRadius:s=0,outerRadius:i=80,showLegend:l=true,showTooltip:c=true,showLabels:d=false,...m},f)=>jsx("div",{ref:f,className:u(oa({size:t,className:e})),...m,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(PieChart,{children:[c&&jsx(Tooltip,{content:jsx(Hs,{})}),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}`))})]})})}));nv.displayName="PieChart";var rv=_.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=aa,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(oa({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(Hs,{})}),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))]})})}));rv.displayName="AreaChart";var sv=cva("flex gap-4 overflow-x-auto p-4",{variants:{variant:{default:"bg-muted/30",bordered:"border rounded-lg bg-background",ghost:""}},defaultVariants:{variant:"default"}}),iv=cva("flex flex-col min-w-[280px] w-[280px] rounded-lg",{variants:{variant:{default:"bg-muted/50",bordered:"border bg-background",ghost:"bg-transparent"}},defaultVariants:{variant:"default"}}),Hl=cva("rounded-lg p-3 cursor-grab active:cursor-grabbing transition-all",{variants:{variant:{default:"bg-background border shadow-sm hover:shadow-md",bordered:"border-2 bg-background hover:border-primary/50",ghost:"bg-muted/50 hover:bg-muted"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg",false:""}},defaultVariants:{variant:"default",isDragging:false}});function jM({card:e,columnId:t,variant: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(Hl({variant:n,isDragging:d})),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 _M({column:e,variant:t,renderCard:n,onCardClick:r,onAddCard:o,showAddCard:a,columnHeight:s}){return jsxs("div",{className:u(iv({variant:t})),children:[jsxs("div",{className:"flex items-center justify-between p-3 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[e.color&&jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),jsx("h3",{className:"font-semibold text-sm",children:e.title}),jsx("span",{className:"text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded-full",children:e.cards.length})]}),a&&jsx(ae,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o?.(e.id),children:jsx(Plus,{className:"h-4 w-4"})})]}),jsx(De,{style:{height:s},children:jsxs("div",{className:"p-2 space-y-2",children:[jsx(SortableContext,{items:e.cards.map(i=>i.id),strategy:verticalListSortingStrategy,children:e.cards.map(i=>jsx(jM,{card:i,columnId:e.id,variant:t,renderCard:n,onCardClick:r},i.id))}),e.cards.length===0&&jsx("div",{className:"h-20 border-2 border-dashed rounded-lg flex items-center justify-center text-muted-foreground text-sm",children:"Drop here"})]})})]})}var lv=_.forwardRef(({className:e,variant:t,columns:n,onCardMove:r,onCardClick:o,onAddCard:a,renderCard:s,showAddCard:i=true,columnHeight:l=500,...c},d)=>{let[m,f]=_.useState(null),[p,g]=_.useState(null),h=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),b=R=>n.find(C=>C.cards.some(y=>y.id===R));return jsxs(DndContext,{sensors:h,collisionDetection:closestCorners,onDragStart:R=>{let{active:C}=R,y=b(C.id);if(y){let N=y.cards.find(T=>T.id===C.id);N&&(f(N),g(y.id));}},onDragOver:R=>{let{active:C,over:y}=R;if(!y)return;let N=C.id,T=y.id,k=b(N),M=b(T)||n.find(D=>D.id===T);if(!k||!M||k.id===M.id)return;let P=M.cards.findIndex(D=>D.id===T),E=P===-1?M.cards.length:P;r?.(N,k.id,M.id,E);},onDragEnd:R=>{let{active:C,over:y}=R;if(y&&C.id!==y.id){let N=b(C.id),T=b(y.id)||n.find(k=>k.id===y.id);if(N&&T){let k=T.cards.findIndex(P=>P.id===y.id),M=k===-1?T.cards.length:k;r?.(C.id,N.id,T.id,M);}}f(null),g(null);},children:[jsx("div",{ref:d,className:u(sv({variant:t,className:e})),...c,children:n.map(R=>jsx(_M,{column:R,variant:t,renderCard:s,onCardClick:o,onAddCard:a,showAddCard:i,columnHeight:l},R.id))}),jsx(DragOverlay,{children:m&&p&&jsx("div",{className:u(Hl({variant:t,isDragging:true})),children:s?s(m,p):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:m.title}),m.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:m.description})]})]})})})]})});lv.displayName="KanbanBoard";var cv=cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),dv=_.createContext(null);function Vs(){let e=_.useContext(dv);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var uv=_.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]=YM({...r,axis:a==="horizontal"?"x":"y"},o),[p,g]=_.useState(false),[h,b]=_.useState(false),[v,w]=_.useState(0),[x,R]=_.useState([]),C=_.useCallback(M=>{M&&(w(M.selectedScrollSnap()),g(M.canScrollPrev()),b(M.canScrollNext()));},[]),y=_.useCallback(()=>{f?.scrollPrev();},[f]),N=_.useCallback(()=>{f?.scrollNext();},[f]),T=_.useCallback(M=>{f?.scrollTo(M);},[f]),k=_.useCallback(M=>{M.key==="ArrowLeft"?(M.preventDefault(),y()):M.key==="ArrowRight"&&(M.preventDefault(),N());},[y,N]);return _.useEffect(()=>{!f||!l||l(f);},[f,l]),_.useEffect(()=>{if(f)return R(f.scrollSnapList()),C(f),f.on("reInit",C),f.on("select",C),()=>{f?.off("select",C);}},[f,C]),jsx(dv.Provider,{value:{carouselRef:m,api:f,scrollPrev:y,scrollNext:N,canScrollPrev:p,canScrollNext:h,selectedIndex:v,scrollSnaps:x,scrollTo:T,orientation:a},children:jsxs("div",{ref:d,className:u(cv({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(Il,{}),jsx(Vl,{})]}),i&&x.length>1&&jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:x.map((M,P)=>jsx("button",{className:u("w-2 h-2 rounded-full transition-all",P===v?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>T(P),"aria-label":`Go to slide ${P+1}`},P))})]})})});uv.displayName="Carousel";var mv=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:u("flex",e),...t}));mv.displayName="CarouselContent";var pv=_.forwardRef(({className:e,basis:t="basis-full",...n},r)=>{let{orientation:o}=Vs();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})});pv.displayName="CarouselItem";var Il=_.forwardRef(({className:e,variant:t="bordered",size:n="icon",...r},o)=>{let{scrollPrev:a,canScrollPrev:s}=Vs();return jsxs(ae,{ref:o,variant:t,size:n,className:u("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:a,...r,children:[jsx(ChevronLeft,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Previous slide"})]})});Il.displayName="CarouselPrevious";var Vl=_.forwardRef(({className:e,variant:t="bordered",size:n="icon",...r},o)=>{let{scrollNext:a,canScrollNext:s}=Vs();return jsxs(ae,{ref:o,variant:t,size:n,className:u("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:a,...r,children:[jsx(ChevronRight,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Next slide"})]})});Vl.displayName="CarouselNext";var fv=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"}}),As={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"}},zl={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}"]},gv=_.forwardRef(({className:e,size:t,onEmojiSelect:n,recentEmojis:r=[],defaultCategory:o="smileys",showSearch:a=true,showCategories:s=true,...i},l)=>{let[c,d]=_.useState(r.length>0?"recent":o),[m,f]=_.useState(""),g=m?Object.values(zl).flat().filter(b=>b.toLowerCase().includes(m.toLowerCase())):c==="recent"?r:zl[c]||[],h=b=>{n?.(b);};return jsxs("div",{ref:l,className:u(fv({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(ka,{placeholder:"Search emojis...",value:m,onChange:b=>f(b.target.value),className:"pl-8 h-8"})]})}),s&&!m&&jsx(De,{orientation:"horizontal",className:"border-b",children:jsx("div",{className:"flex px-1",children:Object.entries(As).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:As[b].name,children:v},b))})}),!m&&jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:As[c].name}),jsx(De,{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"})]})})]})});gv.displayName="EmojiPicker";var bv=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),NN=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"}}),kN=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:"icon",className:"h-7 w-7",onClick:r,disabled:o,children:e})}),jsx(Xn,{side:"top",className:"text-xs",children:t})]}),vv=_.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:[rN.configure({heading:{levels:[1,2,3]}}),oN.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),aN,sN.configure({types:["heading","paragraph"]}),iN.configure({placeholder:a})],content:r,editable:!s,onUpdate:({editor:h})=>{o?.(h.getHTML());},onCreate:({editor:h})=>{d?.(h);}});_.useEffect(()=>{p&&r!==p.getHTML()&&p.commands.setContent(r);},[r,p]),_.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(jn,{children:jsxs("div",{ref:f,className:u(bv({variant:t,size:n,className:e})),...m,children:[i&&!s&&jsxs("div",{className:u(NN({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(Wn,{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(Wn,{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(Wn,{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(Wn,{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(Wn,{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(Wn,{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(kN({size:n})),style:{minHeight:l,maxHeight:c}})]})}):null});vv.displayName="RichTextEditor";var xv=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function VN(e,t,n){return centerCrop(makeAspectCrop({unit:"%",width:90},n,e,t),e,t)}async function hv(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 yv=_.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=_.useRef(null),[h,b]=_.useState(),[v,w]=_.useState(),[x,R]=_.useState(1),[C,y]=_.useState(0),N=P=>{let{width:E,height:D}=P.currentTarget;if(r){let H=VN(E,D,r);b(H);}else b(m||{unit:"%",x:10,y:10,width:80,height:80});},T=P=>{b(P),o?.(P);},k=async P=>{if(w(P),a&&g.current&&P.width&&P.height){let E=await hv(g.current,P,C,x);a(E);}},M=()=>{y(P=>(P+90)%360);};return _.useEffect(()=>{v&&g.current&&a&&hv(g.current,v,C,x).then(P=>{a(P);});},[x,C,v,a]),jsxs("div",{ref:p,className:u(xv({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(PN,{crop:h,onChange:T,onComplete:k,aspect:r,circularCrop:d,className:"max-h-[400px]",children:jsx("img",{ref:g,src:n,alt:"Crop preview",onLoad:N,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($a,{value:[x],onValueChange:([P])=>R(P),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:"icon",onClick:M,children:jsx(RotateCw,{className:"h-4 w-4"})})]})]})});yv.displayName="ImageCropper";var Kl=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"}}),ON={sm:96,md:128,lg:192},wv=_.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??ON[n??"md"];return r?jsx("div",{ref:h,className:u(Kl({variant:t,size:n,className:e})),...g,children:jsxs("div",{className:"relative inline-block",children:[jsx(AN,{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(Kl({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"})})});wv.displayName="QRCode";var Cv=({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});Cv.displayName="ThemeProvider";var WN=cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),Tv=_.forwardRef(({className:e,variant:t="ghost",size:n="md",mode:r="dropdown"},o)=>{let{theme:a,setTheme:s,resolvedTheme:i}=useTheme(),[l,c]=_.useState(false);_.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:"icon",className:u("h-9 w-9",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:"icon",className:u("h-9 w-9",e),children:[jsx(Sun,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsx(Moon,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),jsxs(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:"icon",className:u("h-9 w-9",e),disabled:true,children:[jsx(Sun,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Toggle theme"})]})});Tv.displayName="ThemeToggle";var Mv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),Nv=cva("flex w-full rounded-md border border-input bg-background ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-12 px-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),kv=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=_.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=_.useId(),v=p||b,w=`${v}-description`,x=`${v}-error`,R=a&&r;return jsxs("div",{className:u(Mv({size:s}),e),children:[t&&jsxs("label",{htmlFor:v,className:u(kv({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":R?x:n?w:void 0,"aria-required":o,className:u(Nv({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&&!R&&jsx("p",{id:w,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),R&&jsx("p",{id:x,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Pv.displayName="TextField";var Sv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),YN=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}}),Ev=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"}}),Lv=cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),XN=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"}}),Dv=_.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:w,fullWidth:x=false,disabled:R,id:C,...y},N)=>{let T=_.useId(),k=C||T,M=`${k}-description`,P=`${k}-error`,[E,D]=_.useState(h),[H,L]=_.useState(false),S=g!==void 0?g:E,V=a&&r,A=_.useCallback(O=>{O!==void 0&&(m!==void 0&&O<m&&(O=m),f!==void 0&&O>f&&(O=f)),g===void 0&&D(O),b?.(O);},[g,m,f,b]),B=()=>{let O=(S??0)+p;A(O);},I=()=>{let O=(S??0)-p;A(O);},F=O=>{let W=O.target.value;if(W==="")A(void 0);else {let z=parseFloat(W);isNaN(z)||A(z);}},K=O=>{O.key==="ArrowUp"?(O.preventDefault(),B()):O.key==="ArrowDown"&&(O.preventDefault(),I());},Y=_.useMemo(()=>S===void 0?"":w?new Intl.NumberFormat(void 0,w).format(S):S.toString(),[S,w]),q=m!==void 0&&S!==void 0&&S<=m,$=f!==void 0&&S!==void 0&&S>=f;return jsxs("div",{className:u(Sv({size:s}),e),children:[t&&jsxs("label",{htmlFor:k,className:u(XN({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:I,disabled:R||q,className:u(Ev({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:u(Lv({size:s}))})}),jsx("input",{ref:N,id:k,type:"text",inputMode:"decimal",value:Y,onChange:F,onKeyDown:K,onFocus:()=>L(true),onBlur:()=>L(false),"aria-invalid":a,"aria-describedby":V?P:n?M:void 0,"aria-required":o,"aria-valuemin":m,"aria-valuemax":f,"aria-valuenow":S,disabled:R,className:u(YN({size:s,isInvalid:a,fullWidth:x}),!v&&"px-3",l),style:{borderColor:H?"var(--color-foreground)":void 0},...y}),v&&jsx("button",{type:"button",onClick:B,disabled:R||$,className:u(Ev({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:u(Lv({size:s}))})})]}),n&&!V&&jsx("p",{id:M,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})]})});Dv.displayName="NumberField";var Iv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),QN=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-12 pl-12 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),Hv=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"}}),JN=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"}}),ek=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"}}),Vv=_.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:w,placeholder:x="Search...",id:R,...C},y)=>{let N=_.useId(),T=R||N,k=`${T}-description`,M=`${T}-error`,[P,E]=_.useState(f),D=m!==void 0?m:P,H=a&&r,L=D.length>0,S=B=>{let I=B.target.value;m===void 0&&E(I),p?.(I);},V=()=>{m===void 0&&E(""),p?.(""),g?.();},A=B=>{B.key==="Enter"?(B.preventDefault(),h?.(D)):B.key==="Escape"&&L&&(B.preventDefault(),V());};return jsxs("div",{className:u(Iv({size:s}),e),children:[t&&jsxs("label",{htmlFor:T,className:u(JN({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(Hv({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsx("input",{ref:y,id:T,type:"search",value:D,onChange:S,onKeyDown:A,placeholder:x,"aria-invalid":a,"aria-describedby":H?M:n?k:void 0,"aria-required":o,disabled:w,className:u(QN({size:s,isInvalid:a}),!v&&"pl-3",!b&&"pr-3",l),...C}),b&&L&&!w&&jsx("button",{type:"button",onClick:V,className:u(ek({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsx(X,{className:u(Hv({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:M,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Vv.displayName="SearchField";var Av=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),nk=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-8 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-12 py-3 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}}),rk=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"}}),ok=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"}}),Ks={"dd/MM/yyyy":"/","MM/dd/yyyy":"/","yyyy-MM-dd":"-","dd.MM.yyyy":"."},Xl={"dd/MM/yyyy":["day","month","year"],"MM/dd/yyyy":["month","day","year"],"yyyy-MM-dd":["year","month","day"],"dd.MM.yyyy":["day","month","year"]},_l=(e,t)=>String(e).padStart(t,"0"),ua=(e,t)=>{if(!e)return "";let n=_l(e.getDate(),2),r=_l(e.getMonth()+1,2),o=_l(e.getFullYear(),4),a=Ks[t],s=Xl[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},Yl=(e,t)=>{let n=Ks[t],r=e.split(n);if(r.length!==3)return null;let o=Xl[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},ak=e=>{let t=Ks[e];return Xl[e].map(r=>r==="year"?"####":"##").join(t)},$s=_.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:w="text",fullWidth:x=false,disabled:R,placeholder:C,id:y,...N},T)=>{let k=_.useId(),M=y||k,P=`${M}-description`,E=`${M}-error`,[D,H]=_.useState(f??null),[L,S]=_.useState(""),[V,A]=_.useState(false),[B,I]=_.useState(false),F=m!==void 0?m:D,K=a&&r,Y=Ks[b],q=ak(b);_.useEffect(()=>{B||S(ua(F,b));},[F,b,B]);let $=G=>{m===void 0&&H(G),p?.(G);},O=G=>{let Pe=G??null;$(Pe),S(ua(Pe,b)),A(false);},W=G=>{let Pe=G.target.value;Pe=Pe.replace(new RegExp(`[^0-9\\${Y}]`,"g"),"");let Z=Pe.replace(new RegExp(`\\${Y}`,"g"),""),le="",Be=0;for(let me=0;me<q.length&&Be<Z.length;me++)q[me]==="#"?(le+=Z[Be],Be++):le+=q[me];if(S(le),le.length===q.length){let me=Yl(le,b);if(me){if(g&&me<g||h&&me>h)return;$(me);}}},z=()=>{I(true);},j=()=>{I(false),L.length!==q.length?S(ua(F,b)):Yl(L,b)||S(ua(F,b));},oe=()=>{R||A(true);},ge=()=>{!R&&w==="picker"&&v&&A(true);};return jsxs("div",{className:u(Av({size:s}),e),children:[t&&jsxs("label",{htmlFor:M,className:u(ok({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs(ot,{open:v&&V,onOpenChange:A,children:[jsxs(an,{className:u("relative",x?"w-full":"w-fit"),children:[jsx("input",{ref:T,id:M,type:"text",inputMode:w==="text"?"numeric":void 0,value:L,onChange:w==="text"?W:void 0,onClick:ge,onFocus:z,onBlur:j,readOnly:w==="picker","aria-invalid":a,"aria-describedby":K?E:n?P:void 0,"aria-required":o,disabled:R,placeholder:C||b.toLowerCase(),className:u(nk({size:s,isInvalid:a,fullWidth:x,showPickerIcon:v}),w==="picker"&&v&&"cursor-pointer",l),style:{borderColor:B||v&&V?"var(--color-foreground)":void 0},...N}),v&&jsx("button",{type:"button",onClick:oe,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(rk({size:s}))})})]}),v&&jsx(at,{className:"w-auto p-0",align:"start",children:jsx(no,{mode:"single",selected:F??void 0,onSelect:O,disabled:G=>!!(g&&G<g||h&&G>h),defaultMonth:F??void 0,showMonthAndYearPickers:true})})]}),n&&!K&&jsx("p",{id:P,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),K&&jsx("p",{id:E,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});$s.displayName="DatePicker";var sk=$s,ik=$s;var zv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),lk=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}}),ck=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"}}),Ov=_.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:w,fullWidth:x=false,id:R,...C},y)=>{let N=_.useId(),T=R||N,k=`${T}-description`,M=`${T}-error`,P=_.useRef(null),E=_.useRef(null),D=_.useRef(null),H=_.useRef(null),[L,S]=_.useState(f??null),V=m!==void 0?m:L,A=a&&r,B=U=>v===24?U:U===0?12:U>12?U-12:U,I=U=>U>=12?"PM":"AM",F=(U,re)=>re==="AM"?U===12?0:U:U===12?12:U+12,[K,Y]=_.useState(V?String(B(V.hour)).padStart(2,"0"):""),[q,$]=_.useState(V?String(V.minute).padStart(2,"0"):""),[O,W]=_.useState(V?.second!==void 0?String(V.second).padStart(2,"0"):""),[z,j]=_.useState(V?I(V.hour):"AM"),[oe,ge]=_.useState(false);_.useEffect(()=>{m!==void 0&&(m?(Y(String(B(m.hour)).padStart(2,"0")),$(String(m.minute).padStart(2,"0")),m.second!==void 0&&W(String(m.second).padStart(2,"0")),j(I(m.hour))):(Y(""),$(""),W("")));},[m,v]);let G=(U,re,X,Se)=>{let de=parseInt(U,10),We=parseInt(re,10),je=b?parseInt(X,10):void 0;if(isNaN(de)||isNaN(We)||b&&isNaN(je)){m===void 0&&S(null),p?.(null);return}let ve={hour:v===12?F(de,Se):de,minute:We,...b&&je!==void 0&&{second:je}};m===void 0&&S(ve),p?.(ve);},Pe=U=>{let re=U.target.value.replace(/\D/g,"").slice(0,2);Y(re);let X=v===24?23:12,Se=v===24?0:1;if(re.length===2){let de=parseInt(re,10);de>=Se&&de<=X&&(E.current?.focus(),E.current?.select());}},Z=U=>{let re=U.target.value.replace(/\D/g,"").slice(0,2);if($(re),re.length===2){let X=parseInt(re,10);X>=0&&X<=59&&(b?(D.current?.focus(),D.current?.select()):v===12&&H.current?.focus());}},le=U=>{let re=U.target.value.replace(/\D/g,"").slice(0,2);W(re),re.length===2&&v===12&&H.current?.focus();},Be=()=>{if(K){let U=parseInt(K,10),re=v===24?23:12,Se=Math.min(Math.max(U,v===24?0:1),re),de=String(Se).padStart(2,"0");Y(de),G(de,q,O,z);}},me=()=>{if(q){let U=parseInt(q,10),re=Math.min(Math.max(U,0),59),X=String(re).padStart(2,"0");$(X),G(K,X,O,z);}},wt=()=>{if(O){let U=parseInt(O,10),re=Math.min(Math.max(U,0),59),X=String(re).padStart(2,"0");W(X),G(K,q,X,z);}},gt=()=>{let U=z==="AM"?"PM":"AM";j(U),G(K,q,O,U);},yn=U=>{let re=U.key.toLowerCase();re==="a"?(U.preventDefault(),z!=="AM"&&(j("AM"),G(K,q,O,"AM"))):re==="p"?(U.preventDefault(),z!=="PM"&&(j("PM"),G(K,q,O,"PM"))):re==="arrowup"||re==="arrowdown"?(U.preventDefault(),gt()):re==="arrowleft"&&(U.preventDefault(),b?(D.current?.focus(),D.current?.select()):(E.current?.focus(),E.current?.select()));},Fe=(U,re)=>{if(U.key==="ArrowUp"||U.key==="ArrowDown"){U.preventDefault();let X=U.key==="ArrowUp"?1:-1;if(re==="hour"){let Se=parseInt(K,10)||0,de=v===24?23:12,We=v===24?0:1,je=Se+X;je>de&&(je=We),je<We&&(je=de);let Gn=String(je).padStart(2,"0");Y(Gn),G(Gn,q,O,z);}else if(re==="minute"){let de=(parseInt(q,10)||0)+X;de>59&&(de=0),de<0&&(de=59);let We=String(de).padStart(2,"0");$(We),G(K,We,O,z);}else if(re==="second"){let de=(parseInt(O,10)||0)+X;de>59&&(de=0),de<0&&(de=59);let We=String(de).padStart(2,"0");W(We),G(K,q,We,z);}}U.key==="ArrowRight"&&(U.preventDefault(),re==="hour"?(E.current?.focus(),E.current?.select()):re==="minute"&&b?(D.current?.focus(),D.current?.select()):(re==="minute"&&!b&&v===12||re==="second"&&v===12)&&H.current?.focus()),U.key==="ArrowLeft"&&(U.preventDefault(),re==="minute"?(P.current?.focus(),P.current?.select()):re==="second"&&(E.current?.focus(),E.current?.select())),U.key==="Backspace"&&U.currentTarget.value===""&&(re==="minute"?P.current?.focus():re==="second"&&E.current?.focus());},Ct=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",w&&"cursor-not-allowed");return jsxs("div",{ref:y,className:u(zv({size:s}),e),...C,children:[t&&jsxs("label",{htmlFor:T,className:u(ck({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:u(lk({size:s,isInvalid:a,disabled:w,fullWidth:x}),l),style:{borderColor:oe?"var(--color-foreground)":void 0},onFocus:()=>ge(true),onBlur:U=>{U.currentTarget.contains(U.relatedTarget)||ge(false);},children:[jsx("input",{ref:P,id:T,type:"text",inputMode:"numeric",placeholder:v===24?"HH":"hh",value:K,onChange:Pe,onBlur:Be,onKeyDown:U=>Fe(U,"hour"),onFocus:U=>U.target.select(),"aria-label":"Hour","aria-invalid":a,"aria-describedby":A?M:n?k:void 0,"aria-required":o,disabled:w,className:Ct}),jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:E,type:"text",inputMode:"numeric",placeholder:"mm",value:q,onChange:Z,onBlur:me,onKeyDown:U=>Fe(U,"minute"),onFocus:U=>U.target.select(),"aria-label":"Minute",disabled:w,className:Ct}),b&&jsxs(Fragment,{children:[jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:D,type:"text",inputMode:"numeric",placeholder:"ss",value:O,onChange:le,onBlur:wt,onKeyDown:U=>Fe(U,"second"),onFocus:U=>U.target.select(),"aria-label":"Second",disabled:w,className:Ct})]}),v===12&&jsx("button",{ref:H,type:"button",onClick:gt,onKeyDown:yn,disabled:w,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",w&&"cursor-not-allowed"),"aria-label":"AM/PM",children:z})]}),n&&!A&&jsx("p",{id:k,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),A&&jsx("p",{id:M,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Ov.displayName="TimeField";var Fv=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"}}),Kv=_.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"],w=(R,C)=>{C&&C(),l&&l(R);},x=R=>jsxs("button",{type:"button",disabled:i||R.isDisabled,onClick:()=>w(R.key,R.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":R.label,children:[R.icon&&jsx("span",{className:v,children:R.icon}),c&&jsx("span",{children:R.label})]},R.key);return jsxs("div",{ref:f,role:"group",className:u(Fv({variant:t,orientation:n,size:r,density:o,className:e})),...m,children:[p.map(R=>d?d(R):x(R)),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(R=>jsxs($t,{disabled:R.isDisabled,onClick:()=>w(R.key,R.onPress),children:[R.icon&&jsx("span",{className:u(v,"mr-2"),children:R.icon}),R.label]},R.key))})]})]})});Kv.displayName="ActionGroup";var Wv=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"}}),pk=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}}),jv=_.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(Wv({variant:t,size:n,className:e})),...s,children:[jsx("span",{className:u(pk({size:n,pulse:r})),"aria-hidden":"true"}),!o&&a&&jsx("span",{className:"text-foreground",children:a})]}));jv.displayName="StatusLight";var Yv=cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-3 max-w-xs",md:"gap-4 max-w-sm",lg:"gap-5 max-w-md"}},defaultVariants:{size:"md"}}),gk=cva("text-muted-foreground",{variants:{size:{sm:"[&>svg]:h-16 [&>svg]:w-16",md:"[&>svg]:h-24 [&>svg]:w-24",lg:"[&>svg]:h-32 [&>svg]:w-32"}},defaultVariants:{size:"md"}}),bk=cva("font-semibold text-foreground",{variants:{size:{sm:"text-base",md:"text-lg",lg:"text-xl"}},defaultVariants:{size:"md"}}),vk=cva("text-muted-foreground",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Xv=_.forwardRef(({className:e,size:t,illustration:n,heading:r,description:o,children:a,...s},i)=>jsxs("div",{ref:i,className:u(Yv({size:t,className:e})),...s,children:[n&&jsx("div",{className:u(gk({size:t})),"aria-hidden":"true",children:n}),r&&jsx("h3",{className:u(bk({size:t})),children:r}),o&&jsx("p",{className:u(vk({size:t})),children:o}),a&&jsx("div",{className:"mt-2",children:a})]}));Xv.displayName="IllustratedMessage";var Qv=cva("relative flex gap-3 rounded-lg border p-4 text-sm",{variants:{variant:{info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-100 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-950 dark:text-green-100 [&>svg]:text-green-600 dark:[&>svg]:text-green-400",warning:"border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-100 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",error:"border-red-200 bg-red-50 text-red-900 dark:border-red-800 dark:bg-red-950 dark:text-red-100 [&>svg]:text-red-600 dark:[&>svg]:text-red-400",neutral:"border-border bg-muted text-foreground [&>svg]:text-muted-foreground"}},defaultVariants:{variant:"info"}}),Tk={info:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle,neutral:Info},Jv=_.forwardRef(({className:e,variant:t,title:n,icon:r,hideIcon:o=false,isDismissible:a=false,onDismiss:s,actions:i,children:l,...c},d)=>{let[m,f]=_.useState(true);if(!m)return null;let p=Tk[t??"info"],g=()=>{f(false),s?.();};return jsxs("div",{ref:d,role:"alert",className:u(Qv({variant:t,className:e})),...c,children:[!o&&jsx("div",{className:"flex-shrink-0",children:r||jsx(p,{className:"h-5 w-5"})}),jsxs("div",{className:"flex-1 space-y-1",children:[n&&jsx("div",{className:"font-medium",children:n}),l&&jsx("div",{className:"opacity-90",children:l}),i&&jsx("div",{className:"mt-3 flex gap-2",children:i})]}),a&&jsx("button",{type:"button",onClick:g,className:"absolute right-2 top-2 rounded-md p-1 opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Dismiss",children:jsx(X,{className:"h-4 w-4"})})]})});Jv.displayName="InlineAlert";var eh=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"}}),th=_.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(eh({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(Mt,{size:"sm",onClick:a,"aria-label":"Close action bar"})]})]})});th.displayName="ActionBar";var nh=_.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]}));nh.displayName="ActionBarButton";var ah=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"}}),sh=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 ih({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]=_.useState(new Set),[h,b]=_.useState(null),[v,w]=_.useState(null),x=_.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),R=T=>{if(a==="none")return;let k;a==="single"?k=x.has(T)?new Set:new Set([T]):(k=new Set(x),k.has(T)?k.delete(T):k.add(T)),o||g(k),s?.(k);},C=(T,k)=>{b(k),T.dataTransfer.effectAllowed="move";},y=(T,k)=>{T.preventDefault(),h!==k&&w(k);},N=()=>{if(h&&v&&h!==v){let T=r.findIndex(E=>E.key===h),k=r.findIndex(E=>E.key===v),M=[...r],[P]=M.splice(T,1);M.splice(k,0,P),l?.(M);}b(null),w(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(ah({variant:t,size:n,className:e})),...f,children:r.map(T=>{let k=x.has(T.key),M=h===T.key,P=v===T.key;return d?jsx("div",{role:"option","aria-selected":k,onClick:()=>R(T.key),children:d(T,k)},T.key):jsxs("div",{role:"option","aria-selected":k,"aria-disabled":T.isDisabled,draggable:i&&!T.isDisabled,onDragStart:E=>C(E,T.key),onDragOver:E=>y(E,T.key),onDragEnd:N,onClick:()=>!T.isDisabled&&R(T.key),className:u(sh({variant:t,size:n,isSelected:k,isDisabled:T.isDisabled}),M&&"opacity-50",P&&"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"})}),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)})})}ih.displayName="ListView";var lh=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"}}),Ek=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"}}),Lk=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"}}),ch=_.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,w]=_.useState(o),x=r!==void 0,R=x?r:v,C=_.useRef(null),[y,N]=_.useState(false),[T,k]=_.useState(null),M=(I,F)=>{if(!C.current)return R[0];let K=C.current.getBoundingClientRect(),Y;t==="horizontal"?Y=(I-K.left)/K.width:Y=1-(F-K.top)/K.height,Y=Math.max(0,Math.min(1,Y));let q=i+Y*(l-i),$=Math.round(q/c)*c;return Math.max(i,Math.min(l,$))},P=(I,F)=>{let K=[...R];K[F]=I,F===0&&I>R[1]&&(K[0]=R[1]),F===1&&I<R[0]&&(K[1]=R[0]),x||w(K),a?.(K);},E=(I,F)=>{d||(I.preventDefault(),N(true),k(F),I.target.setPointerCapture(I.pointerId));},D=I=>{if(!y||T===null||d)return;let F=M(I.clientX,I.clientY);P(F,T);},H=()=>{y&&(N(false),k(null),s?.(R));},L=I=>{if(d)return;let F=M(I.clientX,I.clientY),K=Math.abs(R[0]-F),Y=Math.abs(R[1]-F),q=K<=Y?0:1;P(F,q);let $=[...R];$[q]=F,s?.($);},S=(I,F)=>{if(d)return;let K=R[F];switch(I.key){case "ArrowRight":case "ArrowUp":I.preventDefault(),K=Math.min(l,R[F]+c);break;case "ArrowLeft":case "ArrowDown":I.preventDefault(),K=Math.max(i,R[F]-c);break;case "Home":I.preventDefault(),K=i;break;case "End":I.preventDefault(),K=l;break;default:return}P(K,F);let Y=[...R];Y[F]=K,s?.(Y);},V=I=>(I-i)/(l-i)*100,A={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[p],B={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(R[0])}),jsx("span",{children:f(R[1])})]}),jsxs("div",{ref:b,className:u(lh({orientation:t,size:n}),d&&"opacity-50 pointer-events-none",e),...h,children:[jsx("div",{ref:C,className:u(Ek({orientation:t,size:n})),onClick:L,children:jsx("div",{className:u("absolute rounded-full",A,{"h-full":t==="horizontal","w-full":t==="vertical"}),style:t==="horizontal"?{left:`${V(R[0])}%`,right:`${100-V(R[1])}%`,top:0,bottom:0}:{bottom:`${V(R[0])}%`,top:`${100-V(R[1])}%`,left:0,right:0}})}),R.map((I,F)=>jsx("div",{role:"slider",tabIndex:d?-1:0,"aria-valuemin":i,"aria-valuemax":l,"aria-valuenow":I,"aria-orientation":t||void 0,"aria-disabled":d,className:u(Lk({size:n}),y&&T===F&&"cursor-grabbing"),style:t==="horizontal"?{position:"absolute",left:`calc(${V(I)}% - ${B/2}px)`,top:"50%",transform:"translateY(-50%)"}:{position:"absolute",bottom:`calc(${V(I)}% - ${B/2}px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:K=>E(K,F),onPointerMove:D,onPointerUp:H,onPointerCancel:H,onKeyDown:K=>S(K,F)},F)),g&&jsxs(Fragment,{children:[jsx("input",{type:"hidden",name:`${g}[0]`,value:R[0]}),jsx("input",{type:"hidden",name:`${g}[1]`,value:R[1]})]})]})]})});ch.displayName="RangeSlider";var tc=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"}}),Vk=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"}}),Ak={help:HelpCircle,info:Info,warning:AlertCircle},mh=_.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]=_.useState(false),[b,v]=_.useState(false),[w,x]=_.useState({top:0,left:0}),R=_.useRef(null),C=_.useRef(null),y=i!==void 0?i:g,N=_.useCallback(P=>{i===void 0&&h(P),l?.(P);},[i,l]);_.useEffect(()=>{v(true);},[]),_.useEffect(()=>{if(!y||!R.current)return;let P=()=>{let E=R.current.getBoundingClientRect(),D=C.current?.getBoundingClientRect(),H=D?.width||288,L=D?.height||100,S=8,V=0,A=0;switch(a){case "top":V=E.top-L-S,A=E.left+E.width/2-H/2;break;case "bottom":V=E.bottom+S,A=E.left+E.width/2-H/2;break;case "left":V=E.top+E.height/2-L/2,A=E.left-H-S;break;case "right":V=E.top+E.height/2-L/2,A=E.right+S;break}if(a==="top"||a==="bottom")switch(s){case "start":A=E.left;break;case "center":A=E.left+E.width/2-H/2;break;case "end":A=E.right-H;break}if(a==="left"||a==="right")switch(s){case "start":V=E.top;break;case "center":V=E.top+E.height/2-L/2;break;case "end":V=E.bottom-L;break}A=Math.max(8,Math.min(A,window.innerWidth-H-8)),V=Math.max(8,Math.min(V,window.innerHeight-L-8)),x({top:V,left:A});};return P(),requestAnimationFrame(P),window.addEventListener("resize",P),window.addEventListener("scroll",P,true),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",P,true);}},[y,a,s]),_.useEffect(()=>{if(!y)return;let P=E=>{C.current&&!C.current.contains(E.target)&&R.current&&!R.current.contains(E.target)&&N(false);};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[y,N]),_.useEffect(()=>{if(!y)return;let P=E=>{E.key==="Escape"&&N(false);};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[y,N]);let T=Ak[e??"help"],k=()=>{N(!y);},M=()=>{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?_.isValidElement(o)?_.cloneElement(o,{ref:R,onClick:P=>{o.props.onClick?.(P),k();}}):jsx("button",{ref:R,type:"button",onClick:k,className:u(tc({variant:e,size:t}),m),"aria-label":"Help",children:o}):jsx("button",{ref:P=>{R.current=P,typeof p=="function"?p(P):p&&(p.current=P);},type:"button",onClick:k,className:u(tc({variant:e,size:t}),m),"aria-label":"Help",children:jsx(T,{className:"h-full w-full"})}),b&&y&&za.createPortal(jsxs("div",{ref:C,className:u(Vk({size:t}),f),style:{position:"fixed",top:w.top,left:w.left,transformOrigin:M()},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)]})});mh.displayName="ContextualHelp";var fh=cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),nc=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 gh({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]=_.useState(new Set),v=_.useMemo(()=>a?a instanceof Set?a:new Set(a):h,[a,h]),w=y=>{if(s==="none")return;let N;s==="single"?N=v.has(y)?new Set:new Set([y]):(N=new Set(v),N.has(y)?N.delete(y):N.add(y)),a||b(N),i?.(N);},x=(y,N)=>{N.stopPropagation(),c?.(y);},R=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(fh({spacing:t}),e),...g,children:[R.map(y=>{let N=v.has(y.key),T=s!=="none";return jsxs("span",{role:T?"button":void 0,tabIndex:T&&!y.isDisabled?0:void 0,"aria-pressed":T?N:void 0,onClick:()=>!y.isDisabled&&w(y.key),onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&!y.isDisabled&&(k.preventDefault(),w(y.key));},style:y.color?{backgroundColor:y.color}:void 0,className:u(nc({variant:y.color?void 0:n,size:r,isSelected:N,isDisabled:y.isDisabled}),T&&!y.isDisabled&&"cursor-pointer hover:opacity-80",y.color&&"text-white"),children:[y.icon&&jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:y.icon}),y.label,l&&!y.isDisabled&&jsx("button",{type:"button",onClick:k=>x(y.key,k),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${y.label}`,children:jsx(X,{className:"h-3 w-3"})})]},y.key)}),C>0&&jsxs("span",{className:u(nc({variant:"surface",size:r}),"cursor-default"),children:["+",C," more"]})]}),f&&jsx("span",{className:"text-sm text-danger",children:f})]})}gh.displayName="TagGroup";var hh=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"}}),xh=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 yh({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]=_.useState(new Set),h=_.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),b=v=>{if(a==="none")return;let w;a==="single"?w=h.has(v)?new Set:new Set([v]):(w=new Set(h),w.has(v)?w.delete(v):w.add(v)),o||g(w),s?.(w);};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(hh({columns:t,gap:n,className:e})),...f,children:r.map(v=>{let w=h.has(v.key);return d?jsx("div",{role:"gridcell","aria-selected":w,onClick:()=>b(v.key),children:d(v,w)},v.key):jsxs("div",{role:"gridcell","aria-selected":w,"aria-disabled":v.isDisabled,onClick:()=>!v.isDisabled&&b(v.key),className:u(xh({variant:l,size:c,isSelected:w,isDisabled:v.isDisabled})),children:[i&&a!=="none"&&w&&jsx("div",{className:"absolute top-2 right-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:jsx(Check,{className:"h-3 w-3"})}),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)})})}yh.displayName="GridList";var wh=cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),Fk=cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),Kk=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}}),Js=_.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 w=(n-r)/(o-r),x=s!==void 0?(s-r)/(o-r):.25,R=i!==void 0?(i-r)/(o-r):.75;return (a!==void 0?(a-r)/(o-r):1)>=.5?w<=x?"bg-red-500":w<=R?"bg-yellow-500":"bg-green-500":w>=R?"bg-red-500":w>=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(wh({size:t})),children:jsx("div",{className:u(Fk({variant:f})),children:jsx("div",{className:u(Kk({color:m==="auto"?void 0:m,rounded:h>=100}),m==="auto"&&b()),style:{width:`${h}%`}})})})]})});Js.displayName="Meter";var Ch=_.forwardRef((e,t)=>jsx(Js,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));Ch.displayName="DiskUsageMeter";var Th=_.forwardRef((e,t)=>jsx(Js,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));Th.displayName="BatteryMeter";var Mh=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"}}),ti=(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)]},Nh=(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]},kh=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},Ph=(e,t,n)=>"#"+[e,t,n].map(r=>r.toString(16).padStart(2,"0")).join(""),Eh=_.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=_.useRef(null),[g,h]=_.useState(false),b=_.useCallback(I=>{let F=kh(I);return F?Nh(...F):[0,1,1]},[]),[v,w]=_.useState(()=>b(r||o)),x=e??v[0],R=t??v[1],C=n??v[2];_.useEffect(()=>{if(r){let I=b(r);w(I);}},[r,b]);let y=_.useCallback((I,F)=>{if(l||!p.current)return;let K=p.current.getBoundingClientRect(),Y=Math.max(0,Math.min(1,(I-K.left)/K.width)),q=Math.max(0,Math.min(1,(F-K.top)/K.height)),$=Y,O=1-q;t===void 0&&n===void 0&&w([x,$,O]),a?.({hue:x,saturation:$,brightness:O});let W=ti(x,$,O);s?.(Ph(...W));},[l,x,t,n,a,s]),N=I=>{l||(I.preventDefault(),h(true),I.target.setPointerCapture(I.pointerId),y(I.clientX,I.clientY));},T=I=>{g&&y(I.clientX,I.clientY);},k=I=>{h(false),I.target.releasePointerCapture(I.pointerId);},[M,P,E]=ti(x,1,1),D=`rgb(${M}, ${P}, ${E})`,H=R*100,L=(1-C)*100,[S,V,A]=ti(x,R,C),B=`rgb(${S}, ${V}, ${A})`;return jsx("div",{ref:f,className:u(Mh({size:i}),l&&"cursor-not-allowed opacity-50",d),...m,children:jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:D},onPointerDown:N,onPointerMove:T,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(${L}% - ${c/2}px)`,backgroundColor:B,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});Eh.displayName="ColorArea";var Sh=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"}}),Wk=`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")`,Lh="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",Dh=_.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=_.useRef(null),[g,h]=_.useState(false),b=()=>{switch(r){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[v,w]=_.useState(t??b()),x=e??v,R=r==="hue"?x/360:x,C=_.useCallback((D,H)=>{if(i||!p.current)return;let L=p.current.getBoundingClientRect(),S=a!=="vertical",V;S?V=Math.max(0,Math.min(1,(D-L.left)/L.width)):V=Math.max(0,Math.min(1,1-(H-L.top)/L.height));let A=r==="hue"?V*360:V;e===void 0&&w(A),n?.(A);},[i,a,r,e,n]),y=D=>{i||(D.preventDefault(),h(true),D.target.setPointerCapture(D.pointerId),C(D.clientX,D.clientY));},N=D=>{g&&C(D.clientX,D.clientY);},T=D=>{h(false),D.target.releasePointerCapture(D.pointerId);},k=()=>{let D=a!=="vertical",H=D?"to right":"to top";switch(r){case "hue":return D?Lh:"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 Lh}},M=()=>r==="hue"?`hsl(${x}, 100%, 50%)`:o,P=a!=="vertical",E=R*100;return jsx("div",{ref:f,className:u(Sh({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"?Wk:void 0,backgroundSize:r==="alpha"?"8px 8px":void 0},onPointerDown:y,onPointerMove:N,onPointerUp:T,onPointerLeave:T,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,...P?{left:`calc(${E}% - ${l/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${E}% - ${l/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:M(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});Dh.displayName="ColorSlider";var Hh=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"}}),Yk=(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},Ih=_.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=_.useRef(null),[f,p]=_.useState(false),[g,h]=_.useState(t),b=e??g,v=_.useCallback((y,N)=>{if(o||!m.current)return;let T=m.current.getBoundingClientRect(),k=T.width/2,M=y-T.left,P=N-T.top,E=Yk(M,P,k);e===void 0&&h(E),n?.(E);},[o,e,n]),w=y=>{o||(y.preventDefault(),p(true),y.target.setPointerCapture(y.pointerId),v(y.clientX,y.clientY));},x=y=>{f&&v(y.clientX,y.clientY);},R=y=>{p(false),y.target.releasePointerCapture(y.pointerId);},C=()=>{let y=[];for(let N=0;N<=360;N+=30)y.push(`hsl(${N}, 100%, 50%) ${N}deg`);return `conic-gradient(from 270deg, ${y.join(", ")})`};return jsx("div",{ref:d,className:u(Hh({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:w,onPointerMove:x,onPointerUp:R,onPointerLeave:R,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(Xk,{hue:b,innerRadius:a,thumbSize:s})]})})});Ih.displayName="ColorWheel";var Xk=({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 Ah=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"}}),Zk=cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Qk=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}}),zh=_.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(Ah({orientation:t,size:n,align:r,className:e})),...g,children:[jsxs("span",{className:u(Zk({size:n}),c),style:l?{width:l,flexShrink:0}:void 0,children:[o,m&&":"]}),jsx("span",{className:u(Qk({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})]})});zh.displayName="LabeledValue";var Oh=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"}}),Bh=_.forwardRef(({className:e,orientation:t,gap:n,...r},o)=>jsx("div",{ref:o,className:u(Oh({orientation:t,gap:n,className:e})),...r}));Bh.displayName="LabeledValueGroup";var Gh=cva("flex items-center rounded-md border border-input bg-background ring-offset-background transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",{variants:{size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),Co=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"}}),Uh=_.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:w,...x},R)=>{let[C,y]=_.useState(false),[N,T]=_.useState(t),k=e!==void 0?e:N,M=_.useRef(null);_.useImperativeHandle(R,()=>M.current);let P=k.length>0,E=C&&(a.length>0||s.length>0||l.length>0||P),D=I=>{e===void 0&&T(I),n?.(I);},H=()=>{D(""),M.current?.focus();},L=I=>{I?.preventDefault(),k.trim()&&(r?.(k.trim()),y(false));},S=I=>{D(I.label),o?.(I),y(false);},V=I=>{D(I),r?.(I),y(false);},A=I=>{D(I),r?.(I),y(false);},B=_.useMemo(()=>{let I={};return a.forEach(F=>{let K=F.category||"Results";I[K]||(I[K]=[]),I[K].push(F);}),I},[a]);return jsxs(ot,{open:E,onOpenChange:y,children:[jsx(an,{children:jsxs("form",{onSubmit:L,className:u(Gh({size:g,variant:h}),b),children:[m&&jsx(Search,{className:u(Co({size:g}),"ml-3")}),jsx("input",{ref:M,type:"text",value:k,onChange:I=>D(I.target.value),onFocus:()=>y(true),placeholder:v,disabled:w,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&&P&&!w&&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",Co({size:g})),children:jsx(X,{className:"h-full w-full"})})]})}),jsx(at,{className:"p-0",style:{width:f==="trigger"?"var(--radix-popover-trigger-width)":f},align:"start",onOpenAutoFocus:I=>I.preventDefault(),children:jsxs(Command,{className:"rounded-lg border-0",children:[s.length>0&&!P&&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((I,F)=>jsxs("button",{type:"button",onClick:()=>V(I),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(Co({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:I}),jsx(ArrowRight,{className:u(Co({size:g}),"opacity-0 group-hover:opacity-100")})]},F))]}),l.length>0&&!P&&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((I,F)=>jsxs("button",{type:"button",onClick:()=>A(I),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(Co({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:I})]},F))]}),P&&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(B).map(([I,F])=>jsxs("div",{children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:I})}),F.map(K=>jsxs("button",{type:"button",onClick:()=>S(K),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[K.icon||jsx(Search,{className:u(Co({size:g}))}),jsxs("div",{className:"flex-1 text-left",children:[jsx("div",{className:"truncate",children:K.label}),K.description&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:K.description})]})]},K.id))]},I)):jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});Uh.displayName="SearchBar";var Wh={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"})},Yh=_.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]=_.useState(""),g=_.useRef(null),[h,b]=_.useState(false);_.useEffect(()=>{b(true);},[]),_.useEffect(()=>{e||p("");},[e]),_.useEffect(()=>{if(!e)return;let y=N=>{N.key==="Escape"&&t?.(false);};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[e,t]),_.useEffect(()=>{if(e)return Gt(),()=>Ut()},[e]);let v=_.useMemo(()=>{let y={};return n.forEach(N=>{let T=N.category||"Results";y[T]||(y[T]=[]),y[T].push(N);}),y},[n]),w=y=>{y.onSelect?.(),c?.(y),t?.(false);},x=()=>{t?.(false);},R=f.length>0,C=!R&&r.length>0;return !h||!e?null:za.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,{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(y=>jsxs(Command.Item,{value:y.label,onSelect:()=>w(y),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:y.icon||Wh[y.category||""]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:y.label}),y.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:y.description})]}),y.shortcut&&jsx("div",{className:"flex items-center gap-1",children:y.shortcut.map((N,T)=>jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:N},T))})]},y.id))]}),R&&Object.entries(v).map(([y,N])=>jsxs(Command.Group,{heading:y,children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:y}),N.map(T=>jsxs(Command.Item,{value:`${T.label} ${T.keywords?.join(" ")||""}`,onSelect:()=>w(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||Wh[y]||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))]},y)),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)});Yh.displayName="SpotlightSearch";function uP(e="k"){let[t,n]=_.useState(false);return _.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 Zh=_.createContext(null),ri=()=>{let e=_.useContext(Zh);if(!e)throw new Error("useNotificationCenter must be used within a NotificationCenterProvider");return e},xP=({children:e,notifications:t,onNotificationsChange:n})=>{let[r,o]=_.useState([]),[a,s]=_.useState(false),i=_.useRef(null),l=t!==void 0,c=l?t:r,d=_.useCallback(b=>{l?n?.(b):o(b);},[l,n]),m=c.filter(b=>!b.read).length,f=_.useCallback(b=>{d(c.map(v=>v.id===b?{...v,read:true}:v));},[c,d]),p=_.useCallback(()=>{d(c.map(b=>({...b,read:true})));},[c,d]),g=_.useCallback(b=>{d(c.filter(v=>v.id!==b));},[c,d]),h=_.useCallback(()=>{d([]);},[d]);return jsx(Zh.Provider,{value:{notifications:c,unreadCount:m,markAsRead:f,markAllAsRead:p,removeNotification:g,clearAll:h,open:a,setOpen:s,triggerRef:i},children:e})},Qh=_.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("relative inline-block",e),...n,children:t}));Qh.displayName="NotificationCenter";var Jh=_.forwardRef(({className:e,showBadge:t=true,children:n,onClick:r,...o},a)=>{let{unreadCount:s,open:i,setOpen:l,triggerRef:c}=ri(),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})]})});Jh.displayName="NotificationCenterTrigger";var ex=_.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}=ri(),[p,g]=_.useState(false),h=_.useRef(null),[b,v]=_.useState({top:0,left:0});return _.useEffect(()=>{g(true);},[]),_.useEffect(()=>{if(!i||!f.current||!h.current)return;let w=()=>{if(!f.current||!h.current)return;let x=f.current.getBoundingClientRect(),R=h.current.getBoundingClientRect(),C=x.bottom+n,y=x.left;t==="center"?y=x.left+x.width/2-R.width/2:t==="end"&&(y=x.right-R.width),y+R.width>window.innerWidth-16&&(y=window.innerWidth-R.width-16),y<16&&(y=16),v({top:C,left:y});};return w(),window.addEventListener("resize",w),window.addEventListener("scroll",w,true),()=>{window.removeEventListener("resize",w),window.removeEventListener("scroll",w,true);}},[i,f,t,n]),_.useEffect(()=>{if(!i)return;let w=R=>{h.current&&!h.current.contains(R.target)&&f.current&&!f.current.contains(R.target)&&l(false);},x=R=>{R.key==="Escape"&&l(false);};return document.addEventListener("mousedown",w),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",w),document.removeEventListener("keydown",x);}},[i,l,f]),!p||!i?null:za.createPortal(jsxs("div",{ref:w=>{h.current=w,typeof s=="function"?s(w):s&&(s.current=w);},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,{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(w=>jsx(ic,{notification:w},w.id)))})]}),document.body)});ex.displayName="NotificationCenterContent";var yP={info:"border-l-blue-500",success:"border-l-green-500",warning:"border-l-yellow-500",error:"border-l-red-500"},RP={info:Info,success:CheckCircle,warning:AlertTriangle,error:AlertCircle},ic=({notification:e,onMarkAsRead:t,onRemove:n})=>{let{markAsRead:r,removeNotification:o}=ri(),{id:a,title:s,description:i,type:l="info",timestamp:c,read:d,avatar:m,action:f}=e,p=RP[l],g=()=>{t?t():r(a);},h=()=>{n?n():o(a);},b=v=>{if(!v)return null;let w=typeof v=="string"?new Date(v):v,R=new Date().getTime()-w.getTime(),C=Math.floor(R/6e4),y=Math.floor(R/36e5),N=Math.floor(R/864e5);return C<1?"Just now":C<60?C+"m ago":y<24?y+"h ago":N<7?N+"d ago":w.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",yP[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"})})]})})]})};ic.displayName="NotificationItem";var tx=_.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("divide-y",e),...n,children:t}));tx.displayName="NotificationList";var nx=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"}}),EP={default:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle},rx=_.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]=_.useState(true),[v,w]=_.useState(false);_.useEffect(()=>{m&&localStorage.getItem(`banner-${m}`)==="true"&&b(false);},[m]),_.useEffect(()=>{if(d&&h){let y=setTimeout(()=>{x();},d);return ()=>clearTimeout(y)}},[d,h]);let x=()=>{w(true),setTimeout(()=>{b(false),m&&localStorage.setItem(`banner-${m}`,"true"),s?.();},200);};if(!h)return null;let R=EP[t],C=r?o!==void 0?o:R?jsx(R,{className:"h-4 w-4"}):null:null;return jsxs("div",{ref:g,className:u(nx({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,{className:"h-4 w-4"})})]})});rx.displayName="Banner";var pa=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-2 border-current 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-2 border-current bg-transparent text-primary hover:bg-primary hover:text-primary-foreground"},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"}}),DP=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"}}),cc=_.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,w]=_.useState(false),x=o&&o.length>0,R=k=>{x&&w(!v),p?.(k);},C=k=>{k.onClick?.(),w(false);},y={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&&pa({position:m})),children:[x&&v&&jsx("div",{className:u("absolute left-1/2 -translate-x-1/2 flex items-center",y[a].container),children:o.map((k,M)=>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:`${M*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(pa({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(pa({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:R,disabled:g,className:u(pa({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(DP({size:d}),N,T,"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:()=>w(false)})]})});cc.displayName="FloatingActionButton";var HP=cc;var lx=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"}}),ax=cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors cursor-pointer",{variants:{variant:{default:"",elevated:"",filled:""}},defaultVariants:{variant:"default"}}),cx=_.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]=_.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"}},w=()=>{switch(n){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsx("nav",{ref:d,className:u(lx({variant:t,size:n}),e),role:"navigation","aria-label":"Bottom navigation",...c,children:r.map(x=>{let R=g===x.key,C=i==="all"||i==="active"&&R,y=R&&x.activeIcon?x.activeIcon:x.icon;if(l)return jsx("div",{onClick:()=>h(x),className:u(ax({variant:t}),x.disabled&&"opacity-50 cursor-not-allowed"),children:l(x,R)},x.key);let N=jsxs("div",{onClick:()=>!x.href&&h(x),className:u(ax({variant:t}),b(R),x.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":R?"page":void 0,"aria-disabled":x.disabled,tabIndex:x.disabled?-1:0,onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),h(x));},children:[jsxs("div",{className:"relative",children:[jsx("span",{className:u(v(),"[&>svg]:h-full [&>svg]:w-full"),children:y}),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(w(),"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(R)),children:N},x.key):N})})});cx.displayName="BottomNavigation";var VP="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",ux=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"}}),mx=_.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:VP,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(ux({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})})})]})]})]})});mx.displayName="ActionSheet";var fx=cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),uc=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"}}),gx=_.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=_.useRef(null),[p,g]=_.useState(0),[h,b]=_.useState(false),v=_.useRef(0),w=_.useRef(0),x=n.length*(o==="sm"?64:o==="lg"?96:80),R=r.length*(o==="sm"?64:o==="lg"?96:80),C=M=>{i||(b(true),v.current=M.touches[0].clientX,w.current=p);},y=M=>{if(!h||i)return;let E=M.touches[0].clientX-v.current,D=w.current+E;(D>0&&n.length===0||D<0&&r.length===0)&&(D=0),D>x?D=x+(D-x)*.3:D<-R&&(D=-R+(D+R)*.3),g(D);},N=()=>{if(!h)return;b(false);let M=f.current?.offsetWidth||0,P=Math.abs(p)/M;if(l&&P>.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<-R*a&&r.length>0?(g(-R),s?.("left")):g(0);},T=(M,P)=>{M.onAction?.(),s?.(P,M.key),g(0);},k=()=>{g(0);};return jsxs("div",{ref:m,className:u(fx({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(M=>jsxs("button",{type:"button",onClick:()=>T(M,"right"),className:u(uc({variant:M.variant,size:o})),style:{opacity:Math.min(1,p/x)},children:[M.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:M.icon}),!M.icon&&M.label]},M.key))}),r.length>0&&p<0&&jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:R},children:r.map(M=>jsxs("button",{type:"button",onClick:()=>T(M,"left"),className:u(uc({variant:M.variant,size:o})),style:{opacity:Math.min(1,Math.abs(p)/R)},children:[M.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:M.icon}),!M.icon&&M.label]},M.key))}),jsx("div",{ref:f,className:u("relative bg-background",h?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:C,onTouchMove:y,onTouchEnd:N,onClick:p!==0?k:void 0,children:c})]})});gx.displayName="SwipeActions";var vx=cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),OP=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"}}),hx=_.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=_.useRef(null),[b,v]=_.useState(0),[w,x]=_.useState("idle"),R=_.useRef(0),C=_.useRef(false),y=()=>l||w==="refreshing"?false:(h.current?.scrollTop??window.scrollY)<=0,N=E=>{y()&&(R.current=E.touches[0].clientY,C.current=true);},T=E=>{if(!C.current||!y())return;let H=E.touches[0].clientY-R.current;if(H<0){v(0),x("idle");return}let S=Math.min(H*.5,o);v(S),x(S>=r?"ready":"pulling");},k=async()=>{if(C.current)if(C.current=false,w==="ready"){x("refreshing"),v(r*.6);try{await n();}finally{x("idle"),v(0);}}else x("idle"),v(0);},M={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[i],P=()=>{if(w==="refreshing")return a||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(Loader2,{className:u(M,"animate-spin text-primary")}),jsx("span",{className:"text-xs text-muted-foreground",children:m})]});let E=Math.min(b/r*180,180);return s||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(ArrowDown,{className:u(M,"text-muted-foreground transition-transform"),style:{transform:`rotate(${E}deg)`}}),jsx("span",{className:"text-xs text-muted-foreground",children:w==="ready"?d:c})]})};return jsxs("div",{ref:g,className:u(vx({variant:t,className:e})),...p,children:[jsx("div",{className:u(OP({size:i}),"z-10",w==="idle"&&b===0&&"opacity-0"),style:{top:Math.max(b-60,-60),opacity:Math.min(b/(r*.5),1)},children:P()}),jsx("div",{ref:h,className:u("transition-transform duration-200",w==="refreshing"&&"ease-out"),style:{transform:`translateY(${b}px)`,transition:C.current?"none":void 0},onTouchStart:N,onTouchMove:T,onTouchEnd:k,children:f})]})});hx.displayName="PullToRefresh";var Gr=(e,t,n)=>({duration:e,delay:t,ease:n||[.4,0,.2,1]}),BP={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},xx=_.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:BP,custom:i,transition:Gr(n,r,o),className:u(a),onAnimationStart:l,onAnimationComplete:c,children:t});return s?jsx(AnimatePresence,{children:e&&m}):m});xx.displayName="Fade";var FP=(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]}}},yx=_.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=_.useMemo(()=>FP(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});yx.displayName="Slide";var KP={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"},$P={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},Rx=_.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:$P,custom:i,transition:Gr(n,r,o),className:u(a),style:{transformOrigin:KP[l]},onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&f}):f});Rx.displayName="Scale";var wx=_.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})})});wx.displayName="Collapse";var Cx=_.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})})});Cx.displayName="Expand";var Tx=_.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});Tx.displayName="Rotate";var Mx=_.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})]})})});Mx.displayName="Flip";var Nx=_.forwardRef(({color:e="currentColor",duration:t=.6,children:n,className:r,disabled:o=false},a)=>{let[s,i]=_.useState([]),l=_.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(w=>[...w,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))})]})});Nx.displayName="Ripple";var kx=_.forwardRef(({children:e,animate:t=true,height:n=10,duration:r=.5,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=_.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})});kx.displayName="Bounce";var WP={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]},Px=_.forwardRef(({children:e,animate:t=true,intensity:n="normal",duration:r=.5,count:o=1,className:a,triggerOnHover:s=false},i)=>{let[l,c]=_.useState(false),d=s?l:t,m={idle:{x:0},shake:{x:WP[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})});Px.displayName="Shake";var jP={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=_.forwardRef(({children:e,animate:t=true,speed:n="normal",className:r},o)=>jsx("div",{ref:o,className:u(t&&jP[n],r),children:e}));Ex.displayName="Pulse";var Lx=_.forwardRef(({children:e,animate:t=true,angle:n=10,duration:r=.3,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=_.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})});Lx.displayName="Wiggle";var Sx=_.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]=_.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})});Sx.displayName="Pop";var QP=(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},Dx=_.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=_.useRef(null),g=useInView(p,{once:true}),[h,b]=_.useState(!l);_.useEffect(()=>{if(l&&g){let x=setTimeout(()=>b(true),c*1e3);return ()=>clearTimeout(x)}},[l,g,c]);let v=useMotionValue(t),w=useTransform(v,x=>QP(x,r,s,i));return _.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:w}),a]})})});Dx.displayName="Counter";var Hx=_.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]=_.useState(""),[b,v]=_.useState(0),[w,x]=_.useState(false),[R,C]=_.useState(false),y=_.useRef(null),N=useInView(y,{once:true}),[T,k]=_.useState(!l);return _.useEffect(()=>{if(l&&N){let M=setTimeout(()=>k(true),n*1e3);return ()=>clearTimeout(M)}},[l,N,n]),_.useEffect(()=>{if(!T||R)return;let M=p[b],P;return w?g.length>0?P=setTimeout(()=>{h(g.slice(0,-1));},i):(x(false),v(E=>(E+1)%p.length)):g.length<M.length?P=setTimeout(()=>{h(M.slice(0,g.length+1));},t):b<p.length-1||s?P=setTimeout(()=>{x(true);},r):(C(true),m?.()),()=>clearTimeout(P)},[T,g,b,w,R,p,t,i,r,s,m]),jsxs("span",{ref:y,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})]})});Hx.displayName="Typewriter";var Ix=_.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=_.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,w)=>jsxs(motion.span,{variants:b,className:"inline-block",children:[v,a==="word"&&w<p.length-1&&"\xA0"]},w))})})});Ix.displayName="TextReveal";var Vx=_.forwardRef(({words:e,duration:t=2,animation:n="slide",animationDuration:r=.5,className:o,loop:a=true},s)=>{let[i,l]=_.useState(0);_.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])})})});Vx.displayName="WordRotate";var Bx=_.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=_.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})})});Bx.displayName="ScrollReveal";var Fx=_.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(eE,{progress:f,position:e})]})});Fx.displayName="ScrollProgress";var eE=({progress:e,position:t})=>{let n=useTransform(e,s=>Math.round(s*100)),[r,o]=_.useState(0);return _.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,"%"]})},Kx=_.forwardRef(({children:e,speed:t=.5,direction:n="vertical",className:r,container:o},a)=>{let s=_.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})})});Kx.displayName="Parallax";var Ux=_.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),X.dataTransfer.setDragImage(de,20,15),setTimeout(()=>{document.body.removeChild(de);},0),h(e),C?.({event:X,node:e});},me=X=>{if(X.preventDefault(),X.stopPropagation(),!g||g.key===e.key||oe)return;let Se=X.currentTarget.getBoundingClientRect(),de=X.clientY-Se.top,We=Se.height,je;de<We*.25?je=-1:de>We*.75?je=1:je=0,!(R&&!R({dropNode:e,dropPosition:je,dragNode:g}))&&(w(e.key,je),y?.({event:X,node:e}));},wt=X=>{X.preventDefault(),X.stopPropagation(),!(!g||g.key===e.key)&&N?.({event:X,node:e,expandedKeys:F()});},gt=X=>{X.stopPropagation(),T?.({event:X,node:e});},yn=X=>{X.preventDefault(),X.stopPropagation(),!(!g||g.key===e.key||oe)&&(b!==null&&x(e,b),h(null),w(null,null));},Fe=X=>{h(null),w(null,null),k?.({event:X,node:e});},on=X=>{oe||ge&&i(e.key,e,X);},Ct=X=>{X.stopPropagation(),!oe&&!Y&&a(e.key,e);},U=_.useMemo(()=>{if(!j||b===null)return "";switch(b){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 ""}},[j,b]),re=[...r,n];return jsxs("div",{className:"relative",children:[E&&t>0&&jsxs(Fragment,{children:[r.map((X,Se)=>!X&&jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${Se} * var(--tree-indent) + 12px)`,top:0,bottom:0}},Se)),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":Y?void 0:q,"aria-selected":ge?$:void 0,"aria-disabled":oe,draggable:Pe,onDragStart:Be,onDragOver:me,onDragEnter:wt,onDragLeave:gt,onDrop:yn,onDragEnd:Fe,onClick:on,className:m("relative",Vg({size:I,isSelected:$,isDragging:z,isDisabled:oe,isHoverable:ge&&!oe}),U,A&&"flex-1"),style:{paddingLeft:`calc(${t} * var(--tree-indent) + 8px)`},children:[Pe&&P&&Z!==false&&jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:Z}),jsx("button",{type:"button",onClick:Ct,className:m("flex-shrink-0 p-0.5 rounded hover:bg-muted/80 transition-transform",Y&&"invisible"),tabIndex:-1,children:jsx(ChevronRight,{className:m("h-4 w-4 transition-transform duration-200",q&&"rotate-90")})}),G&&jsx(eT,{checked:O,indeterminate:W,disabled:oe,onClick:X=>u(e.key,e,X)}),M&&le&&jsx("div",{className:"flex-shrink-0 text-muted-foreground ml-1",children:le}),jsx("div",{className:m("flex-1 min-w-0 truncate ml-1",A&&"flex-none"),children:e.label})]}),K&&q&&jsx("div",{role:"group",children:e.children.map((X,Se)=>jsx(zg,{node:X,level:t+1,isLast:Se===e.children.length-1,parentIsLastPath:re},X.key))})]})},tT=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return n(e),t},nT=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},Og=(e,t)=>{if(!e.children)return false;for(let n of e.children)if(n.key===t||Og(n,t))return true;return false},Bg=_.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:u=false,selectedKeys:f,defaultSelectedKeys:p=[],onSelect:g,checkable:h=false,checkStrictly:v=false,checkedKeys:b,defaultCheckedKeys:w=[],onCheck:x,showLine:R=false,showIcon:C=false,showHandle:y=true,dragIcon:N,icon:T,leafIcon:k=jsx(File,{className:"h-4 w-4"}),folderIcon:E=jsx(Folder,{className:"h-4 w-4"}),folderOpenIcon:M=jsx(FolderOpen,{className:"h-4 w-4"}),onDragStart:P,onDragEnter:S,onDragOver:H,onDragLeave:D,onDragEnd:L,onDrop:V,blockNode:A=false,disabled:B=false,...I},F)=>{let K=_.useCallback(()=>l?new Set(tT(r)):new Set(i),[l,i,r]),[Y,q]=_.useState(K),$=s!==void 0,O=$?new Set(s):Y,W=_.useCallback((ve,Ye)=>{let Kt=new Set(O),Ae=!Kt.has(ve);Ae?Kt.add(ve):Kt.delete(ve),$||q(Kt),c?.(Array.from(Kt),{expanded:Ae,node:Ye});},[O,$,c]),[z,j]=_.useState(new Set(p)),oe=f!==void 0,ge=oe?new Set(f):z,G=_.useCallback((ve,Ye,Kt)=>{let Ae=new Set(ge),Rn=!Ae.has(ve);u?Rn?Ae.add(ve):Ae.delete(ve):(Ae.clear(),Rn&&Ae.add(ve)),oe||j(Ae);let jr=[],Vo=wa=>{for(let _r of wa)Ae.has(_r.key)&&jr.push(_r),_r.children&&Vo(_r.children);};Vo(r),g?.(Array.from(Ae),{selected:Rn,selectedNodes:jr,node:Ye,event:Kt});},[ge,u,oe,g,r]),[Pe,Z]=_.useState(new Set(w)),[le,Be]=_.useState(new Set),me=b!==void 0,wt=me?new Set(Array.isArray(b)?b:b.checked):Pe,gt=me&&!Array.isArray(b)?new Set(b.halfChecked):le,yn=_.useCallback((ve,Ye,Kt)=>{let Ae=new Set(wt),Rn=new Set(gt),jr=!Ae.has(ve);if(jr?(Ae.add(ve),Rn.delete(ve)):Ae.delete(ve),!v&&Ye.children){let yi=nT(Ye);for(let Un of yi)jr?(Ae.add(Un),Rn.delete(Un)):Ae.delete(Un);}me||(Z(Ae),Be(Rn));let Vo=[],wa=yi=>{for(let Un of yi)Ae.has(Un.key)&&Vo.push(Un),Un.children&&wa(Un.children);};wa(r);let _r=v?{checked:Array.from(Ae),halfChecked:Array.from(Rn)}:Array.from(Ae);x?.(_r,{checked:jr,checkedNodes:Vo,node:Ye,event:Kt,halfCheckedKeys:Array.from(Rn)});},[wt,gt,v,me,x,r]),[Fe,on]=_.useState(null),[Ct,U]=_.useState(null),[re,X]=_.useState(null),Se=_.useCallback((ve,Ye)=>{U(ve),X(Ye);},[]),de=_.useCallback((ve,Ye)=>{!Fe||!V||Ye===0&&Og(Fe,ve.key)||V({event:{},node:ve,dragNode:Fe,dropPosition:Ye,dropToGap:Ye!==0});},[Fe,V]),We=_.useCallback(()=>Array.from(O),[O]),je={expandedKeys:O,toggleExpand:W,selectedKeys:ge,handleSelect:G,selectable:d,multiple:u,checkedKeys:wt,halfCheckedKeys:gt,handleCheck:yn,checkable:h,checkStrictly:v,draggable:o,draggedNode:Fe,setDraggedNode:on,dragOverKey:Ct,dragOverPosition:re,setDragOver:Se,handleDrop:de,allowDrop:a,onDragStart:P,onDragEnter:S,onDragOver:H,onDragLeave:D,onDragEnd:L,showLine:R,showIcon:C,showHandle:y,dragIcon:N,icon:T,leafIcon:k,folderIcon:E,folderOpenIcon:M,blockNode:A,disabled:B,size:n,data:r,getAllKeys:We},Gn=ve=>{let Ye=ve.relatedTarget,Kt=ve.currentTarget;(!Ye||!Kt.contains(Ye))&&Se(null,null);};return jsx(Ag.Provider,{value:je,children:jsx("div",{ref:F,role:"tree","aria-multiselectable":u||h,className:m(Ig({variant:t,size:n,className:e})),onDragLeave:Gn,...I,children:r.map((ve,Ye)=>jsx(zg,{node:ve,level:0,isLast:Ye===r.length-1},ve.key))})})});Bg.displayName="Tree";var Kg=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-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"},fullWidth:{true:"w-full",false:"w-fit min-w-48"}},defaultVariants:{size:"md",fullWidth:false}}),lT=({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))})},cT=(e,t)=>{let[n,r]=_.useState(e);return _.useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n},$g=_.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:u="No results found.",loadingText:f="Loading...",clearable:p=false,allowCustomValue:g=true,maxHeight:h=200,highlightMatch:v=true,fullWidth:b=false,disabled:w,...x},R)=>{let[C,y]=_.useState(false),[N,T]=_.useState(r),[k,E]=_.useState([]),[M,P]=_.useState(false),[S,H]=_.useState(false),[D,L]=_.useState(0),V=_.useRef(null),A=_.useRef(null),B=n!==void 0?n:N,I=cT(B,l);_.useEffect(()=>{let G=A.current;if(!G)return;let Pe=()=>{L(G.offsetWidth);};Pe();let Z=new ResizeObserver(Pe);return Z.observe(G),()=>{Z.disconnect();}},[]),_.useImperativeHandle(R,()=>V.current);let F=i?k:s,K=_.useMemo(()=>i?F:F.filter(G=>G.label.toLowerCase().includes(B.toLowerCase())),[F,B,i]);_.useEffect(()=>{if(!i)return;if(I.length<c){E([]);return}let G=false;return (async()=>{P(true);try{let Z=await i(I);G||E(Z);}catch{G||E([]);}finally{G||P(false);}})(),()=>{G=true;}},[I,i,c]);let Y=G=>{n===void 0&&T(G),o?.(G);},q=G=>{let Pe=G.target.value;Y(Pe),Pe.length>=c&&y(true);},$=G=>{Y(G.label),a?.(G),y(false);},O=()=>{Y(""),V.current?.focus();},W=()=>{H(true),y(true);},z=()=>{H(false);},j=G=>{G.key==="Escape"&&y(false),G.key==="ArrowDown"&&!C&&K.length>0&&y(true);},oe=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",ge=p&&B?"pr-8":"pr-3";return jsxs(ot,{open:C,onOpenChange:y,children:[jsxs(an,{ref:A,className:m("relative",b?"w-full":"w-fit"),children:[jsx("input",{ref:V,type:"text",value:B,onChange:q,onFocus:W,onBlur:z,onKeyDown:j,disabled:w,placeholder:d,className:m(Kg({size:t,fullWidth:b}),ge,e),style:{borderColor:S?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":C,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...x}),p&&B&&!w&&jsx("button",{type:"button",onClick:O,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:jsx(X,{className:oe})})]}),jsx(at,{className:"p-0",align:"start",style:{width:D>0?D:void 0},onOpenAutoFocus:G=>G.preventDefault(),children:jsx(Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsx(De,{style:{maxHeight:h},children:jsx(Command.List,{id:"autocomplete-list",className:"p-1",children:M?jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsx(Loader2,{className:m(oe,"animate-spin")}),f]}):K.length===0?jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:u}):K.map(G=>jsxs(Command.Item,{value:G.value,disabled:G.disabled,onSelect:()=>$(G),className:m("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:m("mr-2 h-4 w-4 shrink-0",B===G.label?"opacity-100":"opacity-0")}),jsx("span",{className:"flex-1",children:v?jsx(lT,{text:G.label,query:B}):G.label})]},G.value))})})})})]})});$g.displayName="Autocomplete";var fl=_.createContext(null),gl=_.createContext(null),bl=()=>{let e=_.useContext(fl);if(!e)throw new Error("useFormContext must be used within a Form");return e},gs=()=>{let e=_.useContext(gl);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},dT={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})},Gg=_.forwardRef(({defaultValues:e={},onSubmit:t,onError:n,validateOnBlur:r=true,validateOnChange:o=false,children:a,className:s,...i},l)=>{let[c,d]=_.useState(e),[u,f]=_.useState({}),[p,g]=_.useState({}),[h,v]=_.useState({}),[b,w]=_.useState(false),x=_.useRef(new Map),R=_.useCallback((D,L)=>{x.current.set(D,L);},[]),C=_.useCallback(D=>{x.current.delete(D);},[]),y=_.useCallback(D=>{let L=x.current.get(D)||[],V=c[D];for(let A of L)if(!A.validate(V))return f(B=>({...B,[D]:A.message})),false;return f(A=>({...A,[D]:null})),true},[c]),N=_.useCallback(()=>{let D=true,L={};return x.current.forEach((V,A)=>{let B=c[A];for(let I of V)if(!I.validate(B)){L[A]=I.message,D=false;break}L[A]||(L[A]=null);}),f(L),D},[c]),T=_.useCallback((D,L)=>{d(V=>({...V,[D]:L})),v(V=>({...V,[D]:true})),o&&setTimeout(()=>{y(D);},0);},[o,y]),k=_.useCallback((D,L)=>{f(V=>({...V,[D]:L}));},[]),E=_.useCallback((D,L)=>{g(V=>({...V,[D]:L})),L&&r&&y(D);},[r,y]),M=_.useCallback(D=>({value:c[D],error:u[D]??null,touched:p[D]??false,dirty:h[D]??false}),[c,u,p,h]),P=_.useCallback(()=>{d(e),f({}),g({}),v({});},[e]),S=async D=>{D.preventDefault();let L={};if(x.current.forEach((A,B)=>{L[B]=true;}),g(L),!N()){n?.(u);return}if(t){w(true);try{await t(c);}finally{w(false);}}},H={values:c,errors:u,touched:p,dirty:h,isSubmitting:b,setValue:T,setError:k,setTouched:E,validateField:y,validateAll:N,registerField:R,unregisterField:C,getFieldState:M,reset:P};return jsx(fl.Provider,{value:H,children:jsx("form",{ref:l,onSubmit:S,className:m("space-y-4",s),...i,children:a})})});Gg.displayName="Form";var Ug=({name:e,rules:t=[],defaultValue:n,children:r})=>{let o=bl(),a=_.useId();_.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(gl.Provider,{value:i,children:r})};Ug.displayName="FormField";var Wg=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("space-y-1.5",e),...t}));Wg.displayName="FormItem";var jg=_.forwardRef(({className:e,required:t,children:n,...r},o)=>{let{id:a,error:s,touched:i}=gs();return jsxs(wr,{ref:o,htmlFor:a,className:m(s&&i&&"text-danger",e),...r,children:[n,t&&jsx("span",{className:"ml-1 text-danger",children:"*"})]})});jg.displayName="FormLabel";var _g=({children:e})=>{let{name:t,id:n,error:r,touched:o}=gs(),a=bl(),s=a.getFieldState(t),i=c=>{let d=c.target,u=d.type==="checkbox"?d.checked:d.value;a.setValue(t,u);},l=()=>{a.setTouched(t,true);};return _.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})};_g.displayName="FormControl";var Yg=_.forwardRef(({className:e,...t},n)=>jsx("p",{ref:n,className:m("text-xs text-muted-foreground",e),...t}));Yg.displayName="FormDescription";var Xg=_.forwardRef(({className:e,message:t,...n},r)=>{let{id:o,error:a,touched:s}=gs(),i=t??(s?a:null);return i?jsx("p",{ref:r,id:`${o}-error`,className:m("text-xs text-danger",e),role:"alert",...n,children:i}):null});Xg.displayName="FormMessage";var Zg=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"}}),Qg=_.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:m(Zg({size:t,className:e})),...i,children:[jsxs(Cr,{"data-user-avatar":true,children:[o&&jsx(Jr,{src:o,alt:n}),jsx(Tr,{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})]})});Qg.displayName="User";var eb=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-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"flat",size:"md",radius:"sm"}}),tb=_.forwardRef(({className:e,variant:t,size:n,radius:r,...o},a)=>jsx("code",{ref:a,className:m(eb({variant:t,size:n,radius:r,className:e})),...o}));tb.displayName="Code";function ab(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 sb=_.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=ab(s)?themes.oneDark:themes.oneLight,p=async()=>{await navigator.clipboard.writeText(e),d(true),setTimeout(()=>d(false),2e3);};return jsxs("div",{ref:l,className:m("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:v})=>jsx("pre",{className:"p-4 overflow-x-auto text-sm bg-zinc-100 dark:bg-zinc-900 m-0",children:g.map((b,w)=>jsxs("div",{...h({line:b}),children:[n&&jsx("span",{className:"inline-block w-8 text-zinc-400 dark:text-zinc-600 select-none text-right mr-4",children:w+1}),b.map((x,R)=>jsx("span",{...v({token:x})},R))]},w))})}),!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"})})]})]})});sb.displayName="CodeBlock";var ib=_.forwardRef(({tabs:e,className:t,theme:n},r)=>{let[o,a]=useState(0),[s,i]=useState(false),c=ab(n)?themes.oneDark:themes.oneLight,d=async()=>{await navigator.clipboard.writeText(e[o].code),i(true),setTimeout(()=>i(false),2e3);},u=e[o],f=u.language||"bash";return jsxs("div",{ref:r,className:m("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:m("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:u.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((v,b)=>jsx("div",{...g({line:v}),children:v.map((w,x)=>jsx("span",{...h({token:w})},x))},b))})}),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"})})]})]})});ib.displayName="TabbedCodeBlock";var lb=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"}}),cb=_.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[u,f]=_.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:m(lb({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:m("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":u?"Copied":a,children:u?jsx(Check,{className:"h-4 w-4 text-green-500"}):jsx(Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});cb.displayName="Snippet";var yl=cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),db=_.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,...u},f)=>{let[p,g]=_.useState("loading");_.useEffect(()=>{n&&g("loading");},[n]);let h=()=>{g("loaded"),s?.();},v=()=>{g("error"),i?.();},b={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:m(yl({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:c,...d},children:o}):jsxs("div",{className:m(yl({radius:t}),"relative",e),style:{aspectRatio:c,...d},children:[p==="loading"&&a&&jsx(Da,{className:"absolute inset-0 h-full w-full"}),jsx("img",{ref:f,src:n,alt:r,onLoad:h,onError:v,className:m("h-full w-full transition-opacity duration-300",b,p==="loading"?"opacity-0":"opacity-100"),...u})]})});db.displayName="Image";var pb=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"}}),fb=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"}}),gb=_.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),bb=_.forwardRef(({className:e,size:t="md",value:n,defaultValue:r="",onValueChange:o,multiple:a=false,children:s,...i},l)=>{let[c,d]=_.useState(r),u=n??c,f=p=>{let g;if(a){let h=Array.isArray(u)?u:[u].filter(Boolean);h.includes(p)?g=h.filter(v=>v!==p):g=[...h,p];}else g=p;o?o(g):d(g);};return jsx(gb.Provider,{value:{value:u,onValueChange:f,multiple:a,size:t??"md"},children:jsx("div",{ref:l,role:"listbox","aria-multiselectable":a,className:m(pb({size:t,className:e})),...i,children:s})})});bb.displayName="Listbox";var vb=_.forwardRef(({className:e,value:t,disabled:n,icon:r,description:o,children:a,...s},i)=>{let{value:l,onValueChange:c,multiple:d,size:u}=_.useContext(gb),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:m(fb({size:u}),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"})]})});vb.displayName="ListboxItem";var xb=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"}}),yb=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 TT({className:e,variant:t,size:n,items:r,onReorder:o,renderItem:a,showHandle:s=true,disabled:i=false,...l},c){let[d,u]=_.useState(null),[f,p]=_.useState(null),g=(x,R)=>{i||(u(R),x.dataTransfer.effectAllowed="move",x.dataTransfer.setData("text/plain",String(R)));},h=(x,R)=>{x.preventDefault(),!(i||d===null||d===R)&&p(R);},v=()=>{p(null);},b=(x,R)=>{if(x.preventDefault(),i||d===null||d===R){u(null),p(null);return}let C=[...r],[y]=C.splice(d,1);C.splice(R,0,y),o?.(C),u(null),p(null);},w=()=>{u(null),p(null);};return jsx("div",{ref:c,className:m(xb({variant:t,size:n,className:e})),...l,children:r.map((x,R)=>jsxs("div",{draggable:!i,onDragStart:C=>g(C,R),onDragOver:C=>h(C,R),onDragLeave:v,onDrop:C=>b(C,R),onDragEnd:w,className:m(yb({variant:t,size:n,isDragging:d===R,isDragOver:f===R}),!i&&"cursor-move"),children:[s&&jsx("div",{className:m("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,R)})]},x.id))})}var MT=_.forwardRef(TT);var Cb=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}}),ET={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},Tb=_.forwardRef(({className:e,variant:t,loading:n=true,size:r="md",spinner:o,text:a,children:s,...i},l)=>jsxs("div",{ref:l,className:m("relative",e),...i,children:[s,jsx("div",{className:m(Cb({variant:t,visible:n})),"aria-hidden":!n,children:jsxs("div",{className:"flex flex-col items-center gap-2",children:[o||jsx(Loader2,{className:m(ET[r],"animate-spin text-primary")}),a&&jsx("span",{className:"text-sm text-muted-foreground",children:a})]})})]}));Tb.displayName="LoadingOverlay";var Mb=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"}}),Nb=_.forwardRef(({className:e,color:t,isLoading:n=false,progress:r,showSpinner:o=false,...a},s)=>{let[i,l]=_.useState(0),[c,d]=_.useState(false),u=_.useRef(null);return _.useEffect(()=>{if(r!==void 0){l(r),d(r>0&&r<100);return}return n?(d(true),l(10),u.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)),()=>{u.current&&clearInterval(u.current);}},[n,r]),!c&&r===void 0||r!==void 0&&(r<=0||r>=100)?null:jsxs(Fragment,{children:[jsx("div",{ref:s,className:m(Mb({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:m("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")})})]})});Nb.displayName="NProgress";var Lb=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}}),kb={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},VT={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},Sb=_.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:m(VT[n||"md"],"animate-bounce rounded-full bg-current",l),style:{animationDelay:`${d*.15}s`}},d))});case "pulse":return jsx("div",{className:m(kb[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:m(kb[n||"md"],"animate-spin",l)})}};return jsx("div",{ref:i,className:m(Lb({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:m("text-sm",l),children:o})]})})});Sb.displayName="Loading";var zT=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),OT=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-8 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-12 py-3 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}}),BT=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"}}),FT=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"}}),Ts={"dd/MM/yyyy":"/","MM/dd/yyyy":"/","yyyy-MM-dd":"-","dd.MM.yyyy":"."},Cl={"dd/MM/yyyy":["day","month","year"],"MM/dd/yyyy":["month","day","year"],"yyyy-MM-dd":["year","month","day"],"dd.MM.yyyy":["day","month","year"]},wl=(e,t)=>String(e).padStart(t,"0"),Db=(e,t)=>{if(!e)return "";let n=wl(e.getDate(),2),r=wl(e.getMonth()+1,2),o=wl(e.getFullYear(),4),a=Ts[t],s=Cl[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},Rs=(e,t)=>{let n=Ts[t],r=e.split(n);if(r.length!==3)return null;let o=Cl[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},KT=e=>{let t=Ts[e];return Cl[e].map(r=>r==="year"?"####":"##").join(t)},ea=(e,t)=>{if(!e?.from)return "";let n=Db(e.from,t),r=e.to?Db(e.to,t):"";return n&&r?`${n} - ${r}`:n},Hb=_.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:u,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:v="dd.MM.yyyy",showPickerIcon:b=true,mode:w="text",fullWidth:x=false,numberOfMonths:R=2,align:C="start",disabled:y,placeholder:N,id:T,...k},E)=>{let M=_.useId(),P=T||M,S=`${P}-description`,H=`${P}-error`,[D,L]=_.useState(f),[V,A]=_.useState(""),[B,I]=_.useState(false),[F,K]=_.useState(false),Y=u!==void 0?u:D,q=a&&r,$=KT(v),O=Ts[v],W=" - ";_.useEffect(()=>{F||A(ea(Y,v));},[Y,v,F]);let z=le=>{u===void 0&&L(le),p?.(le);},j=le=>{z(le),A(ea(le,v)),le?.from&&le?.to&&I(false);},oe=le=>{let Be=le.target.value;Be=Be.replace(new RegExp(`[^0-9\\${O}\\s-]`,"g"),"");let me=`${$}${W}${$}`,wt=Be.replace(new RegExp(`[\\${O}\\s-]`,"g"),""),gt="",yn=0;for(let Fe=0;Fe<me.length&&yn<wt.length;Fe++)me[Fe]==="#"?(gt+=wt[yn],yn++):gt+=me[Fe];if(A(gt),gt.length===me.length){let Fe=gt.split(W);if(Fe.length===2){let on=Rs(Fe[0].trim(),v),Ct=Rs(Fe[1].trim(),v);if(on&&Ct){if(g&&(on<g||Ct<g)||h&&(on>h||Ct>h))return;on<=Ct&&z({from:on,to:Ct});}}}},ge=()=>{K(true);},G=()=>{K(false);let le=`${$}${W}${$}`;if(V.length!==le.length)A(ea(Y,v));else {let Be=V.split(W);if(Be.length!==2)A(ea(Y,v));else {let me=Rs(Be[0].trim(),v),wt=Rs(Be[1].trim(),v);(!me||!wt||me>wt)&&A(ea(Y,v));}}},Pe=()=>{y||I(true);},Z=()=>{!y&&w==="picker"&&b&&I(true);};return jsxs("div",{className:m(zT({size:s}),e),children:[t&&jsxs("label",{htmlFor:P,className:m(FT({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs(ot,{open:b&&B,onOpenChange:I,children:[jsxs(an,{className:m("relative",x?"w-full":"w-fit"),children:[jsx("input",{ref:E,id:P,type:"text",inputMode:w==="text"?"numeric":void 0,value:V,onChange:w==="text"?oe:void 0,onClick:Z,onFocus:ge,onBlur:G,readOnly:w==="picker","aria-invalid":a,"aria-describedby":q?H:n?S:void 0,"aria-required":o,disabled:y,placeholder:N||`${v.toLowerCase()} - ${v.toLowerCase()}`,className:m(OT({size:s,isInvalid:a,fullWidth:x,showPickerIcon:b}),w==="picker"&&b&&"cursor-pointer",l),style:{borderColor:F||b&&B?"var(--color-foreground)":void 0},...k}),b&&jsx("button",{type:"button",onClick:Pe,disabled:y,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:m(BT({size:s}))})})]}),b&&jsx(at,{className:"w-auto p-0",align:C,children:jsx(no,{mode:"range",selected:Y,onSelect:j,numberOfMonths:R,disabled:le=>!!(g&&le<g||h&&le>h),defaultMonth:Y?.from,showMonthAndYearPickers:true})})]}),n&&!q&&jsx("p",{id:S,className:m("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),q&&jsx("p",{id:H,role:"alert",className:m("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Hb.displayName="DateRangePicker";var mo=e=>String(e).padStart(2,"0"),Ib=_.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]=_.useState(false),d=r?Array.from({length:24},(x,R)=>R):Array.from({length:12},(x,R)=>R+1),u=Array.from({length:Math.floor(60/o)},(x,R)=>R*o),f=x=>{if(!x)return n;if(r)return `${mo(x.hours)}:${mo(x.minutes)}`;let R=x.hours%12||12,C=x.hours>=12?"PM":"AM";return `${mo(R)}:${mo(x.minutes)} ${C}`},p=x=>{let R=e?.minutes??0,C=x;if(!r&&e){let y=e.hours>=12;y&&x!==12?C=x+12:!y&&x===12&&(C=0);}t?.({hours:C,minutes:R});},g=x=>{let R=e?.hours??0;t?.({hours:R,minutes:x});},h=x=>{if(!e)return;let R=e.hours;x==="AM"&&e.hours>=12?R=e.hours-12:x==="PM"&&e.hours<12&&(R=e.hours+12),t?.({hours:R,minutes:e.minutes});},v=()=>{let x=new Date;t?.({hours:x.getHours(),minutes:x.getMinutes()});},b=e?e.hours>=12?"PM":"AM":void 0,w=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:m("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(De,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:d.map(x=>jsx(ae,{variant:w===x?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(x),children:mo(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(De,{className:"h-[200px]",children:jsx("div",{className:"flex flex-col p-1",children:u.map(x=>jsx(ae,{variant:e?.minutes===x?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>g(x),children:mo(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:b==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("AM"),children:"AM"}),jsx(ae,{variant:b==="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:v,children:"Now"}),jsx(ae,{size:"sm",onClick:()=>c(false),children:"Done"})]})]})]})});Ib.displayName="TimePicker";var Vb=cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function UT({className:e,variant:t,items:n,itemHeight:r,height:o,overscan:a=3,renderItem:s,getItemKey:i,gap:l=0,onScrollChange:c,...d},u){let f=_.useRef(null),[p,g]=_.useState(0);_.useImperativeHandle(u,()=>f.current);let h=n.length*(r+l)-l,v=r+l,b=Math.max(0,Math.floor(p/v)-a),w=Math.ceil(o/v)+2*a,x=Math.min(n.length-1,b+w),R=y=>{let N=y.currentTarget.scrollTop;g(N),c?.(N);},C=_.useMemo(()=>{let y=[];for(let N=b;N<=x;N++)n[N]!==void 0&&y.push({item:n[N],index:N,style:{position:"absolute",top:N*v,left:0,right:0,height:r}});return y},[n,b,x,v,r]);return jsx("div",{ref:f,className:m(Vb({variant:t,className:e})),style:{height:o,position:"relative"},onScroll:R,...d,children:jsx("div",{style:{height:h,position:"relative"},children:C.map(({item:y,index:N,style:T})=>jsx("div",{style:T,children:s(y,N)},i?i(y,N):N))})})}var WT=_.forwardRef(UT);var zb=cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),Ml=cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),Ob=_.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:u,...f},p)=>{let g=_.useRef(null),h=_.useRef(null),v=_.useRef(false);_.useImperativeHandle(p,()=>g.current),_.useEffect(()=>{let w=h.current;if(!w)return;let x=new IntersectionObserver(R=>{let[C]=R;C.isIntersecting&&a&&!s&&!v.current&&(v.current=true,Promise.resolve(o()).finally(()=>{v.current=false;}));},{root:d?null:g.current,rootMargin:c||`${l}px`,threshold:0});return x.observe(w),()=>{x.disconnect();}},[a,s,o,l,c,d]);let b=jsx("div",{className:m(Ml({size:n})),children:jsx(Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})});return jsxs("div",{ref:g,className:m(zb({variant:t,className:e})),...f,children:[r,jsx("div",{ref:h,className:"h-px w-full"}),s&&(i||b),!a&&!s&&u&&jsx("div",{className:m(Ml({size:n}),"text-muted-foreground text-sm"),children:u})]})});Ob.displayName="InfiniteScroll";var rM=e=>e.map(t=>typeof t=="string"?{src:t}:t),Nl=_.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:u=true,showCounter:f=true,closeOnBackdropClick:p=true,className:g},h)=>{let v=_.useMemo(()=>rM(e),[e]),[b,w]=_.useState(r),[x,R]=_.useState(1),[C,y]=_.useState(0),[N,T]=_.useState(false),[k,E]=_.useState(false),[M,P]=_.useState({x:0,y:0}),[S,H]=_.useState({x:0,y:0}),[D,L]=_.useState(false),V=_.useRef(null),A=v[b];_.useEffect(()=>{L(true);},[]),_.useEffect(()=>{w(r);},[r]),_.useEffect(()=>{o?.(b);},[b,o]),_.useEffect(()=>{R(1),y(0),P({x:0,y:0});},[b]),_.useEffect(()=>{if(t)return Gt(),()=>Ut()},[t]);let B=_.useCallback(()=>{w(Z=>Z>0?Z-1:v.length-1);},[v.length]),I=_.useCallback(()=>{w(Z=>Z<v.length-1?Z+1:0);},[v.length]),F=()=>{R(Z=>Math.min(Z+.5,4));},K=()=>{R(Z=>{let le=Math.max(Z-.5,.5);return le===1&&P({x:0,y:0}),le});},Y=()=>{y(Z=>(Z+90)%360);},q=async()=>{if(A)try{let le=await(await fetch(A.src)).blob(),Be=URL.createObjectURL(le),me=document.createElement("a");me.href=Be,me.download=A.alt||`image-${b+1}`,document.body.appendChild(me),me.click(),document.body.removeChild(me),URL.revokeObjectURL(Be);}catch{window.open(A.src,"_blank");}},$=async()=>{if(V.current)if(N)try{await document.exitFullscreen(),T(!1);}catch{}else try{await V.current.requestFullscreen(),T(!0);}catch{}},O=Z=>{x>1&&(E(true),H({x:Z.clientX-M.x,y:Z.clientY-M.y}));},W=Z=>{k&&x>1&&P({x:Z.clientX-S.x,y:Z.clientY-S.y});},z=()=>{E(false);},j=()=>{n?.(false);},oe=Z=>{p&&Z.target===Z.currentTarget&&j();},ge=_.useCallback(Z=>{switch(Z.key){case "ArrowLeft":B();break;case "ArrowRight":I();break;case "Escape":n?.(false);break;case "+":case "=":F();break;case "-":K();break}},[B,I,n]);if(_.useEffect(()=>{if(t)return window.addEventListener("keydown",ge),()=>window.removeEventListener("keydown",ge)},[t,ge]),_.useEffect(()=>{let Z=()=>{T(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",Z),()=>document.removeEventListener("fullscreenchange",Z)},[]),v.length===0)return null;let G=a?_.isValidElement(a)?_.cloneElement(a,{onClick:Z=>{a.props.onClick?.(Z),n?.(true);}}):jsx("button",{type:"button",onClick:()=>n?.(true),children:a}):null;return jsxs(Fragment,{children:[G,!D||!t?null:Oa.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:oe}),jsxs("div",{ref:h,className:m("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&&v.length>1&&jsxs("span",{className:"text-sm",children:[b+1," / ",v.length]}),A?.title&&jsx("span",{className:"ml-4 text-sm font-medium",children:A.title})]}),jsxs("div",{className:"flex items-center gap-1",children:[i&&jsxs(Fragment,{children:[jsx("button",{onClick:K,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:F,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:Y,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:q,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:$,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:j,className:"rounded-full p-2 hover:bg-white/10 transition-colors ml-2",children:[jsx(X,{className:"h-5 w-5"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}),jsxs("div",{ref:V,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:O,onMouseMove:W,onMouseUp:z,onMouseLeave:z,children:[u&&v.length>1&&jsxs(Fragment,{children:[jsx("button",{onClick:B,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:I,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:A?.src,alt:A?.alt||"",className:m("max-h-full max-w-full object-contain transition-transform duration-200",k?"cursor-grabbing":x>1?"cursor-grab":""),style:{transform:`translate(${M.x}px, ${M.y}px) scale(${x}) rotate(${C}deg)`},draggable:false})]}),A?.description&&jsx("div",{className:"p-4 text-center text-white text-sm",children:A.description}),s&&v.length>1&&jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:v.map((Z,le)=>jsx("button",{onClick:()=>w(le),className:m("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",b===le?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsx("img",{src:Z.src,alt:Z.alt||`Thumbnail ${le+1}`,className:"h-full w-full object-cover"})},le))})]})]}),document.body)]})});Nl.displayName="ImageViewer";var Fb=({children:e,images:t,index:n=0,className:r})=>{let[o,a]=_.useState(false);return jsxs(Fragment,{children:[jsx("button",{onClick:()=>a(true),className:m("cursor-zoom-in",r),children:e}),jsx(Nl,{images:t,open:o,onOpenChange:a,initialIndex:n})]})};Fb.displayName="ImageViewerTrigger";var Kb=cva("absolute rounded-full border-2 border-background",{variants:{color:{default:"bg-muted-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},size:{sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3"},position:{"top-right":"top-0 right-0 -translate-y-1/3 translate-x-1/3","top-left":"top-0 left-0 -translate-y-1/3 -translate-x-1/3","bottom-right":"bottom-0 right-0 translate-y-1/3 translate-x-1/3","bottom-left":"bottom-0 left-0 translate-y-1/3 -translate-x-1/3"},ping:{true:"",false:""}},defaultVariants:{color:"primary",size:"md",position:"top-right",ping:false}}),$b=_.forwardRef(({className:e,color:t,size:n,position:r,ping:o,content:a,show:s=true,offset:i,style:l,...c},d)=>{if(!s)return null;let u=a!=null;return jsxs("span",{ref:d,className:m(Kb({color:t,size:u?void 0:n,position:r,ping:o}),u&&"flex h-auto w-auto min-w-[1.25rem] items-center justify-center px-1 py-0.5 text-[10px] font-medium text-white",e),style:{...l,...i!==void 0&&{transform:`translate(${r?.includes("right")?i:-i}px, ${r?.includes("top")?-i:i}px)`}},...c,children:[o&&jsx("span",{className:m("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",t==="default"&&"bg-muted-foreground",t==="primary"&&"bg-primary",t==="secondary"&&"bg-secondary",t==="success"&&"bg-success",t==="warning"&&"bg-warning",t==="danger"&&"bg-danger")}),a]})});$b.displayName="Indicator";var Gb=_.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:m("relative inline-flex",e),...n,children:t}));Gb.displayName="IndicatorWrapper";var Wb=cva("relative overflow-auto",{variants:{orientation:{vertical:"",horizontal:"",both:""},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"vertical",size:"md"}}),jb=_.forwardRef(({className:e,orientation:t,size:n,hideScrollbar:r=false,shadowColor:o="rgba(0, 0, 0, 0.1)",children:a,...s},i)=>{let l=_.useRef(null),[c,d]=_.useState({top:false,bottom:false,left:false,right:false});_.useImperativeHandle(i,()=>l.current);let u=_.useCallback(()=>{let b=l.current;if(!b)return;let{scrollTop:w,scrollLeft:x,scrollHeight:R,scrollWidth:C,clientHeight:y,clientWidth:N}=b;d({top:w>0,bottom:w<R-y-1,left:x>0,right:x<C-N-1});},[]);_.useEffect(()=>{let b=l.current;if(b)return u(),b.addEventListener("scroll",u),window.addEventListener("resize",u),()=>{b.removeEventListener("scroll",u),window.removeEventListener("resize",u);}},[u]);let p={sm:"20px",md:"40px",lg:"60px"}[n??"md"],g=t==="vertical"||t==="both",h=t==="horizontal"||t==="both",v={maskImage:[g&&c.top&&`linear-gradient(to bottom, transparent, black ${p})`,g&&c.bottom&&`linear-gradient(to top, transparent, black ${p})`,h&&c.left&&`linear-gradient(to right, transparent, black ${p})`,h&&c.right&&`linear-gradient(to left, transparent, black ${p})`].filter(Boolean).join(", ")||void 0,maskComposite:"intersect",WebkitMaskComposite:"source-in"};return jsx("div",{ref:l,className:m(Wb({orientation:t,size:n}),r&&"scrollbar-hide [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",e),style:v,...s,children:a})});jb.displayName="ScrollShadow";var _b=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"}}),cM={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"},dM={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"},uM=e=>{let t=e.toLowerCase();return cM[t]||e.toUpperCase()},na=e=>{let t=e.toLowerCase();return dM[t]||t},ks=e=>{let t=na(e);return ["meta","control","alt","shift"].includes(t)},Yb=_.forwardRef(({className:e,variant:t,size:n,keys:r,children:o,onPress:a,disabled:s,preventDefault:i=true,...l},c)=>{_.useEffect(()=>{if(!a||!r||s)return;let u=Array.isArray(r)?r:[r],f=u.filter(ks).map(na),p=u.filter(h=>!ks(h)).map(na),g=h=>{let v=f.includes("meta")===h.metaKey,b=f.includes("control")===h.ctrlKey,w=f.includes("alt")===h.altKey,x=f.includes("shift")===h.shiftKey,R=p.length===0||p.includes(h.key.toLowerCase());v&&b&&w&&x&&R&&(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(_.Fragment,{children:[p>0&&jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsx("span",{children:uM(f)})]},p)):o;return jsx("kbd",{ref:c,className:m(_b({variant:t,size:n}),s&&"opacity-50",e),...l,children:d()})});Yb.displayName="Kbd";function mM(e,t,n={}){let{disabled:r=false,preventDefault:o=true}=n;_.useEffect(()=>{if(r)return;let a=Array.isArray(e)?e:[e],s=a.filter(ks).map(na),i=a.filter(c=>!ks(c)).map(na),l=c=>{let d=s.includes("meta")===c.metaKey,u=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&&u&&f&&p&&g&&(o&&c.preventDefault(),t(c));};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,t,r,o]);}var Xb=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"}}),qb=_.forwardRef(({className:e,size:t,value:n,successDuration:r=2e3,onCopySuccess:o,onCopyError:a,copyIcon:s,successIcon:i,...l},c)=>{let[d,u]=_.useState(false),p={sm:14,md:16,lg:20}[t??"md"],g=async()=>{try{await navigator.clipboard.writeText(n),u(!0),o?.(),setTimeout(()=>{u(!1);},r);}catch(h){a?.(h);}};return jsx("button",{ref:c,type:"button",className:m(Xb({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}})})});qb.displayName="CopyButton";var Qb=cva("flex flex-col bg-background",{variants:{variant:{default:"border rounded-lg",bordered:"border-2 rounded-lg",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"md"}}),yM=[{value:"month",label:"Month"},{value:"week",label:"Week"},{value:"day",label:"Day"}],RM=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wM=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function CM(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 Ls(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Es(e){return Ls(e,new Date)}function Zb(e,t){return e.filter(n=>{let r=new Date(n.start),o=new Date(n.end);return Ls(r,t)||Ls(o,t)||r<t&&o>t})}var Jb=_.forwardRef(({className:e,variant:t,size:n,events:r=[],view:o="month",onViewChange:a,viewOptions:s=yM,date:i,onDateChange:l,onEventClick:c,onSlotClick:d,weekStartsOn:u=0,locale:f="en-US",...p},g)=>{let[h,v]=_.useState(new Date),b=i??h,w=M=>{l?l(M):v(M);},x=u===1?wM:RM,R=()=>{let M=new Date(b);o==="month"?M.setMonth(M.getMonth()-1):o==="week"?M.setDate(M.getDate()-7):M.setDate(M.getDate()-1),w(M);},C=()=>{let M=new Date(b);o==="month"?M.setMonth(M.getMonth()+1):o==="week"?M.setDate(M.getDate()+7):M.setDate(M.getDate()+1),w(M);},y=()=>{w(new Date);},N=()=>o==="day"?b.toLocaleDateString(f,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):b.toLocaleDateString(f,{year:"numeric",month:"long"}),T=()=>{let M=CM(b.getFullYear(),b.getMonth(),u);return jsxs("div",{className:"flex-1 flex flex-col",children:[jsx("div",{className:"grid grid-cols-7 border-b",children:x.map(P=>jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:P},P))}),jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:M.map((P,S)=>{let H=Zb(r,P),D=P.getMonth()===b.getMonth();return jsxs("div",{className:m("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!D&&"bg-muted/30"),onClick:()=>d?.(P),children:[jsx("div",{className:m("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",Es(P)&&"bg-primary text-primary-foreground",!D&&"text-muted-foreground"),children:P.getDate()}),jsxs("div",{className:"space-y-0.5",children:[H.slice(0,3).map(L=>jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:L.color||"hsl(var(--primary))",color:"white"},onClick:V=>{V.stopPropagation(),c?.(L);},children:L.title},L.id)),H.length>3&&jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",H.length-3," more"]})]})]},S)})})]})},k=()=>{let M=TM(b,u),P=Array.from({length:24},(S,H)=>H);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((S,H)=>jsxs("div",{className:m("p-2 text-center border-l",Es(S)&&"bg-primary/10"),children:[jsx("div",{className:"text-xs text-muted-foreground",children:x[H]}),jsx("div",{className:m("text-lg font-semibold",Es(S)&&"text-primary"),children:S.getDate()})]},H))]}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:P.map(S=>jsxs(_.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[S.toString().padStart(2,"0"),":00"]}),M.map((H,D)=>{let L=new Date(H);L.setHours(S,0,0,0);let V=r.filter(A=>{let B=new Date(A.start);return Ls(B,H)&&B.getHours()===S});return jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>d?.(L),children:V.map(A=>jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:A.color||"hsl(var(--primary))",color:"white"},onClick:B=>{B.stopPropagation(),c?.(A);},children:A.title},A.id))},D)})]},S))})})]})},E=()=>{let M=Array.from({length:24},(S,H)=>H),P=Zb(r,b);return jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsx("div",{className:"p-4 border-b text-center",children:jsx("div",{className:m("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",Es(b)&&"bg-primary text-primary-foreground"),children:b.getDate()})}),jsx("div",{className:"flex-1 overflow-auto",children:jsx("div",{className:"grid grid-cols-[60px_1fr]",children:M.map(S=>{let H=new Date(b);H.setHours(S,0,0,0);let D=P.filter(L=>new Date(L.start).getHours()===S);return jsxs(_.Fragment,{children:[jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[S.toString().padStart(2,"0"),":00"]}),jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>d?.(H),children:D.map(L=>jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:L.color||"hsl(var(--primary))",color:"white"},onClick:V=>{V.stopPropagation(),c?.(L);},children:L.title},L.id))})]},S)})})})]})};return jsxs("div",{ref:g,className:m(Qb({variant:t,size:n,className:e})),...p,children:[jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx(ae,{variant:"flat",size:"sm",onClick:y,children:"Today"}),jsx(ae,{variant:"flat",size:"sm",isIconOnly:true,onClick:R,children:jsx(ChevronLeft,{className:"h-4 w-4"})}),jsx(ae,{variant:"flat",size:"sm",isIconOnly:true,onClick:C,children:jsx(ChevronRight,{className:"h-4 w-4"})}),jsx("h2",{className:"text-lg font-semibold ml-2",children:N()})]}),jsx(Va,{options:s,value:o,onValueChange:M=>a?.(M),className:"w-[120px]"})]}),o==="month"&&T(),o==="week"&&k(),o==="day"&&E()]})});Jb.displayName="FullCalendar";var Is=({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))})]}),oa=cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),aa=["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%))"],ev=_.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=aa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",curveType:c="monotone",...d},u)=>jsx("div",{ref:u,className:m(oa({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(Is,{})}),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))]})})}));ev.displayName="LineChart";var tv=_.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=aa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,layout:d="horizontal",...u},f)=>jsx("div",{ref:f,className:m(oa({size:t,className:e})),...u,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(Is,{})}),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))]})})}));tv.displayName="BarChart";var nv=_.forwardRef(({className:e,size:t,data:n,dataKey:r="value",nameKey:o="name",colors:a=aa,innerRadius:s=0,outerRadius:i=80,showLegend:l=true,showTooltip:c=true,showLabels:d=false,...u},f)=>jsx("div",{ref:f,className:m(oa({size:t,className:e})),...u,children:jsx(ResponsiveContainer,{width:"100%",height:"100%",children:jsxs(PieChart,{children:[c&&jsx(Tooltip,{content:jsx(Is,{})}),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}`))})]})})}));nv.displayName="PieChart";var rv=_.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=aa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,curveType:d="monotone",...u},f)=>jsx("div",{ref:f,className:m(oa({size:t,className:e})),...u,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(Is,{})}),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))]})})}));rv.displayName="AreaChart";var sv=cva("flex gap-4 overflow-x-auto p-4",{variants:{variant:{default:"bg-muted/30",bordered:"border rounded-lg bg-background",ghost:""}},defaultVariants:{variant:"default"}}),iv=cva("flex flex-col min-w-[280px] w-[280px] rounded-lg",{variants:{variant:{default:"bg-muted/50",bordered:"border bg-background",ghost:"bg-transparent"}},defaultVariants:{variant:"default"}}),Il=cva("rounded-lg p-3 cursor-grab active:cursor-grabbing transition-all",{variants:{variant:{default:"bg-background border shadow-sm hover:shadow-md",bordered:"border-2 bg-background hover:border-primary/50",ghost:"bg-muted/50 hover:bg-muted"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg",false:""}},defaultVariants:{variant:"default",isDragging:false}});function _M({card:e,columnId:t,variant: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}}),u={transform:CSS.Transform.toString(l),transition:c};return jsx("div",{ref:i,style:u,className:m(Il({variant:n,isDragging:d})),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 YM({column:e,variant:t,renderCard:n,onCardClick:r,onAddCard:o,showAddCard:a,columnHeight:s}){return jsxs("div",{className:m(iv({variant:t})),children:[jsxs("div",{className:"flex items-center justify-between p-3 border-b",children:[jsxs("div",{className:"flex items-center gap-2",children:[e.color&&jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),jsx("h3",{className:"font-semibold text-sm",children:e.title}),jsx("span",{className:"text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded-full",children:e.cards.length})]}),a&&jsx(ae,{variant:"ghost",size:"sm",isIconOnly:true,className:"h-7 w-7",onClick:()=>o?.(e.id),children:jsx(Plus,{className:"h-4 w-4"})})]}),jsx(De,{style:{height:s},children:jsxs("div",{className:"p-2 space-y-2",children:[jsx(SortableContext,{items:e.cards.map(i=>i.id),strategy:verticalListSortingStrategy,children:e.cards.map(i=>jsx(_M,{card:i,columnId:e.id,variant:t,renderCard:n,onCardClick:r},i.id))}),e.cards.length===0&&jsx("div",{className:"h-20 border-2 border-dashed rounded-lg flex items-center justify-center text-muted-foreground text-sm",children:"Drop here"})]})})]})}var lv=_.forwardRef(({className:e,variant:t,columns:n,onCardMove:r,onCardClick:o,onAddCard:a,renderCard:s,showAddCard:i=true,columnHeight:l=500,...c},d)=>{let[u,f]=_.useState(null),[p,g]=_.useState(null),h=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),v=R=>n.find(C=>C.cards.some(y=>y.id===R));return jsxs(DndContext,{sensors:h,collisionDetection:closestCorners,onDragStart:R=>{let{active:C}=R,y=v(C.id);if(y){let N=y.cards.find(T=>T.id===C.id);N&&(f(N),g(y.id));}},onDragOver:R=>{let{active:C,over:y}=R;if(!y)return;let N=C.id,T=y.id,k=v(N),E=v(T)||n.find(S=>S.id===T);if(!k||!E||k.id===E.id)return;let M=E.cards.findIndex(S=>S.id===T),P=M===-1?E.cards.length:M;r?.(N,k.id,E.id,P);},onDragEnd:R=>{let{active:C,over:y}=R;if(y&&C.id!==y.id){let N=v(C.id),T=v(y.id)||n.find(k=>k.id===y.id);if(N&&T){let k=T.cards.findIndex(M=>M.id===y.id),E=k===-1?T.cards.length:k;r?.(C.id,N.id,T.id,E);}}f(null),g(null);},children:[jsx("div",{ref:d,className:m(sv({variant:t,className:e})),...c,children:n.map(R=>jsx(YM,{column:R,variant:t,renderCard:s,onCardClick:o,onAddCard:a,showAddCard:i,columnHeight:l},R.id))}),jsx(DragOverlay,{children:u&&p&&jsx("div",{className:m(Il({variant:t,isDragging:true})),children:s?s(u,p):jsxs("div",{className:"flex items-start gap-2",children:[jsx(GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("p",{className:"font-medium text-sm truncate",children:u.title}),u.description&&jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:u.description})]})]})})})]})});lv.displayName="KanbanBoard";var cv=cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),dv=_.createContext(null);function As(){let e=_.useContext(dv);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var uv=_.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[u,f]=XM({...r,axis:a==="horizontal"?"x":"y"},o),[p,g]=_.useState(false),[h,v]=_.useState(false),[b,w]=_.useState(0),[x,R]=_.useState([]),C=_.useCallback(E=>{E&&(w(E.selectedScrollSnap()),g(E.canScrollPrev()),v(E.canScrollNext()));},[]),y=_.useCallback(()=>{f?.scrollPrev();},[f]),N=_.useCallback(()=>{f?.scrollNext();},[f]),T=_.useCallback(E=>{f?.scrollTo(E);},[f]),k=_.useCallback(E=>{E.key==="ArrowLeft"?(E.preventDefault(),y()):E.key==="ArrowRight"&&(E.preventDefault(),N());},[y,N]);return _.useEffect(()=>{!f||!l||l(f);},[f,l]),_.useEffect(()=>{if(f)return R(f.scrollSnapList()),C(f),f.on("reInit",C),f.on("select",C),()=>{f?.off("select",C);}},[f,C]),jsx(dv.Provider,{value:{carouselRef:u,api:f,scrollPrev:y,scrollNext:N,canScrollPrev:p,canScrollNext:h,selectedIndex:b,scrollSnaps:x,scrollTo:T,orientation:a},children:jsxs("div",{ref:d,className:m(cv({variant:t,className:e})),onKeyDownCapture:k,role:"region","aria-roledescription":"carousel",...c,children:[jsx("div",{ref:u,className:"overflow-hidden",children:jsx("div",{className:m("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:n})}),s&&jsxs(Fragment,{children:[jsx(Vl,{}),jsx(Al,{})]}),i&&x.length>1&&jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:x.map((E,M)=>jsx("button",{className:m("w-2 h-2 rounded-full transition-all",M===b?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>T(M),"aria-label":`Go to slide ${M+1}`},M))})]})})});uv.displayName="Carousel";var mv=_.forwardRef(({className:e,...t},n)=>jsx("div",{ref:n,className:m("flex",e),...t}));mv.displayName="CarouselContent";var pv=_.forwardRef(({className:e,basis:t="basis-full",...n},r)=>{let{orientation:o}=As();return jsx("div",{ref:r,role:"group","aria-roledescription":"slide",className:m("min-w-0 shrink-0 grow-0",o==="horizontal"?"pl-4":"pt-4",t,e),...n})});pv.displayName="CarouselItem";var Vl=_.forwardRef(({className:e,variant:t="bordered",size:n="sm",isIconOnly:r=true,...o},a)=>{let{scrollPrev:s,canScrollPrev:i}=As();return jsxs(ae,{ref:a,variant:t,size:n,isIconOnly:r,className:m("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"})]})});Vl.displayName="CarouselPrevious";var Al=_.forwardRef(({className:e,variant:t="bordered",size:n="sm",isIconOnly:r=true,...o},a)=>{let{scrollNext:s,canScrollNext:i}=As();return jsxs(ae,{ref:a,variant:t,size:n,isIconOnly:r,className:m("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"})]})});Al.displayName="CarouselNext";var fv=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"}}),zs={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"}},Ol={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}"]},gv=_.forwardRef(({className:e,size:t,onEmojiSelect:n,recentEmojis:r=[],defaultCategory:o="smileys",showSearch:a=true,showCategories:s=true,...i},l)=>{let[c,d]=_.useState(r.length>0?"recent":o),[u,f]=_.useState(""),g=u?Object.values(Ol).flat().filter(v=>v.toLowerCase().includes(u.toLowerCase())):c==="recent"?r:Ol[c]||[],h=v=>{n?.(v);};return jsxs("div",{ref:l,className:m(fv({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(ka,{placeholder:"Search emojis...",value:u,onChange:v=>f(v.target.value),className:"pl-8 h-8"})]})}),s&&!u&&jsx(De,{orientation:"horizontal",className:"border-b",children:jsx("div",{className:"flex px-1",children:Object.entries(zs).map(([v,{icon:b}])=>v==="recent"&&r.length===0?null:jsx("button",{className:m("shrink-0 p-2 text-lg hover:bg-accent rounded transition-colors",c===v&&"bg-accent"),onClick:()=>d(v),title:zs[v].name,children:b},v))})}),!u&&jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:zs[c].name}),jsx(De,{className:"flex-1",children:jsxs("div",{className:"grid grid-cols-8 gap-1 p-2",children:[g.map((v,b)=>jsx("button",{className:"w-8 h-8 flex items-center justify-center text-xl hover:bg-accent rounded transition-colors",onClick:()=>h(v),children:v},`${v}-${b}`)),g.length===0&&jsx("div",{className:"col-span-8 py-8 text-center text-muted-foreground text-sm",children:"No emojis found"})]})})]})});gv.displayName="EmojiPicker";var bv=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),kN=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"}}),PN=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})]}),vv=_.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,...u},f)=>{let p=useEditor({extensions:[oN.configure({heading:{levels:[1,2,3]}}),aN.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),sN,iN.configure({types:["heading","paragraph"]}),lN.configure({placeholder:a})],content:r,editable:!s,onUpdate:({editor:h})=>{o?.(h.getHTML());},onCreate:({editor:h})=>{d?.(h);}});_.useEffect(()=>{p&&r!==p.getHTML()&&p.commands.setContent(r);},[r,p]),_.useEffect(()=>{p&&p.setEditable(!s);},[s,p]);let g=()=>{if(!p)return;let h=p.getAttributes("link").href,v=window.prompt("URL",h);if(v!==null){if(v===""){p.chain().focus().extendMarkRange("link").unsetLink().run();return}p.chain().focus().extendMarkRange("link").setLink({href:v}).run();}};return p?jsx(jn,{children:jsxs("div",{ref:f,className:m(bv({variant:t,size:n,className:e})),...u,children:[i&&!s&&jsxs("div",{className:m(kN({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(Wn,{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(Wn,{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(Wn,{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(Wn,{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(Wn,{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(Wn,{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:m(PN({size:n})),style:{minHeight:l,maxHeight:c}})]})}):null});vv.displayName="RichTextEditor";var xv=cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function AN(e,t,n){return centerCrop(makeAspectCrop({unit:"%",width:90},n,e,t),e,t)}async function hv(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,u=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(u),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 yv=_.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:u,...f},p)=>{let g=_.useRef(null),[h,v]=_.useState(),[b,w]=_.useState(),[x,R]=_.useState(1),[C,y]=_.useState(0),N=M=>{let{width:P,height:S}=M.currentTarget;if(r){let H=AN(P,S,r);v(H);}else v(u||{unit:"%",x:10,y:10,width:80,height:80});},T=M=>{v(M),o?.(M);},k=async M=>{if(w(M),a&&g.current&&M.width&&M.height){let P=await hv(g.current,M,C,x);a(P);}},E=()=>{y(M=>(M+90)%360);};return _.useEffect(()=>{b&&g.current&&a&&hv(g.current,b,C,x).then(M=>{a(M);});},[x,C,b,a]),jsxs("div",{ref:p,className:m(xv({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(EN,{crop:h,onChange:T,onComplete:k,aspect:r,circularCrop:d,className:"max-h-[400px]",children:jsx("img",{ref:g,src:n,alt:"Crop preview",onLoad:N,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(Ga,{value:[x],onValueChange:([M])=>R(M),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:E,children:jsx(RotateCw,{className:"h-4 w-4"})})]})]})});yv.displayName="ImageCropper";var $l=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"}}),BN={sm:96,md:128,lg:192},wv=_.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:u=40,logoPadding:f=4,logoBackgroundColor:p="white",...g},h)=>{let v=o??BN[n??"md"];return r?jsx("div",{ref:h,className:m($l({variant:t,size:n,className:e})),...g,children:jsxs("div",{className:"relative inline-block",children:[jsx(zN,{value:r,size:v,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:u,height:u,objectFit:"contain"}})})]})}):jsx("div",{ref:h,className:m($l({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:v,height:v},children:"No data"})})});wv.displayName="QRCode";var Cv=({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});Cv.displayName="ThemeProvider";var jN=cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),Tv=_.forwardRef(({className:e,variant:t="ghost",size:n="md",mode:r="dropdown"},o)=>{let{theme:a,setTheme:s,resolvedTheme:i}=useTheme(),[l,c]=_.useState(false);_.useEffect(()=>{c(true);},[]);let d=()=>{let u=["light","dark","system"],p=(u.indexOf(a||"system")+1)%u.length;s(u[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"})]})});Tv.displayName="ThemeToggle";var Mv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),Nv=cva("flex w-full rounded-md border border-input bg-background ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-12 px-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),kv=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=_.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,startContent:u,endContent:f,id:p,...g},h)=>{let v=_.useId(),b=p||v,w=`${b}-description`,x=`${b}-error`,R=a&&r;return jsxs("div",{className:m(Mv({size:s}),e),children:[t&&jsxs("label",{htmlFor:b,className:m(kv({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[u&&jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:u}),jsx("input",{ref:h,id:b,"aria-invalid":a,"aria-describedby":R?x:n?w:void 0,"aria-required":o,className:m(Nv({size:s,isInvalid:a}),u&&"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&&!R&&jsx("p",{id:w,className:m("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),R&&jsx("p",{id:x,role:"alert",className:m("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Pv.displayName="TextField";var Sv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),XN=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}}),Ev=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"}}),Lv=cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),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"}}),Dv=_.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,min:u,max:f,step:p=1,value:g,defaultValue:h,onChange:v,showButtons:b=true,formatOptions:w,fullWidth:x=false,disabled:R,id:C,...y},N)=>{let T=_.useId(),k=C||T,E=`${k}-description`,M=`${k}-error`,[P,S]=_.useState(h),[H,D]=_.useState(false),L=g!==void 0?g:P,V=a&&r,A=_.useCallback(O=>{O!==void 0&&(u!==void 0&&O<u&&(O=u),f!==void 0&&O>f&&(O=f)),g===void 0&&S(O),v?.(O);},[g,u,f,v]),B=()=>{let O=(L??0)+p;A(O);},I=()=>{let O=(L??0)-p;A(O);},F=O=>{let W=O.target.value;if(W==="")A(void 0);else {let z=parseFloat(W);isNaN(z)||A(z);}},K=O=>{O.key==="ArrowUp"?(O.preventDefault(),B()):O.key==="ArrowDown"&&(O.preventDefault(),I());},Y=_.useMemo(()=>L===void 0?"":w?new Intl.NumberFormat(void 0,w).format(L):L.toString(),[L,w]),q=u!==void 0&&L!==void 0&&L<=u,$=f!==void 0&&L!==void 0&&L>=f;return jsxs("div",{className:m(Sv({size:s}),e),children:[t&&jsxs("label",{htmlFor:k,className:m(qN({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[b&&jsx("button",{type:"button",onClick:I,disabled:R||q,className:m(Ev({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsx(Minus,{className:m(Lv({size:s}))})}),jsx("input",{ref:N,id:k,type:"text",inputMode:"decimal",value:Y,onChange:F,onKeyDown:K,onFocus:()=>D(true),onBlur:()=>D(false),"aria-invalid":a,"aria-describedby":V?M:n?E:void 0,"aria-required":o,"aria-valuemin":u,"aria-valuemax":f,"aria-valuenow":L,disabled:R,className:m(XN({size:s,isInvalid:a,fullWidth:x}),!b&&"px-3",l),style:{borderColor:H?"var(--color-foreground)":void 0},...y}),b&&jsx("button",{type:"button",onClick:B,disabled:R||$,className:m(Ev({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsx(Plus,{className:m(Lv({size:s}))})})]}),n&&!V&&jsx("p",{id:E,className:m("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),V&&jsx("p",{id:M,role:"alert",className:m("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Dv.displayName="NumberField";var Iv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),JN=cva("flex w-full rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-12 pl-12 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),Hv=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"}}),ek=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"}}),tk=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"}}),Vv=_.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:u,defaultValue:f="",onChange:p,onClear:g,onSearch:h,showClearButton:v=true,showSearchIcon:b=true,disabled:w,placeholder:x="Search...",id:R,...C},y)=>{let N=_.useId(),T=R||N,k=`${T}-description`,E=`${T}-error`,[M,P]=_.useState(f),S=u!==void 0?u:M,H=a&&r,D=S.length>0,L=B=>{let I=B.target.value;u===void 0&&P(I),p?.(I);},V=()=>{u===void 0&&P(""),p?.(""),g?.();},A=B=>{B.key==="Enter"?(B.preventDefault(),h?.(S)):B.key==="Escape"&&D&&(B.preventDefault(),V());};return jsxs("div",{className:m(Iv({size:s}),e),children:[t&&jsxs("label",{htmlFor:T,className:m(ek({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:"relative",children:[b&&jsx(Search,{className:m(Hv({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsx("input",{ref:y,id:T,type:"search",value:S,onChange:L,onKeyDown:A,placeholder:x,"aria-invalid":a,"aria-describedby":H?E:n?k:void 0,"aria-required":o,disabled:w,className:m(JN({size:s,isInvalid:a}),!b&&"pl-3",!v&&"pr-3",l),...C}),v&&D&&!w&&jsx("button",{type:"button",onClick:V,className:m(tk({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsx(X,{className:m(Hv({size:s}))})})]}),n&&!H&&jsx("p",{id:k,className:m("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),H&&jsx("p",{id:E,role:"alert",className:m("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Vv.displayName="SearchField";var Av=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),rk=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-8 py-1.5 text-xs",md:"h-10 py-2 text-sm",lg:"h-12 py-3 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}}),ok=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"}}),ak=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"}}),$s={"dd/MM/yyyy":"/","MM/dd/yyyy":"/","yyyy-MM-dd":"-","dd.MM.yyyy":"."},ql={"dd/MM/yyyy":["day","month","year"],"MM/dd/yyyy":["month","day","year"],"yyyy-MM-dd":["year","month","day"],"dd.MM.yyyy":["day","month","year"]},Yl=(e,t)=>String(e).padStart(t,"0"),ua=(e,t)=>{if(!e)return "";let n=Yl(e.getDate(),2),r=Yl(e.getMonth()+1,2),o=Yl(e.getFullYear(),4),a=$s[t],s=ql[t],i={day:n,month:r,year:o};return s.map(l=>i[l]).join(a)},Xl=(e,t)=>{let n=$s[t],r=e.split(n);if(r.length!==3)return null;let o=ql[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},sk=e=>{let t=$s[e];return ql[e].map(r=>r==="year"?"####":"##").join(t)},Gs=_.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:u,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:v="dd.MM.yyyy",showPickerIcon:b=true,mode:w="text",fullWidth:x=false,disabled:R,placeholder:C,id:y,...N},T)=>{let k=_.useId(),E=y||k,M=`${E}-description`,P=`${E}-error`,[S,H]=_.useState(f??null),[D,L]=_.useState(""),[V,A]=_.useState(false),[B,I]=_.useState(false),F=u!==void 0?u:S,K=a&&r,Y=$s[v],q=sk(v);_.useEffect(()=>{B||L(ua(F,v));},[F,v,B]);let $=G=>{u===void 0&&H(G),p?.(G);},O=G=>{let Pe=G??null;$(Pe),L(ua(Pe,v)),A(false);},W=G=>{let Pe=G.target.value;Pe=Pe.replace(new RegExp(`[^0-9\\${Y}]`,"g"),"");let Z=Pe.replace(new RegExp(`\\${Y}`,"g"),""),le="",Be=0;for(let me=0;me<q.length&&Be<Z.length;me++)q[me]==="#"?(le+=Z[Be],Be++):le+=q[me];if(L(le),le.length===q.length){let me=Xl(le,v);if(me){if(g&&me<g||h&&me>h)return;$(me);}}},z=()=>{I(true);},j=()=>{I(false),D.length!==q.length?L(ua(F,v)):Xl(D,v)||L(ua(F,v));},oe=()=>{R||A(true);},ge=()=>{!R&&w==="picker"&&b&&A(true);};return jsxs("div",{className:m(Av({size:s}),e),children:[t&&jsxs("label",{htmlFor:E,className:m(ak({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs(ot,{open:b&&V,onOpenChange:A,children:[jsxs(an,{className:m("relative",x?"w-full":"w-fit"),children:[jsx("input",{ref:T,id:E,type:"text",inputMode:w==="text"?"numeric":void 0,value:D,onChange:w==="text"?W:void 0,onClick:ge,onFocus:z,onBlur:j,readOnly:w==="picker","aria-invalid":a,"aria-describedby":K?P:n?M:void 0,"aria-required":o,disabled:R,placeholder:C||v.toLowerCase(),className:m(rk({size:s,isInvalid:a,fullWidth:x,showPickerIcon:b}),w==="picker"&&b&&"cursor-pointer",l),style:{borderColor:B||b&&V?"var(--color-foreground)":void 0},...N}),b&&jsx("button",{type:"button",onClick:oe,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:m(ok({size:s}))})})]}),b&&jsx(at,{className:"w-auto p-0",align:"start",children:jsx(no,{mode:"single",selected:F??void 0,onSelect:O,disabled:G=>!!(g&&G<g||h&&G>h),defaultMonth:F??void 0,showMonthAndYearPickers:true})})]}),n&&!K&&jsx("p",{id:M,className:m("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),K&&jsx("p",{id:P,role:"alert",className:m("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Gs.displayName="DatePicker";var ik=Gs,lk=Gs;var zv=cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),ck=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}}),dk=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"}}),Ov=_.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:u,defaultValue:f,onChange:p,minTime:g,maxTime:h,showSeconds:v=false,hourCycle:b=24,disabled:w,fullWidth:x=false,id:R,...C},y)=>{let N=_.useId(),T=R||N,k=`${T}-description`,E=`${T}-error`,M=_.useRef(null),P=_.useRef(null),S=_.useRef(null),H=_.useRef(null),[D,L]=_.useState(f??null),V=u!==void 0?u:D,A=a&&r,B=U=>b===24?U:U===0?12:U>12?U-12:U,I=U=>U>=12?"PM":"AM",F=(U,re)=>re==="AM"?U===12?0:U:U===12?12:U+12,[K,Y]=_.useState(V?String(B(V.hour)).padStart(2,"0"):""),[q,$]=_.useState(V?String(V.minute).padStart(2,"0"):""),[O,W]=_.useState(V?.second!==void 0?String(V.second).padStart(2,"0"):""),[z,j]=_.useState(V?I(V.hour):"AM"),[oe,ge]=_.useState(false);_.useEffect(()=>{u!==void 0&&(u?(Y(String(B(u.hour)).padStart(2,"0")),$(String(u.minute).padStart(2,"0")),u.second!==void 0&&W(String(u.second).padStart(2,"0")),j(I(u.hour))):(Y(""),$(""),W("")));},[u,b]);let G=(U,re,X,Se)=>{let de=parseInt(U,10),We=parseInt(re,10),je=v?parseInt(X,10):void 0;if(isNaN(de)||isNaN(We)||v&&isNaN(je)){u===void 0&&L(null),p?.(null);return}let ve={hour:b===12?F(de,Se):de,minute:We,...v&&je!==void 0&&{second:je}};u===void 0&&L(ve),p?.(ve);},Pe=U=>{let re=U.target.value.replace(/\D/g,"").slice(0,2);Y(re);let X=b===24?23:12,Se=b===24?0:1;if(re.length===2){let de=parseInt(re,10);de>=Se&&de<=X&&(P.current?.focus(),P.current?.select());}},Z=U=>{let re=U.target.value.replace(/\D/g,"").slice(0,2);if($(re),re.length===2){let X=parseInt(re,10);X>=0&&X<=59&&(v?(S.current?.focus(),S.current?.select()):b===12&&H.current?.focus());}},le=U=>{let re=U.target.value.replace(/\D/g,"").slice(0,2);W(re),re.length===2&&b===12&&H.current?.focus();},Be=()=>{if(K){let U=parseInt(K,10),re=b===24?23:12,Se=Math.min(Math.max(U,b===24?0:1),re),de=String(Se).padStart(2,"0");Y(de),G(de,q,O,z);}},me=()=>{if(q){let U=parseInt(q,10),re=Math.min(Math.max(U,0),59),X=String(re).padStart(2,"0");$(X),G(K,X,O,z);}},wt=()=>{if(O){let U=parseInt(O,10),re=Math.min(Math.max(U,0),59),X=String(re).padStart(2,"0");W(X),G(K,q,X,z);}},gt=()=>{let U=z==="AM"?"PM":"AM";j(U),G(K,q,O,U);},yn=U=>{let re=U.key.toLowerCase();re==="a"?(U.preventDefault(),z!=="AM"&&(j("AM"),G(K,q,O,"AM"))):re==="p"?(U.preventDefault(),z!=="PM"&&(j("PM"),G(K,q,O,"PM"))):re==="arrowup"||re==="arrowdown"?(U.preventDefault(),gt()):re==="arrowleft"&&(U.preventDefault(),v?(S.current?.focus(),S.current?.select()):(P.current?.focus(),P.current?.select()));},Fe=(U,re)=>{if(U.key==="ArrowUp"||U.key==="ArrowDown"){U.preventDefault();let X=U.key==="ArrowUp"?1:-1;if(re==="hour"){let Se=parseInt(K,10)||0,de=b===24?23:12,We=b===24?0:1,je=Se+X;je>de&&(je=We),je<We&&(je=de);let Gn=String(je).padStart(2,"0");Y(Gn),G(Gn,q,O,z);}else if(re==="minute"){let de=(parseInt(q,10)||0)+X;de>59&&(de=0),de<0&&(de=59);let We=String(de).padStart(2,"0");$(We),G(K,We,O,z);}else if(re==="second"){let de=(parseInt(O,10)||0)+X;de>59&&(de=0),de<0&&(de=59);let We=String(de).padStart(2,"0");W(We),G(K,q,We,z);}}U.key==="ArrowRight"&&(U.preventDefault(),re==="hour"?(P.current?.focus(),P.current?.select()):re==="minute"&&v?(S.current?.focus(),S.current?.select()):(re==="minute"&&!v&&b===12||re==="second"&&b===12)&&H.current?.focus()),U.key==="ArrowLeft"&&(U.preventDefault(),re==="minute"?(M.current?.focus(),M.current?.select()):re==="second"&&(P.current?.focus(),P.current?.select())),U.key==="Backspace"&&U.currentTarget.value===""&&(re==="minute"?M.current?.focus():re==="second"&&P.current?.focus());},Ct=m((()=>{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",w&&"cursor-not-allowed");return jsxs("div",{ref:y,className:m(zv({size:s}),e),...C,children:[t&&jsxs("label",{htmlFor:T,className:m(dk({size:s}),i),children:[t,o&&jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxs("div",{className:m(ck({size:s,isInvalid:a,disabled:w,fullWidth:x}),l),style:{borderColor:oe?"var(--color-foreground)":void 0},onFocus:()=>ge(true),onBlur:U=>{U.currentTarget.contains(U.relatedTarget)||ge(false);},children:[jsx("input",{ref:M,id:T,type:"text",inputMode:"numeric",placeholder:b===24?"HH":"hh",value:K,onChange:Pe,onBlur:Be,onKeyDown:U=>Fe(U,"hour"),onFocus:U=>U.target.select(),"aria-label":"Hour","aria-invalid":a,"aria-describedby":A?E:n?k:void 0,"aria-required":o,disabled:w,className:Ct}),jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:P,type:"text",inputMode:"numeric",placeholder:"mm",value:q,onChange:Z,onBlur:me,onKeyDown:U=>Fe(U,"minute"),onFocus:U=>U.target.select(),"aria-label":"Minute",disabled:w,className:Ct}),v&&jsxs(Fragment,{children:[jsx("span",{className:"text-muted-foreground",children:":"}),jsx("input",{ref:S,type:"text",inputMode:"numeric",placeholder:"ss",value:O,onChange:le,onBlur:wt,onKeyDown:U=>Fe(U,"second"),onFocus:U=>U.target.select(),"aria-label":"Second",disabled:w,className:Ct})]}),b===12&&jsx("button",{ref:H,type:"button",onClick:gt,onKeyDown:yn,disabled:w,className:m("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",w&&"cursor-not-allowed"),"aria-label":"AM/PM",children:z})]}),n&&!A&&jsx("p",{id:k,className:m("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),A&&jsx("p",{id:E,role:"alert",className:m("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Ov.displayName="TimeField";var Fv=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"}}),Kv=_.forwardRef(({className:e,variant:t,orientation:n,size:r,density:o,items:a,maxVisibleItems:s,isDisabled:i,onAction:l,showLabels:c=false,renderItem:d,...u},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"],v={sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10"}[r??"md"],b={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[r??"md"],w=(R,C)=>{C&&C(),l&&l(R);},x=R=>jsxs("button",{type:"button",disabled:i||R.isDisabled,onClick:()=>w(R.key,R.onPress),className:m("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:v),"aria-label":R.label,children:[R.icon&&jsx("span",{className:b,children:R.icon}),c&&jsx("span",{children:R.label})]},R.key);return jsxs("div",{ref:f,role:"group",className:m(Fv({variant:t,orientation:n,size:r,density:o,className:e})),...u,children:[p.map(R=>d?d(R):x(R)),g.length>0&&jsxs(Cn,{children:[jsx(Tn,{"aria-label":"More actions",className:m("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",v),children:jsx(MoreHorizontal,{className:b})}),jsx(Mn,{align:"end",children:g.map(R=>jsxs($t,{disabled:R.isDisabled,onClick:()=>w(R.key,R.onPress),children:[R.icon&&jsx("span",{className:m(b,"mr-2"),children:R.icon}),R.label]},R.key))})]})]})});Kv.displayName="ActionGroup";var Wv=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"}}),fk=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}}),jv=_.forwardRef(({className:e,variant:t,size:n,pulse:r=false,hideLabel:o=false,children:a,...s},i)=>jsxs("span",{ref:i,role:"status",className:m(Wv({variant:t,size:n,className:e})),...s,children:[jsx("span",{className:m(fk({size:n,pulse:r})),"aria-hidden":"true"}),!o&&a&&jsx("span",{className:"text-foreground",children:a})]}));jv.displayName="StatusLight";var Yv=cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-3 max-w-xs",md:"gap-4 max-w-sm",lg:"gap-5 max-w-md"}},defaultVariants:{size:"md"}}),bk=cva("text-muted-foreground",{variants:{size:{sm:"[&>svg]:h-16 [&>svg]:w-16",md:"[&>svg]:h-24 [&>svg]:w-24",lg:"[&>svg]:h-32 [&>svg]:w-32"}},defaultVariants:{size:"md"}}),vk=cva("font-semibold text-foreground",{variants:{size:{sm:"text-base",md:"text-lg",lg:"text-xl"}},defaultVariants:{size:"md"}}),hk=cva("text-muted-foreground",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Xv=_.forwardRef(({className:e,size:t,illustration:n,heading:r,description:o,children:a,...s},i)=>jsxs("div",{ref:i,className:m(Yv({size:t,className:e})),...s,children:[n&&jsx("div",{className:m(bk({size:t})),"aria-hidden":"true",children:n}),r&&jsx("h3",{className:m(vk({size:t})),children:r}),o&&jsx("p",{className:m(hk({size:t})),children:o}),a&&jsx("div",{className:"mt-2",children:a})]}));Xv.displayName="IllustratedMessage";var Qv=cva("relative flex gap-3 rounded-lg border p-4 text-sm",{variants:{variant:{info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-100 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-950 dark:text-green-100 [&>svg]:text-green-600 dark:[&>svg]:text-green-400",warning:"border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-100 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",error:"border-red-200 bg-red-50 text-red-900 dark:border-red-800 dark:bg-red-950 dark:text-red-100 [&>svg]:text-red-600 dark:[&>svg]:text-red-400",neutral:"border-border bg-muted text-foreground [&>svg]:text-muted-foreground"}},defaultVariants:{variant:"info"}}),Mk={info:Info,success:CheckCircle2,warning:AlertTriangle,error:AlertCircle,neutral:Info},Jv=_.forwardRef(({className:e,variant:t,title:n,icon:r,hideIcon:o=false,isDismissible:a=false,onDismiss:s,actions:i,children:l,...c},d)=>{let[u,f]=_.useState(true);if(!u)return null;let p=Mk[t??"info"],g=()=>{f(false),s?.();};return jsxs("div",{ref:d,role:"alert",className:m(Qv({variant:t,className:e})),...c,children:[!o&&jsx("div",{className:"flex-shrink-0",children:r||jsx(p,{className:"h-5 w-5"})}),jsxs("div",{className:"flex-1 space-y-1",children:[n&&jsx("div",{className:"font-medium",children:n}),l&&jsx("div",{className:"opacity-90",children:l}),i&&jsx("div",{className:"mt-3 flex gap-2",children:i})]}),a&&jsx("button",{type:"button",onClick:g,className:"absolute right-2 top-2 rounded-md p-1 opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Dismiss",children:jsx(X,{className:"h-4 w-4"})})]})});Jv.displayName="InlineAlert";var eh=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"}}),th=_.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 u=()=>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:m(eh({position:t,size:n,className:e})),...c,children:[jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:u()}),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(Mt,{size:"sm",onClick:a,"aria-label":"Close action bar"})]})]})});th.displayName="ActionBar";var nh=_.forwardRef(({className:e,icon:t,children:n,...r},o)=>jsxs("button",{ref:o,type:"button",className:m("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]}));nh.displayName="ActionBarButton";var ah=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"}}),sh=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 ih({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:u,...f}){let[p,g]=_.useState(new Set),[h,v]=_.useState(null),[b,w]=_.useState(null),x=_.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),R=T=>{if(a==="none")return;let k;a==="single"?k=x.has(T)?new Set:new Set([T]):(k=new Set(x),k.has(T)?k.delete(T):k.add(T)),o||g(k),s?.(k);},C=(T,k)=>{v(k),T.dataTransfer.effectAllowed="move";},y=(T,k)=>{T.preventDefault(),h!==k&&w(k);},N=()=>{if(h&&b&&h!==b){let T=r.findIndex(P=>P.key===h),k=r.findIndex(P=>P.key===b),E=[...r],[M]=E.splice(T,1);E.splice(k,0,M),l?.(E);}v(null),w(null);};return r.length===0?jsx("div",{className:m("flex items-center justify-center p-8 text-muted-foreground",e),children:u||"No items"}):jsx("div",{role:"listbox","aria-multiselectable":a==="multiple",className:m(ah({variant:t,size:n,className:e})),...f,children:r.map(T=>{let k=x.has(T.key),E=h===T.key,M=b===T.key;return d?jsx("div",{role:"option","aria-selected":k,onClick:()=>R(T.key),children:d(T,k)},T.key):jsxs("div",{role:"option","aria-selected":k,"aria-disabled":T.isDisabled,draggable:i&&!T.isDisabled,onDragStart:P=>C(P,T.key),onDragOver:P=>y(P,T.key),onDragEnd:N,onClick:()=>!T.isDisabled&&R(T.key),className:m(sh({variant:t,size:n,isSelected:k,isDisabled:T.isDisabled}),E&&"opacity-50",M&&"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:m("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"})}),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)})})}ih.displayName="ListView";var lh=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"}}),Sk=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"}}),ch=_.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:u=false,formatLabel:f=b=>String(b),trackColor:p="primary",name:g,...h},v)=>{let[b,w]=_.useState(o),x=r!==void 0,R=x?r:b,C=_.useRef(null),[y,N]=_.useState(false),[T,k]=_.useState(null),E=(I,F)=>{if(!C.current)return R[0];let K=C.current.getBoundingClientRect(),Y;t==="horizontal"?Y=(I-K.left)/K.width:Y=1-(F-K.top)/K.height,Y=Math.max(0,Math.min(1,Y));let q=i+Y*(l-i),$=Math.round(q/c)*c;return Math.max(i,Math.min(l,$))},M=(I,F)=>{let K=[...R];K[F]=I,F===0&&I>R[1]&&(K[0]=R[1]),F===1&&I<R[0]&&(K[1]=R[0]),x||w(K),a?.(K);},P=(I,F)=>{d||(I.preventDefault(),N(true),k(F),I.target.setPointerCapture(I.pointerId));},S=I=>{if(!y||T===null||d)return;let F=E(I.clientX,I.clientY);M(F,T);},H=()=>{y&&(N(false),k(null),s?.(R));},D=I=>{if(d)return;let F=E(I.clientX,I.clientY),K=Math.abs(R[0]-F),Y=Math.abs(R[1]-F),q=K<=Y?0:1;M(F,q);let $=[...R];$[q]=F,s?.($);},L=(I,F)=>{if(d)return;let K=R[F];switch(I.key){case "ArrowRight":case "ArrowUp":I.preventDefault(),K=Math.min(l,R[F]+c);break;case "ArrowLeft":case "ArrowDown":I.preventDefault(),K=Math.max(i,R[F]-c);break;case "Home":I.preventDefault(),K=i;break;case "End":I.preventDefault(),K=l;break;default:return}M(K,F);let Y=[...R];Y[F]=K,s?.(Y);},V=I=>(I-i)/(l-i)*100,A={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[p],B={sm:14,md:20,lg:24}[n||"md"];return jsxs("div",{className:"relative w-full",children:[u&&jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsx("span",{children:f(R[0])}),jsx("span",{children:f(R[1])})]}),jsxs("div",{ref:v,className:m(lh({orientation:t,size:n}),d&&"opacity-50 pointer-events-none",e),...h,children:[jsx("div",{ref:C,className:m(Lk({orientation:t,size:n})),onClick:D,children:jsx("div",{className:m("absolute rounded-full",A,{"h-full":t==="horizontal","w-full":t==="vertical"}),style:t==="horizontal"?{left:`${V(R[0])}%`,right:`${100-V(R[1])}%`,top:0,bottom:0}:{bottom:`${V(R[0])}%`,top:`${100-V(R[1])}%`,left:0,right:0}})}),R.map((I,F)=>jsx("div",{role:"slider",tabIndex:d?-1:0,"aria-valuemin":i,"aria-valuemax":l,"aria-valuenow":I,"aria-orientation":t||void 0,"aria-disabled":d,className:m(Sk({size:n}),y&&T===F&&"cursor-grabbing"),style:t==="horizontal"?{position:"absolute",left:`calc(${V(I)}% - ${B/2}px)`,top:"50%",transform:"translateY(-50%)"}:{position:"absolute",bottom:`calc(${V(I)}% - ${B/2}px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:K=>P(K,F),onPointerMove:S,onPointerUp:H,onPointerCancel:H,onKeyDown:K=>L(K,F)},F)),g&&jsxs(Fragment,{children:[jsx("input",{type:"hidden",name:`${g}[0]`,value:R[0]}),jsx("input",{type:"hidden",name:`${g}[1]`,value:R[1]})]})]})]})});ch.displayName="RangeSlider";var nc=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"}}),Ak=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"}}),zk={help:HelpCircle,info:Info,warning:AlertCircle},mh=_.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:u,contentClassName:f},p)=>{let[g,h]=_.useState(false),[v,b]=_.useState(false),[w,x]=_.useState({top:0,left:0}),R=_.useRef(null),C=_.useRef(null),y=i!==void 0?i:g,N=_.useCallback(M=>{i===void 0&&h(M),l?.(M);},[i,l]);_.useEffect(()=>{b(true);},[]),_.useEffect(()=>{if(!y||!R.current)return;let M=()=>{let P=R.current.getBoundingClientRect(),S=C.current?.getBoundingClientRect(),H=S?.width||288,D=S?.height||100,L=8,V=0,A=0;switch(a){case "top":V=P.top-D-L,A=P.left+P.width/2-H/2;break;case "bottom":V=P.bottom+L,A=P.left+P.width/2-H/2;break;case "left":V=P.top+P.height/2-D/2,A=P.left-H-L;break;case "right":V=P.top+P.height/2-D/2,A=P.right+L;break}if(a==="top"||a==="bottom")switch(s){case "start":A=P.left;break;case "center":A=P.left+P.width/2-H/2;break;case "end":A=P.right-H;break}if(a==="left"||a==="right")switch(s){case "start":V=P.top;break;case "center":V=P.top+P.height/2-D/2;break;case "end":V=P.bottom-D;break}A=Math.max(8,Math.min(A,window.innerWidth-H-8)),V=Math.max(8,Math.min(V,window.innerHeight-D-8)),x({top:V,left:A});};return M(),requestAnimationFrame(M),window.addEventListener("resize",M),window.addEventListener("scroll",M,true),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",M,true);}},[y,a,s]),_.useEffect(()=>{if(!y)return;let M=P=>{C.current&&!C.current.contains(P.target)&&R.current&&!R.current.contains(P.target)&&N(false);};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[y,N]),_.useEffect(()=>{if(!y)return;let M=P=>{P.key==="Escape"&&N(false);};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[y,N]);let T=zk[e??"help"],k=()=>{N(!y);},E=()=>{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?_.isValidElement(o)?_.cloneElement(o,{ref:R,onClick:M=>{o.props.onClick?.(M),k();}}):jsx("button",{ref:R,type:"button",onClick:k,className:m(nc({variant:e,size:t}),u),"aria-label":"Help",children:o}):jsx("button",{ref:M=>{R.current=M,typeof p=="function"?p(M):p&&(p.current=M);},type:"button",onClick:k,className:m(nc({variant:e,size:t}),u),"aria-label":"Help",children:jsx(T,{className:"h-full w-full"})}),v&&y&&Oa.createPortal(jsxs("div",{ref:C,className:m(Ak({size:t}),f),style:{position:"fixed",top:w.top,left:w.left,transformOrigin:E()},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)]})});mh.displayName="ContextualHelp";var fh=cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),rc=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 gh({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:u,errorMessage:f,maxTags:p,...g}){let[h,v]=_.useState(new Set),b=_.useMemo(()=>a?a instanceof Set?a:new Set(a):h,[a,h]),w=y=>{if(s==="none")return;let N;s==="single"?N=b.has(y)?new Set:new Set([y]):(N=new Set(b),N.has(y)?N.delete(y):N.add(y)),a||v(N),i?.(N);},x=(y,N)=>{N.stopPropagation(),c?.(y);},R=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}),u&&jsx("span",{className:"text-sm text-muted-foreground",children:u}),jsxs("div",{role:"group","aria-label":d,className:m(fh({spacing:t}),e),...g,children:[R.map(y=>{let N=b.has(y.key),T=s!=="none";return jsxs("span",{role:T?"button":void 0,tabIndex:T&&!y.isDisabled?0:void 0,"aria-pressed":T?N:void 0,onClick:()=>!y.isDisabled&&w(y.key),onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&!y.isDisabled&&(k.preventDefault(),w(y.key));},style:y.color?{backgroundColor:y.color}:void 0,className:m(rc({variant:y.color?void 0:n,size:r,isSelected:N,isDisabled:y.isDisabled}),T&&!y.isDisabled&&"cursor-pointer hover:opacity-80",y.color&&"text-white"),children:[y.icon&&jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:y.icon}),y.label,l&&!y.isDisabled&&jsx("button",{type:"button",onClick:k=>x(y.key,k),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${y.label}`,children:jsx(X,{className:"h-3 w-3"})})]},y.key)}),C>0&&jsxs("span",{className:m(rc({variant:"surface",size:r}),"cursor-default"),children:["+",C," more"]})]}),f&&jsx("span",{className:"text-sm text-danger",children:f})]})}gh.displayName="TagGroup";var hh=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"}}),xh=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 yh({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:u,...f}){let[p,g]=_.useState(new Set),h=_.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),v=b=>{if(a==="none")return;let w;a==="single"?w=h.has(b)?new Set:new Set([b]):(w=new Set(h),w.has(b)?w.delete(b):w.add(b)),o||g(w),s?.(w);};return r.length===0?jsx("div",{className:m("flex items-center justify-center p-8 text-muted-foreground",e),children:u||"No items"}):jsx("div",{role:"grid","aria-multiselectable":a==="multiple",className:m(hh({columns:t,gap:n,className:e})),...f,children:r.map(b=>{let w=h.has(b.key);return d?jsx("div",{role:"gridcell","aria-selected":w,onClick:()=>v(b.key),children:d(b,w)},b.key):jsxs("div",{role:"gridcell","aria-selected":w,"aria-disabled":b.isDisabled,onClick:()=>!b.isDisabled&&v(b.key),className:m(xh({variant:l,size:c,isSelected:w,isDisabled:b.isDisabled})),children:[i&&a!=="none"&&w&&jsx("div",{className:"absolute top-2 right-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:jsx(Check,{className:"h-3 w-3"})}),b.thumbnail&&jsx("div",{className:"mb-2 aspect-square w-full overflow-hidden rounded-md bg-muted",children:b.thumbnail}),jsxs("div",{className:"min-w-0",children:[jsx("div",{className:"truncate font-medium",children:b.label}),b.description&&jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:b.description})]})]},b.key)})})}yh.displayName="GridList";var wh=cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),Kk=cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),$k=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}}),ei=_.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:u="primary",trackVariant:f="default",...p},g)=>{let h=Math.min(100,Math.max(0,(n-r)/(o-r)*100)),v=()=>{if(u!=="auto")return "";let w=(n-r)/(o-r),x=s!==void 0?(s-r)/(o-r):.25,R=i!==void 0?(i-r)/(o-r):.75;return (a!==void 0?(a-r)/(o-r):1)>=.5?w<=x?"bg-red-500":w<=R?"bg-yellow-500":"bg-green-500":w>=R?"bg-red-500":w>=x?"bg-yellow-500":"bg-green-500"},b=d?d(n,h):`${Math.round(h)}%`;return jsxs("div",{ref:g,className:m("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:b})]}),jsx("div",{role:"meter","aria-valuenow":n,"aria-valuemin":r,"aria-valuemax":o,"aria-label":l,className:m(wh({size:t})),children:jsx("div",{className:m(Kk({variant:f})),children:jsx("div",{className:m($k({color:u==="auto"?void 0:u,rounded:h>=100}),u==="auto"&&v()),style:{width:`${h}%`}})})})]})});ei.displayName="Meter";var Ch=_.forwardRef((e,t)=>jsx(ei,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));Ch.displayName="DiskUsageMeter";var Th=_.forwardRef((e,t)=>jsx(ei,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));Th.displayName="BatteryMeter";var Mh=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"}}),ni=(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)]},Nh=(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]},kh=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},Ph=(e,t,n)=>"#"+[e,t,n].map(r=>r.toString(16).padStart(2,"0")).join(""),Eh=_.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,...u},f)=>{let p=_.useRef(null),[g,h]=_.useState(false),v=_.useCallback(I=>{let F=kh(I);return F?Nh(...F):[0,1,1]},[]),[b,w]=_.useState(()=>v(r||o)),x=e??b[0],R=t??b[1],C=n??b[2];_.useEffect(()=>{if(r){let I=v(r);w(I);}},[r,v]);let y=_.useCallback((I,F)=>{if(l||!p.current)return;let K=p.current.getBoundingClientRect(),Y=Math.max(0,Math.min(1,(I-K.left)/K.width)),q=Math.max(0,Math.min(1,(F-K.top)/K.height)),$=Y,O=1-q;t===void 0&&n===void 0&&w([x,$,O]),a?.({hue:x,saturation:$,brightness:O});let W=ni(x,$,O);s?.(Ph(...W));},[l,x,t,n,a,s]),N=I=>{l||(I.preventDefault(),h(true),I.target.setPointerCapture(I.pointerId),y(I.clientX,I.clientY));},T=I=>{g&&y(I.clientX,I.clientY);},k=I=>{h(false),I.target.releasePointerCapture(I.pointerId);},[E,M,P]=ni(x,1,1),S=`rgb(${E}, ${M}, ${P})`,H=R*100,D=(1-C)*100,[L,V,A]=ni(x,R,C),B=`rgb(${L}, ${V}, ${A})`;return jsx("div",{ref:f,className:m(Mh({size:i}),l&&"cursor-not-allowed opacity-50",d),...u,children:jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:S},onPointerDown:N,onPointerMove:T,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:B,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});Eh.displayName="ColorArea";var Sh=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"}}),jk=`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")`,Lh="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",Dh=_.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,...u},f)=>{let p=_.useRef(null),[g,h]=_.useState(false),v=()=>{switch(r){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[b,w]=_.useState(t??v()),x=e??b,R=r==="hue"?x/360:x,C=_.useCallback((S,H)=>{if(i||!p.current)return;let D=p.current.getBoundingClientRect(),L=a!=="vertical",V;L?V=Math.max(0,Math.min(1,(S-D.left)/D.width)):V=Math.max(0,Math.min(1,1-(H-D.top)/D.height));let A=r==="hue"?V*360:V;e===void 0&&w(A),n?.(A);},[i,a,r,e,n]),y=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);},k=()=>{let S=a!=="vertical",H=S?"to right":"to top";switch(r){case "hue":return S?Lh:"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 Lh}},E=()=>r==="hue"?`hsl(${x}, 100%, 50%)`:o,M=a!=="vertical",P=R*100;return jsx("div",{ref:f,className:m(Sh({orientation:a,size:s}),i&&"cursor-not-allowed opacity-50",d),...u,children:jsxs("div",{ref:p,className:m("absolute inset-0 rounded-full overflow-hidden",c&&"border border-input"),style:{backgroundImage:r==="alpha"?jk:void 0,backgroundSize:r==="alpha"?"8px 8px":void 0},onPointerDown:y,onPointerMove:N,onPointerUp:T,onPointerLeave:T,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,...M?{left:`calc(${P}% - ${l/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${P}% - ${l/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:E(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});Dh.displayName="ColorSlider";var Hh=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"}}),Xk=(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},Ih=_.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 u=_.useRef(null),[f,p]=_.useState(false),[g,h]=_.useState(t),v=e??g,b=_.useCallback((y,N)=>{if(o||!u.current)return;let T=u.current.getBoundingClientRect(),k=T.width/2,E=y-T.left,M=N-T.top,P=Xk(E,M,k);e===void 0&&h(P),n?.(P);},[o,e,n]),w=y=>{o||(y.preventDefault(),p(true),y.target.setPointerCapture(y.pointerId),b(y.clientX,y.clientY));},x=y=>{f&&b(y.clientX,y.clientY);},R=y=>{p(false),y.target.releasePointerCapture(y.pointerId);},C=()=>{let y=[];for(let N=0;N<=360;N+=30)y.push(`hsl(${N}, 100%, 50%) ${N}deg`);return `conic-gradient(from 270deg, ${y.join(", ")})`};return jsx("div",{ref:d,className:m(Hh({size:r}),o&&"cursor-not-allowed opacity-50",l),...c,children:jsxs("div",{ref:u,className:"absolute inset-0 rounded-full",style:{background:C()},onPointerDown:w,onPointerMove:x,onPointerUp:R,onPointerLeave:R,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(qk,{hue:v,innerRadius:a,thumbSize:s})]})})});Ih.displayName="ColorWheel";var qk=({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 Ah=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"}}),Qk=cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Jk=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}}),zh=_.forwardRef(({className:e,orientation:t,size:n,align:r,label:o,value:a,valueWeight:s,mono:i,labelWidth:l,labelClassName:c,valueClassName:d,showColon:u=false,copyable:f=false,onCopy:p,...g},h)=>{let v=async()=>{if(!(!f||a===null||a===void 0))try{let b=typeof a=="string"?a:String(a);await navigator.clipboard.writeText(b),p?.();}catch{}};return jsxs("div",{ref:h,className:m(Ah({orientation:t,size:n,align:r,className:e})),...g,children:[jsxs("span",{className:m(Qk({size:n}),c),style:l?{width:l,flexShrink:0}:void 0,children:[o,u&&":"]}),jsx("span",{className:m(Jk({size:n,weight:s,mono:i}),f&&"cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 transition-colors",d),onClick:f?v:void 0,role:f?"button":void 0,tabIndex:f?0:void 0,onKeyDown:f?b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),v());}:void 0,children:a})]})});zh.displayName="LabeledValue";var Oh=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"}}),Bh=_.forwardRef(({className:e,orientation:t,gap:n,...r},o)=>jsx("div",{ref:o,className:m(Oh({orientation:t,gap:n,className:e})),...r}));Bh.displayName="LabeledValueGroup";var Gh=cva("flex items-center rounded-md border border-input bg-background ring-offset-background transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",{variants:{size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),Co=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"}}),Uh=_.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:u=true,popoverWidth:f="trigger",emptyMessage:p="No results found",size:g,variant:h,className:v,placeholder:b="Search...",disabled:w,...x},R)=>{let[C,y]=_.useState(false),[N,T]=_.useState(t),k=e!==void 0?e:N,E=_.useRef(null);_.useImperativeHandle(R,()=>E.current);let M=k.length>0,P=C&&(a.length>0||s.length>0||l.length>0||M),S=I=>{e===void 0&&T(I),n?.(I);},H=()=>{S(""),E.current?.focus();},D=I=>{I?.preventDefault(),k.trim()&&(r?.(k.trim()),y(false));},L=I=>{S(I.label),o?.(I),y(false);},V=I=>{S(I),r?.(I),y(false);},A=I=>{S(I),r?.(I),y(false);},B=_.useMemo(()=>{let I={};return a.forEach(F=>{let K=F.category||"Results";I[K]||(I[K]=[]),I[K].push(F);}),I},[a]);return jsxs(ot,{open:P,onOpenChange:y,children:[jsx(an,{children:jsxs("form",{onSubmit:D,className:m(Gh({size:g,variant:h}),v),children:[u&&jsx(Search,{className:m(Co({size:g}),"ml-3")}),jsx("input",{ref:E,type:"text",value:k,onChange:I=>S(I.target.value),onFocus:()=>y(true),placeholder:b,disabled:w,className:m("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!u&&"pl-3"),...x}),d&&M&&!w&&jsx("button",{type:"button",onClick:H,className:m("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",Co({size:g})),children:jsx(X,{className:"h-full w-full"})})]})}),jsx(at,{className:"p-0",style:{width:f==="trigger"?"var(--radix-popover-trigger-width)":f},align:"start",onOpenAutoFocus:I=>I.preventDefault(),children:jsxs(Command,{className:"rounded-lg border-0",children:[s.length>0&&!M&&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((I,F)=>jsxs("button",{type:"button",onClick:()=>V(I),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(Clock,{className:m(Co({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:I}),jsx(ArrowRight,{className:m(Co({size:g}),"opacity-0 group-hover:opacity-100")})]},F))]}),l.length>0&&!M&&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((I,F)=>jsxs("button",{type:"button",onClick:()=>A(I),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsx(TrendingUp,{className:m(Co({size:g}))}),jsx("span",{className:"flex-1 text-left truncate",children:I})]},F))]}),M&&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(B).map(([I,F])=>jsxs("div",{children:[jsx("div",{className:"px-2 py-1.5",children:jsx("span",{className:"text-xs font-medium text-muted-foreground",children:I})}),F.map(K=>jsxs("button",{type:"button",onClick:()=>L(K),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[K.icon||jsx(Search,{className:m(Co({size:g}))}),jsxs("div",{className:"flex-1 text-left",children:[jsx("div",{className:"truncate",children:K.label}),K.description&&jsx("div",{className:"text-xs text-muted-foreground truncate",children:K.description})]})]},K.id))]},I)):jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});Uh.displayName="SearchBar";var Wh={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"})},Yh=_.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},u)=>{let[f,p]=_.useState(""),g=_.useRef(null),[h,v]=_.useState(false);_.useEffect(()=>{v(true);},[]),_.useEffect(()=>{e||p("");},[e]),_.useEffect(()=>{if(!e)return;let y=N=>{N.key==="Escape"&&t?.(false);};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[e,t]),_.useEffect(()=>{if(e)return Gt(),()=>Ut()},[e]);let b=_.useMemo(()=>{let y={};return n.forEach(N=>{let T=N.category||"Results";y[T]||(y[T]=[]),y[T].push(N);}),y},[n]),w=y=>{y.onSelect?.(),c?.(y),t?.(false);},x=()=>{t?.(false);},R=f.length>0,C=!R&&r.length>0;return !h||!e?null:Oa.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:u,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,{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(y=>jsxs(Command.Item,{value:y.label,onSelect:()=>w(y),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:y.icon||Wh[y.category||""]||jsx(File,{className:"h-4 w-4"})}),jsxs("div",{className:"flex-1 overflow-hidden",children:[jsx("div",{className:"truncate font-medium",children:y.label}),y.description&&jsx("div",{className:"truncate text-xs text-muted-foreground",children:y.description})]}),y.shortcut&&jsx("div",{className:"flex items-center gap-1",children:y.shortcut.map((N,T)=>jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:N},T))})]},y.id))]}),R&&Object.entries(b).map(([y,N])=>jsxs(Command.Group,{heading:y,children:[jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:y}),N.map(T=>jsxs(Command.Item,{value:`${T.label} ${T.keywords?.join(" ")||""}`,onSelect:()=>w(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||Wh[y]||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))]},y)),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)});Yh.displayName="SpotlightSearch";function mP(e="k"){let[t,n]=_.useState(false);return _.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 Zh=_.createContext(null),oi=()=>{let e=_.useContext(Zh);if(!e)throw new Error("useNotificationCenter must be used within a NotificationCenterProvider");return e},yP=({children:e,notifications:t,onNotificationsChange:n})=>{let[r,o]=_.useState([]),[a,s]=_.useState(false),i=_.useRef(null),l=t!==void 0,c=l?t:r,d=_.useCallback(v=>{l?n?.(v):o(v);},[l,n]),u=c.filter(v=>!v.read).length,f=_.useCallback(v=>{d(c.map(b=>b.id===v?{...b,read:true}:b));},[c,d]),p=_.useCallback(()=>{d(c.map(v=>({...v,read:true})));},[c,d]),g=_.useCallback(v=>{d(c.filter(b=>b.id!==v));},[c,d]),h=_.useCallback(()=>{d([]);},[d]);return jsx(Zh.Provider,{value:{notifications:c,unreadCount:u,markAsRead:f,markAllAsRead:p,removeNotification:g,clearAll:h,open:a,setOpen:s,triggerRef:i},children:e})},Qh=_.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:m("relative inline-block",e),...n,children:t}));Qh.displayName="NotificationCenter";var Jh=_.forwardRef(({className:e,showBadge:t=true,children:n,onClick:r,...o},a)=>{let{unreadCount:s,open:i,setOpen:l,triggerRef:c}=oi(),d=f=>{r?.(f),l(!i);},u=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:m("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:u})]})});Jh.displayName="NotificationCenterTrigger";var ex=_.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:u,triggerRef:f}=oi(),[p,g]=_.useState(false),h=_.useRef(null),[v,b]=_.useState({top:0,left:0});return _.useEffect(()=>{g(true);},[]),_.useEffect(()=>{if(!i||!f.current||!h.current)return;let w=()=>{if(!f.current||!h.current)return;let x=f.current.getBoundingClientRect(),R=h.current.getBoundingClientRect(),C=x.bottom+n,y=x.left;t==="center"?y=x.left+x.width/2-R.width/2:t==="end"&&(y=x.right-R.width),y+R.width>window.innerWidth-16&&(y=window.innerWidth-R.width-16),y<16&&(y=16),b({top:C,left:y});};return w(),window.addEventListener("resize",w),window.addEventListener("scroll",w,true),()=>{window.removeEventListener("resize",w),window.removeEventListener("scroll",w,true);}},[i,f,t,n]),_.useEffect(()=>{if(!i)return;let w=R=>{h.current&&!h.current.contains(R.target)&&f.current&&!f.current.contains(R.target)&&l(false);},x=R=>{R.key==="Escape"&&l(false);};return document.addEventListener("mousedown",w),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",w),document.removeEventListener("keydown",x);}},[i,l,f]),!p||!i?null:Oa.createPortal(jsxs("div",{ref:w=>{h.current=w,typeof s=="function"?s(w):s&&(s.current=w);},className:m("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:v.top,left:v.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:u,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,{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(w=>jsx(lc,{notification:w},w.id)))})]}),document.body)});ex.displayName="NotificationCenterContent";var RP={info:"border-l-blue-500",success:"border-l-green-500",warning:"border-l-yellow-500",error:"border-l-red-500"},wP={info:Info,success:CheckCircle,warning:AlertTriangle,error:AlertCircle},lc=({notification:e,onMarkAsRead:t,onRemove:n})=>{let{markAsRead:r,removeNotification:o}=oi(),{id:a,title:s,description:i,type:l="info",timestamp:c,read:d,avatar:u,action:f}=e,p=wP[l],g=()=>{t?t():r(a);},h=()=>{n?n():o(a);},v=b=>{if(!b)return null;let w=typeof b=="string"?new Date(b):b,R=new Date().getTime()-w.getTime(),C=Math.floor(R/6e4),y=Math.floor(R/36e5),N=Math.floor(R/864e5);return C<1?"Just now":C<60?C+"m ago":y<24?y+"h ago":N<7?N+"d ago":w.toLocaleDateString()};return jsxs("div",{className:m("group relative flex gap-3 border-b border-l-4 px-4 py-3 transition-colors hover:bg-accent/50",RP[l],!d&&"bg-accent/20"),children:[jsx("div",{className:"flex-shrink-0",children:u||jsx("div",{className:m("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:m("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:v(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"})})]})})]})};lc.displayName="NotificationItem";var tx=_.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:m("divide-y",e),...n,children:t}));tx.displayName="NotificationList";var nx=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},rx=_.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:u,className:f,...p},g)=>{let[h,v]=_.useState(true),[b,w]=_.useState(false);_.useEffect(()=>{u&&localStorage.getItem(`banner-${u}`)==="true"&&v(false);},[u]),_.useEffect(()=>{if(d&&h){let y=setTimeout(()=>{x();},d);return ()=>clearTimeout(y)}},[d,h]);let x=()=>{w(true),setTimeout(()=>{v(false),u&&localStorage.setItem(`banner-${u}`,"true"),s?.();},200);};if(!h)return null;let R=LP[t],C=r?o!==void 0?o:R?jsx(R,{className:"h-4 w-4"}):null:null;return jsxs("div",{ref:g,className:m(nx({variant:n,type:t,position:l}),c&&"animate-pulse",b&&"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:m("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,{className:"h-4 w-4"})})]})});rx.displayName="Banner";var pa=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-2 border-current 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-2 border-current bg-transparent text-primary hover:bg-primary hover:text-primary-foreground"},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"}}),HP=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"}}),dc=_.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:u,className:f,onClick:p,disabled:g,...h},v)=>{let[b,w]=_.useState(false),x=o&&o.length>0,R=k=>{x&&w(!b),p?.(k);},C=k=>{k.onClick?.(),w(false);},y={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"&&b?"rotate-45":"",T=l==="scale"&&b?"scale-0":"scale-100";return jsxs("div",{className:m("relative z-50",u!=="relative"&&u&&pa({position:u})),children:[x&&b&&jsx("div",{className:m("absolute left-1/2 -translate-x-1/2 flex items-center",y[a].container),children:o.map((k,E)=>jsxs("div",{className:m("flex items-center gap-2 animate-in fade-in zoom-in duration-200",a==="up"||a==="down"?"flex-row":"flex-col"),style:{animationDelay:`${E*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:m(pa({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:m(pa({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:v,type:"button",onClick:R,disabled:g,className:m(pa({variant:c,size:d,position:"relative"}),n&&"w-auto px-6 gap-2",f),"aria-label":t,"aria-expanded":x?b:void 0,...h,children:[b&&i?i:jsx("span",{className:m(HP({size:d}),N,T,"transition-all duration-200"),children:e||jsx(Plus,{})}),n&&r&&jsx("span",{className:"font-medium",children:r})]}),x&&b&&jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>w(false)})]})});dc.displayName="FloatingActionButton";var IP=dc;var lx=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"}}),ax=cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors cursor-pointer",{variants:{variant:{default:"",elevated:"",filled:""}},defaultVariants:{variant:"default"}}),cx=_.forwardRef(({className:e,variant:t,size:n,items:r,value:o,defaultValue:a,onValueChange:s,showLabels:i="all",renderItem:l,...c},d)=>{let[u,f]=_.useState(a||r[0]?.key),p=o!==void 0,g=p?o:u,h=x=>{x.disabled||(p||f(x.key),s?.(x.key));},v=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",b=()=>{switch(n){case "sm":return "h-5 w-5";case "lg":return "h-7 w-7";default:return "h-6 w-6"}},w=()=>{switch(n){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsx("nav",{ref:d,className:m(lx({variant:t,size:n}),e),role:"navigation","aria-label":"Bottom navigation",...c,children:r.map(x=>{let R=g===x.key,C=i==="all"||i==="active"&&R,y=R&&x.activeIcon?x.activeIcon:x.icon;if(l)return jsx("div",{onClick:()=>h(x),className:m(ax({variant:t}),x.disabled&&"opacity-50 cursor-not-allowed"),children:l(x,R)},x.key);let N=jsxs("div",{onClick:()=>!x.href&&h(x),className:m(ax({variant:t}),v(R),x.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":R?"page":void 0,"aria-disabled":x.disabled,tabIndex:x.disabled?-1:0,onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),h(x));},children:[jsxs("div",{className:"relative",children:[jsx("span",{className:m(b(),"[&>svg]:h-full [&>svg]:w-full"),children:y}),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:m(w(),"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:m("flex flex-1 flex-col items-center justify-center gap-1 no-underline",v(R)),children:N},x.key):N})})});cx.displayName="BottomNavigation";var AP="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",ux=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"}}),mx=_.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:u},f)=>{let p=g=>{g.isDisabled||(g.onSelect?.(),u?.(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:AP,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:m(ux({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})})})]})]})]})});mx.displayName="ActionSheet";var fx=cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),mc=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"}}),gx=_.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},u)=>{let f=_.useRef(null),[p,g]=_.useState(0),[h,v]=_.useState(false),b=_.useRef(0),w=_.useRef(0),x=n.length*(o==="sm"?64:o==="lg"?96:80),R=r.length*(o==="sm"?64:o==="lg"?96:80),C=E=>{i||(v(true),b.current=E.touches[0].clientX,w.current=p);},y=E=>{if(!h||i)return;let P=E.touches[0].clientX-b.current,S=w.current+P;(S>0&&n.length===0||S<0&&r.length===0)&&(S=0),S>x?S=x+(S-x)*.3:S<-R&&(S=-R+(S+R)*.3),g(S);},N=()=>{if(!h)return;v(false);let E=f.current?.offsetWidth||0,M=Math.abs(p)/E;if(l&&M>.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<-R*a&&r.length>0?(g(-R),s?.("left")):g(0);},T=(E,M)=>{E.onAction?.(),s?.(M,E.key),g(0);},k=()=>{g(0);};return jsxs("div",{ref:u,className:m(fx({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(E=>jsxs("button",{type:"button",onClick:()=>T(E,"right"),className:m(mc({variant:E.variant,size:o})),style:{opacity:Math.min(1,p/x)},children:[E.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:E.icon}),!E.icon&&E.label]},E.key))}),r.length>0&&p<0&&jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:R},children:r.map(E=>jsxs("button",{type:"button",onClick:()=>T(E,"left"),className:m(mc({variant:E.variant,size:o})),style:{opacity:Math.min(1,Math.abs(p)/R)},children:[E.icon&&jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:E.icon}),!E.icon&&E.label]},E.key))}),jsx("div",{ref:f,className:m("relative bg-background",h?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:C,onTouchMove:y,onTouchEnd:N,onClick:p!==0?k:void 0,children:c})]})});gx.displayName="SwipeActions";var vx=cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),BP=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"}}),hx=_.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:u="Refreshing...",children:f,...p},g)=>{let h=_.useRef(null),[v,b]=_.useState(0),[w,x]=_.useState("idle"),R=_.useRef(0),C=_.useRef(false),y=()=>l||w==="refreshing"?false:(h.current?.scrollTop??window.scrollY)<=0,N=P=>{y()&&(R.current=P.touches[0].clientY,C.current=true);},T=P=>{if(!C.current||!y())return;let H=P.touches[0].clientY-R.current;if(H<0){b(0),x("idle");return}let L=Math.min(H*.5,o);b(L),x(L>=r?"ready":"pulling");},k=async()=>{if(C.current)if(C.current=false,w==="ready"){x("refreshing"),b(r*.6);try{await n();}finally{x("idle"),b(0);}}else x("idle"),b(0);},E={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[i],M=()=>{if(w==="refreshing")return a||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(Loader2,{className:m(E,"animate-spin text-primary")}),jsx("span",{className:"text-xs text-muted-foreground",children:u})]});let P=Math.min(v/r*180,180);return s||jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsx(ArrowDown,{className:m(E,"text-muted-foreground transition-transform"),style:{transform:`rotate(${P}deg)`}}),jsx("span",{className:"text-xs text-muted-foreground",children:w==="ready"?d:c})]})};return jsxs("div",{ref:g,className:m(vx({variant:t,className:e})),...p,children:[jsx("div",{className:m(BP({size:i}),"z-10",w==="idle"&&v===0&&"opacity-0"),style:{top:Math.max(v-60,-60),opacity:Math.min(v/(r*.5),1)},children:M()}),jsx("div",{ref:h,className:m("transition-transform duration-200",w==="refreshing"&&"ease-out"),style:{transform:`translateY(${v}px)`,transition:C.current?"none":void 0},onTouchStart:N,onTouchMove:T,onTouchEnd:k,children:f})]})});hx.displayName="PullToRefresh";var Gr=(e,t,n)=>({duration:e,delay:t,ease:n||[.4,0,.2,1]}),FP={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},xx=_.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 u=jsx(motion.div,{ref:d,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:FP,custom:i,transition:Gr(n,r,o),className:m(a),onAnimationStart:l,onAnimationComplete:c,children:t});return s?jsx(AnimatePresence,{children:e&&u}):u});xx.displayName="Fade";var KP=(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]}}},yx=_.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},u)=>{let f=_.useMemo(()=>KP(i,l),[i,l]),p=jsx(motion.div,{ref:u,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:Gr(n,r,o),className:m(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});yx.displayName="Slide";var $P={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"},GP={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},Rx=_.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},u)=>{let f=jsx(motion.div,{ref:u,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:GP,custom:i,transition:Gr(n,r,o),className:m(a),style:{transformOrigin:$P[l]},onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&f}):f});Rx.displayName="Scale";var wx=_.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},u)=>{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:u,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:Gr(n,r,o),className:m("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});wx.displayName="Collapse";var Cx=_.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},u)=>{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:u,initial:"hidden",animate:"visible",exit:"exit",variants:f,transition:Gr(n,r,o),className:m("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});Cx.displayName="Expand";var Tx=_.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},u)=>{let f={hidden:{opacity:0,rotate:i},visible:{opacity:1,rotate:l},exit:{opacity:0,rotate:i}},p=jsx(motion.div,{ref:u,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:Gr(n,r,o),className:m(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsx(AnimatePresence,{children:e&&p}):p});Tx.displayName="Rotate";var Mx=_.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 u=n==="horizontal"?"rotateY":"rotateX";return jsx("div",{ref:d,className:m("relative",i),style:{perspective:1e3},children:jsxs(motion.div,{animate:{[u]: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:`${u}(180deg)`},children:t})]})})});Mx.displayName="Flip";var Nx=_.forwardRef(({color:e="currentColor",duration:t=.6,children:n,className:r,disabled:o=false},a)=>{let[s,i]=_.useState([]),l=_.useRef(null),c=u=>{if(o)return;let f=l.current;if(!f)return;let p=f.getBoundingClientRect(),g=u.clientX-p.left,h=u.clientY-p.top,v=Math.max(p.width,p.height)*2,b={id:Date.now(),x:g,y:h,size:v};i(w=>[...w,b]);},d=u=>{i(f=>f.filter(p=>p.id!==u));};return jsxs("div",{ref:a,className:m("relative overflow-hidden rounded-[inherit]",r),onClick:c,children:[jsx("div",{ref:l,className:"relative z-0",children:n}),jsx(AnimatePresence,{children:s.map(u=>jsx(motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>d(u.id),className:"pointer-events-none absolute rounded-full",style:{left:u.x-u.size/2,top:u.y-u.size/2,width:u.size,height:u.size,backgroundColor:e}},u.id))})]})});Nx.displayName="Ripple";var kx=_.forwardRef(({children:e,animate:t=true,height:n=10,duration:r=.5,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=_.useState(false),d=s?l:t,u={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:u,initial:"idle",animate:d?"bounce":"idle",className:m(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});kx.displayName="Bounce";var jP={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]},Px=_.forwardRef(({children:e,animate:t=true,intensity:n="normal",duration:r=.5,count:o=1,className:a,triggerOnHover:s=false},i)=>{let[l,c]=_.useState(false),d=s?l:t,u={idle:{x:0},shake:{x:jP[n],transition:{duration:r,ease:"easeInOut",repeat:o-1}}};return jsx(motion.div,{ref:i,variants:u,initial:"idle",animate:d?"shake":"idle",className:m(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});Px.displayName="Shake";var _P={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=_.forwardRef(({children:e,animate:t=true,speed:n="normal",className:r},o)=>jsx("div",{ref:o,className:m(t&&_P[n],r),children:e}));Ex.displayName="Pulse";var Lx=_.forwardRef(({children:e,animate:t=true,angle:n=10,duration:r=.3,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=_.useState(false),d=s?l:t,u={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:u,initial:"idle",animate:d?"wiggle":"idle",className:m(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});Lx.displayName="Wiggle";var Sx=_.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]=_.useState(false),d=t||l,u={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:u,className:m(o),onMouseEnter:()=>a&&c(true),onMouseLeave:()=>a&&c(false),onClick:f,children:e})});Sx.displayName="Pop";var JP=(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},Dx=_.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:u},f)=>{let p=_.useRef(null),g=useInView(p,{once:true}),[h,v]=_.useState(!l);_.useEffect(()=>{if(l&&g){let x=setTimeout(()=>v(true),c*1e3);return ()=>clearTimeout(x)}},[l,g,c]);let b=useMotionValue(t),w=useTransform(b,x=>JP(x,r,s,i));return _.useEffect(()=>{if(h){let x=animate(b,e,{duration:n,ease:"easeOut",onComplete:u});return ()=>x.stop()}},[h,e,n,b,u]),jsx("span",{ref:p,className:m(d),children:jsxs("span",{ref:f,children:[o,jsx(motion.span,{children:w}),a]})})});Dx.displayName="Counter";var Hx=_.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:u},f)=>{let p=Array.isArray(e)?e:[e],[g,h]=_.useState(""),[v,b]=_.useState(0),[w,x]=_.useState(false),[R,C]=_.useState(false),y=_.useRef(null),N=useInView(y,{once:true}),[T,k]=_.useState(!l);return _.useEffect(()=>{if(l&&N){let E=setTimeout(()=>k(true),n*1e3);return ()=>clearTimeout(E)}},[l,N,n]),_.useEffect(()=>{if(!T||R)return;let E=p[v],M;return w?g.length>0?M=setTimeout(()=>{h(g.slice(0,-1));},i):(x(false),b(P=>(P+1)%p.length)):g.length<E.length?M=setTimeout(()=>{h(E.slice(0,g.length+1));},t):v<p.length-1||s?M=setTimeout(()=>{x(true);},r):(C(true),u?.()),()=>clearTimeout(M)},[T,g,v,w,R,p,t,i,r,s,u]),jsxs("span",{ref:y,className:m(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:m("ml-0.5",d),children:a})]})});Hx.displayName="Typewriter";var Ix=_.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=_.useRef(null),d=useInView(c,{once:true,amount:.5}),u=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}}},v={hidden:{opacity:0,...g[t]},visible:{opacity:1,x:0,y:0,transition:{duration:r,ease:"easeInOut"}}};return jsx(motion.div,{ref:l,className:m("inline-flex flex-wrap",i),variants:h,initial:"hidden",animate:u?"visible":"hidden",children:jsx("span",{ref:c,children:p.map((b,w)=>jsxs(motion.span,{variants:v,className:"inline-block",children:[b,a==="word"&&w<p.length-1&&"\xA0"]},w))})})});Ix.displayName="TextReveal";var Vx=_.forwardRef(({words:e,duration:t=2,animation:n="slide",animationDuration:r=.5,className:o,loop:a=true},s)=>{let[i,l]=_.useState(0);_.useEffect(()=>{if(!a&&i===e.length-1)return;let d=setInterval(()=>{l(u=>(u+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:m("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])})})});Vx.displayName="WordRotate";var Bx=_.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:u=[.4,0,.2,1]},f)=>{let p=_.useRef(null),g=useInView(p,{once:a,amount:s}),v={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],b={hidden:{opacity:0,x:v.x,y:v.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:u}}};return jsx("div",{ref:p,children:jsx(motion.div,{ref:f,variants:b,initial:"hidden",animate:g?"visible":"hidden",className:m(i),children:e})})});Bx.displayName="ScrollReveal";var Fx=_.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}),u=useSpring(d,{stiffness:100,damping:30,restDelta:.001}),f=l?u: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",v=p?"left":"top";return jsxs("div",{ref:c,className:m("fixed",a),style:{...g[e],zIndex:o,backgroundColor:r},children:[jsx(motion.div,{className:"h-full w-full",style:{[h]:f,transformOrigin:v,backgroundColor:n}}),i&&jsx(tE,{progress:f,position:e})]})});Fx.displayName="ScrollProgress";var tE=({progress:e,position:t})=>{let n=useTransform(e,s=>Math.round(s*100)),[r,o]=_.useState(0);return _.useEffect(()=>{let s=n.on("change",o);return ()=>s()},[n]),jsxs("span",{className:m("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,"%"]})},Kx=_.forwardRef(({children:e,speed:t=.5,direction:n="vertical",className:r,container:o},a)=>{let s=_.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}),u=n==="horizontal"?d:0,f=n==="vertical"?d:0;return jsx("div",{ref:s,className:m("overflow-hidden",r),children:jsx(motion.div,{ref:a,style:{x:u,y:f},children:e})})});Kx.displayName="Parallax";var Ux=_.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 u={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:m("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(${u[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 _ from'react';import {createContext,useState,useEffect,useContext,useC
|
|
|
69
69
|
0% { transform: translateY(-100%); }
|
|
70
70
|
100% { transform: translateY(100%); }
|
|
71
71
|
}
|
|
72
|
-
`})]})});Ux.displayName="Shimmer";var tE={sm:24,md:40,lg:56,xl:80},nE={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"}},Wx=_.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=tE[t],d=nE[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?.()})]})});Wx.displayName="Checkmark";var Lo={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},jx=_.forwardRef(({autoTrigger:e=false,delay:t=0,options:n={},children:r,onTrigger:o},a)=>{let s=_.useCallback(()=>{let i={...Lo,...n};Eo(i),o?.();},[n,o]);return _.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});jx.displayName="Confetti";var rE=()=>{let e=_.useCallback(r=>{let o={...Lo,...r};Eo(o);},[]),t=_.useCallback(()=>{let o=Date.now()+3e3,a=setInterval(()=>{let s=o-Date.now();if(s<=0){clearInterval(a);return}let i=50*(s/3e3);Eo({...Lo,particleCount:i,origin:{x:Math.random()*.4+.1,y:Math.random()-.2}}),Eo({...Lo,particleCount:i,origin:{x:Math.random()*.4+.5,y:Math.random()-.2}});},250);},[]),n=_.useCallback((r="both")=>{let o={x:0,y:1},a={x:1,y:1};(r==="left"||r==="both")&&Eo({...Lo,particleCount:50,angle:60,spread:55,origin:o}),(r==="right"||r==="both")&&Eo({...Lo,particleCount:50,angle:120,spread:55,origin:a});},[]);return {fire:e,fireworks:t,cannon:n}},_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})});_x.displayName="Glow";var Gx=(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}),Yx=_.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]=_.useState([]);return _.useEffect(()=>{let d=Array.from({length:t},()=>Gx(r,o));c(d);let m=setInterval(()=>{c(f=>{let p=[...f],g=Math.floor(Math.random()*t);return p[g]=Gx(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))]})});Yx.displayName="Sparkles";var Xx=_.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}));Xx.displayName="H1";var qx=_.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}));qx.displayName="H2";var Zx=_.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}));Zx.displayName="H3";var Qx=_.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}));Qx.displayName="H4";var Jx=_.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("leading-7 [&:not(:first-child)]:mt-6",e),...n,children:t}));Jx.displayName="Paragraph";var ey=_.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}));ey.displayName="Blockquote";var ty=_.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}));ty.displayName="InlineCode";var ny=_.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("text-xl text-muted-foreground",e),...n,children:t}));ny.displayName="Lead";var ry=_.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:u("text-lg font-semibold",e),...n,children:t}));ry.displayName="Large";var oy=_.forwardRef(({className:e,children:t,...n},r)=>jsx("small",{ref:r,className:u("text-sm font-medium leading-none",e),...n,children:t}));oy.displayName="Small";var ay=_.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:u("text-sm text-muted-foreground",e),...n,children:t}));ay.displayName="Muted";var sy=_.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}));sy.displayName="UL";function So(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 iE(){return So("(max-width: 767px)")}function lE(){return So("(min-width: 768px) and (max-width: 1023px)")}function cE(){return So("(min-width: 1024px)")}function dE(){return So("(prefers-color-scheme: dark)")?"dark":"light"}function uE(){return So("(prefers-reduced-motion: reduce)")}function va(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 bE(){let{width:e}=va();return e}function vE(){let{height:e}=va();return e}function hE(e){let{width:t}=va();return t>=e}function xE(){let{width:e}=va();return {isSm:e>=640,isMd:e>=768,isLg:e>=1024,isXl:e>=1280,is2xl:e>=1536}}function wE(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 TE(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 kE(e,t=500){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function PE(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 EE(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 DE(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 HE(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 VE(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 AE(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 zE(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 OE(){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 ly(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 cy(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 BE(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=ly(e);useEffect(()=>{if(!r)return;let c=m=>{cy(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 FE(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:ly(l),handler:c}));useEffect(()=>{if(!n)return;let l=d=>{for(let{parsed:m,handler:f}of i)if(cy(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 KE(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 $E(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 GE(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 UE(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 WE(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 jE(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 _E(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 YE(){let[e,t]=useState(false);return {isHovered:e,hoverProps:{onMouseEnter:()=>t(true),onMouseLeave:()=>t(false)}}}function XE(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 ZE(){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 QE(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 JE(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 my=["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 eL(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(my)).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 tL(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(my)).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 nL(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 rL(){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 hy(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 oL(e=true){let{lock:t,unlock:n}=hy();useEffect(()=>{e?t():n();},[e,t,n]);}function Ry(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 sL(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 iL(e="200px"){let{ref:t,isIntersecting:n}=Ry({rootMargin:e,once:true});return {ref:t,isVisible:n}}function lL(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 cL(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 dL(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 uL(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 mL(){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 My(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 gL(e){return My({...e,defaultOpen:true})}function bL(e=false){let[t,n]=useState(e),r=useCallback(()=>{n(o=>!o);},[]);return [t,r,n]}function vL(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 hL(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 yL(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 RL(e=0){let[t,n]=useState(e),r=useCallback(()=>n(o=>o+1),[]);return [t,r]}function wL(e){let t=useRef(void 0);return useEffect(()=>{t.current=e;},[e]),t.current}function CL(e,t){let n=useRef(t);return useEffect(()=>{n.current=e;},[e]),n.current}function TL(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 kL(e=[]){let[t,n]=useState(e),r=useCallback(C=>{n(C);},[]),o=useCallback(C=>{n(y=>[...y,C]);},[]),a=useCallback(C=>{n(y=>[...y,...C]);},[]),s=useCallback((C,y)=>{n(N=>{let T=[...N];return T.splice(C,0,y),T});},[]),i=useCallback((C,y)=>{n(N=>{let T=[...N];return T[C]=y,T});},[]),l=useCallback(C=>{n(y=>y.filter((N,T)=>T!==C));},[]),c=useCallback(C=>{n(y=>{let N=y.indexOf(C);return N===-1?y:y.filter((T,k)=>k!==N)});},[]),d=useCallback(C=>{n(y=>y.filter(N=>!C(N)));},[]),m=useCallback(()=>{let C;return n(y=>y.length===0?y:(C=y[0],y.slice(1))),C},[]),f=useCallback(C=>{n(y=>[C,...y]);},[]),p=useCallback(()=>{let C;return n(y=>y.length===0?y:(C=y[y.length-1],y.slice(0,-1))),C},[]),g=useCallback(()=>{n([]);},[]),h=useCallback(()=>{n(e);},[e]),b=useCallback((C,y)=>{n(N=>{let T=[...N],[k]=T.splice(C,1);return T.splice(y,0,k),T});},[]),v=useCallback((C,y)=>{n(N=>{let T=[...N];return [T[C],T[y]]=[T[y],T[C]],T});},[]),w=useCallback(C=>t.filter(C),[t]),x=useCallback(C=>t.find(C),[t]),R=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:w,find:x,includes:R,length:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i,l,c,d,m,f,p,g,h,b,v,w,x,R])}function PL(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 EL(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 Sy(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 SL(e=[]){let{add:t,remove:n,has:r,toggle:o,clear:a,addMany:s,values:i,size:l}=Sy(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 DL(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 HL(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 Vy(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 VL(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 {...Vy(s,false),retryCount:r}}var Oy=new Map,AL=300*1e3;function zL(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=Oy.get(h);if(b&&Date.now()-b.timestamp<AL){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 w=await v.json(),x=o?o(w):w;Oy.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 w=v instanceof Error?v:new Error(String(v));f.current&&d({data:null,error:w,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 OL(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 vi(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 FL(e,t){let[n,r]=useState(false);vi(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 KL(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;vi(()=>{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 $L(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);vi(()=>{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 Ky(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 GL(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 UL(e,t){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function WL(e,t=true){let[n,r]=useState(false);return Ky(()=>{r(true);},t?e:null),n}function jL(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 w=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(w,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 _L(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 YL(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 Wy=["mousemove","mousedown","resize","keydown","touchstart","wheel","scroll"];function XL(e,t={}){let{events:n=Wy,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 qL(e,t,n,r={}){let{events:o=Wy,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 _y(){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 JL(){return _y()==="visible"}function eS(e,t){let n=useCallback(()=>{document.visibilityState==="visible"?e?.():t?.();},[e,t]);useEffect(()=>(document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}),[n]);}function tS(){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 nS(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 Zy(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 sS(){let e=useRef(null),t=Zy(e);return {ref:e,...t}}function cS(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 dS(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 uS(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 mS(){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 pS(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 gS(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 w=new SpeechSynthesisUtterance(v);w.voice=t,w.rate=n,w.pitch=r,w.volume=o,w.lang=a,w.onstart=()=>i(true),w.onend=()=>{i(false),c(false);},w.onerror=()=>{i(false),c(false);},window.speechSynthesis.speak(w);},[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 bS(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=R=>{m(new Error(R.error)),a(false);},x.onresult=R=>{let C="",y="";for(let N=R.resultIndex;N<R.results.length;N++){let T=R.results[N];T.isFinal?y+=T[0].transcript:C+=T[0].transcript;}y&&i(N=>N+y),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();},[]),w=useCallback(()=>{i(""),c(""),m(null);},[]);return {start:h,stop:b,abort:v,isListening:o,transcript:s,interimTranscript:l,isSupported:g,error:d,reset:w}}export{Vu as Accordion,Au as AccordionItem,th as ActionBar,nh as ActionBarButton,Kv as ActionGroup,mx as ActionSheet,l0 as Alert,d0 as AlertDescription,c0 as AlertTitle,rv as AreaChart,lm as AspectRatio,$g as Autocomplete,Cr as Avatar,Tr as AvatarFallback,Ap as AvatarGroup,Jr as AvatarImage,lg as BackTop,p0 as Badge,rx as Banner,tv as BarChart,Th as BatteryMeter,ey as Blockquote,cx as BottomNavigation,kx as Bounce,Ju as Breadcrumb,am as BreadcrumbEllipsis,tm as BreadcrumbItem,nm as BreadcrumbLink,em as BreadcrumbList,rm as BreadcrumbPage,om as BreadcrumbSeparator,ae as Button,rd as ButtonGroup,Xf as COUNTRIES,no as Calendar,ld as Card,md as CardContent,ud as CardDescription,pd as CardFooter,cd as CardHeader,dd as CardTitle,uv as Carousel,mv as CarouselContent,pv as CarouselItem,Vl as CarouselNext,Il as CarouselPrevious,Ao as Checkbox,Wx as Checkmark,Kp as Chip,_p as CircularProgress,Mt as CloseButton,tb as Code,sb as CodeBlock,wx as Collapse,$u as Collapsible,Gu as CollapsibleContent,Oi as CollapsibleTrigger,Eh as ColorArea,Of as ColorPicker,Dh as ColorSlider,Yo as ColorSwatch,Af as ColorSwatchPicker,Ih as ColorWheel,qi as Command,uw as CommandDialog,Tp as CommandEmpty,Mp as CommandGroup,wp as CommandInput,kp as CommandItem,Cp as CommandList,Np as CommandSeparator,Pp as CommandShortcut,jx as Confetti,uu as ContextMenu,yu as ContextMenuCheckboxItem,bu as ContextMenuContent,pu as ContextMenuGroup,xu as ContextMenuItem,fu as ContextMenuPortal,Ru as ContextMenuSection,wu as ContextMenuSeparator,Cu as ContextMenuShortcut,gu as ContextMenuSub,hu as ContextMenuSubContent,vu as ContextMenuSubTrigger,mu as ContextMenuTrigger,mh as ContextualHelp,qb as CopyButton,Dx as Counter,Gf as CurrencyInput,aa as DEFAULT_COLORS,XR as DataTable,ik as DateField,sk as DateInput,$s as DatePicker,Hb as DateRangePicker,Ch as DiskUsageMeter,$i as Drawer,Dm as DrawerBody,Am as DrawerClose,Lm as DrawerContent,Vm as DrawerDescription,Hm as DrawerFooter,Gm as DrawerGroup,Um as DrawerGroupLabel,Sm as DrawerHeader,Wm as DrawerInset,Bm as DrawerMenu,$m as DrawerMenuButton,Fm as DrawerMenuItem,$R as DrawerProvider,Om as DrawerSeparator,Pm as DrawerSidebar,Im as DrawerTitle,zm as DrawerToggle,Em as DrawerTrigger,Cn as Dropdown,Mn as DropdownContent,Bd as DropdownGroup,$t as DropdownItem,X0 as DropdownLabel,Pi as DropdownSection,zd as DropdownSeparator,Od as DropdownShortcut,Fd as DropdownSub,$d as DropdownSubContent,Kd as DropdownSubTrigger,Tn as DropdownTrigger,zl as EMOJIS,As as EMOJI_CATEGORIES,gv as EmojiPicker,sf as EmptyState,Cx as Expand,HP as FAB,xx as Fade,fl as FieldContext,Df as FileUpload,Mx as Flip,cc as FloatingActionButton,Gg as Form,pl as FormContext,_g as FormControl,Yg as FormDescription,Ug as FormField,Wg as FormItem,jg as FormLabel,Xg as FormMessage,Jb as FullCalendar,_x as Glow,yh as GridList,Xx as H1,qx as H2,Zx as H3,Qx as H4,Xu as HoverCard,Zu as HoverCardContent,qu as HoverCardTrigger,Xv as IllustratedMessage,db as Image,yv as ImageCropper,Ml as ImageViewer,Fb as ImageViewerTrigger,$b as Indicator,Gb as IndicatorWrapper,Ob as InfiniteScroll,Jv as InlineAlert,ty as InlineCode,ka as Input,qp as InputOTP,Zp as InputOTPGroup,Jp as InputOTPSeparator,Qp as InputOTPSlot,lv as KanbanBoard,Yb as Kbd,wr as Label,zh as LabeledValue,Bh as LabeledValueGroup,ry as Large,ny as Lead,ev as LineChart,sg as Link,Zw as List,pf as ListItem,ff as ListItemText,ih as ListView,bb as Listbox,vb as ListboxItem,Sb as Loading,Tb as LoadingOverlay,al as MASK_PRESETS,jf as MaskedInput,pg as Menubar,Tg as MenubarCheckboxItem,wg as MenubarContent,gg as MenubarGroup,Cg as MenubarItem,Ng as MenubarLabel,fg as MenubarMenu,bg as MenubarPortal,hg as MenubarRadioGroup,Mg as MenubarRadioItem,kg as MenubarSeparator,Pg as MenubarShortcut,vg as MenubarSub,Rg as MenubarSubContent,yg as MenubarSubTrigger,xg as MenubarTrigger,Js as Meter,fp as Modal,hp as ModalBody,bp as ModalClose,Ja as ModalContent,Rp as ModalDescription,xp as ModalFooter,vp as ModalHeader,Xi as ModalOverlay,Yi as ModalPortal,Qa as ModalRoot,yp as ModalTitle,gp as ModalTrigger,ay as Muted,Nb as NProgress,Jf as Navbar,eg as NavbarBrand,tg as NavbarContent,ng as NavbarItem,rg as NavbarLink,fm as NavigationMenu,xm as NavigationMenuContent,wm as NavigationMenuIndicator,bm as NavigationMenuItem,Rm as NavigationMenuLink,gm as NavigationMenuList,hm as NavigationMenuTrigger,Ki as NavigationMenuViewport,Qh as NotificationCenter,ex as NotificationCenterContent,xP as NotificationCenterProvider,Jh as NotificationCenterTrigger,ic as NotificationItem,tx as NotificationList,Dv as NumberField,Sp as NumberInput,op as Pagination,ap as PaginationContent,cp as PaginationEllipsis,sp as PaginationItem,Xa as PaginationLink,lp as PaginationNext,ip as PaginationPrevious,Jx as Paragraph,Kx as Parallax,Lp as PasswordInput,qf as PhoneInput,nv as PieChart,Sx as Pop,ot as Popover,an as PopoverAnchor,at as PopoverContent,qn as PopoverTrigger,Wa as Progress,hx as PullToRefresh,Ex as Pulse,wv as QRCode,Nu as RadioGroup,ku as RadioGroupItem,ch as RangeSlider,Op as Rating,Hw as ResizableHandle,Dw as ResizablePanel,Sw as ResizablePanelGroup,vv as RichTextEditor,Nx as Ripple,Tx as Rotate,Rx as Scale,De as ScrollArea,Fx as ScrollProgress,Bx as ScrollReveal,jb as ScrollShadow,Uh as SearchBar,Vv as SearchField,kf as SegmentedControl,Pf as SegmentedControlItem,Hd as Select,Wn as Separator,Px as Shake,eu as Sheet,nu as SheetClose,au as SheetContent,cu as SheetDescription,iu as SheetFooter,su as SheetHeader,ru as SheetOverlay,Ii as SheetPortal,lu as SheetTitle,tu as SheetTrigger,Ux as Shimmer,Da as Skeleton,yx as Slide,$a as Slider,oy as Small,cb as Snippet,MT as SortableList,Yx as Sparkles,Ma as Spinner,Yh as SpotlightSearch,df as StatCard,jv as StatusLight,Dg as Step,Lg as Steps,gx as SwipeActions,hd as Switch,ib as TabbedCodeBlock,_m as Table,Xm as TableBody,ep as TableCaption,Jm as TableCell,qm as TableFooter,Qm as TableHead,Ym as TableHeader,Zm as TableRow,_d as Tabs,qd as TabsContent,Yd as TabsList,Xd as TabsTrigger,gh as TagGroup,rf as TagInput,g0 as TextBadge,Pv as TextField,Ix as TextReveal,xd as Textarea,Cv as ThemeProvider,Tv as ThemeToggle,Ov as TimeField,Ff as TimeInput,Ib as TimePicker,hf as Timeline,Rf as TimelineContent,yf as TimelineItem,wf as TimelineOpposite,aR as Toaster,Pu as Toggle,Lu as ToggleGroup,Su as ToggleGroupItem,_n as Tooltip,Xn as TooltipContent,jn as TooltipProvider,Yn as TooltipTrigger,Bg as Tree,Hx as Typewriter,sy as UL,Qg as User,WT as VirtualList,Lx as Wiggle,Vx as WordRotate,eh as actionBarVariants,Fv as actionGroupVariants,ux as actionSheetItemVariants,s0 as alertVariants,is as applyMask,Kg as autocompleteInputVariants,Vp as avatarGroupVariants,ig as backTopVariants,u0 as badgeIndicatorVariants,nx as bannerVariants,lx as bottomNavigationVariants,td as buttonGroupVariants,qr as buttonVariants,Z0 as calculatePasswordStrength,id as cardVariants,cv as carouselVariants,oa as chartContainerVariants,Fp as chipVariants,jp as circularProgressVariants,Nm as closeButtonVariants,u as cn,eb as codeVariants,Mh as colorAreaVariants,Sh as colorSliderVariants,Vf as colorSwatchPickerVariants,If as colorSwatchVariants,Hh as colorWheelVariants,tc as contextualHelpTriggerVariants,Xb as copyButtonVariants,Kf as currencyInputVariants,Av as datePickerVariants,Zd as defaultPasswordRequirements,Km as drawerMenuButtonVariants,fv as emojiPickerVariants,af as emptyStateVariants,pa as fabVariants,Ef as fileUploadVariants,ol as formatCurrency,ua as formatDate,as as formatFileSize,ls as formatPhoneNumber,Qb as fullCalendarVariants,Lf as getFileIcon,Wf as getMaskPlaceholder,Q0 as getPasswordStrengthColor,J0 as getPasswordStrengthLabel,xh as gridListItemVariants,hh as gridListVariants,kh as hexToRgb,ti as hsvToRgb,Yv as illustratedMessageVariants,xv as imageCropperVariants,xl as imageVariants,Kb as indicatorVariants,Tl as infiniteScrollLoaderVariants,zb as infiniteScrollVariants,Qv as inlineAlertVariants,Xp as inputOTPVariants,Nv as inputSizeVariants,sv as kanbanBoardVariants,Hl as kanbanCardVariants,iv as kanbanColumnVariants,_b as kbdVariants,kv as labelSizeVariants,Oh as labeledValueGroupVariants,Ah as labeledValueVariants,ag as linkVariants,mf as listItemVariants,el as listVariants,sh as listViewItemVariants,ah as listViewVariants,fb as listboxItemVariants,pb as listboxVariants,Cb as loadingOverlayVariants,Lb as loadingVariants,Uf as maskedInputVariants,wh as meterVariants,_i as modalContentVariants,Qf as navbarVariants,ym as navigationMenuLinkStyle,vm as navigationMenuTriggerStyle,Mb as nprogressVariants,Sv as numberFieldVariants,Yl as parseDate,$f as parseFormattedValue,Yf as phoneInputVariants,vx as pullToRefreshVariants,Kl as qrCodeVariants,lh as rangeSliderVariants,zp as ratingVariants,Ph as rgbToHex,Nh as rgbToHsv,bv as richTextEditorVariants,Wb as scrollShadowVariants,Gh as searchBarVariants,Iv as searchFieldVariants,Mf as segmentedControlItemVariants,Tf as segmentedControlVariants,Dd as selectVariants,ou as sheetVariants,Rd as skeletonVariants,lb as snippetVariants,yb as sortableItemVariants,xb as sortableListVariants,Jc as spinnerVariants,cf as statCardVariants,Wv as statusLightVariants,Sg as stepVariants,Eg as stepsVariants,uc as swipeActionVariants,fx as swipeActionsVariants,Ea as switchColors,nc as tagGroupItemVariants,fh as tagGroupVariants,nf as tagVariants,f0 as textBadgeVariants,Mv as textFieldVariants,WN as themeToggleVariants,zv as timeFieldVariants,Bf as timeInputVariants,xf as timelineItemVariants,vf as timelineVariants,Fa as toggleVariants,Vg as treeItemVariants,Ig as treeVariants,sl as unmask,_L as useAnimatedValue,Vy as useAsync,VL as useAsyncRetry,oL as useBodyScrollLock,hL as useBooleanToggle,hE as useBreakpoint,xE as useBreakpoints,Ri as useButtonGroup,Vs as useCarousel,VE as useClickOutside,AE as useClickOutsideMultiple,rE as useConfetti,OE as useCopy,zE as useCopyToClipboard,KL as useCountdown,yL as useCounter,vL as useCycle,kE as useDebounce,PE as useDebouncedCallback,EE as useDebouncedCallbackWithControls,UL as useDelayedValue,My as useDisclosure,gL as useDisclosureOpen,dS as useDistance,JL as useDocumentIsVisible,_y as useDocumentVisibility,eS as useDocumentVisibilityCallback,IR as useDrawer,mL as useElementSize,$E as useEventListener,GE as useEventListenerRef,zL as useFetch,fs as useFieldContext,eL as useFocusTrap,tL as useFocusTrapRef,gl as useFormContext,Zy as useFullscreen,sS as useFullscreenRef,cS as useGeolocation,BE as useHotkeys,FE as useHotkeysMap,jE as useHover,XE as useHoverDelay,YE as useHoverProps,_E as useHoverRef,XL as useIdle,qL as useIdleCallback,RL as useIncrementCounter,Ry as useIntersectionObserver,sL as useIntersectionObserverRef,vi as useInterval,FL as useIntervalControls,cE as useIsDesktop,iE as useIsMobile,lE as useIsTablet,UE as useKeyPress,KE as useKeyPressed,mM as useKeyboardShortcut,iL as useLazyLoad,kL as useList,wE as useLocalStorage,WE as useLongPress,PL as useMap,pS as useMediaPermission,So as useMediaQuery,ZE as useMouse,QE as useMouseElement,JE as useMouseElementRef,OL as useMutation,lL as useMutationObserver,cL as useMutationObserverRef,ri as useNotificationCenter,mS as useNotificationPermission,tS as useOnlineStatus,nS as useOnlineStatusCallback,uS as usePermission,dE as usePrefersColorScheme,uE as usePrefersReducedMotion,wL as usePrevious,TL as usePreviousDistinct,CL as usePreviousWithInitial,DL as useQueue,jL as useRafLoop,EL as useRecord,dL as useResizeObserver,uL as useResizeObserverRef,hy as useScrollLock,nL as useScrollPosition,SL as useSelection,TE as useSessionStorage,Sy as useSet,bS as useSpeechRecognition,gS as useSpeechSynthesis,uP as useSpotlight,YL as useSpringValue,HL as useStack,DE as useThrottle,HE as useThrottledCallback,Ky as useTimeout,GL as useTimeoutControls,WL as useTimeoutFlag,$L as useTimer,bL as useToggle,vE as useWindowHeight,rL as useWindowScroll,va as useWindowSize,bE as useWindowWidth,Zg as userVariants,Sf as validateFile,dT as validators,Vb as virtualListVariants};//# sourceMappingURL=index.js.map
|
|
72
|
+
`})]})});Ux.displayName="Shimmer";var nE={sm:24,md:40,lg:56,xl:80},rE={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"}},Wx=_.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=nE[t],d=rE[n],u={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:m(s),children:[jsx(motion.circle,{cx:"25",cy:"25",r:"22",fill:"none",strokeWidth:r,className:d.circle,variants:u,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?.()})]})});Wx.displayName="Checkmark";var Lo={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},jx=_.forwardRef(({autoTrigger:e=false,delay:t=0,options:n={},children:r,onTrigger:o},a)=>{let s=_.useCallback(()=>{let i={...Lo,...n};Eo(i),o?.();},[n,o]);return _.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});jx.displayName="Confetti";var oE=()=>{let e=_.useCallback(r=>{let o={...Lo,...r};Eo(o);},[]),t=_.useCallback(()=>{let o=Date.now()+3e3,a=setInterval(()=>{let s=o-Date.now();if(s<=0){clearInterval(a);return}let i=50*(s/3e3);Eo({...Lo,particleCount:i,origin:{x:Math.random()*.4+.1,y:Math.random()-.2}}),Eo({...Lo,particleCount:i,origin:{x:Math.random()*.4+.5,y:Math.random()-.2}});},250);},[]),n=_.useCallback((r="both")=>{let o={x:0,y:1},a={x:1,y:1};(r==="left"||r==="both")&&Eo({...Lo,particleCount:50,angle:60,spread:55,origin:o}),(r==="right"||r==="both")&&Eo({...Lo,particleCount:50,angle:120,spread:55,origin:a});},[]);return {fire:e,fireworks:t,cannon:n}},_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:m("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:m("rounded-[inherit]",s),style:l,children:e})});_x.displayName="Glow";var Gx=(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}),Yx=_.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]=_.useState([]);return _.useEffect(()=>{let d=Array.from({length:t},()=>Gx(r,o));c(d);let u=setInterval(()=>{c(f=>{let p=[...f],g=Math.floor(Math.random()*t);return p[g]=Gx(r,o),p});},a*500);return ()=>clearInterval(u)},[t,r,o,a]),jsxs("div",{ref:i,className:m("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))]})});Yx.displayName="Sparkles";var Xx=_.forwardRef(({className:e,children:t,...n},r)=>jsx("h1",{ref:r,className:m("scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",e),...n,children:t}));Xx.displayName="H1";var qx=_.forwardRef(({className:e,children:t,...n},r)=>jsx("h2",{ref:r,className:m("scroll-m-20 text-3xl font-semibold tracking-tight",e),...n,children:t}));qx.displayName="H2";var Zx=_.forwardRef(({className:e,children:t,...n},r)=>jsx("h3",{ref:r,className:m("scroll-m-20 text-2xl font-semibold tracking-tight",e),...n,children:t}));Zx.displayName="H3";var Qx=_.forwardRef(({className:e,children:t,...n},r)=>jsx("h4",{ref:r,className:m("scroll-m-20 text-xl font-semibold tracking-tight",e),...n,children:t}));Qx.displayName="H4";var Jx=_.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:m("leading-7 [&:not(:first-child)]:mt-6",e),...n,children:t}));Jx.displayName="Paragraph";var ey=_.forwardRef(({className:e,children:t,...n},r)=>jsx("blockquote",{ref:r,className:m("mt-6 border-l-2 pl-6 italic",e),...n,children:t}));ey.displayName="Blockquote";var ty=_.forwardRef(({className:e,children:t,...n},r)=>jsx("code",{ref:r,className:m("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",e),...n,children:t}));ty.displayName="InlineCode";var ny=_.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:m("text-xl text-muted-foreground",e),...n,children:t}));ny.displayName="Lead";var ry=_.forwardRef(({className:e,children:t,...n},r)=>jsx("div",{ref:r,className:m("text-lg font-semibold",e),...n,children:t}));ry.displayName="Large";var oy=_.forwardRef(({className:e,children:t,...n},r)=>jsx("small",{ref:r,className:m("text-sm font-medium leading-none",e),...n,children:t}));oy.displayName="Small";var ay=_.forwardRef(({className:e,children:t,...n},r)=>jsx("p",{ref:r,className:m("text-sm text-muted-foreground",e),...n,children:t}));ay.displayName="Muted";var sy=_.forwardRef(({className:e,children:t,...n},r)=>jsx("ul",{ref:r,className:m("my-6 ml-6 list-disc [&>li]:mt-2",e),...n,children:t}));sy.displayName="UL";function So(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 lE(){return So("(max-width: 767px)")}function cE(){return So("(min-width: 768px) and (max-width: 1023px)")}function dE(){return So("(min-width: 1024px)")}function uE(){return So("(prefers-color-scheme: dark)")?"dark":"light"}function mE(){return So("(prefers-reduced-motion: reduce)")}function va(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 vE(){let{width:e}=va();return e}function hE(){let{height:e}=va();return e}function xE(e){let{width:t}=va();return t>=e}function yE(){let{width:e}=va();return {isSm:e>=640,isMd:e>=768,isLg:e>=1024,isXl:e>=1280,is2xl:e>=1536}}function CE(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 ME(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 PE(e,t=500){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function EE(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 HE(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 IE(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 AE(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 zE(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 OE(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 BE(){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 ly(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 cy(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 FE(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=ly(e);useEffect(()=>{if(!r)return;let c=u=>{cy(u,l)&&(o&&u.preventDefault(),a&&u.stopPropagation(),i.current(u));},d=s||document;return d.addEventListener("keydown",c),()=>{d.removeEventListener("keydown",c);}},[r,o,a,s,l]);}function KE(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:ly(l),handler:c}));useEffect(()=>{if(!n)return;let l=d=>{for(let{parsed:u,handler:f}of i)if(cy(d,u)){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 $E(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 GE(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 UE(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 WE(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 jE(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(u=>{a&&(l.current=u,i.current=false,r?.(u),s.current=setTimeout(()=>{i.current=true,l.current&&e(l.current);},n));},[e,n,r,a]),d=useCallback(u=>{a&&(s.current&&(clearTimeout(s.current),s.current=null),i.current||o?.(u),i.current=false,l.current=null);},[o,a]);return {onMouseDown:c,onMouseUp:d,onMouseLeave:d,onTouchStart:c,onTouchEnd:d}}function _E(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 YE(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 XE(){let[e,t]=useState(false);return {isHovered:e,hoverProps:{onMouseEnter:()=>t(true),onMouseLeave:()=>t(false)}}}function qE(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 QE(){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 JE(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 eL(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 my=["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 tL(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(my)).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 u=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===u&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),u.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 nL(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(my)).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 u=d[0],f=d[d.length-1];c.shiftKey?document.activeElement===u&&(c.preventDefault(),f.focus()):document.activeElement===f&&(c.preventDefault(),u.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 rL(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,v=p>s.current?1:p<s.current?-1:0,b=g>i.current?1:g<i.current?-1:0;s.current=p,i.current=g,a({x:g,y:p,isScrolled:p>t,directionY:v,directionX:b,isAtBottom:p>=h-1,isAtTop:p<=0,progress:h>0?p/h:0}),l.current=false;},[r,t]),u=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",u,{passive:true}),d(),()=>{f.removeEventListener("scroll",u);}},[r,u,d]),o}function oL(){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 hy(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 aL(e=true){let{lock:t,unlock:n}=hy();useEffect(()=>{e?t():n();},[e,t,n]);}function Ry(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(([u])=>{l({isIntersecting:u.isIntersecting,entry:u}),o&&u.isIntersecting&&d.disconnect();},{root:t,rootMargin:n,threshold:r});return d.observe(c),()=>{d.disconnect();}},[t,n,r,o,a]),{ref:s,...i}}function iL(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(([u])=>{l({isIntersecting:u.isIntersecting,entry:u}),a&&u.isIntersecting&&d.disconnect();},{root:n,rootMargin:r,threshold:o});return d.observe(c),()=>{d.disconnect();}},[e,n,r,o,a,s]),i}function lL(e="200px"){let{ref:t,isIntersecting:n}=Ry({rootMargin:e,once:true});return {ref:t,isVisible:n}}function cL(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),u=useRef(e);return u.current=e,useEffect(()=>{let f=d.current;if(!f||!n)return;let p=new MutationObserver((g,h)=>{u.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 dL(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,u=useRef(t);u.current=t,useEffect(()=>{let f=e.current;if(!f||!r)return;let p=new MutationObserver((g,h)=>{u.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 uL(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 u,f;n==="border-box"&&d.borderBoxSize?.[0]?(u=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(u=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(u=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:u,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 u=c.getBoundingClientRect();return s({width:u.width,height:u.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[t,n,l]),{ref:o,...a}}function mL(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 u,f;r==="border-box"&&d.borderBoxSize?.[0]?(u=d.borderBoxSize[0].inlineSize,f=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(u=d.contentBoxSize[0].inlineSize,f=d.contentBoxSize[0].blockSize):(u=d.contentRect.width,f=d.contentRect.height);let p=()=>s({width:u,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 u=c.getBoundingClientRect();return s({width:u.width,height:u.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[e,n,r,l]),a}function pL(){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 My(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,u=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():u();},[d,u,f]),g=useCallback(b=>{b?u():f();},[u,f]),h=useCallback(()=>({onClick:p,"aria-expanded":d,...s&&{"aria-controls":s}}),[p,d,s]),v=useCallback(()=>({hidden:!d,...s&&{id:s}}),[d,s]);return useMemo(()=>({isOpen:d,open:u,close:f,toggle:p,setIsOpen:g,getButtonProps:h,getDisclosureProps:v}),[d,u,f,p,g,h,v])}function bL(e){return My({...e,defaultOpen:true})}function vL(e=false){let[t,n]=useState(e),r=useCallback(()=>{n(o=>!o);},[]);return [t,r,n]}function hL(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 xL(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 RL(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]),u=useCallback(()=>{i(a(e));},[a,e]),f=s<=n,p=s>=r;return useMemo(()=>({count:s,increment:l,decrement:c,set:d,reset:u,isMin:f,isMax:p}),[s,l,c,d,u,f,p])}function wL(e=0){let[t,n]=useState(e),r=useCallback(()=>n(o=>o+1),[]);return [t,r]}function CL(e){let t=useRef(void 0);return useEffect(()=>{t.current=e;},[e]),t.current}function TL(e,t){let n=useRef(t);return useEffect(()=>{n.current=e;},[e]),n.current}function ML(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 PL(e=[]){let[t,n]=useState(e),r=useCallback(C=>{n(C);},[]),o=useCallback(C=>{n(y=>[...y,C]);},[]),a=useCallback(C=>{n(y=>[...y,...C]);},[]),s=useCallback((C,y)=>{n(N=>{let T=[...N];return T.splice(C,0,y),T});},[]),i=useCallback((C,y)=>{n(N=>{let T=[...N];return T[C]=y,T});},[]),l=useCallback(C=>{n(y=>y.filter((N,T)=>T!==C));},[]),c=useCallback(C=>{n(y=>{let N=y.indexOf(C);return N===-1?y:y.filter((T,k)=>k!==N)});},[]),d=useCallback(C=>{n(y=>y.filter(N=>!C(N)));},[]),u=useCallback(()=>{let C;return n(y=>y.length===0?y:(C=y[0],y.slice(1))),C},[]),f=useCallback(C=>{n(y=>[C,...y]);},[]),p=useCallback(()=>{let C;return n(y=>y.length===0?y:(C=y[y.length-1],y.slice(0,-1))),C},[]),g=useCallback(()=>{n([]);},[]),h=useCallback(()=>{n(e);},[e]),v=useCallback((C,y)=>{n(N=>{let T=[...N],[k]=T.splice(C,1);return T.splice(y,0,k),T});},[]),b=useCallback((C,y)=>{n(N=>{let T=[...N];return [T[C],T[y]]=[T[y],T[C]],T});},[]),w=useCallback(C=>t.filter(C),[t]),x=useCallback(C=>t.find(C),[t]),R=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:u,unshift:f,pop:p,clear:g,reset:h,move:v,swap:b,filter:w,find:x,includes:R,length:t.length,isEmpty:t.length===0}),[t,r,o,a,s,i,l,c,d,u,f,p,g,h,v,b,w,x,R])}function EL(e=[]){let[t,n]=useState(()=>new Map(e)),r=useCallback(p=>t.get(p),[t]),o=useCallback((p,g)=>{n(h=>{let v=new Map(h);return v.set(p,g),v});},[]),a=useCallback(p=>{n(g=>{let h=new Map(g);return p.forEach(([v,b])=>h.set(v,b)),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]),u=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:u,entries:f,size:t.size,isEmpty:t.size===0}),[t,r,o,a,s,i,l,c,d,u,f])}function LL(e={}){let[t,n]=useState(e),r=useCallback(d=>t[d],[t]),o=useCallback((d,u)=>{n(f=>({...f,[d]:u}));},[]),a=useCallback(d=>{n(u=>({...u,...d}));},[]),s=useCallback(d=>{n(u=>{let{[d]:f,...p}=u;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 Sy(e=[]){let[t,n]=useState(()=>new Set(e)),r=useCallback(u=>{n(f=>{let p=new Set(f);return p.add(u),p});},[]),o=useCallback(u=>{n(f=>{let p=new Set(f);return u.forEach(g=>p.add(g)),p});},[]),a=useCallback(u=>{n(f=>{let p=new Set(f);return p.delete(u),p});},[]),s=useCallback(u=>t.has(u),[t]),i=useCallback(u=>{n(f=>{let p=new Set(f);return p.has(u)?p.delete(u):p.add(u),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}=Sy(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 HL(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 IL(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 Vy(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 AL(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(u){c=u instanceof Error?u:new Error(String(u)),d<t&&await new Promise(f=>setTimeout(f,n));}throw c},[t,n]);return {...Vy(s,false),retryCount:r}}var Oy=new Map,zL=300*1e3;function OL(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}),u=useRef(null),f=useRef(true),p=useCallback(async()=>{if(!e||!s)return;let h=l||e,v=Oy.get(h);if(v&&Date.now()-v.timestamp<zL){d({data:v.data,error:null,isLoading:false,isSuccess:true,isError:false});return}u.current&&u.current.abort(),u.current=new AbortController,d(b=>({...b,isLoading:true,error:null}));try{let b=await fetch(e,{...r,signal:u.current.signal});if(!b.ok)throw new Error(`HTTP error! status: ${b.status}`);let w=await b.json(),x=o?o(w):w;Oy.set(h,{data:x,timestamp:Date.now()}),f.current&&d({data:x,error:null,isLoading:!1,isSuccess:!0,isError:!1});}catch(b){if(b instanceof Error&&b.name==="AbortError")return;let w=b instanceof Error?b:new Error(String(b));f.current&&d({data:null,error:w,isLoading:false,isSuccess:false,isError:true});}},[e,s,r,o,l]),g=useCallback(()=>{u.current&&u.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 BL(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(),u=n?n(d):d;return a({data:u,error:null,isLoading:!1,isSuccess:!0,isError:!1}),u}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 hi(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 KL(e,t){let[n,r]=useState(false);hi(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 $L(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;hi(()=>{s(g=>{let h=g-1;return h<=0?(l(false),c.current?.(),0):h});},i&&!d?n:null);let u=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:u,pause:f,reset:p}}function GL(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);hi(()=>{a(p=>p+1);},l?t:null);let c=useCallback(()=>i(true),[]),d=useCallback(()=>i(false),[]),u=useCallback(()=>i(p=>!p),[]),f=useCallback(()=>{a(0),i(false);},[]);return {seconds:o,isRunning:s,start:c,stop:d,reset:f,toggle:u}}function Ky(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 UL(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 WL(e,t){let[n,r]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n}function jL(e,t=true){let[n,r]=useState(false);return Ky(()=>{r(true);},t?e:null),n}function _L(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),u=useRef(0),f=useRef(0),p=useRef(0),g=useCallback(b=>{let w=d.current?b-d.current:0;d.current=b,p.current++,b-f.current>=1e3&&(a(p.current),p.current=0,f.current=b),u.current++,i(u.current),l.current(w,b),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]),v=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:v,isRunning:n,frameCount:s,fps:o}}function YL(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=u=>{i.current===null&&(i.current=u);let f=u-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 XL(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=u=>{c.current===null&&(c.current=u);let f=Math.min((u-c.current)/1e3,.064);c.current=u;let p=(e-a)*n,g=i.current*r,h=(p-g)/o;i.current+=h*f;let v=a+i.current*f;s(v),Math.abs(v-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 Wy=["mousemove","mousedown","resize","keydown","touchstart","wheel","scroll"];function qL(e,t={}){let{events:n=Wy,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 ZL(e,t,n,r={}){let{events:o=Wy,initialState:a=false,enabled:s=true}=r,[i,l]=useState(a),c=useRef(null),d=useRef(a),u=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 u(),o.forEach(f=>{window.addEventListener(f,u);}),()=>{c.current&&clearTimeout(c.current),o.forEach(f=>{window.removeEventListener(f,u);});}},[s,o,u]),i}function _y(){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 eS(){return _y()==="visible"}function tS(e,t){let n=useCallback(()=>{document.visibilityState==="visible"?e?.():t?.();},[e,t]);useEffect(()=>(document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n);}),[n]);}function nS(){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 rS(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 Zy(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 iS(){let e=useRef(null),t=Zy(e);return {ref:e,...t}}function dS(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}));},[]),u=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&&u(),t)){let f=navigator.geolocation.watchPosition(c,d,{enableHighAccuracy:r,maximumAge:o,timeout:a});return ()=>{navigator.geolocation.clearWatch(f);}}},[t,n,l,u,c,d,r,o,a]),{...s,getCurrentPosition:u,isSupported:l}}function uS(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 mS(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 pS(){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 fS(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 u=d instanceof Error?d:new Error(String(d));return o(u),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 bS(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,u]=useState([]),f=typeof window<"u"&&"speechSynthesis"in window;useEffect(()=>{if(!f)return;let b=()=>{u(window.speechSynthesis.getVoices());};return b(),window.speechSynthesis.addEventListener("voiceschanged",b),()=>{window.speechSynthesis.removeEventListener("voiceschanged",b);}},[f]);let p=useCallback(b=>{if(!f)return;window.speechSynthesis.cancel();let w=new SpeechSynthesisUtterance(b);w.voice=t,w.rate=n,w.pitch=r,w.volume=o,w.lang=a,w.onstart=()=>i(true),w.onend=()=>{i(false),c(false);},w.onerror=()=>{i(false),c(false);},window.speechSynthesis.speak(w);},[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]),v=useCallback(()=>{f&&(window.speechSynthesis.resume(),c(false));},[f]);return {speak:p,stop:g,pause:h,resume:v,isSpeaking:s,isPaused:l,isSupported:f,voices:d}}function vS(e={}){let{lang:t="en-US",continuous:n=false,interimResults:r=true}=e,[o,a]=useState(false),[s,i]=useState(""),[l,c]=useState(""),[d,u]=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),u(null);},x.onend=()=>{a(false);},x.onerror=R=>{u(new Error(R.error)),a(false);},x.onresult=R=>{let C="",y="";for(let N=R.resultIndex;N<R.results.length;N++){let T=R.results[N];T.isFinal?y+=T[0].transcript:C+=T[0].transcript;}y&&i(N=>N+y),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]),v=useCallback(()=>{f.current&&f.current.stop();},[]),b=useCallback(()=>{f.current&&f.current.abort();},[]),w=useCallback(()=>{i(""),c(""),u(null);},[]);return {start:h,stop:v,abort:b,isListening:o,transcript:s,interimTranscript:l,isSupported:g,error:d,reset:w}}export{Vu as Accordion,Au as AccordionItem,th as ActionBar,nh as ActionBarButton,Kv as ActionGroup,mx as ActionSheet,l0 as Alert,d0 as AlertDescription,c0 as AlertTitle,rv as AreaChart,lm as AspectRatio,$g as Autocomplete,Cr as Avatar,Tr as AvatarFallback,Ap as AvatarGroup,Jr as AvatarImage,lg as BackTop,p0 as Badge,rx as Banner,tv as BarChart,Th as BatteryMeter,ey as Blockquote,cx as BottomNavigation,kx as Bounce,Ju as Breadcrumb,am as BreadcrumbEllipsis,tm as BreadcrumbItem,nm as BreadcrumbLink,em as BreadcrumbList,rm as BreadcrumbPage,om as BreadcrumbSeparator,ae as Button,od as ButtonGroup,Xf as COUNTRIES,no as Calendar,cd as Card,pd as CardContent,md as CardDescription,fd as CardFooter,dd as CardHeader,ud as CardTitle,uv as Carousel,mv as CarouselContent,pv as CarouselItem,Al as CarouselNext,Vl as CarouselPrevious,Ao as Checkbox,Wx as Checkmark,Kp as Chip,_p as CircularProgress,Mt as CloseButton,tb as Code,sb as CodeBlock,wx as Collapse,$u as Collapsible,Gu as CollapsibleContent,Bi as CollapsibleTrigger,Eh as ColorArea,Of as ColorPicker,Dh as ColorSlider,Yo as ColorSwatch,Af as ColorSwatchPicker,Ih as ColorWheel,Zi as Command,uw as CommandDialog,Tp as CommandEmpty,Mp as CommandGroup,wp as CommandInput,kp as CommandItem,Cp as CommandList,Np as CommandSeparator,Pp as CommandShortcut,jx as Confetti,uu as ContextMenu,yu as ContextMenuCheckboxItem,bu as ContextMenuContent,pu as ContextMenuGroup,xu as ContextMenuItem,fu as ContextMenuPortal,Ru as ContextMenuSection,wu as ContextMenuSeparator,Cu as ContextMenuShortcut,gu as ContextMenuSub,hu as ContextMenuSubContent,vu as ContextMenuSubTrigger,mu as ContextMenuTrigger,mh as ContextualHelp,qb as CopyButton,Dx as Counter,Gf as CurrencyInput,aa as DEFAULT_COLORS,XR as DataTable,lk as DateField,ik as DateInput,Gs as DatePicker,Hb as DateRangePicker,Ch as DiskUsageMeter,Gi as Drawer,Dm as DrawerBody,Am as DrawerClose,Lm as DrawerContent,Vm as DrawerDescription,Hm as DrawerFooter,Gm as DrawerGroup,Um as DrawerGroupLabel,Sm as DrawerHeader,Wm as DrawerInset,Bm as DrawerMenu,$m as DrawerMenuButton,Fm as DrawerMenuItem,$R as DrawerProvider,Om as DrawerSeparator,Pm as DrawerSidebar,Im as DrawerTitle,zm as DrawerToggle,Em as DrawerTrigger,Cn as Dropdown,Mn as DropdownContent,Bd as DropdownGroup,$t as DropdownItem,X0 as DropdownLabel,Ei as DropdownSection,zd as DropdownSeparator,Od as DropdownShortcut,Fd as DropdownSub,$d as DropdownSubContent,Kd as DropdownSubTrigger,Tn as DropdownTrigger,Ol as EMOJIS,zs as EMOJI_CATEGORIES,gv as EmojiPicker,sf as EmptyState,Cx as Expand,IP as FAB,xx as Fade,gl as FieldContext,Df as FileUpload,Mx as Flip,dc as FloatingActionButton,Gg as Form,fl as FormContext,_g as FormControl,Yg as FormDescription,Ug as FormField,Wg as FormItem,jg as FormLabel,Xg as FormMessage,Jb as FullCalendar,_x as Glow,yh as GridList,Xx as H1,qx as H2,Zx as H3,Qx as H4,Xu as HoverCard,Zu as HoverCardContent,qu as HoverCardTrigger,Xv as IllustratedMessage,db as Image,yv as ImageCropper,Nl as ImageViewer,Fb as ImageViewerTrigger,$b as Indicator,Gb as IndicatorWrapper,Ob as InfiniteScroll,Jv as InlineAlert,ty as InlineCode,ka as Input,qp as InputOTP,Zp as InputOTPGroup,Jp as InputOTPSeparator,Qp as InputOTPSlot,lv as KanbanBoard,Yb as Kbd,wr as Label,zh as LabeledValue,Bh as LabeledValueGroup,ry as Large,ny as Lead,ev as LineChart,sg as Link,Zw as List,pf as ListItem,ff as ListItemText,ih as ListView,bb as Listbox,vb as ListboxItem,Sb as Loading,Tb as LoadingOverlay,sl as MASK_PRESETS,jf as MaskedInput,pg as Menubar,Tg as MenubarCheckboxItem,wg as MenubarContent,gg as MenubarGroup,Cg as MenubarItem,Ng as MenubarLabel,fg as MenubarMenu,bg as MenubarPortal,hg as MenubarRadioGroup,Mg as MenubarRadioItem,kg as MenubarSeparator,Pg as MenubarShortcut,vg as MenubarSub,Rg as MenubarSubContent,yg as MenubarSubTrigger,xg as MenubarTrigger,ei as Meter,fp as Modal,hp as ModalBody,bp as ModalClose,es as ModalContent,Rp as ModalDescription,xp as ModalFooter,vp as ModalHeader,qi as ModalOverlay,Xi as ModalPortal,Ja as ModalRoot,yp as ModalTitle,gp as ModalTrigger,ay as Muted,Nb as NProgress,Jf as Navbar,eg as NavbarBrand,tg as NavbarContent,ng as NavbarItem,rg as NavbarLink,fm as NavigationMenu,xm as NavigationMenuContent,wm as NavigationMenuIndicator,bm as NavigationMenuItem,Rm as NavigationMenuLink,gm as NavigationMenuList,hm as NavigationMenuTrigger,$i as NavigationMenuViewport,Qh as NotificationCenter,ex as NotificationCenterContent,yP as NotificationCenterProvider,Jh as NotificationCenterTrigger,lc as NotificationItem,tx as NotificationList,Dv as NumberField,Sp as NumberInput,op as Pagination,ap as PaginationContent,cp as PaginationEllipsis,sp as PaginationItem,qa as PaginationLink,lp as PaginationNext,ip as PaginationPrevious,Jx as Paragraph,Kx as Parallax,Lp as PasswordInput,qf as PhoneInput,nv as PieChart,Sx as Pop,ot as Popover,an as PopoverAnchor,at as PopoverContent,qn as PopoverTrigger,ja as Progress,hx as PullToRefresh,Ex as Pulse,wv as QRCode,Nu as RadioGroup,ku as RadioGroupItem,ch as RangeSlider,Op as Rating,Hw as ResizableHandle,Dw as ResizablePanel,Sw as ResizablePanelGroup,vv as RichTextEditor,Nx as Ripple,Tx as Rotate,Rx as Scale,De as ScrollArea,Fx as ScrollProgress,Bx as ScrollReveal,jb as ScrollShadow,Uh as SearchBar,Vv as SearchField,kf as SegmentedControl,Pf as SegmentedControlItem,Va as Select,Wn as Separator,Px as Shake,eu as Sheet,nu as SheetClose,au as SheetContent,cu as SheetDescription,iu as SheetFooter,su as SheetHeader,ru as SheetOverlay,Vi as SheetPortal,lu as SheetTitle,tu as SheetTrigger,Ux as Shimmer,Da as Skeleton,yx as Slide,Ga as Slider,oy as Small,cb as Snippet,MT as SortableList,Yx as Sparkles,Ma as Spinner,Yh as SpotlightSearch,df as StatCard,jv as StatusLight,Dg as Step,Lg as Steps,gx as SwipeActions,xd as Switch,ib as TabbedCodeBlock,_m as Table,Xm as TableBody,ep as TableCaption,Jm as TableCell,qm as TableFooter,Qm as TableHead,Ym as TableHeader,Zm as TableRow,_d as Tabs,qd as TabsContent,Yd as TabsList,Xd as TabsTrigger,gh as TagGroup,rf as TagInput,g0 as TextBadge,Pv as TextField,Ix as TextReveal,yd as Textarea,Cv as ThemeProvider,Tv as ThemeToggle,Ov as TimeField,Ff as TimeInput,Ib as TimePicker,hf as Timeline,Rf as TimelineContent,yf as TimelineItem,wf as TimelineOpposite,aR as Toaster,Pu as Toggle,Lu as ToggleGroup,Su as ToggleGroupItem,_n as Tooltip,Xn as TooltipContent,jn as TooltipProvider,Yn as TooltipTrigger,Bg as Tree,Hx as Typewriter,sy as UL,Qg as User,WT as VirtualList,Lx as Wiggle,Vx as WordRotate,eh as actionBarVariants,Fv as actionGroupVariants,ux as actionSheetItemVariants,s0 as alertVariants,ls as applyMask,Kg as autocompleteInputVariants,Vp as avatarGroupVariants,ig as backTopVariants,u0 as badgeIndicatorVariants,nx as bannerVariants,lx as bottomNavigationVariants,nd as buttonGroupVariants,qr as buttonVariants,Z0 as calculatePasswordStrength,ld as cardVariants,cv as carouselVariants,oa as chartContainerVariants,Fp as chipVariants,jp as circularProgressVariants,Nm as closeButtonVariants,m as cn,eb as codeVariants,Mh as colorAreaVariants,Sh as colorSliderVariants,Vf as colorSwatchPickerVariants,If as colorSwatchVariants,Hh as colorWheelVariants,nc as contextualHelpTriggerVariants,Xb as copyButtonVariants,Kf as currencyInputVariants,Av as datePickerVariants,Zd as defaultPasswordRequirements,Km as drawerMenuButtonVariants,fv as emojiPickerVariants,af as emptyStateVariants,pa as fabVariants,Ef as fileUploadVariants,al as formatCurrency,ua as formatDate,ss as formatFileSize,cs as formatPhoneNumber,Qb as fullCalendarVariants,Lf as getFileIcon,Wf as getMaskPlaceholder,Q0 as getPasswordStrengthColor,J0 as getPasswordStrengthLabel,xh as gridListItemVariants,hh as gridListVariants,kh as hexToRgb,ni as hsvToRgb,Yv as illustratedMessageVariants,xv as imageCropperVariants,yl as imageVariants,Kb as indicatorVariants,Ml as infiniteScrollLoaderVariants,zb as infiniteScrollVariants,Qv as inlineAlertVariants,Xp as inputOTPVariants,Nv as inputSizeVariants,sv as kanbanBoardVariants,Il as kanbanCardVariants,iv as kanbanColumnVariants,_b as kbdVariants,kv as labelSizeVariants,Oh as labeledValueGroupVariants,Ah as labeledValueVariants,ag as linkVariants,mf as listItemVariants,tl as listVariants,sh as listViewItemVariants,ah as listViewVariants,fb as listboxItemVariants,pb as listboxVariants,Cb as loadingOverlayVariants,Lb as loadingVariants,Uf as maskedInputVariants,wh as meterVariants,Yi as modalContentVariants,Qf as navbarVariants,ym as navigationMenuLinkStyle,vm as navigationMenuTriggerStyle,Mb as nprogressVariants,Sv as numberFieldVariants,Xl as parseDate,$f as parseFormattedValue,Yf as phoneInputVariants,vx as pullToRefreshVariants,$l as qrCodeVariants,lh as rangeSliderVariants,zp as ratingVariants,Ph as rgbToHex,Nh as rgbToHsv,bv as richTextEditorVariants,Wb as scrollShadowVariants,Gh as searchBarVariants,Iv as searchFieldVariants,Mf as segmentedControlItemVariants,Tf as segmentedControlVariants,Hd as selectVariants,ou as sheetVariants,wd as skeletonVariants,lb as snippetVariants,yb as sortableItemVariants,xb as sortableListVariants,ed as spinnerVariants,cf as statCardVariants,Wv as statusLightVariants,Sg as stepVariants,Eg as stepsVariants,mc as swipeActionVariants,fx as swipeActionsVariants,Ea as switchColors,rc as tagGroupItemVariants,fh as tagGroupVariants,nf as tagVariants,f0 as textBadgeVariants,Mv as textFieldVariants,jN as themeToggleVariants,zv as timeFieldVariants,Bf as timeInputVariants,xf as timelineItemVariants,vf as timelineVariants,Ka as toggleVariants,Vg as treeItemVariants,Ig as treeVariants,il as unmask,YL as useAnimatedValue,Vy as useAsync,AL as useAsyncRetry,aL as useBodyScrollLock,xL as useBooleanToggle,xE as useBreakpoint,yE as useBreakpoints,wi as useButtonGroup,As as useCarousel,AE as useClickOutside,zE as useClickOutsideMultiple,oE as useConfetti,BE as useCopy,OE as useCopyToClipboard,$L as useCountdown,RL as useCounter,hL as useCycle,PE as useDebounce,EE as useDebouncedCallback,LE as useDebouncedCallbackWithControls,WL as useDelayedValue,My as useDisclosure,bL as useDisclosureOpen,uS as useDistance,eS as useDocumentIsVisible,_y as useDocumentVisibility,tS as useDocumentVisibilityCallback,IR as useDrawer,pL as useElementSize,GE as useEventListener,UE as useEventListenerRef,OL as useFetch,gs as useFieldContext,tL as useFocusTrap,nL as useFocusTrapRef,bl as useFormContext,Zy as useFullscreen,iS as useFullscreenRef,dS as useGeolocation,FE as useHotkeys,KE as useHotkeysMap,_E as useHover,qE as useHoverDelay,XE as useHoverProps,YE as useHoverRef,qL as useIdle,ZL as useIdleCallback,wL as useIncrementCounter,Ry as useIntersectionObserver,iL as useIntersectionObserverRef,hi as useInterval,KL as useIntervalControls,dE as useIsDesktop,lE as useIsMobile,cE as useIsTablet,WE as useKeyPress,$E as useKeyPressed,mM as useKeyboardShortcut,lL as useLazyLoad,PL as useList,CE as useLocalStorage,jE as useLongPress,EL as useMap,fS as useMediaPermission,So as useMediaQuery,QE as useMouse,JE as useMouseElement,eL as useMouseElementRef,BL as useMutation,cL as useMutationObserver,dL as useMutationObserverRef,oi as useNotificationCenter,pS as useNotificationPermission,nS as useOnlineStatus,rS as useOnlineStatusCallback,mS as usePermission,uE as usePrefersColorScheme,mE as usePrefersReducedMotion,CL as usePrevious,ML as usePreviousDistinct,TL as usePreviousWithInitial,HL as useQueue,_L as useRafLoop,LL as useRecord,uL as useResizeObserver,mL as useResizeObserverRef,hy as useScrollLock,rL as useScrollPosition,DL as useSelection,ME as useSessionStorage,Sy as useSet,vS as useSpeechRecognition,bS as useSpeechSynthesis,mP as useSpotlight,XL as useSpringValue,IL as useStack,HE as useThrottle,IE as useThrottledCallback,Ky as useTimeout,UL as useTimeoutControls,jL as useTimeoutFlag,GL as useTimer,vL as useToggle,hE as useWindowHeight,oL as useWindowScroll,va as useWindowSize,vE as useWindowWidth,Zg as userVariants,Sf as validateFile,dT as validators,Vb as virtualListVariants};//# sourceMappingURL=index.js.map
|
|
73
73
|
//# sourceMappingURL=index.js.map
|