@chaos_team/chaos-ui 1.0.5 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/README.md +11 -15
  3. package/dist/auth-layout-AqhdIh5N.d.cts +172 -0
  4. package/dist/auth-layout-AqhdIh5N.d.ts +172 -0
  5. package/dist/business.cjs +11 -9
  6. package/dist/business.d.cts +1015 -939
  7. package/dist/business.d.ts +1015 -939
  8. package/dist/business.js +11 -9
  9. package/dist/card-DY3pk0zA.d.cts +150 -0
  10. package/dist/card-DY3pk0zA.d.ts +150 -0
  11. package/dist/hooks.cjs +2 -2
  12. package/dist/hooks.d.cts +1 -1
  13. package/dist/hooks.d.ts +1 -1
  14. package/dist/hooks.js +2 -2
  15. package/dist/index.cjs +8 -1
  16. package/dist/index.d.cts +2089 -9
  17. package/dist/index.d.ts +2089 -9
  18. package/dist/index.js +8 -1
  19. package/dist/input-B39p_6ia.d.cts +40 -0
  20. package/dist/input-B39p_6ia.d.ts +40 -0
  21. package/dist/layout.cjs +12 -0
  22. package/dist/layout.d.cts +642 -0
  23. package/dist/layout.d.ts +642 -0
  24. package/dist/layout.js +12 -0
  25. package/dist/lib.d.cts +1 -1
  26. package/dist/lib.d.ts +1 -1
  27. package/dist/{message-KJli9tvf.d.cts → message-BoUedza5.d.cts} +1 -1
  28. package/dist/{message-KJli9tvf.d.ts → message-BoUedza5.d.ts} +1 -1
  29. package/dist/message-provider-Dt4mVwWP.d.cts +23 -0
  30. package/dist/message-provider-Dt4mVwWP.d.ts +23 -0
  31. package/dist/mobile-bottom-nav-Bi6_V5Bu.d.cts +18 -0
  32. package/dist/mobile-bottom-nav-Bi6_V5Bu.d.ts +18 -0
  33. package/dist/mobile-qrcode-scanner-BHDncd40.d.cts +327 -0
  34. package/dist/mobile-qrcode-scanner-a_Cz8tF5.d.ts +327 -0
  35. package/dist/mobile.cjs +6 -0
  36. package/dist/mobile.d.cts +101 -0
  37. package/dist/mobile.d.ts +101 -0
  38. package/dist/mobile.js +6 -0
  39. package/dist/next.cjs +1 -1
  40. package/dist/next.d.cts +5 -102
  41. package/dist/next.d.ts +5 -102
  42. package/dist/next.js +1 -1
  43. package/dist/top-bar-BYXz4LtM.d.cts +74 -0
  44. package/dist/top-bar-BYXz4LtM.d.ts +74 -0
  45. package/dist/ui/icons.cjs +1 -1
  46. package/dist/ui/icons.d.cts +1 -1
  47. package/dist/ui/icons.d.ts +1 -1
  48. package/dist/ui/icons.js +1 -1
  49. package/dist/ui-icons.cjs +1 -1
  50. package/dist/ui-icons.d.cts +24 -1
  51. package/dist/ui-icons.d.ts +24 -1
  52. package/dist/ui-icons.js +1 -1
  53. package/dist/ui.cjs +8 -1
  54. package/dist/ui.d.cts +7 -5
  55. package/dist/ui.d.ts +7 -5
  56. package/dist/ui.js +8 -1
  57. package/package.json +15 -5
  58. package/styles.css +11 -11
  59. package/dist/message-provider-BI-P3CNq.d.cts +0 -11
  60. package/dist/message-provider-BI-P3CNq.d.ts +0 -11
  61. package/dist/time-picker-H1AaecnE.d.cts +0 -452
  62. package/dist/time-picker-H1AaecnE.d.ts +0 -452
package/dist/ui.js CHANGED
@@ -3,4 +3,11 @@
3
3
  * Copyright (c) 2026 qxyfoods
4
4
  * MIT License
5
5
  */
6
- "use client";import{Accordion as or}from"@base-ui/react/accordion";import{clsx as Cc}from"clsx";import{twMerge as wc}from"tailwind-merge";function r(...e){return wc(Cc(e))}import*as i from"lucide-react";var st=i.AlertCircleIcon,bo=i.AlertTriangleIcon,Yx=i.ArchiveIcon,Qx=i.ArrowDownIcon,Zx=i.ArrowDownRightIcon,Jx=i.ArrowLeftIcon,eh=i.ArrowRight,th=i.ArrowRightIcon,oh=i.ArrowUpDownIcon,rh=i.ArrowUpIcon,nh=i.ArrowUpRightIcon,ah=i.BadgeDollarSignIcon,ih=i.BarChart3Icon,sh=i.BarcodeIcon,lh=i.BellIcon,ch=i.Bold,dh=i.BookOpen,uh=i.BookmarkCheckIcon,ph=i.BookmarkIcon,mh=i.Building2Icon,Kr=i.BuildingIcon;var fh=i.CalendarDaysIcon,gh=i.CalendarIcon,bh=i.CheckCircle2Icon,vo=i.CheckCircleIcon,ne=i.CheckIcon,le=i.ChevronDownIcon,Ze=i.ChevronLeftIcon,$=i.ChevronRightIcon,qr=i.ChevronUpIcon,vh=i.ChevronsUpDownIcon,Wr=i.CircleCheckIcon,xh=i.ClipboardListIcon,wi=i.ClockIcon,hh=i.Columns3Icon,yh=i.CookieIcon,Ph=i.CopyIcon,Ch=i.CreditCardIcon,wh=i.DollarSignIcon,Rh=i.DownloadIcon,Nh=i.EditIcon,Ih=i.Edit3Icon,kh=i.EyeIcon,Sh=i.EyeOffIcon,Th=i.FactoryIcon,Pt=i.FileIcon,Mh=i.FileSpreadsheetIcon,zh=i.FileTextIcon,Dh=i.FileXIcon,Lh=i.FilterIcon,Jo=i.FolderIcon,Fh=i.GalleryHorizontalEnd,Ah=i.GridIcon,Ri=i.GripVerticalIcon,Eh=i.Home,Bh=i.HomeIcon,Vh=i.ImageIcon,Hh=i.Inbox,Ni=i.InboxIcon,Ct=i.InfoIcon,Oh=i.Italic,Gh=i.KeyboardIcon,Uh=i.LanguagesIcon,_h=i.LayoutDashboardIcon,$h=i.LifeBuoyIcon,Kh=i.LinkIcon,qh=i.ListIcon,Ii=i.Loader2,ki=i.Loader2Icon,Wh=i.LockIcon,Xh=i.Mail,jh=i.MailIcon,Si=i.MaximizeIcon,Yh=i.MegaphoneIcon,Qh=i.MenuIcon,Zh=i.MessageSquareIcon,Ti=i.MinimizeIcon,Mi=i.MinusIcon,Jh=i.MonitorIcon,ey=i.MoonIcon,Xr=i.MoreHorizontalIcon,ty=i.MousePointerClickIcon,jr=i.OctagonXIcon,oy=i.PackageCheckIcon,ry=i.PackageIcon,zi=i.PanelLeftIcon,ny=i.PanelLeftCloseIcon,ay=i.PanelLeftOpenIcon,iy=i.PanelRightIcon,sy=i.PencilIcon,ly=i.PinIcon,cy=i.Plus,Di=i.PlusIcon,dy=i.PrinterIcon,uy=i.QrCodeIcon,py=i.RadioTowerIcon,my=i.RefreshCwIcon,fy=i.RotateCcwIcon,gy=i.Search,be=i.SearchIcon,by=i.SearchXIcon,Li=i.SendIcon,vy=i.ServerCrashIcon,xy=i.Settings,hy=i.SettingsIcon,yy=i.ShieldAlertIcon,Py=i.ShieldCheck,Cy=i.ShieldCheckIcon,wy=i.ShieldIcon,Ry=i.ShoppingCartIcon,Ny=i.SmartphoneIcon,Iy=i.Sparkles,Fi=i.StarIcon,ky=i.SunIcon,Sy=i.TableIcon,Ty=i.TagIcon,Ai=i.Trash2Icon,Ei=i.TrashIcon,Bi=i.TrendingDownIcon,Vi=i.TrendingUpIcon,Yr=i.TriangleAlertIcon,My=i.TrophyIcon,zy=i.TruckIcon,Dy=i.Underline,er=i.UploadIcon,Ly=i.User,_n=i.UserIcon,Fy=i.UsersIcon,Hi=i.WifiOffIcon,Ay=i.WrenchIcon,Ey=i.XCircleIcon,U=i.XIcon,By=i.ActivityIcon,Vy=i.AwardIcon,Hy=i.BanknoteIcon,Oy=i.BarChartIcon,Gy=i.CalculatorIcon,Uy=i.CameraIcon,_y=i.CircleIcon,$y=i.CoinsIcon,Ky=i.DotIcon,qy=i.DonutIcon,Wy=i.ExternalLinkIcon,Xy=i.FileEditIcon,jy=i.FilePlusIcon,Yy=i.FlagIcon,Qy=i.FolderOpenIcon,Zy=i.FunnelIcon,Jy=i.GanttChartIcon,eP=i.GoalIcon,tP=i.LayoutGridIcon,oP=i.LineChartIcon,rP=i.Link2Icon,nP=i.MapIcon,aP=i.MapPinIcon,iP=i.MapPinnedIcon,sP=i.MedalIcon,lP=i.MoreVerticalIcon,cP=i.PaperclipIcon,Qr=i.PauseIcon,dP=i.PieChartIcon,uP=i.PiggyBankIcon,Zr=i.PlayIcon,pP=i.ReceiptIcon,mP=i.RocketIcon,Oi=i.SaveIcon,fP=i.Share2Icon,Gi=i.SignatureIcon,gP=i.SquareIcon,bP=i.TargetIcon,vP=i.WalletIcon,xP=i.ZapIcon,hP=i.CarIcon,yP=i.GlobeIcon,PP=i.LayersIcon,CP=i.BrainIcon,Ui=i.ChevronsLeftIcon,_i=i.ChevronsRightIcon,wP=i.CodeIcon,RP=i.MicIcon,NP=i.SparklesIcon,IP=i.TerminalIcon,kP=i.ThumbsDownIcon,SP=i.ThumbsUpIcon,tr=i.Volume2Icon,TP=i.WandSparklesIcon,MP=i.BoldIcon,zP=i.ItalicIcon,DP=i.ListOrderedIcon,LP=i.QuoteIcon,$i=i.UndoIcon,FP=i.RedoIcon,AP=i.Heading1Icon,EP=i.Heading2Icon,BP=i.StrikethroughIcon,VP=i.ZoomInIcon,HP=i.ZoomOutIcon,OP=i.PipetteIcon;import{jsx as _t,jsxs as Sc}from"react/jsx-runtime";function Rc({className:e,...t}){return _t(or.Root,{"data-slot":"accordion",className:r("flex w-full flex-col",e),...t})}function Nc({className:e,...t}){return _t(or.Item,{"data-slot":"accordion-item",className:r("not-last:border-b",e),...t})}function Ic({className:e,children:t,...o}){return _t(or.Header,{className:"flex",children:Sc(or.Trigger,{"data-slot":"accordion-trigger",className:r("group/accordion-trigger focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:after:border-ring **:data-[slot=accordion-trigger-icon]:text-muted-foreground relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-3 aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4",e),...o,children:[t,_t(le,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"}),_t(qr,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"})]})})}function kc({className:e,children:t,...o}){return _t(or.Panel,{"data-slot":"accordion-content",className:"data-open:animate-accordion-down data-closed:animate-accordion-up overflow-hidden text-sm",...o,children:_t("div",{className:r("[&_a]:hover:text-foreground h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4",e),children:t})})}import"react";import{cva as Tc}from"class-variance-authority";import{jsx as Jr,jsxs as Lc}from"react/jsx-runtime";var Ki=Tc("relative w-full rounded-lg border px-4 py-3 text-sm grid items-center gap-3 grid-cols-[auto_minmax(0,1fr)] has-[>svg]:items-start has-[[data-slot=alert-title]]:items-start",{variants:{variant:{default:"bg-background text-foreground",info:"border-info/30 bg-info/10 text-info",success:"border-success/30 bg-success/10 text-success",warning:"border-warning/30 bg-warning/10 text-warning",destructive:"border-destructive/30 bg-destructive/10 text-destructive"}},defaultVariants:{variant:"default"}});function Mc({className:e,variant:t,icon:o,children:n,...a}){return Lc("div",{role:"alert","data-slot":"alert","data-variant":t,className:r(Ki({variant:t}),e),...a,children:[o&&Jr("div",{"data-slot":"alert-icon",className:"self-stretch flex items-center justify-center text-current [&>svg]:size-6 [&>svg]:stroke-[1.75]",children:o}),Jr("div",{"data-slot":"alert-content",className:"min-w-0",children:n})]})}function zc({className:e,...t}){return Jr("h5",{"data-slot":"alert-title",className:r("mb-1 leading-5 font-medium tracking-tight text-current",e),...t})}function Dc({className:e,...t}){return Jr("div",{"data-slot":"alert-description",className:r("text-sm leading-relaxed text-current/80 [&_p]:leading-relaxed",e),...t})}import"react";import"react";import{useTranslation as qi}from"react-i18next";import{Dialog as Je}from"@base-ui/react/dialog";import"react";import{Button as Fc}from"@base-ui/react/button";import{cva as Ac}from"class-variance-authority";import{Fragment as Ec,jsx as $n,jsxs as Bc}from"react/jsx-runtime";var $t=Ac("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function N({className:e,variant:t="default",size:o="default",icon:n,iconRight:a,children:s,...l}){let c=n!=null||a!=null;return $n(Fc,{"data-slot":"button",className:r($t({variant:t,size:o,className:e})),...l,children:c?Bc(Ec,{children:[n!=null&&$n("span",{"data-icon":"inline-start",className:"shrink-0",children:n}),s,a!=null&&$n("span",{"data-icon":"inline-end",className:"shrink-0",children:a})]}):s})}import{jsx as Pe,jsxs as en}from"react/jsx-runtime";function Ce({...e}){return Pe(Je.Root,{"data-slot":"dialog",...e})}function Ee({...e}){return Pe(Je.Trigger,{"data-slot":"dialog-trigger",...e})}function Wi({...e}){return Pe(Je.Portal,{"data-slot":"dialog-portal",...e})}function Vc({...e}){return Pe(Je.Close,{"data-slot":"dialog-close",...e})}function Xi({className:e,...t}){return Pe(Je.Backdrop,{"data-slot":"dialog-overlay",className:r("data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs",e),...t})}function we({className:e,children:t,showCloseButton:o=!0,...n}){let{t:a}=qi("ui");return en(Wi,{children:[Pe(Xi,{}),en(Je.Popup,{"data-slot":"dialog-content",className:r("bg-popover text-popover-foreground ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl p-4 text-sm ring-1 duration-100 outline-none sm:max-w-sm",e),...n,children:[t,o&&en(Je.Close,{"data-slot":"dialog-close",render:Pe(N,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[Pe(U,{}),Pe("span",{className:"sr-only",children:a("dialog.close")})]})]})]})}function Re({className:e,...t}){return Pe("div",{"data-slot":"dialog-header",className:r("flex flex-col gap-2",e),...t})}function rr({className:e,showCloseButton:t=!1,children:o,...n}){let{t:a}=qi("ui");return en("div",{"data-slot":"dialog-footer",className:r("bg-muted/50 -mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t p-4 sm:flex-row sm:justify-end",e),...n,children:[o,t&&Pe(Je.Close,{render:Pe(N,{variant:"outline"}),children:a("dialog.closeButton")})]})}function Ne({className:e,...t}){return Pe(Je.Title,{"data-slot":"dialog-title",className:r("font-heading text-base leading-none font-medium",e),...t})}function Kt({className:e,...t}){return Pe(Je.Description,{"data-slot":"dialog-description",className:r("text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3",e),...t})}function Hc({className:e,...t}){return Pe("div",{"data-slot":"dialog-body",className:r("flex flex-col gap-3 py-4",e),...t})}import{jsx as lt}from"react/jsx-runtime";function Oc(e){return lt(Ce,{...e})}function Gc(e){return lt(Ee,{...e})}function Uc({className:e,...t}){return lt(we,{className:r("max-w-md",e),...t})}function _c(e){return lt(Re,{...e})}function $c(e){return lt(Ne,{...e})}function Kc(e){return lt(Kt,{...e})}function qc(e){return lt(rr,{...e})}function Wc({className:e,...t}){return lt(N,{className:e,...t})}function Xc({className:e,...t}){return lt(N,{variant:"outline",className:e,...t})}import"react";import{jsx as Yc}from"react/jsx-runtime";function jc({ratio:e=16/9,className:t,style:o,...n}){return Yc("div",{"data-slot":"aspect-ratio",style:{aspectRatio:e,...o},className:r("relative w-full overflow-hidden",t),...n})}import*as ce from"react";import{jsx as Be,jsxs as tn}from"react/jsx-runtime";function Qc({src:e,autoPlay:t,showVolume:o=!0,showSpeed:n,className:a,onEnded:s,onPlay:l,onPause:c}){let d=ce.useRef(null),[m,f]=ce.useState(!1),[p,u]=ce.useState(0),[g,b]=ce.useState(0),[v,y]=ce.useState(1),[h,P]=ce.useState(!1),[w,x]=ce.useState(1),C=ce.useCallback(()=>{let I=d.current;I&&(I.paused?(I.play(),l?.()):(I.pause(),c?.()))},[l,c]),R=ce.useCallback(()=>{let I=d.current;I&&u(I.currentTime)},[]),T=ce.useCallback(()=>{let I=d.current;I&&b(I.duration)},[]),k=ce.useCallback(I=>{let L=d.current;L&&(L.currentTime=Number(I.target.value),u(L.currentTime))},[]),S=ce.useCallback(I=>{let L=Number(I.target.value),z=d.current;z&&(z.volume=L,z.muted=L===0),y(L),P(L===0)},[]),M=ce.useCallback(()=>{let I=d.current;I&&(I.muted=!I.muted,P(I.muted))},[]),G=ce.useCallback(I=>{let L=d.current;L&&(L.playbackRate=I),x(I)},[]),Q=I=>{let L=Math.floor(I/60),z=Math.floor(I%60);return`${L}:${z.toString().padStart(2,"0")}`},F=[.5,.75,1,1.25,1.5,2];return tn("div",{"data-slot":"audio-player",className:r("bg-card flex items-center gap-2 rounded-lg border p-3",a),children:[Be("audio",{ref:d,src:e,autoPlay:t,onTimeUpdate:R,onLoadedMetadata:T,onPlay:()=>f(!0),onPause:()=>f(!1),onEnded:s}),Be(N,{variant:"ghost",size:"icon-sm",onClick:C,"aria-label":m?"Pause":"Play",children:m?Be(Qr,{}):Be(Zr,{})}),tn("div",{className:"flex flex-1 items-center gap-2",children:[Be("span",{className:"text-muted-foreground w-10 text-right text-xs tabular-nums",children:Q(p)}),Be("input",{type:"range",min:0,max:g||0,value:p,className:"accent-primary h-1 flex-1",onChange:k}),Be("span",{className:"text-muted-foreground w-10 text-xs tabular-nums",children:Q(g)})]}),o&&tn("div",{className:"flex items-center gap-1",children:[Be(N,{variant:"ghost",size:"icon-xs",onClick:M,"aria-label":h?"Unmute":"Mute",children:h||v===0?Be(tr,{className:"text-muted-foreground"}):Be(tr,{})}),Be("input",{type:"range",min:0,max:1,step:.05,value:h?0:v,className:"accent-primary h-1 w-16",onChange:S})]}),n&&Be("select",{value:w,onChange:I=>G(Number(I.target.value)),className:"bg-background rounded border px-1.5 py-0.5 text-xs",children:F.map(I=>tn("option",{value:I,children:[I,"x"]},I))})]})}import*as de from"react";import{jsx as Ge,jsxs as nr}from"react/jsx-runtime";function Zc({src:e,poster:t,autoPlay:o,showControls:n=!0,className:a,onEnded:s,onPlay:l,onPause:c}){let d=de.useRef(null),[m,f]=de.useState(!1),[p,u]=de.useState(0),[g,b]=de.useState(0),[v,y]=de.useState(1),[h,P]=de.useState(!1),[w,x]=de.useState(!1),C=de.useCallback(()=>{let F=d.current;F&&(F.paused?(F.play(),l?.()):(F.pause(),c?.()))},[l,c]),R=de.useCallback(()=>{let F=d.current;F&&u(F.currentTime)},[]),T=de.useCallback(()=>{let F=d.current;F&&b(F.duration)},[]),k=de.useCallback(F=>{let I=d.current;I&&(I.currentTime=Number(F.target.value),u(I.currentTime))},[]),S=de.useCallback(F=>{let I=Number(F.target.value),L=d.current;L&&(L.volume=I,L.muted=I===0),y(I),P(I===0)},[]),M=de.useCallback(()=>{let F=d.current;F&&(F.muted=!F.muted,P(F.muted))},[]),G=de.useCallback(()=>{let F=d.current;F&&(document.fullscreenElement?document.exitFullscreen():F.requestFullscreen())},[]),Q=F=>{let I=Math.floor(F/60),L=Math.floor(F%60);return`${I}:${L.toString().padStart(2,"0")}`};return nr("div",{"data-slot":"video-player",className:r("group relative overflow-hidden rounded-lg bg-black",a),onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:[Ge("video",{ref:d,src:e,poster:t,autoPlay:o,className:"w-full",onTimeUpdate:R,onLoadedMetadata:T,onPlay:()=>f(!0),onPause:()=>f(!1),onEnded:s,onClick:C}),n&&nr("div",{className:r("absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/80 to-transparent p-3 pt-8 transition-opacity",!m||w?"opacity-100":"opacity-0"),children:[Ge("input",{type:"range",min:0,max:g||0,value:p,className:"accent-primary mb-2 h-1 w-full",onChange:k}),nr("div",{className:"flex items-center gap-2",children:[Ge(N,{variant:"ghost",size:"icon-sm",onClick:C,"aria-label":m?"Pause":"Play",className:"text-white hover:text-white",children:m?Ge(Qr,{}):Ge(Zr,{})}),nr("div",{className:"flex items-center gap-1",children:[Ge(N,{variant:"ghost",size:"icon-xs",onClick:M,"aria-label":h?"Unmute":"Mute",className:"text-white hover:text-white",children:Ge(tr,{className:h?"text-muted-foreground":""})}),Ge("input",{type:"range",min:0,max:1,step:.05,value:h?0:v,className:"accent-primary h-1 w-16",onChange:S})]}),nr("span",{className:"ml-auto text-xs text-white/80 tabular-nums",children:[Q(p)," / ",Q(g)]}),Ge(N,{variant:"ghost",size:"icon-xs",onClick:G,"aria-label":"Fullscreen",className:"text-white hover:text-white",children:Ge("svg",{className:"size-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:Ge("path",{d:"M8 3H5a2 2 0 00-2 2v3m18 0V5a2 2 0 00-2-2h-3m0 18h3a2 2 0 002-2v-3M3 16v3a2 2 0 002 2h3"})})})]})]})]})}import"react";import{Avatar as Kn}from"@base-ui/react/avatar";import{jsx as xo}from"react/jsx-runtime";function on({className:e,size:t="default",fontSize:o,...n}){return xo(Kn.Root,{"data-slot":"avatar","data-size":t,className:r("group/avatar after:border-border relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",e),style:o?{fontSize:typeof o=="number"?`${o}px`:o}:void 0,...n})}function rn({className:e,...t}){return xo(Kn.Image,{"data-slot":"avatar-image",className:r("aspect-square size-full rounded-full object-cover",e),...t})}function nn({className:e,...t}){return xo(Kn.Fallback,{"data-slot":"avatar-fallback",className:r("bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-sm group-data-[size=sm]/avatar:text-xs",e),...t})}function Jc({className:e,...t}){return xo("span",{"data-slot":"avatar-badge",className:r("bg-primary text-primary-foreground ring-background absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-blend-color ring-2 select-none","group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden","group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2","group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",e),...t})}function ed({className:e,...t}){return xo("div",{"data-slot":"avatar-group",className:r("group/avatar-group *:data-[slot=avatar]:ring-background flex -space-x-2 *:data-[slot=avatar]:ring-2",e),...t})}function td({className:e,...t}){return xo("div",{"data-slot":"avatar-group-count",className:r("bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0 items-center justify-center rounded-full text-sm ring-2 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",e),...t})}import{mergeProps as od}from"@base-ui/react/merge-props";import{useRender as rd}from"@base-ui/react/use-render";import{cva as nd}from"class-variance-authority";var ji=nd("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function et({className:e,variant:t="default",render:o,...n}){return rd({defaultTagName:"span",props:od({className:r(ji({variant:t}),e)},n),render:o,state:{slot:"badge",variant:t}})}import"react";import{useTranslation as Yi}from"react-i18next";import{mergeProps as ad}from"@base-ui/react/merge-props";import{useRender as id}from"@base-ui/react/use-render";import{jsx as wt,jsxs as fd}from"react/jsx-runtime";function sd({className:e,...t}){let{t:o}=Yi("ui");return wt("nav",{"aria-label":o("breadcrumb.navLabel"),"data-slot":"breadcrumb",className:r(e),...t})}function ld({className:e,...t}){return wt("ol",{"data-slot":"breadcrumb-list",className:r("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm wrap-break-word",e),...t})}function cd({className:e,...t}){return wt("li",{"data-slot":"breadcrumb-item",className:r("inline-flex items-center gap-1",e),...t})}function dd({className:e,render:t,...o}){return id({defaultTagName:"a",props:ad({className:r("cursor-pointer transition-colors hover:text-foreground",e)},o),render:t,state:{slot:"breadcrumb-link"}})}function ud({className:e,...t}){return wt("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:r("text-foreground font-normal",e),...t})}function pd({children:e,className:t,...o}){return wt("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:r("[&>svg]:size-3.5",t),...o,children:e??wt($,{})})}function md({className:e,...t}){let{t:o}=Yi("ui");return fd("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:r("flex size-5 items-center justify-center [&>svg]:size-4",e),...t,children:[wt(Xr,{}),wt("span",{className:"sr-only",children:o("breadcrumb.more")})]})}import*as Qi from"react";import{jsx as qn,jsxs as vd}from"react/jsx-runtime";function gd(e){let t=[];for(let o=0;o<e.length;o++){let n=e.charCodeAt(o);t.push(2+n%3),t.push(1+(n>>2)%2)}return[2,1,...t,2,1]}function bd({value:e,height:t=48,showText:o=!0,barWidth:n=2,className:a,...s}){let l=Qi.useMemo(()=>gd(e),[e]);return vd("div",{"data-slot":"barcode-display",className:r("inline-flex flex-col items-center gap-1",a),...s,children:[qn("div",{className:"flex items-end",style:{height:t},role:"img","aria-label":`Barcode: ${e}`,children:l.map((c,d)=>qn("div",{className:d%2===0?"bg-foreground":"bg-transparent",style:{width:c*n,height:"100%"}},d))}),o&&qn("span",{className:"text-muted-foreground font-mono text-xs tracking-wider",children:e})]})}import*as Zi from"react";import{useTranslation as yd}from"react-i18next";import{cva as Pd}from"class-variance-authority";import"react";import{Input as xd}from"@base-ui/react/input";import{jsx as hd}from"react/jsx-runtime";function _({className:e,type:t,...o}){return hd(xd,{type:t,"data-slot":"input",className:r("border-input file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 h-8 w-full min-w-0 rounded-lg border bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-3 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 md:text-sm",e),...o})}import{jsx as ar,jsxs as Wn}from"react/jsx-runtime";var Ji=Pd("flex items-center gap-2 rounded-lg border border-input bg-transparent transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",{variants:{size:{default:"h-8",sm:"h-7",lg:"h-9"}},defaultVariants:{size:"default"}});function Cd({className:e,size:t,value:o,defaultValue:n,placeholder:a,disabled:s,readOnly:l,required:c,"aria-invalid":d,onBrowse:m,onChange:f,onClear:p,showClearButton:u=!0,showBrowseButton:g=!0,...b}){let{t:v}=yd("ui"),y=a??v("browseInput.placeholder"),[h,P]=Zi.useState(n||""),w=o??h,x=R=>{let T=R.target.value;P(T),f?.(T)},C=()=>{P(""),f?.(""),p?.()};return Wn("div",{"data-slot":"browse-input","data-size":t,className:r(Ji({size:t,className:e})),"aria-invalid":d,...b,children:[ar(_,{value:w,onChange:x,placeholder:y,disabled:s,readOnly:l,required:c,className:"h-full border-0 bg-transparent focus-visible:ring-0"}),u&&w&&!s&&!l&&Wn(N,{variant:"ghost",size:"icon-xs",onClick:C,className:"mr-1 shrink-0",tabIndex:-1,children:[ar(U,{className:"size-3"}),ar("span",{className:"sr-only",children:v("browseInput.clear")})]}),g&&Wn(N,{variant:"ghost",size:"icon-xs",onClick:m,disabled:s,className:"mr-1 shrink-0",tabIndex:-1,children:[ar(be,{className:"size-3"}),ar("span",{className:"sr-only",children:v("browseInput.browse")})]})]})}import*as an from"react";import{DayPicker as wd,getDefaultClassNames as es}from"react-day-picker";import{jsx as ct}from"react/jsx-runtime";function Xn({className:e,classNames:t,showOutsideDays:o=!0,captionLayout:n="label",buttonVariant:a="ghost",locale:s,formatters:l,components:c,...d}){let m=es();return ct(wd,{showOutsideDays:o,className:r("group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:n,locale:s,formatters:{formatMonthDropdown:f=>f.toLocaleString(s?.code,{month:"short"}),...l},classNames:{root:r("w-fit",m.root),months:r("relative flex flex-col gap-4 md:flex-row",m.months),month:r("flex w-full flex-col gap-4",m.month),nav:r("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",m.nav),button_previous:r($t({variant:a}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",m.button_previous),button_next:r($t({variant:a}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",m.button_next),month_caption:r("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",m.month_caption),dropdowns:r("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",m.dropdowns),dropdown_root:r("relative rounded-(--cell-radius)",m.dropdown_root),dropdown:r("absolute inset-0 bg-popover opacity-0",m.dropdown),caption_label:r("font-medium select-none",n==="label"?"text-sm":"flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",m.caption_label),weekdays:r("flex",m.weekdays),weekday:r("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none",m.weekday),week:r("mt-2 flex w-full",m.week),week_number_header:r("w-(--cell-size) select-none",m.week_number_header),week_number:r("text-[0.8rem] text-muted-foreground select-none",m.week_number),day:r("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",d.showWeekNumber?"[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)":"[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",m.day),range_start:r("relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted",m.range_start),range_middle:r("rounded-none",m.range_middle),range_end:r("relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted",m.range_end),today:r("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none",m.today),outside:r("text-muted-foreground aria-selected:text-muted-foreground",m.outside),disabled:r("text-muted-foreground opacity-50",m.disabled),hidden:r("invisible",m.hidden),...t},components:{Root:({className:f,rootRef:p,...u})=>ct("div",{"data-slot":"calendar",ref:p,className:r(f),...u}),Chevron:({className:f,orientation:p,...u})=>p==="left"?ct(Ze,{className:r("size-4",f),...u}):p==="right"?ct($,{className:r("size-4",f),...u}):ct(le,{className:r("size-4",f),...u}),DayButton:({...f})=>ct(ts,{...s!==void 0?{locale:s}:{},...f}),WeekNumber:({children:f,...p})=>ct("td",{...p,children:ct("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:f})}),...c},...d})}function ts({className:e,day:t,modifiers:o,locale:n,...a}){let s=es(),l=an.useRef(null);return an.useEffect(()=>{o.focused&&l.current?.focus()},[o.focused]),ct(N,{variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(n?.code),"data-selected-single":o.selected&&!o.range_start&&!o.range_end&&!o.range_middle,"data-range-start":o.range_start,"data-range-end":o.range_end,"data-range-middle":o.range_middle,className:r("group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) [&>span]:text-xs [&>span]:opacity-70",s.day,e),...a})}import"react";import{jsx as dt,jsxs as os}from"react/jsx-runtime";function jn({className:e,size:t="default",flush:o,...n}){return dt("div",{"data-slot":"card","data-size":t,...o?{"data-flush":""}:{},className:r("group/card bg-card text-card-foreground ring-foreground/10 flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl py-(--card-spacing) text-sm ring-1 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...n})}function Yn({className:e,...t}){return dt("div",{"data-slot":"card-header",className:r("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...t})}function Qn({className:e,size:t,...o}){return dt("div",{"data-slot":"card-title",className:r("font-heading leading-snug font-medium",t==="sm"?"text-sm":"text-base group-data-[size=sm]/card:text-sm",e),...o})}function Zn({className:e,...t}){return dt("div",{"data-slot":"card-description",className:r("text-muted-foreground text-sm",e),...t})}function Rd({className:e,...t}){return dt("div",{"data-slot":"card-action",className:r("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function Jn({className:e,flush:t,...o}){return dt("div",{"data-slot":"card-content",className:r(t?"":"px-(--card-spacing)","group-data-[flush]/card:px-0",e),...o})}function ea({className:e,...t}){return dt("div",{"data-slot":"card-footer",className:r("bg-muted/50 flex items-center rounded-b-xl border-t p-(--card-spacing)",e),...t})}function Nd({className:e,title:t,actions:o,children:n,...a}){return os("div",{"data-slot":"card-section",className:r("border-border border-b last:border-b-0",e),...a,children:[t!=null||o!=null?os("div",{className:"flex items-center justify-between px-3 py-2",children:[dt("span",{className:"text-sm font-semibold",children:t}),o&&dt("div",{className:"flex items-center gap-2",children:o})]}):null,n]})}import*as ve from"react";import{useTranslation as ta}from"react-i18next";import{jsx as Ue,jsxs as ns}from"react/jsx-runtime";var rs=ve.createContext(null);function ir(){let e=ve.useContext(rs);if(!e)throw new Error("Carousel components must be used within Carousel");return e}function Id({defaultIndex:e=0,loop:t=!0,autoplay:o=!1,interval:n=5e3,onIndexChange:a,className:s,children:l,...c}){let[d,m]=ve.useState(0),[f,p]=ve.useState(e),u=ve.useCallback(v=>{if(d<=0)return;let y=t?(v%d+d)%d:Math.min(Math.max(0,v),d-1);p(y),a?.(y)},[t,d,a]),g=ve.useCallback(()=>u(f+1),[u,f]),b=ve.useCallback(()=>u(f-1),[u,f]);return ve.useEffect(()=>{if(!o)return;let v=setInterval(g,n);return()=>clearInterval(v)},[o,n,g]),Ue(rs.Provider,{value:{index:f,total:d,goTo:u,next:g,prev:b,loop:t,setTotal:m},children:Ue("div",{"data-slot":"carousel",className:r("relative w-full",s),onKeyDown:v=>{v.key==="ArrowLeft"&&b(),v.key==="ArrowRight"&&g()},tabIndex:0,...c,children:l})})}function kd({className:e,children:t,...o}){let{total:n,index:a,setTotal:s}=ir(),l=ve.Children.count(t);return ve.useEffect(()=>{s(l)},[l,s]),Ue("div",{className:"overflow-hidden",children:Ue("div",{"data-slot":"carousel-content",className:r("flex transition-transform duration-300 ease-out",e),style:{transform:`translateX(-${n>0?a*100/n:0}%)`},...o,children:t})})}function Sd({className:e,...t}){let{total:o}=ir();return Ue("div",{"data-slot":"carousel-item",className:r("shrink-0 grow-0 basis-full",e),style:{width:`${o>0?100/o:100}%`},...t})}function Td({className:e,...t}){let{t:o}=ta("ui"),{prev:n}=ir();return ns(N,{"data-slot":"carousel-previous",variant:"outline",size:"icon",onClick:n,className:r("absolute top-1/2 left-2 z-10 -translate-y-1/2 rounded-full",e),...t,children:[Ue(Ze,{}),Ue("span",{className:"sr-only",children:o("carousel.previous")})]})}function Md({className:e,...t}){let{t:o}=ta("ui"),{next:n}=ir();return ns(N,{"data-slot":"carousel-next",variant:"outline",size:"icon",onClick:n,className:r("absolute top-1/2 right-2 z-10 -translate-y-1/2 rounded-full",e),...t,children:[Ue($,{}),Ue("span",{className:"sr-only",children:o("carousel.next")})]})}function zd({className:e,...t}){let{t:o}=ta("ui"),{total:n,index:a,goTo:s}=ir();return Ue("div",{"data-slot":"carousel-dots",className:r("absolute bottom-3 left-1/2 z-10 flex -translate-x-1/2 gap-1",e),...t,children:Array.from({length:n}).map((l,c)=>Ue("button",{type:"button",onClick:()=>s(c),"aria-label":o("carousel.goToSlide",{count:c+1}),className:r("size-2 rounded-full transition-colors",c===a?"bg-primary":"bg-primary/30 hover:bg-primary/50")},c))})}import{Checkbox as as}from"@base-ui/react/checkbox";import{jsx as oa}from"react/jsx-runtime";function De({className:e,...t}){return oa(as.Root,{"data-slot":"checkbox",className:r("peer border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3",e),...t,children:oa(as.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:oa(ne,{})})})}import{Collapsible as ra}from"@base-ui/react/collapsible";import{jsx as sa}from"react/jsx-runtime";function na({...e}){return sa(ra.Root,{"data-slot":"collapsible",...e})}function aa({...e}){return sa(ra.Trigger,{"data-slot":"collapsible-trigger",...e})}function ia({...e}){return sa(ra.Panel,{"data-slot":"collapsible-content",...e})}import{HexColorPicker as Ld,HexColorInput as Fd}from"react-colorful";import"react";import{Popover as qt}from"@base-ui/react/popover";import{jsx as Rt}from"react/jsx-runtime";function ue({...e}){return Rt(qt.Root,{"data-slot":"popover",...e})}function pe({...e}){return Rt(qt.Trigger,{"data-slot":"popover-trigger",...e})}function me({className:e,align:t="center",alignOffset:o=0,side:n="bottom",sideOffset:a=4,...s}){return Rt(qt.Portal,{children:Rt(qt.Positioner,{align:t,alignOffset:o,side:n,sideOffset:a,className:"isolate z-50",children:Rt(qt.Popup,{"data-slot":"popover-content",className:r("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg p-2.5 text-sm shadow-md ring-1 outline-hidden duration-100",e),...s})})})}function Dd({className:e,...t}){return Rt("div",{"data-slot":"popover-header",className:r("flex flex-col gap-0.5 text-sm",e),...t})}function la({className:e,...t}){return Rt(qt.Title,{"data-slot":"popover-title",className:r("font-medium",e),...t})}function ca({className:e,...t}){return Rt(qt.Description,{"data-slot":"popover-description",className:r("text-muted-foreground",e),...t})}import{jsx as Nt,jsxs as da}from"react/jsx-runtime";var Ad=["#ef4444","#f97316","#eab308","#22c55e","#14b8a6","#3b82f6","#6366f1","#a855f7","#ec4899","#6b7280"];function Ed({value:e="#000000",onChange:t,presets:o=Ad,className:n}){return da(ue,{"data-slot":"color-picker",children:[Nt(pe,{className:r("border-input inline-flex h-10 w-10 items-center justify-center rounded-md border-2 bg-transparent",n),children:Nt("div",{className:"size-6 rounded-sm",style:{backgroundColor:e}})}),Nt(me,{className:"w-auto p-3",children:da("div",{className:"space-y-3",children:[Nt(Ld,{color:e,onChange:t??(()=>{}),style:{width:"100%",height:160}}),da("div",{className:"flex items-center gap-2",children:[Nt("span",{className:"text-muted-foreground text-xs",children:"#"}),Nt(Fd,{color:e,onChange:t??(()=>{}),className:"border-input flex h-8 w-full rounded-md border bg-transparent px-2 text-sm",prefixed:!0})]}),o&&o.length>0&&Nt("div",{className:"flex flex-wrap gap-1.5",children:o.map(a=>Nt("button",{type:"button",className:r("size-6 rounded-md border transition-transform hover:scale-110",e===a&&"ring-primary ring-2 ring-offset-1"),style:{backgroundColor:a},onClick:()=>t?.(a)},a))})]})})]})}import"react";import{useTranslation as $d}from"react-i18next";import{Command as Xt}from"cmdk";import"react";import{cva as is}from"class-variance-authority";import"react";import{jsx as Bd}from"react/jsx-runtime";function Wt({className:e,...t}){return Bd("textarea",{"data-slot":"textarea",className:r("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 flex field-sizing-content min-h-16 w-full rounded-lg border bg-transparent px-2.5 py-2 text-base transition-colors outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 md:text-sm",e),...t})}import{jsx as ho}from"react/jsx-runtime";function ua({className:e,...t}){return ho("div",{"data-slot":"input-group",role:"group",className:r("group/input-group border-input has-disabled:bg-input/50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 relative flex h-8 w-full min-w-0 items-center rounded-lg border transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-3 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...t})}var Vd=is("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function pa({className:e,align:t="inline-start",...o}){return ho("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:r(Vd({align:t}),e),onClick:n=>{n.target.closest("button")||n.currentTarget.parentElement?.querySelector("input")?.focus()},...o})}var Hd=is("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function Od({className:e,type:t="button",variant:o="ghost",size:n="xs",...a}){return ho(N,{type:t,"data-size":n,variant:o,className:r(Hd({size:n}),e),...a})}function Gd({className:e,...t}){return ho("span",{className:r("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...t})}function Ud({className:e,...t}){return ho(_,{"data-slot":"input-group-control",className:r("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",e),...t})}function _d({className:e,...t}){return ho(Wt,{"data-slot":"input-group-control",className:r("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",e),...t})}import{jsx as Se,jsxs as sn}from"react/jsx-runtime";function ma({className:e,...t}){return Se(Xt,{"data-slot":"command",className:r("bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-xl! p-1",e),...t})}function fa({title:e,description:t,children:o,className:n,showCloseButton:a=!1,...s}){let{t:l}=$d("ui"),c=e??l("commandDialog.title"),d=t??l("commandDialog.description");return sn(Ce,{...s,children:[sn(Re,{className:"sr-only",children:[Se(Ne,{children:c}),Se(Kt,{children:d})]}),Se(we,{className:r("top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0",n),showCloseButton:a,children:o})]})}function sr({className:e,...t}){return Se("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:sn(ua,{className:"border-input/30 bg-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[Se(Xt.Input,{"data-slot":"command-input",className:r("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t}),Se(pa,{children:Se(be,{className:"size-4 shrink-0 opacity-50"})})]})})}function lr({className:e,...t}){return Se(Xt.List,{"data-slot":"command-list",className:r("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",e),...t})}function cr({className:e,...t}){return Se(Xt.Empty,{"data-slot":"command-empty",className:r("py-6 text-center text-sm",e),...t})}function yo({className:e,...t}){return Se(Xt.Group,{"data-slot":"command-group",className:r("text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium",e),...t})}function Kd({className:e,...t}){return Se(Xt.Separator,{"data-slot":"command-separator",className:r("bg-border -mx-1 h-px",e),...t})}function Po({className:e,children:t,...o}){return sn(Xt.Item,{"data-slot":"command-item",className:r("group/command-item data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[t,Se(ne,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}function qd({className:e,...t}){return Se("span",{"data-slot":"command-shortcut",className:r("text-muted-foreground group-data-selected/command-item:text-foreground ml-auto text-xs tracking-widest",e),...t})}import{ContextMenu as xe}from"@base-ui/react/context-menu";import{jsx as ee,jsxs as ga}from"react/jsx-runtime";function Wd({...e}){return ee(xe.Root,{"data-slot":"context-menu",...e})}function Xd({...e}){return ee(xe.Trigger,{"data-slot":"context-menu-trigger",...e})}function ss({...e}){return ee(xe.Portal,{"data-slot":"context-menu-portal",...e})}function ls({align:e="start",alignOffset:t=0,side:o="right",sideOffset:n=0,className:a,...s}){return ee(ss,{children:ee(xe.Positioner,{align:e,alignOffset:t,side:o,sideOffset:n,className:"isolate z-50 outline-none",children:ee(xe.Popup,{"data-slot":"context-menu-content",className:r("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 outline-none",a),...s})})})}function jd({...e}){return ee(xe.Group,{"data-slot":"context-menu-group",...e})}function Yd({className:e,inset:t,...o}){return ee(xe.GroupLabel,{"data-slot":"context-menu-label","data-inset":t,className:r("text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:pl-7",e),...o})}function Qd({className:e,inset:t,variant:o="default",...n}){return ee(xe.Item,{"data-slot":"context-menu-item","data-inset":t,"data-variant":o,className:r("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n})}function Zd({...e}){return ee(xe.SubmenuRoot,{"data-slot":"context-menu-sub",...e})}function Jd({className:e,inset:t,children:o,...n}){return ga(xe.SubmenuTrigger,{"data-slot":"context-menu-sub-trigger","data-inset":t,className:r("focus:bg-accent focus:text-accent-foreground data-popup-open:bg-accent data-popup-open:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[o,ee($,{className:"ml-auto"})]})}function eu({className:e,...t}){return ee(ls,{"data-slot":"context-menu-sub-content",sideOffset:4,className:r("min-w-[160px]",e),...t})}function tu({className:e,children:t,checked:o,inset:n,...a}){return ga(xe.CheckboxItem,{"data-slot":"context-menu-checkbox-item","data-inset":n,className:r("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:o,...a,children:[ee("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center",children:ee(xe.CheckboxItemIndicator,{children:ee(ne,{})})}),t]})}function ou({...e}){return ee(xe.RadioGroup,{"data-slot":"context-menu-radio-group",...e})}function ru({className:e,children:t,inset:o,...n}){return ga(xe.RadioItem,{"data-slot":"context-menu-radio-item","data-inset":o,className:r("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[ee("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center",children:ee(xe.RadioItemIndicator,{children:ee(ne,{})})}),t]})}function nu({className:e,...t}){return ee(xe.Separator,{"data-slot":"context-menu-separator",className:r("bg-border -mx-1 my-1 h-px",e),...t})}import*as ut from"react";import{ScrollArea as dr}from"@base-ui/react/scroll-area";import{jsx as ur,jsxs as au}from"react/jsx-runtime";function jt({className:e,children:t,...o}){return au(dr.Root,{"data-slot":"scroll-area",className:r("relative",e),...o,children:[ur(dr.Viewport,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),ur(cs,{}),ur(dr.Corner,{})]})}function cs({className:e,orientation:t="vertical",...o}){return ur(dr.Scrollbar,{"data-slot":"scroll-area-scrollbar","data-orientation":t,orientation:t,className:r("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",e),...o,children:ur(dr.Thumb,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}import{jsx as K,jsxs as Ie}from"react/jsx-runtime";var iu=[{id:"1",name:"Head Office",code:"HQ",children:[{id:"1-1",name:"Engineering",code:"ENG",parentId:"1",children:[{id:"1-1-1",name:"Frontend",code:"FE",parentId:"1-1"},{id:"1-1-2",name:"Backend",code:"BE",parentId:"1-1"},{id:"1-1-3",name:"DevOps",code:"DO",parentId:"1-1"}]},{id:"1-2",name:"Design",code:"DES",parentId:"1",children:[{id:"1-2-1",name:"UI Design",code:"UI",parentId:"1-2"},{id:"1-2-2",name:"UX Research",code:"UX",parentId:"1-2"}]},{id:"1-3",name:"Marketing",code:"MKT",parentId:"1"},{id:"1-4",name:"Sales",code:"SAL",parentId:"1"}]}];function ds({department:e,selectedIds:t,onSelect:o,level:n=0}){let[a,s]=ut.useState(n<2),l=e.children&&e.children.length>0,c=t.has(e.id);return Ie("div",{children:[Ie("div",{className:r("hover:bg-muted flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5",c&&"bg-muted"),style:{paddingLeft:`${n*16+8}px`},onClick:()=>o(e),children:[l?K(N,{variant:"ghost",size:"icon-xs",onClick:d=>{d.stopPropagation(),s(!a)},className:"shrink-0",children:K($,{className:r("size-3 transition-transform",a&&"rotate-90")})}):K("div",{className:"size-4"}),K(De,{checked:c}),K(Kr,{className:"text-muted-foreground size-4"}),Ie("div",{className:"min-w-0 flex-1",children:[K("p",{className:"truncate text-sm font-medium",children:e.name}),e.code&&K("p",{className:"text-muted-foreground text-xs",children:e.code})]})]}),l&&a&&K("div",{children:e.children.map(d=>K(ds,{department:d,selectedIds:t,onSelect:o,level:n+1},d.id))})]})}function su({value:e,defaultValue:t,placeholder:o="Select department...",disabled:n,multiple:a=!1,maxCount:s,departments:l=iu,onChange:c,className:d}){let[m,f]=ut.useState(!1),[p,u]=ut.useState(""),[g,b]=ut.useState(Array.isArray(t)?t:t?[t]:[]),v=ut.useMemo(()=>e!==void 0?Array.isArray(e)?e:[e]:g,[e,g]),y=ut.useMemo(()=>new Set(v.map(C=>C.id)),[v]),h=ut.useMemo(()=>{if(!p)return l;let C=p.toLowerCase(),R=T=>T.reduce((k,S)=>{let M=S.name.toLowerCase().includes(C)||S.code?.toLowerCase().includes(C),G=S.children?R(S.children):[];return(M||G.length>0)&&k.push({...S,children:G.length>0?G:S.children??[]}),k},[]);return R(l)},[l,p]),P=C=>{let R;a?R=v.some(k=>k.id===C.id)?v.filter(k=>k.id!==C.id):[...v,C]:(R=[C],f(!1)),b(R),c?.(a?R:R[0])},w=C=>{let R=v.filter(T=>T.id!==C);b(R),c?.(a?R:R[0])},x=C=>{C.stopPropagation(),b([]),c?.(a?[]:void 0)};return K("div",{"data-slot":"department-browse",className:r("w-full",d),children:Ie(Ce,{open:m,onOpenChange:f,children:[Ie(Ee,{render:K("div",{className:r("border-input flex min-h-8 w-full items-center gap-1 rounded-lg border bg-transparent px-2.5 py-1 text-sm transition-colors","focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-3","disabled:cursor-not-allowed disabled:opacity-50","dark:bg-input/30",n&&"cursor-not-allowed opacity-50")}),disabled:n,children:[v.length>0?K("div",{className:"flex flex-1 flex-wrap gap-1",children:v.map(C=>Ie(et,{variant:"secondary",className:"gap-1",children:[K(Kr,{className:"size-3"}),K("span",{children:C.name}),!n&&Ie("button",{onClick:R=>{R.stopPropagation(),w(C.id)},className:"hover:bg-muted ml-0.5 rounded-full",children:[K(U,{className:"size-3"}),K("span",{className:"sr-only",children:"Remove"})]})]},C.id))}):K("span",{className:"text-muted-foreground flex-1",children:o}),v.length>0&&!n&&Ie(N,{variant:"ghost",size:"icon-xs",onClick:x,className:"shrink-0",children:[K(U,{className:"size-3"}),K("span",{className:"sr-only",children:"Clear all"})]})]}),Ie(we,{className:"sm:max-w-md",children:[K(Re,{children:K(Ne,{children:"Select Department"})}),Ie("div",{className:"relative",children:[K(be,{className:"text-muted-foreground absolute top-1/2 left-2.5 size-4 -translate-y-1/2"}),K(_,{value:p,onChange:C=>u(C.target.value),placeholder:"Search departments...",className:"pl-8"})]}),K(jt,{className:"h-[300px]",children:Ie("div",{className:"space-y-1",children:[h.map(C=>K(ds,{department:C,selectedIds:y,onSelect:P},C.id)),h.length===0&&Ie("div",{className:"text-muted-foreground flex flex-col items-center justify-center py-8",children:[K(Kr,{className:"mb-2 size-8"}),K("p",{className:"text-sm",children:"No departments found"})]})]})}),a&&Ie("div",{className:"text-muted-foreground flex items-center justify-between text-sm",children:[Ie("span",{children:[v.length," department(s) selected"]}),s&&Ie("span",{children:["Max: ",s]})]})]})]})})}import"react";import{cva as lu}from"class-variance-authority";import{jsx as du}from"react/jsx-runtime";var us=lu("inline-block rounded-full",{variants:{size:{sm:"size-1.5",default:"size-2",lg:"size-2.5"},variant:{default:"bg-foreground/40",primary:"bg-primary",success:"bg-success",warning:"bg-warning",destructive:"bg-destructive",info:"bg-info"},pulse:{true:"relative after:absolute after:inset-0 after:rounded-full after:bg-inherit after:animate-ping after:opacity-75",false:""}},defaultVariants:{size:"default",variant:"default",pulse:!1}});function cu({className:e,size:t,variant:o,pulse:n,...a}){return du("span",{"data-slot":"dot",className:r(us({size:t,variant:o,pulse:n}),e),...a})}import"react";import{Drawer as It}from"vaul";import{jsx as _e,jsxs as ps}from"react/jsx-runtime";function uu({...e}){return _e(It.Root,{"data-slot":"drawer",...e})}function pu({...e}){return _e(It.Trigger,{"data-slot":"drawer-trigger",...e})}function ms({...e}){return _e(It.Portal,{"data-slot":"drawer-portal",...e})}function mu({...e}){return _e(It.Close,{"data-slot":"drawer-close",...e})}function fs({className:e,...t}){return _e(It.Overlay,{"data-slot":"drawer-overlay",className:r("data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 fixed inset-0 z-50 bg-black/10 supports-backdrop-filter:backdrop-blur-xs",e),...t})}function fu({className:e,children:t,...o}){return ps(ms,{"data-slot":"drawer-portal",children:[_e(fs,{}),ps(It.Content,{"data-slot":"drawer-content",className:r("group/drawer-content bg-popover text-popover-foreground fixed z-50 flex h-auto flex-col text-sm data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-r-xl data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-l-xl data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm",e),...o,children:[_e("div",{className:"bg-muted mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),t]})]})}function gu({className:e,...t}){return _e("div",{"data-slot":"drawer-header",className:r("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-0.5 md:text-left",e),...t})}function bu({className:e,...t}){return _e("div",{"data-slot":"drawer-footer",className:r("mt-auto flex flex-col gap-2 p-4",e),...t})}function vu({className:e,...t}){return _e(It.Title,{"data-slot":"drawer-title",className:r("font-heading text-foreground text-base font-medium",e),...t})}function xu({className:e,...t}){return _e(It.Description,{"data-slot":"drawer-description",className:r("text-muted-foreground text-sm",e),...t})}import"react";import{Menu as fe}from"@base-ui/react/menu";import{jsx as Z,jsxs as va}from"react/jsx-runtime";function pr({...e}){return Z(fe.Root,{"data-slot":"dropdown-menu",...e})}function hu({...e}){return Z(fe.Portal,{"data-slot":"dropdown-menu-portal",...e})}function mr({...e}){return Z(fe.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function Co({align:e="start",alignOffset:t=0,side:o="bottom",sideOffset:n=4,className:a,...s}){return Z(fe.Portal,{children:Z(fe.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:t,side:o,sideOffset:n,children:Z(fe.Popup,{"data-slot":"dropdown-menu-content",className:r("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100 outline-none data-closed:overflow-hidden",a),...s})})})}function yu({...e}){return Z(fe.Group,{"data-slot":"dropdown-menu-group",...e})}function Pu({className:e,inset:t,...o}){return Z(fe.GroupLabel,{"data-slot":"dropdown-menu-label","data-inset":t,className:r("text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:pl-7",e),...o})}function fr({className:e,inset:t,variant:o="default",...n}){return Z(fe.Item,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":o,className:r("group/dropdown-menu-item focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n})}function Cu({...e}){return Z(fe.SubmenuRoot,{"data-slot":"dropdown-menu-sub",...e})}function wu({className:e,inset:t,children:o,...n}){return va(fe.SubmenuTrigger,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:r("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[o,Z($,{className:"ml-auto"})]})}function Ru({align:e="start",alignOffset:t=-3,side:o="right",sideOffset:n=0,className:a,...s}){return Z(Co,{"data-slot":"dropdown-menu-sub-content",className:r("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 w-auto min-w-[96px] rounded-lg p-1 shadow-lg ring-1 duration-100",a),align:e,alignOffset:t,side:o,sideOffset:n,...s})}function Nu({className:e,children:t,checked:o,inset:n,...a}){return va(fe.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item","data-inset":n,className:r("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:o,...a,children:[Z("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-checkbox-item-indicator",children:Z(fe.CheckboxItemIndicator,{children:Z(ne,{})})}),t]})}function Iu({...e}){return Z(fe.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})}function ku({className:e,children:t,inset:o,...n}){return va(fe.RadioItem,{"data-slot":"dropdown-menu-radio-item","data-inset":o,className:r("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[Z("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:Z(fe.RadioItemIndicator,{children:Z(ne,{})})}),t]})}function ba({className:e,...t}){return Z(fe.Separator,{"data-slot":"dropdown-menu-separator",className:r("bg-border -mx-1 my-1 h-px",e),...t})}function Su({className:e,...t}){return Z("span",{"data-slot":"dropdown-menu-shortcut",className:r("text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest",e),...t})}import{useDropzone as Tu}from"react-dropzone";import{jsx as V,jsxs as Te}from"react/jsx-runtime";function Mu({onDrop:e,accept:t,maxFiles:o=5,maxSize:n,disabled:a,className:s}){let{getRootProps:l,getInputProps:c,isDragActive:d}=Tu({...e!==void 0?{onDrop:e}:{},...t!==void 0?{accept:t}:{},maxFiles:o,...n!==void 0?{maxSize:n}:{},...a!==void 0?{disabled:a}:{}});return Te("div",{...l(),className:r("flex cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed p-8 text-center transition-colors",d?"border-primary bg-primary/5":"border-muted-foreground/25 hover:border-muted-foreground/50",a&&"cursor-not-allowed opacity-50",s),children:[V("input",{...c()}),V(er,{className:r("mb-2 size-8",d?"text-primary":"text-muted-foreground")}),d?V("p",{className:"text-primary text-sm font-medium",children:"Drop files here..."}):Te("div",{className:"space-y-1",children:[V("p",{className:"text-sm font-medium",children:"Drag & drop files here, or click to select"}),Te("p",{className:"text-muted-foreground text-xs",children:[o>1?`Up to ${o} files`:"Single file",n&&` (max ${Math.round(n/1024/1024)}MB each)`]})]})]})}function zu({files:e=[],onRemove:t,className:o}){let n=a=>a<1024?a+" B":a<1048576?(a/1024).toFixed(1)+" KB":(a/1048576).toFixed(1)+" MB";return V("div",{className:r("space-y-2",o),children:e.map((a,s)=>Te("div",{className:"flex items-center gap-3 rounded-md border px-3 py-2 text-sm",children:[V(Pt,{className:"text-muted-foreground size-4 shrink-0"}),Te("div",{className:"min-w-0 flex-1",children:[V("p",{className:"truncate font-medium",children:a.name}),V("p",{className:"text-muted-foreground text-xs",children:n(a.size)})]}),a.status==="success"&&V(vo,{className:"text-success size-4"}),a.status==="error"&&V(st,{className:"text-destructive size-4"}),a.progress!==void 0&&V("div",{className:"bg-muted h-1.5 w-16 overflow-hidden rounded-full",children:V("div",{className:"bg-primary h-full transition-all",style:{width:a.progress+"%"}})}),t&&V(N,{variant:"ghost",size:"icon-xs",onClick:()=>t(s),children:V(U,{className:"size-3.5"})})]},s))})}var Du=0;function gs(){return`upload-${++Du}-${Date.now()}`}function Lu({fileList:e=[],onChange:t,onPreview:o,onRemove:n,customUpload:a,maxCount:s=8,accept:l="image/*",disabled:c,className:d}){let m=async u=>{if(!u||c)return;let g=s-e.length,b=Array.from(u).slice(0,g);for(let v of b){let y=gs(),h={uid:y,name:v.name,status:"uploading",percent:0},P=[...e,h];if(t?.(P),a)try{let w=await a(v);t?.(P.map(x=>x.uid===y?{...x,...w,status:"done"}:x))}catch{t?.(P.map(w=>w.uid===y?{...w,status:"error"}:w))}else{let w=URL.createObjectURL(v);t?.(P.map(x=>x.uid===y?{...x,url:w,status:"done"}:x))}}},f=(u,g)=>{g.stopPropagation();let b=e.filter(v=>v.uid!==u.uid);t?.(b),n?.(u)},p=e.length<s;return Te("div",{"data-slot":"picture-wall",className:r("flex flex-wrap gap-2",d),children:[e.map(u=>Te("div",{className:"group relative size-20 cursor-pointer overflow-hidden rounded-md border",onClick:()=>o?.(u),children:[u.url||u.thumbUrl?V("img",{src:u.thumbUrl??u.url,alt:u.name,className:"size-full object-cover"}):V("div",{className:"bg-muted flex size-full items-center justify-center",children:V(Pt,{className:"text-muted-foreground size-6"})}),u.status==="uploading"&&V("div",{className:"absolute inset-0 flex items-center justify-center bg-black/40",children:Te("span",{className:"text-xs font-medium text-white",children:[u.percent??0,"%"]})}),u.status==="error"&&V("div",{className:"bg-destructive/20 absolute inset-0 flex items-center justify-center",children:V(st,{className:"text-destructive size-5"})}),!c&&V("button",{type:"button",className:"bg-background absolute -top-1 -right-1 rounded-full border p-0.5 opacity-0 transition-opacity group-hover:opacity-100",onClick:g=>f(u,g),"aria-label":`Remove ${u.name}`,children:V(U,{className:"size-3"})})]},u.uid)),p&&!c&&Te("label",{className:"border-muted-foreground/25 hover:border-primary/50 flex size-20 cursor-pointer items-center justify-center rounded-md border-2 border-dashed transition-colors",children:[V(er,{className:"text-muted-foreground size-5"}),V("input",{type:"file",accept:l,multiple:s-e.length>1,className:"hidden",onChange:u=>m(u.target.files)})]})]})}function Fu({fileList:e=[],onChange:t,onPreview:o,onRemove:n,customUpload:a,maxCount:s=1,accept:l="image/*",disabled:c,className:d}){let m=async u=>{if(!u||c)return;let g=Array.from(u).slice(0,s-e.length);for(let b of g){let v=gs(),y={uid:v,name:b.name,status:"uploading"},h=[...e,y];if(t?.(h),a)try{let P=await a(b);t?.(h.map(w=>w.uid===v?{...w,...P,status:"done"}:w))}catch{t?.(h.map(P=>P.uid===v?{...P,status:"error"}:P))}else{let P=URL.createObjectURL(b);t?.(h.map(w=>w.uid===v?{...w,url:P,status:"done"}:w))}}},f=(u,g)=>{g.stopPropagation();let b=e.filter(v=>v.uid!==u.uid);t?.(b),n?.(u)},p=e.length<s;return Te("div",{"data-slot":"picture-card",className:r("flex flex-wrap gap-3",d),children:[e.map(u=>Te("div",{className:"group bg-muted/30 relative size-40 overflow-hidden rounded-lg border",children:[u.url||u.thumbUrl?V("img",{src:u.thumbUrl??u.url,alt:u.name,className:"size-full object-cover"}):Te("div",{className:"flex size-full flex-col items-center justify-center gap-1",children:[V(Pt,{className:"text-muted-foreground size-8"}),V("span",{className:"text-muted-foreground max-w-full truncate px-2 text-xs",children:u.name})]}),u.status==="uploading"&&V("div",{className:"absolute inset-0 flex items-center justify-center bg-black/40",children:V("span",{className:"text-sm font-medium text-white",children:"Uploading..."})}),Te("div",{className:"absolute inset-0 flex items-center justify-center gap-1 bg-black/40 opacity-0 transition-opacity group-hover:opacity-100",children:[o&&u.url&&V(N,{variant:"ghost",size:"icon-sm",className:"text-white hover:bg-white/20",onClick:()=>o(u),children:V(er,{className:"size-4"})}),!c&&V(N,{variant:"ghost",size:"icon-sm",className:"text-white hover:bg-white/20",onClick:g=>f(u,g),children:V(U,{className:"size-4"})})]})]},u.uid)),p&&!c&&Te("label",{className:"border-muted-foreground/25 hover:border-primary/50 flex size-40 cursor-pointer flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed transition-colors",children:[V(er,{className:"text-muted-foreground size-6"}),V("span",{className:"text-muted-foreground text-xs",children:"Upload"}),V("input",{type:"file",accept:l,className:"hidden",onChange:u=>m(u.target.files)})]})]})}import"react";import{cva as Au}from"class-variance-authority";import{jsx as vs}from"react/jsx-runtime";var bs=Au("grid gap-4",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"},gap:{sm:"gap-2",default:"gap-4",lg:"gap-6"}},defaultVariants:{columns:2,gap:"default"}});function Eu({className:e,columns:t,gap:o,children:n,...a}){return vs("div",{"data-slot":"form-grid",className:r(bs({columns:t,gap:o,className:e})),...a,children:n})}function Bu({className:e,span:t,children:o,...n}){return vs("div",{"data-slot":"form-grid-item",className:r(t===2&&"sm:col-span-2",t===3&&"sm:col-span-2 lg:col-span-3",t===4&&"sm:col-span-2 lg:col-span-4",e),...n,children:o})}import*as xs from"react";import{jsx as wo,jsxs as gr}from"react/jsx-runtime";function Vu({value:e,defaultValue:t=[],onChange:o,onAdd:n,onRemove:a,renderItem:s,addButtonText:l="Add Item",addButtonVariant:c="outline",maxItems:d,minItems:m=0,disabled:f=!1,sortable:p=!1,className:u}){let[g,b]=xs.useState(t),v=e??g,y=()=>{if(d&&v.length>=d)return;let x=n?n():{id:`item-${Date.now()}`},C=[...v,x];b(C),o?.(C)},h=x=>{if(v.length<=m)return;let C=v.filter((R,T)=>T!==x);b(C),a?.(x),o?.(C)},P=!d||v.length<d,w=v.length>m;return gr("div",{"data-slot":"form-list",className:r("space-y-3",u),children:[v.map((x,C)=>gr("div",{"data-slot":"form-list-item",className:"flex items-start gap-2 rounded-lg border p-4",children:[p&&!f&&gr(N,{variant:"ghost",size:"icon-xs",className:"mt-1 cursor-grab",tabIndex:-1,children:[wo(Ri,{className:"size-3"}),wo("span",{className:"sr-only",children:"Drag to reorder"})]}),wo("div",{className:"min-w-0 flex-1",children:s(x,C)}),!f&&w&&gr(N,{variant:"ghost",size:"icon-xs",onClick:()=>h(C),className:"text-muted-foreground hover:text-destructive mt-1 shrink-0",children:[wo(Ei,{className:"size-3"}),wo("span",{className:"sr-only",children:"Remove item"})]})]},x.id)),!f&&P&&gr(N,{variant:c,size:"sm",onClick:y,className:"w-full",children:[wo(Di,{className:"mr-1 size-4"}),l]})]})}import*as hs from"react";import{cva as Hu}from"class-variance-authority";import{jsx as ln,jsxs as br}from"react/jsx-runtime";var ys=Hu("rounded-lg border bg-card text-card-foreground",{variants:{variant:{default:"",elevated:"shadow-sm",flat:"border-0 bg-transparent"}},defaultVariants:{variant:"default"}});function Ou({className:e,variant:t,title:o,description:n,collapsible:a=!1,defaultCollapsed:s=!1,required:l,extra:c,children:d,...m}){let[f,p]=hs.useState(s);return br("div",{"data-slot":"form-section","data-collapsed":f,className:r(ys({variant:t,className:e})),...m,children:[(o||n)&&br("div",{className:r("flex items-center justify-between px-4 py-3",a&&"cursor-pointer select-none"),onClick:()=>a&&p(!f),children:[br("div",{className:"space-y-0.5",children:[o&&br("h3",{className:"text-sm leading-none font-medium",children:[o,l&&ln("span",{className:"text-destructive ml-1",children:"*"})]}),n&&ln("p",{className:"text-muted-foreground text-xs",children:n})]}),br("div",{className:"flex items-center gap-2",children:[c,a&&ln(le,{className:r("text-muted-foreground size-4 transition-transform",f&&"-rotate-90")})]})]}),(!a||!f)&&ln("div",{className:r("px-4 pb-4",o||n?"pt-0":"pt-4"),children:d})]})}import*as kt from"react";import{Slot as Uu}from"@radix-ui/react-slot";import{Controller as _u,FormProvider as $u,useFormContext as Ku}from"react-hook-form";import"react";import{jsx as Gu}from"react/jsx-runtime";function xa({className:e,...t}){return Gu("label",{"data-slot":"label",className:r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}import{jsx as St,jsxs as qu}from"react/jsx-runtime";var ha=$u,Ps=kt.createContext({});function ya({...e}){return St(Ps.Provider,{value:{name:e.name},children:St(_u,{...e})})}var Cs=kt.createContext({});function vr(){let e=kt.useContext(Ps),t=kt.useContext(Cs),{getFieldState:o,formState:n}=Ku(),a=o(e.name,n);if(!e.name)throw new Error("useFormField should be used within <FormField>");let{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...a}}function Pa({className:e,...t}){let o=kt.useId();return St(Cs.Provider,{value:{id:o},children:St("div",{"data-slot":"form-item",className:r("group/form-item space-y-1.5",e),...t})})}function Ca({className:e,required:t,...o}){let{error:n,formItemId:a}=vr();return qu(xa,{"data-slot":"form-label","data-error":!!n,className:r(n&&"text-destructive",e),htmlFor:a,...o,children:[o.children,t&&St("span",{className:"text-destructive",children:"*"})]})}function wa({...e}){let{error:t,formItemId:o,formDescriptionId:n,formMessageId:a}=vr();return St(Uu,{"data-slot":"form-control",id:o,"aria-describedby":t?`${n} ${a}`:n,"aria-invalid":!!t,...e})}function Ra({className:e,...t}){let{formDescriptionId:o}=vr();return St("p",{"data-slot":"form-description",id:o,className:r("text-muted-foreground text-xs",e),...t})}function Na({className:e,...t}){let{error:o,formMessageId:n}=vr(),a=o?String(o?.message??""):t.children;return a?St("p",{"data-slot":"form-message",id:n,className:r("text-destructive text-xs font-medium",e),...t,children:a}):null}import*as Sa from"react";import{useTranslation as Zu}from"react-i18next";import{zodResolver as Xu}from"@hookform/resolvers/zod";import{useForm as Wu}from"react-hook-form";function ws(e){return Wu({mode:"onTouched",reValidateMode:"onChange",...e})}function Rs(e={}){let{schema:t,resolver:o,...n}=e,a=o??(t?Xu(t):void 0);return ws(a?{...n,resolver:a}:n)}import{Switch as Ns}from"@base-ui/react/switch";import{jsx as Is}from"react/jsx-runtime";function Ia({className:e,size:t="default",...o}){return Is(Ns.Root,{"data-slot":"switch","data-size":t,className:r("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 aria-invalid:ring-3 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px]",e),...o,children:Is(Ns.Thumb,{"data-slot":"switch-thumb",className:"bg-background dark:data-checked:bg-primary-foreground dark:data-unchecked:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0"})})}import"react";import{Select as he}from"@base-ui/react/select";import{jsx as ae,jsxs as ka}from"react/jsx-runtime";var Ro=he.Root;function ju({className:e,...t}){return ae(he.Group,{"data-slot":"select-group",className:r("scroll-my-1 p-1",e),...t})}function No({className:e,...t}){return ae(he.Value,{"data-slot":"select-value",className:r("flex flex-1 text-left",e),...t})}function Io({className:e,size:t="default",children:o,...n}){return ka(he.Trigger,{"data-slot":"select-trigger","data-size":t,className:r("border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 flex w-fit items-center justify-between gap-1.5 rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[o,ae(he.Icon,{render:ae(le,{className:"text-muted-foreground pointer-events-none size-4"})})]})}function ko({className:e,children:t,side:o="bottom",sideOffset:n=4,align:a="center",alignOffset:s=0,alignItemWithTrigger:l=!0,...c}){return ae(he.Portal,{children:ae(he.Positioner,{side:o,sideOffset:n,align:a,alignOffset:s,alignItemWithTrigger:l,className:"isolate z-50",children:ka(he.Popup,{"data-slot":"select-content","data-align-trigger":l,className:r("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg shadow-md ring-1 duration-100 data-[align-trigger=true]:animate-none",e),...c,children:[ae(ks,{}),ae(he.List,{children:t}),ae(Ss,{})]})})})}function Yu({className:e,...t}){return ae(he.GroupLabel,{"data-slot":"select-label",className:r("text-muted-foreground px-1.5 py-1 text-xs",e),...t})}function So({className:e,children:t,...o}){return ka(he.Item,{"data-slot":"select-item",className:r("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...o,children:[ae(he.ItemText,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:t}),ae(he.ItemIndicator,{render:ae("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:ae(ne,{className:"pointer-events-none"})})]})}function Qu({className:e,...t}){return ae(he.Separator,{"data-slot":"select-separator",className:r("bg-border pointer-events-none -mx-1 my-1 h-px",e),...t})}function ks({className:e,...t}){return ae(he.ScrollUpArrow,{"data-slot":"select-scroll-up-button",className:r("bg-popover top-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:ae(qr,{})})}function Ss({className:e,...t}){return ae(he.ScrollDownArrow,{"data-slot":"select-scroll-down-button",className:r("bg-popover bottom-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:ae(le,{})})}import{jsx as te,jsxs as xr}from"react/jsx-runtime";function Ju(e){return e?.type?e.type:e?.options&&e.options.length>0?"select":"text"}function ep({schema:e,defaultValues:t,fields:o,onSubmit:n,submitText:a,resetText:s,isLoading:l,className:c,layout:d="stack",columns:m=2}){let{t:f}=Zu("ui"),p=Rs({schema:e,defaultValues:t}),u=a===null?null:a??f("schemaForm.submit"),g=s===null?null:s??f("schemaForm.reset"),b=f("schemaForm.selectPlaceholder"),v=Sa.useMemo(()=>{let P=o?Object.keys(o):[],w=Object.keys(t),x=new Set([...P,...w]);return Array.from(x)},[o,t]),y=Sa.useMemo(()=>p.handleSubmit(async P=>{await n?.(P)}),[p,n]),h=d==="grid"?r("grid gap-4 sm:grid-cols-2",m!==2&&`sm:grid-cols-${m}`):"flex flex-col gap-4";return te(ha,{...p,children:xr("form",{"data-slot":"schema-form",className:r(h,c),onSubmit:y,children:[v.map(P=>{let w=o?.[P];if(w?.hidden)return null;let x=Ju(w),C=w?.required??!1,R=w?.label??te("span",{className:"capitalize",children:String(P)});return te(ya,{control:p.control,name:P,render:({field:T})=>xr(Pa,{className:r(x==="switch"&&"flex flex-row items-center justify-between gap-3",w?.className),children:[x!=="checkbox"&&x!=="switch"&&te(Ca,{required:C,children:R}),te(wa,{children:tp({controlType:x,field:T,override:w??{},label:R,selectPlaceholder:b})}),w?.description?te(Ra,{children:w.description}):null,te(Na,{})]})},P)}),(u!==null||g!==null)&&xr("div",{className:"flex items-center gap-2 pt-1",children:[u!==null&&te(N,{type:"submit",disabled:l,children:typeof u=="string"?u:f("schemaForm.submit")}),g!==null&&te(N,{type:"button",variant:"outline",disabled:l,onClick:()=>p.reset(t),children:typeof g=="string"?g:f("schemaForm.reset")})]})]})})}function tp(e){let{controlType:t,field:o,override:n,label:a,selectPlaceholder:s}=e,l=o.disabled||n.disabled;switch(t){case"textarea":return te(Wt,{value:o.value??"",placeholder:n.placeholder,disabled:l,onChange:c=>o.onChange(c.target.value),onBlur:o.onBlur});case"checkbox":return xr("div",{className:"flex items-center gap-2",children:[te(De,{checked:o.value===!0,disabled:l,onCheckedChange:c=>o.onChange(c===!0)}),te("span",{className:"text-sm",children:a})]});case"switch":return te(Ia,{checked:o.value===!0,disabled:l,onCheckedChange:c=>o.onChange(c)});case"select":return xr(Ro,{value:o.value??void 0,disabled:l,onValueChange:c=>o.onChange(c??""),children:[te(Io,{children:te(No,{placeholder:n.placeholder??s??"Select..."})}),te(ko,{children:(n.options??[]).map(c=>te(So,{value:c.value,children:c.label},c.value))})]});case"number":return te(_,{type:"number",value:o.value??"",placeholder:n.placeholder,disabled:l,onChange:c=>o.onChange(Number.isNaN(c.target.valueAsNumber)?"":c.target.valueAsNumber),onBlur:o.onBlur});case"email":case"password":case"date":return te(_,{type:t,value:o.value??"",placeholder:n.placeholder,disabled:l,onChange:c=>o.onChange(c.target.value),onBlur:o.onBlur});default:return te(_,{type:"text",value:o.value??"",placeholder:n.placeholder,disabled:l,onChange:c=>o.onChange(c.target.value),onBlur:o.onBlur})}}import*as cn from"react";import{jsx as Ta}from"react/jsx-runtime";function op({targetRef:e,size:t="icon-sm",variant:o="ghost",className:n}){let[a,s]=cn.useState(!1);return cn.useEffect(()=>{let c=()=>s(document.fullscreenElement!==null);return document.addEventListener("fullscreenchange",c),()=>document.removeEventListener("fullscreenchange",c)},[]),Ta(N,{variant:o,size:t,onClick:()=>{let c=e?.current??document.documentElement;document.fullscreenElement?document.exitFullscreen():c.requestFullscreen()},className:r(n),"aria-label":a?"Exit fullscreen":"Enter fullscreen","data-slot":"fullscreen-toggle",children:a?Ta(Ti,{}):Ta(Si,{})})}import"react";import{cva as rp}from"class-variance-authority";import{jsx as Ms}from"react/jsx-runtime";var Ts=rp("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",12:"grid-cols-12",auto:"grid-cols-[repeat(auto-fill,minmax(250px,1fr))]"},gap:{none:"gap-0",sm:"gap-2",default:"gap-4",lg:"gap-6",xl:"gap-8"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between"}},defaultVariants:{columns:1,gap:"default",align:"stretch",justify:"start"}});function np({className:e,columns:t,gap:o,align:n,justify:a,responsive:s,children:l,...c}){let d=s?r(s.sm&&`sm:grid-cols-${s.sm}`,s.md&&`md:grid-cols-${s.md}`,s.lg&&`lg:grid-cols-${s.lg}`,s.xl&&`xl:grid-cols-${s.xl}`):"";return Ms("div",{"data-slot":"grid-layout",className:r(Ts({columns:t,gap:o,align:n,justify:a}),d,e),...c,children:l})}function ap({className:e,span:t,rowSpan:o,start:n,end:a,children:s,...l}){return Ms("div",{"data-slot":"grid-item",className:r(t&&`col-span-${t}`,o&&`row-span-${o}`,n&&`col-start-${n}`,a&&`col-end-${a}`,e),...l,children:s})}import{PreviewCard as hr}from"@base-ui/react/preview-card";import{jsx as yr}from"react/jsx-runtime";function ip({...e}){return yr(hr.Root,{"data-slot":"hover-card",...e})}function sp({...e}){return yr(hr.Trigger,{"data-slot":"hover-card-trigger",...e})}function lp({className:e,side:t="bottom",sideOffset:o=4,align:n="center",alignOffset:a=4,...s}){return yr(hr.Portal,{"data-slot":"hover-card-portal",children:yr(hr.Positioner,{align:n,alignOffset:a,side:t,sideOffset:o,className:"isolate z-50",children:yr(hr.Popup,{"data-slot":"hover-card-content",className:r("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 w-64 origin-(--transform-origin) rounded-lg p-2.5 text-sm shadow-md ring-1 outline-hidden duration-100",e),...s})})})}import*as Mo from"react";import{Fragment as dp,jsx as Tt,jsxs as To}from"react/jsx-runtime";function cp({open:e,onOpenChange:t,images:o,index:n=0}){let[a,s]=Mo.useState(n),[l,c]=Mo.useState(1),[d,m]=Mo.useState(0);if(Mo.useEffect(()=>{e&&(s(n),c(1),m(0))},[e,n]),!e||o.length===0)return null;let f=o[a];if(!f)return null;let p=()=>s(g=>(g-1+o.length)%o.length),u=()=>s(g=>(g+1)%o.length);return To("div",{"data-slot":"image-viewer",className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/90",onClick:()=>t(!1),children:[Tt(N,{variant:"ghost",size:"icon",className:"absolute top-4 right-4 text-white hover:bg-white/10",onClick:g=>{g.stopPropagation(),t(!1)},"aria-label":"Close",children:Tt(U,{})}),o.length>1&&To(dp,{children:[Tt(N,{variant:"ghost",size:"icon",className:"absolute left-4 text-white hover:bg-white/10",onClick:g=>{g.stopPropagation(),p()},"aria-label":"Previous",children:"<"}),Tt(N,{variant:"ghost",size:"icon",className:"absolute right-4 text-white hover:bg-white/10",onClick:g=>{g.stopPropagation(),u()},"aria-label":"Next",children:">"})]}),To("div",{className:"flex flex-col items-center gap-3",children:[Tt("img",{src:f.src,alt:f.alt??"",className:"max-h-[80vh] max-w-[90vw] object-contain transition-transform",style:{transform:`scale(${l}) rotate(${d}deg)`},onClick:g=>g.stopPropagation()}),To("div",{className:"flex items-center gap-2",children:[Tt(N,{variant:"outline",size:"sm",className:"border-white/30 text-white",onClick:g=>{g.stopPropagation(),c(b=>Math.max(.5,b-.25))},children:"Zoom Out"}),To("span",{className:"text-sm text-white/70 tabular-nums",children:[Math.round(l*100),"%"]}),Tt(N,{variant:"outline",size:"sm",className:"border-white/30 text-white",onClick:g=>{g.stopPropagation(),c(b=>Math.min(3,b+.25))},children:"Zoom In"}),Tt(N,{variant:"outline",size:"sm",className:"border-white/30 text-white",onClick:g=>{g.stopPropagation(),m(b=>(b+90)%360)},children:"Rotate"})]}),o.length>1&&To("span",{className:"text-xs text-white/50",children:[a+1," / ",o.length]})]})]})}import*as Fs from"react";import"react";import{cva as up}from"class-variance-authority";import{jsx as Ds}from"react/jsx-runtime";var zs=up("pointer-events-none inline-flex items-center justify-center gap-0.5 rounded-md border bg-muted font-mono font-medium text-muted-foreground shadow-xs select-none",{variants:{size:{sm:"h-5 min-w-5 px-1 text-[0.65rem]",default:"h-6 min-w-6 px-1.5 text-xs",lg:"h-7 min-w-7 px-2 text-sm"}},defaultVariants:{size:"default"}});function Pr({className:e,size:t,...o}){return Ds("kbd",{"data-slot":"kbd",className:r(zs({size:t}),e),...o})}function Cr({className:e,...t}){return Ds("div",{"data-slot":"kbd-group",className:r("inline-flex items-center gap-1",e),...t})}import{jsx as dn,jsxs as Ls}from"react/jsx-runtime";function pp({keys:e,description:t,layout:o="horizontal",className:n,...a}){return Ls("div",{"data-slot":"keyboard-shortcut",className:r("flex items-center gap-2",o==="vertical"&&"flex-col gap-1",n),...a,children:[t&&dn("span",{className:"text-muted-foreground text-sm",children:t}),dn(Cr,{children:e.map((s,l)=>Ls(Fs.Fragment,{children:[l>0&&dn("span",{className:"text-muted-foreground text-xs",children:"+"}),dn(Pr,{children:s})]},l))})]})}import"react";import{cva as mp}from"class-variance-authority";import{jsx as Mt,jsxs as un}from"react/jsx-runtime";var fp=mp("rounded-lg border bg-card p-4 text-card-foreground",{variants:{size:{sm:"p-3",default:"p-4",lg:"p-6"}},defaultVariants:{size:"default"}});function gp({className:e,size:t,items:o,columns:n=4,...a}){return Mt("div",{"data-slot":"kpi-panel",className:r("grid gap-4",n===1&&"grid-cols-1",n===2&&"grid-cols-1 sm:grid-cols-2",n===3&&"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",n===4&&"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",e),...a,children:o.map((s,l)=>Mt(As,{item:s,size:t??"default"},l))})}function As({item:e,size:t}){let o=e.trend==="up"?"text-success":e.trend==="down"?"text-destructive":"text-muted-foreground",n=e.trend==="up"?Vi:e.trend==="down"?Bi:Mi;return un("div",{"data-slot":"kpi-card",className:r(fp({size:t??void 0})),children:[un("div",{className:"flex items-center justify-between",children:[Mt("p",{className:"text-muted-foreground text-sm",children:e.label}),e.icon&&Mt("span",{className:"text-muted-foreground",children:e.icon})]}),Mt("div",{className:"mt-2",children:Mt("p",{className:r("font-bold tracking-tight",t==="sm"?"text-lg":t==="lg"?"text-3xl":"text-2xl"),children:e.value})}),(e.change!==void 0||e.changeLabel)&&un("div",{className:"mt-2 flex items-center gap-1",children:[e.change!==void 0&&un("span",{className:r("flex items-center gap-0.5 text-xs font-medium",o),children:[Mt(n,{className:"size-3"}),e.change>0?"+":"",e.change,"%"]}),e.changeLabel&&Mt("span",{className:"text-muted-foreground text-xs",children:e.changeLabel})]})]})}import{Menubar as bp}from"@base-ui/react/menubar";import{jsx as xp}from"react/jsx-runtime";function vp({className:e,...t}){return xp(bp,{"data-slot":"menubar",className:r("bg-background flex h-9 items-center gap-1 rounded-lg border p-1 shadow-xs",e),...t})}import{NavigationMenu as $e}from"@base-ui/react/navigation-menu";import{cva as hp}from"class-variance-authority";import{jsx as Ve,jsxs as Vs}from"react/jsx-runtime";function yp({align:e="start",className:t,children:o,...n}){return Vs($e.Root,{"data-slot":"navigation-menu",className:r("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",t),...n,children:[o,Ve(Bs,{align:e})]})}function Pp({className:e,...t}){return Ve($e.List,{"data-slot":"navigation-menu-list",className:r("group flex flex-1 list-none items-center justify-center gap-0",e),...t})}function Cp({className:e,...t}){return Ve($e.Item,{"data-slot":"navigation-menu-item",className:r("relative",e),...t})}var Es=hp("group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted");function wp({className:e,children:t,...o}){return Vs($e.Trigger,{"data-slot":"navigation-menu-trigger",className:r(Es(),"group",e),...o,children:[t," ",Ve(le,{className:"relative top-px ml-1 size-3 transition duration-300 group-data-open/navigation-menu-trigger:rotate-180 group-data-popup-open/navigation-menu-trigger:rotate-180","aria-hidden":"true"})]})}function Rp({className:e,...t}){return Ve($e.Content,{"data-slot":"navigation-menu-content",className:r("data-ending-style:data-activation-direction=left:translate-x-[50%] data-ending-style:data-activation-direction=right:translate-x-[-50%] data-starting-style:data-activation-direction=left:translate-x-[-50%] data-starting-style:data-activation-direction=right:translate-x-[50%] group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:ring-foreground/10 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 h-full w-auto p-1 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",e),...t})}function Bs({className:e,side:t="bottom",sideOffset:o=8,align:n="start",alignOffset:a=0,...s}){return Ve($e.Portal,{children:Ve($e.Positioner,{side:t,sideOffset:o,align:n,alignOffset:a,className:r("isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0",e),...s,children:Ve($e.Popup,{className:"data-[ending-style]:easing-[ease] xs:w-(--popup-width) bg-popover text-popover-foreground ring-foreground/10 relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-lg shadow ring-1 transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0",children:Ve($e.Viewport,{className:"relative size-full overflow-hidden"})})})})}function Np({className:e,...t}){return Ve($e.Link,{"data-slot":"navigation-menu-link",className:r("hover:bg-muted focus:bg-muted focus-visible:ring-ring/50 data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none focus-visible:ring-3 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md [&_svg:not([class*='size-'])]:size-4",e),...t})}function Ip({className:e,...t}){return Ve($e.Icon,{"data-slot":"navigation-menu-indicator",className:r("data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in top-full z-1 flex h-1.5 items-end justify-center overflow-hidden",e),...t,children:Ve("div",{className:"bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md"})})}import"react";import{OTPFieldPreview as Ma}from"@base-ui/react/otp-field";import{jsx as pn}from"react/jsx-runtime";function kp({length:e,value:t,onValueChange:o,mask:n=!1,className:a,inputClassName:s,...l}){return pn(Ma.Root,{"data-slot":"otp-field",length:e,value:t,onValueChange:c=>o?.(c),mask:n,className:r("flex items-center gap-1.5",a),...l,children:Array.from({length:e}).map((c,d)=>pn(Ma.Input,{"data-slot":"otp-field-input",className:r("border-input bg-background focus-visible:border-ring focus-visible:ring-ring/50 flex size-9 items-center justify-center rounded-md border text-center text-base font-medium shadow-xs transition-colors focus-visible:ring-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",s)},d))})}function Sp({className:e,...t}){return pn("div",{"data-slot":"otp-field-separator",className:r("text-muted-foreground/50 flex items-center",e),...t,children:pn(Ma.Separator,{children:"\u2014"})})}import"react";import{cva as Tp}from"class-variance-authority";import{jsx as wr,jsxs as za}from"react/jsx-runtime";var Hs=Tp("w-full",{variants:{size:{sm:"max-w-2xl",default:"max-w-5xl",lg:"max-w-7xl",full:"max-w-full",none:""},padding:{none:"p-0",sm:"p-4",default:"p-6",lg:"p-8"},center:{true:"mx-auto",false:""}},defaultVariants:{size:"default",padding:"default",center:!0}});function Mp({className:e,size:t,padding:o,center:n,children:a,...s}){return wr("div",{"data-slot":"page-container",className:r(Hs({size:t,padding:o,center:n,className:e})),...s,children:a})}function zp({className:e,title:t,description:o,actions:n,breadcrumb:a,...s}){return za("div",{"data-slot":"page-header",className:r("space-y-2",e),...s,children:[a,za("div",{className:"flex items-start justify-between gap-4",children:[za("div",{className:"space-y-1",children:[wr("h1",{className:"text-2xl font-bold tracking-tight",children:t}),o&&wr("p",{className:"text-muted-foreground",children:o})]}),n&&wr("div",{className:"flex items-center gap-2",children:n})]})]})}function Dp({className:e,children:t,...o}){return wr("div",{"data-slot":"page-content",className:r("space-y-6",e),...o,children:t})}import"react";import{jsx as Ke,jsxs as La}from"react/jsx-runtime";function Lp({className:e,...t}){return Ke("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:r("mx-auto flex w-full justify-center",e),...t})}function Fp({className:e,...t}){return Ke("ul",{"data-slot":"pagination-content",className:r("flex items-center gap-0.5",e),...t})}function Ap({...e}){return Ke("li",{"data-slot":"pagination-item",...e})}function Da({className:e,isActive:t,size:o="icon",...n}){return Ke(N,{variant:t?"outline":"ghost",size:o,className:r(e),nativeButton:!1,render:Ke("a",{"aria-current":t?"page":void 0,"data-slot":"pagination-link","data-active":t,...n})})}function Ep({className:e,text:t="Previous",...o}){return La(Da,{"aria-label":"Go to previous page",size:"default",className:r("pl-1.5!",e),...o,children:[Ke(Ze,{"data-icon":"inline-start"}),Ke("span",{className:"hidden sm:block",children:t})]})}function Bp({className:e,text:t="Next",...o}){return La(Da,{"aria-label":"Go to next page",size:"default",className:r("pr-1.5!",e),...o,children:[Ke("span",{className:"hidden sm:block",children:t}),Ke($,{"data-icon":"inline-end"})]})}function Vp({className:e,...t}){return La("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:r("flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4",e),...t,children:[Ke(Xr,{}),Ke("span",{className:"sr-only",children:"More pages"})]})}import{Progress as Rr}from"@base-ui/react/progress";import{jsx as zo,jsxs as Up}from"react/jsx-runtime";function Hp({className:e,children:t,value:o,...n}){return Up(Rr.Root,{value:o,"data-slot":"progress",className:r("flex flex-wrap gap-3",e),...n,children:[t,zo(Os,{children:zo(Gs,{})})]})}function Os({className:e,...t}){return zo(Rr.Track,{className:r("bg-muted relative flex h-1 w-full items-center overflow-x-hidden rounded-full",e),"data-slot":"progress-track",...t})}function Gs({className:e,...t}){return zo(Rr.Indicator,{"data-slot":"progress-indicator",className:r("bg-primary h-full transition-all",e),...t})}function Op({className:e,...t}){return zo(Rr.Label,{className:r("text-sm font-medium",e),"data-slot":"progress-label",...t})}function Gp({className:e,...t}){return zo(Rr.Value,{className:r("text-muted-foreground ml-auto text-sm tabular-nums",e),"data-slot":"progress-value",...t})}import*as Us from"react";import{jsx as Fa,jsxs as Kp}from"react/jsx-runtime";function _p(e,t=21){let o=[],n=0;for(let a=0;a<e.length;a++)n=(n<<5)-n+e.charCodeAt(a)|0;for(let a=0;a<t;a++){let s=[];for(let l=0;l<t;l++)if(a<7&&l<7||a<7&&l>=t-7||a>=t-7&&l<7){let d=a<7?a:a-(t-7),m=l<7?l:l-(t-7),f=d===0||d===6||m===0||m===6,p=d>=2&&d<=4&&m>=2&&m<=4;s.push(f||p)}else n=n*1103515245+12345&2147483647,s.push((n>>16)%100<45);o.push(s)}return o}function $p({value:e,size:t=128,showText:o=!1,className:n,...a}){let l=Us.useMemo(()=>_p(e,21),[e]),c=t/21;return Kp("div",{"data-slot":"qrcode-display",className:r("inline-flex flex-col items-center gap-1",n),...a,children:[Fa("div",{className:"relative bg-white",style:{width:t,height:t},role:"img","aria-label":`QR code: ${e}`,children:l.map((d,m)=>d.map((f,p)=>f?Fa("div",{className:"absolute bg-black",style:{left:p*c,top:m*c,width:c,height:c}},`${m}-${p}`):null))}),o&&Fa("span",{className:"text-muted-foreground font-mono text-xs",children:e})]})}import{Radio as _s}from"@base-ui/react/radio";import{RadioGroup as qp}from"@base-ui/react/radio-group";import{jsx as mn}from"react/jsx-runtime";function Wp({className:e,...t}){return mn(qp,{"data-slot":"radio-group",className:r("grid w-full gap-2",e),...t})}function Xp({className:e,...t}){return mn(_s.Root,{"data-slot":"radio-group-item",className:r("group/radio-group-item peer border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary relative flex aspect-square size-4 shrink-0 rounded-full border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3",e),...t,children:mn(_s.Indicator,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:mn("span",{className:"bg-primary-foreground absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full"})})})}import*as X from"react";import{jsx as zt}from"react/jsx-runtime";var $s=X.createContext(null);function jp(){let e=X.useContext($s);if(!e)throw new Error("Resizable components must be used within ResizablePanelGroup");return e}function Yp({direction:e="horizontal",className:t,children:o,...n}){let[a,s]=X.useState([]),l=X.useCallback((c,d)=>{s(m=>m.some(f=>f.id===c)?m:[...m,{id:c,size:d}])},[]);return zt($s.Provider,{value:{direction:e,panels:a,registerPanel:l},children:zt("div",{"data-slot":"resizable-panel-group","data-direction":e,className:r("flex h-full w-full",e==="vertical"?"flex-col":"flex-row",t),...n,children:o})})}function Qp({defaultSize:e=50,minSize:t=10,maxSize:o=90,collapsible:n=!1,collapsedSize:a=0,className:s,children:l,...c}){let d=jp(),[m,f]=X.useState(e),[p,u]=X.useState(!1),g=X.useId();X.useEffect(()=>{d.registerPanel(g,e)},[d,g,e]);let{onResize:b,onCollapse:v,onExpand:y}=c;X.useEffect(()=>{b?.(p?a:m)},[m,p,a,b]);let h=X.useCallback(()=>{u(!0),v?.()},[v]),P=X.useCallback(()=>{u(!1),y?.()},[y]);return zt(Zp,{value:{size:m,setSize:f,minSize:t,maxSize:o,collapsed:p,collapsedSize:a,collapsible:n,handleCollapse:h,handleExpand:P,direction:d.direction},children:zt("div",{"data-slot":"resizable-panel","data-collapsed":p,style:{[d.direction==="horizontal"?"width":"height"]:`${p?a:m}%`},className:r("relative overflow-hidden",s),...c,children:l})})}var Ks=X.createContext(null);function Zp({value:e,children:t}){return zt(Ks.Provider,{value:e,children:t})}function Jp(){let e=X.useContext(Ks);if(!e)throw new Error("Handle must be used within ResizablePanel");return e}function em({withHandle:e=!1,className:t,...o}){let{size:n,setSize:a,minSize:s,maxSize:l,collapsed:c,collapsible:d,handleCollapse:m,handleExpand:f,direction:p}=Jp(),u=X.useRef(0),g=X.useRef(n),b=X.useRef(null),v=X.useCallback(h=>{h.preventDefault(),u.current=p==="horizontal"?h.clientX:h.clientY,g.current=n;let P=x=>{let C=b.current?.parentElement?.parentElement;if(!C)return;let R=C.getBoundingClientRect(),T=p==="horizontal"?R.width:R.height,k=((p==="horizontal"?x.clientX:x.clientY)-u.current)/T,S=Math.min(Math.max(g.current+k*100,s),l);a(S)},w=()=>{document.removeEventListener("pointermove",P),document.removeEventListener("pointerup",w)};document.addEventListener("pointermove",P),document.addEventListener("pointerup",w)},[p,s,l,a,n]);return zt("div",{ref:b,"data-slot":"resizable-handle","data-direction":p,onPointerDown:v,onDoubleClick:()=>{d&&(c?f():m())},className:r("bg-border hover:bg-primary/50 active:bg-primary relative flex shrink-0 items-center justify-center transition-colors",p==="horizontal"?"h-full w-px cursor-col-resize":"h-px w-full cursor-row-resize",t),...o,children:e&&zt("div",{className:r("bg-background z-10 flex items-center justify-center rounded-sm border shadow-xs",p==="horizontal"?"h-6 w-2.5":"h-2.5 w-6"),children:zt("div",{className:r("bg-muted-foreground/50 rounded-sm",p==="horizontal"?"h-3 w-0.5":"h-0.5 w-3")})})})}import"react";import{jsx as Aa,jsxs as om}from"react/jsx-runtime";function tm({prefix:e="",suffix:t="",zeroFill:o=0,value:n="",onChange:a,className:s,...l}){let c=d=>{let m=d.target.value;o>0&&/^\d+$/.test(m)&&(m=m.padStart(o,"0")),a?.(m)};return om("div",{"data-slot":"sequence-input",className:r("border-input bg-background flex items-center rounded-md border","focus-within:ring-ring/50 focus-within:ring-2",s),children:[e&&Aa("span",{className:"text-muted-foreground px-2 text-sm select-none",children:e}),Aa(_,{type:"text",value:n,onChange:c,className:"border-0 shadow-none focus-visible:ring-0",...l}),t&&Aa("span",{className:"text-muted-foreground px-2 text-sm select-none",children:t})]})}import"react";import{jsx as qs}from"react/jsx-runtime";function rm({prefix:e="",date:t=new Date,dateFormat:o="YYYYMMDD",seq:n=1,zeroFill:a=4,separator:s="-",className:l,...c}){let d=[];if(e&&d.push(e),o!=="none"){let f=t.getFullYear(),p=String(t.getMonth()+1).padStart(2,"0"),u=String(t.getDate()).padStart(2,"0");d.push(o==="YYYYMMDD"?`${f}${p}${u}`:`${String(f).slice(2)}${p}${u}`)}d.push(String(n).padStart(a,"0"));let m=d.join(s);return qs("div",{"data-slot":"sequence-preview",className:r("border-border bg-muted/30 inline-flex items-center gap-2 rounded-md border border-dashed px-3 py-1.5",l),...c,children:qs("span",{className:"font-mono text-sm font-medium tracking-wider",children:m})})}import{Separator as nm}from"@base-ui/react/separator";import{jsx as am}from"react/jsx-runtime";function Ea({className:e,orientation:t="horizontal",...o}){return am(nm,{"data-slot":"separator",orientation:t,className:r("bg-border shrink-0 data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...o})}import"react";import{Dialog as pt}from"@base-ui/react/dialog";import{jsx as Le,jsxs as Ba}from"react/jsx-runtime";function Va({...e}){return Le(pt.Root,{"data-slot":"sheet",...e})}function im({...e}){return Le(pt.Trigger,{"data-slot":"sheet-trigger",...e})}function sm({...e}){return Le(pt.Close,{"data-slot":"sheet-close",...e})}function lm({...e}){return Le(pt.Portal,{"data-slot":"sheet-portal",...e})}function cm({className:e,...t}){return Le(pt.Backdrop,{"data-slot":"sheet-overlay",className:r("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...t})}function Ha({className:e,children:t,side:o="right",showCloseButton:n=!0,...a}){return Ba(lm,{children:[Le(cm,{}),Ba(pt.Popup,{"data-slot":"sheet-content","data-side":o,className:r("bg-popover text-popover-foreground fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...a,children:[t,n&&Ba(pt.Close,{"data-slot":"sheet-close",render:Le(N,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[Le(U,{}),Le("span",{className:"sr-only",children:"Close"})]})]})]})}function Oa({className:e,...t}){return Le("div",{"data-slot":"sheet-header",className:r("flex flex-col gap-0.5 p-4",e),...t})}function dm({className:e,...t}){return Le("div",{"data-slot":"sheet-footer",className:r("mt-auto flex flex-col gap-2 p-4",e),...t})}function Ga({className:e,...t}){return Le(pt.Title,{"data-slot":"sheet-title",className:r("font-heading text-foreground text-base font-medium",e),...t})}function Ua({className:e,...t}){return Le(pt.Description,{"data-slot":"sheet-description",className:r("text-muted-foreground text-sm",e),...t})}import*as ie from"react";import{mergeProps as Nr}from"@base-ui/react/merge-props";import{useRender as Ir}from"@base-ui/react/use-render";import{cva as Xs}from"class-variance-authority";import*as fn from"react";var _a=768;function Ws(){let[e,t]=fn.useState(()=>typeof window>"u"?!1:window.innerWidth<_a);return fn.useEffect(()=>{let o=window.matchMedia(`(max-width: ${_a}px)`),n=()=>{t(window.innerWidth<_a)};return o.addEventListener("change",n),()=>o.removeEventListener("change",n)},[]),e}import{jsx as um}from"react/jsx-runtime";function gn({className:e,...t}){return um("div",{"data-slot":"skeleton",className:r("bg-muted animate-pulse rounded-md",e),...t})}import{Tooltip as Yt}from"@base-ui/react/tooltip";import{jsx as Do,jsxs as mm}from"react/jsx-runtime";function pm({delay:e=0,...t}){return Do(Yt.Provider,{"data-slot":"tooltip-provider",delay:e,...t})}function $a({...e}){return Do(Yt.Root,{"data-slot":"tooltip",...e})}function Ka({...e}){return Do(Yt.Trigger,{"data-slot":"tooltip-trigger",...e})}function qa({className:e,side:t="top",sideOffset:o=4,align:n="center",alignOffset:a=0,children:s,...l}){return Do(Yt.Portal,{children:Do(Yt.Positioner,{align:n,alignOffset:a,side:t,sideOffset:o,className:"isolate z-50",children:mm(Yt.Popup,{"data-slot":"tooltip-content",className:r("bg-foreground text-background data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md px-3 py-1.5 text-xs has-data-[slot=kbd]:pr-1.5 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm",e),...l,children:[s,Do(Yt.Arrow,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}import{Fragment as Um,jsx as B,jsxs as qe}from"react/jsx-runtime";var fm="sidebar_state",gm=3600*24*7,bm="16rem",vm="18rem",xm="3rem",hm="b",js=ie.createContext(null);function Lo(){let e=ie.useContext(js);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function ym({defaultOpen:e=!0,open:t,onOpenChange:o,className:n,style:a,children:s,...l}){let c=Ws(),[d,m]=ie.useState(!1),[f,p]=ie.useState(e),u=t??f,g=ie.useCallback(h=>{let P=typeof h=="function"?h(u):h;o?o(P):p(P),typeof document<"u"&&(document.cookie=`${fm}=${P}; path=/; max-age=${gm}`)},[o,u]),b=ie.useCallback(()=>c?m(h=>!h):g(h=>!h),[c,g,m]);ie.useEffect(()=>{let h=P=>{P.key===hm&&(P.metaKey||P.ctrlKey)&&(P.preventDefault(),b())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[b]);let v=u?"expanded":"collapsed",y=ie.useMemo(()=>({state:v,open:u,setOpen:g,isMobile:c,openMobile:d,setOpenMobile:m,toggleSidebar:b}),[v,u,g,c,d,m,b]);return B(js.Provider,{value:y,children:B("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":bm,"--sidebar-width-icon":xm,...a},className:r("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar relative flex h-dvh w-full overflow-hidden",n),...l,children:s})})}function Pm({side:e="left",variant:t="sidebar",collapsible:o="offcanvas",className:n,children:a,dir:s,...l}){let{isMobile:c,state:d,openMobile:m,setOpenMobile:f}=Lo();return o==="none"?B("div",{"data-slot":"sidebar",className:r("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",n),...l,children:a}):c?B(Va,{open:m,onOpenChange:f,...l,children:qe(Ha,{dir:s,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":vm},side:e,children:[qe(Oa,{className:"sr-only",children:[B(Ga,{children:"Sidebar"}),B(Ua,{children:"Displays the mobile sidebar."})]}),B("div",{className:"flex h-full w-full flex-col",children:a})]})}):qe("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":d,"data-collapsible":d==="collapsed"?o:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[B("div",{"data-slot":"sidebar-gap",className:r("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),B("div",{"data-slot":"sidebar-container","data-side":e,className:r("absolute inset-y-0 z-10 hidden h-full w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...l,children:B("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:ring-sidebar-border flex size-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1",children:a})})]})}function Cm({className:e,onClick:t,...o}){let{toggleSidebar:n}=Lo();return qe(N,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:r(e),onClick:a=>{t?.(a),n()},...o,children:[B(zi,{}),B("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function wm({className:e,...t}){let{toggleSidebar:o}=Lo();return B("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:r("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function Rm({className:e,...t}){return B("main",{"data-slot":"sidebar-inset",className:r("bg-background relative flex w-full flex-1 flex-col overflow-auto md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function Nm({className:e,...t}){return B(_,{"data-slot":"sidebar-input","data-sidebar":"input",className:r("bg-background h-8 w-full shadow-none",e),...t})}function Im({className:e,...t}){return B("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:r("flex flex-col gap-2 p-2",e),...t})}function km({className:e,...t}){return B("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:r("flex flex-col gap-2 p-2",e),...t})}function Sm({className:e,...t}){return B(Ea,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:r("bg-sidebar-border mx-2 w-auto",e),...t})}function Tm({className:e,...t}){return B("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:r("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function Mm({className:e,...t}){return B("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:r("relative flex w-full min-w-0 flex-col p-2",e),...t})}function zm({className:e,render:t,...o}){return Ir({defaultTagName:"div",props:Nr({className:r("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",e)},o),render:t,state:{slot:"sidebar-group-label",sidebar:"group-label"}})}function Dm({className:e,render:t,...o}){return Ir({defaultTagName:"button",props:Nr({className:r("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",e)},o),render:t,state:{slot:"sidebar-group-action",sidebar:"group-action"}})}function Lm({className:e,...t}){return B("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:r("w-full text-sm",e),...t})}function Fm({className:e,...t}){return B("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:r("flex w-full min-w-0 flex-col gap-0",e),...t})}function Am({className:e,...t}){return B("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:r("group/menu-item relative",e),...t})}var Em=Xs("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ys({render:e,isActive:t=!1,variant:o="default",size:n="default",tooltip:a,className:s,...l}){let{isMobile:c,state:d}=Lo(),m=Ir({defaultTagName:"button",props:Nr({className:r(Em({variant:o,size:n}),s)},l),render:a?B(Ka,{render:e}):e,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:n,active:t}});return a?(typeof a=="string"&&(a={children:a}),qe($a,{children:[m,B(qa,{side:"right",align:"center",hidden:d!=="collapsed"||c,...a})]})):m}function Bm({className:e,render:t,showOnHover:o=!1,...n}){return Ir({defaultTagName:"button",props:Nr({className:r("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",o&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0",e)},n),render:t,state:{slot:"sidebar-menu-action",sidebar:"menu-action"}})}function Vm({className:e,...t}){return B("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:r("text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-accent-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1",e),...t})}function Hm({className:e,showIcon:t=!1,...o}){let[n]=ie.useState(()=>`${Math.floor(Math.random()*40)+50}%`);return qe("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:r("flex h-8 items-center gap-2 rounded-md px-2",e),...o,children:[t&&B(gn,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),B(gn,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":n}})]})}function Om({className:e,children:t,icon:o,label:n,collapsible:a=!1,trigger:s,open:l,defaultOpen:c,onOpenChange:d,...m}){let{state:f}=Lo();return f==="collapsed"?qe(pr,{children:[B(mr,{render:qe(Zs,{size:"md",isActive:!1,children:[o??B("span",{className:"size-4"}),n&&B("span",{children:n})]})}),B(Co,{side:"right",align:"start",className:"min-w-48",children:ie.Children.map(t,p=>ie.isValidElement(p)&&p.type===Qs?B(fr,{className:"cursor-pointer",children:p}):p)})]}):a?qe(na,{open:l,defaultOpen:c,onOpenChange:d,className:"group/menu-sub-collapsible",children:[qe(aa,{render:B(Ys,{className:"w-full justify-between"}),children:[s??qe(Um,{children:[o??B("span",{className:"size-4"}),n&&B("span",{children:n})]}),B($,{className:"ml-auto size-4 transition-transform duration-200 group-data-[panel-open]/menu-sub-collapsible:rotate-90"})]}),B(ia,{keepMounted:!1,children:B("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:r("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",e),...m,children:t})})]}):B("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:r("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",e),...m,children:t})}function Qs({className:e,...t}){return B("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:r("group/menu-sub-item relative",e),...t})}var Gm=Xs("flex min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",{variants:{size:{sm:"h-6 text-xs gap-1 px-1.5",md:"h-8 text-sm",lg:"h-10 text-sm"}},defaultVariants:{size:"md"}});function Zs({render:e,size:t="md",isActive:o=!1,className:n,...a}){return Ir({defaultTagName:"a",props:Nr({className:r(Gm({size:t}),n)},a),render:e,state:{slot:"sidebar-menu-sub-button",sidebar:"menu-sub-button",size:t,active:o}})}import{Slider as kr}from"@base-ui/react/slider";import{jsx as Sr}from"react/jsx-runtime";function _m({className:e,...t}){return Sr(kr.Root,{"data-slot":"slider",className:r("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50",e),...t})}function $m({className:e,...t}){return Sr(kr.Control,{"data-slot":"slider-control",className:r("relative flex w-full items-center select-none",e),...t})}function Km({className:e,...t}){return Sr(kr.Track,{"data-slot":"slider-track",className:r("bg-muted relative h-1.5 w-full grow overflow-hidden rounded-full",e),...t})}function qm({className:e,...t}){return Sr(kr.Indicator,{"data-slot":"slider-indicator",className:r("bg-primary absolute h-full",e),...t})}function Wm({className:e,...t}){return Sr(kr.Thumb,{"data-slot":"slider-thumb",className:r("border-primary bg-background focus-visible:ring-ring/50 block size-4 rounded-full border-2 shadow-sm transition-colors focus-visible:ring-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",e),...t})}import*as Qt from"react";import{jsx as Wa,jsxs as jm}from"react/jsx-runtime";function Xm({className:e,direction:t="horizontal",defaultSize:o=50,minSize:n=20,maxSize:a=80,onResize:s,first:l,second:c,resizer:d=!0,...m}){let f=Qt.useRef(null),[p,u]=Qt.useState(o),[g,b]=Qt.useState(!1),v=Qt.useCallback(y=>{y.preventDefault(),b(!0);let h=f.current;if(!h)return;let P=t==="horizontal"?y.clientX:y.clientY,w=p,x=t==="horizontal"?h.offsetWidth:h.offsetHeight,C=T=>{let S=(t==="horizontal"?T.clientX:T.clientY)-P,M=w+S/x*100,G=Math.min(Math.max(M,n),a);u(G),s?.(G)},R=()=>{b(!1),document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",R)};document.addEventListener("mousemove",C),document.addEventListener("mouseup",R)},[t,p,n,a,s]);return jm("div",{ref:f,"data-slot":"split-pane","data-direction":t,className:r("flex",t==="horizontal"?"flex-row":"flex-col",g&&"select-none",e),...m,children:[Wa("div",{"data-slot":"split-pane-first",style:{[t==="horizontal"?"width":"height"]:`${p}%`},className:"overflow-auto",children:l}),d&&Wa("div",{"data-slot":"split-pane-resizer",className:r("bg-border hover:bg-ring/50 shrink-0 transition-colors",t==="horizontal"?"w-1 cursor-col-resize":"h-1 cursor-row-resize",g&&"bg-ring"),onMouseDown:v}),Wa("div",{"data-slot":"split-pane-second",style:{[t==="horizontal"?"width":"height"]:`${100-p}%`},className:"overflow-auto",children:c})]})}import*as Fo from"react";import{Fragment as Js,jsx as tt,jsxs as bn}from"react/jsx-runtime";function Ym({className:e,activeStep:t=0,orientation:o="horizontal",children:n}){let a=Fo.Children.toArray(n).filter(Fo.isValidElement);return tt("div",{"data-slot":"stepper",className:r(o==="horizontal"?"flex w-full items-center justify-center":"flex flex-col",e),children:a.map((s,l)=>{let c=l===a.length-1;return Fo.cloneElement(s,{index:l,active:l===t,completed:l<t,last:c,orientation:o})})})}function Qm({className:e,index:t=0,active:o,completed:n,last:a,orientation:s,children:l}){return tt("div",{className:r("flex items-center",s==="horizontal"?a?"shrink-0":"min-w-0 flex-1":"flex-col items-start",e),children:s==="horizontal"?bn(Js,{children:[bn("div",{className:"flex shrink-0 flex-col items-center gap-1",children:[tt("div",{className:r("flex size-8 shrink-0 items-center justify-center rounded-full border-2 text-sm font-medium transition-colors",n&&"border-primary bg-primary text-primary-foreground",o&&"border-primary bg-primary/10 text-primary animate-pulse",!n&&!o&&"border-muted-foreground/30 text-muted-foreground"),children:n?tt(ne,{className:"size-4"}):t+1}),l&&tt("span",{className:r("text-xs font-medium whitespace-nowrap",o?"text-primary":"text-muted-foreground"),children:l})]}),!a&&tt("div",{className:r("mx-2 mt-4 h-0.5 min-w-4 flex-1 self-start",n?"bg-primary":"bg-muted-foreground/30")})]}):bn(Js,{children:[bn("div",{className:"flex items-center gap-2",children:[tt("div",{className:r("flex size-8 shrink-0 items-center justify-center rounded-full border-2 text-sm font-medium transition-colors",n&&"border-primary bg-primary text-primary-foreground",o&&"border-primary bg-primary/10 text-primary animate-pulse",!n&&!o&&"border-muted-foreground/30 text-muted-foreground"),children:n?tt(ne,{className:"size-4"}):t+1}),l&&tt("span",{className:r("text-xs font-medium whitespace-nowrap",o?"text-primary":"text-muted-foreground"),children:l})]}),!a&&tt("div",{className:r("ml-3.5 h-8 w-0.5",n?"bg-primary":"bg-muted-foreground/30")})]})})}import"react";import{jsx as mt}from"react/jsx-runtime";function Zm({className:e,...t}){return mt("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:mt("table",{"data-slot":"table",className:r("w-full caption-bottom text-sm",e),...t})})}function Jm({className:e,...t}){return mt("thead",{"data-slot":"table-header",className:r("[&_tr]:border-b",e),...t})}function ef({className:e,...t}){return mt("tbody",{"data-slot":"table-body",className:r("[&_tr:last-child]:border-0",e),...t})}function tf({className:e,...t}){return mt("tfoot",{"data-slot":"table-footer",className:r("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t})}function of({className:e,...t}){return mt("tr",{"data-slot":"table-row",className:r("hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function rf({className:e,...t}){return mt("th",{"data-slot":"table-head",className:r("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0",e),...t})}function nf({className:e,...t}){return mt("td",{"data-slot":"table-cell",className:r("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",e),...t})}function af({className:e,...t}){return mt("caption",{"data-slot":"table-caption",className:r("text-muted-foreground mt-4 text-sm",e),...t})}import{Tabs as vn}from"@base-ui/react/tabs";import{cva as sf}from"class-variance-authority";import{jsx as xn}from"react/jsx-runtime";function lf({className:e,orientation:t="horizontal",...o}){return xn(vn.Root,{"data-slot":"tabs","data-orientation":t,className:r("group/tabs flex gap-2 data-horizontal:flex-col",e),...o})}var el=sf("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function cf({className:e,variant:t="default",...o}){return xn(vn.List,{"data-slot":"tabs-list","data-variant":t,className:r(el({variant:t}),e),...o})}function df({className:e,...t}){return xn(vn.Tab,{"data-slot":"tabs-trigger",className:r("text-foreground/60 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}function uf({className:e,...t}){return xn(vn.Panel,{"data-slot":"tabs-content",className:r("flex-1 text-sm outline-none",e),...t})}import*as hn from"react";import{jsx as Xa,jsxs as tl}from"react/jsx-runtime";function pf({value:e=[],onChange:t,placeholder:o="Add tag...",max:n,disabled:a,className:s}){let[l,c]=hn.useState(""),d=hn.useRef(null),m=u=>{let g=u.trim();g&&(n&&e.length>=n||e.includes(g)||(t?.([...e,g]),c("")))},f=u=>{t?.(e.filter((g,b)=>b!==u))},p=u=>{(u.key==="Enter"||u.key===",")&&(u.preventDefault(),m(l)),u.key==="Backspace"&&!l&&e.length>0&&f(e.length-1)};return tl("div",{"data-slot":"tags-input",className:r("flex min-h-8 flex-wrap items-center gap-1.5 rounded-md border bg-transparent px-2 py-1 text-sm",a&&"cursor-not-allowed opacity-50",s),onClick:()=>d.current?.focus(),children:[e.map((u,g)=>tl(et,{variant:"secondary",className:"gap-1",children:[u,!a&&Xa("button",{type:"button",onClick:b=>{b.stopPropagation(),f(g)},className:"hover:bg-muted-foreground/20 ml-0.5 rounded-full",children:Xa(U,{className:"size-3"})})]},g)),Xa("input",{ref:d,value:l,onChange:u=>c(u.target.value),onKeyDown:p,placeholder:e.length===0?o:"",disabled:a||!!(n&&e.length>=n),className:"placeholder:text-muted-foreground min-w-[80px] flex-1 bg-transparent outline-none disabled:cursor-not-allowed"})]})}import"react";import{cva as mf}from"class-variance-authority";import{jsx as Fe,jsxs as ja}from"react/jsx-runtime";function ff({className:e,...t}){return Fe("div",{"data-slot":"timeline",className:r("flex flex-col",e),...t})}var ol=mf("flex size-8 shrink-0 items-center justify-center rounded-full border-2 bg-background",{variants:{variant:{default:"border-muted-foreground",success:"border-success text-success",warning:"border-warning text-warning",destructive:"border-destructive text-destructive",info:"border-info text-info"}},defaultVariants:{variant:"default"}});function gf({className:e,icon:t,title:o,description:n,time:a,status:s,variant:l,children:c,...d}){let m=l??(s==="completed"?"success":s==="current"?"info":"default");return ja("div",{className:r("relative flex gap-4",e),...d,children:[ja("div",{className:"flex flex-col items-center self-stretch",children:[Fe(rl,{variant:m,children:t?Fe(t,{className:"size-4"}):null}),Fe(nl,{})]}),ja(al,{className:"pb-8 last:pb-0",children:[o!==void 0?Fe(il,{children:o}):null,n!==void 0?Fe(sl,{children:n}):null,a!==void 0?Fe(ll,{children:a}):null,c]})]})}function rl({className:e,variant:t,children:o,...n}){return Fe("div",{className:r(ol({variant:t}),e),...n,children:o})}function nl({className:e,...t}){return Fe("div",{className:r("bg-border mx-auto w-px flex-1",e),...t})}function al({className:e,...t}){return Fe("div",{className:r("flex-1 pt-1",e),...t})}function il({className:e,...t}){return Fe("h3",{className:r("text-sm leading-none font-semibold",e),...t})}function sl({className:e,...t}){return Fe("p",{className:r("text-muted-foreground mt-1 text-sm",e),...t})}function ll({className:e,...t}){return Fe("time",{className:r("text-muted-foreground mt-1 text-xs",e),...t})}import{Toggle as bf}from"@base-ui/react/toggle";import{cva as vf}from"class-variance-authority";import{jsx as hf}from"react/jsx-runtime";var yn=vf("group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-muted"},size:{default:"h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",sm:"h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"}},defaultVariants:{variant:"default",size:"default"}});function xf({className:e,variant:t="default",size:o="default",...n}){return hf(bf,{"data-slot":"toggle",className:r(yn({variant:t,size:o,className:e})),...n})}import*as Pn from"react";import{Toggle as yf}from"@base-ui/react/toggle";import{ToggleGroup as Pf}from"@base-ui/react/toggle-group";import"class-variance-authority";import{jsx as Ya}from"react/jsx-runtime";var cl=Pn.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});function Qa({className:e,variant:t,size:o,spacing:n=2,orientation:a="horizontal",children:s,...l}){return Ya(Pf,{"data-slot":"toggle-group","data-variant":t,"data-size":o,"data-spacing":n,"data-orientation":a,style:{"--gap":n},className:r("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-vertical:flex-col data-vertical:items-stretch data-[size=sm]:rounded-[min(var(--radius-md),10px)]",e),...l,children:Ya(cl.Provider,{value:{variant:t,size:o,spacing:n,orientation:a},children:s})})}function Za({className:e,children:t,variant:o="default",size:n="default",...a}){let s=Pn.useContext(cl);return Ya(yf,{"data-slot":"toggle-group-item","data-variant":s.variant||o,"data-size":s.size||n,"data-spacing":s.spacing,className:r("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",yn({variant:s.variant||o,size:s.size||n}),e),...a,children:t})}import*as ft from"react";import{jsx as q,jsxs as Me}from"react/jsx-runtime";function dl({node:e,level:t=0,selectedIds:o,expandedIds:n,onToggleExpand:a,onSelect:s,multiple:l}){let c=e.children&&e.children.length>0,d=n.has(e.id),m=o.has(e.id),f=e.disabled;return Me("div",{children:[Me("div",{className:r("hover:bg-muted flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 transition-colors",m&&"bg-muted",f&&"cursor-not-allowed opacity-50"),style:{paddingLeft:`${t*16+8}px`},onClick:()=>!f&&s(e),children:[c?q(N,{variant:"ghost",size:"icon-xs",onClick:p=>{p.stopPropagation(),a(e.id)},disabled:f,className:"shrink-0",children:q($,{className:r("size-3 transition-transform",d&&"rotate-90")})}):q("div",{className:"size-4"}),l&&q(De,{checked:m,disabled:f}),q("span",{className:"text-muted-foreground shrink-0",children:e.icon||(c?q(Jo,{className:"size-4"}):q(Pt,{className:"size-4"}))}),q("span",{className:"flex-1 truncate text-sm",children:e.label})]}),c&&d&&q("div",{children:e.children.map(p=>q(dl,{node:p,level:t+1,selectedIds:o,expandedIds:n,onToggleExpand:a,onSelect:s,...l!==void 0?{multiple:l}:{}},p.id))})]})}function ul(e,t){for(let o of e){if(o.id===t)return o;if(o.children){let n=ul(o.children,t);if(n)return n}}}function Cf({value:e,defaultValue:t,placeholder:o="Select...",disabled:n,multiple:a=!1,maxCount:s,data:l,onChange:c,className:d}){let[m,f]=ft.useState(!1),[p,u]=ft.useState(""),[g,b]=ft.useState([]),[v,y]=ft.useState(Array.isArray(t)?t:t?[t]:[]),h=ft.useMemo(()=>e!==void 0?Array.isArray(e)?e:[e]:v,[e,v]),P=ft.useMemo(()=>new Set(h),[h]),w=ft.useMemo(()=>{if(!p)return l;let S=p.toLowerCase(),M=G=>G.reduce((Q,F)=>{let I=F.label.toLowerCase().includes(S),L=F.children?M(F.children):[];return(I||L.length>0)&&Q.push({...F,children:L.length>0?L:F.children??[]}),Q},[]);return M(l)},[l,p]),x=S=>{b(M=>M.includes(S)?M.filter(G=>G!==S):[...M,S])},C=S=>{let M;a?M=h.includes(S.id)?h.filter(Q=>Q!==S.id):[...h,S.id]:(M=[S.id],f(!1)),y(M),c?.(a?M:M[0])},R=S=>{let M=h.filter(G=>G!==S);y(M),c?.(a?M:M[0])},T=S=>{S.stopPropagation(),y([]),c?.(a?[]:void 0)},k=S=>ul(l,S)?.label||S;return q("div",{"data-slot":"tree-select",className:r("w-full",d),children:Me(Ce,{open:m,onOpenChange:f,children:[Me(Ee,{render:q("div",{className:r("border-input flex min-h-8 w-full items-center gap-1 rounded-lg border bg-transparent px-2.5 py-1 text-sm transition-colors","focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-3","disabled:cursor-not-allowed disabled:opacity-50","dark:bg-input/30",n&&"cursor-not-allowed opacity-50")}),disabled:n,children:[h.length>0?q("div",{className:"flex flex-1 flex-wrap gap-1",children:h.map(S=>Me(et,{variant:"secondary",className:"gap-1",children:[q("span",{children:k(S)}),!n&&Me("button",{onClick:M=>{M.stopPropagation(),R(S)},className:"hover:bg-muted ml-0.5 rounded-full",children:[q(U,{className:"size-3"}),q("span",{className:"sr-only",children:"Remove"})]})]},S))}):q("span",{className:"text-muted-foreground flex-1",children:o}),h.length>0&&!n&&Me(N,{variant:"ghost",size:"icon-xs",onClick:T,className:"shrink-0",children:[q(U,{className:"size-3"}),q("span",{className:"sr-only",children:"Clear all"})]})]}),Me(we,{className:"sm:max-w-md",children:[q(Re,{children:q(Ne,{children:"Select"})}),Me("div",{className:"relative",children:[q(be,{className:"text-muted-foreground absolute top-1/2 left-2.5 size-4 -translate-y-1/2"}),q(_,{value:p,onChange:S=>u(S.target.value),placeholder:"Search...",className:"pl-8"})]}),q(jt,{className:"h-[300px]",children:Me("div",{className:"space-y-0.5",children:[w.map(S=>q(dl,{node:S,selectedIds:P,expandedIds:new Set(g),onToggleExpand:x,onSelect:C,multiple:a},S.id)),w.length===0&&Me("div",{className:"text-muted-foreground flex flex-col items-center justify-center py-8",children:[q(Jo,{className:"mb-2 size-8"}),q("p",{className:"text-sm",children:"No items found"})]})]})}),a&&Me("div",{className:"text-muted-foreground flex items-center justify-between text-sm",children:[Me("span",{children:[h.length," item(s) selected"]}),s&&Me("span",{children:["Max: ",s]})]})]})]})})}import*as Zt from"react";import{jsx as He,jsxs as pl}from"react/jsx-runtime";function ml(e,t){return{id:String(e[t.key]??""),label:String(e[t.label]??""),...Array.isArray(e[t.children])?{children:e[t.children].map(o=>ml(o,t))}:{},disabled:!!e[t.disabled],icon:e[t.icon]}}function wf(e,t){let o={key:t?.key??"id",label:t?.label??"label",children:t?.children??"children",disabled:t?.disabled??"disabled",icon:t?.icon??"icon"};return e.map(n=>ml(n,o))}function fl({node:e,level:t=0,selectedIds:o,expandedIds:n,onToggleExpand:a,onSelect:s,showCheckbox:l=!1,showIcon:c=!0,disabled:d=!1}){let m=e.children&&e.children.length>0,f=n.has(e.id),p=o.has(e.id),u=!!(d||e.disabled);return pl("div",{children:[pl("div",{className:r("hover:bg-muted flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 transition-colors",p&&"bg-muted",u&&"cursor-not-allowed opacity-50"),style:{paddingLeft:`${t*16+8}px`},onClick:()=>!u&&s(e.id),children:[m?He(N,{variant:"ghost",size:"icon-xs",onClick:g=>{g.stopPropagation(),a(e.id)},disabled:u,className:"shrink-0",children:He($,{className:r("size-3 transition-transform",f&&"rotate-90")})}):He("div",{className:"size-4"}),l&&He(De,{checked:p,disabled:u}),c&&He("span",{className:"text-muted-foreground shrink-0",children:e.icon||(m?He(Jo,{className:"size-4"}):He(Pt,{className:"size-4"}))}),He("span",{className:"flex-1 truncate text-sm",children:e.label})]}),m&&f&&He("div",{children:e.children.map(g=>He(fl,{node:g,level:t+1,selectedIds:o,expandedIds:n,onToggleExpand:a,onSelect:s,showCheckbox:l,showIcon:c,disabled:u},g.id))})]})}function Rf({data:e,selectedIds:t,defaultSelectedIds:o=[],expandedIds:n,defaultExpandedIds:a=[],onSelect:s,onExpand:l,showCheckbox:c=!1,showIcon:d=!0,disabled:m=!1,className:f,fieldNames:p}){let u=Zt.useMemo(()=>p?wf(e,p):e,[e,p]),[g,b]=Zt.useState(o),[v,y]=Zt.useState(a),h=t??g,P=n??v,w=Zt.useMemo(()=>new Set(h),[h]),x=Zt.useMemo(()=>new Set(P),[P]),C=T=>{let k=x.has(T)?P.filter(S=>S!==T):[...P,T];y(k),l?.(k)},R=T=>{let k=w.has(T)?h.filter(S=>S!==T):[...h,T];b(k),s?.(k)};return He("div",{"data-slot":"tree-view",className:r("space-y-0.5",f),children:u.map(T=>He(fl,{node:T,selectedIds:w,expandedIds:x,onToggleExpand:C,onSelect:R,showCheckbox:c,showIcon:d,disabled:m},T.id))})}import*as Ao from"react";import{jsx as W,jsxs as ye}from"react/jsx-runtime";var Nf=[{id:"1",name:"John Doe",email:"john@example.com",department:"Engineering"},{id:"2",name:"Jane Smith",email:"jane@example.com",department:"Design"},{id:"3",name:"Bob Johnson",email:"bob@example.com",department:"Marketing"},{id:"4",name:"Alice Williams",email:"alice@example.com",department:"Engineering"},{id:"5",name:"Charlie Brown",email:"charlie@example.com",department:"Sales"}];function If({value:e,defaultValue:t,placeholder:o="Select user...",disabled:n,multiple:a=!1,maxCount:s,users:l=Nf,onChange:c,className:d}){let[m,f]=Ao.useState(!1),[p,u]=Ao.useState(""),[g,b]=Ao.useState(Array.isArray(t)?t:t?[t]:[]),v=e?Array.isArray(e)?e:[e]:g,y=Ao.useMemo(()=>{if(!p)return l;let x=p.toLowerCase();return l.filter(C=>C.name.toLowerCase().includes(x)||C.email?.toLowerCase().includes(x)||C.department?.toLowerCase().includes(x))},[l,p]),h=x=>{let C;if(a){let R=v.some(T=>T.id===x.id);if(!R&&s&&v.length>=s)return;C=R?v.filter(T=>T.id!==x.id):[...v,x]}else C=[x],f(!1);b(C),c?.(a?C:C[0])},P=x=>{let C=v.filter(R=>R.id!==x);b(C),c?.(a?C:C[0])},w=x=>{x.stopPropagation(),b([]),c?.(a?[]:void 0)};return W("div",{"data-slot":"user-browse",className:r("w-full",d),children:ye("div",{className:r("border-input flex min-h-8 w-full items-center gap-1 rounded-lg border bg-transparent px-2.5 py-1 text-sm transition-colors","focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-3","disabled:cursor-not-allowed disabled:opacity-50","dark:bg-input/30",n&&"cursor-not-allowed opacity-50"),children:[ye(Ce,{open:m,onOpenChange:f,children:[W(Ee,{render:W("button",{type:"button",className:"flex flex-1 items-center gap-1 text-left"}),disabled:n,children:v.length>0?W("div",{className:"flex flex-1 flex-wrap gap-1",children:v.map(x=>ye(et,{variant:"secondary",className:"gap-1",children:[ye(on,{className:"size-4",children:[W(rn,{src:x.avatar}),W(nn,{className:"text-[0.5rem]",children:x.name.charAt(0)})]}),W("span",{children:x.name}),!n&&ye("button",{onClick:C=>{C.stopPropagation(),P(x.id)},className:"hover:bg-muted ml-0.5 rounded-full",children:[W(U,{className:"size-3"}),W("span",{className:"sr-only",children:"Remove"})]})]},x.id))}):W("span",{className:"text-muted-foreground flex-1",children:o})}),ye(we,{className:"sm:max-w-md",children:[W(Re,{children:W(Ne,{children:"Select User"})}),ye("div",{className:"relative",children:[W(be,{className:"text-muted-foreground absolute top-1/2 left-2.5 size-4 -translate-y-1/2"}),W(_,{value:p,onChange:x=>u(x.target.value),placeholder:"Search users...",className:"pl-8"})]}),W(jt,{className:"h-[300px]",children:ye("div",{className:"space-y-1",children:[y.map(x=>{let C=v.some(R=>R.id===x.id);return ye("div",{className:r("hover:bg-muted flex cursor-pointer items-center gap-3 rounded-md p-2",C&&"bg-muted"),onClick:()=>h(x),children:[a&&W(De,{checked:C}),ye(on,{className:"size-8",children:[W(rn,{src:x.avatar}),W(nn,{children:W(_n,{className:"size-4"})})]}),ye("div",{className:"min-w-0 flex-1",children:[W("p",{className:"truncate text-sm font-medium",children:x.name}),x.email&&W("p",{className:"text-muted-foreground truncate text-xs",children:x.email})]}),x.department&&W(et,{variant:"outline",className:"shrink-0",children:x.department})]},x.id)}),y.length===0&&ye("div",{className:"text-muted-foreground flex flex-col items-center justify-center py-8",children:[W(_n,{className:"mb-2 size-8"}),W("p",{className:"text-sm",children:"No users found"})]})]})}),a&&ye("div",{className:"text-muted-foreground flex items-center justify-between text-sm",children:[ye("span",{children:[v.length," user(s) selected"]}),s&&ye("span",{children:["Max: ",s]})]})]})]}),v.length>0&&!n&&ye(N,{variant:"ghost",size:"icon-xs",onClick:w,className:"shrink-0",children:[W(U,{className:"size-3"}),W("span",{className:"sr-only",children:"Clear all"})]})]})})}import*as wn from"react";import{useVirtualizer as kf}from"@tanstack/react-virtual";import{jsx as Cn,jsxs as Tf}from"react/jsx-runtime";function Sf({data:e,renderItem:t,estimateSize:o,overscan:n=5,height:a,width:s="100%",className:l,onEndReached:c,endReachedThreshold:d=100,loading:m=!1,loadingComponent:f,emptyComponent:p}){let u=wn.useRef(null),g=kf({count:e.length,getScrollElement:()=>u.current,estimateSize:()=>o,overscan:n});return wn.useEffect(()=>{let b=u.current;if(!b||!c)return;let v=()=>{let{scrollTop:y,scrollHeight:h,clientHeight:P}=b;h-y-P<d&&c()};return b.addEventListener("scroll",v),()=>b.removeEventListener("scroll",v)},[c,d]),e.length===0&&!m?p||Cn("div",{className:"text-muted-foreground flex items-center justify-center p-8",children:"No data"}):Tf("div",{ref:u,"data-slot":"virtual-list",className:r("overflow-auto",l),style:{height:a,width:s},children:[Cn("div",{style:{height:`${g.getTotalSize()}px`,width:"100%",position:"relative"},children:g.getVirtualItems().map(b=>Cn("div",{"data-slot":"virtual-list-item",style:{position:"absolute",top:0,left:0,width:"100%",height:`${b.size}px`,transform:`translateY(${b.start}px)`},children:t(e[b.index],b.index)},b.key))}),m&&f&&Cn("div",{className:"flex items-center justify-center p-4",children:f})]})}import*as Rn from"react";import{useVirtualizer as Mf}from"@tanstack/react-virtual";import{jsx as Jt,jsxs as Df}from"react/jsx-runtime";function zf({columns:e,data:t,estimateRowHeight:o,overscan:n=5,height:a,width:s="100%",className:l,onRowClick:c,loading:d=!1,loadingComponent:m,emptyComponent:f}){let p=Rn.useRef(null),u=Mf({count:t.length,getScrollElement:()=>p.current,estimateSize:()=>o,overscan:n}),g=Rn.useMemo(()=>e.map(b=>typeof b.width=="number"?`${b.width}px`:b.width??"1fr").join(" "),[e]);return t.length===0&&!d?f||Jt("div",{className:"text-muted-foreground flex items-center justify-center p-8",children:"No data"}):Df("div",{ref:p,"data-slot":"virtual-table",className:r("bg-background relative w-full overflow-auto rounded-md border text-sm",l),style:{height:a,width:s},children:[Jt("div",{"data-slot":"virtual-table-header",role:"row",className:"bg-background text-foreground sticky top-0 z-10 grid border-b font-medium",style:{gridTemplateColumns:g},children:e.map(b=>Jt("div",{role:"columnheader","data-slot":"virtual-table-head",className:"flex h-10 items-center px-2 whitespace-nowrap",children:b.header},b.key))}),Jt("div",{"data-slot":"virtual-table-body",style:{position:"relative",height:`${u.getTotalSize()}px`},children:u.getVirtualItems().map(b=>{let v=t[b.index];return Jt("div",{"data-index":b.index,"data-slot":"virtual-table-row",ref:y=>u.measureElement(y),role:"row",className:r("hover:bg-muted/50 absolute left-0 grid w-full border-b transition-colors",c&&"cursor-pointer"),style:{transform:`translateY(${b.start}px)`,height:`${b.size}px`,gridTemplateColumns:g},onClick:c?()=>c(v):void 0,children:e.map(y=>{let h=y.render?y.render(v):String(y.accessor?y.accessor(v):v[y.key]??"");return Jt("div",{role:"cell","data-slot":"virtual-table-cell",className:"flex items-center px-2 whitespace-nowrap",children:h},y.key)})},b.key)})}),d&&m&&Jt("div",{className:"flex items-center justify-center p-4",children:m})]})}import"react";import{jsx as Af}from"react/jsx-runtime";var gl={xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},Lf={start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline",stretch:"items-stretch"};function Ff({className:e,direction:t="horizontal",size:o="md",align:n,wrap:a=!1,...s}){let l=t==="vertical",c=typeof o=="number"?void 0:gl[o]??gl.md,d={...s.style};return typeof o=="number"&&(d.gap=`${o}px`),Af("div",{"data-slot":"space",className:r("flex",l?"flex-col":"flex-row",c,n&&Lf[n],a&&"flex-wrap",e),style:d,...s})}import"react";import{jsx as Of}from"react/jsx-runtime";var bl={none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},Ef={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},Bf={start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline",stretch:"items-stretch"},Vf={row:"flex-row",col:"flex-col","row-reverse":"flex-row-reverse","col-reverse":"flex-col-reverse"};function Hf({className:e,direction:t="row",justify:o,align:n,gap:a="md",wrap:s=!1,grow:l,shrink:c,basis:d,style:m,...f}){let p=typeof a=="number"?void 0:bl[a]??bl.md,u={...m,...typeof a=="number"?{gap:`${a}px`}:{},...l!==void 0?{flexGrow:l}:{},...c!==void 0?{flexShrink:c}:{},...d!==void 0?{flexBasis:typeof d=="number"?`${d}px`:d}:{}};return Of("div",{"data-slot":"flex",className:r("flex",Vf[t],p,o&&Ef[o],n&&Bf[n],s&&"flex-wrap",e),style:u,...f})}import"react";import{jsx as Tr,jsxs as Uf}from"react/jsx-runtime";function Gf({className:e,orientation:t="center",type:o="horizontal",dashed:n=!1,plain:a=!1,children:s,...l}){return o==="vertical"?Tr("div",{role:"separator","aria-orientation":"vertical","data-slot":"divider","data-type":"vertical",className:r("inline-flex h-full w-px shrink-0 self-stretch bg-border",n&&"border-l border-dashed bg-transparent",e),...l}):s?Uf("div",{role:"separator","aria-orientation":"horizontal","data-slot":"divider","data-type":"horizontal",className:r("flex w-full items-center",t==="left"&&"justify-start",t==="center"&&"justify-center",t==="right"&&"justify-end",e),...l,children:[(t==="left"||t==="center")&&Tr("div",{className:r("h-px flex-1 bg-border",n&&"border-t border-dashed bg-transparent",t==="center"&&"max-w-[50%]")}),Tr("span",{className:r("shrink-0 px-3 text-sm text-muted-foreground",a&&"text-muted-foreground/80"),children:s}),Tr("div",{className:r("h-px flex-1 bg-border",n&&"border-t border-dashed bg-transparent")})]}):Tr("div",{role:"separator","aria-orientation":"horizontal","data-slot":"divider","data-type":"horizontal",className:r("h-px w-full bg-border",n&&"border-t border-dashed bg-transparent",e),...l})}import"react";import{jsx as ot}from"react/jsx-runtime";var _f={1:"text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl",2:"text-2xl font-semibold tracking-tight md:text-3xl",3:"text-xl font-semibold tracking-tight md:text-2xl",4:"text-lg font-semibold md:text-xl",5:"text-base font-semibold md:text-lg",6:"text-sm font-semibold md:text-base"};function Eo(e){let t=`h${e}`;function o({ref:n,className:a,...s}){return ot(t,{ref:n,"data-slot":`h${e}`,className:r(_f[e],a),...s})}return o.displayName=`Typography.H${e}`,o}var vl=Eo(1),xl=Eo(2),hl=Eo(3),yl=Eo(4),Pl=Eo(5),Cl=Eo(6),$f={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl"},Kf={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},qf={default:"text-foreground",muted:"text-muted-foreground",primary:"text-primary",secondary:"text-secondary-foreground",destructive:"text-destructive",success:"text-emerald-600 dark:text-emerald-400",warning:"text-amber-600 dark:text-amber-400"};function wl({className:e,size:t="base",weight:o="normal",variant:n="default",italic:a=!1,underline:s=!1,strike:l=!1,truncate:c=!1,...d}){return ot("span",{"data-slot":"text",className:r($f[t],Kf[o],qf[n],a&&"italic",s&&"underline underline-offset-4",l&&"line-through",c&&"truncate",e),...d})}function Rl({className:e,muted:t=!1,truncate:o=!1,lead:n=!1,...a}){return ot("p",{"data-slot":"paragraph",className:r("text-base leading-relaxed",t&&"text-muted-foreground",n&&"text-lg text-muted-foreground",o&&"truncate",e),...a})}function Nl({className:e,...t}){return ot("blockquote",{"data-slot":"blockquote",className:r("border-l-4 border-primary pl-4 italic text-muted-foreground",e),...t})}function Il({className:e,...t}){return ot("code",{"data-slot":"code",className:r("rounded bg-muted px-1.5 py-0.5 font-mono text-sm text-foreground",e),...t})}function kl({className:e,...t}){return ot("p",{"data-slot":"lead",className:r("text-xl text-muted-foreground leading-relaxed",e),...t})}function Sl({className:e,...t}){return ot("div",{"data-slot":"large",className:r("text-lg font-semibold",e),...t})}function Tl({className:e,...t}){return ot("small",{"data-slot":"small",className:r("text-sm font-medium leading-none",e),...t})}function Ml({className:e,...t}){return ot("p",{"data-slot":"muted",className:r("text-sm text-muted-foreground",e),...t})}function zl({className:e,...t}){return ot("ul",{"data-slot":"list",className:r("ml-6 list-disc [&>li]:mt-2 [&>li]:leading-relaxed",e),...t})}var Wf={H1:vl,H2:xl,H3:hl,H4:yl,H5:Pl,H6:Cl,Text:wl,Paragraph:Rl,Blockquote:Nl,InlineCode:Il,Lead:kl,Large:Sl,Small:Tl,Muted:Ml,List:zl};import"react";import{jsx as Bo,jsxs as Ll}from"react/jsx-runtime";var Dl={xs:"size-3",sm:"size-4",md:"size-5",lg:"size-7",xl:"size-9"},Xf={xs:"border",sm:"border-2",md:"border-2",lg:"border-[3px]",xl:"border-4"},Ja={primary:"text-primary",secondary:"text-secondary-foreground",muted:"text-muted-foreground",destructive:"text-destructive",current:"text-current"};function Vo({className:e,size:t="md",variant:o="circle",color:n="primary",label:a="Loading",...s}){return o==="dots"?Ll("span",{role:"status","aria-label":a,"data-slot":"spinner","data-variant":"dots",className:r("inline-flex items-center gap-1",Ja[n],e),...s,children:[[0,1,2].map(l=>Bo("span",{className:r("animate-bounce rounded-full bg-current",Dl[t]),style:{animationDelay:`${l*150}ms`,animationDuration:"1s"}},l)),Bo("span",{className:"sr-only",children:a})]}):o==="bars"?Ll("span",{role:"status","aria-label":a,"data-slot":"spinner","data-variant":"bars",className:r("inline-flex items-end gap-0.5",Ja[n],e),...s,children:[[0,1,2,3].map(l=>Bo("span",{className:"animate-pulse bg-current",style:{width:"3px",height:"100%",animationDelay:`${l*100}ms`,animationDuration:"1s"}},l)),Bo("span",{className:"sr-only",children:a})]}):Bo("span",{role:"status","aria-label":a,"data-slot":"spinner","data-variant":"circle",className:r("inline-block animate-spin rounded-full border-current border-t-transparent",Dl[t],Xf[t],Ja[n],e),...s,children:Bo("span",{className:"sr-only",children:a})})}import*as Bl from"react";import{Search as Fl,X as Al}from"lucide-react";import{jsx as We,jsxs as El}from"react/jsx-runtime";function jf({className:e,placeholder:t="Search...",allowClear:o=!1,enterButton:n=!1,onSearch:a,onChange:s,size:l="default",loading:c=!1,defaultValue:d,value:m,...f}){let[p,u]=Bl.useState(d??""),g=m!==void 0,b=g?m:p,v=x=>{let C=x.target.value;g||u(C),s?.(C,x)},y=x=>{a?.(String(b),x)},h=x=>{x.key==="Enter"&&y(x),f.onKeyDown?.(x)},P=()=>{g||u(""),s?.(""),a?.("")},w=l==="sm"?"h-7":l==="lg"?"h-9":"h-8";return n?El("div",{"data-slot":"input-search",className:r("flex w-full items-stretch",e),children:[We(_,{type:"search",placeholder:t,value:b,onChange:v,onKeyDown:h,className:r(w,"rounded-r-none",o&&b&&"pr-7"),...f}),o&&b&&!c&&We("button",{type:"button",onClick:P,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:We(Al,{className:"size-3.5"})}),We(N,{type:"button",onClick:y,disabled:c,className:r("rounded-l-none border-l-0",w),children:c?We("span",{className:"animate-spin",children:"\u23F3"}):typeof n=="boolean"?We(Fl,{className:"size-4"}):n})]}):El("div",{"data-slot":"input-search",className:r("relative w-full",e),children:[We(Fl,{className:"pointer-events-none absolute left-2 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),We(_,{type:"search",placeholder:t,value:b,onChange:v,onKeyDown:h,className:r(w,"pl-8",o&&b&&"pr-7"),...f}),o&&b&&!c&&We("button",{type:"button",onClick:P,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:We(Al,{className:"size-3.5"})}),c&&We("span",{className:"absolute right-2 top-1/2 -translate-y-1/2 animate-spin",children:"\u23F3"})]})}import*as zr from"react";import{ChevronUp as Yf,ChevronDown as Qf}from"lucide-react";import{jsx as Mr,jsxs as Vl}from"react/jsx-runtime";function Zf({className:e,value:t,defaultValue:o=null,min:n=-1/0,max:a=1/0,step:s=1,precision:l,controls:c=!0,disabled:d=!1,readOnly:m=!1,size:f="default",onChange:p,parser:u,formatter:g,nullAsUndefined:b=!1,...v}){let[y,h]=zr.useState(o),[P,w]=zr.useState(""),x=t!==void 0,C=x?t:y;zr.useEffect(()=>{C==null?w(""):w(g?g(C):String(C))},[C,g]);let R=I=>Math.min(Math.max(I,n),a),T=I=>{if(l!==void 0){let L=Math.pow(10,l);return Math.round(I*L)/L}return I},k=I=>{if(I===null||isNaN(I)){x||h(null),p?.(b?void 0:null);return}let L=T(R(I));x||h(L),p?.(L)},S=I=>{let L=I.target.value;if(w(L),L===""){k(null);return}let z=u?u(L):parseFloat(L);isNaN(z)||k(z)},M=I=>{if(d||m)return;let L=Number.isFinite(n)?n:0,z=C??L,O=I==="up"?z+s:z-s;k(O)},G=I=>{d||m||(I.key==="ArrowUp"?(I.preventDefault(),M("up")):I.key==="ArrowDown"&&(I.preventDefault(),M("down")),v.onKeyDown?.(I))},Q=I=>{P!==""&&C!==null&&w(g?g(C):String(C)),v.onBlur?.(I)},F=f==="sm"?"h-7 text-sm":f==="lg"?"h-9 text-base":"h-8 text-sm";return Vl("div",{"data-slot":"input-number",className:r("relative inline-flex w-full items-center",d&&"opacity-50",e),children:[Mr("input",{type:"text",inputMode:"decimal",disabled:d,readOnly:m,value:P,onChange:S,onKeyDown:G,onBlur:Q,className:r("w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-right transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 dark:bg-input/30 dark:disabled:bg-input/80",F,c&&"pr-7"),...v}),c&&!m&&Vl("div",{className:"absolute right-0 top-0 flex h-full flex-col",children:[Mr("button",{type:"button",tabIndex:-1,disabled:d||C!==null&&C>=a,onClick:()=>M("up"),className:"flex flex-1 items-center justify-center px-1.5 text-muted-foreground hover:text-foreground disabled:opacity-30","aria-label":"Increase",children:Mr(Yf,{className:"size-3"})}),Mr("button",{type:"button",tabIndex:-1,disabled:d||C!==null&&C<=n,onClick:()=>M("down"),className:"flex flex-1 items-center justify-center px-1.5 text-muted-foreground hover:text-foreground disabled:opacity-30","aria-label":"Decrease",children:Mr(Qf,{className:"size-3"})})]})]})}import*as ti from"react";import{CalendarIcon as Jf}from"lucide-react";import{jsx as Dr,jsxs as ei}from"react/jsx-runtime";function eg(e,t){if(!e)return"";let o=t||"yyyy-MM-dd",n=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return o.replace("yyyy",String(n)).replace("MM",a).replace("dd",s).replace("HH",String(e.getHours()).padStart(2,"0")).replace("mm",String(e.getMinutes()).padStart(2,"0")).replace("ss",String(e.getSeconds()).padStart(2,"0"))}function tg({value:e,defaultValue:t=null,format:o,placeholder:n="Select date",disabled:a=!1,readOnly:s=!1,allowClear:l=!1,locale:c,disabledDate:d,onChange:m,size:f="default",trigger:p,className:u}){let[g,b]=ti.useState(t),[v,y]=ti.useState(!1),h=e!==void 0,P=h?e:g,w=R=>{h||b(R),m?.(R),R&&y(!1)},x=f==="sm"?"h-7 text-sm":f==="lg"?"h-9 text-base":"h-8 text-sm",C=P?eg(P,o):"";return ei("div",{"data-slot":"date-picker",className:r("relative inline-block",u),children:[ei(ue,{open:v,onOpenChange:y,children:[Dr(pe,{render:p??ei(N,{variant:"outline",size:f==="sm"?"sm":f==="lg"?"lg":"default",disabled:a||s,className:r(x,"w-full justify-start font-normal",!C&&"text-muted-foreground"),children:[Dr(Jf,{className:"size-4 shrink-0"}),C||n]})}),Dr(me,{className:"w-auto p-0",align:"start",children:Dr(Xn,{mode:"single",selected:P??void 0,onSelect:R=>w(R??null),disabled:d})})]}),l&&P&&!a&&!s&&Dr("button",{type:"button",onClick:()=>w(null),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear date",children:"\xD7"})]})}import*as Hl from"react";import{jsx as Xe,jsxs as Dt}from"react/jsx-runtime";var og={sm:"text-xs px-2 py-1.5",default:"text-sm px-3 py-2",lg:"text-base px-4 py-3"},rg={sm:"text-xs px-1.5 py-1",default:"text-xs px-2 py-1.5",lg:"text-sm px-3 py-2"};function ng({className:e,title:t,extra:o,column:n=3,layout:a="horizontal",bordered:s=!0,size:l="default",variant:c="default",colon:d=!0,items:m=[],contentStyle:f,labelStyle:p,...u}){let g=typeof n=="number"?n:3,b=c==="compact"?rg[l]:og[l];return c==="inline"?Dt("div",{"data-slot":"descriptions",className:r("w-full",e),...u,children:[(t||o)&&Dt("div",{className:"mb-3 flex items-center justify-between",children:[t&&Xe("h3",{className:"text-base font-semibold text-foreground",children:t}),o&&Xe("div",{children:o})]}),Xe("div",{className:"flex flex-wrap gap-x-6 gap-y-1 text-sm",children:m.map((v,y)=>Dt("div",{className:"flex gap-1.5",children:[Dt("span",{className:"font-medium text-muted-foreground",children:[v.label,d&&":"]}),Xe("span",{className:"text-foreground",children:v.value??"\u2014"})]},y))})]}):Dt("div",{"data-slot":"descriptions",className:r("w-full",e),...u,children:[(t||o)&&Dt("div",{className:"mb-3 flex items-center justify-between",children:[t&&Xe("h3",{className:"text-base font-semibold text-foreground",children:t}),o&&Xe("div",{children:o})]}),Xe("div",{className:r("grid",s&&"overflow-hidden rounded-lg border border-border"),style:{gridTemplateColumns:`repeat(${g}, minmax(0, 1fr))`},children:m.map((v,y)=>{let h=Math.min(v.span??1,g);return Dt(Hl.Fragment,{children:[Xe("div",{className:r(b,"font-medium text-muted-foreground",s?"border-b border-r border-border bg-muted/30":"pb-1",a==="vertical"&&"border-r-0",d&&'after:content-[":"]'),style:{gridColumn:h>1?`span ${h}`:void 0,...p},children:v.label}),a==="horizontal"&&Xe("div",{className:r(b,"text-foreground",s?"border-b border-border":"pb-2"),style:f,children:v.value??"\u2014"})]},y)})})]})}function ag({label:e,children:t,span:o=1,className:n}){return Dt("div",{"data-slot":"descriptions-item",className:r("contents",n),style:{gridColumn:`span ${o}`},children:[Xe("span",{className:"font-medium text-muted-foreground",children:e}),Xe("span",{className:"text-foreground",children:t??"\u2014"})]})}import*as Ol from"react";import{Fragment as sg,jsx as Ho,jsxs as Nn}from"react/jsx-runtime";function ig({title:e,description:t,children:o,okText:n="OK",cancelText:a="Cancel",okVariant:s="default",disabled:l=!1,showCancel:c=!0,side:d="top",onConfirm:m,onCancel:f,open:p,defaultOpen:u=!1,onOpenChange:g,className:b}){let[v,y]=Ol.useState(u),h=p!==void 0,P=h?p:v,w=R=>{h||y(R),g?.(R)},x=R=>{m?.(R),w(!1)},C=R=>{f?.(R),w(!1)};return l?Ho(sg,{children:o}):Nn(ue,{open:P,onOpenChange:w,"data-slot":"popconfirm",children:[Ho(pe,{render:o}),Nn(me,{side:d,align:"center",className:r("w-72 max-w-[90vw]",b),children:[Nn("div",{className:"flex flex-col gap-1",children:[e&&Ho(la,{children:e}),t&&Ho(ca,{children:t})]}),Nn("div",{className:"mt-3 flex justify-end gap-2",children:[c&&Ho(N,{variant:"outline",size:"sm",onClick:C,children:a}),Ho(N,{variant:s==="destructive"?"destructive":"default",size:"sm",onClick:x,children:n})]})]})]})}import*as In from"react";import{jsx as Lr,jsxs as oi}from"react/jsx-runtime";function lg({spinning:e=!0,tip:t,size:o="md",delay:n=0,children:a,indicator:s,className:l,contentClassName:c}){let[d,m]=In.useState(e&&n===0);return In.useEffect(()=>{if(e&&n>0){m(!1);let f=setTimeout(()=>m(!0),n);return()=>clearTimeout(f)}m(e)},[e,n]),a?oi("div",{"data-slot":"spin",className:r("relative",l),children:[Lr("div",{className:r("transition-opacity",d&&"opacity-30 pointer-events-none",c),children:a}),d&&oi("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-2",children:[s??Lr(Vo,{size:o}),t&&Lr("span",{className:"text-sm text-muted-foreground",children:t})]})]}):oi("div",{"data-slot":"spin",className:r("inline-flex flex-col items-center gap-2",l),children:[s??Lr(Vo,{size:o}),t&&Lr("span",{className:"text-sm text-muted-foreground",children:t})]})}import*as rt from"react";import{jsx as Gl}from"react/jsx-runtime";function cg({offsetTop:e,offsetBottom:t,children:o,disabled:n=!1,onChange:a,target:s,className:l,wrapperClassName:c}){let d=rt.useRef(null),[m,f]=rt.useState(!1),[p,u]=rt.useState({}),g=rt.useRef(s);g.current=s;let b=rt.useCallback(()=>{if(!d.current||n)return;let y=d.current.getBoundingClientRect(),h=g.current?.()??window,P=!1;if(e!==void 0){let w=h===window?{top:0,bottom:window.innerHeight}:h.getBoundingClientRect();P=y.top-w.top<e}else t!==void 0&&(P=(h===window?{bottom:window.innerHeight}:h.getBoundingClientRect()).bottom-y.bottom<t);P!==m&&(f(P),a?.(P),u(P?{width:y.width,height:y.height,left:y.left}:{}))},[m,n,e,t,a]);rt.useEffect(()=>{let y=g.current?.()??window;return y.addEventListener("scroll",b,{passive:!0}),window.addEventListener("resize",b),b(),()=>{y.removeEventListener("scroll",b),window.removeEventListener("resize",b)}},[b]);let v=m?e!==void 0?{position:"fixed",top:e,left:p.left,width:p.width,zIndex:50}:{position:"fixed",bottom:t,left:p.left,width:p.width,zIndex:50}:{};return Gl("div",{ref:d,className:c,style:p,"data-slot":"affix",children:Gl("div",{className:r(m&&l),style:v,children:o})})}import*as Lt from"react";import{ArrowUp as dg}from"lucide-react";import{jsx as ri}from"react/jsx-runtime";function ug({visibilityHeight:e=400,target:t,onClick:o,children:n,className:a,duration:s=300,position:l={right:24,bottom:48}}){let[c,d]=Lt.useState(!1),m=Lt.useRef(t);m.current=t;let f=()=>{let u=m.current?.()??window;if(u===window){let g=window.scrollY,b=performance.now(),v=y=>{let h=y-b,P=Math.min(h/s,1),w=1-Math.pow(1-P,3);window.scrollTo(0,g*(1-w)),P<1&&requestAnimationFrame(v)};requestAnimationFrame(v)}else u.scrollTo({top:0,behavior:"smooth"});o?.()},p=Lt.useCallback(()=>{let u=m.current?.()??window,g=u===window?window.scrollY:u.scrollTop;d(g>e)},[e]);return Lt.useEffect(()=>{let u=m.current?.()??window;return u.addEventListener("scroll",p,{passive:!0}),p(),()=>u.removeEventListener("scroll",p)},[p]),c?ri("div",{"data-slot":"back-top",className:r("fixed z-50 transition-opacity",a),style:{right:l.right,bottom:l.bottom},children:n??ri(N,{variant:"default",size:"icon",onClick:f,"aria-label":"Back to top",className:"shadow-lg",children:ri(dg,{className:"size-4"})})}):null}import*as eo from"react";import{jsx as Ul}from"react/jsx-runtime";var ni=eo.createContext({locale:"zh-CN",direction:"ltr",prefixCls:"chaos"});function pg(e){if(e)return typeof e=="string"?{variant:e}:e}function mg({locale:e="zh-CN",direction:t="ltr",theme:o,prefixCls:n="chaos",disableAnimation:a=!1,renderEmpty:s,form:l,children:c}){let d=eo.useMemo(()=>({locale:e,direction:t,theme:o,prefixCls:n,disableAnimation:a,renderEmpty:s,form:l}),[e,t,o,n,a,s,l]),m=eo.useMemo(()=>{if(!o)return{};let f={};o.primaryColor&&(f["--primary"]=o.primaryColor),o.borderRadius!==void 0&&(f["--radius"]=`${o.borderRadius}px`);let p=pg(o.scrollbar);return p&&(p.variant==="none"?f["--scrollbar-width"]="none":p.variant==="thin"&&(f["--scrollbar-width"]="thin"),p.thumbColor?f["--scrollbar-thumb"]=p.thumbColor:(f["--scrollbar-thumb"]="rgb(15 23 42 / 0.18)",f["--scrollbar-thumb-hover"]="rgb(15 23 42 / 0.3)"),p.thumbHoverColor&&(f["--scrollbar-thumb-hover"]=p.thumbHoverColor)),o.cssVars&&Object.assign(f,o.cssVars),f},[o]);return Ul(ni.Provider,{value:d,children:Ul("div",{"data-slot":"config-provider",dir:t,style:m,className:o?.darkMode?"dark":void 0,children:c})})}function fg(){return eo.useContext(ni)}import*as Oo from"react";import{useSyncExternalStore as gg}from"react";var Ft=[],ii=new Set;function ai(){for(let e of ii)e()}function bg(e){return ii.add(e),()=>{ii.delete(e)}}function vg(){return Ft}var xg=[];function hg(){return xg}var _l=0;function yg(){return _l+=1,`imperative-modal-${Date.now()}-${_l}`}var Fr=new Map,to={push(e){let t=yg();return Ft=[...Ft,{...e,id:t}],Fr.set(t,[]),ai(),t},close(e,t){let o=Ft.find(a=>a.id===e);o?.resolve&&o.resolve(t);let n=Fr.get(e)??[];for(let a of n)a(t);Fr.delete(e),Ft=Ft.filter(a=>a.id!==e),ai()},closeAll(){for(let e of Ft){e.resolve&&e.resolve(void 0);let t=Fr.get(e.id)??[];for(let o of t)o(void 0);Fr.delete(e.id)}Ft=[],ai()},subscribe:bg,getSnapshot:vg,getServerSnapshot:hg};function $l(){return gg(to.subscribe,to.getSnapshot,to.getServerSnapshot)}import{jsx as je,jsxs as kn}from"react/jsx-runtime";var Pg={confirm:je(st,{className:"text-primary size-5"}),info:je(Ct,{className:"size-5 text-blue-500"}),warning:je(Yr,{className:"size-5 text-amber-500"}),success:je(Wr,{className:"size-5 text-emerald-500"}),error:je(jr,{className:"text-destructive size-5"})},Cg={confirm:"\u786E\u8BA4",info:"\u77E5\u9053\u4E86",warning:"\u77E5\u9053\u4E86",success:"\u597D\u7684",error:"\u77E5\u9053\u4E86"};function wg({config:e}){let[t,o]=Oo.useState(!1),n=Oo.useCallback(async()=>{o(!0);try{e.resolve&&await e.resolve(!0)}finally{o(!1),to.close(e.id,!0)}},[e]),a=Oo.useCallback(()=>{e.resolve?.(!1),to.close(e.id,!1)},[e]),s=Oo.useCallback(f=>{f||(e.resolve?.(!1),to.close(e.id,!1))},[e]),l=e.kind==="confirm",c=e.icon??Pg[e.kind],d=Cg[e.kind]??"OK",m=e.maskClosable!==!1;return je(Ce,{open:!0,onOpenChange:s,disablePointerDismissal:!m,children:kn(we,{className:r("sm:max-w-[425px]"),style:{maxWidth:typeof e.width=="number"?`${e.width}px`:e.width},showCloseButton:!1,children:[kn(Re,{children:[kn(Ne,{className:"flex items-center gap-2",children:[c,e.title??""]}),e.content&&je(Kt,{children:e.content})]}),kn(rr,{children:[l&&je(N,{variant:"outline",onClick:a,disabled:t,children:e.cancelText??"\u53D6\u6D88"}),je(N,{variant:e.okVariant==="destructive"?"destructive":"default",onClick:n,disabled:t,children:t?"\u5904\u7406\u4E2D...":e.okText??d})]})]})})}function Rg(){let e=$l();return je("div",{"data-slot":"modal-provider",children:e.map(t=>je(wg,{config:t},t.id))})}import*as j from"react";import{jsx as E,jsxs as gt}from"react/jsx-runtime";var oo=j.createContext(null);function Go(e){let t=j.useContext(oo);if(!t)throw new Error(`<${e}> must be rendered inside <Menu>.`);return t}var Uo={light:{root:"bg-card text-foreground",item:"text-foreground",subTrigger:"text-foreground",itemActive:"bg-primary/10 text-primary font-medium",itemHover:"hover:bg-muted",subBg:"bg-muted/40",divider:"bg-border"},dark:{root:"bg-slate-900 text-slate-100",item:"text-slate-200",subTrigger:"text-slate-200",itemActive:"bg-primary/20 text-primary-foreground font-medium",itemHover:"hover:bg-slate-800",subBg:"bg-slate-950/40",divider:"bg-slate-700"}},oe={sm:{item:"h-7 px-2 text-xs",icon:"size-3.5",gap:"gap-1.5",indentBase:6},md:{item:"h-9 px-3",icon:"size-4",gap:"gap-2",indentBase:8},lg:{item:"h-11 px-4 text-base",icon:"size-5",gap:"gap-2.5",indentBase:10}},_o=j.forwardRef(({mode:e="vertical",theme:t="light",size:o="md",selectedKeys:n,defaultSelectedKeys:a=[],openKeys:s,defaultOpenKeys:l=[],multiple:c=!1,selectable:d=!0,inlineCollapsed:m,inlineIndent:f=24,triggerSubMenuAction:p="click",collapsible:u=!1,onCollapse:g,items:b,onClick:v,onOpenChange:y,onSelect:h,onDeselect:P,children:w,className:x,...C},R)=>{let[T,k]=j.useState(a),[S,M]=j.useState(l),[G,Q]=j.useState(!1),F=n!==void 0,I=s!==void 0,L=m!==void 0,z=F?n:T,O=I?s:S,ge=L?m:G,Ur=j.useRef(new Map),A=j.useCallback((H,yt)=>{Ur.current.set(H,yt)},[]),D=j.useCallback(H=>{F||k(H)},[F]),J=j.useCallback(H=>{I||M(H),y?.(H)},[I,y]),re=j.useCallback(H=>{if(!d||H.item.disabled){H.item.onClick?.({key:H.key,keyPath:H.keyPath}),v?.(H);return}let yt=z.includes(H.key),Ut;c?Ut=yt?z.filter(go=>go!==H.key):[...z,H.key]:Ut=yt?[]:[H.key],D(Ut),yt?P?.({key:H.key,selectedKeys:Ut}):h?.({key:H.key,selectedKeys:Ut}),H.item.onClick?.({key:H.key,keyPath:H.keyPath}),v?.(H)},[z,c,v,P,h,d,D]),Oe=j.useCallback((H,yt)=>{let Ut=O.includes(H),go;if(Ut)go=O.filter(Un=>Un!==H);else if(e==="vertical"){let Un=yt?Ur.current.get(yt)?.children?.map(Zo=>Zo.key)??[]:b?.map(Zo=>Zo.key)??[];go=O.filter(Zo=>!Un.includes(Zo)).concat(H)}else go=[...O,H];J(go)},[O,b,e,J]),_r=j.useCallback(()=>{let H=!ge;L||Q(H),g?.(H)},[ge,L,g]),fo={mode:e,theme:t,size:o,selectedKeys:z,openKeys:O,inlineCollapsed:ge,inlineIndent:f,triggerSubMenuAction:p,selectable:d,multiple:c,onItemClick:re,onItemToggle:Oe,registerItem:A,level:0},Gt=Uo[t],$r;b&&b.length>0?$r=E(Kl,{tag:"ul",role:"menu",children:b.map(H=>E(Sn,{config:H,parentPath:[]},H.key))}):$r=w;let Ci=r("relative",oe[o].item.includes("text-xs")?"text-xs":oe[o].item.includes("text-base")?"text-base":"text-sm",e==="horizontal"?"flex items-center gap-1":e==="inline"?r("w-full",Gt.root):r("flex flex-col gap-0.5",Gt.root),e==="vertical"&&"min-w-[180px] py-1",x);return E(oo.Provider,{value:fo,children:e==="horizontal"?E("nav",{ref:R,role:"menubar","data-slot":"menu","data-mode":e,"data-theme":t,className:Ci,...C,children:$r}):gt("div",{className:"relative",children:[E("ul",{ref:R,role:"menu","data-slot":"menu","data-mode":e,"data-theme":t,className:r(Ci,"list-none m-0 p-0"),children:$r}),u&&e==="inline"&&E("button",{type:"button",onClick:_r,className:r("absolute bottom-0 left-0 right-0 flex items-center justify-center border-t transition-colors",oe[o].item,Gt.item,Gt.itemHover,"border-border"),"aria-label":ge?"\u5C55\u5F00\u83DC\u5355":"\u6536\u8D77\u83DC\u5355",title:ge?"\u5C55\u5F00\u83DC\u5355":"\u6536\u8D77\u83DC\u5355",children:ge?E(_i,{className:r("shrink-0",oe[o].icon)}):E(Ui,{className:r("shrink-0",oe[o].icon)})})]})})});_o.displayName="Menu";var Kl=j.forwardRef(({className:e,children:t,...o},n)=>E("ul",{ref:n,role:"menu","data-slot":"menu-list",className:r("list-none m-0 p-0",e),...o,children:t}));Kl.displayName="MenuList";function Sn({config:e,parentPath:t}){let o=Go("Menu.items"),n=Uo[o.theme],a=!!e.children&&e.children.length>0,s=[e.key,...t],l=o.openKeys.includes(e.key),c=o.selectedKeys.includes(e.key),d=o.mode==="inline"&&!o.inlineCollapsed?{paddingLeft:`${o.level*o.inlineIndent+oe[o.size].indentBase}px`}:void 0;return j.useEffect(()=>{o.registerItem(e.key,e)},[e,o]),e.type==="group"?E("li",{role:"group","data-slot":"menu-group",className:r("py-1 text-xs font-semibold text-muted-foreground",o.size==="lg"?"px-4":"px-2",n.item),children:e.title??e.label}):a?E(Ng,{config:e,isOpen:l,isSelected:c,indentStyle:d,tc:n,keyPath:s}):E("li",{role:"none","data-slot":"menu-item","data-key":e.key,"data-selected":c||void 0,"data-disabled":e.disabled||void 0,children:gt("button",{type:"button",role:"menuitem",tabIndex:e.disabled?-1:0,disabled:e.disabled,onClick:m=>{e.disabled||o.onItemClick({key:e.key,keyPath:s,item:e,domEvent:m})},className:r("w-full flex items-center rounded-md text-left outline-none transition-colors",oe[o.size].item,oe[o.size].gap,n.item,c?n.itemActive:n.itemHover,e.danger&&"text-destructive data-[selected=true]:bg-destructive/10 data-[selected=true]:text-destructive",e.disabled&&"pointer-events-none opacity-50",o.inlineCollapsed&&"justify-center"),style:d,"data-selected":c||void 0,children:[e.icon&&E("span",{className:r("inline-flex shrink-0 items-center justify-center",oe[o.size].icon),children:e.icon}),!o.inlineCollapsed&&E("span",{className:"flex-1 truncate",children:e.label})]})})}function Ng({config:e,isOpen:t,isSelected:o,indentStyle:n,tc:a,keyPath:s}){let l=Go("Menu.SubMenu"),c=l.mode==="inline",d={...l,level:l.level+1,parentKey:e.key},m=u=>{u.stopPropagation(),!e.disabled&&l.onItemToggle(e.key,l.parentKey)},f=u=>{l.triggerSubMenuAction==="hover"&&(u.stopPropagation(),!e.disabled&&(l.openKeys.includes(e.key)||l.onItemToggle(e.key,l.parentKey)))},p=gt("button",{type:"button",role:"menuitem","aria-haspopup":"true","aria-expanded":t,tabIndex:e.disabled?-1:0,disabled:e.disabled,onClick:m,onMouseEnter:f,className:r("w-full flex items-center rounded-md text-left outline-none transition-colors",oe[l.size].item,oe[l.size].gap,a.subTrigger,o?a.itemActive:a.itemHover,e.danger&&"text-destructive data-[selected=true]:bg-destructive/10",e.disabled&&"pointer-events-none opacity-50",l.inlineCollapsed&&"justify-center"),style:n,"data-selected":o||void 0,children:[e.icon&&E("span",{className:r("inline-flex shrink-0 items-center justify-center",oe[l.size].icon),children:e.icon}),!l.inlineCollapsed&&E("span",{className:"flex-1 truncate",children:e.label}),!l.inlineCollapsed&&E($,{className:r("size-4 shrink-0 transition-transform text-muted-foreground",c&&t&&"rotate-90")})]});return l.mode==="horizontal"?gt("li",{role:"none","data-slot":"menu-submenu","data-key":e.key,className:"relative",children:[p,t&&E("div",{className:r("absolute left-0 top-full z-50 mt-1 min-w-[180px] rounded-md border bg-popover p-1 text-popover-foreground shadow-md"),children:E(oo.Provider,{value:d,children:E("ul",{role:"menu","data-slot":"menu-sub-content",className:"list-none m-0 p-0",children:e.children.map(u=>E(Sn,{config:u,parentPath:[e.key,...s.slice(1)]},u.key))})})})]}):gt("li",{role:"none","data-slot":"menu-submenu","data-key":e.key,"data-open":t||void 0,className:c?void 0:"relative",children:[p,c&&t&&!l.inlineCollapsed&&E("ul",{role:"menu","data-slot":"menu-sub-content",className:r("list-none m-0 p-0",a.subBg),children:E(oo.Provider,{value:d,children:e.children.map(u=>E(Sn,{config:u,parentPath:[e.key,...s.slice(1)]},u.key))})}),!c&&t&&E("div",{className:r("absolute left-full top-0 z-50 ml-1 min-w-[180px] rounded-md border bg-popover p-1 text-popover-foreground shadow-md"),children:E(oo.Provider,{value:d,children:E("ul",{role:"menu","data-slot":"menu-sub-content",className:"list-none m-0 p-0",children:e.children.map(u=>E(Sn,{config:u,parentPath:[e.key,...s.slice(1)]},u.key))})})})]})}function si({key:e,title:t,icon:o,disabled:n,children:a,className:s,style:l}){let c=Go("SubMenu"),d=Uo[c.theme],m=c.openKeys.includes(e),f=c.selectedKeys.includes(e),p=c.mode==="inline",u=p&&!c.inlineCollapsed?{paddingLeft:`${c.level*c.inlineIndent+oe[c.size].indentBase}px`}:l,g=y=>{y.stopPropagation(),!n&&c.onItemToggle(e,c.parentKey)},b={...c,level:c.level+1,parentKey:e},v=gt("button",{type:"button",role:"menuitem","aria-haspopup":"true","aria-expanded":m,tabIndex:n?-1:0,disabled:n,onClick:g,className:r("w-full flex items-center rounded-md text-left outline-none transition-colors",oe[c.size].item,oe[c.size].gap,d.subTrigger,f?d.itemActive:d.itemHover,n&&"pointer-events-none opacity-50",c.inlineCollapsed&&"justify-center",s),style:u,"data-selected":f||void 0,children:[o&&E("span",{className:r("inline-flex shrink-0 items-center justify-center",oe[c.size].icon),children:o}),!c.inlineCollapsed&&E("span",{className:"flex-1 truncate",children:t}),!c.inlineCollapsed&&E($,{className:r("size-4 shrink-0 transition-transform text-muted-foreground",p&&m&&"rotate-90")})]});return gt("li",{role:"none","data-slot":"menu-submenu","data-key":e,"data-open":m||void 0,className:p?void 0:"relative",children:[v,p&&m&&!c.inlineCollapsed&&E("ul",{role:"menu","data-slot":"menu-sub-content",className:r("list-none m-0 p-0",d.subBg),children:E(oo.Provider,{value:b,children:a})}),!p&&m&&E("div",{className:r("absolute left-full top-0 z-50 ml-1 min-w-[180px] rounded-md border bg-popover p-1 text-popover-foreground shadow-md"),children:E(oo.Provider,{value:b,children:E("ul",{role:"menu","data-slot":"menu-sub-content",className:"list-none m-0 p-0",children:a})})})]})}si.displayName="Menu.SubMenu";var li=j.forwardRef(({key:e,icon:t,disabled:o,danger:n,children:a,className:s,style:l,onClick:c,...d},m)=>{let f=Go("Item"),p=Uo[f.theme],u=f.selectedKeys.includes(e),g=f.mode==="inline"&&!f.inlineCollapsed?{paddingLeft:`${f.level*f.inlineIndent+oe[f.size].indentBase}px`}:l;return E("li",{role:"none","data-slot":"menu-item","data-key":e,children:gt("button",{ref:m,type:"button",role:"menuitem",tabIndex:o?-1:0,disabled:o,onClick:b=>{o||(c?.({key:e}),f.onItemClick({key:e,keyPath:[e],item:{key:e,label:a,...o!==void 0?{disabled:o}:{},...n!==void 0?{danger:n}:{}},domEvent:b}))},className:r("w-full flex items-center rounded-md text-left outline-none transition-colors",oe[f.size].item,oe[f.size].gap,p.item,u?p.itemActive:p.itemHover,n&&"text-destructive data-[selected=true]:bg-destructive/10 data-[selected=true]:text-destructive",o&&"pointer-events-none opacity-50",f.inlineCollapsed&&"justify-center",s),style:g,"data-selected":u||void 0,...d,children:[t&&E("span",{className:r("inline-flex shrink-0 items-center justify-center",oe[f.size].icon),children:t}),!f.inlineCollapsed&&E("span",{className:"flex-1 truncate",children:a})]})})});li.displayName="Menu.Item";function ci(){let e=Go("Divider"),t=Uo[e.theme];return E("li",{role:"separator","aria-orientation":"horizontal","data-slot":"menu-divider",className:r("my-1 h-px mx-2",t.divider)})}ci.displayName="Menu.Divider";function di({title:e,children:t}){let o=Go("ItemGroup"),n=Uo[o.theme];return gt("li",{role:"group","data-slot":"menu-group",className:"py-1",children:[E("div",{className:r("py-1 text-xs font-semibold text-muted-foreground",o.size==="lg"?"px-4":"px-2",n.item),children:e}),E("ul",{role:"menu","data-slot":"menu-group-list",className:"list-none m-0 p-0",children:t})]})}di.displayName="Menu.ItemGroup";_o.Item=li;_o.SubMenu=si;_o.Divider=ci;_o.ItemGroup=di;import*as bt from"react";import{ChevronRight as Ig,ChevronLeft as kg}from"lucide-react";import{jsx as At,jsxs as pi}from"react/jsx-runtime";function Sg({value:e=[],onChange:t,options:o,placeholder:n="Please select",disabled:a=!1,className:s,displayRender:l,changeOnSelect:c=!1}){let[d,m]=bt.useState(!1),[f,p]=bt.useState([o]),u=bt.useRef(o);u.current=o,bt.useEffect(()=>{let y=u.current;if(e.length===0){p([y]);return}let h=[y],P=y;for(let w of e){let x=P.find(C=>C.value===w);if(x?.children)h.push(x.children),P=x.children;else break}p(h)},[e]);let g=bt.useMemo(()=>{let y=[],h=o;for(let P of e){let w=h.find(x=>x.value===P);if(w)y.push(w.label),h=w.children??[];else break}return y},[e,o]),b=l?l(g,ui(e,o)):g.join(" / ")||n,v=(y,h)=>{let P=e.slice(0,y);if(P[y]=h.value,h.children?.length){let w=f.slice(0,y+1);w.push(h.children),p(w),c&&t?.(P.slice(0,y+1),ui(P.slice(0,y+1),o))}else p(f.slice(0,y+1)),t?.(P.slice(0,y+1),ui(P.slice(0,y+1),o)),m(!1)};return pi(ue,{open:d,onOpenChange:m,"data-slot":"cascader",children:[pi(pe,{render:At("button",{type:"button",disabled:a,className:r("border-input flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 text-sm",!g.length&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",s)}),children:[At("span",{className:"truncate",children:b}),At(Ig,{className:"size-4 rotate-90 opacity-50"})]}),At(me,{align:"start",className:"w-auto p-0",children:At("div",{className:"flex min-w-[480px]",children:f.map((y,h)=>At("div",{className:"max-h-60 min-w-[160px] overflow-y-auto border-r last:border-r-0",children:y.map(P=>{let w=e[h]===P.value;return pi("button",{type:"button",disabled:P.disabled,className:r("hover:bg-accent flex w-full items-center justify-between px-3 py-2 text-sm",w&&"bg-accent font-medium",P.disabled&&"pointer-events-none opacity-50"),onClick:()=>v(h,P),children:[At("span",{className:"truncate",children:P.label}),P.children?.length&&At(kg,{className:"size-3.5 rotate-180 opacity-40"})]},P.value)})},h))})})]})}function ui(e,t){let o=[],n=t;for(let a of e){let s=n.find(l=>l.value===a);if(s)o.push(s),n=s.children??[];else break}return o}import*as Tn from"react";import{Fragment as Lg,jsx as $o,jsxs as ql}from"react/jsx-runtime";var Tg={none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},Mg={auto:"","1/1":"aspect-square","4/3":"aspect-[4/3]","16/9":"aspect-video","3/2":"aspect-[3/2]"};function zg({className:e,src:t,alt:o="",placeholder:n,preview:a=!1,rounded:s="md",aspectRatio:l="auto",fit:c="cover",fallback:d,...m}){let[f,p]=Tn.useState(!1),[u,g]=Tn.useState(!1),[b,v]=Tn.useState(!1),y=u?void 0:t;return u&&d?$o("div",{className:r("inline-flex items-center justify-center",e),children:d}):ql(Lg,{children:[ql("div",{className:r("relative overflow-hidden bg-muted",Tg[s],Mg[l],!f&&"animate-pulse",e),children:[n&&!f&&$o("img",{src:n,alt:"",className:"absolute inset-0 size-full object-cover blur-sm transition-opacity",style:{opacity:f?0:1},"aria-hidden":"true"}),$o("img",{src:y,alt:o,loading:"lazy",onLoad:()=>p(!0),onError:()=>g(!0),className:r("size-full transition-opacity",c==="cover"&&"object-cover",c==="contain"&&"object-contain",c==="fill"&&"object-fill",!f&&"opacity-0",a&&"cursor-pointer"),onClick:a?()=>v(!0):void 0,...m})]}),a&&b&&$o("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80",onClick:()=>v(!1),children:$o("img",{src:t,alt:o,className:"max-h-[90vh] max-w-[90vw] rounded-lg object-contain"})})]})}function Dg({className:e,children:t,cols:o=3,gap:n="md"}){return $o("div",{"data-slot":"image-group",className:r("grid",n==="sm"?"gap-1":n==="lg"?"gap-4":"gap-2",e),style:{gridTemplateColumns:`repeat(${o}, minmax(0, 1fr))`},children:t})}import"react";import{X as Fg}from"lucide-react";import{jsx as Mn,jsxs as Bg}from"react/jsx-runtime";var Wl={default:"bg-muted text-muted-foreground border-muted",primary:"bg-primary/10 text-primary border-primary/20",success:"bg-green-50 text-green-700 border-green-200 dark:bg-green-950 dark:text-green-300 dark:border-green-900",warning:"bg-amber-50 text-amber-700 border-amber-200 dark:bg-amber-950 dark:text-amber-300 dark:border-amber-900",error:"bg-red-50 text-red-700 border-red-200 dark:bg-red-950 dark:text-red-300 dark:border-red-900",info:"bg-blue-50 text-blue-700 border-blue-200 dark:bg-blue-950 dark:text-blue-300 dark:border-blue-900"};function Ag({className:e,color:t="default",closable:o=!1,onClose:n,bordered:a=!0,icon:s,children:l,...c}){let d=Wl[t]??Wl.default;return Bg("span",{"data-slot":"tag",className:r("inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs font-medium",a&&"border",d,e),...c,children:[s&&Mn("span",{className:"shrink-0",children:s}),l,o&&Mn("button",{type:"button",onClick:m=>{m.stopPropagation(),n?.()},className:"ml-0.5 shrink-0 rounded-sm p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":"Close",children:Mn(Fg,{className:"size-3"})})]})}function Eg({className:e,children:t,gap:o="sm"}){return Mn("div",{"data-slot":"tag-group",className:r("flex flex-wrap",o==="sm"?"gap-1":o==="lg"?"gap-3":"gap-2",e),children:t})}import"react";import{CheckCircle2 as Xl,XCircle as jl,AlertTriangle as Vg,Lock as Hg,SearchX as Og}from"lucide-react";import{jsx as Ko,jsxs as Ug}from"react/jsx-runtime";var Yl={success:{icon:Xl,color:"text-green-500"},error:{icon:jl,color:"text-red-500"},warning:{icon:Vg,color:"text-amber-500"},info:{icon:Xl,color:"text-blue-500"},403:{icon:Hg,color:"text-red-500"},404:{icon:Og,color:"text-muted-foreground"},500:{icon:jl,color:"text-red-500"}};function Gg({status:e="info",title:t,subtitle:o,extra:n,icon:a,className:s}){let l=Yl[e]??Yl.info,c=l.icon;return Ug("div",{"data-slot":"result",className:r("flex min-h-[400px] flex-col items-center justify-center text-center",s),children:[Ko("div",{className:"mb-4",children:a??Ko(c,{className:r("size-16",l.color)})}),typeof e=="string"&&/^\d{3}$/.test(e)&&Ko("h1",{className:"mb-2 text-6xl font-bold text-muted-foreground/30",children:e}),t&&Ko("h2",{className:"mb-2 text-xl font-semibold",children:t}),o&&Ko("p",{className:"mb-6 max-w-md text-sm text-muted-foreground",children:o}),n&&Ko("div",{className:"flex items-center gap-3",children:n})]})}import*as Ql from"react";import{jsx as qo,jsxs as zn}from"react/jsx-runtime";function _g({className:e,title:t,value:o,prefix:n,suffix:a,precision:s,groupSeparator:l=",",trend:c,trendMode:d="default",valueStyle:m,loading:f=!1,...p}){let u=Ql.useMemo(()=>{if(o==null)return"--";if(typeof o=="string")return o;let y=o;if(s!==void 0&&(y=Number(y.toFixed(s))),!l)return String(y);let h=String(y).split("."),P=h[0]??"",w=h[1],x=P.replace(/\B(?=(\d{3})+(?!\d))/g,l);return w!==void 0?`${x}.${w}`:x},[o,s,l]),g=c!==void 0&&c>0,b=c!==void 0&&c<0,v="text-muted-foreground";return d==="default"?(g&&(v="text-green-500"),b&&(v="text-red-500")):(g&&(v="text-red-500"),b&&(v="text-green-500")),zn("div",{"data-slot":"statistic",className:r("space-y-1",e),...p,children:[t&&qo("div",{className:"text-sm text-muted-foreground",children:t}),zn("div",{className:"flex items-baseline gap-1",children:[n&&qo("span",{className:"text-lg text-muted-foreground",children:n}),f?qo("span",{className:"inline-block h-8 w-24 animate-pulse rounded bg-muted"}):qo("span",{className:"text-3xl font-bold tabular-nums tracking-tight",style:m,children:u}),a&&qo("span",{className:"text-lg text-muted-foreground",children:a})]}),c!==void 0&&zn("div",{className:r("flex items-center gap-1 text-sm",v),children:[qo("span",{children:g?"\u2191":b?"\u2193":"\u2013"}),zn("span",{children:[Math.abs(c),"%"]})]})]})}import*as ro from"react";import{toString as $g,toCanvas as Kg}from"qrcode";import{jsx as Dn}from"react/jsx-runtime";function qg({className:e,value:t,size:o=128,level:n="M",fgColor:a="#000",bgColor:s="#fff",includeMargin:l=!0,renderAs:c="svg",...d}){let[m,f]=ro.useState(""),p=ro.useRef(null),[u,g]=ro.useState();return ro.useEffect(()=>{if(c==="svg")$g(t,{type:"svg",width:o,margin:l?4:0,errorCorrectionLevel:n,color:{dark:a,light:s}}).then(b=>{f(b),g(void 0)}).catch(b=>g(b.message));else{let b=p.current;b&&Kg(b,t,{width:o,margin:l?4:0,errorCorrectionLevel:n,color:{dark:a,light:s}}).then(()=>g(void 0)).catch(v=>g(v.message))}},[t,o,n,a,s,l,c]),u?Dn("div",{"data-slot":"qrcode",className:r("inline-flex items-center justify-center rounded-md border border-destructive/30 bg-destructive/5 text-destructive text-xs",e),style:{width:o,height:o},...d,children:"QR Error"}):Dn("div",{"data-slot":"qrcode",className:r("inline-block",e),...d,children:c==="svg"?Dn("span",{dangerouslySetInnerHTML:{__html:m},style:{display:"inline-block",width:o,height:o}}):Dn("canvas",{ref:p})})}import*as Wo from"react";import{jsx as Ln,jsxs as Xg}from"react/jsx-runtime";function Wg({value:e,onChange:t,options:o,onSearch:n,onSelect:a,placeholder:s="Type to search...",disabled:l=!1,clearOnSelect:c=!1,className:d}){let[m,f]=Wo.useState(""),[p,u]=Wo.useState(!1),[g,b]=Wo.useState(-1),v=e!==void 0,y=v?e:m,h=x=>{v||f(x),t?.(x),n?.(x),b(-1)},P=x=>{if(x.disabled)return;let C=c?"":x.value;v||f(C),t?.(C),a?.(x.value,x),u(!1)};Wo.useEffect(()=>{y.length>0&&o.length>0?u(!0):o.length===0&&u(!1)},[y,o]);let w=x=>{!p||o.length===0||(x.key==="ArrowDown"?(x.preventDefault(),b(C=>Math.min(C+1,o.length-1))):x.key==="ArrowUp"?(x.preventDefault(),b(C=>Math.max(C-1,0))):x.key==="Enter"&&g>=0?(x.preventDefault(),P(o[g])):x.key==="Escape"&&u(!1))};return Xg(ue,{open:p&&o.length>0,onOpenChange:u,"data-slot":"autocomplete",children:[Ln(pe,{render:Ln(_,{value:y,onChange:x=>h(x.target.value),onKeyDown:w,placeholder:s,disabled:l,className:d})}),Ln(me,{align:"start",className:"w-[var(--anchor-width,100%)] p-1",children:o.map((x,C)=>Ln("button",{type:"button",disabled:x.disabled,className:r("flex w-full items-center rounded-sm px-2 py-1.5 text-sm outline-none",C===g&&"bg-accent",x.disabled&&"pointer-events-none opacity-50"),onClick:()=>P(x),onMouseEnter:()=>b(C),children:x.label??x.value},x.value))})]})}import*as An from"react";import{jsx as Fn,jsxs as Yg}from"react/jsx-runtime";function jg({value:e,onChange:t,options:o,trigger:n="@",onSearch:a,onSelect:s,placeholder:l="Type @ to mention someone...",rows:c=3,disabled:d=!1,className:m}){let[f,p]=An.useState(""),[u,g]=An.useState(!1),[b,v]=An.useState(-1),y=e!==void 0,h=y?e:f,P=x=>{y||p(x),t?.(x);let C=x.lastIndexOf(n);if(C!==-1){let R=x.substring(C+1);if(!R.includes(" ")){a?.(R),g(o.length>0),v(-1);return}}g(!1)},w=x=>{if(x.disabled)return;let C=h.lastIndexOf(n);if(C===-1)return;let T=`${h.substring(0,C)}${n}${x.value} `;y||p(T),t?.(T),s?.(x.value,x),g(!1)};return Yg(ue,{open:u&&o.length>0,onOpenChange:g,"data-slot":"mentions",children:[Fn(pe,{render:Fn(Wt,{value:h,onChange:x=>P(x.target.value),placeholder:l,rows:c,disabled:d,className:m})}),Fn(me,{align:"start",className:"w-[var(--anchor-width,100%)] p-1",children:o.map((x,C)=>Fn("button",{type:"button",disabled:x.disabled,className:r("flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none",C===b&&"bg-accent",x.disabled&&"pointer-events-none opacity-50"),onClick:()=>w(x),onMouseEnter:()=>v(C),children:x.label??x.value},x.value))})]})}import*as Jl from"react";import*as Xo from"react";function Zl(e){let t=Xo.useMemo(()=>new Date(e).getTime(),[e]),[o,n]=Xo.useState(()=>Date.now());Xo.useEffect(()=>{if(Number.isNaN(t)||t<=Date.now())return;let p=setInterval(()=>{let u=Date.now();if(t<=u){n(u),clearInterval(p);return}n(u)},1e3);return()=>clearInterval(p)},[t]);let a=Math.max(0,t-o),s=Math.floor(a/1e3),l=Math.floor(s/86400),c=Math.floor(s%86400/3600),d=Math.floor(s%3600/60),m=s%60,f=a<=0||Number.isNaN(t);return{days:l,hours:c,minutes:d,seconds:m,isFinished:f,totalSeconds:s}}import{jsx as Zg}from"react/jsx-runtime";function Qg({target:e,format:t="HH:mm:ss",onFinish:o,days:n=!1,className:a}){let{days:s,hours:l,minutes:c,seconds:d,isFinished:m,totalSeconds:f}=Zl(e);Jl.useEffect(()=>{m&&o?.()},[m,o]);let p=g=>String(g).padStart(2,"0"),u;return t==="ms"?u=String(Math.max(0,f*1e3)):t==="mm:ss"?u=`${p(c)}:${p(d)}`:t==="dd:HH:mm:ss"||n?u=`${s}:${p(l)}:${p(c)}:${p(d)}`:u=`${p(l)}:${p(c)}:${p(d)}`,Zg("span",{"data-slot":"countdown",className:r("font-mono tabular-nums",a),children:m?"00:00:00":u})}import*as fi from"react";import{jsx as mi,jsxs as tb}from"react/jsx-runtime";var Jg={sm:"size-3.5",default:"size-5",lg:"size-7"};function eb({value:e,defaultValue:t,onChange:o,max:n=5,size:a="default",readonly:s,allowHalf:l,className:c,iconClassName:d,...m}){let[f,p]=fi.useState(t??0),u=e!==void 0,g=u?e:f,[b,v]=fi.useState(null),y=b??g,h=P=>{s||(u||p(P),o?.(P))};return mi("div",{"data-slot":"rating",role:"radiogroup","aria-label":"\u8BC4\u5206",className:r("inline-flex items-center gap-0.5",c),onMouseLeave:()=>v(null),...m,children:Array.from({length:n}).map((P,w)=>{let x=w+1,C=y>=x,R=l&&!C&&y>=x-.5;return tb("button",{type:"button",role:"radio","aria-checked":g===x,"aria-label":`${x} \u661F`,disabled:s,onMouseEnter:()=>!s&&v(x),onClick:()=>h(x),className:r("relative transition-transform",!s&&"cursor-pointer hover:scale-110",s&&"cursor-default"),children:[l&&mi("span",{className:"absolute inset-y-0 left-0 w-1/2",onClick:T=>{T.stopPropagation(),h(x-.5)}}),mi(Fi,{className:r(Jg[a],"transition-colors",C||R?"fill-yellow-400 text-yellow-400":"text-muted-foreground/40 fill-transparent",d)})]},w)})})}import"react";import{useTranslation as ob}from"react-i18next";import{jsx as Ar,jsxs as nb}from"react/jsx-runtime";var ec={default:{icon:Ni},search:{icon:be},error:{icon:bo},network:{icon:Hi}},tc={default:{title:"No data",description:"There are no items to display."},search:{title:"No results",description:"Try adjusting your search or filter criteria."},error:{title:"Something went wrong",description:"An error occurred while loading data."},network:{title:"No connection",description:"Check your internet connection and try again."}};function rb({variant:e="default",icon:t,title:o,description:n,action:a,className:s,centered:l,fullPage:c,texts:d}){let m=!d,{t:f}=ob("data"),p=ec[e]??ec.default,u=t??p.icon,g=tc[e]??tc.default??{title:"",description:""},b=o??d?.title??(m?f(`emptyState.${e}.title`,g.title):g.title),v=n??d?.description??(m?f(`emptyState.${e}.description`,g.description):g.description);return nb("div",{"data-slot":"empty-state",className:r("flex flex-col items-center justify-center py-12 text-center",l&&"min-h-[400px] items-center justify-center",c&&"min-h-svh",s),children:[Ar("div",{className:"bg-muted flex size-12 items-center justify-center rounded-full",children:Ar(u,{className:"text-muted-foreground size-6"})}),Ar("h3",{className:"mt-4 text-lg font-semibold",children:b}),Ar("p",{className:"text-muted-foreground mt-1 max-w-sm text-sm",children:v}),a&&Ar("div",{className:"mt-4",children:a})]})}import"react";import{jsx as lb,jsxs as sb}from"react/jsx-runtime";var ab={sm:"h-7 px-2 text-xs",default:"h-8 px-3 text-sm",lg:"h-9 px-4 text-sm"};function ib({options:e,value:t,defaultValue:o,onChange:n,size:a="default",disabled:s,className:l,orientation:c="horizontal"}){return lb(Qa,{"data-slot":"segmented-control",value:t?[t]:o?[o]:[],onValueChange:d=>{d.length>0&&n?.(d[d.length-1])},orientation:c,className:r("bg-muted/30 inline-flex items-center rounded-md border p-0.5",c==="vertical"&&"flex-col items-stretch",l),children:e.map(d=>sb(Za,{value:d.value,disabled:s||d.disabled,className:r("data-[pressed]:bg-background rounded-sm border-0 bg-transparent shadow-none transition-all data-[pressed]:shadow-xs",ab[a]),children:[d.icon,d.label]},d.value))})}import*as Et from"react";import{useTranslation as cb}from"react-i18next";import{Fragment as ub,jsx as Ye,jsxs as vt}from"react/jsx-runtime";function db({steps:e,open:t,onOpenChange:o,onComplete:n,onSkip:a,storageKey:s,className:l}){let{t:c}=cb("tour"),[d,m]=Et.useState(()=>{if(typeof window>"u"||!s)return!0;try{return localStorage.getItem(s)!=="1"}catch{return!0}}),[f,p]=Et.useState(0),[u,g]=Et.useState(null),b=t??d,v=Et.useCallback(R=>{t===void 0&&m(R),o?.(R)},[t,o]);Et.useEffect(()=>{if(!b)return;let R=e[f];if(!R)return;let T=typeof R.target=="function"?R.target():document.querySelector(R.target);if(!T)return;T.scrollIntoView({behavior:"smooth",block:"center"});let k=()=>g(T.getBoundingClientRect());k();let S=new ResizeObserver(k);return S.observe(T),window.addEventListener("scroll",k,!0),window.addEventListener("resize",k),()=>{S.disconnect(),window.removeEventListener("scroll",k,!0),window.removeEventListener("resize",k)}},[b,f,e]);let y=R=>{R?a?.():n?.(),s&&localStorage.setItem(s,"1"),v(!1),p(0)};if(!b||!u)return null;let h=e[f]??{target:"",title:""},P=h.placement??"bottom",w=h.offset??8,x=Math.min(320,window.innerWidth-16),C=(()=>{let R={position:"fixed",zIndex:9999};return P==="bottom"?(R.top=u.bottom+w,R.left=u.left+u.width/2-x/2):P==="top"?(R.top=u.top-w-200,R.left=u.left+u.width/2-x/2):P==="right"?(R.top=u.top+u.height/2-100,R.left=u.right+w):(R.top=u.top+u.height/2-100,R.left=u.left-w-x),Object.assign(R,{left:Math.max(8,Math.min(R.left,window.innerWidth-x-8)),top:Math.max(8,Math.min(R.top,window.innerHeight-220)),width:x}),R})();return vt(ub,{children:[Ye("div",{"aria-hidden":!0,className:"fixed inset-0 z-[9998] bg-black/40 transition-opacity",onClick:()=>y(!0)}),Ye("div",{"aria-hidden":!0,className:"ring-primary/60 fixed z-[9999] rounded-md ring-4 transition-all",style:{top:u.top-4,left:u.left-4,width:u.width+8,height:u.height+8}}),vt(jn,{"data-slot":"tour",className:r("shadow-xl",l),style:C,children:[Ye(Yn,{className:"pb-2",children:vt("div",{className:"flex items-start justify-between gap-2",children:[vt("div",{children:[vt(Zn,{children:[f+1," / ",e.length]}),Ye(Qn,{className:"text-base",children:h.title})]}),Ye(N,{variant:"ghost",size:"icon-xs",onClick:()=>y(!0),"aria-label":c("tour.close"),children:Ye(U,{})})]})}),h.description&&Ye(Jn,{className:"text-muted-foreground text-sm",children:h.description}),vt(ea,{className:"flex flex-wrap items-center justify-between gap-2",children:[Ye(N,{variant:"ghost",size:"sm",onClick:()=>y(!0),children:c("tour.skip")}),vt("div",{className:"flex flex-wrap items-center justify-end gap-1",children:[vt(N,{variant:"outline",size:"sm",disabled:f===0,onClick:()=>p(R=>Math.max(0,R-1)),children:[Ye(Ze,{}),c("tour.previous")]}),f<e.length-1?vt(N,{size:"sm",onClick:()=>p(R=>R+1),children:[c("tour.next"),Ye($,{})]}):Ye(N,{size:"sm",onClick:()=>y(!1),children:c("tour.complete")})]})]})]})]})}import*as En from"react";import{useTranslation as pb}from"react-i18next";import{jsx as Bt}from"react/jsx-runtime";function mb({text:e,image:t,rotate:o=-22,gap:n=[120,100],fontSize:a=14,className:s,fullPage:l=!0,zIndex:c=1e3,opacity:d=.08,color:m="#000"}){let{t:f}=pb("data"),p=e??f("watermark.default"),[u,g]=En.useState([]),[b,v]=n;return En.useEffect(()=>{if(!l)return;let y=()=>{let h=Math.ceil(window.innerWidth/b)+1,P=Math.ceil(window.innerHeight/v)+1,w=[];for(let x=0;x<P;x++)for(let C=0;C<h;C++)w.push({x:C*b,y:x*v});g(w)};return y(),window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[l,b,v]),l?Bt("div",{"data-slot":"watermark","aria-hidden":!0,className:r("pointer-events-none fixed inset-0 overflow-hidden",s),style:{zIndex:c},children:u.map((y,h)=>Bt("div",{className:"absolute",style:{left:y.x,top:y.y,width:b,height:v,transform:`rotate(${o}deg)`,display:"flex",alignItems:"center",justifyContent:"center"},children:t?Bt("img",{src:t,alt:"",style:{opacity:d,maxHeight:"60%"}}):Bt("span",{className:"font-medium whitespace-nowrap select-none",style:{color:m,fontSize:a,opacity:d},children:p})},h))}):Bt("div",{"data-slot":"watermark","aria-hidden":!0,className:r("pointer-events-none absolute inset-0 overflow-hidden",s),style:{zIndex:c},children:Bt("div",{className:"absolute inset-0 grid place-items-center",style:{transform:`rotate(${o}deg)`},children:t?Bt("img",{src:t,alt:"",style:{opacity:d,maxWidth:"60%"}}):Bt("span",{className:"font-medium whitespace-nowrap select-none",style:{color:m,fontSize:a,opacity:d},children:p})})})}import*as nt from"react";import{useTranslation as fb}from"react-i18next";import{Fragment as vb,jsx as Ae,jsxs as Vt}from"react/jsx-runtime";function gb({options:e,value:t,onChange:o,placeholder:n,searchPlaceholder:a,emptyText:s,disabled:l,className:c,align:d="start",clearable:m=!0,searchable:f=!0,renderOption:p}){let{t:u}=fb("ui"),[g,b]=nt.useState(!1),v=n??u("combobox.placeholder"),y=a??u("combobox.searchPlaceholder"),h=s??u("combobox.emptyText"),P=e.find(w=>w.value===t);return Vt(ue,{open:g,onOpenChange:b,"data-slot":"combobox",children:[Vt(pe,{render:Ae(N,{variant:"outline",role:"combobox",disabled:l,"aria-expanded":g,className:r("w-[200px] justify-between font-normal",!P&&"text-muted-foreground",c)}),children:[Ae("span",{className:"truncate",children:P?.label??v}),Vt("div",{className:"flex items-center gap-1",children:[m&&P&&Ae("span",{role:"button","aria-label":u("combobox.clear"),onClick:w=>{w.stopPropagation(),o?.(void 0)},className:"hover:bg-muted rounded p-0.5",children:Ae(U,{className:"size-3.5 opacity-60 hover:opacity-100"})}),Ae(le,{className:"size-4 opacity-50"})]})]}),g&&Ae(me,{align:d,className:"w-[var(--anchor-width)] p-0",children:Ae(bb,{options:e,value:t,onChange:o,onClose:()=>b(!1),searchPlaceholder:y,searchable:f,emptyText:h,...p?{renderOption:p}:{}})})]})}function bb({options:e,value:t,onChange:o,onClose:n,searchPlaceholder:a,searchable:s,emptyText:l,renderOption:c}){let[d,m]=nt.useState(""),f=nt.useRef(null);nt.useEffect(()=>{f.current?.focus()},[]);let p=nt.useMemo(()=>{if(!d)return e;let g=d.toLowerCase();return e.filter(b=>b.label.toLowerCase().includes(g)||b.value.toLowerCase().includes(g)||b.description?.toLowerCase().includes(g)||b.keywords?.some(v=>v.toLowerCase().includes(g)))},[e,d]),u=nt.useMemo(()=>{let g=new Map;for(let b of p){let v=b.group??"",y=g.get(v)??[];y.push(b),g.set(v,y)}return Array.from(g.entries())},[p]);return Vt(vb,{children:[s&&Vt("div",{className:"flex items-center gap-2 border-b px-3 py-2",children:[Ae(be,{className:"size-4 shrink-0 opacity-50"}),Ae(_,{ref:f,value:d,onChange:g=>m(g.target.value),placeholder:a,className:"h-7 border-0 bg-transparent p-0 shadow-none focus-visible:ring-0"})]}),Vt("div",{className:"max-h-64 overflow-y-auto p-1",children:[u.length===0&&Ae("div",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:l}),u.map(([g,b])=>Vt("div",{children:[g&&Ae("div",{className:"text-muted-foreground px-2 py-1 text-xs font-medium",children:g}),b.map(v=>{let y=v.value===t;return Vt(N,{variant:"ghost",size:"sm",...v.disabled!==void 0?{disabled:v.disabled}:{},onClick:()=>{o?.(v.value),n()},className:r("h-auto w-full justify-start gap-2 rounded-sm px-2 py-1.5 font-normal",y&&"bg-accent/50",v.disabled&&"pointer-events-none opacity-50"),children:[Ae("span",{className:"flex-1 truncate",children:c?c(v):v.label}),y&&Ae(ne,{className:"size-4 shrink-0"})]},v.value)})]},g||"_default"))]})]})}import*as bi from"react";import{useTranslation as xb}from"react-i18next";import{jsx as Er,jsxs as gi}from"react/jsx-runtime";var hb={"bottom-right":"right-4","bottom-left":"left-4","bottom-center":"left-1/2 -translate-x-1/2"};function yb({icon:e,label:t,position:o="bottom-right",offset:n=4,className:a,...s}){return gi(N,{"data-slot":"fab",size:t?"default":"icon-lg",className:r("fixed bottom-4 z-40 rounded-full shadow-lg",hb[o],a),style:{bottom:`calc(${n} * 0.25rem + 1rem)`},...s,children:[e,t&&Er("span",{children:t})]})}function Pb({icon:e,actions:t,position:o="bottom-right"}){let{t:n}=xb("navigation"),[a,s]=bi.useState(!1);return gi("div",{"data-slot":"fab-speed-dial",className:r("fixed bottom-4 z-40 flex flex-col-reverse items-end gap-2",o==="bottom-right"?"right-4":"left-4"),children:[a&&Er("div",{className:"flex flex-col-reverse items-end gap-2",children:t.map((l,c)=>gi("div",{className:"flex items-center gap-2",children:[Er("span",{className:"bg-foreground/90 text-background rounded-md px-2 py-1 text-xs shadow-md",children:l.label}),Er(N,{size:"icon",variant:"secondary",onClick:()=>{l.onClick?.(),s(!1)},className:"rounded-full shadow-md",children:l.icon})]},c))}),Er(N,{size:"icon-lg",onClick:()=>s(l=>!l),className:"rounded-full shadow-lg","aria-expanded":a,"aria-label":n(a?"fab.speedDialClose":"fab.speedDialOpen"),children:e})]})}import*as xt from"react";import{jsx as oc}from"react/jsx-runtime";function Cb({items:e,activeKey:t,onActiveChange:o,offsetTop:n=80,getContainer:a,className:s,...l}){let[c,d]=xt.useState(e[0]?.key??""),m=t??c,f=xt.useRef(null),p=xt.useRef(m);p.current=m;let u=xt.useRef(o);u.current=o,xt.useEffect(()=>{f.current=a?.()??window},[a]),xt.useEffect(()=>{let b=f.current;if(!b)return;let v=()=>{for(let y=e.length-1;y>=0;y--){let h=e[y];if(!h)continue;let P=document.querySelector(h.href);if(P&&P.getBoundingClientRect().top<=n){h.key!==p.current&&(d(h.key),u.current?.(h.key));return}}};return b.addEventListener("scroll",v,{passive:!0}),v(),()=>b.removeEventListener("scroll",v)},[e,n,a]);let g=b=>v=>{v.preventDefault();let y=document.querySelector(b.href);y&&(y.scrollIntoView({behavior:"smooth",block:"start"}),d(b.key),o?.(b.key),window.history.replaceState(null,"",b.href))};return oc("nav",{"data-slot":"anchor",className:r("flex flex-col gap-1",s),...l,children:e.map(b=>oc("a",{href:b.href,onClick:g(b),className:r("block rounded-md px-3 py-1.5 text-sm transition-colors",b.level===2&&"pl-6",b.level===3&&"pl-9",b.key===m?"bg-muted font-medium text-foreground":"text-muted-foreground hover:text-foreground"),children:b.label},b.key))})}import"react";import{jsx as no,jsxs as rc}from"react/jsx-runtime";function wb({bordered:e=!1,direction:t="vertical",size:o="default",className:n,children:a,...s}){return no("div",{"data-slot":"list","data-size":o,className:r("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",o==="sm"&&"text-xs",o==="lg"&&"text-base",e&&"divide-y divide-border rounded-lg border",n),...s,children:a})}function Rb({className:e,...t}){return no("div",{"data-slot":"list-header",className:r("flex items-center px-3 py-2 font-medium text-sm text-foreground",e),...t})}function Nb({avatar:e,children:t,description:o,extra:n,onClick:a,className:s,...l}){return rc("div",{"data-slot":"list-item",className:r("flex items-center gap-3 px-3 py-2.5",a&&"cursor-pointer hover:bg-muted transition-colors",s),onClick:a,role:a?"button":void 0,tabIndex:a?0:void 0,...l,children:[e&&no("div",{className:"shrink-0",children:e}),rc("div",{className:"flex-1 min-w-0",children:[t&&no("div",{className:"text-sm font-medium truncate",children:t}),o&&no("div",{className:"text-xs text-muted-foreground truncate",children:o})]}),n&&no("div",{className:"shrink-0 text-sm text-muted-foreground",children:n})]})}function Ib({className:e,...t}){return no("div",{"data-slot":"list-footer",className:r("flex items-center justify-center px-3 py-2 text-sm text-primary hover:bg-muted transition-colors cursor-pointer",e),...t})}import*as ac from"react";import{jsx as ht,jsxs as nc}from"react/jsx-runtime";var kb={info:ht(Ct,{className:"size-4"}),success:ht(vo,{className:"size-4"}),warning:ht(bo,{className:"size-4"}),error:ht(st,{className:"size-4"})},Sb={info:"bg-blue-50 text-blue-800 border-blue-200 dark:bg-blue-950 dark:text-blue-200 dark:border-blue-900",success:"bg-green-50 text-green-800 border-green-200 dark:bg-green-950 dark:text-green-200 dark:border-green-900",warning:"bg-amber-50 text-amber-800 border-amber-200 dark:bg-amber-950 dark:text-amber-200 dark:border-amber-900",error:"bg-red-50 text-red-800 border-red-200 dark:bg-red-950 dark:text-red-200 dark:border-red-900"},Tb={info:"text-blue-600 dark:text-blue-300",success:"text-green-600 dark:text-green-300",warning:"text-amber-600 dark:text-amber-300",error:"text-red-600 dark:text-red-300"};function Mb({type:e="info",closable:t=!0,title:o,icon:n,onClose:a,banner:s=!1,className:l,children:c,...d}){let[m,f]=ac.useState(!0);if(!m)return null;let p=()=>{f(!1),a?.()};return nc("div",{"data-slot":"notification",role:"alert",className:r("flex gap-3 rounded-lg border p-3 text-sm",Sb[e],s&&"rounded-none border-x-0",l),...d,children:[ht("span",{className:r("mt-0.5 shrink-0",Tb[e]),children:n??kb[e]}),nc("div",{className:"min-w-0 flex-1",children:[o&&ht("div",{className:"mb-1 font-medium",children:o}),ht("div",{children:c})]}),t&&ht("button",{type:"button",onClick:p,className:"shrink-0 rounded-md p-0.5 opacity-70 transition-opacity hover:opacity-100","aria-label":"Close",children:ht(U,{className:"size-4"})})]})}import*as jo from"react";import{jsx as ic}from"react/jsx-runtime";function ao(e,t){return t==null?"":`${e}:col-span-${t}`}function io(e,t){return t==null?"":`${e}:col-start-[${t+1}]`}function so(e,t){return t==null?"":`${e}:order-${t}`}function zb({gutter:e=0,align:t="top",justify:o="start",wrap:n=!0,className:a,style:s,children:l,...c}){let[d,m]=typeof e=="number"?[e,0]:e,f={top:"items-start",middle:"items-center",bottom:"items-end",stretch:"items-stretch"},p={start:"justify-start",end:"justify-end",center:"justify-center","space-around":"justify-around","space-between":"justify-between","space-evenly":"justify-evenly"},u={...d>0&&{marginLeft:-d/2,marginRight:-d/2},...m>0&&{rowGap:m},...s};return ic("div",{"data-slot":"row",className:r("grid grid-cols-24",!n&&"flex-nowrap",f[t],p[o],a),style:u,...c,children:jo.Children.map(l,g=>{if(!jo.isValidElement(g))return g;let b=g.props;return jo.cloneElement(g,{...b,_gutter:d})})})}function Db({span:e,offset:t,order:o,xs:n,sm:a,md:s,lg:l,xl:c,xxl:d,className:m,style:f,children:p,_gutter:u,...g}){let b=[ao("",e),io("",t),so("",o),n&&ao("xs",n.span),n&&io("xs",n.offset),n&&so("xs",n.order),a&&ao("sm",a.span),a&&io("sm",a.offset),a&&so("sm",a.order),s&&ao("md",s.span),s&&io("md",s.offset),s&&so("md",s.order),l&&ao("lg",l.span),l&&io("lg",l.offset),l&&so("lg",l.order),c&&ao("xl",c.span),c&&io("xl",c.offset),c&&so("xl",c.order),d&&ao("2xl",d.span),d&&io("2xl",d.offset),d&&so("2xl",d.order)].filter(Boolean).join(" "),v={...u!=null&&u>0&&{paddingLeft:u/2,paddingRight:u/2},...f};return ic("div",{className:r(b,m),style:v,"data-slot":"col",...g,children:p})}import"react";import{jsx as Bn,jsxs as Fb}from"react/jsx-runtime";function Lb({value:e,onChange:t,onSend:o,placeholder:n,disabled:a,className:s}){let l=m=>{m.key==="Enter"&&!m.shiftKey&&(m.preventDefault(),a||o?.())},c=m=>{t?.(m.target.value)},d=()=>{a||o?.()};return Fb("div",{"data-slot":"chat-input",className:r("flex items-end gap-2 rounded-lg border border-input bg-background p-2",a&&"pointer-events-none opacity-50",s),children:[Bn("label",{htmlFor:"chat-input-field",className:"sr-only",children:n??"\u6D88\u606F\u8F93\u5165"}),Bn("textarea",{id:"chat-input-field","data-slot":"chat-input-field",rows:1,className:"min-h-8 flex-1 resize-none bg-transparent px-1 py-1 text-sm outline-none placeholder:text-muted-foreground",value:e,placeholder:n,disabled:a,onChange:c,onKeyDown:l}),Bn("button",{type:"button","data-slot":"chat-input-send","aria-label":"\u53D1\u9001",className:"inline-flex size-8 shrink-0 items-center justify-center rounded-md bg-primary text-primary-foreground transition-colors hover:bg-primary/80 disabled:pointer-events-none disabled:opacity-50",disabled:a,onClick:d,children:Bn(Li,{})})]})}import"react";import{jsx as Vn,jsxs as vi}from"react/jsx-runtime";function Ab({role:e="assistant",content:t,avatar:o,name:n,time:a,className:s}){let l=e==="user",c=e==="system";return vi("div",{"data-slot":"chat-message","data-role":e,className:r("flex w-full gap-2",l&&"flex-row-reverse justify-start",!l&&!c&&"flex-row justify-start",c&&"justify-center",s),children:[o!=null&&!c?Vn("div",{"data-slot":"chat-message-avatar",className:"shrink-0",children:o}):null,vi("div",{"data-slot":"chat-message-body",className:r("flex max-w-[80%] flex-col gap-1",l&&"items-end",!l&&!c&&"items-start"),children:[(n!=null||a!=null)&&!c?vi("div",{"data-slot":"chat-message-meta",className:"flex items-center gap-1 text-xs text-muted-foreground",children:[n!=null?Vn("span",{children:n}):null,a!=null?Vn("span",{children:a}):null]}):null,Vn("div",{"data-slot":"chat-message-bubble",className:r("rounded-lg px-3 py-2 text-sm whitespace-pre-wrap",l&&"bg-primary text-primary-foreground rounded-br-sm",!l&&!c&&"bg-muted text-foreground rounded-bl-sm",c&&"bg-muted/50 text-muted-foreground text-xs"),children:t})]})]})}import{useTheme as Eb}from"next-themes";import{Toaster as Bb}from"sonner";import{jsx as Yo}from"react/jsx-runtime";var sc=({...e})=>{let{theme:t}=Eb();return Yo(Bb,{theme:t??"system",className:"toaster group","data-slot":"sonner",icons:{success:Yo(Wr,{className:"size-4"}),info:Yo(Ct,{className:"size-4"}),warning:Yo(Yr,{className:"size-4"}),error:Yo(jr,{className:"size-4"}),loading:Yo(ki,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},toastOptions:{classNames:{toast:"cn-toast"}},...e})};import{jsx as lc}from"react/jsx-runtime";function Vb(e={}){let{position:t="top-right",visibleToasts:o=5}=e;return lc("div",{"data-slot":"message-provider",children:lc(sc,{position:t,visibleToasts:o})})}import*as Br from"react";import{jsx as Hn,jsxs as Ob}from"react/jsx-runtime";function Hb({onRefresh:e,refreshing:t=!1,children:o,threshold:n=60,className:a}){let[s,l]=Br.useState(0),c=Br.useRef(null),d=Br.useRef(!1),m=b=>{t||(c.current=b.touches[0]?.clientY??null,d.current=!0)},f=b=>{if(!d.current||c.current===null||t)return;let y=(b.touches[0]?.clientY??0)-c.current;y>0&&l(y)},p=()=>{d.current=!1,s>=n&&!t&&e?.(),l(0),c.current=null},u=t||s>0,g=t?n:s;return Ob("div",{"data-slot":"mobile-pull-refresh",className:r("relative overflow-hidden touch-none",a),onTouchStart:m,onTouchMove:f,onTouchEnd:p,children:[Hn("div",{"data-slot":"mobile-pull-refresh-indicator","aria-hidden":u?"false":"true",className:"flex items-center justify-center text-xs text-muted-foreground transition-opacity",style:{height:`${g}px`,opacity:u?1:0},children:t?Hn("span",{"data-slot":"mobile-pull-refresh-spinner",className:"animate-spin",children:"\u27F3"}):Hn("span",{children:s>=n?"\u91CA\u653E\u5237\u65B0":"\u4E0B\u62C9\u5237\u65B0"})}),Hn("div",{"data-slot":"mobile-pull-refresh-content",style:{transform:`translateY(${t?n:0}px)`},children:o})]})}import*as Qo from"react";import{jsx as Vr,jsxs as Ub}from"react/jsx-runtime";function Gb({leftActions:e=[],rightActions:t=[],children:o,className:n,actionWidth:a=80}){let[s,l]=Qo.useState(0),c=Qo.useRef(null),d=Qo.useRef(!1),m=Qo.useRef(0),f=e.length*a,p=t.length*a,u=h=>h==="destructive"?"bg-destructive/80 text-destructive-foreground":h==="primary"?"bg-primary text-primary-foreground":"bg-muted text-foreground",g=h=>{c.current=h.touches[0]?.clientX??null,d.current=!0,m.current=s},b=h=>{if(!d.current||c.current===null)return;let w=(h.touches[0]?.clientX??0)-c.current,x=m.current+w;x>0&&(x=Math.min(x,f)),x<0&&(x=Math.max(x,-p)),l(x)},v=()=>{d.current=!1,c.current=null,s>a/2?l(f):s<-a/2?l(-p):l(0)},y=h=>{l(0),h.onClick()};return Ub("div",{"data-slot":"mobile-swipe-action",className:r("relative overflow-hidden touch-none select-none",n),children:[e.length>0?Vr("div",{"data-slot":"mobile-swipe-action-left",className:"absolute inset-y-0 left-0 flex",children:e.map(h=>Vr("button",{type:"button","data-slot":"mobile-swipe-action-button","aria-label":h.label,onClick:()=>y(h),style:{width:`${a}px`},className:r("flex items-center justify-center text-sm text-white",u(h.color)),children:h.label},h.key))}):null,t.length>0?Vr("div",{"data-slot":"mobile-swipe-action-right",className:"absolute inset-y-0 right-0 flex",children:t.map(h=>Vr("button",{type:"button","data-slot":"mobile-swipe-action-button","aria-label":h.label,onClick:()=>y(h),style:{width:`${a}px`},className:r("flex items-center justify-center text-sm text-white",u(h.color)),children:h.label},h.key))}):null,Vr("div",{"data-slot":"mobile-swipe-action-content",className:"relative bg-background transition-transform",style:{transform:`translateX(${s}px)`},onTouchStart:g,onTouchMove:b,onTouchEnd:v,children:o})]})}import"react";import{jsx as cc}from"react/jsx-runtime";function _b(e,t,o){if(t===void 0)return!0;let n=Array.isArray(t)?t:[t];return n.length===0?!0:o==="all"?n.every(a=>e.includes(a)):n.some(a=>e.includes(a))}function $b({permissions:e,require:t,mode:o="any",fallback:n=null,children:a,className:s}){return _b(e??[],t,o)?cc("div",{"data-slot":"with-permission","data-allowed":"true",className:r("",s),children:a}):cc("div",{"data-slot":"with-permission","data-allowed":"false",className:r("",s),children:n})}import"react";import{jsx as dc}from"react/jsx-runtime";var Kb={inherit:{width:"1em",height:"1em"},sm:{width:"0.875rem",height:"0.875rem"},md:{width:"1.25rem",height:"1.25rem"},lg:{width:"1.5rem",height:"1.5rem"},xl:{width:"2rem",height:"2rem"}};function qb({icon:e,size:t="inherit",spin:o,pulse:n,className:a,...s}){let l=Kb[t];return dc("span",{"data-slot":"icon",className:r("inline-flex items-center justify-center",o&&"animate-spin",n&&"animate-pulse",a),"aria-hidden":"true",...s,children:dc(e,{style:{width:l.width,height:l.height}})})}import*as Ht from"react";import{useTranslation as pc}from"react-i18next";import{Fragment as jb,jsx as se,jsxs as at}from"react/jsx-runtime";var Wb=(e,t)=>t.label.toLowerCase().includes(e.toLowerCase());function Xb({dataSource:e,targetKeys:t=[],onChange:o,titles:n,searchable:a=!0,filterOption:s=Wb,render:l,disabled:c,className:d,oneWay:m=!1}){let{t:f}=pc("transfer"),p=n??[f("transfer.sourceTitle"),f("transfer.targetTitle")],[u,g]=Ht.useState([]),[b,v]=Ht.useState([]),[y,h]=Ht.useState(""),[P,w]=Ht.useState(""),x=Ht.useMemo(()=>e.filter(z=>!t.includes(z.key)),[e,t]),C=Ht.useMemo(()=>e.filter(z=>t.includes(z.key)),[e,t]),R=x.filter(z=>s(y,z)),T=C.filter(z=>s(P,z)),k=()=>{if(c)return;let z=Array.from(new Set([...t,...u]));o?.(z),g([])},S=()=>{if(c)return;let z=t.filter(O=>!b.includes(O));o?.(z),v([])},M=z=>{c||(o?.(Array.from(new Set([...t,z]))),g(O=>O.filter(ge=>ge!==z)))},G=z=>{c||m||(o?.(t.filter(O=>O!==z)),v(O=>O.filter(ge=>ge!==z)))},Q=z=>{g(O=>O.includes(z)?O.filter(ge=>ge!==z):[...O,z])},F=z=>{g(z?R.map(O=>O.key):[])},I=z=>{v(O=>O.includes(z)?O.filter(ge=>ge!==z):[...O,z])},L=z=>{v(z?T.map(O=>O.key):[])};return at("div",{"data-slot":"transfer",className:r("flex min-w-0 flex-col gap-2 sm:flex-row sm:items-stretch",c&&"opacity-50",d),children:[se(uc,{title:p[0],items:R,selected:u,onToggle:Q,onToggleAll:F,searchable:a,searchValue:y,onSearchChange:h,...l?{render:l}:{},...c!==void 0?{disabled:c}:{},onMoveItem:M}),at("div",{className:"flex flex-row items-center justify-center gap-2 sm:flex-col",children:[se(N,{variant:"outline",size:"icon",onClick:k,disabled:u.length===0||c,"aria-label":f("transfer.moveToTarget"),children:se($,{className:"rotate-90 sm:rotate-0"})}),!m&&se(N,{variant:"outline",size:"icon",onClick:S,disabled:b.length===0||c,"aria-label":f("transfer.moveToSource"),children:se(Ze,{className:"rotate-90 sm:rotate-0"})})]}),se(uc,{title:p[1],items:T,selected:b,onToggle:I,onToggleAll:L,searchable:a,searchValue:P,onSearchChange:w,...l?{render:l}:{},...c!==void 0?{disabled:c}:{},...m?{}:{onMoveItem:G}})]})}function uc({title:e,items:t,selected:o,onToggle:n,onToggleAll:a,searchable:s,searchValue:l,onSearchChange:c,render:d,disabled:m,onMoveItem:f}){let{t:p}=pc("transfer"),u=t.length>0&&t.every(v=>o.includes(v.key)),g=t.some(v=>o.includes(v.key)),b=v=>{m||v.disabled||f?.(v.key)};return at("div",{className:"flex h-72 w-full min-w-0 flex-col rounded-md border",children:[at("div",{className:"flex items-center justify-between border-b px-3 py-2 text-sm font-medium",children:[se("span",{children:e}),at("span",{className:"text-muted-foreground text-xs",children:[o.length,"/",t.length]})]}),s&&at("div",{className:"flex items-center gap-2 border-b px-3 py-2",children:[se(be,{className:"size-4 shrink-0 opacity-50"}),se(_,{value:l,onChange:v=>c(v.target.value),placeholder:p("transfer.search"),className:"h-7 border-0 bg-transparent p-0 shadow-none focus-visible:ring-0"})]}),at("div",{className:"flex items-center border-b px-3 py-1.5",children:[at(N,{variant:"ghost",size:"icon-xs","aria-label":p("transfer.selectAll"),...m!==void 0?{disabled:m||t.length===0}:{disabled:t.length===0},className:r("size-4 rounded-[4px] border p-0",u?"border-primary bg-primary text-primary-foreground hover:bg-primary/80":g?"border-primary bg-primary/50 text-primary-foreground hover:bg-primary/50":"border-input"),onClick:()=>a?.(!u),children:[u&&se(ne,{className:"size-3"}),!u&&g&&se("span",{className:"bg-primary-foreground block h-0.5 w-2"})]}),se("span",{className:"text-muted-foreground ml-2 text-xs",children:p("transfer.selectAll")})]}),se("div",{className:"flex-1 overflow-y-auto p-1",children:t.length===0?se("div",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:p("transfer.noData")}):t.map(v=>at("label",{onDoubleClick:()=>b(v),className:r("flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm","hover:bg-accent",v.disabled&&"pointer-events-none opacity-50"),children:[se(De,{checked:o.includes(v.key),onCheckedChange:()=>n(v.key),disabled:v.disabled||m}),se("div",{className:"min-w-0 flex-1 truncate",children:d?d(v):at(jb,{children:[se("div",{className:"truncate",children:v.label}),v.description&&se("div",{className:"text-muted-foreground truncate text-xs",children:v.description})]})})]},v.key))})]})}import*as xi from"react";var Yb="zh-CN";function Qb(){return Yb}function mc(e,t={timeStyle:"short"},o=Qb()){let n=e instanceof Date?e:new Date(e);return Number.isNaN(n.getTime())?"-":new Intl.DateTimeFormat(o,t).format(n)}import{jsx as ze,jsxs as Hr}from"react/jsx-runtime";function Or(e){return e.toString().padStart(2,"0")}function fc(e,t){let o=e>=12?"PM":"AM";return`${e%12||12}:${Or(t)} ${o}`}function Zb(e){let t=/^(\d{1,2}):(\d{2})$/.exec(e);if(t){let n=Number(t[1]??"0"),a=Number(t[2]??"0");if(n>=0&&n<24&&a>=0&&a<60)return{h:n,m:a}}let o=/^(\d{1,2}):(\d{2})\s*(AM|PM)$/i.exec(e);if(o){let n=Number(o[1]??"0"),a=Number(o[2]??"0"),s=(o[3]??"AM").toUpperCase();if(s==="PM"&&n<12&&(n+=12),s==="AM"&&n===12&&(n=0),n>=0&&n<24&&a>=0&&a<60)return{h:n,m:a}}return null}function Jb({value:e,onChange:t,step:o=1,format:n="24h",disabled:a,placeholder:s="\u9009\u62E9\u65F6\u95F4",className:l}){let c=e?Zb(e):null,d=xi.useMemo(()=>{let p=[],u=n==="12h"?12:24;for(let g=n==="12h"?1:0;g<u;g++)p.push(g);return p},[n]),m=xi.useMemo(()=>{let p=[];for(let u=0;u<60;u+=o)p.push(u);return p},[o]),f=(p,u)=>{let g=n==="12h"?fc(p,u):`${Or(p)}:${Or(u)}`;t?.(g)};return ze("div",{"data-slot":"time-picker",children:Hr(ue,{children:[Hr(pe,{render:ze(N,{variant:"outline",disabled:a,className:r("w-[160px] justify-start text-left font-normal",!e&&"text-muted-foreground",l)}),children:[ze(wi,{}),e??ze("span",{children:s})]}),ze(me,{className:"w-auto p-3",align:"start",children:Hr("div",{className:"flex items-center gap-2",children:[Hr(Ro,{value:c?String(c.h):void 0,onValueChange:p=>{let u=c?.m??0;f(Number(p),u)},children:[ze(Io,{className:"w-[88px]","aria-label":"\u5C0F\u65F6",children:ze(No,{placeholder:"\u65F6"})}),ze(ko,{className:"max-h-64",children:d.map(p=>ze(So,{value:String(p),children:n==="12h"?p===12?12:p:Or(p)},p))})]}),ze("span",{children:":"}),Hr(Ro,{value:c?String(c.m):void 0,onValueChange:p=>{let u=c?.h??0;f(u,Number(p))},children:[ze(Io,{className:"w-[88px]","aria-label":"\u5206\u949F",children:ze(No,{placeholder:"\u5206"})}),ze(ko,{className:"max-h-64",children:m.map(p=>ze(So,{value:String(p),children:Or(p)},p))})]})]})})]})})}function ev(e,t,o="24h"){return o==="12h"?fc(e,t):mc(new Date(2e3,0,1,e,t),{timeStyle:"short"})}import*as lo from"react";import{jsx as hi,jsxs as ov}from"react/jsx-runtime";function tv({onLoadMore:e,hasMore:t=!0,loading:o=!1,loader:n,threshold:a="200px",scrollContainer:s,endMessage:l="No more data",className:c,children:d,...m}){let f=lo.useRef(null),p=lo.useRef(e);p.current=e;let u=lo.useRef(o);u.current=o;let g=lo.useRef(t);return g.current=t,lo.useEffect(()=>{let b=f.current;if(!b)return;let v=new IntersectionObserver(y=>{y[0]?.isIntersecting&&!u.current&&g.current&&p.current?.()},{root:s??null,rootMargin:`${a} 0px`});return v.observe(b),()=>v.disconnect()},[a,s]),ov("div",{"data-slot":"infinite-scroll",className:r("flex flex-col",c),...m,children:[d,hi("div",{ref:f,className:"flex items-center justify-center py-4","aria-live":"polite",children:o?n??hi(Vo,{size:"sm"}):t?null:hi("span",{className:"text-muted-foreground text-xs",children:l})})]})}import*as bc from"react";import{jsx as gc}from"react/jsx-runtime";function rv({columns:e=3,gap:t=16,className:o,children:n,style:a,...s}){return gc("div",{"data-slot":"masonry",className:r(o),style:{columnCount:typeof e=="number"?e:void 0,columnGap:`${t}px`,...a},...s,children:bc.Children.map(n,l=>gc("div",{className:"break-inside-avoid",style:{marginBottom:`${t}px`},children:l}))})}import"react";import{jsx as Gr,jsxs as vc}from"react/jsx-runtime";function nv(e){return"options"in e}function av({options:e=[],placeholder:t,size:o="default",error:n,disabled:a,className:s,children:l,...c}){return vc("div",{"data-slot":"native-select",className:"relative inline-flex",children:[vc("select",{"data-size":o,disabled:a,className:r("border-input focus-visible:border-ring focus-visible:ring-ring/50 flex w-full appearance-none items-center justify-between gap-1.5 rounded-lg border bg-transparent py-2 pr-8 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50",n&&"border-destructive ring-destructive/20 ring-3",o==="default"&&"h-8",o==="sm"&&"h-7 text-xs",s),...c,children:[t&&Gr("option",{value:"",disabled:!0,children:t}),e.map(d=>nv(d)?Gr("optgroup",{label:d.label,children:d.options.map(m=>Gr("option",{value:m.value,disabled:m.disabled,children:m.label},m.value))},d.label):Gr("option",{value:d.value,disabled:d.disabled,children:d.label},d.value)),l]}),Gr(le,{className:"text-muted-foreground pointer-events-none absolute top-1/2 right-2 size-4 -translate-y-1/2"})]})}import"react";import{jsx as On,jsxs as dv}from"react/jsx-runtime";var iv={info:Ct,success:vo,warning:bo,error:st},sv={info:"bg-blue-50/60 text-blue-700 dark:bg-blue-950/30 dark:text-blue-300",success:"bg-green-50/60 text-green-700 dark:bg-green-950/30 dark:text-green-300",warning:"bg-amber-50/60 text-amber-700 dark:bg-amber-950/30 dark:text-amber-300",error:"bg-red-50/60 text-red-700 dark:bg-red-950/30 dark:text-red-300"},lv={info:"text-blue-500 dark:text-blue-400",success:"text-green-500 dark:text-green-400",warning:"text-amber-500 dark:text-amber-400",error:"text-red-500 dark:text-red-400"};function cv({variant:e="info",icon:t,action:o,className:n,children:a,...s}){let l=iv[e];return dv("div",{"data-slot":"message","data-variant":e,role:"status",className:r("flex items-start gap-2 rounded-md px-3 py-2 text-sm",sv[e],n),...s,children:[On("span",{className:r("mt-0.5 shrink-0",lv[e]),children:t??On(l,{className:"size-4"})}),On("span",{className:"flex-1",children:a}),o&&On("span",{className:"shrink-0",children:o})]})}import"react";import{jsx as pv}from"react/jsx-runtime";function uv({dir:e="ltr",className:t,children:o,...n}){return pv("div",{"data-slot":"direction","data-dir":e,dir:e,className:r(e==="rtl"&&"[direction:rtl]",t),...n,children:o})}import"react";import{jsx as co,jsxs as yi}from"react/jsx-runtime";var mv={xs:"icon-xs",sm:"icon-sm",default:"icon",lg:"icon-lg"};function fv({children:e,onClick:t,actions:o,variant:n="default",size:a="default",disabled:s=!1,icon:l,loading:c=!1,className:d}){let m=s||c,f=mv[a]??"icon",p=o!=null&&o.length>0;return yi("div",{"data-slot":"split-button",className:r("inline-flex items-center",d),children:[co(N,{variant:n,size:a,disabled:m,onClick:t,icon:c?co(Ii,{className:"animate-spin"}):l,className:"rounded-r-none",children:e}),p&&yi(pr,{disabled:m,children:[co(mr,{className:r($t({variant:n,size:f}),"-ml-px rounded-l-none"),children:co(le,{})}),co(Co,{align:"end",children:o.map((u,g)=>{let b=[];return u.separator&&g>0&&b.push(co(ba,{},`sep-${g}`)),b.push(yi(fr,{variant:u.destructive?"destructive":"default",disabled:u.disabled,onClick:u.onClick,children:[u.icon!=null&&co("span",{className:"shrink-0",children:u.icon}),u.label]},u.label)),b})})]})]})}import*as Y from"react";import{jsx as Ot,jsxs as uo}from"react/jsx-runtime";function xc(e,t){let o=t.getBoundingClientRect();return{x:(e.clientX-o.left)/o.width*t.width,y:(e.clientY-o.top)/o.height*t.height}}var gv=Y.forwardRef(function({penColor:t="currentColor",penWidth:o=2,height:n=200,width:a,guideLine:s=!1,readOnly:l=!1,value:c,onChange:d,onSave:m,showActions:f=!0,saveLabel:p="Save",clearLabel:u="Clear",placeholder:g="Sign here",className:b,...v},y){let h=Y.useRef(null),P=Y.useRef(!1),w=Y.useRef([]),x=Y.useRef([]),[C,R]=Y.useState(!1),T=Y.useCallback(()=>{let A=h.current;if(!A)return;let D=A.getContext("2d");if(!D)return;let J=typeof window<"u"&&window.devicePixelRatio||1,re=A.getBoundingClientRect(),Oe=Math.max(1,Math.round(re.width*J)),_r=Math.max(1,Math.round(re.height*J));if(A.width!==Oe||A.height!==_r){let fo=document.createElement("canvas");fo.width=A.width,fo.height=A.height;let Gt=fo.getContext("2d");Gt&&Gt.drawImage(A,0,0),A.width=Oe,A.height=_r,D.drawImage(fo,0,0,A.width,A.height)}D.lineJoin="round",D.lineCap="round",D.lineWidth=o*J,D.strokeStyle=t},[t,o]);Y.useEffect(()=>{T()},[T]),Y.useEffect(()=>{let A=h.current,D=A?.getContext("2d");if(!A||!D)return;let J=typeof window<"u"&&window.devicePixelRatio||1;D.lineJoin="round",D.lineCap="round",D.lineWidth=o*J,D.strokeStyle=t},[t,o]);let k=(A,D)=>{let J=h.current,re=J?.getContext("2d");!J||!re||(re.beginPath(),re.moveTo(A.x,A.y),re.lineTo(D.x,D.y),re.stroke())},S=Y.useCallback(()=>{let A=h.current,D=A?.getContext("2d");if(!A||!D)return;let J=typeof window<"u"&&window.devicePixelRatio||1;D.clearRect(0,0,A.width,A.height),D.lineJoin="round",D.lineCap="round",D.lineWidth=o*J,D.strokeStyle=t;for(let re of w.current)for(let Oe=1;Oe<re.length;Oe++)D.beginPath(),D.moveTo(re[Oe-1].x,re[Oe-1].y),D.lineTo(re[Oe].x,re[Oe].y),D.stroke()},[t,o]),M=A=>{if(l)return;let D=h.current;if(!D)return;D.setPointerCapture(A.pointerId),P.current=!0;let J=xc(A,D);x.current=[J],C||(R(!0),d?.(!1))},G=A=>{if(l)return;let D=h.current;if(!D||!P.current)return;let J=xc(A,D),re=x.current[x.current.length-1];re&&k(re,J),x.current.push(J)},Q=A=>{if(l)return;let D=h.current;if(D)try{D.releasePointerCapture(A.pointerId)}catch{}P.current&&x.current.length>0&&w.current.push([...x.current]),P.current=!1,x.current=[]},F=Y.useCallback(()=>{let A=h.current,D=A?.getContext("2d");!A||!D||(D.clearRect(0,0,A.width,A.height),w.current=[],x.current=[],R(!1),d?.(!0))},[d]),I=Y.useCallback(()=>!C,[C]),L=Y.useCallback(A=>{let D=h.current;return!D||!C?null:D.toDataURL(A??"image/png")},[C]),z=Y.useCallback(()=>new Promise(A=>{let D=h.current;if(!D||!C){A(null);return}D.toBlob(J=>A(J),"image/png")}),[C]),O=Y.useCallback(()=>{w.current.length!==0&&(w.current.pop(),S(),w.current.length===0&&(R(!1),d?.(!0)))},[S,d]);Y.useImperativeHandle(y,()=>({clear:F,isEmpty:I,toDataURL:L,toBlob:z,undo:O}),[F,I,L,z,O]);let ge=async()=>{let A=L();if(!A)return;let D=await z();m?.({dataUrl:A,blob:D})},Ur=()=>!l||!c?null:Ot("img",{src:c,alt:"Signature","data-slot":"signature-pad-readonly",className:"pointer-events-none absolute inset-0 h-full w-full object-contain"});return uo("div",{"data-slot":"signature-pad",className:r("flex flex-col gap-2 text-foreground",b),...v,children:[uo("div",{className:"relative overflow-hidden rounded-lg border bg-background",style:{height:n,...a?{width:a}:{width:"100%"}},children:[Ot("canvas",{ref:h,"data-slot":"signature-pad-canvas",onPointerDown:M,onPointerMove:G,onPointerUp:Q,onPointerCancel:Q,className:r("h-full w-full touch-none",l&&"pointer-events-none"),role:"img","aria-label":"Signature canvas"}),!C&&!l?uo("div",{"data-slot":"signature-pad-placeholder",className:"pointer-events-none absolute inset-0 flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[Ot(Gi,{className:"size-5","aria-hidden":"true"}),Ot("span",{children:g})]}):null,s&&!l?Ot("div",{"data-slot":"signature-pad-guideline",className:"pointer-events-none absolute inset-x-4 border-b border-dashed border-border",style:{bottom:"25%"},"aria-hidden":"true"}):null,Ur()]}),f&&!l?uo("div",{className:"flex justify-end gap-2","data-slot":"signature-pad-actions",children:[uo("button",{type:"button",onClick:O,disabled:!C,className:"inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm hover:bg-muted disabled:opacity-50 disabled:pointer-events-none",children:[Ot($i,{className:"size-4","aria-hidden":"true"}),"Undo"]}),uo("button",{type:"button",onClick:F,className:"inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm hover:bg-muted",children:[Ot(Ai,{className:"size-4","aria-hidden":"true"}),u]}),uo("button",{type:"button",onClick:ge,disabled:!C,className:"inline-flex items-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground disabled:opacity-50 disabled:pointer-events-none",children:[Ot(Oi,{className:"size-4","aria-hidden":"true"}),p]})]}):null]})});import*as Qe from"react";import{HomeIcon as bv,ArrowLeftIcon as vv,ArrowRightIcon as xv,ChevronRightIcon as hv,ChevronLeftIcon as yv,ChevronDownIcon as Pv,ChevronUpIcon as Cv,MenuIcon as wv,MoreHorizontalIcon as Rv,MoreVerticalIcon as Nv,ExternalLinkIcon as Iv,LinkIcon as kv,PlusIcon as Sv,MinusIcon as Tv,XIcon as Mv,CheckIcon as zv,EditIcon as Dv,Trash2Icon as Lv,CopyIcon as Fv,DownloadIcon as Av,UploadIcon as Ev,ShareIcon as Bv,RefreshCcwIcon as Vv,SearchIcon as hc,FilterIcon as Hv,SettingsIcon as Ov,AlertCircleIcon as Gv,AlertTriangleIcon as Uv,CheckCircleIcon as _v,InfoIcon as $v,XCircleIcon as Kv,HelpCircleIcon as qv,ClockIcon as Wv,TimerIcon as Xv,FileIcon as jv,FileTextIcon as Yv,FolderIcon as Qv,FolderOpenIcon as Zv,ImagePlusIcon as Jv,ArchiveIcon as ex,BarChart3Icon as tx,PieChartIcon as ox,LineChartIcon as rx,TableIcon as nx,DatabaseIcon as ax,LayersIcon as ix,UserIcon as sx,UsersIcon as lx,UserPlusIcon as cx,UserMinusIcon as dx,UserCheckIcon as ux,ShieldIcon as px,LockIcon as mx,UnlockIcon as fx,MailIcon as gx,MessageSquareIcon as bx,PhoneIcon as vx,BellIcon as xx,SendIcon as hx,AtSignIcon as yx,ShoppingCartIcon as Px,CreditCardIcon as Cx,WalletIcon as wx,TagIcon as Rx,DollarSignIcon as Nx,PackageIcon as Ix,TruckIcon as kx,BookOpenIcon as Sx,PenIcon as Tx,StampIcon as Mx,BookmarkIcon as zx,FlagIcon as Dx,StarIcon as Lx,HeartIcon as Fx,SlidersIcon as Ax,MonitorIcon as Ex,SmartphoneIcon as Bx,PrinterIcon as Vx,WifiIcon as Hx}from"lucide-react";import{jsx as ke,jsxs as po}from"react/jsx-runtime";var Ox=[{name:"Home",icon:bv,category:"Navigation",keywords:["house","main"]},{name:"ArrowLeft",icon:vv,category:"Navigation",keywords:["back","previous"]},{name:"ArrowRight",icon:xv,category:"Navigation",keywords:["forward","next"]},{name:"ChevronRight",icon:hv,category:"Navigation",keywords:["caret","expand"]},{name:"ChevronLeft",icon:yv,category:"Navigation",keywords:["caret","collapse"]},{name:"ChevronDown",icon:Pv,category:"Navigation",keywords:["caret","expand","dropdown"]},{name:"ChevronUp",icon:Cv,category:"Navigation",keywords:["caret","collapse"]},{name:"Menu",icon:wv,category:"Navigation",keywords:["hamburger","nav"]},{name:"MoreHorizontal",icon:Rv,category:"Navigation",keywords:["ellipsis","dots","overflow"]},{name:"MoreVertical",icon:Nv,category:"Navigation",keywords:["ellipsis","dots","overflow","kebab"]},{name:"ExternalLink",icon:Iv,category:"Navigation",keywords:["outbound","open","new tab"]},{name:"Link",icon:kv,category:"Navigation",keywords:["chain","url","hyperlink"]},{name:"Plus",icon:Sv,category:"Action",keywords:["add","create","new"]},{name:"Minus",icon:Tv,category:"Action",keywords:["remove","subtract"]},{name:"X",icon:Mv,category:"Action",keywords:["close","cancel","delete","cross"]},{name:"Check",icon:zv,category:"Action",keywords:["confirm","done","tick","approve"]},{name:"Edit",icon:Dv,category:"Action",keywords:["pencil","modify","update"]},{name:"Trash2",icon:Lv,category:"Action",keywords:["delete","remove","bin"]},{name:"Copy",icon:Fv,category:"Action",keywords:["duplicate","clipboard"]},{name:"Download",icon:Av,category:"Action",keywords:["save","export"]},{name:"Upload",icon:Ev,category:"Action",keywords:["import","send"]},{name:"Share",icon:Bv,category:"Action",keywords:["forward","distribute"]},{name:"RefreshCcw",icon:Vv,category:"Action",keywords:["reload","retry","sync"]},{name:"Search",icon:hc,category:"Action",keywords:["find","lookup","magnifying"]},{name:"Filter",icon:Hv,category:"Action",keywords:["funnel","sort"]},{name:"Settings",icon:Ov,category:"Action",keywords:["gear","cog","preferences","config"]},{name:"AlertCircle",icon:Gv,category:"Status",keywords:["warning","error","danger"]},{name:"AlertTriangle",icon:Uv,category:"Status",keywords:["warning","caution"]},{name:"CheckCircle",icon:_v,category:"Status",keywords:["success","complete","done"]},{name:"Info",icon:$v,category:"Status",keywords:["information","help","about"]},{name:"XCircle",icon:Kv,category:"Status",keywords:["error","fail","cancel"]},{name:"HelpCircle",icon:qv,category:"Status",keywords:["question","support","faq"]},{name:"Clock",icon:Wv,category:"Status",keywords:["time","schedule","pending"]},{name:"Timer",icon:Xv,category:"Status",keywords:["stopwatch","countdown","duration"]},{name:"File",icon:jv,category:"File",keywords:["document","page"]},{name:"FileText",icon:Yv,category:"File",keywords:["document","text","report"]},{name:"Folder",icon:Qv,category:"File",keywords:["directory","collection"]},{name:"FolderOpen",icon:Zv,category:"File",keywords:["directory","browse"]},{name:"ImagePlus",icon:Jv,category:"File",keywords:["photo","picture","add image"]},{name:"Archive",icon:ex,category:"File",keywords:["zip","compress","storage"]},{name:"BarChart3",icon:tx,category:"Data",keywords:["graph","analytics","statistics"]},{name:"PieChart",icon:ox,category:"Data",keywords:["graph","analytics","proportion"]},{name:"LineChart",icon:rx,category:"Data",keywords:["graph","analytics","trend"]},{name:"Table",icon:nx,category:"Data",keywords:["grid","spreadsheet","rows"]},{name:"Database",icon:ax,category:"Data",keywords:["storage","server","data"]},{name:"Layers",icon:ix,category:"Data",keywords:["stack","overlap","hierarchy"]},{name:"User",icon:sx,category:"User",keywords:["person","account","profile"]},{name:"Users",icon:lx,category:"User",keywords:["people","group","team"]},{name:"UserPlus",icon:cx,category:"User",keywords:["add person","invite"]},{name:"UserMinus",icon:dx,category:"User",keywords:["remove person"]},{name:"UserCheck",icon:ux,category:"User",keywords:["verified","approved"]},{name:"Shield",icon:px,category:"User",keywords:["security","protect"]},{name:"Lock",icon:mx,category:"User",keywords:["secure","private","password"]},{name:"Unlock",icon:fx,category:"User",keywords:["open","public","unsecure"]},{name:"Mail",icon:gx,category:"Communication",keywords:["email","envelope","letter"]},{name:"MessageSquare",icon:bx,category:"Communication",keywords:["chat","comment","bubble"]},{name:"Phone",icon:vx,category:"Communication",keywords:["call","telephone","contact"]},{name:"Bell",icon:xx,category:"Communication",keywords:["notification","alert","ring"]},{name:"Send",icon:hx,category:"Communication",keywords:["message","submit","paper plane"]},{name:"AtSign",icon:yx,category:"Communication",keywords:["mention","email","address"]},{name:"ShoppingCart",icon:Px,category:"Commerce",keywords:["cart","buy","purchase"]},{name:"CreditCard",icon:Cx,category:"Commerce",keywords:["payment","card","billing"]},{name:"Wallet",icon:wx,category:"Commerce",keywords:["money","purse","finance"]},{name:"Tag",icon:Rx,category:"Commerce",keywords:["label","price","category"]},{name:"DollarSign",icon:Nx,category:"Commerce",keywords:["money","currency","price"]},{name:"Package",icon:Ix,category:"Commerce",keywords:["box","shipping","product"]},{name:"Truck",icon:kx,category:"Commerce",keywords:["delivery","shipping","transport"]},{name:"BookOpen",icon:Sx,category:"Content",keywords:["read","documentation","guide"]},{name:"Pen",icon:Tx,category:"Content",keywords:["write","compose","draft"]},{name:"Stamp",icon:Mx,category:"Content",keywords:["seal","approve","official"]},{name:"Bookmark",icon:zx,category:"Content",keywords:["save","favorite","mark"]},{name:"Flag",icon:Dx,category:"Content",keywords:["report","mark","important"]},{name:"Star",icon:Lx,category:"Content",keywords:["favorite","rating","review"]},{name:"Heart",icon:Fx,category:"Content",keywords:["like","love","favorite"]},{name:"Sliders",icon:Ax,category:"System",keywords:["adjust","controls","equalizer"]},{name:"Monitor",icon:Ex,category:"System",keywords:["screen","desktop","display"]},{name:"Smartphone",icon:Bx,category:"System",keywords:["mobile","phone","device"]},{name:"Printer",icon:Vx,category:"System",keywords:["print","output"]},{name:"Wifi",icon:Hx,category:"System",keywords:["network","wireless","internet"]}];function Gx(e){let t=new Map;for(let o of e){let n=o.category??"Other",a=t.get(n);a?a.push(o):t.set(n,[o])}return t}function Ux({value:e,onChange:t,open:o,onOpenChange:n,icons:a=Ox,trigger:s,title:l="Select Icon",placeholder:c="Search icons...",maxRecent:d=8,disabled:m=!1,className:f}){let[p,u]=Qe.useState(!1),[g,b]=Qe.useState([]),v=o!==void 0,y=v?o:p,h=Qe.useMemo(()=>{let k=new Map;for(let S of a)k.set(S.name,S);return k},[a]),P=Qe.useCallback(k=>{m&&k||(n?.(k),v||u(k))},[m,v,n]),w=Qe.useCallback(k=>{t?.(k),P(!1),b(S=>{let M=S.filter(G=>G!==k);return[k,...M].slice(0,d)})},[t,P,d]),x=Qe.useMemo(()=>Gx(a),[a]),C=Qe.useMemo(()=>g.map(k=>h.get(k)).filter(k=>k!==void 0),[g,h]),R=Qe.useCallback((k,S,M)=>{let G=S.toLowerCase();return k.toLowerCase().includes(G)||M?.some(Q=>Q.toLowerCase().includes(G))?1:0},[]),T=e?h.get(e):void 0;return ke("div",{"data-slot":"icon-picker",className:r("inline-flex",f),children:po(Ce,{open:y,onOpenChange:P,children:[s!==void 0?ke(Ee,{render:s}):po(Ee,{render:ke(N,{variant:"outline",disabled:m,className:"gap-2"}),children:[T?ke(T.icon,{className:"size-4 shrink-0"}):ke(hc,{className:"size-4 shrink-0"}),T?T.name:"Select Icon"]}),po(we,{className:"sm:max-w-lg",showCloseButton:!0,children:[ke(Re,{children:ke(Ne,{children:l})}),po(ma,{filter:R,loop:!0,children:[ke(sr,{placeholder:c}),po(lr,{children:[ke(cr,{children:"No icons found."}),C.length>0&&ke(yo,{heading:"Recent",children:C.map(k=>po(Po,{value:`recent:${k.name}`,...k.keywords?{keywords:k.keywords}:{},...k.name===e?{"data-checked":"true"}:{},onSelect:()=>w(k.name),children:[ke(k.icon,{className:"size-5 shrink-0"}),ke("span",{children:k.name})]},`recent-${k.name}`))}),Array.from(x.entries()).map(([k,S])=>ke(yo,{heading:k,children:S.map(M=>po(Po,{value:M.name,...M.keywords?{keywords:M.keywords}:{},...M.name===e?{"data-checked":"true"}:{},onSelect:()=>w(M.name),children:[ke(M.icon,{className:"size-5 shrink-0"}),ke("span",{children:M.name})]},M.name))},k))]})]})]})]})})}import*as it from"react";import{jsx as Pi,jsxs as Kx}from"react/jsx-runtime";var yc={linear:e=>e,easeOut:e=>1-Math.pow(1-e,3),easeInOut:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2};function _x(e){let t=it.useRef(void 0);return it.useEffect(()=>{t.current=e}),t.current}function $x({value:e,from:t=0,duration:o=1e3,easing:n="easeOut",format:a,decimals:s=0,prefix:l,suffix:c,reAnimate:d=!0,className:m,...f}){let[p,u]=it.useState(t),g=_x(e),b=it.useRef(null),v=it.useMemo(()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,[]);it.useEffect(()=>{let h=t;if(d&&g!==void 0&&(h=g),v){u(e);return}if(o<=0){u(e);return}let P=yc[n]??yc.easeOut,w=performance.now();function x(C){let R=C-w,T=Math.min(R/o,1),k=P(T),S=h+(e-h)*k;u(S),T<1&&(b.current=requestAnimationFrame(x))}return b.current!==null&&cancelAnimationFrame(b.current),b.current=requestAnimationFrame(x),()=>{b.current!==null&&(cancelAnimationFrame(b.current),b.current=null)}},[e,o,n,v]);let y=a?a(p):p.toFixed(s);return Kx("span",{"data-slot":"number-ticker",className:r("inline-flex items-baseline tabular-nums",m),...f,children:[l!=null&&Pi("span",{"data-slot":"number-ticker-prefix",children:l}),Pi("span",{"data-slot":"number-ticker-value",children:y}),c!=null&&Pi("span",{"data-slot":"number-ticker-suffix",children:c})]})}import*as Pc from"react";import{jsx as mo,jsxs as Gn}from"react/jsx-runtime";function qx({open:e,onOpenChange:t,groups:o,title:n="Keyboard Shortcuts",placeholder:a="Search shortcuts...",className:s}){return Gn(fa,{"data-slot":"keyboard-shortcut-dialog",open:e,onOpenChange:t,title:n,className:r(s),children:[mo(sr,{placeholder:a}),Gn(lr,{children:[mo(cr,{children:"No shortcuts found"}),o.map(l=>mo(yo,{heading:l.title,children:l.shortcuts.map((c,d)=>{let m=[c.description,...c.keys].join(" ");return Gn(Po,{value:m,onSelect:()=>{c.action?.()},className:"flex items-center justify-between",children:[mo("span",{children:c.description}),mo(Cr,{children:c.keys.map((f,p)=>Gn(Pc.Fragment,{children:[p>0&&mo("span",{className:"text-muted-foreground text-xs",children:"+"}),mo(Pr,{size:"sm",children:f})]},p))})]},`${l.title}-${d}`)})},l.title))]})]})}export{Rc as Accordion,kc as AccordionContent,Nc as AccordionItem,Ic as AccordionTrigger,By as ActivityIcon,cg as Affix,Mc as Alert,st as AlertCircleIcon,Dc as AlertDescription,Oc as AlertDialog,Wc as AlertDialogAction,Xc as AlertDialogCancel,Uc as AlertDialogContent,Kc as AlertDialogDescription,qc as AlertDialogFooter,_c as AlertDialogHeader,$c as AlertDialogTitle,Gc as AlertDialogTrigger,zc as AlertTitle,bo as AlertTriangleIcon,Cb as Anchor,Yx as ArchiveIcon,Qx as ArrowDownIcon,Zx as ArrowDownRightIcon,Jx as ArrowLeftIcon,eh as ArrowRight,th as ArrowRightIcon,oh as ArrowUpDownIcon,rh as ArrowUpIcon,nh as ArrowUpRightIcon,jc as AspectRatio,Qc as AudioPlayer,Wg as AutoComplete,on as Avatar,Jc as AvatarBadge,nn as AvatarFallback,ed as AvatarGroup,td as AvatarGroupCount,rn as AvatarImage,Vy as AwardIcon,ug as BackTop,et as Badge,ah as BadgeDollarSignIcon,Hy as BanknoteIcon,ih as BarChart3Icon,Oy as BarChartIcon,bd as BarcodeDisplay,sh as BarcodeIcon,lh as BellIcon,Nl as Blockquote,ch as Bold,MP as BoldIcon,dh as BookOpen,uh as BookmarkCheckIcon,ph as BookmarkIcon,CP as BrainIcon,sd as Breadcrumb,md as BreadcrumbEllipsis,cd as BreadcrumbItem,dd as BreadcrumbLink,ld as BreadcrumbList,ud as BreadcrumbPage,pd as BreadcrumbSeparator,Cd as BrowseInput,mh as Building2Icon,Kr as BuildingIcon,N as Button,Gy as CalculatorIcon,Xn as Calendar,ts as CalendarDayButton,fh as CalendarDaysIcon,gh as CalendarIcon,Uy as CameraIcon,hP as CarIcon,jn as Card,Rd as CardAction,Jn as CardContent,Zn as CardDescription,ea as CardFooter,Yn as CardHeader,Nd as CardSection,Qn as CardTitle,Id as Carousel,kd as CarouselContent,zd as CarouselDots,Sd as CarouselItem,Md as CarouselNext,Td as CarouselPrevious,Sg as Cascader,Lb as ChatInput,Ab as ChatMessage,bh as CheckCircle2Icon,vo as CheckCircleIcon,ne as CheckIcon,De as Checkbox,le as ChevronDownIcon,Ze as ChevronLeftIcon,$ as ChevronRightIcon,qr as ChevronUpIcon,Ui as ChevronsLeftIcon,_i as ChevronsRightIcon,vh as ChevronsUpDownIcon,Wr as CircleCheckIcon,_y as CircleIcon,xh as ClipboardListIcon,wi as ClockIcon,wP as CodeIcon,$y as CoinsIcon,Db as Col,na as Collapsible,ia as CollapsibleContent,aa as CollapsibleTrigger,Ed as ColorPicker,hh as Columns3Icon,gb as Combobox,ma as Command,fa as CommandDialog,cr as CommandEmpty,yo as CommandGroup,sr as CommandInput,Po as CommandItem,lr as CommandList,Kd as CommandSeparator,qd as CommandShortcut,ni as ConfigContext,mg as ConfigProvider,Wd as ContextMenu,tu as ContextMenuCheckboxItem,ls as ContextMenuContent,jd as ContextMenuGroup,Qd as ContextMenuItem,Yd as ContextMenuLabel,ss as ContextMenuPortal,ou as ContextMenuRadioGroup,ru as ContextMenuRadioItem,nu as ContextMenuSeparator,Zd as ContextMenuSub,eu as ContextMenuSubContent,Jd as ContextMenuSubTrigger,Xd as ContextMenuTrigger,yh as CookieIcon,Ph as CopyIcon,Qg as Countdown,Ch as CreditCardIcon,wb as DataList,tg as DatePicker,su as DepartmentBrowse,ng as Descriptions,ag as DescriptionsItem,Ce as Dialog,Hc as DialogBody,Vc as DialogClose,we as DialogContent,Kt as DialogDescription,rr as DialogFooter,Re as DialogHeader,Xi as DialogOverlay,Wi as DialogPortal,Ne as DialogTitle,Ee as DialogTrigger,uv as Direction,Gf as Divider,wh as DollarSignIcon,qy as DonutIcon,cu as Dot,Ky as DotIcon,Rh as DownloadIcon,uu as Drawer,mu as DrawerClose,fu as DrawerContent,xu as DrawerDescription,bu as DrawerFooter,gu as DrawerHeader,fs as DrawerOverlay,ms as DrawerPortal,vu as DrawerTitle,pu as DrawerTrigger,pr as DropdownMenu,Nu as DropdownMenuCheckboxItem,Co as DropdownMenuContent,yu as DropdownMenuGroup,fr as DropdownMenuItem,Pu as DropdownMenuLabel,hu as DropdownMenuPortal,Iu as DropdownMenuRadioGroup,ku as DropdownMenuRadioItem,ba as DropdownMenuSeparator,Su as DropdownMenuShortcut,Cu as DropdownMenuSub,Ru as DropdownMenuSubContent,wu as DropdownMenuSubTrigger,mr as DropdownMenuTrigger,Ih as Edit3Icon,Nh as EditIcon,rb as EmptyState,Wy as ExternalLinkIcon,kh as EyeIcon,Sh as EyeOffIcon,yb as Fab,Pb as FabSpeedDial,Th as FactoryIcon,Xy as FileEditIcon,Pt as FileIcon,zu as FileList,jy as FilePlusIcon,Mh as FileSpreadsheetIcon,zh as FileTextIcon,Mu as FileUpload,Dh as FileXIcon,Lh as FilterIcon,Yy as FlagIcon,Hf as Flex,Jo as FolderIcon,Qy as FolderOpenIcon,ha as Form,wa as FormControl,Ra as FormDescription,ya as FormField,Eu as FormGrid,Bu as FormGridItem,Pa as FormItem,Ca as FormLabel,Vu as FormList,Na as FormMessage,Ou as FormSection,op as FullscreenToggle,Zy as FunnelIcon,Fh as GalleryHorizontalEnd,Jy as GanttChartIcon,yP as GlobeIcon,eP as GoalIcon,Ah as GridIcon,ap as GridItem,np as GridLayout,Ri as GripVerticalIcon,vl as H1,xl as H2,hl as H3,yl as H4,Pl as H5,Cl as H6,AP as Heading1Icon,EP as Heading2Icon,Eh as Home,Bh as HomeIcon,ip as HoverCard,lp as HoverCardContent,sp as HoverCardTrigger,qb as Icon,Ux as IconPicker,zg as Image,Dg as ImageGroup,Vh as ImageIcon,cp as ImageViewer,Hh as Inbox,Ni as InboxIcon,tv as InfiniteScroll,Ct as InfoIcon,Il as InlineCode,_ as Input,ua as InputGroup,pa as InputGroupAddon,Od as InputGroupButton,Ud as InputGroupInput,Gd as InputGroupText,_d as InputGroupTextarea,Zf as InputNumber,jf as InputSearch,Oh as Italic,zP as ItalicIcon,As as KPICard,gp as KPIPanel,Pr as Kbd,Cr as KbdGroup,Gh as KeyboardIcon,pp as KeyboardShortcut,qx as KeyboardShortcutDialog,xa as Label,Uh as LanguagesIcon,Sl as Large,PP as LayersIcon,_h as LayoutDashboardIcon,tP as LayoutGridIcon,kl as Lead,$h as LifeBuoyIcon,oP as LineChartIcon,rP as Link2Icon,Kh as LinkIcon,zl as List,Ib as ListFooter,Rb as ListHeader,qh as ListIcon,Nb as ListItem,DP as ListOrderedIcon,Ii as Loader2,ki as Loader2Icon,Wh as LockIcon,Xh as Mail,jh as MailIcon,nP as MapIcon,aP as MapPinIcon,iP as MapPinnedIcon,rv as Masonry,Si as MaximizeIcon,sP as MedalIcon,Yh as MegaphoneIcon,jg as Mentions,_o as Menu,ci as MenuDivider,Qh as MenuIcon,li as MenuItem,di as MenuItemGroup,si as MenuSubMenu,vp as Menubar,cv as Message,Vb as MessageProvider,Zh as MessageSquareIcon,RP as MicIcon,Ti as MinimizeIcon,Mi as MinusIcon,Hb as MobilePullRefresh,Gb as MobileSwipeAction,Rg as ModalProvider,Jh as MonitorIcon,ey as MoonIcon,Xr as MoreHorizontalIcon,lP as MoreVerticalIcon,ty as MousePointerClickIcon,Ml as Muted,av as NativeSelect,yp as NavigationMenu,Rp as NavigationMenuContent,Ip as NavigationMenuIndicator,Cp as NavigationMenuItem,Np as NavigationMenuLink,Pp as NavigationMenuList,Bs as NavigationMenuPositioner,wp as NavigationMenuTrigger,Mb as Notification,$x as NumberTicker,kp as OTPField,Sp as OTPFieldSeparator,jr as OctagonXIcon,oy as PackageCheckIcon,ry as PackageIcon,Mp as PageContainer,Dp as PageContent,zp as PageHeader,Lp as Pagination,Fp as PaginationContent,Vp as PaginationEllipsis,Ap as PaginationItem,Da as PaginationLink,Bp as PaginationNext,Ep as PaginationPrevious,ny as PanelLeftCloseIcon,zi as PanelLeftIcon,ay as PanelLeftOpenIcon,iy as PanelRightIcon,cP as PaperclipIcon,Rl as Paragraph,Qr as PauseIcon,sy as PencilIcon,Fu as PictureCard,Lu as PictureWall,dP as PieChartIcon,uP as PiggyBankIcon,ly as PinIcon,OP as PipetteIcon,Zr as PlayIcon,cy as Plus,Di as PlusIcon,ig as Popconfirm,ue as Popover,me as PopoverContent,ca as PopoverDescription,Dd as PopoverHeader,la as PopoverTitle,pe as PopoverTrigger,dy as PrinterIcon,Hp as Progress,Gs as ProgressIndicator,Op as ProgressLabel,Os as ProgressTrack,Gp as ProgressValue,qg as QRCode,$p as QrCodeDisplay,uy as QrCodeIcon,LP as QuoteIcon,Wp as RadioGroup,Xp as RadioGroupItem,py as RadioTowerIcon,eb as Rating,pP as ReceiptIcon,FP as RedoIcon,my as RefreshCwIcon,em as ResizableHandle,Qp as ResizablePanel,Yp as ResizablePanelGroup,Gg as Result,mP as RocketIcon,fy as RotateCcwIcon,zb as Row,Oi as SaveIcon,ep as SchemaForm,jt as ScrollArea,cs as ScrollBar,gy as Search,be as SearchIcon,by as SearchXIcon,ib as SegmentedControl,Ro as Select,ko as SelectContent,ju as SelectGroup,So as SelectItem,Yu as SelectLabel,Ss as SelectScrollDownButton,ks as SelectScrollUpButton,Qu as SelectSeparator,Io as SelectTrigger,No as SelectValue,Li as SendIcon,Ea as Separator,tm as SequenceInput,rm as SequencePreview,vy as ServerCrashIcon,xy as Settings,hy as SettingsIcon,fP as Share2Icon,Va as Sheet,sm as SheetClose,Ha as SheetContent,Ua as SheetDescription,dm as SheetFooter,Oa as SheetHeader,Ga as SheetTitle,im as SheetTrigger,yy as ShieldAlertIcon,Py as ShieldCheck,Cy as ShieldCheckIcon,wy as ShieldIcon,Ry as ShoppingCartIcon,Pm as Sidebar,Tm as SidebarContent,km as SidebarFooter,Mm as SidebarGroup,Dm as SidebarGroupAction,Lm as SidebarGroupContent,zm as SidebarGroupLabel,Im as SidebarHeader,Nm as SidebarInput,Rm as SidebarInset,Fm as SidebarMenu,Bm as SidebarMenuAction,Vm as SidebarMenuBadge,Ys as SidebarMenuButton,Am as SidebarMenuItem,Hm as SidebarMenuSkeleton,Om as SidebarMenuSub,Zs as SidebarMenuSubButton,Qs as SidebarMenuSubItem,ym as SidebarProvider,wm as SidebarRail,Sm as SidebarSeparator,Cm as SidebarTrigger,Gi as SignatureIcon,gv as SignaturePad,gn as Skeleton,_m as Slider,$m as SliderControl,qm as SliderIndicator,Wm as SliderThumb,Km as SliderTrack,Tl as Small,Ny as SmartphoneIcon,Ff as Space,Iy as Sparkles,NP as SparklesIcon,lg as Spin,Vo as Spinner,fv as SplitButton,Xm as SplitPane,gP as SquareIcon,Fi as StarIcon,_g as Statistic,Qm as Step,Ym as Stepper,BP as StrikethroughIcon,ky as SunIcon,Ia as Switch,Zm as Table,ef as TableBody,af as TableCaption,nf as TableCell,tf as TableFooter,rf as TableHead,Jm as TableHeader,Sy as TableIcon,of as TableRow,lf as Tabs,uf as TabsContent,cf as TabsList,df as TabsTrigger,Ag as Tag,Eg as TagGroup,Ty as TagIcon,pf as TagsInput,bP as TargetIcon,IP as TerminalIcon,wl as Text,Wt as Textarea,kP as ThumbsDownIcon,SP as ThumbsUpIcon,Jb as TimePicker,ff as Timeline,nl as TimelineConnector,al as TimelineContent,sl as TimelineDescription,rl as TimelineDot,gf as TimelineItem,ll as TimelineTime,il as TimelineTitle,xf as Toggle,Qa as ToggleGroup,Za as ToggleGroupItem,$a as Tooltip,qa as TooltipContent,pm as TooltipProvider,Ka as TooltipTrigger,db as Tour,Xb as Transfer,Ai as Trash2Icon,Ei as TrashIcon,Cf as TreeSelect,Rf as TreeView,Bi as TrendingDownIcon,Vi as TrendingUpIcon,Yr as TriangleAlertIcon,My as TrophyIcon,zy as TruckIcon,Wf as Typography,Dy as Underline,$i as UndoIcon,er as UploadIcon,Ly as User,If as UserBrowse,_n as UserIcon,Fy as UsersIcon,Zc as VideoPlayer,Sf as VirtualList,zf as VirtualTable,tr as Volume2Icon,vP as WalletIcon,TP as WandSparklesIcon,mb as Watermark,Hi as WifiOffIcon,$b as WithPermission,Ay as WrenchIcon,Ey as XCircleIcon,U as XIcon,xP as ZapIcon,VP as ZoomInIcon,HP as ZoomOutIcon,Ki as alertVariants,ji as badgeVariants,Ji as browseInputVariants,$t as buttonVariants,us as dotVariants,bs as formGridVariants,ys as formSectionVariants,ev as formatTimeInput,Ts as gridLayoutVariants,zs as kbdVariants,Es as navigationMenuTriggerStyle,Hs as pageContainerVariants,el as tabsListVariants,ol as timelineDotVariants,yn as toggleVariants,fg as useConfig,vr as useFormField,Lo as useSidebar};
6
+ "use client";var mm=Object.defineProperty;var fm=(e,t,o)=>t in e?mm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var dc=(e,t,o)=>fm(e,typeof t!="symbol"?t+"":t,o);import{Accordion as Wn}from"@base-ui/react/accordion";import{clsx as gm}from"clsx";import{twMerge as bm}from"tailwind-merge";function n(...e){return bm(gm(e))}import*as d from"lucide-react";var Co=d.AlertCircleIcon,ro=d.AlertTriangleIcon,YP=d.ArchiveIcon,jP=d.ArrowDownIcon,QP=d.ArrowDownRightIcon,XP=d.ArrowLeftIcon,JP=d.ArrowRight,ZP=d.ArrowRightIcon,eR=d.ArrowUpDownIcon,tR=d.ArrowUpIcon,oR=d.ArrowUpRightIcon,rR=d.BadgeDollarSignIcon,nR=d.BarChart3Icon,aR=d.BarcodeIcon,Xr=d.BellIcon,sR=d.Bold,iR=d.BookOpen,lR=d.BookmarkCheckIcon,uc=d.BookmarkIcon,cR=d.Building2Icon,Ka=d.BuildingIcon;var dR=d.CalendarDaysIcon,Ho=d.CalendarIcon,uR=d.CheckCircle2Icon,Oo=d.CheckCircleIcon,ie=d.CheckIcon,we=d.ChevronDownIcon,Ye=d.ChevronLeftIcon,te=d.ChevronRightIcon,Wa=d.ChevronUpIcon,pR=d.ChevronsUpDownIcon,qa=d.CircleCheckIcon,mR=d.ClipboardListIcon,pc=d.ClockIcon,fR=d.Columns3Icon,gR=d.CookieIcon,mc=d.CopyIcon,bR=d.CreditCardIcon,vR=d.DollarSignIcon,xR=d.DownloadIcon,hR=d.EditIcon,yR=d.Edit3Icon,fc=d.EyeIcon,gc=d.EyeOffIcon,NR=d.FactoryIcon,no=d.FileIcon,wR=d.FileSpreadsheetIcon,CR=d.FileTextIcon,PR=d.FileXIcon,bc=d.FilterIcon,Gn=d.FolderIcon,RR=d.GalleryHorizontalEnd,kR=d.GridIcon,vc=d.GripVerticalIcon,SR=d.Home,IR=d.HomeIcon,xc=d.ImageIcon,TR=d.Inbox,hc=d.InboxIcon,ao=d.InfoIcon,MR=d.Italic,DR=d.KeyboardIcon,zR=d.LanguagesIcon,LR=d.LayoutDashboardIcon,ER=d.LifeBuoyIcon,FR=d.LinkIcon,AR=d.ListIcon,yc=d.Loader2,Ya=d.Loader2Icon,VR=d.LockIcon,BR=d.Mail,HR=d.MailIcon,Nc=d.MaximizeIcon,OR=d.MegaphoneIcon,$R=d.MenuIcon,UR=d.MessageSquareIcon,wc=d.MinimizeIcon,Cc=d.MinusIcon,GR=d.MonitorIcon,_R=d.MoonIcon,ja=d.MoreHorizontalIcon,KR=d.MousePointerClickIcon,Qa=d.OctagonXIcon,WR=d.PackageCheckIcon,qR=d.PackageIcon,Pc=d.PanelLeftIcon,YR=d.PanelLeftCloseIcon,jR=d.PanelLeftOpenIcon,QR=d.PanelRightIcon,Rc=d.PencilIcon,XR=d.PinIcon,JR=d.Plus,Xa=d.PlusIcon,ZR=d.PrinterIcon,ek=d.QrCodeIcon,tk=d.RadioTowerIcon,ok=d.RefreshCwIcon,rk=d.RotateCcwIcon,nk=d.Search,je=d.SearchIcon,ak=d.SearchXIcon,kc=d.SendIcon,sk=d.ServerCrashIcon,ik=d.Settings,lk=d.SettingsIcon,ck=d.ShieldAlertIcon,dk=d.ShieldCheck,uk=d.ShieldCheckIcon,pk=d.ShieldIcon,mk=d.ShoppingCartIcon,fk=d.SmartphoneIcon,gk=d.Sparkles,Sc=d.StarIcon,bk=d.SunIcon,vk=d.TableIcon,xk=d.TagIcon,Jr=d.Trash2Icon,Ic=d.TrashIcon,Ja=d.TrendingDownIcon,Za=d.TrendingUpIcon,es=d.TriangleAlertIcon,hk=d.TrophyIcon,yk=d.TruckIcon,Nk=d.Underline,_n=d.UploadIcon,wk=d.User,ii=d.UserIcon,Ck=d.UsersIcon,Tc=d.WifiOffIcon,Pk=d.WrenchIcon,Mc=d.XCircleIcon,oe=d.XIcon,Rk=d.ActivityIcon,kk=d.AwardIcon,Sk=d.BanknoteIcon,Ik=d.BarChartIcon,Tk=d.CalculatorIcon,Mk=d.CameraIcon,Dk=d.CircleIcon,zk=d.CoinsIcon,Lk=d.DotIcon,Ek=d.DonutIcon,Fk=d.ExternalLinkIcon,Ak=d.FileEditIcon,Vk=d.FilePlusIcon,Bk=d.FlagIcon,Hk=d.FolderOpenIcon,Ok=d.FunnelIcon,$k=d.GanttChartIcon,Uk=d.GoalIcon,Gk=d.LayoutGridIcon,_k=d.LineChartIcon,Kk=d.Link2Icon,Wk=d.MapIcon,qk=d.MapPinIcon,Yk=d.MapPinnedIcon,jk=d.MedalIcon,Qk=d.MoreVerticalIcon,Dc=d.PaperclipIcon,ts=d.PauseIcon,Xk=d.PieChartIcon,Jk=d.PiggyBankIcon,os=d.PlayIcon,Zk=d.ReceiptIcon,eS=d.RocketIcon,rs=d.SaveIcon,tS=d.Share2Icon,zc=d.SignatureIcon,oS=d.SquareIcon,rS=d.TargetIcon,nS=d.WalletIcon,aS=d.ZapIcon,sS=d.CarIcon,iS=d.GlobeIcon,lS=d.LayersIcon,cS=d.BrainIcon,Lc=d.ChevronsLeftIcon,Ec=d.ChevronsRightIcon,dS=d.CodeIcon,uS=d.MicIcon,pS=d.SparklesIcon,mS=d.TerminalIcon,fS=d.ThumbsDownIcon,gS=d.ThumbsUpIcon,Kn=d.Volume2Icon,bS=d.WandSparklesIcon,vS=d.BoldIcon,xS=d.ItalicIcon,hS=d.ListOrderedIcon,yS=d.QuoteIcon,Fc=d.UndoIcon,NS=d.RedoIcon,wS=d.Heading1Icon,CS=d.Heading2Icon,PS=d.StrikethroughIcon,RS=d.ZoomInIcon,kS=d.ZoomOutIcon,SS=d.PipetteIcon,IS=d.BanIcon,TS=d.BoxesIcon,Ac=d.CheckCheckIcon,MS=d.ClipboardCheckIcon,DS=d.ConstructionIcon,zS=d.CrosshairIcon,LS=d.DatabaseIcon,ES=d.FolderTreeIcon,FS=d.GiftIcon,AS=d.HardDriveIcon,VS=d.LogInIcon,BS=d.LogOutIcon,HS=d.MessageSquareWarningIcon,OS=d.PercentIcon,$S=d.PowerIcon,US=d.RefreshCcwIcon,GS=d.TagsIcon,_S=d.UnlockIcon,KS=d.CropIcon,Vc=d.RotateCwIcon,WS=d.ScanLineIcon,qS=d.Rows3Icon,YS=d.PinOffIcon;import{jsx as xr,jsxs as Nm}from"react/jsx-runtime";function vm({className:e,...t}){return xr(Wn.Root,{"data-slot":"accordion",className:n("flex w-full flex-col",e),...t})}function xm({className:e,...t}){return xr(Wn.Item,{"data-slot":"accordion-item",className:n("not-last:border-b",e),...t})}function hm({className:e,children:t,...o}){return xr(Wn.Header,{className:"flex",children:Nm(Wn.Trigger,{"data-slot":"accordion-trigger",className:n("group/accordion-trigger focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:after:border-ring **:data-[slot=accordion-trigger-icon]:text-muted-foreground relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-3 aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4",e),...o,children:[t,xr(we,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"}),xr(Wa,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"})]})})}function ym({className:e,children:t,...o}){return xr(Wn.Panel,{"data-slot":"accordion-content",className:"data-open:animate-accordion-down data-closed:animate-accordion-up overflow-hidden text-sm",...o,children:xr("div",{className:n("[&_a]:hover:text-foreground h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4",e),children:t})})}import"react";import{cva as wm}from"class-variance-authority";import{jsx as ns,jsxs as km}from"react/jsx-runtime";var Bc=wm("relative w-full rounded-lg border px-4 py-3 text-sm grid items-center gap-3 grid-cols-[auto_minmax(0,1fr)] has-[>svg]:items-start has-[[data-slot=alert-title]]:items-start",{variants:{variant:{default:"bg-background text-foreground",info:"border-info/30 bg-info/10 text-info",success:"border-success/30 bg-success/10 text-success",warning:"border-warning/30 bg-warning/10 text-warning",destructive:"border-destructive/30 bg-destructive/10 text-destructive"}},defaultVariants:{variant:"default"}});function Cm({className:e,variant:t,icon:o,children:r,...a}){return km("div",{role:"alert","data-slot":"alert","data-variant":t,className:n(Bc({variant:t}),e),...a,children:[o&&ns("div",{"data-slot":"alert-icon",className:"self-stretch flex items-center justify-center text-current [&>svg]:size-6 [&>svg]:stroke-[1.75]",children:o}),ns("div",{"data-slot":"alert-content",className:"min-w-0",children:r})]})}function Pm({className:e,...t}){return ns("h5",{"data-slot":"alert-title",className:n("mb-1 leading-5 font-medium tracking-tight text-current",e),...t})}function Rm({className:e,...t}){return ns("div",{"data-slot":"alert-description",className:n("text-sm leading-relaxed text-current/80 [&_p]:leading-relaxed",e),...t})}import"react";import"react";import{useTranslation as Hc}from"react-i18next";import{Dialog as so}from"@base-ui/react/dialog";import*as as from"react";import{Button as Sm}from"@base-ui/react/button";import{cva as Im}from"class-variance-authority";import{Fragment as Tm,jsx as li,jsxs as Mm}from"react/jsx-runtime";var At=Im("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function D({className:e,variant:t="default",size:o="default",icon:r,iconRight:a,children:s,...l}){let i=r!=null||a!=null,c=as.useMemo(()=>n(At({variant:t,size:o,className:e})),[t,o,e]);return li(Sm,{"data-slot":"button",className:c,...l,children:i?Mm(Tm,{children:[r!=null&&li("span",{"data-icon":"inline-start",className:"shrink-0",children:r}),s,a!=null&&li("span",{"data-icon":"inline-end",className:"shrink-0",children:a})]}):s})}var cI=as.memo(D);import{jsx as tt,jsxs as ss}from"react/jsx-runtime";function ot({...e}){return tt(so.Root,{"data-slot":"dialog",...e})}function St({...e}){return tt(so.Trigger,{"data-slot":"dialog-trigger",...e})}function Oc({...e}){return tt(so.Portal,{"data-slot":"dialog-portal",...e})}function Dm({...e}){return tt(so.Close,{"data-slot":"dialog-close",...e})}function $c({className:e,...t}){return tt(so.Backdrop,{"data-slot":"dialog-overlay",className:n("data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs",e),...t})}function rt({className:e,children:t,showCloseButton:o=!0,...r}){let{t:a}=Hc("ui");return ss(Oc,{children:[tt($c,{}),ss(so.Popup,{"data-slot":"dialog-content",className:n("bg-popover text-popover-foreground ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl p-4 text-sm ring-1 duration-100 outline-none sm:max-w-sm",e),...r,children:[t,o&&ss(so.Close,{"data-slot":"dialog-close",render:tt(D,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[tt(oe,{}),tt("span",{className:"sr-only",children:a("dialog.close")})]})]})]})}function nt({className:e,...t}){return tt("div",{"data-slot":"dialog-header",className:n("flex flex-col gap-2",e),...t})}function qn({className:e,showCloseButton:t=!1,children:o,...r}){let{t:a}=Hc("ui");return ss("div",{"data-slot":"dialog-footer",className:n("bg-muted/50 -mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t p-4 sm:flex-row sm:justify-end",e),...r,children:[o,t&&tt(so.Close,{render:tt(D,{variant:"outline"}),children:a("dialog.closeButton")})]})}function at({className:e,...t}){return tt(so.Title,{"data-slot":"dialog-title",className:n("font-heading text-base leading-none font-medium",e),...t})}function hr({className:e,...t}){return tt(so.Description,{"data-slot":"dialog-description",className:n("text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3",e),...t})}function zm({className:e,...t}){return tt("div",{"data-slot":"dialog-body",className:n("flex flex-col gap-3 py-4",e),...t})}import{jsx as Po}from"react/jsx-runtime";function Lm(e){return Po(ot,{...e})}function Em(e){return Po(St,{...e})}function Fm({className:e,...t}){return Po(rt,{className:n("max-w-md",e),...t})}function Am(e){return Po(nt,{...e})}function Vm(e){return Po(at,{...e})}function Bm(e){return Po(hr,{...e})}function Hm(e){return Po(qn,{...e})}function Om({className:e,...t}){return Po(D,{className:e,...t})}function $m({className:e,...t}){return Po(D,{variant:"outline",className:e,...t})}import"react";import{jsx as Gm}from"react/jsx-runtime";function Um({ratio:e=16/9,className:t,style:o,...r}){return Gm("div",{"data-slot":"aspect-ratio",style:{aspectRatio:e,...o},className:n("relative w-full overflow-hidden",t),...r})}import*as Ge from"react";import{jsx as It,jsxs as is}from"react/jsx-runtime";function _m({src:e,autoPlay:t,showVolume:o=!0,showSpeed:r,className:a,onEnded:s,onPlay:l,onPause:i}){let c=Ge.useRef(null),[u,f]=Ge.useState(!1),[m,p]=Ge.useState(0),[b,g]=Ge.useState(0),[h,y]=Ge.useState(1),[N,w]=Ge.useState(!1),[C,v]=Ge.useState(1),x=Ge.useCallback(()=>{let E=c.current;E&&(E.paused?(E.play(),l?.()):(E.pause(),i?.()))},[l,i]),P=Ge.useCallback(()=>{let E=c.current;E&&p(E.currentTime)},[]),S=Ge.useCallback(()=>{let E=c.current;E&&g(E.duration)},[]),R=Ge.useCallback(E=>{let A=c.current;A&&(A.currentTime=Number(E.target.value),p(A.currentTime))},[]),k=Ge.useCallback(E=>{let A=Number(E.target.value),I=c.current;I&&(I.volume=A,I.muted=A===0),y(A),w(A===0)},[]),T=Ge.useCallback(()=>{let E=c.current;E&&(E.muted=!E.muted,w(E.muted))},[]),z=Ge.useCallback(E=>{let A=c.current;A&&(A.playbackRate=E),v(E)},[]),W=E=>{let A=Math.floor(E/60),I=Math.floor(E%60);return`${A}:${I.toString().padStart(2,"0")}`},$=[.5,.75,1,1.25,1.5,2];return is("div",{"data-slot":"audio-player",className:n("bg-card flex items-center gap-2 rounded-lg border p-3",a),children:[It("audio",{ref:c,src:e,autoPlay:t,onTimeUpdate:P,onLoadedMetadata:S,onPlay:()=>f(!0),onPause:()=>f(!1),onEnded:s}),It(D,{variant:"ghost",size:"icon-sm",onClick:x,"aria-label":u?"Pause":"Play",children:u?It(ts,{}):It(os,{})}),is("div",{className:"flex flex-1 items-center gap-2",children:[It("span",{className:"text-muted-foreground w-10 text-right text-xs tabular-nums",children:W(m)}),It("input",{type:"range",min:0,max:b||0,value:m,className:"accent-primary h-1 flex-1",onChange:R}),It("span",{className:"text-muted-foreground w-10 text-xs tabular-nums",children:W(b)})]}),o&&is("div",{className:"flex items-center gap-1",children:[It(D,{variant:"ghost",size:"icon-xs",onClick:T,"aria-label":N?"Unmute":"Mute",children:N||h===0?It(Kn,{className:"text-muted-foreground"}):It(Kn,{})}),It("input",{type:"range",min:0,max:1,step:.05,value:N?0:h,className:"accent-primary h-1 w-16",onChange:k})]}),r&&It("select",{value:C,onChange:E=>z(Number(E.target.value)),className:"bg-background rounded border px-1.5 py-0.5 text-xs",children:$.map(E=>is("option",{value:E,children:[E,"x"]},E))})]})}import*as _e from"react";import{jsx as Vt,jsxs as Yn}from"react/jsx-runtime";function Km({src:e,poster:t,autoPlay:o,showControls:r=!0,className:a,onEnded:s,onPlay:l,onPause:i}){let c=_e.useRef(null),[u,f]=_e.useState(!1),[m,p]=_e.useState(0),[b,g]=_e.useState(0),[h,y]=_e.useState(1),[N,w]=_e.useState(!1),[C,v]=_e.useState(!1),x=_e.useCallback(()=>{let $=c.current;$&&($.paused?($.play(),l?.()):($.pause(),i?.()))},[l,i]),P=_e.useCallback(()=>{let $=c.current;$&&p($.currentTime)},[]),S=_e.useCallback(()=>{let $=c.current;$&&g($.duration)},[]),R=_e.useCallback($=>{let E=c.current;E&&(E.currentTime=Number($.target.value),p(E.currentTime))},[]),k=_e.useCallback($=>{let E=Number($.target.value),A=c.current;A&&(A.volume=E,A.muted=E===0),y(E),w(E===0)},[]),T=_e.useCallback(()=>{let $=c.current;$&&($.muted=!$.muted,w($.muted))},[]),z=_e.useCallback(()=>{let $=c.current;$&&(document.fullscreenElement?document.exitFullscreen():$.requestFullscreen())},[]),W=$=>{let E=Math.floor($/60),A=Math.floor($%60);return`${E}:${A.toString().padStart(2,"0")}`};return Yn("div",{"data-slot":"video-player",className:n("group relative overflow-hidden rounded-lg bg-black",a),onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),children:[Vt("video",{ref:c,src:e,poster:t,autoPlay:o,className:"w-full",onTimeUpdate:P,onLoadedMetadata:S,onPlay:()=>f(!0),onPause:()=>f(!1),onEnded:s,onClick:x}),r&&Yn("div",{className:n("absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/80 to-transparent p-3 pt-8 transition-opacity",!u||C?"opacity-100":"opacity-0"),children:[Vt("input",{type:"range",min:0,max:b||0,value:m,className:"accent-primary mb-2 h-1 w-full",onChange:R}),Yn("div",{className:"flex items-center gap-2",children:[Vt(D,{variant:"ghost",size:"icon-sm",onClick:x,"aria-label":u?"Pause":"Play",className:"text-white hover:text-white",children:u?Vt(ts,{}):Vt(os,{})}),Yn("div",{className:"flex items-center gap-1",children:[Vt(D,{variant:"ghost",size:"icon-xs",onClick:T,"aria-label":N?"Unmute":"Mute",className:"text-white hover:text-white",children:Vt(Kn,{className:N?"text-muted-foreground":""})}),Vt("input",{type:"range",min:0,max:1,step:.05,value:N?0:h,className:"accent-primary h-1 w-16",onChange:k})]}),Yn("span",{className:"ml-auto text-xs text-white/80 tabular-nums",children:[W(m)," / ",W(b)]}),Vt(D,{variant:"ghost",size:"icon-xs",onClick:z,"aria-label":"Fullscreen",className:"text-white hover:text-white",children:Vt("svg",{className:"size-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:Vt("path",{d:"M8 3H5a2 2 0 00-2 2v3m18 0V5a2 2 0 00-2-2h-3m0 18h3a2 2 0 002-2v-3M3 16v3a2 2 0 002 2h3"})})})]})]})]})}import"react";import{Avatar as ci}from"@base-ui/react/avatar";import{jsx as Zr}from"react/jsx-runtime";function ls({className:e,size:t="default",fontSize:o,...r}){return Zr(ci.Root,{"data-slot":"avatar","data-size":t,className:n("group/avatar after:border-border relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",e),style:o?{fontSize:typeof o=="number"?`${o}px`:o}:void 0,...r})}function cs({className:e,...t}){return Zr(ci.Image,{"data-slot":"avatar-image",className:n("aspect-square size-full rounded-full object-cover",e),...t})}function ds({className:e,...t}){return Zr(ci.Fallback,{"data-slot":"avatar-fallback",className:n("bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-sm group-data-[size=sm]/avatar:text-xs",e),...t})}function Wm({className:e,...t}){return Zr("span",{"data-slot":"avatar-badge",className:n("bg-primary text-primary-foreground ring-background absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-blend-color ring-2 select-none","group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden","group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2","group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",e),...t})}function qm({className:e,...t}){return Zr("div",{"data-slot":"avatar-group",className:n("group/avatar-group *:data-[slot=avatar]:ring-background flex -space-x-2 *:data-[slot=avatar]:ring-2",e),...t})}function Ym({className:e,...t}){return Zr("div",{"data-slot":"avatar-group-count",className:n("bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0 items-center justify-center rounded-full text-sm ring-2 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",e),...t})}import*as Uc from"react";import{mergeProps as jm}from"@base-ui/react/merge-props";import{useRender as Qm}from"@base-ui/react/use-render";import{cva as Xm}from"class-variance-authority";var Gc=Xm("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function Bt({className:e,variant:t="default",render:o,...r}){return Qm({defaultTagName:"span",props:jm({className:n(Gc({variant:t}),e)},r),render:o,state:{slot:"badge",variant:t}})}var jI=Uc.memo(Bt);import"react";import{useTranslation as _c}from"react-i18next";import{mergeProps as Jm}from"@base-ui/react/merge-props";import{useRender as Zm}from"@base-ui/react/use-render";import{jsx as $o,jsxs as lf}from"react/jsx-runtime";function ef({className:e,...t}){let{t:o}=_c("ui");return $o("nav",{"aria-label":o("breadcrumb.navLabel"),"data-slot":"breadcrumb",className:n(e),...t})}function tf({className:e,...t}){return $o("ol",{"data-slot":"breadcrumb-list",className:n("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm wrap-break-word",e),...t})}function of({className:e,...t}){return $o("li",{"data-slot":"breadcrumb-item",className:n("inline-flex items-center gap-1",e),...t})}function rf({className:e,render:t,...o}){return Zm({defaultTagName:"a",props:Jm({className:n("cursor-pointer transition-colors hover:text-foreground",e)},o),render:t,state:{slot:"breadcrumb-link"}})}function nf({className:e,...t}){return $o("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:n("text-foreground font-normal",e),...t})}function af({children:e,className:t,...o}){return $o("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:n("[&>svg]:size-3.5",t),...o,children:e??$o(te,{})})}function sf({className:e,...t}){let{t:o}=_c("ui");return lf("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:n("flex size-5 items-center justify-center [&>svg]:size-4",e),...t,children:[$o(ja,{}),$o("span",{className:"sr-only",children:o("breadcrumb.more")})]})}import*as Kc from"react";import{jsx as di,jsxs as uf}from"react/jsx-runtime";function cf(e){let t=[];for(let o=0;o<e.length;o++){let r=e.charCodeAt(o);t.push(2+r%3),t.push(1+(r>>2)%2)}return[2,1,...t,2,1]}function df({value:e,height:t=48,showText:o=!0,barWidth:r=2,className:a,...s}){let l=Kc.useMemo(()=>cf(e),[e]);return uf("div",{"data-slot":"barcode-display",className:n("inline-flex flex-col items-center gap-1",a),...s,children:[di("div",{className:"flex items-end",style:{height:t},role:"img","aria-label":`Barcode: ${e}`,children:l.map((i,c)=>di("div",{className:c%2===0?"bg-foreground":"bg-transparent",style:{width:i*r,height:"100%"}},c))}),o&&di("span",{className:"text-muted-foreground font-mono text-xs tracking-wider",children:e})]})}import*as Wc from"react";import{useTranslation as ff}from"react-i18next";import{cva as gf}from"class-variance-authority";import"react";import{Input as pf}from"@base-ui/react/input";import{jsx as mf}from"react/jsx-runtime";function le({className:e,type:t,...o}){return mf(pf,{type:t,"data-slot":"input",className:n("border-input file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 h-8 w-full min-w-0 rounded-lg border bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-3 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 md:text-sm",e),...o})}import{jsx as jn,jsxs as ui}from"react/jsx-runtime";var qc=gf("flex items-center gap-2 rounded-lg border border-input bg-transparent transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",{variants:{size:{default:"h-8",sm:"h-7",lg:"h-9"}},defaultVariants:{size:"default"}});function bf({className:e,size:t,value:o,defaultValue:r,placeholder:a,disabled:s,readOnly:l,required:i,"aria-invalid":c,onBrowse:u,onChange:f,onClear:m,showClearButton:p=!0,showBrowseButton:b=!0,...g}){let{t:h}=ff("ui"),y=a??h("browseInput.placeholder"),[N,w]=Wc.useState(r||""),C=o??N,v=P=>{let S=P.target.value;w(S),f?.(S)},x=()=>{w(""),f?.(""),m?.()};return ui("div",{"data-slot":"browse-input","data-size":t,className:n(qc({size:t,className:e})),"aria-invalid":c,...g,children:[jn(le,{value:C,onChange:v,placeholder:y,disabled:s,readOnly:l,required:i,className:"h-full border-0 bg-transparent focus-visible:ring-0"}),p&&C&&!s&&!l&&ui(D,{variant:"ghost",size:"icon-xs",onClick:x,className:"mr-1 shrink-0",tabIndex:-1,children:[jn(oe,{className:"size-3"}),jn("span",{className:"sr-only",children:h("browseInput.clear")})]}),b&&ui(D,{variant:"ghost",size:"icon-xs",onClick:u,disabled:s,className:"mr-1 shrink-0",tabIndex:-1,children:[jn(je,{className:"size-3"}),jn("span",{className:"sr-only",children:h("browseInput.browse")})]})]})}import*as us from"react";import{DayPicker as vf,getDefaultClassNames as Yc}from"react-day-picker";import{jsx as Ro}from"react/jsx-runtime";function en({className:e,classNames:t,showOutsideDays:o=!0,captionLayout:r="label",buttonVariant:a="ghost",locale:s,formatters:l,components:i,...c}){let u=Yc();return Ro(vf,{showOutsideDays:o,className:n("group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,locale:s,formatters:{formatMonthDropdown:f=>f.toLocaleString(s?.code,{month:"short"}),...l},classNames:{root:n("w-fit",u.root),months:n("relative flex flex-col gap-4 md:flex-row",u.months),month:n("flex w-full flex-col gap-4",u.month),nav:n("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",u.nav),button_previous:n(At({variant:a}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",u.button_previous),button_next:n(At({variant:a}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",u.button_next),month_caption:n("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",u.month_caption),dropdowns:n("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",u.dropdowns),dropdown_root:n("relative rounded-(--cell-radius)",u.dropdown_root),dropdown:n("absolute inset-0 bg-popover opacity-0",u.dropdown),caption_label:n("font-medium select-none",r==="label"?"text-sm":"flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",u.caption_label),weekdays:n("flex",u.weekdays),weekday:n("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none",u.weekday),week:n("mt-2 flex w-full",u.week),week_number_header:n("w-(--cell-size) select-none",u.week_number_header),week_number:n("text-[0.8rem] text-muted-foreground select-none",u.week_number),day:n("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",c.showWeekNumber?"[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)":"[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",u.day),range_start:n("relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted",u.range_start),range_middle:n("rounded-none",u.range_middle),range_end:n("relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted",u.range_end),today:n("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none",u.today),outside:n("text-muted-foreground aria-selected:text-muted-foreground",u.outside),disabled:n("text-muted-foreground opacity-50",u.disabled),hidden:n("invisible",u.hidden),...t},components:{Root:({className:f,rootRef:m,...p})=>Ro("div",{"data-slot":"calendar",ref:m,className:n(f),...p}),Chevron:({className:f,orientation:m,...p})=>m==="left"?Ro(Ye,{className:n("size-4",f),...p}):m==="right"?Ro(te,{className:n("size-4",f),...p}):Ro(we,{className:n("size-4",f),...p}),DayButton:({...f})=>Ro(jc,{...s!==void 0?{locale:s}:{},...f}),WeekNumber:({children:f,...m})=>Ro("td",{...m,children:Ro("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:f})}),...i},...c})}function jc({className:e,day:t,modifiers:o,locale:r,...a}){let s=Yc(),l=us.useRef(null);return us.useEffect(()=>{o.focused&&l.current?.focus()},[o.focused]),Ro(D,{variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(r?.code),"data-selected-single":o.selected&&!o.range_start&&!o.range_end&&!o.range_middle,"data-range-start":o.range_start,"data-range-end":o.range_end,"data-range-middle":o.range_middle,className:n("group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) [&>span]:text-xs [&>span]:opacity-70",s.day,e),...a})}import*as Ht from"react";import{RefreshCwIcon as xf}from"lucide-react";import{jsx as yr,jsxs as Qc}from"react/jsx-runtime";function Xc(e){let t="ABCDEFGHJKMNPQRSTUVWXYZ23456789",o="";for(let r=0;r<e;r++)o+=t[Math.floor(Math.random()*t.length)];return o}function hf(e,t,o){let r=e.getContext("2d");if(!r)return;let a=e.width,s=e.height;r.clearRect(0,0,a,s);let l=r.createLinearGradient(0,0,0,s);l.addColorStop(0,o?.bgColor??"#f8f9fa"),l.addColorStop(1,"#e9ecef"),r.fillStyle=l,r.fillRect(0,0,a,s);let i=o?.noiseLines??3;for(let m=0;m<i;m++){let p=Math.random()*a,b=Math.random()*s,g=Math.random()*a,h=Math.random()*s;r.beginPath(),r.moveTo(p,b),r.lineTo(g,h),r.strokeStyle=`rgba(${dt(100,200)}, ${dt(100,200)}, ${dt(100,200)}, 0.4)`,r.lineWidth=dt(1,2),r.stroke()}let c=o?.noiseDots??30;for(let m=0;m<c;m++){let p=Math.random()*a,b=Math.random()*s;r.fillStyle=`rgba(${dt(100,200)}, ${dt(100,200)}, ${dt(100,200)}, 0.3)`,r.fillRect(p,b,dt(1,3),dt(1,3))}let u=o?.fontSize??28,f=a/t.length;r.textBaseline="middle";for(let m=0;m<t.length;m++){let p=t[m]??"",b=f*m+f/2+dt(-4,4),g=s/2+dt(-6,6),h=(Math.random()-.5)*Math.PI/6;r.save(),r.translate(b,g),r.rotate(h),r.font=`bold ${u}px ${o?.fontFamily??"monospace"}`,r.fillStyle=o?.textColor??`rgb(${dt(20,100)}, ${dt(20,100)}, ${dt(80,180)})`,r.fillText(p,-u/3,0),r.restore()}}function dt(e,t){return Math.floor(Math.random()*(t-e+1))+e}function yf({length:e=4,canvasWidth:t=140,canvasHeight:o=50,visualOptions:r,onVerify:a,onCodeChange:s,placeholder:l="\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801",disabled:i=!1,className:c,size:u="default",autoRefresh:f=!0}){let m=Ht.useRef(null),p=Ht.useRef(null),[b,g]=Ht.useState(""),[h,y]=Ht.useState(""),[N,w]=Ht.useState("idle"),C=Ht.useCallback(()=>{let S=Xc(e);g(S),y(""),w("refreshing"),s?.(S),requestAnimationFrame(()=>{m.current&&hf(m.current,S,r),w("idle")})},[e,r,s]);Ht.useEffect(()=>{f&&C()},[]);let v=S=>{let R=S.target.value.toUpperCase();if(y(R),w("idle"),R.length===e){let k=R===b;w(k?"success":"error"),a?.(k),k||setTimeout(()=>C(),1200)}},x=S=>{if(S.key==="Enter"&&h.length>0){let R=h===b;w(R?"success":"error"),a?.(R),R||setTimeout(()=>C(),1200)}},P=u==="sm"?"h-7 text-xs":u==="lg"?"h-9 text-base":"h-8 text-sm";return Qc("div",{"data-slot":"captcha",className:n("inline-flex flex-col gap-2",i&&"opacity-50",c),children:[Qc("div",{className:"flex items-center gap-2",children:[yr("canvas",{ref:m,width:t,height:o,className:n("rounded-lg border border-input",N==="success"&&"ring-2 ring-green-400",N==="error"&&"ring-2 ring-red-400")}),yr("button",{type:"button",onClick:C,disabled:i,className:n("flex size-8 items-center justify-center rounded-lg border border-input","text-muted-foreground transition-colors hover:bg-muted hover:text-foreground","disabled:cursor-not-allowed"),"aria-label":"Refresh captcha",title:"\u6362\u4E00\u5F20",children:yr(xf,{className:n("size-4",N==="refreshing"&&"animate-spin")})})]}),yr("div",{className:"relative flex items-center gap-1.5",children:yr("input",{ref:p,type:"text",maxLength:e,value:h,onChange:v,onKeyDown:x,disabled:i||N==="success",placeholder:l,autoComplete:"off",spellCheck:!1,className:n("w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1","text-center uppercase tracking-[0.3em] transition-colors outline-none","placeholder:text-muted-foreground","focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50","disabled:cursor-not-allowed disabled:bg-input/50","dark:bg-input/30 dark:disabled:bg-input/80",P,N==="success"&&"border-green-400 focus-visible:ring-green-400/50",N==="error"&&"border-red-400 focus-visible:ring-red-400/50")})}),N==="success"&&yr("p",{className:"text-xs text-green-600",children:"\u9A8C\u8BC1\u901A\u8FC7"}),N==="error"&&yr("p",{className:"text-xs text-red-500",children:"\u9A8C\u8BC1\u7801\u9519\u8BEF\uFF0C\u8BF7\u91CD\u8BD5"})]})}import"react";import{jsx as ko,jsxs as Jc}from"react/jsx-runtime";function pi({className:e,size:t="default",flush:o,...r}){return ko("div",{"data-slot":"card","data-size":t,...o?{"data-flush":""}:{},className:n("group/card bg-card text-card-foreground ring-foreground/10 flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl py-(--card-spacing) text-sm ring-1 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...r})}function mi({className:e,...t}){return ko("div",{"data-slot":"card-header",className:n("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...t})}function fi({className:e,size:t,...o}){return ko("div",{"data-slot":"card-title",className:n("font-heading leading-snug font-medium",t==="sm"?"text-sm":"text-base group-data-[size=sm]/card:text-sm",e),...o})}function gi({className:e,...t}){return ko("div",{"data-slot":"card-description",className:n("text-muted-foreground text-sm",e),...t})}function Nf({className:e,...t}){return ko("div",{"data-slot":"card-action",className:n("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function bi({className:e,flush:t,...o}){return ko("div",{"data-slot":"card-content",className:n(t?"":"px-(--card-spacing)","group-data-[flush]/card:px-0",e),...o})}function vi({className:e,...t}){return ko("div",{"data-slot":"card-footer",className:n("bg-muted/50 flex items-center rounded-b-xl border-t p-(--card-spacing)",e),...t})}function wf({className:e,title:t,actions:o,children:r,...a}){return Jc("div",{"data-slot":"card-section",className:n("border-border border-b last:border-b-0",e),...a,children:[t!=null||o!=null?Jc("div",{className:"flex items-center justify-between px-3 py-2",children:[ko("span",{className:"text-sm font-semibold",children:t}),o&&ko("div",{className:"flex items-center gap-2",children:o})]}):null,r]})}import*as Qe from"react";import{useTranslation as xi}from"react-i18next";import{jsx as Ot,jsxs as ed}from"react/jsx-runtime";var Zc=Qe.createContext(null);function Qn(){let e=Qe.useContext(Zc);if(!e)throw new Error("Carousel components must be used within Carousel");return e}function Cf({defaultIndex:e=0,loop:t=!0,autoplay:o=!1,interval:r=5e3,onIndexChange:a,className:s,children:l,...i}){let[c,u]=Qe.useState(0),[f,m]=Qe.useState(e),p=Qe.useCallback(h=>{if(c<=0)return;let y=t?(h%c+c)%c:Math.min(Math.max(0,h),c-1);m(y),a?.(y)},[t,c,a]),b=Qe.useCallback(()=>p(f+1),[p,f]),g=Qe.useCallback(()=>p(f-1),[p,f]);return Qe.useEffect(()=>{if(!o)return;let h=setInterval(b,r);return()=>clearInterval(h)},[o,r,b]),Ot(Zc.Provider,{value:{index:f,total:c,goTo:p,next:b,prev:g,loop:t,setTotal:u},children:Ot("div",{"data-slot":"carousel",className:n("relative w-full",s),onKeyDown:h=>{h.key==="ArrowLeft"&&g(),h.key==="ArrowRight"&&b()},tabIndex:0,...i,children:l})})}function Pf({className:e,children:t,...o}){let{total:r,index:a,setTotal:s}=Qn(),l=Qe.Children.count(t);return Qe.useEffect(()=>{s(l)},[l,s]),Ot("div",{className:"overflow-hidden",children:Ot("div",{"data-slot":"carousel-content",className:n("flex transition-transform duration-300 ease-out",e),style:{transform:`translateX(-${r>0?a*100/r:0}%)`},...o,children:t})})}function Rf({className:e,...t}){let{total:o}=Qn();return Ot("div",{"data-slot":"carousel-item",className:n("shrink-0 grow-0 basis-full",e),style:{width:`${o>0?100/o:100}%`},...t})}function kf({className:e,...t}){let{t:o}=xi("ui"),{prev:r}=Qn();return ed(D,{"data-slot":"carousel-previous",variant:"outline",size:"icon",onClick:r,className:n("absolute top-1/2 left-2 z-10 -translate-y-1/2 rounded-full",e),...t,children:[Ot(Ye,{}),Ot("span",{className:"sr-only",children:o("carousel.previous")})]})}function Sf({className:e,...t}){let{t:o}=xi("ui"),{next:r}=Qn();return ed(D,{"data-slot":"carousel-next",variant:"outline",size:"icon",onClick:r,className:n("absolute top-1/2 right-2 z-10 -translate-y-1/2 rounded-full",e),...t,children:[Ot(te,{}),Ot("span",{className:"sr-only",children:o("carousel.next")})]})}function If({className:e,...t}){let{t:o}=xi("ui"),{total:r,index:a,goTo:s}=Qn();return Ot("div",{"data-slot":"carousel-dots",className:n("absolute bottom-3 left-1/2 z-10 flex -translate-x-1/2 gap-1",e),...t,children:Array.from({length:r}).map((l,i)=>Ot("button",{type:"button",onClick:()=>s(i),"aria-label":o("carousel.goToSlide",{count:i+1}),className:n("size-2 rounded-full transition-colors",i===a?"bg-primary":"bg-primary/30 hover:bg-primary/50")},i))})}import{Checkbox as td}from"@base-ui/react/checkbox";import{jsx as hi}from"react/jsx-runtime";function ht({className:e,...t}){return hi(td.Root,{"data-slot":"checkbox",className:n("peer border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3",e),...t,children:hi(td.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:hi(ie,{})})})}import{Collapsible as yi}from"@base-ui/react/collapsible";import{jsx as Pi}from"react/jsx-runtime";function Ni({...e}){return Pi(yi.Root,{"data-slot":"collapsible",...e})}function wi({...e}){return Pi(yi.Trigger,{"data-slot":"collapsible-trigger",...e})}function Ci({...e}){return Pi(yi.Panel,{"data-slot":"collapsible-content",...e})}import{HexColorPicker as Mf,HexColorInput as Df}from"react-colorful";import"react";import{Popover as Nr}from"@base-ui/react/popover";import{jsx as Uo}from"react/jsx-runtime";function ce({...e}){return Uo(Nr.Root,{"data-slot":"popover",...e})}function de({...e}){return Uo(Nr.Trigger,{"data-slot":"popover-trigger",...e})}function ue({className:e,align:t="center",alignOffset:o=0,side:r="bottom",sideOffset:a=4,...s}){return Uo(Nr.Portal,{children:Uo(Nr.Positioner,{align:t,alignOffset:o,side:r,sideOffset:a,className:"isolate z-50",children:Uo(Nr.Popup,{"data-slot":"popover-content",className:n("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg p-2.5 text-sm shadow-md ring-1 outline-hidden duration-100",e),...s})})})}function Tf({className:e,...t}){return Uo("div",{"data-slot":"popover-header",className:n("flex flex-col gap-0.5 text-sm",e),...t})}function Ri({className:e,...t}){return Uo(Nr.Title,{"data-slot":"popover-title",className:n("font-medium",e),...t})}function ki({className:e,...t}){return Uo(Nr.Description,{"data-slot":"popover-description",className:n("text-muted-foreground",e),...t})}import{jsx as Go,jsxs as Si}from"react/jsx-runtime";var zf=["#ef4444","#f97316","#eab308","#22c55e","#14b8a6","#3b82f6","#6366f1","#a855f7","#ec4899","#6b7280"];function Lf({value:e="#000000",onChange:t,presets:o=zf,className:r}){return Si(ce,{"data-slot":"color-picker",children:[Go(de,{className:n("border-input inline-flex h-10 w-10 items-center justify-center rounded-md border-2 bg-transparent",r),children:Go("div",{className:"size-6 rounded-sm",style:{backgroundColor:e}})}),Go(ue,{className:"w-auto p-3",children:Si("div",{className:"space-y-3",children:[Go(Mf,{color:e,onChange:t??(()=>{}),style:{width:"100%",height:160}}),Si("div",{className:"flex items-center gap-2",children:[Go("span",{className:"text-muted-foreground text-xs",children:"#"}),Go(Df,{color:e,onChange:t??(()=>{}),className:"border-input flex h-8 w-full rounded-md border bg-transparent px-2 text-sm",prefixed:!0})]}),o&&o.length>0&&Go("div",{className:"flex flex-wrap gap-1.5",children:o.map(a=>Go("button",{type:"button",className:n("size-6 rounded-md border transition-transform hover:scale-110",e===a&&"ring-primary ring-2 ring-offset-1"),style:{backgroundColor:a},onClick:()=>t?.(a)},a))})]})})]})}import"react";import{useTranslation as $f}from"react-i18next";import{Command as Cr}from"cmdk";import"react";import{cva as od}from"class-variance-authority";import"react";import{jsx as Ef}from"react/jsx-runtime";function wr({className:e,...t}){return Ef("textarea",{"data-slot":"textarea",className:n("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 flex field-sizing-content min-h-16 w-full rounded-lg border bg-transparent px-2.5 py-2 text-base transition-colors outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 md:text-sm",e),...t})}import{jsx as tn}from"react/jsx-runtime";function Ii({className:e,...t}){return tn("div",{"data-slot":"input-group",role:"group",className:n("group/input-group border-input has-disabled:bg-input/50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 relative flex h-8 w-full min-w-0 items-center rounded-lg border transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-3 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...t})}var Ff=od("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function Ti({className:e,align:t="inline-start",...o}){return tn("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:n(Ff({align:t}),e),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...o})}var Af=od("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function Vf({className:e,type:t="button",variant:o="ghost",size:r="xs",...a}){return tn(D,{type:t,"data-size":r,variant:o,className:n(Af({size:r}),e),...a})}function Bf({className:e,...t}){return tn("span",{className:n("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...t})}function Hf({className:e,...t}){return tn(le,{"data-slot":"input-group-control",className:n("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",e),...t})}function Of({className:e,...t}){return tn(wr,{"data-slot":"input-group-control",className:n("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",e),...t})}import{jsx as ut,jsxs as ps}from"react/jsx-runtime";function Mi({className:e,...t}){return ut(Cr,{"data-slot":"command",className:n("bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-xl! p-1",e),...t})}function Di({title:e,description:t,children:o,className:r,showCloseButton:a=!1,...s}){let{t:l}=$f("ui"),i=e??l("commandDialog.title"),c=t??l("commandDialog.description");return ps(ot,{...s,children:[ps(nt,{className:"sr-only",children:[ut(at,{children:i}),ut(hr,{children:c})]}),ut(rt,{className:n("top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0",r),showCloseButton:a,children:o})]})}function Xn({className:e,...t}){return ut("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:ps(Ii,{className:"border-input/30 bg-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[ut(Cr.Input,{"data-slot":"command-input",className:n("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t}),ut(Ti,{children:ut(je,{className:"size-4 shrink-0 opacity-50"})})]})})}function Jn({className:e,...t}){return ut(Cr.List,{"data-slot":"command-list",className:n("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",e),...t})}function Zn({className:e,...t}){return ut(Cr.Empty,{"data-slot":"command-empty",className:n("py-6 text-center text-sm",e),...t})}function on({className:e,...t}){return ut(Cr.Group,{"data-slot":"command-group",className:n("text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium",e),...t})}function Uf({className:e,...t}){return ut(Cr.Separator,{"data-slot":"command-separator",className:n("bg-border -mx-1 h-px",e),...t})}function rn({className:e,children:t,...o}){return ps(Cr.Item,{"data-slot":"command-item",className:n("group/command-item data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[t,ut(ie,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}function Gf({className:e,...t}){return ut("span",{"data-slot":"command-shortcut",className:n("text-muted-foreground group-data-selected/command-item:text-foreground ml-auto text-xs tracking-widest",e),...t})}import{ContextMenu as Xe}from"@base-ui/react/context-menu";import{jsx as Ie,jsxs as zi}from"react/jsx-runtime";function _f({...e}){return Ie(Xe.Root,{"data-slot":"context-menu",...e})}function Kf({...e}){return Ie(Xe.Trigger,{"data-slot":"context-menu-trigger",...e})}function rd({...e}){return Ie(Xe.Portal,{"data-slot":"context-menu-portal",...e})}function nd({align:e="start",alignOffset:t=0,side:o="right",sideOffset:r=0,className:a,...s}){return Ie(rd,{children:Ie(Xe.Positioner,{align:e,alignOffset:t,side:o,sideOffset:r,className:"isolate z-50 outline-none",children:Ie(Xe.Popup,{"data-slot":"context-menu-content",className:n("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 outline-none",a),...s})})})}function Wf({...e}){return Ie(Xe.Group,{"data-slot":"context-menu-group",...e})}function qf({className:e,inset:t,...o}){return Ie(Xe.GroupLabel,{"data-slot":"context-menu-label","data-inset":t,className:n("text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:pl-7",e),...o})}function Yf({className:e,inset:t,variant:o="default",...r}){return Ie(Xe.Item,{"data-slot":"context-menu-item","data-inset":t,"data-variant":o,className:n("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function jf({...e}){return Ie(Xe.SubmenuRoot,{"data-slot":"context-menu-sub",...e})}function Qf({className:e,inset:t,children:o,...r}){return zi(Xe.SubmenuTrigger,{"data-slot":"context-menu-sub-trigger","data-inset":t,className:n("focus:bg-accent focus:text-accent-foreground data-popup-open:bg-accent data-popup-open:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[o,Ie(te,{className:"ml-auto"})]})}function Xf({className:e,...t}){return Ie(nd,{"data-slot":"context-menu-sub-content",sideOffset:4,className:n("min-w-[160px]",e),...t})}function Jf({className:e,children:t,checked:o,inset:r,...a}){return zi(Xe.CheckboxItem,{"data-slot":"context-menu-checkbox-item","data-inset":r,className:n("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:o,...a,children:[Ie("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center",children:Ie(Xe.CheckboxItemIndicator,{children:Ie(ie,{})})}),t]})}function Zf({...e}){return Ie(Xe.RadioGroup,{"data-slot":"context-menu-radio-group",...e})}function eg({className:e,children:t,inset:o,...r}){return zi(Xe.RadioItem,{"data-slot":"context-menu-radio-item","data-inset":o,className:n("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[Ie("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center",children:Ie(Xe.RadioItemIndicator,{children:Ie(ie,{})})}),t]})}function tg({className:e,...t}){return Ie(Xe.Separator,{"data-slot":"context-menu-separator",className:n("bg-border -mx-1 my-1 h-px",e),...t})}import*as So from"react";import{ScrollArea as ea}from"@base-ui/react/scroll-area";import{jsx as ta,jsxs as og}from"react/jsx-runtime";function Pr({className:e,children:t,...o}){return og(ea.Root,{"data-slot":"scroll-area",className:n("relative",e),...o,children:[ta(ea.Viewport,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),ta(ad,{}),ta(ea.Corner,{})]})}function ad({className:e,orientation:t="vertical",...o}){return ta(ea.Scrollbar,{"data-slot":"scroll-area-scrollbar","data-orientation":t,orientation:t,className:n("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",e),...o,children:ta(ea.Thumb,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}import{jsx as pe,jsxs as st}from"react/jsx-runtime";var rg=[{id:"1",name:"Head Office",code:"HQ",children:[{id:"1-1",name:"Engineering",code:"ENG",parentId:"1",children:[{id:"1-1-1",name:"Frontend",code:"FE",parentId:"1-1"},{id:"1-1-2",name:"Backend",code:"BE",parentId:"1-1"},{id:"1-1-3",name:"DevOps",code:"DO",parentId:"1-1"}]},{id:"1-2",name:"Design",code:"DES",parentId:"1",children:[{id:"1-2-1",name:"UI Design",code:"UI",parentId:"1-2"},{id:"1-2-2",name:"UX Research",code:"UX",parentId:"1-2"}]},{id:"1-3",name:"Marketing",code:"MKT",parentId:"1"},{id:"1-4",name:"Sales",code:"SAL",parentId:"1"}]}];function sd({department:e,selectedIds:t,onSelect:o,level:r=0}){let[a,s]=So.useState(r<2),l=e.children&&e.children.length>0,i=t.has(e.id);return st("div",{children:[st("div",{className:n("hover:bg-muted flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5",i&&"bg-muted"),style:{paddingLeft:`${r*16+8}px`},onClick:()=>o(e),children:[l?pe(D,{variant:"ghost",size:"icon-xs",onClick:c=>{c.stopPropagation(),s(!a)},className:"shrink-0",children:pe(te,{className:n("size-3 transition-transform",a&&"rotate-90")})}):pe("div",{className:"size-4"}),pe(ht,{checked:i}),pe(Ka,{className:"text-muted-foreground size-4"}),st("div",{className:"min-w-0 flex-1",children:[pe("p",{className:"truncate text-sm font-medium",children:e.name}),e.code&&pe("p",{className:"text-muted-foreground text-xs",children:e.code})]})]}),l&&a&&pe("div",{children:e.children.map(c=>pe(sd,{department:c,selectedIds:t,onSelect:o,level:r+1},c.id))})]})}function ng({value:e,defaultValue:t,placeholder:o="Select department...",disabled:r,multiple:a=!1,maxCount:s,departments:l=rg,onChange:i,className:c}){let[u,f]=So.useState(!1),[m,p]=So.useState(""),[b,g]=So.useState(Array.isArray(t)?t:t?[t]:[]),h=So.useMemo(()=>e!==void 0?Array.isArray(e)?e:[e]:b,[e,b]),y=So.useMemo(()=>new Set(h.map(x=>x.id)),[h]),N=So.useMemo(()=>{if(!m)return l;let x=m.toLowerCase(),P=S=>S.reduce((R,k)=>{let T=k.name.toLowerCase().includes(x)||k.code?.toLowerCase().includes(x),z=k.children?P(k.children):[];return(T||z.length>0)&&R.push({...k,children:z.length>0?z:k.children??[]}),R},[]);return P(l)},[l,m]),w=x=>{let P;a?P=h.some(R=>R.id===x.id)?h.filter(R=>R.id!==x.id):[...h,x]:(P=[x],f(!1)),g(P),i?.(a?P:P[0])},C=x=>{let P=h.filter(S=>S.id!==x);g(P),i?.(a?P:P[0])},v=x=>{x.stopPropagation(),g([]),i?.(a?[]:void 0)};return pe("div",{"data-slot":"department-browse",className:n("w-full",c),children:st(ot,{open:u,onOpenChange:f,children:[st(St,{render:pe("div",{className:n("border-input flex min-h-8 w-full items-center gap-1 rounded-lg border bg-transparent px-2.5 py-1 text-sm transition-colors","focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-3","disabled:cursor-not-allowed disabled:opacity-50","dark:bg-input/30",r&&"cursor-not-allowed opacity-50")}),disabled:r,children:[h.length>0?pe("div",{className:"flex flex-1 flex-wrap gap-1",children:h.map(x=>st(Bt,{variant:"secondary",className:"gap-1",children:[pe(Ka,{className:"size-3"}),pe("span",{children:x.name}),!r&&st("button",{onClick:P=>{P.stopPropagation(),C(x.id)},className:"hover:bg-muted ml-0.5 rounded-full",children:[pe(oe,{className:"size-3"}),pe("span",{className:"sr-only",children:"Remove"})]})]},x.id))}):pe("span",{className:"text-muted-foreground flex-1",children:o}),h.length>0&&!r&&st(D,{variant:"ghost",size:"icon-xs",onClick:v,className:"shrink-0",children:[pe(oe,{className:"size-3"}),pe("span",{className:"sr-only",children:"Clear all"})]})]}),st(rt,{className:"sm:max-w-md",children:[pe(nt,{children:pe(at,{children:"Select Department"})}),st("div",{className:"relative",children:[pe(je,{className:"text-muted-foreground absolute top-1/2 left-2.5 size-4 -translate-y-1/2"}),pe(le,{value:m,onChange:x=>p(x.target.value),placeholder:"Search departments...",className:"pl-8"})]}),pe(Pr,{className:"h-[300px]",children:st("div",{className:"space-y-1",children:[N.map(x=>pe(sd,{department:x,selectedIds:y,onSelect:w},x.id)),N.length===0&&st("div",{className:"text-muted-foreground flex flex-col items-center justify-center py-8",children:[pe(Ka,{className:"mb-2 size-8"}),pe("p",{className:"text-sm",children:"No departments found"})]})]})}),a&&st("div",{className:"text-muted-foreground flex items-center justify-between text-sm",children:[st("span",{children:[h.length," department(s) selected"]}),s&&st("span",{children:["Max: ",s]})]})]})]})})}import"react";import{cva as ag}from"class-variance-authority";import{jsx as ig}from"react/jsx-runtime";var id=ag("inline-block rounded-full",{variants:{size:{sm:"size-1.5",default:"size-2",lg:"size-2.5"},variant:{default:"bg-foreground/40",primary:"bg-primary",success:"bg-success",warning:"bg-warning",destructive:"bg-destructive",info:"bg-info"},pulse:{true:"relative after:absolute after:inset-0 after:rounded-full after:bg-inherit after:animate-ping after:opacity-75",false:""}},defaultVariants:{size:"default",variant:"default",pulse:!1}});function sg({className:e,size:t,variant:o,pulse:r,...a}){return ig("span",{"data-slot":"dot",className:n(id({size:t,variant:o,pulse:r}),e),...a})}import"react";import{Drawer as _o}from"vaul";import{jsx as $t,jsxs as ld}from"react/jsx-runtime";function lg({...e}){return $t(_o.Root,{"data-slot":"drawer",...e})}function cg({...e}){return $t(_o.Trigger,{"data-slot":"drawer-trigger",...e})}function cd({...e}){return $t(_o.Portal,{"data-slot":"drawer-portal",...e})}function dg({...e}){return $t(_o.Close,{"data-slot":"drawer-close",...e})}function dd({className:e,...t}){return $t(_o.Overlay,{"data-slot":"drawer-overlay",className:n("data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 fixed inset-0 z-50 bg-black/10 supports-backdrop-filter:backdrop-blur-xs",e),...t})}function ug({className:e,children:t,...o}){return ld(cd,{"data-slot":"drawer-portal",children:[$t(dd,{}),ld(_o.Content,{"data-slot":"drawer-content",className:n("group/drawer-content bg-popover text-popover-foreground fixed z-50 flex h-auto flex-col text-sm data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-r-xl data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-l-xl data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm",e),...o,children:[$t("div",{className:"bg-muted mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),t]})]})}function pg({className:e,...t}){return $t("div",{"data-slot":"drawer-header",className:n("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-0.5 md:text-left",e),...t})}function mg({className:e,...t}){return $t("div",{"data-slot":"drawer-footer",className:n("mt-auto flex flex-col gap-2 p-4",e),...t})}function fg({className:e,...t}){return $t(_o.Title,{"data-slot":"drawer-title",className:n("font-heading text-foreground text-base font-medium",e),...t})}function gg({className:e,...t}){return $t(_o.Description,{"data-slot":"drawer-description",className:n("text-muted-foreground text-sm",e),...t})}import"react";import{Menu as Ke}from"@base-ui/react/menu";import{jsx as ke,jsxs as Ei}from"react/jsx-runtime";function oa({...e}){return ke(Ke.Root,{"data-slot":"dropdown-menu",...e})}function bg({...e}){return ke(Ke.Portal,{"data-slot":"dropdown-menu-portal",...e})}function ra({...e}){return ke(Ke.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function nn({align:e="start",alignOffset:t=0,side:o="bottom",sideOffset:r=4,className:a,...s}){return ke(Ke.Portal,{children:ke(Ke.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:t,side:o,sideOffset:r,children:ke(Ke.Popup,{"data-slot":"dropdown-menu-content",className:n("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100 outline-none data-closed:overflow-hidden",a),...s})})})}function vg({...e}){return ke(Ke.Group,{"data-slot":"dropdown-menu-group",...e})}function xg({className:e,inset:t,...o}){return ke(Ke.GroupLabel,{"data-slot":"dropdown-menu-label","data-inset":t,className:n("text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:pl-7",e),...o})}function na({className:e,inset:t,variant:o="default",...r}){return ke(Ke.Item,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":o,className:n("group/dropdown-menu-item focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function hg({...e}){return ke(Ke.SubmenuRoot,{"data-slot":"dropdown-menu-sub",...e})}function yg({className:e,inset:t,children:o,...r}){return Ei(Ke.SubmenuTrigger,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:n("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[o,ke(te,{className:"ml-auto"})]})}function Ng({align:e="start",alignOffset:t=-3,side:o="right",sideOffset:r=0,className:a,...s}){return ke(nn,{"data-slot":"dropdown-menu-sub-content",className:n("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 w-auto min-w-[96px] rounded-lg p-1 shadow-lg ring-1 duration-100",a),align:e,alignOffset:t,side:o,sideOffset:r,...s})}function wg({className:e,children:t,checked:o,inset:r,...a}){return Ei(Ke.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item","data-inset":r,className:n("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:o,...a,children:[ke("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-checkbox-item-indicator",children:ke(Ke.CheckboxItemIndicator,{children:ke(ie,{})})}),t]})}function Cg({...e}){return ke(Ke.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})}function Pg({className:e,children:t,inset:o,...r}){return Ei(Ke.RadioItem,{"data-slot":"dropdown-menu-radio-item","data-inset":o,className:n("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[ke("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:ke(Ke.RadioItemIndicator,{children:ke(ie,{})})}),t]})}function Li({className:e,...t}){return ke(Ke.Separator,{"data-slot":"dropdown-menu-separator",className:n("bg-border -mx-1 my-1 h-px",e),...t})}function Rg({className:e,...t}){return ke("span",{"data-slot":"dropdown-menu-shortcut",className:n("text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest",e),...t})}import{useDropzone as kg}from"react-dropzone";import{jsx as ee,jsxs as pt}from"react/jsx-runtime";function Sg({onDrop:e,accept:t,maxFiles:o=5,maxSize:r,disabled:a,className:s}){let{getRootProps:l,getInputProps:i,isDragActive:c}=kg({...e!==void 0?{onDrop:e}:{},...t!==void 0?{accept:t}:{},maxFiles:o,...r!==void 0?{maxSize:r}:{},...a!==void 0?{disabled:a}:{}});return pt("div",{...l(),className:n("flex cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed p-8 text-center transition-colors",c?"border-primary bg-primary/5":"border-muted-foreground/25 hover:border-muted-foreground/50",a&&"cursor-not-allowed opacity-50",s),children:[ee("input",{...i()}),ee(_n,{className:n("mb-2 size-8",c?"text-primary":"text-muted-foreground")}),c?ee("p",{className:"text-primary text-sm font-medium",children:"Drop files here..."}):pt("div",{className:"space-y-1",children:[ee("p",{className:"text-sm font-medium",children:"Drag & drop files here, or click to select"}),pt("p",{className:"text-muted-foreground text-xs",children:[o>1?`Up to ${o} files`:"Single file",r&&` (max ${Math.round(r/1024/1024)}MB each)`]})]})]})}function Ig({files:e=[],onRemove:t,className:o}){let r=a=>a<1024?a+" B":a<1048576?(a/1024).toFixed(1)+" KB":(a/1048576).toFixed(1)+" MB";return ee("div",{className:n("space-y-2",o),children:e.map((a,s)=>pt("div",{className:"flex items-center gap-3 rounded-md border px-3 py-2 text-sm",children:[ee(no,{className:"text-muted-foreground size-4 shrink-0"}),pt("div",{className:"min-w-0 flex-1",children:[ee("p",{className:"truncate font-medium",children:a.name}),ee("p",{className:"text-muted-foreground text-xs",children:r(a.size)})]}),a.status==="success"&&ee(Oo,{className:"text-success size-4"}),a.status==="error"&&ee(Co,{className:"text-destructive size-4"}),a.progress!==void 0&&ee("div",{className:"bg-muted h-1.5 w-16 overflow-hidden rounded-full",children:ee("div",{className:"bg-primary h-full transition-all",style:{width:a.progress+"%"}})}),t&&ee(D,{variant:"ghost",size:"icon-xs",onClick:()=>t(s),children:ee(oe,{className:"size-3.5"})})]},s))})}var Tg=0;function ud(){return`upload-${++Tg}-${Date.now()}`}function Mg({fileList:e=[],onChange:t,onPreview:o,onRemove:r,customUpload:a,maxCount:s=8,accept:l="image/*",disabled:i,className:c}){let u=async p=>{if(!p||i)return;let b=s-e.length,g=Array.from(p).slice(0,b);for(let h of g){let y=ud(),N={uid:y,name:h.name,status:"uploading",percent:0},w=[...e,N];if(t?.(w),a)try{let C=await a(h);t?.(w.map(v=>v.uid===y?{...v,...C,status:"done"}:v))}catch{t?.(w.map(C=>C.uid===y?{...C,status:"error"}:C))}else{let C=URL.createObjectURL(h);t?.(w.map(v=>v.uid===y?{...v,url:C,status:"done"}:v))}}},f=(p,b)=>{b.stopPropagation();let g=e.filter(h=>h.uid!==p.uid);t?.(g),r?.(p)},m=e.length<s;return pt("div",{"data-slot":"picture-wall",className:n("flex flex-wrap gap-2",c),children:[e.map(p=>pt("div",{className:"group relative size-20 cursor-pointer overflow-hidden rounded-md border",onClick:()=>o?.(p),children:[p.url||p.thumbUrl?ee("img",{src:p.thumbUrl??p.url,alt:p.name,className:"size-full object-cover"}):ee("div",{className:"bg-muted flex size-full items-center justify-center",children:ee(no,{className:"text-muted-foreground size-6"})}),p.status==="uploading"&&ee("div",{className:"absolute inset-0 flex items-center justify-center bg-black/40",children:pt("span",{className:"text-xs font-medium text-white",children:[p.percent??0,"%"]})}),p.status==="error"&&ee("div",{className:"bg-destructive/20 absolute inset-0 flex items-center justify-center",children:ee(Co,{className:"text-destructive size-5"})}),!i&&ee("button",{type:"button",className:"bg-background absolute -top-1 -right-1 rounded-full border p-0.5 opacity-0 transition-opacity group-hover:opacity-100",onClick:b=>f(p,b),"aria-label":`Remove ${p.name}`,children:ee(oe,{className:"size-3"})})]},p.uid)),m&&!i&&pt("label",{className:"border-muted-foreground/25 hover:border-primary/50 flex size-20 cursor-pointer items-center justify-center rounded-md border-2 border-dashed transition-colors",children:[ee(_n,{className:"text-muted-foreground size-5"}),ee("input",{type:"file",accept:l,multiple:s-e.length>1,className:"hidden",onChange:p=>u(p.target.files)})]})]})}function Dg({fileList:e=[],onChange:t,onPreview:o,onRemove:r,customUpload:a,maxCount:s=1,accept:l="image/*",disabled:i,className:c}){let u=async p=>{if(!p||i)return;let b=Array.from(p).slice(0,s-e.length);for(let g of b){let h=ud(),y={uid:h,name:g.name,status:"uploading"},N=[...e,y];if(t?.(N),a)try{let w=await a(g);t?.(N.map(C=>C.uid===h?{...C,...w,status:"done"}:C))}catch{t?.(N.map(w=>w.uid===h?{...w,status:"error"}:w))}else{let w=URL.createObjectURL(g);t?.(N.map(C=>C.uid===h?{...C,url:w,status:"done"}:C))}}},f=(p,b)=>{b.stopPropagation();let g=e.filter(h=>h.uid!==p.uid);t?.(g),r?.(p)},m=e.length<s;return pt("div",{"data-slot":"picture-card",className:n("flex flex-wrap gap-3",c),children:[e.map(p=>pt("div",{className:"group bg-muted/30 relative size-40 overflow-hidden rounded-lg border",children:[p.url||p.thumbUrl?ee("img",{src:p.thumbUrl??p.url,alt:p.name,className:"size-full object-cover"}):pt("div",{className:"flex size-full flex-col items-center justify-center gap-1",children:[ee(no,{className:"text-muted-foreground size-8"}),ee("span",{className:"text-muted-foreground max-w-full truncate px-2 text-xs",children:p.name})]}),p.status==="uploading"&&ee("div",{className:"absolute inset-0 flex items-center justify-center bg-black/40",children:ee("span",{className:"text-sm font-medium text-white",children:"Uploading..."})}),pt("div",{className:"absolute inset-0 flex items-center justify-center gap-1 bg-black/40 opacity-0 transition-opacity group-hover:opacity-100",children:[o&&p.url&&ee(D,{variant:"ghost",size:"icon-sm",className:"text-white hover:bg-white/20",onClick:()=>o(p),children:ee(_n,{className:"size-4"})}),!i&&ee(D,{variant:"ghost",size:"icon-sm",className:"text-white hover:bg-white/20",onClick:b=>f(p,b),children:ee(oe,{className:"size-4"})})]})]},p.uid)),m&&!i&&pt("label",{className:"border-muted-foreground/25 hover:border-primary/50 flex size-40 cursor-pointer flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed transition-colors",children:[ee(_n,{className:"text-muted-foreground size-6"}),ee("span",{className:"text-muted-foreground text-xs",children:"Upload"}),ee("input",{type:"file",accept:l,className:"hidden",onChange:p=>u(p.target.files)})]})]})}import"react";import{cva as zg}from"class-variance-authority";import{jsx as md}from"react/jsx-runtime";var pd=zg("grid gap-4",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"},gap:{sm:"gap-2",default:"gap-4",lg:"gap-6"}},defaultVariants:{columns:2,gap:"default"}});function Lg({className:e,columns:t,gap:o,children:r,...a}){return md("div",{"data-slot":"form-grid",className:n(pd({columns:t,gap:o,className:e})),...a,children:r})}function Eg({className:e,span:t,children:o,...r}){return md("div",{"data-slot":"form-grid-item",className:n(t===2&&"sm:col-span-2",t===3&&"sm:col-span-2 lg:col-span-3",t===4&&"sm:col-span-2 lg:col-span-4",e),...r,children:o})}import*as fd from"react";import{jsx as an,jsxs as aa}from"react/jsx-runtime";function Fg({value:e,defaultValue:t=[],onChange:o,onAdd:r,onRemove:a,renderItem:s,addButtonText:l="Add Item",addButtonVariant:i="outline",maxItems:c,minItems:u=0,disabled:f=!1,sortable:m=!1,className:p}){let[b,g]=fd.useState(t),h=e??b,y=()=>{if(c&&h.length>=c)return;let v=r?r():{id:`item-${Date.now()}`},x=[...h,v];g(x),o?.(x)},N=v=>{if(h.length<=u)return;let x=h.filter((P,S)=>S!==v);g(x),a?.(v),o?.(x)},w=!c||h.length<c,C=h.length>u;return aa("div",{"data-slot":"form-list",className:n("space-y-3",p),children:[h.map((v,x)=>aa("div",{"data-slot":"form-list-item",className:"flex items-start gap-2 rounded-lg border p-4",children:[m&&!f&&aa(D,{variant:"ghost",size:"icon-xs",className:"mt-1 cursor-grab",tabIndex:-1,children:[an(vc,{className:"size-3"}),an("span",{className:"sr-only",children:"Drag to reorder"})]}),an("div",{className:"min-w-0 flex-1",children:s(v,x)}),!f&&C&&aa(D,{variant:"ghost",size:"icon-xs",onClick:()=>N(x),className:"text-muted-foreground hover:text-destructive mt-1 shrink-0",children:[an(Ic,{className:"size-3"}),an("span",{className:"sr-only",children:"Remove item"})]})]},v.id)),!f&&w&&aa(D,{variant:i,size:"sm",onClick:y,className:"w-full",children:[an(Xa,{className:"mr-1 size-4"}),l]})]})}import*as gd from"react";import{cva as Ag}from"class-variance-authority";import{jsx as ms,jsxs as sa}from"react/jsx-runtime";var bd=Ag("rounded-lg border bg-card text-card-foreground",{variants:{variant:{default:"",elevated:"shadow-sm",flat:"border-0 bg-transparent"}},defaultVariants:{variant:"default"}});function Vg({className:e,variant:t,title:o,description:r,collapsible:a=!1,defaultCollapsed:s=!1,required:l,extra:i,children:c,...u}){let[f,m]=gd.useState(s);return sa("div",{"data-slot":"form-section","data-collapsed":f,className:n(bd({variant:t,className:e})),...u,children:[(o||r)&&sa("div",{className:n("flex items-center justify-between px-4 py-3",a&&"cursor-pointer select-none"),onClick:()=>a&&m(!f),children:[sa("div",{className:"space-y-0.5",children:[o&&sa("h3",{className:"text-sm leading-none font-medium",children:[o,l&&ms("span",{className:"text-destructive ml-1",children:"*"})]}),r&&ms("p",{className:"text-muted-foreground text-xs",children:r})]}),sa("div",{className:"flex items-center gap-2",children:[i,a&&ms(we,{className:n("text-muted-foreground size-4 transition-transform",f&&"-rotate-90")})]})]}),(!a||!f)&&ms("div",{className:n("px-4 pb-4",o||r?"pt-0":"pt-4"),children:c})]})}import*as Ko from"react";import{Slot as Hg}from"@radix-ui/react-slot";import{Controller as Og,FormProvider as $g,useFormContext as Ug}from"react-hook-form";import"react";import{jsx as Bg}from"react/jsx-runtime";function Fi({className:e,...t}){return Bg("label",{"data-slot":"label",className:n("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}import{jsx as Wo,jsxs as Gg}from"react/jsx-runtime";var Ai=$g,vd=Ko.createContext({});function Vi({...e}){return Wo(vd.Provider,{value:{name:e.name},children:Wo(Og,{...e})})}var xd=Ko.createContext({});function ia(){let e=Ko.useContext(vd),t=Ko.useContext(xd),{getFieldState:o,formState:r}=Ug(),a=o(e.name,r);if(!e.name)throw new Error("useFormField should be used within <FormField>");let{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...a}}function Bi({className:e,...t}){let o=Ko.useId();return Wo(xd.Provider,{value:{id:o},children:Wo("div",{"data-slot":"form-item",className:n("group/form-item space-y-1.5",e),...t})})}function Hi({className:e,required:t,...o}){let{error:r,formItemId:a}=ia();return Gg(Fi,{"data-slot":"form-label","data-error":!!r,className:n(r&&"text-destructive",e),htmlFor:a,...o,children:[o.children,t&&Wo("span",{className:"text-destructive",children:"*"})]})}function Oi({...e}){let{error:t,formItemId:o,formDescriptionId:r,formMessageId:a}=ia();return Wo(Hg,{"data-slot":"form-control",id:o,"aria-describedby":t?`${r} ${a}`:r,"aria-invalid":!!t,...e})}function $i({className:e,...t}){let{formDescriptionId:o}=ia();return Wo("p",{"data-slot":"form-description",id:o,className:n("text-muted-foreground text-xs",e),...t})}function Ui({className:e,...t}){let{error:o,formMessageId:r}=ia(),a=o?String(o?.message??""):t.children;return a?Wo("p",{"data-slot":"form-message",id:r,className:n("text-destructive text-xs font-medium",e),...t,children:a}):null}import*as Ki from"react";import{useTranslation as jg}from"react-i18next";import{zodResolver as Kg}from"@hookform/resolvers/zod";import{useForm as _g}from"react-hook-form";function hd(e){return _g({mode:"onTouched",reValidateMode:"onChange",...e})}function yd(e={}){let{schema:t,resolver:o,...r}=e,a=o??(t?Kg(t):void 0);return hd(a?{...r,resolver:a}:r)}import{Switch as Nd}from"@base-ui/react/switch";import{jsx as wd}from"react/jsx-runtime";function Gi({className:e,size:t="default",...o}){return wd(Nd.Root,{"data-slot":"switch","data-size":t,className:n("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 aria-invalid:ring-3 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px]",e),...o,children:wd(Nd.Thumb,{"data-slot":"switch-thumb",className:"bg-background dark:data-checked:bg-primary-foreground dark:data-unchecked:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0"})})}import"react";import{Select as Je}from"@base-ui/react/select";import{jsx as Fe,jsxs as _i}from"react/jsx-runtime";var sn=Je.Root;function Wg({className:e,...t}){return Fe(Je.Group,{"data-slot":"select-group",className:n("scroll-my-1 p-1",e),...t})}function ln({className:e,...t}){return Fe(Je.Value,{"data-slot":"select-value",className:n("flex flex-1 text-left",e),...t})}function cn({className:e,size:t="default",children:o,...r}){return _i(Je.Trigger,{"data-slot":"select-trigger","data-size":t,className:n("border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 flex w-fit items-center justify-between gap-1.5 rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[o,Fe(Je.Icon,{render:Fe(we,{className:"text-muted-foreground pointer-events-none size-4"})})]})}function dn({className:e,children:t,side:o="bottom",sideOffset:r=4,align:a="center",alignOffset:s=0,alignItemWithTrigger:l=!0,...i}){return Fe(Je.Portal,{children:Fe(Je.Positioner,{side:o,sideOffset:r,align:a,alignOffset:s,alignItemWithTrigger:l,className:"isolate z-50",children:_i(Je.Popup,{"data-slot":"select-content","data-align-trigger":l,className:n("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg shadow-md ring-1 duration-100 data-[align-trigger=true]:animate-none",e),...i,children:[Fe(Cd,{}),Fe(Je.List,{children:t}),Fe(Pd,{})]})})})}function qg({className:e,...t}){return Fe(Je.GroupLabel,{"data-slot":"select-label",className:n("text-muted-foreground px-1.5 py-1 text-xs",e),...t})}function un({className:e,children:t,...o}){return _i(Je.Item,{"data-slot":"select-item",className:n("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...o,children:[Fe(Je.ItemText,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:t}),Fe(Je.ItemIndicator,{render:Fe("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:Fe(ie,{className:"pointer-events-none"})})]})}function Yg({className:e,...t}){return Fe(Je.Separator,{"data-slot":"select-separator",className:n("bg-border pointer-events-none -mx-1 my-1 h-px",e),...t})}function Cd({className:e,...t}){return Fe(Je.ScrollUpArrow,{"data-slot":"select-scroll-up-button",className:n("bg-popover top-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:Fe(Wa,{})})}function Pd({className:e,...t}){return Fe(Je.ScrollDownArrow,{"data-slot":"select-scroll-down-button",className:n("bg-popover bottom-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:Fe(we,{})})}import{jsx as Te,jsxs as la}from"react/jsx-runtime";function Qg(e){return e?.type?e.type:e?.options&&e.options.length>0?"select":"text"}function Xg({schema:e,defaultValues:t,fields:o,onSubmit:r,submitText:a,resetText:s,isLoading:l,className:i,layout:c="stack",columns:u=2}){let{t:f}=jg("ui"),m=yd({schema:e,defaultValues:t}),p=a===null?null:a??f("schemaForm.submit"),b=s===null?null:s??f("schemaForm.reset"),g=f("schemaForm.selectPlaceholder"),h=Ki.useMemo(()=>{let w=o?Object.keys(o):[],C=Object.keys(t),v=new Set([...w,...C]);return Array.from(v)},[o,t]),y=Ki.useMemo(()=>m.handleSubmit(async w=>{await r?.(w)}),[m,r]),N=c==="grid"?n("grid gap-4 sm:grid-cols-2",u!==2&&`sm:grid-cols-${u}`):"flex flex-col gap-4";return Te(Ai,{...m,children:la("form",{"data-slot":"schema-form",className:n(N,i),onSubmit:y,children:[h.map(w=>{let C=o?.[w];if(C?.hidden)return null;let v=Qg(C),x=C?.required??!1,P=C?.label??Te("span",{className:"capitalize",children:String(w)});return Te(Vi,{control:m.control,name:w,render:({field:S})=>la(Bi,{className:n(v==="switch"&&"flex flex-row items-center justify-between gap-3",C?.className),children:[v!=="checkbox"&&v!=="switch"&&Te(Hi,{required:x,children:P}),Te(Oi,{children:Jg({controlType:v,field:S,override:C??{},label:P,selectPlaceholder:g})}),C?.description?Te($i,{children:C.description}):null,Te(Ui,{})]})},w)}),(p!==null||b!==null)&&la("div",{className:"flex items-center gap-2 pt-1",children:[p!==null&&Te(D,{type:"submit",disabled:l,children:typeof p=="string"?p:f("schemaForm.submit")}),b!==null&&Te(D,{type:"button",variant:"outline",disabled:l,onClick:()=>m.reset(t),children:typeof b=="string"?b:f("schemaForm.reset")})]})]})})}function Jg(e){let{controlType:t,field:o,override:r,label:a,selectPlaceholder:s}=e,l=o.disabled||r.disabled;switch(t){case"textarea":return Te(wr,{value:o.value??"",placeholder:r.placeholder,disabled:l,onChange:i=>o.onChange(i.target.value),onBlur:o.onBlur});case"checkbox":return la("div",{className:"flex items-center gap-2",children:[Te(ht,{checked:o.value===!0,disabled:l,onCheckedChange:i=>o.onChange(i===!0)}),Te("span",{className:"text-sm",children:a})]});case"switch":return Te(Gi,{checked:o.value===!0,disabled:l,onCheckedChange:i=>o.onChange(i)});case"select":return la(sn,{value:o.value??void 0,disabled:l,onValueChange:i=>o.onChange(i??""),children:[Te(cn,{children:Te(ln,{placeholder:r.placeholder??s??"Select..."})}),Te(dn,{children:(r.options??[]).map(i=>Te(un,{value:i.value,children:i.label},i.value))})]});case"number":return Te(le,{type:"number",value:o.value??"",placeholder:r.placeholder,disabled:l,onChange:i=>o.onChange(Number.isNaN(i.target.valueAsNumber)?"":i.target.valueAsNumber),onBlur:o.onBlur});case"email":case"password":case"date":return Te(le,{type:t,value:o.value??"",placeholder:r.placeholder,disabled:l,onChange:i=>o.onChange(i.target.value),onBlur:o.onBlur});default:return Te(le,{type:"text",value:o.value??"",placeholder:r.placeholder,disabled:l,onChange:i=>o.onChange(i.target.value),onBlur:o.onBlur})}}import*as fs from"react";import{jsx as Wi}from"react/jsx-runtime";function Zg({targetRef:e,size:t="icon-sm",variant:o="ghost",className:r}){let[a,s]=fs.useState(!1);return fs.useEffect(()=>{let i=()=>s(document.fullscreenElement!==null);return document.addEventListener("fullscreenchange",i),()=>document.removeEventListener("fullscreenchange",i)},[]),Wi(D,{variant:o,size:t,onClick:()=>{let i=e?.current??document.documentElement;document.fullscreenElement?document.exitFullscreen():i.requestFullscreen()},className:n(r),"aria-label":a?"Exit fullscreen":"Enter fullscreen","data-slot":"fullscreen-toggle",children:a?Wi(wc,{}):Wi(Nc,{})})}import"react";import{cva as eb}from"class-variance-authority";import{jsx as kd}from"react/jsx-runtime";var Rd=eb("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",12:"grid-cols-12",auto:"grid-cols-[repeat(auto-fill,minmax(250px,1fr))]"},gap:{none:"gap-0",sm:"gap-2",default:"gap-4",lg:"gap-6",xl:"gap-8"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between"}},defaultVariants:{columns:1,gap:"default",align:"stretch",justify:"start"}});function tb({className:e,columns:t,gap:o,align:r,justify:a,responsive:s,children:l,...i}){let c=s?n(s.sm&&`sm:grid-cols-${s.sm}`,s.md&&`md:grid-cols-${s.md}`,s.lg&&`lg:grid-cols-${s.lg}`,s.xl&&`xl:grid-cols-${s.xl}`):"";return kd("div",{"data-slot":"grid-layout",className:n(Rd({columns:t,gap:o,align:r,justify:a}),c,e),...i,children:l})}function ob({className:e,span:t,rowSpan:o,start:r,end:a,children:s,...l}){return kd("div",{"data-slot":"grid-item",className:n(t&&`col-span-${t}`,o&&`row-span-${o}`,r&&`col-start-${r}`,a&&`col-end-${a}`,e),...l,children:s})}import{PreviewCard as ca}from"@base-ui/react/preview-card";import{jsx as da}from"react/jsx-runtime";function rb({...e}){return da(ca.Root,{"data-slot":"hover-card",...e})}function nb({...e}){return da(ca.Trigger,{"data-slot":"hover-card-trigger",...e})}function ab({className:e,side:t="bottom",sideOffset:o=4,align:r="center",alignOffset:a=4,...s}){return da(ca.Portal,{"data-slot":"hover-card-portal",children:da(ca.Positioner,{align:r,alignOffset:a,side:t,sideOffset:o,className:"isolate z-50",children:da(ca.Popup,{"data-slot":"hover-card-content",className:n("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 w-64 origin-(--transform-origin) rounded-lg p-2.5 text-sm shadow-md ring-1 outline-hidden duration-100",e),...s})})})}import*as mn from"react";import{Fragment as ib,jsx as qo,jsxs as pn}from"react/jsx-runtime";function sb({open:e,onOpenChange:t,images:o,index:r=0}){let[a,s]=mn.useState(r),[l,i]=mn.useState(1),[c,u]=mn.useState(0);if(mn.useEffect(()=>{e&&(s(r),i(1),u(0))},[e,r]),!e||o.length===0)return null;let f=o[a];if(!f)return null;let m=()=>s(b=>(b-1+o.length)%o.length),p=()=>s(b=>(b+1)%o.length);return pn("div",{"data-slot":"image-viewer",className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/90",onClick:()=>t(!1),children:[qo(D,{variant:"ghost",size:"icon",className:"absolute top-4 right-4 text-white hover:bg-white/10",onClick:b=>{b.stopPropagation(),t(!1)},"aria-label":"Close",children:qo(oe,{})}),o.length>1&&pn(ib,{children:[qo(D,{variant:"ghost",size:"icon",className:"absolute left-4 text-white hover:bg-white/10",onClick:b=>{b.stopPropagation(),m()},"aria-label":"Previous",children:"<"}),qo(D,{variant:"ghost",size:"icon",className:"absolute right-4 text-white hover:bg-white/10",onClick:b=>{b.stopPropagation(),p()},"aria-label":"Next",children:">"})]}),pn("div",{className:"flex flex-col items-center gap-3",children:[qo("img",{src:f.src,alt:f.alt??"",className:"max-h-[80vh] max-w-[90vw] object-contain transition-transform",style:{transform:`scale(${l}) rotate(${c}deg)`},onClick:b=>b.stopPropagation()}),pn("div",{className:"flex items-center gap-2",children:[qo(D,{variant:"outline",size:"sm",className:"border-white/30 text-white",onClick:b=>{b.stopPropagation(),i(g=>Math.max(.5,g-.25))},children:"Zoom Out"}),pn("span",{className:"text-sm text-white/70 tabular-nums",children:[Math.round(l*100),"%"]}),qo(D,{variant:"outline",size:"sm",className:"border-white/30 text-white",onClick:b=>{b.stopPropagation(),i(g=>Math.min(3,g+.25))},children:"Zoom In"}),qo(D,{variant:"outline",size:"sm",className:"border-white/30 text-white",onClick:b=>{b.stopPropagation(),u(g=>(g+90)%360)},children:"Rotate"})]}),o.length>1&&pn("span",{className:"text-xs text-white/50",children:[a+1," / ",o.length]})]})]})}import*as Md from"react";import"react";import{cva as lb}from"class-variance-authority";import{jsx as Id}from"react/jsx-runtime";var Sd=lb("pointer-events-none inline-flex items-center justify-center gap-0.5 rounded-md border bg-muted font-mono font-medium text-muted-foreground shadow-xs select-none",{variants:{size:{sm:"h-5 min-w-5 px-1 text-[0.65rem]",default:"h-6 min-w-6 px-1.5 text-xs",lg:"h-7 min-w-7 px-2 text-sm"}},defaultVariants:{size:"default"}});function ua({className:e,size:t,...o}){return Id("kbd",{"data-slot":"kbd",className:n(Sd({size:t}),e),...o})}function pa({className:e,...t}){return Id("div",{"data-slot":"kbd-group",className:n("inline-flex items-center gap-1",e),...t})}import{jsx as gs,jsxs as Td}from"react/jsx-runtime";function cb({keys:e,description:t,layout:o="horizontal",className:r,...a}){return Td("div",{"data-slot":"keyboard-shortcut",className:n("flex items-center gap-2",o==="vertical"&&"flex-col gap-1",r),...a,children:[t&&gs("span",{className:"text-muted-foreground text-sm",children:t}),gs(pa,{children:e.map((s,l)=>Td(Md.Fragment,{children:[l>0&&gs("span",{className:"text-muted-foreground text-xs",children:"+"}),gs(ua,{children:s})]},l))})]})}import"react";import{cva as db}from"class-variance-authority";import{jsx as Yo,jsxs as bs}from"react/jsx-runtime";var ub=db("rounded-lg border bg-card p-4 text-card-foreground",{variants:{size:{sm:"p-3",default:"p-4",lg:"p-6"}},defaultVariants:{size:"default"}});function qi({className:e,size:t,items:o,columns:r=4,...a}){return Yo("div",{"data-slot":"kpi-panel",className:n("grid gap-4",r===1&&"grid-cols-1",r===2&&"grid-cols-1 sm:grid-cols-2",r===3&&"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",r===4&&"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",e),...a,children:o.map((s,l)=>Yo(vs,{item:s,size:t??"default"},l))})}function vs({item:e,size:t}){let o=e.trend==="up"?"text-success":e.trend==="down"?"text-destructive":"text-muted-foreground",r=e.trend==="up"?Za:e.trend==="down"?Ja:Cc;return bs("div",{"data-slot":"kpi-card",className:n(ub({size:t??void 0})),children:[bs("div",{className:"flex items-center justify-between",children:[Yo("p",{className:"text-muted-foreground text-sm",children:e.label}),e.icon&&Yo("span",{className:"text-muted-foreground",children:e.icon})]}),Yo("div",{className:"mt-2",children:Yo("p",{className:n("font-bold tracking-tight",t==="sm"?"text-lg":t==="lg"?"text-3xl":"text-2xl"),children:e.value})}),(e.change!==void 0||e.changeLabel)&&bs("div",{className:"mt-2 flex items-center gap-1",children:[e.change!==void 0&&bs("span",{className:n("flex items-center gap-0.5 text-xs font-medium",o),children:[Yo(r,{className:"size-3"}),e.change>0?"+":"",e.change,"%"]}),e.changeLabel&&Yo("span",{className:"text-muted-foreground text-xs",children:e.changeLabel})]})]})}import{Menubar as pb}from"@base-ui/react/menubar";import{jsx as fb}from"react/jsx-runtime";function mb({className:e,...t}){return fb(pb,{"data-slot":"menubar",className:n("bg-background flex h-9 items-center gap-1 rounded-lg border p-1 shadow-xs",e),...t})}import{NavigationMenu as Ut}from"@base-ui/react/navigation-menu";import{cva as gb}from"class-variance-authority";import{jsx as Tt,jsxs as Ld}from"react/jsx-runtime";function bb({align:e="start",className:t,children:o,...r}){return Ld(Ut.Root,{"data-slot":"navigation-menu",className:n("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",t),...r,children:[o,Tt(zd,{align:e})]})}function vb({className:e,...t}){return Tt(Ut.List,{"data-slot":"navigation-menu-list",className:n("group flex flex-1 list-none items-center justify-center gap-0",e),...t})}function xb({className:e,...t}){return Tt(Ut.Item,{"data-slot":"navigation-menu-item",className:n("relative",e),...t})}var Dd=gb("group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted");function hb({className:e,children:t,...o}){return Ld(Ut.Trigger,{"data-slot":"navigation-menu-trigger",className:n(Dd(),"group",e),...o,children:[t," ",Tt(we,{className:"relative top-px ml-1 size-3 transition duration-300 group-data-open/navigation-menu-trigger:rotate-180 group-data-popup-open/navigation-menu-trigger:rotate-180","aria-hidden":"true"})]})}function yb({className:e,...t}){return Tt(Ut.Content,{"data-slot":"navigation-menu-content",className:n("data-ending-style:data-activation-direction=left:translate-x-[50%] data-ending-style:data-activation-direction=right:translate-x-[-50%] data-starting-style:data-activation-direction=left:translate-x-[-50%] data-starting-style:data-activation-direction=right:translate-x-[50%] group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:ring-foreground/10 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 h-full w-auto p-1 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",e),...t})}function zd({className:e,side:t="bottom",sideOffset:o=8,align:r="start",alignOffset:a=0,...s}){return Tt(Ut.Portal,{children:Tt(Ut.Positioner,{side:t,sideOffset:o,align:r,alignOffset:a,className:n("isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0",e),...s,children:Tt(Ut.Popup,{className:"data-[ending-style]:easing-[ease] xs:w-(--popup-width) bg-popover text-popover-foreground ring-foreground/10 relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-lg shadow ring-1 transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0",children:Tt(Ut.Viewport,{className:"relative size-full overflow-hidden"})})})})}function Nb({className:e,...t}){return Tt(Ut.Link,{"data-slot":"navigation-menu-link",className:n("hover:bg-muted focus:bg-muted focus-visible:ring-ring/50 data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none focus-visible:ring-3 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md [&_svg:not([class*='size-'])]:size-4",e),...t})}function wb({className:e,...t}){return Tt(Ut.Icon,{"data-slot":"navigation-menu-indicator",className:n("data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in top-full z-1 flex h-1.5 items-end justify-center overflow-hidden",e),...t,children:Tt("div",{className:"bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md"})})}import"react";import{OTPFieldPreview as Yi}from"@base-ui/react/otp-field";import{jsx as xs}from"react/jsx-runtime";function fn({length:e,value:t,onValueChange:o,mask:r=!1,className:a,inputClassName:s,...l}){return xs(Yi.Root,{"data-slot":"otp-field",length:e,value:t,onValueChange:i=>o?.(i),mask:r,className:n("flex items-center gap-1.5",a),...l,children:Array.from({length:e}).map((i,c)=>xs(Yi.Input,{"data-slot":"otp-field-input",className:n("border-input bg-background focus-visible:border-ring focus-visible:ring-ring/50 flex size-9 items-center justify-center rounded-md border text-center text-base font-medium shadow-xs transition-colors focus-visible:ring-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",s)},c))})}function Cb({className:e,...t}){return xs("div",{"data-slot":"otp-field-separator",className:n("text-muted-foreground/50 flex items-center",e),...t,children:xs(Yi.Separator,{children:"\u2014"})})}import*as io from"react";import{DownloadIcon as Pb,Maximize2Icon as Rb,Minimize2Icon as kb,ExternalLinkIcon as Ed,AlertTriangleIcon as Sb,Loader2Icon as Ib}from"lucide-react";import{jsx as Ze,jsxs as jo}from"react/jsx-runtime";var Tb={word:"Word \u6587\u6863",excel:"Excel \u8868\u683C",ppt:"PowerPoint \u6F14\u793A",unknown:"\u6587\u6863"};function Ad(e,t){if(t&&t!=="unknown")return t;if(!e)return"unknown";switch(e.split(".").pop()?.toLowerCase()){case"doc":case"docx":case"rtf":return"word";case"xls":case"xlsx":case"csv":return"excel";case"ppt":case"pptx":return"ppt";default:return"unknown"}}function Mb(e){return`https://view.officeapps.live.com/op/embed.aspx?src=${encodeURIComponent(e)}`}function Fd(e){return`https://docs.google.com/gview?url=${encodeURIComponent(e)}&embedded=true`}function Db({src:e,fileName:t,docType:o,height:r=600,showToolbar:a=!0,allowFullscreen:s=!0,allowDownload:l=!0,engine:i="microsoft",loadingText:c="\u6B63\u5728\u52A0\u8F7D\u9884\u89C8...",errorText:u="\u6587\u6863\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u94FE\u63A5\u662F\u5426\u6709\u6548",onLoad:f,onError:m,className:p}){let[b,g]=io.useState(!1),[h,y]=io.useState(!0),[N,w]=io.useState(null),[C,v]=io.useState(!1),x=io.useRef(null),P=Ad(t,o),S=i==="google"?Fd(e):Mb(e),R=()=>{y(!1),f?.()},k=()=>{y(!1),w(u),m?.(u)};return io.useEffect(()=>{let z=setTimeout(()=>{h&&y(!1)},15e3);return()=>clearTimeout(z)},[h]),io.useEffect(()=>{let z=W=>{W.key==="Escape"&&b&&g(!1)};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[b]),jo("div",{"data-slot":"office-doc-preview",className:n("relative flex flex-col overflow-hidden rounded-lg border bg-background",b&&"fixed inset-0 z-50 rounded-none",p),style:b?{}:{height:r},children:[a&&jo("div",{className:"flex shrink-0 items-center gap-1.5 border-b bg-muted/30 px-3 py-1.5",children:[Ze("span",{className:"text-sm font-medium",children:Tb[P]}),t&&Ze("span",{className:"truncate text-xs text-muted-foreground",children:t}),jo("div",{className:"ml-auto flex items-center gap-1",children:[s&&Ze("button",{type:"button",onClick:()=>g(z=>!z),className:n("rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground"),title:b?"\u9000\u51FA\u5168\u5C4F":"\u5168\u5C4F",children:b?Ze(kb,{className:"size-4"}):Ze(Rb,{className:"size-4"})}),l&&Ze("a",{href:e,download:t,target:"_blank",rel:"noopener noreferrer",className:"rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground",title:"\u4E0B\u8F7D",children:Ze(Pb,{className:"size-4"})}),Ze("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground",title:"\u65B0\u7A97\u53E3\u6253\u5F00",children:Ze(Ed,{className:"size-4"})})]})]}),jo("div",{className:"relative flex-1",children:[h&&jo("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-2 bg-background/80",children:[Ze(Ib,{className:"size-8 animate-spin text-muted-foreground"}),Ze("span",{className:"text-sm text-muted-foreground",children:c})]}),N?jo("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-8 text-center",children:[Ze(Sb,{className:"size-12 text-amber-500"}),Ze("p",{className:"text-sm text-muted-foreground",children:N}),jo("div",{className:"flex gap-2",children:[jo("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:n("inline-flex items-center gap-1 rounded-md border border-input px-3 py-1.5 text-sm","hover:bg-muted transition-colors"),children:[Ze(Ed,{className:"size-3.5"}),"\u76F4\u63A5\u6253\u5F00"]}),i==="microsoft"&&Ze("button",{type:"button",onClick:()=>{v(!0),w(null),y(!0)},className:n("inline-flex items-center gap-1 rounded-md border border-input px-3 py-1.5 text-sm","hover:bg-muted transition-colors"),children:"\u5207\u6362\u5230 Google \u9884\u89C8"})]})]}):Ze("iframe",{ref:x,src:C?Fd(e):S,onLoad:R,onError:k,className:"h-full w-full border-none",title:t??"Office document preview",sandbox:"allow-scripts allow-same-origin allow-popups"})]})]})}import*as mt from"react";import{ChevronRightIcon as zb,SearchIcon as Lb,XIcon as Eb,ChevronDownIcon as Fb}from"lucide-react";import{jsx as Ae,jsxs as hs}from"react/jsx-runtime";function Ab(e){let t=[],o=r=>{for(let a of r)t.push(a.id),a.children&&o(a.children)};return o(e),t}function Vd(e,t,o=0){let r=[];for(let a=0;a<e.length;a++){let s=e[a],l=!!s.children&&s.children.length>0,i=a===e.length-1;r.push({node:s,depth:o,hasChildren:l,isLast:i}),l&&t.has(s.id)&&r.push(...Vd(s.children,t,o+1))}return r}function Vb({data:e,selectedKeys:t,defaultSelectedKeys:o=[],defaultExpandedKeys:r=[],expandedKeys:a,onSelect:s,onExpand:l,onNodeClick:i,onLoadChildren:c,selectable:u="none",checkable:f=!1,searchable:m=!1,searchPlaceholder:p="\u641C\u7D22...",showLine:b=!0,draggable:g=!1,onDrop:h,className:y,renderNode:N}){let[w,C]=mt.useState(new Set(o)),v=mt.useMemo(()=>t?new Set(t):w,[t,w]),[x,P]=mt.useState(new Set(r)),S=mt.useMemo(()=>a?new Set(a):x,[a,x]),[R,k]=mt.useState(""),[T,z]=mt.useState(new Set),[W,$]=mt.useState(null),E=O=>{t||C(O),s?.(Array.from(O))},A=O=>{a||P(O),l?.(Array.from(O))},I=async O=>{let re=new Set(S);if(re.has(O))re.delete(O);else if(re.add(O),c){let G=ji(e,O);if(G&&!G.children&&!G.loading){z(V=>new Set(V).add(O));try{let V=await c(G);G.children=V}finally{z(V=>{let F=new Set(V);return F.delete(O),F})}}}A(re)},H=O=>{if(u==="none"&&!f)return;let re=new Set(v);u==="single"&&!f?(re.clear(),re.add(O)):re.has(O)?re.delete(O):re.add(O),E(re)},U=O=>{i?.(O.node),!f&&u!=="none"&&H(O.node.id),O.hasChildren&&I(O.node.id)},M=mt.useMemo(()=>{if(!R.trim())return e;let O=R.toLowerCase(),re=G=>{let V=[];for(let F of G){let X=F.label.toLowerCase().includes(O)||F.description?.toLowerCase().includes(O),Y=F.children?re(F.children):[];(X||Y.length>0)&&V.push({id:F.id,label:F.label,...F.description!=null?{description:F.description}:{},...F.avatar!=null?{avatar:F.avatar}:{},...F.loading!=null?{loading:F.loading}:{},...F.disabled!=null?{disabled:F.disabled}:{},...F.meta!=null?{meta:F.meta}:{},children:Y.length>0?Y:F.children})}return V};return re(e)},[e,R]),L=mt.useMemo(()=>{if(!R.trim())return S;let O=Ab(M);return new Set(O)},[R,M,S]),B=R.trim()?L:S,j=mt.useMemo(()=>Vd(M,B),[M,B]),ne=mt.useRef(null),Ne=(O,re)=>{O.dataTransfer.setData("text/plain",re.id),O.dataTransfer.effectAllowed="move",O.currentTarget.classList.add("opacity-50"),O.stopPropagation()},He=(O,re)=>{O.preventDefault(),O.dataTransfer.dropEffect="move",$(re)},Oe=()=>{$(null)},xt=(O,re)=>{O.preventDefault(),$(null);let G=O.dataTransfer.getData("text/plain"),V=ji(e,G);V&&h&&h(V,re)};return hs("div",{ref:ne,"data-slot":"org-tree",className:n("w-full",y),children:[m&&hs("div",{className:"relative mb-2",children:[Ae(Lb,{className:"absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground"}),Ae("input",{type:"text",value:R,onChange:O=>k(O.target.value),placeholder:p,className:n("h-8 w-full rounded-lg border border-input bg-transparent pl-8 pr-8","text-sm outline-none transition-colors","placeholder:text-muted-foreground","focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50")}),R&&Ae("button",{type:"button",onClick:()=>k(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:Ae(Eb,{className:"size-3.5"})})]}),j.length===0&&Ae("div",{className:"py-8 text-center text-sm text-muted-foreground",children:R?"\u65E0\u5339\u914D\u7ED3\u679C":"\u6682\u65E0\u6570\u636E"}),Ae("div",{role:"tree","aria-label":"\u7EC4\u7EC7\u67B6\u6784\u6811",className:"select-none",children:j.map(({node:O,depth:re,hasChildren:G,isLast:V})=>{let F=B.has(O.id),X=v.has(O.id),Y=T.has(O.id);return hs("div",{role:"treeitem","aria-expanded":G?F:void 0,"aria-selected":X,draggable:g&&!O.disabled,onDragStart:g?q=>Ne(q,O):void 0,onDragOver:g?q=>He(q,O.id):void 0,onDragLeave:g?Oe:void 0,onDrop:g?q=>xt(q,O):void 0,className:n("group/tree-node flex cursor-pointer items-center gap-0.5 rounded-md px-1.5 py-1 transition-colors",X&&"bg-accent text-accent-foreground",!X&&"hover:bg-muted/50",O.disabled&&"cursor-not-allowed opacity-50",W===O.id&&"bg-primary/10 ring-1 ring-primary/30"),onClick:q=>{q.stopPropagation(),U({node:O,depth:re,hasChildren:G,isLast:V})},children:[Ae("div",{className:"flex shrink-0 items-center",style:{width:re*20+(G?0:16)},children:b&&Array.from({length:re}).map((q,ct)=>Ae("span",{className:n("inline-block w-5 border-l border-border/60",ct===re-1&&!V&&"h-full"),style:{height:"100%"}},ct))}),G?Ae("button",{type:"button",tabIndex:-1,onClick:q=>{q.stopPropagation(),I(O.id)},className:"flex size-5 shrink-0 items-center justify-center rounded text-muted-foreground hover:text-foreground",children:Y?Ae("span",{className:"size-3 animate-spin rounded-full border-2 border-current border-t-transparent"}):F?Ae(Fb,{className:"size-3.5"}):Ae(zb,{className:"size-3.5"})}):Ae("span",{className:"w-5 shrink-0"}),f&&Ae("label",{className:"flex shrink-0 items-center",onClick:q=>{q.stopPropagation(),O.disabled||H(O.id)},children:Ae("input",{type:"checkbox",checked:X,disabled:O.disabled,onChange:()=>{},className:"size-3.5 shrink-0 rounded accent-primary"})}),O.avatar&&Ae("img",{src:O.avatar,alt:O.label,className:"ml-1 size-5 shrink-0 rounded-full object-cover"}),Ae("span",{className:"ml-1 min-w-0 truncate",children:N?N(O,F):hs("span",{className:"flex items-center gap-1.5",children:[Ae("span",{className:"truncate text-sm",children:O.label}),O.description&&Ae("span",{className:"truncate text-xs text-muted-foreground",children:O.description})]})})]},O.id)})})]})}function ji(e,t){for(let o of e){if(o.id===t)return o;if(o.children){let r=ji(o.children,t);if(r)return r}}}import"react";import{cva as Bb}from"class-variance-authority";import{jsx as ma,jsxs as Qi}from"react/jsx-runtime";var Bd=Bb("w-full",{variants:{size:{sm:"max-w-2xl",default:"max-w-5xl",lg:"max-w-7xl",full:"max-w-full",none:""},padding:{none:"p-0",sm:"p-4",default:"p-6",lg:"p-8"},center:{true:"mx-auto",false:""}},defaultVariants:{size:"default",padding:"default",center:!0}});function Hb({className:e,size:t,padding:o,center:r,children:a,...s}){return ma("div",{"data-slot":"page-container",className:n(Bd({size:t,padding:o,center:r,className:e})),...s,children:a})}function Ob({className:e,title:t,description:o,actions:r,breadcrumb:a,...s}){return Qi("div",{"data-slot":"page-header",className:n("space-y-2",e),...s,children:[a,Qi("div",{className:"flex items-start justify-between gap-4",children:[Qi("div",{className:"space-y-1",children:[ma("h1",{className:"text-2xl font-bold tracking-tight",children:t}),o&&ma("p",{className:"text-muted-foreground",children:o})]}),r&&ma("div",{className:"flex items-center gap-2",children:r})]})]})}function $b({className:e,children:t,...o}){return ma("div",{"data-slot":"page-content",className:n("space-y-6",e),...o,children:t})}import"react";import{jsx as Gt,jsxs as Ji}from"react/jsx-runtime";function Ub({className:e,...t}){return Gt("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:n("mx-auto flex w-full justify-center",e),...t})}function Gb({className:e,...t}){return Gt("ul",{"data-slot":"pagination-content",className:n("flex items-center gap-0.5",e),...t})}function _b({...e}){return Gt("li",{"data-slot":"pagination-item",...e})}function Xi({className:e,isActive:t,size:o="icon",...r}){return Gt(D,{variant:t?"outline":"ghost",size:o,className:n(e),nativeButton:!1,render:Gt("a",{"aria-current":t?"page":void 0,"data-slot":"pagination-link","data-active":t,...r})})}function Kb({className:e,text:t="Previous",...o}){return Ji(Xi,{"aria-label":"Go to previous page",size:"default",className:n("pl-1.5!",e),...o,children:[Gt(Ye,{"data-icon":"inline-start"}),Gt("span",{className:"hidden sm:block",children:t})]})}function Wb({className:e,text:t="Next",...o}){return Ji(Xi,{"aria-label":"Go to next page",size:"default",className:n("pr-1.5!",e),...o,children:[Gt("span",{className:"hidden sm:block",children:t}),Gt(te,{"data-icon":"inline-end"})]})}function qb({className:e,...t}){return Ji("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:n("flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4",e),...t,children:[Gt(ja,{}),Gt("span",{className:"sr-only",children:"More pages"})]})}import{Progress as fa}from"@base-ui/react/progress";import{jsx as gn,jsxs as Xb}from"react/jsx-runtime";function Yb({className:e,children:t,value:o,...r}){return Xb(fa.Root,{value:o,"data-slot":"progress",className:n("flex flex-wrap gap-3",e),...r,children:[t,gn(Hd,{children:gn(Od,{})})]})}function Hd({className:e,...t}){return gn(fa.Track,{className:n("bg-muted relative flex h-1 w-full items-center overflow-x-hidden rounded-full",e),"data-slot":"progress-track",...t})}function Od({className:e,...t}){return gn(fa.Indicator,{"data-slot":"progress-indicator",className:n("bg-primary h-full transition-all",e),...t})}function jb({className:e,...t}){return gn(fa.Label,{className:n("text-sm font-medium",e),"data-slot":"progress-label",...t})}function Qb({className:e,...t}){return gn(fa.Value,{className:n("text-muted-foreground ml-auto text-sm tabular-nums",e),"data-slot":"progress-value",...t})}import*as $d from"react";import{jsx as Zi,jsxs as Zb}from"react/jsx-runtime";function Jb(e,t=21){let o=[],r=0;for(let a=0;a<e.length;a++)r=(r<<5)-r+e.charCodeAt(a)|0;for(let a=0;a<t;a++){let s=[];for(let l=0;l<t;l++)if(a<7&&l<7||a<7&&l>=t-7||a>=t-7&&l<7){let c=a<7?a:a-(t-7),u=l<7?l:l-(t-7),f=c===0||c===6||u===0||u===6,m=c>=2&&c<=4&&u>=2&&u<=4;s.push(f||m)}else r=r*1103515245+12345&2147483647,s.push((r>>16)%100<45);o.push(s)}return o}function el({value:e,size:t=128,showText:o=!1,className:r,...a}){let l=$d.useMemo(()=>Jb(e,21),[e]),i=t/21;return Zb("div",{"data-slot":"qrcode-display",className:n("inline-flex flex-col items-center gap-1",r),...a,children:[Zi("div",{className:"relative bg-white",style:{width:t,height:t},role:"img","aria-label":`QR code: ${e}`,children:l.map((c,u)=>c.map((f,m)=>f?Zi("div",{className:"absolute bg-black",style:{left:m*i,top:u*i,width:i,height:i}},`${u}-${m}`):null))}),o&&Zi("span",{className:"text-muted-foreground font-mono text-xs",children:e})]})}import{Radio as Ud}from"@base-ui/react/radio";import{RadioGroup as ev}from"@base-ui/react/radio-group";import{jsx as ys}from"react/jsx-runtime";function tv({className:e,...t}){return ys(ev,{"data-slot":"radio-group",className:n("grid w-full gap-2",e),...t})}function ov({className:e,...t}){return ys(Ud.Root,{"data-slot":"radio-group-item",className:n("group/radio-group-item peer border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary relative flex aspect-square size-4 shrink-0 rounded-full border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3",e),...t,children:ys(Ud.Indicator,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:ys("span",{className:"bg-primary-foreground absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full"})})})}import*as ve from"react";import{jsx as Qo}from"react/jsx-runtime";var Gd=ve.createContext(null);function rv(){let e=ve.useContext(Gd);if(!e)throw new Error("Resizable components must be used within ResizablePanelGroup");return e}function tl({direction:e="horizontal",className:t,children:o,...r}){let[a,s]=ve.useState([]),l=ve.useCallback((i,c)=>{s(u=>u.some(f=>f.id===i)?u:[...u,{id:i,size:c}])},[]);return Qo(Gd.Provider,{value:{direction:e,panels:a,registerPanel:l},children:Qo("div",{"data-slot":"resizable-panel-group","data-direction":e,className:n("flex h-full w-full",e==="vertical"?"flex-col":"flex-row",t),...r,children:o})})}function nv({defaultSize:e=50,minSize:t=10,maxSize:o=90,collapsible:r=!1,collapsedSize:a=0,className:s,children:l,...i}){let c=rv(),[u,f]=ve.useState(e),[m,p]=ve.useState(!1),b=ve.useId();ve.useEffect(()=>{c.registerPanel(b,e)},[c,b,e]);let{onResize:g,onCollapse:h,onExpand:y}=i;ve.useEffect(()=>{g?.(m?a:u)},[u,m,a,g]);let N=ve.useCallback(()=>{p(!0),h?.()},[h]),w=ve.useCallback(()=>{p(!1),y?.()},[y]);return Qo(av,{value:{size:u,setSize:f,minSize:t,maxSize:o,collapsed:m,collapsedSize:a,collapsible:r,handleCollapse:N,handleExpand:w,direction:c.direction},children:Qo("div",{"data-slot":"resizable-panel","data-collapsed":m,style:{[c.direction==="horizontal"?"width":"height"]:`${m?a:u}%`},className:n("relative overflow-hidden",s),...i,children:l})})}var _d=ve.createContext(null);function av({value:e,children:t}){return Qo(_d.Provider,{value:e,children:t})}function sv(){let e=ve.useContext(_d);if(!e)throw new Error("Handle must be used within ResizablePanel");return e}function iv({withHandle:e=!1,className:t,...o}){let{size:r,setSize:a,minSize:s,maxSize:l,collapsed:i,collapsible:c,handleCollapse:u,handleExpand:f,direction:m}=sv(),p=ve.useRef(0),b=ve.useRef(r),g=ve.useRef(null),h=ve.useCallback(N=>{N.preventDefault(),p.current=m==="horizontal"?N.clientX:N.clientY,b.current=r;let w=v=>{let x=g.current?.parentElement?.parentElement;if(!x)return;let P=x.getBoundingClientRect(),S=m==="horizontal"?P.width:P.height,R=((m==="horizontal"?v.clientX:v.clientY)-p.current)/S,k=Math.min(Math.max(b.current+R*100,s),l);a(k)},C=()=>{document.removeEventListener("pointermove",w),document.removeEventListener("pointerup",C)};document.addEventListener("pointermove",w),document.addEventListener("pointerup",C)},[m,s,l,a,r]);return Qo("div",{ref:g,"data-slot":"resizable-handle","data-direction":m,onPointerDown:h,onDoubleClick:()=>{c&&(i?f():u())},className:n("bg-border hover:bg-primary/50 active:bg-primary relative flex shrink-0 items-center justify-center transition-colors",m==="horizontal"?"h-full w-px cursor-col-resize":"h-px w-full cursor-row-resize",t),...o,children:e&&Qo("div",{className:n("bg-background z-10 flex items-center justify-center rounded-sm border shadow-xs",m==="horizontal"?"h-6 w-2.5":"h-2.5 w-6"),children:Qo("div",{className:n("bg-muted-foreground/50 rounded-sm",m==="horizontal"?"h-3 w-0.5":"h-0.5 w-3")})})})}import"react";import{jsx as ol,jsxs as cv}from"react/jsx-runtime";function lv({prefix:e="",suffix:t="",zeroFill:o=0,value:r="",onChange:a,className:s,...l}){let i=c=>{let u=c.target.value;o>0&&/^\d+$/.test(u)&&(u=u.padStart(o,"0")),a?.(u)};return cv("div",{"data-slot":"sequence-input",className:n("border-input bg-background flex items-center rounded-md border","focus-within:ring-ring/50 focus-within:ring-2",s),children:[e&&ol("span",{className:"text-muted-foreground px-2 text-sm select-none",children:e}),ol(le,{type:"text",value:r,onChange:i,className:"border-0 shadow-none focus-visible:ring-0",...l}),t&&ol("span",{className:"text-muted-foreground px-2 text-sm select-none",children:t})]})}import"react";import{jsx as Kd}from"react/jsx-runtime";function dv({prefix:e="",date:t=new Date,dateFormat:o="YYYYMMDD",seq:r=1,zeroFill:a=4,separator:s="-",className:l,...i}){let c=[];if(e&&c.push(e),o!=="none"){let f=t.getFullYear(),m=String(t.getMonth()+1).padStart(2,"0"),p=String(t.getDate()).padStart(2,"0");c.push(o==="YYYYMMDD"?`${f}${m}${p}`:`${String(f).slice(2)}${m}${p}`)}c.push(String(r).padStart(a,"0"));let u=c.join(s);return Kd("div",{"data-slot":"sequence-preview",className:n("border-border bg-muted/30 inline-flex items-center gap-2 rounded-md border border-dashed px-3 py-1.5",l),...i,children:Kd("span",{className:"font-mono text-sm font-medium tracking-wider",children:u})})}import{Separator as uv}from"@base-ui/react/separator";import{jsx as pv}from"react/jsx-runtime";function rl({className:e,orientation:t="horizontal",...o}){return pv(uv,{"data-slot":"separator",orientation:t,className:n("bg-border shrink-0 data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...o})}import"react";import{Dialog as Io}from"@base-ui/react/dialog";import{jsx as yt,jsxs as nl}from"react/jsx-runtime";function al({...e}){return yt(Io.Root,{"data-slot":"sheet",...e})}function mv({...e}){return yt(Io.Trigger,{"data-slot":"sheet-trigger",...e})}function fv({...e}){return yt(Io.Close,{"data-slot":"sheet-close",...e})}function gv({...e}){return yt(Io.Portal,{"data-slot":"sheet-portal",...e})}function bv({className:e,...t}){return yt(Io.Backdrop,{"data-slot":"sheet-overlay",className:n("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...t})}function sl({className:e,children:t,side:o="right",showCloseButton:r=!0,...a}){return nl(gv,{children:[yt(bv,{}),nl(Io.Popup,{"data-slot":"sheet-content","data-side":o,className:n("bg-popover text-popover-foreground fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...a,children:[t,r&&nl(Io.Close,{"data-slot":"sheet-close",render:yt(D,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[yt(oe,{}),yt("span",{className:"sr-only",children:"Close"})]})]})]})}function il({className:e,...t}){return yt("div",{"data-slot":"sheet-header",className:n("flex flex-col gap-0.5 p-4",e),...t})}function vv({className:e,...t}){return yt("div",{"data-slot":"sheet-footer",className:n("mt-auto flex flex-col gap-2 p-4",e),...t})}function ll({className:e,...t}){return yt(Io.Title,{"data-slot":"sheet-title",className:n("font-heading text-foreground text-base font-medium",e),...t})}function cl({className:e,...t}){return yt(Io.Description,{"data-slot":"sheet-description",className:n("text-muted-foreground text-sm",e),...t})}import*as Ve from"react";import{mergeProps as ga}from"@base-ui/react/merge-props";import{useRender as ba}from"@base-ui/react/use-render";import{cva as Yd}from"class-variance-authority";import*as Ns from"react";var dl=768;function Wd(){let[e,t]=Ns.useState(()=>typeof window>"u"?!1:window.innerWidth<dl);return Ns.useEffect(()=>{let o=window.matchMedia(`(max-width: ${dl}px)`),r=()=>{t(window.innerWidth<dl)};return o.addEventListener("change",r),()=>o.removeEventListener("change",r)},[]),e}import{jsx as xv}from"react/jsx-runtime";function ft({className:e,...t}){return xv("div",{"data-slot":"skeleton",className:n("bg-muted animate-pulse rounded-md",e),...t})}import{Tooltip as Rr}from"@base-ui/react/tooltip";import{jsx as bn,jsxs as yv}from"react/jsx-runtime";function hv({delay:e=0,...t}){return bn(Rr.Provider,{"data-slot":"tooltip-provider",delay:e,...t})}function ul({...e}){return bn(Rr.Root,{"data-slot":"tooltip",...e})}function pl({...e}){return bn(Rr.Trigger,{"data-slot":"tooltip-trigger",...e})}function ml({className:e,side:t="top",sideOffset:o=4,align:r="center",alignOffset:a=0,children:s,...l}){return bn(Rr.Portal,{children:bn(Rr.Positioner,{align:r,alignOffset:a,side:t,sideOffset:o,className:"isolate z-50",children:yv(Rr.Popup,{"data-slot":"tooltip-content",className:n("bg-foreground text-background data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md px-3 py-1.5 text-xs has-data-[slot=kbd]:pr-1.5 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm",e),...l,children:[s,bn(Rr.Arrow,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}import{Fragment as jv,jsx as J,jsxs as _t}from"react/jsx-runtime";var Nv="sidebar_state",wv=3600*24*7,Cv="16rem",Pv="18rem",Rv="3rem",kv="b",jd=Ve.createContext(null);function vn(){let e=Ve.useContext(jd);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function Sv({defaultOpen:e=!0,open:t,onOpenChange:o,className:r,style:a,children:s,...l}){let i=Wd(),[c,u]=Ve.useState(!1),[f,m]=Ve.useState(e),p=t??f,b=Ve.useCallback(N=>{let w=typeof N=="function"?N(p):N;o?o(w):m(w),typeof document<"u"&&(document.cookie=`${Nv}=${w}; path=/; max-age=${wv}`)},[o,p]),g=Ve.useCallback(()=>i?u(N=>!N):b(N=>!N),[i,b,u]);Ve.useEffect(()=>{let N=w=>{w.key===kv&&(w.metaKey||w.ctrlKey)&&(w.preventDefault(),g())};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[g]);let h=p?"expanded":"collapsed",y=Ve.useMemo(()=>({state:h,open:p,setOpen:b,isMobile:i,openMobile:c,setOpenMobile:u,toggleSidebar:g}),[h,p,b,i,c,u,g]);return J(jd.Provider,{value:y,children:J("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Cv,"--sidebar-width-icon":Rv,...a},className:n("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar relative flex h-dvh w-full overflow-hidden",r),...l,children:s})})}var qd={"--sidebar-background":"oklch(0.2 0.01 260)","--sidebar-foreground":"oklch(0.9 0.005 260)","--sidebar-primary":"oklch(0.6 0.15 260)","--sidebar-primary-foreground":"oklch(1 0 0)","--sidebar-accent":"oklch(0.3 0.01 260)","--sidebar-accent-foreground":"oklch(0.9 0.005 260)","--sidebar-border":"oklch(0.3 0.01 260)","--sidebar-ring":"oklch(0.6 0.15 260)"};function Iv({side:e="left",variant:t="sidebar",collapsible:o="offcanvas",className:r,children:a,dir:s,style:l,theme:i,...c}){let{isMobile:u,state:f,openMobile:m,setOpenMobile:p}=vn(),b=i==="dark"?{...qd,...l}:l;return o==="none"?J("div",{"data-slot":"sidebar",className:n("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),style:b,...c,children:a}):u?J(al,{open:m,onOpenChange:p,...c,children:_t(sl,{dir:s,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{...i==="dark"?qd:{},"--sidebar-width":Pv,...l},side:e,children:[_t(il,{className:"sr-only",children:[J(ll,{children:"Sidebar"}),J(cl,{children:"Displays the mobile sidebar."})]}),J("div",{className:"flex h-full w-full flex-col",children:a})]})}):_t("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":f,"data-collapsible":f==="collapsed"?o:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[J("div",{"data-slot":"sidebar-gap",className:n("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),J("div",{"data-slot":"sidebar-container","data-side":e,className:n("absolute inset-y-0 z-10 hidden h-full w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...c,children:J("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:ring-sidebar-border flex size-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1",style:b,children:a})})]})}function Tv({className:e,onClick:t,...o}){let{toggleSidebar:r}=vn();return _t(D,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:n(e),onClick:a=>{t?.(a),r()},...o,children:[J(Pc,{}),J("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Mv({className:e,...t}){let{toggleSidebar:o}=vn();return J("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:n("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function Dv({className:e,...t}){return J("main",{"data-slot":"sidebar-inset",className:n("bg-background relative flex w-full flex-1 flex-col overflow-auto md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function zv({className:e,...t}){return J(le,{"data-slot":"sidebar-input","data-sidebar":"input",className:n("bg-background h-8 w-full shadow-none",e),...t})}function Lv({className:e,...t}){return J("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:n("flex flex-col gap-2 p-2",e),...t})}function Ev({className:e,...t}){return J("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:n("flex flex-col gap-2 p-2",e),...t})}function Fv({className:e,...t}){return J(rl,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:n("bg-sidebar-border mx-2 w-auto",e),...t})}function Av({className:e,...t}){return J("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:n("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function Vv({className:e,...t}){return J("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:n("relative flex w-full min-w-0 flex-col p-2",e),...t})}function Bv({className:e,render:t,...o}){return ba({defaultTagName:"div",props:ga({className:n("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",e)},o),render:t,state:{slot:"sidebar-group-label",sidebar:"group-label"}})}function Hv({className:e,render:t,...o}){return ba({defaultTagName:"button",props:ga({className:n("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",e)},o),render:t,state:{slot:"sidebar-group-action",sidebar:"group-action"}})}function Ov({className:e,...t}){return J("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:n("w-full text-sm",e),...t})}function $v({className:e,...t}){return J("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:n("flex w-full min-w-0 flex-col gap-0",e),...t})}function Uv({className:e,...t}){return J("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:n("group/menu-item relative",e),...t})}var Gv=Yd("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Qd({render:e,isActive:t=!1,variant:o="default",size:r="default",tooltip:a,className:s,...l}){let{isMobile:i,state:c}=vn(),u=ba({defaultTagName:"button",props:ga({className:n(Gv({variant:o,size:r}),s)},l),render:a?J(pl,{render:e}):e,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:r,active:t}});return a?(typeof a=="string"&&(a={children:a}),_t(ul,{children:[u,J(ml,{side:"right",align:"center",hidden:c!=="collapsed"||i,...a})]})):u}function _v({className:e,render:t,showOnHover:o=!1,...r}){return ba({defaultTagName:"button",props:ga({className:n("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",o&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0",e)},r),render:t,state:{slot:"sidebar-menu-action",sidebar:"menu-action"}})}function Kv({className:e,...t}){return J("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:n("text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-accent-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none group-data-[collapsible=icon]:hidden peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1",e),...t})}function Wv({className:e,showIcon:t=!1,...o}){let[r]=Ve.useState(()=>`${Math.floor(Math.random()*40)+50}%`);return _t("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:n("flex h-8 items-center gap-2 rounded-md px-2",e),...o,children:[t&&J(ft,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),J(ft,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})}function qv({className:e,children:t,icon:o,label:r,collapsible:a=!1,trigger:s,open:l,defaultOpen:i,onOpenChange:c,...u}){let{state:f}=vn();return f==="collapsed"?_t(oa,{children:[J(ra,{render:_t(Jd,{size:"md",isActive:!1,children:[o??J("span",{className:"size-4"}),r&&J("span",{children:r})]})}),J(nn,{side:"right",align:"start",className:"min-w-48",children:Ve.Children.map(t,m=>Ve.isValidElement(m)&&m.type===Xd?J(na,{className:"cursor-pointer",children:m}):m)})]}):a?_t(Ni,{open:l,defaultOpen:i,onOpenChange:c,className:"group/menu-sub-collapsible",children:[_t(wi,{render:J(Qd,{className:"w-full justify-between"}),children:[s??_t(jv,{children:[o??J("span",{className:"size-4"}),r&&J("span",{children:r})]}),J(te,{className:"ml-auto size-4 transition-transform duration-200 group-data-[panel-open]/menu-sub-collapsible:rotate-90"})]}),J(Ci,{keepMounted:!1,children:J("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:n("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",e),...u,children:t})})]}):J("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:n("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",e),...u,children:t})}function Xd({className:e,...t}){return J("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:n("group/menu-sub-item relative",e),...t})}var Yv=Yd("flex min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",{variants:{size:{sm:"h-6 text-xs gap-1 px-1.5",md:"h-8 text-sm",lg:"h-10 text-sm"}},defaultVariants:{size:"md"}});function Jd({render:e,size:t="md",isActive:o=!1,className:r,...a}){return ba({defaultTagName:"a",props:ga({className:n(Yv({size:t}),r)},a),render:e,state:{slot:"sidebar-menu-sub-button",sidebar:"menu-sub-button",size:t,active:o}})}import{Slider as va}from"@base-ui/react/slider";import{jsx as xa}from"react/jsx-runtime";function Qv({className:e,...t}){return xa(va.Root,{"data-slot":"slider",className:n("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50",e),...t})}function Xv({className:e,...t}){return xa(va.Control,{"data-slot":"slider-control",className:n("relative flex w-full items-center select-none",e),...t})}function Jv({className:e,...t}){return xa(va.Track,{"data-slot":"slider-track",className:n("bg-muted relative h-1.5 w-full grow overflow-hidden rounded-full",e),...t})}function Zv({className:e,...t}){return xa(va.Indicator,{"data-slot":"slider-indicator",className:n("bg-primary absolute h-full",e),...t})}function ex({className:e,...t}){return xa(va.Thumb,{"data-slot":"slider-thumb",className:n("border-primary bg-background focus-visible:ring-ring/50 block size-4 rounded-full border-2 shadow-sm transition-colors focus-visible:ring-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",e),...t})}import*as kr from"react";import{jsx as fl,jsxs as ox}from"react/jsx-runtime";function tx({className:e,direction:t="horizontal",defaultSize:o=50,minSize:r=20,maxSize:a=80,onResize:s,first:l,second:i,resizer:c=!0,...u}){let f=kr.useRef(null),[m,p]=kr.useState(o),[b,g]=kr.useState(!1),h=kr.useCallback(y=>{y.preventDefault(),g(!0);let N=f.current;if(!N)return;let w=t==="horizontal"?y.clientX:y.clientY,C=m,v=t==="horizontal"?N.offsetWidth:N.offsetHeight,x=S=>{let k=(t==="horizontal"?S.clientX:S.clientY)-w,T=C+k/v*100,z=Math.min(Math.max(T,r),a);p(z),s?.(z)},P=()=>{g(!1),document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",P)};document.addEventListener("mousemove",x),document.addEventListener("mouseup",P)},[t,m,r,a,s]);return ox("div",{ref:f,"data-slot":"split-pane","data-direction":t,className:n("flex",t==="horizontal"?"flex-row":"flex-col",b&&"select-none",e),...u,children:[fl("div",{"data-slot":"split-pane-first",style:{[t==="horizontal"?"width":"height"]:`${m}%`},className:"overflow-auto",children:l}),c&&fl("div",{"data-slot":"split-pane-resizer",className:n("bg-border hover:bg-ring/50 shrink-0 transition-colors",t==="horizontal"?"w-1 cursor-col-resize":"h-1 cursor-row-resize",b&&"bg-ring"),onMouseDown:h}),fl("div",{"data-slot":"split-pane-second",style:{[t==="horizontal"?"width":"height"]:`${100-m}%`},className:"overflow-auto",children:i})]})}import*as xn from"react";import{Fragment as Zd,jsx as lo,jsxs as ws}from"react/jsx-runtime";function rx({className:e,activeStep:t=0,orientation:o="horizontal",children:r}){let a=xn.Children.toArray(r).filter(xn.isValidElement);return lo("div",{"data-slot":"stepper",className:n(o==="horizontal"?"flex w-full items-center justify-center":"flex flex-col",e),children:a.map((s,l)=>{let i=l===a.length-1;return xn.cloneElement(s,{index:l,active:l===t,completed:l<t,last:i,orientation:o})})})}function nx({className:e,index:t=0,active:o,completed:r,last:a,orientation:s,children:l}){return lo("div",{className:n("flex items-center",s==="horizontal"?a?"shrink-0":"min-w-0 flex-1":"flex-col items-start",e),children:s==="horizontal"?ws(Zd,{children:[ws("div",{className:"flex shrink-0 flex-col items-center gap-1",children:[lo("div",{className:n("flex size-8 shrink-0 items-center justify-center rounded-full border-2 text-sm font-medium transition-colors",r&&"border-primary bg-primary text-primary-foreground",o&&"border-primary bg-primary/10 text-primary animate-pulse",!r&&!o&&"border-muted-foreground/30 text-muted-foreground"),children:r?lo(ie,{className:"size-4"}):t+1}),l&&lo("span",{className:n("text-xs font-medium whitespace-nowrap",o?"text-primary":"text-muted-foreground"),children:l})]}),!a&&lo("div",{className:n("mx-2 mt-4 h-0.5 min-w-4 flex-1 self-start",r?"bg-primary":"bg-muted-foreground/30")})]}):ws(Zd,{children:[ws("div",{className:"flex items-center gap-2",children:[lo("div",{className:n("flex size-8 shrink-0 items-center justify-center rounded-full border-2 text-sm font-medium transition-colors",r&&"border-primary bg-primary text-primary-foreground",o&&"border-primary bg-primary/10 text-primary animate-pulse",!r&&!o&&"border-muted-foreground/30 text-muted-foreground"),children:r?lo(ie,{className:"size-4"}):t+1}),l&&lo("span",{className:n("text-xs font-medium whitespace-nowrap",o?"text-primary":"text-muted-foreground"),children:l})]}),!a&&lo("div",{className:n("ml-3.5 h-8 w-0.5",r?"bg-primary":"bg-muted-foreground/30")})]})})}import"react";import{jsx as To}from"react/jsx-runtime";function ax({className:e,...t}){return To("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:To("table",{"data-slot":"table",className:n("w-full caption-bottom text-sm",e),...t})})}function sx({className:e,...t}){return To("thead",{"data-slot":"table-header",className:n("[&_tr]:border-b",e),...t})}function ix({className:e,...t}){return To("tbody",{"data-slot":"table-body",className:n("[&_tr:last-child]:border-0",e),...t})}function lx({className:e,...t}){return To("tfoot",{"data-slot":"table-footer",className:n("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t})}function cx({className:e,...t}){return To("tr",{"data-slot":"table-row",className:n("hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function dx({className:e,...t}){return To("th",{"data-slot":"table-head",className:n("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0",e),...t})}function ux({className:e,...t}){return To("td",{"data-slot":"table-cell",className:n("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",e),...t})}function px({className:e,...t}){return To("caption",{"data-slot":"table-caption",className:n("text-muted-foreground mt-4 text-sm",e),...t})}import{Tabs as Cs}from"@base-ui/react/tabs";import{cva as mx}from"class-variance-authority";import{jsx as Ps}from"react/jsx-runtime";function fx({className:e,orientation:t="horizontal",...o}){return Ps(Cs.Root,{"data-slot":"tabs","data-orientation":t,className:n("group/tabs flex gap-2 data-horizontal:flex-col",e),...o})}var eu=mx("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function gx({className:e,variant:t="default",...o}){return Ps(Cs.List,{"data-slot":"tabs-list","data-variant":t,className:n(eu({variant:t}),e),...o})}function bx({className:e,...t}){return Ps(Cs.Tab,{"data-slot":"tabs-trigger",className:n("text-foreground/60 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}function vx({className:e,...t}){return Ps(Cs.Panel,{"data-slot":"tabs-content",className:n("flex-1 text-sm outline-none",e),...t})}import*as Rs from"react";import{jsx as gl,jsxs as tu}from"react/jsx-runtime";function xx({value:e=[],onChange:t,placeholder:o="Add tag...",max:r,disabled:a,className:s}){let[l,i]=Rs.useState(""),c=Rs.useRef(null),u=p=>{let b=p.trim();b&&(r&&e.length>=r||e.includes(b)||(t?.([...e,b]),i("")))},f=p=>{t?.(e.filter((b,g)=>g!==p))},m=p=>{(p.key==="Enter"||p.key===",")&&(p.preventDefault(),u(l)),p.key==="Backspace"&&!l&&e.length>0&&f(e.length-1)};return tu("div",{"data-slot":"tags-input",className:n("flex min-h-8 flex-wrap items-center gap-1.5 rounded-md border bg-transparent px-2 py-1 text-sm",a&&"cursor-not-allowed opacity-50",s),onClick:()=>c.current?.focus(),children:[e.map((p,b)=>tu(Bt,{variant:"secondary",className:"gap-1",children:[p,!a&&gl("button",{type:"button",onClick:g=>{g.stopPropagation(),f(b)},className:"hover:bg-muted-foreground/20 ml-0.5 rounded-full",children:gl(oe,{className:"size-3"})})]},b)),gl("input",{ref:c,value:l,onChange:p=>i(p.target.value),onKeyDown:m,placeholder:e.length===0?o:"",disabled:a||!!(r&&e.length>=r),className:"placeholder:text-muted-foreground min-w-[80px] flex-1 bg-transparent outline-none disabled:cursor-not-allowed"})]})}import"react";import{cva as hx}from"class-variance-authority";import{jsx as Nt,jsxs as bl}from"react/jsx-runtime";function yx({className:e,...t}){return Nt("div",{"data-slot":"timeline",className:n("flex flex-col",e),...t})}var ou=hx("flex size-8 shrink-0 items-center justify-center rounded-full border-2 bg-background",{variants:{variant:{default:"border-muted-foreground",success:"border-success text-success",warning:"border-warning text-warning",destructive:"border-destructive text-destructive",info:"border-info text-info"}},defaultVariants:{variant:"default"}});function Nx({className:e,icon:t,title:o,description:r,time:a,status:s,variant:l,children:i,...c}){let u=l??(s==="completed"?"success":s==="current"?"info":"default");return bl("div",{className:n("relative flex gap-4",e),...c,children:[bl("div",{className:"flex flex-col items-center self-stretch",children:[Nt(ru,{variant:u,children:t?Nt(t,{className:"size-4"}):null}),Nt(nu,{})]}),bl(au,{className:"pb-8 last:pb-0",children:[o!==void 0?Nt(su,{children:o}):null,r!==void 0?Nt(iu,{children:r}):null,a!==void 0?Nt(lu,{children:a}):null,i]})]})}function ru({className:e,variant:t,children:o,...r}){return Nt("div",{className:n(ou({variant:t}),e),...r,children:o})}function nu({className:e,...t}){return Nt("div",{className:n("bg-border mx-auto w-px flex-1",e),...t})}function au({className:e,...t}){return Nt("div",{className:n("flex-1 pt-1",e),...t})}function su({className:e,...t}){return Nt("h3",{className:n("text-sm leading-none font-semibold",e),...t})}function iu({className:e,...t}){return Nt("p",{className:n("text-muted-foreground mt-1 text-sm",e),...t})}function lu({className:e,...t}){return Nt("time",{className:n("text-muted-foreground mt-1 text-xs",e),...t})}import{Toggle as wx}from"@base-ui/react/toggle";import{cva as Cx}from"class-variance-authority";import{jsx as Rx}from"react/jsx-runtime";var ks=Cx("group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-muted"},size:{default:"h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",sm:"h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"}},defaultVariants:{variant:"default",size:"default"}});function Px({className:e,variant:t="default",size:o="default",...r}){return Rx(wx,{"data-slot":"toggle",className:n(ks({variant:t,size:o,className:e})),...r})}import*as Ss from"react";import{Toggle as kx}from"@base-ui/react/toggle";import{ToggleGroup as Sx}from"@base-ui/react/toggle-group";import"class-variance-authority";import{jsx as vl}from"react/jsx-runtime";var cu=Ss.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});function xl({className:e,variant:t,size:o,spacing:r=2,orientation:a="horizontal",children:s,...l}){return vl(Sx,{"data-slot":"toggle-group","data-variant":t,"data-size":o,"data-spacing":r,"data-orientation":a,style:{"--gap":r},className:n("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-vertical:flex-col data-vertical:items-stretch data-[size=sm]:rounded-[min(var(--radius-md),10px)]",e),...l,children:vl(cu.Provider,{value:{variant:t,size:o,spacing:r,orientation:a},children:s})})}function hl({className:e,children:t,variant:o="default",size:r="default",...a}){let s=Ss.useContext(cu);return vl(kx,{"data-slot":"toggle-group-item","data-variant":s.variant||o,"data-size":s.size||r,"data-spacing":s.spacing,className:n("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",ks({variant:s.variant||o,size:s.size||r}),e),...a,children:t})}import*as Mo from"react";import{jsx as me,jsxs as gt}from"react/jsx-runtime";function du({node:e,level:t=0,selectedIds:o,expandedIds:r,onToggleExpand:a,onSelect:s,multiple:l}){let i=e.children&&e.children.length>0,c=r.has(e.id),u=o.has(e.id),f=e.disabled;return gt("div",{children:[gt("div",{className:n("hover:bg-muted flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 transition-colors",u&&"bg-muted",f&&"cursor-not-allowed opacity-50"),style:{paddingLeft:`${t*16+8}px`},onClick:()=>!f&&s(e),children:[i?me(D,{variant:"ghost",size:"icon-xs",onClick:m=>{m.stopPropagation(),a(e.id)},disabled:f,className:"shrink-0",children:me(te,{className:n("size-3 transition-transform",c&&"rotate-90")})}):me("div",{className:"size-4"}),l&&me(ht,{checked:u,disabled:f}),me("span",{className:"text-muted-foreground shrink-0",children:e.icon||(i?me(Gn,{className:"size-4"}):me(no,{className:"size-4"}))}),me("span",{className:"flex-1 truncate text-sm",children:e.label})]}),i&&c&&me("div",{children:e.children.map(m=>me(du,{node:m,level:t+1,selectedIds:o,expandedIds:r,onToggleExpand:a,onSelect:s,...l!==void 0?{multiple:l}:{}},m.id))})]})}function uu(e,t){for(let o of e){if(o.id===t)return o;if(o.children){let r=uu(o.children,t);if(r)return r}}}function Ix({value:e,defaultValue:t,placeholder:o="Select...",disabled:r,multiple:a=!1,maxCount:s,data:l,onChange:i,className:c}){let[u,f]=Mo.useState(!1),[m,p]=Mo.useState(""),[b,g]=Mo.useState([]),[h,y]=Mo.useState(Array.isArray(t)?t:t?[t]:[]),N=Mo.useMemo(()=>e!==void 0?Array.isArray(e)?e:[e]:h,[e,h]),w=Mo.useMemo(()=>new Set(N),[N]),C=Mo.useMemo(()=>{if(!m)return l;let k=m.toLowerCase(),T=z=>z.reduce((W,$)=>{let E=$.label.toLowerCase().includes(k),A=$.children?T($.children):[];return(E||A.length>0)&&W.push({...$,children:A.length>0?A:$.children??[]}),W},[]);return T(l)},[l,m]),v=k=>{g(T=>T.includes(k)?T.filter(z=>z!==k):[...T,k])},x=k=>{let T;a?T=N.includes(k.id)?N.filter(W=>W!==k.id):[...N,k.id]:(T=[k.id],f(!1)),y(T),i?.(a?T:T[0])},P=k=>{let T=N.filter(z=>z!==k);y(T),i?.(a?T:T[0])},S=k=>{k.stopPropagation(),y([]),i?.(a?[]:void 0)},R=k=>uu(l,k)?.label||k;return me("div",{"data-slot":"tree-select",className:n("w-full",c),children:gt(ot,{open:u,onOpenChange:f,children:[gt(St,{render:me("div",{className:n("border-input flex min-h-8 w-full items-center gap-1 rounded-lg border bg-transparent px-2.5 py-1 text-sm transition-colors","focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-3","disabled:cursor-not-allowed disabled:opacity-50","dark:bg-input/30",r&&"cursor-not-allowed opacity-50")}),disabled:r,children:[N.length>0?me("div",{className:"flex flex-1 flex-wrap gap-1",children:N.map(k=>gt(Bt,{variant:"secondary",className:"gap-1",children:[me("span",{children:R(k)}),!r&&gt("button",{onClick:T=>{T.stopPropagation(),P(k)},className:"hover:bg-muted ml-0.5 rounded-full",children:[me(oe,{className:"size-3"}),me("span",{className:"sr-only",children:"Remove"})]})]},k))}):me("span",{className:"text-muted-foreground flex-1",children:o}),N.length>0&&!r&&gt(D,{variant:"ghost",size:"icon-xs",onClick:S,className:"shrink-0",children:[me(oe,{className:"size-3"}),me("span",{className:"sr-only",children:"Clear all"})]})]}),gt(rt,{className:"sm:max-w-md",children:[me(nt,{children:me(at,{children:"Select"})}),gt("div",{className:"relative",children:[me(je,{className:"text-muted-foreground absolute top-1/2 left-2.5 size-4 -translate-y-1/2"}),me(le,{value:m,onChange:k=>p(k.target.value),placeholder:"Search...",className:"pl-8"})]}),me(Pr,{className:"h-[300px]",children:gt("div",{className:"space-y-0.5",children:[C.map(k=>me(du,{node:k,selectedIds:w,expandedIds:new Set(b),onToggleExpand:v,onSelect:x,multiple:a},k.id)),C.length===0&&gt("div",{className:"text-muted-foreground flex flex-col items-center justify-center py-8",children:[me(Gn,{className:"mb-2 size-8"}),me("p",{className:"text-sm",children:"No items found"})]})]})}),a&&gt("div",{className:"text-muted-foreground flex items-center justify-between text-sm",children:[gt("span",{children:[N.length," item(s) selected"]}),s&&gt("span",{children:["Max: ",s]})]})]})]})})}import*as Sr from"react";import{jsx as Mt,jsxs as pu}from"react/jsx-runtime";function mu(e,t){return{id:String(e[t.key]??""),label:String(e[t.label]??""),...Array.isArray(e[t.children])?{children:e[t.children].map(o=>mu(o,t))}:{},disabled:!!e[t.disabled],icon:e[t.icon]}}function Tx(e,t){let o={key:t?.key??"id",label:t?.label??"label",children:t?.children??"children",disabled:t?.disabled??"disabled",icon:t?.icon??"icon"};return e.map(r=>mu(r,o))}function fu({node:e,level:t=0,selectedIds:o,expandedIds:r,onToggleExpand:a,onSelect:s,showCheckbox:l=!1,showIcon:i=!0,disabled:c=!1}){let u=e.children&&e.children.length>0,f=r.has(e.id),m=o.has(e.id),p=!!(c||e.disabled);return pu("div",{children:[pu("div",{className:n("hover:bg-muted flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 transition-colors",m&&"bg-muted",p&&"cursor-not-allowed opacity-50"),style:{paddingLeft:`${t*16+8}px`},onClick:()=>!p&&s(e.id),children:[u?Mt(D,{variant:"ghost",size:"icon-xs",onClick:b=>{b.stopPropagation(),a(e.id)},disabled:p,className:"shrink-0",children:Mt(te,{className:n("size-3 transition-transform",f&&"rotate-90")})}):Mt("div",{className:"size-4"}),l&&Mt(ht,{checked:m,disabled:p}),i&&Mt("span",{className:"text-muted-foreground shrink-0",children:e.icon||(u?Mt(Gn,{className:"size-4"}):Mt(no,{className:"size-4"}))}),Mt("span",{className:"flex-1 truncate text-sm",children:e.label})]}),u&&f&&Mt("div",{children:e.children.map(b=>Mt(fu,{node:b,level:t+1,selectedIds:o,expandedIds:r,onToggleExpand:a,onSelect:s,showCheckbox:l,showIcon:i,disabled:p},b.id))})]})}function Mx({data:e,selectedIds:t,defaultSelectedIds:o=[],expandedIds:r,defaultExpandedIds:a=[],onSelect:s,onExpand:l,showCheckbox:i=!1,showIcon:c=!0,disabled:u=!1,className:f,fieldNames:m}){let p=Sr.useMemo(()=>m?Tx(e,m):e,[e,m]),[b,g]=Sr.useState(o),[h,y]=Sr.useState(a),N=t??b,w=r??h,C=Sr.useMemo(()=>new Set(N),[N]),v=Sr.useMemo(()=>new Set(w),[w]),x=S=>{let R=v.has(S)?w.filter(k=>k!==S):[...w,S];y(R),l?.(R)},P=S=>{let R=C.has(S)?N.filter(k=>k!==S):[...N,S];g(R),s?.(R)};return Mt("div",{"data-slot":"tree-view",className:n("space-y-0.5",f),children:p.map(S=>Mt(fu,{node:S,selectedIds:C,expandedIds:v,onToggleExpand:x,onSelect:P,showCheckbox:i,showIcon:c,disabled:u},S.id))})}import*as hn from"react";import{jsx as fe,jsxs as et}from"react/jsx-runtime";var Dx=[{id:"1",name:"John Doe",email:"john@example.com",department:"Engineering"},{id:"2",name:"Jane Smith",email:"jane@example.com",department:"Design"},{id:"3",name:"Bob Johnson",email:"bob@example.com",department:"Marketing"},{id:"4",name:"Alice Williams",email:"alice@example.com",department:"Engineering"},{id:"5",name:"Charlie Brown",email:"charlie@example.com",department:"Sales"}];function zx({value:e,defaultValue:t,placeholder:o="Select user...",disabled:r,multiple:a=!1,maxCount:s,users:l=Dx,onChange:i,className:c}){let[u,f]=hn.useState(!1),[m,p]=hn.useState(""),[b,g]=hn.useState(Array.isArray(t)?t:t?[t]:[]),h=e?Array.isArray(e)?e:[e]:b,y=hn.useMemo(()=>{if(!m)return l;let v=m.toLowerCase();return l.filter(x=>x.name.toLowerCase().includes(v)||x.email?.toLowerCase().includes(v)||x.department?.toLowerCase().includes(v))},[l,m]),N=v=>{let x;if(a){let P=h.some(S=>S.id===v.id);if(!P&&s&&h.length>=s)return;x=P?h.filter(S=>S.id!==v.id):[...h,v]}else x=[v],f(!1);g(x),i?.(a?x:x[0])},w=v=>{let x=h.filter(P=>P.id!==v);g(x),i?.(a?x:x[0])},C=v=>{v.stopPropagation(),g([]),i?.(a?[]:void 0)};return fe("div",{"data-slot":"user-browse",className:n("w-full",c),children:et("div",{className:n("border-input flex min-h-8 w-full items-center gap-1 rounded-lg border bg-transparent px-2.5 py-1 text-sm transition-colors","focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-3","disabled:cursor-not-allowed disabled:opacity-50","dark:bg-input/30",r&&"cursor-not-allowed opacity-50"),children:[et(ot,{open:u,onOpenChange:f,children:[fe(St,{render:fe("button",{type:"button",className:"flex flex-1 items-center gap-1 text-left"}),disabled:r,children:h.length>0?fe("div",{className:"flex flex-1 flex-wrap gap-1",children:h.map(v=>et(Bt,{variant:"secondary",className:"gap-1",children:[et(ls,{className:"size-4",children:[fe(cs,{src:v.avatar}),fe(ds,{className:"text-[0.5rem]",children:v.name.charAt(0)})]}),fe("span",{children:v.name}),!r&&et("button",{onClick:x=>{x.stopPropagation(),w(v.id)},className:"hover:bg-muted ml-0.5 rounded-full",children:[fe(oe,{className:"size-3"}),fe("span",{className:"sr-only",children:"Remove"})]})]},v.id))}):fe("span",{className:"text-muted-foreground flex-1",children:o})}),et(rt,{className:"sm:max-w-md",children:[fe(nt,{children:fe(at,{children:"Select User"})}),et("div",{className:"relative",children:[fe(je,{className:"text-muted-foreground absolute top-1/2 left-2.5 size-4 -translate-y-1/2"}),fe(le,{value:m,onChange:v=>p(v.target.value),placeholder:"Search users...",className:"pl-8"})]}),fe(Pr,{className:"h-[300px]",children:et("div",{className:"space-y-1",children:[y.map(v=>{let x=h.some(P=>P.id===v.id);return et("div",{className:n("hover:bg-muted flex cursor-pointer items-center gap-3 rounded-md p-2",x&&"bg-muted"),onClick:()=>N(v),children:[a&&fe(ht,{checked:x}),et(ls,{className:"size-8",children:[fe(cs,{src:v.avatar}),fe(ds,{children:fe(ii,{className:"size-4"})})]}),et("div",{className:"min-w-0 flex-1",children:[fe("p",{className:"truncate text-sm font-medium",children:v.name}),v.email&&fe("p",{className:"text-muted-foreground truncate text-xs",children:v.email})]}),v.department&&fe(Bt,{variant:"outline",className:"shrink-0",children:v.department})]},v.id)}),y.length===0&&et("div",{className:"text-muted-foreground flex flex-col items-center justify-center py-8",children:[fe(ii,{className:"mb-2 size-8"}),fe("p",{className:"text-sm",children:"No users found"})]})]})}),a&&et("div",{className:"text-muted-foreground flex items-center justify-between text-sm",children:[et("span",{children:[h.length," user(s) selected"]}),s&&et("span",{children:["Max: ",s]})]})]})]}),h.length>0&&!r&&et(D,{variant:"ghost",size:"icon-xs",onClick:C,className:"shrink-0",children:[fe(oe,{className:"size-3"}),fe("span",{className:"sr-only",children:"Clear all"})]})]})})}import*as Ts from"react";import{useVirtualizer as Lx}from"@tanstack/react-virtual";import{jsx as Is,jsxs as Fx}from"react/jsx-runtime";function Ex({data:e,renderItem:t,estimateSize:o,overscan:r=5,height:a,width:s="100%",className:l,onEndReached:i,endReachedThreshold:c=100,loading:u=!1,loadingComponent:f,emptyComponent:m}){let p=Ts.useRef(null),b=Lx({count:e.length,getScrollElement:()=>p.current,estimateSize:()=>o,overscan:r});return Ts.useEffect(()=>{let g=p.current;if(!g||!i)return;let h=()=>{let{scrollTop:y,scrollHeight:N,clientHeight:w}=g;N-y-w<c&&i()};return g.addEventListener("scroll",h),()=>g.removeEventListener("scroll",h)},[i,c]),e.length===0&&!u?m||Is("div",{className:"text-muted-foreground flex items-center justify-center p-8",children:"No data"}):Fx("div",{ref:p,"data-slot":"virtual-list",className:n("overflow-auto",l),style:{height:a,width:s},children:[Is("div",{style:{height:`${b.getTotalSize()}px`,width:"100%",position:"relative"},children:b.getVirtualItems().map(g=>Is("div",{"data-slot":"virtual-list-item",style:{position:"absolute",top:0,left:0,width:"100%",height:`${g.size}px`,transform:`translateY(${g.start}px)`},children:t(e[g.index],g.index)},g.key))}),u&&f&&Is("div",{className:"flex items-center justify-center p-4",children:f})]})}import*as Ms from"react";import{useVirtualizer as Ax}from"@tanstack/react-virtual";import{jsx as Ir,jsxs as Bx}from"react/jsx-runtime";function Vx({columns:e,data:t,estimateRowHeight:o,overscan:r=5,height:a,width:s="100%",className:l,onRowClick:i,loading:c=!1,loadingComponent:u,emptyComponent:f}){let m=Ms.useRef(null),p=Ax({count:t.length,getScrollElement:()=>m.current,estimateSize:()=>o,overscan:r}),b=Ms.useMemo(()=>e.map(g=>typeof g.width=="number"?`${g.width}px`:g.width??"1fr").join(" "),[e]);return t.length===0&&!c?f||Ir("div",{className:"text-muted-foreground flex items-center justify-center p-8",children:"No data"}):Bx("div",{ref:m,"data-slot":"virtual-table",className:n("bg-background relative w-full overflow-auto rounded-md border text-sm",l),style:{height:a,width:s},children:[Ir("div",{"data-slot":"virtual-table-header",role:"row",className:"bg-background text-foreground sticky top-0 z-10 grid border-b font-medium",style:{gridTemplateColumns:b},children:e.map(g=>Ir("div",{role:"columnheader","data-slot":"virtual-table-head",className:"flex h-10 items-center px-2 whitespace-nowrap",children:g.header},g.key))}),Ir("div",{"data-slot":"virtual-table-body",style:{position:"relative",height:`${p.getTotalSize()}px`},children:p.getVirtualItems().map(g=>{let h=t[g.index];return Ir("div",{"data-index":g.index,"data-slot":"virtual-table-row",ref:y=>p.measureElement(y),role:"row",className:n("hover:bg-muted/50 absolute left-0 grid w-full border-b transition-colors",i&&"cursor-pointer"),style:{transform:`translateY(${g.start}px)`,height:`${g.size}px`,gridTemplateColumns:b},onClick:i?()=>i(h):void 0,children:e.map(y=>{let N=y.render?y.render(h):String(y.accessor?y.accessor(h):h[y.key]??"");return Ir("div",{role:"cell","data-slot":"virtual-table-cell",className:"flex items-center px-2 whitespace-nowrap",children:N},y.key)})},g.key)})}),c&&u&&Ir("div",{className:"flex items-center justify-center p-4",children:u})]})}import"react";import{jsx as $x}from"react/jsx-runtime";var gu={xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},Hx={start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline",stretch:"items-stretch"};function Ox({className:e,direction:t="horizontal",size:o="md",align:r,wrap:a=!1,...s}){let l=t==="vertical",i=typeof o=="number"?void 0:gu[o]??gu.md,c={...s.style};return typeof o=="number"&&(c.gap=`${o}px`),$x("div",{"data-slot":"space",className:n("flex",l?"flex-col":"flex-row",i,r&&Hx[r],a&&"flex-wrap",e),style:c,...s})}import"react";import{jsx as Wx}from"react/jsx-runtime";var bu={none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},Ux={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},Gx={start:"items-start",center:"items-center",end:"items-end",baseline:"items-baseline",stretch:"items-stretch"},_x={row:"flex-row",col:"flex-col","row-reverse":"flex-row-reverse","col-reverse":"flex-col-reverse"};function Kx({className:e,direction:t="row",justify:o,align:r,gap:a="md",wrap:s=!1,grow:l,shrink:i,basis:c,style:u,...f}){let m=typeof a=="number"?void 0:bu[a]??bu.md,p={...u,...typeof a=="number"?{gap:`${a}px`}:{},...l!==void 0?{flexGrow:l}:{},...i!==void 0?{flexShrink:i}:{},...c!==void 0?{flexBasis:typeof c=="number"?`${c}px`:c}:{}};return Wx("div",{"data-slot":"flex",className:n("flex",_x[t],m,o&&Ux[o],r&&Gx[r],s&&"flex-wrap",e),style:p,...f})}import*as vu from"react";import{jsx as ha,jsxs as qx}from"react/jsx-runtime";function xu({className:e,orientation:t="center",type:o="horizontal",dashed:r=!1,plain:a=!1,children:s,...l}){return o==="vertical"?ha("div",{role:"separator","aria-orientation":"vertical","data-slot":"divider","data-type":"vertical",className:n("inline-flex h-full w-px shrink-0 self-stretch bg-border",r&&"border-l border-dashed bg-transparent",e),...l}):s?qx("div",{role:"separator","aria-orientation":"horizontal","data-slot":"divider","data-type":"horizontal",className:n("flex w-full items-center",t==="left"&&"justify-start",t==="center"&&"justify-center",t==="right"&&"justify-end",e),...l,children:[(t==="left"||t==="center")&&ha("div",{className:n("h-px flex-1 bg-border",r&&"border-t border-dashed bg-transparent",t==="center"&&"max-w-[50%]")}),ha("span",{className:n("shrink-0 px-3 text-sm text-muted-foreground",a&&"text-muted-foreground/80"),children:s}),ha("div",{className:n("h-px flex-1 bg-border",r&&"border-t border-dashed bg-transparent")})]}):ha("div",{role:"separator","aria-orientation":"horizontal","data-slot":"divider","data-type":"horizontal",className:n("h-px w-full bg-border",r&&"border-t border-dashed bg-transparent",e),...l})}var i5=vu.memo(xu);import"react";import{jsx as co}from"react/jsx-runtime";var Yx={1:"text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl",2:"text-2xl font-semibold tracking-tight md:text-3xl",3:"text-xl font-semibold tracking-tight md:text-2xl",4:"text-lg font-semibold md:text-xl",5:"text-base font-semibold md:text-lg",6:"text-sm font-semibold md:text-base"};function yn(e){let t=`h${e}`;function o({ref:r,className:a,...s}){return co(t,{ref:r,"data-slot":`h${e}`,className:n(Yx[e],a),...s})}return o.displayName=`Typography.H${e}`,o}var hu=yn(1),yu=yn(2),Nu=yn(3),wu=yn(4),Cu=yn(5),Pu=yn(6),jx={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl"},Qx={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},Xx={default:"text-foreground",muted:"text-muted-foreground",primary:"text-primary",secondary:"text-secondary-foreground",destructive:"text-destructive",success:"text-emerald-600 dark:text-emerald-400",warning:"text-amber-600 dark:text-amber-400"};function Ru({className:e,size:t="base",weight:o="normal",variant:r="default",italic:a=!1,underline:s=!1,strike:l=!1,truncate:i=!1,...c}){return co("span",{"data-slot":"text",className:n(jx[t],Qx[o],Xx[r],a&&"italic",s&&"underline underline-offset-4",l&&"line-through",i&&"truncate",e),...c})}function ku({className:e,muted:t=!1,truncate:o=!1,lead:r=!1,...a}){return co("p",{"data-slot":"paragraph",className:n("text-base leading-relaxed",t&&"text-muted-foreground",r&&"text-lg text-muted-foreground",o&&"truncate",e),...a})}function Su({className:e,...t}){return co("blockquote",{"data-slot":"blockquote",className:n("border-l-4 border-primary pl-4 italic text-muted-foreground",e),...t})}function Iu({className:e,...t}){return co("code",{"data-slot":"code",className:n("rounded bg-muted px-1.5 py-0.5 font-mono text-sm text-foreground",e),...t})}function Tu({className:e,...t}){return co("p",{"data-slot":"lead",className:n("text-xl text-muted-foreground leading-relaxed",e),...t})}function Mu({className:e,...t}){return co("div",{"data-slot":"large",className:n("text-lg font-semibold",e),...t})}function Du({className:e,...t}){return co("small",{"data-slot":"small",className:n("text-sm font-medium leading-none",e),...t})}function zu({className:e,...t}){return co("p",{"data-slot":"muted",className:n("text-sm text-muted-foreground",e),...t})}function Lu({className:e,...t}){return co("ul",{"data-slot":"list",className:n("ml-6 list-disc [&>li]:mt-2 [&>li]:leading-relaxed",e),...t})}var Jx={H1:hu,H2:yu,H3:Nu,H4:wu,H5:Cu,H6:Pu,Text:Ru,Paragraph:ku,Blockquote:Su,InlineCode:Iu,Lead:Tu,Large:Mu,Small:Du,Muted:zu,List:Lu};import"react";import{jsx as Nn,jsxs as Fu}from"react/jsx-runtime";var Eu={xs:"size-3",sm:"size-4",md:"size-5",lg:"size-7",xl:"size-9"},Zx={xs:"border",sm:"border-2",md:"border-2",lg:"border-[3px]",xl:"border-4"},yl={primary:"text-primary",secondary:"text-secondary-foreground",muted:"text-muted-foreground",destructive:"text-destructive",current:"text-current"};function wn({className:e,size:t="md",variant:o="circle",color:r="primary",label:a="Loading",...s}){return o==="dots"?Fu("span",{role:"status","aria-label":a,"data-slot":"spinner","data-variant":"dots",className:n("inline-flex items-center gap-1",yl[r],e),...s,children:[[0,1,2].map(l=>Nn("span",{className:n("animate-bounce rounded-full bg-current",Eu[t]),style:{animationDelay:`${l*150}ms`,animationDuration:"1s"}},l)),Nn("span",{className:"sr-only",children:a})]}):o==="bars"?Fu("span",{role:"status","aria-label":a,"data-slot":"spinner","data-variant":"bars",className:n("inline-flex items-end gap-0.5",yl[r],e),...s,children:[[0,1,2,3].map(l=>Nn("span",{className:"animate-pulse bg-current",style:{width:"3px",height:"100%",animationDelay:`${l*100}ms`,animationDuration:"1s"}},l)),Nn("span",{className:"sr-only",children:a})]}):Nn("span",{role:"status","aria-label":a,"data-slot":"spinner","data-variant":"circle",className:n("inline-block animate-spin rounded-full border-current border-t-transparent",Eu[t],Zx[t],yl[r],e),...s,children:Nn("span",{className:"sr-only",children:a})})}import*as Pe from"react";import{PlusIcon as eh,Trash2Icon as th}from"lucide-react";import{jsx as Me,jsxs as Kt}from"react/jsx-runtime";function Au(){return`row_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}function oh({columns:e,data:t,defaultData:o=[],onChange:r,onCellChange:a,showRowControls:s=!0,showHeaders:l=!0,showRowNumbers:i=!0,allowAddRow:c=!0,allowDeleteRow:u=!0,maxRows:f=1e3,minRows:m=0,rowHeight:p=36,className:b}){let[g,h]=Pe.useState(()=>o.length>0?o:[{id:Au()}]),y=t??g,N=Pe.useCallback(V=>{t||h(V),r?.(V)},[t,r]),w=Pe.useCallback((V,F,X)=>{let Y=y.map(q=>q.id===V?{...q,[F]:X}:q);N(Y),a?.(V,F,X)},[y,N,a]),[C,v]=Pe.useState(null),[x,P]=Pe.useState(null),[S,R]=Pe.useState(""),[k,T]=Pe.useState(""),z=Pe.useRef(null),W=Pe.useRef(null),[$,E]=Pe.useState({}),[A,I]=Pe.useState(null),[H,U]=Pe.useState([]),[M,L]=Pe.useState(-1),B=Pe.useCallback(V=>{let F=H.slice(0,M+1);F.push(V),U(F),L(F.length-1)},[H,M]),j=Pe.useCallback(()=>{if(M>0){let V=M-1,F=H[V];L(V),t||h(F),r?.(F)}},[M,H,t,r]),ne=Pe.useCallback(()=>{if(M<H.length-1){let V=M+1,F=H[V];L(V),t||h(F),r?.(F)}},[M,H,t,r]);Pe.useEffect(()=>{x&&z.current&&z.current.focus()},[x]),Pe.useEffect(()=>{let V=F=>{if(!C||x)return;let X=F.clipboardData?.getData("text");if(!X)return;let Y=X.split(/\r?\n/).filter(qe=>qe.trim());if(Y.length===0)return;let q=[...y.map(qe=>({...qe}))],ct=0;for(let qe=0;qe<Y.length;qe++){let Ee=C.row+qe;if(Ee>=q.length)break;let vr=Y[qe].split(" ");for(let oo=0;oo<vr.length;oo++){let Se=C.col+oo;if(Se>=e.length)break;let kt=e[Se];kt.editable!==!1&&(q[Ee]={...q[Ee],[kt.key]:vr[oo]},ct++)}}ct>0&&(B(q),N(q),T(`\u5DF2\u7C98\u8D34 ${ct} \u4E2A\u5355\u5143\u683C`),setTimeout(()=>T(""),2e3))};return document.addEventListener("paste",V),()=>document.removeEventListener("paste",V)},[C,x,y,e,N,B]);let Ne=V=>{if(!C)return;if((V.ctrlKey||V.metaKey)&&V.key==="z"&&!V.shiftKey){V.preventDefault(),j();return}if((V.ctrlKey||V.metaKey)&&(V.key==="y"||V.key==="z"&&V.shiftKey)){V.preventDefault(),ne();return}let{row:F,col:X}=C,Y=(q,ct)=>{V.preventDefault();let qe=Math.max(0,Math.min(y.length-1,F+q)),Ee=Math.max(0,Math.min(e.length-1,X+ct));v({row:qe,col:Ee}),P(null)};switch(V.key){case"ArrowUp":Y(-1,0);break;case"ArrowDown":Y(1,0);break;case"ArrowLeft":Y(0,-1);break;case"ArrowRight":Y(0,1);break;case"Tab":Y(0,V.shiftKey?-1:1);break;case"Enter":x?(Oe(),Y(1,0)):He(F,X);break;case"Escape":P(null);break;case"F2":V.preventDefault(),He(F,X);break;case"Delete":case"Backspace":x||w(y[F].id,e[X].key,"");break}},He=(V,F)=>{let X=y[V]?.[e[F].key];P({row:V,col:F}),R(X!=null?String(X):"")},Oe=()=>{if(!x)return;let{row:V,col:F}=x,X=e[F],Y=y[V]?.[X.key]??"",q=S;String(Y)!==q&&(B(y),w(y[V].id,X.key,q)),P(null)},xt=()=>{if(y.length>=f)return;let V={id:Au()},F=[...y,V];B(F),N(F),v({row:F.length-1,col:0})},O=V=>{if(y.length<=m)return;let F=y.filter((X,Y)=>Y!==V);B(F),N(F),v(X=>X?X.row>=F.length?{row:Math.max(0,F.length-1),col:X.col}:X:null)},re=(V,F)=>{V.preventDefault(),V.stopPropagation();let X=V.clientX,Y=$[F]??e.find(qe=>qe.key===F)?.width??120;I(F);let q=qe=>{let Ee=qe.clientX-X,vr=Math.max(60,Y+Ee);E(oo=>({...oo,[F]:vr}))},ct=()=>{I(null),document.removeEventListener("mousemove",q),document.removeEventListener("mouseup",ct)};document.addEventListener("mousemove",q),document.addEventListener("mouseup",ct)},G=V=>$[V.key]??V.width??120;return Kt("div",{"data-slot":"spreadsheet-editor",className:n("w-full overflow-auto rounded-lg border",b),children:[s&&Kt("div",{className:"flex items-center gap-1 border-b bg-muted/30 px-2 py-1",children:[c&&Kt("button",{type:"button",onClick:xt,disabled:y.length>=f,className:n("inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs","border border-input bg-background hover:bg-muted","disabled:cursor-not-allowed disabled:opacity-50"),title:"\u6DFB\u52A0\u884C",children:[Me(eh,{className:"size-3"}),"\u6DFB\u52A0\u884C"]}),Kt("span",{className:"ml-1 text-xs text-muted-foreground",children:[y.length," / ",f," \u884C"]}),Kt("span",{className:"ml-auto text-xs text-muted-foreground",children:[e.length," \u5217 \xB7 Tab/\u65B9\u5411\u952E\u5BFC\u822A \xB7 F2 \u7F16\u8F91 \xB7 Ctrl+V \u7C98\u8D34"]}),k&&Me("span",{className:"ml-2 rounded bg-green-100 px-1.5 py-0.5 text-xs text-green-700 dark:bg-green-900/30 dark:text-green-400",children:k})]}),Me("div",{className:"overflow-auto",children:Kt("table",{ref:W,"data-slot":"spreadsheet-table",className:"w-full border-collapse",onKeyDown:Ne,role:"grid",children:[l&&Me("thead",{children:Kt("tr",{className:"bg-muted/50",children:[i&&Me("th",{className:"sticky left-0 z-10 border-b border-r bg-muted/50 px-2 py-1 text-center text-xs font-medium text-muted-foreground",style:{width:48,minWidth:48},children:"#"}),e.map(V=>Kt("th",{className:"relative border-b border-r px-2 py-1 text-left text-xs font-medium text-muted-foreground select-none",style:{width:G(V),minWidth:V.minWidth??60},children:[Me("span",{className:"truncate",children:V.title}),Me("div",{className:n("absolute right-0 top-0 h-full w-1 cursor-col-resize","hover:bg-primary/30",A===V.key&&"bg-primary/50"),onMouseDown:F=>re(F,V.key)})]},V.key)),u&&Me("th",{className:"w-8 border-b px-1"})]})}),Me("tbody",{children:y.map((V,F)=>{let X=C?.row===F;return Kt("tr",{className:n("transition-colors",X&&"bg-accent/30"),children:[i&&Me("td",{className:n("sticky left-0 z-10 border-b border-r bg-background px-2 py-1 text-center text-xs text-muted-foreground select-none",X&&"bg-accent/30"),style:{width:48,height:p},children:F+1}),e.map((Y,q)=>{let ct=x?.row===F&&x?.col===q,qe=C?.row===F&&C?.col===q,Ee=V[Y.key],vr=Y.editable!==!1,oo=Y.validator?Y.validator(String(Ee??""),V):null;return Kt("td",{className:n("relative border-b border-r px-2 py-0 transition-colors",qe&&!ct&&"ring-2 ring-primary ring-inset",oo&&"bg-red-50 dark:bg-red-950/20"),style:{width:G(Y),height:p},onClick:()=>{v({row:F,col:q}),vr&&Y.type!=="select"&&(P({row:F,col:q}),R(Ee!=null?String(Ee):""))},onDoubleClick:()=>{vr&&Y.type!=="select"&&(P({row:F,col:q}),R(Ee!=null?String(Ee):""))},children:[ct?Y.type==="select"&&Y.options?Kt("select",{value:String(Ee??""),onChange:Se=>{let kt=Se.target.value;String(Ee)!==kt&&(B(y),w(V.id,Y.key,kt)),P(null)},onBlur:()=>P(null),onKeyDown:Se=>{Se.key==="Escape"&&P(null)},autoFocus:!0,className:"h-full w-full bg-transparent text-sm outline-none",children:[Me("option",{value:"",children:"\u2014"}),Y.options.map(Se=>Me("option",{value:Se.value,children:Se.label},Se.value))]}):Me("input",{ref:z,type:Y.type==="number"?"number":"text",value:S,onChange:Se=>R(Se.target.value),onBlur:Oe,onKeyDown:Se=>{if(Se.key==="Escape")P(null);else if(Se.key==="Enter")if(Oe(),F<y.length-1){v({row:F+1,col:q}),P({row:F+1,col:q});let kt=y[F+1]?.[e[q].key];R(kt!=null?String(kt):"")}else P(null),v({row:F,col:q});else if(Se.key==="Tab"){Se.preventDefault(),Oe();let kt=Se.shiftKey?Math.max(0,q-1):Math.min(e.length-1,q+1);v({row:F,col:kt}),P({row:F,col:kt});let cc=y[F]?.[e[kt].key];R(cc!=null?String(cc):"")}},className:"h-full w-full bg-transparent text-sm outline-none"}):Me("div",{className:n("flex h-full items-center text-sm",Ee==null&&"text-muted-foreground/40"),children:Y.type==="select"&&Y.options?Y.options.find(Se=>Se.value===Ee)?.label??Me("span",{className:"text-muted-foreground/40",children:Ee??"\u2014"}):Ee??Me("span",{className:"text-muted-foreground/40",children:"\u2014"})}),oo&&Me("div",{className:"absolute left-0 top-full z-20 whitespace-nowrap rounded bg-red-500 px-1.5 py-0.5 text-xs text-white",children:oo})]},Y.key)}),u&&Me("td",{className:"border-b px-1 text-center",children:Me("button",{type:"button",onClick:Y=>{Y.stopPropagation(),O(F)},disabled:y.length<=m,className:n("rounded p-0.5 text-muted-foreground/40 hover:text-red-500","disabled:cursor-not-allowed disabled:opacity-30"),title:"\u5220\u9664\u884C",children:Me(th,{className:"size-3.5"})})})]},V.id)})})]})})]})}import*as Ou from"react";import{Search as Vu,X as Bu}from"lucide-react";import{jsx as Wt,jsxs as Hu}from"react/jsx-runtime";function rh({className:e,placeholder:t="Search...",allowClear:o=!1,enterButton:r=!1,onSearch:a,onChange:s,size:l="default",loading:i=!1,defaultValue:c,value:u,...f}){let[m,p]=Ou.useState(c??""),b=u!==void 0,g=b?u:m,h=v=>{let x=v.target.value;b||p(x),s?.(x,v)},y=v=>{a?.(String(g),v)},N=v=>{v.key==="Enter"&&y(v),f.onKeyDown?.(v)},w=()=>{b||p(""),s?.(""),a?.("")},C=l==="sm"?"h-7":l==="lg"?"h-9":"h-8";return r?Hu("div",{"data-slot":"input-search",className:n("flex w-full items-stretch",e),children:[Wt(le,{type:"search",placeholder:t,value:g,onChange:h,onKeyDown:N,className:n(C,"rounded-r-none",o&&g&&"pr-7"),...f}),o&&g&&!i&&Wt("button",{type:"button",onClick:w,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:Wt(Bu,{className:"size-3.5"})}),Wt(D,{type:"button",onClick:y,disabled:i,className:n("rounded-l-none border-l-0",C),children:i?Wt("span",{className:"animate-spin",children:"\u23F3"}):typeof r=="boolean"?Wt(Vu,{className:"size-4"}):r})]}):Hu("div",{"data-slot":"input-search",className:n("relative w-full",e),children:[Wt(Vu,{className:"pointer-events-none absolute left-2 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),Wt(le,{type:"search",placeholder:t,value:g,onChange:h,onKeyDown:N,className:n(C,"pl-8",o&&g&&"pr-7"),...f}),o&&g&&!i&&Wt("button",{type:"button",onClick:w,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:Wt(Bu,{className:"size-3.5"})}),i&&Wt("span",{className:"absolute right-2 top-1/2 -translate-y-1/2 animate-spin",children:"\u23F3"})]})}import*as Na from"react";import{ChevronUp as nh,ChevronDown as ah}from"lucide-react";import{jsx as ya,jsxs as $u}from"react/jsx-runtime";function Nl({className:e,value:t,defaultValue:o=null,min:r=-1/0,max:a=1/0,step:s=1,precision:l,controls:i=!0,disabled:c=!1,readOnly:u=!1,size:f="default",onChange:m,parser:p,formatter:b,nullAsUndefined:g=!1,...h}){let[y,N]=Na.useState(o),[w,C]=Na.useState(""),v=t!==void 0,x=v?t:y;Na.useEffect(()=>{x==null?C(""):C(b?b(x):String(x))},[x,b]);let P=E=>Math.min(Math.max(E,r),a),S=E=>{if(l!==void 0){let A=Math.pow(10,l);return Math.round(E*A)/A}return E},R=E=>{if(E===null||isNaN(E)){v||N(null),m?.(g?void 0:null);return}let A=S(P(E));v||N(A),m?.(A)},k=E=>{let A=E.target.value;if(C(A),A===""){R(null);return}let I=p?p(A):parseFloat(A);isNaN(I)||R(I)},T=E=>{if(c||u)return;let A=Number.isFinite(r)?r:0,I=x??A,H=E==="up"?I+s:I-s;R(H)},z=E=>{c||u||(E.key==="ArrowUp"?(E.preventDefault(),T("up")):E.key==="ArrowDown"&&(E.preventDefault(),T("down")),h.onKeyDown?.(E))},W=E=>{w!==""&&x!==null&&C(b?b(x):String(x)),h.onBlur?.(E)},$=f==="sm"?"h-7 text-sm":f==="lg"?"h-9 text-base":"h-8 text-sm";return $u("div",{"data-slot":"input-number",className:n("relative inline-flex w-full items-center",c&&"opacity-50",e),children:[ya("input",{type:"text",inputMode:"decimal",disabled:c,readOnly:u,value:w,onChange:k,onKeyDown:z,onBlur:W,className:n("w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-right transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 dark:bg-input/30 dark:disabled:bg-input/80",$,i&&"pr-7"),...h}),i&&!u&&$u("div",{className:"absolute right-0 top-0 flex h-full flex-col",children:[ya("button",{type:"button",tabIndex:-1,disabled:c||x!==null&&x>=a,onClick:()=>T("up"),className:"flex flex-1 items-center justify-center px-1.5 text-muted-foreground hover:text-foreground disabled:opacity-30","aria-label":"Increase",children:ya(nh,{className:"size-3"})}),ya("button",{type:"button",tabIndex:-1,disabled:c||x!==null&&x<=r,onClick:()=>T("down"),className:"flex flex-1 items-center justify-center px-1.5 text-muted-foreground hover:text-foreground disabled:opacity-30","aria-label":"Decrease",children:ya(ah,{className:"size-3"})})]})]})}import{jsx as wl,jsxs as ih}from"react/jsx-runtime";function sh({unit:e,unitPosition:t="suffix",className:o,unitClassName:r,controls:a=!1,...s}){return ih("div",{"data-slot":"input-number-with-unit",className:n("relative inline-flex w-full items-stretch rounded-lg","border border-input bg-transparent shadow-xs transition-colors","focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50",s.disabled&&"opacity-50",o),children:[t==="prefix"&&wl("span",{"data-slot":"input-number-unit",className:n("flex items-center rounded-l-[7px] border-r border-input bg-muted/50 px-2.5 text-sm text-muted-foreground select-none whitespace-nowrap",r),children:e}),wl(Nl,{...s,controls:a,className:"border-none bg-transparent shadow-none focus-within:ring-0 focus-within:ring-offset-0 rounded-none flex-1"}),t==="suffix"&&wl("span",{"data-slot":"input-number-unit",className:n("flex items-center rounded-r-[7px] border-l border-input bg-muted/50 px-2.5 text-sm text-muted-foreground select-none whitespace-nowrap",r),children:e})]})}import*as Pl from"react";import{CalendarIcon as lh}from"lucide-react";import{jsx as wa,jsxs as Cl}from"react/jsx-runtime";function ch(e,t){if(!e)return"";let o=t||"yyyy-MM-dd",r=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return o.replace("yyyy",String(r)).replace("MM",a).replace("dd",s).replace("HH",String(e.getHours()).padStart(2,"0")).replace("mm",String(e.getMinutes()).padStart(2,"0")).replace("ss",String(e.getSeconds()).padStart(2,"0"))}function dh({value:e,defaultValue:t=null,format:o,placeholder:r="Select date",disabled:a=!1,readOnly:s=!1,allowClear:l=!1,locale:i,disabledDate:c,onChange:u,size:f="default",trigger:m,className:p}){let[b,g]=Pl.useState(t),[h,y]=Pl.useState(!1),N=e!==void 0,w=N?e:b,C=P=>{N||g(P),u?.(P),P&&y(!1)},v=f==="sm"?"h-7 text-sm":f==="lg"?"h-9 text-base":"h-8 text-sm",x=w?ch(w,o):"";return Cl("div",{"data-slot":"date-picker",className:n("relative inline-block",p),children:[Cl(ce,{open:h,onOpenChange:y,children:[wa(de,{render:m??Cl(D,{variant:"outline",size:f==="sm"?"sm":f==="lg"?"lg":"default",disabled:a||s,className:n(v,"w-full justify-start font-normal",!x&&"text-muted-foreground"),children:[wa(lh,{className:"size-4 shrink-0"}),x||r]})}),wa(ue,{className:"w-auto p-0",align:"start",children:wa(en,{mode:"single",selected:w??void 0,onSelect:P=>C(P??null),disabled:c})})]}),l&&w&&!a&&!s&&wa("button",{type:"button",onClick:()=>C(null),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear date",children:"\xD7"})]})}import*as Uu from"react";import{jsx as qt,jsxs as Xo}from"react/jsx-runtime";var uh={sm:"text-xs px-2 py-1.5",default:"text-sm px-3 py-2",lg:"text-base px-4 py-3"},ph={sm:"text-xs px-1.5 py-1",default:"text-xs px-2 py-1.5",lg:"text-sm px-3 py-2"};function mh({className:e,title:t,extra:o,column:r=3,layout:a="horizontal",bordered:s=!0,size:l="default",variant:i="default",colon:c=!0,items:u=[],contentStyle:f,labelStyle:m,...p}){let b=typeof r=="number"?r:3,g=i==="compact"?ph[l]:uh[l];return i==="inline"?Xo("div",{"data-slot":"descriptions",className:n("w-full",e),...p,children:[(t||o)&&Xo("div",{className:"mb-3 flex items-center justify-between",children:[t&&qt("h3",{className:"text-base font-semibold text-foreground",children:t}),o&&qt("div",{children:o})]}),qt("div",{className:"flex flex-wrap gap-x-6 gap-y-1 text-sm",children:u.map((h,y)=>Xo("div",{className:"flex gap-1.5",children:[Xo("span",{className:"font-medium text-muted-foreground",children:[h.label,c&&":"]}),qt("span",{className:"text-foreground",children:h.value??"\u2014"})]},y))})]}):Xo("div",{"data-slot":"descriptions",className:n("w-full",e),...p,children:[(t||o)&&Xo("div",{className:"mb-3 flex items-center justify-between",children:[t&&qt("h3",{className:"text-base font-semibold text-foreground",children:t}),o&&qt("div",{children:o})]}),qt("div",{className:n("grid",s&&"overflow-hidden rounded-lg border border-border"),style:{gridTemplateColumns:`repeat(${b}, minmax(0, 1fr))`},children:u.map((h,y)=>{let N=Math.min(h.span??1,b);return Xo(Uu.Fragment,{children:[qt("div",{className:n(g,"font-medium text-muted-foreground",s?"border-b border-r border-border bg-muted/30":"pb-1",a==="vertical"&&"border-r-0",c&&'after:content-[":"]'),style:{gridColumn:N>1?`span ${N}`:void 0,...m},children:h.label}),a==="horizontal"&&qt("div",{className:n(g,"text-foreground",s?"border-b border-border":"pb-2"),style:f,children:h.value??"\u2014"})]},y)})})]})}function fh({label:e,children:t,span:o=1,className:r}){return Xo("div",{"data-slot":"descriptions-item",className:n("contents",r),style:{gridColumn:`span ${o}`},children:[qt("span",{className:"font-medium text-muted-foreground",children:e}),qt("span",{className:"text-foreground",children:t??"\u2014"})]})}import*as Gu from"react";import{Fragment as bh,jsx as Cn,jsxs as Ds}from"react/jsx-runtime";function gh({title:e,description:t,children:o,okText:r="OK",cancelText:a="Cancel",okVariant:s="default",disabled:l=!1,showCancel:i=!0,side:c="top",onConfirm:u,onCancel:f,open:m,defaultOpen:p=!1,onOpenChange:b,className:g}){let[h,y]=Gu.useState(p),N=m!==void 0,w=N?m:h,C=P=>{N||y(P),b?.(P)},v=P=>{u?.(P),C(!1)},x=P=>{f?.(P),C(!1)};return l?Cn(bh,{children:o}):Ds(ce,{open:w,onOpenChange:C,"data-slot":"popconfirm",children:[Cn(de,{render:o}),Ds(ue,{side:c,align:"center",className:n("w-72 max-w-[90vw]",g),children:[Ds("div",{className:"flex flex-col gap-1",children:[e&&Cn(Ri,{children:e}),t&&Cn(ki,{children:t})]}),Ds("div",{className:"mt-3 flex justify-end gap-2",children:[i&&Cn(D,{variant:"outline",size:"sm",onClick:x,children:a}),Cn(D,{variant:s==="destructive"?"destructive":"default",size:"sm",onClick:v,children:r})]})]})]})}import*as zs from"react";import{jsx as Ca,jsxs as Rl}from"react/jsx-runtime";function vh({spinning:e=!0,tip:t,size:o="md",delay:r=0,children:a,indicator:s,className:l,contentClassName:i}){let[c,u]=zs.useState(e&&r===0);return zs.useEffect(()=>{if(e&&r>0){u(!1);let f=setTimeout(()=>u(!0),r);return()=>clearTimeout(f)}u(e)},[e,r]),a?Rl("div",{"data-slot":"spin",className:n("relative",l),children:[Ca("div",{className:n("transition-opacity",c&&"opacity-30 pointer-events-none",i),children:a}),c&&Rl("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center gap-2",children:[s??Ca(wn,{size:o}),t&&Ca("span",{className:"text-sm text-muted-foreground",children:t})]})]}):Rl("div",{"data-slot":"spin",className:n("inline-flex flex-col items-center gap-2",l),children:[s??Ca(wn,{size:o}),t&&Ca("span",{className:"text-sm text-muted-foreground",children:t})]})}import*as uo from"react";import{jsx as _u}from"react/jsx-runtime";function xh({offsetTop:e,offsetBottom:t,children:o,disabled:r=!1,onChange:a,target:s,className:l,wrapperClassName:i}){let c=uo.useRef(null),[u,f]=uo.useState(!1),[m,p]=uo.useState({}),b=uo.useRef(s);b.current=s;let g=uo.useCallback(()=>{if(!c.current||r)return;let y=c.current.getBoundingClientRect(),N=b.current?.()??window,w=!1;if(e!==void 0){let C=N===window?{top:0,bottom:window.innerHeight}:N.getBoundingClientRect();w=y.top-C.top<e}else t!==void 0&&(w=(N===window?{bottom:window.innerHeight}:N.getBoundingClientRect()).bottom-y.bottom<t);w!==u&&(f(w),a?.(w),p(w?{width:y.width,height:y.height,left:y.left}:{}))},[u,r,e,t,a]);uo.useEffect(()=>{let y=b.current?.()??window;return y.addEventListener("scroll",g,{passive:!0}),window.addEventListener("resize",g),g(),()=>{y.removeEventListener("scroll",g),window.removeEventListener("resize",g)}},[g]);let h=u?e!==void 0?{position:"fixed",top:e,left:m.left,width:m.width,zIndex:50}:{position:"fixed",bottom:t,left:m.left,width:m.width,zIndex:50}:{};return _u("div",{ref:c,className:i,style:m,"data-slot":"affix",children:_u("div",{className:n(u&&l),style:h,children:o})})}import*as Jo from"react";import{ArrowUp as hh}from"lucide-react";import{jsx as kl}from"react/jsx-runtime";function yh({visibilityHeight:e=400,target:t,onClick:o,children:r,className:a,duration:s=300,position:l={right:24,bottom:48}}){let[i,c]=Jo.useState(!1),u=Jo.useRef(t);u.current=t;let f=()=>{let p=u.current?.()??window;if(p===window){let b=window.scrollY,g=performance.now(),h=y=>{let N=y-g,w=Math.min(N/s,1),C=1-Math.pow(1-w,3);window.scrollTo(0,b*(1-C)),w<1&&requestAnimationFrame(h)};requestAnimationFrame(h)}else p.scrollTo({top:0,behavior:"smooth"});o?.()},m=Jo.useCallback(()=>{let p=u.current?.()??window,b=p===window?window.scrollY:p.scrollTop;c(b>e)},[e]);return Jo.useEffect(()=>{let p=u.current?.()??window;return p.addEventListener("scroll",m,{passive:!0}),m(),()=>p.removeEventListener("scroll",m)},[m]),i?kl("div",{"data-slot":"back-top",className:n("fixed z-50 transition-opacity",a),style:{right:l.right,bottom:l.bottom},children:r??kl(D,{variant:"default",size:"icon",onClick:f,"aria-label":"Back to top",className:"shadow-lg",children:kl(hh,{className:"size-4"})})}):null}import*as Tr from"react";import{jsx as Ku}from"react/jsx-runtime";var Sl=Tr.createContext({locale:"zh-CN",direction:"ltr",prefixCls:"chaos"});function Nh(e){if(e)return typeof e=="string"?{variant:e}:e}function wh({locale:e="zh-CN",direction:t="ltr",theme:o,prefixCls:r="chaos",disableAnimation:a=!1,renderEmpty:s,form:l,children:i}){let c=Tr.useMemo(()=>({locale:e,direction:t,theme:o,prefixCls:r,disableAnimation:a,renderEmpty:s,form:l}),[e,t,o,r,a,s,l]),u=Tr.useMemo(()=>{if(!o)return{};let f={};o.primaryColor&&(f["--primary"]=o.primaryColor),o.borderRadius!==void 0&&(f["--radius"]=`${o.borderRadius}px`);let m=Nh(o.scrollbar);return m&&(m.variant==="none"?f["--scrollbar-width"]="none":m.variant==="thin"&&(f["--scrollbar-width"]="thin"),m.thumbColor?f["--scrollbar-thumb"]=m.thumbColor:(f["--scrollbar-thumb"]="rgb(15 23 42 / 0.18)",f["--scrollbar-thumb-hover"]="rgb(15 23 42 / 0.3)"),m.thumbHoverColor&&(f["--scrollbar-thumb-hover"]=m.thumbHoverColor)),o.cssVars&&Object.assign(f,o.cssVars),f},[o]);return Ku(Sl.Provider,{value:c,children:Ku("div",{"data-slot":"config-provider",dir:t,style:u,className:o?.darkMode?"dark":void 0,children:i})})}function Ch(){return Tr.useContext(Sl)}import*as Pn from"react";import{useSyncExternalStore as Ph}from"react";var Zo=[],Tl=new Set;function Il(){for(let e of Tl)e()}function Rh(e){return Tl.add(e),()=>{Tl.delete(e)}}function kh(){return Zo}var Sh=[];function Ih(){return Sh}var Wu=0;function Th(){return Wu+=1,`imperative-modal-${Date.now()}-${Wu}`}var Pa=new Map,Mr={push(e){let t=Th();return Zo=[...Zo,{...e,id:t}],Pa.set(t,[]),Il(),t},close(e,t){let o=Zo.find(a=>a.id===e);o?.resolve&&o.resolve(t);let r=Pa.get(e)??[];for(let a of r)a(t);Pa.delete(e),Zo=Zo.filter(a=>a.id!==e),Il()},closeAll(){for(let e of Zo){e.resolve&&e.resolve(void 0);let t=Pa.get(e.id)??[];for(let o of t)o(void 0);Pa.delete(e.id)}Zo=[],Il()},subscribe:Rh,getSnapshot:kh,getServerSnapshot:Ih};function qu(){return Ph(Mr.subscribe,Mr.getSnapshot,Mr.getServerSnapshot)}import{jsx as Yt,jsxs as Ls}from"react/jsx-runtime";var Mh={confirm:Yt(Co,{className:"text-primary size-5"}),info:Yt(ao,{className:"size-5 text-blue-500"}),warning:Yt(es,{className:"size-5 text-amber-500"}),success:Yt(qa,{className:"size-5 text-emerald-500"}),error:Yt(Qa,{className:"text-destructive size-5"})},Dh={confirm:"\u786E\u8BA4",info:"\u77E5\u9053\u4E86",warning:"\u77E5\u9053\u4E86",success:"\u597D\u7684",error:"\u77E5\u9053\u4E86"};function zh({config:e}){let[t,o]=Pn.useState(!1),r=Pn.useCallback(async()=>{o(!0);try{e.resolve&&await e.resolve(!0)}finally{o(!1),Mr.close(e.id,!0)}},[e]),a=Pn.useCallback(()=>{e.resolve?.(!1),Mr.close(e.id,!1)},[e]),s=Pn.useCallback(f=>{f||(e.resolve?.(!1),Mr.close(e.id,!1))},[e]),l=e.kind==="confirm",i=e.icon??Mh[e.kind],c=Dh[e.kind]??"OK",u=e.maskClosable!==!1;return Yt(ot,{open:!0,onOpenChange:s,disablePointerDismissal:!u,children:Ls(rt,{className:n("sm:max-w-[425px]"),style:{maxWidth:typeof e.width=="number"?`${e.width}px`:e.width},showCloseButton:!1,children:[Ls(nt,{children:[Ls(at,{className:"flex items-center gap-2",children:[i,e.title??""]}),e.content&&Yt(hr,{children:e.content})]}),Ls(qn,{children:[l&&Yt(D,{variant:"outline",onClick:a,disabled:t,children:e.cancelText??"\u53D6\u6D88"}),Yt(D,{variant:e.okVariant==="destructive"?"destructive":"default",onClick:r,disabled:t,children:t?"\u5904\u7406\u4E2D...":e.okText??c})]})]})})}function Lh(){let e=qu();return Yt("div",{"data-slot":"modal-provider",children:e.map(t=>Yt(zh,{config:t},t.id))})}import*as Ce from"react";import{jsx as Q,jsxs as Do}from"react/jsx-runtime";var Dr=Ce.createContext(null);function Rn(e){let t=Ce.useContext(Dr);if(!t)throw new Error(`<${e}> must be rendered inside <Menu>.`);return t}var kn={light:{root:"bg-card text-foreground",item:"text-foreground",subTrigger:"text-foreground",itemActive:"bg-primary/10 text-primary font-medium",itemHover:"hover:bg-muted",subBg:"bg-muted/40",divider:"bg-border"},dark:{root:"bg-slate-900 text-slate-100",item:"text-slate-200",subTrigger:"text-slate-200",itemActive:"bg-primary/20 text-primary-foreground font-medium",itemHover:"hover:bg-slate-800",subBg:"bg-slate-950/40",divider:"bg-slate-700"}},De={sm:{item:"h-7 px-2 text-xs",icon:"size-3.5",gap:"gap-1.5",indentBase:6},md:{item:"h-9 px-3",icon:"size-4",gap:"gap-2",indentBase:8},lg:{item:"h-11 px-4 text-base",icon:"size-5",gap:"gap-2.5",indentBase:10}},Sn=Ce.forwardRef(({mode:e="vertical",theme:t="light",size:o="md",selectedKeys:r,defaultSelectedKeys:a=[],openKeys:s,defaultOpenKeys:l=[],multiple:i=!1,selectable:c=!0,inlineCollapsed:u,inlineIndent:f=24,triggerSubMenuAction:m="click",collapsible:p=!1,onCollapse:b,items:g,onClick:h,onOpenChange:y,onSelect:N,onDeselect:w,children:C,className:v,...x},P)=>{let[S,R]=Ce.useState(a),[k,T]=Ce.useState(l),[z,W]=Ce.useState(!1),$=r!==void 0,E=s!==void 0,A=u!==void 0,I=$?r:S,H=E?s:k,U=A?u:z,M=Ce.useRef(new Map),L=Ce.useCallback((G,V)=>{M.current.set(G,V)},[]),B=Ce.useCallback(G=>{$||R(G)},[$]),j=Ce.useCallback(G=>{E||T(G),y?.(G)},[E,y]),ne=Ce.useCallback(G=>{if(!c||G.item.disabled){G.item.onClick?.({key:G.key,keyPath:G.keyPath}),h?.(G);return}let V=I.includes(G.key),F;i?F=V?I.filter(X=>X!==G.key):[...I,G.key]:F=V?[]:[G.key],B(F),V?w?.({key:G.key,selectedKeys:F}):N?.({key:G.key,selectedKeys:F}),G.item.onClick?.({key:G.key,keyPath:G.keyPath}),h?.(G)},[I,i,h,w,N,c,B]),Ne=Ce.useCallback((G,V)=>{let F=H.includes(G),X;if(F)X=H.filter(Y=>Y!==G);else if(e==="vertical"){let Y=V?M.current.get(V)?.children?.map(q=>q.key)??[]:g?.map(q=>q.key)??[];X=H.filter(q=>!Y.includes(q)).concat(G)}else X=[...H,G];j(X)},[H,g,e,j]),He=Ce.useCallback(()=>{let G=!U;A||W(G),b?.(G)},[U,A,b]),Oe={mode:e,theme:t,size:o,selectedKeys:I,openKeys:H,inlineCollapsed:U,inlineIndent:f,triggerSubMenuAction:m,selectable:c,multiple:i,onItemClick:ne,onItemToggle:Ne,registerItem:L,level:0},xt=kn[t],O;g&&g.length>0?O=Q(Yu,{tag:"ul",role:"menu",children:g.map(G=>Q(Es,{config:G,parentPath:[]},G.key))}):O=C;let re=n("relative",De[o].item.includes("text-xs")?"text-xs":De[o].item.includes("text-base")?"text-base":"text-sm",e==="horizontal"?"flex items-center gap-1":e==="inline"?n("w-full",xt.root):n("flex flex-col gap-0.5",xt.root),e==="vertical"&&"min-w-[180px] py-1",v);return Q(Dr.Provider,{value:Oe,children:e==="horizontal"?Q("nav",{ref:P,role:"menubar","data-slot":"menu","data-mode":e,"data-theme":t,className:re,...x,children:O}):Do("div",{className:"relative",children:[Q("ul",{ref:P,role:"menu","data-slot":"menu","data-mode":e,"data-theme":t,className:n(re,"list-none m-0 p-0"),children:O}),p&&e==="inline"&&Q("button",{type:"button",onClick:He,className:n("absolute bottom-0 left-0 right-0 flex items-center justify-center border-t transition-colors",De[o].item,xt.item,xt.itemHover,"border-border"),"aria-label":U?"\u5C55\u5F00\u83DC\u5355":"\u6536\u8D77\u83DC\u5355",title:U?"\u5C55\u5F00\u83DC\u5355":"\u6536\u8D77\u83DC\u5355",children:U?Q(Ec,{className:n("shrink-0",De[o].icon)}):Q(Lc,{className:n("shrink-0",De[o].icon)})})]})})});Sn.displayName="Menu";var Yu=Ce.forwardRef(({className:e,children:t,...o},r)=>Q("ul",{ref:r,role:"menu","data-slot":"menu-list",className:n("list-none m-0 p-0",e),...o,children:t}));Yu.displayName="MenuList";function Es({config:e,parentPath:t}){let o=Rn("Menu.items"),r=kn[o.theme],a=!!e.children&&e.children.length>0,s=[e.key,...t],l=o.openKeys.includes(e.key),i=o.selectedKeys.includes(e.key),c=o.mode==="inline"&&!o.inlineCollapsed?{paddingLeft:`${o.level*o.inlineIndent+De[o.size].indentBase}px`}:void 0;return Ce.useEffect(()=>{o.registerItem(e.key,e)},[e,o]),e.type==="group"?Q("li",{role:"group","data-slot":"menu-group",className:n("py-1 text-xs font-semibold text-muted-foreground",o.size==="lg"?"px-4":"px-2",r.item),children:e.title??e.label}):a?Q(Eh,{config:e,isOpen:l,isSelected:i,indentStyle:c,tc:r,keyPath:s}):Q("li",{role:"none","data-slot":"menu-item","data-key":e.key,"data-selected":i||void 0,"data-disabled":e.disabled||void 0,children:Do("button",{type:"button",role:"menuitem",tabIndex:e.disabled?-1:0,disabled:e.disabled,onClick:u=>{e.disabled||o.onItemClick({key:e.key,keyPath:s,item:e,domEvent:u})},className:n("w-full flex items-center rounded-md text-left outline-none transition-colors",De[o.size].item,De[o.size].gap,r.item,i?r.itemActive:r.itemHover,e.danger&&"text-destructive data-[selected=true]:bg-destructive/10 data-[selected=true]:text-destructive",e.disabled&&"pointer-events-none opacity-50",o.inlineCollapsed&&"justify-center"),style:c,"data-selected":i||void 0,children:[e.icon&&Q("span",{className:n("inline-flex shrink-0 items-center justify-center",De[o.size].icon),children:e.icon}),!o.inlineCollapsed&&Q("span",{className:"flex-1 truncate",children:e.label})]})})}function Eh({config:e,isOpen:t,isSelected:o,indentStyle:r,tc:a,keyPath:s}){let l=Rn("Menu.SubMenu"),i=l.mode==="inline",c={...l,level:l.level+1,parentKey:e.key},u=p=>{p.stopPropagation(),!e.disabled&&l.onItemToggle(e.key,l.parentKey)},f=p=>{l.triggerSubMenuAction==="hover"&&(p.stopPropagation(),!e.disabled&&(l.openKeys.includes(e.key)||l.onItemToggle(e.key,l.parentKey)))},m=Do("button",{type:"button",role:"menuitem","aria-haspopup":"true","aria-expanded":t,tabIndex:e.disabled?-1:0,disabled:e.disabled,onClick:u,onMouseEnter:f,className:n("w-full flex items-center rounded-md text-left outline-none transition-colors",De[l.size].item,De[l.size].gap,a.subTrigger,o?a.itemActive:a.itemHover,e.danger&&"text-destructive data-[selected=true]:bg-destructive/10",e.disabled&&"pointer-events-none opacity-50",l.inlineCollapsed&&"justify-center"),style:r,"data-selected":o||void 0,children:[e.icon&&Q("span",{className:n("inline-flex shrink-0 items-center justify-center",De[l.size].icon),children:e.icon}),!l.inlineCollapsed&&Q("span",{className:"flex-1 truncate",children:e.label}),!l.inlineCollapsed&&Q(te,{className:n("size-4 shrink-0 transition-transform text-muted-foreground",i&&t&&"rotate-90")})]});return l.mode==="horizontal"?Do("li",{role:"none","data-slot":"menu-submenu","data-key":e.key,className:"relative",children:[m,t&&Q("div",{className:n("absolute left-0 top-full z-50 mt-1 min-w-[180px] rounded-md border bg-popover p-1 text-popover-foreground shadow-md"),children:Q(Dr.Provider,{value:c,children:Q("ul",{role:"menu","data-slot":"menu-sub-content",className:"list-none m-0 p-0",children:e.children.map(p=>Q(Es,{config:p,parentPath:[e.key,...s.slice(1)]},p.key))})})})]}):Do("li",{role:"none","data-slot":"menu-submenu","data-key":e.key,"data-open":t||void 0,className:i?void 0:"relative",children:[m,i&&t&&!l.inlineCollapsed&&Q("ul",{role:"menu","data-slot":"menu-sub-content",className:n("list-none m-0 p-0",a.subBg),children:Q(Dr.Provider,{value:c,children:e.children.map(p=>Q(Es,{config:p,parentPath:[e.key,...s.slice(1)]},p.key))})}),!i&&t&&Q("div",{className:n("absolute left-full top-0 z-50 ml-1 min-w-[180px] rounded-md border bg-popover p-1 text-popover-foreground shadow-md"),children:Q(Dr.Provider,{value:c,children:Q("ul",{role:"menu","data-slot":"menu-sub-content",className:"list-none m-0 p-0",children:e.children.map(p=>Q(Es,{config:p,parentPath:[e.key,...s.slice(1)]},p.key))})})})]})}function Ml({key:e,title:t,icon:o,disabled:r,children:a,className:s,style:l}){let i=Rn("SubMenu"),c=kn[i.theme],u=i.openKeys.includes(e),f=i.selectedKeys.includes(e),m=i.mode==="inline",p=m&&!i.inlineCollapsed?{paddingLeft:`${i.level*i.inlineIndent+De[i.size].indentBase}px`}:l,b=y=>{y.stopPropagation(),!r&&i.onItemToggle(e,i.parentKey)},g={...i,level:i.level+1,parentKey:e},h=Do("button",{type:"button",role:"menuitem","aria-haspopup":"true","aria-expanded":u,tabIndex:r?-1:0,disabled:r,onClick:b,className:n("w-full flex items-center rounded-md text-left outline-none transition-colors",De[i.size].item,De[i.size].gap,c.subTrigger,f?c.itemActive:c.itemHover,r&&"pointer-events-none opacity-50",i.inlineCollapsed&&"justify-center",s),style:p,"data-selected":f||void 0,children:[o&&Q("span",{className:n("inline-flex shrink-0 items-center justify-center",De[i.size].icon),children:o}),!i.inlineCollapsed&&Q("span",{className:"flex-1 truncate",children:t}),!i.inlineCollapsed&&Q(te,{className:n("size-4 shrink-0 transition-transform text-muted-foreground",m&&u&&"rotate-90")})]});return Do("li",{role:"none","data-slot":"menu-submenu","data-key":e,"data-open":u||void 0,className:m?void 0:"relative",children:[h,m&&u&&!i.inlineCollapsed&&Q("ul",{role:"menu","data-slot":"menu-sub-content",className:n("list-none m-0 p-0",c.subBg),children:Q(Dr.Provider,{value:g,children:a})}),!m&&u&&Q("div",{className:n("absolute left-full top-0 z-50 ml-1 min-w-[180px] rounded-md border bg-popover p-1 text-popover-foreground shadow-md"),children:Q(Dr.Provider,{value:g,children:Q("ul",{role:"menu","data-slot":"menu-sub-content",className:"list-none m-0 p-0",children:a})})})]})}Ml.displayName="Menu.SubMenu";var Dl=Ce.forwardRef(({key:e,icon:t,disabled:o,danger:r,children:a,className:s,style:l,onClick:i,...c},u)=>{let f=Rn("Item"),m=kn[f.theme],p=f.selectedKeys.includes(e),b=f.mode==="inline"&&!f.inlineCollapsed?{paddingLeft:`${f.level*f.inlineIndent+De[f.size].indentBase}px`}:l;return Q("li",{role:"none","data-slot":"menu-item","data-key":e,children:Do("button",{ref:u,type:"button",role:"menuitem",tabIndex:o?-1:0,disabled:o,onClick:g=>{o||(i?.({key:e}),f.onItemClick({key:e,keyPath:[e],item:{key:e,label:a,...o!==void 0?{disabled:o}:{},...r!==void 0?{danger:r}:{}},domEvent:g}))},className:n("w-full flex items-center rounded-md text-left outline-none transition-colors",De[f.size].item,De[f.size].gap,m.item,p?m.itemActive:m.itemHover,r&&"text-destructive data-[selected=true]:bg-destructive/10 data-[selected=true]:text-destructive",o&&"pointer-events-none opacity-50",f.inlineCollapsed&&"justify-center",s),style:b,"data-selected":p||void 0,...c,children:[t&&Q("span",{className:n("inline-flex shrink-0 items-center justify-center",De[f.size].icon),children:t}),!f.inlineCollapsed&&Q("span",{className:"flex-1 truncate",children:a})]})})});Dl.displayName="Menu.Item";function zl(){let e=Rn("Divider"),t=kn[e.theme];return Q("li",{role:"separator","aria-orientation":"horizontal","data-slot":"menu-divider",className:n("my-1 h-px mx-2",t.divider)})}zl.displayName="Menu.Divider";function Ll({title:e,children:t}){let o=Rn("ItemGroup"),r=kn[o.theme];return Do("li",{role:"group","data-slot":"menu-group",className:"py-1",children:[Q("div",{className:n("py-1 text-xs font-semibold text-muted-foreground",o.size==="lg"?"px-4":"px-2",r.item),children:e}),Q("ul",{role:"menu","data-slot":"menu-group-list",className:"list-none m-0 p-0",children:t})]})}Ll.displayName="Menu.ItemGroup";Sn.Item=Dl;Sn.SubMenu=Ml;Sn.Divider=zl;Sn.ItemGroup=Ll;import*as zo from"react";import{ChevronRight as Fh,ChevronLeft as Ah}from"lucide-react";import{jsx as er,jsxs as Fl}from"react/jsx-runtime";function Vh({value:e=[],onChange:t,options:o,placeholder:r="Please select",disabled:a=!1,className:s,displayRender:l,changeOnSelect:i=!1}){let[c,u]=zo.useState(!1),[f,m]=zo.useState([o]),p=zo.useRef(o);p.current=o,zo.useEffect(()=>{let y=p.current;if(e.length===0){m([y]);return}let N=[y],w=y;for(let C of e){let v=w.find(x=>x.value===C);if(v?.children)N.push(v.children),w=v.children;else break}m(N)},[e]);let b=zo.useMemo(()=>{let y=[],N=o;for(let w of e){let C=N.find(v=>v.value===w);if(C)y.push(C.label),N=C.children??[];else break}return y},[e,o]),g=l?l(b,El(e,o)):b.join(" / ")||r,h=(y,N)=>{let w=e.slice(0,y);if(w[y]=N.value,N.children?.length){let C=f.slice(0,y+1);C.push(N.children),m(C),i&&t?.(w.slice(0,y+1),El(w.slice(0,y+1),o))}else m(f.slice(0,y+1)),t?.(w.slice(0,y+1),El(w.slice(0,y+1),o)),u(!1)};return Fl(ce,{open:c,onOpenChange:u,"data-slot":"cascader",children:[Fl(de,{render:er("button",{type:"button",disabled:a,className:n("border-input flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 text-sm",!b.length&&"text-muted-foreground",a&&"cursor-not-allowed opacity-50",s)}),children:[er("span",{className:"truncate",children:g}),er(Fh,{className:"size-4 rotate-90 opacity-50"})]}),er(ue,{align:"start",className:"w-auto p-0",children:er("div",{className:"flex min-w-[480px]",children:f.map((y,N)=>er("div",{className:"max-h-60 min-w-[160px] overflow-y-auto border-r last:border-r-0",children:y.map(w=>{let C=e[N]===w.value;return Fl("button",{type:"button",disabled:w.disabled,className:n("hover:bg-accent flex w-full items-center justify-between px-3 py-2 text-sm",C&&"bg-accent font-medium",w.disabled&&"pointer-events-none opacity-50"),onClick:()=>h(N,w),children:[er("span",{className:"truncate",children:w.label}),w.children?.length&&er(Ah,{className:"size-3.5 rotate-180 opacity-40"})]},w.value)})},N))})})]})}function El(e,t){let o=[],r=t;for(let a of e){let s=r.find(l=>l.value===a);if(s)o.push(s),r=s.children??[];else break}return o}import*as Fs from"react";import{Fragment as Uh,jsx as In,jsxs as ju}from"react/jsx-runtime";var Bh={none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},Hh={auto:"","1/1":"aspect-square","4/3":"aspect-[4/3]","16/9":"aspect-video","3/2":"aspect-[3/2]"};function Oh({className:e,src:t,alt:o="",placeholder:r,preview:a=!1,rounded:s="md",aspectRatio:l="auto",fit:i="cover",fallback:c,...u}){let[f,m]=Fs.useState(!1),[p,b]=Fs.useState(!1),[g,h]=Fs.useState(!1),y=p?void 0:t;return p&&c?In("div",{className:n("inline-flex items-center justify-center",e),children:c}):ju(Uh,{children:[ju("div",{className:n("relative overflow-hidden bg-muted",Bh[s],Hh[l],!f&&"animate-pulse",e),children:[r&&!f&&In("img",{src:r,alt:"",className:"absolute inset-0 size-full object-cover blur-sm transition-opacity",style:{opacity:f?0:1},"aria-hidden":"true"}),In("img",{src:y,alt:o,loading:"lazy",onLoad:()=>m(!0),onError:()=>b(!0),className:n("size-full transition-opacity",i==="cover"&&"object-cover",i==="contain"&&"object-contain",i==="fill"&&"object-fill",!f&&"opacity-0",a&&"cursor-pointer"),onClick:a?()=>h(!0):void 0,...u})]}),a&&g&&In("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80",onClick:()=>h(!1),children:In("img",{src:t,alt:o,className:"max-h-[90vh] max-w-[90vw] rounded-lg object-contain"})})]})}function $h({className:e,children:t,cols:o=3,gap:r="md"}){return In("div",{"data-slot":"image-group",className:n("grid",r==="sm"?"gap-1":r==="lg"?"gap-4":"gap-2",e),style:{gridTemplateColumns:`repeat(${o}, minmax(0, 1fr))`},children:t})}import*as Tn from"react";import{X as Gh}from"lucide-react";import{jsx as As,jsxs as Kh}from"react/jsx-runtime";var Qu={default:"bg-muted text-muted-foreground border-muted",primary:"bg-primary/10 text-primary border-primary/20",success:"bg-green-50 text-green-700 border-green-200 dark:bg-green-950 dark:text-green-300 dark:border-green-900",warning:"bg-amber-50 text-amber-700 border-amber-200 dark:bg-amber-950 dark:text-amber-300 dark:border-amber-900",error:"bg-red-50 text-red-700 border-red-200 dark:bg-red-950 dark:text-red-300 dark:border-red-900",info:"bg-blue-50 text-blue-700 border-blue-200 dark:bg-blue-950 dark:text-blue-300 dark:border-blue-900"};function Xu({className:e,color:t="default",closable:o=!1,onClose:r,bordered:a=!0,icon:s,children:l,...i}){let c=Qu[t]??Qu.default,u=Tn.useMemo(()=>n("inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs font-medium",a&&"border",c,e),[c,a,e]),f=Tn.useCallback(m=>{m.stopPropagation(),r?.()},[r]);return Kh("span",{"data-slot":"tag",className:u,...i,children:[s&&As("span",{className:"shrink-0",children:s}),l,o&&As("button",{type:"button",onClick:f,className:"ml-0.5 shrink-0 rounded-sm p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":"Close",children:As(Gh,{className:"size-3"})})]})}function _h({className:e,children:t,gap:o="sm"}){return As("div",{"data-slot":"tag-group",className:n("flex flex-wrap",o==="sm"?"gap-1":o==="lg"?"gap-3":"gap-2",e),children:t})}var EE=Tn.memo(Xu);import"react";import{CheckCircle2 as Ju,XCircle as Zu,AlertTriangle as Wh,Lock as qh,SearchX as Yh}from"lucide-react";import{jsx as Mn,jsxs as Qh}from"react/jsx-runtime";var ep={success:{icon:Ju,color:"text-green-500"},error:{icon:Zu,color:"text-red-500"},warning:{icon:Wh,color:"text-amber-500"},info:{icon:Ju,color:"text-blue-500"},403:{icon:qh,color:"text-red-500"},404:{icon:Yh,color:"text-muted-foreground"},500:{icon:Zu,color:"text-red-500"}};function jh({status:e="info",title:t,subtitle:o,extra:r,icon:a,className:s}){let l=ep[e]??ep.info,i=l.icon;return Qh("div",{"data-slot":"result",className:n("flex min-h-[400px] flex-col items-center justify-center text-center",s),children:[Mn("div",{className:"mb-4",children:a??Mn(i,{className:n("size-16",l.color)})}),typeof e=="string"&&/^\d{3}$/.test(e)&&Mn("h1",{className:"mb-2 text-6xl font-bold text-muted-foreground/30",children:e}),t&&Mn("h2",{className:"mb-2 text-xl font-semibold",children:t}),o&&Mn("p",{className:"mb-6 max-w-md text-sm text-muted-foreground",children:o}),r&&Mn("div",{className:"flex items-center gap-3",children:r})]})}import*as tp from"react";import{jsx as Dn,jsxs as Vs}from"react/jsx-runtime";function Xh({className:e,title:t,value:o,prefix:r,suffix:a,precision:s,groupSeparator:l=",",trend:i,trendMode:c="default",valueStyle:u,loading:f=!1,...m}){let p=tp.useMemo(()=>{if(o==null)return"--";if(typeof o=="string")return o;let y=o;if(s!==void 0&&(y=Number(y.toFixed(s))),!l)return String(y);let N=String(y).split("."),w=N[0]??"",C=N[1],v=w.replace(/\B(?=(\d{3})+(?!\d))/g,l);return C!==void 0?`${v}.${C}`:v},[o,s,l]),b=i!==void 0&&i>0,g=i!==void 0&&i<0,h="text-muted-foreground";return c==="default"?(b&&(h="text-green-500"),g&&(h="text-red-500")):(b&&(h="text-red-500"),g&&(h="text-green-500")),Vs("div",{"data-slot":"statistic",className:n("space-y-1",e),...m,children:[t&&Dn("div",{className:"text-sm text-muted-foreground",children:t}),Vs("div",{className:"flex items-baseline gap-1",children:[r&&Dn("span",{className:"text-lg text-muted-foreground",children:r}),f?Dn("span",{className:"inline-block h-8 w-24 animate-pulse rounded bg-muted"}):Dn("span",{className:"text-3xl font-bold tabular-nums tracking-tight",style:u,children:p}),a&&Dn("span",{className:"text-lg text-muted-foreground",children:a})]}),i!==void 0&&Vs("div",{className:n("flex items-center gap-1 text-sm",h),children:[Dn("span",{children:b?"\u2191":g?"\u2193":"\u2013"}),Vs("span",{children:[Math.abs(i),"%"]})]})]})}import*as zr from"react";import{toString as Jh,toCanvas as Zh}from"qrcode";import{jsx as Bs}from"react/jsx-runtime";function Al({className:e,value:t,size:o=128,level:r="M",fgColor:a="#000",bgColor:s="#fff",includeMargin:l=!0,renderAs:i="svg",...c}){let[u,f]=zr.useState(""),m=zr.useRef(null),[p,b]=zr.useState();return zr.useEffect(()=>{if(i==="svg")Jh(t,{type:"svg",width:o,margin:l?4:0,errorCorrectionLevel:r,color:{dark:a,light:s}}).then(g=>{f(g),b(void 0)}).catch(g=>b(g.message));else{let g=m.current;g&&Zh(g,t,{width:o,margin:l?4:0,errorCorrectionLevel:r,color:{dark:a,light:s}}).then(()=>b(void 0)).catch(h=>b(h.message))}},[t,o,r,a,s,l,i]),p?Bs("div",{"data-slot":"qrcode",className:n("inline-flex items-center justify-center rounded-md border border-destructive/30 bg-destructive/5 text-destructive text-xs",e),style:{width:o,height:o},...c,children:"QR Error"}):Bs("div",{"data-slot":"qrcode",className:n("inline-block",e),...c,children:i==="svg"?Bs("span",{dangerouslySetInnerHTML:{__html:u},style:{display:"inline-block",width:o,height:o}}):Bs("canvas",{ref:m})})}import*as zn from"react";import{jsx as Hs,jsxs as ey}from"react/jsx-runtime";function Vl({value:e,onChange:t,options:o,onSearch:r,onSelect:a,placeholder:s="Type to search...",disabled:l=!1,clearOnSelect:i=!1,className:c}){let[u,f]=zn.useState(""),[m,p]=zn.useState(!1),[b,g]=zn.useState(-1),h=e!==void 0,y=h?e:u,N=v=>{h||f(v),t?.(v),r?.(v),g(-1)},w=v=>{if(v.disabled)return;let x=i?"":v.value;h||f(x),t?.(x),a?.(v.value,v),p(!1)};zn.useEffect(()=>{y.length>0&&o.length>0?p(!0):o.length===0&&p(!1)},[y,o]);let C=v=>{!m||o.length===0||(v.key==="ArrowDown"?(v.preventDefault(),g(x=>Math.min(x+1,o.length-1))):v.key==="ArrowUp"?(v.preventDefault(),g(x=>Math.max(x-1,0))):v.key==="Enter"&&b>=0?(v.preventDefault(),w(o[b])):v.key==="Escape"&&p(!1))};return ey(ce,{open:m&&o.length>0,onOpenChange:p,"data-slot":"autocomplete",children:[Hs(de,{nativeButton:!1,render:Hs(le,{value:y,onChange:v=>N(v.target.value),onKeyDown:C,placeholder:s,disabled:l,className:c})}),Hs(ue,{align:"start",className:"w-[var(--anchor-width,100%)] p-1",children:o.map((v,x)=>Hs("button",{type:"button",disabled:v.disabled,className:n("flex w-full items-center rounded-sm px-2 py-1.5 text-sm outline-none",x===b&&"bg-accent",v.disabled&&"pointer-events-none opacity-50"),onClick:()=>w(v),onMouseEnter:()=>g(x),children:v.label??v.value},v.value))})]})}import*as $s from"react";import{jsx as Os,jsxs as oy}from"react/jsx-runtime";function ty({value:e,onChange:t,options:o=[],trigger:r="@",onSearch:a,onSelect:s,placeholder:l="Type @ to mention someone...",rows:i=3,disabled:c=!1,className:u}){let[f,m]=$s.useState(""),[p,b]=$s.useState(!1),[g,h]=$s.useState(-1),y=e!==void 0,N=y?e:f,w=v=>{y||m(v),t?.(v);let x=v.lastIndexOf(r);if(x!==-1){let P=v.substring(x+1);if(!P.includes(" ")){a?.(P),b(o.length>0),h(-1);return}}b(!1)},C=v=>{if(v.disabled)return;let x=N.lastIndexOf(r);if(x===-1)return;let S=`${N.substring(0,x)}${r}${v.value} `;y||m(S),t?.(S),s?.(v.value,v),b(!1)};return oy(ce,{open:p&&o.length>0,onOpenChange:b,"data-slot":"mentions",children:[Os(de,{nativeButton:!1,render:Os(wr,{value:N,onChange:v=>w(v.target.value),placeholder:l,rows:i,disabled:c,className:u})}),Os(ue,{align:"start",className:"w-[var(--anchor-width,100%)] p-1",children:o.map((v,x)=>Os("button",{type:"button",disabled:v.disabled,className:n("flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none",x===g&&"bg-accent",v.disabled&&"pointer-events-none opacity-50"),onClick:()=>C(v),onMouseEnter:()=>h(x),children:v.label??v.value},v.value))})]})}import*as rp from"react";import*as Ln from"react";function op(e){let t=Ln.useMemo(()=>new Date(e).getTime(),[e]),[o,r]=Ln.useState(()=>Date.now());Ln.useEffect(()=>{if(Number.isNaN(t)||t<=Date.now())return;let m=setInterval(()=>{let p=Date.now();if(t<=p){r(p),clearInterval(m);return}r(p)},1e3);return()=>clearInterval(m)},[t]);let a=Math.max(0,t-o),s=Math.floor(a/1e3),l=Math.floor(s/86400),i=Math.floor(s%86400/3600),c=Math.floor(s%3600/60),u=s%60,f=a<=0||Number.isNaN(t);return{days:l,hours:i,minutes:c,seconds:u,isFinished:f,totalSeconds:s}}import{jsx as ny}from"react/jsx-runtime";function ry({target:e,format:t="HH:mm:ss",onFinish:o,days:r=!1,className:a}){let{days:s,hours:l,minutes:i,seconds:c,isFinished:u,totalSeconds:f}=op(e);rp.useEffect(()=>{u&&o?.()},[u,o]);let m=b=>String(b).padStart(2,"0"),p;return t==="ms"?p=String(Math.max(0,f*1e3)):t==="mm:ss"?p=`${m(i)}:${m(c)}`:t==="dd:HH:mm:ss"||r?p=`${s}:${m(l)}:${m(i)}:${m(c)}`:p=`${m(l)}:${m(i)}:${m(c)}`,ny("span",{"data-slot":"countdown",className:n("font-mono tabular-nums",a),children:u?"00:00:00":p})}import*as Hl from"react";import{jsx as Bl,jsxs as iy}from"react/jsx-runtime";var ay={sm:"size-3.5",default:"size-5",lg:"size-7"};function sy({value:e,defaultValue:t,onChange:o,max:r=5,size:a="default",readonly:s,allowHalf:l,className:i,iconClassName:c,...u}){let[f,m]=Hl.useState(t??0),p=e!==void 0,b=p?e:f,[g,h]=Hl.useState(null),y=g??b,N=w=>{s||(p||m(w),o?.(w))};return Bl("div",{"data-slot":"rating",role:"radiogroup","aria-label":"\u8BC4\u5206",className:n("inline-flex items-center gap-0.5",i),onMouseLeave:()=>h(null),...u,children:Array.from({length:r}).map((w,C)=>{let v=C+1,x=y>=v,P=l&&!x&&y>=v-.5;return iy("button",{type:"button",role:"radio","aria-checked":b===v,"aria-label":`${v} \u661F`,disabled:s,onMouseEnter:()=>!s&&h(v),onClick:()=>N(v),className:n("relative transition-transform",!s&&"cursor-pointer hover:scale-110",s&&"cursor-default"),children:[l&&Bl("span",{className:"absolute inset-y-0 left-0 w-1/2",onClick:S=>{S.stopPropagation(),N(v-.5)}}),Bl(Sc,{className:n(ay[a],"transition-colors",x||P?"fill-yellow-400 text-yellow-400":"text-muted-foreground/40 fill-transparent",c)})]},C)})})}import"react";import{useTranslation as ly}from"react-i18next";import{jsx as Ra,jsxs as dy}from"react/jsx-runtime";var np={default:{icon:hc},search:{icon:je},error:{icon:ro},network:{icon:Tc}},ap={default:{title:"No data",description:"There are no items to display."},search:{title:"No results",description:"Try adjusting your search or filter criteria."},error:{title:"Something went wrong",description:"An error occurred while loading data."},network:{title:"No connection",description:"Check your internet connection and try again."}};function cy({variant:e="default",icon:t,title:o,description:r,action:a,className:s,centered:l,fullPage:i,texts:c}){let u=!c,{t:f}=ly("data"),m=np[e]??np.default,p=t??m.icon,b=ap[e]??ap.default??{title:"",description:""},g=o??c?.title??(u?f(`emptyState.${e}.title`,b.title):b.title),h=r??c?.description??(u?f(`emptyState.${e}.description`,b.description):b.description);return dy("div",{"data-slot":"empty-state",className:n("flex flex-col items-center justify-center py-12 text-center",l&&"min-h-[400px] items-center justify-center",i&&"min-h-svh",s),children:[Ra("div",{className:"bg-muted flex size-12 items-center justify-center rounded-full",children:Ra(p,{className:"text-muted-foreground size-6"})}),Ra("h3",{className:"mt-4 text-lg font-semibold",children:g}),Ra("p",{className:"text-muted-foreground mt-1 max-w-sm text-sm",children:h}),a&&Ra("div",{className:"mt-4",children:a})]})}import"react";import{jsx as fy,jsxs as my}from"react/jsx-runtime";var uy={sm:"h-7 px-2 text-xs",default:"h-8 px-3 text-sm",lg:"h-9 px-4 text-sm"};function py({options:e,value:t,defaultValue:o,onChange:r,size:a="default",disabled:s,className:l,orientation:i="horizontal"}){return fy(xl,{"data-slot":"segmented-control",value:t?[t]:o?[o]:[],onValueChange:c=>{c.length>0&&r?.(c[c.length-1])},orientation:i,className:n("bg-muted/30 inline-flex items-center rounded-md border p-0.5",i==="vertical"&&"flex-col items-stretch",l),children:e.map(c=>my(hl,{value:c.value,disabled:s||c.disabled,className:n("data-[pressed]:bg-background rounded-sm border-0 bg-transparent shadow-none transition-all data-[pressed]:shadow-xs",uy[a]),children:[c.icon,c.label]},c.value))})}import*as tr from"react";import{useTranslation as gy}from"react-i18next";import{Fragment as vy,jsx as jt,jsxs as Lo}from"react/jsx-runtime";function by({steps:e,open:t,onOpenChange:o,onComplete:r,onSkip:a,storageKey:s,className:l}){let{t:i}=gy("tour"),[c,u]=tr.useState(()=>{if(typeof window>"u"||!s)return!0;try{return localStorage.getItem(s)!=="1"}catch{return!0}}),[f,m]=tr.useState(0),[p,b]=tr.useState(null),g=t??c,h=tr.useCallback(P=>{t===void 0&&u(P),o?.(P)},[t,o]);tr.useEffect(()=>{if(!g)return;let P=e[f];if(!P)return;let S=typeof P.target=="function"?P.target():document.querySelector(P.target);if(!S)return;S.scrollIntoView({behavior:"smooth",block:"center"});let R=()=>b(S.getBoundingClientRect());R();let k=new ResizeObserver(R);return k.observe(S),window.addEventListener("scroll",R,!0),window.addEventListener("resize",R),()=>{k.disconnect(),window.removeEventListener("scroll",R,!0),window.removeEventListener("resize",R)}},[g,f,e]);let y=P=>{P?a?.():r?.(),s&&localStorage.setItem(s,"1"),h(!1),m(0)};if(!g||!p)return null;let N=e[f]??{target:"",title:""},w=N.placement??"bottom",C=N.offset??8,v=Math.min(320,window.innerWidth-16),x=(()=>{let P={position:"fixed",zIndex:9999};return w==="bottom"?(P.top=p.bottom+C,P.left=p.left+p.width/2-v/2):w==="top"?(P.top=p.top-C-200,P.left=p.left+p.width/2-v/2):w==="right"?(P.top=p.top+p.height/2-100,P.left=p.right+C):(P.top=p.top+p.height/2-100,P.left=p.left-C-v),Object.assign(P,{left:Math.max(8,Math.min(P.left,window.innerWidth-v-8)),top:Math.max(8,Math.min(P.top,window.innerHeight-220)),width:v}),P})();return Lo(vy,{children:[jt("div",{"aria-hidden":!0,className:"fixed inset-0 z-[9998] bg-black/40 transition-opacity",onClick:()=>y(!0)}),jt("div",{"aria-hidden":!0,className:"ring-primary/60 fixed z-[9999] rounded-md ring-4 transition-all",style:{top:p.top-4,left:p.left-4,width:p.width+8,height:p.height+8}}),Lo(pi,{"data-slot":"tour",className:n("shadow-xl",l),style:x,children:[jt(mi,{className:"pb-2",children:Lo("div",{className:"flex items-start justify-between gap-2",children:[Lo("div",{children:[Lo(gi,{children:[f+1," / ",e.length]}),jt(fi,{className:"text-base",children:N.title})]}),jt(D,{variant:"ghost",size:"icon-xs",onClick:()=>y(!0),"aria-label":i("tour.close"),children:jt(oe,{})})]})}),N.description&&jt(bi,{className:"text-muted-foreground text-sm",children:N.description}),Lo(vi,{className:"flex flex-wrap items-center justify-between gap-2",children:[jt(D,{variant:"ghost",size:"sm",onClick:()=>y(!0),children:i("tour.skip")}),Lo("div",{className:"flex flex-wrap items-center justify-end gap-1",children:[Lo(D,{variant:"outline",size:"sm",disabled:f===0,onClick:()=>m(P=>Math.max(0,P-1)),children:[jt(Ye,{}),i("tour.previous")]}),f<e.length-1?Lo(D,{size:"sm",onClick:()=>m(P=>P+1),children:[i("tour.next"),jt(te,{})]}):jt(D,{size:"sm",onClick:()=>y(!1),children:i("tour.complete")})]})]})]})]})}import*as Us from"react";import{useTranslation as xy}from"react-i18next";import{jsx as or}from"react/jsx-runtime";function hy({text:e,image:t,rotate:o=-22,gap:r=[120,100],fontSize:a=14,className:s,fullPage:l=!0,zIndex:i=1e3,opacity:c=.08,color:u="#000"}){let{t:f}=xy("data"),m=e??f("watermark.default"),[p,b]=Us.useState([]),[g,h]=r;return Us.useEffect(()=>{if(!l)return;let y=()=>{let N=Math.ceil(window.innerWidth/g)+1,w=Math.ceil(window.innerHeight/h)+1,C=[];for(let v=0;v<w;v++)for(let x=0;x<N;x++)C.push({x:x*g,y:v*h});b(C)};return y(),window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[l,g,h]),l?or("div",{"data-slot":"watermark","aria-hidden":!0,className:n("pointer-events-none fixed inset-0 overflow-hidden",s),style:{zIndex:i},children:p.map((y,N)=>or("div",{className:"absolute",style:{left:y.x,top:y.y,width:g,height:h,transform:`rotate(${o}deg)`,display:"flex",alignItems:"center",justifyContent:"center"},children:t?or("img",{src:t,alt:"",style:{opacity:c,maxHeight:"60%"}}):or("span",{className:"font-medium whitespace-nowrap select-none",style:{color:u,fontSize:a,opacity:c},children:m})},N))}):or("div",{"data-slot":"watermark","aria-hidden":!0,className:n("pointer-events-none absolute inset-0 overflow-hidden",s),style:{zIndex:i},children:or("div",{className:"absolute inset-0 grid place-items-center",style:{transform:`rotate(${o}deg)`},children:t?or("img",{src:t,alt:"",style:{opacity:c,maxWidth:"60%"}}):or("span",{className:"font-medium whitespace-nowrap select-none",style:{color:u,fontSize:a,opacity:c},children:m})})})}import*as po from"react";import{useTranslation as yy}from"react-i18next";import{Fragment as Cy,jsx as wt,jsxs as rr}from"react/jsx-runtime";function Ny({options:e,value:t,onChange:o,placeholder:r,searchPlaceholder:a,emptyText:s,disabled:l,className:i,align:c="start",clearable:u=!0,searchable:f=!0,renderOption:m}){let{t:p}=yy("ui"),[b,g]=po.useState(!1),h=r??p("combobox.placeholder"),y=a??p("combobox.searchPlaceholder"),N=s??p("combobox.emptyText"),w=e.find(C=>C.value===t);return rr(ce,{open:b,onOpenChange:g,"data-slot":"combobox",children:[rr(de,{render:wt(D,{variant:"outline",role:"combobox",disabled:l,"aria-expanded":b,className:n("w-[200px] justify-between font-normal",!w&&"text-muted-foreground",i)}),children:[wt("span",{className:"truncate",children:w?.label??h}),rr("div",{className:"flex items-center gap-1",children:[u&&w&&wt("span",{role:"button","aria-label":p("combobox.clear"),onClick:C=>{C.stopPropagation(),o?.(void 0)},className:"hover:bg-muted rounded p-0.5",children:wt(oe,{className:"size-3.5 opacity-60 hover:opacity-100"})}),wt(we,{className:"size-4 opacity-50"})]})]}),b&&wt(ue,{align:c,className:"w-[var(--anchor-width)] p-0",children:wt(wy,{options:e,value:t,onChange:o,onClose:()=>g(!1),searchPlaceholder:y,searchable:f,emptyText:N,...m?{renderOption:m}:{}})})]})}function wy({options:e,value:t,onChange:o,onClose:r,searchPlaceholder:a,searchable:s,emptyText:l,renderOption:i}){let[c,u]=po.useState(""),f=po.useRef(null);po.useEffect(()=>{f.current?.focus()},[]);let m=po.useMemo(()=>{if(!c)return e;let b=c.toLowerCase();return e.filter(g=>g.label.toLowerCase().includes(b)||g.value.toLowerCase().includes(b)||g.description?.toLowerCase().includes(b)||g.keywords?.some(h=>h.toLowerCase().includes(b)))},[e,c]),p=po.useMemo(()=>{let b=new Map;for(let g of m){let h=g.group??"",y=b.get(h)??[];y.push(g),b.set(h,y)}return Array.from(b.entries())},[m]);return rr(Cy,{children:[s&&rr("div",{className:"flex items-center gap-2 border-b px-3 py-2",children:[wt(je,{className:"size-4 shrink-0 opacity-50"}),wt(le,{ref:f,value:c,onChange:b=>u(b.target.value),placeholder:a,className:"h-7 border-0 bg-transparent p-0 shadow-none focus-visible:ring-0"})]}),rr("div",{className:"max-h-64 overflow-y-auto p-1",children:[p.length===0&&wt("div",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:l}),p.map(([b,g])=>rr("div",{children:[b&&wt("div",{className:"text-muted-foreground px-2 py-1 text-xs font-medium",children:b}),g.map(h=>{let y=h.value===t;return rr(D,{variant:"ghost",size:"sm",...h.disabled!==void 0?{disabled:h.disabled}:{},onClick:()=>{o?.(h.value),r()},className:n("h-auto w-full justify-start gap-2 rounded-sm px-2 py-1.5 font-normal",y&&"bg-accent/50",h.disabled&&"pointer-events-none opacity-50"),children:[wt("span",{className:"flex-1 truncate",children:i?i(h):h.label}),y&&wt(ie,{className:"size-4 shrink-0"})]},h.value)})]},b||"_default"))]})]})}import*as $l from"react";import{useTranslation as Py}from"react-i18next";import{jsx as ka,jsxs as Ol}from"react/jsx-runtime";var Ry={"bottom-right":"right-4","bottom-left":"left-4","bottom-center":"left-1/2 -translate-x-1/2"};function ky({icon:e,label:t,position:o="bottom-right",offset:r=4,className:a,...s}){return Ol(D,{"data-slot":"fab",size:t?"default":"icon-lg",className:n("fixed bottom-4 z-40 rounded-full shadow-lg",Ry[o],a),style:{bottom:`calc(${r} * 0.25rem + 1rem)`},...s,children:[e,t&&ka("span",{children:t})]})}function Sy({icon:e,actions:t,position:o="bottom-right"}){let{t:r}=Py("navigation"),[a,s]=$l.useState(!1);return Ol("div",{"data-slot":"fab-speed-dial",className:n("fixed bottom-4 z-40 flex flex-col-reverse items-end gap-2",o==="bottom-right"?"right-4":"left-4"),children:[a&&ka("div",{className:"flex flex-col-reverse items-end gap-2",children:t.map((l,i)=>Ol("div",{className:"flex items-center gap-2",children:[ka("span",{className:"bg-foreground/90 text-background rounded-md px-2 py-1 text-xs shadow-md",children:l.label}),ka(D,{size:"icon",variant:"secondary",onClick:()=>{l.onClick?.(),s(!1)},className:"rounded-full shadow-md",children:l.icon})]},i))}),ka(D,{size:"icon-lg",onClick:()=>s(l=>!l),className:"rounded-full shadow-lg","aria-expanded":a,"aria-label":r(a?"fab.speedDialClose":"fab.speedDialOpen"),children:e})]})}import*as Eo from"react";import{jsx as sp}from"react/jsx-runtime";function Iy({items:e,activeKey:t,onActiveChange:o,offsetTop:r=80,getContainer:a,className:s,...l}){let[i,c]=Eo.useState(e[0]?.key??""),u=t??i,f=Eo.useRef(null),m=Eo.useRef(u);m.current=u;let p=Eo.useRef(o);p.current=o,Eo.useEffect(()=>{f.current=a?.()??window},[a]),Eo.useEffect(()=>{let g=f.current;if(!g)return;let h=()=>{for(let y=e.length-1;y>=0;y--){let N=e[y];if(!N)continue;let w=document.querySelector(N.href);if(w&&w.getBoundingClientRect().top<=r){N.key!==m.current&&(c(N.key),p.current?.(N.key));return}}};return g.addEventListener("scroll",h,{passive:!0}),h(),()=>g.removeEventListener("scroll",h)},[e,r,a]);let b=g=>h=>{h.preventDefault();let y=document.querySelector(g.href);y&&(y.scrollIntoView({behavior:"smooth",block:"start"}),c(g.key),o?.(g.key),window.history.replaceState(null,"",g.href))};return sp("nav",{"data-slot":"anchor",className:n("flex flex-col gap-1",s),...l,children:e.map(g=>sp("a",{href:g.href,onClick:b(g),className:n("block rounded-md px-3 py-1.5 text-sm transition-colors",g.level===2&&"pl-6",g.level===3&&"pl-9",g.key===u?"bg-muted font-medium text-foreground":"text-muted-foreground hover:text-foreground"),children:g.label},g.key))})}import"react";import{jsx as Lr,jsxs as ip}from"react/jsx-runtime";function Ty({bordered:e=!1,direction:t="vertical",size:o="default",className:r,children:a,...s}){return Lr("div",{"data-slot":"list","data-size":o,className:n("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",o==="sm"&&"text-xs",o==="lg"&&"text-base",e&&"divide-y divide-border rounded-lg border",r),...s,children:a})}function My({className:e,...t}){return Lr("div",{"data-slot":"list-header",className:n("flex items-center px-3 py-2 font-medium text-sm text-foreground",e),...t})}function Dy({avatar:e,children:t,description:o,extra:r,onClick:a,className:s,...l}){return ip("div",{"data-slot":"list-item",className:n("flex items-center gap-3 px-3 py-2.5",a&&"cursor-pointer hover:bg-muted transition-colors",s),onClick:a,role:a?"button":void 0,tabIndex:a?0:void 0,...l,children:[e&&Lr("div",{className:"shrink-0",children:e}),ip("div",{className:"flex-1 min-w-0",children:[t&&Lr("div",{className:"text-sm font-medium truncate",children:t}),o&&Lr("div",{className:"text-xs text-muted-foreground truncate",children:o})]}),r&&Lr("div",{className:"shrink-0 text-sm text-muted-foreground",children:r})]})}function zy({className:e,...t}){return Lr("div",{"data-slot":"list-footer",className:n("flex items-center justify-center px-3 py-2 text-sm text-primary hover:bg-muted transition-colors cursor-pointer",e),...t})}import*as cp from"react";import{jsx as Fo,jsxs as lp}from"react/jsx-runtime";var Ly={info:Fo(ao,{className:"size-4"}),success:Fo(Oo,{className:"size-4"}),warning:Fo(ro,{className:"size-4"}),error:Fo(Co,{className:"size-4"})},Ey={info:"bg-blue-50 text-blue-800 border-blue-200 dark:bg-blue-950 dark:text-blue-200 dark:border-blue-900",success:"bg-green-50 text-green-800 border-green-200 dark:bg-green-950 dark:text-green-200 dark:border-green-900",warning:"bg-amber-50 text-amber-800 border-amber-200 dark:bg-amber-950 dark:text-amber-200 dark:border-amber-900",error:"bg-red-50 text-red-800 border-red-200 dark:bg-red-950 dark:text-red-200 dark:border-red-900"},Fy={info:"text-blue-600 dark:text-blue-300",success:"text-green-600 dark:text-green-300",warning:"text-amber-600 dark:text-amber-300",error:"text-red-600 dark:text-red-300"};function Ay({type:e="info",closable:t=!0,title:o,icon:r,onClose:a,banner:s=!1,className:l,children:i,...c}){let[u,f]=cp.useState(!0);if(!u)return null;let m=()=>{f(!1),a?.()};return lp("div",{"data-slot":"notification",role:"alert",className:n("flex gap-3 rounded-lg border p-3 text-sm",Ey[e],s&&"rounded-none border-x-0",l),...c,children:[Fo("span",{className:n("mt-0.5 shrink-0",Fy[e]),children:r??Ly[e]}),lp("div",{className:"min-w-0 flex-1",children:[o&&Fo("div",{className:"mb-1 font-medium",children:o}),Fo("div",{children:i})]}),t&&Fo("button",{type:"button",onClick:m,className:"shrink-0 rounded-md p-0.5 opacity-70 transition-opacity hover:opacity-100","aria-label":"Close",children:Fo(oe,{className:"size-4"})})]})}import{createContext as Vy,useContext as By,useEffect as iF,useState as lF,useCallback as cF}from"react";import{jsx as uF}from"react/jsx-runtime";var Hy=Vy(void 0);function Ul(){let e=By(Hy);if(!e)throw new Error("useTheme must be used within a <ThemeProvider>");return e}import{Toaster as Oy}from"sonner";import{jsx as En}from"react/jsx-runtime";var Sa=({...e})=>{let{theme:t}=Ul();return En(Oy,{theme:t??"system",className:"toaster group","data-slot":"sonner",icons:{success:En(qa,{className:"size-4"}),info:En(ao,{className:"size-4"}),warning:En(es,{className:"size-4"}),error:En(Qa,{className:"size-4"}),loading:En(Ya,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},toastOptions:{classNames:{toast:"cn-toast"}},...e})};import*as Fn from"react";import{jsx as dp}from"react/jsx-runtime";function Er(e,t){return t==null?"":`${e}:col-span-${t}`}function Fr(e,t){return t==null?"":`${e}:col-start-[${t+1}]`}function Ar(e,t){return t==null?"":`${e}:order-${t}`}function $y({gutter:e=0,align:t="top",justify:o="start",wrap:r=!0,className:a,style:s,children:l,...i}){let[c,u]=typeof e=="number"?[e,0]:e,f={top:"items-start",middle:"items-center",bottom:"items-end",stretch:"items-stretch"},m={start:"justify-start",end:"justify-end",center:"justify-center","space-around":"justify-around","space-between":"justify-between","space-evenly":"justify-evenly"},p={...c>0&&{marginLeft:-c/2,marginRight:-c/2},...u>0&&{rowGap:u},...s};return dp("div",{"data-slot":"row",className:n("grid grid-cols-24",!r&&"flex-nowrap",f[t],m[o],a),style:p,...i,children:Fn.Children.map(l,b=>{if(!Fn.isValidElement(b))return b;let g=b.props;return Fn.cloneElement(b,{...g,_gutter:c})})})}function Uy({span:e,offset:t,order:o,xs:r,sm:a,md:s,lg:l,xl:i,xxl:c,className:u,style:f,children:m,_gutter:p,...b}){let g=[Er("",e),Fr("",t),Ar("",o),r&&Er("xs",r.span),r&&Fr("xs",r.offset),r&&Ar("xs",r.order),a&&Er("sm",a.span),a&&Fr("sm",a.offset),a&&Ar("sm",a.order),s&&Er("md",s.span),s&&Fr("md",s.offset),s&&Ar("md",s.order),l&&Er("lg",l.span),l&&Fr("lg",l.offset),l&&Ar("lg",l.order),i&&Er("xl",i.span),i&&Fr("xl",i.offset),i&&Ar("xl",i.order),c&&Er("2xl",c.span),c&&Fr("2xl",c.offset),c&&Ar("2xl",c.order)].filter(Boolean).join(" "),h={...p!=null&&p>0&&{paddingLeft:p/2,paddingRight:p/2},...f};return dp("div",{className:n(g,u),style:h,"data-slot":"col",...b,children:m})}import"react";import{jsx as Gs,jsxs as _y}from"react/jsx-runtime";function Gy({value:e,onChange:t,onSend:o,placeholder:r,disabled:a,className:s}){let l=u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),a||o?.())},i=u=>{t?.(u.target.value)},c=()=>{a||o?.()};return _y("div",{"data-slot":"chat-input",className:n("flex items-end gap-2 rounded-lg border border-input bg-background p-2",a&&"pointer-events-none opacity-50",s),children:[Gs("label",{htmlFor:"chat-input-field",className:"sr-only",children:r??"\u6D88\u606F\u8F93\u5165"}),Gs("textarea",{id:"chat-input-field","data-slot":"chat-input-field",rows:1,className:"min-h-8 flex-1 resize-none bg-transparent px-1 py-1 text-sm outline-none placeholder:text-muted-foreground",value:e,placeholder:r,disabled:a,onChange:i,onKeyDown:l}),Gs("button",{type:"button","data-slot":"chat-input-send","aria-label":"\u53D1\u9001",className:"inline-flex size-8 shrink-0 items-center justify-center rounded-md bg-primary text-primary-foreground transition-colors hover:bg-primary/80 disabled:pointer-events-none disabled:opacity-50",disabled:a,onClick:c,children:Gs(kc,{})})]})}import"react";import{jsx as _s,jsxs as Gl}from"react/jsx-runtime";function Ky({role:e="assistant",content:t,avatar:o,name:r,time:a,className:s}){let l=e==="user",i=e==="system";return Gl("div",{"data-slot":"chat-message","data-role":e,className:n("flex w-full gap-2",l&&"flex-row-reverse justify-start",!l&&!i&&"flex-row justify-start",i&&"justify-center",s),children:[o!=null&&!i?_s("div",{"data-slot":"chat-message-avatar",className:"shrink-0",children:o}):null,Gl("div",{"data-slot":"chat-message-body",className:n("flex max-w-[80%] flex-col gap-1",l&&"items-end",!l&&!i&&"items-start"),children:[(r!=null||a!=null)&&!i?Gl("div",{"data-slot":"chat-message-meta",className:"flex items-center gap-1 text-xs text-muted-foreground",children:[r!=null?_s("span",{children:r}):null,a!=null?_s("span",{children:a}):null]}):null,_s("div",{"data-slot":"chat-message-bubble",className:n("rounded-lg px-3 py-2 text-sm whitespace-pre-wrap",l&&"bg-primary text-primary-foreground rounded-br-sm",!l&&!i&&"bg-muted text-foreground rounded-bl-sm",i&&"bg-muted/50 text-muted-foreground text-xs"),children:t})]})]})}import{jsx as up}from"react/jsx-runtime";function Wy(e={}){let{position:t="top-right",visibleToasts:o=5}=e;return up("div",{"data-slot":"message-provider",children:up(Sa,{position:t,visibleToasts:o})})}import*as Ia from"react";import{jsx as Ks,jsxs as Yy}from"react/jsx-runtime";function qy({onRefresh:e,refreshing:t=!1,children:o,threshold:r=60,className:a}){let[s,l]=Ia.useState(0),i=Ia.useRef(null),c=Ia.useRef(!1),u=g=>{t||(i.current=g.touches[0]?.clientY??null,c.current=!0)},f=g=>{if(!c.current||i.current===null||t)return;let y=(g.touches[0]?.clientY??0)-i.current;y>0&&l(y)},m=()=>{c.current=!1,s>=r&&!t&&e?.(),l(0),i.current=null},p=t||s>0,b=t?r:s;return Yy("div",{"data-slot":"mobile-pull-refresh",className:n("relative overflow-hidden touch-none",a),onTouchStart:u,onTouchMove:f,onTouchEnd:m,children:[Ks("div",{"data-slot":"mobile-pull-refresh-indicator","aria-hidden":p?"false":"true",className:"flex items-center justify-center text-xs text-muted-foreground transition-opacity",style:{height:`${b}px`,opacity:p?1:0},children:t?Ks("span",{"data-slot":"mobile-pull-refresh-spinner",className:"animate-spin",children:"\u27F3"}):Ks("span",{children:s>=r?"\u91CA\u653E\u5237\u65B0":"\u4E0B\u62C9\u5237\u65B0"})}),Ks("div",{"data-slot":"mobile-pull-refresh-content",style:{transform:`translateY(${t?r:0}px)`},children:o})]})}import*as An from"react";import{jsx as Ta,jsxs as Qy}from"react/jsx-runtime";function jy({leftActions:e=[],rightActions:t=[],children:o,className:r,actionWidth:a=80}){let[s,l]=An.useState(0),i=An.useRef(null),c=An.useRef(!1),u=An.useRef(0),f=e.length*a,m=t.length*a,p=N=>N==="destructive"?"bg-destructive/80 text-destructive-foreground":N==="primary"?"bg-primary text-primary-foreground":"bg-muted text-foreground",b=N=>{i.current=N.touches[0]?.clientX??null,c.current=!0,u.current=s},g=N=>{if(!c.current||i.current===null)return;let C=(N.touches[0]?.clientX??0)-i.current,v=u.current+C;v>0&&(v=Math.min(v,f)),v<0&&(v=Math.max(v,-m)),l(v)},h=()=>{c.current=!1,i.current=null,s>a/2?l(f):s<-a/2?l(-m):l(0)},y=N=>{l(0),N.onClick()};return Qy("div",{"data-slot":"mobile-swipe-action",className:n("relative overflow-hidden touch-none select-none",r),children:[e.length>0?Ta("div",{"data-slot":"mobile-swipe-action-left",className:"absolute inset-y-0 left-0 flex",children:e.map(N=>Ta("button",{type:"button","data-slot":"mobile-swipe-action-button","aria-label":N.label,onClick:()=>y(N),style:{width:`${a}px`},className:n("flex items-center justify-center text-sm text-white",p(N.color)),children:N.label},N.key))}):null,t.length>0?Ta("div",{"data-slot":"mobile-swipe-action-right",className:"absolute inset-y-0 right-0 flex",children:t.map(N=>Ta("button",{type:"button","data-slot":"mobile-swipe-action-button","aria-label":N.label,onClick:()=>y(N),style:{width:`${a}px`},className:n("flex items-center justify-center text-sm text-white",p(N.color)),children:N.label},N.key))}):null,Ta("div",{"data-slot":"mobile-swipe-action-content",className:"relative bg-background transition-transform",style:{transform:`translateX(${s}px)`},onTouchStart:b,onTouchMove:g,onTouchEnd:h,children:o})]})}import"react";import{jsx as pp}from"react/jsx-runtime";function Xy(e,t,o){if(t===void 0)return!0;let r=Array.isArray(t)?t:[t];return r.length===0?!0:o==="all"?r.every(a=>e.includes(a)):r.some(a=>e.includes(a))}function Jy({permissions:e,require:t,mode:o="any",fallback:r=null,children:a,className:s}){return Xy(e??[],t,o)?pp("div",{"data-slot":"with-permission","data-allowed":"true",className:n("",s),children:a}):pp("div",{"data-slot":"with-permission","data-allowed":"false",className:n("",s),children:r})}import"react";import{jsx as mp}from"react/jsx-runtime";var Zy={inherit:{width:"1em",height:"1em"},sm:{width:"0.875rem",height:"0.875rem"},md:{width:"1.25rem",height:"1.25rem"},lg:{width:"1.5rem",height:"1.5rem"},xl:{width:"2rem",height:"2rem"}};function e0({icon:e,size:t="inherit",spin:o,pulse:r,className:a,...s}){let l=Zy[t];return mp("span",{"data-slot":"icon",className:n("inline-flex items-center justify-center",o&&"animate-spin",r&&"animate-pulse",a),"aria-hidden":"true",...s,children:mp(e,{style:{width:l.width,height:l.height}})})}import*as nr from"react";import{useTranslation as gp}from"react-i18next";import{Fragment as r0,jsx as $e,jsxs as mo}from"react/jsx-runtime";var t0=(e,t)=>t.label.toLowerCase().includes(e.toLowerCase());function o0({dataSource:e,targetKeys:t=[],onChange:o,titles:r,searchable:a=!0,filterOption:s=t0,render:l,disabled:i,className:c,oneWay:u=!1}){let{t:f}=gp("transfer"),m=r??[f("transfer.sourceTitle"),f("transfer.targetTitle")],[p,b]=nr.useState([]),[g,h]=nr.useState([]),[y,N]=nr.useState(""),[w,C]=nr.useState(""),v=nr.useMemo(()=>e.filter(I=>!t.includes(I.key)),[e,t]),x=nr.useMemo(()=>e.filter(I=>t.includes(I.key)),[e,t]),P=v.filter(I=>s(y,I)),S=x.filter(I=>s(w,I)),R=()=>{if(i)return;let I=Array.from(new Set([...t,...p]));o?.(I),b([])},k=()=>{if(i)return;let I=t.filter(H=>!g.includes(H));o?.(I),h([])},T=I=>{i||(o?.(Array.from(new Set([...t,I]))),b(H=>H.filter(U=>U!==I)))},z=I=>{i||u||(o?.(t.filter(H=>H!==I)),h(H=>H.filter(U=>U!==I)))},W=I=>{b(H=>H.includes(I)?H.filter(U=>U!==I):[...H,I])},$=I=>{b(I?P.map(H=>H.key):[])},E=I=>{h(H=>H.includes(I)?H.filter(U=>U!==I):[...H,I])},A=I=>{h(I?S.map(H=>H.key):[])};return mo("div",{"data-slot":"transfer",className:n("flex min-w-0 flex-col gap-2 sm:flex-row sm:items-stretch",i&&"opacity-50",c),children:[$e(fp,{title:m[0],items:P,selected:p,onToggle:W,onToggleAll:$,searchable:a,searchValue:y,onSearchChange:N,...l?{render:l}:{},...i!==void 0?{disabled:i}:{},onMoveItem:T}),mo("div",{className:"flex flex-row items-center justify-center gap-2 sm:flex-col",children:[$e(D,{variant:"outline",size:"icon",onClick:R,disabled:p.length===0||i,"aria-label":f("transfer.moveToTarget"),children:$e(te,{className:"rotate-90 sm:rotate-0"})}),!u&&$e(D,{variant:"outline",size:"icon",onClick:k,disabled:g.length===0||i,"aria-label":f("transfer.moveToSource"),children:$e(Ye,{className:"rotate-90 sm:rotate-0"})})]}),$e(fp,{title:m[1],items:S,selected:g,onToggle:E,onToggleAll:A,searchable:a,searchValue:w,onSearchChange:C,...l?{render:l}:{},...i!==void 0?{disabled:i}:{},...u?{}:{onMoveItem:z}})]})}function fp({title:e,items:t,selected:o,onToggle:r,onToggleAll:a,searchable:s,searchValue:l,onSearchChange:i,render:c,disabled:u,onMoveItem:f}){let{t:m}=gp("transfer"),p=t.length>0&&t.every(h=>o.includes(h.key)),b=t.some(h=>o.includes(h.key)),g=h=>{u||h.disabled||f?.(h.key)};return mo("div",{className:"flex h-72 w-full min-w-0 flex-col rounded-md border",children:[mo("div",{className:"flex items-center justify-between border-b px-3 py-2 text-sm font-medium",children:[$e("span",{children:e}),mo("span",{className:"text-muted-foreground text-xs",children:[o.length,"/",t.length]})]}),s&&mo("div",{className:"flex items-center gap-2 border-b px-3 py-2",children:[$e(je,{className:"size-4 shrink-0 opacity-50"}),$e(le,{value:l,onChange:h=>i(h.target.value),placeholder:m("transfer.search"),className:"h-7 border-0 bg-transparent p-0 shadow-none focus-visible:ring-0"})]}),mo("div",{className:"flex items-center border-b px-3 py-1.5",children:[mo(D,{variant:"ghost",size:"icon-xs","aria-label":m("transfer.selectAll"),...u!==void 0?{disabled:u||t.length===0}:{disabled:t.length===0},className:n("size-4 rounded-[4px] border p-0",p?"border-primary bg-primary text-primary-foreground hover:bg-primary/80":b?"border-primary bg-primary/50 text-primary-foreground hover:bg-primary/50":"border-input"),onClick:()=>a?.(!p),children:[p&&$e(ie,{className:"size-3"}),!p&&b&&$e("span",{className:"bg-primary-foreground block h-0.5 w-2"})]}),$e("span",{className:"text-muted-foreground ml-2 text-xs",children:m("transfer.selectAll")})]}),$e("div",{className:"flex-1 overflow-y-auto p-1",children:t.length===0?$e("div",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:m("transfer.noData")}):t.map(h=>mo("label",{onDoubleClick:()=>g(h),className:n("flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm","hover:bg-accent",h.disabled&&"pointer-events-none opacity-50"),children:[$e(ht,{checked:o.includes(h.key),onCheckedChange:()=>r(h.key),disabled:h.disabled||u}),$e("div",{className:"min-w-0 flex-1 truncate",children:c?c(h):mo(r0,{children:[$e("div",{className:"truncate",children:h.label}),h.description&&$e("div",{className:"text-muted-foreground truncate text-xs",children:h.description})]})})]},h.key))})]})}import*as _l from"react";var n0="zh-CN";function a0(){return n0}function bp(e,t={timeStyle:"short"},o=a0()){let r=e instanceof Date?e:new Date(e);return Number.isNaN(r.getTime())?"-":new Intl.DateTimeFormat(o,t).format(r)}import{jsx as bt,jsxs as Ma}from"react/jsx-runtime";function Da(e){return e.toString().padStart(2,"0")}function vp(e,t){let o=e>=12?"PM":"AM";return`${e%12||12}:${Da(t)} ${o}`}function s0(e){let t=/^(\d{1,2}):(\d{2})$/.exec(e);if(t){let r=Number(t[1]??"0"),a=Number(t[2]??"0");if(r>=0&&r<24&&a>=0&&a<60)return{h:r,m:a}}let o=/^(\d{1,2}):(\d{2})\s*(AM|PM)$/i.exec(e);if(o){let r=Number(o[1]??"0"),a=Number(o[2]??"0"),s=(o[3]??"AM").toUpperCase();if(s==="PM"&&r<12&&(r+=12),s==="AM"&&r===12&&(r=0),r>=0&&r<24&&a>=0&&a<60)return{h:r,m:a}}return null}function i0({value:e,onChange:t,step:o=1,format:r="24h",disabled:a,placeholder:s="\u9009\u62E9\u65F6\u95F4",className:l}){let i=e?s0(e):null,c=_l.useMemo(()=>{let m=[],p=r==="12h"?12:24;for(let b=r==="12h"?1:0;b<p;b++)m.push(b);return m},[r]),u=_l.useMemo(()=>{let m=[];for(let p=0;p<60;p+=o)m.push(p);return m},[o]),f=(m,p)=>{let b=r==="12h"?vp(m,p):`${Da(m)}:${Da(p)}`;t?.(b)};return bt("div",{"data-slot":"time-picker",children:Ma(ce,{children:[Ma(de,{render:bt(D,{variant:"outline",disabled:a,className:n("w-[160px] justify-start text-left font-normal",!e&&"text-muted-foreground",l)}),children:[bt(pc,{}),e??bt("span",{children:s})]}),bt(ue,{className:"w-auto p-3",align:"start",children:Ma("div",{className:"flex items-center gap-2",children:[Ma(sn,{value:i?String(i.h):void 0,onValueChange:m=>{let p=i?.m??0;f(Number(m),p)},children:[bt(cn,{className:"w-[88px]","aria-label":"\u5C0F\u65F6",children:bt(ln,{placeholder:"\u65F6"})}),bt(dn,{className:"max-h-64",children:c.map(m=>bt(un,{value:String(m),children:r==="12h"?m===12?12:m:Da(m)},m))})]}),bt("span",{children:":"}),Ma(sn,{value:i?String(i.m):void 0,onValueChange:m=>{let p=i?.h??0;f(p,Number(m))},children:[bt(cn,{className:"w-[88px]","aria-label":"\u5206\u949F",children:bt(ln,{placeholder:"\u5206"})}),bt(dn,{className:"max-h-64",children:u.map(m=>bt(un,{value:String(m),children:Da(m)},m))})]})]})})]})})}function l0(e,t,o="24h"){return o==="12h"?vp(e,t):bp(new Date(2e3,0,1,e,t),{timeStyle:"short"})}import*as Vr from"react";import{jsx as Kl,jsxs as d0}from"react/jsx-runtime";function c0({onLoadMore:e,hasMore:t=!0,loading:o=!1,loader:r,threshold:a="200px",scrollContainer:s,endMessage:l="No more data",className:i,children:c,...u}){let f=Vr.useRef(null),m=Vr.useRef(e);m.current=e;let p=Vr.useRef(o);p.current=o;let b=Vr.useRef(t);return b.current=t,Vr.useEffect(()=>{let g=f.current;if(!g)return;let h=new IntersectionObserver(y=>{y[0]?.isIntersecting&&!p.current&&b.current&&m.current?.()},{root:s??null,rootMargin:`${a} 0px`});return h.observe(g),()=>h.disconnect()},[a,s]),d0("div",{"data-slot":"infinite-scroll",className:n("flex flex-col",i),...u,children:[c,Kl("div",{ref:f,className:"flex items-center justify-center py-4","aria-live":"polite",children:o?r??Kl(wn,{size:"sm"}):t?null:Kl("span",{className:"text-muted-foreground text-xs",children:l})})]})}import*as hp from"react";import{jsx as xp}from"react/jsx-runtime";function u0({columns:e=3,gap:t=16,className:o,children:r,style:a,...s}){return xp("div",{"data-slot":"masonry",className:n(o),style:{columnCount:typeof e=="number"?e:void 0,columnGap:`${t}px`,...a},...s,children:hp.Children.map(r,l=>xp("div",{className:"break-inside-avoid",style:{marginBottom:`${t}px`},children:l}))})}import"react";import{jsx as za,jsxs as yp}from"react/jsx-runtime";function p0(e){return"options"in e}function m0({options:e=[],placeholder:t,size:o="default",error:r,disabled:a,className:s,children:l,...i}){return yp("div",{"data-slot":"native-select",className:"relative inline-flex",children:[yp("select",{"data-size":o,disabled:a,className:n("border-input focus-visible:border-ring focus-visible:ring-ring/50 flex w-full appearance-none items-center justify-between gap-1.5 rounded-lg border bg-transparent py-2 pr-8 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50",r&&"border-destructive ring-destructive/20 ring-3",o==="default"&&"h-8",o==="sm"&&"h-7 text-xs",s),...i,children:[t&&za("option",{value:"",disabled:!0,children:t}),e.map(c=>p0(c)?za("optgroup",{label:c.label,children:c.options.map(u=>za("option",{value:u.value,disabled:u.disabled,children:u.label},u.value))},c.label):za("option",{value:c.value,disabled:c.disabled,children:c.label},c.value)),l]}),za(we,{className:"text-muted-foreground pointer-events-none absolute top-1/2 right-2 size-4 -translate-y-1/2"})]})}import"react";import{jsx as Ws,jsxs as x0}from"react/jsx-runtime";var f0={info:ao,success:Oo,warning:ro,error:Co},g0={info:"bg-blue-50/60 text-blue-700 dark:bg-blue-950/30 dark:text-blue-300",success:"bg-green-50/60 text-green-700 dark:bg-green-950/30 dark:text-green-300",warning:"bg-amber-50/60 text-amber-700 dark:bg-amber-950/30 dark:text-amber-300",error:"bg-red-50/60 text-red-700 dark:bg-red-950/30 dark:text-red-300"},b0={info:"text-blue-500 dark:text-blue-400",success:"text-green-500 dark:text-green-400",warning:"text-amber-500 dark:text-amber-400",error:"text-red-500 dark:text-red-400"};function v0({variant:e="info",icon:t,action:o,className:r,children:a,...s}){let l=f0[e];return x0("div",{"data-slot":"message","data-variant":e,role:"status",className:n("flex items-start gap-2 rounded-md px-3 py-2 text-sm",g0[e],r),...s,children:[Ws("span",{className:n("mt-0.5 shrink-0",b0[e]),children:t??Ws(l,{className:"size-4"})}),Ws("span",{className:"flex-1",children:a}),o&&Ws("span",{className:"shrink-0",children:o})]})}import"react";import{jsx as y0}from"react/jsx-runtime";function h0({dir:e="ltr",className:t,children:o,...r}){return y0("div",{"data-slot":"direction","data-dir":e,dir:e,className:n(e==="rtl"&&"[direction:rtl]",t),...r,children:o})}import"react";import{jsx as Br,jsxs as Wl}from"react/jsx-runtime";var N0={xs:"icon-xs",sm:"icon-sm",default:"icon",lg:"icon-lg"};function w0({children:e,onClick:t,actions:o,variant:r="default",size:a="default",disabled:s=!1,icon:l,loading:i=!1,className:c}){let u=s||i,f=N0[a]??"icon",m=o!=null&&o.length>0;return Wl("div",{"data-slot":"split-button",className:n("inline-flex items-center",c),children:[Br(D,{variant:r,size:a,disabled:u,onClick:t,icon:i?Br(yc,{className:"animate-spin"}):l,className:"rounded-r-none",children:e}),m&&Wl(oa,{disabled:u,children:[Br(ra,{className:n(At({variant:r,size:f}),"-ml-px rounded-l-none"),children:Br(we,{})}),Br(nn,{align:"end",children:o.map((p,b)=>{let g=[];return p.separator&&b>0&&g.push(Br(Li,{},`sep-${b}`)),g.push(Wl(na,{variant:p.destructive?"destructive":"default",disabled:p.disabled,onClick:p.onClick,children:[p.icon!=null&&Br("span",{className:"shrink-0",children:p.icon}),p.label]},p.label)),g})})]})]})}import*as Re from"react";import{jsx as ar,jsxs as Hr}from"react/jsx-runtime";function Np(e,t){let o=t.getBoundingClientRect();return{x:(e.clientX-o.left)/o.width*t.width,y:(e.clientY-o.top)/o.height*t.height}}var C0=Re.forwardRef(function({penColor:t="currentColor",penWidth:o=2,height:r=200,width:a,guideLine:s=!1,readOnly:l=!1,value:i,onChange:c,onSave:u,showActions:f=!0,saveLabel:m="Save",clearLabel:p="Clear",placeholder:b="Sign here",className:g,...h},y){let N=Re.useRef(null),w=Re.useRef(!1),C=Re.useRef([]),v=Re.useRef([]),[x,P]=Re.useState(!1),S=Re.useCallback(()=>{let L=N.current;if(!L)return;let B=L.getContext("2d");if(!B)return;let j=typeof window<"u"&&window.devicePixelRatio||1,ne=L.getBoundingClientRect(),Ne=Math.max(1,Math.round(ne.width*j)),He=Math.max(1,Math.round(ne.height*j));if(L.width!==Ne||L.height!==He){let Oe=document.createElement("canvas");Oe.width=L.width,Oe.height=L.height;let xt=Oe.getContext("2d");xt&&xt.drawImage(L,0,0),L.width=Ne,L.height=He,B.drawImage(Oe,0,0,L.width,L.height)}B.lineJoin="round",B.lineCap="round",B.lineWidth=o*j,B.strokeStyle=t},[t,o]);Re.useEffect(()=>{S()},[S]),Re.useEffect(()=>{let L=N.current,B=L?.getContext("2d");if(!L||!B)return;let j=typeof window<"u"&&window.devicePixelRatio||1;B.lineJoin="round",B.lineCap="round",B.lineWidth=o*j,B.strokeStyle=t},[t,o]);let R=(L,B)=>{let j=N.current,ne=j?.getContext("2d");!j||!ne||(ne.beginPath(),ne.moveTo(L.x,L.y),ne.lineTo(B.x,B.y),ne.stroke())},k=Re.useCallback(()=>{let L=N.current,B=L?.getContext("2d");if(!L||!B)return;let j=typeof window<"u"&&window.devicePixelRatio||1;B.clearRect(0,0,L.width,L.height),B.lineJoin="round",B.lineCap="round",B.lineWidth=o*j,B.strokeStyle=t;for(let ne of C.current)for(let Ne=1;Ne<ne.length;Ne++)B.beginPath(),B.moveTo(ne[Ne-1].x,ne[Ne-1].y),B.lineTo(ne[Ne].x,ne[Ne].y),B.stroke()},[t,o]),T=L=>{if(l)return;let B=N.current;if(!B)return;B.setPointerCapture(L.pointerId),w.current=!0;let j=Np(L,B);v.current=[j],x||(P(!0),c?.(!1))},z=L=>{if(l)return;let B=N.current;if(!B||!w.current)return;let j=Np(L,B),ne=v.current[v.current.length-1];ne&&R(ne,j),v.current.push(j)},W=L=>{if(l)return;let B=N.current;if(B)try{B.releasePointerCapture(L.pointerId)}catch{}w.current&&v.current.length>0&&C.current.push([...v.current]),w.current=!1,v.current=[]},$=Re.useCallback(()=>{let L=N.current,B=L?.getContext("2d");!L||!B||(B.clearRect(0,0,L.width,L.height),C.current=[],v.current=[],P(!1),c?.(!0))},[c]),E=Re.useCallback(()=>!x,[x]),A=Re.useCallback(L=>{let B=N.current;return!B||!x?null:B.toDataURL(L??"image/png")},[x]),I=Re.useCallback(()=>new Promise(L=>{let B=N.current;if(!B||!x){L(null);return}B.toBlob(j=>L(j),"image/png")}),[x]),H=Re.useCallback(()=>{C.current.length!==0&&(C.current.pop(),k(),C.current.length===0&&(P(!1),c?.(!0)))},[k,c]);Re.useImperativeHandle(y,()=>({clear:$,isEmpty:E,toDataURL:A,toBlob:I,undo:H}),[$,E,A,I,H]);let U=async()=>{let L=A();if(!L)return;let B=await I();u?.({dataUrl:L,blob:B})},M=()=>!l||!i?null:ar("img",{src:i,alt:"Signature","data-slot":"signature-pad-readonly",className:"pointer-events-none absolute inset-0 h-full w-full object-contain"});return Hr("div",{"data-slot":"signature-pad",className:n("flex flex-col gap-2 text-foreground",g),...h,children:[Hr("div",{className:"relative overflow-hidden rounded-lg border bg-background",style:{height:r,...a?{width:a}:{width:"100%"}},children:[ar("canvas",{ref:N,"data-slot":"signature-pad-canvas",onPointerDown:T,onPointerMove:z,onPointerUp:W,onPointerCancel:W,className:n("h-full w-full touch-none",l&&"pointer-events-none"),role:"img","aria-label":"Signature canvas"}),!x&&!l?Hr("div",{"data-slot":"signature-pad-placeholder",className:"pointer-events-none absolute inset-0 flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[ar(zc,{className:"size-5","aria-hidden":"true"}),ar("span",{children:b})]}):null,s&&!l?ar("div",{"data-slot":"signature-pad-guideline",className:"pointer-events-none absolute inset-x-4 border-b border-dashed border-border",style:{bottom:"25%"},"aria-hidden":"true"}):null,M()]}),f&&!l?Hr("div",{className:"flex justify-end gap-2","data-slot":"signature-pad-actions",children:[Hr("button",{type:"button",onClick:H,disabled:!x,className:"inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm hover:bg-muted disabled:opacity-50 disabled:pointer-events-none",children:[ar(Fc,{className:"size-4","aria-hidden":"true"}),"Undo"]}),Hr("button",{type:"button",onClick:$,className:"inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm hover:bg-muted",children:[ar(Jr,{className:"size-4","aria-hidden":"true"}),p]}),Hr("button",{type:"button",onClick:U,disabled:!x,className:"inline-flex items-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground disabled:opacity-50 disabled:pointer-events-none",children:[ar(rs,{className:"size-4","aria-hidden":"true"}),m]})]}):null]})});import*as Qt from"react";import{HomeIcon as P0,ArrowLeftIcon as R0,ArrowRightIcon as k0,ChevronRightIcon as S0,ChevronLeftIcon as I0,ChevronDownIcon as T0,ChevronUpIcon as M0,MenuIcon as D0,MoreHorizontalIcon as z0,MoreVerticalIcon as L0,ExternalLinkIcon as E0,LinkIcon as F0,PlusIcon as A0,MinusIcon as V0,XIcon as B0,CheckIcon as H0,EditIcon as O0,Trash2Icon as $0,CopyIcon as U0,DownloadIcon as G0,UploadIcon as _0,ShareIcon as K0,RefreshCcwIcon as W0,SearchIcon as wp,FilterIcon as q0,SettingsIcon as Y0,AlertCircleIcon as j0,AlertTriangleIcon as Q0,CheckCircleIcon as X0,InfoIcon as J0,XCircleIcon as Z0,HelpCircleIcon as eN,ClockIcon as tN,TimerIcon as oN,FileIcon as rN,FileTextIcon as nN,FolderIcon as aN,FolderOpenIcon as sN,ImagePlusIcon as iN,ArchiveIcon as lN,BarChart3Icon as cN,PieChartIcon as dN,LineChartIcon as uN,TableIcon as pN,DatabaseIcon as mN,LayersIcon as fN,UserIcon as gN,UsersIcon as bN,UserPlusIcon as vN,UserMinusIcon as xN,UserCheckIcon as hN,ShieldIcon as yN,LockIcon as NN,UnlockIcon as wN,MailIcon as CN,MessageSquareIcon as PN,PhoneIcon as RN,BellIcon as kN,SendIcon as SN,AtSignIcon as IN,ShoppingCartIcon as TN,CreditCardIcon as MN,WalletIcon as DN,TagIcon as zN,DollarSignIcon as LN,PackageIcon as EN,TruckIcon as FN,BookOpenIcon as AN,PenIcon as VN,StampIcon as BN,BookmarkIcon as HN,FlagIcon as ON,StarIcon as $N,HeartIcon as UN,SlidersIcon as GN,MonitorIcon as _N,SmartphoneIcon as KN,PrinterIcon as WN,WifiIcon as qN}from"lucide-react";import{jsx as it,jsxs as Or}from"react/jsx-runtime";var YN=[{name:"Home",icon:P0,category:"Navigation",keywords:["house","main"]},{name:"ArrowLeft",icon:R0,category:"Navigation",keywords:["back","previous"]},{name:"ArrowRight",icon:k0,category:"Navigation",keywords:["forward","next"]},{name:"ChevronRight",icon:S0,category:"Navigation",keywords:["caret","expand"]},{name:"ChevronLeft",icon:I0,category:"Navigation",keywords:["caret","collapse"]},{name:"ChevronDown",icon:T0,category:"Navigation",keywords:["caret","expand","dropdown"]},{name:"ChevronUp",icon:M0,category:"Navigation",keywords:["caret","collapse"]},{name:"Menu",icon:D0,category:"Navigation",keywords:["hamburger","nav"]},{name:"MoreHorizontal",icon:z0,category:"Navigation",keywords:["ellipsis","dots","overflow"]},{name:"MoreVertical",icon:L0,category:"Navigation",keywords:["ellipsis","dots","overflow","kebab"]},{name:"ExternalLink",icon:E0,category:"Navigation",keywords:["outbound","open","new tab"]},{name:"Link",icon:F0,category:"Navigation",keywords:["chain","url","hyperlink"]},{name:"Plus",icon:A0,category:"Action",keywords:["add","create","new"]},{name:"Minus",icon:V0,category:"Action",keywords:["remove","subtract"]},{name:"X",icon:B0,category:"Action",keywords:["close","cancel","delete","cross"]},{name:"Check",icon:H0,category:"Action",keywords:["confirm","done","tick","approve"]},{name:"Edit",icon:O0,category:"Action",keywords:["pencil","modify","update"]},{name:"Trash2",icon:$0,category:"Action",keywords:["delete","remove","bin"]},{name:"Copy",icon:U0,category:"Action",keywords:["duplicate","clipboard"]},{name:"Download",icon:G0,category:"Action",keywords:["save","export"]},{name:"Upload",icon:_0,category:"Action",keywords:["import","send"]},{name:"Share",icon:K0,category:"Action",keywords:["forward","distribute"]},{name:"RefreshCcw",icon:W0,category:"Action",keywords:["reload","retry","sync"]},{name:"Search",icon:wp,category:"Action",keywords:["find","lookup","magnifying"]},{name:"Filter",icon:q0,category:"Action",keywords:["funnel","sort"]},{name:"Settings",icon:Y0,category:"Action",keywords:["gear","cog","preferences","config"]},{name:"AlertCircle",icon:j0,category:"Status",keywords:["warning","error","danger"]},{name:"AlertTriangle",icon:Q0,category:"Status",keywords:["warning","caution"]},{name:"CheckCircle",icon:X0,category:"Status",keywords:["success","complete","done"]},{name:"Info",icon:J0,category:"Status",keywords:["information","help","about"]},{name:"XCircle",icon:Z0,category:"Status",keywords:["error","fail","cancel"]},{name:"HelpCircle",icon:eN,category:"Status",keywords:["question","support","faq"]},{name:"Clock",icon:tN,category:"Status",keywords:["time","schedule","pending"]},{name:"Timer",icon:oN,category:"Status",keywords:["stopwatch","countdown","duration"]},{name:"File",icon:rN,category:"File",keywords:["document","page"]},{name:"FileText",icon:nN,category:"File",keywords:["document","text","report"]},{name:"Folder",icon:aN,category:"File",keywords:["directory","collection"]},{name:"FolderOpen",icon:sN,category:"File",keywords:["directory","browse"]},{name:"ImagePlus",icon:iN,category:"File",keywords:["photo","picture","add image"]},{name:"Archive",icon:lN,category:"File",keywords:["zip","compress","storage"]},{name:"BarChart3",icon:cN,category:"Data",keywords:["graph","analytics","statistics"]},{name:"PieChart",icon:dN,category:"Data",keywords:["graph","analytics","proportion"]},{name:"LineChart",icon:uN,category:"Data",keywords:["graph","analytics","trend"]},{name:"Table",icon:pN,category:"Data",keywords:["grid","spreadsheet","rows"]},{name:"Database",icon:mN,category:"Data",keywords:["storage","server","data"]},{name:"Layers",icon:fN,category:"Data",keywords:["stack","overlap","hierarchy"]},{name:"User",icon:gN,category:"User",keywords:["person","account","profile"]},{name:"Users",icon:bN,category:"User",keywords:["people","group","team"]},{name:"UserPlus",icon:vN,category:"User",keywords:["add person","invite"]},{name:"UserMinus",icon:xN,category:"User",keywords:["remove person"]},{name:"UserCheck",icon:hN,category:"User",keywords:["verified","approved"]},{name:"Shield",icon:yN,category:"User",keywords:["security","protect"]},{name:"Lock",icon:NN,category:"User",keywords:["secure","private","password"]},{name:"Unlock",icon:wN,category:"User",keywords:["open","public","unsecure"]},{name:"Mail",icon:CN,category:"Communication",keywords:["email","envelope","letter"]},{name:"MessageSquare",icon:PN,category:"Communication",keywords:["chat","comment","bubble"]},{name:"Phone",icon:RN,category:"Communication",keywords:["call","telephone","contact"]},{name:"Bell",icon:kN,category:"Communication",keywords:["notification","alert","ring"]},{name:"Send",icon:SN,category:"Communication",keywords:["message","submit","paper plane"]},{name:"AtSign",icon:IN,category:"Communication",keywords:["mention","email","address"]},{name:"ShoppingCart",icon:TN,category:"Commerce",keywords:["cart","buy","purchase"]},{name:"CreditCard",icon:MN,category:"Commerce",keywords:["payment","card","billing"]},{name:"Wallet",icon:DN,category:"Commerce",keywords:["money","purse","finance"]},{name:"Tag",icon:zN,category:"Commerce",keywords:["label","price","category"]},{name:"DollarSign",icon:LN,category:"Commerce",keywords:["money","currency","price"]},{name:"Package",icon:EN,category:"Commerce",keywords:["box","shipping","product"]},{name:"Truck",icon:FN,category:"Commerce",keywords:["delivery","shipping","transport"]},{name:"BookOpen",icon:AN,category:"Content",keywords:["read","documentation","guide"]},{name:"Pen",icon:VN,category:"Content",keywords:["write","compose","draft"]},{name:"Stamp",icon:BN,category:"Content",keywords:["seal","approve","official"]},{name:"Bookmark",icon:HN,category:"Content",keywords:["save","favorite","mark"]},{name:"Flag",icon:ON,category:"Content",keywords:["report","mark","important"]},{name:"Star",icon:$N,category:"Content",keywords:["favorite","rating","review"]},{name:"Heart",icon:UN,category:"Content",keywords:["like","love","favorite"]},{name:"Sliders",icon:GN,category:"System",keywords:["adjust","controls","equalizer"]},{name:"Monitor",icon:_N,category:"System",keywords:["screen","desktop","display"]},{name:"Smartphone",icon:KN,category:"System",keywords:["mobile","phone","device"]},{name:"Printer",icon:WN,category:"System",keywords:["print","output"]},{name:"Wifi",icon:qN,category:"System",keywords:["network","wireless","internet"]}];function jN(e){let t=new Map;for(let o of e){let r=o.category??"Other",a=t.get(r);a?a.push(o):t.set(r,[o])}return t}function QN({value:e,onChange:t,open:o,onOpenChange:r,icons:a=YN,trigger:s,title:l="Select Icon",placeholder:i="Search icons...",maxRecent:c=8,disabled:u=!1,className:f}){let[m,p]=Qt.useState(!1),[b,g]=Qt.useState([]),h=o!==void 0,y=h?o:m,N=Qt.useMemo(()=>{let R=new Map;for(let k of a)R.set(k.name,k);return R},[a]),w=Qt.useCallback(R=>{u&&R||(r?.(R),h||p(R))},[u,h,r]),C=Qt.useCallback(R=>{t?.(R),w(!1),g(k=>{let T=k.filter(z=>z!==R);return[R,...T].slice(0,c)})},[t,w,c]),v=Qt.useMemo(()=>jN(a),[a]),x=Qt.useMemo(()=>b.map(R=>N.get(R)).filter(R=>R!==void 0),[b,N]),P=Qt.useCallback((R,k,T)=>{let z=k.toLowerCase();return R.toLowerCase().includes(z)||T?.some(W=>W.toLowerCase().includes(z))?1:0},[]),S=e?N.get(e):void 0;return it("div",{"data-slot":"icon-picker",className:n("inline-flex",f),children:Or(ot,{open:y,onOpenChange:w,children:[s!==void 0?it(St,{render:s}):Or(St,{render:it(D,{variant:"outline",disabled:u,className:"gap-2"}),children:[S?it(S.icon,{className:"size-4 shrink-0"}):it(wp,{className:"size-4 shrink-0"}),S?S.name:"Select Icon"]}),Or(rt,{className:"sm:max-w-lg",showCloseButton:!0,children:[it(nt,{children:it(at,{children:l})}),Or(Mi,{filter:P,loop:!0,children:[it(Xn,{placeholder:i}),Or(Jn,{children:[it(Zn,{children:"No icons found."}),x.length>0&&it(on,{heading:"Recent",children:x.map(R=>Or(rn,{value:`recent:${R.name}`,...R.keywords?{keywords:R.keywords}:{},...R.name===e?{"data-checked":"true"}:{},onSelect:()=>C(R.name),children:[it(R.icon,{className:"size-5 shrink-0"}),it("span",{children:R.name})]},`recent-${R.name}`))}),Array.from(v.entries()).map(([R,k])=>it(on,{heading:R,children:k.map(T=>Or(rn,{value:T.name,...T.keywords?{keywords:T.keywords}:{},...T.name===e?{"data-checked":"true"}:{},onSelect:()=>C(T.name),children:[it(T.icon,{className:"size-5 shrink-0"}),it("span",{children:T.name})]},T.name))},R))]})]})]})]})})}import*as fo from"react";import{jsx as ql,jsxs as ZN}from"react/jsx-runtime";var Cp={linear:e=>e,easeOut:e=>1-Math.pow(1-e,3),easeInOut:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2};function XN(e){let t=fo.useRef(void 0);return fo.useEffect(()=>{t.current=e}),t.current}function JN({value:e,from:t=0,duration:o=1e3,easing:r="easeOut",format:a,decimals:s=0,prefix:l,suffix:i,reAnimate:c=!0,className:u,...f}){let[m,p]=fo.useState(t),b=XN(e),g=fo.useRef(null),h=fo.useMemo(()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,[]);fo.useEffect(()=>{let N=t;if(c&&b!==void 0&&(N=b),h){p(e);return}if(o<=0){p(e);return}let w=Cp[r]??Cp.easeOut,C=performance.now();function v(x){let P=x-C,S=Math.min(P/o,1),R=w(S),k=N+(e-N)*R;p(k),S<1&&(g.current=requestAnimationFrame(v))}return g.current!==null&&cancelAnimationFrame(g.current),g.current=requestAnimationFrame(v),()=>{g.current!==null&&(cancelAnimationFrame(g.current),g.current=null)}},[e,o,r,h]);let y=a?a(m):m.toFixed(s);return ZN("span",{"data-slot":"number-ticker",className:n("inline-flex items-baseline tabular-nums",u),...f,children:[l!=null&&ql("span",{"data-slot":"number-ticker-prefix",children:l}),ql("span",{"data-slot":"number-ticker-value",children:y}),i!=null&&ql("span",{"data-slot":"number-ticker-suffix",children:i})]})}import*as Pp from"react";import{jsx as $r,jsxs as qs}from"react/jsx-runtime";function ew({open:e,onOpenChange:t,groups:o,title:r="Keyboard Shortcuts",placeholder:a="Search shortcuts...",className:s}){return qs(Di,{"data-slot":"keyboard-shortcut-dialog",open:e,onOpenChange:t,title:r,className:n(s),children:[$r(Xn,{placeholder:a}),qs(Jn,{children:[$r(Zn,{children:"No shortcuts found"}),o.map(l=>$r(on,{heading:l.title,children:l.shortcuts.map((i,c)=>{let u=[i.description,...i.keys].join(" ");return qs(rn,{value:u,onSelect:()=>{i.action?.()},className:"flex items-center justify-between",children:[$r("span",{children:i.description}),$r(pa,{children:i.keys.map((f,m)=>qs(Pp.Fragment,{children:[m>0&&$r("span",{className:"text-muted-foreground text-xs",children:"+"}),$r(ua,{size:"sm",children:f})]},m))})]},`${l.title}-${c}`)})},l.title))]})]})}import*as go from"react";import{QrCodeIcon as Rp,CheckCircle2Icon as kp,CopyIcon as tw,ShieldCheckIcon as Sp,RefreshCwIcon as ow,KeyIcon as rw,AlertTriangleIcon as nw,ArrowLeftIcon as Ip,ArrowRightIcon as Tp}from"lucide-react";import{jsx as _,jsxs as se}from"react/jsx-runtime";function Mp(e=8){let t=[];for(let o=0;o<e;o++){let r=Math.random().toString(36).slice(2,6).toUpperCase(),a=Math.random().toString(36).slice(2,6).toUpperCase();t.push(`${r}-${a}`)}return t}function aw(){let e=Array.from({length:16},()=>"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".charAt(Math.floor(Math.random()*32))).join("");return{secret:e,qrUrl:`otpauth://totp/Example:user@example.com?secret=${e}&issuer=Example`}}function sw({enabled:e=!1,setupMode:t=!1,onSetupComplete:o,onVerify:r,onGenerateQR:a,onDisable:s,generateBackupCodes:l,backupCodeCount:i=8,codeLength:c=6,className:u}){let[f,m]=go.useState(e&&!t?"verify":t?"setup-intro":"disabled"),[p,b]=go.useState(null),[g,h]=go.useState(!1),[,y]=go.useState(""),[N,w]=go.useState(""),[C,v]=go.useState(!1),[,x]=go.useState(!1),[P,S]=go.useState([]),[R,k]=go.useState(!1),T=async()=>{let A=a?await a():aw();b(A),m("setup-qr")},z=async A=>{if(y(A),w(""),A===A)try{if(v(!0),r?await r(A):A==="123456"){x(!0);let H=l?l():Mp(i);S(H),m("setup-done")}else w("\u9A8C\u8BC1\u7801\u9519\u8BEF\uFF0C\u8BF7\u91CD\u8BD5"),y("")}finally{v(!1)}},W=()=>{o?.(P)},$=async()=>{let A=P.join(`
7
+ `);await navigator.clipboard.writeText(A),k(!0),setTimeout(()=>k(!1),3e3)},E=()=>{s?.(),m("disabled"),x(!1)};return f==="disabled"?se("div",{"data-slot":"two-factor-auth",className:n("rounded-lg border p-6 text-center",u),children:[_(Sp,{className:"mx-auto size-12 text-muted-foreground"}),_("h3",{className:"mt-3 text-lg font-semibold",children:"\u672A\u542F\u7528\u4E24\u6B65\u9A8C\u8BC1"}),_("p",{className:"mt-1 text-sm text-muted-foreground",children:"\u542F\u7528\u4E24\u6B65\u9A8C\u8BC1\u53EF\u589E\u5F3A\u8D26\u6237\u5B89\u5168\u6027"}),_("button",{type:"button",onClick:()=>m("setup-intro"),className:n("mt-4 inline-flex items-center gap-1.5 rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground","hover:bg-primary/90 transition-colors"),children:"\u7ACB\u5373\u542F\u7528"})]}):f==="verify"?se("div",{"data-slot":"two-factor-auth",className:n("rounded-lg border p-6",u),children:[se("div",{className:"flex items-center gap-2",children:[_(Sp,{className:"size-5 text-primary"}),_("h3",{className:"text-lg font-semibold",children:"\u4E24\u6B65\u9A8C\u8BC1"})]}),_("p",{className:"mt-2 text-sm text-muted-foreground",children:"\u8BF7\u8F93\u5165\u4F60\u7684\u9A8C\u8BC1\u5668\u5E94\u7528\u4E2D\u7684 6 \u4F4D\u9A8C\u8BC1\u7801"}),se("div",{className:"mt-4 flex flex-col items-center gap-3",children:[_(fn,{length:c,onValueChange:A=>{y(A),w(""),A.length===c&&z(A)},className:"justify-center"}),N&&_("p",{className:"text-sm text-red-500",children:N}),C&&_("p",{className:"text-sm text-muted-foreground",children:"\u9A8C\u8BC1\u4E2D..."})]}),_("div",{className:"mt-4 border-t pt-3 text-center",children:_("button",{type:"button",disabled:C,onClick:E,className:"text-xs text-muted-foreground underline hover:text-foreground",children:"\u65E0\u6CD5\u8BBF\u95EE\u9A8C\u8BC1\u5668\uFF1F\u4F7F\u7528\u5907\u7528\u7801"})})]}):f==="setup-intro"?se("div",{"data-slot":"two-factor-auth",className:n("rounded-lg border p-6",u),children:[se("div",{className:"flex items-center gap-2",children:[_(Rp,{className:"size-5 text-primary"}),_("h3",{className:"text-lg font-semibold",children:"\u8BBE\u7F6E\u4E24\u6B65\u9A8C\u8BC1"})]}),se("div",{className:"mt-3 space-y-2 text-sm text-muted-foreground",children:[_("p",{children:"\u4E24\u6B65\u9A8C\u8BC1\u53EF\u4E3A\u4F60\u7684\u8D26\u6237\u63D0\u4F9B\u989D\u5916\u7684\u5B89\u5168\u4FDD\u62A4\u3002"}),se("ol",{className:"list-decimal space-y-1 pl-5",children:[_("li",{children:"\u5728\u624B\u673A\u4E0A\u5B89\u88C5\u9A8C\u8BC1\u5668\u5E94\u7528\uFF08\u5982 Google Authenticator\u3001Microsoft Authenticator\uFF09"}),_("li",{children:"\u626B\u63CF\u4E0B\u65B9\u4E8C\u7EF4\u7801\u6216\u624B\u52A8\u8F93\u5165\u5BC6\u94A5"}),_("li",{children:"\u8F93\u5165\u9A8C\u8BC1\u5668\u4E2D\u7684 6 \u4F4D\u9A8C\u8BC1\u7801\u5B8C\u6210\u6FC0\u6D3B"})]})]}),_("div",{className:"mt-4 flex justify-end",children:se("button",{type:"button",onClick:T,className:n("inline-flex items-center gap-1.5 rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground","hover:bg-primary/90 transition-colors"),children:["\u5F00\u59CB\u8BBE\u7F6E",_(Tp,{className:"size-4"})]})})]}):f==="setup-qr"&&p?se("div",{"data-slot":"two-factor-auth",className:n("rounded-lg border p-6",u),children:[se("div",{className:"flex items-center gap-2",children:[_("button",{type:"button",onClick:()=>m("setup-intro"),className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:_(Ip,{className:"size-4"})}),_("h3",{className:"text-lg font-semibold",children:"\u626B\u63CF\u4E8C\u7EF4\u7801"}),_("span",{className:"rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground",children:"2/3"})]}),_("p",{className:"mt-2 text-sm text-muted-foreground",children:"\u4F7F\u7528\u9A8C\u8BC1\u5668\u5E94\u7528\u626B\u63CF\u4E8C\u7EF4\u7801\uFF0C\u6216\u624B\u52A8\u8F93\u5165\u5BC6\u94A5"}),se("div",{className:"mt-4 flex flex-col items-center gap-4",children:[_("div",{className:"flex size-44 items-center justify-center rounded-lg border bg-white p-3",children:_(Rp,{className:"size-24 text-muted-foreground/30"})}),se("div",{className:"w-full max-w-xs rounded-lg border bg-muted/30 p-3",children:[se("div",{className:"flex items-center justify-between",children:[_("span",{className:"text-xs font-medium",children:"\u5BC6\u94A5"}),_("button",{type:"button",onClick:()=>h(A=>!A),className:"text-xs text-primary hover:underline",children:g?"\u9690\u85CF":"\u663E\u793A"})]}),_("div",{className:"mt-1 font-mono text-sm tracking-wider",children:g?p.secret.match(/.{1,4}/g)?.join(" ")??p.secret:"\u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022"})]})]}),se("div",{className:"mt-6 flex justify-between",children:[se("button",{type:"button",onClick:()=>T(),className:n("inline-flex items-center gap-1 rounded-lg border px-3 py-1.5 text-sm","hover:bg-muted transition-colors"),children:[_(ow,{className:"size-3.5"}),"\u5237\u65B0"]}),se("button",{type:"button",onClick:()=>m("setup-verify"),className:n("inline-flex items-center gap-1.5 rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground","hover:bg-primary/90 transition-colors"),children:["\u4E0B\u4E00\u6B65",_(Tp,{className:"size-4"})]})]})]}):f==="setup-verify"?se("div",{"data-slot":"two-factor-auth",className:n("rounded-lg border p-6",u),children:[se("div",{className:"flex items-center gap-2",children:[_("button",{type:"button",onClick:()=>m("setup-qr"),className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:_(Ip,{className:"size-4"})}),_("h3",{className:"text-lg font-semibold",children:"\u9A8C\u8BC1\u6FC0\u6D3B"}),_("span",{className:"rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground",children:"3/3"})]}),_("p",{className:"mt-2 text-sm text-muted-foreground",children:"\u8F93\u5165\u9A8C\u8BC1\u5668\u5E94\u7528\u4E2D\u7684 6 \u4F4D\u9A8C\u8BC1\u7801\u4EE5\u5B8C\u6210\u6FC0\u6D3B"}),se("div",{className:"mt-4 flex flex-col items-center gap-3",children:[_(fn,{length:c,onValueChange:A=>{y(A),w(""),A.length===c&&z(A)},className:"justify-center"}),N&&se("div",{className:"flex items-center gap-1 text-sm text-red-500",children:[_(nw,{className:"size-3.5"}),N]}),C&&_("p",{className:"text-sm text-muted-foreground",children:"\u9A8C\u8BC1\u4E2D..."})]})]}):f==="setup-done"?se("div",{"data-slot":"two-factor-auth",className:n("rounded-lg border p-6",u),children:[se("div",{className:"flex items-center gap-2",children:[_(kp,{className:"size-5 text-green-500"}),_("h3",{className:"text-lg font-semibold",children:"\u4E24\u6B65\u9A8C\u8BC1\u5DF2\u542F\u7528"})]}),_("p",{className:"mt-2 text-sm text-muted-foreground",children:"\u5DF2\u6210\u529F\u6FC0\u6D3B\u4E24\u6B65\u9A8C\u8BC1\uFF0C\u8BF7\u59A5\u5584\u4FDD\u7BA1\u5907\u7528\u6062\u590D\u7801"}),se("div",{className:"mt-4 rounded-lg border bg-muted/30 p-4",children:[se("div",{className:"flex items-center justify-between",children:[se("div",{className:"flex items-center gap-1.5",children:[_(rw,{className:"size-4 text-amber-500"}),_("span",{className:"text-sm font-medium",children:"\u5907\u7528\u6062\u590D\u7801"})]}),se("button",{type:"button",onClick:$,className:n("inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs","border hover:bg-muted transition-colors"),children:[_(tw,{className:"size-3"}),R?"\u5DF2\u590D\u5236":"\u5168\u90E8\u590D\u5236"]})]}),_("div",{className:"mt-2 grid grid-cols-2 gap-1",children:P.map((A,I)=>_("code",{className:"rounded bg-background px-2 py-0.5 text-xs font-mono text-muted-foreground",children:A},I))}),_("p",{className:"mt-2 text-xs text-amber-600 dark:text-amber-400",children:"\u26A0 \u6BCF\u4E2A\u6062\u590D\u7801\u53EA\u80FD\u4F7F\u7528\u4E00\u6B21\uFF0C\u8BF7\u59A5\u5584\u4FDD\u7BA1\u3002\u5982\u679C\u4E22\u5931\u9A8C\u8BC1\u5668\uFF0C\u53EF\u4F7F\u7528\u6062\u590D\u7801\u767B\u5F55\u3002"})]}),se("div",{className:"mt-4 flex justify-between",children:[_("button",{type:"button",onClick:E,className:n("inline-flex items-center gap-1 rounded-lg border px-3 py-1.5 text-sm text-red-500","hover:bg-red-50 dark:hover:bg-red-950/20 transition-colors"),children:"\u5173\u95ED\u4E24\u6B65\u9A8C\u8BC1"}),se("button",{type:"button",onClick:W,className:n("inline-flex items-center gap-1.5 rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground","hover:bg-primary/90 transition-colors"),children:[_(kp,{className:"size-4"}),"\u5B8C\u6210"]})]})]}):null}import*as La from"react";import{ChevronLeftIcon as iw,ChevronRightIcon as lw}from"lucide-react";import{jsx as xe,jsxs as Xt}from"react/jsx-runtime";var cw=Array.from({length:24},(e,t)=>t),dw=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],uw=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function pw({events:e=[],date:t,defaultView:o="week",view:r,onViewChange:a,onDateChange:s,onEventClick:l,onSlotClick:i,startHour:c=7,endHour:u=20,hourHeight:f=60,className:m,locale:p="zh"}){let b=p==="zh"?dw:uw,[g,h]=La.useState(()=>{let I=new Date;return I.setHours(0,0,0,0),I}),y=t??g,[N,w]=La.useState(o),C=r??N,v=I=>{t||h(I),s?.(I)},x=I=>{r||w(I),a?.(I)},P=I=>{let H=new Date(y);C==="day"?H.setDate(H.getDate()+I):H.setDate(H.getDate()+I*7),v(H)},S=()=>{let I=new Date;I.setHours(0,0,0,0),v(I)},R=La.useMemo(()=>{let I=[],H=new Date(y);if(C==="day")I.push(new Date(H));else{let U=H.getDay(),M=new Date(H);M.setDate(H.getDate()-U);for(let L=0;L<7;L++){let B=new Date(M);B.setDate(M.getDate()+L),I.push(B)}}return I},[y,C]),k=()=>{if(C==="day"){let U=R[0];if(!U)return"";let M=U.getFullYear(),L=U.getMonth()+1,B=U.getDate(),j=b[U.getDay()];return`${M}\u5E74${L}\u6708${B}\u65E5 ${j}`}let I=R[0],H=R[6];return`${I.getMonth()+1}/${I.getDate()} \u2014 ${H.getMonth()+1}/${H.getDate()} ${I.getFullYear()}`},T=I=>{let H=new Date;return I.getDate()===H.getDate()&&I.getMonth()===H.getMonth()&&I.getFullYear()===H.getFullYear()},z=()=>{let I=new Date;if(!R.find(j=>j.getDate()===I.getDate()&&j.getMonth()===I.getMonth()&&j.getFullYear()===I.getFullYear()))return null;let U=I.getHours()*60+I.getMinutes(),M=c*60;if(U<M)return null;let L=(u-c)*60;return(U-M)/L*100},W=(I,H)=>{let U=I.start.getHours()*60+I.start.getMinutes(),M=I.end.getHours()*60+I.end.getMinutes(),L=(u-c)*60,B=U-c*60,j=M-U,ne=Math.max(0,B/L*100),Ne=Math.max(4,j/L*100),Oe=100/(C==="week"?7:1);return{top:`${ne}%`,height:`${Ne}%`,left:`${H*Oe}%`,width:`${Oe}%`,backgroundColor:I.color??"var(--color-primary, #3b82f6)"}},$=I=>e.filter(H=>{if(H.allDay){let U=new Date(H.start);U.setHours(0,0,0,0);let M=new Date(H.end);return M.setHours(23,59,59,999),I.getTime()>=U.getTime()&&I.getTime()<=M.getTime()}return H.start.getDate()===I.getDate()&&H.start.getMonth()===I.getMonth()&&H.start.getFullYear()===I.getFullYear()}),E=z(),A=cw.slice(c,u+1);return Xt("div",{"data-slot":"scheduler",className:n("flex flex-col rounded-lg border bg-background",m),children:[Xt("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2",children:[xe("button",{type:"button",onClick:S,className:n("rounded-md border border-input px-2.5 py-1 text-xs font-medium","hover:bg-muted transition-colors"),children:"\u4ECA\u5929"}),xe("button",{type:"button",onClick:()=>P(-1),className:"rounded p-1 text-muted-foreground hover:text-foreground",title:"\u4E0A\u4E00\u4E2A",children:xe(iw,{className:"size-4"})}),xe("button",{type:"button",onClick:()=>P(1),className:"rounded p-1 text-muted-foreground hover:text-foreground",title:"\u4E0B\u4E00\u4E2A",children:xe(lw,{className:"size-4"})}),xe("h3",{className:"text-sm font-semibold",children:k()}),Xt("div",{className:"ml-auto flex rounded-md border border-input",children:[xe("button",{type:"button",onClick:()=>x("day"),className:n("rounded-l-md px-3 py-1 text-xs font-medium transition-colors",C==="day"?"bg-primary text-primary-foreground":"hover:bg-muted"),children:"\u65E5"}),xe("button",{type:"button",onClick:()=>x("week"),className:n("rounded-r-md border-l border-input px-3 py-1 text-xs font-medium transition-colors",C==="week"?"bg-primary text-primary-foreground":"hover:bg-muted"),children:"\u5468"})]})]}),C==="week"&&Xt("div",{className:"grid shrink-0 border-b bg-muted/30",style:{gridTemplateColumns:"48px repeat(7, 1fr)"},children:[xe("div",{className:"border-r px-1 py-1 text-center text-[10px] text-muted-foreground"}),R.map((I,H)=>Xt("div",{className:n("border-r px-1 py-1 text-center last:border-r-0",T(I)&&"bg-primary/5"),children:[xe("div",{className:"text-xs text-muted-foreground",children:b[I.getDay()]}),xe("div",{className:n("text-sm font-semibold",T(I)&&"text-primary"),children:I.getDate()})]},H))]}),e.some(I=>I.allDay)&&Xt("div",{className:"shrink-0 border-b bg-muted/10 px-2 py-1",children:[xe("span",{className:"text-[10px] font-medium text-muted-foreground",children:"\u5168\u5929"}),xe("div",{className:"mt-0.5 flex flex-wrap gap-1",children:e.filter(I=>I.allDay).map(I=>xe("button",{type:"button",onClick:()=>l?.(I),className:n("truncate rounded px-2 py-0.5 text-xs font-medium text-white"),style:{backgroundColor:I.color??"var(--color-primary, #3b82f6)"},children:I.title},I.id))})]}),xe("div",{className:"flex-1 overflow-auto",children:Xt("div",{className:"relative",style:{minHeight:(u-c)*f},children:[A.map(I=>Xt("div",{className:"absolute left-0 w-12 text-right text-[10px] text-muted-foreground -translate-y-1/2",style:{top:(I-c)/(u-c)*100+"%"},children:[String(I).padStart(2,"0"),":00"]},I)),A.map(I=>xe("div",{className:"absolute left-12 right-0 border-t border-border/40",style:{top:(I-c)/(u-c)*100+"%"}},`line-${I}`)),xe("div",{className:"ml-12 grid h-full",style:{gridTemplateColumns:`repeat(${C==="week"?7:1}, 1fr)`},children:R.map((I,H)=>{let U=$(I);return Xt("div",{className:n("relative border-r border-border/40 last:border-r-0",T(I)&&"bg-primary/[0.02]"),onClick:M=>{let L=M.currentTarget.getBoundingClientRect(),B=M.clientY-L.top,j=L.height,ne=B/j,Ne=(u-c)*60,He=c*60+ne*Ne,Oe=Math.floor(He/60),xt=Math.round(He%60),O=new Date(I);O.setHours(Oe,xt,0,0);let re=new Date(O);re.setHours(re.getHours()+1),i?.(O,re)},children:[U.filter(M=>!M.allDay).map(M=>Xt("button",{type:"button",onClick:L=>{L.stopPropagation(),l?.(M)},className:n("absolute left-0.5 right-0.5 overflow-hidden rounded px-1.5 py-0.5","text-xs font-medium text-white transition-shadow hover:shadow-md"),style:W(M,0),children:[xe("div",{className:"truncate",children:M.title}),xe("div",{className:"truncate text-[10px] opacity-80",children:mw(M)})]},M.id)),U.filter(M=>M.allDay).map(M=>xe("div",{className:"absolute left-0.5 right-0.5 top-0 z-10 rounded-tr px-1 text-[10px] font-medium text-white",style:{backgroundColor:M.color??"var(--color-primary, #3b82f6)",height:20},children:xe("span",{className:"truncate",children:M.title})},M.id))]},H)})}),E!=null&&xe("div",{className:"absolute left-12 right-0 z-20 pointer-events-none",style:{top:`${E}%`},children:Xt("div",{className:"relative flex items-center",children:[xe("div",{className:"size-2 -translate-x-1 rounded-full bg-red-500"}),xe("div",{className:"h-px flex-1 bg-red-500"})]})})]})})]})}function mw(e){let t=o=>String(o).padStart(2,"0");return`${t(e.start.getHours())}:${t(e.start.getMinutes())} \u2014 ${t(e.end.getHours())}:${t(e.end.getMinutes())}`}import*as Dt from"react";import{FolderIcon as fw,FolderOpenIcon as gw,FileIcon as bw,FileTextIcon as vw,FileSpreadsheetIcon as xw,ImageIcon as hw,SearchIcon as yw,UploadIcon as Nw,Trash2Icon as ww,Grid3X3Icon as Cw,ListIcon as Pw,ChevronRightIcon as Rw,ChevronDownIcon as kw,MoreVerticalIcon as Sw,XIcon as Iw,HomeIcon as Tw}from"lucide-react";import{jsx as K,jsxs as We}from"react/jsx-runtime";function zp(e,t){for(let o of e){if(o.id===t)return o;if(o.children){let r=zp(o.children,t);if(r)return r}}}function Dp(e,t){let o=[],r=(a,s)=>{for(let l of a){let i=[...s,l];if(l.id===t)return o.push(...i),!0;if(l.children&&r(l.children,i))return!0}return!1};return r(e,[]),o}function Mw(e){return e==null?"\u2014":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(1)} GB`}function Dw(e){if(!e)return"\u2014";let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`}function Yl(e,t){if(e.type==="folder")return t?K(gw,{className:"size-5 text-amber-500"}):K(fw,{className:"size-5 text-amber-500"});let o=e.extension?.toLowerCase();return o==="xlsx"||o==="xls"||o==="csv"?K(xw,{className:"size-5 text-green-600"}):o==="png"||o==="jpg"||o==="jpeg"||o==="gif"||o==="svg"||o==="webp"?K(hw,{className:"size-5 text-purple-500"}):o==="docx"||o==="doc"||o==="pdf"||o==="txt"||o==="md"?K(vw,{className:"size-5 text-blue-500"}):K(bw,{className:"size-5 text-muted-foreground"})}function zw({data:e,currentFolderId:t,defaultFolderId:o,viewMode:r,defaultViewMode:a="list",onFolderChange:s,onFileClick:l,onFileDoubleClick:i,onDelete:c,onUpload:u,onViewModeChange:f,showSidebar:m=!0,showToolbar:p=!0,sidebarWidth:b=220,className:g}){let[h,y]=Dt.useState(o??(e[0]?.type==="folder"?e[0].id:"root")),N=t??h,[w,C]=Dt.useState(a),v=r??w,[x,P]=Dt.useState(""),[S,R]=Dt.useState(new Set),[k,T]=Dt.useState(new Set(e.map(M=>M.id))),z=M=>{t||y(M);let L=Dp(e,M);s?.(M,L)},W=M=>{r||C(M),f?.(M)},$=Dt.useMemo(()=>Dp(e,N),[e,N]),E=Dt.useMemo(()=>zp(e,N),[e,N]),A=Dt.useMemo(()=>{let M=E?.children??[];if(x.trim()){let L=x.toLowerCase();M=M.filter(B=>B.name.toLowerCase().includes(L)||B.extension?.toLowerCase().includes(L))}return[...M].sort((L,B)=>L.type!==B.type?L.type==="folder"?-1:1:L.name.localeCompare(B.name))},[E,x]),I=M=>{let L=new Set(S);L.has(M)?L.delete(M):L.add(M),R(L)},H=()=>{let M=A.filter(L=>S.has(L.id));c?.(M),R(new Set)},U=(M,L=0)=>{let B=k.has(M.id),j=N===M.id,ne=M.type==="folder"&&M.children&&M.children.length>0;return We("div",{children:[We("button",{type:"button",onClick:()=>{M.type==="folder"&&(z(M.id),ne&&T(Ne=>{let He=new Set(Ne);return He.has(M.id)?He.delete(M.id):He.add(M.id),He}))},className:n("flex w-full items-center gap-1.5 rounded-md px-2 py-1 text-left text-sm transition-colors",j&&"bg-accent font-medium text-accent-foreground",!j&&"hover:bg-muted/50 text-muted-foreground hover:text-foreground"),style:{paddingLeft:L*16+8},children:[ne?K("span",{className:"flex size-4 shrink-0 items-center justify-center",children:B?K(kw,{className:"size-3"}):K(Rw,{className:"size-3"})}):K("span",{className:"w-4 shrink-0"}),Yl(M,j),K("span",{className:"truncate",children:M.name})]}),ne&&B&&M.children?.map(Ne=>U(Ne,L+1))]},M.id)};return We("div",{"data-slot":"file-manager",className:n("flex h-[500px] overflow-hidden rounded-lg border bg-background",g),children:[m&&We("div",{className:"shrink-0 overflow-auto border-r bg-muted/20",style:{width:b},children:[K("div",{className:"sticky top-0 border-b bg-muted/30 px-3 py-2",children:K("span",{className:"text-xs font-medium text-muted-foreground",children:"\u76EE\u5F55"})}),K("div",{className:"p-1.5",children:e.map(M=>U(M))})]}),We("div",{className:"flex flex-1 flex-col overflow-hidden",children:[p&&We("div",{className:"flex shrink-0 items-center gap-1 border-b bg-muted/30 px-3 py-1.5",children:[We("div",{className:"flex items-center gap-0.5 text-xs",children:[K("button",{type:"button",onClick:()=>{let M=e.find(L=>L.type==="folder");M&&z(M.id)},className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:K(Tw,{className:"size-3.5"})}),$.map((M,L)=>We(Dt.Fragment,{children:[K("span",{className:"text-muted-foreground/40",children:"/"}),K("button",{type:"button",onClick:()=>z(M.id),className:n("truncate rounded px-0.5 hover:text-foreground",L===$.length-1?"font-medium text-foreground":"text-muted-foreground"),children:M.name})]},M.id))]}),K("div",{className:"flex-1"}),We("div",{className:"flex items-center gap-0.5",children:[We("div",{className:"relative",children:[K(yw,{className:"absolute left-2 top-1/2 size-3 -translate-y-1/2 text-muted-foreground"}),K("input",{type:"text",value:x,onChange:M=>P(M.target.value),placeholder:"\u641C\u7D22...",className:n("h-7 w-36 rounded-md border border-input bg-transparent pl-6 pr-6 text-xs","outline-none focus-visible:border-ring")}),x&&K("button",{type:"button",onClick:()=>P(""),className:"absolute right-1 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:K(Iw,{className:"size-3"})})]}),We("div",{className:"ml-1 flex rounded border border-input",children:[K("button",{type:"button",onClick:()=>W("list"),className:n("rounded-l p-1 transition-colors",v==="list"?"bg-accent text-accent-foreground":"text-muted-foreground hover:text-foreground"),children:K(Pw,{className:"size-3.5"})}),K("button",{type:"button",onClick:()=>W("grid"),className:n("rounded-r border-l border-input p-1 transition-colors",v==="grid"?"bg-accent text-accent-foreground":"text-muted-foreground hover:text-foreground"),children:K(Cw,{className:"size-3.5"})})]}),u&&K("button",{type:"button",onClick:u,className:"ml-1 rounded p-1 text-muted-foreground hover:text-foreground",title:"\u4E0A\u4F20",children:K(Nw,{className:"size-3.5"})}),S.size>0&&c&&K("button",{type:"button",onClick:H,className:"ml-1 rounded p-1 text-red-500 hover:bg-red-50 dark:hover:bg-red-950/20",title:`\u5220\u9664 ${S.size} \u9879`,children:K(ww,{className:"size-3.5"})})]})]}),v==="list"&&We("div",{className:"flex shrink-0 items-center border-b bg-muted/20 px-3 py-1 text-[11px] font-medium text-muted-foreground",children:[K("div",{className:"w-6"}),K("div",{className:"flex-1",children:"\u540D\u79F0"}),K("div",{className:"w-20 text-right",children:"\u5927\u5C0F"}),K("div",{className:"w-24 text-right",children:"\u4FEE\u6539\u65F6\u95F4"}),K("div",{className:"w-8"})]}),K("div",{className:"flex-1 overflow-auto p-1",children:A.length===0?K("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:x?"\u65E0\u5339\u914D\u7ED3\u679C":"\u6B64\u6587\u4EF6\u5939\u4E3A\u7A7A"}):v==="list"?K("div",{children:A.map(M=>We("div",{onClick:()=>{M.type==="folder"?z(M.id):l?.(M)},onDoubleClick:()=>{M.type==="folder"?z(M.id):i?.(M)},className:n("flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors",S.has(M.id)&&"bg-accent",!S.has(M.id)&&"hover:bg-muted/50"),children:[K("input",{type:"checkbox",checked:S.has(M.id),disabled:M.selectable===!1,onChange:L=>{L.stopPropagation(),I(M.id)},className:"size-3.5 shrink-0 rounded"}),Yl(M),K("span",{className:"flex-1 truncate",children:M.name}),K("span",{className:"w-20 text-right text-xs text-muted-foreground",children:Mw(M.size)}),K("span",{className:"w-24 text-right text-xs text-muted-foreground",children:Dw(M.modifiedAt)}),K("button",{type:"button",onClick:L=>{L.stopPropagation(),I(M.id)},className:"rounded p-0.5 text-muted-foreground/40 hover:text-foreground",children:K(Sw,{className:"size-3.5"})})]},M.id))}):K("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(110px,1fr))] gap-2 p-2",children:A.map(M=>We("button",{type:"button",onClick:()=>{M.type==="folder"?z(M.id):l?.(M)},onDoubleClick:()=>{M.type==="folder"?z(M.id):i?.(M)},className:n("flex flex-col items-center gap-1 rounded-lg p-3 text-center transition-colors",S.has(M.id)&&"bg-accent ring-1 ring-primary/30",!S.has(M.id)&&"hover:bg-muted/50"),children:[Yl(M),K("span",{className:"w-full truncate text-xs",children:M.name}),K("span",{className:"text-[10px] text-muted-foreground",children:M.type==="folder"?"\u6587\u4EF6\u5939":M.extension?.toUpperCase()??"\u2014"})]},M.id))})}),We("div",{className:"flex shrink-0 items-center border-t bg-muted/20 px-3 py-1 text-[10px] text-muted-foreground",children:[We("span",{children:[A.length," \u9879"]}),S.size>0&&We("span",{className:"ml-2",children:["\u5DF2\u9009\u62E9 ",S.size," \u9879"]}),K("span",{className:"ml-auto",children:v==="list"?"\u5217\u8868\u89C6\u56FE":"\u7F51\u683C\u89C6\u56FE"})]})]})]})}import*as zt from"react";import{SearchIcon as Lp,FileTextIcon as Lw,UserIcon as Ew,PackageIcon as Ep,FileIcon as Fp,XIcon as Fw,ChevronRightIcon as Aw,Loader2Icon as Vw}from"lucide-react";import{jsx as he,jsxs as sr}from"react/jsx-runtime";var Ap={documents:he(Lw,{className:"size-4 text-blue-500"}),users:he(Ew,{className:"size-4 text-green-500"}),orders:he(Ep,{className:"size-4 text-orange-500"}),products:he(Ep,{className:"size-4 text-purple-500"}),pages:he(Fp,{className:"size-4 text-muted-foreground"}),custom:he(Fp,{className:"size-4 text-muted-foreground"})},Vp={documents:"\u6587\u6863",users:"\u7528\u6237",orders:"\u8BA2\u5355",products:"\u4EA7\u54C1",pages:"\u9875\u9762",custom:"\u5176\u4ED6"};function Bw({results:e=[],onSearch:t,onSelect:o,onClose:r,placeholder:a="\u641C\u7D22\u6587\u6863\u3001\u7528\u6237\u3001\u8BA2\u5355...",modal:s=!0,autoFocus:l=!0,loading:i=!1,open:c,minQueryLength:u=1,debounceMs:f=300,className:m}){let[p,b]=zt.useState(!1),g=c??p,[h,y]=zt.useState(""),[N,w]=zt.useState(0),C=zt.useRef(null),v=zt.useRef(null),x=k=>{y(k),w(0),v.current&&clearTimeout(v.current),k.length>=u&&(v.current=setTimeout(()=>{t?.(k)},f))};zt.useEffect(()=>{g&&l&&C.current&&C.current.focus()},[g,l]),zt.useEffect(()=>{let k=T=>{if((T.ctrlKey||T.metaKey)&&T.key==="k"){T.preventDefault();let z=!g;c||b(z),z||r?.()}T.key==="Escape"&&g&&(c||b(!1),r?.())};return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k),v.current&&clearTimeout(v.current)}},[g,c,r]);let P=k=>{k.key==="ArrowDown"?(k.preventDefault(),w(T=>Math.min(T+1,e.length-1))):k.key==="ArrowUp"?(k.preventDefault(),w(T=>Math.max(T-1,0))):k.key==="Enter"&&e[N]&&(k.preventDefault(),o?.(e[N]),c||b(!1))},S=zt.useMemo(()=>{let k={};for(let T of e){let z=T.category;k[z]||(k[z]=[]),k[z].push(T)}return k},[e]);if(!g&&!s)return null;let R=sr("div",{"data-slot":"global-search",className:n(s&&"fixed inset-0 z-50",m),onClick:s?()=>{c||b(!1),r?.()}:void 0,children:[s&&he("div",{className:"absolute inset-0 bg-background/80 backdrop-blur-sm"}),sr("div",{className:n(s?"absolute left-1/2 top-[20%] w-full max-w-xl -translate-x-1/2 rounded-xl border bg-background shadow-2xl":"w-full rounded-lg border bg-background"),onClick:k=>k.stopPropagation(),children:[sr("div",{className:"flex items-center gap-2 border-b px-4 py-3",children:[he(Lp,{className:"size-4 shrink-0 text-muted-foreground"}),he("input",{ref:C,type:"text",value:h,onChange:k=>x(k.target.value),onKeyDown:P,placeholder:a,className:"flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),i&&he(Vw,{className:"size-4 animate-spin text-muted-foreground"}),he("kbd",{className:"hidden rounded border bg-muted px-1.5 py-0.5 text-[10px] font-mono text-muted-foreground sm:inline",children:"esc"}),h&&he("button",{type:"button",onClick:()=>x(""),className:"text-muted-foreground hover:text-foreground",children:he(Fw,{className:"size-4"})})]}),he("div",{className:"max-h-80 overflow-auto p-2",children:h.length<u?he("div",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"\u8F93\u5165\u5173\u952E\u8BCD\u5F00\u59CB\u641C\u7D22"}):e.length===0&&!i?he("div",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"\u672A\u627E\u5230\u76F8\u5173\u7ED3\u679C"}):Object.entries(S).map(([k,T])=>sr("div",{className:"mb-1",children:[sr("div",{className:"flex items-center gap-2 px-3 py-1 text-[10px] font-medium uppercase text-muted-foreground",children:[Ap[k],Vp[k]??k]}),T.map(z=>{let W=e.findIndex($=>$.id===z.id);return sr("button",{type:"button",onClick:()=>{o?.(z),c||b(!1)},className:n("flex w-full items-center gap-2.5 rounded-md px-3 py-2 text-left text-sm transition-colors",W===N&&"bg-accent",W!==N&&"hover:bg-muted/50"),children:[z.icon??Ap[z.category]??he(Lp,{className:"size-4"}),sr("div",{className:"min-w-0 flex-1",children:[he("div",{className:"truncate font-medium",children:z.title}),z.subtitle&&he("div",{className:"truncate text-xs text-muted-foreground",children:z.subtitle})]}),he("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:z.categoryLabel??Vp[z.category]}),he(Aw,{className:"size-3 shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100"})]},z.id)})]},k))}),sr("div",{className:"flex items-center gap-4 border-t px-4 py-2 text-[10px] text-muted-foreground",children:[he("span",{children:"\u2191\u2193 \u5BFC\u822A"}),he("span",{children:"\u21B5 \u9009\u62E9"}),he("span",{children:"esc \u5173\u95ED"})]})]})]});return s?g?R:null:R}import*as Ea from"react";import{StarIcon as Hw,SendIcon as Ow,SmileIcon as $w,FrownIcon as Uw,MehIcon as Gw,ThumbsUpIcon as jl}from"lucide-react";import{jsx as ze,jsxs as Ur}from"react/jsx-runtime";function _w({title:e="\u8BF4\u8BF4\u4F60\u7684\u4F53\u9A8C",description:t,type:o="rating",maxRating:r=5,npsRange:a=[0,10],showTextFeedback:s=!0,feedbackPlaceholder:l="\u544A\u8BC9\u6211\u4EEC\u66F4\u591A...",submitLabel:i="\u63D0\u4EA4\u53CD\u9988",value:c,defaultValue:u,feedbackText:f,onChange:m,onSubmit:p,className:b,disabled:g=!1,submitted:h}){let[y,N]=Ea.useState(u??null),[w,C]=Ea.useState(null),[v,x]=Ea.useState(""),[P,S]=Ea.useState(!1),R=c??y,k=f??v,T=h??P,z=w??R,W=U=>{c||N(U),m?.(U)},$=()=>{R!=null&&(S(!0),p?.(R,k))};if(T)return Ur("div",{"data-slot":"feedback-survey",className:n("flex flex-col items-center gap-3 rounded-lg border p-6 text-center",b),children:[ze(jl,{className:"size-10 text-green-500"}),ze("h3",{className:"text-lg font-semibold",children:"\u611F\u8C22\u4F60\u7684\u53CD\u9988\uFF01"}),ze("p",{className:"text-sm text-muted-foreground",children:R!=null&&`\u4F60\u7ED9\u51FA\u4E86 ${R} \u5206\u7684\u8BC4\u4EF7`})]});let E=()=>ze("div",{className:"flex items-center gap-1",children:Array.from({length:r},(U,M)=>{let L=M+1,B=z!=null&&L<=z;return ze("button",{type:"button",disabled:g,onClick:()=>W(L),onMouseEnter:()=>C(L),onMouseLeave:()=>C(null),className:n("transition-transform hover:scale-110",g&&"cursor-not-allowed opacity-50"),children:ze(Hw,{className:n("size-8 transition-colors",B?"fill-amber-400 text-amber-400":"text-muted-foreground/30")})},L)})}),A=()=>ze("div",{className:"flex items-center gap-4",children:[{value:1,icon:Uw,color:"text-red-400",label:"\u4E0D\u6EE1\u610F"},{value:2,icon:Gw,color:"text-amber-400",label:"\u4E00\u822C"},{value:3,icon:$w,color:"text-green-400",label:"\u6EE1\u610F"}].map(U=>{let M=U.icon,L=R===U.value;return Ur("button",{type:"button",disabled:g,onClick:()=>W(U.value),className:n("flex flex-col items-center gap-1 rounded-lg p-3 transition-all",L&&"bg-accent ring-2 ring-primary/30",!L&&"hover:bg-muted/50",g&&"cursor-not-allowed opacity-50"),children:[ze(M,{className:n("size-10",U.color)}),ze("span",{className:"text-xs",children:U.label})]},U.value)})}),I=()=>{let[U,M]=a;return Ur("div",{className:"flex flex-col items-center gap-3",children:[ze("div",{className:"flex gap-1",children:Array.from({length:M-U+1},(L,B)=>{let j=U+B,ne=z!=null&&j===z;return ze("button",{type:"button",disabled:g,onClick:()=>W(j),onMouseEnter:()=>C(j),onMouseLeave:()=>C(null),className:n("size-8 rounded-md text-xs font-medium transition-all",ne?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-primary/20",g&&"cursor-not-allowed opacity-50"),children:j},j)})}),Ur("div",{className:"flex w-full justify-between text-[10px] text-muted-foreground",children:[ze("span",{children:"\u4E0D\u592A\u53EF\u80FD"}),ze("span",{children:"\u975E\u5E38\u53EF\u80FD"})]})]})},H=()=>ze("div",{className:"flex items-center gap-4",children:[{value:1,icon:jl,color:"text-green-500",label:"\u6709\u5E2E\u52A9"},{value:-1,icon:jl,color:"text-red-400",label:"\u6CA1\u5E2E\u52A9",flip:!0}].map(U=>{let M=U.icon,L=R===U.value;return Ur("button",{type:"button",disabled:g,onClick:()=>W(L?0:U.value),className:n("flex flex-col items-center gap-1 rounded-lg border p-3 transition-all min-w-[80px]",L&&"bg-accent border-primary/30",!L&&"hover:bg-muted/50",g&&"cursor-not-allowed opacity-50"),children:[ze(M,{className:n("size-8",U.color,U.flip&&"rotate-180")}),ze("span",{className:"text-xs",children:U.label})]},U.value)})});return Ur("div",{"data-slot":"feedback-survey",className:n("flex flex-col items-center gap-4 rounded-lg border p-6",b),children:[e&&ze("h3",{className:"text-lg font-semibold",children:e}),t&&ze("p",{className:"text-sm text-muted-foreground",children:t}),o==="rating"&&E(),o==="satisfaction"&&A(),o==="nps"&&I(),o==="thumbs"&&H(),s&&ze("textarea",{value:k,onChange:U=>x(U.target.value),placeholder:l,disabled:g,rows:3,className:n("w-full rounded-lg border border-input bg-transparent px-3 py-2 text-sm","outline-none resize-none transition-colors","placeholder:text-muted-foreground","focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50","disabled:cursor-not-allowed disabled:opacity-50")}),Ur("button",{type:"button",onClick:$,disabled:g||R==null,className:n("inline-flex items-center gap-1.5 rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground","hover:bg-primary/90 transition-colors","disabled:cursor-not-allowed disabled:opacity-50"),children:[ze(Ow,{className:"size-3.5"}),i]})]})}import*as ir from"react";import{BookOpenIcon as Kw,SearchIcon as Ww,ChevronRightIcon as qw,FileTextIcon as Bp,FolderIcon as Yw,ClockIcon as jw,UserIcon as Qw}from"lucide-react";import{jsx as Le,jsxs as Lt}from"react/jsx-runtime";function Hp(e){return"content"in e||"excerpt"in e}function Xw({data:e,selectedArticleId:t,onSelectArticle:o,showSidebar:r=!0,searchable:a=!0,defaultExpandedCategories:s=[],className:l}){let[i,c]=ir.useState(null),u=t??i,[f,m]=ir.useState(""),[p,b]=ir.useState(new Set(s)),g=ir.useMemo(()=>{let v=[],x=P=>{for(let S of P)Hp(S)?v.push(S):S.children&&x(S.children)};return x(e),v},[e]),h=ir.useMemo(()=>{if(!f.trim())return g;let v=f.toLowerCase();return g.filter(x=>x.title.toLowerCase().includes(v)||x.excerpt?.toLowerCase().includes(v)||x.tags?.some(P=>P.toLowerCase().includes(v)))},[g,f]),y=ir.useMemo(()=>g.find(v=>v.id===u),[g,u]),N=v=>{t||c(v.id),o?.(v)},w=v=>{b(x=>{let P=new Set(x);return P.has(v)?P.delete(v):P.add(v),P})},C=(v,x=0)=>{if(Hp(v)){let S=v.id===u;return Lt("button",{type:"button",onClick:()=>N(v),className:n("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm transition-colors",S&&"bg-accent font-medium text-accent-foreground",!S&&"text-muted-foreground hover:bg-muted/50 hover:text-foreground"),style:{paddingLeft:x*16+24},children:[Le(Bp,{className:"size-3.5 shrink-0"}),Le("span",{className:"truncate",children:v.title})]},v.id)}let P=p.has(v.id);return Lt("div",{children:[Lt("button",{type:"button",onClick:()=>w(v.id),className:n("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm font-medium transition-colors","hover:bg-muted/50"),style:{paddingLeft:x*16+8},children:[Le(qw,{className:n("size-3.5 shrink-0 transition-transform",P&&"rotate-90")}),v.icon??Le(Yw,{className:"size-3.5 shrink-0 text-amber-500"}),Le("span",{className:"truncate",children:v.name})]}),P&&v.children?.map(S=>C(S,x+1))]},v.id)};return Lt("div",{"data-slot":"knowledge-base",className:n("flex h-[500px] overflow-hidden rounded-lg border bg-background",l),children:[r&&Lt("div",{className:"flex w-56 shrink-0 flex-col border-r bg-muted/20",children:[a&&Le("div",{className:"border-b p-2",children:Lt("div",{className:"relative",children:[Le(Ww,{className:"absolute left-2 top-1/2 size-3 -translate-y-1/2 text-muted-foreground"}),Le("input",{type:"text",value:f,onChange:v=>m(v.target.value),placeholder:"\u641C\u7D22\u6587\u7AE0...",className:n("h-8 w-full rounded-md border border-input bg-background pl-7 pr-2 text-xs","outline-none focus-visible:border-ring")})]})}),Le("div",{className:"flex-1 overflow-auto p-1.5",children:f.trim()?h.map(v=>Lt("button",{type:"button",onClick:()=>N(v),className:n("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm transition-colors",v.id===u&&"bg-accent font-medium",v.id!==u&&"text-muted-foreground hover:bg-muted/50"),children:[Le(Bp,{className:"size-3.5 shrink-0"}),Le("span",{className:"truncate",children:v.title})]},v.id)):e.map(v=>C(v))})]}),Le("div",{className:"flex-1 overflow-auto p-6",children:y?Lt("article",{children:[Le("h1",{className:"text-2xl font-bold",children:y.title}),Lt("div",{className:"mt-2 flex items-center gap-3 text-xs text-muted-foreground",children:[y.author&&Lt("span",{className:"flex items-center gap-1",children:[Le(Qw,{className:"size-3"}),y.author]}),y.updatedAt&&Lt("span",{className:"flex items-center gap-1",children:[Le(jw,{className:"size-3"}),y.updatedAt]})]}),y.tags&&y.tags.length>0&&Le("div",{className:"mt-3 flex flex-wrap gap-1",children:y.tags.map(v=>Le("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",children:v},v))}),Le("div",{className:"mt-6 text-sm leading-relaxed text-foreground/85",children:y.content??y.excerpt??"\u6682\u65E0\u5185\u5BB9"})]}):Lt("div",{className:"flex h-full flex-col items-center justify-center gap-2 text-muted-foreground",children:[Le(Kw,{className:"size-12"}),Le("p",{className:"text-sm",children:"\u9009\u62E9\u5DE6\u4FA7\u6587\u7AE0\u5F00\u59CB\u9605\u8BFB"})]})})]})}import*as Gr from"react";import{TicketIcon as Jw,PlusIcon as Zw,SearchIcon as eC,ClockIcon as tC,CheckCircle2Icon as Op,AlertCircleIcon as oC,MessageCircleIcon as $p,UserIcon as Up,SendIcon as rC}from"lucide-react";import{Fragment as sC,jsx as Z,jsxs as ge}from"react/jsx-runtime";var Ys={open:{label:"\u5F85\u5904\u7406",icon:Z(oC,{className:"size-3"}),className:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400"},in_progress:{label:"\u5904\u7406\u4E2D",icon:Z(tC,{className:"size-3"}),className:"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400"},resolved:{label:"\u5DF2\u89E3\u51B3",icon:Z(Op,{className:"size-3"}),className:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400"},closed:{label:"\u5DF2\u5173\u95ED",icon:Z(Op,{className:"size-3"}),className:"bg-muted text-muted-foreground"}},Gp={low:{label:"\u4F4E",className:"text-muted-foreground"},medium:{label:"\u4E2D",className:"text-blue-600"},high:{label:"\u9AD8",className:"text-amber-600"},urgent:{label:"\u7D27\u6025",className:"text-red-600"}};function nC(e){let t=new Date(e),r=new Date().getTime()-t.getTime(),a=Math.floor(r/6e4);if(a<60)return`${a}\u5206\u949F\u524D`;let s=Math.floor(a/60);if(s<24)return`${s}\u5C0F\u65F6\u524D`;let l=Math.floor(s/24);return l<7?`${l}\u5929\u524D`:t.toLocaleDateString("zh-CN")}function aC({tickets:e,selectedTicketId:t,currentUser:o="\u5F53\u524D\u7528\u6237",onSelectTicket:r,onSendReply:a,onCreateTicket:s,onStatusChange:l,className:i}){let[c,u]=Gr.useState(null),f=t??c,[m,p]=Gr.useState(""),[b,g]=Gr.useState("all"),[h,y]=Gr.useState(""),N=x=>{t||u(x.id),r?.(x)},w=e.find(x=>x.id===f),C=Gr.useMemo(()=>{let x=e;if(b!=="all"&&(x=x.filter(P=>P.status===b)),m.trim()){let P=m.toLowerCase();x=x.filter(S=>S.title.toLowerCase().includes(P))}return x},[e,b,m]),v=()=>{!h.trim()||!f||(a?.(f,h),y(""))};return ge("div",{"data-slot":"help-desk",className:n("flex h-[500px] overflow-hidden rounded-lg border bg-background",i),children:[ge("div",{className:"flex w-80 shrink-0 flex-col border-r",children:[ge("div",{className:"flex items-center justify-between border-b px-3 py-2",children:[ge("h3",{className:"text-sm font-semibold",children:["\u5DE5\u5355 (",e.length,")"]}),s&&Z("button",{type:"button",onClick:s,className:"rounded p-1 text-muted-foreground hover:text-foreground",title:"\u521B\u5EFA\u5DE5\u5355",children:Z(Zw,{className:"size-4"})})]}),ge("div",{className:"border-b p-2",children:[ge("div",{className:"relative mb-2",children:[Z(eC,{className:"absolute left-2 top-1/2 size-3 -translate-y-1/2 text-muted-foreground"}),Z("input",{type:"text",value:m,onChange:x=>p(x.target.value),placeholder:"\u641C\u7D22\u5DE5\u5355...",className:n("h-7 w-full rounded border border-input bg-transparent pl-6 pr-2 text-xs","outline-none focus-visible:border-ring")})]}),Z("div",{className:"flex gap-1",children:["all","open","in_progress","resolved"].map(x=>Z("button",{type:"button",onClick:()=>g(x),className:n("rounded px-2 py-0.5 text-[10px] transition-colors",b===x?"bg-primary text-primary-foreground":"bg-muted/50 text-muted-foreground hover:bg-muted"),children:x==="all"?"\u5168\u90E8":Ys[x]?.label??x},x))})]}),ge("div",{className:"flex-1 overflow-auto",children:[C.map(x=>{let P=Ys[x.status],S=x.id===f;return ge("button",{type:"button",onClick:()=>N(x),className:n("flex w-full flex-col gap-1 border-b px-3 py-2.5 text-left transition-colors",S&&"bg-accent",!S&&"hover:bg-muted/30"),children:[ge("div",{className:"flex items-center gap-1.5",children:[ge("span",{className:n("inline-flex items-center gap-0.5 rounded px-1.5 py-0.5 text-[10px] font-medium",P.className),children:[P.icon,P.label]}),x.priority!=="low"&&Z("span",{className:n("text-[10px]",Gp[x.priority].className),children:Gp[x.priority].label})]}),Z("span",{className:"truncate text-sm font-medium",children:x.title}),ge("div",{className:"flex items-center gap-2 text-[10px] text-muted-foreground",children:[x.assignee&&ge("span",{className:"flex items-center gap-0.5",children:[Z(Up,{className:"size-2.5"}),x.assignee]}),Z("span",{children:nC(x.updatedAt)}),x.replies&&x.replies.length>0&&ge("span",{className:"flex items-center gap-0.5",children:[Z($p,{className:"size-2.5"}),x.replies.length]})]})]},x.id)}),C.length===0&&Z("div",{className:"py-8 text-center text-xs text-muted-foreground",children:"\u6682\u65E0\u5DE5\u5355"})]})]}),Z("div",{className:"flex flex-1 flex-col overflow-hidden",children:w?ge(sC,{children:[ge("div",{className:"shrink-0 border-b px-4 py-3",children:[ge("div",{className:"flex items-start justify-between gap-2",children:[ge("div",{className:"min-w-0",children:[Z("h2",{className:"text-lg font-semibold",children:w.title}),ge("div",{className:"mt-1 flex items-center gap-2 text-xs text-muted-foreground",children:[Z("span",{children:w.id}),Z("span",{children:"\xB7"}),ge("span",{className:"flex items-center gap-0.5",children:[Z(Up,{className:"size-3"}),w.assignee??"\u672A\u5206\u914D"]}),Z("span",{children:"\xB7"}),Z("span",{children:w.createdAt})]})]}),Z("select",{value:w.status,onChange:x=>l?.(w.id,x.target.value),className:"rounded border border-input bg-background px-2 py-1 text-xs",children:Object.keys(Ys).map(x=>Z("option",{value:x,children:Ys[x].label},x))})]}),w.description&&Z("p",{className:"mt-2 text-sm text-muted-foreground",children:w.description})]}),Z("div",{className:"flex-1 overflow-auto p-4",children:w.replies&&w.replies.length>0?Z("div",{className:"space-y-4",children:w.replies.map(x=>ge("div",{className:n("flex gap-3",x.isStaff&&"flex-row-reverse"),children:[Z("div",{className:"flex size-7 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-medium",children:x.author[0]}),ge("div",{className:n("max-w-[75%]",x.isStaff?"items-end":""),children:[ge("div",{className:"flex items-center gap-2",children:[Z("span",{className:"text-xs font-medium",children:x.author}),x.isStaff&&Z("span",{className:"rounded bg-primary/10 px-1 py-0.5 text-[10px] text-primary",children:"\u5BA2\u670D"}),Z("span",{className:"text-[10px] text-muted-foreground",children:x.createdAt})]}),Z("div",{className:n("mt-1 rounded-lg px-3 py-2 text-sm",x.isStaff?"bg-primary text-primary-foreground":"bg-muted/50"),children:x.content})]})]},x.id))}):ge("div",{className:"flex h-full flex-col items-center justify-center gap-2 text-muted-foreground",children:[Z($p,{className:"size-8"}),Z("p",{className:"text-sm",children:"\u6682\u65E0\u5BF9\u8BDD"})]})}),Z("div",{className:"shrink-0 border-t p-3",children:ge("div",{className:"flex items-start gap-2",children:[Z("textarea",{value:h,onChange:x=>y(x.target.value),placeholder:"\u8F93\u5165\u56DE\u590D...",rows:2,className:n("flex-1 rounded-lg border border-input bg-transparent px-3 py-2 text-sm","outline-none resize-none","placeholder:text-muted-foreground","focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50"),onKeyDown:x=>{x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),v())}}),Z("button",{type:"button",onClick:v,disabled:!h.trim(),className:n("rounded-lg p-2 text-primary hover:bg-primary/10","disabled:cursor-not-allowed disabled:opacity-30"),children:Z(rC,{className:"size-4"})})]})})]}):ge("div",{className:"flex h-full flex-col items-center justify-center gap-2 text-muted-foreground",children:[Z(Jw,{className:"size-12"}),Z("p",{className:"text-sm",children:"\u9009\u62E9\u5DE6\u4FA7\u5DE5\u5355\u67E5\u770B\u8BE6\u60C5"})]})})]})}import*as Fa from"react";import{cva as iC}from"class-variance-authority";import{jsx as lr,jsxs as Ql}from"react/jsx-runtime";var lC=iC("flex items-center gap-2 rounded-lg border border-input bg-transparent transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",{variants:{size:{default:"h-8 px-2.5",sm:"h-7 px-2 text-sm",lg:"h-9 px-3 text-base"}},defaultVariants:{size:"default"}});function cC({className:e,value:t,defaultValue:o="",onChange:r,placeholder:a,disabled:s=!1,readOnly:l=!1,showToggle:i=!0,strengthMeter:c=!1,minLength:u=8,size:f="default",...m}){let[p,b]=Fa.useState(o),[g,h]=Fa.useState(!1),y=t!==void 0,N=y?t:p,w=C=>{let v=C.target.value;y||b(v),r?.(v)};return Ql("div",{"data-slot":"password-input",className:n("flex flex-col gap-1.5",e),children:[Ql("div",{className:n(lC({size:f}),s&&"pointer-events-none"),children:[lr("input",{"data-slot":"password-input-field",type:g?"text":"password",value:N,onChange:w,placeholder:a,disabled:s,readOnly:l,minLength:u,className:"placeholder:text-muted-foreground h-full w-full bg-transparent text-sm outline-none",...m}),i&&!l&&lr("button",{type:"button",onClick:()=>h(C=>!C),disabled:s,className:"text-muted-foreground hover:text-foreground shrink-0",tabIndex:-1,"aria-label":g?"Hide password":"Show password",children:g?lr(gc,{className:"size-4"}):lr(fc,{className:"size-4"})})]}),c&&lr(_p,{value:N,minLength:u})]})}function _p({value:e="",minLength:t=8,className:o}){let r=Fa.useMemo(()=>{if(!e)return 0;let c=0;return e.length>=t&&c++,/[a-z]/.test(e)&&/[A-Z]/.test(e)&&c++,/\d/.test(e)&&c++,/[^a-zA-Z0-9]/.test(e)&&c++,c},[e,t]),a=["Weak","Fair","Good","Strong"],s=["bg-red-500","bg-orange-500","bg-yellow-500","bg-green-500"],l=e?a[r-1]??a[0]:"",i=e?s[r-1]??s[0]:"bg-muted";return Ql("div",{"data-slot":"password-strength-meter",className:n("flex flex-col gap-1",o),children:[lr("div",{className:"flex gap-1",children:[0,1,2,3].map(c=>lr("div",{className:n("h-1 flex-1 rounded-full transition-colors",c<r?i:"bg-muted")},c))}),e&&lr("span",{className:"text-muted-foreground text-xs",children:l})]})}import*as Jl from"react";import{cva as dC}from"class-variance-authority";import{jsx as js,jsxs as Xl}from"react/jsx-runtime";var uC=dC("flex items-center gap-1 rounded-lg border border-input bg-transparent transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 dark:bg-input/30",{variants:{size:{default:"h-8",sm:"h-7 text-sm",lg:"h-9 text-base"}},defaultVariants:{size:"default"}}),pC=[{code:"CN",label:"China",dialCode:"+86",flag:"\u{1F1E8}\u{1F1F3}"},{code:"HK",label:"Hong Kong",dialCode:"+852",flag:"\u{1F1ED}\u{1F1F0}"},{code:"TW",label:"Taiwan",dialCode:"+886",flag:"\u{1F1F9}\u{1F1FC}"},{code:"US",label:"United States",dialCode:"+1",flag:"\u{1F1FA}\u{1F1F8}"},{code:"GB",label:"United Kingdom",dialCode:"+44",flag:"\u{1F1EC}\u{1F1E7}"},{code:"JP",label:"Japan",dialCode:"+81",flag:"\u{1F1EF}\u{1F1F5}"},{code:"KR",label:"Korea",dialCode:"+82",flag:"\u{1F1F0}\u{1F1F7}"},{code:"SG",label:"Singapore",dialCode:"+65",flag:"\u{1F1F8}\u{1F1EC}"},{code:"DE",label:"Germany",dialCode:"+49",flag:"\u{1F1E9}\u{1F1EA}"},{code:"FR",label:"France",dialCode:"+33",flag:"\u{1F1EB}\u{1F1F7}"},{code:"AU",label:"Australia",dialCode:"+61",flag:"\u{1F1E6}\u{1F1FA}"},{code:"CA",label:"Canada",dialCode:"+1",flag:"\u{1F1E8}\u{1F1E6}"}];function mC({className:e,value:t,defaultValue:o="",onChange:r,countries:a=pC,defaultCountry:s="+86",placeholder:l="Enter phone number",disabled:i=!1,readOnly:c=!1,size:u="default",...f}){let m=a??[],[p,b]=Jl.useState(o),[g,h]=Jl.useState(s||m[0]?.dialCode||"+86"),y=t!==void 0,N=y?t:p,w=v=>{let x=v.target.value.replace(/[^\d]/g,"");y||b(x),r?.({countryCode:g,phone:x,full:`${g}${x}`})},C=v=>{let x=v.target.value;h(x),r?.({countryCode:x,phone:N,full:`${x}${N}`})};return Xl("div",{"data-slot":"phone-input","data-size":u,className:n(uC({size:u}),i&&"pointer-events-none",e),...f,children:[Xl("div",{className:"relative flex items-center",children:[js("select",{"data-slot":"phone-input-country",value:g,onChange:C,disabled:i||c,className:"h-full cursor-pointer appearance-none bg-transparent pr-6 pl-2.5 text-sm outline-none disabled:cursor-not-allowed","aria-label":"Select country code",children:m.map(v=>Xl("option",{value:v.dialCode,children:[v.flag," ",v.dialCode]},v.code))}),js(we,{className:"text-muted-foreground pointer-events-none absolute right-1 size-3"})]}),js("div",{className:"bg-border h-full w-px"}),js("input",{"data-slot":"phone-input-field",type:"tel",value:N,onChange:w,placeholder:l,disabled:i,readOnly:c,className:"placeholder:text-muted-foreground h-full w-full bg-transparent px-2.5 text-sm outline-none"})]})}import*as bo from"react";import{cva as fC}from"class-variance-authority";import{jsx as Kp}from"react/jsx-runtime";var gC=fC("flex items-center rounded-lg border border-input bg-transparent transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",{variants:{size:{default:"h-8 px-2.5",sm:"h-7 px-2 text-sm",lg:"h-9 px-3 text-base"}},defaultVariants:{size:"default"}});function bC({className:e,value:t,defaultValue:o="",onChange:r,mask:a,placeholder:s,disabled:l=!1,readOnly:i=!1,guide:c=!0,keepCharPositions:u=!1,size:f="default",...m}){let[p,b]=bo.useState(o),g=bo.useRef(null),h=t!==void 0,y=h?t:p,N=bo.useCallback(P=>{let S="",R=0;for(let k=0;k<a.length&&R<P.length;k++){let T=a[k],z=P[R]??"";T==="#"?/\d/.test(z)?(S+=z,R++):(R++,k--):T==="A"?/[a-zA-Z]/.test(z)?(S+=z,R++):(R++,k--):T==="*"?(S+=z,R++):(S+=T,z===T&&R++)}return S},[a]),w=bo.useCallback(P=>{let S="";for(let R=0;R<P.length;R++){let k=R<a.length?a[R]:null,T=P[R]??"";k==="#"?/\d/.test(T)&&(S+=T):k==="A"?/[a-zA-Z]/.test(T)&&(S+=T):k==="*"&&(S+=T)}return S},[a]),C=bo.useMemo(()=>y?N(y):"",[y,N]),v=bo.useMemo(()=>!c||!a?"":a.replace(/[#A*]/g,"_"),[c,a]),x=P=>{let S=P.target.value,R=w(S);h||b(R),r?.(R)};return Kp("div",{"data-slot":"masked-input","data-size":f,className:n(gC({size:f}),l&&"pointer-events-none",e),children:Kp("input",{ref:g,"data-slot":"masked-input-field",type:"text",value:C,onChange:x,placeholder:s??(c?v:void 0),disabled:l,readOnly:i,className:"placeholder:text-muted-foreground h-full w-full bg-transparent text-sm outline-none",...m})})}import*as Zl from"react";import{jsx as Jt,jsxs as Qs}from"react/jsx-runtime";function Wp(e,t){let o=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(o)).replace("MM",r).replace("dd",a)}function vC({value:e,defaultValue:t=[null,null],onChange:o,format:r="yyyy-MM-dd",placeholder:a=["Start date","End date"],disabled:s=!1,readOnly:l=!1,allowClear:i=!1,disabledDate:c,size:u="default",className:f}){let[m,p]=Zl.useState(t),[b,g]=Zl.useState(!1),h=e!==void 0,y=h?e:m,[N,w]=y,C=u==="sm"?"h-7 text-sm":u==="lg"?"h-9 text-base":"h-8 text-sm",v=R=>{h||p(R),o?.(R)},x=()=>{v([null,null])},P=N?Wp(N,r):"",S=w?Wp(w,r):"";return Qs("div",{"data-slot":"date-range-picker",className:n("relative inline-flex items-center gap-1",f),children:[Qs(ce,{open:b,onOpenChange:g,children:[Jt(de,{render:Qs(D,{variant:"outline",size:u==="sm"?"sm":u==="lg"?"lg":"default",disabled:s||l,className:n(C,"justify-start font-normal",!P&&"text-muted-foreground"),children:[Jt(Ho,{className:"size-4 shrink-0"}),P||a[0]]})}),Jt(ue,{className:"w-auto p-0",align:"start",children:Jt(en,{mode:"single",selected:N??void 0,onSelect:R=>{if(!R)return;let k=w??R,T=R;v(T<=k?[T,k]:[T,null])},disabled:c})})]}),Jt("span",{className:"text-muted-foreground",children:"\u2014"}),Qs(ce,{open:b,onOpenChange:g,children:[Jt(de,{render:Jt(D,{variant:"outline",size:u==="sm"?"sm":u==="lg"?"lg":"default",disabled:s||l,className:n(C,"justify-start font-normal",!S&&"text-muted-foreground"),children:S||a[1]})}),Jt(ue,{className:"w-auto p-0",align:"start",children:Jt(en,{mode:"single",selected:w??void 0,onSelect:R=>{if(!R)return;let k=N??R,T=R;v(k<=T?[k,T]:[null,T])},disabled:c})})]}),i&&(N||w)&&!s&&!l&&Jt("button",{type:"button",onClick:x,className:"text-muted-foreground hover:text-foreground ml-1 shrink-0","aria-label":"Clear date range",children:Jt(oe,{className:"size-3.5"})})]})}import*as Xs from"react";import{jsx as Zt,jsxs as Aa}from"react/jsx-runtime";var xC=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function hC(e){let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0");return`${t}-${o}`}function yC({value:e,defaultValue:t=null,onChange:o,placeholder:r="Select month",disabled:a=!1,readOnly:s=!1,allowClear:l=!1,size:i="default",className:c}){let[u,f]=Xs.useState(t),[m,p]=Xs.useState(!1),[b,g]=Xs.useState(()=>{let k=e??t??new Date;return k?k.getFullYear():new Date().getFullYear()}),h=e!==void 0,y=h?e:u,N=k=>{h||f(k),o?.(k),k&&p(!1)},w=i==="sm"?"h-7 text-sm":i==="lg"?"h-9 text-base":"h-8 text-sm",C=y?hC(y):"",v=k=>{N(new Date(b,k,1))},x=()=>g(k=>k-1),P=()=>g(k=>k+1),S=y?y.getFullYear():-1,R=y?y.getMonth():-1;return Aa("div",{"data-slot":"month-picker",className:n("relative inline-block",c),children:[Aa(ce,{open:m,onOpenChange:p,children:[Zt(de,{render:Aa(D,{variant:"outline",size:i==="sm"?"sm":i==="lg"?"lg":"default",disabled:a||s,className:n(w,"w-full justify-start font-normal",!C&&"text-muted-foreground"),children:[Zt(Ho,{className:"size-4 shrink-0"}),C||r]})}),Zt(ue,{className:"w-auto p-2",align:"start",children:Aa("div",{className:"flex flex-col gap-2",children:[Aa("div",{className:"flex items-center justify-between",children:[Zt(D,{variant:"ghost",size:"icon-sm",onClick:x,"aria-label":"Previous year",children:Zt(Ye,{className:"size-4"})}),Zt("span",{className:"text-sm font-medium",children:b}),Zt(D,{variant:"ghost",size:"icon-sm",onClick:P,"aria-label":"Next year",children:Zt(te,{className:"size-4"})})]}),Zt("div",{className:"grid grid-cols-3 gap-1",children:xC.map((k,T)=>Zt(D,{variant:b===S&&T===R?"default":"ghost",size:"sm",onClick:()=>v(T),className:"h-8 text-xs",children:k},T))})]})})]}),l&&y&&!a&&!s&&Zt("button",{type:"button",onClick:()=>N(null),className:"text-muted-foreground hover:text-foreground absolute top-1/2 right-2 -translate-y-1/2","aria-label":"Clear month",children:"\xD7"})]})}import*as Js from"react";import{jsx as eo,jsxs as Va}from"react/jsx-runtime";function NC(e){return String(e.getFullYear())}function wC({value:e,defaultValue:t=null,onChange:o,placeholder:r="Select year",disabled:a=!1,readOnly:s=!1,allowClear:l=!1,size:i="default",className:c}){let[u,f]=Js.useState(t),[m,p]=Js.useState(!1),[b,g]=Js.useState(()=>{let T=e??t??new Date,z=T?T.getFullYear():new Date().getFullYear();return Math.floor(z/12)*12}),h=e!==void 0,y=h?e:u,N=T=>{h||f(T),o?.(T),T&&p(!1)},w=i==="sm"?"h-7 text-sm":i==="lg"?"h-9 text-base":"h-8 text-sm",C=y?NC(y):"",v=Array.from({length:12},(T,z)=>b+z),x=y?y.getFullYear():-1,P=()=>g(T=>T-12),S=()=>g(T=>T+12),R=T=>{N(new Date(T,0,1))},k=`${b} \u2013 ${b+11}`;return Va("div",{"data-slot":"year-picker",className:n("relative inline-block",c),children:[Va(ce,{open:m,onOpenChange:p,children:[eo(de,{render:Va(D,{variant:"outline",size:i==="sm"?"sm":i==="lg"?"lg":"default",disabled:a||s,className:n(w,"w-full justify-start font-normal",!C&&"text-muted-foreground"),children:[eo(Ho,{className:"size-4 shrink-0"}),C||r]})}),eo(ue,{className:"w-auto p-2",align:"start",children:Va("div",{className:"flex flex-col gap-2",children:[Va("div",{className:"flex items-center justify-between",children:[eo(D,{variant:"ghost",size:"icon-sm",onClick:P,"aria-label":"Previous decade",children:eo(Ye,{className:"size-4"})}),eo("span",{className:"text-sm font-medium",children:k}),eo(D,{variant:"ghost",size:"icon-sm",onClick:S,"aria-label":"Next decade",children:eo(te,{className:"size-4"})})]}),eo("div",{className:"grid grid-cols-4 gap-1",children:v.map(T=>eo(D,{variant:T===x?"default":"ghost",size:"sm",onClick:()=>R(T),className:"h-8 text-xs",children:T},T))})]})})]}),l&&y&&!a&&!s&&eo("button",{type:"button",onClick:()=>N(null),className:"text-muted-foreground hover:text-foreground absolute top-1/2 right-2 -translate-y-1/2","aria-label":"Clear year",children:"\xD7"})]})}import*as Zs from"react";import{jsx as vo,jsxs as Vn}from"react/jsx-runtime";function CC(e){return`${e.year}-Q${e.quarter}`}function PC({value:e,defaultValue:t=null,onChange:o,placeholder:r="Select quarter",disabled:a=!1,readOnly:s=!1,allowClear:l=!1,size:i="default",className:c}){let[u,f]=Zs.useState(t),[m,p]=Zs.useState(!1),[b,g]=Zs.useState(()=>{let k=e??t;return k?k.year:new Date().getFullYear()}),h=e!==void 0,y=h?e:u,N=k=>{h||f(k),o?.(k),k&&p(!1)},w=i==="sm"?"h-7 text-sm":i==="lg"?"h-9 text-base":"h-8 text-sm",C=y?CC(y):"",v=()=>g(k=>k-1),x=()=>g(k=>k+1),P=k=>{N({year:b,quarter:k})},S=y?y.year:-1,R=y?y.quarter:-1;return Vn("div",{"data-slot":"quarter-picker",className:n("relative inline-block",c),children:[Vn(ce,{open:m,onOpenChange:p,children:[vo(de,{render:Vn(D,{variant:"outline",size:i==="sm"?"sm":i==="lg"?"lg":"default",disabled:a||s,className:n(w,"w-full justify-start font-normal",!C&&"text-muted-foreground"),children:[vo(Ho,{className:"size-4 shrink-0"}),C||r]})}),vo(ue,{className:"w-auto p-2",align:"start",children:Vn("div",{className:"flex flex-col gap-2",children:[Vn("div",{className:"flex items-center justify-between",children:[vo(D,{variant:"ghost",size:"icon-sm",onClick:v,"aria-label":"Previous year",children:vo(Ye,{className:"size-4"})}),vo("span",{className:"text-sm font-medium",children:b}),vo(D,{variant:"ghost",size:"icon-sm",onClick:x,"aria-label":"Next year",children:vo(te,{className:"size-4"})})]}),vo("div",{className:"grid grid-cols-2 gap-1",children:[1,2,3,4].map(k=>Vn(D,{variant:b===S&&k===R?"default":"ghost",size:"sm",onClick:()=>P(k),className:"h-8 text-xs",children:["Q",k]},k))})]})})]}),l&&y&&!a&&!s&&vo("button",{type:"button",onClick:()=>N(null),className:"text-muted-foreground hover:text-foreground absolute top-1/2 right-2 -translate-y-1/2","aria-label":"Clear quarter",children:"\xD7"})]})}import*as qp from"react";import{jsx as cr,jsxs as ec}from"react/jsx-runtime";function RC({className:e,value:t,defaultValue:o=[0,100],onChange:r,min:a=0,max:s=100,step:l=1,disabled:i=!1,showValue:c=!1,formatValue:u}){let[f,m]=qp.useState(o),p=t!==void 0,b=p?t:f,[g,h]=b,y=s-a,N=(g-a)/y*100,w=(h-a)/y*100,C=S=>{p||m(S),r?.(S)},v=S=>{let R=Number(S.target.value),k=Math.min(R,h-l);C([k,h])},x=S=>{let R=Number(S.target.value),k=Math.max(R,g+l);C([g,k])},P=S=>u?u(S):String(S);return ec("div",{"data-slot":"range-slider",className:n("flex flex-col gap-2",i&&"pointer-events-none opacity-50",e),children:[ec("div",{className:"relative flex h-5 w-full items-center",children:[cr("div",{className:"bg-muted absolute h-1 w-full rounded-full"}),cr("div",{className:"bg-primary absolute h-1 rounded-full",style:{left:`${N}%`,width:`${w-N}%`}}),cr("div",{className:"border-primary bg-background absolute size-4 -translate-x-1/2 rounded-full border-2 shadow-sm transition-transform hover:scale-110",style:{left:`${N}%`}}),cr("div",{className:"border-primary bg-background absolute size-4 -translate-x-1/2 rounded-full border-2 shadow-sm transition-transform hover:scale-110",style:{left:`${w}%`}}),cr("input",{type:"range",value:g,min:a,max:s,step:l,disabled:i,onChange:v,className:"absolute h-5 w-full cursor-pointer appearance-none bg-transparent opacity-0","aria-label":"Range minimum",style:{zIndex:g>(a+s)/2?5:3}}),cr("input",{type:"range",value:h,min:a,max:s,step:l,disabled:i,onChange:x,className:"absolute h-5 w-full cursor-pointer appearance-none bg-transparent opacity-0","aria-label":"Range maximum",style:{zIndex:g>(a+s)/2?3:5}})]}),c&&ec("div",{className:"text-muted-foreground flex items-center justify-between text-sm",children:[cr("span",{children:P(g)}),cr("span",{children:P(h)})]})]})}import*as Ao from"react";import"class-variance-authority";import{jsx as SC}from"react/jsx-runtime";function kC({className:e,variant:t="default",size:o="default",duration:r=60,children:a,onClick:s,disabled:l=!1,countText:i=f=>`${f}s`,runOnMount:c=!1,...u}){let[f,m]=Ao.useState(!1),[p,b]=Ao.useState(r),g=Ao.useRef(null),h=Ao.useCallback(()=>{m(!0),b(r),g.current=setInterval(()=>{b(w=>w<=1?(g.current&&(clearInterval(g.current),g.current=null),m(!1),0):w-1)},1e3)},[r]);Ao.useEffect(()=>(c&&h(),()=>{g.current&&clearInterval(g.current)}),[c,h]);let y=async()=>{f||l||(s&&await s(),h())},N=l||f;return SC("button",{"data-slot":"countdown-button",className:n(At({variant:t,size:o}),N&&"pointer-events-none opacity-50",e),disabled:N,onClick:y,...u,children:f?i(p):a})}import*as dr from"react";import{cva as IC}from"class-variance-authority";import{jsx as Yp,jsxs as DC}from"react/jsx-runtime";var TC=IC("flex items-center rounded-lg border border-input bg-transparent transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",{variants:{size:{default:"h-8",sm:"h-7 text-sm",lg:"h-9 text-base"}},defaultVariants:{size:"default"}});function MC({className:e,value:t,defaultValue:o=null,onChange:r,currency:a="\xA5",precision:s=2,min:l,max:i,disabled:c=!1,readOnly:u=!1,placeholder:f="0.00",size:m="default",locale:p="zh-CN",...b}){let[g,h]=dr.useState(o),[y,N]=dr.useState(""),w=t!==void 0,C=w?t:g,v=dr.useCallback(R=>R==null||isNaN(R)?"":R.toLocaleString(p,{minimumFractionDigits:s,maximumFractionDigits:s}),[p,s]);dr.useEffect(()=>{w&&N(v(C))},[w,C,v]),dr.useEffect(()=>{!w&&C!==null&&N(v(C))},[]);let x=R=>{let T=R.target.value.replace(/[^\d.]/g,"");if(T===""){N(""),w||h(null),r?.(null);return}let z=T.split("."),W=z[0]??"";if(z.length>1){let I=z.slice(1).join("").slice(0,s);W=`${W}.${I}`}let E=parseFloat(W);l!==void 0&&E<l&&(E=l),i!==void 0&&E>i&&(E=i);let A=v(E);N(A),w||h(E),r?.(E)},P=()=>{C!=null&&N(String(C))},S=()=>{N(v(C))};return DC("div",{"data-slot":"amount-input","data-size":m,className:n(TC({size:m}),c&&"pointer-events-none",e),...b,children:[Yp("span",{className:"text-muted-foreground flex h-full items-center pl-2.5 text-sm",children:a}),Yp("input",{"data-slot":"amount-input-field",type:"text",value:y,onChange:x,onFocus:P,onBlur:S,placeholder:f,disabled:c,readOnly:u,inputMode:"decimal",className:"placeholder:text-muted-foreground h-full w-full bg-transparent px-1.5 text-sm outline-none"})]})}import*as xo from"react";import{jsx as tc}from"react/jsx-runtime";function zC({items:e,onReorder:t,renderItem:o,keyField:r,disabled:a=!1,orientation:s="vertical",className:l,itemClassName:i,...c}){let u=xo.useRef(null),[f,m]=xo.useState(null),[p,b]=xo.useState(null),g=xo.useCallback(C=>v=>{if(a){v.preventDefault();return}u.current=C,m(C),v.dataTransfer.effectAllowed="move",v.dataTransfer.setData("text/plain",String(C))},[a]),h=xo.useCallback(C=>v=>{a||(v.preventDefault(),v.dataTransfer.dropEffect="move",p!==C&&b(C))},[a,p]),y=xo.useCallback(C=>v=>{if(a)return;v.preventDefault();let x=u.current;x!=null&&x!==C&&t(x,C)},[a,t]),N=xo.useCallback(()=>{u.current=null,m(null),b(null)},[]),w=s==="horizontal";return tc("div",{"data-slot":"sortable-list",className:n("flex",w?"flex-row gap-2":"flex-col gap-2",l),...c,children:e.map((C,v)=>{let x=String(C[r]??v),P=f===v;return tc(LC,{index:v,isDragging:P,isOver:p===v&&f!==v,disabled:a,isHorizontal:w,onDragStart:g,onDragOver:h,onDrop:y,onDragEnd:N,className:i,children:o(C,v,P)},x)})})}function LC({index:e,isDragging:t,isOver:o,disabled:r,isHorizontal:a,onDragStart:s,onDragOver:l,onDrop:i,onDragEnd:c,className:u,children:f,...m}){return tc("div",{"data-slot":"sortable-list-item",draggable:!r,onDragStart:s(e),onDragOver:l(e),onDrop:i(e),onDragEnd:c,className:n("relative transition-opacity",t&&"opacity-50",o&&(a?"border-ring border-l-2":"border-ring border-t-2"),r&&"cursor-not-allowed opacity-60",!r&&"cursor-grab active:cursor-grabbing",u),...m,children:f})}import*as ur from"react";import"class-variance-authority";import{jsx as oc,jsxs as FC}from"react/jsx-runtime";function EC({text:e,onCopied:t,timeout:o=2e3,variant:r="outline",size:a="default",icon:s=!0,className:l,children:i,...c}){let[u,f]=ur.useState(!1),m=ur.useRef(null);ur.useEffect(()=>()=>{m.current!=null&&clearTimeout(m.current)},[]);let p=ur.useCallback(async()=>{try{await navigator.clipboard.writeText(e),f(!0),t?.(e),m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>f(!1),o)}catch{let b=document.createElement("textarea");b.value=e,b.style.position="fixed",b.style.opacity="0",document.body.appendChild(b),b.select();try{document.execCommand("copy"),f(!0),t?.(e),m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>f(!1),o)}catch{}document.body.removeChild(b)}},[e,t,o]);return FC("button",{type:"button","data-slot":"copy-button",className:n(At({variant:r,size:a}),l),onClick:p,...c,children:[s&&oc("span",{"data-icon":"inline-start",className:"shrink-0",children:u?oc(ie,{}):oc(mc,{})}),i??(u?"Copied!":"Copy")]})}import*as pr from"react";import{jsx as Be,jsxs as _r}from"react/jsx-runtime";function AC({className:e,columns:t,data:o=[],onChange:r,rowKey:a="id",editable:s=!0,addable:l=!1,deletable:i=!1,onRowAdd:c,onRowDelete:u,...f}){let[m,p]=pr.useState(null),[b,g]=pr.useState(void 0),h=pr.useCallback((x,P,S)=>{s&&(p({row:x,col:P}),g(S))},[s]),y=pr.useCallback(()=>{if(!m||!r){p(null);return}let x=o.map((P,S)=>S===m.row?{...P,[m.col]:b}:P);r(x),p(null)},[m,b,o,r]),N=pr.useCallback(()=>{p(null)},[]),w=pr.useCallback(x=>{x.key==="Enter"?(x.preventDefault(),y()):x.key==="Escape"&&(x.preventDefault(),N())},[y,N]),C=(x,P)=>{if(x.renderEdit)return x.renderEdit(P,o[m.row],R=>g(R));let S={autoFocus:!0,value:b,onChange:R=>g(x.type==="number"?Number(R.target.value):R.target.value),onBlur:y,onKeyDown:w,className:"border-input focus-visible:border-ring focus-visible:ring-ring/50 h-7 w-full rounded-md border bg-transparent px-1.5 text-sm outline-none focus-visible:ring-3"};switch(x.type){case"select":return _r("select",{...S,className:n(S.className,"pr-6"),children:[Be("option",{value:"",children:"Select..."}),x.options?.map(R=>Be("option",{value:R.value,children:R.label},R.value))]});case"number":return Be("input",{type:"number",...S});case"date":return Be("input",{type:"date",...S});case"boolean":return Be("input",{type:"checkbox",autoFocus:!0,checked:!!b,onChange:R=>g(R.target.checked),onBlur:y,className:"size-4"});default:return Be("input",{type:"text",...S})}},v=(x,P,S,R)=>x.render?x.render(P,S,R):x.type==="boolean"?P?"Yes":"No":x.type==="select"?x.options?.find(T=>T.value===P)?.label??String(P??""):P==null?"":String(P);return _r("div",{"data-slot":"editable-table",className:n("border-border w-full overflow-x-auto rounded-lg border",e),...f,children:[_r("table",{className:"w-full text-sm",children:[Be("thead",{className:"bg-muted/30",children:_r("tr",{className:"border-border border-b",children:[t.map(x=>_r("th",{className:"text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap",style:x.width?{width:x.width}:void 0,children:[x.title,x.required&&Be("span",{className:"text-destructive ml-0.5",children:"*"})]},x.key)),i&&Be("th",{className:"w-10 px-2"})]})}),Be("tbody",{className:"divide-border divide-y",children:o.length===0?Be("tr",{children:Be("td",{colSpan:t.length+(i?1:0),className:"text-muted-foreground py-6 text-center",children:"No data"})}):o.map((x,P)=>_r("tr",{className:"hover:bg-muted/30 transition-colors",children:[t.map(S=>{let R=m?.row===P&&m?.col===S.dataIndex,k=x[S.dataIndex];return Be("td",{className:"p-2 align-middle",onClick:()=>!R&&h(P,S.dataIndex,k),children:R?C(S,k):Be("div",{className:n("min-h-7 px-1.5 py-1",s&&"hover:bg-muted cursor-pointer rounded-md"),children:v(S,k,x,P)})},S.key)}),i&&Be("td",{className:"p-2 text-center align-middle",children:Be("button",{type:"button",onClick:()=>u?.(x,P),className:"text-muted-foreground hover:text-destructive rounded-md p-1 transition-colors","aria-label":"Delete row",children:Be(Jr,{className:"size-3.5"})})})]},String(x[a]??P)))})]}),l&&Be("div",{className:"border-border border-t p-2",children:_r("button",{type:"button",onClick:c,className:"text-muted-foreground hover:text-foreground hover:bg-muted inline-flex items-center gap-1 rounded-md px-2 py-1 text-sm transition-colors",children:[Be(Xa,{className:"size-4"}),"Add row"]})})]})}import*as Ba from"react";import{jsx as Et,jsxs as mr}from"react/jsx-runtime";function VC({className:e,items:t=[],column:o=2,layout:r="horizontal",editable:a=!0,onChange:s,...l}){let[i,c]=Ba.useState(!1),[u,f]=Ba.useState(t);Ba.useEffect(()=>{f(t)},[t]);let m=()=>{f(t),c(!0)},p=()=>{s?.(u),c(!1)},b=()=>{f(t),c(!1)},g=(N,w)=>{f(C=>C.map((v,x)=>x===N?{...v,value:w}:v))},h=(N,w)=>{let C=r==="vertical";return mr("div",{"data-slot":"editable-descriptions-item",className:n("flex gap-2",C?"flex-col":"flex-row items-center"),children:[mr("span",{className:n("text-muted-foreground shrink-0 text-sm font-medium",!C&&"min-w-24"),children:[N.label,N.required&&Et("span",{className:"text-destructive ml-0.5",children:"*"}),":"]}),i&&a?y(N,w):Et("span",{className:"text-foreground text-sm",children:N.type==="boolean"?N.value?"Yes":"No":N.type==="select"?N.options?.find(v=>v.value===N.value)?.label??String(N.value??"\u2014"):String(N.value??"\u2014")})]},w)},y=(N,w)=>{let C=u[w]?.value,v="border-input focus-visible:border-ring focus-visible:ring-ring/50 h-7 rounded-md border bg-transparent px-2 text-sm outline-none focus-visible:ring-3";switch(N.type){case"select":return mr("select",{value:String(C??""),onChange:x=>g(w,N.options?.find(P=>String(P.value)===x.target.value)?.value??x.target.value),className:n(v,"min-w-32"),children:[Et("option",{value:"",children:"Select..."}),N.options?.map(x=>Et("option",{value:x.value,children:x.label},x.value))]});case"number":return Et("input",{type:"number",value:Number(C??0),onChange:x=>g(w,Number(x.target.value)),className:n(v,"min-w-32")});case"date":return Et("input",{type:"date",value:String(C??""),onChange:x=>g(w,x.target.value),className:n(v,"min-w-32")});case"boolean":return Et("input",{type:"checkbox",checked:!!C,onChange:x=>g(w,x.target.checked),className:"size-4"});default:return Et("input",{type:"text",value:String(C??""),onChange:x=>g(w,x.target.value),className:n(v,"min-w-32 flex-1")})}};return mr("div",{"data-slot":"editable-descriptions",className:n("w-full",e),...l,children:[mr("div",{className:"mb-3 flex items-center justify-end",children:[a&&!i&&mr("button",{type:"button",onClick:m,className:"text-muted-foreground hover:text-foreground hover:bg-muted inline-flex items-center gap-1 rounded-md px-2 py-1 text-sm transition-colors",children:[Et(Rc,{className:"size-3.5"}),"Edit"]}),i&&mr("div",{className:"flex gap-1",children:[mr("button",{type:"button",onClick:p,className:"text-primary hover:bg-primary/10 inline-flex items-center gap-1 rounded-md px-2 py-1 text-sm transition-colors",children:[Et(ie,{className:"size-3.5"}),"Save"]}),Et("button",{type:"button",onClick:b,className:"text-muted-foreground hover:text-foreground hover:bg-muted inline-flex items-center gap-1 rounded-md px-2 py-1 text-sm transition-colors",children:"Cancel"})]})]}),Et("div",{className:"grid gap-x-6 gap-y-3",style:{gridTemplateColumns:`repeat(${o}, minmax(0, 1fr))`},children:t.map((N,w)=>h(N,w))})]})}import*as Qp from"react";import{jsx as Bn,jsxs as ei}from"react/jsx-runtime";var jp={default:"bg-muted text-muted-foreground border-muted",primary:"bg-primary/10 text-primary border-primary/20",success:"bg-green-50 text-green-700 border-green-200 dark:bg-green-950 dark:text-green-300 dark:border-green-900",warning:"bg-amber-50 text-amber-700 border-amber-200 dark:bg-amber-950 dark:text-amber-300 dark:border-amber-900",error:"bg-red-50 text-red-700 border-red-200 dark:bg-red-950 dark:text-red-300 dark:border-red-900",info:"bg-blue-50 text-blue-700 border-blue-200 dark:bg-blue-950 dark:text-blue-300 dark:border-blue-900"};function BC({className:e,filters:t=[],onRemove:o,onClear:r,maxDisplay:a=10,...s}){let[l,i]=Qp.useState(!1);if(t.length===0)return null;let c=l?t:t.slice(0,a),u=t.length-a;return ei("div",{"data-slot":"filter-chips",className:n("flex flex-wrap items-center gap-1.5",e),...s,children:[Bn(bc,{className:"text-muted-foreground size-3.5 shrink-0"}),c.map(f=>{let m=jp[f.color??"default"]??jp.default;return ei("span",{"data-slot":"filter-chip",className:n("inline-flex items-center gap-1 rounded-md border px-2 py-0.5 text-xs font-medium",m),children:[ei("span",{className:"text-muted-foreground",children:[f.label,":"]}),Bn("span",{children:f.value}),o&&Bn("button",{type:"button",onClick:()=>o(f.id),className:"ml-0.5 shrink-0 rounded-sm p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${f.label}`,children:Bn(oe,{className:"size-3"})})]},f.id)}),u>0&&!l&&ei("button",{type:"button",onClick:()=>i(!0),className:"text-muted-foreground hover:text-foreground rounded-md px-1.5 py-0.5 text-xs font-medium transition-colors",children:["+",u," more"]}),l&&u>0&&Bn("button",{type:"button",onClick:()=>i(!1),className:"text-muted-foreground hover:text-foreground rounded-md px-1.5 py-0.5 text-xs font-medium transition-colors",children:"Collapse"}),r&&Bn("button",{type:"button",onClick:r,className:"text-muted-foreground hover:text-destructive rounded-md px-1.5 py-0.5 text-xs font-medium transition-colors",children:"Clear all"})]})}import*as fr from"react";import{jsx as Ct,jsxs as Kr}from"react/jsx-runtime";function HC({className:e,views:t=[],currentViewId:o,onSelect:r,onSave:a,onDelete:s,...l}){let[i,c]=fr.useState(!1),[u,f]=fr.useState(!1),[m,p]=fr.useState(""),b=fr.useRef(null);fr.useEffect(()=>{if(!i)return;let y=N=>{b.current&&!b.current.contains(N.target)&&(c(!1),f(!1))};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[i]);let g=t.find(y=>y.id===o),h=()=>{m.trim()&&a&&(a(m.trim()),p(""),f(!1))};return Kr("div",{ref:b,"data-slot":"saved-view",className:n("relative inline-block",e),...l,children:[Kr(D,{variant:"outline",size:"sm",icon:Ct(uc,{}),onClick:()=>c(y=>!y),"aria-expanded":i,children:[g?.name??"Saved Views",Ct(we,{className:"text-muted-foreground ml-1 size-3.5"})]}),i&&Kr("div",{className:"bg-popover text-popover-foreground ring-foreground/10 absolute top-full right-0 z-50 mt-1 w-64 rounded-lg p-1.5 shadow-md ring-1",children:[Ct("div",{className:"max-h-60 overflow-y-auto",children:t.length===0?Ct("div",{className:"text-muted-foreground px-2 py-3 text-center text-xs",children:"No saved views"}):t.map(y=>Kr("div",{className:n("hover:bg-accent flex items-center justify-between rounded-md px-2 py-1.5 text-sm transition-colors",y.id===o&&"bg-accent"),children:[Kr("button",{type:"button",onClick:()=>{r?.(y.id),c(!1)},className:"flex flex-1 items-center gap-1.5 text-left",children:[y.id===o&&Ct(ie,{className:"text-primary size-3.5 shrink-0"}),Ct("span",{className:n(y.id===o&&"font-medium"),children:y.name}),y.isDefault&&Ct("span",{className:"text-muted-foreground ml-1 text-xs",children:"(default)"})]}),s&&!y.isDefault&&Ct("button",{type:"button",onClick:N=>{N.stopPropagation(),s(y.id)},className:"text-muted-foreground hover:text-destructive rounded-sm p-0.5 transition-colors","aria-label":`Delete ${y.name}`,children:Ct(Jr,{className:"size-3.5"})})]},y.id))}),a&&Ct("div",{className:"border-border mt-1 border-t pt-1.5",children:u?Kr("div",{className:"flex gap-1",children:[Ct("input",{autoFocus:!0,type:"text",value:m,onChange:y=>p(y.target.value),onKeyDown:y=>{y.key==="Enter"&&h(),y.key==="Escape"&&(f(!1),p(""))},placeholder:"View name...",className:"border-input focus-visible:border-ring focus-visible:ring-ring/50 h-7 flex-1 rounded-md border bg-transparent px-2 text-sm outline-none focus-visible:ring-3"}),Ct(D,{size:"xs",onClick:h,disabled:!m.trim(),children:"Save"})]}):Kr("button",{type:"button",onClick:()=>f(!0),className:"text-muted-foreground hover:text-foreground hover:bg-muted flex w-full items-center gap-1.5 rounded-md px-2 py-1.5 text-sm transition-colors",children:[Ct(rs,{className:"size-3.5"}),"Save current view"]})})]})]})}import"react";import{jsx as ho,jsxs as Xp}from"react/jsx-runtime";function OC({className:e,columns:t=5,rows:o=5,showHeader:r=!0,showPagination:a=!1,...s}){return Xp("div",{"data-slot":"skeleton-table",className:n("border-border w-full overflow-hidden rounded-lg border",e),...s,children:[r&&ho("div",{className:"border-border bg-muted/30 border-b px-3 py-2.5",children:ho("div",{className:"flex gap-3",children:Array.from({length:t}).map((l,i)=>ho(ft,{className:"h-4 flex-1"},i))})}),ho("div",{className:"divide-border divide-y",children:Array.from({length:o}).map((l,i)=>ho("div",{className:"px-3 py-2.5",children:ho("div",{className:"flex gap-3",children:Array.from({length:t}).map((c,u)=>ho(ft,{className:"h-4 flex-1",style:{width:`${60+u*7%30}%`}},u))})},i))}),a&&Xp("div",{className:"border-border flex items-center justify-between border-t px-3 py-2.5",children:[ho(ft,{className:"h-4 w-24"}),ho("div",{className:"flex gap-1.5",children:Array.from({length:5}).map((l,i)=>ho(ft,{className:"size-7 rounded-md"},i))})]})]})}import"react";import{jsx as Hn,jsxs as rc}from"react/jsx-runtime";function $C({className:e,fields:t=4,columns:o=1,showSubmit:r=!0,...a}){let s=Math.ceil(t/o);return rc("div",{"data-slot":"skeleton-form",className:n("w-full space-y-4",e),...a,children:[Array.from({length:s}).map((l,i)=>Hn("div",{className:"flex gap-4",style:{gridTemplateColumns:`repeat(${o}, minmax(0, 1fr))`},children:Array.from({length:o}).map((c,u)=>i*o+u>=t?Hn("div",{className:"flex-1"},u):rc("div",{className:"flex-1 space-y-2",children:[Hn(ft,{className:"h-4 w-24"}),Hn(ft,{className:"h-8 w-full"})]},u))},i)),r&&rc("div",{className:"flex gap-2 pt-2",children:[Hn(ft,{className:"h-8 w-20 rounded-lg"}),Hn(ft,{className:"h-8 w-20 rounded-lg"})]})]})}import*as Jp from"react";import{jsx as yo,jsxs as Wr}from"react/jsx-runtime";function UC(e,t){let o=e.length,r=t.length,a=Array.from({length:o+1},()=>new Array(r+1).fill(0));for(let s=o-1;s>=0;s--)for(let l=r-1;l>=0;l--){let i=a[s],c=a[s+1];i[l]=e[s]===t[l]?c[l+1]+1:Math.max(c[l],i[l+1])}return a}function GC(e,t){let o=UC(e,t),r=[],a=0,s=0,l=1,i=1;for(;a<e.length||s<t.length;){let c=e[a],u=t[s],f=o[a];if(a<e.length&&s<t.length&&c===u)r.push({type:"context",oldLineNo:l,newLineNo:i,content:c}),a++,s++,l++,i++;else if(s<t.length&&(a>=e.length||f[s+1]>=o[a+1][s]))r.push({type:"added",oldLineNo:null,newLineNo:i,content:u}),s++,i++;else if(a<e.length)r.push({type:"removed",oldLineNo:l,newLineNo:null,content:c}),a++,l++;else break}return r}function _C(e,t){let o=new Array(e.length).fill(!1);for(let s=0;s<e.length;s++)if(e[s].type!=="context")for(let i=Math.max(0,s-t);i<=Math.min(e.length-1,s+t);i++)o[i]=!0;let r=[],a=!1;for(let s=0;s<e.length;s++)o[s]?(a=!1,r.push(e[s])):a||(a=!0,r.push({type:"context",oldLineNo:null,newLineNo:null,content:"..."}));return r}function KC({className:e,oldValue:t="",newValue:o="",mode:r="unified",language:a="text",showLineNumbers:s=!0,contextLines:l=3,...i}){let c=Jp.useMemo(()=>{let p=t.split(`
8
+ `),b=o.split(`
9
+ `),g=GC(p,b);return l>0?_C(g,l):g},[t,o,l]),u=p=>p==="added"?"bg-green-500/10 text-green-700 dark:text-green-300":p==="removed"?"bg-red-500/10 text-red-700 dark:text-red-300":"text-foreground",f=p=>p==="added"?"+":p==="removed"?"-":" ",m=(p,b,g)=>{if(p.content==="..."&&p.oldLineNo===null&&p.newLineNo===null)return yo("div",{className:"text-muted-foreground px-2 py-0.5 text-center text-xs italic",children:p.content},g);if(!(b==="unified"||b==="old"&&(p.type==="removed"||p.type==="context")||b==="new"&&(p.type==="added"||p.type==="context")))return yo("div",{className:"border-transparent py-0.5"},g);let N=b==="old"?p.oldLineNo:b==="new"?p.newLineNo:p.newLineNo??p.oldLineNo;return Wr("div",{className:n("flex items-start py-0.5 font-mono text-xs",u(p.type)),children:[s&&yo("span",{className:"text-muted-foreground w-10 shrink-0 pr-2 text-right select-none",children:N??""}),b==="unified"&&yo("span",{className:"w-4 shrink-0 text-center select-none",children:f(p.type)}),yo("span",{className:"px-2 whitespace-pre",children:p.content||" "})]},g)};return Wr("div",{"data-slot":"code-diff-viewer",className:n("bg-background border-border overflow-hidden rounded-lg border",e),...i,children:[Wr("div",{className:"text-muted-foreground border-border flex items-center justify-between border-b px-3 py-1.5 text-xs",children:[yo("span",{children:a}),Wr("span",{className:"flex gap-2",children:[Wr("span",{className:"text-green-600 dark:text-green-400",children:["+",c.filter(p=>p.type==="added").length]}),Wr("span",{className:"text-red-600 dark:text-red-400",children:["-",c.filter(p=>p.type==="removed").length]})]})]}),yo("div",{className:"overflow-x-auto",children:r==="unified"?yo("div",{className:"py-1",children:c.map((p,b)=>m(p,"unified",`u-${b}`))}):Wr("div",{className:"divide-border grid grid-cols-2 divide-x",children:[yo("div",{className:"py-1",children:c.map((p,b)=>m(p,"old",`o-${b}`))}),yo("div",{className:"py-1",children:c.map((p,b)=>m(p,"new",`n-${b}`))})]})})]})}import*as ti from"react";import{jsx as be,jsxs as jC}from"react/jsx-runtime";function qr(e){let t=[],o=e,r=/(\*\*([^*]+)\*\*|\*([^*]+)\*|`([^`]+)`|!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\))/;for(;o.length>0;){let a=o.match(r);if(!a||a.index===void 0){t.push({type:"text",content:o});break}a.index>0&&t.push({type:"text",content:o.slice(0,a.index)}),a[2]!=null?t.push({type:"bold",content:a[2]}):a[3]!=null?t.push({type:"italic",content:a[3]}):a[4]!=null?t.push({type:"code",content:a[4]}):a[5]!=null&&a[6]!=null?t.push({type:"image",alt:a[5],url:a[6]}):a[7]!=null&&a[8]!=null&&t.push({type:"link",text:a[7],url:a[8]}),o=o.slice(a.index+a[0].length)}return t}function Yr(e,t){return e.map((o,r)=>{let a=`${t}-${r}`;switch(o.type){case"bold":return be("strong",{className:"font-semibold",children:o.content},a);case"italic":return be("em",{children:o.content},a);case"code":return be("code",{className:"bg-muted text-foreground rounded px-1 py-0.5 font-mono text-xs",children:o.content},a);case"link":return be("a",{href:o.url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:o.text},a);case"image":return be("img",{src:o.url,alt:o.alt,className:"max-w-full rounded-lg"},a);default:return be(ti.Fragment,{children:o.content},a)}})}function WC(e){let t=e.split(`
10
+ `),o=[],r=0;for(;r<t.length;){let a=t[r];if(a.trim().startsWith("```")){let c=a.trim().slice(3),u=[];for(r++;r<t.length&&!t[r].trim().startsWith("```");)u.push(t[r]),r++;r++,o.push({type:"code",text:u.join(`
11
+ `),lang:c});continue}if(/^---+\s*$/.test(a.trim())){o.push({type:"hr"}),r++;continue}let s=a.match(/^(#{1,6})\s+(.+)$/);if(s){o.push({type:"heading",level:s[1].length,text:s[2]??""}),r++;continue}if(a.trim().startsWith(">")){let c=[];for(;r<t.length&&t[r].trim().startsWith(">");)c.push(t[r].trim().replace(/^>\s?/,"")),r++;o.push({type:"blockquote",text:c.join(`
12
+ `)});continue}let l=t[r+1];if(a.includes("|")&&l!=null&&/^\|?[\s-:|-]+\|?$/.test(l.trim())){let c=a.split("|").map(f=>f.trim()).filter(f=>f.length>0);r+=2;let u=[];for(;r<t.length&&t[r].includes("|");){let f=t[r].split("|").map(m=>m.trim()).filter(m=>m.length>0);u.push(f),r++}o.push({type:"table",table:{header:c,rows:u}});continue}if(/^\d+\.\s+/.test(a.trim())){let c=[];for(;r<t.length&&/^\d+\.\s+/.test(t[r].trim());)c.push(t[r].trim().replace(/^\d+\.\s+/,"")),r++;o.push({type:"ordered-list",items:c});continue}if(/^[-*]\s+/.test(a.trim())){let c=[];for(;r<t.length&&/^[-*]\s+/.test(t[r].trim());)c.push(t[r].trim().replace(/^[-*]\s+/,"")),r++;o.push({type:"list",items:c});continue}if(a.trim()===""){r++;continue}let i=[];for(;r<t.length&&t[r].trim()!==""&&!t[r].trim().startsWith("```")&&!t[r].trim().startsWith("#")&&!t[r].trim().startsWith(">")&&!/^---+\s*$/.test(t[r].trim())&&!/^[-*]\s+/.test(t[r].trim())&&!/^\d+\.\s+/.test(t[r].trim());)i.push(t[r]),r++;o.push({type:"paragraph",text:i.join(" ")})}return o}function qC(e,t){let o=`block-${t}`;switch(e.type){case"heading":{let r=e.level??1;return be("div",{className:n("font-semibold",["text-2xl","text-xl","text-lg","text-base","text-sm","text-sm"][r-1]??"text-base","mt-4 mb-2"),children:Yr(qr(e.text??""),o)},o)}case"paragraph":return be("p",{className:"text-foreground mb-2 leading-6",children:Yr(qr(e.text??""),o)},o);case"code":return be("pre",{className:"bg-muted text-foreground mb-2 overflow-x-auto rounded-lg p-3",children:be("code",{className:"font-mono text-xs",children:e.text})},o);case"blockquote":return be("blockquote",{className:"border-l-primary/40 text-muted-foreground mb-2 border-l-2 pl-3 italic",children:e.text?.split(`
13
+ `).map((r,a)=>be("div",{children:Yr(qr(r),`${o}-line-${a}`)},`${o}-line-${a}`))},o);case"list":return be("ul",{className:"text-foreground mb-2 list-disc space-y-1 pl-6",children:e.items?.map((r,a)=>be("li",{children:Yr(qr(r),`${o}-${a}`)},`${o}-${a}`))},o);case"ordered-list":return be("ol",{className:"text-foreground mb-2 list-decimal space-y-1 pl-6",children:e.items?.map((r,a)=>be("li",{children:Yr(qr(r),`${o}-${a}`)},`${o}-${a}`))},o);case"hr":return be("hr",{className:"border-border my-4"},o);case"table":return be("div",{className:"mb-2 overflow-x-auto",children:jC("table",{className:"w-full border-collapse text-sm",children:[be("thead",{children:be("tr",{className:"bg-muted/30",children:e.table?.header.map((r,a)=>be("th",{className:"border-border border px-3 py-1.5 text-left font-medium",children:Yr(qr(r),`${o}-h-${a}`)},`${o}-h-${a}`))})}),be("tbody",{children:e.table?.rows.map((r,a)=>be("tr",{children:r.map((s,l)=>be("td",{className:"border-border border px-3 py-1.5",children:Yr(qr(s),`${o}-r-${a}-c-${l}`)},`${o}-r-${a}-c-${l}`))},`${o}-r-${a}`))})]})},o);default:return null}}function YC({className:e,content:t="",...o}){let r=ti.useMemo(()=>WC(t),[t]);return be("div",{"data-slot":"markdown-viewer",className:n("text-foreground text-sm leading-6",e),...o,children:r.map((a,s)=>qC(a,s))})}import*as On from"react";import{jsx as ae,jsxs as jr}from"react/jsx-runtime";var QC=new Set(["p","br","strong","em","ul","ol","li","a","img","blockquote","code","pre","h1","h2","h3","h4","h5","h6","span","div"]),XC={a:new Set(["href","target","rel"]),img:new Set(["src","alt","width","height"]),span:new Set(["class"]),div:new Set(["class"])};function JC(e){if(typeof window>"u")return e;let o=new DOMParser().parseFromString(e,"text/html");return Zp(o.body),o.body.innerHTML}function Zp(e){let t=Array.from(e.childNodes);for(let o of t){if(o.nodeType===Node.ELEMENT_NODE){let r=o,a=r.tagName.toLowerCase();if(!QC.has(a)){for(;r.firstChild;)e.insertBefore(r.firstChild,r);e.removeChild(r);continue}let s=XC[a]??new Set;for(let l of Array.from(r.attributes))s.has(l.name.toLowerCase())?(l.name==="href"||l.name==="src")&&/^\s*javascript:/i.test(l.value)&&r.removeAttribute(l.name):r.removeAttribute(l.name)}o.hasChildNodes()&&Zp(o)}}function ZC(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function Ue(e,t){if(e==null||typeof e!="object")return ae(On.Fragment,{children:String(e??"")},t);let o=e,r=o.tagName??o.type??o.tag,a=o.children,s=o.text,l=o.attrs??o.props??{};if(s!=null&&!r)return ae(On.Fragment,{children:s},t);switch(r){case"h1":return ae("h1",{className:"mt-4 mb-2 text-2xl font-semibold",children:a?.map((i,c)=>Ue(i,`${t}-${c}`))},t);case"h2":return ae("h2",{className:"mt-4 mb-2 text-xl font-semibold",children:a?.map((i,c)=>Ue(i,`${t}-${c}`))},t);case"h3":return ae("h3",{className:"mt-3 mb-2 text-lg font-semibold",children:a?.map((i,c)=>Ue(i,`${t}-${c}`))},t);case"h4":return ae("h4",{className:"mt-3 mb-1 text-base font-semibold",children:a?.map((i,c)=>Ue(i,`${t}-${c}`))},t);case"h5":return ae("h5",{className:"mt-2 mb-1 text-sm font-semibold",children:a?.map((i,c)=>Ue(i,`${t}-${c}`))},t);case"h6":return ae("h6",{className:"mt-2 mb-1 text-sm font-medium",children:a?.map((i,c)=>Ue(i,`${t}-${c}`))},t);case"p":return ae("p",{className:"mb-2 leading-6",children:a?.map((i,c)=>Ue(i,`${t}-${c}`))},t);case"strong":return ae("strong",{className:"font-semibold",children:a?.map((i,c)=>Ue(i,`${t}-${c}`))},t);case"em":return ae("em",{children:a?.map((i,c)=>Ue(i,`${t}-${c}`))},t);case"ul":return ae("ul",{className:"mb-2 list-disc space-y-1 pl-6",children:a?.map((i,c)=>Ue(i,`${t}-${c}`))},t);case"ol":return ae("ol",{className:"mb-2 list-decimal space-y-1 pl-6",children:a?.map((i,c)=>Ue(i,`${t}-${c}`))},t);case"li":return ae("li",{children:a?.map((i,c)=>Ue(i,`${t}-${c}`))},t);case"a":return ae("a",{href:l.href,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:a?.map((i,c)=>Ue(i,`${t}-${c}`))},t);case"img":return ae("img",{src:l.src,alt:l.alt??"",className:"max-w-full rounded-lg"},t);case"blockquote":return ae("blockquote",{className:"border-primary/40 text-muted-foreground mb-2 border-l-2 pl-3 italic",children:a?.map((i,c)=>Ue(i,`${t}-${c}`))},t);case"code":return ae("code",{className:"bg-muted text-foreground rounded px-1 py-0.5 font-mono text-xs",children:a?.map((i,c)=>Ue(i,`${t}-${c}`))},t);case"pre":return ae("pre",{className:"bg-muted mb-2 overflow-x-auto rounded-lg p-3",children:ae("code",{className:"font-mono text-xs",children:a?.map((i,c)=>Ue(i,`${t}-${c}`))})},t);case"br":return ae("br",{},t);default:return ae("div",{children:a?.map((i,c)=>Ue(i,`${t}-${c}`))??s},t)}}function eP({className:e,content:t="",format:o="html",mentions:r=[],attachments:a=[],...s}){let l=On.useMemo(()=>o!=="html"?"":JC(t),[t,o]),i=On.useMemo(()=>{if(o!=="json")return null;try{return JSON.parse(t)}catch{return null}},[t,o]);return jr("div",{"data-slot":"rich-text-display",className:n("w-full text-sm",e),...s,children:[o==="html"?ae("div",{className:"rich-text-content text-foreground leading-6",dangerouslySetInnerHTML:{__html:l}}):ae("div",{className:"rich-text-content text-foreground leading-6",children:i?Ue(i,"root"):t}),r.length>0&&jr("div",{className:"border-border mt-3 border-t pt-2",children:[ae("div",{className:"text-muted-foreground mb-1 text-xs font-medium",children:"Mentions"}),ae("div",{className:"flex flex-wrap gap-2",children:r.map(c=>jr("div",{className:"bg-muted flex items-center gap-1.5 rounded-md px-2 py-1 text-xs",children:[c.avatar&&ae("img",{src:c.avatar,alt:c.name,className:"size-4 rounded-full"}),jr("span",{className:"text-foreground font-medium",children:["@",c.name]})]},c.id))})]}),a.length>0&&jr("div",{className:"border-border mt-3 border-t pt-2",children:[jr("div",{className:"text-muted-foreground mb-1 flex items-center gap-1 text-xs font-medium",children:[ae(Dc,{className:"size-3"}),"Attachments"]}),ae("div",{className:"space-y-1",children:a.map((c,u)=>jr("a",{href:c.url,target:"_blank",rel:"noopener noreferrer",className:"hover:bg-muted flex items-center gap-2 rounded-md px-2 py-1.5 transition-colors",children:[ae(no,{className:"text-muted-foreground size-4 shrink-0"}),ae("span",{className:"text-foreground flex-1 truncate text-xs font-medium",children:c.name}),c.size!=null&&ae("span",{className:"text-muted-foreground shrink-0 text-xs",children:ZC(c.size)})]},u))})]})]})}import*as gr from"react";import{jsx as Qr,jsxs as oP}from"react/jsx-runtime";function tP({className:e,src:t,alt:o="",width:r,height:a,placeholder:s,blur:l=!0,fallback:i,onError:c,...u}){let[f,m]=gr.useState("loading"),[p,b]=gr.useState(!1),g=gr.useRef(null),h=gr.useRef(null);gr.useEffect(()=>{if(!g.current)return;let x=new IntersectionObserver(P=>{for(let S of P)S.isIntersecting&&(b(!0),x.disconnect())},{rootMargin:"50px"});return x.observe(g.current),()=>x.disconnect()},[]);let y=()=>m("loaded"),N=()=>{m("error"),c?.()},w=s?.startsWith("data:image"),C=f==="loading"&&!s,v={width:r,height:a};return f==="error"&&i?Qr("div",{ref:g,"data-slot":"lazy-image",className:n("bg-muted inline-flex items-center justify-center",e),style:v,children:i}):oP("div",{ref:g,"data-slot":"lazy-image",className:n("bg-muted relative overflow-hidden",e),style:v,children:[C&&Qr("div",{className:"from-muted via-muted/50 to-muted absolute inset-0 animate-pulse bg-gradient-to-r bg-[length:200%_100%]"}),s&&w&&Qr("img",{src:s,alt:"","aria-hidden":"true",className:n("absolute inset-0 size-full object-cover transition-opacity duration-300",l?"scale-105 blur-lg":"",f==="loaded"?"opacity-0":"opacity-100")}),f==="loading"&&s&&!w&&Qr("div",{className:"absolute inset-0",style:{backgroundColor:s}}),p&&f!=="error"&&Qr("img",{ref:h,src:t,alt:o,onLoad:y,onError:N,loading:"lazy",className:n("size-full object-cover transition-all duration-300",f==="loaded"?"blur-0 opacity-100":"opacity-0 blur-lg"),...u}),f==="error"&&!i&&Qr("div",{className:"absolute inset-0 flex items-center justify-center",children:Qr(xc,{className:"text-muted-foreground size-8"})})]})}import*as No from"react";import{jsx as aP}from"react/jsx-runtime";var Ha=new Map;function rP({active:e=!0,cacheKey:t,children:o,className:r,...a}){No.useEffect(()=>{t&&o!==void 0&&Ha.set(t,o)},[t,o]);let s=No.useMemo(()=>{if(t&&o===void 0)return Ha.get(t)},[t,o]),l=o??s;return aP("div",{"data-slot":"keep-alive","data-active":e,className:n(!e&&"hidden",r),...a,children:l})}function nP(){let[,e]=No.useReducer(r=>r+1,0),t=No.useCallback(()=>{Ha.clear(),e()},[]),o=No.useCallback(r=>{Ha.delete(r),e()},[]);return No.useMemo(()=>({cache:Ha,clear:t,remove:o}),[t,o])}import"react";import{jsx as em,jsxs as iP}from"react/jsx-runtime";function sP({count:e=0,max:t=99,showZero:o=!1,dot:r=!1,offset:a,className:s,...l}){let i=e>0||o,c=e>t?`${t}+`:String(e),u=a?{transform:`translate(${a[0]}px, ${a[1]}px)`}:{};return iP("div",{"data-slot":"notification-badge",className:n("relative inline-flex items-center justify-center",s),...l,children:[em(Xr,{className:"text-foreground size-5"}),i&&em("span",{"data-slot":"notification-badge-count",className:n("ring-background absolute flex items-center justify-center rounded-full bg-red-500 text-[10px] leading-none font-medium text-white ring-2",r?"size-2":"min-w-4 px-1 py-0.5"),style:r?{...u,right:0,top:0}:{...u,right:-4,top:-4},children:!r&&c})]})}import"react";import{jsx as lt,jsxs as Ft}from"react/jsx-runtime";var lP={info:ao,success:Oo,warning:ro,error:Mc},cP={info:"text-info",success:"text-success",warning:"text-warning",error:"text-destructive"};function dP(e){let t=Date.now(),o=new Date(e).getTime(),r=Math.max(t-o,0),a=Math.floor(r/6e4),s=Math.floor(a/60),l=Math.floor(s/24);return l>0?`${l}d ago`:s>0?`${s}h ago`:a>0?`${a}m ago`:"just now"}function uP({className:e,notifications:t=[],onRead:o,onReadAll:r,onClear:a,onViewAll:s,unreadCount:l,...i}){let c=l??t.filter(u=>!u.read).length;return lt("div",{"data-slot":"notification-dropdown",className:n("relative inline-flex",e),...i,children:Ft(ce,{children:[lt(de,{render:Ft("button",{type:"button",className:"hover:bg-muted relative rounded-md p-2","aria-label":"Notifications",children:[lt(Xr,{className:"text-foreground size-5"}),c>0&&lt("span",{className:"ring-background absolute top-1 right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-500 px-1 text-[10px] leading-none font-medium text-white ring-2",children:c>99?"99+":c})]})}),Ft(ue,{align:"end",sideOffset:4,className:"w-80 p-0",children:[Ft("div",{className:"flex items-center justify-between border-b px-3 py-2",children:[lt("span",{className:"text-sm font-medium",children:"Notifications"}),Ft("span",{className:"text-muted-foreground text-xs",children:[c," unread"]})]}),lt("div",{className:"max-h-80 overflow-y-auto",children:t.length===0?Ft("div",{className:"text-muted-foreground flex flex-col items-center gap-2 py-8 text-sm",children:[lt(Xr,{className:"size-8 opacity-30"}),"No notifications"]}):t.map(u=>{let f=u.type&&lP[u.type]||Xr,m=u.type?cP[u.type]:"text-muted-foreground";return Ft("div",{onClick:()=>o?.(u.id),className:n("hover:bg-muted flex cursor-pointer gap-3 border-b px-3 py-2.5 last:border-b-0",!u.read&&"bg-accent/30"),children:[lt(f,{className:n("mt-0.5 size-5 shrink-0",m)}),Ft("div",{className:"min-w-0 flex-1",children:[Ft("div",{className:"flex items-center gap-2",children:[lt("span",{className:"truncate text-sm font-medium",children:u.title}),!u.read&&lt("span",{className:"bg-primary size-2 shrink-0 rounded-full"})]}),u.description&&lt("p",{className:"text-muted-foreground truncate text-xs",children:u.description}),lt("span",{className:"text-muted-foreground mt-0.5 block text-[11px]",children:dP(u.timestamp)})]})]},u.id)})}),Ft("div",{className:"flex items-center justify-between border-t px-3 py-2",children:[Ft("button",{type:"button",onClick:r,className:"hover:bg-muted text-foreground flex items-center gap-1.5 rounded text-xs",children:[lt(Ac,{className:"size-3.5"}),"Mark all read"]}),Ft("div",{className:"flex gap-3",children:[lt("button",{type:"button",onClick:a,className:"text-muted-foreground hover:text-foreground text-xs",children:"Clear"}),lt("button",{type:"button",onClick:s,className:"text-primary hover:text-primary/80 text-xs",children:"View all"})]})]})]})]})})}import"react";import{jsx as tm,jsxs as mP}from"react/jsx-runtime";function pP({loading:e,text:t="Loading...",fullscreen:o=!0,spinner:r=!0,className:a,...s}){return e?mP("div",{"data-slot":"global-loading","data-fullscreen":o,className:n("bg-background/80 flex flex-col items-center justify-center gap-3 backdrop-blur-sm",o?"fixed inset-0 z-[100]":"min-h-20",a),...s,children:[r&&tm(Ya,{className:"text-primary size-8 animate-spin"}),t&&tm("span",{"data-slot":"global-loading-text",className:"text-muted-foreground text-sm",children:t})]}):null}import*as om from"react";import{jsx as Oa,jsxs as nc}from"react/jsx-runtime";function fP({error:e,reset:t,className:o}){return nc("div",{"data-slot":"error-boundary-fallback",className:n("border-destructive/30 bg-destructive/10 text-destructive flex flex-col items-center gap-4 rounded-lg border px-6 py-8 text-center",o),children:[Oa(ro,{className:"size-10"}),nc("div",{className:"flex flex-col gap-1",children:[Oa("h3",{className:"text-base font-semibold",children:"Something went wrong"}),Oa("p",{className:"text-destructive/80 text-sm",children:e.message||"An unexpected error occurred."})]}),nc("button",{type:"button",onClick:t,className:"bg-background text-foreground hover:bg-muted flex items-center gap-1.5 rounded-md border px-4 py-2 text-sm font-medium",children:[Oa(Vc,{className:"size-4"}),"Try again"]})]})}var ac=class extends om.Component{constructor(o){super(o);dc(this,"reset",()=>{this.setState({error:null})});this.state={error:null}}componentDidCatch(o,r){this.props.onError?.(o,r)}static getDerivedStateFromError(o){return{error:o}}render(){let{error:o}=this.state,{children:r,fallback:a,className:s}=this.props;return o?typeof a=="function"?a(o,this.reset):a!==void 0?a:Oa(fP,{error:o,reset:this.reset,className:s}):r}};import*as Pt from"react";import{jsx as xP}from"react/jsx-runtime";var rm=Pt.createContext(null);function gP(e,t,o,r){let a=r[e];if(a){if(a[t])return a[t];if(a[o])return a[o]}return e}function bP({locale:e="zh-CN",defaultLocale:t="zh-CN",messages:o={},children:r,onChange:a}){let[s,l]=Pt.useState(e);Pt.useEffect(()=>{l(e)},[e]);let i=Pt.useCallback(f=>{l(f),a?.(f)},[a]),c=Pt.useCallback(f=>gP(f,s,t,o),[s,t,o]),u=Pt.useMemo(()=>({locale:s,setLocale:i,messages:o,t:c}),[s,i,o,c]);return xP(rm.Provider,{value:u,children:r})}function vP(){let e=Pt.useContext(rm);if(!e)throw new Error("useI18n must be used within an I18nProvider");return e}import*as $n from"react";import{jsx as nm}from"react/jsx-runtime";var am=$n.createContext({dir:"ltr",isRTL:!1});function hP({dir:e="ltr",children:t,className:o}){let r=$n.useMemo(()=>({dir:e,isRTL:e==="rtl"}),[e]);return nm(am.Provider,{value:r,children:nm("div",{"data-slot":"rtl-provider",dir:e,className:n(o),children:t})})}function yP(){return $n.useContext(am)}import*as Vo from"react";import{jsx as CP}from"react/jsx-runtime";function sm(e){let t=e.toLowerCase().split("+").map(u=>u.trim()),o=t.includes("ctrl"),r=t.includes("shift"),a=t.includes("alt"),s=t.includes("cmd"),l=t.includes("meta"),i=new Set(["ctrl","shift","alt","cmd","meta"]),c=t.find(u=>!i.has(u))??"";return{ctrl:o,shift:r,alt:a,meta:s||l||o,key:c}}function im(e){let t=e.target;if(!t)return!1;let o=t.tagName;return o==="INPUT"||o==="TEXTAREA"||o==="SELECT"||t.isContentEditable}function lm(e,t){let o=t.key.toLowerCase();return!(e.key&&e.key!==o||e.meta!==(t.metaKey||t.ctrlKey)||e.shift!==t.shiftKey||e.alt!==t.altKey)}function NP({className:e,shortcuts:t=[],enabled:o=!0,onTrigger:r,...a}){let s=Vo.useRef(t);s.current=t;let l=Vo.useRef(o);l.current=o;let i=Vo.useRef(r);return i.current=r,Vo.useEffect(()=>{let c=u=>{if(!l.current)return;let f=s.current;for(let m of f){let p=sm(m.keys),b=p.meta;if(!(im(u)&&!b)&&lm(p,u)){m.preventDefault!==!1&&u.preventDefault(),m.handler(u),i.current?.(m.id);break}}};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[]),CP("div",{"data-slot":"keyboard-shortcuts-manager",className:n(e),...a})}function wP(e,t=!0){let o=Vo.useRef(e);o.current=e;let r=Vo.useRef(t);r.current=t,Vo.useEffect(()=>{let a=s=>{if(r.current)for(let l of o.current){let i=sm(l.keys);if(!(im(s)&&!i.meta)&&lm(i,s)){l.preventDefault!==!1&&s.preventDefault(),l.handler(s);break}}};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[])}import*as Ua from"react";import{Fragment as Un,jsx as ye,jsxs as vt}from"react/jsx-runtime";var sc={dark:{bg:"bg-zinc-900",text:"text-zinc-200",key:"text-cyan-400",string:"text-green-400",number:"text-yellow-400",boolean:"text-purple-400",null:"text-red-400",punctuation:"text-zinc-500",lineNumber:"text-zinc-600"},light:{bg:"bg-zinc-50",text:"text-zinc-800",key:"text-cyan-600",string:"text-green-600",number:"text-yellow-600",boolean:"text-purple-600",null:"text-red-600",punctuation:"text-zinc-400",lineNumber:"text-zinc-300"}};function $a({children:e,line:t,showLineNumbers:o,theme:r}){let a=sc[r];return vt("div",{className:"flex",children:[o&&ye("span",{className:n("mr-3 inline-block w-8 shrink-0 text-right select-none",a.lineNumber),children:t}),ye("span",{className:"flex-1",children:e})]})}function cm({data:e,keyName:t=null,level:o,defaultExpanded:r,forceCollapsed:a,showLineNumbers:s,theme:l,lineNumber:i,onLineNumberChange:c}){let u=sc[l],[f,m]=Ua.useState(r);Ua.useEffect(()=>{a&&m(!1)},[a]);let p=e!==null&&typeof e=="object",b=Array.isArray(e),g=p?Object.entries(e):[],h=g.length>0,y=z=>z===null?ye("span",{className:u.null,children:"null"}):z===void 0?ye("span",{className:u.null,children:"undefined"}):typeof z=="string"?vt("span",{className:u.string,children:['"',z,'"']}):typeof z=="number"?ye("span",{className:u.number,children:String(z)}):typeof z=="boolean"?ye("span",{className:u.boolean,children:String(z)}):null,N=z=>vt("span",{className:u.key,children:['"',z,'"']}),w=()=>m(z=>!z),C=g.length,x=1+C+Math.max(0,C-1)+1;if(Ua.useEffect(()=>{c(i+x)},[i,x,c]),!p)return vt($a,{line:i,showLineNumbers:s,theme:l,children:[t!==null&&vt(Un,{children:[N(t),ye("span",{className:u.punctuation,children:": "})]}),y(e)]});let P=b?"[":"{",S=b?"]":"}";if(!h)return vt($a,{line:i,showLineNumbers:s,theme:l,children:[t!==null&&vt(Un,{children:[N(t),ye("span",{className:u.punctuation,children:": "})]}),vt("span",{className:u.punctuation,children:[P,S]})]});let R=i+1,k=[];g.forEach(([z,W],$)=>{let E=R;k.push(ye(cm,{data:W,keyName:b?null:z,level:o+1,defaultExpanded:r,forceCollapsed:a,showLineNumbers:s,theme:l,lineNumber:E,onLineNumberChange:A=>{R=A}},z+$)),$<g.length-1&&(R+=1,k.push(ye($a,{line:R,showLineNumbers:s,theme:l,children:ye("span",{className:u.punctuation,children:","})},z+$+"-comma")))});let T=R+1;return vt(Un,{children:[ye($a,{line:i,showLineNumbers:s,theme:l,children:vt("span",{className:"flex items-start",children:[ye("button",{type:"button",onClick:w,className:"mr-0.5 inline-flex shrink-0 cursor-pointer rounded p-0.5 hover:bg-white/10","aria-label":f?"Collapse":"Expand",children:f?ye(we,{className:"size-3.5"}):ye(te,{className:"size-3.5"})}),t!==null&&vt(Un,{children:[N(t),ye("span",{className:u.punctuation,children:": "})]}),ye("span",{className:u.punctuation,children:P}),!f&&vt(Un,{children:[ye("span",{className:u.punctuation,children:S}),o>0&&ye("span",{className:u.punctuation,children:","})]})]})}),f&&vt(Un,{children:[ye("div",{style:{marginLeft:o===0?0:20},children:k}),vt($a,{line:T,showLineNumbers:s,theme:l,children:[ye("span",{className:u.punctuation,children:S}),o>0&&ye("span",{className:u.punctuation,children:","})]})]})]})}function PP({data:e,className:t,defaultExpanded:o=!0,collapsed:r=!1,showLineNumbers:a=!1,theme:s="dark"}){let l=sc[s];return ye("div",{"data-slot":"json-viewer-ui",className:n(l.bg,l.text,"overflow-auto rounded-lg p-3 font-mono text-sm",t),children:ye(cm,{data:e,level:0,defaultExpanded:o,forceCollapsed:r,showLineNumbers:a,theme:s,lineNumber:1,onLineNumberChange:()=>{}})})}import*as oi from"react";import{jsx as to,jsxs as ic}from"react/jsx-runtime";var RP=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],kP=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function dm(e){let t=e.split("-").map(Number),o=t[0]??0,r=t[1]??1,a=t[2]??1;return new Date(o,r-1,a)}function SP(e){let t=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`${t}-${o}-${r}`}function IP(e,t){let o=[],r=[],a=new Date(e),s=a.getDay();a.setDate(a.getDate()-s);let l=new Date(a);for(;l<=t;)r.push(new Date(l)),r.length===7&&(o.push(r),r=[]),l.setDate(l.getDate()+1);return r.length>0&&o.push(r),o}function TP(e,t,o){if(e===0||t===0)return o[0]??"";let r=e/t,a=Math.min(Math.ceil(r*(o.length-1)),o.length-1);return o[a]??""}var MP=["#ebedf0","#9be9a8","#40c463","#30a14e","#216e39"];function DP({data:e,startDate:t,endDate:o,colorScale:r=MP,className:a,onCellClick:s,cellSize:l=12,gap:i=2}){let c=oi.useMemo(()=>{let h=new Map;for(let y of e)h.set(y.date,y.value);return h},[e]),u=oi.useMemo(()=>Math.max(1,...e.map(h=>h.value)),[e]),{weeks:f,monthLabels:m}=oi.useMemo(()=>{let y=o?dm(o):new Date,N=t?dm(t):new Date(y.getTime()-365*24*60*60*1e3),w=IP(N,y),C=[],v=-1;return w.forEach((x,P)=>{let S=x[0];if(!S)return;let R=S.getMonth();R!==v&&(C.push({month:R,x:P}),v=R)}),{weeks:w,monthLabels:C}},[t,o]),p=f.length*(l+i),b=16,g=28;return to("div",{"data-slot":"heatmap",className:n("overflow-x-auto",a),children:ic("div",{className:"inline-block",style:{minWidth:p+g},children:[to("div",{className:"relative flex",style:{height:b,paddingLeft:g},children:m.map(({month:h,x:y})=>to("span",{className:"text-muted-foreground absolute text-xs",style:{left:g+y*(l+i)},children:kP[h]??""},h+"-"+y))}),ic("div",{className:"flex",children:[to("div",{className:"flex shrink-0 flex-col",style:{width:g},children:RP.map((h,y)=>to("div",{className:"text-muted-foreground flex items-center text-xs",style:{height:l+i},children:y%2===1?h:""},h))}),to("div",{className:"flex",children:f.map((h,y)=>to("div",{className:"flex flex-col",style:{gap:i},children:h.map((N,w)=>{let C=SP(N),v=c.get(C)??0,x=TP(v,u,r),P={date:C,value:v};return to("div",{className:"cursor-pointer rounded-sm transition-transform hover:scale-110",style:{width:l,height:l,backgroundColor:x},title:`${C}: ${v}`,onClick:()=>s?.(P)},w)})},y))})]}),ic("div",{className:"text-muted-foreground mt-2 flex items-center justify-end gap-1 text-xs",style:{paddingLeft:g},children:[to("span",{className:"mr-1",children:"Less"}),r.map((h,y)=>to("div",{className:"rounded-sm",style:{width:l,height:l,backgroundColor:h}},y)),to("span",{className:"ml-1",children:"More"})]})]})})}import*as ni from"react";import{jsx as ri,jsxs as EP}from"react/jsx-runtime";var zP={sm:"h-7 px-2.5 text-xs",default:"h-9 px-3.5 text-sm",lg:"h-10 px-4 text-sm"};function LP({options:e,value:t,onChange:o,className:r,size:a="default"}){let[s,l]=ni.useState(t??e[0]?.value??"");ni.useEffect(()=>{t!==void 0&&l(t)},[t]);let i=t!==void 0?t:s,c=u=>{l(u),o?.(u)};return ri("div",{"data-slot":"segmented-filter",className:n("bg-muted/30 inline-flex items-center gap-0.5 rounded-lg border p-0.5",r),children:e.map(u=>{let f=i===u.value;return EP("button",{type:"button",onClick:()=>c(u.value),className:n("inline-flex items-center justify-center gap-1.5 rounded-md border border-transparent font-medium transition-all",zP[a],f?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:[u.icon&&ri("span",{className:"shrink-0",children:u.icon}),ri("span",{children:u.label}),u.count!==void 0&&ri("span",{className:n("inline-flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[10px] font-medium tabular-nums",f?"bg-primary-foreground/20 text-primary-foreground":"bg-muted text-muted-foreground"),children:u.count})]},u.value)})})}import*as um from"react";import{jsx as Bo,jsxs as ai}from"react/jsx-runtime";function FP({items:e=[],columns:t=4,gap:o=4,className:r,renderItem:a}){let s=n("grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3",t===1&&"lg:grid-cols-1",t===2&&"lg:grid-cols-2",t===3&&"lg:grid-cols-3",t===4&&"lg:grid-cols-4",t===5&&"lg:grid-cols-5",t===6&&"lg:grid-cols-6"),l=n(o===1&&"gap-1",o===2&&"gap-2",o===3&&"gap-3",o===4&&"gap-4",o===5&&"gap-5",o===6&&"gap-6"),i=c=>ai("div",{"data-slot":"stat-grid-item",className:"bg-card text-card-foreground flex flex-col gap-2 rounded-xl border p-4",children:[ai("div",{className:"flex items-center justify-between",children:[Bo("span",{className:"text-muted-foreground text-sm font-medium",children:c.title}),c.icon&&Bo("span",{className:"text-muted-foreground",children:c.icon})]}),ai("div",{className:"flex items-baseline gap-1",children:[Bo("span",{className:"font-heading text-2xl font-semibold tabular-nums",children:c.value}),c.unit&&Bo("span",{className:"text-muted-foreground text-sm",children:c.unit})]}),c.trend&&ai("div",{className:n("flex items-center gap-1 text-xs font-medium",c.trendDirection==="up"?"text-green-600":c.trendDirection==="down"?"text-red-600":"text-muted-foreground"),children:[c.trendDirection==="up"?Bo(Za,{className:"size-3.5"}):c.trendDirection==="down"?Bo(Ja,{className:"size-3.5"}):null,Bo("span",{children:c.trend})]})]});return Bo("div",{"data-slot":"stat-grid",className:n(s,l,r),children:e.map((c,u)=>Bo(um.Fragment,{children:a?a(c,u):i(c)},u))})}import*as Rt from"react";import{jsx as si,jsxs as pm}from"react/jsx-runtime";function AP({items:e=[],onItemSelect:t,children:o,className:r}){let[a,s]=Rt.useState(!1),[l,i]=Rt.useState({x:0,y:0}),c=Rt.useRef(null),u=Rt.useRef(null),f=h=>{h.preventDefault(),h.stopPropagation(),i({x:h.clientX,y:h.clientY}),s(!0)},m=Rt.useCallback(h=>{c.current&&!c.current.contains(h.target)&&s(!1)},[]),p=Rt.useCallback(h=>{h.key==="Escape"&&s(!1)},[]);Rt.useEffect(()=>{if(a)return document.addEventListener("mousedown",m),document.addEventListener("keydown",p),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",p)}},[a,m,p]);let b=h=>{h.disabled||h.separator||(t?.(h),s(!1))},g=Rt.useMemo(()=>{if(!a)return l;let h=180,y=e.length*32+16,{innerWidth:N,innerHeight:w}=window;return{x:Math.min(l.x,N-h-8),y:Math.min(l.y,w-y-8)}},[a,l,e.length]);return pm("div",{ref:u,"data-slot":"row-context-menu",className:n("relative",r),onContextMenu:f,children:[o,a&&si("div",{ref:c,"data-slot":"row-context-menu-popup",className:"bg-popover text-popover-foreground ring-foreground/10 fixed z-50 min-w-40 rounded-lg p-1 shadow-md ring-1",style:{left:g.x,top:g.y},children:e.map((h,y)=>h.separator?si("div",{className:"bg-border my-1 h-px","data-slot":"row-context-menu-separator"},h.key+y):pm("button",{type:"button",disabled:h.disabled,className:n("focus:bg-accent focus:text-accent-foreground flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm transition-colors outline-none",h.disabled&&"cursor-not-allowed opacity-50",h.danger?"text-destructive hover:bg-destructive/10":"hover:bg-muted"),onClick:()=>b(h),children:[h.icon&&si("span",{className:"shrink-0 [&_svg]:size-4",children:h.icon}),si("span",{className:"flex-1",children:h.label})]},h.key))})]})}import*as br from"react";import{jsx as Ga,jsxs as BP}from"react/jsx-runtime";function VP({src:e,alt:t,width:o,height:r,className:a,blurDataURL:s,placeholderColor:l="bg-muted",onError:i}){let[c,u]=br.useState(!1),[f,m]=br.useState(!1),p=br.useRef(null),b=br.useRef(null);br.useEffect(()=>{let N=p.current;if(!N)return;let w=new IntersectionObserver(C=>{for(let v of C)if(v.isIntersecting){let x=b.current;x&&(x.src=e),w.disconnect()}},{rootMargin:"50px"});return w.observe(N),()=>w.disconnect()},[e]);let g=()=>{u(!0)},h=N=>{m(!0),i?.(N)},y={width:typeof o=="number"?`${o}px`:o,height:typeof r=="number"?`${r}px`:r};return BP("div",{ref:p,"data-slot":"progressive-image",className:n("relative overflow-hidden",!s&&l,a),style:y,children:[s&&!f&&Ga("img",{src:s,alt:"","aria-hidden":"true",className:n("absolute inset-0 size-full object-cover transition-opacity duration-700",c?"opacity-0":"scale-105 opacity-100 blur-xl")}),!f&&Ga("img",{ref:b,alt:t,onLoad:g,onError:h,className:n("absolute inset-0 size-full object-cover transition-all duration-700",c?"blur-0 scale-100 opacity-100":"scale-105 opacity-0 blur-xl")}),f&&Ga("div",{className:"text-muted-foreground absolute inset-0 flex items-center justify-center text-sm",children:"\u52A0\u8F7D\u5931\u8D25"}),!c&&!f&&!s&&Ga("div",{className:"absolute inset-0 flex items-center justify-center",children:Ga("div",{className:"border-primary size-5 animate-spin rounded-full border-2 border-t-transparent"})})]})}import*as lc from"react";import{jsx as wo,jsxs as _a}from"react/jsx-runtime";var HP=[{key:"min-length",label:"\u81F3\u5C11 8 \u4E2A\u5B57\u7B26",test:e=>e.length>=8,level:"error"},{key:"uppercase",label:"\u5305\u542B\u5927\u5199\u5B57\u6BCD (A-Z)",test:e=>/[A-Z]/.test(e),level:"error"},{key:"lowercase",label:"\u5305\u542B\u5C0F\u5199\u5B57\u6BCD (a-z)",test:e=>/[a-z]/.test(e),level:"error"},{key:"number",label:"\u5305\u542B\u6570\u5B57 (0-9)",test:e=>/\d/.test(e),level:"error"},{key:"special-char",label:"\u5305\u542B\u7279\u6B8A\u5B57\u7B26 (!@#$%^&*...)",test:e=>/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(e),level:"error"}];function OP(e,t){if(!e)return 0;let r=t.filter(s=>s.test(e)).length/t.length,a=0;return e.length>=12&&(a+=.1),e.length>=16&&(a+=.1),Math.min(1,r+a)}var $P=["\u5F88\u5F31","\u5F31","\u4E00\u822C","\u5F3A","\u5F88\u5F3A"],UP=["bg-red-500","bg-orange-500","bg-yellow-500","bg-green-500","bg-emerald-600"];function GP({password:e,rules:t=HP,className:o,showScore:r=!0}){let a=lc.useMemo(()=>t.map(c=>({...c,passed:c.test(e)})),[e,t]),s=lc.useMemo(()=>OP(e,t),[e,t]),l=Math.min(Math.floor(s*5),4),i=a.every(c=>c.passed);return _a("div",{"data-slot":"password-policy-validator",className:n("flex flex-col gap-3",o),children:[r&&_a("div",{className:"flex flex-col gap-1.5",children:[_a("div",{className:"flex items-center justify-between text-xs",children:[wo("span",{className:"text-muted-foreground",children:"\u5BC6\u7801\u5F3A\u5EA6"}),wo("span",{className:n("font-medium",l<=1?"text-red-500":l===2?"text-yellow-500":"text-green-500"),children:e?$P[l]:"\u2014"})]}),wo("div",{className:"flex gap-1",children:[0,1,2,3,4].map(c=>wo("div",{className:n("h-1.5 flex-1 rounded-full transition-colors",c<=l&&e?UP[l]:"bg-muted")},c))})]}),wo("div",{className:"flex flex-col gap-1.5",children:a.map(c=>_a("div",{"data-slot":"password-policy-rule",className:n("flex items-center gap-2 text-sm transition-colors",!e&&"text-muted-foreground"),children:[wo("span",{className:n("inline-flex size-4 shrink-0 items-center justify-center rounded-full",c.passed?"bg-green-500/10 text-green-600":e?"bg-red-500/10 text-red-600":"bg-muted text-muted-foreground"),children:c.passed?wo(ie,{className:"size-3"}):wo(oe,{className:"size-3"})}),wo("span",{className:n(c.passed?"text-green-600":e?"text-red-600":"text-muted-foreground"),children:c.label})]},c.key))}),i&&e&&_a("div",{className:"flex items-center gap-1.5 text-xs font-medium text-green-600",children:[wo(ie,{className:"size-3.5"}),"\u5BC6\u7801\u7B26\u5408\u6240\u6709\u8981\u6C42"]})]})}var DH=qi,zH=vs,EH=fn,AH=el,BH=tl,OH=Al,UH=Vl,_H=Sa;export{vm as Accordion,ym as AccordionContent,xm as AccordionItem,hm as AccordionTrigger,Rk as ActivityIcon,xh as Affix,Cm as Alert,Co as AlertCircleIcon,Rm as AlertDescription,Lm as AlertDialog,Om as AlertDialogAction,$m as AlertDialogCancel,Fm as AlertDialogContent,Bm as AlertDialogDescription,Hm as AlertDialogFooter,Am as AlertDialogHeader,Vm as AlertDialogTitle,Em as AlertDialogTrigger,Pm as AlertTitle,ro as AlertTriangleIcon,MC as AmountInput,Iy as Anchor,YP as ArchiveIcon,jP as ArrowDownIcon,QP as ArrowDownRightIcon,XP as ArrowLeftIcon,JP as ArrowRight,ZP as ArrowRightIcon,eR as ArrowUpDownIcon,tR as ArrowUpIcon,oR as ArrowUpRightIcon,Um as AspectRatio,_m as AudioPlayer,Vl as AutoComplete,UH as Autocomplete,ls as Avatar,Wm as AvatarBadge,ds as AvatarFallback,qm as AvatarGroup,Ym as AvatarGroupCount,cs as AvatarImage,kk as AwardIcon,yh as BackTop,Bt as Badge,rR as BadgeDollarSignIcon,IS as BanIcon,Sk as BanknoteIcon,nR as BarChart3Icon,Ik as BarChartIcon,df as BarcodeDisplay,aR as BarcodeIcon,Xr as BellIcon,Su as Blockquote,sR as Bold,vS as BoldIcon,iR as BookOpen,lR as BookmarkCheckIcon,uc as BookmarkIcon,TS as BoxesIcon,cS as BrainIcon,ef as Breadcrumb,sf as BreadcrumbEllipsis,of as BreadcrumbItem,rf as BreadcrumbLink,tf as BreadcrumbList,nf as BreadcrumbPage,af as BreadcrumbSeparator,bf as BrowseInput,cR as Building2Icon,Ka as BuildingIcon,D as Button,Tk as CalculatorIcon,en as Calendar,jc as CalendarDayButton,dR as CalendarDaysIcon,Ho as CalendarIcon,Mk as CameraIcon,yf as Captcha,sS as CarIcon,pi as Card,Nf as CardAction,bi as CardContent,gi as CardDescription,vi as CardFooter,mi as CardHeader,wf as CardSection,fi as CardTitle,Cf as Carousel,Pf as CarouselContent,If as CarouselDots,Rf as CarouselItem,Sf as CarouselNext,kf as CarouselPrevious,Vh as Cascader,Gy as ChatInput,Ky as ChatMessage,Ac as CheckCheckIcon,uR as CheckCircle2Icon,Oo as CheckCircleIcon,ie as CheckIcon,ht as Checkbox,we as ChevronDownIcon,Ye as ChevronLeftIcon,te as ChevronRightIcon,Wa as ChevronUpIcon,Lc as ChevronsLeftIcon,Ec as ChevronsRightIcon,pR as ChevronsUpDownIcon,qa as CircleCheckIcon,Dk as CircleIcon,MS as ClipboardCheckIcon,mR as ClipboardListIcon,pc as ClockIcon,KC as CodeDiffViewer,dS as CodeIcon,zk as CoinsIcon,Uy as Col,Ni as Collapsible,Ci as CollapsibleContent,wi as CollapsibleTrigger,Lf as ColorPicker,fR as Columns3Icon,Ny as Combobox,Mi as Command,Di as CommandDialog,Zn as CommandEmpty,on as CommandGroup,Xn as CommandInput,rn as CommandItem,Jn as CommandList,Uf as CommandSeparator,Gf as CommandShortcut,Sl as ConfigContext,wh as ConfigProvider,DS as ConstructionIcon,_f as ContextMenu,Jf as ContextMenuCheckboxItem,nd as ContextMenuContent,Wf as ContextMenuGroup,Yf as ContextMenuItem,qf as ContextMenuLabel,rd as ContextMenuPortal,Zf as ContextMenuRadioGroup,eg as ContextMenuRadioItem,tg as ContextMenuSeparator,jf as ContextMenuSub,Xf as ContextMenuSubContent,Qf as ContextMenuSubTrigger,Kf as ContextMenuTrigger,gR as CookieIcon,EC as CopyButton,mc as CopyIcon,ry as Countdown,kC as CountdownButton,bR as CreditCardIcon,KS as CropIcon,zS as CrosshairIcon,Ty as DataList,LS as DatabaseIcon,dh as DatePicker,vC as DateRangePicker,ng as DepartmentBrowse,mh as Descriptions,fh as DescriptionsItem,ot as Dialog,zm as DialogBody,Dm as DialogClose,rt as DialogContent,hr as DialogDescription,qn as DialogFooter,nt as DialogHeader,$c as DialogOverlay,Oc as DialogPortal,at as DialogTitle,St as DialogTrigger,h0 as Direction,xu as Divider,vR as DollarSignIcon,Ek as DonutIcon,sg as Dot,Lk as DotIcon,xR as DownloadIcon,lg as Drawer,dg as DrawerClose,ug as DrawerContent,gg as DrawerDescription,mg as DrawerFooter,pg as DrawerHeader,dd as DrawerOverlay,cd as DrawerPortal,fg as DrawerTitle,cg as DrawerTrigger,oa as DropdownMenu,wg as DropdownMenuCheckboxItem,nn as DropdownMenuContent,vg as DropdownMenuGroup,na as DropdownMenuItem,xg as DropdownMenuLabel,bg as DropdownMenuPortal,Cg as DropdownMenuRadioGroup,Pg as DropdownMenuRadioItem,Li as DropdownMenuSeparator,Rg as DropdownMenuShortcut,hg as DropdownMenuSub,Ng as DropdownMenuSubContent,yg as DropdownMenuSubTrigger,ra as DropdownMenuTrigger,yR as Edit3Icon,hR as EditIcon,VC as EditableDescriptions,AC as EditableTable,cy as EmptyState,ac as ErrorBoundaryUI,Fk as ExternalLinkIcon,fc as EyeIcon,gc as EyeOffIcon,ky as Fab,Sy as FabSpeedDial,NR as FactoryIcon,_w as FeedbackSurvey,Ak as FileEditIcon,no as FileIcon,Ig as FileList,zw as FileManager,Vk as FilePlusIcon,wR as FileSpreadsheetIcon,CR as FileTextIcon,Sg as FileUpload,PR as FileXIcon,BC as FilterChips,bc as FilterIcon,Bk as FlagIcon,Kx as Flex,Gn as FolderIcon,Hk as FolderOpenIcon,ES as FolderTreeIcon,Ai as Form,Oi as FormControl,$i as FormDescription,Vi as FormField,Lg as FormGrid,Eg as FormGridItem,Bi as FormItem,Hi as FormLabel,Fg as FormList,Ui as FormMessage,Vg as FormSection,Zg as FullscreenToggle,Ok as FunnelIcon,RR as GalleryHorizontalEnd,$k as GanttChartIcon,FS as GiftIcon,pP as GlobalLoading,Bw as GlobalSearch,iS as GlobeIcon,Uk as GoalIcon,kR as GridIcon,ob as GridItem,tb as GridLayout,vc as GripVerticalIcon,hu as H1,yu as H2,Nu as H3,wu as H4,Cu as H5,Pu as H6,AS as HardDriveIcon,wS as Heading1Icon,CS as Heading2Icon,DP as Heatmap,aC as HelpDesk,SR as Home,IR as HomeIcon,rb as HoverCard,ab as HoverCardContent,nb as HoverCardTrigger,bP as I18nProvider,e0 as Icon,QN as IconPicker,Oh as Image,$h as ImageGroup,xc as ImageIcon,sb as ImageViewer,TR as Inbox,hc as InboxIcon,c0 as InfiniteScroll,ao as InfoIcon,Iu as InlineCode,le as Input,Ii as InputGroup,Ti as InputGroupAddon,Vf as InputGroupButton,Hf as InputGroupInput,Bf as InputGroupText,Of as InputGroupTextarea,Nl as InputNumber,sh as InputNumberWithUnit,rh as InputSearch,MR as Italic,xS as ItalicIcon,PP as JSONViewerUI,vs as KPICard,qi as KPIPanel,ua as Kbd,pa as KbdGroup,rP as KeepAlive,DR as KeyboardIcon,cb as KeyboardShortcut,ew as KeyboardShortcutDialog,NP as KeyboardShortcutsManager,Xw as KnowledgeBase,zH as KpiCard,DH as KpiPanel,Fi as Label,zR as LanguagesIcon,Mu as Large,lS as LayersIcon,LR as LayoutDashboardIcon,Gk as LayoutGridIcon,tP as LazyImage,Tu as Lead,ER as LifeBuoyIcon,_k as LineChartIcon,Kk as Link2Icon,FR as LinkIcon,Lu as List,zy as ListFooter,My as ListHeader,AR as ListIcon,Dy as ListItem,hS as ListOrderedIcon,yc as Loader2,Ya as Loader2Icon,VR as LockIcon,VS as LogInIcon,BS as LogOutIcon,BR as Mail,HR as MailIcon,Wk as MapIcon,qk as MapPinIcon,Yk as MapPinnedIcon,YC as MarkdownViewer,bC as MaskedInput,u0 as Masonry,Nc as MaximizeIcon,jk as MedalIcon,OR as MegaphoneIcon,ty as Mentions,Sn as Menu,zl as MenuDivider,$R as MenuIcon,Dl as MenuItem,Ll as MenuItemGroup,Ml as MenuSubMenu,mb as Menubar,v0 as Message,Wy as MessageProvider,UR as MessageSquareIcon,HS as MessageSquareWarningIcon,uS as MicIcon,wc as MinimizeIcon,Cc as MinusIcon,qy as MobilePullRefresh,jy as MobileSwipeAction,Lh as ModalProvider,GR as MonitorIcon,yC as MonthPicker,_R as MoonIcon,ja as MoreHorizontalIcon,Qk as MoreVerticalIcon,KR as MousePointerClickIcon,zu as Muted,m0 as NativeSelect,bb as NavigationMenu,yb as NavigationMenuContent,wb as NavigationMenuIndicator,xb as NavigationMenuItem,Nb as NavigationMenuLink,vb as NavigationMenuList,zd as NavigationMenuPositioner,hb as NavigationMenuTrigger,Ay as Notification,sP as NotificationBadge,uP as NotificationDropdown,JN as NumberTicker,fn as OTPField,Cb as OTPFieldSeparator,Qa as OctagonXIcon,Db as OfficeDocPreview,Vb as OrgTree,EH as OtpField,WR as PackageCheckIcon,qR as PackageIcon,Hb as PageContainer,$b as PageContent,Ob as PageHeader,Ub as Pagination,Gb as PaginationContent,qb as PaginationEllipsis,_b as PaginationItem,Xi as PaginationLink,Wb as PaginationNext,Kb as PaginationPrevious,YR as PanelLeftCloseIcon,Pc as PanelLeftIcon,jR as PanelLeftOpenIcon,QR as PanelRightIcon,Dc as PaperclipIcon,ku as Paragraph,cC as PasswordInput,GP as PasswordPolicyValidator,_p as PasswordStrengthMeter,ts as PauseIcon,Rc as PencilIcon,OS as PercentIcon,mC as PhoneInput,Dg as PictureCard,Mg as PictureWall,Xk as PieChartIcon,Jk as PiggyBankIcon,XR as PinIcon,YS as PinOffIcon,SS as PipetteIcon,os as PlayIcon,JR as Plus,Xa as PlusIcon,gh as Popconfirm,ce as Popover,ue as PopoverContent,ki as PopoverDescription,Tf as PopoverHeader,Ri as PopoverTitle,de as PopoverTrigger,$S as PowerIcon,ZR as PrinterIcon,Yb as Progress,Od as ProgressIndicator,jb as ProgressLabel,Hd as ProgressTrack,Qb as ProgressValue,VP as ProgressiveImage,Al as QRCode,el as QrCodeDisplay,ek as QrCodeIcon,OH as Qrcode,AH as QrcodeDisplay,PC as QuarterPicker,yS as QuoteIcon,hP as RTLProvider,tv as RadioGroup,ov as RadioGroupItem,tk as RadioTowerIcon,RC as RangeSlider,sy as Rating,Zk as ReceiptIcon,NS as RedoIcon,US as RefreshCcwIcon,ok as RefreshCwIcon,BH as Resizable,iv as ResizableHandle,nv as ResizablePanel,tl as ResizablePanelGroup,jh as Result,eP as RichTextDisplay,eS as RocketIcon,rk as RotateCcwIcon,Vc as RotateCwIcon,$y as Row,AP as RowContextMenu,qS as Rows3Icon,rs as SaveIcon,HC as SavedViewSwitcher,WS as ScanLineIcon,pw as Scheduler,Xg as SchemaForm,Pr as ScrollArea,ad as ScrollBar,nk as Search,je as SearchIcon,ak as SearchXIcon,py as SegmentedControl,LP as SegmentedFilter,sn as Select,dn as SelectContent,Wg as SelectGroup,un as SelectItem,qg as SelectLabel,Pd as SelectScrollDownButton,Cd as SelectScrollUpButton,Yg as SelectSeparator,cn as SelectTrigger,ln as SelectValue,kc as SendIcon,rl as Separator,lv as SequenceInput,dv as SequencePreview,sk as ServerCrashIcon,ik as Settings,lk as SettingsIcon,tS as Share2Icon,al as Sheet,fv as SheetClose,sl as SheetContent,cl as SheetDescription,vv as SheetFooter,il as SheetHeader,ll as SheetTitle,mv as SheetTrigger,ck as ShieldAlertIcon,dk as ShieldCheck,uk as ShieldCheckIcon,pk as ShieldIcon,mk as ShoppingCartIcon,Iv as Sidebar,Av as SidebarContent,Ev as SidebarFooter,Vv as SidebarGroup,Hv as SidebarGroupAction,Ov as SidebarGroupContent,Bv as SidebarGroupLabel,Lv as SidebarHeader,zv as SidebarInput,Dv as SidebarInset,$v as SidebarMenu,_v as SidebarMenuAction,Kv as SidebarMenuBadge,Qd as SidebarMenuButton,Uv as SidebarMenuItem,Wv as SidebarMenuSkeleton,qv as SidebarMenuSub,Jd as SidebarMenuSubButton,Xd as SidebarMenuSubItem,Sv as SidebarProvider,Mv as SidebarRail,Fv as SidebarSeparator,Tv as SidebarTrigger,zc as SignatureIcon,C0 as SignaturePad,ft as Skeleton,$C as SkeletonForm,OC as SkeletonTable,Qv as Slider,Xv as SliderControl,Zv as SliderIndicator,ex as SliderThumb,Jv as SliderTrack,Du as Small,fk as SmartphoneIcon,_H as Sonner,zC as SortableList,Ox as Space,gk as Sparkles,pS as SparklesIcon,vh as Spin,wn as Spinner,w0 as SplitButton,tx as SplitPane,oh as SpreadsheetEditor,oS as SquareIcon,Sc as StarIcon,FP as StatGrid,Xh as Statistic,nx as Step,rx as Stepper,PS as StrikethroughIcon,bk as SunIcon,Gi as Switch,ax as Table,ix as TableBody,px as TableCaption,ux as TableCell,lx as TableFooter,dx as TableHead,sx as TableHeader,vk as TableIcon,cx as TableRow,fx as Tabs,vx as TabsContent,gx as TabsList,bx as TabsTrigger,Xu as Tag,_h as TagGroup,xk as TagIcon,GS as TagsIcon,xx as TagsInput,rS as TargetIcon,mS as TerminalIcon,Ru as Text,wr as Textarea,fS as ThumbsDownIcon,gS as ThumbsUpIcon,i0 as TimePicker,yx as Timeline,nu as TimelineConnector,au as TimelineContent,iu as TimelineDescription,ru as TimelineDot,Nx as TimelineItem,lu as TimelineTime,su as TimelineTitle,Sa as Toaster,Px as Toggle,xl as ToggleGroup,hl as ToggleGroupItem,ul as Tooltip,ml as TooltipContent,hv as TooltipProvider,pl as TooltipTrigger,by as Tour,o0 as Transfer,Jr as Trash2Icon,Ic as TrashIcon,Ix as TreeSelect,Mx as TreeView,Ja as TrendingDownIcon,Za as TrendingUpIcon,es as TriangleAlertIcon,hk as TrophyIcon,yk as TruckIcon,sw as TwoFactorAuth,Jx as Typography,Nk as Underline,Fc as UndoIcon,_S as UnlockIcon,_n as UploadIcon,wk as User,zx as UserBrowse,ii as UserIcon,Ck as UsersIcon,Km as VideoPlayer,Ex as VirtualList,Vx as VirtualTable,Kn as Volume2Icon,nS as WalletIcon,bS as WandSparklesIcon,hy as Watermark,Tc as WifiOffIcon,Jy as WithPermission,Pk as WrenchIcon,Mc as XCircleIcon,oe as XIcon,wC as YearPicker,aS as ZapIcon,RS as ZoomInIcon,kS as ZoomOutIcon,Bc as alertVariants,Gc as badgeVariants,qc as browseInputVariants,At as buttonVariants,Ad as detectDocType,id as dotVariants,pd as formGridVariants,bd as formSectionVariants,l0 as formatTimeInput,Xc as generateCode,Mp as generateDefaultBackupCodes,Rd as gridLayoutVariants,Sd as kbdVariants,Dd as navigationMenuTriggerStyle,Bd as pageContainerVariants,eu as tabsListVariants,ou as timelineDotVariants,ks as toggleVariants,Ch as useConfig,ia as useFormField,vP as useI18n,nP as useKeepAlive,wP as useKeyboardShortcuts,yP as useRTL,vn as useSidebar};