@fabio.caffarello/react-design-system 1.24.0 → 2.0.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 (147) hide show
  1. package/README.md +2 -12
  2. package/dist/index.cjs +204 -375
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.js +7399 -6914
  5. package/dist/index.js.map +1 -1
  6. package/dist/react-design-system.css +1 -1
  7. package/dist/ui/components/Accordion/Accordion.d.ts +1 -1
  8. package/dist/ui/components/Autocomplete/Autocomplete.d.ts +0 -1
  9. package/dist/ui/components/Autocomplete/AutocompleteList.d.ts +1 -1
  10. package/dist/ui/components/Autocomplete/index.d.ts +1 -1
  11. package/dist/ui/components/Breadcrumb/Breadcrumb.d.ts +1 -1
  12. package/dist/ui/components/ButtonGroup/ButtonGroup.d.ts +1 -1
  13. package/dist/ui/components/Card/Card.d.ts +1 -1
  14. package/dist/ui/components/ColorPicker/ColorPicker.d.ts +1 -1
  15. package/dist/ui/components/CommandPalette/CommandPalette.d.ts +1 -1
  16. package/dist/ui/components/DashboardLayout/DashboardLayout.d.ts +1 -1
  17. package/dist/ui/components/DataGrid/DataGrid.d.ts +27 -4
  18. package/dist/ui/components/DataTablePattern/DataTablePattern.d.ts +1 -1
  19. package/dist/ui/components/DatePicker/DatePicker.d.ts +4 -4
  20. package/dist/ui/components/DatePicker/DatePickerCalendar.d.ts +1 -1
  21. package/dist/ui/components/DatePicker/DatePickerInput.d.ts +1 -1
  22. package/dist/ui/components/DatePicker/DatePickerProvider.d.ts +1 -1
  23. package/dist/ui/components/Dialog/AlertDialog.d.ts +1 -1
  24. package/dist/ui/components/Dialog/Dialog.d.ts +1 -1
  25. package/dist/ui/components/Dialog/DialogClose.d.ts +6 -2
  26. package/dist/ui/components/Dialog/DialogContent.d.ts +1 -1
  27. package/dist/ui/components/Dialog/DialogDescription.d.ts +1 -1
  28. package/dist/ui/components/Dialog/DialogFooter.d.ts +1 -1
  29. package/dist/ui/components/Dialog/DialogHeader.d.ts +1 -1
  30. package/dist/ui/components/Dialog/DialogTitle.d.ts +1 -1
  31. package/dist/ui/components/Dialog/DialogTrigger.d.ts +6 -2
  32. package/dist/ui/components/Drawer/Drawer.d.ts +1 -1
  33. package/dist/ui/components/Drawer/DrawerContext.d.ts +1 -1
  34. package/dist/ui/components/Drawer/DrawerFooter.d.ts +1 -1
  35. package/dist/ui/components/Drawer/DrawerHeader.d.ts +1 -1
  36. package/dist/ui/components/Dropdown/Dropdown.d.ts +2 -1
  37. package/dist/ui/components/EmptyState/EmptyState.d.ts +1 -1
  38. package/dist/ui/components/FileUpload/FileUpload.d.ts +1 -1
  39. package/dist/ui/components/Form/Form.d.ts +1 -1
  40. package/dist/ui/components/Form/FormContext.d.ts +15 -4
  41. package/dist/ui/components/Form/FormField.d.ts +3 -3
  42. package/dist/ui/components/Form/FormProvider.d.ts +1 -1
  43. package/dist/ui/components/Form/useFormFieldArray.d.ts +2 -2
  44. package/dist/ui/components/FormWizardPattern/FormWizardPattern.d.ts +1 -1
  45. package/dist/ui/components/Header/Header.d.ts +1 -1
  46. package/dist/ui/components/Header/components/HeaderActions.d.ts +1 -1
  47. package/dist/ui/components/Header/components/HeaderHamburger.d.ts +2 -2
  48. package/dist/ui/components/Header/components/HeaderLogo.d.ts +1 -1
  49. package/dist/ui/components/Header/components/HeaderMobileMenu.d.ts +1 -1
  50. package/dist/ui/components/Header/components/HeaderNavigation.d.ts +1 -1
  51. package/dist/ui/components/Header/contexts/HeaderContext.d.ts +1 -1
  52. package/dist/ui/components/LoginBox/LoginBox.d.ts +1 -1
  53. package/dist/ui/components/Menu/Menu.d.ts +1 -1
  54. package/dist/ui/components/Menu/MenuContext.d.ts +1 -1
  55. package/dist/ui/components/Menu/MenuSeparator.d.ts +1 -1
  56. package/dist/ui/components/Modal/Modal.d.ts +1 -1
  57. package/dist/ui/components/Navigation/Navigation.d.ts +1 -1
  58. package/dist/ui/components/PageHeader/PageHeader.d.ts +1 -1
  59. package/dist/ui/components/Pagination/Pagination.d.ts +1 -1
  60. package/dist/ui/components/Popover/Popover.d.ts +1 -1
  61. package/dist/ui/components/Rating/Rating.d.ts +1 -1
  62. package/dist/ui/components/SearchAndFilterPattern/SearchAndFilterPattern.d.ts +1 -1
  63. package/dist/ui/components/SearchInput/SearchInput.d.ts +1 -1
  64. package/dist/ui/components/SideNavbar/SideNavbar.d.ts +1 -1
  65. package/dist/ui/components/SideNavbar/components/Navbar/Navbar.d.ts +2 -1
  66. package/dist/ui/components/SideNavbar/components/Navbar/NavbarGroup.d.ts +1 -1
  67. package/dist/ui/components/SideNavbar/components/Navbar/NavbarItem.d.ts +2 -1
  68. package/dist/ui/components/SideNavbar/components/Navbar/NavbarSeparator.d.ts +1 -1
  69. package/dist/ui/components/SideNavbar/components/Navbar/NavbarToggle.d.ts +1 -1
  70. package/dist/ui/components/SideNavbar/components/SideNavbarBackdrop.d.ts +1 -1
  71. package/dist/ui/components/SideNavbar/components/SideNavbarGroup.d.ts +1 -1
  72. package/dist/ui/components/SideNavbar/components/SideNavbarResizeHandle.d.ts +1 -1
  73. package/dist/ui/components/SideNavbar/components/SideNavbarRoot.d.ts +2 -1
  74. package/dist/ui/components/SideNavbar/components/SideNavbarToggle.d.ts +1 -1
  75. package/dist/ui/components/SideNavbar/components/Sidebar/Sidebar.d.ts +1 -1
  76. package/dist/ui/components/SideNavbar/components/Sidebar/SidebarContent.d.ts +2 -1
  77. package/dist/ui/components/SideNavbar/components/Sidebar/SidebarFooter.d.ts +1 -1
  78. package/dist/ui/components/SideNavbar/components/Sidebar/SidebarGroup.d.ts +1 -1
  79. package/dist/ui/components/SideNavbar/components/Sidebar/SidebarHeader.d.ts +1 -1
  80. package/dist/ui/components/SideNavbar/components/Sidebar/SidebarSlot.d.ts +1 -1
  81. package/dist/ui/components/SideNavbar/components/Sidebar/SidebarSlotContent.d.ts +1 -1
  82. package/dist/ui/components/SideNavbar/hooks/useSideNavbar.d.ts +3 -3
  83. package/dist/ui/components/SideNavbar/providers/SideNavbarConfigProvider.d.ts +1 -1
  84. package/dist/ui/components/SideNavbar/providers/SideNavbarProvider.d.ts +1 -1
  85. package/dist/ui/components/SideNavbar/providers/SideNavbarStateProvider.d.ts +1 -1
  86. package/dist/ui/components/SideNavbar/providers/SideNavbarThemeProvider.d.ts +1 -1
  87. package/dist/ui/components/SideNavbar/providers/SidebarSlotProvider.d.ts +1 -1
  88. package/dist/ui/components/SideNavbar/types/index.d.ts +31 -3
  89. package/dist/ui/components/Stepper/Stepper.d.ts +1 -1
  90. package/dist/ui/components/Table/Table.d.ts +1 -1
  91. package/dist/ui/components/Table/TableActions/TableActions.d.ts +1 -1
  92. package/dist/ui/components/Table/TableActions.d.ts +1 -1
  93. package/dist/ui/components/Table/TableBody.d.ts +2 -2
  94. package/dist/ui/components/Table/TableCell.d.ts +1 -1
  95. package/dist/ui/components/Table/TableContext.d.ts +20 -2
  96. package/dist/ui/components/Table/TableEmptyState.d.ts +1 -1
  97. package/dist/ui/components/Table/TableFilters/TableFilters.d.ts +1 -1
  98. package/dist/ui/components/Table/TableFilters.d.ts +1 -1
  99. package/dist/ui/components/Table/TableHeader.d.ts +1 -1
  100. package/dist/ui/components/Table/TableHeaderCell.d.ts +1 -1
  101. package/dist/ui/components/Table/TableHeaderRow.d.ts +1 -1
  102. package/dist/ui/components/Table/TablePagination/TablePagination.d.ts +1 -1
  103. package/dist/ui/components/Table/TablePagination.d.ts +1 -1
  104. package/dist/ui/components/Table/TableProvider.d.ts +1 -1
  105. package/dist/ui/components/Table/TableRow.d.ts +1 -1
  106. package/dist/ui/components/Tabs/TabsContent.d.ts +1 -1
  107. package/dist/ui/components/Tabs/TabsList.d.ts +12 -3
  108. package/dist/ui/components/Tabs/TabsProvider.d.ts +1 -1
  109. package/dist/ui/components/Tabs/TabsTrigger.d.ts +1 -1
  110. package/dist/ui/components/TimePicker/TimePicker.d.ts +1 -1
  111. package/dist/ui/components/Timeline/Timeline.d.ts +1 -1
  112. package/dist/ui/components/Toast/Toast.d.ts +1 -1
  113. package/dist/ui/components/Toast/ToastContainer.d.ts +1 -1
  114. package/dist/ui/components/index.d.ts +1 -1
  115. package/dist/ui/hooks/createGenericContext.d.ts +85 -0
  116. package/dist/ui/hooks/focusable.d.ts +33 -0
  117. package/dist/ui/hooks/useAutoFocus.d.ts +37 -0
  118. package/dist/ui/hooks/useFocusRestore.d.ts +28 -0
  119. package/dist/ui/hooks/useFocusTrap.d.ts +33 -0
  120. package/dist/ui/primitives/Avatar/AvatarGroup.d.ts +1 -1
  121. package/dist/ui/primitives/Checkbox/Checkbox.d.ts +9 -0
  122. package/dist/ui/primitives/Collapsible/Collapsible.d.ts +8 -2
  123. package/dist/ui/primitives/ErrorMessage/ErrorMessage.d.ts +1 -1
  124. package/dist/ui/primitives/Info/Info.d.ts +1 -1
  125. package/dist/ui/primitives/NavLink/NavLink.d.ts +12 -1
  126. package/dist/ui/primitives/Radio/Radio.d.ts +9 -0
  127. package/dist/ui/primitives/Separator/Separator.d.ts +1 -1
  128. package/dist/ui/primitives/Skeleton/Skeleton.d.ts +1 -1
  129. package/dist/ui/primitives/Spinner/Spinner.d.ts +1 -1
  130. package/dist/ui/primitives/Switch/Switch.d.ts +16 -2
  131. package/dist/ui/primitives/Text/Text.d.ts +0 -1
  132. package/dist/ui/primitives/Textarea/Textarea.d.ts +18 -0
  133. package/dist/ui/primitives/Tooltip/Tooltip.d.ts +2 -1
  134. package/dist/ui/providers/AppProvider.d.ts +1 -1
  135. package/dist/ui/providers/ConfigProvider.d.ts +1 -1
  136. package/dist/ui/providers/DialogProvider.d.ts +1 -1
  137. package/dist/ui/providers/ThemeProvider.d.ts +1 -1
  138. package/dist/ui/providers/ToastProvider.d.ts +1 -1
  139. package/dist/ui/tokens/TokenVisualizations.d.ts +8 -8
  140. package/dist/ui/tokens/spacing.d.ts +1 -1
  141. package/dist/ui/utils/index.d.ts +1 -0
  142. package/dist/ui/utils/mergeRefs.d.ts +16 -0
  143. package/package.json +56 -35
  144. package/dist/ui/components/Dialog/DialogContext.d.ts +0 -10
  145. package/dist/ui/components/Dialog/DialogProvider.d.ts +0 -10
  146. package/dist/ui/components/Toast/ToastContext.d.ts +0 -21
  147. package/dist/ui/components/Toast/ToastProvider.d.ts +0 -7
package/dist/index.cjs CHANGED
@@ -1,346 +1,175 @@
1
- "use strict";var Lo=Object.defineProperty,_o=Object.defineProperties;var Po=Object.getOwnPropertyDescriptors;var tr=Object.getOwnPropertySymbols;var fn=Object.prototype.hasOwnProperty,mn=Object.prototype.propertyIsEnumerable;var Br=(e,t,r)=>t in e?Lo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t)=>{for(var r in t||(t={}))fn.call(t,r)&&Br(e,r,t[r]);if(tr)for(var r of tr(t))mn.call(t,r)&&Br(e,r,t[r]);return e},z=(e,t)=>_o(e,Po(t));var O=(e,t)=>{var r={};for(var s in e)fn.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&tr)for(var s of tr(e))t.indexOf(s)<0&&mn.call(e,s)&&(r[s]=e[s]);return r};var pn=(e,t,r)=>Br(e,typeof t!="symbol"?t+"":t,r);var rr=(e,t,r)=>new Promise((s,a)=>{var o=d=>{try{u(r.next(d))}catch(c){a(c)}},i=d=>{try{u(r.throw(d))}catch(c){a(c)}},u=d=>d.done?s(d.value):Promise.resolve(d.value).then(o,i);u((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),qe=require("react-dom"),Qe={icon:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},text:{xs:"text-xs",sm:"text-sm",base:"text-base"},spacing:{itemPaddingX:"px-4",itemPaddingY:"py-2",nestedIndent:"pl-6",nestedIndentLevel2:"pl-10",nestedIndentLevel3:"pl-14",groupTitlePadding:"px-4 py-2",iconMargin:"mr-3"},colors:{active:{bg:"bg-surface-brand-muted",text:"text-fg-brand-emphasis",border:"border-line-brand"},inactive:{text:"text-fg-secondary",hover:"hover:bg-surface-hover hover:text-fg-primary"},groupTitle:"text-fg-tertiary"},chevron:{size:"h-3 w-3",color:"text-fg-quaternary"},navigation:{width:{default:"56px",compact:"48px",expanded:"200px"},background:{default:"#fafafa",hover:"#f5f5f5"}},split:{transition:"transition-all duration-300",collapsedWidth:"0px"},content:{scrollbar:{width:"thin",color:{thumb:"#cbd5e1",track:"#f1f5f9"}}}};function zo(e){return e<=0?Qe.spacing.itemPaddingX:e===1?Qe.spacing.nestedIndent:e===2?Qe.spacing.nestedIndentLevel2:e===3?Qe.spacing.nestedIndentLevel3:`pl-${4+e*4}`}class he{static create(t){const r=t*this.BASE_UNIT,s=r/16;return{value:r,rem:`${s}rem`,px:`${r}px`,tailwind:this.getTailwindClass(t)}}static getTailwindClass(t){return{0:"0",.5:"0.5",1:"1",1.5:"1.5",2:"2",2.5:"2.5",3:"3",3.5:"3.5",4:"4",5:"5",6:"6",8:"8",10:"10",12:"12",16:"16",20:"20",24:"24",32:"32",40:"40",48:"48",64:"64",80:"80",96:"96"}[t]||String(t)}}pn(he,"BASE_UNIT",4);const xr={none:he.create(0),"0.5":he.create(.5),xs:he.create(1),"1.5":he.create(1.5),sm:he.create(2),"2.5":he.create(2.5),md:he.create(3),"3.5":he.create(3.5),base:he.create(4),lg:he.create(6),xl:he.create(8),"2xl":he.create(10),"3xl":he.create(12),"4xl":he.create(16),"5xl":he.create(20),"6xl":he.create(24)};function Oo(e){return xr[e]}function E(e,t="p"){const s=xr[e].tailwind;return`${{p:"p",m:"m",px:"px",mx:"mx",py:"py",my:"my",pt:"pt",mt:"mt",pr:"pr",mr:"mr",pb:"pb",mb:"mb",pl:"pl",ml:"ml",gap:"gap","gap-x":"gap-x","gap-y":"gap-y","space-y":"space-y"}[t]}-${s}`}class me{static createFontSize(t){const s={"2xs":{px:10,tailwind:"text-2xs"},xs:{px:12,tailwind:"text-xs"},sm:{px:14,tailwind:"text-sm"},base:{px:16,tailwind:"text-base"},lg:{px:18,tailwind:"text-lg"},xl:{px:20,tailwind:"text-xl"},"2xl":{px:24,tailwind:"text-2xl"},"3xl":{px:30,tailwind:"text-3xl"},"4xl":{px:36,tailwind:"text-4xl"},"5xl":{px:48,tailwind:"text-5xl"},"6xl":{px:60,tailwind:"text-6xl"}}[t];return{value:s.px,rem:`${s.px/16}rem`,px:`${s.px}px`,tailwind:s.tailwind}}static createLineHeight(t){const s={none:{value:1,tailwind:"leading-none"},tight:{value:1.25,tailwind:"leading-tight"},snug:{value:1.375,tailwind:"leading-snug"},normal:{value:1.5,tailwind:"leading-normal"},relaxed:{value:1.625,tailwind:"leading-relaxed"},loose:{value:2,tailwind:"leading-loose"}}[t];return{value:s.value,tailwind:s.tailwind}}static createFontWeight(t){const s={light:{value:300,tailwind:"font-light"},normal:{value:400,tailwind:"font-normal"},medium:{value:500,tailwind:"font-medium"},semibold:{value:600,tailwind:"font-semibold"},bold:{value:700,tailwind:"font-bold"}}[t];return{value:s.value,tailwind:s.tailwind}}static create(t,r="normal",s="normal"){return{fontSize:this.createFontSize(t),lineHeight:this.createLineHeight(r),fontWeight:this.createFontWeight(s)}}}const Vo={sans:{name:"sans",stack:'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif',tailwind:"font-sans"},serif:{name:"serif",stack:'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',tailwind:"font-serif"},mono:{name:"mono",stack:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',tailwind:"font-mono"}},Wo={light:me.createFontWeight("light"),normal:me.createFontWeight("normal"),medium:me.createFontWeight("medium"),semibold:me.createFontWeight("semibold"),bold:me.createFontWeight("bold")},gt={h1:me.create("4xl","tight","bold"),h2:me.create("3xl","tight","bold"),h3:me.create("2xl","snug","semibold"),h4:me.create("xl","snug","semibold"),h5:me.create("lg","normal","medium"),h6:me.create("base","normal","medium"),body:me.create("base","relaxed","normal"),bodySmall:me.create("sm","relaxed","normal"),bodyLarge:me.create("lg","relaxed","normal"),label:me.create("sm","normal","medium"),caption:me.create("xs","normal","normal"),button:me.create("base","normal","medium")};function Ho(e){return gt[e]}function ce(e){const t=gt[e];return`${t.fontSize.tailwind} ${t.lineHeight.tailwind} ${t.fontWeight.tailwind}`}function re(e){return gt[e].fontSize.tailwind}function ye(e){return me.createFontSize(e).tailwind}function Pe(e){return gt[e].fontWeight.tailwind}function Mt(e){return me.createFontWeight(e).tailwind}function Uo(e){return gt[e].lineHeight.tailwind}const Bo=[50,100,200,300,400,500,600,700,800,900,950];function $(e,t,r){const s=qo(e),a=Go(e);return{hex:e,rgb:s,hsl:a,cssVar:`var(--color-${t}-${r})`,tailwind:`${t}-${r}`}}function qo(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?`${parseInt(t[1],16)}, ${parseInt(t[2],16)}, ${parseInt(t[3],16)}`:"0, 0, 0"}function Go(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)return"0, 0%, 0%";const r=parseInt(t[1],16)/255,s=parseInt(t[2],16)/255,a=parseInt(t[3],16)/255,o=Math.max(r,s,a),i=Math.min(r,s,a);let u=0,d=0;const c=(o+i)/2;if(o!==i){const f=o-i;switch(d=c>.5?f/(2-o-i):f/(o+i),o){case r:u=((s-a)/f+(s<a?6:0))/6;break;case s:u=((a-r)/f+2)/6;break;case a:u=((r-s)/f+4)/6;break}}return`${Math.round(u*360)}, ${Math.round(d*100)}%, ${Math.round(c*100)}%`}const Ze={50:$("#eef2ff","indigo",50),100:$("#e0e7ff","indigo",100),200:$("#c7d2fe","indigo",200),300:$("#a5b4fc","indigo",300),400:$("#818cf8","indigo",400),500:$("#6366f1","indigo",500),600:$("#4f46e5","indigo",600),700:$("#4338ca","indigo",700),800:$("#3730a3","indigo",800),900:$("#312e81","indigo",900),950:$("#1e1b4b","indigo",950)},et={50:$("#f5f3ff","violet",50),100:$("#ede9fe","violet",100),200:$("#ddd6fe","violet",200),300:$("#c4b5fd","violet",300),400:$("#a78bfa","violet",400),500:$("#8b5cf6","violet",500),600:$("#7c3aed","violet",600),700:$("#6d28d9","violet",700),800:$("#5b21b6","violet",800),900:$("#4c1d95","violet",900),950:$("#2e1065","violet",950)},tt={50:$("#ecfeff","cyan",50),100:$("#cffafe","cyan",100),200:$("#a5f3fc","cyan",200),300:$("#67e8f9","cyan",300),400:$("#22d3ee","cyan",400),500:$("#06b6d4","cyan",500),600:$("#0891b2","cyan",600),700:$("#0e7490","cyan",700),800:$("#155e75","cyan",800),900:$("#164e63","cyan",900),950:$("#083344","cyan",950)},rt={50:$("#f8fafc","slate",50),100:$("#f1f5f9","slate",100),200:$("#e2e8f0","slate",200),300:$("#cbd5e1","slate",300),400:$("#94a3b8","slate",400),500:$("#64748b","slate",500),600:$("#475569","slate",600),700:$("#334155","slate",700),800:$("#1e293b","slate",800),900:$("#0f172a","slate",900),950:$("#020617","slate",950)},Dn={50:$("#f9fafb","gray",50),100:$("#f3f4f6","gray",100),200:$("#e5e7eb","gray",200),300:$("#d1d5db","gray",300),400:$("#9ca3af","gray",400),500:$("#6b7280","gray",500),600:$("#4b5563","gray",600),700:$("#374151","gray",700),800:$("#1f2937","gray",800),900:$("#111827","gray",900),950:$("#030712","gray",950)},st={50:$("#ecfdf5","emerald",50),100:$("#d1fae5","emerald",100),200:$("#a7f3d0","emerald",200),300:$("#6ee7b7","emerald",300),400:$("#34d399","emerald",400),500:$("#10b981","emerald",500),600:$("#059669","emerald",600),700:$("#047857","emerald",700),800:$("#065f46","emerald",800),900:$("#064e3b","emerald",900),950:$("#022c22","emerald",950)},Fn={50:$("#f0fdf4","green",50),100:$("#dcfce7","green",100),200:$("#bbf7d0","green",200),300:$("#86efac","green",300),400:$("#4ade80","green",400),500:$("#22c55e","green",500),600:$("#16a34a","green",600),700:$("#15803d","green",700),800:$("#166534","green",800),900:$("#14532d","green",900),950:$("#052e16","green",950)},nt={50:$("#fffbeb","amber",50),100:$("#fef3c7","amber",100),200:$("#fde68a","amber",200),300:$("#fcd34d","amber",300),400:$("#fbbf24","amber",400),500:$("#f59e0b","amber",500),600:$("#d97706","amber",600),700:$("#b45309","amber",700),800:$("#92400e","amber",800),900:$("#78350f","amber",900),950:$("#451a03","amber",950)},Ln={50:$("#fefce8","yellow",50),100:$("#fef9c3","yellow",100),200:$("#fef08a","yellow",200),300:$("#fde047","yellow",300),400:$("#facc15","yellow",400),500:$("#eab308","yellow",500),600:$("#ca8a04","yellow",600),700:$("#a16207","yellow",700),800:$("#854d0e","yellow",800),900:$("#713f12","yellow",900),950:$("#422006","yellow",950)},_n={50:$("#fff7ed","orange",50),100:$("#ffedd5","orange",100),200:$("#fed7aa","orange",200),300:$("#fdba74","orange",300),400:$("#fb923c","orange",400),500:$("#f97316","orange",500),600:$("#ea580c","orange",600),700:$("#c2410c","orange",700),800:$("#9a3412","orange",800),900:$("#7c2d12","orange",900),950:$("#431407","orange",950)},at={50:$("#fff1f2","rose",50),100:$("#ffe4e6","rose",100),200:$("#fecdd3","rose",200),300:$("#fda4af","rose",300),400:$("#fb7185","rose",400),500:$("#f43f5e","rose",500),600:$("#e11d48","rose",600),700:$("#be123c","rose",700),800:$("#9f1239","rose",800),900:$("#881337","rose",900),950:$("#4c0519","rose",950)},Pn={50:$("#fef2f2","red",50),100:$("#fee2e2","red",100),200:$("#fecaca","red",200),300:$("#fca5a5","red",300),400:$("#f87171","red",400),500:$("#ef4444","red",500),600:$("#dc2626","red",600),700:$("#b91c1c","red",700),800:$("#991b1b","red",800),900:$("#7f1d1d","red",900),950:$("#450a0a","red",950)},ot={50:$("#f0f9ff","sky",50),100:$("#e0f2fe","sky",100),200:$("#bae6fd","sky",200),300:$("#7dd3fc","sky",300),400:$("#38bdf8","sky",400),500:$("#0ea5e9","sky",500),600:$("#0284c7","sky",600),700:$("#0369a1","sky",700),800:$("#075985","sky",800),900:$("#0c4a6e","sky",900),950:$("#082f49","sky",950)},zn={50:$("#eff6ff","blue",50),100:$("#dbeafe","blue",100),200:$("#bfdbfe","blue",200),300:$("#93c5fd","blue",300),400:$("#60a5fa","blue",400),500:$("#3b82f6","blue",500),600:$("#2563eb","blue",600),700:$("#1d4ed8","blue",700),800:$("#1e40af","blue",800),900:$("#1e3a8a","blue",900),950:$("#172554","blue",950)},On={50:$("#fdf4ff","fuchsia",50),100:$("#fae8ff","fuchsia",100),200:$("#f5d0fe","fuchsia",200),300:$("#f0abfc","fuchsia",300),400:$("#e879f9","fuchsia",400),500:$("#d946ef","fuchsia",500),600:$("#c026d3","fuchsia",600),700:$("#a21caf","fuchsia",700),800:$("#86198f","fuchsia",800),900:$("#701a75","fuchsia",900),950:$("#4a044e","fuchsia",950)},Vn={50:$("#fdf2f8","pink",50),100:$("#fce7f3","pink",100),200:$("#fbcfe8","pink",200),300:$("#f9a8d4","pink",300),400:$("#f472b6","pink",400),500:$("#ec4899","pink",500),600:$("#db2777","pink",600),700:$("#be185d","pink",700),800:$("#9d174d","pink",800),900:$("#831843","pink",900),950:$("#500724","pink",950)},Wn={50:$("#faf5ff","purple",50),100:$("#f3e8ff","purple",100),200:$("#e9d5ff","purple",200),300:$("#d8b4fe","purple",300),400:$("#c084fc","purple",400),500:$("#a855f7","purple",500),600:$("#9333ea","purple",600),700:$("#7e22ce","purple",700),800:$("#6b21a8","purple",800),900:$("#581c87","purple",900),950:$("#3b0764","purple",950)},Hn={50:$("#f0fdfa","teal",50),100:$("#ccfbf1","teal",100),200:$("#99f6e4","teal",200),300:$("#5eead4","teal",300),400:$("#2dd4bf","teal",400),500:$("#14b8a6","teal",500),600:$("#0d9488","teal",600),700:$("#0f766e","teal",700),800:$("#115e59","teal",800),900:$("#134e4a","teal",900),950:$("#042f2e","teal",950)},Un={50:$("#f7fee7","lime",50),100:$("#ecfccb","lime",100),200:$("#d9f99d","lime",200),300:$("#bef264","lime",300),400:$("#a3e635","lime",400),500:$("#84cc16","lime",500),600:$("#65a30d","lime",600),700:$("#4d7c0f","lime",700),800:$("#3f6212","lime",800),900:$("#365314","lime",900),950:$("#1a2e05","lime",950)},ds={indigo:Ze,violet:et,cyan:tt,slate:rt,gray:Dn,emerald:st,green:Fn,amber:nt,yellow:Ln,orange:_n,rose:at,red:Pn,sky:ot,blue:zn,fuchsia:On,pink:Vn,purple:Wn,teal:Hn,lime:Un};function Rt(e,t){return ds[e][t]}function Ko(e){return ds[e]}const qt={primary:{light:Ze[400],DEFAULT:Ze[500],dark:Ze[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:et[400],DEFAULT:et[500],dark:et[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:tt[400],DEFAULT:tt[500],dark:tt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},success:{light:st[400],DEFAULT:st[500],dark:st[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},warning:{light:nt[400],DEFAULT:nt[500],dark:nt[600],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:at[400],DEFAULT:at[500],dark:at[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:ot[400],DEFAULT:ot[500],dark:ot[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:rt[100],DEFAULT:rt[500],dark:rt[700],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},vr={primary:{light:Ze[500],DEFAULT:Ze[400],dark:Ze[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:et[500],DEFAULT:et[400],dark:et[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:tt[500],DEFAULT:tt[400],dark:tt[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},success:{light:st[500],DEFAULT:st[400],dark:st[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},warning:{light:nt[500],DEFAULT:nt[400],dark:nt[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:at[500],DEFAULT:at[400],dark:at[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:ot[500],DEFAULT:ot[400],dark:ot[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:rt[700],DEFAULT:rt[400],dark:rt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},Yo=qt;function Ht(e,t="DEFAULT",r="light"){return(r==="dark"?vr:qt)[e][t]}function Xo(e,t="light"){return(t==="dark"?vr:qt)[e]}function Jo(e,t,r={}){const{format:s="hex",opacity:a}=r,o=Rt(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;case"hex":default:i=o.hex}return i}function Qo(e,t="DEFAULT",r={}){const{format:s="hex",opacity:a}=r,o=Ht(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;case"hex":default:i=o.hex}return i}function Zo(e,t,r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,u=Rt(e,t),c=[`${s}-${u.tailwind}`];return a&&c.push(`hover:${s}-${u.tailwind}`),o&&c.push(`focus:${s}-${u.tailwind}`),i&&c.push(`active:${s}-${u.tailwind}`),c.join(" ")}function ei(e,t="DEFAULT",r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,u=Ht(e,t),c=[`${s}-${u.tailwind}`];if(a){const f=Ht(e,t==="DEFAULT"?"dark":"DEFAULT");c.push(`hover:${s}-${f.tailwind}`)}if(o&&c.push(`focus:${s}-${u.tailwind}`),i){const f=Ht(e,"dark");c.push(`active:${s}-${f.tailwind}`)}return c.join(" ")}function ti(e,t,r="bg"){const s=Rt(e,t);return`hover:${r}-${s.tailwind}`}function ri(e,t,r="border"){const s=Rt(e,t);return`focus:${r}-${s.tailwind}`}function si(e,t){return`focus:ring-${Rt(e,t).tailwind}`}function ni(e,t){return`rgba(${e.rgb}, ${t})`}function Bn(e){const t=rs(e);return t?.299*t[0]+.587*t[1]+.114*t[2]>128:!0}function ai(e){return Bn(e)?"#000000":"#ffffff"}function rs(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null}function us(e,t,r=.5){const s=rs(e),a=rs(t);if(!s||!a)return e;const o=Math.round(s[0]*(1-r)+a[0]*r),i=Math.round(s[1]*(1-r)+a[1]*r),u=Math.round(s[2]*(1-r)+a[2]*r);return`#${((1<<24)+(o<<16)+(i<<8)+u).toString(16).slice(1)}`}function oi(e,t){return us(e,"#ffffff",t/100)}function ii(e,t){return us(e,"#000000",t/100)}const li={primary:{name:"indigo",light:400,default:500,dark:600},secondary:{name:"violet",light:400,default:500,dark:600},accent:{name:"cyan",light:400,default:500,dark:600}};class Ct{static create(t){const s={sm:{minWidth:640,tailwind:"sm"},md:{minWidth:768,tailwind:"md"},lg:{minWidth:1024,tailwind:"lg"},xl:{minWidth:1280,tailwind:"xl"},"2xl":{minWidth:1536,tailwind:"2xl"}}[t];return{name:t,minWidth:s.minWidth,px:`${s.minWidth}px`,rem:`${s.minWidth/16}rem`,tailwind:s.tailwind}}}const yr={sm:Ct.create("sm"),md:Ct.create("md"),lg:Ct.create("lg"),xl:Ct.create("xl"),"2xl":Ct.create("2xl")};function ci(e){return yr[e]}function di(e,t="min"){const r=yr[e];return`@media (${t==="min"?"min-width":"max-width"}: ${r.px})`}function qn(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=qn(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function Gn(){for(var e,t,r=0,s="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=qn(e))&&(s&&(s+=" "),s+=t);return s}const ui=(e,t)=>{const r=new Array(e.length+t.length);for(let s=0;s<e.length;s++)r[s]=e[s];for(let s=0;s<t.length;s++)r[e.length+s]=t[s];return r},fi=(e,t)=>({classGroupId:e,validator:t}),Kn=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),cr="-",hn=[],mi="arbitrary..",pi=e=>{const t=bi(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return hi(i);const u=i.split(cr),d=u[0]===""&&u.length>1?1:0;return Yn(u,d,t)},getConflictingClassGroupIds:(i,u)=>{if(u){const d=s[i],c=r[i];return d?c?ui(c,d):d:c||hn}return r[i]||hn}}},Yn=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const a=e[t],o=r.nextPart.get(a);if(o){const c=Yn(e,t+1,o);if(c)return c}const i=r.validators;if(i===null)return;const u=t===0?e.join(cr):e.slice(t).join(cr),d=i.length;for(let c=0;c<d;c++){const f=i[c];if(f.validator(u))return f.classGroupId}},hi=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),s=t.slice(0,r);return s?mi+s:void 0})(),bi=e=>{const{theme:t,classGroups:r}=e;return gi(r,t)},gi=(e,t)=>{const r=Kn();for(const s in e){const a=e[s];fs(a,r,s,t)}return r},fs=(e,t,r,s)=>{const a=e.length;for(let o=0;o<a;o++){const i=e[o];xi(i,t,r,s)}},xi=(e,t,r,s)=>{if(typeof e=="string"){vi(e,t,r);return}if(typeof e=="function"){yi(e,t,r,s);return}wi(e,t,r,s)},vi=(e,t,r)=>{const s=e===""?t:Xn(t,e);s.classGroupId=r},yi=(e,t,r,s)=>{if(ki(e)){fs(e(s),t,r,s);return}t.validators===null&&(t.validators=[]),t.validators.push(fi(r,e))},wi=(e,t,r,s)=>{const a=Object.entries(e),o=a.length;for(let i=0;i<o;i++){const[u,d]=a[i];fs(d,Xn(t,u),r,s)}},Xn=(e,t)=>{let r=e;const s=t.split(cr),a=s.length;for(let o=0;o<a;o++){const i=s[o];let u=r.nextPart.get(i);u||(u=Kn(),r.nextPart.set(i,u)),r=u}return r},ki=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,ji=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),s=Object.create(null);const a=(o,i)=>{r[o]=i,t++,t>e&&(t=0,s=r,r=Object.create(null))};return{get(o){let i=r[o];if(i!==void 0)return i;if((i=s[o])!==void 0)return a(o,i),i},set(o,i){o in r?r[o]=i:a(o,i)}}},ss="!",bn=":",Ni=[],gn=(e,t,r,s,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:s,isExternal:a}),Si=e=>{const{prefix:t,experimentalParseClassName:r}=e;let s=a=>{const o=[];let i=0,u=0,d=0,c;const f=a.length;for(let v=0;v<f;v++){const y=a[v];if(i===0&&u===0){if(y===bn){o.push(a.slice(d,v)),d=v+1;continue}if(y==="/"){c=v;continue}}y==="["?i++:y==="]"?i--:y==="("?u++:y===")"&&u--}const p=o.length===0?a:a.slice(d);let m=p,h=!1;p.endsWith(ss)?(m=p.slice(0,-1),h=!0):p.startsWith(ss)&&(m=p.slice(1),h=!0);const x=c&&c>d?c-d:void 0;return gn(o,h,m,x)};if(t){const a=t+bn,o=s;s=i=>i.startsWith(a)?o(i.slice(a.length)):gn(Ni,!1,i,void 0,!0)}if(r){const a=s;s=o=>r({className:o,parseClassName:a})}return s},Ci=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,s)=>{t.set(r,1e6+s)}),r=>{const s=[];let a=[];for(let o=0;o<r.length;o++){const i=r[o],u=i[0]==="[",d=t.has(i);u||d?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(i)):a.push(i)}return a.length>0&&(a.sort(),s.push(...a)),s}},$i=e=>T({cache:ji(e.cacheSize),parseClassName:Si(e),sortModifiers:Ci(e)},pi(e)),Ei=/\s+/,Mi=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:o}=t,i=[],u=e.trim().split(Ei);let d="";for(let c=u.length-1;c>=0;c-=1){const f=u[c],{isExternal:p,modifiers:m,hasImportantModifier:h,baseClassName:x,maybePostfixModifierPosition:v}=r(f);if(p){d=f+(d.length>0?" "+d:d);continue}let y=!!v,b=s(y?x.substring(0,v):x);if(!b){if(!y){d=f+(d.length>0?" "+d:d);continue}if(b=s(x),!b){d=f+(d.length>0?" "+d:d);continue}y=!1}const w=m.length===0?"":m.length===1?m[0]:o(m).join(":"),C=h?w+ss:w,g=C+b;if(i.indexOf(g)>-1)continue;i.push(g);const j=a(b,y);for(let N=0;N<j.length;++N){const L=j[N];i.push(C+L)}d=f+(d.length>0?" "+d:d)}return d},Ti=(...e)=>{let t=0,r,s,a="";for(;t<e.length;)(r=e[t++])&&(s=Jn(r))&&(a&&(a+=" "),a+=s);return a},Jn=e=>{if(typeof e=="string")return e;let t,r="";for(let s=0;s<e.length;s++)e[s]&&(t=Jn(e[s]))&&(r&&(r+=" "),r+=t);return r},Ai=(e,...t)=>{let r,s,a,o;const i=d=>{const c=t.reduce((f,p)=>p(f),e());return r=$i(c),s=r.cache.get,a=r.cache.set,o=u,u(d)},u=d=>{const c=s(d);if(c)return c;const f=Mi(d,r);return a(d,f),f};return o=i,(...d)=>o(Ti(...d))},Ri=[],pe=e=>{const t=r=>r[e]||Ri;return t.isThemeGetter=!0,t},Qn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Zn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ii=/^\d+\/\d+$/,Di=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Fi=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Li=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_i=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jt=e=>Ii.test(e),te=e=>!!e&&!Number.isNaN(Number(e)),Ke=e=>!!e&&Number.isInteger(Number(e)),qr=e=>e.endsWith("%")&&te(e.slice(0,-1)),We=e=>Di.test(e),zi=()=>!0,Oi=e=>Fi.test(e)&&!Li.test(e),ea=()=>!1,Vi=e=>_i.test(e),Wi=e=>Pi.test(e),Hi=e=>!B(e)&&!q(e),Ui=e=>It(e,sa,ea),B=e=>Qn.test(e),ft=e=>It(e,na,Oi),Gr=e=>It(e,Yi,te),xn=e=>It(e,ta,ea),Bi=e=>It(e,ra,Wi),sr=e=>It(e,aa,Vi),q=e=>Zn.test(e),_t=e=>Dt(e,na),qi=e=>Dt(e,Xi),vn=e=>Dt(e,ta),Gi=e=>Dt(e,sa),Ki=e=>Dt(e,ra),nr=e=>Dt(e,aa,!0),It=(e,t,r)=>{const s=Qn.exec(e);return s?s[1]?t(s[1]):r(s[2]):!1},Dt=(e,t,r=!1)=>{const s=Zn.exec(e);return s?s[1]?t(s[1]):r:!1},ta=e=>e==="position"||e==="percentage",ra=e=>e==="image"||e==="url",sa=e=>e==="length"||e==="size"||e==="bg-size",na=e=>e==="length",Yi=e=>e==="number",Xi=e=>e==="family-name",aa=e=>e==="shadow",Ji=()=>{const e=pe("color"),t=pe("font"),r=pe("text"),s=pe("font-weight"),a=pe("tracking"),o=pe("leading"),i=pe("breakpoint"),u=pe("container"),d=pe("spacing"),c=pe("radius"),f=pe("shadow"),p=pe("inset-shadow"),m=pe("text-shadow"),h=pe("drop-shadow"),x=pe("blur"),v=pe("perspective"),y=pe("aspect"),b=pe("ease"),w=pe("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],g=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...g(),q,B],N=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],S=()=>[q,B,d],D=()=>[jt,"full","auto",...S()],A=()=>[Ke,"none","subgrid",q,B],M=()=>["auto",{span:["full",Ke,q,B]},Ke,q,B],F=()=>[Ke,"auto",q,B],I=()=>["auto","min","max","fr",q,B],R=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...S()],H=()=>[jt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],U=()=>[e,q,B],oe=()=>[...g(),vn,xn,{position:[q,B]}],ne=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",Gi,Ui,{size:[q,B]}],G=()=>[qr,_t,ft],Y=()=>["","none","full",c,q,B],Q=()=>["",te,_t,ft],le=()=>["solid","dashed","dotted","double"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>[te,qr,vn,xn],V=()=>["","none",x,q,B],X=()=>["none",te,q,B],ae=()=>["none",te,q,B],fe=()=>[te,q,B],ke=()=>[jt,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[We],breakpoint:[We],color:[zi],container:[We],"drop-shadow":[We],ease:["in","out","in-out"],font:[Hi],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[We],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[We],shadow:[We],spacing:["px",te],text:[We],"text-shadow":[We],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",jt,B,q,y]}],container:["container"],columns:[{columns:[te,B,q,u]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:j()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{start:D()}],end:[{end:D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Ke,"auto",q,B]}],basis:[{basis:[jt,"full","auto",u,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[te,jt,"auto","initial","none",B]}],grow:[{grow:["",te,q,B]}],shrink:[{shrink:["",te,q,B]}],order:[{order:[Ke,"first","last","none",q,B]}],"grid-cols":[{"grid-cols":A()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":A()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":I()}],"auto-rows":[{"auto-rows":I()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...R(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...R()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":R()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[u,"screen",...H()]}],"min-w":[{"min-w":[u,"screen","none",...H()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[i]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",r,_t,ft]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,q,Gr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qr,B]}],"font-family":[{font:[qi,B,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,q,B]}],"line-clamp":[{"line-clamp":[te,"none",q,Gr]}],leading:[{leading:[o,...S()]}],"list-image":[{"list-image":["none",q,B]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",q,B]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:[te,"from-font","auto",q,ft]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[te,"auto",q,B]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",q,B]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",q,B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ke,q,B],radial:["",q,B],conic:[Ke,q,B]},Ki,Bi]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...le(),"hidden","none"]}],"divide-style":[{divide:[...le(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...le(),"none","hidden"]}],"outline-offset":[{"outline-offset":[te,q,B]}],"outline-w":[{outline:["",te,_t,ft]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",f,nr,sr]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",p,nr,sr]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[te,ft]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",m,nr,sr]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[te,q,B]}],"mix-blend":[{"mix-blend":[...se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[te]}],"mask-image-linear-from-pos":[{"mask-linear-from":_()}],"mask-image-linear-to-pos":[{"mask-linear-to":_()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":_()}],"mask-image-t-to-pos":[{"mask-t-to":_()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":_()}],"mask-image-r-to-pos":[{"mask-r-to":_()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":_()}],"mask-image-b-to-pos":[{"mask-b-to":_()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":_()}],"mask-image-l-to-pos":[{"mask-l-to":_()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":_()}],"mask-image-x-to-pos":[{"mask-x-to":_()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":_()}],"mask-image-y-to-pos":[{"mask-y-to":_()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[q,B]}],"mask-image-radial-from-pos":[{"mask-radial-from":_()}],"mask-image-radial-to-pos":[{"mask-radial-to":_()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":g()}],"mask-image-conic-pos":[{"mask-conic":[te]}],"mask-image-conic-from-pos":[{"mask-conic-from":_()}],"mask-image-conic-to-pos":[{"mask-conic-to":_()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",q,B]}],filter:[{filter:["","none",q,B]}],blur:[{blur:V()}],brightness:[{brightness:[te,q,B]}],contrast:[{contrast:[te,q,B]}],"drop-shadow":[{"drop-shadow":["","none",h,nr,sr]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",te,q,B]}],"hue-rotate":[{"hue-rotate":[te,q,B]}],invert:[{invert:["",te,q,B]}],saturate:[{saturate:[te,q,B]}],sepia:[{sepia:["",te,q,B]}],"backdrop-filter":[{"backdrop-filter":["","none",q,B]}],"backdrop-blur":[{"backdrop-blur":V()}],"backdrop-brightness":[{"backdrop-brightness":[te,q,B]}],"backdrop-contrast":[{"backdrop-contrast":[te,q,B]}],"backdrop-grayscale":[{"backdrop-grayscale":["",te,q,B]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[te,q,B]}],"backdrop-invert":[{"backdrop-invert":["",te,q,B]}],"backdrop-opacity":[{"backdrop-opacity":[te,q,B]}],"backdrop-saturate":[{"backdrop-saturate":[te,q,B]}],"backdrop-sepia":[{"backdrop-sepia":["",te,q,B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",q,B]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[te,"initial",q,B]}],ease:[{ease:["linear","initial",b,q,B]}],delay:[{delay:[te,q,B]}],animate:[{animate:["none",w,q,B]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,q,B]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:X()}],"rotate-x":[{"rotate-x":X()}],"rotate-y":[{"rotate-y":X()}],"rotate-z":[{"rotate-z":X()}],scale:[{scale:ae()}],"scale-x":[{"scale-x":ae()}],"scale-y":[{"scale-y":ae()}],"scale-z":[{"scale-z":ae()}],"scale-3d":["scale-3d"],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[q,B,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ke()}],"translate-x":[{"translate-x":ke()}],"translate-y":[{"translate-y":ke()}],"translate-z":[{"translate-z":ke()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",q,B]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",q,B]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[te,_t,ft,Gr]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Qi=Ai(Ji);function k(...e){return Qi(Gn(e))}const yn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,wn=Gn,Zi=(e,t)=>r=>{var s;if((t==null?void 0:t.variants)==null)return wn(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(c=>{const f=r==null?void 0:r[c],p=o==null?void 0:o[c];if(f===null)return null;const m=yn(f)||yn(p);return a[c][m]}),u=r&&Object.entries(r).reduce((c,f)=>{let[p,m]=f;return m===void 0||(c[p]=m),c},{}),d=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((c,f)=>{let x=f,{class:p,className:m}=x,h=O(x,["class","className"]);return Object.entries(h).every(v=>{let[y,b]=v;return Array.isArray(b)?b.includes(T(T({},o),u)[y]):T(T({},o),u)[y]===b})?[...c,p,m]:c},[]);return wn(e,i,d,r==null?void 0:r.class,r==null?void 0:r.className)},ve=(e,t)=>{const r=Zi(e,t);return(s=>{const a=r(s);return k(a)})};class Ae{static create(t,r="ease-in-out"){const s={fast:{value:"150ms",ms:150,tailwind:"duration-150"},base:{value:"200ms",ms:200,tailwind:"duration-200"},slow:{value:"300ms",ms:300,tailwind:"duration-300"},slower:{value:"500ms",ms:500,tailwind:"duration-500"}},a={"ease-in":{value:"cubic-bezier(0.4, 0, 1, 1)",tailwind:"ease-in",description:"Slow start, fast end"},"ease-out":{value:"cubic-bezier(0, 0, 0.2, 1)",tailwind:"ease-out",description:"Fast start, slow end"},"ease-in-out":{value:"cubic-bezier(0.4, 0, 0.2, 1)",tailwind:"ease-in-out",description:"Slow start and end, fast middle"},spring:{value:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",tailwind:"ease-[cubic-bezier(0.68,-0.55,0.265,1.55)]",description:"Spring-like bounce effect"}};return{duration:s[t],easing:a[r]}}static createTransition(t,r="base",s="ease-in-out"){const a=this.create(r,s),o=Array.isArray(t)?t.join(", "):t,i=[a.duration.tailwind,a.easing.tailwind].join(" ");return{property:o,duration:a.duration.value,timingFunction:a.easing.value,tailwind:i}}}const el={fast:Ae.create("fast"),base:Ae.create("base"),slow:Ae.create("slow"),slower:Ae.create("slower"),colors:Ae.createTransition(["color","background-color","border-color"],"base"),opacity:Ae.createTransition("opacity","fast"),transform:Ae.createTransition("transform","base"),all:Ae.createTransition("all","base")};function tl(e,t){return Ae.create(e,t)}function be(e,t="ease-in-out"){const r=Ae.create(e,t);return`${r.duration.tailwind} ${r.easing.tailwind}`}function rl(e,t="base",r="ease-in-out"){return Ae.createTransition(e,t,r).tailwind}class Te{static create(t){return{base:{value:0,tailwind:"z-0",description:"Base layer for normal content"},dropdown:{value:1e3,tailwind:"z-[1000]",description:"Dropdown menus and select options"},sticky:{value:1020,tailwind:"z-[1020]",description:"Sticky headers and navigation"},fixed:{value:1030,tailwind:"z-[1030]",description:"Fixed position elements"},"modal-backdrop":{value:1040,tailwind:"z-[1040]",description:"Modal backdrop/overlay"},modal:{value:1050,tailwind:"z-[1050]",description:"Modal dialogs and drawers"},popover:{value:1060,tailwind:"z-[1060]",description:"Popovers and tooltips"},tooltip:{value:1070,tailwind:"z-[1070]",description:"Tooltips (highest priority)"},toast:{value:1080,tailwind:"z-[1080]",description:"Toast notifications (highest priority)"}}[t]}}const kn={base:Te.create("base"),dropdown:Te.create("dropdown"),sticky:Te.create("sticky"),fixed:Te.create("fixed"),"modal-backdrop":Te.create("modal-backdrop"),modal:Te.create("modal"),popover:Te.create("popover"),tooltip:Te.create("tooltip"),toast:Te.create("toast")};function sl(e){return Te.create(e)}function ue(e){return Te.create(e).tailwind}class xe{static create(t){const r=t/100,s={0:"Fully transparent",5:"Very light overlay",10:"Light overlay",20:"Subtle overlay",25:"Quarter opacity",30:"Light background",40:"Semi-transparent",50:"Half opacity",60:"Semi-opaque",70:"Mostly opaque",75:"Three-quarter opacity",80:"High opacity",90:"Very high opacity",95:"Nearly opaque",100:"Fully opaque"};return{value:t,decimal:r,tailwind:{0:"opacity-0",5:"opacity-5",10:"opacity-10",20:"opacity-20",25:"opacity-25",30:"opacity-30",40:"opacity-40",50:"opacity-50",60:"opacity-60",70:"opacity-70",75:"opacity-75",80:"opacity-80",90:"opacity-90",95:"opacity-95",100:"opacity-100"}[t],description:s[t]}}}xe.create(0),xe.create(5),xe.create(10),xe.create(20),xe.create(25),xe.create(30),xe.create(40),xe.create(50),xe.create(60),xe.create(70),xe.create(75),xe.create(80),xe.create(90),xe.create(95),xe.create(100);function nl(e){return xe.create(e)}function al(e){return xe.create(e).tailwind}var ar={exports:{}},Pt={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var jn;function ol(){if(jn)return Pt;jn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(s,a,o){var i=null;if(o!==void 0&&(i=""+o),a.key!==void 0&&(i=""+a.key),"key"in a){o={};for(var u in a)u!=="key"&&(o[u]=a[u])}else o=a;return a=o.ref,{$$typeof:e,type:s,key:i,ref:a!==void 0?a:null,props:o}}return Pt.Fragment=t,Pt.jsx=r,Pt.jsxs=r,Pt}var zt={};/**
10
- * @license React
11
- * react-jsx-runtime.development.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Nn;function il(){return Nn||(Nn=1,process.env.NODE_ENV!=="production"&&(function(){function e(P){if(P==null)return null;if(typeof P=="function")return P.$$typeof===M?null:P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case y:return"Fragment";case w:return"Profiler";case b:return"StrictMode";case N:return"Suspense";case L:return"SuspenseList";case A:return"Activity"}if(typeof P=="object")switch(typeof P.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),P.$$typeof){case v:return"Portal";case g:return P.displayName||"Context";case C:return(P._context.displayName||"Context")+".Consumer";case j:var G=P.render;return P=P.displayName,P||(P=G.displayName||G.name||"",P=P!==""?"ForwardRef("+P+")":"ForwardRef"),P;case S:return G=P.displayName||null,G!==null?G:e(P.type)||"Memo";case D:G=P._payload,P=P._init;try{return e(P(G))}catch(Y){}}return null}function t(P){return""+P}function r(P){try{var G=!1}catch(le){G=!0}if(G){G=console;var Y=G.error,Q=typeof Symbol=="function"&&Symbol.toStringTag&&P[Symbol.toStringTag]||P.constructor.name||"Object";return Y.call(G,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Q),t(P)}}function s(P){if(P===y)return"<>";if(typeof P=="object"&&P!==null&&P.$$typeof===D)return"<...>";try{var G=e(P);return G?"<"+G+">":"<...>"}catch(Y){return"<...>"}}function a(){var P=F.A;return P===null?null:P.getOwner()}function o(){return Error("react-stack-top-frame")}function i(P){if(I.call(P,"key")){var G=Object.getOwnPropertyDescriptor(P,"key").get;if(G&&G.isReactWarning)return!1}return P.key!==void 0}function u(P,G){function Y(){K||(K=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",G))}Y.isReactWarning=!0,Object.defineProperty(P,"key",{get:Y,configurable:!0})}function d(){var P=e(this.type);return H[P]||(H[P]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),P=this.props.ref,P!==void 0?P:null}function c(P,G,Y,Q,le,se){var _=Y.ref;return P={$$typeof:x,type:P,key:G,props:Y,_owner:Q},(_!==void 0?_:null)!==null?Object.defineProperty(P,"ref",{enumerable:!1,get:d}):Object.defineProperty(P,"ref",{enumerable:!1,value:null}),P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(P,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(P,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.defineProperty(P,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P}function f(P,G,Y,Q,le,se){var _=G.children;if(_!==void 0)if(Q)if(R(_)){for(Q=0;Q<_.length;Q++)p(_[Q]);Object.freeze&&Object.freeze(_)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else p(_);if(I.call(G,"key")){_=e(P);var V=Object.keys(G).filter(function(ae){return ae!=="key"});Q=0<V.length?"{key: someKey, "+V.join(": ..., ")+": ...}":"{key: someKey}",ne[_+Q]||(V=0<V.length?"{"+V.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
1
+ "use strict";var Go=Object.defineProperty,Ko=Object.defineProperties;var Yo=Object.getOwnPropertyDescriptors;var er=Object.getOwnPropertySymbols;var hn=Object.prototype.hasOwnProperty,gn=Object.prototype.propertyIsEnumerable;var Kr=(e,t,r)=>t in e?Go(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t)=>{for(var r in t||(t={}))hn.call(t,r)&&Kr(e,r,t[r]);if(er)for(var r of er(t))gn.call(t,r)&&Kr(e,r,t[r]);return e},P=(e,t)=>Ko(e,Yo(t));var W=(e,t)=>{var r={};for(var s in e)hn.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&er)for(var s of er(e))t.indexOf(s)<0&&gn.call(e,s)&&(r[s]=e[s]);return r};var xn=(e,t,r)=>Kr(e,typeof t!="symbol"?t+"":t,r);var tr=(e,t,r)=>new Promise((s,a)=>{var o=u=>{try{c(r.next(u))}catch(d){a(d)}},i=u=>{try{c(r.throw(u))}catch(d){a(d)}},c=u=>u.done?s(u.value):Promise.resolve(u.value).then(o,i);c((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),Ke=require("react-dom"),tt={icon:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},text:{xs:"text-xs",sm:"text-sm",base:"text-base"},spacing:{itemPaddingX:"px-4",itemPaddingY:"py-2",nestedIndent:"pl-6",nestedIndentLevel2:"pl-10",nestedIndentLevel3:"pl-14",groupTitlePadding:"px-4 py-2",iconMargin:"mr-3"},colors:{active:{bg:"bg-surface-brand-muted",text:"text-fg-brand-emphasis",border:"border-line-brand"},inactive:{text:"text-fg-secondary",hover:"hover:bg-surface-hover hover:text-fg-primary"},groupTitle:"text-fg-tertiary"},chevron:{size:"h-3 w-3",color:"text-fg-quaternary"},navigation:{width:{default:"56px",compact:"48px",expanded:"200px"},background:{default:"#fafafa",hover:"#f5f5f5"}},split:{transition:"transition-all duration-300",collapsedWidth:"0px"},content:{scrollbar:{width:"thin",color:{thumb:"#cbd5e1",track:"#f1f5f9"}}}};function qo(e){return e<=0?tt.spacing.itemPaddingX:e===1?tt.spacing.nestedIndent:e===2?tt.spacing.nestedIndentLevel2:e===3?tt.spacing.nestedIndentLevel3:`pl-${4+e*4}`}class ge{static create(t){const r=t*this.BASE_UNIT,s=r/16;return{value:r,rem:`${s}rem`,px:`${r}px`,tailwind:this.getTailwindClass(t)}}static getTailwindClass(t){return{0:"0",.5:"0.5",1:"1",1.5:"1.5",2:"2",2.5:"2.5",3:"3",3.5:"3.5",4:"4",5:"5",6:"6",8:"8",10:"10",12:"12",16:"16",20:"20",24:"24",32:"32",40:"40",48:"48",64:"64",80:"80",96:"96"}[t]||String(t)}}xn(ge,"BASE_UNIT",4);const gr={none:ge.create(0),"0.5":ge.create(.5),xs:ge.create(1),"1.5":ge.create(1.5),sm:ge.create(2),"2.5":ge.create(2.5),md:ge.create(3),"3.5":ge.create(3.5),base:ge.create(4),lg:ge.create(6),xl:ge.create(8),"2xl":ge.create(10),"3xl":ge.create(12),"4xl":ge.create(16),"5xl":ge.create(20),"6xl":ge.create(24)};function Xo(e){return gr[e]}function m(e,t="p"){const s=gr[e].tailwind;return`${{p:"p",m:"m",px:"px",mx:"mx",py:"py",my:"my",pt:"pt",mt:"mt",pr:"pr",mr:"mr",pb:"pb",mb:"mb",pl:"pl",ml:"ml",gap:"gap","gap-x":"gap-x","gap-y":"gap-y","space-x":"space-x","space-y":"space-y"}[t]}-${s}`}class pe{static createFontSize(t){const s={"2xs":{px:10,tailwind:"text-2xs"},xs:{px:12,tailwind:"text-xs"},sm:{px:14,tailwind:"text-sm"},base:{px:16,tailwind:"text-base"},lg:{px:18,tailwind:"text-lg"},xl:{px:20,tailwind:"text-xl"},"2xl":{px:24,tailwind:"text-2xl"},"3xl":{px:30,tailwind:"text-3xl"},"4xl":{px:36,tailwind:"text-4xl"},"5xl":{px:48,tailwind:"text-5xl"},"6xl":{px:60,tailwind:"text-6xl"}}[t];return{value:s.px,rem:`${s.px/16}rem`,px:`${s.px}px`,tailwind:s.tailwind}}static createLineHeight(t){const s={none:{value:1,tailwind:"leading-none"},tight:{value:1.25,tailwind:"leading-tight"},snug:{value:1.375,tailwind:"leading-snug"},normal:{value:1.5,tailwind:"leading-normal"},relaxed:{value:1.625,tailwind:"leading-relaxed"},loose:{value:2,tailwind:"leading-loose"}}[t];return{value:s.value,tailwind:s.tailwind}}static createFontWeight(t){const s={light:{value:300,tailwind:"font-light"},normal:{value:400,tailwind:"font-normal"},medium:{value:500,tailwind:"font-medium"},semibold:{value:600,tailwind:"font-semibold"},bold:{value:700,tailwind:"font-bold"}}[t];return{value:s.value,tailwind:s.tailwind}}static create(t,r="normal",s="normal"){return{fontSize:this.createFontSize(t),lineHeight:this.createLineHeight(r),fontWeight:this.createFontWeight(s)}}}const Jo={sans:{name:"sans",stack:'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif',tailwind:"font-sans"},serif:{name:"serif",stack:'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',tailwind:"font-serif"},mono:{name:"mono",stack:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',tailwind:"font-mono"}},Qo={light:pe.createFontWeight("light"),normal:pe.createFontWeight("normal"),medium:pe.createFontWeight("medium"),semibold:pe.createFontWeight("semibold"),bold:pe.createFontWeight("bold")},vt={h1:pe.create("4xl","tight","bold"),h2:pe.create("3xl","tight","bold"),h3:pe.create("2xl","snug","semibold"),h4:pe.create("xl","snug","semibold"),h5:pe.create("lg","normal","medium"),h6:pe.create("base","normal","medium"),body:pe.create("base","relaxed","normal"),bodySmall:pe.create("sm","relaxed","normal"),bodyLarge:pe.create("lg","relaxed","normal"),label:pe.create("sm","normal","medium"),caption:pe.create("xs","normal","normal"),button:pe.create("base","normal","medium")};function Zo(e){return vt[e]}function de(e){const t=vt[e];return`${t.fontSize.tailwind} ${t.lineHeight.tailwind} ${t.fontWeight.tailwind}`}function se(e){return vt[e].fontSize.tailwind}function je(e){return pe.createFontSize(e).tailwind}function Pe(e){return vt[e].fontWeight.tailwind}function At(e){return pe.createFontWeight(e).tailwind}function ei(e){return vt[e].lineHeight.tailwind}const ti=[50,100,200,300,400,500,600,700,800,900,950];function E(e,t,r){const s=ri(e),a=si(e);return{hex:e,rgb:s,hsl:a,cssVar:`var(--color-${t}-${r})`,tailwind:`${t}-${r}`}}function ri(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?`${parseInt(t[1],16)}, ${parseInt(t[2],16)}, ${parseInt(t[3],16)}`:"0, 0, 0"}function si(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)return"0, 0%, 0%";const r=parseInt(t[1],16)/255,s=parseInt(t[2],16)/255,a=parseInt(t[3],16)/255,o=Math.max(r,s,a),i=Math.min(r,s,a);let c=0,u=0;const d=(o+i)/2;if(o!==i){const f=o-i;switch(u=d>.5?f/(2-o-i):f/(o+i),o){case r:c=((s-a)/f+(s<a?6:0))/6;break;case s:c=((a-r)/f+2)/6;break;case a:c=((r-s)/f+4)/6;break}}return`${Math.round(c*360)}, ${Math.round(u*100)}%, ${Math.round(d*100)}%`}const rt={50:E("#eef2ff","indigo",50),100:E("#e0e7ff","indigo",100),200:E("#c7d2fe","indigo",200),300:E("#a5b4fc","indigo",300),400:E("#818cf8","indigo",400),500:E("#6366f1","indigo",500),600:E("#4f46e5","indigo",600),700:E("#4338ca","indigo",700),800:E("#3730a3","indigo",800),900:E("#312e81","indigo",900),950:E("#1e1b4b","indigo",950)},st={50:E("#f5f3ff","violet",50),100:E("#ede9fe","violet",100),200:E("#ddd6fe","violet",200),300:E("#c4b5fd","violet",300),400:E("#a78bfa","violet",400),500:E("#8b5cf6","violet",500),600:E("#7c3aed","violet",600),700:E("#6d28d9","violet",700),800:E("#5b21b6","violet",800),900:E("#4c1d95","violet",900),950:E("#2e1065","violet",950)},nt={50:E("#ecfeff","cyan",50),100:E("#cffafe","cyan",100),200:E("#a5f3fc","cyan",200),300:E("#67e8f9","cyan",300),400:E("#22d3ee","cyan",400),500:E("#06b6d4","cyan",500),600:E("#0891b2","cyan",600),700:E("#0e7490","cyan",700),800:E("#155e75","cyan",800),900:E("#164e63","cyan",900),950:E("#083344","cyan",950)},at={50:E("#f8fafc","slate",50),100:E("#f1f5f9","slate",100),200:E("#e2e8f0","slate",200),300:E("#cbd5e1","slate",300),400:E("#94a3b8","slate",400),500:E("#64748b","slate",500),600:E("#475569","slate",600),700:E("#334155","slate",700),800:E("#1e293b","slate",800),900:E("#0f172a","slate",900),950:E("#020617","slate",950)},On={50:E("#f9fafb","gray",50),100:E("#f3f4f6","gray",100),200:E("#e5e7eb","gray",200),300:E("#d1d5db","gray",300),400:E("#9ca3af","gray",400),500:E("#6b7280","gray",500),600:E("#4b5563","gray",600),700:E("#374151","gray",700),800:E("#1f2937","gray",800),900:E("#111827","gray",900),950:E("#030712","gray",950)},ot={50:E("#ecfdf5","emerald",50),100:E("#d1fae5","emerald",100),200:E("#a7f3d0","emerald",200),300:E("#6ee7b7","emerald",300),400:E("#34d399","emerald",400),500:E("#10b981","emerald",500),600:E("#059669","emerald",600),700:E("#047857","emerald",700),800:E("#065f46","emerald",800),900:E("#064e3b","emerald",900),950:E("#022c22","emerald",950)},Vn={50:E("#f0fdf4","green",50),100:E("#dcfce7","green",100),200:E("#bbf7d0","green",200),300:E("#86efac","green",300),400:E("#4ade80","green",400),500:E("#22c55e","green",500),600:E("#16a34a","green",600),700:E("#15803d","green",700),800:E("#166534","green",800),900:E("#14532d","green",900),950:E("#052e16","green",950)},it={50:E("#fffbeb","amber",50),100:E("#fef3c7","amber",100),200:E("#fde68a","amber",200),300:E("#fcd34d","amber",300),400:E("#fbbf24","amber",400),500:E("#f59e0b","amber",500),600:E("#d97706","amber",600),700:E("#b45309","amber",700),800:E("#92400e","amber",800),900:E("#78350f","amber",900),950:E("#451a03","amber",950)},Wn={50:E("#fefce8","yellow",50),100:E("#fef9c3","yellow",100),200:E("#fef08a","yellow",200),300:E("#fde047","yellow",300),400:E("#facc15","yellow",400),500:E("#eab308","yellow",500),600:E("#ca8a04","yellow",600),700:E("#a16207","yellow",700),800:E("#854d0e","yellow",800),900:E("#713f12","yellow",900),950:E("#422006","yellow",950)},Hn={50:E("#fff7ed","orange",50),100:E("#ffedd5","orange",100),200:E("#fed7aa","orange",200),300:E("#fdba74","orange",300),400:E("#fb923c","orange",400),500:E("#f97316","orange",500),600:E("#ea580c","orange",600),700:E("#c2410c","orange",700),800:E("#9a3412","orange",800),900:E("#7c2d12","orange",900),950:E("#431407","orange",950)},lt={50:E("#fff1f2","rose",50),100:E("#ffe4e6","rose",100),200:E("#fecdd3","rose",200),300:E("#fda4af","rose",300),400:E("#fb7185","rose",400),500:E("#f43f5e","rose",500),600:E("#e11d48","rose",600),700:E("#be123c","rose",700),800:E("#9f1239","rose",800),900:E("#881337","rose",900),950:E("#4c0519","rose",950)},Bn={50:E("#fef2f2","red",50),100:E("#fee2e2","red",100),200:E("#fecaca","red",200),300:E("#fca5a5","red",300),400:E("#f87171","red",400),500:E("#ef4444","red",500),600:E("#dc2626","red",600),700:E("#b91c1c","red",700),800:E("#991b1b","red",800),900:E("#7f1d1d","red",900),950:E("#450a0a","red",950)},ct={50:E("#f0f9ff","sky",50),100:E("#e0f2fe","sky",100),200:E("#bae6fd","sky",200),300:E("#7dd3fc","sky",300),400:E("#38bdf8","sky",400),500:E("#0ea5e9","sky",500),600:E("#0284c7","sky",600),700:E("#0369a1","sky",700),800:E("#075985","sky",800),900:E("#0c4a6e","sky",900),950:E("#082f49","sky",950)},Un={50:E("#eff6ff","blue",50),100:E("#dbeafe","blue",100),200:E("#bfdbfe","blue",200),300:E("#93c5fd","blue",300),400:E("#60a5fa","blue",400),500:E("#3b82f6","blue",500),600:E("#2563eb","blue",600),700:E("#1d4ed8","blue",700),800:E("#1e40af","blue",800),900:E("#1e3a8a","blue",900),950:E("#172554","blue",950)},Gn={50:E("#fdf4ff","fuchsia",50),100:E("#fae8ff","fuchsia",100),200:E("#f5d0fe","fuchsia",200),300:E("#f0abfc","fuchsia",300),400:E("#e879f9","fuchsia",400),500:E("#d946ef","fuchsia",500),600:E("#c026d3","fuchsia",600),700:E("#a21caf","fuchsia",700),800:E("#86198f","fuchsia",800),900:E("#701a75","fuchsia",900),950:E("#4a044e","fuchsia",950)},Kn={50:E("#fdf2f8","pink",50),100:E("#fce7f3","pink",100),200:E("#fbcfe8","pink",200),300:E("#f9a8d4","pink",300),400:E("#f472b6","pink",400),500:E("#ec4899","pink",500),600:E("#db2777","pink",600),700:E("#be185d","pink",700),800:E("#9d174d","pink",800),900:E("#831843","pink",900),950:E("#500724","pink",950)},Yn={50:E("#faf5ff","purple",50),100:E("#f3e8ff","purple",100),200:E("#e9d5ff","purple",200),300:E("#d8b4fe","purple",300),400:E("#c084fc","purple",400),500:E("#a855f7","purple",500),600:E("#9333ea","purple",600),700:E("#7e22ce","purple",700),800:E("#6b21a8","purple",800),900:E("#581c87","purple",900),950:E("#3b0764","purple",950)},qn={50:E("#f0fdfa","teal",50),100:E("#ccfbf1","teal",100),200:E("#99f6e4","teal",200),300:E("#5eead4","teal",300),400:E("#2dd4bf","teal",400),500:E("#14b8a6","teal",500),600:E("#0d9488","teal",600),700:E("#0f766e","teal",700),800:E("#115e59","teal",800),900:E("#134e4a","teal",900),950:E("#042f2e","teal",950)},Xn={50:E("#f7fee7","lime",50),100:E("#ecfccb","lime",100),200:E("#d9f99d","lime",200),300:E("#bef264","lime",300),400:E("#a3e635","lime",400),500:E("#84cc16","lime",500),600:E("#65a30d","lime",600),700:E("#4d7c0f","lime",700),800:E("#3f6212","lime",800),900:E("#365314","lime",900),950:E("#1a2e05","lime",950)},fs={indigo:rt,violet:st,cyan:nt,slate:at,gray:On,emerald:ot,green:Vn,amber:it,yellow:Wn,orange:Hn,rose:lt,red:Bn,sky:ct,blue:Un,fuchsia:Gn,pink:Kn,purple:Yn,teal:qn,lime:Xn};function Ft(e,t){return fs[e][t]}function ni(e){return fs[e]}const Ut={primary:{light:rt[400],DEFAULT:rt[500],dark:rt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:st[400],DEFAULT:st[500],dark:st[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:nt[400],DEFAULT:nt[500],dark:nt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},success:{light:ot[400],DEFAULT:ot[500],dark:ot[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},warning:{light:it[400],DEFAULT:it[500],dark:it[600],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:lt[400],DEFAULT:lt[500],dark:lt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:ct[400],DEFAULT:ct[500],dark:ct[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:at[100],DEFAULT:at[500],dark:at[700],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},xr={primary:{light:rt[500],DEFAULT:rt[400],dark:rt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:st[500],DEFAULT:st[400],dark:st[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:nt[500],DEFAULT:nt[400],dark:nt[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},success:{light:ot[500],DEFAULT:ot[400],dark:ot[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},warning:{light:it[500],DEFAULT:it[400],dark:it[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:lt[500],DEFAULT:lt[400],dark:lt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:ct[500],DEFAULT:ct[400],dark:ct[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:at[700],DEFAULT:at[400],dark:at[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},ai=Ut;function Ht(e,t="DEFAULT",r="light"){return(r==="dark"?xr:Ut)[e][t]}function oi(e,t="light"){return(t==="dark"?xr:Ut)[e]}function ii(e,t,r={}){const{format:s="hex",opacity:a}=r,o=Ft(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;default:i=o.hex}return i}function li(e,t="DEFAULT",r={}){const{format:s="hex",opacity:a}=r,o=Ht(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;default:i=o.hex}return i}function ci(e,t,r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=Ft(e,t),d=[`${s}-${c.tailwind}`];return a&&d.push(`hover:${s}-${c.tailwind}`),o&&d.push(`focus:${s}-${c.tailwind}`),i&&d.push(`active:${s}-${c.tailwind}`),d.join(" ")}function di(e,t="DEFAULT",r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=Ht(e,t),d=[`${s}-${c.tailwind}`];if(a){const f=Ht(e,t==="DEFAULT"?"dark":"DEFAULT");d.push(`hover:${s}-${f.tailwind}`)}if(o&&d.push(`focus:${s}-${c.tailwind}`),i){const f=Ht(e,"dark");d.push(`active:${s}-${f.tailwind}`)}return d.join(" ")}function ui(e,t,r="bg"){const s=Ft(e,t);return`hover:${r}-${s.tailwind}`}function fi(e,t,r="border"){const s=Ft(e,t);return`focus:${r}-${s.tailwind}`}function mi(e,t){return`focus:ring-${Ft(e,t).tailwind}`}function pi(e,t){return`rgba(${e.rgb}, ${t})`}function Jn(e){const t=ns(e);return t?.299*t[0]+.587*t[1]+.114*t[2]>128:!0}function bi(e){return Jn(e)?"#000000":"#ffffff"}function ns(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null}function ms(e,t,r=.5){const s=ns(e),a=ns(t);if(!s||!a)return e;const o=Math.round(s[0]*(1-r)+a[0]*r),i=Math.round(s[1]*(1-r)+a[1]*r),c=Math.round(s[2]*(1-r)+a[2]*r);return`#${((1<<24)+(o<<16)+(i<<8)+c).toString(16).slice(1)}`}function hi(e,t){return ms(e,"#ffffff",t/100)}function gi(e,t){return ms(e,"#000000",t/100)}const xi={primary:{name:"indigo",light:400,default:500,dark:600},secondary:{name:"violet",light:400,default:500,dark:600},accent:{name:"cyan",light:400,default:500,dark:600}};class Et{static create(t){const s={sm:{minWidth:640,tailwind:"sm"},md:{minWidth:768,tailwind:"md"},lg:{minWidth:1024,tailwind:"lg"},xl:{minWidth:1280,tailwind:"xl"},"2xl":{minWidth:1536,tailwind:"2xl"}}[t];return{name:t,minWidth:s.minWidth,px:`${s.minWidth}px`,rem:`${s.minWidth/16}rem`,tailwind:s.tailwind}}}const vr={sm:Et.create("sm"),md:Et.create("md"),lg:Et.create("lg"),xl:Et.create("xl"),"2xl":Et.create("2xl")};function vi(e){return vr[e]}function yi(e,t="min"){const r=vr[e];return`@media (${t==="min"?"min-width":"max-width"}: ${r.px})`}function Qn(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Qn(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function Zn(){for(var e,t,r=0,s="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Qn(e))&&(s&&(s+=" "),s+=t);return s}const wi=(e,t)=>{const r=new Array(e.length+t.length);for(let s=0;s<e.length;s++)r[s]=e[s];for(let s=0;s<t.length;s++)r[e.length+s]=t[s];return r},ki=(e,t)=>({classGroupId:e,validator:t}),ea=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),lr="-",vn=[],ji="arbitrary..",Ni=e=>{const t=$i(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Si(i);const c=i.split(lr),u=c[0]===""&&c.length>1?1:0;return ta(c,u,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const u=s[i],d=r[i];return u?d?wi(d,u):u:d||vn}return r[i]||vn}}},ta=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const a=e[t],o=r.nextPart.get(a);if(o){const d=ta(e,t+1,o);if(d)return d}const i=r.validators;if(i===null)return;const c=t===0?e.join(lr):e.slice(t).join(lr),u=i.length;for(let d=0;d<u;d++){const f=i[d];if(f.validator(c))return f.classGroupId}},Si=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),s=t.slice(0,r);return s?ji+s:void 0})(),$i=e=>{const{theme:t,classGroups:r}=e;return Ci(r,t)},Ci=(e,t)=>{const r=ea();for(const s in e){const a=e[s];ps(a,r,s,t)}return r},ps=(e,t,r,s)=>{const a=e.length;for(let o=0;o<a;o++){const i=e[o];Ei(i,t,r,s)}},Ei=(e,t,r,s)=>{if(typeof e=="string"){Mi(e,t,r);return}if(typeof e=="function"){Ti(e,t,r,s);return}Ai(e,t,r,s)},Mi=(e,t,r)=>{const s=e===""?t:ra(t,e);s.classGroupId=r},Ti=(e,t,r,s)=>{if(Ri(e)){ps(e(s),t,r,s);return}t.validators===null&&(t.validators=[]),t.validators.push(ki(r,e))},Ai=(e,t,r,s)=>{const a=Object.entries(e),o=a.length;for(let i=0;i<o;i++){const[c,u]=a[i];ps(u,ra(t,c),r,s)}},ra=(e,t)=>{let r=e;const s=t.split(lr),a=s.length;for(let o=0;o<a;o++){const i=s[o];let c=r.nextPart.get(i);c||(c=ea(),r.nextPart.set(i,c)),r=c}return r},Ri=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ii=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),s=Object.create(null);const a=(o,i)=>{r[o]=i,t++,t>e&&(t=0,s=r,r=Object.create(null))};return{get(o){let i=r[o];if(i!==void 0)return i;if((i=s[o])!==void 0)return a(o,i),i},set(o,i){o in r?r[o]=i:a(o,i)}}},as="!",yn=":",Di=[],wn=(e,t,r,s,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:s,isExternal:a}),Fi=e=>{const{prefix:t,experimentalParseClassName:r}=e;let s=a=>{const o=[];let i=0,c=0,u=0,d;const f=a.length;for(let w=0;w<f;w++){const y=a[w];if(i===0&&c===0){if(y===yn){o.push(a.slice(u,w)),u=w+1;continue}if(y==="/"){d=w;continue}}y==="["?i++:y==="]"?i--:y==="("?c++:y===")"&&c--}const p=o.length===0?a:a.slice(u);let b=p,g=!1;p.endsWith(as)?(b=p.slice(0,-1),g=!0):p.startsWith(as)&&(b=p.slice(1),g=!0);const x=d&&d>u?d-u:void 0;return wn(o,g,b,x)};if(t){const a=t+yn,o=s;s=i=>i.startsWith(a)?o(i.slice(a.length)):wn(Di,!1,i,void 0,!0)}if(r){const a=s;s=o=>r({className:o,parseClassName:a})}return s},Li=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,s)=>{t.set(r,1e6+s)}),r=>{const s=[];let a=[];for(let o=0;o<r.length;o++){const i=r[o],c=i[0]==="[",u=t.has(i);c||u?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(i)):a.push(i)}return a.length>0&&(a.sort(),s.push(...a)),s}},_i=e=>A({cache:Ii(e.cacheSize),parseClassName:Fi(e),sortModifiers:Li(e),postfixLookupClassGroupIds:Pi(e)},Ni(e)),Pi=e=>{const t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let s=0;s<r.length;s++)t[r[s]]=!0;return t},zi=/\s+/,Oi=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:o,postfixLookupClassGroupIds:i}=t,c=[],u=e.trim().split(zi);let d="";for(let f=u.length-1;f>=0;f-=1){const p=u[f],{isExternal:b,modifiers:g,hasImportantModifier:x,baseClassName:w,maybePostfixModifierPosition:y}=r(p);if(b){d=p+(d.length>0?" "+d:d);continue}let h=!!y,k;if(h){const I=w.substring(0,y);k=s(I);const C=k&&i[k]?s(w):void 0;C&&C!==k&&(k=C,h=!1)}else k=s(w);if(!k){if(!h){d=p+(d.length>0?" "+d:d);continue}if(k=s(w),!k){d=p+(d.length>0?" "+d:d);continue}h=!1}const $=g.length===0?"":g.length===1?g[0]:o(g).join(":"),v=x?$+as:$,S=v+k;if(c.indexOf(S)>-1)continue;c.push(S);const N=a(k,h);for(let I=0;I<N.length;++I){const C=N[I];c.push(v+C)}d=p+(d.length>0?" "+d:d)}return d},Vi=(...e)=>{let t=0,r,s,a="";for(;t<e.length;)(r=e[t++])&&(s=sa(r))&&(a&&(a+=" "),a+=s);return a},sa=e=>{if(typeof e=="string")return e;let t,r="";for(let s=0;s<e.length;s++)e[s]&&(t=sa(e[s]))&&(r&&(r+=" "),r+=t);return r},Wi=(e,...t)=>{let r,s,a,o;const i=u=>{const d=t.reduce((f,p)=>p(f),e());return r=_i(d),s=r.cache.get,a=r.cache.set,o=c,c(u)},c=u=>{const d=s(u);if(d)return d;const f=Oi(u,r);return a(u,f),f};return o=i,(...u)=>o(Vi(...u))},Hi=[],he=e=>{const t=r=>r[e]||Hi;return t.isThemeGetter=!0,t},na=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,aa=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Bi=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ui=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Gi=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ki=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Yi=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Je=e=>Bi.test(e),ne=e=>!!e&&!Number.isNaN(Number(e)),De=e=>!!e&&Number.isInteger(Number(e)),Yr=e=>e.endsWith("%")&&ne(e.slice(0,-1)),Ve=e=>Ui.test(e),oa=()=>!0,Xi=e=>Gi.test(e)&&!Ki.test(e),bs=()=>!1,Ji=e=>Yi.test(e),Qi=e=>qi.test(e),Zi=e=>!G(e)&&!K(e),el=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),tl=e=>ut(e,ca,bs),G=e=>na.test(e),bt=e=>ut(e,da,Xi),kn=e=>ut(e,cl,ne),rl=e=>ut(e,fa,oa),sl=e=>ut(e,ua,bs),jn=e=>ut(e,ia,bs),nl=e=>ut(e,la,Qi),rr=e=>ut(e,ma,Ji),K=e=>aa.test(e),_t=e=>yt(e,da),al=e=>yt(e,ua),Nn=e=>yt(e,ia),ol=e=>yt(e,ca),il=e=>yt(e,la),sr=e=>yt(e,ma,!0),ll=e=>yt(e,fa,!0),ut=(e,t,r)=>{const s=na.exec(e);return s?s[1]?t(s[1]):r(s[2]):!1},yt=(e,t,r=!1)=>{const s=aa.exec(e);return s?s[1]?t(s[1]):r:!1},ia=e=>e==="position"||e==="percentage",la=e=>e==="image"||e==="url",ca=e=>e==="length"||e==="size"||e==="bg-size",da=e=>e==="length",cl=e=>e==="number",ua=e=>e==="family-name",fa=e=>e==="number"||e==="weight",ma=e=>e==="shadow",dl=()=>{const e=he("color"),t=he("font"),r=he("text"),s=he("font-weight"),a=he("tracking"),o=he("leading"),i=he("breakpoint"),c=he("container"),u=he("spacing"),d=he("radius"),f=he("shadow"),p=he("inset-shadow"),b=he("text-shadow"),g=he("drop-shadow"),x=he("blur"),w=he("perspective"),y=he("aspect"),h=he("ease"),k=he("animate"),$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...v(),K,G],N=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],C=()=>[K,G,u],T=()=>[Je,"full","auto",...C()],L=()=>[De,"none","subgrid",K,G],F=()=>["auto",{span:["full",De,K,G]},De,K,G],M=()=>[De,"auto",K,G],R=()=>["auto","min","max","fr",K,G],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],O=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...C()],X=()=>[Je,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],Q=()=>[Je,"screen","full","dvw","lvw","svw","min","max","fit",...C()],oe=()=>[Je,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],H=()=>[e,K,G],_=()=>[...v(),Nn,jn,{position:[K,G]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ee=()=>["auto","cover","contain",ol,tl,{size:[K,G]}],J=()=>[Yr,_t,bt],te=()=>["","none","full",d,K,G],ae=()=>["",ne,_t,bt],z=()=>["solid","dashed","dotted","double"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[ne,Yr,Nn,jn],ce=()=>["","none",x,K,G],ie=()=>["none",ne,K,G],me=()=>["none",ne,K,G],ve=()=>[ne,K,G],Me=()=>[Je,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ve],breakpoint:[Ve],color:[oa],container:[Ve],"drop-shadow":[Ve],ease:["in","out","in-out"],font:[Zi],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ve],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ve],shadow:[Ve],spacing:["px",ne],text:[Ve],"text-shadow":[Ve],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Je,G,K,y]}],container:["container"],"container-type":[{"@container":["","normal","size",K,G]}],"container-named":[el],columns:[{columns:[ne,G,K,c]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[De,"auto",K,G]}],basis:[{basis:[Je,"full","auto",c,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ne,Je,"auto","initial","none",G]}],grow:[{grow:["",ne,K,G]}],shrink:[{shrink:["",ne,K,G]}],order:[{order:[De,"first","last","none",K,G]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...O(),"normal"]}],"justify-self":[{"justify-self":["auto",...O()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...O(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...O(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...O(),"baseline"]}],"place-self":[{"place-self":["auto",...O()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mbs:[{mbs:B()}],mbe:[{mbe:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...Q()]}],"min-inline-size":[{"min-inline":["auto",...Q()]}],"max-inline-size":[{"max-inline":["none",...Q()]}],"block-size":[{block:["auto",...oe()]}],"min-block-size":[{"min-block":["auto",...oe()]}],"max-block-size":[{"max-block":["none",...oe()]}],w:[{w:[c,"screen",...X()]}],"min-w":[{"min-w":[c,"screen","none",...X()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,_t,bt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,ll,rl]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Yr,G]}],"font-family":[{font:[al,sl,t]}],"font-features":[{"font-features":[G]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,K,G]}],"line-clamp":[{"line-clamp":[ne,"none",K,kn]}],leading:[{leading:[o,...C()]}],"list-image":[{"list-image":["none",K,G]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",K,G]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:[ne,"from-font","auto",K,bt]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[ne,"auto",K,G]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"tab-size":[{tab:[De,K,G]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K,G]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",K,G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},De,K,G],radial:["",K,G],conic:[De,K,G]},il,nl]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:J()}],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-bs":[{"border-bs":ae()}],"border-w-be":[{"border-be":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...z(),"hidden","none"]}],"divide-style":[{divide:[...z(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-bs":[{"border-bs":H()}],"border-color-be":[{"border-be":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ne,K,G]}],"outline-w":[{outline:["",ne,_t,bt]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",f,sr,rr]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",p,sr,rr]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[ne,bt]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",b,sr,rr]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[ne,K,G]}],"mix-blend":[{"mix-blend":[...V(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":V()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[K,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":v()}],"mask-image-conic-pos":[{"mask-conic":[ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",K,G]}],filter:[{filter:["","none",K,G]}],blur:[{blur:ce()}],brightness:[{brightness:[ne,K,G]}],contrast:[{contrast:[ne,K,G]}],"drop-shadow":[{"drop-shadow":["","none",g,sr,rr]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",ne,K,G]}],"hue-rotate":[{"hue-rotate":[ne,K,G]}],invert:[{invert:["",ne,K,G]}],saturate:[{saturate:[ne,K,G]}],sepia:[{sepia:["",ne,K,G]}],"backdrop-filter":[{"backdrop-filter":["","none",K,G]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[ne,K,G]}],"backdrop-contrast":[{"backdrop-contrast":[ne,K,G]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ne,K,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ne,K,G]}],"backdrop-invert":[{"backdrop-invert":["",ne,K,G]}],"backdrop-opacity":[{"backdrop-opacity":[ne,K,G]}],"backdrop-saturate":[{"backdrop-saturate":[ne,K,G]}],"backdrop-sepia":[{"backdrop-sepia":["",ne,K,G]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",K,G]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ne,"initial",K,G]}],ease:[{ease:["linear","initial",h,K,G]}],delay:[{delay:[ne,K,G]}],animate:[{animate:["none",k,K,G]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,K,G]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:ie()}],"rotate-x":[{"rotate-x":ie()}],"rotate-y":[{"rotate-y":ie()}],"rotate-z":[{"rotate-z":ie()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[K,G,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Me()}],"translate-x":[{"translate-x":Me()}],"translate-y":[{"translate-y":Me()}],"translate-z":[{"translate-z":Me()}],"translate-none":["translate-none"],zoom:[{zoom:[De,K,G]}],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",K,G]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":H()}],"scrollbar-track-color":[{"scrollbar-track":H()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",K,G]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[ne,_t,bt,kn]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},ul=Wi(dl);function j(...e){return ul(Zn(e))}const Sn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,$n=Zn,fl=(e,t)=>r=>{var s;if((t==null?void 0:t.variants)==null)return $n(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(d=>{const f=r==null?void 0:r[d],p=o==null?void 0:o[d];if(f===null)return null;const b=Sn(f)||Sn(p);return a[d][b]}),c=r&&Object.entries(r).reduce((d,f)=>{let[p,b]=f;return b===void 0||(d[p]=b),d},{}),u=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((d,f)=>{let x=f,{class:p,className:b}=x,g=W(x,["class","className"]);return Object.entries(g).every(w=>{let[y,h]=w;return Array.isArray(h)?h.includes(A(A({},o),c)[y]):A(A({},o),c)[y]===h})?[...d,p,b]:d},[]);return $n(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},ke=(e,t)=>{const r=fl(e,t);return(s=>{const a=r(s);return j(a)})};function pa(...e){return t=>{for(const r of e)r&&(typeof r=="function"?r(t):r.current=t)}}class Ae{static create(t,r="ease-in-out"){const s={fast:{value:"150ms",ms:150,tailwind:"duration-150"},base:{value:"200ms",ms:200,tailwind:"duration-200"},slow:{value:"300ms",ms:300,tailwind:"duration-300"},slower:{value:"500ms",ms:500,tailwind:"duration-500"}},a={"ease-in":{value:"cubic-bezier(0.4, 0, 1, 1)",tailwind:"ease-in",description:"Slow start, fast end"},"ease-out":{value:"cubic-bezier(0, 0, 0.2, 1)",tailwind:"ease-out",description:"Fast start, slow end"},"ease-in-out":{value:"cubic-bezier(0.4, 0, 0.2, 1)",tailwind:"ease-in-out",description:"Slow start and end, fast middle"},spring:{value:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",tailwind:"ease-[cubic-bezier(0.68,-0.55,0.265,1.55)]",description:"Spring-like bounce effect"}};return{duration:s[t],easing:a[r]}}static createTransition(t,r="base",s="ease-in-out"){const a=this.create(r,s),o=Array.isArray(t)?t.join(", "):t,i=[a.duration.tailwind,a.easing.tailwind].join(" ");return{property:o,duration:a.duration.value,timingFunction:a.easing.value,tailwind:i}}}const ml={fast:Ae.create("fast"),base:Ae.create("base"),slow:Ae.create("slow"),slower:Ae.create("slower"),colors:Ae.createTransition(["color","background-color","border-color"],"base"),opacity:Ae.createTransition("opacity","fast"),transform:Ae.createTransition("transform","base"),all:Ae.createTransition("all","base")};function pl(e,t){return Ae.create(e,t)}function xe(e,t="ease-in-out"){const r=Ae.create(e,t);return`${r.duration.tailwind} ${r.easing.tailwind}`}function bl(e,t="base",r="ease-in-out"){return Ae.createTransition(e,t,r).tailwind}class Te{static create(t){return{base:{value:0,tailwind:"z-0",description:"Base layer for normal content"},dropdown:{value:1e3,tailwind:"z-[1000]",description:"Dropdown menus and select options"},sticky:{value:1020,tailwind:"z-[1020]",description:"Sticky headers and navigation"},fixed:{value:1030,tailwind:"z-[1030]",description:"Fixed position elements"},"modal-backdrop":{value:1040,tailwind:"z-[1040]",description:"Modal backdrop/overlay"},modal:{value:1050,tailwind:"z-[1050]",description:"Modal dialogs and drawers"},popover:{value:1060,tailwind:"z-[1060]",description:"Popovers and tooltips"},tooltip:{value:1070,tailwind:"z-[1070]",description:"Tooltips (highest priority)"},toast:{value:1080,tailwind:"z-[1080]",description:"Toast notifications (highest priority)"}}[t]}}const Cn={base:Te.create("base"),dropdown:Te.create("dropdown"),sticky:Te.create("sticky"),fixed:Te.create("fixed"),"modal-backdrop":Te.create("modal-backdrop"),modal:Te.create("modal"),popover:Te.create("popover"),tooltip:Te.create("tooltip"),toast:Te.create("toast")};function hl(e){return Te.create(e)}function be(e){return Te.create(e).tailwind}class we{static create(t){const r=t/100,s={0:"Fully transparent",5:"Very light overlay",10:"Light overlay",20:"Subtle overlay",25:"Quarter opacity",30:"Light background",40:"Semi-transparent",50:"Half opacity",60:"Semi-opaque",70:"Mostly opaque",75:"Three-quarter opacity",80:"High opacity",90:"Very high opacity",95:"Nearly opaque",100:"Fully opaque"};return{value:t,decimal:r,tailwind:{0:"opacity-0",5:"opacity-5",10:"opacity-10",20:"opacity-20",25:"opacity-25",30:"opacity-30",40:"opacity-40",50:"opacity-50",60:"opacity-60",70:"opacity-70",75:"opacity-75",80:"opacity-80",90:"opacity-90",95:"opacity-95",100:"opacity-100"}[t],description:s[t]}}}we.create(0),we.create(5),we.create(10),we.create(20),we.create(25),we.create(30),we.create(40),we.create(50),we.create(60),we.create(70),we.create(75),we.create(80),we.create(90),we.create(95),we.create(100);function gl(e){return we.create(e)}function xl(e){return we.create(e).tailwind}var nr={exports:{}},Pt={};var En;function vl(){if(En)return Pt;En=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(s,a,o){var i=null;if(o!==void 0&&(i=""+o),a.key!==void 0&&(i=""+a.key),"key"in a){o={};for(var c in a)c!=="key"&&(o[c]=a[c])}else o=a;return a=o.ref,{$$typeof:e,type:s,key:i,ref:a!==void 0?a:null,props:o}}return Pt.Fragment=t,Pt.jsx=r,Pt.jsxs=r,Pt}var zt={};var Mn;function yl(){return Mn||(Mn=1,process.env.NODE_ENV!=="production"&&(function(){function e(_){if(_==null)return null;if(typeof _=="function")return _.$$typeof===F?null:_.displayName||_.name||null;if(typeof _=="string")return _;switch(_){case y:return"Fragment";case k:return"Profiler";case h:return"StrictMode";case N:return"Suspense";case I:return"SuspenseList";case L:return"Activity"}if(typeof _=="object")switch(typeof _.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),_.$$typeof){case w:return"Portal";case v:return _.displayName||"Context";case $:return(_._context.displayName||"Context")+".Consumer";case S:var Y=_.render;return _=_.displayName,_||(_=Y.displayName||Y.name||"",_=_!==""?"ForwardRef("+_+")":"ForwardRef"),_;case C:return Y=_.displayName||null,Y!==null?Y:e(_.type)||"Memo";case T:Y=_._payload,_=_._init;try{return e(_(Y))}catch(ee){}}return null}function t(_){return""+_}function r(_){try{var Y=!1}catch(te){Y=!0}if(Y){Y=console;var ee=Y.error,J=typeof Symbol=="function"&&Symbol.toStringTag&&_[Symbol.toStringTag]||_.constructor.name||"Object";return ee.call(Y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",J),t(_)}}function s(_){if(_===y)return"<>";if(typeof _=="object"&&_!==null&&_.$$typeof===T)return"<...>";try{var Y=e(_);return Y?"<"+Y+">":"<...>"}catch(ee){return"<...>"}}function a(){var _=M.A;return _===null?null:_.getOwner()}function o(){return Error("react-stack-top-frame")}function i(_){if(R.call(_,"key")){var Y=Object.getOwnPropertyDescriptor(_,"key").get;if(Y&&Y.isReactWarning)return!1}return _.key!==void 0}function c(_,Y){function ee(){B||(B=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Y))}ee.isReactWarning=!0,Object.defineProperty(_,"key",{get:ee,configurable:!0})}function u(){var _=e(this.type);return X[_]||(X[_]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),_=this.props.ref,_!==void 0?_:null}function d(_,Y,ee,J,te,ae){var z=ee.ref;return _={$$typeof:x,type:_,key:Y,props:ee,_owner:J},(z!==void 0?z:null)!==null?Object.defineProperty(_,"ref",{enumerable:!1,get:u}):Object.defineProperty(_,"ref",{enumerable:!1,value:null}),_._store={},Object.defineProperty(_._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(_,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(_,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:te}),Object.defineProperty(_,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ae}),Object.freeze&&(Object.freeze(_.props),Object.freeze(_)),_}function f(_,Y,ee,J,te,ae){var z=Y.children;if(z!==void 0)if(J)if(D(z)){for(J=0;J<z.length;J++)p(z[J]);Object.freeze&&Object.freeze(z)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else p(z);if(R.call(Y,"key")){z=e(_);var V=Object.keys(Y).filter(function(ce){return ce!=="key"});J=0<V.length?"{key: someKey, "+V.join(": ..., ")+": ...}":"{key: someKey}",H[z+J]||(V=0<V.length?"{"+V.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
2
  let props = %s;
19
3
  <%s {...props} />
20
4
  React keys must be passed directly to JSX without using spread:
21
5
  let props = %s;
22
- <%s key={someKey} {...props} />`,Q,_,V,_),ne[_+Q]=!0)}if(_=null,Y!==void 0&&(r(Y),_=""+Y),i(G)&&(r(G.key),_=""+G.key),"key"in G){Y={};for(var X in G)X!=="key"&&(Y[X]=G[X])}else Y=G;return _&&u(Y,typeof P=="function"?P.displayName||P.name||"Unknown":P),c(P,_,Y,a(),le,se)}function p(P){m(P)?P._store&&(P._store.validated=1):typeof P=="object"&&P!==null&&P.$$typeof===D&&(P._payload.status==="fulfilled"?m(P._payload.value)&&P._payload.value._store&&(P._payload.value._store.validated=1):P._store&&(P._store.validated=1))}function m(P){return typeof P=="object"&&P!==null&&P.$$typeof===x}var h=l,x=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),g=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),A=Symbol.for("react.activity"),M=Symbol.for("react.client.reference"),F=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Object.prototype.hasOwnProperty,R=Array.isArray,W=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(P){return P()}};var K,H={},U=h.react_stack_bottom_frame.bind(h,o)(),oe=W(s(o)),ne={};zt.Fragment=y,zt.jsx=function(P,G,Y){var Q=1e4>F.recentlyCreatedOwnerStacks++;return f(P,G,Y,!1,Q?Error("react-stack-top-frame"):U,Q?W(s(P)):oe)},zt.jsxs=function(P,G,Y){var Q=1e4>F.recentlyCreatedOwnerStacks++;return f(P,G,Y,!0,Q?Error("react-stack-top-frame"):U,Q?W(s(P)):oe)}})()),zt}var Sn;function ll(){return Sn||(Sn=1,process.env.NODE_ENV==="production"?ar.exports=ol():ar.exports=il()),ar.exports}var n=ll();const oa=l.createContext(void 0);function ia({children:e,defaultTheme:t="light",storageKey:r="theme"}){const[s,a]=l.useState(()=>{if(typeof window=="undefined")return t;try{const c=localStorage.getItem(r);if(c==="light"||c==="dark")return c}catch(c){console.warn("Failed to read theme from localStorage:",c)}return t});l.useEffect(()=>{if(typeof window!="undefined"){try{localStorage.setItem(r,s)}catch(c){console.warn("Failed to save theme to localStorage:",c)}typeof document!="undefined"&&(document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add(s))}},[s,r]);const d={theme:s,toggleTheme:()=>{a(c=>c==="light"?"dark":"light")},setTheme:c=>{a(c)},colors:s==="light"?qt:vr,isDark:s==="dark"};return n.jsx(oa.Provider,{value:d,children:e})}function cl(){const e=l.useContext(oa);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}const dl={breakpoints:yr,spacing:xr,typography:gt,animations:el,features:{reducedMotion:!1,highContrast:!1,debug:!1},behavior:{defaultAnimationDuration:200,defaultTransitionDuration:150,focusVisible:!0}},la=l.createContext(void 0);function ca({children:e,config:t,strategy:r="default"}){const s=l.useMemo(()=>{const c=T({},dl);return t?z(T(T({},c),t),{breakpoints:t.breakpoints||c.breakpoints,spacing:t.spacing||c.spacing,typography:t.typography||c.typography,animations:t.animations||c.animations,features:T(T({},c.features),t.features),behavior:T(T({},c.behavior),t.behavior)}):c},[t]);l.useEffect(()=>{typeof document!="undefined"&&(s.features.reducedMotion?document.documentElement.style.setProperty("--motion-reduce","1"):document.documentElement.style.removeProperty("--motion-reduce"))},[s.features.reducedMotion]),l.useEffect(()=>{typeof document!="undefined"&&(s.features.highContrast?document.documentElement.classList.add("high-contrast"):document.documentElement.classList.remove("high-contrast"))},[s.features.highContrast]);const a=l.useMemo(()=>c=>s.spacing[c],[s.spacing]),o=l.useMemo(()=>c=>s.breakpoints[c],[s.breakpoints]),i=l.useMemo(()=>c=>{var f;return(f=s.features[c])!=null?f:!1},[s.features]),u=l.useMemo(()=>c=>{console.warn("ConfigProvider: updateConfig called but config is immutable. Consider using state management for dynamic updates.")},[]),d={config:s,getSpacing:a,getBreakpoint:o,isFeatureEnabled:i,updateConfig:u};return n.jsx(la.Provider,{value:d,children:e})}function ul(){const e=l.useContext(la);if(e===void 0)throw new Error("useConfig must be used within a ConfigProvider");return e}const wr=l.createContext(void 0);function ms(){const e=l.useContext(wr);if(!e)throw new Error("Toast components must be used within a ToastProvider");return e}function fl(){return l.useContext(wr)}function da({children:e,defaultDuration:t=5e3,maxToasts:r=5}){const[s,a]=l.useState([]),o=l.useCallback(c=>{var m;const f=`toast-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,p=z(T({},c),{id:f,duration:(m=c.duration)!=null?m:t});return a(h=>[p,...h].slice(0,r)),f},[t,r]),i=l.useCallback(c=>{a(f=>f.filter(p=>p.id!==c))},[]),u=l.useCallback(()=>{a([])},[]),d={toasts:s,addToast:o,removeToast:i,clearAll:u};return n.jsx(wr.Provider,{value:d,children:e})}const kr=l.createContext(void 0);function Ft(){const e=l.useContext(kr);if(!e)throw new Error("Dialog components must be used within a Dialog component");return e}function ml(){return l.useContext(kr)}function ps({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,titleId:a,descriptionId:o}){const[i,u]=l.useState(r),d=l.useRef(null),c=t!==void 0?t:i,f=m=>{t===void 0&&u(m),s==null||s(m)};l.useEffect(()=>{if(c)d.current=document.activeElement;else{const m=setTimeout(()=>{var h;(h=d.current)==null||h.focus()},0);return()=>clearTimeout(m)}},[c]),l.useEffect(()=>(c?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[c]);const p={isOpen:c,onOpenChange:f,onClose:()=>f(!1),titleId:a,descriptionId:o};return n.jsx(kr.Provider,{value:p,children:e})}const pl={ThemeProvider:ia,ConfigProvider:ca,ToastProvider:da,DialogProvider:ps},or=pl;function hl(e,t){const{theme:r,config:s,toast:a,dialog:o,providers:i={theme:!0,config:!0,toast:!0,dialog:!0}}=t||{};let u=e;return i.dialog&&(u=n.jsx(or.DialogProvider,z(T({},o),{children:u}))),i.toast&&(u=n.jsx(or.ToastProvider,z(T({},a),{children:u}))),i.config&&(u=n.jsx(or.ConfigProvider,z(T({},s),{children:u}))),i.theme&&(u=n.jsx(or.ThemeProvider,z(T({},r),{children:u}))),u}function bl({children:e,config:t}){const r=l.useMemo(()=>hl(e,t),[e,t]);return n.jsx(n.Fragment,{children:r})}function gl(){return{}}class Ye{static create(t){const s={none:{px:0,tailwind:"rounded-none",description:"No border radius"},sm:{px:2,tailwind:"rounded-sm",description:"Small radius (2px) for subtle rounding"},md:{px:6,tailwind:"rounded-md",description:"Medium radius (6px) for buttons and inputs"},lg:{px:8,tailwind:"rounded-lg",description:"Large radius (8px) for cards and containers"},xl:{px:12,tailwind:"rounded-xl",description:"Extra large radius (12px) for prominent elements"},"2xl":{px:16,tailwind:"rounded-2xl",description:"2X large radius (16px) for large containers"},"3xl":{px:24,tailwind:"rounded-3xl",description:"3X large radius (24px) for very large containers"},full:{px:9999,tailwind:"rounded-full",description:"Full radius for circular elements"}}[t];return{value:s.px,rem:`${s.px/16}rem`,px:`${s.px}px`,tailwind:s.tailwind,description:s.description}}}const xl={none:Ye.create("none"),sm:Ye.create("sm"),md:Ye.create("md"),lg:Ye.create("lg"),xl:Ye.create("xl"),"2xl":Ye.create("2xl"),"3xl":Ye.create("3xl"),full:Ye.create("full")};function J(e){return xl[e].tailwind}function vl(s){var a=s,{variant:e="info",className:t}=a,r=O(a,["variant","className"]);const o={warning:k("bg-warning-bg","text-warning-dark","border-warning"),error:k("bg-error-bg","text-error-dark","border-error"),info:k("bg-info-bg","text-info-dark","border-info")};return n.jsx("div",T({role:"alert",className:k("border",E("base","px"),E("sm","py"),J("lg"),o[e],t)},r))}const yl={primary:{light:"text-indigo-400",DEFAULT:"text-fg-brand",dark:"text-indigo-600",contrast:"text-fg-inverse"},secondary:{light:"text-pink-300",DEFAULT:"text-fg-brand-secondary",dark:"text-pink-600",contrast:"text-fg-inverse"},success:{light:"text-green-300",DEFAULT:"text-fg-success",dark:"text-success-dark",contrast:"text-fg-inverse"},warning:{light:"text-yellow-300",DEFAULT:"text-fg-warning",dark:"text-warning-dark",contrast:"text-fg-inverse"},error:{light:"text-red-300",DEFAULT:"text-fg-error",dark:"text-error-dark",contrast:"text-fg-inverse"},info:{light:"text-blue-300",DEFAULT:"text-fg-info",dark:"text-info-dark",contrast:"text-fg-inverse"},neutral:{light:"text-fg-tertiary",DEFAULT:"text-fg-secondary",dark:"text-fg-primary",contrast:"text-fg-inverse"}};function wl(f,c){var p=f,{variant:e="paragraph",bold:t,italic:r,className:s,as:a,color:o,colorRole:i="neutral",colorShade:u="dark"}=p,d=O(p,["variant","bold","italic","className","as","color","colorRole","colorShade"]);const m=[];let h;if(a)h=a;else switch(e){case"heading":h="h2";break;case"list":h="li";break;case"paragraph":default:h="p";break}return e==="heading"?m.push(ce("h2")):e==="body"||e==="paragraph"?m.push(ce("body")):e==="bodySmall"?m.push(ce("bodySmall")):e==="bodyLarge"?m.push(ce("bodyLarge")):e==="caption"?m.push(ce("caption")):e==="label"?m.push(ce("label")):m.push(ce("body")),t&&m.push("font-bold"),r&&m.push("italic"),m.push(yl[i][u]),n.jsx(h,T({ref:c,className:k(...m,s)},d))}const Be=l.forwardRef(wl);/**
23
- * @license lucide-react v0.552.0 - ISC
24
- *
25
- * This source code is licensed under the ISC license.
26
- * See the LICENSE file in the root directory of this source tree.
27
- */const kl=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jl=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,s)=>s?s.toUpperCase():r.toLowerCase()),Cn=e=>{const t=jl(e);return t.charAt(0).toUpperCase()+t.slice(1)},ua=(...e)=>e.filter((t,r,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===r).join(" ").trim(),Nl=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
28
- * @license lucide-react v0.552.0 - ISC
29
- *
30
- * This source code is licensed under the ISC license.
31
- * See the LICENSE file in the root directory of this source tree.
32
- */var Sl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
33
- * @license lucide-react v0.552.0 - ISC
34
- *
35
- * This source code is licensed under the ISC license.
36
- * See the LICENSE file in the root directory of this source tree.
37
- */const Cl=l.forwardRef((c,d)=>{var f=c,{color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:a="",children:o,iconNode:i}=f,u=O(f,["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"]);return l.createElement("svg",T(T(z(T({ref:d},Sl),{width:t,height:t,stroke:e,strokeWidth:s?Number(r)*24/Number(t):r,className:ua("lucide",a)}),!o&&!Nl(u)&&{"aria-hidden":"true"}),u),[...i.map(([p,m])=>l.createElement(p,m)),...Array.isArray(o)?o:[o]])});/**
38
- * @license lucide-react v0.552.0 - ISC
39
- *
40
- * This source code is licensed under the ISC license.
41
- * See the LICENSE file in the root directory of this source tree.
42
- */const ie=(e,t)=>{const r=l.forwardRef((i,o)=>{var u=i,{className:s}=u,a=O(u,["className"]);return l.createElement(Cl,T({ref:o,iconNode:t,className:ua(`lucide-${kl(Cn(e))}`,`lucide-${e}`,s)},a))});return r.displayName=Cn(e),r};/**
43
- * @license lucide-react v0.552.0 - ISC
44
- *
45
- * This source code is licensed under the ISC license.
46
- * See the LICENSE file in the root directory of this source tree.
47
- */const $l=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],El=ie("arrow-up-down",$l);/**
48
- * @license lucide-react v0.552.0 - ISC
49
- *
50
- * This source code is licensed under the ISC license.
51
- * See the LICENSE file in the root directory of this source tree.
52
- */const Ml=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Tl=ie("calendar",Ml);/**
53
- * @license lucide-react v0.552.0 - ISC
54
- *
55
- * This source code is licensed under the ISC license.
56
- * See the LICENSE file in the root directory of this source tree.
57
- */const Al=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ns=ie("check",Al);/**
58
- * @license lucide-react v0.552.0 - ISC
59
- *
60
- * This source code is licensed under the ISC license.
61
- * See the LICENSE file in the root directory of this source tree.
62
- */const Rl=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],hs=ie("chevron-down",Rl);/**
63
- * @license lucide-react v0.552.0 - ISC
64
- *
65
- * This source code is licensed under the ISC license.
66
- * See the LICENSE file in the root directory of this source tree.
67
- */const Il=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ut=ie("chevron-left",Il);/**
68
- * @license lucide-react v0.552.0 - ISC
69
- *
70
- * This source code is licensed under the ISC license.
71
- * See the LICENSE file in the root directory of this source tree.
72
- */const Dl=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],bt=ie("chevron-right",Dl);/**
73
- * @license lucide-react v0.552.0 - ISC
74
- *
75
- * This source code is licensed under the ISC license.
76
- * See the LICENSE file in the root directory of this source tree.
77
- */const Fl=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],bs=ie("circle-alert",Fl);/**
78
- * @license lucide-react v0.552.0 - ISC
79
- *
80
- * This source code is licensed under the ISC license.
81
- * See the LICENSE file in the root directory of this source tree.
82
- */const Ll=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],dr=ie("circle-check",Ll);/**
83
- * @license lucide-react v0.552.0 - ISC
84
- *
85
- * This source code is licensed under the ISC license.
86
- * See the LICENSE file in the root directory of this source tree.
87
- */const _l=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Pl=ie("clock",_l);/**
88
- * @license lucide-react v0.552.0 - ISC
89
- *
90
- * This source code is licensed under the ISC license.
91
- * See the LICENSE file in the root directory of this source tree.
92
- */const zl=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],Ol=ie("command",zl);/**
93
- * @license lucide-react v0.552.0 - ISC
94
- *
95
- * This source code is licensed under the ISC license.
96
- * See the LICENSE file in the root directory of this source tree.
97
- */const Vl=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Wl=ie("download",Vl);/**
98
- * @license lucide-react v0.552.0 - ISC
99
- *
100
- * This source code is licensed under the ISC license.
101
- * See the LICENSE file in the root directory of this source tree.
102
- */const Hl=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],Ul=ie("ellipsis-vertical",Hl);/**
103
- * @license lucide-react v0.552.0 - ISC
104
- *
105
- * This source code is licensed under the ISC license.
106
- * See the LICENSE file in the root directory of this source tree.
107
- */const Bl=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],ql=ie("eye-off",Bl);/**
108
- * @license lucide-react v0.552.0 - ISC
109
- *
110
- * This source code is licensed under the ISC license.
111
- * See the LICENSE file in the root directory of this source tree.
112
- */const Gl=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Kl=ie("eye",Gl);/**
113
- * @license lucide-react v0.552.0 - ISC
114
- *
115
- * This source code is licensed under the ISC license.
116
- * See the LICENSE file in the root directory of this source tree.
117
- */const Yl=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],Xl=ie("file",Yl);/**
118
- * @license lucide-react v0.552.0 - ISC
119
- *
120
- * This source code is licensed under the ISC license.
121
- * See the LICENSE file in the root directory of this source tree.
122
- */const Jl=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Ql=ie("funnel",Jl);/**
123
- * @license lucide-react v0.552.0 - ISC
124
- *
125
- * This source code is licensed under the ISC license.
126
- * See the LICENSE file in the root directory of this source tree.
127
- */const Zl=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],ec=ie("grip-vertical",Zl);/**
128
- * @license lucide-react v0.552.0 - ISC
129
- *
130
- * This source code is licensed under the ISC license.
131
- * See the LICENSE file in the root directory of this source tree.
132
- */const tc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],rc=ie("info",tc);/**
133
- * @license lucide-react v0.552.0 - ISC
134
- *
135
- * This source code is licensed under the ISC license.
136
- * See the LICENSE file in the root directory of this source tree.
137
- */const sc=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],fa=ie("loader-circle",sc);/**
138
- * @license lucide-react v0.552.0 - ISC
139
- *
140
- * This source code is licensed under the ISC license.
141
- * See the LICENSE file in the root directory of this source tree.
142
- */const nc=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],ac=ie("menu",nc);/**
143
- * @license lucide-react v0.552.0 - ISC
144
- *
145
- * This source code is licensed under the ISC license.
146
- * See the LICENSE file in the root directory of this source tree.
147
- */const oc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],ic=ie("panel-left-close",oc);/**
148
- * @license lucide-react v0.552.0 - ISC
149
- *
150
- * This source code is licensed under the ISC license.
151
- * See the LICENSE file in the root directory of this source tree.
152
- */const lc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],cc=ie("panel-left-open",lc);/**
153
- * @license lucide-react v0.552.0 - ISC
154
- *
155
- * This source code is licensed under the ISC license.
156
- * See the LICENSE file in the root directory of this source tree.
157
- */const dc=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],as=ie("search",dc);/**
158
- * @license lucide-react v0.552.0 - ISC
159
- *
160
- * This source code is licensed under the ISC license.
161
- * See the LICENSE file in the root directory of this source tree.
162
- */const uc=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Nt=ie("star",uc);/**
163
- * @license lucide-react v0.552.0 - ISC
164
- *
165
- * This source code is licensed under the ISC license.
166
- * See the LICENSE file in the root directory of this source tree.
167
- */const fc=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],mc=ie("triangle-alert",fc);/**
168
- * @license lucide-react v0.552.0 - ISC
169
- *
170
- * This source code is licensed under the ISC license.
171
- * See the LICENSE file in the root directory of this source tree.
172
- */const pc=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],hc=ie("upload",pc);/**
173
- * @license lucide-react v0.552.0 - ISC
174
- *
175
- * This source code is licensed under the ISC license.
176
- * See the LICENSE file in the root directory of this source tree.
177
- */const bc=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ne=ie("x",bc),gc=ve("motion-safe:animate-spin",{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-8 w-8"},variant:{primary:"text-fg-brand",secondary:"text-fg-brand-secondary",neutral:"text-fg-secondary"}},defaultVariants:{size:"md",variant:"primary"}}),gs=l.memo(function(i){var u=i,{size:t="md",variant:r="primary",label:s,className:a=""}=u,o=O(u,["size","variant","label","className"]);return n.jsxs("div",z(T({className:k("inline-flex","items-center",a),role:"status","aria-label":s||"Loading","aria-live":"polite"},o),{children:[n.jsx(fa,{className:k(gc({size:t,variant:r})),"aria-hidden":"true"}),s&&n.jsx("span",{className:k(E("sm","ml"),re("bodySmall"),"text-fg-secondary","sr-only"),children:s})]}))});gs.displayName="Spinner";const xc=ve(k("inline-flex","items-center","justify-center",ce("button").split(" ")[2]||"font-medium",J("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{primary:k("bg-surface-brand-strong","text-fg-inverse","hover:opacity-90","focus:ring-line-brand"),secondary:k("bg-surface-secondary","text-fg-inverse","hover:opacity-90","focus:ring-line-secondary"),error:k("bg-error","text-fg-inverse","hover:opacity-90","focus:ring-error"),outline:k("border-2","border-line-default","bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),ghost:k("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),iconOnly:k("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus","p-0")},size:{sm:k(E("md","px"),E("1.5","py"),re("bodySmall"),E("1.5","gap")),md:k(E("base","px"),E("sm","py"),re("body"),E("sm","gap")),lg:k(E("lg","px"),E("md","py"),re("bodyLarge"),E("2.5","gap"))}},compoundVariants:[{variant:"iconOnly",size:"sm",class:k("h-8","w-8","p-0")},{variant:"iconOnly",size:"md",class:k("h-10","w-10","p-0")},{variant:"iconOnly",size:"lg",class:k("h-12","w-12","p-0")}],defaultVariants:{variant:"primary",size:"md"}});function $n({children:e,position:t}){return e?n.jsx("span",{className:`inline-flex items-center ${t==="left"?"mr-0":"ml-0"}`,children:e}):null}const Z=l.memo(l.forwardRef(function(y,v){var b=y,{variant:t="primary",size:r="md",isLoading:s=!1,loadingText:a,loadingIcon:o,leftIcon:i,rightIcon:u,fullWidth:d=!1,as:c="button",className:f="",disabled:p=!1,children:m,"aria-label":h}=b,x=O(b,["variant","size","isLoading","loadingText","loadingIcon","leftIcon","rightIcon","fullWidth","as","className","disabled","children","aria-label"]);const w=l.useMemo(()=>k(xc({variant:t,size:r}),d&&"w-full",f),[t,r,d,f]),C=l.useMemo(()=>t==="iconOnly"||!m&&(i||u),[t,m,i,u]),g=l.useMemo(()=>C&&!h&&!m?"Button":h,[C,h,m]),j=l.useMemo(()=>t==="error"?"primary":t==="primary"||t==="secondary"?"neutral":"primary",[t]),N=l.useMemo(()=>r==="sm"?"sm":r==="lg"?"lg":"md",[r]),L=l.useMemo(()=>o||n.jsx(gs,{size:N,variant:j}),[o,N,j]),S=c==="button"&&!x.type?"button":void 0,D=T(T({className:w,disabled:p||s,"aria-busy":s,"aria-label":g,"aria-disabled":p||s},S?{type:S}:{}),x);return n.jsx(c,z(T({ref:v},D),{children:s?n.jsxs(n.Fragment,{children:[L,a&&n.jsx("span",{className:"ml-2",children:a}),!a&&m&&n.jsx("span",{className:"ml-2 opacity-0",children:m})]}):n.jsxs(n.Fragment,{children:[i&&n.jsx($n,{position:"left",children:i}),m,u&&n.jsx($n,{position:"right",children:u})]})}))}));Z.displayName="Button";const vc=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>k(E("xs","mt"),ce("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),u=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:u})}),Se=l.memo(l.forwardRef(function(C,w){var g=C,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,size:i="md",variant:u="outlined",leftIcon:d,rightIcon:c,showClearButton:f=!1,onClear:p,className:m="",disabled:h=!1,type:x="text",value:v,onChange:y}=g,b=O(g,["id","label","error","success","helperText","size","variant","leftIcon","rightIcon","showClearButton","onClear","className","disabled","type","value","onChange"]);const j=l.useMemo(()=>t||`input-${Math.random().toString(36).substr(2,9)}`,[t]),N=l.useMemo(()=>s?`${j}-error`:void 0,[s,j]),L=l.useMemo(()=>o?`${j}-helper`:void 0,[o,j]),[S,D]=l.useState(!1),A=l.useMemo(()=>x==="password",[x]),M=l.useMemo(()=>A&&S?"text":x,[A,S,x]),F=l.useMemo(()=>s?"error":a?"success":"default",[s,a]),I=l.useMemo(()=>v!=null&&v!=="",[v]),R=l.useMemo(()=>f&&I&&!h,[f,I,h]),W=l.useMemo(()=>"focus:border-line-focus",[]),K=l.useMemo(()=>"focus:border-error",[]),H=l.useMemo(()=>"focus:border-success",[]),U=l.useMemo(()=>W.replace("focus:border-","focus:ring-"),[W]),oe=l.useCallback(_=>_==="error"?K.replace("focus:border-","focus:ring-"):H.replace("focus:border-","focus:ring-"),[K,H]),ne=ve(k("w-full",J("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{default:k("border-0","border-b-2","border-line-default","focus:border-line-focus"),outlined:k("border","border-line-default","focus:border-line-focus"),filled:k("bg-surface-muted","border-0","focus:bg-surface-base","focus:ring-2",U)},size:{sm:k("h-8",re("bodySmall"),E("md","px")),md:k("h-10",re("body"),E("base","px")),lg:k("h-12",re("bodyLarge"),E("lg","px"))},state:{default:"",error:k("border-error","focus:border-error",oe("error")),success:k("border-success","focus:border-success",oe("success"))}},defaultVariants:{variant:"outlined",size:"md",state:"default"}}),P=l.useMemo(()=>k(ne({variant:u,size:i,state:F}),d&&(i==="sm"?"pl-9":i==="lg"?"pl-12":"pl-10"),(c||R||A)&&(i==="sm"?"pr-9":i==="lg"?"pr-12":"pr-10"),m),[u,i,F,d,c,R,A,m]),G=l.useMemo(()=>k("block",ce("label"),E("xs","mb"),h&&"opacity-50"),[h]),Y=l.useMemo(()=>i==="sm"?"h-4 w-4":i==="lg"?"h-5 w-5":"h-4 w-4",[i]),Q=l.useMemo(()=>i==="sm"?"top-2":i==="lg"?"top-3.5":"top-2.5",[i]),le=l.useCallback(_=>{var V;if(_.stopPropagation(),p)p();else if(y){const X=(V=_.currentTarget.closest(".relative"))==null?void 0:V.querySelector("input");if(X){const ae={target:X,currentTarget:X,bubbles:!0,cancelable:!0,defaultPrevented:!1,eventPhase:2,isTrusted:!1,nativeEvent:new Event("change"),preventDefault:()=>{},stopPropagation:()=>{},persist:()=>{},timeStamp:Date.now()};Object.defineProperty(ae.target,"value",{value:"",writable:!0}),Object.defineProperty(ae.currentTarget,"value",{value:"",writable:!0}),y(ae)}}},[p,y]),se=l.useCallback(()=>{D(_=>!_)},[]);return n.jsxs("div",{className:"w-full",children:[r&&n.jsx("label",{htmlFor:j,className:G,children:r}),n.jsxs("div",{className:"relative",children:[d&&n.jsx("div",{className:`absolute left-3 ${Q} text-fg-secondary opacity-60 pointer-events-none`,children:n.jsx("div",{className:Y,children:d})}),n.jsx("input",T({id:j,ref:w,type:M,className:P,disabled:h,value:v,onChange:y,"aria-invalid":s,"aria-required":b.required,"aria-describedby":N||L,suppressHydrationWarning:!0},b)),n.jsxs("div",{className:"absolute right-3 top-0 bottom-0 flex items-center gap-1",children:[R&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:le,className:"h-auto p-1","aria-label":"Clear input",children:n.jsx(Ne,{className:Y})}),A&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:se,className:"h-auto p-1","aria-label":S?"Hide password":"Show password",children:S?n.jsx(ql,{className:Y}):n.jsx(Kl,{className:Y})}),c&&!R&&!A&&n.jsx("div",{className:`text-fg-secondary opacity-60 pointer-events-none ${Y}`,children:c})]})]}),(s||a||o)&&n.jsx(vc,{error:s,success:a,helperText:o,errorId:N,helperId:L})]})}));Se.displayName="Input";function ma({href:e,active:t}){const r=l.useMemo(()=>t!==void 0?t:!1,[t]),s=l.useMemo(()=>{try{const a=typeof require!="undefined"?require("next/link"):null;return a==null?void 0:a.default}catch(a){return}},[]);return{isActive:r,NextLink:s}}const yc=ve(k("inline-flex","items-center","transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","disabled:pointer-events-none","no-underline"),{variants:{variant:{default:k("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","focus:ring-line-brand"),underline:k("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","border-b-2","border-transparent","hover:border-current","focus:ring-line-brand"),background:k("text-fg-primary","hover:bg-surface-hover","rounded-md",J("md"),"focus:ring-line-brand")},size:{sm:k(E("sm","px"),E("xs","py"),re("bodySmall")),md:k(E("base","px"),E("sm","py"),re("body")),lg:k(E("lg","px"),E("md","py"),re("bodyLarge"))}},defaultVariants:{variant:"default",size:"md"},compoundVariants:[{variant:"underline",size:"sm",class:E("0.5","pb")},{variant:"underline",size:"md",class:E("xs","pb")},{variant:"underline",size:"lg",class:E("1.5","pb")},{variant:"background",size:"sm",class:E("xs","px")},{variant:"background",size:"md",class:E("sm","px")},{variant:"background",size:"lg",class:E("base","px")}]});function xs(m){var h=m,{href:e,children:t,active:r,disabled:s=!1,variant:a="default",size:o="md",as:i,className:u,"aria-label":d,onClick:c,onKeyDown:f}=h,p=O(h,["href","children","active","disabled","variant","size","as","className","aria-label","onClick","onKeyDown"]);const x=l.useMemo(()=>r!==void 0?r:!1,[r]),{NextLink:v}=ma({href:e,active:x}),y=i||v||"a",b=l.useMemo(()=>{if(!x)return"";switch(a){case"underline":return k("border-b-2","border-line-brand","text-fg-brand-emphasis");case"background":return k("bg-surface-brand-muted","text-fg-brand-emphasis");case"default":default:return k("text-fg-brand-emphasis","font-semibold")}},[x,a]),w=l.useCallback(j=>{if(s){j.preventDefault(),j.stopPropagation();return}c==null||c(j)},[s,c]),C=l.useCallback(j=>{if(s){(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),j.stopPropagation());return}f==null||f(j)},[s,f]),g=l.useMemo(()=>{const j=T({className:k(yc({variant:a,size:o}),b,s&&"opacity-50 cursor-not-allowed pointer-events-none",u),"aria-current":x?"page":void 0,"aria-disabled":s?!0:void 0,"aria-label":d,tabIndex:s?-1:void 0,onClick:w,onKeyDown:C,"data-active":x,"data-disabled":s},p);return v&&!i?z(T({},j),{href:s?void 0:e}):z(T({},j),{href:s?void 0:e})},[a,o,b,s,u,x,d,w,C,e,v,i,p]);return n.jsx(y,z(T({},g),{children:t}))}const wc=ve(k("inline-flex","items-center","justify-center",Pe("label"),J("md"),"border"),{variants:{variant:{success:"",warning:"",error:"",info:"",neutral:"",primary:"",secondary:""},size:{sm:k(E("1.5","px"),E("0.5","py"),re("caption")),md:k(E("sm","px"),E("xs","py"),re("caption")),lg:k(E("sm","px"),E("xs","py"),re("bodySmall"))},style:{solid:"",outline:""}},compoundVariants:[{variant:"success",style:"solid",class:k("bg-success-bg","text-success-dark","border-success")},{variant:"warning",style:"solid",class:k("bg-warning-bg","text-warning-dark","border-warning")},{variant:"error",style:"solid",class:k("bg-error-bg","text-error-dark","border-error")},{variant:"info",style:"solid",class:k("bg-info-bg","text-info-dark","border-info")},{variant:"neutral",style:"solid",class:k("bg-surface-muted","text-fg-primary","border-line-default")},{variant:"primary",style:"solid",class:k("bg-surface-brand-subtle","text-fg-brand-emphasis","border-line-brand")},{variant:"secondary",style:"solid",class:k("bg-pink-300","text-fg-brand-secondary-emphasis","border-line-secondary")},{variant:"success",style:"outline",class:k("bg-transparent","border-success","text-fg-success")},{variant:"warning",style:"outline",class:k("bg-transparent","border-warning","text-fg-warning")},{variant:"error",style:"outline",class:k("bg-transparent","border-error","text-fg-error")},{variant:"info",style:"outline",class:k("bg-transparent","border-info","text-fg-info")},{variant:"neutral",style:"outline",class:k("bg-transparent","border-line-default","text-fg-secondary")},{variant:"primary",style:"outline",class:k("bg-transparent","border-line-brand","text-fg-brand")},{variant:"secondary",style:"outline",class:k("bg-transparent","border-line-secondary","text-fg-brand-secondary")}],defaultVariants:{variant:"neutral",size:"md",style:"solid"}}),pa=l.memo(l.forwardRef(function(c,d){var f=c,{variant:t="neutral",size:r="md",style:s="solid",className:a="",children:o,"aria-label":i}=f,u=O(f,["variant","size","style","className","children","aria-label"]);const p=l.useMemo(()=>k(wc({variant:t,size:r,style:s}),a),[t,r,s,a]),m=l.useMemo(()=>{if(i)return i;if(typeof o=="string")return o;if(typeof o=="object"&&o!==null&&"props"in o){const h=o.props;if(h!=null&&h.children&&typeof h.children=="string")return h.children}},[i,o]);return n.jsx("span",z(T({ref:d,role:"status","aria-label":m,className:p},u),{children:o}))}));pa.displayName="Badge";const kc=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>k(E("xs","mt"),ce("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),u=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:u})}),jr=l.memo(l.forwardRef(function(x,h){var v=x,{options:t=[],optionGroups:r,placeholder:s,label:a,error:o=!1,success:i=!1,helperText:u,size:d="md",className:c="",disabled:f=!1,id:p}=v,m=O(v,["options","optionGroups","placeholder","label","error","success","helperText","size","className","disabled","id"]);const y=l.useMemo(()=>p||`select-${Math.random().toString(36).substr(2,9)}`,[p]),b=l.useMemo(()=>o?`${y}-error`:void 0,[o,y]),w=l.useMemo(()=>u?`${y}-helper`:void 0,[u,y]),C=l.useMemo(()=>"focus:border-line-focus",[]),g=l.useMemo(()=>"focus:border-error",[]),j=l.useMemo(()=>"focus:border-success",[]),N=l.useCallback(M=>M==="error"?g.replace("focus:border-","focus:ring-"):M==="success"?j.replace("focus:border-","focus:ring-"):C.replace("focus:border-","focus:ring-"),[g,j,C]),L=ve(k("block","w-full",J("md"),"border","bg-surface-base","transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{size:{sm:k("h-8",re("bodySmall"),E("md","px")),md:k("h-10",re("body"),E("base","px")),lg:k("h-12",re("bodyLarge"),E("lg","px"))},state:{default:k("border-line-default",N()),error:k("border-error",N("error")),success:k("border-success",N("success"))}},defaultVariants:{size:"md",state:"default"}}),S=l.useMemo(()=>o?"error":i?"success":"default",[o,i]),D=l.useMemo(()=>k(L({size:d,state:S}),c),[d,S,c]),A=l.useMemo(()=>k("block",ce("label"),E("xs","mb"),f&&"opacity-50"),[f]);return n.jsxs("div",{className:"w-full",children:[a&&n.jsx("label",{htmlFor:y,className:A,children:a}),n.jsxs("select",z(T({id:y,ref:h,className:D,disabled:f,"aria-invalid":o,"aria-required":m.required,"aria-describedby":b||w},m),{children:[s&&n.jsx("option",{value:"",disabled:!0,children:s}),r&&r.length>0?r.map((M,F)=>n.jsx("optgroup",{label:M.label,children:(M.options||[]).map(I=>n.jsx("option",{value:I.value,disabled:I.disabled,children:I.label},I.value))},F)):(t||[]).map(M=>n.jsx("option",{value:M.value,disabled:M.disabled,children:M.label},M.value))]})),(o||i||u)&&n.jsx(kc,{error:o,success:i,helperText:u,errorId:b,helperId:w})]})}));jr.displayName="Select";const ha=l.memo(l.forwardRef(function(d,u){var c=d,{error:t=!1,resize:r="vertical",className:s="",label:a,id:o}=c,i=O(c,["error","resize","className","label","id"]);const f=l.useId(),p=o!=null?o:f,m=l.useMemo(()=>"focus:border-line-focus",[]),h=l.useMemo(()=>"focus:border-error",[]),x=l.useMemo(()=>t?h.replace("focus:border-","focus:ring-"):m.replace("focus:border-","focus:ring-"),[t,h,m]),v=l.useMemo(()=>({none:"resize-none",both:"resize",horizontal:"resize-x",vertical:"resize-y"}),[]),y=l.useMemo(()=>k("block","w-full",J("md"),E("base","px"),E("md","py"),"border",re("body"),"focus:outline-none","focus:ring-2","focus:ring-offset-2",v[r],k(t?"border-error":"border-line-default",x),s),[r,v,t,x,s]),b=l.useMemo(()=>t?`${p}-error`:void 0,[t,p]),w=i["aria-label"],C=i["aria-labelledby"];l.useEffect(()=>{process.env.NODE_ENV==="production"||a||w||C||typeof document!="undefined"&&document.querySelector(`label[for="${CSS.escape(p)}"]`)||console.warn("[Textarea] Missing accessible name. Provide a `label` prop, `aria-label`, `aria-labelledby`, or pair an external `<Label htmlFor={id}>` with the same `id`.")},[a,w,C,p]);const g=n.jsx("textarea",T({ref:u,id:p,className:y,"aria-invalid":t,"aria-describedby":b},i));return a?n.jsxs("div",{className:"block w-full",children:[n.jsx("label",{htmlFor:p,className:k("block","mb-1",re("label"),"font-medium","text-fg-primary"),children:a}),g]}):g}));ha.displayName="Textarea";const Tt=l.memo(l.forwardRef(function(i,o){var u=i,{variant:t="default",className:r="",children:s}=u,a=O(u,["variant","className","children"]);const d=l.useMemo(()=>k("block",re("label"),Pe("label"),"text-fg-primary"),[]),c=l.useMemo(()=>({default:"",required:k("after:content-['*']",`after:${E("0.5","ml")}`,"after:text-fg-error"),optional:k("after:content-['(optional)']","after:ml-1","after:text-fg-tertiary","after:font-normal")}),[]),f=l.useMemo(()=>k(d,c[t],r),[d,c,t,r]);return n.jsx("label",z(T({ref:o,className:f},a),{children:s}))}));Tt.displayName="Label";function ba(a){var o=a,{message:e,id:t,className:r=""}=o,s=O(o,["message","id","className"]);const i=[E("xs","mt"),re("bodySmall"),"text-fg-error","flex","items-center",E("xs","gap")],u=k(...i,r);return n.jsxs("div",z(T({role:"alert",id:t,className:u,"aria-live":"polite"},s),{children:[n.jsx(bs,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),n.jsx("span",{children:e})]}))}class Fe{static createWidth(t){const s={none:{px:0,tailwind:"border-0"},thin:{px:1,tailwind:"border"},base:{px:1,tailwind:"border"},medium:{px:2,tailwind:"border-2"},thick:{px:4,tailwind:"border-4"}}[t];return{value:s.px,px:`${s.px}px`,tailwind:s.tailwind}}static create(t,r="solid"){return{width:this.createWidth(t),style:r,description:`${t} ${r} border`}}}Fe.create("none"),Fe.create("thin"),Fe.create("base"),Fe.create("medium"),Fe.create("thick"),Fe.create("thin","dashed"),Fe.create("base","dashed"),Fe.create("thin","dotted"),Fe.create("base","dotted");function jc(e){return Fe.createWidth(e).tailwind}function Bt(d){var c=d,{content:e,children:t,position:r="top",delay:s=200,className:a="","aria-label":o,preservePositioning:i=!1}=c,u=O(c,["content","children","position","delay","className","aria-label","preservePositioning"]);const[f,p]=l.useState(!1),m=l.useRef(null),h=l.useRef(null),x=l.useRef(null),v=`tooltip-${Math.random().toString(36).substr(2,9)}`,y=()=>{const A=setTimeout(()=>{p(!0)},s);m.current=A},b=()=>{m.current&&(clearTimeout(m.current),m.current=null),p(!1)},w=()=>{p(!0)},C=()=>{p(!1)},g=A=>{var M;A.key==="Escape"&&(p(!1),(M=x.current)==null||M.blur())};l.useEffect(()=>()=>{m.current&&(clearTimeout(m.current),m.current=null)},[]),l.useEffect(()=>{if(!f)return;const A=M=>{h.current&&!h.current.contains(M.target)&&x.current&&!x.current.contains(M.target)&&p(!1)};return document.addEventListener("mousedown",A),()=>{document.removeEventListener("mousedown",A)}},[f]);const j=A=>({top:"border-t-surface-inverse",bottom:"border-b-surface-inverse",left:"border-l-surface-inverse",right:"border-r-surface-inverse"})[A],N=ve(k("absolute",ue("tooltip"),E("sm","px"),E("xs","py"),re("caption"),"text-fg-inverse","bg-surface-inverse",J("md"),"shadow-lg","whitespace-nowrap"),{variants:{position:{top:k("bottom-full","left-1/2","transform","-translate-x-1/2",E("sm","mb")),bottom:k("top-full","left-1/2","transform","-translate-x-1/2",E("sm","mt")),left:k("right-full","top-1/2","transform","-translate-y-1/2",E("sm","mr")),right:k("left-full","top-1/2","transform","-translate-y-1/2",E("sm","ml"))}},defaultVariants:{position:"top"}}),L=ve(k("absolute","w-0","h-0",jc("thick"),"border-transparent"),{variants:{position:{top:k("top-full","left-1/2","transform","-translate-x-1/2",j("top")),bottom:k("bottom-full","left-1/2","transform","-translate-x-1/2",j("bottom")),left:k("left-full","top-1/2","transform","-translate-y-1/2",j("left")),right:k("right-full","top-1/2","transform","-translate-y-1/2",j("right"))}},defaultVariants:{position:"top"}}),S=l.isValidElement(t)?(()=>{const A=t,M=A.props,F=M.ref;return l.cloneElement(A,{ref:I=>{x.current=I,typeof F=="function"?F(I):F&&typeof F=="object"&&"current"in F&&(F.current=I)},"aria-describedby":f?v:M["aria-describedby"],onMouseEnter:I=>{var R;y(),(R=M.onMouseEnter)==null||R.call(M,I)},onMouseLeave:I=>{var R;b(),(R=M.onMouseLeave)==null||R.call(M,I)},onFocus:I=>{var R;w(),(R=M.onFocus)==null||R.call(M,I)},onBlur:I=>{var R;C(),(R=M.onBlur)==null||R.call(M,I)},onKeyDown:I=>{var R;g(I),(R=M.onKeyDown)==null||R.call(M,I)}})})():t,D=k(i?"static":"relative","inline-block",a);return n.jsxs("div",z(T({className:D},u),{children:[S,f&&n.jsxs("div",{ref:h,id:v,className:k(N({position:r})),role:"tooltip","aria-live":"polite",children:[e,n.jsx("div",{className:k(L({position:r})),"aria-hidden":"true"})]})]}))}function ga(u){var d=u,{variant:e="text",width:t,height:r,lines:s=1,className:a="","aria-label":o}=d,i=O(d,["variant","width","height","lines","className","aria-label"]);const c=["motion-safe:animate-pulse","bg-surface-muted",J("sm")],f={text:"h-4",card:"h-32",list:"h-12",circle:"rounded-full"},p=k(...c,f[e],a),m={};t&&(m.width=t),r&&(m.height=r);const h=o||`Loading ${e} content`;return e==="text"&&s>1?n.jsx("div",z(T({className:E("sm","space-y"),role:"status","aria-busy":"true","aria-label":h},i),{children:Array.from({length:s}).map((x,v)=>n.jsx("div",{className:p,style:v===s-1?{width:"75%"}:m,"aria-hidden":"true"},v))})):n.jsx("div",T({className:p,style:m,role:"status","aria-busy":"true","aria-label":h},i))}function Nc({defaultOpen:e=!0,open:t,onOpenChange:r,storageKey:s}){const a=l.useCallback(()=>{if(s&&typeof window!="undefined"){const f=localStorage.getItem(s);if(f!==null)return f==="true"}return e},[e,s]),[o,i]=l.useState(a),u=t!==void 0?t:o;l.useEffect(()=>{s&&typeof window!="undefined"&&t===void 0&&localStorage.setItem(s,String(o))},[o,s,t]);const d=l.useCallback(f=>{t===void 0&&i(f),r==null||r(f)},[t,r]),c=l.useCallback(()=>{d(!u)},[u,d]);return{isOpen:u,toggle:c,setOpen:d}}function xa(f){var p=f,{children:e,trigger:t,defaultOpen:r=!0,open:s,onOpenChange:a,disabled:o=!1,duration:i=200,storageKey:u,className:d=""}=p,c=O(p,["children","trigger","defaultOpen","open","onOpenChange","disabled","duration","storageKey","className"]);const{isOpen:m,toggle:h}=Nc({defaultOpen:r,open:s,onOpenChange:a,storageKey:u}),x=l.useRef(null),[v,y]=l.useState(m?"auto":0);l.useEffect(()=>{x.current&&y(m?x.current.scrollHeight:0)},[m,e]),l.useEffect(()=>{if(!m||!x.current)return;const w=new ResizeObserver(()=>{x.current&&m&&y(x.current.scrollHeight)});return w.observe(x.current),()=>{w.disconnect()}},[m]);const b=`collapsible-content-${Math.random().toString(36).substr(2,9)}`;return n.jsxs("div",z(T({className:d},c),{children:[n.jsx("button",{type:"button",onClick:h,onKeyDown:w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),o||h())},disabled:o,"aria-expanded":m,"aria-controls":b,"aria-disabled":o,className:k("w-full","text-left","focus:outline-none","focus:ring-2","focus:ring-line-brand","focus:ring-offset-2",J("md")),children:t}),n.jsx("div",{id:b,ref:x,style:{height:typeof v=="number"?`${v}px`:v,overflow:"hidden",transition:`height ${i}ms ease-in-out`},"aria-hidden":!m,children:n.jsx("div",{children:e})})]}))}const Nr=l.memo(l.forwardRef(function(f,c){var p=f,{id:t,label:r,error:s=!1,helperText:a,className:o="",disabled:i=!1,indeterminate:u=!1}=p,d=O(p,["id","label","error","helperText","className","disabled","indeterminate"]);const m=l.useMemo(()=>t||`checkbox-${Math.random().toString(36).substr(2,9)}`,[t]),h=l.useMemo(()=>s?`${m}-error`:void 0,[s,m]),x=l.useMemo(()=>a?`${m}-helper`:void 0,[a,m]),v=l.useMemo(()=>"focus:border-line-focus",[]),y=l.useMemo(()=>"focus:border-error",[]),b=l.useMemo(()=>s?y.replace("focus:border-","focus:ring-"):v.replace("focus:border-","focus:ring-"),[s,y,v]),w=l.useMemo(()=>k("h-4","w-4",J("sm"),"border","border-line-default","text-fg-brand","focus:ring-2",b,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",o),[b,s,o]),C=l.useMemo(()=>k(ce("label"),E("sm","ml"),i?"opacity-50 cursor-not-allowed":"cursor-pointer"),[i]),g=l.useRef(null),j=l.useCallback(N=>{g.current=N,typeof c=="function"?c(N):c&&(c.current=N),N&&(N.indeterminate=u)},[c,u]);return l.useEffect(()=>{g.current&&(g.current.indeterminate=u)},[u]),n.jsxs("div",{className:k("flex","flex-col",E("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",T({type:"checkbox",id:m,ref:j,className:w,disabled:i,"aria-invalid":s,"aria-describedby":h||x||void 0,"aria-label":r?void 0:"Checkbox"},d)),r&&n.jsx("label",{htmlFor:m,className:C,children:r})]}),(s||a)&&n.jsx("div",{id:h||x,className:k(E("xs","mt"),ce("caption"),s?"text-fg-error":"text-fg-secondary"),role:s?"alert":void 0,children:s?a||"This field has an error":a})]})}));Nr.displayName="Checkbox";const va=l.memo(l.forwardRef(function(c,d){var f=c,{id:t,label:r,error:s=!1,helperText:a,className:o="",disabled:i=!1}=f,u=O(f,["id","label","error","helperText","className","disabled"]);const p=l.useMemo(()=>t||`radio-${Math.random().toString(36).substr(2,9)}`,[t]),m=l.useMemo(()=>s?`${p}-error`:void 0,[s,p]),h=l.useMemo(()=>a?`${p}-helper`:void 0,[a,p]),x=l.useMemo(()=>"focus:border-line-focus",[]),v=l.useMemo(()=>"focus:border-error",[]),y=l.useMemo(()=>s?v.replace("focus:border-","focus:ring-"):x.replace("focus:border-","focus:ring-"),[s,v,x]),b=l.useMemo(()=>k("h-4","w-4","border","border-line-default","text-fg-brand","focus:ring-2",y,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",o),[y,s,o]),w=l.useMemo(()=>k(ce("label"),E("sm","ml"),i?"opacity-50 cursor-not-allowed":"cursor-pointer"),[i]);return n.jsxs("div",{className:k("flex","flex-col",E("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",T({type:"radio",id:p,ref:d,className:b,disabled:i,"aria-invalid":s,"aria-describedby":m||h||void 0,"aria-label":r?void 0:"Radio button"},u)),r&&n.jsx("label",{htmlFor:p,className:w,children:r})]}),(s||a)&&n.jsx("div",{id:m||h,className:k(E("xs","mt"),ce("caption"),s?"text-fg-error":"text-fg-secondary"),role:s?"alert":void 0,children:s?a||"This field has an error":a})]})}));va.displayName="Radio";class mt{static create(t){return{none:{value:"none",tailwind:"shadow-none",description:"No shadow"},sm:{value:"0 1px 2px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-sm",description:"Small shadow for subtle elevation"},md:{value:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",tailwind:"shadow-md",description:"Medium shadow for cards and elevated elements"},lg:{value:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",tailwind:"shadow-lg",description:"Large shadow for modals and dropdowns"},xl:{value:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",tailwind:"shadow-xl",description:"Extra large shadow for prominent modals"},"2xl":{value:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",tailwind:"shadow-2xl",description:"2X large shadow for maximum elevation"},inner:{value:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-inner",description:"Inner shadow for inset elements"}}[t]}}const Sc={none:mt.create("none"),sm:mt.create("sm"),md:mt.create("md"),lg:mt.create("lg"),xl:mt.create("xl"),"2xl":mt.create("2xl"),inner:mt.create("inner")};function $e(e){return Sc[e].tailwind}const Ot={track:{sm:{w:"w-9",h:"h-5"},md:{w:"w-11",h:"h-6"},lg:{w:"w-14",h:"h-7"}},thumb:{sm:{w:"w-4",h:"h-4"},md:{w:"w-5",h:"h-5"},lg:{w:"w-6",h:"h-6"}},translate:{sm:"translate-x-4",md:"translate-x-5",lg:"translate-x-7"}};function Cc(e){return{track:`${Ot.track[e].w} ${Ot.track[e].h}`,thumb:`${Ot.thumb[e].w} ${Ot.thumb[e].h}`,translate:Ot.translate[e]}}const $c=ve("w-full",{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},variant:{primary:"bg-surface-muted",secondary:"bg-surface-muted",success:"bg-success-bg-emphasis",error:"bg-error-bg-emphasis",warning:"bg-warning-bg-emphasis",info:"bg-info-bg-emphasis"}},defaultVariants:{size:"md",variant:"primary"}}),En=ve("transition-all",{variants:{variant:{primary:"bg-surface-brand",secondary:"bg-surface-secondary",success:"bg-success",error:"bg-error",warning:"bg-warning",info:"bg-info"}},defaultVariants:{variant:"primary"}}),vs=l.forwardRef(function(p,f){var m=p,{value:t,max:r=100,variant:s="primary",size:a="md",showLabel:o=!1,label:i,"aria-label":u,className:d=""}=m,c=O(m,["value","max","variant","size","showLabel","label","aria-label","className"]);const h=t===void 0,x=h?void 0:Math.min(Math.max(t/r*100,0),100),v=u||(h?"Loading in progress":`Progress: ${x==null?void 0:x.toFixed(0)}%`);return n.jsxs("div",z(T({ref:f,className:k("w-full",d)},c),{children:[o&&(i||!h)&&n.jsxs("div",{className:k("flex","items-center","justify-between",E("xs","mb")),children:[i&&n.jsx("span",{className:k(re("bodySmall"),Pe("label"),"text-fg-primary"),children:i}),!h&&x!==void 0&&n.jsxs("span",{className:k(re("bodySmall"),"text-fg-secondary"),children:[x.toFixed(0),"%"]})]}),n.jsx("div",{role:"progressbar","aria-valuemin":h?void 0:0,"aria-valuemax":h?void 0:r,"aria-valuenow":h?void 0:t,"aria-label":v,"aria-busy":h,className:k("relative","w-full","overflow-hidden",$c({size:a,variant:s}),J("full")),children:h?n.jsx("div",{className:k("absolute","top-0","left-0","bottom-0",En({variant:s}),J("full"),"motion-reduce:animate-none"),style:{width:"30%",animation:"progress-indeterminate 1.5s ease-in-out infinite"}}):n.jsx("div",{className:k("h-full",En({variant:s}),J("full"),"transition-all","duration-300","ease-out"),style:{width:`${x}%`},"aria-hidden":"true"})})]}))});vs.displayName="Progress";const ya=l.memo(l.forwardRef(function(h,m){var x=h,{size:t="md",label:r,description:s,error:a=!1,className:o="",disabled:i=!1,checked:u,defaultChecked:d,onChange:c,id:f}=x,p=O(x,["size","label","description","error","className","disabled","checked","defaultChecked","onChange","id"]);const v=u!==void 0,[y,b]=l.useState(d!=null?d:!1),w=v?!!u:y,C=l.useMemo(()=>f||`switch-${Math.random().toString(36).substr(2,9)}`,[f]),g=l.useMemo(()=>r?`${C}-label`:void 0,[r,C]),j=l.useMemo(()=>s?`${C}-description`:void 0,[s,C]),N=l.useMemo(()=>Cc(t),[t]),L=l.useMemo(()=>"focus:border-line-focus".replace("focus:border-","focus:ring-"),[]),S=l.useMemo(()=>k("relative","inline-flex","shrink-0","cursor-pointer","rounded-full","border-2","border-transparent",be("base"),"focus:outline-none","focus:ring-2",L,"focus:ring-offset-2",N.track,w?"bg-surface-brand":"bg-surface-muted",a&&!w&&"border-error",i&&"opacity-50 cursor-not-allowed",o),[L,N.track,w,a,i,o]),D=l.useMemo(()=>k("pointer-events-none","inline-block","rounded-full","bg-surface-base","shadow","transform",be("base"),N.thumb,w?N.translate:"translate-x-0"),[N.thumb,N.translate,w]);return n.jsxs("div",{className:k("flex","items-start",E("md","gap")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("button",{type:"button",className:S,role:"switch","aria-checked":w,"aria-labelledby":g,"aria-describedby":j,disabled:i,onClick:l.useCallback(A=>{if(i)return;const M=!w;if(v||b(M),c){const F=z(T({},A),{target:z(T({},A.target),{checked:M}),currentTarget:z(T({},A.currentTarget),{checked:M})});c(F)}},[i,c,w,v]),onKeyDown:l.useCallback(A=>{if(i||A.key!=="Enter"&&A.key!==" ")return;A.preventDefault();const M=!w;if(v||b(M),c){const F=z(T({},A),{target:z(T({},A.target),{checked:M}),currentTarget:z(T({},A.currentTarget),{checked:M})});c(F)}},[i,c,w,v]),children:n.jsx("span",{className:D})}),n.jsx("input",T({ref:m,type:"checkbox",id:C,checked:w,onChange:c!=null?c:(()=>{}),disabled:i,className:"sr-only","aria-hidden":"true",tabIndex:-1},p))]}),(r||s)&&n.jsxs("div",{className:"flex-1",children:[r&&n.jsx("label",{id:g,htmlFor:C,className:k("block",re("bodySmall"),Pe("label"),a?"text-fg-error":"text-fg-primary",i?"opacity-50":"cursor-pointer"),children:r}),s&&n.jsx("p",{id:j,className:k(E("xs","mt"),re("bodySmall"),a?"text-fg-error":"text-fg-secondary"),children:s})]})]})}));ya.displayName="Switch";const ys=l.memo(function(o){var i=o,{orientation:t="horizontal",variant:r="solid",className:s=""}=i,a=O(i,["orientation","variant","className"]);const u=l.useMemo(()=>{const d=["border-0","border-line-default"],c={horizontal:"w-full border-t",vertical:"h-full border-l self-stretch"},f={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted"};return k(...d,c[t],f[r],s)},[t,r,s]);return t==="vertical"?n.jsx("div",T({className:u,role:"separator","aria-orientation":"vertical"},a)):n.jsx("hr",T({className:u,role:"separator","aria-orientation":"horizontal"},a))});ys.displayName="Separator";const wa=l.forwardRef(function(b,y){var w=b,{value:t,defaultValue:r,min:s=0,max:a=100,step:o=1,variant:i="single",size:u="md",disabled:d=!1,showValue:c=!1,marks:f=[],onChange:p,onValueChange:m,label:h,className:x=""}=w,v=O(w,["value","defaultValue","min","max","step","variant","size","disabled","showValue","marks","onChange","onValueChange","label","className"]);const C=l.useRef(null),g=l.useId(),j=l.useId(),N=l.useId(),[L,S]=l.useState(r||(i==="range"?[s,a]:s)),[D,A]=l.useState(!1),[M,F]=l.useState(null),I=t!==void 0,R=I?t:L,W=V=>(V-s)/(a-s)*100,K=V=>{if(!C.current)return s;const X=C.current.getBoundingClientRect(),ae=Math.max(0,Math.min(1,(V-X.left)/X.width)),fe=s+ae*(a-s);return Math.round(fe/o)*o},H=(V,X="min")=>{if(d)return;V.preventDefault(),A(!0),F(X);const ae=ke=>{if(!C.current)return;const je=K(ke.clientX);U(je,X)},fe=()=>{A(!1),F(null),document.removeEventListener("mousemove",ae),document.removeEventListener("mouseup",fe)};document.addEventListener("mousemove",ae),document.addEventListener("mouseup",fe)},U=(V,X="min")=>{const ae=Math.max(s,Math.min(a,V));if(i==="range"){const[fe,ke]=Array.isArray(R)?R:[s,a];let je;X==="min"?je=[Math.min(ae,ke),ke]:je=[fe,Math.max(ae,fe)],I||S(je),p==null||p(je),m==null||m(je)}else I||S(ae),p==null||p(ae),m==null||m(ae)},oe=V=>{if(d||D)return;const X=K(V.clientX);U(X)},ne=()=>"focus:ring-line-brand ring-offset-2",P=ve(k("relative","cursor-pointer"),{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},defaultVariants:{size:"md",disabled:!1}}),G=ve(k("absolute","bg-surface-brand","rounded-full","border-2","border-white","shadow-md","cursor-grab","active:cursor-grabbing",be("base"),"-translate-x-1/2","-translate-y-1/2","top-1/2"),{variants:{size:{sm:"w-3 h-3",md:"w-4 h-4",lg:"w-5 h-5"},active:{true:ne(),false:""}},defaultVariants:{size:"md",active:!1}}),Y=typeof R=="number"?R:R[0],Q=Array.isArray(R)?R[0]:s,le=Array.isArray(R)?R[1]:Y,se=W(Q),_=W(le);return n.jsxs("div",z(T({ref:y,className:k("w-full",x)},v),{children:[n.jsxs("label",{id:g,className:k("block",re("bodySmall"),Pe("label"),"text-fg-primary",E("sm","mb")),children:[h,c&&n.jsx("span",{className:k(E("sm","ml"),"text-fg-secondary"),children:i==="range"?`${Q} - ${le}`:Y})]}),i==="range"&&n.jsxs(n.Fragment,{children:[n.jsx("span",{id:j,className:"sr-only",children:"minimum"}),n.jsx("span",{id:N,className:"sr-only",children:"maximum"})]}),n.jsxs("div",{ref:C,className:k(P({size:u,disabled:d}),"bg-surface-muted",J("full")),onClick:oe,role:i==="range"?void 0:"slider","aria-valuemin":i==="range"?void 0:s,"aria-valuemax":i==="range"?void 0:a,"aria-valuenow":i==="range"?void 0:Y,"aria-disabled":i==="range"?void 0:d,"aria-labelledby":i==="range"?void 0:g,children:[n.jsx("div",{className:k("absolute",P({size:u}),"bg-surface-brand",J("full"),be("base")),style:{left:`${se}%`,width:`${_-se}%`}}),f.map(V=>{const X=W(V);return n.jsx("div",{className:k("absolute","w-1","h-1","bg-line-strong",J("full"),"-translate-x-1/2"),style:{left:`${X}%`,top:"50%",transform:"translate(-50%, -50%)"}},V)}),i==="range"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:k(G({size:u,active:M==="min"})),style:{left:`${se}%`},onMouseDown:V=>H(V,"min"),role:"slider","aria-valuemin":s,"aria-valuemax":le,"aria-valuenow":Q,"aria-labelledby":`${g} ${j}`}),n.jsx("div",{className:k(G({size:u,active:M==="max"})),style:{left:`${_}%`},onMouseDown:V=>H(V,"max"),role:"slider","aria-valuemin":Q,"aria-valuemax":a,"aria-valuenow":le,"aria-labelledby":`${g} ${N}`})]}):n.jsx("div",{className:k(G({size:u,active:D})),style:{left:`${_}%`},onMouseDown:V=>H(V)}),c&&!h&&n.jsx("div",{className:"absolute -top-6 left-0 right-0 flex justify-center",children:n.jsx("span",{className:k(re("caption"),"text-fg-secondary","bg-surface-overlay",E("sm","px"),E("xs","py"),J("md"),"shadow"),children:i==="range"?`${Q} - ${le}`:Y})})]})]}))});wa.displayName="Slider";const Ec=ve(k("inline-flex","items-center","font-medium",J("full"),E("xs","gap")),{variants:{variant:{default:k("bg-surface-muted","text-fg-primary","border","border-line-default"),outlined:k("bg-transparent","text-fg-primary","border","border-line-default"),filled:k("bg-surface-brand-strong","text-fg-inverse","border","border-transparent")},size:{sm:k(E("xs","px"),E("xs","py"),re("caption")),md:k(E("sm","px"),E("xs","py"),re("bodySmall")),lg:k(E("md","px"),E("sm","py"),re("body"))},selected:{true:k("bg-surface-brand-strong","text-fg-inverse","border","border-line-brand"),false:""},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},compoundVariants:[{selected:!0,variant:"default",class:""},{selected:!0,variant:"outlined",class:""},{selected:!0,variant:"filled",class:""}],defaultVariants:{variant:"default",size:"md",selected:!1,disabled:!1}}),ws=l.forwardRef(function(h,m){var x=h,{children:t,variant:r="default",size:s="md",onRemove:a,selected:o=!1,disabled:i=!1,className:u="","aria-label":d,onClick:c,tabIndex:f}=x,p=O(x,["children","variant","size","onRemove","selected","disabled","className","aria-label","onClick","tabIndex"]);const y=(()=>{if(d)return d;if(typeof t=="string")return t;if(typeof t=="object"&&t!==null&&"props"in t){const g=t.props;if(g!=null&&g.children&&typeof g.children=="string")return g.children}})(),b=c!==void 0,w=b&&!i,C=g=>{i||(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),c==null||c())};return n.jsxs("div",z(T({ref:m,className:k(Ec({variant:r,size:s,selected:o,disabled:i}),a&&E("xs","pr"),u),"aria-disabled":i},p),{children:[b?n.jsx("button",{type:"button",onClick:i?void 0:c,onKeyDown:C,disabled:i,"aria-pressed":o?!0:void 0,"aria-label":d||y,tabIndex:f!==void 0?f:w?0:void 0,className:k("flex-1","bg-transparent","border-0","p-0","text-inherit","text-left","cursor-pointer","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-2",J("full")),children:t}):n.jsx("span",{children:t}),a&&!i&&n.jsx("button",{type:"button",onClick:g=>{g.stopPropagation(),a()},className:k(E("xs","ml"),"hover:bg-tint-hover",J("full"),E("xs","p"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-1"),"aria-label":`Remove ${y||"chip"}`,children:n.jsx(Ne,{className:"h-3 w-3","aria-hidden":"true"})})]}))});ws.displayName="Chip";const ur=l.forwardRef(function(f,c){var p=f,{src:t,alt:r,fallback:s,size:a="md",variant:o="circle","aria-label":i,className:u=""}=p,d=O(p,["src","alt","fallback","size","variant","aria-label","className"]);const[m,h]=l.useState(!1),[x,v]=l.useState(!1),y={xs:"h-6 w-6 text-xs",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-16 w-16 text-xl"},b={circle:"rounded-full",square:"rounded-none",rounded:"rounded-md"},w=!t||m,C=typeof s=="string"?s.toUpperCase().slice(0,2):s,g=i||r||"User avatar";return n.jsxs("div",z(T({ref:c,className:k("relative","inline-flex","items-center","justify-center","shrink-0","font-medium","overflow-hidden",y[a],b[o],"bg-surface-muted","text-fg-primary",u),role:"img","aria-label":g},d),{children:[!w&&t&&n.jsx("img",{src:t,alt:r||"",className:k("w-full","h-full","object-cover",o==="circle"?"rounded-full":o==="square"?"rounded-none":"rounded-md",x?"opacity-100":"opacity-0","transition-opacity","duration-200"),onLoad:()=>v(!0),onError:()=>{h(!0),v(!1)},"aria-hidden":"true"}),w&&n.jsx("span",{className:k("flex","items-center","justify-center","w-full","h-full",o==="circle"?"rounded-full":o==="square"?"rounded-none":"rounded-md"),"aria-hidden":"true",children:C||"?"})]}))});ur.displayName="Avatar";function Mc(u){var d=u,{children:e,max:t=3,size:r="md",variant:s="circle",spacing:a="md",className:o=""}=d,i=O(d,["children","max","size","variant","spacing","className"]);const c={none:"",sm:"-space-x-1",md:"-space-x-2",lg:"-space-x-3"},f=l.Children.toArray(e).filter(Boolean),p=f.slice(0,t),m=f.length-t;return n.jsxs("div",z(T({className:k("flex","items-center",c[a],o),role:"group","aria-label":`${f.length} avatars`},i),{children:[p.map((h,x)=>{let v=h;if(l.isValidElement(h)&&h.type===ur){const y=h.props;v=l.cloneElement(h,{size:y.size||r,variant:y.variant||s})}return n.jsx("div",{className:"ring-2 ring-surface-base",style:{zIndex:f.length-x},children:v},x)}),m>0&&n.jsx(ur,{size:r,variant:s,fallback:`+${m}`,"aria-label":`${m} more avatars`,className:"ring-2 ring-surface-base",style:{zIndex:0}})]}))}const fr=l.memo(function(c){var f=c,{variant:t="default",padding:r="medium",className:s="",onClick:a,"aria-label":o,"aria-labelledby":i,children:u}=f,d=O(f,["variant","padding","className","onClick","aria-label","aria-labelledby","children"]);const p=ve(k("bg-surface-base",J("lg"),"border","border-line-default","shadow-sm"),{variants:{variant:{default:"",hover:k("hover:shadow-md","transition-shadow","cursor-pointer"),selected:k("border-line-brand","shadow-md")},padding:{none:"",small:E("xs","p"),medium:E("base","p"),large:E("lg","p")}},defaultVariants:{variant:"default",padding:"medium"}}),m=l.useMemo(()=>a!==void 0,[a]),h=m?"button":void 0,x=m?0:void 0,v=k(p({variant:t,padding:r}),s),y=l.useCallback(b=>{m&&(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),a==null||a())},[m,a]);return n.jsx("div",z(T({className:v,role:h,tabIndex:x,onClick:a,onKeyDown:y,"aria-label":o,"aria-labelledby":i},d),{children:u}))});fr.displayName="Card";const Sr=l.createContext(void 0);function ks(){const e=l.useContext(Sr);if(e===void 0)throw new Error("useFormContext must be used within a Form component with react-hook-form integration");return e}function Tc(){return l.useContext(Sr)}function ka({form:e,loading:t=!1,children:r}){const s={form:e,loading:t};return n.jsx(Sr.Provider,{value:s,children:r})}function Ac(u){var d=u,{children:e,onSubmit:t,loading:r=!1,error:s=null,success:a=null,className:o=""}=d,i=O(d,["children","onSubmit","loading","error","success","className"]);const c=k(E("lg","gap"),"flex","flex-col",o);if("form"in i&&i.form!==void 0){const v=i,{form:b,onSubmit:w,onSubmitError:C}=v,g=O(v,["form","onSubmit","onSubmitError"]),j=b.handleSubmit(N=>rr(null,null,function*(){try{yield w(N)}catch(L){C==null||C(L)}}),N=>{C==null||C(N)});return n.jsx(ka,{form:b,loading:r,children:n.jsxs("form",z(T({className:c,onSubmit:j,noValidate:!0},g),{children:[e,s&&n.jsx("div",{role:"alert",className:k(E("md","p"),ye("sm"),"text-error-dark","bg-error-bg","border","border-error",J("md")),children:s}),a&&n.jsx("div",{role:"alert",className:k(E("md","p"),ye("sm"),"text-success-dark","bg-success-bg","border","border-success",J("md")),children:a})]}))})}const p=i.onSubmit||t,y=i,{onSubmit:m}=y,h=O(y,["onSubmit"]),x=b=>{b.preventDefault(),p&&!r&&p(b)};return n.jsxs("form",z(T({className:c,onSubmit:x,noValidate:!0},h),{children:[e,s&&n.jsx("div",{role:"alert",className:k(E("md","p"),ye("sm"),"text-error-dark","bg-error-bg","border","border-error",J("md")),children:s}),a&&n.jsx("div",{role:"alert",className:k(E("md","p"),ye("sm"),"text-success-dark","bg-success-bg","border","border-success",J("md")),children:a})]}))}function Rc({name:e,label:t,children:r,rules:s,className:a=""}){var m;const{form:o}=ks();if(!o)throw new Error("FormField must be used within a Form component with react-hook-form integration");const{register:i,formState:{errors:u},watch:d}=o,c=i(e,s),f=(m=u[e])==null?void 0:m.message,p=d(e);return n.jsxs("div",{className:k("flex","flex-col",E("sm","gap"),a),children:[t&&n.jsx(Tt,{htmlFor:e,className:k("block",ye("sm"),Mt("medium"),"text-fg-primary"),children:t}),r({name:e,register:h=>i(h,s),error:f,value:p,onChange:c.onChange,onBlur:c.onBlur}),f&&n.jsx(ba,{message:f})]})}var Ic=e=>e.type==="checkbox",Dc=e=>e instanceof Date,Ue=e=>e==null;const Fc=e=>typeof e=="object";var Ge=e=>!Ue(e)&&!Array.isArray(e)&&Fc(e)&&!Dc(e),Lc=e=>{const t=e.constructor&&e.constructor.prototype;return Ge(t)&&t.hasOwnProperty("isPrototypeOf")},ja=typeof window!="undefined"&&typeof window.HTMLElement!="undefined"&&typeof document!="undefined";function pt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList!="undefined"&&e instanceof FileList;if(ja&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(Ge(e)&&Lc(e)))return e;const s=r?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=pt(e[a]));return s}var js=e=>/^\w*$/.test(e),ze=e=>e===void 0,Na=e=>Array.isArray(e)?e.filter(Boolean):[],Ns=e=>Na(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Le=(e,t,r)=>{if(!t||!Ge(e))return r;const s=(js(t)?[t]:Ns(t)).reduce((a,o)=>Ue(a)?a:a[o],e);return ze(s)||s===e?ze(e[t])?r:e[t]:s},Sa=e=>typeof e=="boolean",_c=e=>typeof e=="function",mr=(e,t,r)=>{let s=-1;const a=js(t)?[t]:Ns(t),o=a.length,i=o-1;for(;++s<o;){const u=a[s];let d=r;if(s!==i){const c=e[u];d=Ge(c)||Array.isArray(c)?c:isNaN(+a[s+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;e[u]=d,e=e[u]}};const $t={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},He={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Ca=l.createContext(null);Ca.displayName="HookFormControlContext";const Pc=()=>l.useContext(Ca),zc=typeof window!="undefined"?l.useLayoutEffect:l.useEffect;var Je=e=>typeof e=="string";const Oc=l.createContext(null);Oc.displayName="HookFormContext";var Vc=(e,t,r,s,a)=>t?z(T({},r[e]),{types:z(T({},r[e]&&r[e].types?r[e].types:{}),{[s]:a||!0})}):{},_e=e=>Array.isArray(e)?e:[e],pr=e=>Ge(e)&&!Object.keys(e).length,Wc=e=>e.type==="file",Hc=e=>{if(!ja)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Uc=e=>e.type==="radio";function Bc(e,t){const r=t.slice(0,-1).length;let s=0;for(;s<r;)e=ze(e)?s++:e[t[s++]];return e}function qc(e){for(const t in e)if(e.hasOwnProperty(t)&&!ze(e[t]))return!1;return!0}function $a(e,t){const r=Array.isArray(t)?t:js(t)?[t]:Ns(t),s=r.length===1?e:Bc(e,r),a=r.length-1,o=r[a];return s&&delete s[o],a!==0&&(Ge(s)&&pr(s)||Array.isArray(s)&&qc(s))&&$a(e,r.slice(0,-1)),e}var Ea=e=>e instanceof RegExp,ir=e=>({isOnSubmit:!e||e===$t.onSubmit,isOnBlur:e===$t.onBlur,isOnChange:e===$t.onChange,isOnAll:e===$t.all,isOnTouch:e===$t.onTouched}),Gc=(e,t,r)=>t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length)));const os=(e,t,r,s)=>{for(const o of Object.keys(e)){const i=Le(e,o);if(i){const a=i,{_f:u}=a,d=O(a,["_f"]);if(u){if(u.refs&&u.refs[0]&&t(u.refs[0],o))return!0;if(u.ref&&t(u.ref,u.name))return!0;if(os(d,t))break}else if(Ge(d)&&os(d,t))break}}};var Kc=(e,t,r)=>{const s=_e(Le(e,r));return mr(s,"root",t[r]),mr(e,r,s),e};function Mn(e,t,r="validate"){if(Je(e)||Array.isArray(e)&&e.every(Je)||Sa(e)&&!e)return{type:r,message:Je(e)?e:"",ref:t}}var St=e=>Ge(e)&&!Ea(e)?e:{value:e,message:""},Yc=(e,t,r,s,a,o)=>rr(null,null,function*(){const{ref:i,refs:u,required:d,maxLength:c,minLength:f,min:p,max:m,pattern:h,validate:x,name:v,valueAsNumber:y,mount:b}=e._f,w=Le(r,v);if(!b||t.has(v))return{};const C=u?u[0]:i,g=D=>{a&&C.reportValidity&&(C.setCustomValidity(Sa(D)?"":D||""),C.reportValidity())},j={};Uc(i),Ic(i);const N=(y||Wc(i))&&ze(i.value)&&ze(w)||Hc(i)&&i.value===""||w===""||Array.isArray(w)&&!w.length,L=Vc.bind(null,v,s,j),S=(D,A,M,F=He.maxLength,I=He.minLength)=>{const R=D?A:M;j[v]=T({type:D?F:I,message:R,ref:i},L(D?F:I,R))};if(!Array.isArray(w)||!w.length){const{value:D,message:A}=Je(d)?{value:!!d,message:d}:St(d);if(D&&(j[v]=T({type:He.required,message:A,ref:C},L(He.required,A)),!s))return g(A),j}if(!N&&(!Ue(p)||!Ue(m))){let D,A;const M=St(m),F=St(p);if(!Ue(w)&&!isNaN(w)){const I=i.valueAsNumber||w&&+w;Ue(M.value)||(D=I>M.value),Ue(F.value)||(A=I<F.value)}else{const I=i.valueAsDate||new Date(w),R=H=>new Date(new Date().toDateString()+" "+H),W=i.type=="time",K=i.type=="week";Je(M.value)&&w&&(D=W?R(w)>R(M.value):K?w>M.value:I>new Date(M.value)),Je(F.value)&&w&&(A=W?R(w)<R(F.value):K?w<F.value:I<new Date(F.value))}if((D||A)&&(S(!!D,M.message,F.message,He.max,He.min),!s))return g(j[v].message),j}if((c||f)&&!N&&(Je(w)||Array.isArray(w))){const D=St(c),A=St(f),M=!Ue(D.value)&&w.length>+D.value,F=!Ue(A.value)&&w.length<+A.value;if((M||F)&&(S(M,D.message,A.message),!s))return g(j[v].message),j}if(h&&!N&&Je(w)){const{value:D,message:A}=St(h);if(Ea(D)&&!w.match(D)&&(j[v]=T({type:He.pattern,message:A,ref:i},L(He.pattern,A)),!s))return g(A),j}if(x){if(_c(x)){const D=yield x(w,r),A=Mn(D,C);if(A&&(j[v]=T(T({},A),L(He.validate,A.message)),!s))return g(A.message),j}else if(Ge(x)){let D={};for(const A in x){if(!pr(D)&&!s)break;const M=Mn(yield x[A](w,r),C,A);M&&(D=T(T({},M),L(A,M.message)),g(M.message),s&&(j[v]=D))}if(!pr(D)&&(j[v]=T({ref:C},D),!s))return j}}return g(!0),j}),Xe=()=>{if(typeof crypto!="undefined"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance=="undefined"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Kr=(e,t,r={})=>r.shouldFocus||ze(r.shouldFocus)?r.focusName||`${e}.${ze(r.focusIndex)?t:r.focusIndex}.`:"",Yr=(e,t)=>[...e,..._e(t)],Xr=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Jr(e,t,r){return[...e.slice(0,t),..._e(r),...e.slice(t)]}var Qr=(e,t,r)=>Array.isArray(e)?(ze(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Zr=(e,t)=>[..._e(t),..._e(e)];function Xc(e,t){let r=0;const s=[...e];for(const a of t)s.splice(a-r,1),r++;return Na(s).length?s:[]}var es=(e,t)=>ze(t)?[]:Xc(e,_e(t).sort((r,s)=>r-s)),ts=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Tn=(e,t,r)=>(e[t]=r,e);function Jc(e){const t=Pc(),{control:r=t,name:s,keyName:a="id",shouldUnregister:o,rules:i}=e,[u,d]=l.useState(r._getFieldArray(s)),c=l.useRef(r._getFieldArray(s).map(Xe)),f=l.useRef(!1);r._names.array.add(s),l.useMemo(()=>i&&u.length>=0&&r.register(s,i),[r,s,u.length,i]),zc(()=>r._subjects.array.subscribe({next:({values:g,name:j})=>{if(j===s||!j){const N=Le(g,s);Array.isArray(N)&&(d(N),c.current=N.map(Xe))}}}).unsubscribe,[r,s]);const p=l.useCallback(g=>{f.current=!0,r._setFieldArray(s,g)},[r,s]),m=(g,j)=>{const N=_e(pt(g)),L=Yr(r._getFieldArray(s),N);r._names.focus=Kr(s,L.length-1,j),c.current=Yr(c.current,N.map(Xe)),p(L),d(L),r._setFieldArray(s,L,Yr,{argA:Xr(g)})},h=(g,j)=>{const N=_e(pt(g)),L=Zr(r._getFieldArray(s),N);r._names.focus=Kr(s,0,j),c.current=Zr(c.current,N.map(Xe)),p(L),d(L),r._setFieldArray(s,L,Zr,{argA:Xr(g)})},x=g=>{const j=es(r._getFieldArray(s),g);c.current=es(c.current,g),p(j),d(j),!Array.isArray(Le(r._fields,s))&&mr(r._fields,s,void 0),r._setFieldArray(s,j,es,{argA:g})},v=(g,j,N)=>{const L=_e(pt(j)),S=Jr(r._getFieldArray(s),g,L);r._names.focus=Kr(s,g,N),c.current=Jr(c.current,g,L.map(Xe)),p(S),d(S),r._setFieldArray(s,S,Jr,{argA:g,argB:Xr(j)})},y=(g,j)=>{const N=r._getFieldArray(s);ts(N,g,j),ts(c.current,g,j),p(N),d(N),r._setFieldArray(s,N,ts,{argA:g,argB:j},!1)},b=(g,j)=>{const N=r._getFieldArray(s);Qr(N,g,j),Qr(c.current,g,j),p(N),d(N),r._setFieldArray(s,N,Qr,{argA:g,argB:j},!1)},w=(g,j)=>{const N=pt(j),L=Tn(r._getFieldArray(s),g,N);c.current=[...L].map((S,D)=>!S||D===g?Xe():c.current[D]),p(L),d([...L]),r._setFieldArray(s,L,Tn,{argA:g,argB:N},!0,!1)},C=g=>{const j=_e(pt(g));c.current=j.map(Xe),p([...j]),d([...j]),r._setFieldArray(s,[...j],N=>N,{},!0,!1)};return l.useEffect(()=>{if(r._state.action=!1,Gc(s,r._names)&&r._subjects.state.next(T({},r._formState)),f.current&&(!ir(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!ir(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([s]).then(g=>{r._updateIsValidating([s]);const j=Le(g.errors,s),N=Le(r._formState.errors,s);(N?!j&&N.type||j&&(N.type!==j.type||N.message!==j.message):j&&j.type)&&(j?mr(r._formState.errors,s,j):$a(r._formState.errors,s),r._subjects.state.next({errors:r._formState.errors}))});else{const g=Le(r._fields,s);g&&g._f&&!(ir(r._options.reValidateMode).isOnSubmit&&ir(r._options.mode).isOnSubmit)&&Yc(g,r._names.disabled,r._formValues,r._options.criteriaMode===$t.all,r._options.shouldUseNativeValidation).then(j=>!pr(j)&&r._subjects.state.next({errors:Kc(r._formState.errors,j,s)}))}r._subjects.state.next({name:s,values:pt(r._formValues)}),r._names.focus&&os(r._fields,(g,j)=>{if(r._names.focus&&j.startsWith(r._names.focus)&&g.focus)return g.focus(),1}),r._names.focus="",r._setValid(),f.current=!1},[u,s,r]),l.useEffect(()=>(!Le(r._formValues,s)&&r._setFieldArray(s),()=>{const g=(j,N)=>{const L=Le(r._fields,j);L&&L._f&&(L._f.mount=N)};r._options.shouldUnregister||o?r.unregister(s):g(s,!1)}),[s,r,a,o]),{swap:l.useCallback(y,[p,s,r]),move:l.useCallback(b,[p,s,r]),prepend:l.useCallback(h,[p,s,r]),append:l.useCallback(m,[p,s,r]),remove:l.useCallback(x,[p,s,r]),insert:l.useCallback(v,[p,s,r]),update:l.useCallback(w,[p,s,r]),replace:l.useCallback(C,[p,s,r]),fields:l.useMemo(()=>u.map((g,j)=>z(T({},g),{[a]:c.current[j]||Xe()})),[u,a])}}function Qc(e){const{form:t}=ks();if(!t)throw new Error("useFormFieldArray must be used within a Form component with react-hook-form integration");return Jc(z(T({},e),{control:t.control}))}function Ma(a){var o=a,{items:e,separator:t="/",className:r=""}=o,s=O(o,["items","separator","className"]);const i=["flex","items-center",E("sm","space-x"),re("bodySmall")],u=k(...i,r);return n.jsx("nav",z(T({"aria-label":"Breadcrumb",className:u},s),{children:n.jsx("ol",{className:k("flex","items-center",E("sm","space-x")),children:e.map((d,c)=>{const f=c===e.length-1;return n.jsxs("li",{className:"flex items-center",children:[c>0&&n.jsx("span",{className:k(E("sm","mx"),"text-fg-tertiary"),"aria-hidden":"true",children:t}),f?n.jsx("span",{className:k("text-fg-primary",Pe("label")),"aria-current":"page",children:d.label}):d.href?n.jsx("a",{href:d.href,className:k("inline-flex","items-center",E("xs","px"),E("xs","pt"),"border-b-2","border-transparent",re("bodySmall"),Pe("label"),"transition-colors","text-fg-secondary","hover:border-line-emphasis","hover:text-fg-primary"),children:d.label}):n.jsx("span",{className:"text-fg-secondary",children:d.label})]},c)})})}))}function Ta(d){var c=d,{currentPage:e,totalPages:t,onPageChange:r,totalItems:s,itemsPerPage:a,showPageInfo:o=!0,className:i=""}=c,u=O(c,["currentPage","totalPages","onPageChange","totalItems","itemsPerPage","showPageInfo","className"]);const f=()=>{e>1&&r(e-1)},p=()=>{e<t&&r(e+1)},m=b=>{b>=1&&b<=t&&b!==e&&r(b)},h=()=>{const b=[];if(t<=5)for(let C=1;C<=t;C++)b.push(C);else if(e<=3){for(let C=1;C<=4;C++)b.push(C);b.push("ellipsis"),b.push(t)}else if(e>=t-2){b.push(1),b.push("ellipsis");for(let C=t-3;C<=t;C++)b.push(C)}else{b.push(1),b.push("ellipsis");for(let C=e-1;C<=e+1;C++)b.push(C);b.push("ellipsis"),b.push(t)}return b},x=s&&a?(e-1)*a+1:void 0,v=s&&a?Math.min(e*a,s):void 0,y=k("flex","items-center","justify-between",E("base","px"),E("md","py"),i);return n.jsxs("nav",z(T({className:y,"aria-label":"Pagination"},u),{children:[n.jsxs("div",{className:k("flex","items-center",E("sm","gap")),children:[n.jsx(Z,{variant:"secondary",onClick:f,disabled:e===1,size:"sm",children:"Previous"}),n.jsx("div",{className:k("flex","items-center",E("xs","gap")),children:h().map((b,w)=>{if(b==="ellipsis")return n.jsx("span",{className:k(E("sm","px"),"text-fg-tertiary"),children:"..."},`ellipsis-${w}`);const C=b,g=C===e;return n.jsx(Z,{variant:g?"primary":"ghost",onClick:()=>m(C),size:"sm","aria-current":g?"page":void 0,"aria-label":`Go to page ${C}`,children:C},C)})}),n.jsx(Z,{variant:"secondary",onClick:p,disabled:e===t,size:"sm",children:"Next"})]}),o&&s&&a&&n.jsxs("div",{className:k(ye("sm"),"text-fg-primary"),children:["Showing ",x," to ",v," of ",s," results"]})]}))}function Aa(d){var c=d,{title:e,message:t,actionLabel:r,onAction:s,illustration:a,variant:o="default",className:i=""}=c,u=O(c,["title","message","actionLabel","onAction","illustration","variant","className"]);const f=k("flex","flex-col","items-center","justify-center","text-center",E("xl","py"),E("base","px"),i),p=o==="withAction"||r&&s,m=o==="withIllustration"||a;return n.jsxs("div",z(T({className:f,role:"status","aria-live":"polite","aria-label":`${e}. ${t}`},u),{children:[m&&a&&n.jsx("div",{className:k(E("base","mb")),"aria-hidden":"true",children:a}),n.jsx(Be,{as:"h3",className:k(re("h4"),Mt("semibold"),"text-fg-primary",E("sm","mb")),children:e}),n.jsx(Be,{as:"p",className:k(re("bodySmall"),"text-fg-secondary",E("md","mb"),"max-w-sm"),children:t}),p&&r&&s&&n.jsx(Z,{variant:"primary",onClick:s,children:r})]}))}function Ra(u){var d=u,{trigger:e,items:t,align:r="right",variant:s="default",className:a="","aria-label":o}=d,i=O(d,["trigger","items","align","variant","className","aria-label"]);const[c,f]=l.useState(!1),[p,m]=l.useState(-1),h=l.useRef(null),x=l.useRef(null),v=l.useRef(null),y=l.useRef([]),b=`dropdown-menu-${Math.random().toString(36).substr(2,9)}`,w=`dropdown-trigger-${Math.random().toString(36).substr(2,9)}`;l.useEffect(()=>{const S=D=>{h.current&&!h.current.contains(D.target)&&(f(!1),m(-1))};return c&&(document.addEventListener("mousedown",S),setTimeout(()=>{var A;const D=t.findIndex(M=>!M.disabled);D>=0&&(m(D),(A=y.current[D])==null||A.focus())},0)),()=>{document.removeEventListener("mousedown",S)}},[c,t]),l.useEffect(()=>{if(!c)return;const S=A=>{var I,R,W,K;const M=t.map((H,U)=>({item:H,index:U})).filter(({item:H})=>!H.disabled),F=M.findIndex(({index:H})=>H===p);switch(A.key){case"ArrowDown":{A.preventDefault();const H=F<M.length-1?M[F+1].index:M[0].index;m(H),(I=y.current[H])==null||I.focus();break}case"ArrowUp":{A.preventDefault();const H=F>0?M[F-1].index:M[M.length-1].index;m(H),(R=y.current[H])==null||R.focus();break}case"Home":{A.preventDefault();const H=M[0].index;m(H),(W=y.current[H])==null||W.focus();break}case"End":{A.preventDefault();const H=M[M.length-1].index;m(H),(K=y.current[H])==null||K.focus();break}case"Enter":case" ":A.preventDefault(),p>=0&&!t[p].disabled&&C(t[p]);break;case"Escape":A.preventDefault(),f(!1),m(-1),setTimeout(()=>{var H;(H=x.current)==null||H.focus()},0);break}},D=v.current;if(D){const A=S;return D.addEventListener("keydown",A),()=>{D.removeEventListener("keydown",A)}}},[c,p,t]);const C=S=>{S.disabled||(S.onClick(),f(!1),m(-1),setTimeout(()=>{var D;(D=x.current)==null||D.focus()},0))},g=()=>{f(!c),m(-1)},j=S=>{(S.key==="Enter"||S.key===" "||S.key==="ArrowDown")&&(S.preventDefault(),f(!0))},N=r==="right"?"right-0":"left-0",L=l.isValidElement(e)?l.cloneElement(e,{onClick:S=>{g(),e.props.onClick&&e.props.onClick(S)},onKeyDown:S=>{j(S),e.props.onKeyDown&&e.props.onKeyDown(S)},"aria-haspopup":"menu","aria-expanded":c,"aria-controls":b,"aria-label":o||e.props["aria-label"]||"Open menu",id:w,ref:S=>{x.current=S,typeof e.ref=="function"?e.ref(S):e.ref&&(e.ref.current=S)}}):n.jsx("div",{ref:x,onClick:g,onKeyDown:j,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":c,"aria-controls":b,"aria-label":o||"Open menu",id:w,children:e});return n.jsxs("div",z(T({className:k("relative","inline-block",a),ref:h},i),{children:[L,c&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:k("fixed","inset-0","z-10"),onClick:()=>{f(!1),m(-1)},"aria-hidden":"true"}),n.jsx("div",{ref:v,id:b,className:k("absolute","z-20",E("sm","mt"),"w-48",J("md"),$e("lg"),"bg-surface-overlay","ring-1","ring-line-strong","ring-opacity-5",N),role:"menu","aria-orientation":"vertical","aria-labelledby":w,"aria-activedescendant":p>=0?`${b}-item-${p}`:void 0,children:n.jsx("div",{className:k(E("xs","py")),role:"none",children:t.map((S,D)=>{const A=k("block",E("base","px"),E("xs","py"),re("bodySmall"),"w-full","text-left","focus:outline-none",S.disabled?k("text-fg-disabled","cursor-not-allowed","opacity-50"):S.variant==="danger"?k("text-error-dark","hover:bg-error-bg-emphasis","focus:bg-error-bg-emphasis"):k("text-fg-primary","hover:bg-surface-hover","focus:bg-surface-hover"));return n.jsx("button",{id:`${b}-item-${D}`,ref:M=>{y.current[D]=M},type:"button",className:A,onClick:()=>C(S),disabled:S.disabled,role:"menuitem","aria-disabled":S.disabled,tabIndex:S.disabled?-1:p===D?0:-1,children:S.label},D)})})})]})]}))}const Ia=l.createContext(void 0);function Da(){const e=l.useContext(Ia);if(!e)throw new Error("DatePicker components must be used within a DatePicker component");return e}function is({children:e,mode:t="single",value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:u,locale:d}){const c=()=>{if(r!==void 0)return null;if(s){if(t==="single"&&s instanceof Date)return s;if(t==="range"&&typeof s=="object"&&"start"in s)return null}return null},f=()=>r!==void 0?null:s&&t==="range"&&typeof s=="object"&&"start"in s?s:{start:null,end:null},[p,m]=l.useState(c()),[h,x]=l.useState(f()),v=t==="single"?r instanceof Date?r:p:null,y=t==="range"?r&&typeof r=="object"&&"start"in r?r:h:null,C={selectedDate:v,selectedRange:y,mode:t,onDateChange:g=>{t==="single"&&(r===void 0&&m(g),a==null||a(g))},onRangeChange:g=>{t==="range"&&(r===void 0&&x(g),a==null||a(g))},minDate:o,maxDate:i,disabledDates:u,locale:d};return n.jsx(Ia.Provider,{value:C,children:e})}function Vt(e,t="yyyy-MM-dd"){const r=e.getFullYear(),s=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(r)).replace("MM",s).replace("dd",a).replace("MM/dd/yyyy",`${s}/${a}/${r}`).replace("dd/MM/yyyy",`${a}/${s}/${r}`)}function An(e){if(!e)return null;const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(t){const[,a,o,i]=t,u=new Date(parseInt(a),parseInt(o)-1,parseInt(i));if(!isNaN(u.getTime()))return u}const r=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(r){const[,a,o,i]=r,u=new Date(parseInt(i),parseInt(a)-1,parseInt(o));if(!isNaN(u.getTime()))return u}const s=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(s){const[,a,o,i]=s,u=new Date(parseInt(i),parseInt(o)-1,parseInt(a));if(!isNaN(u.getTime()))return u}return null}function Ss(u){var d=u,{placeholder:e="Select date",format:t="yyyy-MM-dd",showCalendarButton:r=!0,"aria-label":s,onFocus:a,className:o=""}=d,i=O(d,["placeholder","format","showCalendarButton","aria-label","onFocus","className"]);const{selectedDate:c,selectedRange:f,mode:p,onDateChange:m}=Da(),[h,x]=l.useState(""),[v,y]=l.useState(!1),b=l.useRef(null);l.useEffect(()=>{p==="single"&&c?x(Vt(c,t)):p==="range"&&f?f.start&&f.end?x(`${Vt(f.start,t)} - ${Vt(f.end,t)}`):f.start?x(Vt(f.start,t)):x(""):x("")},[c,f,p,t]);const w=j=>{const N=j.target.value;if(x(N),p==="single"){const L=An(N);m(L)}},C=()=>{if(y(!1),h&&p==="single"){const j=An(h);j&&x(Vt(j,t))}},g=()=>{var j;(j=b.current)==null||j.focus()};return n.jsx("div",z(T({className:`relative ${o}`},i),{children:n.jsx(Se,{ref:b,type:"text",value:h,onChange:w,onFocus:()=>{y(!0),a==null||a()},onBlur:C,placeholder:e,"aria-label":s||e,rightIcon:r?n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:g,"aria-label":"Open calendar",type:"button",children:n.jsx(Tl,{className:"h-4 w-4"})}):void 0})}))}function Zc(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function ed(e){return new Date(e.getFullYear(),e.getMonth(),1).getDay()}function ht(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Wt(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function td(e,t,r){if(!t||!r)return!1;const s=e.getTime();return s>=t.getTime()&&s<=r.getTime()}function Rn(e,t,r,s){return!!(t&&e<t||r&&e>r||s!=null&&s.some(a=>ht(e,a)))}const rd=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],sd=["January","February","March","April","May","June","July","August","September","October","November","December"];function Cs(a){var o=a,{month:e,onMonthChange:t,className:r=""}=o,s=O(o,["month","onMonthChange","className"]);const{selectedDate:i,selectedRange:u,mode:d,onDateChange:c,onRangeChange:f,minDate:p,maxDate:m,disabledDates:h}=Da(),[x,v]=l.useState(e||i||(u==null?void 0:u.start)||new Date),y=l.useRef(null),[b,w]=l.useState(()=>{const F=new Date,I=e||i||(u==null?void 0:u.start)||F;return i&&Wt(i,I)?i:Wt(F,I)?F:new Date(I.getFullYear(),I.getMonth(),1)});l.useEffect(()=>{e&&v(e)},[e]),l.useEffect(()=>{if(!y.current)return;const F=y.current.querySelector(`[data-date="${b.toISOString()}"]`);F&&F.focus()},[b]);const C=(()=>{if(Wt(b,x))return b;const F=new Date;return Wt(F,x)?F:new Date(x.getFullYear(),x.getMonth(),1)})(),g=Zc(x),j=ed(x),N=[];for(let F=0;F<j;F++)N.push(null);for(let F=1;F<=g;F++)N.push(new Date(x.getFullYear(),x.getMonth(),F));const L=F=>{if(!Rn(F,p,m,h)){if(d==="single")c(F);else if(d==="range"){const I=u||{start:null,end:null};!I.start||I.start&&I.end?f({start:F,end:null}):I.start&&!I.end&&(F<I.start?f({start:F,end:I.start}):f({start:I.start,end:F}))}}},S=()=>{const F=new Date(x.getFullYear(),x.getMonth()-1,1);v(F),t==null||t(F)},D=()=>{const F=new Date(x.getFullYear(),x.getMonth()+1,1);v(F),t==null||t(F)},A=(F,I)=>{let R=null;switch(F.key){case"ArrowLeft":F.preventDefault(),R=new Date(I.getFullYear(),I.getMonth(),I.getDate()-1);break;case"ArrowRight":F.preventDefault(),R=new Date(I.getFullYear(),I.getMonth(),I.getDate()+1);break;case"ArrowUp":F.preventDefault(),R=new Date(I.getFullYear(),I.getMonth(),I.getDate()-7);break;case"ArrowDown":F.preventDefault(),R=new Date(I.getFullYear(),I.getMonth(),I.getDate()+7);break;case"Home":F.preventDefault(),R=new Date(I.getFullYear(),I.getMonth(),1);break;case"End":F.preventDefault(),R=new Date(I.getFullYear(),I.getMonth()+1,0);break;case"Enter":case" ":F.preventDefault(),L(I);return}R&&(Wt(R,x)||v(new Date(R.getFullYear(),R.getMonth(),1)),w(R))},M=[];for(let F=0;F<N.length;F+=7)M.push(N.slice(F,F+7));return n.jsxs("div",z(T({ref:y,className:`p-4 ${r}`},s),{children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:S,"aria-label":"Previous month",children:n.jsx(Ut,{className:"h-4 w-4"})}),n.jsxs("div",{className:"text-sm font-semibold",children:[sd[x.getMonth()]," ",x.getFullYear()]}),n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:D,"aria-label":"Next month",children:n.jsx(bt,{className:"h-4 w-4"})})]}),n.jsxs("div",{role:"grid","aria-label":"Calendar",children:[n.jsx("div",{role:"row",className:"grid grid-cols-7 gap-1 mb-2",children:rd.map(F=>n.jsx("div",{role:"columnheader",className:"text-center text-xs font-medium text-fg-tertiary py-1",children:F},F))}),M.map((F,I)=>n.jsx("div",{role:"row",className:"grid grid-cols-7 gap-1",children:F.map((R,W)=>{if(!R)return n.jsx("div",{role:"gridcell",className:"aspect-square"},`empty-${I}-${W}`);const K=d==="single"?ht(R,i):ht(R,(u==null?void 0:u.start)||null)||ht(R,(u==null?void 0:u.end)||null),H=d==="range"&&u?td(R,u.start,u.end):!1,U=Rn(R,p,m,h),oe=ht(R,new Date),ne=ht(R,b),P=ht(R,C);return n.jsx("button",{role:"gridcell",type:"button","data-date":R.toISOString(),tabIndex:P?0:-1,onClick:()=>L(R),onKeyDown:G=>A(G,R),className:`
6
+ <%s key={someKey} {...props} />`,J,z,V,z),H[z+J]=!0)}if(z=null,ee!==void 0&&(r(ee),z=""+ee),i(Y)&&(r(Y.key),z=""+Y.key),"key"in Y){ee={};for(var q in Y)q!=="key"&&(ee[q]=Y[q])}else ee=Y;return z&&c(ee,typeof _=="function"?_.displayName||_.name||"Unknown":_),d(_,z,ee,a(),te,ae)}function p(_){b(_)?_._store&&(_._store.validated=1):typeof _=="object"&&_!==null&&_.$$typeof===T&&(_._payload.status==="fulfilled"?b(_._payload.value)&&_._payload.value._store&&(_._payload.value._store.validated=1):_._store&&(_._store.validated=1))}function b(_){return typeof _=="object"&&_!==null&&_.$$typeof===x}var g=l,x=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),v=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),F=Symbol.for("react.client.reference"),M=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=Object.prototype.hasOwnProperty,D=Array.isArray,O=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(_){return _()}};var B,X={},Q=g.react_stack_bottom_frame.bind(g,o)(),oe=O(s(o)),H={};zt.Fragment=y,zt.jsx=function(_,Y,ee){var J=1e4>M.recentlyCreatedOwnerStacks++;return f(_,Y,ee,!1,J?Error("react-stack-top-frame"):Q,J?O(s(_)):oe)},zt.jsxs=function(_,Y,ee){var J=1e4>M.recentlyCreatedOwnerStacks++;return f(_,Y,ee,!0,J?Error("react-stack-top-frame"):Q,J?O(s(_)):oe)}})()),zt}var Tn;function wl(){return Tn||(Tn=1,process.env.NODE_ENV==="production"?nr.exports=vl():nr.exports=yl()),nr.exports}var n=wl();const ba=l.createContext(void 0);function ha({children:e,defaultTheme:t="light",storageKey:r="theme"}){const[s,a]=l.useState(()=>{if(typeof window=="undefined")return t;try{const d=localStorage.getItem(r);if(d==="light"||d==="dark")return d}catch(d){console.warn("Failed to read theme from localStorage:",d)}return t});l.useEffect(()=>{if(typeof window!="undefined"){try{localStorage.setItem(r,s)}catch(d){console.warn("Failed to save theme to localStorage:",d)}typeof document!="undefined"&&(document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add(s))}},[s,r]);const u={theme:s,toggleTheme:()=>{a(d=>d==="light"?"dark":"light")},setTheme:d=>{a(d)},colors:s==="light"?Ut:xr,isDark:s==="dark"};return n.jsx(ba.Provider,{value:u,children:e})}function kl(){const e=l.useContext(ba);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}const jl={breakpoints:vr,spacing:gr,typography:vt,animations:ml,features:{reducedMotion:!1,highContrast:!1,debug:!1},behavior:{defaultAnimationDuration:200,defaultTransitionDuration:150,focusVisible:!0}},ga=l.createContext(void 0);function xa({children:e,config:t,strategy:r="default"}){const s=l.useMemo(()=>{const d=A({},jl);return t?P(A(A({},d),t),{breakpoints:t.breakpoints||d.breakpoints,spacing:t.spacing||d.spacing,typography:t.typography||d.typography,animations:t.animations||d.animations,features:A(A({},d.features),t.features),behavior:A(A({},d.behavior),t.behavior)}):d},[t]);l.useEffect(()=>{typeof document!="undefined"&&(s.features.reducedMotion?document.documentElement.style.setProperty("--motion-reduce","1"):document.documentElement.style.removeProperty("--motion-reduce"))},[s.features.reducedMotion]),l.useEffect(()=>{typeof document!="undefined"&&(s.features.highContrast?document.documentElement.classList.add("high-contrast"):document.documentElement.classList.remove("high-contrast"))},[s.features.highContrast]);const a=l.useMemo(()=>d=>s.spacing[d],[s.spacing]),o=l.useMemo(()=>d=>s.breakpoints[d],[s.breakpoints]),i=l.useMemo(()=>d=>{var f;return(f=s.features[d])!=null?f:!1},[s.features]),c=l.useMemo(()=>d=>{console.warn("ConfigProvider: updateConfig called but config is immutable. Consider using state management for dynamic updates.")},[]),u={config:s,getSpacing:a,getBreakpoint:o,isFeatureEnabled:i,updateConfig:c};return n.jsx(ga.Provider,{value:u,children:e})}function Nl(){const e=l.useContext(ga);if(e===void 0)throw new Error("useConfig must be used within a ConfigProvider");return e}const yr=l.createContext(void 0);function hs(){const e=l.useContext(yr);if(!e)throw new Error("Toast components must be used within a ToastProvider");return e}function Sl(){return l.useContext(yr)}function va({children:e,defaultDuration:t=5e3,maxToasts:r=5}){const[s,a]=l.useState([]),o=l.useCallback(d=>{var b;const f=`toast-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,p=P(A({},d),{id:f,duration:(b=d.duration)!=null?b:t});return a(g=>[p,...g].slice(0,r)),f},[t,r]),i=l.useCallback(d=>{a(f=>f.filter(p=>p.id!==d))},[]),c=l.useCallback(()=>{a([])},[]),u={toasts:s,addToast:o,removeToast:i,clearAll:c};return n.jsx(yr.Provider,{value:u,children:e})}const wr=l.createContext(void 0);function Lt(){const e=l.useContext(wr);if(!e)throw new Error("Dialog components must be used within a Dialog component");return e}function $l(){return l.useContext(wr)}function kr(e){const t=l.useRef(null);l.useEffect(()=>{var r;if(e)t.current=(r=document.activeElement)!=null?r:null;else{const s=t.current,a=setTimeout(()=>{s==null||s.focus()},0);return()=>clearTimeout(a)}},[e])}function gs({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,titleId:a,descriptionId:o}){const[i,c]=l.useState(r),u=t!==void 0?t:i,d=p=>{t===void 0&&c(p),s==null||s(p)};kr(u),l.useEffect(()=>(u?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[u]);const f={isOpen:u,onOpenChange:d,onClose:()=>d(!1),titleId:a,descriptionId:o};return n.jsx(wr.Provider,{value:f,children:e})}const Cl={ThemeProvider:ha,ConfigProvider:xa,ToastProvider:va,DialogProvider:gs},ar=Cl;function El(e,t){const{theme:r,config:s,toast:a,dialog:o,providers:i={theme:!0,config:!0,toast:!0,dialog:!0}}=t||{};let c=e;return i.dialog&&(c=n.jsx(ar.DialogProvider,P(A({},o),{children:c}))),i.toast&&(c=n.jsx(ar.ToastProvider,P(A({},a),{children:c}))),i.config&&(c=n.jsx(ar.ConfigProvider,P(A({},s),{children:c}))),i.theme&&(c=n.jsx(ar.ThemeProvider,P(A({},r),{children:c}))),c}function Ml({children:e,config:t}){const r=l.useMemo(()=>El(e,t),[e,t]);return n.jsx(n.Fragment,{children:r})}function Tl(){return{}}class Qe{static create(t){const s={none:{px:0,tailwind:"rounded-none",description:"No border radius"},sm:{px:2,tailwind:"rounded-sm",description:"Small radius (2px) for subtle rounding"},md:{px:6,tailwind:"rounded-md",description:"Medium radius (6px) for buttons and inputs"},lg:{px:8,tailwind:"rounded-lg",description:"Large radius (8px) for cards and containers"},xl:{px:12,tailwind:"rounded-xl",description:"Extra large radius (12px) for prominent elements"},"2xl":{px:16,tailwind:"rounded-2xl",description:"2X large radius (16px) for large containers"},"3xl":{px:24,tailwind:"rounded-3xl",description:"3X large radius (24px) for very large containers"},full:{px:9999,tailwind:"rounded-full",description:"Full radius for circular elements"}}[t];return{value:s.px,rem:`${s.px/16}rem`,px:`${s.px}px`,tailwind:s.tailwind,description:s.description}}}const Al={none:Qe.create("none"),sm:Qe.create("sm"),md:Qe.create("md"),lg:Qe.create("lg"),xl:Qe.create("xl"),"2xl":Qe.create("2xl"),"3xl":Qe.create("3xl"),full:Qe.create("full")};function U(e){return Al[e].tailwind}function Rl(s){var a=s,{variant:e="info",className:t}=a,r=W(a,["variant","className"]);const o={warning:j("bg-warning-bg","text-warning-dark","border-warning"),error:j("bg-error-bg","text-error-dark","border-error"),info:j("bg-info-bg","text-info-dark","border-info")};return n.jsx("div",A({role:"alert",className:j("border",m("base","px"),m("sm","py"),U("lg"),o[e],t)},r))}const Il={primary:{light:"text-indigo-400",DEFAULT:"text-fg-brand",dark:"text-indigo-600",contrast:"text-fg-inverse"},secondary:{light:"text-pink-300",DEFAULT:"text-fg-brand-secondary",dark:"text-pink-600",contrast:"text-fg-inverse"},success:{light:"text-green-300",DEFAULT:"text-fg-success",dark:"text-success-dark",contrast:"text-fg-inverse"},warning:{light:"text-yellow-300",DEFAULT:"text-fg-warning",dark:"text-warning-dark",contrast:"text-fg-inverse"},error:{light:"text-red-300",DEFAULT:"text-fg-error",dark:"text-error-dark",contrast:"text-fg-inverse"},info:{light:"text-blue-300",DEFAULT:"text-fg-info",dark:"text-info-dark",contrast:"text-fg-inverse"},neutral:{light:"text-fg-tertiary",DEFAULT:"text-fg-secondary",dark:"text-fg-primary",contrast:"text-fg-inverse"}};function Dl(d,u){var f=d,{variant:e="paragraph",bold:t,italic:r,className:s,as:a,colorRole:o="neutral",colorShade:i="dark"}=f,c=W(f,["variant","bold","italic","className","as","colorRole","colorShade"]);const p=[];let b;if(a)b=a;else switch(e){case"heading":b="h2";break;case"list":b="li";break;default:b="p";break}return e==="heading"?p.push(de("h2")):e==="body"||e==="paragraph"?p.push(de("body")):e==="bodySmall"?p.push(de("bodySmall")):e==="bodyLarge"?p.push(de("bodyLarge")):e==="caption"?p.push(de("caption")):e==="label"?p.push(de("label")):p.push(de("body")),t&&p.push("font-bold"),r&&p.push("italic"),p.push(Il[o][i]),n.jsx(b,A({ref:u,className:j(...p,s)},c))}const Ue=l.forwardRef(Dl);const ya=(...e)=>e.filter((t,r,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===r).join(" ").trim();const Fl=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Ll=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,s)=>s?s.toUpperCase():r.toLowerCase());const An=e=>{const t=Ll(e);return t.charAt(0).toUpperCase()+t.slice(1)};var qr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const _l=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},Pl=l.createContext({}),zl=()=>l.useContext(Pl),Ol=l.forwardRef((d,u)=>{var f=d,{color:e,size:t,strokeWidth:r,absoluteStrokeWidth:s,className:a="",children:o,iconNode:i}=f,c=W(f,["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"]);var h,k,$;const{size:p=24,strokeWidth:b=2,absoluteStrokeWidth:g=!1,color:x="currentColor",className:w=""}=(h=zl())!=null?h:{},y=(s!=null?s:g)?Number(r!=null?r:b)*24/Number(t!=null?t:p):r!=null?r:b;return l.createElement("svg",A(A(P(A({ref:u},qr),{width:(k=t!=null?t:p)!=null?k:qr.width,height:($=t!=null?t:p)!=null?$:qr.height,stroke:e!=null?e:x,strokeWidth:y,className:ya("lucide",w,a)}),!o&&!_l(c)&&{"aria-hidden":"true"}),c),[...i.map(([v,S])=>l.createElement(v,S)),...Array.isArray(o)?o:[o]])});const le=(e,t)=>{const r=l.forwardRef((i,o)=>{var c=i,{className:s}=c,a=W(c,["className"]);return l.createElement(Ol,A({ref:o,iconNode:t,className:ya(`lucide-${Fl(An(e))}`,`lucide-${e}`,s)},a))});return r.displayName=An(e),r};const Vl=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Wl=le("calendar",Vl);const Hl=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],os=le("check",Hl);const Bl=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],jr=le("chevron-down",Bl);const Ul=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Bt=le("chevron-left",Ul);const Gl=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],xt=le("chevron-right",Gl);const Kl=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],xs=le("circle-alert",Kl);const Yl=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],cr=le("circle-check",Yl);const ql=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Xl=le("clock",ql);const Jl=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],Ql=le("command",Jl);const Zl=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],ec=le("download",Zl);const tc=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],rc=le("ellipsis-vertical",tc);const sc=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],nc=le("eye-off",sc);const ac=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],oc=le("eye",ac);const ic=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],lc=le("file",ic);const cc=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],dc=le("funnel",cc);const uc=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],fc=le("grip-vertical",uc);const mc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],pc=le("info",mc);const bc=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],wa=le("loader-circle",bc);const hc=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],gc=le("menu",hc);const xc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],vc=le("panel-left-close",xc);const yc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],wc=le("panel-left-open",yc);const kc=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],is=le("search",kc);const jc=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],$t=le("star",jc);const Nc=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Sc=le("triangle-alert",Nc);const $c=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Cc=le("upload",$c);const Ec=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Se=le("x",Ec),Mc=ke("motion-safe:animate-spin",{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-8 w-8"},variant:{primary:"text-fg-brand",secondary:"text-fg-brand-secondary",neutral:"text-fg-secondary"}},defaultVariants:{size:"md",variant:"primary"}}),vs=l.memo(function(i){var c=i,{size:t="md",variant:r="primary",label:s,className:a=""}=c,o=W(c,["size","variant","label","className"]);return n.jsxs("div",P(A({className:j("inline-flex","items-center",a),role:"status","aria-label":s||"Loading","aria-live":"polite"},o),{children:[n.jsx(wa,{className:j(Mc({size:t,variant:r})),"aria-hidden":"true"}),s&&n.jsx("span",{className:j(m("sm","ml"),se("bodySmall"),"text-fg-secondary","sr-only"),children:s})]}))});vs.displayName="Spinner";const Tc=ke(j("inline-flex","items-center","justify-center",de("button").split(" ")[2]||"font-medium",U("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{primary:j("bg-surface-brand-strong","text-fg-inverse","hover:opacity-90","focus:ring-line-brand"),secondary:j("bg-surface-secondary","text-fg-inverse","hover:opacity-90","focus:ring-line-secondary"),error:j("bg-error","text-fg-inverse","hover:opacity-90","focus:ring-error"),outline:j("border-2","border-line-default","bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),ghost:j("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),iconOnly:j("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus",m("none","p"))},size:{sm:j(m("md","px"),m("1.5","py"),se("bodySmall"),m("1.5","gap")),md:j(m("base","px"),m("sm","py"),se("body"),m("sm","gap")),lg:j(m("lg","px"),m("md","py"),se("bodyLarge"),m("2.5","gap"))}},compoundVariants:[{variant:"iconOnly",size:"sm",class:j("h-8","w-8",m("none","p"))},{variant:"iconOnly",size:"md",class:j("h-10","w-10",m("none","p"))},{variant:"iconOnly",size:"lg",class:j("h-12","w-12",m("none","p"))}],defaultVariants:{variant:"primary",size:"md"}});function Rn({children:e,position:t}){return e?n.jsx("span",{className:`inline-flex items-center ${t==="left"?m("none","mr"):m("none","ml")}`,children:e}):null}const Z=l.memo(l.forwardRef(function(y,w){var h=y,{variant:t="primary",size:r="md",isLoading:s=!1,loadingText:a,loadingIcon:o,leftIcon:i,rightIcon:c,fullWidth:u=!1,as:d="button",className:f="",disabled:p=!1,children:b,"aria-label":g}=h,x=W(h,["variant","size","isLoading","loadingText","loadingIcon","leftIcon","rightIcon","fullWidth","as","className","disabled","children","aria-label"]);const k=l.useMemo(()=>j(Tc({variant:t,size:r}),u&&"w-full",f),[t,r,u,f]),$=l.useMemo(()=>t==="iconOnly"||!b&&(i||c),[t,b,i,c]),v=l.useMemo(()=>$&&!g&&!b?"Button":g,[$,g,b]),S=l.useMemo(()=>t==="error"?"primary":t==="primary"||t==="secondary"?"neutral":"primary",[t]),N=l.useMemo(()=>r==="sm"?"sm":r==="lg"?"lg":"md",[r]),I=l.useMemo(()=>o||n.jsx(vs,{size:N,variant:S}),[o,N,S]),C=d==="button"&&!x.type?"button":void 0,T=A(A({className:k,disabled:p||s,"aria-busy":s,"aria-label":v,"aria-disabled":p||s},C?{type:C}:{}),x);return n.jsx(d,P(A({ref:w},T),{children:s?n.jsxs(n.Fragment,{children:[I,a&&n.jsx("span",{className:m("sm","ml"),children:a}),!a&&b&&n.jsx("span",{className:`${m("sm","ml")} opacity-0`,children:b})]}):n.jsxs(n.Fragment,{children:[i&&n.jsx(Rn,{position:"left",children:i}),b,c&&n.jsx(Rn,{position:"right",children:c})]})}))}));Z.displayName="Button";const Ac=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>j(m("xs","mt"),de("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),c=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:c})}),$e=l.memo(l.forwardRef(function($,k){var v=$,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,size:i="md",variant:c="outlined",leftIcon:u,rightIcon:d,showClearButton:f=!1,onClear:p,className:b="",disabled:g=!1,type:x="text",value:w,onChange:y}=v,h=W(v,["id","label","error","success","helperText","size","variant","leftIcon","rightIcon","showClearButton","onClear","className","disabled","type","value","onChange"]);const S=l.useId(),N=t||`input-${S}`,I=l.useMemo(()=>s?`${N}-error`:void 0,[s,N]),C=l.useMemo(()=>o?`${N}-helper`:void 0,[o,N]),[T,L]=l.useState(!1),F=l.useMemo(()=>x==="password",[x]),M=l.useMemo(()=>F&&T?"text":x,[F,T,x]),R=l.useMemo(()=>s?"error":a?"success":"default",[s,a]),D=l.useMemo(()=>w!=null&&w!=="",[w]),O=l.useMemo(()=>f&&D&&!g,[f,D,g]),B=l.useMemo(()=>"focus:border-line-focus",[]),X=l.useMemo(()=>"focus:border-error",[]),Q=l.useMemo(()=>"focus:border-success",[]),oe=l.useMemo(()=>B.replace("focus:border-","focus:ring-"),[B]),H=l.useCallback(V=>V==="error"?X.replace("focus:border-","focus:ring-"):Q.replace("focus:border-","focus:ring-"),[X,Q]),_=l.useMemo(()=>ke(j("w-full",U("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{default:j("border-0","border-b-2","border-line-default","focus:border-line-focus"),outlined:j("border","border-line-default","focus:border-line-focus"),filled:j("bg-surface-muted","border-0","focus:bg-surface-base","focus:ring-2",oe)},size:{sm:j("h-8",se("bodySmall"),m("md","px")),md:j("h-10",se("body"),m("base","px")),lg:j("h-12",se("bodyLarge"),m("lg","px"))},state:{default:"",error:j("border-error","focus:border-error",H("error")),success:j("border-success","focus:border-success",H("success"))}},defaultVariants:{variant:"outlined",size:"md",state:"default"}}),[oe,H]),Y=l.useMemo(()=>j(_({variant:c,size:i,state:R}),u&&(i==="sm"?"pl-9":m(i==="lg"?"3xl":"2xl","pl")),(d||O||F)&&(i==="sm"?"pr-9":m(i==="lg"?"3xl":"2xl","pr")),b),[_,c,i,R,u,d,O,F,b]),ee=l.useMemo(()=>j("block",de("label"),m("xs","mb"),g&&"opacity-50"),[g]),J=l.useMemo(()=>i==="sm"?"h-4 w-4":i==="lg"?"h-5 w-5":"h-4 w-4",[i]),te=l.useMemo(()=>i==="sm"?"top-2":i==="lg"?"top-3.5":"top-2.5",[i]),ae=l.useCallback(V=>{var q;if(V.stopPropagation(),p)p();else if(y){const ce=(q=V.currentTarget.closest(".relative"))==null?void 0:q.querySelector("input");if(ce){const ie={target:ce,currentTarget:ce,bubbles:!0,cancelable:!0,defaultPrevented:!1,eventPhase:2,isTrusted:!1,nativeEvent:new Event("change"),preventDefault:()=>{},stopPropagation:()=>{},persist:()=>{},timeStamp:Date.now()};Object.defineProperty(ie.target,"value",{value:"",writable:!0}),Object.defineProperty(ie.currentTarget,"value",{value:"",writable:!0}),y(ie)}}},[p,y]),z=l.useCallback(()=>{L(V=>!V)},[]);return n.jsxs("div",{className:"w-full",children:[r&&n.jsx("label",{htmlFor:N,className:ee,children:r}),n.jsxs("div",{className:"relative",children:[u&&n.jsx("div",{className:`absolute left-3 ${te} text-fg-secondary opacity-60 pointer-events-none`,children:n.jsx("div",{className:J,children:u})}),n.jsx("input",A({id:N,ref:k,type:M,className:Y,disabled:g,value:w,onChange:y,"aria-invalid":s,"aria-required":h.required,"aria-describedby":I||C,suppressHydrationWarning:!0},h)),n.jsxs("div",{className:`absolute right-3 top-0 bottom-0 flex items-center ${m("xs","gap")}`,children:[O&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:ae,className:`h-auto ${m("xs","p")}`,"aria-label":"Clear input",children:n.jsx(Se,{className:J})}),F&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:z,className:`h-auto ${m("xs","p")}`,"aria-label":T?"Hide password":"Show password",children:T?n.jsx(nc,{className:J}):n.jsx(oc,{className:J})}),d&&!O&&!F&&n.jsx("div",{className:`text-fg-secondary opacity-60 pointer-events-none ${J}`,children:d})]})]}),(s||a||o)&&n.jsx(Ac,{error:s,success:a,helperText:o,errorId:I,helperId:C})]})}));$e.displayName="Input";function ka({href:e,active:t}){return{isActive:l.useMemo(()=>t!==void 0?t:!1,[t]),NextLink:void 0}}const Rc=ke(j("inline-flex","items-center","transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","disabled:pointer-events-none","no-underline"),{variants:{variant:{default:j("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","focus:ring-line-brand"),underline:j("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","border-b-2","border-transparent","hover:border-current","focus:ring-line-brand"),background:j("text-fg-primary","hover:bg-surface-hover",U("md"),"focus:ring-line-brand")},size:{sm:j(m("sm","px"),m("xs","py"),se("bodySmall")),md:j(m("base","px"),m("sm","py"),se("body")),lg:j(m("lg","px"),m("md","py"),se("bodyLarge"))}},defaultVariants:{variant:"default",size:"md"},compoundVariants:[{variant:"underline",size:"sm",class:m("0.5","pb")},{variant:"underline",size:"md",class:m("xs","pb")},{variant:"underline",size:"lg",class:m("1.5","pb")},{variant:"background",size:"sm",class:m("xs","px")},{variant:"background",size:"md",class:m("sm","px")},{variant:"background",size:"lg",class:m("base","px")}]}),Nr=l.forwardRef(function(x,g){var w=x,{href:t,children:r,active:s,disabled:a=!1,variant:o="default",size:i="md",as:c,className:u,"aria-label":d,onClick:f,onKeyDown:p}=w,b=W(w,["href","children","active","disabled","variant","size","as","className","aria-label","onClick","onKeyDown"]);const y=l.useMemo(()=>s!==void 0?s:!1,[s]),{NextLink:h}=ka({href:t,active:y}),k=c||h||"a",$=l.useMemo(()=>{if(!y)return"";switch(o){case"underline":return j("border-b-2","border-line-brand","text-fg-brand-emphasis");case"background":return j("bg-surface-brand-muted","text-fg-brand-emphasis");default:return j("text-fg-brand-emphasis","font-semibold")}},[y,o]),v=l.useCallback(I=>{if(a){I.preventDefault(),I.stopPropagation();return}f==null||f(I)},[a,f]),S=l.useCallback(I=>{if(a){(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),I.stopPropagation());return}p==null||p(I)},[a,p]),N=l.useMemo(()=>{const I=A({className:j(Rc({variant:o,size:i}),$,a&&"opacity-50 cursor-not-allowed pointer-events-none",u),"aria-current":y?"page":void 0,"aria-disabled":a?!0:void 0,"aria-label":d,tabIndex:a?-1:void 0,onClick:v,onKeyDown:S,"data-active":y,"data-disabled":a},b);return h&&!c?P(A({},I),{href:a?void 0:t}):P(A({},I),{href:a?void 0:t})},[o,i,$,a,u,y,d,v,S,t,h,c,b]);return n.jsx(k,P(A({ref:g},N),{children:r}))});Nr.displayName="NavLink";const Ic=ke(j("inline-flex","items-center","justify-center",Pe("label"),U("md"),"border"),{variants:{variant:{success:"",warning:"",error:"",info:"",neutral:"",primary:"",secondary:""},size:{sm:j(m("1.5","px"),m("0.5","py"),se("caption")),md:j(m("sm","px"),m("xs","py"),se("caption")),lg:j(m("sm","px"),m("xs","py"),se("bodySmall"))},style:{solid:"",outline:""}},compoundVariants:[{variant:"success",style:"solid",class:j("bg-success-bg","text-success-dark","border-success")},{variant:"warning",style:"solid",class:j("bg-warning-bg","text-warning-dark","border-warning")},{variant:"error",style:"solid",class:j("bg-error-bg","text-error-dark","border-error")},{variant:"info",style:"solid",class:j("bg-info-bg","text-info-dark","border-info")},{variant:"neutral",style:"solid",class:j("bg-surface-muted","text-fg-primary","border-line-default")},{variant:"primary",style:"solid",class:j("bg-surface-brand-subtle","text-fg-brand-emphasis","border-line-brand")},{variant:"secondary",style:"solid",class:j("bg-pink-300","text-fg-brand-secondary-emphasis","border-line-secondary")},{variant:"success",style:"outline",class:j("bg-transparent","border-success","text-fg-success")},{variant:"warning",style:"outline",class:j("bg-transparent","border-warning","text-fg-warning")},{variant:"error",style:"outline",class:j("bg-transparent","border-error","text-fg-error")},{variant:"info",style:"outline",class:j("bg-transparent","border-info","text-fg-info")},{variant:"neutral",style:"outline",class:j("bg-transparent","border-line-default","text-fg-secondary")},{variant:"primary",style:"outline",class:j("bg-transparent","border-line-brand","text-fg-brand")},{variant:"secondary",style:"outline",class:j("bg-transparent","border-line-secondary","text-fg-brand-secondary")}],defaultVariants:{variant:"neutral",size:"md",style:"solid"}}),ja=l.memo(l.forwardRef(function(d,u){var f=d,{variant:t="neutral",size:r="md",style:s="solid",className:a="",children:o,"aria-label":i}=f,c=W(f,["variant","size","style","className","children","aria-label"]);const p=l.useMemo(()=>j(Ic({variant:t,size:r,style:s}),a),[t,r,s,a]),b=l.useMemo(()=>{if(i)return i;if(typeof o=="string")return o;if(typeof o=="object"&&o!==null&&"props"in o){const g=o.props;if(g!=null&&g.children&&typeof g.children=="string")return g.children}},[i,o]);return n.jsx("span",P(A({ref:u,role:"status","aria-label":b,className:p},c),{children:o}))}));ja.displayName="Badge";const Dc=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>j(m("xs","mt"),de("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),c=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:c})}),Sr=l.memo(l.forwardRef(function(x,g){var w=x,{options:t=[],optionGroups:r,placeholder:s,label:a,error:o=!1,success:i=!1,helperText:c,size:u="md",className:d="",disabled:f=!1,id:p}=w,b=W(w,["options","optionGroups","placeholder","label","error","success","helperText","size","className","disabled","id"]);const y=l.useId(),h=p||`select-${y}`,k=l.useMemo(()=>o?`${h}-error`:void 0,[o,h]),$=l.useMemo(()=>c?`${h}-helper`:void 0,[c,h]),v=l.useMemo(()=>"focus:border-line-focus",[]),S=l.useMemo(()=>"focus:border-error",[]),N=l.useMemo(()=>"focus:border-success",[]),I=l.useCallback(M=>M==="error"?S.replace("focus:border-","focus:ring-"):M==="success"?N.replace("focus:border-","focus:ring-"):v.replace("focus:border-","focus:ring-"),[S,N,v]),C=l.useMemo(()=>ke(j("block","w-full",U("md"),"border","bg-surface-base","transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{size:{sm:j("h-8",se("bodySmall"),m("md","px")),md:j("h-10",se("body"),m("base","px")),lg:j("h-12",se("bodyLarge"),m("lg","px"))},state:{default:j("border-line-default",I()),error:j("border-error",I("error")),success:j("border-success",I("success"))}},defaultVariants:{size:"md",state:"default"}}),[I]),T=l.useMemo(()=>o?"error":i?"success":"default",[o,i]),L=l.useMemo(()=>j(C({size:u,state:T}),d),[C,u,T,d]),F=l.useMemo(()=>j("block",de("label"),m("xs","mb"),f&&"opacity-50"),[f]);return n.jsxs("div",{className:"w-full",children:[a&&n.jsx("label",{htmlFor:h,className:F,children:a}),n.jsxs("select",P(A({id:h,ref:g,className:L,disabled:f,"aria-invalid":o,"aria-required":b.required,"aria-describedby":k||$},b),{children:[s&&n.jsx("option",{value:"",disabled:!0,children:s}),r&&r.length>0?r.map((M,R)=>n.jsx("optgroup",{label:M.label,children:(M.options||[]).map(D=>n.jsx("option",{value:D.value,disabled:D.disabled,children:D.label},D.value))},R)):(t||[]).map(M=>n.jsx("option",{value:M.value,disabled:M.disabled,children:M.label},M.value))]})),(o||i||c)&&n.jsx(Dc,{error:o,success:i,helperText:c,errorId:k,helperId:$})]})}));Sr.displayName="Select";const Na=l.memo(l.forwardRef(function(f,d){var p=f,{error:t=!1,success:r=!1,resize:s="vertical",className:a="",label:o,helperText:i,id:c}=p,u=W(p,["error","success","resize","className","label","helperText","id"]);const b=l.useId(),g=c!=null?c:b,x=l.useMemo(()=>"focus:border-line-focus",[]),w=l.useMemo(()=>"focus:border-error",[]),y=l.useMemo(()=>t?w.replace("focus:border-","focus:ring-"):x.replace("focus:border-","focus:ring-"),[t,w,x]),h=l.useMemo(()=>({none:"resize-none",both:"resize",horizontal:"resize-x",vertical:"resize-y"}),[]),k=l.useMemo(()=>j("block","w-full",U("md"),m("base","px"),m("md","py"),"border",se("body"),"focus:outline-none","focus:ring-2","focus:ring-offset-2",h[s],j(t?"border-error":r?"border-success":"border-line-default",y),a),[s,h,t,r,y,a]),$=l.useMemo(()=>i?`${g}-helper`:void 0,[i,g]),v=l.useMemo(()=>$!=null?$:t?`${g}-error`:void 0,[$,t,g]),S=u["aria-label"],N=u["aria-labelledby"];l.useEffect(()=>{},[o,S,N,g]);const I=n.jsx("textarea",A({ref:d,id:g,className:k,"aria-invalid":t,"aria-describedby":v},u)),C=i?n.jsx("p",{id:$,className:j(m("xs","mt"),se("bodySmall"),t?"text-fg-error":r?"text-fg-success":"text-fg-secondary"),children:i}):null;return!o&&!C?I:n.jsxs("div",{className:"block w-full",children:[o&&n.jsx("label",{htmlFor:g,className:j("block",m("xs","mb"),se("label"),"font-medium","text-fg-primary"),children:o}),I,C]})}));Na.displayName="Textarea";const Rt=l.memo(l.forwardRef(function(i,o){var c=i,{variant:t="default",className:r="",children:s}=c,a=W(c,["variant","className","children"]);const u=l.useMemo(()=>j("block",se("label"),Pe("label"),"text-fg-primary"),[]),d=l.useMemo(()=>({default:"",required:j("after:content-['*']",`after:${m("0.5","ml")}`,"after:text-fg-error"),optional:j("after:content-['(optional)']",`after:${m("xs","ml")}`,"after:text-fg-tertiary","after:font-normal")}),[]),f=l.useMemo(()=>j(u,d[t],r),[u,d,t,r]);return n.jsx("label",P(A({ref:o,className:f},a),{children:s}))}));Rt.displayName="Label";function Sa(a){var o=a,{message:e,id:t,className:r=""}=o,s=W(o,["message","id","className"]);const i=[m("xs","mt"),se("bodySmall"),"text-fg-error","flex","items-center",m("xs","gap")],c=j(...i,r);return n.jsxs("div",P(A({role:"alert",id:t,className:c,"aria-live":"polite"},s),{children:[n.jsx(xs,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),n.jsx("span",{children:e})]}))}class Fe{static createWidth(t){const s={none:{px:0,tailwind:"border-0"},thin:{px:1,tailwind:"border"},base:{px:1,tailwind:"border"},medium:{px:2,tailwind:"border-2"},thick:{px:4,tailwind:"border-4"}}[t];return{value:s.px,px:`${s.px}px`,tailwind:s.tailwind}}static create(t,r="solid"){return{width:this.createWidth(t),style:r,description:`${t} ${r} border`}}}Fe.create("none"),Fe.create("thin"),Fe.create("base"),Fe.create("medium"),Fe.create("thick"),Fe.create("thin","dashed"),Fe.create("base","dashed"),Fe.create("thin","dotted"),Fe.create("base","dotted");function Fc(e){return Fe.createWidth(e).tailwind}class ht{static create(t){return{none:{value:"none",tailwind:"shadow-none",description:"No shadow"},sm:{value:"0 1px 2px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-sm",description:"Small shadow for subtle elevation"},md:{value:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",tailwind:"shadow-md",description:"Medium shadow for cards and elevated elements"},lg:{value:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",tailwind:"shadow-lg",description:"Large shadow for modals and dropdowns"},xl:{value:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",tailwind:"shadow-xl",description:"Extra large shadow for prominent modals"},"2xl":{value:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",tailwind:"shadow-2xl",description:"2X large shadow for maximum elevation"},inner:{value:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-inner",description:"Inner shadow for inset elements"}}[t]}}const Lc={none:ht.create("none"),sm:ht.create("sm"),md:ht.create("md"),lg:ht.create("lg"),xl:ht.create("xl"),"2xl":ht.create("2xl"),inner:ht.create("inner")};function ue(e){return Lc[e].tailwind}const It=l.forwardRef(function(f,d){var p=f,{content:t,children:r,position:s="top",delay:a=200,className:o="","aria-label":i,preservePositioning:c=!1}=p,u=W(p,["content","children","position","delay","className","aria-label","preservePositioning"]);const[b,g]=l.useState(!1),x=l.useRef(null),w=l.useRef(null),y=l.useRef(null),h=`tooltip-${l.useId()}`,k=()=>{const M=setTimeout(()=>{g(!0)},a);x.current=M},$=()=>{x.current&&(clearTimeout(x.current),x.current=null),g(!1)},v=()=>{g(!0)},S=()=>{g(!1)},N=M=>{var R;M.key==="Escape"&&(g(!1),(R=y.current)==null||R.blur())};l.useEffect(()=>()=>{x.current&&(clearTimeout(x.current),x.current=null)},[]),l.useEffect(()=>{if(!b)return;const M=R=>{w.current&&!w.current.contains(R.target)&&y.current&&!y.current.contains(R.target)&&g(!1)};return document.addEventListener("mousedown",M),()=>{document.removeEventListener("mousedown",M)}},[b]);const I=M=>({top:"border-t-surface-inverse",bottom:"border-b-surface-inverse",left:"border-l-surface-inverse",right:"border-r-surface-inverse"})[M],C=ke(j("absolute",be("tooltip"),m("sm","px"),m("xs","py"),se("caption"),"text-fg-inverse","bg-surface-inverse",U("md"),ue("lg"),"whitespace-nowrap"),{variants:{position:{top:j("bottom-full","left-1/2","transform","-translate-x-1/2",m("sm","mb")),bottom:j("top-full","left-1/2","transform","-translate-x-1/2",m("sm","mt")),left:j("right-full","top-1/2","transform","-translate-y-1/2",m("sm","mr")),right:j("left-full","top-1/2","transform","-translate-y-1/2",m("sm","ml"))}},defaultVariants:{position:"top"}}),T=ke(j("absolute","w-0","h-0",Fc("thick"),"border-transparent"),{variants:{position:{top:j("top-full","left-1/2","transform","-translate-x-1/2",I("top")),bottom:j("bottom-full","left-1/2","transform","-translate-x-1/2",I("bottom")),left:j("left-full","top-1/2","transform","-translate-y-1/2",I("left")),right:j("right-full","top-1/2","transform","-translate-y-1/2",I("right"))}},defaultVariants:{position:"top"}}),L=l.isValidElement(r)?(()=>{const M=r,R=M.props,D=R.ref;return l.cloneElement(M,{ref:pa(y,D),"aria-describedby":b?h:R["aria-describedby"],onMouseEnter:O=>{var B;k(),(B=R.onMouseEnter)==null||B.call(R,O)},onMouseLeave:O=>{var B;$(),(B=R.onMouseLeave)==null||B.call(R,O)},onFocus:O=>{var B;v(),(B=R.onFocus)==null||B.call(R,O)},onBlur:O=>{var B;S(),(B=R.onBlur)==null||B.call(R,O)},onKeyDown:O=>{var B;N(O),(B=R.onKeyDown)==null||B.call(R,O)}})})():r,F=j(c?"static":"relative","inline-block",o);return n.jsxs("div",P(A({ref:d,className:F},u),{children:[L,b&&n.jsxs("div",{ref:w,id:h,className:j(C({position:s})),role:"tooltip","aria-live":"polite",children:[t,n.jsx("div",{className:j(T({position:s})),"aria-hidden":"true"})]})]}))});It.displayName="Tooltip";function $a(c){var u=c,{variant:e="text",width:t,height:r,lines:s=1,className:a="","aria-label":o}=u,i=W(u,["variant","width","height","lines","className","aria-label"]);const d=["motion-safe:animate-pulse","bg-surface-muted",U("sm")],f={text:"h-4",card:"h-32",list:"h-12",circle:U("full")},p=j(...d,f[e],a),b={};t&&(b.width=t),r&&(b.height=r);const g=o||`Loading ${e} content`;return e==="text"&&s>1?n.jsx("div",P(A({className:m("sm","space-y"),role:"status","aria-busy":"true","aria-label":g},i),{children:Array.from({length:s}).map((x,w)=>n.jsx("div",{className:p,style:w===s-1?{width:"75%"}:b,"aria-hidden":"true"},w))})):n.jsx("div",A({className:p,style:b,role:"status","aria-busy":"true","aria-label":g},i))}function _c({defaultOpen:e=!0,open:t,onOpenChange:r,storageKey:s}){const a=l.useCallback(()=>{if(s&&typeof window!="undefined"){const f=localStorage.getItem(s);if(f!==null)return f==="true"}return e},[e,s]),[o,i]=l.useState(a),c=t!==void 0?t:o;l.useEffect(()=>{s&&typeof window!="undefined"&&t===void 0&&localStorage.setItem(s,String(o))},[o,s,t]);const u=l.useCallback(f=>{t===void 0&&i(f),r==null||r(f)},[t,r]),d=l.useCallback(()=>{u(!c)},[c,u]);return{isOpen:c,toggle:d,setOpen:u}}const ys=l.forwardRef(function(b,p){var g=b,{children:t,trigger:r,defaultOpen:s=!0,open:a,onOpenChange:o,disabled:i=!1,duration:c=200,storageKey:u,className:d=""}=g,f=W(g,["children","trigger","defaultOpen","open","onOpenChange","disabled","duration","storageKey","className"]);const{isOpen:x,toggle:w}=_c({defaultOpen:s,open:a,onOpenChange:o,storageKey:u}),y=l.useRef(null),[h,k]=l.useState(x?"auto":0);l.useEffect(()=>{y.current&&k(x?y.current.scrollHeight:0)},[x,t]),l.useEffect(()=>{if(!x||!y.current)return;const v=new ResizeObserver(()=>{y.current&&x&&k(y.current.scrollHeight)});return v.observe(y.current),()=>{v.disconnect()}},[x]);const $=`collapsible-content-${l.useId()}`;return n.jsxs("div",P(A({ref:p,className:d},f),{children:[r!==void 0&&n.jsx("button",{type:"button",onClick:w,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),i||w())},disabled:i,"aria-expanded":x,"aria-controls":$,"aria-disabled":i,className:j("w-full","text-left","focus:outline-none","focus:ring-2","focus:ring-line-brand","focus:ring-offset-2",U("md")),children:r}),n.jsx("div",{id:$,ref:y,style:{height:typeof h=="number"?`${h}px`:h,overflow:"hidden",transition:`height ${c}ms ease-in-out`},"aria-hidden":!x,children:n.jsx("div",{children:t})})]}))});ys.displayName="Collapsible";const $r=l.memo(l.forwardRef(function(p,f){var b=p,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,className:i="",disabled:c=!1,indeterminate:u=!1}=b,d=W(b,["id","label","error","success","helperText","className","disabled","indeterminate"]);const g=l.useId(),x=t||`checkbox-${g}`,w=l.useMemo(()=>s?`${x}-error`:void 0,[s,x]),y=l.useMemo(()=>o?`${x}-helper`:void 0,[o,x]),h=l.useMemo(()=>"focus:border-line-focus",[]),k=l.useMemo(()=>"focus:border-error",[]),$=l.useMemo(()=>s?k.replace("focus:border-","focus:ring-"):h.replace("focus:border-","focus:ring-"),[s,k,h]),v=l.useMemo(()=>j("h-4","w-4",U("sm"),"border","border-line-default","text-fg-brand","focus:ring-2",$,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",!s&&a&&"border-success",i),[$,s,a,i]),S=l.useMemo(()=>j(de("label"),m("sm","ml"),c?"opacity-50 cursor-not-allowed":"cursor-pointer"),[c]),N=l.useRef(null),I=l.useCallback(C=>{N.current=C,typeof f=="function"?f(C):f&&(f.current=C),C&&(C.indeterminate=u)},[f,u]);return l.useEffect(()=>{N.current&&(N.current.indeterminate=u)},[u]),n.jsxs("div",{className:j("flex","flex-col",m("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",A({type:"checkbox",id:x,ref:I,className:v,disabled:c,"aria-invalid":s,"aria-describedby":w||y||void 0,"aria-label":r?void 0:"Checkbox"},d)),r&&n.jsx("label",{htmlFor:x,className:S,children:r})]}),(s||a||o)&&n.jsx("div",{id:w||y,className:j(m("xs","mt"),de("caption"),s?"text-fg-error":a?"text-fg-success":"text-fg-secondary"),role:s||a?"alert":void 0,children:s?o||"This field has an error":o})]})}));$r.displayName="Checkbox";const Ca=l.memo(l.forwardRef(function(f,d){var p=f,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,className:i="",disabled:c=!1}=p,u=W(p,["id","label","error","success","helperText","className","disabled"]);const b=l.useId(),g=t||`radio-${b}`,x=l.useMemo(()=>s?`${g}-error`:void 0,[s,g]),w=l.useMemo(()=>o?`${g}-helper`:void 0,[o,g]),y=l.useMemo(()=>"focus:border-line-focus",[]),h=l.useMemo(()=>"focus:border-error",[]),k=l.useMemo(()=>s?h.replace("focus:border-","focus:ring-"):y.replace("focus:border-","focus:ring-"),[s,h,y]),$=l.useMemo(()=>j("h-4","w-4","border","border-line-default","text-fg-brand","focus:ring-2",k,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",!s&&a&&"border-success",i),[k,s,a,i]),v=l.useMemo(()=>j(de("label"),m("sm","ml"),c?"opacity-50 cursor-not-allowed":"cursor-pointer"),[c]);return n.jsxs("div",{className:j("flex","flex-col",m("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",A({type:"radio",id:g,ref:d,className:$,disabled:c,"aria-invalid":s,"aria-describedby":x||w||void 0,"aria-label":r?void 0:"Radio button"},u)),r&&n.jsx("label",{htmlFor:g,className:v,children:r})]}),(s||a||o)&&n.jsx("div",{id:x||w,className:j(m("xs","mt"),de("caption"),s?"text-fg-error":a?"text-fg-success":"text-fg-secondary"),role:s||a?"alert":void 0,children:s?o||"This field has an error":o})]})}));Ca.displayName="Radio";const Ot={track:{sm:{w:"w-9",h:"h-5"},md:{w:"w-11",h:"h-6"},lg:{w:"w-14",h:"h-7"}},thumb:{sm:{w:"w-4",h:"h-4"},md:{w:"w-5",h:"h-5"},lg:{w:"w-6",h:"h-6"}},translate:{sm:"translate-x-4",md:"translate-x-5",lg:"translate-x-7"}};function Pc(e){return{track:`${Ot.track[e].w} ${Ot.track[e].h}`,thumb:`${Ot.thumb[e].w} ${Ot.thumb[e].h}`,translate:Ot.translate[e]}}const zc=ke("w-full",{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},variant:{primary:"bg-surface-muted",secondary:"bg-surface-muted",success:"bg-success-bg-emphasis",error:"bg-error-bg-emphasis",warning:"bg-warning-bg-emphasis",info:"bg-info-bg-emphasis"}},defaultVariants:{size:"md",variant:"primary"}}),In=ke("transition-all",{variants:{variant:{primary:"bg-surface-brand",secondary:"bg-surface-secondary",success:"bg-success",error:"bg-error",warning:"bg-warning",info:"bg-info"}},defaultVariants:{variant:"primary"}}),ws=l.forwardRef(function(p,f){var b=p,{value:t,max:r=100,variant:s="primary",size:a="md",showLabel:o=!1,label:i,"aria-label":c,className:u=""}=b,d=W(b,["value","max","variant","size","showLabel","label","aria-label","className"]);const g=t===void 0,x=g?void 0:Math.min(Math.max(t/r*100,0),100),w=c||(g?"Loading in progress":`Progress: ${x==null?void 0:x.toFixed(0)}%`);return n.jsxs("div",P(A({ref:f,className:j("w-full",u)},d),{children:[o&&(i||!g)&&n.jsxs("div",{className:j("flex","items-center","justify-between",m("xs","mb")),children:[i&&n.jsx("span",{className:j(se("bodySmall"),Pe("label"),"text-fg-primary"),children:i}),!g&&x!==void 0&&n.jsxs("span",{className:j(se("bodySmall"),"text-fg-secondary"),children:[x.toFixed(0),"%"]})]}),n.jsx("div",{role:"progressbar","aria-valuemin":g?void 0:0,"aria-valuemax":g?void 0:r,"aria-valuenow":g?void 0:t,"aria-label":w,"aria-busy":g,className:j("relative","w-full","overflow-hidden",zc({size:a,variant:s}),U("full")),children:g?n.jsx("div",{className:j("absolute","top-0","left-0","bottom-0",In({variant:s}),U("full"),"motion-reduce:animate-none"),style:{width:"30%",animation:"progress-indeterminate 1.5s ease-in-out infinite"}}):n.jsx("div",{className:j("h-full",In({variant:s}),U("full"),"transition-all","duration-300","ease-out"),style:{width:`${x}%`},"aria-hidden":"true"})})]}))});ws.displayName="Progress";const Ea=l.memo(l.forwardRef(function(x,g){var w=x,{size:t="md",label:r,helperText:s,error:a=!1,success:o=!1,className:i="",disabled:c=!1,checked:u,defaultChecked:d,onChange:f,id:p}=w,b=W(w,["size","label","helperText","error","success","className","disabled","checked","defaultChecked","onChange","id"]);const y=u!==void 0,[h,k]=l.useState(d!=null?d:!1),$=y?!!u:h,v=l.useId(),S=p||`switch-${v}`,N=l.useMemo(()=>r?`${S}-label`:void 0,[r,S]),I=l.useMemo(()=>s?`${S}-helper`:void 0,[s,S]),C=l.useMemo(()=>Pc(t),[t]),T=l.useMemo(()=>"focus:border-line-focus".replace("focus:border-","focus:ring-"),[]),L=l.useMemo(()=>j("relative","inline-flex","shrink-0","cursor-pointer",U("full"),"border-2","border-transparent",xe("base"),"focus:outline-none","focus:ring-2",T,"focus:ring-offset-2",C.track,$?"bg-surface-brand":"bg-surface-muted",a&&!$&&"border-error",!a&&o&&!$&&"border-success",c&&"opacity-50 cursor-not-allowed",i),[T,C.track,$,a,o,c,i]),F=l.useMemo(()=>j("pointer-events-none","inline-block",U("full"),"bg-surface-base","shadow","transform",xe("base"),C.thumb,$?C.translate:"translate-x-0"),[C.thumb,C.translate,$]);return n.jsxs("div",{className:j("flex","items-start",m("md","gap")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("button",{type:"button",className:L,role:"switch","aria-checked":$,"aria-labelledby":N,"aria-describedby":I,disabled:c,onClick:l.useCallback(M=>{if(c)return;const R=!$;if(y||k(R),f){const D=P(A({},M),{target:P(A({},M.target),{checked:R}),currentTarget:P(A({},M.currentTarget),{checked:R})});f(D)}},[c,f,$,y]),onKeyDown:l.useCallback(M=>{if(c||M.key!=="Enter"&&M.key!==" ")return;M.preventDefault();const R=!$;if(y||k(R),f){const D=P(A({},M),{target:P(A({},M.target),{checked:R}),currentTarget:P(A({},M.currentTarget),{checked:R})});f(D)}},[c,f,$,y]),children:n.jsx("span",{className:F})}),n.jsx("input",A({ref:g,type:"checkbox",id:S,checked:$,onChange:f!=null?f:(()=>{}),disabled:c,className:"sr-only","aria-hidden":"true",tabIndex:-1},b))]}),(r||s)&&n.jsxs("div",{className:"flex-1",children:[r&&n.jsx("label",{id:N,htmlFor:S,className:j("block",se("bodySmall"),Pe("label"),a?"text-fg-error":"text-fg-primary",c?"opacity-50":"cursor-pointer"),children:r}),s&&n.jsx("p",{id:I,className:j(m("xs","mt"),se("bodySmall"),a?"text-fg-error":o?"text-fg-success":"text-fg-secondary"),children:s})]})]})}));Ea.displayName="Switch";const ks=l.memo(function(o){var i=o,{orientation:t="horizontal",variant:r="solid",className:s=""}=i,a=W(i,["orientation","variant","className"]);const c=l.useMemo(()=>{const u=["border-0","border-line-default"],d={horizontal:"w-full border-t",vertical:"h-full border-l self-stretch"},f={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted"};return j(...u,d[t],f[r],s)},[t,r,s]);return t==="vertical"?n.jsx("div",A({className:c,role:"separator","aria-orientation":"vertical"},a)):n.jsx("hr",A({className:c,role:"separator","aria-orientation":"horizontal"},a))});ks.displayName="Separator";const Ma=l.forwardRef(function(h,y){var k=h,{value:t,defaultValue:r,min:s=0,max:a=100,step:o=1,variant:i="single",size:c="md",disabled:u=!1,showValue:d=!1,marks:f=[],onChange:p,onValueChange:b,label:g,className:x=""}=k,w=W(k,["value","defaultValue","min","max","step","variant","size","disabled","showValue","marks","onChange","onValueChange","label","className"]);const $=l.useRef(null),v=l.useId(),S=l.useId(),N=l.useId(),[I,C]=l.useState(r||(i==="range"?[s,a]:s)),[T,L]=l.useState(!1),[F,M]=l.useState(null),R=t!==void 0,D=R?t:I,O=V=>(V-s)/(a-s)*100,B=V=>{if(!$.current)return s;const q=$.current.getBoundingClientRect(),ce=Math.max(0,Math.min(1,(V-q.left)/q.width)),ie=s+ce*(a-s);return Math.round(ie/o)*o},X=(V,q="min")=>{if(u)return;V.preventDefault(),L(!0),M(q);const ce=me=>{if(!$.current)return;const ve=B(me.clientX);Q(ve,q)},ie=()=>{L(!1),M(null),document.removeEventListener("mousemove",ce),document.removeEventListener("mouseup",ie)};document.addEventListener("mousemove",ce),document.addEventListener("mouseup",ie)},Q=(V,q="min")=>{const ce=Math.max(s,Math.min(a,V));if(i==="range"){const[ie,me]=Array.isArray(D)?D:[s,a];let ve;q==="min"?ve=[Math.min(ce,me),me]:ve=[ie,Math.max(ce,ie)],R||C(ve),p==null||p(ve),b==null||b(ve)}else R||C(ce),p==null||p(ce),b==null||b(ce)},oe=V=>{if(u||T)return;const q=B(V.clientX);Q(q)},H=()=>"focus:ring-line-brand ring-offset-2",_=ke(j("relative","cursor-pointer"),{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},defaultVariants:{size:"md",disabled:!1}}),Y=ke(j("absolute","bg-surface-brand",U("full"),"border-2","border-white",ue("md"),"cursor-grab","active:cursor-grabbing",xe("base"),"-translate-x-1/2","-translate-y-1/2","top-1/2"),{variants:{size:{sm:"w-3 h-3",md:"w-4 h-4",lg:"w-5 h-5"},active:{true:H(),false:""}},defaultVariants:{size:"md",active:!1}}),ee=typeof D=="number"?D:D[0],J=Array.isArray(D)?D[0]:s,te=Array.isArray(D)?D[1]:ee,ae=O(J),z=O(te);return n.jsxs("div",P(A({ref:y,className:j("w-full",x)},w),{children:[n.jsxs("label",{id:v,className:j("block",se("bodySmall"),Pe("label"),"text-fg-primary",m("sm","mb")),children:[g,d&&n.jsx("span",{className:j(m("sm","ml"),"text-fg-secondary"),children:i==="range"?`${J} - ${te}`:ee})]}),i==="range"&&n.jsxs(n.Fragment,{children:[n.jsx("span",{id:S,className:"sr-only",children:"minimum"}),n.jsx("span",{id:N,className:"sr-only",children:"maximum"})]}),n.jsxs("div",{ref:$,className:j(_({size:c,disabled:u}),"bg-surface-muted",U("full")),onClick:oe,role:i==="range"?void 0:"slider","aria-valuemin":i==="range"?void 0:s,"aria-valuemax":i==="range"?void 0:a,"aria-valuenow":i==="range"?void 0:ee,"aria-disabled":i==="range"?void 0:u,"aria-labelledby":i==="range"?void 0:v,children:[n.jsx("div",{className:j("absolute",_({size:c}),"bg-surface-brand",U("full"),xe("base")),style:{left:`${ae}%`,width:`${z-ae}%`}}),f.map(V=>{const q=O(V);return n.jsx("div",{className:j("absolute","w-1","h-1","bg-line-strong",U("full"),"-translate-x-1/2"),style:{left:`${q}%`,top:"50%",transform:"translate(-50%, -50%)"}},V)}),i==="range"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:j(Y({size:c,active:F==="min"})),style:{left:`${ae}%`},onMouseDown:V=>X(V,"min"),role:"slider","aria-valuemin":s,"aria-valuemax":te,"aria-valuenow":J,"aria-labelledby":`${v} ${S}`}),n.jsx("div",{className:j(Y({size:c,active:F==="max"})),style:{left:`${z}%`},onMouseDown:V=>X(V,"max"),role:"slider","aria-valuemin":J,"aria-valuemax":a,"aria-valuenow":te,"aria-labelledby":`${v} ${N}`})]}):n.jsx("div",{className:j(Y({size:c,active:T})),style:{left:`${z}%`},onMouseDown:V=>X(V)}),d&&!g&&n.jsx("div",{className:"absolute -top-6 left-0 right-0 flex justify-center",children:n.jsx("span",{className:j(se("caption"),"text-fg-secondary","bg-surface-overlay",m("sm","px"),m("xs","py"),U("md"),"shadow"),children:i==="range"?`${J} - ${te}`:ee})})]})]}))});Ma.displayName="Slider";const Oc=ke(j("inline-flex","items-center","font-medium",U("full"),m("xs","gap")),{variants:{variant:{default:j("bg-surface-muted","text-fg-primary","border","border-line-default"),outlined:j("bg-transparent","text-fg-primary","border","border-line-default"),filled:j("bg-surface-brand-strong","text-fg-inverse","border","border-transparent")},size:{sm:j(m("xs","px"),m("xs","py"),se("caption")),md:j(m("sm","px"),m("xs","py"),se("bodySmall")),lg:j(m("md","px"),m("sm","py"),se("body"))},selected:{true:j("bg-surface-brand-strong","text-fg-inverse","border","border-line-brand"),false:""},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},compoundVariants:[{selected:!0,variant:"default",class:""},{selected:!0,variant:"outlined",class:""},{selected:!0,variant:"filled",class:""}],defaultVariants:{variant:"default",size:"md",selected:!1,disabled:!1}}),js=l.forwardRef(function(g,b){var x=g,{children:t,variant:r="default",size:s="md",onRemove:a,selected:o=!1,disabled:i=!1,className:c="","aria-label":u,onClick:d,tabIndex:f}=x,p=W(x,["children","variant","size","onRemove","selected","disabled","className","aria-label","onClick","tabIndex"]);const y=(()=>{if(u)return u;if(typeof t=="string")return t;if(typeof t=="object"&&t!==null&&"props"in t){const v=t.props;if(v!=null&&v.children&&typeof v.children=="string")return v.children}})(),h=d!==void 0,k=h&&!i,$=v=>{i||(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),d==null||d())};return n.jsxs("div",P(A({ref:b,className:j(Oc({variant:r,size:s,selected:o,disabled:i}),a&&m("xs","pr"),c),"aria-disabled":i},p),{children:[h?n.jsx("button",{type:"button",onClick:i?void 0:d,onKeyDown:$,disabled:i,"aria-pressed":o?!0:void 0,"aria-label":u||y,tabIndex:f!==void 0?f:k?0:void 0,className:j("flex-1","bg-transparent","border-0",m("none","p"),"text-inherit","text-left","cursor-pointer","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-2",U("full")),children:t}):n.jsx("span",{children:t}),a&&!i&&n.jsx("button",{type:"button",onClick:v=>{v.stopPropagation(),a()},className:j(m("xs","ml"),"hover:bg-tint-hover",U("full"),m("xs","p"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-1"),"aria-label":`Remove ${y||"chip"}`,children:n.jsx(Se,{className:"h-3 w-3","aria-hidden":"true"})})]}))});js.displayName="Chip";const dr=l.forwardRef(function(f,d){var p=f,{src:t,alt:r,fallback:s,size:a="md",variant:o="circle","aria-label":i,className:c=""}=p,u=W(p,["src","alt","fallback","size","variant","aria-label","className"]);const[b,g]=l.useState(!1),[x,w]=l.useState(!1),y={xs:"h-6 w-6 text-xs",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-16 w-16 text-xl"},h={circle:U("full"),square:U("none"),rounded:U("md")},k=!t||b,$=typeof s=="string"?s.toUpperCase().slice(0,2):s,v=i||r||"User avatar";return n.jsxs("div",P(A({ref:d,className:j("relative","inline-flex","items-center","justify-center","shrink-0","font-medium","overflow-hidden",y[a],h[o],"bg-surface-muted","text-fg-primary",c),role:"img","aria-label":v},u),{children:[!k&&t&&n.jsx("img",{src:t,alt:r||"",className:j("w-full","h-full","object-cover",h[o],x?"opacity-100":"opacity-0","transition-opacity","duration-200"),onLoad:()=>w(!0),onError:()=>{g(!0),w(!1)},"aria-hidden":"true"}),k&&n.jsx("span",{className:j("flex","items-center","justify-center","w-full","h-full",h[o]),"aria-hidden":"true",children:$||"?"})]}))});dr.displayName="Avatar";function Vc(c){var u=c,{children:e,max:t=3,size:r="md",variant:s="circle",spacing:a="md",className:o=""}=u,i=W(u,["children","max","size","variant","spacing","className"]);const d={none:"",sm:"-space-x-1",md:"-space-x-2",lg:"-space-x-3"},f=l.Children.toArray(e).filter(Boolean),p=f.slice(0,t),b=f.length-t;return n.jsxs("div",P(A({className:j("flex","items-center",d[a],o),role:"group","aria-label":`${f.length} avatars`},i),{children:[p.map((g,x)=>{let w=g;if(l.isValidElement(g)&&g.type===dr){const y=g.props;w=l.cloneElement(g,{size:y.size||r,variant:y.variant||s})}return n.jsx("div",{className:"ring-2 ring-surface-base",style:{zIndex:f.length-x},children:w},x)}),b>0&&n.jsx(dr,{size:r,variant:s,fallback:`+${b}`,"aria-label":`${b} more avatars`,className:"ring-2 ring-surface-base",style:{zIndex:0}})]}))}const ur=l.memo(function(d){var f=d,{variant:t="default",padding:r="medium",className:s="",onClick:a,"aria-label":o,"aria-labelledby":i,children:c}=f,u=W(f,["variant","padding","className","onClick","aria-label","aria-labelledby","children"]);const p=ke(j("bg-surface-base",U("lg"),"border","border-line-default",ue("sm")),{variants:{variant:{default:"",hover:j(`hover:${ue("md")}`,"transition-shadow","cursor-pointer"),selected:j("border-line-brand",ue("md"))},padding:{none:"",small:m("xs","p"),medium:m("base","p"),large:m("lg","p")}},defaultVariants:{variant:"default",padding:"medium"}}),b=l.useMemo(()=>a!==void 0,[a]),g=b?"button":void 0,x=b?0:void 0,w=j(p({variant:t,padding:r}),s),y=l.useCallback(h=>{b&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),a==null||a())},[b,a]);return n.jsx("div",P(A({className:w,role:g,tabIndex:x,onClick:a,onKeyDown:y,"aria-label":o,"aria-labelledby":i},u),{children:c}))});ur.displayName="Card";function Ta(e){const t=l.createContext(void 0);t.displayName=e.displayName;function r({value:o,children:i}){return n.jsx(t.Provider,{value:o,children:i})}function s(){const o=l.useContext(t);if(o===void 0)throw new Error(e.errorMessage);return o}function a(){return l.useContext(t)}return{Context:t,Provider:r,useContextRequired:s,useContextOptional:a}}const Cr=Ta({displayName:"FormContext",errorMessage:"useFormContext must be used within a Form component with react-hook-form integration"}),Wc=Cr.Context,Hc=Cr.Provider;function Ns(){return Cr.useContextRequired()}function Bc(){return Cr.useContextOptional()}function Aa({form:e,loading:t=!1,children:r}){const s={form:e,loading:t};return n.jsx(Hc,{value:s,children:r})}function Uc(c){var u=c,{children:e,onSubmit:t,loading:r=!1,error:s=null,success:a=null,className:o=""}=u,i=W(u,["children","onSubmit","loading","error","success","className"]);const d=j(m("lg","gap"),"flex","flex-col",o);if("form"in i&&i.form!==void 0){const w=i,{form:h,onSubmit:k,onSubmitError:$}=w,v=W(w,["form","onSubmit","onSubmitError"]),S=h.handleSubmit(N=>tr(null,null,function*(){try{yield k(N)}catch(I){$==null||$(I)}}),N=>{$==null||$(N)});return n.jsx(Aa,{form:h,loading:r,children:n.jsxs("form",P(A({className:d,onSubmit:S,noValidate:!0},v),{children:[e,s&&n.jsx("div",{role:"alert",className:j(m("md","p"),je("sm"),"text-error-dark","bg-error-bg","border","border-error",U("md")),children:s}),a&&n.jsx("div",{role:"alert",className:j(m("md","p"),je("sm"),"text-success-dark","bg-success-bg","border","border-success",U("md")),children:a})]}))})}const p=i.onSubmit||t,y=i,{onSubmit:b}=y,g=W(y,["onSubmit"]),x=h=>{h.preventDefault(),p&&!r&&(p==null||p(h))};return n.jsxs("form",P(A({className:d,onSubmit:x,noValidate:!0},g),{children:[e,s&&n.jsx("div",{role:"alert",className:j(m("md","p"),je("sm"),"text-error-dark","bg-error-bg","border","border-error",U("md")),children:s}),a&&n.jsx("div",{role:"alert",className:j(m("md","p"),je("sm"),"text-success-dark","bg-success-bg","border","border-success",U("md")),children:a})]}))}function Gc({name:e,label:t,children:r,rules:s,className:a=""}){var b;const{form:o}=Ns();if(!o)throw new Error("FormField must be used within a Form component with react-hook-form integration");const{register:i,formState:{errors:c},watch:u}=o,d=i(e,s),f=(b=c[e])==null?void 0:b.message,p=u(e);return n.jsxs("div",{className:j("flex","flex-col",m("sm","gap"),a),children:[t&&n.jsx(Rt,{htmlFor:e,className:j("block",je("sm"),At("medium"),"text-fg-primary"),children:t}),r({name:e,register:g=>i(g,s),error:f,value:p,onChange:d.onChange,onBlur:d.onBlur}),f&&n.jsx(Sa,{message:f})]})}var Kc=e=>e.type==="checkbox",Yc=e=>e instanceof Date,Le=e=>e==null;const qc=e=>typeof e=="object";var Ye=e=>!Le(e)&&!Array.isArray(e)&&qc(e)&&!Yc(e),Xc=e=>{const t=e.constructor&&e.constructor.prototype;return Ye(t)&&t.hasOwnProperty("isPrototypeOf")},Ss=typeof window!="undefined"&&typeof window.HTMLElement!="undefined"&&typeof document!="undefined";function et(e){if(e instanceof Date)return new Date(e);const t=typeof FileList!="undefined"&&e instanceof FileList;if(Ss&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(Ye(e)&&Xc(e)))return e;const s=r?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=et(e[a]));return s}const Mt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},We={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Jc="root",Ra=["__proto__","constructor","prototype"];var $s=e=>/^\w*$/.test(e),Ge=e=>e===void 0,Cs=e=>e.split(/[.[\]'"]/g).filter(Boolean),_e=(e,t,r)=>{if(!t||!Ye(e))return r;const s=$s(t)?[t]:Cs(t);if(s.some(o=>Ra.includes(o)))return r;const a=s.reduce((o,i)=>Le(o)?void 0:o[i],e);return Ge(a)||a===e?Ge(e[t])?r:e[t]:a},Ia=e=>typeof e=="boolean",Qc=e=>typeof e=="function",fr=(e,t,r)=>{let s=-1;const a=$s(t)?[t]:Cs(t),o=a.length,i=o-1;for(;++s<o;){const c=a[s];let u=r;if(s!==i){const d=e[c];u=Ye(d)||Array.isArray(d)?d:isNaN(+a[s+1])?{}:[]}if(Ra.includes(c))return;e[c]=u,e=e[c]}};const Da=l.createContext(null);Da.displayName="HookFormControlContext";const Zc=()=>l.useContext(Da),ed=Ss?l.useLayoutEffect:l.useEffect;var He=e=>typeof e=="string";const td=l.createContext(null);td.displayName="HookFormContext";var rd=(e,t,r,s,a)=>t?P(A({},r[e]),{types:P(A({},r[e]&&r[e].types?r[e].types:{}),{[s]:a||!0})}):{},sd=e=>Array.isArray(e)?e.filter(Boolean):[],Be=e=>Array.isArray(e)?e:[e],mr=e=>Ye(e)&&!Object.keys(e).length,nd=e=>e.type==="file",ad=e=>{if(!Ss)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},od=e=>e.type==="radio";function id(e,t){const r=t.slice(0,-1).length;let s=0;for(;s<r;){if(Le(e)){e=void 0;break}e=e[t[s]],s++}return e}function ld(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ge(e[t]))return!1;return!0}function Fa(e,t){if(He(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const r=Array.isArray(t)?t:$s(t)?[t]:Cs(t),s=r.length===1?e:id(e,r),a=r.length-1,o=r[a];return s&&delete s[o],a!==0&&(Ye(s)&&mr(s)||Array.isArray(s)&&ld(s))&&Fa(e,r.slice(0,-1)),e}var La=e=>e instanceof RegExp,or=e=>({isOnSubmit:!e||e===Mt.onSubmit,isOnBlur:e===Mt.onBlur,isOnChange:e===Mt.onChange,isOnAll:e===Mt.all,isOnTouch:e===Mt.onTouched}),cd=(e,t,r)=>t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(`${s}.`));const ls=(e,t,r,s)=>{for(const o of Object.keys(e)){const i=_e(e,o);if(i){const a=i,{_f:c}=a,u=W(a,["_f"]);if(c){if(c.refs&&c.refs[0]&&t(c.refs[0],o))return!0;if(c.ref&&t(c.ref,c.name))return!0;if(ls(u,t))break}else if(Ye(u)&&ls(u,t))break}}};var dd=(e,t,r)=>{const s=_e(e,r),a=Array.isArray(s)?s:[];return fr(a,Jc,t[r]),fr(e,r,a),e};function Dn(e,t,r="validate"){if(He(e)||Array.isArray(e)&&e.every(He)||Ia(e)&&!e)return{type:r,message:He(e)?e:"",ref:t}}var Ct=e=>Ye(e)&&!La(e)?e:{value:e,message:""},ud=(e,t,r,s,a,o)=>tr(null,null,function*(){const{ref:i,refs:c,required:u,maxLength:d,minLength:f,min:p,max:b,pattern:g,validate:x,name:w,valueAsNumber:y,mount:h}=e._f,k=_e(r,w);if(!h||t.has(w))return{};const $=c?c[0]:i,v=T=>{a&&$.reportValidity&&($.setCustomValidity(Ia(T)?"":T||""),$.reportValidity())},S={};od(i),Kc(i);const N=(y||nd(i))&&Ge(i.value)&&Ge(k)||ad(i)&&i.value===""||k===""||Array.isArray(k)&&!k.length,I=rd.bind(null,w,s,S),C=(T,L,F,M=We.maxLength,R=We.minLength)=>{const D=T?L:F;S[w]=A({type:T?M:R,message:D,ref:i},I(T?M:R,D))};if(!Array.isArray(k)||!k.length){const{value:T,message:L}=He(u)?{value:!!u,message:u}:Ct(u);if(T&&(S[w]=A({type:We.required,message:L,ref:$},I(We.required,L)),!s))return v(L),S}if(!N&&(!Le(p)||!Le(b))){let T,L;const F=Ct(b),M=Ct(p);if(!Le(k)&&!isNaN(k)){const R=i.valueAsNumber||k&&+k;Le(F.value)||(T=R>F.value),Le(M.value)||(L=R<M.value)}else{const R=i.valueAsDate||new Date(k),D=X=>new Date(new Date().toDateString()+" "+X),O=i.type=="time",B=i.type=="week";He(F.value)&&k&&(T=O?D(k)>D(F.value):B?k>F.value:R>new Date(F.value)),He(M.value)&&k&&(L=O?D(k)<D(M.value):B?k<M.value:R<new Date(M.value))}if((T||L)&&(C(!!T,F.message,M.message,We.max,We.min),!s))return v(S[w].message),S}if((d||f)&&!N&&(He(k)||Array.isArray(k))){const T=Ct(d),L=Ct(f),F=!Le(T.value)&&k.length>+T.value,M=!Le(L.value)&&k.length<+L.value;if((F||M)&&(C(F,T.message,L.message),!s))return v(S[w].message),S}if(g&&!N&&He(k)){const{value:T,message:L}=Ct(g);if(La(T)&&!k.match(T)&&(S[w]=A({type:We.pattern,message:L,ref:i},I(We.pattern,L)),!s))return v(L),S}if(x){if(Qc(x)){const T=yield x(k,r),L=Dn(T,$);if(L&&(S[w]=A(A({},L),I(We.validate,L.message)),!s))return v(L.message),S}else if(Ye(x)){let T={};for(const L in x){if(!mr(T)&&!s)break;const F=Dn(yield x[L](k,r),$,L);F&&(T=A(A({},F),I(L,F.message)),v(F.message),s&&(S[w]=T))}if(!mr(T)&&(S[w]=A({ref:$},T),!s))return S}}return v(!0),S}),Ze=()=>{if(typeof crypto!="undefined"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance=="undefined"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Xr=(e,t,r={})=>r.shouldFocus||Ge(r.shouldFocus)?r.focusName||`${e}.${Ge(r.focusIndex)?t:r.focusIndex}.`:"",Jr=(e,t)=>[...e,...Be(t)],Qr=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Zr(e,t,r){return[...e.slice(0,t),...Be(r),...e.slice(t)]}var es=(e,t,r)=>Array.isArray(e)?(Ge(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],ts=(e,t)=>[...Be(t),...Be(e)];function fd(e,t){let r=0;const s=[...e];for(const a of t)s.splice(a-r,1),r++;return sd(s).length?s:[]}var rs=(e,t)=>Ge(t)?[]:fd(e,Be(t).sort((r,s)=>r-s)),ss=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Fn=(e,t,r)=>(e[t]=r,e);function md(e){const t=Zc(),{control:r=t,name:s,keyName:a="id",shouldUnregister:o,rules:i}=e,[c,u]=l.useState(r._getFieldArray(s)),d=l.useRef(r._getFieldArray(s).map(Ze)),f=l.useRef(!1);r._names.array.add(s),l.useMemo(()=>i&&c.length>=0&&r.register(s,i),[r,s,c.length,i]),ed(()=>r._subjects.array.subscribe({next:({values:v,name:S})=>{if(S===s||!S){const N=_e(v,s);Array.isArray(N)?(u(N),d.current=N.map(Ze)):S||(u([]),d.current=[])}}}).unsubscribe,[r,s]);const p=l.useCallback(v=>{f.current=!0,r._setFieldArray(s,v)},[r,s]),b=(v,S)=>{const N=Be(et(v)),I=Jr(r._getFieldArray(s),N);r._names.focus=Xr(s,I.length-1,S),d.current=Jr(d.current,N.map(Ze)),p(I),u(I),r._setFieldArray(s,I,Jr,{argA:Qr(v)})},g=(v,S)=>{const N=Be(et(v)),I=ts(r._getFieldArray(s),N);r._names.focus=Xr(s,0,S),d.current=ts(d.current,N.map(Ze)),p(I),u(I),r._setFieldArray(s,I,ts,{argA:Qr(v)})},x=v=>{const S=rs(r._getFieldArray(s),v);d.current=rs(d.current,v),p(S),u(S),!Array.isArray(_e(r._fields,s))&&fr(r._fields,s,void 0),r._setFieldArray(s,S,rs,{argA:v})},w=(v,S,N)=>{const I=Be(et(S)),C=Zr(r._getFieldArray(s),v,I);r._names.focus=Xr(s,v,N),d.current=Zr(d.current,v,I.map(Ze)),p(C),u(C),r._setFieldArray(s,C,Zr,{argA:v,argB:Qr(S)})},y=(v,S)=>{const N=r._getFieldArray(s);ss(N,v,S),ss(d.current,v,S),p(N),u(N),r._setFieldArray(s,N,ss,{argA:v,argB:S},!1)},h=(v,S)=>{const N=r._getFieldArray(s);es(N,v,S),es(d.current,v,S),p(N),u(N),r._setFieldArray(s,N,es,{argA:v,argB:S},!1)},k=(v,S)=>{const N=et(S),I=Fn(r._getFieldArray(s),v,N);d.current=[...I].map((C,T)=>!C||T===v?Ze():d.current[T]),p(I),u([...I]),r._setFieldArray(s,I,Fn,{argA:v,argB:N},!0,!1)},$=v=>{const S=Be(et(v));d.current=S.map(Ze),p([...S]),u([...S]),r._setFieldArray(s,[...S],N=>N,{},!0,!1)};return l.useEffect(()=>{r._state.action=!1,cd(s,r._names)&&r._subjects.state.next(A({},r._formState));const v=or(r._options.mode);if(f.current&&(!v.isOnSubmit||r._formState.isSubmitted)&&!or(r._options.reValidateMode).isOnSubmit&&!v.isOnBlur)if(r._options.resolver)r._runSchema([s]).then(S=>{r._updateIsValidating([s]);const N=_e(S.errors,s),I=_e(r._formState.errors,s);(I?!N&&I.type||N&&(I.type!==N.type||I.message!==N.message):N&&N.type)&&(N?fr(r._formState.errors,s,N):Fa(r._formState.errors,s),r._subjects.state.next({errors:r._formState.errors}))});else{const S=_e(r._fields,s);S&&S._f&&!(or(r._options.reValidateMode).isOnSubmit&&or(r._options.mode).isOnSubmit)&&ud(S,r._names.disabled,r._formValues,r._options.criteriaMode===Mt.all,r._options.shouldUseNativeValidation).then(N=>!mr(N)&&r._subjects.state.next({errors:dd(r._formState.errors,N,s)}))}r._subjects.state.next({name:s,values:et(r._formValues)}),r._names.focus&&ls(r._fields,(S,N)=>{if(r._names.focus&&N.startsWith(r._names.focus)&&S.focus)return S.focus(),1}),r._names.focus="",r._setValid(),f.current=!1},[c,s,r]),l.useEffect(()=>(!_e(r._formValues,s)&&r._setFieldArray(s),()=>{const v=!(r._options.shouldUnregister||o),S=(N,I)=>{const C=_e(r._fields,N);C&&C._f&&(C._f.mount=I)};f.current&&v&&r._subjects.state.next({name:s,values:et(r._formValues)}),v?S(s,!1):r.unregister(s)}),[s,r,a,o]),{swap:l.useCallback(y,[p,s,r]),move:l.useCallback(h,[p,s,r]),prepend:l.useCallback(g,[p,s,r]),append:l.useCallback(b,[p,s,r]),remove:l.useCallback(x,[p,s,r]),insert:l.useCallback(w,[p,s,r]),update:l.useCallback(k,[p,s,r]),replace:l.useCallback($,[p,s,r]),fields:l.useMemo(()=>c.map((v,S)=>P(A({},v),{[a]:d.current[S]||Ze()})),[c,a])}}function pd(e){const{form:t}=Ns();if(!t)throw new Error("useFormFieldArray must be used within a Form component with react-hook-form integration");return md(P(A({},e),{control:t.control}))}function _a(a){var o=a,{items:e,separator:t="/",className:r=""}=o,s=W(o,["items","separator","className"]);const i=["flex","items-center",m("sm","space-x"),se("bodySmall")],c=j(...i,r);return n.jsx("nav",P(A({"aria-label":"Breadcrumb",className:c},s),{children:n.jsx("ol",{className:j("flex","items-center",m("sm","space-x")),children:e.map((u,d)=>{const f=d===e.length-1;return n.jsxs("li",{className:"flex items-center",children:[d>0&&n.jsx("span",{className:j(m("sm","mx"),"text-fg-tertiary"),"aria-hidden":"true",children:t}),f?n.jsx("span",{className:j("text-fg-primary",Pe("label")),"aria-current":"page",children:u.label}):u.href?n.jsx("a",{href:u.href,className:j("inline-flex","items-center",m("xs","px"),m("xs","pt"),"border-b-2","border-transparent",se("bodySmall"),Pe("label"),"transition-colors","text-fg-secondary","hover:border-line-emphasis","hover:text-fg-primary"),children:u.label}):n.jsx("span",{className:"text-fg-secondary",children:u.label})]},d)})})}))}function Pa(u){var d=u,{currentPage:e,totalPages:t,onPageChange:r,totalItems:s,itemsPerPage:a,showPageInfo:o=!0,className:i=""}=d,c=W(d,["currentPage","totalPages","onPageChange","totalItems","itemsPerPage","showPageInfo","className"]);const f=()=>{e>1&&r(e-1)},p=()=>{e<t&&r(e+1)},b=h=>{h>=1&&h<=t&&h!==e&&r(h)},g=()=>{const h=[];if(t<=5)for(let $=1;$<=t;$++)h.push($);else if(e<=3){for(let $=1;$<=4;$++)h.push($);h.push("ellipsis"),h.push(t)}else if(e>=t-2){h.push(1),h.push("ellipsis");for(let $=t-3;$<=t;$++)h.push($)}else{h.push(1),h.push("ellipsis");for(let $=e-1;$<=e+1;$++)h.push($);h.push("ellipsis"),h.push(t)}return h},x=s&&a?(e-1)*a+1:void 0,w=s&&a?Math.min(e*a,s):void 0,y=j("flex","items-center","justify-between",m("base","px"),m("md","py"),i);return n.jsxs("nav",P(A({className:y,"aria-label":"Pagination"},c),{children:[n.jsxs("div",{className:j("flex","items-center",m("sm","gap")),children:[n.jsx(Z,{variant:"secondary",onClick:f,disabled:e===1,size:"sm",children:"Previous"}),n.jsx("div",{className:j("flex","items-center",m("xs","gap")),children:g().map((h,k)=>{if(h==="ellipsis")return n.jsx("span",{className:j(m("sm","px"),"text-fg-tertiary"),children:"..."},`ellipsis-${k}`);const $=h,v=$===e;return n.jsx(Z,{variant:v?"primary":"ghost",onClick:()=>b($),size:"sm","aria-current":v?"page":void 0,"aria-label":`Go to page ${$}`,children:$},$)})}),n.jsx(Z,{variant:"secondary",onClick:p,disabled:e===t,size:"sm",children:"Next"})]}),o&&s&&a&&n.jsxs("div",{className:j(je("sm"),"text-fg-primary"),children:["Showing ",x," to ",w," of ",s," results"]})]}))}function za(u){var d=u,{title:e,message:t,actionLabel:r,onAction:s,illustration:a,variant:o="default",className:i=""}=d,c=W(d,["title","message","actionLabel","onAction","illustration","variant","className"]);const f=j("flex","flex-col","items-center","justify-center","text-center",m("xl","py"),m("base","px"),i),p=o==="withAction"||r&&s,b=o==="withIllustration"||a;return n.jsxs("div",P(A({className:f,role:"status","aria-live":"polite","aria-label":`${e}. ${t}`},c),{children:[b&&a&&n.jsx("div",{className:j(m("base","mb")),"aria-hidden":"true",children:a}),n.jsx(Ue,{as:"h3",className:j(se("h4"),At("semibold"),"text-fg-primary",m("sm","mb")),children:e}),n.jsx(Ue,{as:"p",className:j(se("bodySmall"),"text-fg-secondary",m("md","mb"),"max-w-sm"),children:t}),p&&r&&s&&n.jsx(Z,{variant:"primary",onClick:s,children:r})]}))}function Oa(c){var u=c,{trigger:e,items:t,align:r="right",variant:s="default",className:a="","aria-label":o}=u,i=W(u,["trigger","items","align","variant","className","aria-label"]);const[d,f]=l.useState(!1),[p,b]=l.useState(-1),g=l.useRef(null),x=l.useRef(null),w=l.useRef(null),y=l.useRef([]),h=l.useId(),k=`dropdown-menu-${h}`,$=`dropdown-trigger-${h}`;l.useEffect(()=>{const T=L=>{g.current&&!g.current.contains(L.target)&&(f(!1),b(-1))};return d&&(document.addEventListener("mousedown",T),setTimeout(()=>{var F;const L=t.findIndex(M=>!M.disabled);L>=0&&(b(L),(F=y.current[L])==null||F.focus())},0)),()=>{document.removeEventListener("mousedown",T)}},[d,t]),l.useEffect(()=>{if(!d)return;const T=F=>{var D,O,B,X;const M=t.map((Q,oe)=>({item:Q,index:oe})).filter(({item:Q})=>!Q.disabled),R=M.findIndex(({index:Q})=>Q===p);switch(F.key){case"ArrowDown":{F.preventDefault();const Q=R<M.length-1?M[R+1].index:M[0].index;b(Q),(D=y.current[Q])==null||D.focus();break}case"ArrowUp":{F.preventDefault();const Q=R>0?M[R-1].index:M[M.length-1].index;b(Q),(O=y.current[Q])==null||O.focus();break}case"Home":{F.preventDefault();const Q=M[0].index;b(Q),(B=y.current[Q])==null||B.focus();break}case"End":{F.preventDefault();const Q=M[M.length-1].index;b(Q),(X=y.current[Q])==null||X.focus();break}case"Enter":case" ":F.preventDefault(),p>=0&&!t[p].disabled&&v(t[p]);break;case"Escape":F.preventDefault(),f(!1),b(-1),setTimeout(()=>{var Q;(Q=x.current)==null||Q.focus()},0);break}},L=w.current;if(L){const F=T;return L.addEventListener("keydown",F),()=>{L.removeEventListener("keydown",F)}}},[d,p,t]);const v=T=>{T.disabled||(T.onClick(),f(!1),b(-1),setTimeout(()=>{var L;(L=x.current)==null||L.focus()},0))},S=()=>{f(!d),b(-1)},N=T=>{(T.key==="Enter"||T.key===" "||T.key==="ArrowDown")&&(T.preventDefault(),f(!0))},I=r==="right"?"right-0":"left-0",C=l.isValidElement(e)?l.cloneElement(e,{onClick:T=>{var L,F;S(),(F=(L=e.props).onClick)==null||F.call(L,T)},onKeyDown:T=>{var L,F;N(T),(F=(L=e.props).onKeyDown)==null||F.call(L,T)},"aria-haspopup":"menu","aria-expanded":d,"aria-controls":k,"aria-label":o||e.props["aria-label"]||"Open menu",id:$,ref:pa(x,e.props.ref)}):n.jsx("div",{ref:T=>{x.current=T},onClick:S,onKeyDown:N,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":d,"aria-controls":k,"aria-label":o||"Open menu",id:$,children:e});return n.jsxs("div",P(A({className:j("relative","inline-block",a),ref:g},i),{children:[C,d&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:j("fixed","inset-0","z-10"),onClick:()=>{f(!1),b(-1)},"aria-hidden":"true"}),n.jsx("div",{ref:w,id:k,className:j("absolute","z-20",m("sm","mt"),"w-48",U("md"),ue("lg"),"bg-surface-overlay","ring-1","ring-line-strong","ring-opacity-5",I),role:"menu","aria-orientation":"vertical","aria-labelledby":$,"aria-activedescendant":p>=0?`${k}-item-${p}`:void 0,children:n.jsx("div",{className:j(m("xs","py")),role:"none",children:t.map((T,L)=>{const F=j("block",m("base","px"),m("xs","py"),se("bodySmall"),"w-full","text-left","focus:outline-none",T.disabled?j("text-fg-disabled","cursor-not-allowed","opacity-50"):T.variant==="danger"?j("text-error-dark","hover:bg-error-bg-emphasis","focus:bg-error-bg-emphasis"):j("text-fg-primary","hover:bg-surface-hover","focus:bg-surface-hover"));return n.jsx("button",{id:`${k}-item-${L}`,ref:M=>{y.current[L]=M},type:"button",className:F,onClick:()=>v(T),disabled:T.disabled,role:"menuitem","aria-disabled":T.disabled,tabIndex:T.disabled?-1:p===L?0:-1,children:T.label},L)})})})]})]}))}const Va=l.createContext(void 0);function Wa(){const e=l.useContext(Va);if(!e)throw new Error("DatePicker components must be used within a DatePicker component");return e}function cs({children:e,mode:t="single",value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,locale:u}){const d=()=>{if(r!==void 0)return null;if(s){if(t==="single"&&s instanceof Date)return s;if(t==="range"&&typeof s=="object"&&"start"in s)return null}return null},f=()=>r===void 0&&s&&t==="range"&&typeof s=="object"&&"start"in s?s:{start:null,end:null},[p,b]=l.useState(d()),[g,x]=l.useState(f()),w=t==="single"?r instanceof Date?r:p:null,y=t==="range"?r&&typeof r=="object"&&"start"in r?r:g:null,$={selectedDate:w,selectedRange:y,mode:t,onDateChange:v=>{t==="single"&&(r===void 0&&b(v),a==null||a(v))},onRangeChange:v=>{t==="range"&&(r===void 0&&x(v),a==null||a(v))},minDate:o,maxDate:i,disabledDates:c,locale:u};return n.jsx(Va.Provider,{value:$,children:e})}function Vt(e,t="yyyy-MM-dd"){const r=e.getFullYear(),s=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(r)).replace("MM",s).replace("dd",a).replace("MM/dd/yyyy",`${s}/${a}/${r}`).replace("dd/MM/yyyy",`${a}/${s}/${r}`)}function Ln(e){if(!e)return null;const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(t){const[,a,o,i]=t,c=new Date(parseInt(a),parseInt(o)-1,parseInt(i));if(!isNaN(c.getTime()))return c}const r=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(r){const[,a,o,i]=r,c=new Date(parseInt(i),parseInt(a)-1,parseInt(o));if(!isNaN(c.getTime()))return c}const s=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(s){const[,a,o,i]=s,c=new Date(parseInt(i),parseInt(o)-1,parseInt(a));if(!isNaN(c.getTime()))return c}return null}function Es(c){var u=c,{placeholder:e="Select date",format:t="yyyy-MM-dd",showCalendarButton:r=!0,"aria-label":s,onFocus:a,className:o=""}=u,i=W(u,["placeholder","format","showCalendarButton","aria-label","onFocus","className"]);const{selectedDate:d,selectedRange:f,mode:p,onDateChange:b}=Wa(),[g,x]=l.useState(""),[w,y]=l.useState(!1),h=l.useRef(null);l.useEffect(()=>{p==="single"&&d?x(Vt(d,t)):p==="range"&&f?f.start&&f.end?x(`${Vt(f.start,t)} - ${Vt(f.end,t)}`):f.start?x(Vt(f.start,t)):x(""):x("")},[d,f,p,t]);const k=S=>{const N=S.target.value;if(x(N),p==="single"){const I=Ln(N);b(I)}},$=()=>{if(y(!1),g&&p==="single"){const S=Ln(g);S&&x(Vt(S,t))}},v=()=>{var S;(S=h.current)==null||S.focus()};return n.jsx("div",P(A({className:`relative ${o}`},i),{children:n.jsx($e,{ref:h,type:"text",value:g,onChange:k,onFocus:()=>{y(!0),a==null||a()},onBlur:$,placeholder:e,"aria-label":s||e,rightIcon:r?n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:v,"aria-label":"Open calendar",type:"button",children:n.jsx(Wl,{className:"h-4 w-4"})}):void 0})}))}function bd(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function hd(e){return new Date(e.getFullYear(),e.getMonth(),1).getDay()}function gt(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Wt(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function gd(e,t,r){if(!t||!r)return!1;const s=e.getTime();return s>=t.getTime()&&s<=r.getTime()}function _n(e,t,r,s){return!!(t&&e<t||r&&e>r||s!=null&&s.some(a=>gt(e,a)))}const xd=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],vd=["January","February","March","April","May","June","July","August","September","October","November","December"];function Ms(a){var o=a,{month:e,onMonthChange:t,className:r=""}=o,s=W(o,["month","onMonthChange","className"]);const{selectedDate:i,selectedRange:c,mode:u,onDateChange:d,onRangeChange:f,minDate:p,maxDate:b,disabledDates:g}=Wa(),[x,w]=l.useState(e||i||(c==null?void 0:c.start)||new Date),y=l.useRef(null),[h,k]=l.useState(()=>{const M=new Date,R=e||i||(c==null?void 0:c.start)||M;return i&&Wt(i,R)?i:Wt(M,R)?M:new Date(R.getFullYear(),R.getMonth(),1)});l.useEffect(()=>{e&&w(e)},[e]),l.useEffect(()=>{if(!y.current)return;const M=y.current.querySelector(`[data-date="${h.toISOString()}"]`);M&&M.focus()},[h]);const $=(()=>{if(Wt(h,x))return h;const M=new Date;return Wt(M,x)?M:new Date(x.getFullYear(),x.getMonth(),1)})(),v=bd(x),S=hd(x),N=[];for(let M=0;M<S;M++)N.push(null);for(let M=1;M<=v;M++)N.push(new Date(x.getFullYear(),x.getMonth(),M));const I=M=>{if(!_n(M,p,b,g)){if(u==="single")d(M);else if(u==="range"){const R=c||{start:null,end:null};!R.start||R.start&&R.end?f({start:M,end:null}):R.start&&!R.end&&(M<R.start?f({start:M,end:R.start}):f({start:R.start,end:M}))}}},C=()=>{const M=new Date(x.getFullYear(),x.getMonth()-1,1);w(M),t==null||t(M)},T=()=>{const M=new Date(x.getFullYear(),x.getMonth()+1,1);w(M),t==null||t(M)},L=(M,R)=>{let D=null;switch(M.key){case"ArrowLeft":M.preventDefault(),D=new Date(R.getFullYear(),R.getMonth(),R.getDate()-1);break;case"ArrowRight":M.preventDefault(),D=new Date(R.getFullYear(),R.getMonth(),R.getDate()+1);break;case"ArrowUp":M.preventDefault(),D=new Date(R.getFullYear(),R.getMonth(),R.getDate()-7);break;case"ArrowDown":M.preventDefault(),D=new Date(R.getFullYear(),R.getMonth(),R.getDate()+7);break;case"Home":M.preventDefault(),D=new Date(R.getFullYear(),R.getMonth(),1);break;case"End":M.preventDefault(),D=new Date(R.getFullYear(),R.getMonth()+1,0);break;case"Enter":case" ":M.preventDefault(),I(R);return}D&&(Wt(D,x)||w(new Date(D.getFullYear(),D.getMonth(),1)),k(D))},F=[];for(let M=0;M<N.length;M+=7)F.push(N.slice(M,M+7));return n.jsxs("div",P(A({ref:y,className:`${m("base","p")} ${r}`},s),{children:[n.jsxs("div",{className:`flex items-center justify-between ${m("base","mb")}`,children:[n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:C,"aria-label":"Previous month",children:n.jsx(Bt,{className:"h-4 w-4"})}),n.jsxs("div",{className:"text-sm font-semibold",children:[vd[x.getMonth()]," ",x.getFullYear()]}),n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:T,"aria-label":"Next month",children:n.jsx(xt,{className:"h-4 w-4"})})]}),n.jsxs("div",{role:"grid","aria-label":"Calendar",children:[n.jsx("div",{role:"row",className:`grid grid-cols-7 ${m("xs","gap")} ${m("sm","mb")}`,children:xd.map(M=>n.jsx("div",{role:"columnheader",className:`text-center text-xs font-medium text-fg-tertiary ${m("xs","py")}`,children:M},M))}),F.map((M,R)=>n.jsx("div",{role:"row",className:`grid grid-cols-7 ${m("xs","gap")}`,children:M.map((D,O)=>{if(!D)return n.jsx("div",{role:"gridcell",className:"aspect-square"},`empty-${R}-${O}`);const B=u==="single"?gt(D,i):gt(D,(c==null?void 0:c.start)||null)||gt(D,(c==null?void 0:c.end)||null),X=u==="range"&&c?gd(D,c.start,c.end):!1,Q=_n(D,p,b,g),oe=gt(D,new Date),H=gt(D,h),_=gt(D,$);return n.jsx("button",{role:"gridcell",type:"button","data-date":D.toISOString(),tabIndex:_?0:-1,onClick:()=>I(D),onKeyDown:Y=>L(Y,D),className:`
178
7
  aspect-square
179
8
  text-sm
180
- ${J("md")}
9
+ ${U("md")}
181
10
  transition-colors
182
11
  focus:outline-none
183
12
  focus:ring-2
184
13
  focus:ring-offset-1
185
- ${U?"text-fg-disabled cursor-not-allowed opacity-50":K?"bg-surface-brand-strong text-fg-inverse font-semibold":H?"bg-surface-brand-muted text-fg-brand-emphasis":oe?"border-2 border-line-brand font-semibold":ne?"bg-surface-brand-muted":"hover:bg-surface-active"}
186
- `,"aria-label":R.toDateString(),"aria-selected":K,"aria-disabled":U,children:R.getDate()},R.toISOString())})},`week-${I}`))]})]}))}function Cr({children:e,mode:t="single",value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:u,placeholder:d,format:c,showCalendarButton:f=!0,"aria-label":p,className:m=""}){const[h,x]=l.useState(!1),v=l.useRef(null),y=l.useRef(null);return l.useEffect(()=>{if(!h)return;const b=w=>{var N,L,S,D;const C=w.target,g=(L=(N=v.current)==null?void 0:N.contains(C))!=null?L:!1,j=(D=(S=y.current)==null?void 0:S.contains(C))!=null?D:!1;!g&&!j&&x(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[h]),l.useEffect(()=>{if(!h)return;const b=w=>{w.key==="Escape"&&x(!1)};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[h]),e?n.jsx(is,{mode:t,value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:u,children:e}):n.jsx("div",{ref:v,className:`relative ${m}`,children:n.jsxs(is,{mode:t,value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:u,children:[n.jsx(Ss,{placeholder:d,format:c,showCalendarButton:f,"aria-label":p,onFocus:()=>x(!0)}),h&&n.jsx(Fa,{containerRef:v,popupRef:y,children:n.jsx(Cs,{})})]})})}function Fa({children:e,containerRef:t,popupRef:r}){const s=l.useRef(null),a=r||s,[o,i]=l.useState(null);if(l.useEffect(()=>{if(t!=null&&t.current){const d=t.current.getBoundingClientRect();i({top:d.bottom+window.scrollY+8,left:d.left+window.scrollX})}},[t]),!o)return null;const u=n.jsx("div",{ref:a,className:`
187
- fixed ${ue("popover")}
14
+ ${Q?"text-fg-disabled cursor-not-allowed opacity-50":B?"bg-surface-brand-strong text-fg-inverse font-semibold":X?"bg-surface-brand-muted text-fg-brand-emphasis":oe?"border-2 border-line-brand font-semibold":H?"bg-surface-brand-muted":"hover:bg-surface-active"}
15
+ `,"aria-label":D.toDateString(),"aria-selected":B,"aria-disabled":Q,children:D.getDate()},D.toISOString())})},`week-${R}`))]})]}))}function Er({children:e,mode:t="single",value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,placeholder:u,format:d,showCalendarButton:f=!0,"aria-label":p,className:b=""}){const[g,x]=l.useState(!1),w=l.useRef(null),y=l.useRef(null);return l.useEffect(()=>{if(!g)return;const h=k=>{var N,I,C,T;const $=k.target,v=(I=(N=w.current)==null?void 0:N.contains($))!=null?I:!1,S=(T=(C=y.current)==null?void 0:C.contains($))!=null?T:!1;!v&&!S&&x(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[g]),l.useEffect(()=>{if(!g)return;const h=k=>{k.key==="Escape"&&x(!1)};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[g]),e?n.jsx(cs,{mode:t,value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,children:e}):n.jsx("div",{ref:w,className:`relative ${b}`,children:n.jsxs(cs,{mode:t,value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,children:[n.jsx(Es,{placeholder:u,format:d,showCalendarButton:f,"aria-label":p,onFocus:()=>x(!0)}),g&&n.jsx(Ha,{containerRef:w,popupRef:y,children:n.jsx(Ms,{})})]})})}function Ha({children:e,containerRef:t,popupRef:r}){const s=l.useRef(null),a=r||s,[o,i]=l.useState(null);if(l.useEffect(()=>{if(t!=null&&t.current){const u=t.current.getBoundingClientRect();i({top:u.bottom+window.scrollY+8,left:u.left+window.scrollX})}},[t]),!o)return null;const c=n.jsx("div",{ref:a,className:`
16
+ fixed ${be("popover")}
188
17
  bg-surface-overlay
189
- ${J("lg")}
190
- ${$e("xl")}
18
+ ${U("lg")}
19
+ ${ue("xl")}
191
20
  border border-line-default
192
- `,role:"dialog","aria-modal":"false","aria-label":"Date picker calendar",style:{top:`${o.top}px`,left:`${o.left}px`},children:e});return typeof window!="undefined"?qe.createPortal(u,document.body):u}Cr.Input=Ss;Cr.Calendar=Cs;Cr.Popup=Fa;const nd=Cr,$r=l.createContext(void 0);function Er(){const e=l.useContext($r);if(e===void 0)throw new Error("useTabsContext must be used within a Tabs component");return e}function ad(){return l.useContext($r)}function La({defaultValue:e,value:t,onValueChange:r,orientation:s="horizontal",activationMode:a="automatic",children:o}){const[i,u]=l.useState(e||""),d=t!==void 0,c=d?t:i,f=l.useCallback(m=>{d||u(m),r==null||r(m)},[d,r]),p={value:c,onValueChange:f,orientation:s,activationMode:a};return n.jsx($r.Provider,{value:p,children:o})}function _a(a){var o=a,{children:e,className:t="",variant:r="default"}=o,s=O(o,["children","className","variant"]);const{orientation:i}=Er(),u=l.useRef(null);l.useEffect(()=>{const f=u.current;if(!f)return;const p=m=>{var y;const h=Array.from(f.querySelectorAll('[role="tab"]:not([disabled])')),x=h.findIndex(b=>b===document.activeElement);if(x===-1)return;let v=x;i==="horizontal"?m.key==="ArrowRight"?(m.preventDefault(),v=(x+1)%h.length):m.key==="ArrowLeft"&&(m.preventDefault(),v=(x-1+h.length)%h.length):m.key==="ArrowDown"?(m.preventDefault(),v=(x+1)%h.length):m.key==="ArrowUp"&&(m.preventDefault(),v=(x-1+h.length)%h.length),m.key==="Home"?(m.preventDefault(),v=0):m.key==="End"&&(m.preventDefault(),v=h.length-1),v!==x&&((y=h[v])==null||y.focus())};return f.addEventListener("keydown",p),()=>f.removeEventListener("keydown",p)},[i]);const d=r==="compact"&&i==="vertical"?"flex":"inline-flex",c=k(i==="vertical"?"flex-col":"flex-row",E("xs","gap"));return n.jsx("div",z(T({ref:u,role:"tablist","aria-orientation":i,className:k(d,c,E("xs","p"),"bg-surface-muted",J("md"),t)},s),{children:e}))}function Pa(u){var d=u,{value:e,children:t,disabled:r=!1,className:s="",onClick:a,onKeyDown:o}=d,i=O(d,["value","children","disabled","className","onClick","onKeyDown"]);const{value:c,onValueChange:f,orientation:p,activationMode:m}=Er(),h=c===e,x=b=>{r||((m==="automatic"||h)&&f(e),a==null||a(b))},v=b=>{var w;m==="automatic"&&!r&&!h&&f(e),(w=i.onFocus)==null||w.call(i,b)},y=b=>{if(!r&&!(b.key==="ArrowRight"||b.key==="ArrowLeft"||b.key==="ArrowDown"||b.key==="ArrowUp"||b.key==="Home"||b.key==="End")){if(m==="manual"&&(b.key==="Enter"||b.key===" ")){b.preventDefault(),f(e);return}o==null||o(b)}};return n.jsx("button",z(T({type:"button",role:"tab","aria-selected":h,"aria-controls":`tabpanel-${e}`,id:`tab-${e}`,tabIndex:r?-1:h?0:-1,disabled:r,onClick:x,onFocus:v,onKeyDown:y,className:k("inline-flex","items-center","justify-center",E("sm","px"),E("xs","py"),re("bodySmall"),Pe("label"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-2",J("sm"),h?k("bg-surface-brand-strong","text-fg-inverse"):k("text-fg-secondary","hover:bg-surface-active"),r?"opacity-50 cursor-not-allowed":"cursor-pointer",s)},i),{children:t}))}function za(o){var i=o,{value:e,children:t,forceMount:r=!1,className:s=""}=i,a=O(i,["value","children","forceMount","className"]);const{value:u}=Er(),d=u===e;return!d&&!r?null:n.jsx("div",z(T({role:"tabpanel",id:`tabpanel-${e}`,"aria-labelledby":`tab-${e}`,hidden:!d,className:`
193
- mt-2
21
+ `,role:"dialog","aria-modal":"false","aria-label":"Date picker calendar",style:{top:`${o.top}px`,left:`${o.left}px`},children:e});return typeof window!="undefined"?Ke.createPortal(c,document.body):c}Er.Input=Es;Er.Calendar=Ms;Er.Popup=Ha;const yd=Er,Mr=l.createContext(void 0);function Tr(){const e=l.useContext(Mr);if(e===void 0)throw new Error("useTabsContext must be used within a Tabs component");return e}function wd(){return l.useContext(Mr)}function Ba({defaultValue:e,value:t,onValueChange:r,orientation:s="horizontal",activationMode:a="automatic",children:o}){const[i,c]=l.useState(e||""),u=t!==void 0,d=u?t:i,f=l.useCallback(b=>{u||c(b),r==null||r(b)},[u,r]),p={value:d,onValueChange:f,orientation:s,activationMode:a};return n.jsx(Mr.Provider,{value:p,children:o})}function Ua(o){var i=o,{children:e,className:t="",variant:r="default",orientation:s}=i,a=W(i,["children","className","variant","orientation"]);var b;const{orientation:c}=Tr(),u=(b=s!=null?s:c)!=null?b:"horizontal",d=l.useRef(null);l.useEffect(()=>{const g=d.current;if(!g)return;const x=w=>{var $;const y=Array.from(g.querySelectorAll('[role="tab"]:not([disabled])')),h=y.findIndex(v=>v===document.activeElement);if(h===-1)return;let k=h;u==="horizontal"?w.key==="ArrowRight"?(w.preventDefault(),k=(h+1)%y.length):w.key==="ArrowLeft"&&(w.preventDefault(),k=(h-1+y.length)%y.length):w.key==="ArrowDown"?(w.preventDefault(),k=(h+1)%y.length):w.key==="ArrowUp"&&(w.preventDefault(),k=(h-1+y.length)%y.length),w.key==="Home"?(w.preventDefault(),k=0):w.key==="End"&&(w.preventDefault(),k=y.length-1),k!==h&&(($=y[k])==null||$.focus())};return g.addEventListener("keydown",x),()=>g.removeEventListener("keydown",x)},[u]);const f=r==="compact"&&u==="vertical"?"flex":"inline-flex",p=j(u==="vertical"?"flex-col":"flex-row",m("xs","gap"));return n.jsx("div",P(A({ref:d,role:"tablist","aria-orientation":u,className:j(f,p,m("xs","p"),"bg-surface-muted",U("md"),t)},a),{children:e}))}function Ga(c){var u=c,{value:e,children:t,disabled:r=!1,className:s="",onClick:a,onKeyDown:o}=u,i=W(u,["value","children","disabled","className","onClick","onKeyDown"]);const{value:d,onValueChange:f,orientation:p,activationMode:b}=Tr(),g=d===e,x=h=>{r||((b==="automatic"||g)&&f(e),a==null||a(h))},w=h=>{var k;b==="automatic"&&!r&&!g&&f(e),(k=i.onFocus)==null||k.call(i,h)},y=h=>{if(!r&&!(h.key==="ArrowRight"||h.key==="ArrowLeft"||h.key==="ArrowDown"||h.key==="ArrowUp"||h.key==="Home"||h.key==="End")){if(b==="manual"&&(h.key==="Enter"||h.key===" ")){h.preventDefault(),f(e);return}o==null||o(h)}};return n.jsx("button",P(A({type:"button",role:"tab","aria-selected":g,"aria-controls":`tabpanel-${e}`,id:`tab-${e}`,tabIndex:r?-1:g?0:-1,disabled:r,onClick:x,onFocus:w,onKeyDown:y,className:j("inline-flex","items-center","justify-center",m("sm","px"),m("xs","py"),se("bodySmall"),Pe("label"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-2",U("sm"),g?j("bg-surface-brand-strong","text-fg-inverse"):j("text-fg-secondary","hover:bg-surface-active"),r?"opacity-50 cursor-not-allowed":"cursor-pointer",s)},i),{children:t}))}function Ka(o){var i=o,{value:e,children:t,forceMount:r=!1,className:s=""}=i,a=W(i,["value","children","forceMount","className"]);const{value:c}=Tr(),u=c===e;return!u&&!r?null:n.jsx("div",P(A({role:"tabpanel",id:`tabpanel-${e}`,"aria-labelledby":`tab-${e}`,hidden:!u,className:`
22
+ ${m("sm","mt")}
194
23
  focus:outline-none
195
24
  ${s}
196
- `},a),{children:t}))}function Mr(r){var s=r,{children:e}=s,t=O(s,["children"]);return n.jsx(La,z(T({},t),{children:e}))}Mr.List=_a;Mr.Trigger=Pa;Mr.Content=za;const od=Mr,Tr=l.forwardRef(function(m,p){var h=m,{onSearch:t,onClear:r,loading:s=!1,showClearButton:a=!0,debounceMs:o=300,value:i,defaultValue:u,onChange:d,className:c=""}=h,f=O(h,["onSearch","onClear","loading","showClearButton","debounceMs","value","defaultValue","onChange","className"]);const[x,v]=l.useState(typeof u=="string"?u:""),[y,b]=l.useState(null),w=i!==void 0,C=w?i:x,g=C!=null&&String(C).length>0,j=S=>{const D=S.target.value;w||v(D),d==null||d(S),y&&clearTimeout(y);const A=setTimeout(()=>{t==null||t(D)},o);b(A)},N=()=>{w||v("");const S={target:{value:""},currentTarget:{value:""}};d==null||d(S),r==null||r(),t==null||t("")},L=S=>{var D;S.key==="Enter"&&t&&t(String(C||"")),(D=f.onKeyDown)==null||D.call(f,S)};return n.jsx("div",{className:k("relative",c),children:n.jsx(Se,z(T({ref:p},f),{type:"search",value:C,onChange:j,onKeyDown:L,leftIcon:s?n.jsx("div",{className:"animate-spin",children:n.jsx(as,{className:"h-4 w-4"})}):n.jsx(as,{className:"h-4 w-4"}),rightIcon:a&&g&&!s?n.jsx(Z,{variant:"ghost",size:"sm",onClick:N,className:"h-auto p-1","aria-label":"Clear search",children:n.jsx(Ne,{className:"h-4 w-4"})}):void 0,className:k(E("lg","pr"))}))})});Tr.displayName="SearchInput";const $s=l.forwardRef(function({option:t,isHighlighted:r,onSelect:s},a){const o=()=>{t.disabled||s(t)};return n.jsxs("div",{ref:a,role:"option","aria-selected":r,"aria-disabled":t.disabled,onClick:o,className:`
25
+ `},a),{children:t}))}function Ar(r){var s=r,{children:e}=s,t=W(s,["children"]);return n.jsx(Ba,P(A({},t),{children:e}))}Ar.List=Ua;Ar.Trigger=Ga;Ar.Content=Ka;const kd=Ar,Rr=l.forwardRef(function(b,p){var g=b,{onSearch:t,onClear:r,loading:s=!1,showClearButton:a=!0,debounceMs:o=300,value:i,defaultValue:c,onChange:u,className:d=""}=g,f=W(g,["onSearch","onClear","loading","showClearButton","debounceMs","value","defaultValue","onChange","className"]);const[x,w]=l.useState(typeof c=="string"?c:""),[y,h]=l.useState(null),k=i!==void 0,$=k?i:x,v=$!=null&&String($).length>0,S=C=>{const T=C.target.value;k||w(T),u==null||u(C),y&&clearTimeout(y);const L=setTimeout(()=>{t==null||t(T)},o);h(L)},N=()=>{k||w("");const C={target:{value:""},currentTarget:{value:""}};u==null||u(C),r==null||r(),t==null||t("")},I=C=>{var T;C.key==="Enter"&&t&&t(String($||"")),(T=f.onKeyDown)==null||T.call(f,C)};return n.jsx("div",{className:j("relative",d),children:n.jsx($e,P(A({ref:p},f),{type:"search",value:$,onChange:S,onKeyDown:I,leftIcon:s?n.jsx("div",{className:"animate-spin",children:n.jsx(is,{className:"h-4 w-4"})}):n.jsx(is,{className:"h-4 w-4"}),rightIcon:a&&v&&!s?n.jsx(Z,{variant:"ghost",size:"sm",onClick:N,className:`h-auto ${m("xs","p")}`,"aria-label":"Clear search",children:n.jsx(Se,{className:"h-4 w-4"})}):void 0,className:j(m("lg","pr"))}))})});Rr.displayName="SearchInput";const Ts=l.forwardRef(function({option:t,isHighlighted:r,onSelect:s},a){const o=()=>{t.disabled||s(t)};return n.jsxs("div",{ref:a,role:"option","aria-selected":r,"aria-disabled":t.disabled,onClick:o,className:`
197
26
  flex
198
27
  items-center
199
- gap-2
200
- ${E("sm","px")}
201
- ${E("sm","py")}
28
+ ${m("sm","gap")}
29
+ ${m("sm","px")}
30
+ ${m("sm","py")}
202
31
  text-sm
203
32
  cursor-pointer
204
33
  transition-colors
205
34
  ${r?"bg-surface-active":""}
206
35
  ${t.disabled?"opacity-50 cursor-not-allowed":"hover:bg-surface-hover"}
207
- `,children:[t.icon&&n.jsx("span",{className:"flex-shrink-0",children:t.icon}),n.jsx("span",{className:"flex-1",children:t.label})]})});$s.displayName="AutocompleteOption";const Ar=l.forwardRef(function({options:t,highlightedIndex:r,onSelect:s,loading:a=!1,emptyMessage:o="No options found",containerRef:i,showSelectAll:u=!1,allSelected:d=!1,onSelectAll:c,onDeselectAll:f,"aria-label":p,"aria-labelledby":m},h){const[x,v]=l.useState({top:0,left:0,width:0});l.useEffect(()=>{if(i.current){const b=i.current.getBoundingClientRect();v({top:b.bottom+window.scrollY+4,left:b.left+window.scrollX,width:b.width})}},[i]);const y=n.jsx("div",{ref:h,role:"listbox","aria-label":m?void 0:p,"aria-labelledby":m,className:`
36
+ `,children:[t.icon&&n.jsx("span",{className:"flex-shrink-0",children:t.icon}),n.jsx("span",{className:"flex-1",children:t.label})]})});Ts.displayName="AutocompleteOption";const Ir=l.forwardRef(function({options:t,highlightedIndex:r,onSelect:s,loading:a=!1,emptyMessage:o="No options found",containerRef:i,showSelectAll:c=!1,allSelected:u=!1,onSelectAll:d,onDeselectAll:f,"aria-label":p,"aria-labelledby":b},g){const[x,w]=l.useState({top:0,left:0,width:0});l.useEffect(()=>{if(i.current){const h=i.current.getBoundingClientRect();w({top:h.bottom+window.scrollY+4,left:h.left+window.scrollX,width:h.width})}},[i]);const y=n.jsx("div",{ref:g,role:"listbox","aria-label":b?void 0:p,"aria-labelledby":b,className:`
208
37
  absolute
209
- ${ue("popover")}
38
+ ${be("popover")}
210
39
  bg-surface-overlay
211
- ${J("md")}
212
- ${$e("lg")}
40
+ ${U("md")}
41
+ ${ue("lg")}
213
42
  border
214
43
  border-line-default
215
44
  max-h-60
216
45
  overflow-y-auto
217
- ${E("xs","py")}
46
+ ${m("xs","py")}
218
47
  `,style:{top:`${x.top}px`,left:`${x.left}px`,width:`${x.width}px`},children:a?n.jsx("div",{className:`
219
- ${E("md","p")}
48
+ ${m("md","p")}
220
49
  text-sm
221
50
  text-fg-tertiary
222
51
  text-center
223
52
  `,children:"Loading..."}):t.length===0?n.jsx("div",{className:`
224
- ${E("md","p")}
53
+ ${m("md","p")}
225
54
  text-sm
226
55
  text-fg-tertiary
227
56
  text-center
228
- `,children:o}):n.jsxs(n.Fragment,{children:[u&&n.jsx("div",{className:`
229
- ${E("sm","px")}
230
- ${E("sm","py")}
57
+ `,children:o}):n.jsxs(n.Fragment,{children:[c&&n.jsx("div",{className:`
58
+ ${m("sm","px")}
59
+ ${m("sm","py")}
231
60
  text-sm
232
61
  font-medium
233
62
  cursor-pointer
234
63
  hover:bg-surface-hover
235
64
  border-b
236
65
  border-line-default
237
- `,onClick:d?f:c,children:d?"Deselect All":"Select All"}),t.map((b,w)=>n.jsx($s,{option:b,isHighlighted:w===r,onSelect:s},b.value))]})});return typeof window!="undefined"?qe.createPortal(y,document.body):null});Ar.displayName="AutocompleteList";const Oa=l.forwardRef(function({options:t,value:r,defaultValue:s,onChange:a,onSelect:o,placeholder:i="Type to search...",loading:u=!1,disabled:d=!1,emptyMessage:c="No options found",debounceMs:f=300,filterOptions:p,className:m="",inputClassName:h="",size:x="md",label:v,"aria-label":y,"aria-labelledby":b,id:w},C){const g=l.useId(),j=w!=null?w:g,[N,L]=l.useState(typeof s=="string"?s:""),[S,D]=l.useState(!1),[A,M]=l.useState(-1),[F,I]=l.useState(""),R=l.useRef(null),W=l.useRef(null),K=l.useRef(null),H=l.useRef(null),U=r!==void 0,oe=U?r:N,P=F.trim()?p?p(t,F):t.filter(_=>_.label.toLowerCase().includes(F.toLowerCase())):t,G=P.length>0,Y=_=>{const V=_.target.value;I(V),U||L(V),a==null||a(V),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{D(!0),M(-1)},f)},Q=_=>{var V;_.disabled||(U||L(_.value),I(_.label),D(!1),M(-1),a==null||a(_.value),o==null||o(_),(V=W.current)==null||V.focus())},le=_=>{if(!S||P.length===0){(_.key==="ArrowDown"||_.key==="Enter")&&D(!0);return}switch(_.key){case"ArrowDown":_.preventDefault(),M(V=>V<P.length-1?V+1:0);break;case"ArrowUp":_.preventDefault(),M(V=>V>0?V-1:P.length-1);break;case"Enter":_.preventDefault(),A>=0&&A<P.length&&Q(P[A]);break;case"Escape":_.preventDefault(),D(!1),M(-1);break}};l.useEffect(()=>{if(!S)return;const _=V=>{R.current&&!R.current.contains(V.target)&&(D(!1),M(-1))};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[S]),l.useEffect(()=>{if(A>=0&&K.current){const _=K.current.querySelectorAll('[role="option"]');_[A]&&typeof _[A].scrollIntoView=="function"&&_[A].scrollIntoView({block:"nearest",behavior:"smooth"})}},[A]),l.useEffect(()=>{if(oe){const _=t.find(V=>V.value===oe);I(_?_.label:oe)}else I("")},[oe,t]),l.useEffect(()=>{process.env.NODE_ENV==="production"||v||y||b||typeof document!="undefined"&&document.querySelector(`label[for="${CSS.escape(j)}"]`)||console.warn("[Autocomplete] Missing accessible name. Provide a `label` prop, `aria-label`, `aria-labelledby`, or pair an external `<label htmlFor={id}>` with the same `id`.")},[v,y,b,j]);const se=S&&(G||u||c);return n.jsxs("div",{ref:R,className:`relative ${m}`,children:[n.jsx(Se,{ref:W||C,id:j,label:v,"aria-label":y,"aria-labelledby":b,value:F,onChange:Y,onKeyDown:le,onFocus:()=>D(!0),placeholder:i,disabled:d,size:x,rightIcon:u?n.jsx(fa,{className:"h-4 w-4 animate-spin"}):n.jsx(hs,{className:`h-4 w-4 transition-transform ${S?"rotate-180":""}`}),className:h}),se&&n.jsx(Ar,{ref:K,options:P,highlightedIndex:A,onSelect:Q,loading:u,emptyMessage:c,containerRef:R,"aria-labelledby":b,"aria-label":b?void 0:y||v})]})});Oa.displayName="Autocomplete";const Va=l.forwardRef(function({options:t,value:r,defaultValue:s=[],onChange:a,onSelect:o,placeholder:i="Select options...",loading:u=!1,disabled:d=!1,emptyMessage:c="No options found",maxSelected:f,showSelectAll:p=!1,className:m="",inputClassName:h="",size:x="md",label:v},y){const b=l.useId(),[w,C]=l.useState(s),[g,j]=l.useState(!1),[N,L]=l.useState(-1),[S,D]=l.useState(""),A=l.useRef(null),M=l.useRef(null),F=l.useRef(null),I=r!==void 0,R=I?r:w,W=t.filter(_=>R.includes(_.value)),H=(()=>{let _=t;return S.trim()&&(_=t.filter(V=>V.label.toLowerCase().includes(S.toLowerCase()))),_})(),U=H.length>0,oe=_=>{const V=_.target.value;D(V),j(!0),L(-1)},ne=_=>{if(_.disabled||f&&R.length>=f&&!R.includes(_.value))return;const V=R.includes(_.value)?R.filter(X=>X!==_.value):[...R,_.value];I||C(V),a==null||a(V),o==null||o(t.filter(X=>V.includes(X.value))),D("")},P=()=>{const _=H.filter(X=>!X.disabled).map(X=>X.value),V=[...new Set([...R,..._])];I||C(V),a==null||a(V),o==null||o(t.filter(X=>V.includes(X.value)))},G=()=>{const _=H.map(X=>X.value),V=R.filter(X=>!_.includes(X));I||C(V),a==null||a(V),o==null||o(t.filter(X=>V.includes(X.value)))},Y=_=>{const V=R.filter(X=>X!==_);I||C(V),a==null||a(V),o==null||o(t.filter(X=>V.includes(X.value)))},Q=_=>{if(!g||H.length===0){(_.key==="ArrowDown"||_.key==="Enter")&&j(!0),_.key==="Backspace"&&S===""&&R.length>0&&Y(R[R.length-1]);return}switch(_.key){case"ArrowDown":_.preventDefault(),L(V=>V<H.length-1?V+1:0);break;case"ArrowUp":_.preventDefault(),L(V=>V>0?V-1:H.length-1);break;case"Enter":_.preventDefault(),N>=0&&N<H.length&&ne(H[N]);break;case"Escape":_.preventDefault(),j(!1),L(-1);break}};l.useEffect(()=>{if(!g)return;const _=V=>{A.current&&!A.current.contains(V.target)&&(j(!1),L(-1),D(""))};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[g]);const le=H.filter(_=>!_.disabled).every(_=>R.includes(_.value)),se=g&&(U||u||c);return n.jsxs("div",{ref:A,className:k("relative",m),children:[n.jsx("label",{htmlFor:b,className:k("block",E("sm","mb"),"text-sm","font-medium","text-fg-primary"),children:v}),n.jsxs("div",{className:k("flex","flex-wrap",E("sm","gap"),E("sm","p"),"border","border-line-default",J("md"),"min-h-10","focus-within:outline-none","focus-within:ring-2","focus-within:ring-offset-2","focus-within:border-line-brand","focus-within:ring-line-brand"),children:[W.map(_=>n.jsx(ws,{onRemove:()=>Y(_.value),size:x==="sm"?"sm":x==="lg"?"lg":"md",children:_.label},_.value)),n.jsx("input",{id:b,ref:_=>{typeof y=="function"?y(_):y&&(y.current=_),M.current=_},type:"text",value:S,onChange:oe,onKeyDown:Q,onFocus:()=>j(!0),placeholder:R.length===0?i:"",disabled:d,className:k("flex-1","min-w-32","outline-none","bg-transparent",h)})]}),se&&n.jsx(Ar,{ref:F,"aria-label":v,options:H.map(_=>z(T({},_),{icon:R.includes(_.value)?n.jsx(ns,{className:k("h-4","w-4","text-fg-brand")}):_.icon})),highlightedIndex:N,onSelect:ne,loading:u,emptyMessage:c,containerRef:A,showSelectAll:p&&H.length>0,allSelected:le,onSelectAll:P,onDeselectAll:G})]})});Va.displayName="MultiSelect";function id({value:e,defaultValue:t=0,max:r=5,size:s="md",variant:a="filled",readOnly:o=!1,allowHalf:i=!1,showValue:u=!1,onChange:d,onHover:c,className:f="",icon:p,emptyIcon:m}){const[h,x]=l.useState(t),[v,y]=l.useState(null),b=e!==void 0,w=v!=null?v:b?e:h,C={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},g=S=>{o||(b||x(S),d==null||d(S))},j=S=>{o||(y(S),c==null||c(S))},N=()=>{o||y(null)},L=S=>{const D=S+1,A=i&&w>=D-.5&&w<D,M=w>=D,F=k(C[s],be("base"),!o&&"cursor-pointer",M||A?"text-fg-warning":"text-fg-disabled"),I=p||n.jsx(Nt,{className:F,fill:M?"currentColor":"none"}),R=m||n.jsx(Nt,{className:F,fill:"none"});return n.jsx("span",{className:"relative inline-block",onClick:()=>g(D),onMouseEnter:()=>j(D),onMouseLeave:N,role:o?void 0:"button",tabIndex:o?void 0:0,"aria-label":o?void 0:`Rate ${D} out of ${r}`,onKeyDown:W=>{!o&&(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),g(D))},children:A?n.jsxs("span",{className:"relative inline-block",children:[n.jsx("span",{className:"absolute inset-0 overflow-hidden",style:{width:"50%"},children:a==="filled"?n.jsx(Nt,{className:F,fill:"currentColor"}):I}),a==="filled"?n.jsx(Nt,{className:F,fill:"none"}):R]}):M?a==="filled"?n.jsx(Nt,{className:F,fill:"currentColor"}):I:a==="filled"?n.jsx(Nt,{className:F,fill:"none"}):R},S)};return n.jsxs("div",{className:k("inline-flex","items-center",E("xs","gap"),f),children:[n.jsx("div",{className:k("flex","items-center"),role:o?"img":void 0,"aria-label":o?`Rating: ${w} out of ${r}`:void 0,children:Array.from({length:r},(S,D)=>L(D))}),u&&n.jsxs("span",{className:k(E("sm","ml"),ye("sm"),"text-fg-secondary"),children:[w.toFixed(i?1:0),"/",r]})]})}function ld({accept:e,multiple:t=!1,maxSize:r,maxFiles:s,onFilesChange:a,onFileRemove:o,showPreview:i=!0,showProgress:u=!1,disabled:d=!1,className:c="",label:f,description:p}){const[m,h]=l.useState([]),[x,v]=l.useState(!1),y=l.useRef(null),b=M=>{if(M===0)return"0 Bytes";const F=1024,I=["Bytes","KB","MB","GB"],R=Math.floor(Math.log(M)/Math.log(F));return Math.round(M/Math.pow(F,R)*100)/100+" "+I[R]},w=M=>r&&M.size>r?`File size exceeds ${b(r)}`:null,C=M=>{const F=Array.from(M),I=[];return F.forEach(R=>{const W=w(R),K=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,H={file:R,id:K,error:W,progress:u?0:void 0};if(i&&R.type.startsWith("image/")){const U=new FileReader;U.onload=oe=>{h(ne=>ne.map(P=>{var G;return P.id===K?z(T({},P),{preview:(G=oe.target)==null?void 0:G.result}):P}))},U.readAsDataURL(R)}I.push(H)}),I},g=M=>{const F=t?[...m,...M]:M,I=s?F.slice(0,s):F;h(I),a==null||a(I)},j=M=>{if(M.preventDefault(),v(!1),d)return;const F=M.dataTransfer.files;if(F.length>0){const I=C(F);g(I)}},N=M=>{M.preventDefault(),d||v(!0)},L=M=>{M.preventDefault(),v(!1)},S=M=>{if(M.target.files&&M.target.files.length>0){const F=C(M.target.files);g(F)}y.current&&(y.current.value="")},D=M=>{const F=m.filter(I=>I.id!==M);h(F),a==null||a(F),o==null||o(M)},A=()=>{var M;d||(M=y.current)==null||M.click()};return n.jsxs("div",{className:k(E("lg","gap"),"flex","flex-col",c),children:[(f||p)&&n.jsxs("div",{children:[f&&n.jsx("label",{className:k("block",ye("sm"),Mt("medium"),"text-fg-primary",E("xs","mb")),children:f}),p&&n.jsx("p",{className:k(ye("sm"),"text-fg-secondary"),children:p})]}),n.jsxs("div",{onDrop:j,onDragOver:N,onDragLeave:L,onClick:A,className:k("relative","border-2","border-dashed",x?"border-line-brand":"border-line-default",J("lg"),E("lg","p"),"text-center","cursor-pointer",be("base"),"focus:border-line-focus",d?"opacity-50 cursor-not-allowed":k("hover:border-line-strong","focus:outline-none","focus:ring-2","focus:ring-offset-2")),role:"button",tabIndex:d?-1:0,"aria-label":"Upload files","aria-disabled":d,children:[n.jsx("input",{ref:y,type:"file",accept:e,multiple:t,onChange:S,disabled:d,className:"hidden"}),n.jsxs("div",{className:k("flex","flex-col","items-center",E("sm","gap")),children:[n.jsx(hc,{className:k("h-8","w-8",x?"text-fg-brand":"text-fg-secondary")}),n.jsxs("div",{children:[n.jsx("span",{className:k(ye("sm"),Mt("medium"),"text-fg-primary"),children:x?"Drop files here":"Click to upload or drag and drop"}),e&&n.jsxs("p",{className:k(ye("xs"),"text-fg-secondary",E("xs","mt")),children:["Accepted: ",e]}),r&&n.jsxs("p",{className:k(ye("xs"),"text-fg-secondary"),children:["Max size: ",b(r)]})]})]})]}),m.length>0&&n.jsx("div",{className:k("flex","flex-col",E("sm","gap")),children:m.map(M=>n.jsxs("div",{className:k("flex","items-center",E("md","gap"),E("base","p"),"border","border-line-default",J("md"),M.error?"bg-error-bg":"bg-surface-muted"),children:[i&&M.preview?n.jsx("img",{src:M.preview,alt:M.file.name,className:k("w-12","h-12","object-cover",J("md"))}):n.jsx(Xl,{className:k("h-8","w-8","text-fg-secondary")}),n.jsxs("div",{className:k("flex-1","min-w-0"),children:[n.jsx("p",{className:k(ye("sm"),Mt("medium"),"text-fg-primary","truncate"),children:M.file.name}),n.jsx("p",{className:k(ye("xs"),"text-fg-secondary"),children:b(M.file.size)}),M.error&&n.jsxs("div",{className:k("flex","items-center",E("xs","gap"),E("xs","mt")),children:[n.jsx(bs,{className:k("h-3","w-3","text-fg-error")}),n.jsx("span",{className:k(ye("xs"),"text-fg-error"),children:M.error})]}),u&&M.progress!==void 0&&n.jsx("div",{className:k(E("sm","mt")),children:n.jsx(vs,{value:M.progress,size:"sm"})})]}),!M.error&&!u&&n.jsx(dr,{className:k("h-5","w-5","text-fg-success")}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:F=>{F.stopPropagation(),D(M.id)},className:"h-auto p-1","aria-label":`Remove ${M.file.name}`,children:n.jsx(Ne,{className:"h-4 w-4"})})]},M.id))})]})}function Es({trigger:e,children:t,open:r,defaultOpen:s=!1,onOpenChange:a,placement:o="bottom",showCloseButton:i=!1,title:u,closeOnClickOutside:d=!0,closeOnEscape:c=!0,className:f="",triggerClassName:p="",contentClassName:m=""}){const[h,x]=l.useState(s),v=l.useRef(null),y=l.useRef(null),[b,w]=l.useState({top:0,left:0}),C=l.useId(),g=r!==void 0,j=g?r:h,N=l.useCallback(()=>{if(!v.current||!y.current)return;const A=v.current.getBoundingClientRect(),M=y.current.getBoundingClientRect(),F=window.scrollY,I=window.scrollX;let R=0,W=0;o.startsWith("top")?(R=A.top+F-M.height-8,o==="top-start"?W=A.left+I:o==="top-end"?W=A.right+I-M.width:W=A.left+I+(A.width-M.width)/2):o.startsWith("bottom")?(R=A.bottom+F+8,o==="bottom-start"?W=A.left+I:o==="bottom-end"?W=A.right+I-M.width:W=A.left+I+(A.width-M.width)/2):o.startsWith("left")?(W=A.left+I-M.width-8,o==="left-start"?R=A.top+F:o==="left-end"?R=A.bottom+F-M.height:R=A.top+F+(A.height-M.height)/2):o.startsWith("right")&&(W=A.right+I+8,o==="right-start"?R=A.top+F:o==="right-end"?R=A.bottom+F-M.height:R=A.top+F+(A.height-M.height)/2);const K=8;R=Math.max(K,Math.min(R,window.innerHeight+F-M.height-K)),W=Math.max(K,Math.min(W,window.innerWidth+I-M.width-K)),w({top:R,left:W})},[o]);l.useEffect(()=>{if(j){N();const A=()=>N(),M=()=>N();return window.addEventListener("resize",A),window.addEventListener("scroll",M,!0),()=>{window.removeEventListener("resize",A),window.removeEventListener("scroll",M,!0)}}},[j,o,N]),l.useEffect(()=>{j&&y.current&&setTimeout(N,0)},[j,N]);const L=l.useCallback(A=>{g||x(A),a==null||a(A)},[g,a]),S=l.useCallback(()=>{L(!1)},[L]);l.useEffect(()=>{if(j&&c){const A=M=>{M.key==="Escape"&&S()};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)}},[j,c,S]),l.useEffect(()=>{if(j&&d){const A=M=>{y.current&&v.current&&!y.current.contains(M.target)&&!v.current.contains(M.target)&&S()};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)}},[j,d,S]);const D=j?n.jsxs("div",{ref:y,className:`
66
+ `,onClick:u?f:d,children:u?"Deselect All":"Select All"}),t.map((h,k)=>n.jsx(Ts,{option:h,isHighlighted:k===r,onSelect:s},h.value))]})});return typeof window!="undefined"?Ke.createPortal(y,document.body):null});Ir.displayName="AutocompleteList";const Ya=l.forwardRef(function({options:t,value:r,defaultValue:s,onChange:a,onSelect:o,placeholder:i="Type to search...",loading:c=!1,disabled:u=!1,emptyMessage:d="No options found",debounceMs:f=300,filterOptions:p,className:b="",inputClassName:g="",size:x="md",label:w,"aria-label":y,"aria-labelledby":h,id:k},$){const v=l.useId(),S=k!=null?k:v,[N,I]=l.useState(typeof s=="string"?s:""),[C,T]=l.useState(!1),[L,F]=l.useState(-1),[M,R]=l.useState(""),D=l.useRef(null),O=l.useRef(null),B=l.useRef(null),X=l.useRef(null),Q=r!==void 0,oe=Q?r:N,_=M.trim()?p?p(t,M):t.filter(z=>z.label.toLowerCase().includes(M.toLowerCase())):t,Y=_.length>0,ee=z=>{const V=z.target.value;R(V),Q||I(V),a==null||a(V),X.current&&clearTimeout(X.current),X.current=setTimeout(()=>{T(!0),F(-1)},f)},J=z=>{var V;z.disabled||(Q||I(z.value),R(z.label),T(!1),F(-1),a==null||a(z.value),o==null||o(z),(V=O.current)==null||V.focus())},te=z=>{if(!C||_.length===0){(z.key==="ArrowDown"||z.key==="Enter")&&T(!0);return}switch(z.key){case"ArrowDown":z.preventDefault(),F(V=>V<_.length-1?V+1:0);break;case"ArrowUp":z.preventDefault(),F(V=>V>0?V-1:_.length-1);break;case"Enter":z.preventDefault(),L>=0&&L<_.length&&J(_[L]);break;case"Escape":z.preventDefault(),T(!1),F(-1);break}};l.useEffect(()=>{if(!C)return;const z=V=>{D.current&&!D.current.contains(V.target)&&(T(!1),F(-1))};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[C]),l.useEffect(()=>{if(L>=0&&B.current){const z=B.current.querySelectorAll('[role="option"]');z[L]&&typeof z[L].scrollIntoView=="function"&&z[L].scrollIntoView({block:"nearest",behavior:"smooth"})}},[L]),l.useEffect(()=>{if(oe){const z=t.find(V=>V.value===oe);R(z?z.label:oe)}else R("")},[oe,t]),l.useEffect(()=>{},[w,y,h,S]);const ae=C&&(Y||c||d);return n.jsxs("div",{ref:D,className:`relative ${b}`,children:[n.jsx($e,{ref:O||$,id:S,label:w,"aria-label":y,"aria-labelledby":h,value:M,onChange:ee,onKeyDown:te,onFocus:()=>T(!0),placeholder:i,disabled:u,size:x,rightIcon:c?n.jsx(wa,{className:"h-4 w-4 animate-spin"}):n.jsx(jr,{className:`h-4 w-4 transition-transform ${C?"rotate-180":""}`}),className:g}),ae&&n.jsx(Ir,{ref:B,options:_,highlightedIndex:L,onSelect:J,loading:c,emptyMessage:d,containerRef:D,"aria-labelledby":h,"aria-label":h?void 0:y||w})]})});Ya.displayName="Autocomplete";const qa=l.forwardRef(function({options:t,value:r,defaultValue:s=[],onChange:a,onSelect:o,placeholder:i="Select options...",loading:c=!1,disabled:u=!1,emptyMessage:d="No options found",maxSelected:f,showSelectAll:p=!1,className:b="",inputClassName:g="",size:x="md",label:w},y){const h=l.useId(),[k,$]=l.useState(s),[v,S]=l.useState(!1),[N,I]=l.useState(-1),[C,T]=l.useState(""),L=l.useRef(null),F=l.useRef(null),M=l.useRef(null),R=r!==void 0,D=R?r:k,O=t.filter(z=>D.includes(z.value)),X=(()=>{let z=t;return C.trim()&&(z=t.filter(V=>V.label.toLowerCase().includes(C.toLowerCase()))),z})(),Q=X.length>0,oe=z=>{const V=z.target.value;T(V),S(!0),I(-1)},H=z=>{if(z.disabled||f&&D.length>=f&&!D.includes(z.value))return;const V=D.includes(z.value)?D.filter(q=>q!==z.value):[...D,z.value];R||$(V),a==null||a(V),o==null||o(t.filter(q=>V.includes(q.value))),T("")},_=()=>{const z=X.filter(q=>!q.disabled).map(q=>q.value),V=[...new Set([...D,...z])];R||$(V),a==null||a(V),o==null||o(t.filter(q=>V.includes(q.value)))},Y=()=>{const z=X.map(q=>q.value),V=D.filter(q=>!z.includes(q));R||$(V),a==null||a(V),o==null||o(t.filter(q=>V.includes(q.value)))},ee=z=>{const V=D.filter(q=>q!==z);R||$(V),a==null||a(V),o==null||o(t.filter(q=>V.includes(q.value)))},J=z=>{if(!v||X.length===0){(z.key==="ArrowDown"||z.key==="Enter")&&S(!0),z.key==="Backspace"&&C===""&&D.length>0&&ee(D[D.length-1]);return}switch(z.key){case"ArrowDown":z.preventDefault(),I(V=>V<X.length-1?V+1:0);break;case"ArrowUp":z.preventDefault(),I(V=>V>0?V-1:X.length-1);break;case"Enter":z.preventDefault(),N>=0&&N<X.length&&H(X[N]);break;case"Escape":z.preventDefault(),S(!1),I(-1);break}};l.useEffect(()=>{if(!v)return;const z=V=>{L.current&&!L.current.contains(V.target)&&(S(!1),I(-1),T(""))};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[v]);const te=X.filter(z=>!z.disabled).every(z=>D.includes(z.value)),ae=v&&(Q||c||d);return n.jsxs("div",{ref:L,className:j("relative",b),children:[n.jsx("label",{htmlFor:h,className:j("block",m("sm","mb"),"text-sm","font-medium","text-fg-primary"),children:w}),n.jsxs("div",{className:j("flex","flex-wrap",m("sm","gap"),m("sm","p"),"border","border-line-default",U("md"),"min-h-10","focus-within:outline-none","focus-within:ring-2","focus-within:ring-offset-2","focus-within:border-line-brand","focus-within:ring-line-brand"),children:[O.map(z=>n.jsx(js,{onRemove:()=>ee(z.value),size:x==="sm"?"sm":x==="lg"?"lg":"md",children:z.label},z.value)),n.jsx("input",{id:h,ref:z=>{typeof y=="function"?y(z):y&&(y.current=z),F.current=z},type:"text",value:C,onChange:oe,onKeyDown:J,onFocus:()=>S(!0),placeholder:D.length===0?i:"",disabled:u,className:j("flex-1","min-w-32","outline-none","bg-transparent",g)})]}),ae&&n.jsx(Ir,{ref:M,"aria-label":w,options:X.map(z=>P(A({},z),{icon:D.includes(z.value)?n.jsx(os,{className:j("h-4","w-4","text-fg-brand")}):z.icon})),highlightedIndex:N,onSelect:H,loading:c,emptyMessage:d,containerRef:L,showSelectAll:p&&X.length>0,allSelected:te,onSelectAll:_,onDeselectAll:Y})]})});qa.displayName="MultiSelect";function jd({value:e,defaultValue:t=0,max:r=5,size:s="md",variant:a="filled",readOnly:o=!1,allowHalf:i=!1,showValue:c=!1,onChange:u,onHover:d,className:f="",icon:p,emptyIcon:b}){const[g,x]=l.useState(t),[w,y]=l.useState(null),h=e!==void 0,k=w!=null?w:h?e:g,$={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},v=C=>{o||(h||x(C),u==null||u(C))},S=C=>{o||(y(C),d==null||d(C))},N=()=>{o||y(null)},I=C=>{const T=C+1,L=i&&k>=T-.5&&k<T,F=k>=T,M=j($[s],xe("base"),!o&&"cursor-pointer",F||L?"text-fg-warning":"text-fg-disabled"),R=p||n.jsx($t,{className:M,fill:F?"currentColor":"none"}),D=b||n.jsx($t,{className:M,fill:"none"});return n.jsx("span",{className:"relative inline-block",onClick:()=>v(T),onMouseEnter:()=>S(T),onMouseLeave:N,role:o?void 0:"button",tabIndex:o?void 0:0,"aria-label":o?void 0:`Rate ${T} out of ${r}`,onKeyDown:O=>{!o&&(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),v(T))},children:L?n.jsxs("span",{className:"relative inline-block",children:[n.jsx("span",{className:"absolute inset-0 overflow-hidden",style:{width:"50%"},children:a==="filled"?n.jsx($t,{className:M,fill:"currentColor"}):R}),a==="filled"?n.jsx($t,{className:M,fill:"none"}):D]}):F?a==="filled"?n.jsx($t,{className:M,fill:"currentColor"}):R:a==="filled"?n.jsx($t,{className:M,fill:"none"}):D},C)};return n.jsxs("div",{className:j("inline-flex","items-center",m("xs","gap"),f),children:[n.jsx("div",{className:j("flex","items-center"),role:o?"img":void 0,"aria-label":o?`Rating: ${k} out of ${r}`:void 0,children:Array.from({length:r},(C,T)=>I(T))}),c&&n.jsxs("span",{className:j(m("sm","ml"),je("sm"),"text-fg-secondary"),children:[k.toFixed(i?1:0),"/",r]})]})}function Nd({accept:e,multiple:t=!1,maxSize:r,maxFiles:s,onFilesChange:a,onFileRemove:o,showPreview:i=!0,showProgress:c=!1,disabled:u=!1,className:d="",label:f,description:p}){const[b,g]=l.useState([]),[x,w]=l.useState(!1),y=l.useRef(null),h=F=>{if(F===0)return"0 Bytes";const M=1024,R=["Bytes","KB","MB","GB"],D=Math.floor(Math.log(F)/Math.log(M));return Math.round(F/Math.pow(M,D)*100)/100+" "+R[D]},k=F=>r&&F.size>r?`File size exceeds ${h(r)}`:null,$=F=>{const M=Array.from(F),R=[];return M.forEach(D=>{const O=k(D),B=`${Date.now()}-${Math.random().toString(36).slice(2,11)}`,X={file:D,id:B,error:O!=null?O:void 0,progress:c?0:void 0};if(i&&D.type.startsWith("image/")){const Q=new FileReader;Q.onload=oe=>{g(H=>H.map(_=>{var Y;return _.id===B?P(A({},_),{preview:(Y=oe.target)==null?void 0:Y.result}):_}))},Q.readAsDataURL(D)}R.push(X)}),R},v=F=>{const M=t?[...b,...F]:F,R=s?M.slice(0,s):M;g(R),a==null||a(R)},S=F=>{if(F.preventDefault(),w(!1),u)return;const M=F.dataTransfer.files;if(M.length>0){const R=$(M);v(R)}},N=F=>{F.preventDefault(),u||w(!0)},I=F=>{F.preventDefault(),w(!1)},C=F=>{if(F.target.files&&F.target.files.length>0){const M=$(F.target.files);v(M)}y.current&&(y.current.value="")},T=F=>{const M=b.filter(R=>R.id!==F);g(M),a==null||a(M),o==null||o(F)},L=()=>{var F;u||(F=y.current)==null||F.click()};return n.jsxs("div",{className:j(m("lg","gap"),"flex","flex-col",d),children:[(f||p)&&n.jsxs("div",{children:[f&&n.jsx("label",{className:j("block",je("sm"),At("medium"),"text-fg-primary",m("xs","mb")),children:f}),p&&n.jsx("p",{className:j(je("sm"),"text-fg-secondary"),children:p})]}),n.jsxs("div",{onDrop:S,onDragOver:N,onDragLeave:I,onClick:L,className:j("relative","border-2","border-dashed",x?"border-line-brand":"border-line-default",U("lg"),m("lg","p"),"text-center","cursor-pointer",xe("base"),"focus:border-line-focus",u?"opacity-50 cursor-not-allowed":j("hover:border-line-strong","focus:outline-none","focus:ring-2","focus:ring-offset-2")),role:"button",tabIndex:u?-1:0,"aria-label":"Upload files","aria-disabled":u,children:[n.jsx("input",{ref:y,type:"file",accept:e,multiple:t,onChange:C,disabled:u,className:"hidden"}),n.jsxs("div",{className:j("flex","flex-col","items-center",m("sm","gap")),children:[n.jsx(Cc,{className:j("h-8","w-8",x?"text-fg-brand":"text-fg-secondary")}),n.jsxs("div",{children:[n.jsx("span",{className:j(je("sm"),At("medium"),"text-fg-primary"),children:x?"Drop files here":"Click to upload or drag and drop"}),e&&n.jsxs("p",{className:j(je("xs"),"text-fg-secondary",m("xs","mt")),children:["Accepted: ",e]}),r&&n.jsxs("p",{className:j(je("xs"),"text-fg-secondary"),children:["Max size: ",h(r)]})]})]})]}),b.length>0&&n.jsx("div",{className:j("flex","flex-col",m("sm","gap")),children:b.map(F=>n.jsxs("div",{className:j("flex","items-center",m("md","gap"),m("base","p"),"border","border-line-default",U("md"),F.error?"bg-error-bg":"bg-surface-muted"),children:[i&&F.preview?n.jsx("img",{src:F.preview,alt:F.file.name,className:j("w-12","h-12","object-cover",U("md"))}):n.jsx(lc,{className:j("h-8","w-8","text-fg-secondary")}),n.jsxs("div",{className:j("flex-1","min-w-0"),children:[n.jsx("p",{className:j(je("sm"),At("medium"),"text-fg-primary","truncate"),children:F.file.name}),n.jsx("p",{className:j(je("xs"),"text-fg-secondary"),children:h(F.file.size)}),F.error&&n.jsxs("div",{className:j("flex","items-center",m("xs","gap"),m("xs","mt")),children:[n.jsx(xs,{className:j("h-3","w-3","text-fg-error")}),n.jsx("span",{className:j(je("xs"),"text-fg-error"),children:F.error})]}),c&&F.progress!==void 0&&n.jsx("div",{className:j(m("sm","mt")),children:n.jsx(ws,{value:F.progress,size:"sm"})})]}),!F.error&&!c&&n.jsx(cr,{className:j("h-5","w-5","text-fg-success")}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:M=>{M.stopPropagation(),T(F.id)},className:`h-auto ${m("xs","p")}`,"aria-label":`Remove ${F.file.name}`,children:n.jsx(Se,{className:"h-4 w-4"})})]},F.id))})]})}function As({trigger:e,children:t,open:r,defaultOpen:s=!1,onOpenChange:a,placement:o="bottom",showCloseButton:i=!1,title:c,closeOnClickOutside:u=!0,closeOnEscape:d=!0,className:f="",triggerClassName:p="",contentClassName:b=""}){const[g,x]=l.useState(s),w=l.useRef(null),y=l.useRef(null),[h,k]=l.useState({top:0,left:0}),$=l.useId(),v=r!==void 0,S=v?r:g;kr(S);const N=l.useCallback(()=>{if(!w.current||!y.current)return;const L=w.current.getBoundingClientRect(),F=y.current.getBoundingClientRect(),M=window.scrollY,R=window.scrollX;let D=0,O=0;o.startsWith("top")?(D=L.top+M-F.height-8,o==="top-start"?O=L.left+R:o==="top-end"?O=L.right+R-F.width:O=L.left+R+(L.width-F.width)/2):o.startsWith("bottom")?(D=L.bottom+M+8,o==="bottom-start"?O=L.left+R:o==="bottom-end"?O=L.right+R-F.width:O=L.left+R+(L.width-F.width)/2):o.startsWith("left")?(O=L.left+R-F.width-8,o==="left-start"?D=L.top+M:o==="left-end"?D=L.bottom+M-F.height:D=L.top+M+(L.height-F.height)/2):o.startsWith("right")&&(O=L.right+R+8,o==="right-start"?D=L.top+M:o==="right-end"?D=L.bottom+M-F.height:D=L.top+M+(L.height-F.height)/2);const B=8;D=Math.max(B,Math.min(D,window.innerHeight+M-F.height-B)),O=Math.max(B,Math.min(O,window.innerWidth+R-F.width-B)),k({top:D,left:O})},[o]);l.useEffect(()=>{if(S){N();const L=()=>N(),F=()=>N();return window.addEventListener("resize",L),window.addEventListener("scroll",F,!0),()=>{window.removeEventListener("resize",L),window.removeEventListener("scroll",F,!0)}}},[S,o,N]),l.useEffect(()=>{S&&y.current&&setTimeout(N,0)},[S,N]);const I=l.useCallback(L=>{v||x(L),a==null||a(L)},[v,a]),C=l.useCallback(()=>{I(!1)},[I]);l.useEffect(()=>{if(S&&d){const L=F=>{F.key==="Escape"&&C()};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)}},[S,d,C]),l.useEffect(()=>{if(S&&u){const L=F=>{y.current&&w.current&&!y.current.contains(F.target)&&!w.current.contains(F.target)&&C()};return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)}},[S,u,C]);const T=S?n.jsxs("div",{ref:y,className:`
238
67
  absolute
239
- ${ue("popover")}
68
+ ${be("popover")}
240
69
  bg-surface-overlay
241
- ${J("lg")}
242
- ${$e("lg")}
70
+ ${U("lg")}
71
+ ${ue("lg")}
243
72
  border
244
73
  border-line-default
245
74
  min-w-48
246
75
  max-w-96
247
- ${be("base")}
248
- ${m}
249
- `,style:{top:`${b.top}px`,left:`${b.left}px`},role:"dialog","aria-modal":"false","aria-labelledby":u?C:void 0,children:[(u||i)&&n.jsxs("div",{className:`
76
+ ${xe("base")}
77
+ ${b}
78
+ `,style:{top:`${h.top}px`,left:`${h.left}px`},role:"dialog","aria-modal":"false","aria-labelledby":c?$:void 0,children:[(c||i)&&n.jsxs("div",{className:`
250
79
  flex
251
80
  items-center
252
81
  justify-between
253
- ${E("base","px")}
254
- ${E("md","py")}
82
+ ${m("base","px")}
83
+ ${m("md","py")}
255
84
  border-b
256
85
  border-line-default
257
- `,children:[u&&n.jsx("h3",{id:C,className:`${re("bodySmall")} ${Pe("h5")} text-fg-primary`,children:u}),i&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:S,className:"h-auto p-1","aria-label":"Close popover",children:n.jsx(Ne,{className:"h-4 w-4"})})]}),n.jsx("div",{className:`
258
- ${E("base","p")}
259
- ${u||i?"":E("md","p")}
260
- `,children:t})]}):null;return n.jsxs("div",{className:`inline-block ${f}`,children:[n.jsx("div",{ref:v,className:p,onClick:()=>L(!j),children:e}),typeof window!="undefined"&&qe.createPortal(D,document.body)]})}function cd({value:e,defaultValue:t,format:r="24h",onChange:s,disabled:a=!1,label:o,error:i=!1,helperText:u,className:d=""}){const[c,f]=l.useState(t||""),[p,m]=l.useState(12),[h,x]=l.useState(0),[v,y]=l.useState("AM"),b=e!==void 0,w=b?e:c,C=l.useCallback(I=>{if(!I)return{hours:12,minutes:0,amPm:"AM"};if(r==="24h"){const[R,W]=I.split(":").map(Number);return{hours:R||12,minutes:W||0,amPm:"AM"}}else{const R=I.match(/(\d+):(\d+)\s*(AM|PM)/i);return R?{hours:parseInt(R[1]),minutes:parseInt(R[2]),amPm:R[3].toUpperCase()}:{hours:12,minutes:0,amPm:"AM"}}},[r]),g=(I,R,W)=>{if(r==="24h")return`${String(I).padStart(2,"0")}:${String(R).padStart(2,"0")}`;{const K=W==="PM"&&I!==12?I+12:W==="AM"&&I===12?0:I;return`${String(K===0?12:K>12?K-12:K).padStart(2,"0")}:${String(R).padStart(2,"0")} ${W||"AM"}`}};l.useEffect(()=>{if(w){const I=C(w);m(I.hours),x(I.minutes),y(I.amPm)}},[w,C]);const j=I=>{const R=r==="24h"?Math.max(0,Math.min(23,I)):Math.max(1,Math.min(12,I));m(R);const W=g(R,h,r==="12h"?v:void 0);b||f(W),s==null||s(W)},N=I=>{const R=Math.max(0,Math.min(59,I));x(R);const W=g(p,R,r==="12h"?v:void 0);b||f(W),s==null||s(W)},L=()=>{const I=v==="AM"?"PM":"AM";y(I);const R=g(p,h,I);b||f(R),s==null||s(R)},S=()=>{if(r==="24h")j((p+1)%24);else{const I=p===12?1:p+1;j(I)}},D=()=>{if(r==="24h")j(p===0?23:p-1);else{const I=p===1?12:p-1;j(I)}},A=()=>{N((h+1)%60)},M=()=>{N(h===0?59:h-1)},F=n.jsx("div",{className:`${E("base","p")} min-w-48`,children:n.jsxs("div",{className:"flex items-center justify-center gap-4",children:[n.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n.jsx(Z,{variant:"ghost",size:"sm",onClick:S,disabled:a,"aria-label":"Increment hours",children:"↑"}),n.jsx("div",{className:"text-2xl font-mono font-semibold w-12 text-center",children:String(p).padStart(2,"0")}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:D,disabled:a,"aria-label":"Decrement hours",children:"↓"})]}),n.jsx("div",{className:"text-2xl font-semibold",children:":"}),n.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n.jsx(Z,{variant:"ghost",size:"sm",onClick:A,disabled:a,"aria-label":"Increment minutes",children:"↑"}),n.jsx("div",{className:"text-2xl font-mono font-semibold w-12 text-center",children:String(h).padStart(2,"0")}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:M,disabled:a,"aria-label":"Decrement minutes",children:"↓"})]}),r==="12h"&&n.jsxs("div",{className:"flex flex-col gap-2 ml-2",children:[n.jsx(Z,{variant:v==="AM"?"primary":"outline",size:"sm",onClick:()=>L(),disabled:a,children:"AM"}),n.jsx(Z,{variant:v==="PM"?"primary":"outline",size:"sm",onClick:()=>L(),disabled:a,children:"PM"})]})]})});return n.jsx("div",{className:d,children:n.jsx(Es,{trigger:n.jsx(Se,{label:o,value:w||g(p,h,r==="12h"?v:void 0),readOnly:!0,disabled:a,error:i,helperText:u,leftIcon:n.jsx(Pl,{className:"h-4 w-4"}),className:"cursor-pointer"}),placement:"bottom-start",showCloseButton:!0,title:"Select Time",children:F})})}function dd({value:e,defaultValue:t="#000000",format:r="hex",onChange:s,presets:a,showInput:o=!0,disabled:i=!1,label:u,className:d=""}){const[c,f]=l.useState(t),[p,m]=l.useState({r:0,g:0,b:0}),h=e!==void 0,x=h?e:c,v=N=>{const L=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(N);return L?{r:parseInt(L[1],16),g:parseInt(L[2],16),b:parseInt(L[3],16)}:{r:0,g:0,b:0}},y=(N,L,S)=>"#"+[N,L,S].map(D=>{const A=D.toString(16);return A.length===1?"0"+A:A}).join("");l.useEffect(()=>{if(x){const N=v(x);m(N)}},[x]);const b=N=>{const L=N.target.value;(/^#[0-9A-F]{6}$/i.test(L)||L==="")&&(h||f(L),s==null||s(L),L&&m(v(L)))},w=(N,L)=>{const S=z(T({},p),{[N]:Math.max(0,Math.min(255,L))});m(S);const D=y(S.r,S.g,S.b);h||f(D),s==null||s(D)},g=a||["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#808080","#ffa500"],j=n.jsxs("div",{className:`${E("base","p")} min-w-[280px]`,children:[n.jsx("div",{className:`
86
+ `,children:[c&&n.jsx("h3",{id:$,className:`${se("bodySmall")} ${Pe("h5")} text-fg-primary`,children:c}),i&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:C,className:`h-auto ${m("xs","p")}`,"aria-label":"Close popover",children:n.jsx(Se,{className:"h-4 w-4"})})]}),n.jsx("div",{className:`
87
+ ${m("base","p")}
88
+ ${c||i?"":m("md","p")}
89
+ `,children:t})]}):null;return n.jsxs("div",{className:`inline-block ${f}`,children:[n.jsx("div",{ref:w,className:p,onClick:()=>I(!S),children:e}),typeof window!="undefined"&&Ke.createPortal(T,document.body)]})}function Sd({value:e,defaultValue:t,format:r="24h",onChange:s,disabled:a=!1,label:o,error:i=!1,helperText:c,className:u=""}){const[d,f]=l.useState(t||""),[p,b]=l.useState(12),[g,x]=l.useState(0),[w,y]=l.useState("AM"),h=e!==void 0,k=h?e:d,$=l.useCallback(R=>{if(!R)return{hours:12,minutes:0,amPm:"AM"};if(r==="24h"){const[D,O]=R.split(":").map(Number);return{hours:D||12,minutes:O||0,amPm:"AM"}}else{const D=R.match(/(\d+):(\d+)\s*(AM|PM)/i);return D?{hours:parseInt(D[1]),minutes:parseInt(D[2]),amPm:D[3].toUpperCase()}:{hours:12,minutes:0,amPm:"AM"}}},[r]),v=(R,D,O)=>{if(r==="24h")return`${String(R).padStart(2,"0")}:${String(D).padStart(2,"0")}`;{const B=O==="PM"&&R!==12?R+12:O==="AM"&&R===12?0:R;return`${String(B===0?12:B>12?B-12:B).padStart(2,"0")}:${String(D).padStart(2,"0")} ${O||"AM"}`}};l.useEffect(()=>{if(k){const R=$(k);b(R.hours),x(R.minutes),y(R.amPm)}},[k,$]);const S=R=>{const D=r==="24h"?Math.max(0,Math.min(23,R)):Math.max(1,Math.min(12,R));b(D);const O=v(D,g,r==="12h"?w:void 0);h||f(O),s==null||s(O)},N=R=>{const D=Math.max(0,Math.min(59,R));x(D);const O=v(p,D,r==="12h"?w:void 0);h||f(O),s==null||s(O)},I=()=>{const R=w==="AM"?"PM":"AM";y(R);const D=v(p,g,R);h||f(D),s==null||s(D)},C=()=>{if(r==="24h")S((p+1)%24);else{const R=p===12?1:p+1;S(R)}},T=()=>{if(r==="24h")S(p===0?23:p-1);else{const R=p===1?12:p-1;S(R)}},L=()=>{N((g+1)%60)},F=()=>{N(g===0?59:g-1)},M=n.jsx("div",{className:`${m("base","p")} min-w-48`,children:n.jsxs("div",{className:`flex items-center justify-center ${m("base","gap")}`,children:[n.jsxs("div",{className:`flex flex-col items-center ${m("sm","gap")}`,children:[n.jsx(Z,{variant:"ghost",size:"sm",onClick:C,disabled:a,"aria-label":"Increment hours",children:"↑"}),n.jsx("div",{className:"text-2xl font-mono font-semibold w-12 text-center",children:String(p).padStart(2,"0")}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:T,disabled:a,"aria-label":"Decrement hours",children:"↓"})]}),n.jsx("div",{className:"text-2xl font-semibold",children:":"}),n.jsxs("div",{className:`flex flex-col items-center ${m("sm","gap")}`,children:[n.jsx(Z,{variant:"ghost",size:"sm",onClick:L,disabled:a,"aria-label":"Increment minutes",children:"↑"}),n.jsx("div",{className:"text-2xl font-mono font-semibold w-12 text-center",children:String(g).padStart(2,"0")}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:F,disabled:a,"aria-label":"Decrement minutes",children:"↓"})]}),r==="12h"&&n.jsxs("div",{className:`flex flex-col ${m("sm","gap")} ${m("sm","ml")}`,children:[n.jsx(Z,{variant:w==="AM"?"primary":"outline",size:"sm",onClick:()=>I(),disabled:a,children:"AM"}),n.jsx(Z,{variant:w==="PM"?"primary":"outline",size:"sm",onClick:()=>I(),disabled:a,children:"PM"})]})]})});return n.jsx("div",{className:u,children:n.jsx(As,{trigger:n.jsx($e,{label:o,value:k||v(p,g,r==="12h"?w:void 0),readOnly:!0,disabled:a,error:i,helperText:c,leftIcon:n.jsx(Xl,{className:"h-4 w-4"}),className:"cursor-pointer"}),placement:"bottom-start",showCloseButton:!0,title:"Select Time",children:M})})}function $d({value:e,defaultValue:t="#000000",format:r="hex",onChange:s,presets:a,showInput:o=!0,disabled:i=!1,label:c,className:u=""}){const[d,f]=l.useState(t),[p,b]=l.useState({r:0,g:0,b:0}),g=e!==void 0,x=g?e:d,w=N=>{const I=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(N);return I?{r:parseInt(I[1],16),g:parseInt(I[2],16),b:parseInt(I[3],16)}:{r:0,g:0,b:0}},y=(N,I,C)=>"#"+[N,I,C].map(T=>{const L=T.toString(16);return L.length===1?"0"+L:L}).join("");l.useEffect(()=>{if(x){const N=w(x);b(N)}},[x]);const h=N=>{const I=N.target.value;(/^#[0-9A-F]{6}$/i.test(I)||I==="")&&(g||f(I),s==null||s(I),I&&b(w(I)))},k=(N,I)=>{const C=P(A({},p),{[N]:Math.max(0,Math.min(255,I))});b(C);const T=y(C.r,C.g,C.b);g||f(T),s==null||s(T)},v=a||["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#808080","#ffa500"],S=n.jsxs("div",{className:`${m("base","p")} min-w-[280px]`,children:[n.jsx("div",{className:`
261
90
  w-full
262
91
  h-32
263
- ${J("md")}
264
- ${$e("sm")}
265
- mb-4
92
+ ${U("md")}
93
+ ${ue("sm")}
94
+ ${m("base","mb")}
266
95
  border
267
96
  border-line-default
268
- `,style:{backgroundColor:x}}),n.jsxs("div",{className:"space-y-3 mb-4",children:[n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Red: ",p.r]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.r,onChange:N=>w("r",parseInt(N.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Green: ",p.g]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.g,onChange:N=>w("g",parseInt(N.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-fg-secondary mb-1",children:["Blue: ",p.b]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.b,onChange:N=>w("b",parseInt(N.target.value)),disabled:i,className:"w-full"})]})]}),o&&n.jsx("div",{className:"mb-4",children:n.jsx(Se,{label:"Hex",value:x,onChange:b,disabled:i,placeholder:"#000000",className:"font-mono"})}),g.length>0&&n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-fg-secondary mb-2",children:"Presets"}),n.jsx("div",{className:"grid grid-cols-10 gap-1",children:g.map((N,L)=>n.jsx("button",{type:"button",onClick:()=>{i||(h||f(N),s==null||s(N),m(v(N)))},disabled:i,className:`
97
+ `,style:{backgroundColor:x}}),n.jsxs("div",{className:`${m("md","space-y")} ${m("base","mb")}`,children:[n.jsxs("div",{children:[n.jsxs("label",{className:`block text-xs font-medium text-fg-secondary ${m("xs","mb")}`,children:["Red: ",p.r]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.r,onChange:N=>k("r",parseInt(N.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:`block text-xs font-medium text-fg-secondary ${m("xs","mb")}`,children:["Green: ",p.g]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.g,onChange:N=>k("g",parseInt(N.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:`block text-xs font-medium text-fg-secondary ${m("xs","mb")}`,children:["Blue: ",p.b]}),n.jsx("input",{type:"range",min:"0",max:"255",value:p.b,onChange:N=>k("b",parseInt(N.target.value)),disabled:i,className:"w-full"})]})]}),o&&n.jsx("div",{className:m("base","mb"),children:n.jsx($e,{label:"Hex",value:x,onChange:h,disabled:i,placeholder:"#000000",className:"font-mono"})}),v.length>0&&n.jsxs("div",{children:[n.jsx("label",{className:`block text-xs font-medium text-fg-secondary ${m("sm","mb")}`,children:"Presets"}),n.jsx("div",{className:`grid grid-cols-10 ${m("xs","gap")}`,children:v.map((N,I)=>n.jsx("button",{type:"button",onClick:()=>{i||(g||f(N),s==null||s(N),b(w(N)))},disabled:i,className:`
269
98
  w-6
270
99
  h-6
271
- ${J("sm")}
100
+ ${U("sm")}
272
101
  border
273
102
  border-line-emphasis
274
103
  hover:scale-110
275
- ${$e("sm")}
104
+ ${ue("sm")}
276
105
  ${x.toLowerCase()===N.toLowerCase()?"ring-2 ring-offset-1 ring-line-brand":""}
277
- `,style:{backgroundColor:N},"aria-label":`Select color ${N}`},L))})]})]});return n.jsx("div",{className:d,children:n.jsx(Es,{trigger:n.jsxs("div",{className:"flex items-center gap-2",children:[u&&n.jsx("label",{className:"text-sm font-medium text-fg-secondary",children:u}),n.jsx("div",{className:`
106
+ `,style:{backgroundColor:N},"aria-label":`Select color ${N}`},I))})]})]});return n.jsx("div",{className:u,children:n.jsx(As,{trigger:n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[c&&n.jsx("label",{className:"text-sm font-medium text-fg-secondary",children:c}),n.jsx("div",{className:`
278
107
  w-10
279
108
  h-10
280
- ${J("md")}
109
+ ${U("md")}
281
110
  border
282
111
  border-line-emphasis
283
- ${$e("sm")}
112
+ ${ue("sm")}
284
113
  cursor-pointer
285
114
  ${i?"opacity-50 cursor-not-allowed":""}
286
- `,style:{backgroundColor:x}}),o&&n.jsx(Se,{value:x,onChange:b,disabled:i,placeholder:"#000000",className:"w-24 font-mono"})]}),placement:"bottom-start",showCloseButton:!0,title:"Pick a Color",children:j})})}const Wa=l.createContext(void 0);function ud({children:e,value:t}){return n.jsx(Wa.Provider,{value:t,children:e})}function fd(){const e=l.useContext(Wa);if(!e)throw new Error("Drawer components must be used within Drawer");return e}function Ms({children:e,className:t="",showCloseButton:r=!1,title:s,"aria-label":a,"aria-labelledby":o}){const i=l.useId(),u=o!=null?o:s?i:void 0,{isOpen:d,closeDrawer:c,position:f,size:p,closeOnOverlayClick:m,closeOnEscape:h}=fd();if(l.useEffect(()=>{if(d&&h){const b=w=>{w.key==="Escape"&&c()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)}},[d,h,c]),l.useEffect(()=>{if(d)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[d]),l.useEffect(()=>{process.env.NODE_ENV!=="production"&&d&&(s||a||u||console.warn('[DrawerContent] Missing accessible name. Provide `title`, `aria-label`, or `aria-labelledby` — `role="dialog"` without a name fails axe `aria-dialog-name`.'))},[d,s,a,u]),!d)return null;const x={sm:f==="left"||f==="right"?"w-64":"h-64",md:f==="left"||f==="right"?"w-96":"h-96",lg:f==="left"||f==="right"?"w-[32rem]":"h-[32rem]",xl:f==="left"||f==="right"?"w-[42rem]":"h-[42rem]",full:f==="left"||f==="right"?"w-full":"h-full"},v={left:"left-0 top-0 bottom-0",right:"right-0 top-0 bottom-0",top:"top-0 left-0 right-0",bottom:"bottom-0 left-0 right-0"},y=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`
115
+ `,style:{backgroundColor:x}}),o&&n.jsx($e,{value:x,onChange:h,disabled:i,placeholder:"#000000",className:"w-24 font-mono"})]}),placement:"bottom-start",showCloseButton:!0,title:"Pick a Color",children:S})})}const Xa=l.createContext(void 0);function Cd({children:e,value:t}){return n.jsx(Xa.Provider,{value:t,children:e})}function Ed(){const e=l.useContext(Xa);if(!e)throw new Error("Drawer components must be used within Drawer");return e}const Md='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';function Ja(e){return Array.from(e.querySelectorAll(Md)).filter(t=>!t.disabled&&t.offsetParent!==null)}function Rs(e,t){l.useEffect(()=>{if(!t)return;function r(s){if(s.key!=="Tab")return;const a=e.current;if(!a)return;const o=Ja(a);if(o.length===0){s.preventDefault();return}const i=o[0],c=o[o.length-1],u=document.activeElement;if(!a.contains(u)){s.preventDefault(),(s.shiftKey?c:i).focus();return}s.shiftKey?u===i&&(s.preventDefault(),c.focus()):u===c&&(s.preventDefault(),i.focus())}return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[t,e])}function Is(e,t){l.useEffect(()=>{if(!t)return;const r=setTimeout(()=>{const s=e.current;if(!s)return;const a=Ja(s);if(a.length>0){a[0].focus();return}s.hasAttribute("tabindex")||s.setAttribute("tabindex","-1"),s.focus()},0);return()=>clearTimeout(r)},[t,e])}function Ds({children:e,className:t="",showCloseButton:r=!1,title:s,"aria-label":a,"aria-labelledby":o}){const i=l.useId(),c=o!=null?o:s?i:void 0,{isOpen:u,closeDrawer:d,position:f,size:p,closeOnOverlayClick:b,closeOnEscape:g}=Ed(),x=l.useRef(null);if(kr(u),Rs(x,u),Is(x,u),l.useEffect(()=>{if(u&&g){const k=$=>{$.key==="Escape"&&d()};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)}},[u,g,d]),l.useEffect(()=>{if(u)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[u]),l.useEffect(()=>{},[u,s,a,c]),!u)return null;const w={sm:f==="left"||f==="right"?"w-64":"h-64",md:f==="left"||f==="right"?"w-96":"h-96",lg:f==="left"||f==="right"?"w-[32rem]":"h-[32rem]",xl:f==="left"||f==="right"?"w-[42rem]":"h-[42rem]",full:f==="left"||f==="right"?"w-full":"h-full"},y={left:"left-0 top-0 bottom-0",right:"right-0 top-0 bottom-0",top:"top-0 left-0 right-0",bottom:"bottom-0 left-0 right-0"},h=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`
287
116
  fixed
288
117
  inset-0
289
118
  bg-scrim
290
- ${ue("modal")}
291
- ${be("base")}
292
- ${d?"opacity-100":"opacity-0"}
293
- `,onClick:m?c:void 0,"aria-hidden":"true"}),n.jsxs("div",{className:`
119
+ ${be("modal")}
120
+ ${xe("base")}
121
+ ${u?"opacity-100":"opacity-0"}
122
+ `,onClick:b?d:void 0,"aria-hidden":"true"}),n.jsxs("div",{ref:x,className:`
294
123
  fixed
295
- ${v[f]}
296
- ${x[p]}
124
+ ${y[f]}
125
+ ${w[p]}
297
126
  ${f==="left"||f==="right"?"max-w-[90vw]":"max-h-[90vh]"}
298
127
  bg-surface-overlay
299
- ${$e("xl")}
300
- ${ue("modal")}
301
- ${be("base")}
128
+ ${ue("xl")}
129
+ ${be("modal")}
130
+ ${xe("base")}
302
131
  flex
303
132
  flex-col
304
133
  ${t}
305
- `,role:"dialog","aria-modal":"true","aria-labelledby":u,"aria-label":u?void 0:a,onClick:b=>b.stopPropagation(),children:[(s||r)&&n.jsxs("div",{className:`
134
+ `,role:"dialog","aria-modal":"true","aria-labelledby":c,"aria-label":c?void 0:a,onClick:k=>k.stopPropagation(),children:[(s||r)&&n.jsxs("div",{className:`
306
135
  flex
307
136
  items-center
308
137
  justify-between
309
- ${E("base","px")}
310
- ${E("md","py")}
138
+ ${m("base","px")}
139
+ ${m("md","py")}
311
140
  border-b
312
141
  border-line-default
313
- `,children:[s?n.jsx("h2",{id:i,className:"text-lg font-semibold text-fg-primary",children:s}):n.jsx("span",{}),r&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:c,className:"h-auto p-1","aria-label":"Close drawer",children:n.jsx(Ne,{className:"h-4 w-4"})})]}),e]})]});return typeof window!="undefined"?qe.createPortal(y,document.body):null}function Ha(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);return n.jsx("div",z(T({className:`
314
- ${E("lg","p")}
142
+ `,children:[s?n.jsx("h2",{id:i,className:"text-lg font-semibold text-fg-primary",children:s}):n.jsx("span",{}),r&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:d,className:`h-auto ${m("xs","p")}`,"aria-label":"Close drawer",children:n.jsx(Se,{className:"h-4 w-4"})})]}),e]})]});return typeof window!="undefined"?Ke.createPortal(h,document.body):null}function Qa(s){var a=s,{children:e,className:t=""}=a,r=W(a,["children","className"]);return n.jsx("div",P(A({className:`
143
+ ${m("lg","p")}
315
144
  border-b
316
145
  border-line-default
317
146
  ${t}
318
- `},r),{children:e}))}function Ua(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);return n.jsx("div",z(T({className:`
319
- ${E("lg","p")}
147
+ `},r),{children:e}))}function Za(s){var a=s,{children:e,className:t=""}=a,r=W(a,["children","className"]);return n.jsx("div",P(A({className:`
148
+ ${m("lg","p")}
320
149
  border-t
321
150
  border-line-default
322
151
  flex
323
152
  justify-end
324
- ${E("sm","gap")}
153
+ ${m("sm","gap")}
325
154
  ${t}
326
- `},r),{children:e}))}function Gt({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,position:a="right",size:o="md",closeOnOverlayClick:i=!0,closeOnEscape:u=!0}){const[d,c]=l.useState(r),f=t!==void 0,p=f?t:d,m=x=>{f||c(x),s==null||s(x)},h=()=>{m(!1)};return n.jsx(ud,{value:{isOpen:p,closeDrawer:h,position:a,size:o,closeOnOverlayClick:i,closeOnEscape:u},children:e})}Gt.Content=Ms;Gt.Header=Ha;Gt.Footer=Ua;const Ba=l.createContext(void 0);function md({children:e,value:t}){return n.jsx(Ba.Provider,{value:t,children:e})}function Ts(){const e=l.useContext(Ba);if(!e)throw new Error("Menu components must be used within Menu");return e}function pd(...e){return t=>{for(const r of e)r&&(typeof r=="function"?r(t):r.current=t)}}const As=l.forwardRef(function(i,o){var u=i,{children:t,asChild:r,onClick:s}=u,a=O(u,["children","asChild","onClick"]);var h,x;const{isOpen:d,setIsOpen:c}=Ts(),f=v=>{s==null||s(v),c(!d)},p=l.Children.count(t)===1&&l.isValidElement(t);if(r===!0||r===void 0&&p){const v=l.Children.only(t),y=v.props.onClick,b=w=>{y==null||y(w),w.defaultPrevented||f(w)};return l.cloneElement(v,z(T({},a),{role:(h=v.props.role)!=null?h:"button",tabIndex:(x=v.props.tabIndex)!=null?x:0,"aria-haspopup":"menu","aria-expanded":d,onClick:b,ref:pd(o,v.props.ref)}))}return n.jsx("div",z(T({ref:o,onClick:f,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":d},a),{children:t}))});As.displayName="MenuTrigger";function qa({children:e,className:t="",align:r="start"}){const{isOpen:s,closeMenu:a,placement:o}=Ts(),i=l.useRef(null),u=l.useRef(null),[d,c]=l.useState({top:0,left:0});if(l.useEffect(()=>{if(s){const p=document.querySelector('[aria-haspopup="menu"]');u.current=p}},[s]),l.useEffect(()=>{if(s&&i.current&&u.current){const p=()=>{const x=u.current.getBoundingClientRect(),v=i.current.getBoundingClientRect(),y=window.scrollY,b=window.scrollX;let w=0,C=0;o==="bottom"?(w=x.bottom+y+4,r==="start"?C=x.left+b:r==="end"?C=x.right+b-v.width:C=x.left+b+(x.width-v.width)/2):o==="top"?(w=x.top+y-v.height-4,r==="start"?C=x.left+b:r==="end"?C=x.right+b-v.width:C=x.left+b+(x.width-v.width)/2):o==="right"?(C=x.right+b+4,r==="start"?w=x.top+y:r==="end"?w=x.bottom+y-v.height:w=x.top+y+(x.height-v.height)/2):o==="left"&&(C=x.left+b-v.width-4,r==="start"?w=x.top+y:r==="end"?w=x.bottom+y-v.height:w=x.top+y+(x.height-v.height)/2);const g=8;w=Math.max(g,Math.min(w,window.innerHeight+y-v.height-g)),C=Math.max(g,Math.min(C,window.innerWidth+b-v.width-g)),c({top:w,left:C})};p();const m=()=>p(),h=()=>p();return window.addEventListener("resize",m),window.addEventListener("scroll",h,!0),()=>{window.removeEventListener("resize",m),window.removeEventListener("scroll",h,!0)}}},[s,o,r]),l.useEffect(()=>{if(s){const p=m=>{m.key==="Escape"&&a()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)}},[s,a]),l.useEffect(()=>{if(s){const p=m=>{i.current&&u.current&&!i.current.contains(m.target)&&!u.current.contains(m.target)&&a()};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)}},[s,a]),!s)return null;const f=n.jsx("div",{ref:i,role:"menu",className:`
155
+ `},r),{children:e}))}function Gt({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,position:a="right",size:o="md",closeOnOverlayClick:i=!0,closeOnEscape:c=!0}){const[u,d]=l.useState(r),f=t!==void 0,p=f?t:u,b=x=>{f||d(x),s==null||s(x)},g=()=>{b(!1)};return n.jsx(Cd,{value:{isOpen:p,closeDrawer:g,position:a,size:o,closeOnOverlayClick:i,closeOnEscape:c},children:e})}Gt.Content=Ds;Gt.Header=Qa;Gt.Footer=Za;const eo=l.createContext(void 0);function Td({children:e,value:t}){return n.jsx(eo.Provider,{value:t,children:e})}function Fs(){const e=l.useContext(eo);if(!e)throw new Error("Menu components must be used within Menu");return e}function Ad(...e){return t=>{for(const r of e)r&&(typeof r=="function"?r(t):r.current=t)}}const Ls=l.forwardRef(function(i,o){var c=i,{children:t,asChild:r,onClick:s}=c,a=W(c,["children","asChild","onClick"]);var g,x;const{isOpen:u,setIsOpen:d}=Fs(),f=w=>{s==null||s(w),d(!u)},p=l.Children.count(t)===1&&l.isValidElement(t);if(r===!0||r===void 0&&p){const w=l.Children.only(t),y=w.props.onClick,h=k=>{y==null||y(k),k.defaultPrevented||f(k)};return l.cloneElement(w,P(A({},a),{role:(g=w.props.role)!=null?g:"button",tabIndex:(x=w.props.tabIndex)!=null?x:0,"aria-haspopup":"menu","aria-expanded":u,onClick:h,ref:Ad(o,w.props.ref)}))}return n.jsx("div",P(A({ref:o,onClick:f,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":u},a),{children:t}))});Ls.displayName="MenuTrigger";function to({children:e,className:t="",align:r="start"}){const{isOpen:s,closeMenu:a,placement:o}=Fs(),i=l.useRef(null),c=l.useRef(null),[u,d]=l.useState({top:0,left:0});if(l.useEffect(()=>{if(s){const p=document.querySelector('[aria-haspopup="menu"]');c.current=p}},[s]),l.useEffect(()=>{if(s&&i.current&&c.current){const p=()=>{const x=c.current.getBoundingClientRect(),w=i.current.getBoundingClientRect(),y=window.scrollY,h=window.scrollX;let k=0,$=0;o==="bottom"?(k=x.bottom+y+4,r==="start"?$=x.left+h:r==="end"?$=x.right+h-w.width:$=x.left+h+(x.width-w.width)/2):o==="top"?(k=x.top+y-w.height-4,r==="start"?$=x.left+h:r==="end"?$=x.right+h-w.width:$=x.left+h+(x.width-w.width)/2):o==="right"?($=x.right+h+4,r==="start"?k=x.top+y:r==="end"?k=x.bottom+y-w.height:k=x.top+y+(x.height-w.height)/2):o==="left"&&($=x.left+h-w.width-4,r==="start"?k=x.top+y:r==="end"?k=x.bottom+y-w.height:k=x.top+y+(x.height-w.height)/2);const v=8;k=Math.max(v,Math.min(k,window.innerHeight+y-w.height-v)),$=Math.max(v,Math.min($,window.innerWidth+h-w.width-v)),d({top:k,left:$})};p();const b=()=>p(),g=()=>p();return window.addEventListener("resize",b),window.addEventListener("scroll",g,!0),()=>{window.removeEventListener("resize",b),window.removeEventListener("scroll",g,!0)}}},[s,o,r]),l.useEffect(()=>{if(s){const p=b=>{b.key==="Escape"&&a()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)}},[s,a]),l.useEffect(()=>{if(s){const p=b=>{i.current&&c.current&&!i.current.contains(b.target)&&!c.current.contains(b.target)&&a()};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)}},[s,a]),!s)return null;const f=n.jsx("div",{ref:i,role:"menu",className:`
327
156
  absolute
328
- ${ue("popover")}
157
+ ${be("popover")}
329
158
  bg-surface-overlay
330
- ${J("md")}
331
- ${$e("lg")}
159
+ ${U("md")}
160
+ ${ue("lg")}
332
161
  border
333
162
  border-line-default
334
163
  min-w-40
335
- ${E("xs","py")}
164
+ ${m("xs","py")}
336
165
  ${t}
337
- `,style:{top:`${d.top}px`,left:`${d.left}px`},children:e});return typeof window!="undefined"?qe.createPortal(f,document.body):null}const Rs=l.forwardRef(function(p,f){var m=p,{children:t,icon:r,rightIcon:s,disabled:a=!1,onClick:o,onSelect:i,hasSubmenu:u=!1,className:d=""}=m,c=O(m,["children","icon","rightIcon","disabled","onClick","onSelect","hasSubmenu","className"]);const{closeMenu:h}=Ts(),x=y=>{a||(o==null||o(y),i==null||i(y),!u&&!y.defaultPrevented&&h())},v=y=>{a||(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),x(y))};return n.jsxs("div",z(T({ref:f,role:"menuitem",tabIndex:a?-1:0,"aria-disabled":a,onClick:x,onKeyDown:v,className:`
166
+ `,style:{top:`${u.top}px`,left:`${u.left}px`},children:e});return typeof window!="undefined"?Ke.createPortal(f,document.body):null}const _s=l.forwardRef(function(p,f){var b=p,{children:t,icon:r,rightIcon:s,disabled:a=!1,onClick:o,onSelect:i,hasSubmenu:c=!1,className:u=""}=b,d=W(b,["children","icon","rightIcon","disabled","onClick","onSelect","hasSubmenu","className"]);const{closeMenu:g}=Fs(),x=y=>{a||(o==null||o(y),i==null||i(y),!c&&!y.defaultPrevented&&g())},w=y=>{a||(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),x(y))};return n.jsxs("div",P(A({ref:f,role:"menuitem",tabIndex:a?-1:0,"aria-disabled":a,onClick:x,onKeyDown:w,className:`
338
167
  flex
339
168
  items-center
340
- gap-2
341
- ${E("sm","px")}
342
- ${E("sm","py")}
343
- ${re("bodySmall")}
169
+ ${m("sm","gap")}
170
+ ${m("sm","px")}
171
+ ${m("sm","py")}
172
+ ${se("bodySmall")}
344
173
  text-fg-primary
345
174
  cursor-pointer
346
175
  transition-colors
@@ -348,20 +177,20 @@ React keys must be passed directly to JSX without using spread:
348
177
  focus:bg-surface-hover
349
178
  focus:outline-none
350
179
  ${a?"opacity-50 cursor-not-allowed":""}
351
- ${d}
352
- `},c),{children:[r&&n.jsx("span",{className:"shrink-0",children:r}),n.jsx("span",{className:"flex-1",children:t}),u&&n.jsx(bt,{className:"h-4 w-4 text-fg-secondary shrink-0"}),s&&!u&&n.jsx("span",{className:"shrink-0",children:s})]}))});Rs.displayName="MenuItem";function Ga(r){var s=r,{className:e=""}=s,t=O(s,["className"]);return n.jsx("div",T({role:"separator",className:`
180
+ ${u}
181
+ `},d),{children:[r&&n.jsx("span",{className:"shrink-0",children:r}),n.jsx("span",{className:"flex-1",children:t}),c&&n.jsx(xt,{className:"h-4 w-4 text-fg-secondary shrink-0"}),s&&!c&&n.jsx("span",{className:"shrink-0",children:s})]}))});_s.displayName="MenuItem";function ro(r){var s=r,{className:e=""}=s,t=W(s,["className"]);return n.jsx("div",A({role:"separator",className:`
353
182
  h-px
354
183
  bg-line-default
355
- ${E("sm","my")}
184
+ ${m("sm","my")}
356
185
  ${e}
357
- `},t))}function Kt({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,placement:a="bottom"}){const[o,i]=l.useState(r),u=t!==void 0,d=u?t:o,c=p=>{u||i(p),s==null||s(p)},f=()=>{c(!1)};return n.jsx(md,{value:{isOpen:d,setIsOpen:c,closeMenu:f,placement:a},children:e})}Kt.Trigger=As;Kt.Content=qa;Kt.Item=Rs;Kt.Separator=Ga;function hd({items:e,type:t="single",defaultOpen:r,onValueChange:s,className:a=""}){const o=()=>r===void 0?[]:Array.isArray(r)?r:[r],[i,u]=l.useState(o),d=c=>{var p;if((p=e.find(m=>m.id===c))!=null&&p.disabled)return;let f;t==="single"?f=i.includes(c)?[]:[c]:f=i.includes(c)?i.filter(m=>m!==c):[...i,c],u(f),s==null||s(t==="single"?f[0]||"":f)};return n.jsx("div",{className:`${E("xs","space-y")} ${a}`,children:e.map(c=>{const f=i.includes(c.id),p=c.disabled;return n.jsxs("div",{className:`border border-line-default ${J("md")} overflow-hidden`,children:[n.jsxs("button",{type:"button",onClick:()=>d(c.id),disabled:p,className:`
186
+ `},t))}function Kt({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,placement:a="bottom"}){const[o,i]=l.useState(r),c=t!==void 0,u=c?t:o,d=p=>{c||i(p),s==null||s(p)},f=()=>{d(!1)};return n.jsx(Td,{value:{isOpen:u,setIsOpen:d,closeMenu:f,placement:a},children:e})}Kt.Trigger=Ls;Kt.Content=to;Kt.Item=_s;Kt.Separator=ro;function Rd({items:e,type:t="single",defaultOpen:r,onValueChange:s,className:a=""}){const o=()=>r===void 0?[]:Array.isArray(r)?r:[r],[i,c]=l.useState(o),u=d=>{var p;if((p=e.find(b=>b.id===d))!=null&&p.disabled)return;let f;t==="single"?f=i.includes(d)?[]:[d]:f=i.includes(d)?i.filter(b=>b!==d):[...i,d],c(f),s==null||s(t==="single"?f[0]||"":f)};return n.jsx("div",{className:`${m("xs","space-y")} ${a}`,children:e.map(d=>{const f=i.includes(d.id),p=d.disabled;return n.jsxs("div",{className:`border border-line-default ${U("md")} overflow-hidden`,children:[n.jsxs("button",{type:"button",onClick:()=>u(d.id),disabled:p,className:`
358
187
  w-full
359
188
  flex
360
189
  items-center
361
190
  justify-between
362
- ${E("base","px")}
363
- ${E("md","py")}
364
- ${ce("label")}
191
+ ${m("base","px")}
192
+ ${m("md","py")}
193
+ ${de("label")}
365
194
  text-left
366
195
  text-fg-primary
367
196
  bg-surface-base
@@ -370,22 +199,22 @@ React keys must be passed directly to JSX without using spread:
370
199
  focus:ring-2
371
200
  focus:ring-offset-2
372
201
  focus:ring-line-focus
373
- ${be("base")}
202
+ ${xe("base")}
374
203
  ${p?"opacity-50 cursor-not-allowed":"cursor-pointer"}
375
- `,"aria-expanded":f,"aria-controls":`accordion-content-${c.id}`,"aria-disabled":p,children:[n.jsx("span",{children:c.title}),n.jsx(hs,{className:`
376
- ${E("sm","ml")}
377
- ${be("base")}
204
+ `,"aria-expanded":f,"aria-controls":`accordion-content-${d.id}`,"aria-disabled":p,children:[n.jsx("span",{children:d.title}),n.jsx(jr,{className:`
205
+ ${m("sm","ml")}
206
+ ${xe("base")}
378
207
  ${f?"transform rotate-180":""}
379
208
  ${p?"opacity-50":""}
380
- `,"aria-hidden":"true"})]}),n.jsx("div",{id:`accordion-content-${c.id}`,className:`
209
+ `,"aria-hidden":"true"})]}),n.jsx("div",{id:`accordion-content-${d.id}`,className:`
381
210
  overflow-hidden
382
- ${be("base")}
211
+ ${xe("base")}
383
212
  ${f?"max-h-[1000px] opacity-100":"max-h-0 opacity-0"}
384
213
  `,"aria-hidden":!f,children:n.jsx("div",{className:`
385
- ${E("base","px")}
386
- ${E("md","py")}
214
+ ${m("base","px")}
215
+ ${m("md","py")}
387
216
  text-fg-secondary
388
- `,children:c.content})})]},c.id)})})}const Ka=l.createContext(void 0);function ls({children:e,mobileMenuOpen:t,onMobileMenuChange:r,defaultMobileMenuOpen:s=!1}){const[a,o]=l.useState(s),i=t!==void 0,u=i?t:a,d=l.useCallback(m=>{i||o(m),r==null||r(m)},[i,r]),c=l.useCallback(()=>{d(!u)},[u,d]),f=l.useCallback(()=>{d(!0)},[d]),p=l.useCallback(()=>{d(!1)},[d]);return n.jsx(Ka.Provider,{value:{isMobileMenuOpen:u,toggleMobileMenu:c,setMobileMenuOpen:d,openMobileMenu:f,closeMobileMenu:p},children:e})}function Is(){const e=l.useContext(Ka);if(!e)throw new Error("useHeaderContext must be used within HeaderProvider");return e}function Ya(s){var a=s,{children:e,className:t}=a,r=O(a,["children","className"]);return n.jsx("div",{className:"flex-shrink-0",children:n.jsx(xs,z(T({href:r.href||"/",variant:"default",className:k("flex items-center font-semibold text-lg",t)},r),{children:e}))})}function Xa({children:e,className:t}){return n.jsx("nav",{className:k("flex-1 flex items-center justify-center gap-4","hidden md:flex",t),"aria-label":"Main navigation",children:e})}function Ja({children:e,className:t}){return n.jsx("div",{className:k("flex-shrink-0 flex items-center gap-2",t),children:e})}function Qa({className:e,icon:t,closeIcon:r,variant:s="ghost",size:a="md"}){const{isMobileMenuOpen:o,toggleMobileMenu:i}=Is(),u=t||n.jsx(ac,{className:"h-5 w-5"}),d=r||n.jsx(Ne,{className:"h-5 w-5"});return n.jsx(Z,{variant:s,size:a,onClick:i,className:k("md:hidden",e),"aria-label":o?"Close menu":"Open menu","aria-expanded":o,children:o?d:u})}function Za({children:e,className:t}){const{isMobileMenuOpen:r,closeMobileMenu:s}=Is();return n.jsx(Gt,{open:r,onOpenChange:a=>{a||s()},position:"left",size:"sm",closeOnOverlayClick:!0,closeOnEscape:!0,children:n.jsx(Ms,{className:k("p-4",t),children:n.jsx("nav",{className:"flex flex-col gap-2","aria-label":"Mobile navigation",children:e})})})}const bd={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},it=l.forwardRef((d,u)=>{var c=d,{className:e,maxWidth:t="lg",paddingX:r="base",paddingY:s="base",center:a=!0,children:o}=c,i=O(c,["className","maxWidth","paddingX","paddingY","center","children"]);return n.jsx("div",z(T({ref:u,className:k("w-full",bd[t],E(r,"px"),E(s,"py"),a&&"mx-auto",e)},i),{children:o}))});it.displayName="Container";const At=l.forwardRef((d,u)=>{var c=d,{className:e,spacing:t="base",align:r="stretch",justify:s="start",direction:a="column",children:o}=c,i=O(c,["className","spacing","align","justify","direction","children"]);const f=a==="column"?E(t,"gap-y"):E(t,"gap-x"),p={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},m={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};return n.jsx("div",z(T({ref:u,className:k("flex",a==="column"?"flex-col":"flex-row",f,p[r],m[s],e)},i),{children:o}))});At.displayName="Stack";const gd=ve(k("w-full","bg-surface-base","transition-shadow","transition-colors"),{variants:{variant:{default:"",elevated:"shadow-sm",bordered:k("border-b","border-line-muted")}},defaultVariants:{variant:"default"}});function xt(u){var d=u,{children:e,variant:t="default",sticky:r=!1,maxWidth:s="full",bare:a=!1,className:o}=d,i=O(d,["children","variant","sticky","maxWidth","bare","className"]);const c=n.jsx("div",{className:"flex items-center justify-between gap-4",children:e});return a?n.jsx(ls,{children:n.jsx("div",z(T({className:k(o)},i),{children:c}))}):n.jsx(ls,{children:n.jsx("header",z(T({className:k(gd({variant:t}),r&&`sticky top-0 ${ue("sticky")}`,r&&"backdrop-blur-sm bg-surface-base/95",o)},i),{children:n.jsx(it,{maxWidth:s,paddingX:"base",paddingY:"sm",children:c})}))})}xt.Logo=Ya;xt.Navigation=Xa;xt.Actions=Ja;xt.Hamburger=Qa;xt.MobileMenu=Za;const In=ve(k("flex","items-center","gap-2"),{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col"},variant:{default:"",pills:"",tabs:""}},defaultVariants:{orientation:"horizontal",variant:"default"},compoundVariants:[{orientation:"vertical",variant:"default",class:"items-stretch"},{orientation:"vertical",variant:"pills",class:"items-stretch"},{orientation:"vertical",variant:"tabs",class:"items-stretch"}]});function xd(d){var c=d,{items:e,orientation:t="horizontal",variant:r="default",className:s,"aria-label":a="Main navigation",bare:o=!1,pathname:i}=c,u=O(c,["items","orientation","variant","className","aria-label","bare","pathname"]);let f=i;if(!f)try{const h=typeof require!="undefined"?require("next/navigation"):null;if(h!=null&&h.usePathname){const x=h.usePathname;f=x()}}catch(h){f=void 0}const p=l.useMemo(()=>e.map(h=>{if(h.active!==void 0)return h;if(f){const x=f===h.href||h.href!=="/"&&f.startsWith(`${h.href}/`);return z(T({},h),{active:x})}return z(T({},h),{active:!1})}),[e,f]),m=n.jsx(n.Fragment,{children:p.map((h,x)=>{const v=r==="pills"?"background":r==="tabs"?"underline":"default";return n.jsxs(xs,{href:h.href,active:h.active,disabled:h.disabled,variant:v,className:k("flex items-center gap-2",t==="vertical"&&"w-full justify-start",h.className),children:[h.icon&&n.jsx("span",{className:"flex-shrink-0","aria-hidden":"true",children:h.icon}),n.jsx("span",{children:h.label}),h.badge&&n.jsx("span",{className:"ml-auto",children:h.badge})]},h.href||x)})});return o?n.jsx("div",z(T({className:k(In({orientation:t,variant:r}),s)},u),{children:m})):n.jsx("nav",z(T({className:k(In({orientation:t,variant:r}),s),"aria-label":a},u),{children:m}))}function eo(e){return n.jsx(xd,z(T({},e),{pathname:e.pathname}))}const vd=ve(k("w-full","flex","flex-col","gap-2"),{variants:{variant:{default:k(E("base","mb")),compact:k(E("sm","mb"))}},defaultVariants:{variant:"default"}});function to(u){var d=u,{title:e,description:t,breadcrumb:r,actions:s,variant:a="default",className:o}=d,i=O(d,["title","description","breadcrumb","actions","variant","className"]);return n.jsxs("div",z(T({className:k(vd({variant:a}),o)},i),{children:[r&&r.length>0&&n.jsx(Ma,{items:r}),n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx(Be,{variant:"heading",as:"h1",className:"mb-2 text-2xl font-bold",children:e}),t&&n.jsx(Be,{variant:"body",className:"text-fg-secondary",children:t})]}),s&&n.jsx("div",{className:"flex items-center gap-2 flex-shrink-0",children:s})]})]}))}function yd(s){var a=s,{onForgotPasswordClick:e,className:t}=a,r=O(a,["onForgotPasswordClick","className"]);return n.jsx("div",{className:k(E("base","p"),"bg-surface-muted",J("md"),t),children:n.jsxs("form",z(T({},r),{onSubmit:o=>{o.preventDefault(),r.onSubmit&&r.onSubmit(o)},className:k("space-y-4",r.className),children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(Tt,{htmlFor:"login-email",variant:"required",children:"Your email"}),n.jsx(Se,{id:"login-email",placeholder:"myname@email.com",type:"email"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(Tt,{htmlFor:"login-password",variant:"required",children:"Your password"}),n.jsx(Se,{id:"login-password",placeholder:"••••••••",type:"password"})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx(Z,{variant:"secondary",type:"button",onClick:e,children:"Forgot password?"}),n.jsx(Z,{variant:"regular",type:"submit",children:"Sign in"})]})]}))})}function wd(c){var f=c,{isOpen:e,onClose:t,title:r,children:s,variant:a="default",showCloseButton:o=!0,footer:i,className:u=""}=f,d=O(f,["isOpen","onClose","title","children","variant","showCloseButton","footer","className"]);const p=l.useRef(null),m=l.useRef(null);if(l.useEffect(()=>{if(!e)return;m.current=document.activeElement;const w=setTimeout(()=>{var g;(g=p.current)==null||g.focus()},0),C=g=>{g.key==="Escape"&&t()};return document.addEventListener("keydown",C),()=>{var g;clearTimeout(w),document.removeEventListener("keydown",C),(g=m.current)==null||g.focus()}},[e,t]),l.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),!e)return null;const h=["fixed","inset-0",ue("modal"),"overflow-y-auto"],x=["fixed","inset-0","bg-scrim","transition-opacity"],y=["relative","bg-surface-overlay","rounded-lg","shadow-xl","my-8","mx-auto",{default:"max-w-md",large:"max-w-2xl",fullscreen:"max-w-full h-full"}[a],"p-6",u].filter(Boolean).join(" "),b=n.jsxs("div",{className:h.join(" "),role:"dialog","aria-modal":"true","aria-labelledby":r?"modal-title":void 0,onClick:w=>{w.target===w.currentTarget&&t()},children:[n.jsx("div",{className:x.join(" "),"aria-hidden":"true"}),n.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:n.jsxs("div",z(T({ref:p,tabIndex:-1,className:y,onClick:w=>w.stopPropagation()},d),{children:[r&&n.jsxs("div",{className:"flex justify-between items-center mb-4",children:[n.jsx("h2",{id:"modal-title",className:"text-xl font-semibold text-fg-primary",children:r}),o&&n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(Ne,{className:"h-6 w-6"})})]}),!r&&o&&n.jsx("div",{className:"flex justify-end mb-4",children:n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(Ne,{className:"h-6 w-6"})})}),n.jsx("div",{className:"mb-4",children:s}),i&&n.jsx("div",{className:"flex justify-end gap-2 mt-4",children:i})]}))})]});return typeof window!="undefined"?qe.createPortal(b,document.body):b}const Rr=l.createContext(void 0);function Oe(){const e=l.useContext(Rr);if(e===void 0)throw new Error("useTableContext must be used within a Table component");return e}function kd(){const e=l.useContext(Rr);return e||void 0}function cs({columns:e,data:t,loading:r=!1,paginationMode:s,page:a,pageSize:o,total:i,onPageChange:u,onPageSizeChange:d,defaultPageSize:c=10,pageSizeOptions:f,sortColumn:p,sortDirection:m,onSort:h,defaultSortColumn:x,defaultSortDirection:v="asc",filters:y,filterValues:b,onFilter:w,initialFilterValues:C={},selectable:g=!1,selectedRows:j,onSelectionChange:N,rowId:L,actions:S,emptyMessage:D="No data available",emptyStateTitle:A,emptyStateMessage:M,emptyStateIllustration:F,emptyStateAction:I,onRowClick:R,resizable:W=!1,columnWidths:K,onColumnResize:H,virtualScrolling:U,virtualScrollingOptions:oe,children:ne}){const P=l.useMemo(()=>s||(i!==void 0&&u?"server":"client"),[s,i,u]),G=a!==void 0,[Y,Q]=l.useState(1),[le,se]=l.useState(c),_=G?a:Y,V=o!=null?o:le,X=l.useMemo(()=>P==="server"?i!=null?i:0:t.length,[P,i,t.length]),ae=l.useMemo(()=>Math.ceil(X/V),[X,V]),fe=p!==void 0,[ke,je]=l.useState(x||""),[Ie,Lt]=l.useState(v),Me=fe?p:ke,Xt=fe?m||"asc":Ie,Vr=b!==void 0,[Eo,Mo]=l.useState(C),Jt=Vr?b:Eo,Wr=j!==void 0,[To,Ao]=l.useState([]),De=Wr?j:To,Qt=l.useMemo(()=>!y||y.length===0?t:t.filter(ee=>y.every(de=>{const ge=Jt[de.key];if(!ge||ge==="")return!0;const er=ee[de.key];return de.type==="text"?String(er||"").toLowerCase().includes(String(ge).toLowerCase()):String(er)===String(ge)})),[t,y,Jt]),Hr=l.useMemo(()=>{if(fe&&h||!Me)return Qt;const ee=[...Qt];return ee.sort((de,ge)=>{const er=de[Me],Fo=ge[Me],un=String(er||"").localeCompare(String(Fo||""));return Xt==="asc"?un:-un}),ee},[Qt,Me,Xt,h,fe]),Ve=l.useMemo(()=>{if(P==="server")return Hr;const ee=(_-1)*V,de=ee+V;return Hr.slice(ee,de)},[Hr,P,_,V]),wt=l.useCallback((ee,de)=>{var ge;return L?L(ee):((ge=ee==null?void 0:ee.id)==null?void 0:ge.toString())||de.toString()},[L]),Zt=l.useMemo(()=>!g||Ve.length===0?!1:Ve.every((ee,de)=>{const ge=wt(ee,de);return De.includes(ge)}),[g,Ve,De,wt]),rn=l.useMemo(()=>{if(!g)return!1;const ee=De.length;return ee>0&&ee<Ve.length},[g,De.length,Ve.length]),kt=l.useCallback(ee=>{G?u==null||u(ee):Q(ee)},[G,u]),sn=l.useCallback(ee=>{d?d(ee):se(ee),kt(1)},[d,kt]),nn=l.useCallback((ee,de)=>{fe?h==null||h(ee,de):(je(ee),Lt(de))},[fe,h]),an=l.useCallback(ee=>{Vr?w==null||w(ee):Mo(ee),kt(1)},[Vr,w,kt]),ut=l.useCallback(ee=>{Wr?N==null||N(ee):Ao(ee)},[Wr,N]),on=l.useCallback(ee=>{const de=De.includes(ee)?De.filter(ge=>ge!==ee):[...De,ee];ut(de)},[De,ut]),ln=l.useCallback(()=>{if(Zt)ut([]);else{const ee=Ve.map((de,ge)=>wt(de,ge));ut(ee)}},[Zt,Ve,wt,ut]),[Ro,Io]=l.useState({}),Ur=K!==void 0,cn=Ur?K:Ro,dn=l.useCallback((ee,de)=>{Ur?H==null||H(ee,de):Io(ge=>z(T({},ge),{[ee]:de}))},[Ur,H]),Do=l.useMemo(()=>({columns:e,data:t,paginatedData:Ve,loading:r,paginationState:{page:_,pageSize:V,total:X,totalPages:ae},sortState:{column:Me,direction:Xt},filterState:{values:Jt,config:y||[]},selectionState:{selectedRows:De,isAllSelected:Zt,isIndeterminate:rn},paginationMode:P,selectable:g,rowId:L,actions:S,resizable:W,columnWidths:cn,virtualScrolling:U,emptyMessage:D,emptyStateTitle:A,emptyStateMessage:M,emptyStateIllustration:F,emptyStateAction:I,setPage:kt,setPageSize:sn,setSorting:nn,setFilters:an,setSelection:ut,toggleRowSelection:on,toggleSelectAll:ln,getRowId:wt,setColumnWidth:dn,onPageChange:u,onPageSizeChange:d,onSort:h,onFilter:w,onSelectionChange:N,onRowClick:R,onColumnResize:H}),[e,t,Ve,r,_,V,X,ae,Me,Xt,Jt,y,De,Zt,rn,P,g,L,S,D,A,M,F,I,kt,sn,nn,an,ut,on,ln,wt,dn,u,d,h,w,N,R,H,W,cn,U]);return n.jsx(Rr.Provider,{value:Do,children:ne})}function Ds(d){var c=d,{column:e,resizable:t=!1,width:r,onResize:s,minWidth:a=50,maxWidth:o,className:i=""}=c,u=O(c,["column","resizable","width","onResize","minWidth","maxWidth","className"]);const{sortState:f,setSorting:p,onSort:m}=Oe(),h=l.useRef(null),x=l.useRef(null),v=l.useRef(null),y=()=>{if(!e.sortable||!m&&!p)return;const N=f.column===e.key&&f.direction==="asc"?"desc":"asc";m?m(e.key,N):p(e.key,N)},b=N=>{g&&(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),y())},w=N=>{if(N.preventDefault(),N.stopPropagation(),!x.current||!s)return;const L=r||x.current.offsetWidth;v.current={x:N.clientX,width:L};const S=A=>{if(!v.current)return;const M=A.clientX-v.current.x,F=v.current.width+M,I=Math.max(a,o?Math.min(F,o):F);s(e.key,I)},D=()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",D),v.current=null};document.addEventListener("mousemove",S),document.addEventListener("mouseup",D)},C=f.column===e.key,g=e.sortable&&(m||p),j=C?f.direction:void 0;return n.jsx("th",z(T({ref:x,scope:"col",role:"columnheader","aria-sort":C?j==="asc"?"ascending":"descending":g?"none":void 0,className:`px-6 py-3 text-left text-xs font-medium text-fg-tertiary uppercase tracking-wider ${g?"cursor-pointer hover:bg-surface-active focus:bg-surface-active focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-2 select-none":""} ${e.hiddenOnMobile?"hidden md:table-cell":""} ${i}`,onClick:g?y:void 0,onKeyDown:g?b:void 0,tabIndex:g?0:void 0,style:r?{width:`${r}px`,minWidth:`${r}px`}:void 0},u),{children:n.jsxs("div",{className:"flex items-center gap-2 relative",children:[n.jsx("span",{children:e.label}),C&&n.jsx("span",{className:"text-fg-tertiary","aria-hidden":"true",children:f.direction==="asc"?"↑":"↓"}),t&&s&&n.jsx("div",{ref:h,className:"absolute right-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-surface-brand transition-colors",onMouseDown:w,role:"separator","aria-orientation":"vertical","aria-label":`Resize ${e.label} column`,style:{touchAction:"none"}})]})}))}function Fs(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{columns:a,selectable:o,selectionState:i,toggleSelectAll:u,actions:d,resizable:c,columnWidths:f,setColumnWidth:p}=Oe();return n.jsxs("tr",z(T({role:"row",className:e},t),{children:[o&&n.jsx("th",{scope:"col",role:"columnheader",className:"px-6 py-3 w-12","aria-label":"Select all",children:n.jsx(Nr,{checked:i.isAllSelected,onChange:u,"aria-label":"Select all rows",className:"my-0",indeterminate:i.isIndeterminate})}),a.map(m=>n.jsx(Ds,{column:m,resizable:c,width:f==null?void 0:f[m.key],onResize:p},m.key)),d&&n.jsx("th",{scope:"col",role:"columnheader",className:"px-6 py-3 text-right text-xs font-medium text-fg-tertiary uppercase tracking-wider w-12","aria-label":"Actions",children:n.jsx("span",{className:"sr-only",children:"Actions"})})]}))}function Ls(r){var s=r,{className:e=""}=s,t=O(s,["className"]);return Oe(),n.jsx("thead",z(T({className:`bg-surface-subtle sticky top-0 ${ue("sticky")} ${e}`},t),{children:n.jsx(Fs,{})}))}function _s(a){var o=a,{column:e,row:t,className:r=""}=o,s=O(o,["column","row","className"]);const i=e.key in t?t[e.key]:void 0;return n.jsx("td",z(T({className:`px-6 py-4 whitespace-nowrap text-sm text-fg-primary ${e.hiddenOnMobile?"hidden md:table-cell":""} ${r}`},s),{children:e.render?e.render(i,t):String(i!=null?i:"")}))}function jd(o){var i=o,{actions:e,row:t,align:r="right",className:s=""}=i,a=O(i,["actions","row","align","className"]);const u=e.map(d=>({label:d.label,onClick:()=>d.onClick(t),variant:d.variant,disabled:d.disabled}));return n.jsx("div",z(T({className:`inline-flex ${s}`},a),{children:n.jsx(Ra,{trigger:n.jsx(Z,{variant:"ghost",size:"sm","aria-label":"Row actions",className:"h-8 w-8 p-0",children:n.jsx(Ul,{className:"h-4 w-4"})}),items:u,align:r})}))}function Ps(a){var o=a,{row:e,align:t="right",className:r=""}=o,s=O(o,["row","align","className"]);const{actions:i}=Oe();if(!i)return null;const u=i(e);return u.length===0?null:n.jsx(jd,T({row:e,actions:u,align:t,className:r},s))}function hr(i){var u=i,{row:e,rowIndex:t,className:r="",onClick:s,style:a}=u,o=O(u,["row","rowIndex","className","onClick","style"]);const{columns:d,selectable:c,selectionState:f,toggleRowSelection:p,getRowId:m,actions:h,onRowClick:x}=Oe(),v=m(e,t),y=f.selectedRows.includes(v),b=w=>{s&&s(w),x&&x(e)};return n.jsxs("tr",z(T({role:"row","aria-selected":c?y:void 0,"aria-rowindex":t+1,className:`hover:bg-surface-hover ${y?"bg-surface-selected":""} ${r}`,onClick:b,style:a},o),{children:[c&&n.jsx("td",{className:"px-6 py-4",children:n.jsx(Nr,{checked:y,onChange:()=>p(v),"aria-label":`Select row ${v}`,className:"my-0"})}),d.map(w=>n.jsx(_s,{column:w,row:e},String(w.key))),h&&n.jsx("td",{className:"px-6 py-4 text-right",children:n.jsx(Ps,{row:e})})]}))}function zs(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{emptyMessage:a,emptyStateTitle:o,emptyStateMessage:i,emptyStateIllustration:u,emptyStateAction:d}=Oe();return o||i||u?n.jsxs("div",z(T({className:e},t),{children:[n.jsx(Aa,{title:o||"No data available",message:i||a||"No data available",variant:u?"withIllustration":"default",illustration:u}),d&&n.jsx("div",{className:"mt-4 flex justify-center",children:d})]})):n.jsx("div",z(T({className:`text-center text-fg-secondary ${e}`},t),{children:a||"No data available"}))}function ro(e,t){const{itemHeight:r,containerHeight:s,overscan:a=5,enabled:o=!0}=t,[i,u]=l.useState(0),d=l.useRef(null),c=l.useMemo(()=>{if(!o||e.length===0)return e.map((v,y)=>({index:y,start:y*r,end:(y+1)*r,size:r}));const m=Math.max(0,Math.floor(i/r)-a),h=s?Math.min(e.length,Math.ceil((i+s)/r)+a):e.length,x=[];for(let v=m;v<h;v++)x.push({index:v,start:v*r,end:(v+1)*r,size:r});return x},[e,r,i,s,a,o]),f=e.length*r;return l.useEffect(()=>{if(!o||!d.current)return;const m=d.current,h=()=>{u(m.scrollTop)};return m.addEventListener("scroll",h,{passive:!0}),()=>m.removeEventListener("scroll",h)},[o]),{virtualItems:c,totalHeight:f,scrollOffset:i,setScrollOffset:u,scrollToIndex:m=>{if(!d.current)return;const h=m*r;d.current.scrollTop=h,u(h)},containerRef:d}}function Os(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);var v,y;const{paginatedData:o,loading:i,columns:u,selectable:d,actions:c,virtualScrolling:f,virtualScrollingOptions:p}=Oe(),m=u.length+(d?1:0)+(c?1:0),h=ro(o,{itemHeight:(p==null?void 0:p.itemHeight)||50,containerHeight:p==null?void 0:p.containerHeight,overscan:(p==null?void 0:p.overscan)||5,enabled:f||!1}),x=l.useMemo(()=>f&&h.virtualItems.length>0?h.virtualItems.map(b=>({row:o[b.index],index:b.index})).filter(b=>b.row!==void 0):o.map((b,w)=>({row:b,index:w})),[f,h.virtualItems,o]);return i?n.jsx("tbody",z(T({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:Array.from({length:5}).map((b,w)=>n.jsx("tr",{children:Array.from({length:m}).map((C,g)=>n.jsx("td",{className:"px-6 py-4",children:n.jsx(ga,{className:"h-4 w-full"})},g))},w))})):o.length===0?n.jsx("tbody",z(T({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:n.jsx("tr",{children:n.jsx("td",{colSpan:m,className:"px-6 py-12",children:n.jsx(zs,{})})})})):typeof e=="function"?n.jsx("tbody",z(T({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:o.map((b,w)=>e(b,w))})):n.jsx("tbody",z(T({className:`bg-surface-base divide-y divide-line-default ${t}`,role:"rowgroup"},r),{children:f&&h.virtualItems.length>0&&x.length>0?n.jsxs(n.Fragment,{children:[((v=h.virtualItems[0])==null?void 0:v.start)>0&&n.jsx("tr",{style:{height:h.virtualItems[0].start},"aria-hidden":"true",children:n.jsx("td",{colSpan:m})}),x.map(({row:b,index:w})=>n.jsx(hr,{row:b,rowIndex:w},w)),h.virtualItems.length>0&&n.jsx("tr",{style:{height:Math.max(0,h.totalHeight-(((y=h.virtualItems[h.virtualItems.length-1])==null?void 0:y.end)||0))},"aria-hidden":"true",children:n.jsx("td",{colSpan:m})})]}):x.map(({row:b,index:w})=>n.jsx(hr,{row:b,rowIndex:w},w))}))}function Nd(i){var u=i,{filters:e,onFilter:t,initialValues:r={},showClearAll:s=!0,className:a=""}=u,o=O(u,["filters","onFilter","initialValues","showClearAll","className"]);const[d,c]=l.useState(r),[f,p]=l.useState(!1),m=Object.values(d).some(b=>b!==""&&b!==null&&b!==void 0),h=(b,w)=>{const C=z(T({},d),{[b]:w});c(C),t(C)},x=()=>{const b={};e.forEach(w=>{b[w.key]=""}),c(b),t(b)},v=b=>{const w=z(T({},d),{[b]:""});c(w),t(w)},y=Object.values(d).filter(b=>b!==""&&b!==null&&b!==void 0).length;return n.jsx("div",z(T({className:`bg-surface-base border-b border-line-default ${a}`},o),{children:n.jsxs("div",{className:"px-4 py-3 sm:px-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("button",{type:"button",onClick:()=>p(!f),className:"flex items-center gap-2 text-sm font-medium text-fg-secondary hover:text-fg-primary",children:[n.jsx(Ql,{className:"h-4 w-4"}),n.jsx("span",{children:"Filters"}),y>0&&n.jsx("span",{className:`inline-flex items-center ${E("sm","px")} ${E("0.5","py")} rounded text-xs font-medium bg-surface-brand-muted text-fg-brand-emphasis`,children:y})]}),m&&s&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:x,className:"text-sm",children:"Clear all"})]}),f&&n.jsx("div",{className:"mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(b=>{const w=d[b.key]||"";return n.jsxs("div",{className:"space-y-1",children:[n.jsx(Tt,{htmlFor:`filter-${b.key}`,variant:"optional",children:b.label}),n.jsxs("div",{className:"relative",children:[b.type==="text"&&n.jsx(Se,{id:`filter-${b.key}`,type:"text",value:w,onChange:C=>h(b.key,C.target.value),placeholder:b.placeholder||`Filter by ${b.label.toLowerCase()}`,size:"sm",variant:"outlined"}),b.type==="select"&&n.jsxs("div",{className:"relative",children:[n.jsx(jr,{id:`filter-${b.key}`,options:[{value:"",label:`All ${b.label}`},...b.options||[]],value:w,onChange:C=>h(b.key,C.target.value)}),w&&n.jsx("button",{type:"button",onClick:()=>v(b.key),className:"absolute right-8 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${b.label} filter`,children:n.jsx(Ne,{className:"h-4 w-4"})})]}),b.type==="date"&&n.jsx(Se,{id:`filter-${b.key}`,type:"date",value:w,onChange:C=>h(b.key,C.target.value),size:"sm",variant:"outlined"}),w&&b.type!=="select"&&n.jsx("button",{type:"button",onClick:()=>v(b.key),className:"absolute right-2 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${b.label} filter`,children:n.jsx(Ne,{className:"h-4 w-4"})})]})]},b.key)})})]})}))}function Vs(s){var a=s,{showClearAll:e=!0,className:t=""}=a,r=O(a,["showClearAll","className"]);const{filterState:o,setFilters:i}=Oe();return o.config.length===0?null:n.jsx(Nd,T({filters:o.config,onFilter:i,initialValues:o.values,showClearAll:e,className:t},r))}function Sd(f){var p=f,{page:e,pageSize:t,total:r,onPageChange:s,onPageSizeChange:a,pageSizeOptions:o=[10,25,50,100],showPageSizeSelector:i=!0,showPageInfo:u=!0,className:d=""}=p,c=O(p,["page","pageSize","total","onPageChange","onPageSizeChange","pageSizeOptions","showPageSizeSelector","showPageInfo","className"]);const m=Math.ceil(r/t),h=r===0?0:(e-1)*t+1,x=Math.min(e*t,r),v=()=>{e>1&&s(e-1)},y=()=>{e<m&&s(e+1)},b=()=>{e>1&&s(1)},w=()=>{e<m&&s(m)};return n.jsxs("div",z(T({className:`flex items-center justify-between px-4 py-3 bg-surface-base border-t border-line-default sm:px-6 ${d}`},c),{children:[n.jsxs("div",{className:"flex flex-1 justify-between sm:hidden",children:[n.jsx(Z,{variant:"outline",size:"sm",onClick:v,disabled:e===1,children:"Previous"}),n.jsx(Z,{variant:"outline",size:"sm",onClick:y,disabled:e>=m,children:"Next"})]}),n.jsxs("div",{className:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between",children:[u&&n.jsx("div",{children:n.jsxs(Be,{as:"p",className:"text-sm text-fg-secondary",children:["Showing ",n.jsx("span",{className:"font-medium",children:h})," to"," ",n.jsx("span",{className:"font-medium",children:x})," of"," ",n.jsx("span",{className:"font-medium",children:r})," results"]})}),n.jsxs("div",{className:"flex items-center gap-4",children:[i&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Be,{as:"span",className:"text-sm text-fg-secondary",children:"Show:"}),n.jsx(jr,{"aria-label":"Items per page",options:o.map(C=>({value:C.toString(),label:C.toString()})),value:t.toString(),onChange:C=>{const g=parseInt(C.target.value);a(g),s(1)},className:"w-20"})]}),n.jsxs("nav",{className:"flex items-center gap-1","aria-label":"Pagination",children:[n.jsxs(Z,{variant:"ghost",size:"sm",onClick:b,disabled:e===1,"aria-label":"First page",children:[n.jsx(Ut,{className:"h-4 w-4"}),n.jsx(Ut,{className:"h-4 w-4 -ml-2"})]}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:v,disabled:e===1,"aria-label":"Previous page",children:n.jsx(Ut,{className:"h-4 w-4"})}),n.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:Math.min(5,m)},(C,g)=>{let j;return m<=5||e<=3?j=g+1:e>=m-2?j=m-4+g:j=e-2+g,n.jsx(Z,{variant:e===j?"primary":"ghost",size:"sm",onClick:()=>s(j),className:"min-w-10","aria-label":`Page ${j}`,"aria-current":e===j?"page":void 0,children:j},j)})}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:y,disabled:e>=m,"aria-label":"Next page",children:n.jsx(bt,{className:"h-4 w-4"})}),n.jsxs(Z,{variant:"ghost",size:"sm",onClick:w,disabled:e>=m,"aria-label":"Last page",children:[n.jsx(bt,{className:"h-4 w-4"}),n.jsx(bt,{className:"h-4 w-4 -ml-2"})]})]})]})]})]}))}function Ws(o){var i=o,{showPageSizeSelector:e=!0,showPageInfo:t=!0,pageSizeOptions:r,className:s=""}=i,a=O(i,["showPageSizeSelector","showPageInfo","pageSizeOptions","className"]);const{paginationState:u,setPage:d,setPageSize:c,paginationMode:f}=Oe();return f==="client"&&u.totalPages<=1?null:n.jsx(Sd,T({page:u.page,pageSize:u.pageSize,total:u.total,onPageChange:d,onPageSizeChange:c,pageSizeOptions:r,showPageSizeSelector:e,showPageInfo:t,className:s},a))}function Ce(e){const o=e,{className:t=""}=o,r=O(o,["className"]),s="children"in e&&e.children!==void 0,a=s?r:Cd(r);return s?n.jsx("div",{className:`bg-surface-base shadow rounded-lg overflow-hidden ${t}`,children:n.jsx(cs,z(T({},a),{children:e.children}))}):n.jsx("div",{className:`bg-surface-base shadow rounded-lg overflow-hidden ${t}`,children:n.jsxs(cs,z(T({},a),{children:[a.filters&&a.filters.length>0&&n.jsx(Vs,{}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"min-w-full divide-y divide-line-default",role:"table","aria-label":e["aria-label"],"aria-labelledby":e["aria-labelledby"],"aria-rowcount":a.total||a.data.length,"aria-colcount":a.columns.length+(a.selectable?1:0)+(a.actions?1:0),children:[n.jsx(Ls,{}),n.jsx(Os,{})]})}),n.jsx(Ws,{})]}))})}function Cd(e){const{columns:t,data:r,loading:s,onSort:a,sortColumn:o,sortDirection:i,emptyMessage:u,emptyStateTitle:d,emptyStateMessage:c,emptyStateIllustration:f,emptyStateAction:p,pagination:m,filters:h,selectable:x,selectedRows:v,onSelectionChange:y,rowId:b,actions:w,onRowClick:C,paginationMode:g,defaultPageSize:j,resizable:N,columnWidths:L,onColumnResize:S,virtualScrolling:D,virtualScrollingOptions:A}=e;let M=g||"auto";return M==="auto"&&(M=m&&m.total!==void 0&&m.onPageChange?"server":"client"),{columns:t,data:r,loading:s,paginationMode:M,page:m==null?void 0:m.page,pageSize:m==null?void 0:m.pageSize,total:m==null?void 0:m.total,onPageChange:m==null?void 0:m.onPageChange,onPageSizeChange:m==null?void 0:m.onPageSizeChange,defaultPageSize:j||(m==null?void 0:m.pageSize)||10,pageSizeOptions:m==null?void 0:m.pageSizeOptions,sortColumn:o,sortDirection:i,onSort:a,filters:h==null?void 0:h.config,filterValues:h==null?void 0:h.initialValues,onFilter:h==null?void 0:h.onFilter,initialFilterValues:h==null?void 0:h.initialValues,selectable:x,selectedRows:v,onSelectionChange:y,rowId:b,actions:w,onRowClick:C,emptyMessage:u,emptyStateTitle:d,emptyStateMessage:c,emptyStateIllustration:f,emptyStateAction:p,resizable:N,columnWidths:L,onColumnResize:S,virtualScrolling:D,virtualScrollingOptions:A,children:n.jsx(n.Fragment,{})}}Ce.Header=Ls;Ce.HeaderRow=Fs;Ce.HeaderCell=Ds;Ce.Body=Os;Ce.Row=hr;Ce.Cell=_s;Ce.Filters=Vs;Ce.Pagination=Ws;Ce.EmptyState=zs;Ce.Actions=Ps;function $d(e={}){const{defaultWidths:t={},minWidth:r=50,maxWidth:s,resizable:a=!0}=e,[o,i]=l.useState(t),[u,d]=l.useState(!1),[c,f]=l.useState(null),p=l.useRef(null),m=l.useCallback((C,g)=>{const j=Math.max(r,s?Math.min(g,s):g);i(N=>z(T({},N),{[C]:j}))},[r,s]),h=l.useCallback(()=>{i(t)},[t]),x=l.useCallback((C,g,j)=>{a&&(d(!0),f(C),p.current={startX:g,startWidth:j})},[a]),v=l.useCallback(C=>{if(!u||!c||!p.current)return;const g=C-p.current.startX,j=p.current.startWidth+g;m(c,j)},[u,c,m]),y=l.useCallback(()=>{d(!1),f(null),p.current=null},[]),b=l.useRef(void 0),w=l.useRef(void 0);return typeof window!="undefined"&&(b.current=C=>{u&&v(C.clientX)},w.current=()=>{u&&y()},u?(document.addEventListener("mousemove",b.current),document.addEventListener("mouseup",w.current)):(b.current&&document.removeEventListener("mousemove",b.current),w.current&&document.removeEventListener("mouseup",w.current))),{columnWidths:o,setColumnWidth:m,resetColumnWidths:h,isResizing:u,resizingColumn:c,startResize:x,handleResize:v,endResize:y}}const Ir=l.createContext(null);function Ed(){return l.useContext(Ir)}function lt(){const e=l.useContext(Ir);if(!e)throw new Error("useSideNavbarThemeRequired must be used within SideNavbarThemeProvider");return e}const Et={variant:"default",navigationWidth:"56px",contentWidth:"320px",animationDuration:300,animationEasing:"ease-in-out"};function Hs({children:e,variant:t=Et.variant,navigationWidth:r=Et.navigationWidth,contentWidth:s=Et.contentWidth,animationDuration:a=Et.animationDuration,animationEasing:o=Et.animationEasing}){const i=l.useMemo(()=>({variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o}),[t,r,s,a,o]);return n.jsx(Ir.Provider,{value:i,children:e})}const Dr=l.createContext(null);function Md(){return l.useContext(Dr)}function vt(){const e=l.useContext(Dr);if(!e)throw new Error("useSideNavbarConfigRequired must be used within SideNavbarConfigProvider");return e}const we={mode:"full",resizable:!1,minWidth:void 0,maxWidth:void 0,snapPoints:void 0,responsive:!1,mobileBreakpoint:768,mobileVariant:"collapse",overlayBackdrop:!0,persistState:!0,persistWidth:!1,storageKey:void 0,keyboardShortcut:"Ctrl+B",enableKeyboardShortcut:!0};function Us({children:e,mode:t=we.mode,resizable:r=we.resizable,minWidth:s=we.minWidth,maxWidth:a=we.maxWidth,snapPoints:o=we.snapPoints,responsive:i=we.responsive,mobileBreakpoint:u=we.mobileBreakpoint,mobileVariant:d=we.mobileVariant,overlayBackdrop:c=we.overlayBackdrop,persistState:f=we.persistState,persistWidth:p=we.persistWidth,storageKey:m=we.storageKey,keyboardShortcut:h=we.keyboardShortcut,enableKeyboardShortcut:x=we.enableKeyboardShortcut}){const v=l.useMemo(()=>({mode:t,resizable:r,minWidth:s,maxWidth:a,snapPoints:o,responsive:i,mobileBreakpoint:u,mobileVariant:d,overlayBackdrop:c,persistState:f,persistWidth:p,storageKey:m,keyboardShortcut:h,enableKeyboardShortcut:x}),[t,r,s,a,o,i,u,d,c,f,p,m,h,x]);return n.jsx(Dr.Provider,{value:v,children:e})}const Fr=l.createContext(null);function Td(){return l.useContext(Fr)}function ct(){const e=l.useContext(Fr);if(!e)throw new Error("useSideNavbarStateRequired must be used within SideNavbarStateProvider");return e}function br(e){if(typeof e=="number")return e;const t=parseFloat(e);return isNaN(t)?0:e.endsWith("rem")||e.endsWith("em")?t*16:(e.endsWith("px"),t)}function so(e,t){return e===void 0||t===void 0?!0:e<t}function lr(e,t,r){let s=e;return t!==void 0&&(s=Math.max(s,t)),r!==void 0&&(s=Math.min(s,r)),s}const Ad=["ctrl","cmd","control","shift","alt","meta","option"];function no(e){const t={key:"",ctrl:!1,shift:!1,alt:!1,meta:!1,isValid:!1};if(!e||typeof e!="string")return t;const r=e.trim();if(!r)return t;const s=r.split("+").map(d=>d.trim().toLowerCase()).filter(d=>d.length>0);if(s.length===0)return t;const a=new Set;let o="";for(let d=0;d<s.length;d++){const c=s[d];if(Ad.includes(c))a.add(c);else if(d===s.length-1)o=c;else return t}if(!o)return t;const i=a.has("ctrl")||a.has("cmd")||a.has("control"),u=a.has("alt")||a.has("option");return{key:o,ctrl:i,shift:a.has("shift"),alt:u,meta:a.has("meta"),isValid:!0}}function Rd(e,t="windows"){if(!e.isValid)return"";const r=[];return t==="mac"?(e.ctrl&&r.push("⌘"),e.shift&&r.push("⇧"),e.alt&&r.push("⌥"),e.meta&&r.push("⌃"),r.push(e.key.toUpperCase()),r.join("")):(e.ctrl&&r.push("Ctrl"),e.shift&&r.push("Shift"),e.alt&&r.push("Alt"),e.meta&&r.push("Meta"),r.push(e.key.toUpperCase()),r.join("+"))}function ao({initialWidth:e,minWidth:t,maxWidth:r,snapPoints:s,snapThreshold:a=20,onWidthChange:o,enabled:i=!0}){process.env.NODE_ENV==="development"&&(so(t,r)||console.warn("[useResize] Invalid bounds: minWidth must be less than maxWidth",{minWidth:t,maxWidth:r}));const u=lr(e,t,r),[d,c]=l.useState(u),[f,p]=l.useState(!1),m=l.useRef(0),h=l.useRef(u),x=l.useCallback(w=>{let C=lr(w,t,r);if(s&&s.length>0){const g=s.reduce((j,N)=>{const L=Math.abs(C-N),S=Math.abs(C-j);return L<S?N:j},s[0]);Math.abs(C-g)<=a&&(C=g)}c(C),o==null||o(C)},[t,r,s,a,o]),v=l.useCallback(w=>{if(!i||!f)return;const C=w.clientX-m.current,g=h.current+C;x(g)},[i,f,x]),y=l.useCallback(()=>{i&&(p(!1),m.current=0,h.current=d)},[i,d]),b=l.useCallback(w=>{i&&(w.preventDefault(),w.stopPropagation(),p(!0),m.current=w.clientX,h.current=d)},[i,d]);return l.useEffect(()=>{if(f)return document.addEventListener("mousemove",v),document.addEventListener("mouseup",y),document.body.style.userSelect="none",document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",y),document.body.style.userSelect="",document.body.style.cursor=""}},[f,v,y]),l.useEffect(()=>{f||c(lr(e,t,r))},[e,t,r,f]),{width:d,isResizing:f,startResize:b,setWidth:x}}function oo({mobileBreakpoint:e=768,onMobileChange:t,enabled:r=!0}={}){const[s,a]=l.useState(typeof window!="undefined"?window.innerWidth:1024),[o,i]=l.useState(typeof window!="undefined"?window.innerWidth<e:!1),u=l.useCallback(()=>{if(!r||typeof window=="undefined")return;const d=window.innerWidth,c=d<e;a(d),c!==o&&(i(c),t==null||t(c))},[r,e,o,t]);return l.useEffect(()=>{if(!r||typeof window=="undefined")return;const d=window.innerWidth,c=d<e;a(d),i(c),window.addEventListener("resize",u);let f=null;return window.ResizeObserver&&(f=new ResizeObserver(()=>{u()}),f.observe(document.body)),()=>{window.removeEventListener("resize",u),f==null||f.disconnect()}},[r,e,u]),{isMobile:o,viewportWidth:s}}function io({isActive:e,containerRef:t,restoreFocus:r=!0,initialFocusRef:s}){const a=l.useRef(null);l.useEffect(()=>{if(e){if(a.current=document.activeElement,s!=null&&s.current)s.current.focus();else if(t.current){const i=t.current.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');i==null||i.focus()}}else r&&a.current&&(a.current.focus(),a.current=null)},[e,t,s,r]);const o=l.useCallback(i=>{if(!(!e||!t.current)&&i.key==="Tab"){const u=t.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),d=u[0],c=u[u.length-1];i.shiftKey?document.activeElement===d&&(i.preventDefault(),c==null||c.focus()):document.activeElement===c&&(i.preventDefault(),d==null||d.focus())}},[e,t]);l.useEffect(()=>{if(e)return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}},[e,o])}function lo({key:e,ctrl:t=!1,shift:r=!1,alt:s=!1,meta:a=!1,onTrigger:o,enabled:i=!0,preventDefault:u=!0}){const d=l.useCallback(c=>{if(!i)return;const f=c.target;if((f.tagName==="INPUT"||f.tagName==="TEXTAREA"||f.isContentEditable)&&!t&&!a)return;const m=e.length===1?c.key.toLowerCase()===e.toLowerCase():c.key===e,h=t?c.ctrlKey||c.metaKey:!c.ctrlKey&&!c.metaKey,x=r?c.shiftKey:!c.shiftKey,v=s?c.altKey:!c.altKey,y=a?c.metaKey:!c.metaKey,b=t?(c.ctrlKey||c.metaKey)&&!a:h&&y;m&&b&&x&&v&&(u&&(c.preventDefault(),c.stopPropagation()),o())},[i,e,t,r,s,a,o,u]);l.useEffect(()=>{if(i)return window.addEventListener("keydown",d),()=>{window.removeEventListener("keydown",d)}},[i,d])}function Bs({children:e,defaultCollapsed:t=!1,collapsed:r,onCollapseChange:s,onWidthChange:a,onMobileChange:o,exclusiveGroups:i=!1}){const u=lt(),d=vt(),c=l.useRef(null),f=r!==void 0,p=()=>{if(f)return r;if(d.storageKey&&d.persistState&&typeof window!="undefined"){const R=localStorage.getItem(`${d.storageKey}-collapsed`);if(R!==null)return R==="true"}return t},m=()=>{if(d.storageKey&&d.persistWidth&&typeof window!="undefined"){const R=localStorage.getItem(`${d.storageKey}-width`);if(R!==null){const W=parseInt(R,10);if(!isNaN(W))return W}}return br(u.contentWidth)},[h,x]=l.useState(p),[v,y]=l.useState({}),{isMobile:b}=oo({mobileBreakpoint:d.mobileBreakpoint,onMobileChange:R=>{o==null||o(R),R&&d.mobileVariant==="collapse"&&!f&&x(!0)},enabled:d.responsive}),{width:w,isResizing:C,startResize:g,setWidth:j}=ao({initialWidth:m(),minWidth:d.minWidth,maxWidth:d.maxWidth,snapPoints:d.snapPoints,onWidthChange:R=>{a==null||a(R),d.storageKey&&d.persistWidth&&typeof window!="undefined"&&localStorage.setItem(`${d.storageKey}-width`,String(R))},enabled:d.resizable&&!b});io({isActive:b&&d.mobileVariant==="overlay"&&!h,containerRef:c,restoreFocus:!0});const N=f?r:h,L=l.useCallback(R=>{f||x(R),s==null||s(R)},[f,s]),S=l.useCallback(()=>{L(!N)},[N,L]),D=no(d.keyboardShortcut);lo({key:D.key,ctrl:D.ctrl,shift:D.shift,alt:D.alt,meta:D.meta,onTrigger:S,enabled:d.enableKeyboardShortcut});const A=l.useCallback(R=>{j(R)},[j]),M=l.useCallback(R=>{y(i?W=>{const H=W[R]===!1,U={},oe=new Set([...Object.keys(W),R]);return H?oe.forEach(ne=>{U[ne]=!0}):oe.forEach(ne=>{U[ne]=ne!==R}),U}:W=>z(T({},W),{[R]:!W[R]}))},[i]),F=l.useCallback((R,W)=>{y(K=>z(T({},K),{[R]:W}))},[]);l.useEffect(()=>{f&&r!==h&&x(r)},[f,r,h]),l.useEffect(()=>{d.storageKey&&d.persistState&&typeof window!="undefined"&&!f&&localStorage.setItem(`${d.storageKey}-collapsed`,String(h))},[d.storageKey,d.persistState,h,f]);const I=l.useMemo(()=>({collapsed:N,toggle:S,setCollapsed:L,currentWidth:w,setWidth:A,isMobile:b,isResizing:C,startResize:g,groupStates:v,toggleGroup:M,setGroupCollapsed:F,sidebarRef:c}),[N,S,L,w,A,b,C,g,v,M,F]);return n.jsx(Fr.Provider,{value:I,children:e})}function qs({children:e,variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,mode:i,resizable:u,minWidth:d,maxWidth:c,snapPoints:f,responsive:p,mobileBreakpoint:m,mobileVariant:h,overlayBackdrop:x,persistState:v,persistWidth:y,storageKey:b,keyboardShortcut:w,enableKeyboardShortcut:C,defaultCollapsed:g,collapsed:j,onCollapseChange:N,onWidthChange:L,onMobileChange:S,exclusiveGroups:D}){return n.jsx(Hs,{variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,children:n.jsx(Us,{mode:i,resizable:u,minWidth:d,maxWidth:c,snapPoints:f,responsive:p,mobileBreakpoint:m,mobileVariant:h,overlayBackdrop:x,persistState:v,persistWidth:y,storageKey:b,keyboardShortcut:w,enableKeyboardShortcut:C,children:n.jsx(Bs,{defaultCollapsed:g,collapsed:j,onCollapseChange:N,onWidthChange:L,onMobileChange:S,exclusiveGroups:D,children:e})})})}const Lr=l.createContext(null);function Gs(){return l.useContext(Lr)}function Ks(){const e=l.useContext(Lr);if(!e)throw new Error("useSidebarSlotRequired must be used within SidebarSlotProvider");return e}function co({children:e,defaultSlot:t=null}){const[r,s]=l.useState(t),a=l.useRef(new Map),o=l.useCallback((d,c)=>{a.current.set(d,c)},[]),i=l.useCallback(d=>{a.current.delete(d)},[]),u=l.useMemo(()=>({activeSlot:r,setActiveSlot:s,slots:a.current,registerSlot:o,unregisterSlot:i}),[r,o,i]);return n.jsx(Lr.Provider,{value:u,children:e})}const _r=l.createContext(null);function Id(){return l.useContext(_r)}function Ys(){const e=l.useContext(_r);return e||{showMainToggle:!0,mainTogglePosition:"floating"}}function Xs(r){var s=r,{className:e=""}=s,t=O(s,["className"]);const{currentWidth:a,setWidth:o,isResizing:i,startResize:u}=ct(),{resizable:d}=vt();return d?n.jsxs("div",z(T({className:`
217
+ `,children:d.content})})]},d.id)})})}const so=l.createContext(void 0);function ds({children:e,mobileMenuOpen:t,onMobileMenuChange:r,defaultMobileMenuOpen:s=!1}){const[a,o]=l.useState(s),i=t!==void 0,c=i?t:a,u=l.useCallback(b=>{i||o(b),r==null||r(b)},[i,r]),d=l.useCallback(()=>{u(!c)},[c,u]),f=l.useCallback(()=>{u(!0)},[u]),p=l.useCallback(()=>{u(!1)},[u]);return n.jsx(so.Provider,{value:{isMobileMenuOpen:c,toggleMobileMenu:d,setMobileMenuOpen:u,openMobileMenu:f,closeMobileMenu:p},children:e})}function Ps(){const e=l.useContext(so);if(!e)throw new Error("useHeaderContext must be used within HeaderProvider");return e}function no(a){var o=a,{children:e,className:t,href:r}=o,s=W(o,["children","className","href"]);return n.jsx("div",{className:"flex-shrink-0",children:n.jsx(Nr,P(A({href:r||"/",variant:"default",className:j("flex items-center font-semibold text-lg",t)},s),{children:e}))})}function ao({children:e,className:t}){return n.jsx("nav",{className:j("flex-1 flex items-center justify-center",m("base","gap"),"hidden md:flex",t),"aria-label":"Main navigation",children:e})}function oo({children:e,className:t}){return n.jsx("div",{className:j("flex-shrink-0 flex items-center",m("sm","gap"),t),children:e})}function io({className:e,icon:t,closeIcon:r,variant:s="ghost",size:a="md"}){const{isMobileMenuOpen:o,toggleMobileMenu:i}=Ps(),c=t||n.jsx(gc,{className:"h-5 w-5"}),u=r||n.jsx(Se,{className:"h-5 w-5"});return n.jsx(Z,{variant:s,size:a,onClick:i,className:j("md:hidden",e),"aria-label":o?"Close menu":"Open menu","aria-expanded":o,children:o?u:c})}function lo({children:e,className:t}){const{isMobileMenuOpen:r,closeMobileMenu:s}=Ps();return n.jsx(Gt,{open:r,onOpenChange:a=>{a||s()},position:"left",size:"sm",closeOnOverlayClick:!0,closeOnEscape:!0,children:n.jsx(Ds,{className:j(m("base","p"),t),children:n.jsx("nav",{className:`flex flex-col ${m("sm","gap")}`,"aria-label":"Mobile navigation",children:e})})})}const Id={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},dt=l.forwardRef((u,c)=>{var d=u,{className:e,maxWidth:t="lg",paddingX:r="base",paddingY:s="base",center:a=!0,children:o}=d,i=W(d,["className","maxWidth","paddingX","paddingY","center","children"]);return n.jsx("div",P(A({ref:c,className:j("w-full",Id[t],m(r,"px"),m(s,"py"),a&&"mx-auto",e)},i),{children:o}))});dt.displayName="Container";const Dt=l.forwardRef((u,c)=>{var d=u,{className:e,spacing:t="base",align:r="stretch",justify:s="start",direction:a="column",children:o}=d,i=W(d,["className","spacing","align","justify","direction","children"]);const f=a==="column"?m(t,"gap-y"):m(t,"gap-x"),p={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},b={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};return n.jsx("div",P(A({ref:c,className:j("flex",a==="column"?"flex-col":"flex-row",f,p[r],b[s],e)},i),{children:o}))});Dt.displayName="Stack";const Dd=ke(j("w-full","bg-surface-base","transition-shadow","transition-colors"),{variants:{variant:{default:"",elevated:ue("sm"),bordered:j("border-b","border-line-muted")}},defaultVariants:{variant:"default"}});function wt(c){var u=c,{children:e,variant:t="default",sticky:r=!1,maxWidth:s="full",bare:a=!1,className:o}=u,i=W(u,["children","variant","sticky","maxWidth","bare","className"]);const d=n.jsx("div",{className:`flex items-center justify-between ${m("base","gap")}`,children:e});return a?n.jsx(ds,{children:n.jsx("div",P(A({className:j(o)},i),{children:d}))}):n.jsx(ds,{children:n.jsx("header",P(A({className:j(Dd({variant:t}),r&&`sticky top-0 ${be("sticky")}`,r&&"backdrop-blur-sm bg-surface-base/95",o)},i),{children:n.jsx(dt,{maxWidth:s,paddingX:"base",paddingY:"sm",children:d})}))})}wt.Logo=no;wt.Navigation=ao;wt.Actions=oo;wt.Hamburger=io;wt.MobileMenu=lo;const Pn=ke(j("flex","items-center",m("sm","gap")),{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col"},variant:{default:"",pills:"",tabs:""}},defaultVariants:{orientation:"horizontal",variant:"default"},compoundVariants:[{orientation:"vertical",variant:"default",class:"items-stretch"},{orientation:"vertical",variant:"pills",class:"items-stretch"},{orientation:"vertical",variant:"tabs",class:"items-stretch"}]});function Fd(u){var d=u,{items:e,orientation:t="horizontal",variant:r="default",className:s,"aria-label":a="Main navigation",bare:o=!1,pathname:i}=d,c=W(d,["items","orientation","variant","className","aria-label","bare","pathname"]);const f=i!=null?i:typeof window!="undefined"?window.location.pathname:void 0,p=l.useMemo(()=>e.map(g=>{if(g.active!==void 0)return g;if(f){const x=f===g.href||g.href!=="/"&&f.startsWith(`${g.href}/`);return P(A({},g),{active:x})}return P(A({},g),{active:!1})}),[e,f]),b=n.jsx(n.Fragment,{children:p.map((g,x)=>{const w=r==="pills"?"background":r==="tabs"?"underline":"default";return n.jsxs(Nr,{href:g.href,active:g.active,disabled:g.disabled,variant:w,className:j("flex items-center",m("sm","gap"),t==="vertical"&&"w-full justify-start",g.className),children:[g.icon&&n.jsx("span",{className:"flex-shrink-0","aria-hidden":"true",children:g.icon}),n.jsx("span",{children:g.label}),g.badge&&n.jsx("span",{className:"ml-auto",children:g.badge})]},g.href||x)})});return o?n.jsx("div",P(A({className:j(Pn({orientation:t,variant:r}),s)},c),{children:b})):n.jsx("nav",P(A({className:j(Pn({orientation:t,variant:r}),s),"aria-label":a},c),{children:b}))}function co(e){return n.jsx(Fd,P(A({},e),{pathname:e.pathname}))}const Ld=ke(j("w-full","flex","flex-col",m("sm","gap")),{variants:{variant:{default:j(m("base","mb")),compact:j(m("sm","mb"))}},defaultVariants:{variant:"default"}});function uo(c){var u=c,{title:e,description:t,breadcrumb:r,actions:s,variant:a="default",className:o}=u,i=W(u,["title","description","breadcrumb","actions","variant","className"]);return n.jsxs("div",P(A({className:j(Ld({variant:a}),o)},i),{children:[r&&r.length>0&&n.jsx(_a,{items:r}),n.jsxs("div",{className:`flex items-start justify-between ${m("base","gap")}`,children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx(Ue,{variant:"heading",as:"h1",className:`${m("sm","mb")} text-2xl font-bold`,children:e}),t&&n.jsx(Ue,{variant:"body",className:"text-fg-secondary",children:t})]}),s&&n.jsx("div",{className:`flex items-center ${m("sm","gap")} flex-shrink-0`,children:s})]})]}))}function _d(s){var a=s,{onForgotPasswordClick:e,className:t}=a,r=W(a,["onForgotPasswordClick","className"]);return n.jsx("div",{className:j(m("base","p"),"bg-surface-muted",U("md"),t),children:n.jsxs("form",P(A({},r),{onSubmit:o=>{o.preventDefault(),r.onSubmit&&r.onSubmit(o)},className:m("base","space-y"),children:[n.jsxs("div",{className:m("sm","space-y"),children:[n.jsx(Rt,{htmlFor:"login-email",variant:"required",children:"Your email"}),n.jsx($e,{id:"login-email",placeholder:"myname@email.com",type:"email"})]}),n.jsxs("div",{className:m("sm","space-y"),children:[n.jsx(Rt,{htmlFor:"login-password",variant:"required",children:"Your password"}),n.jsx($e,{id:"login-password",placeholder:"••••••••",type:"password"})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx(Z,{variant:"secondary",type:"button",onClick:e,children:"Forgot password?"}),n.jsx(Z,{variant:"primary",type:"submit",children:"Sign in"})]})]}))})}function Pd(d){var f=d,{isOpen:e,onClose:t,title:r,children:s,variant:a="default",showCloseButton:o=!0,footer:i,className:c=""}=f,u=W(f,["isOpen","onClose","title","children","variant","showCloseButton","footer","className"]);const p=l.useRef(null);if(kr(e),Rs(p,e),Is(p,e),l.useEffect(()=>{if(!e)return;const h=k=>{k.key==="Escape"&&t()};return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h)}},[e,t]),l.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),!e)return null;const b=["fixed","inset-0",be("modal"),"overflow-y-auto"],g=["fixed","inset-0","bg-scrim","transition-opacity"],x={default:"max-w-md",large:"max-w-2xl",fullscreen:"max-w-full h-full"},w=["relative","bg-surface-overlay",U("lg"),ue("xl"),m("xl","my"),"mx-auto",x[a],m("lg","p"),c].filter(Boolean).join(" "),y=n.jsxs("div",{className:b.join(" "),role:"dialog","aria-modal":"true","aria-labelledby":r?"modal-title":void 0,onClick:h=>{h.target===h.currentTarget&&t()},children:[n.jsx("div",{className:g.join(" "),"aria-hidden":"true"}),n.jsx("div",{className:`flex min-h-full items-center justify-center ${m("base","p")}`,children:n.jsxs("div",P(A({ref:p,tabIndex:-1,className:w,onClick:h=>h.stopPropagation()},u),{children:[r&&n.jsxs("div",{className:`flex justify-between items-center ${m("base","mb")}`,children:[n.jsx("h2",{id:"modal-title",className:"text-xl font-semibold text-fg-primary",children:r}),o&&n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(Se,{className:"h-6 w-6"})})]}),!r&&o&&n.jsx("div",{className:`flex justify-end ${m("base","mb")}`,children:n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(Se,{className:"h-6 w-6"})})}),n.jsx("div",{className:m("base","mb"),children:s}),i&&n.jsx("div",{className:`flex justify-end ${m("sm","gap")} ${m("base","mt")}`,children:i})]}))})]});return typeof window!="undefined"?Ke.createPortal(y,document.body):y}const Dr=Ta({displayName:"TableContext",errorMessage:"useTableContext must be used within a Table component"}),zd=Dr.Context,Od=Dr.Provider;function ze(){return Dr.useContextRequired()}function Vd(){return Dr.useContextOptional()}function us({columns:e,data:t,loading:r=!1,paginationMode:s,page:a,pageSize:o,total:i,onPageChange:c,onPageSizeChange:u,defaultPageSize:d=10,pageSizeOptions:f,sortColumn:p,sortDirection:b,onSort:g,defaultSortColumn:x,defaultSortDirection:w="asc",filters:y,filterValues:h,onFilter:k,initialFilterValues:$={},selectable:v=!1,selectedRows:S,onSelectionChange:N,rowId:I,actions:C,emptyMessage:T="No data available",emptyStateTitle:L,emptyStateMessage:F,emptyStateIllustration:M,emptyStateAction:R,onRowClick:D,resizable:O=!1,columnWidths:B,onColumnResize:X,virtualScrolling:Q,virtualScrollingOptions:oe,children:H}){const _=l.useMemo(()=>s||(i!==void 0&&c?"server":"client"),[s,i,c]),Y=a!==void 0,[ee,J]=l.useState(1),[te,ae]=l.useState(d),z=Y?a:ee,V=o!=null?o:te,q=l.useMemo(()=>_==="server"?i!=null?i:0:t.length,[_,i,t.length]),ce=l.useMemo(()=>Math.ceil(q/V),[q,V]),ie=p!==void 0,[me,ve]=l.useState(x||""),[Me,_o]=l.useState(w),jt=ie?p:me,qt=ie?b||"asc":Me,Hr=h!==void 0,[Po,zo]=l.useState($),Xt=Hr?h:Po,Br=S!==void 0,[Oo,Vo]=l.useState([]),Ie=Br?S:Oo,Jt=l.useMemo(()=>!y||y.length===0?t:t.filter(re=>y.every(fe=>{const ye=Xt[fe.key];if(!ye||ye==="")return!0;const Zt=re[fe.key];return fe.type==="text"?String(Zt||"").toLowerCase().includes(String(ye).toLowerCase()):String(Zt)===String(ye)})),[t,y,Xt]),Ur=l.useMemo(()=>{if(ie&&g||!jt)return Jt;const re=[...Jt];return re.sort((fe,ye)=>{const Zt=fe[jt],Uo=ye[jt],bn=String(Zt||"").localeCompare(String(Uo||""));return qt==="asc"?bn:-bn}),re},[Jt,jt,qt,g,ie]),Oe=l.useMemo(()=>{if(_==="server")return Ur;const re=(z-1)*V,fe=re+V;return Ur.slice(re,fe)},[Ur,_,z,V]),Nt=l.useCallback((re,fe)=>{var ye;return I?I(re):((ye=re==null?void 0:re.id)==null?void 0:ye.toString())||fe.toString()},[I]),Qt=l.useMemo(()=>!v||Oe.length===0?!1:Oe.every((re,fe)=>{const ye=Nt(re,fe);return Ie.includes(ye)}),[v,Oe,Ie,Nt]),on=l.useMemo(()=>{if(!v)return!1;const re=Ie.length;return re>0&&re<Oe.length},[v,Ie.length,Oe.length]),St=l.useCallback(re=>{Y?c==null||c(re):J(re)},[Y,c]),ln=l.useCallback(re=>{u?u(re):ae(re),St(1)},[u,St]),cn=l.useCallback((re,fe)=>{ie?g==null||g(re,fe):(ve(re),_o(fe))},[ie,g]),dn=l.useCallback(re=>{Hr?k==null||k(re):zo(re),St(1)},[Hr,k,St]),pt=l.useCallback(re=>{Br?N==null||N(re):Vo(re)},[Br,N]),un=l.useCallback(re=>{const fe=Ie.includes(re)?Ie.filter(ye=>ye!==re):[...Ie,re];pt(fe)},[Ie,pt]),fn=l.useCallback(()=>{if(Qt)pt([]);else{const re=Oe.map((fe,ye)=>Nt(fe,ye));pt(re)}},[Qt,Oe,Nt,pt]),[Wo,Ho]=l.useState({}),Gr=B!==void 0,mn=Gr?B:Wo,pn=l.useCallback((re,fe)=>{Gr?X==null||X(re,fe):Ho(ye=>P(A({},ye),{[re]:fe}))},[Gr,X]),Bo=l.useMemo(()=>({columns:e,data:t,paginatedData:Oe,loading:r,paginationState:{page:z,pageSize:V,total:q,totalPages:ce},sortState:{column:jt,direction:qt},filterState:{values:Xt,config:y||[]},selectionState:{selectedRows:Ie,isAllSelected:Qt,isIndeterminate:on},paginationMode:_,selectable:v,rowId:I,actions:C,resizable:O,columnWidths:mn,virtualScrolling:Q,virtualScrollingOptions:oe,emptyMessage:T,emptyStateTitle:L,emptyStateMessage:F,emptyStateIllustration:M,emptyStateAction:R,setPage:St,setPageSize:ln,setSorting:cn,setFilters:dn,setSelection:pt,toggleRowSelection:un,toggleSelectAll:fn,getRowId:Nt,setColumnWidth:pn,onPageChange:c,onPageSizeChange:u,onSort:g,onFilter:k,onSelectionChange:N,onRowClick:D,onColumnResize:X}),[e,t,Oe,r,z,V,q,ce,jt,qt,Xt,y,Ie,Qt,on,_,v,I,C,T,L,F,M,R,St,ln,cn,dn,pt,un,fn,Nt,pn,c,u,g,k,N,D,X,O,mn,Q,oe]);return n.jsx(Od,{value:Bo,children:H})}function zs(u){var d=u,{column:e,resizable:t=!1,width:r,onResize:s,minWidth:a=50,maxWidth:o,className:i=""}=d,c=W(d,["column","resizable","width","onResize","minWidth","maxWidth","className"]);const{sortState:f,setSorting:p,onSort:b}=ze(),g=l.useRef(null),x=l.useRef(null),w=l.useRef(null),y=()=>{if(!e.sortable||!b&&!p)return;const N=f.column===e.key&&f.direction==="asc"?"desc":"asc";b?b(e.key,N):p(e.key,N)},h=N=>{v&&(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),y())},k=N=>{if(N.preventDefault(),N.stopPropagation(),!x.current||!s)return;const I=r||x.current.offsetWidth;w.current={x:N.clientX,width:I};const C=L=>{if(!w.current)return;const F=L.clientX-w.current.x,M=w.current.width+F,R=Math.max(a,o?Math.min(M,o):M);s(e.key,R)},T=()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",T),w.current=null};document.addEventListener("mousemove",C),document.addEventListener("mouseup",T)},$=f.column===e.key,v=e.sortable&&(b||p),S=$?f.direction:void 0;return n.jsx("th",P(A({ref:x,scope:"col",role:"columnheader","aria-sort":$?S==="asc"?"ascending":"descending":v?"none":void 0,className:`${m("lg","px")} ${m("md","py")} text-left text-xs font-medium text-fg-tertiary uppercase tracking-wider ${v?"cursor-pointer hover:bg-surface-active focus:bg-surface-active focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-2 select-none":""} ${e.hiddenOnMobile?"hidden md:table-cell":""} ${i}`,onClick:v?y:void 0,onKeyDown:v?h:void 0,tabIndex:v?0:void 0,style:r?{width:`${r}px`,minWidth:`${r}px`}:void 0},c),{children:n.jsxs("div",{className:`flex items-center ${m("sm","gap")} relative`,children:[n.jsx("span",{children:e.label}),$&&n.jsx("span",{className:"text-fg-tertiary","aria-hidden":"true",children:f.direction==="asc"?"↑":"↓"}),t&&s&&n.jsx("div",{ref:g,className:"absolute right-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-surface-brand transition-colors",onMouseDown:k,role:"separator","aria-orientation":"vertical","aria-label":`Resize ${e.label} column`,style:{touchAction:"none"}})]})}))}function Os(r){var s=r,{className:e=""}=s,t=W(s,["className"]);const{columns:a,selectable:o,selectionState:i,toggleSelectAll:c,actions:u,resizable:d,columnWidths:f,setColumnWidth:p}=ze();return n.jsxs("tr",P(A({role:"row",className:e},t),{children:[o&&n.jsx("th",{scope:"col",role:"columnheader",className:`${m("lg","px")} ${m("md","py")} w-12`,"aria-label":"Select all",children:n.jsx($r,{checked:i.isAllSelected,onChange:c,"aria-label":"Select all rows",className:m("none","my"),indeterminate:i.isIndeterminate})}),a.map(b=>n.jsx(zs,{column:b,resizable:d,width:f==null?void 0:f[b.key],onResize:p},b.key)),u&&n.jsx("th",{scope:"col",role:"columnheader",className:`${m("lg","px")} ${m("md","py")} text-right text-xs font-medium text-fg-tertiary uppercase tracking-wider w-12`,"aria-label":"Actions",children:n.jsx("span",{className:"sr-only",children:"Actions"})})]}))}function Vs(r){var s=r,{className:e=""}=s,t=W(s,["className"]);return ze(),n.jsx("thead",P(A({className:`bg-surface-subtle sticky top-0 ${be("sticky")} ${e}`},t),{children:n.jsx(Os,{})}))}function Ws(a){var o=a,{column:e,row:t,className:r=""}=o,s=W(o,["column","row","className"]);const i=e.key in t?t[e.key]:void 0;return n.jsx("td",P(A({className:`${m("lg","px")} ${m("base","py")} whitespace-nowrap text-sm text-fg-primary ${e.hiddenOnMobile?"hidden md:table-cell":""} ${r}`},s),{children:e.render?e.render(i,t):String(i!=null?i:"")}))}function Wd(o){var i=o,{actions:e,row:t,align:r="right",className:s=""}=i,a=W(i,["actions","row","align","className"]);const c=e.map(u=>({label:u.label,onClick:()=>u.onClick(t),variant:u.variant,disabled:u.disabled}));return n.jsx("div",P(A({className:`inline-flex ${s}`},a),{children:n.jsx(Oa,{trigger:n.jsx(Z,{variant:"ghost",size:"sm","aria-label":"Row actions",className:`h-8 w-8 ${m("none","p")}`,children:n.jsx(rc,{className:"h-4 w-4"})}),items:c,align:r})}))}function Hs(a){var o=a,{row:e,align:t="right",className:r=""}=o,s=W(o,["row","align","className"]);const{actions:i}=ze();if(!i)return null;const c=i(e);return c.length===0?null:n.jsx(Wd,A({row:e,actions:c,align:t,className:r},s))}function pr(i){var c=i,{row:e,rowIndex:t,className:r="",onClick:s,style:a}=c,o=W(c,["row","rowIndex","className","onClick","style"]);const{columns:u,selectable:d,selectionState:f,toggleRowSelection:p,getRowId:b,actions:g,onRowClick:x}=ze(),w=b(e,t),y=f.selectedRows.includes(w),h=k=>{s&&s(k),x&&x(e)};return n.jsxs("tr",P(A({role:"row","aria-selected":d?y:void 0,"aria-rowindex":t+1,className:`hover:bg-surface-hover ${y?"bg-surface-selected":""} ${r}`,onClick:h,style:a},o),{children:[d&&n.jsx("td",{className:`${m("lg","px")} ${m("base","py")}`,children:n.jsx($r,{checked:y,onChange:()=>p(w),"aria-label":`Select row ${w}`,className:m("none","my")})}),u.map(k=>n.jsx(Ws,{column:k,row:e},String(k.key))),g&&n.jsx("td",{className:`${m("lg","px")} ${m("base","py")} text-right`,children:n.jsx(Hs,{row:e})})]}))}function Bs(r){var s=r,{className:e=""}=s,t=W(s,["className"]);const{emptyMessage:a,emptyStateTitle:o,emptyStateMessage:i,emptyStateIllustration:c,emptyStateAction:u}=ze();return o||i||c?n.jsxs("div",P(A({className:e},t),{children:[n.jsx(za,{title:o||"No data available",message:i||a||"No data available",variant:c?"withIllustration":"default",illustration:c}),u&&n.jsx("div",{className:`${m("base","mt")} flex justify-center`,children:u})]})):n.jsx("div",P(A({className:`text-center text-fg-secondary ${e}`},t),{children:a||"No data available"}))}function fo(e,t){const{itemHeight:r,containerHeight:s,overscan:a=5,enabled:o=!0}=t,[i,c]=l.useState(0),u=l.useRef(null),d=l.useMemo(()=>{if(!o||e.length===0)return e.map((w,y)=>({index:y,start:y*r,end:(y+1)*r,size:r}));const b=Math.max(0,Math.floor(i/r)-a),g=s?Math.min(e.length,Math.ceil((i+s)/r)+a):e.length,x=[];for(let w=b;w<g;w++)x.push({index:w,start:w*r,end:(w+1)*r,size:r});return x},[e,r,i,s,a,o]),f=e.length*r;return l.useEffect(()=>{if(!o||!u.current)return;const b=u.current,g=()=>{c(b.scrollTop)};return b.addEventListener("scroll",g,{passive:!0}),()=>b.removeEventListener("scroll",g)},[o]),{virtualItems:d,totalHeight:f,scrollOffset:i,setScrollOffset:c,scrollToIndex:b=>{if(!u.current)return;const g=b*r;u.current.scrollTop=g,c(g)},containerRef:u}}function Us(s){var a=s,{children:e,className:t=""}=a,r=W(a,["children","className"]);var w,y;const{paginatedData:o,loading:i,columns:c,selectable:u,actions:d,virtualScrolling:f,virtualScrollingOptions:p}=ze(),b=c.length+(u?1:0)+(d?1:0),g=fo(o,{itemHeight:(p==null?void 0:p.itemHeight)||50,containerHeight:p==null?void 0:p.containerHeight,overscan:(p==null?void 0:p.overscan)||5,enabled:f||!1}),x=l.useMemo(()=>f&&g.virtualItems.length>0?g.virtualItems.map(h=>({row:o[h.index],index:h.index})).filter(h=>h.row!==void 0):o.map((h,k)=>({row:h,index:k})),[f,g.virtualItems,o]);return i?n.jsx("tbody",P(A({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:Array.from({length:5}).map((h,k)=>n.jsx("tr",{children:Array.from({length:b}).map(($,v)=>n.jsx("td",{className:`${m("lg","px")} ${m("base","py")}`,children:n.jsx($a,{className:"h-4 w-full"})},v))},k))})):o.length===0?n.jsx("tbody",P(A({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:n.jsx("tr",{children:n.jsx("td",{colSpan:b,className:`${m("lg","px")} ${m("3xl","py")}`,children:n.jsx(Bs,{})})})})):typeof e=="function"?n.jsx("tbody",P(A({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:o.map((h,k)=>e(h,k))})):n.jsx("tbody",P(A({className:`bg-surface-base divide-y divide-line-default ${t}`,role:"rowgroup"},r),{children:f&&g.virtualItems.length>0&&x.length>0?n.jsxs(n.Fragment,{children:[((w=g.virtualItems[0])==null?void 0:w.start)>0&&n.jsx("tr",{style:{height:g.virtualItems[0].start},"aria-hidden":"true",children:n.jsx("td",{colSpan:b})}),x.map(({row:h,index:k})=>n.jsx(pr,{row:h,rowIndex:k},k)),g.virtualItems.length>0&&n.jsx("tr",{style:{height:Math.max(0,g.totalHeight-(((y=g.virtualItems[g.virtualItems.length-1])==null?void 0:y.end)||0))},"aria-hidden":"true",children:n.jsx("td",{colSpan:b})})]}):x.map(({row:h,index:k})=>n.jsx(pr,{row:h,rowIndex:k},k))}))}function Hd(i){var c=i,{filters:e,onFilter:t,initialValues:r={},showClearAll:s=!0,className:a=""}=c,o=W(c,["filters","onFilter","initialValues","showClearAll","className"]);const[u,d]=l.useState(r),[f,p]=l.useState(!1),b=Object.values(u).some(h=>h!==""&&h!==null&&h!==void 0),g=(h,k)=>{const $=P(A({},u),{[h]:k});d($),t($)},x=()=>{const h={};e.forEach(k=>{h[k.key]=""}),d(h),t(h)},w=h=>{const k=P(A({},u),{[h]:""});d(k),t(k)},y=Object.values(u).filter(h=>h!==""&&h!==null&&h!==void 0).length;return n.jsx("div",P(A({className:`bg-surface-base border-b border-line-default ${a}`},o),{children:n.jsxs("div",{className:`${m("base","px")} ${m("md","py")} sm:${m("lg","px")}`,children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("button",{type:"button",onClick:()=>p(!f),className:`flex items-center ${m("sm","gap")} text-sm font-medium text-fg-secondary hover:text-fg-primary`,children:[n.jsx(dc,{className:"h-4 w-4"}),n.jsx("span",{children:"Filters"}),y>0&&n.jsx("span",{className:`inline-flex items-center ${m("sm","px")} ${m("0.5","py")} rounded text-xs font-medium bg-surface-brand-muted text-fg-brand-emphasis`,children:y})]}),b&&s&&n.jsx(Z,{variant:"ghost",size:"sm",onClick:x,className:"text-sm",children:"Clear all"})]}),f&&n.jsx("div",{className:`${m("base","mt")} grid grid-cols-1 ${m("base","gap")} sm:grid-cols-2 lg:grid-cols-3`,children:e.map(h=>{const k=u[h.key],$=k==null?"":String(k);return n.jsxs("div",{className:m("xs","space-y"),children:[n.jsx(Rt,{htmlFor:`filter-${h.key}`,variant:"optional",children:h.label}),n.jsxs("div",{className:"relative",children:[h.type==="text"&&n.jsx($e,{id:`filter-${h.key}`,type:"text",value:$,onChange:v=>g(h.key,v.target.value),placeholder:h.placeholder||`Filter by ${h.label.toLowerCase()}`,size:"sm",variant:"outlined"}),h.type==="select"&&n.jsxs("div",{className:"relative",children:[n.jsx(Sr,{id:`filter-${h.key}`,options:[{value:"",label:`All ${h.label}`},...h.options||[]],value:$,onChange:v=>g(h.key,v.target.value)}),$&&n.jsx("button",{type:"button",onClick:()=>w(h.key),className:"absolute right-8 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${h.label} filter`,children:n.jsx(Se,{className:"h-4 w-4"})})]}),h.type==="date"&&n.jsx($e,{id:`filter-${h.key}`,type:"date",value:$,onChange:v=>g(h.key,v.target.value),size:"sm",variant:"outlined"}),$&&h.type!=="select"&&n.jsx("button",{type:"button",onClick:()=>w(h.key),className:"absolute right-2 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${h.label} filter`,children:n.jsx(Se,{className:"h-4 w-4"})})]})]},h.key)})})]})}))}function Gs(s){var a=s,{showClearAll:e=!0,className:t=""}=a,r=W(a,["showClearAll","className"]);const{filterState:o,setFilters:i}=ze();return o.config.length===0?null:n.jsx(Hd,A({filters:o.config,onFilter:i,initialValues:o.values,showClearAll:e,className:t},r))}function Bd(f){var p=f,{page:e,pageSize:t,total:r,onPageChange:s,onPageSizeChange:a,pageSizeOptions:o=[10,25,50,100],showPageSizeSelector:i=!0,showPageInfo:c=!0,className:u=""}=p,d=W(p,["page","pageSize","total","onPageChange","onPageSizeChange","pageSizeOptions","showPageSizeSelector","showPageInfo","className"]);const b=Math.ceil(r/t),g=r===0?0:(e-1)*t+1,x=Math.min(e*t,r),w=()=>{e>1&&s(e-1)},y=()=>{e<b&&s(e+1)},h=()=>{e>1&&s(1)},k=()=>{e<b&&s(b)};return n.jsxs("div",P(A({className:`flex items-center justify-between ${m("base","px")} ${m("md","py")} bg-surface-base border-t border-line-default sm:${m("lg","px")} ${u}`},d),{children:[n.jsxs("div",{className:"flex flex-1 justify-between sm:hidden",children:[n.jsx(Z,{variant:"outline",size:"sm",onClick:w,disabled:e===1,children:"Previous"}),n.jsx(Z,{variant:"outline",size:"sm",onClick:y,disabled:e>=b,children:"Next"})]}),n.jsxs("div",{className:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between",children:[c&&n.jsx("div",{children:n.jsxs(Ue,{as:"p",className:"text-sm text-fg-secondary",children:["Showing ",n.jsx("span",{className:"font-medium",children:g})," to"," ",n.jsx("span",{className:"font-medium",children:x})," of"," ",n.jsx("span",{className:"font-medium",children:r})," results"]})}),n.jsxs("div",{className:`flex items-center ${m("base","gap")}`,children:[i&&n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[n.jsx(Ue,{as:"span",className:"text-sm text-fg-secondary",children:"Show:"}),n.jsx(Sr,{"aria-label":"Items per page",options:o.map($=>({value:$.toString(),label:$.toString()})),value:t.toString(),onChange:$=>{const v=parseInt($.target.value);a(v),s(1)},className:"w-20"})]}),n.jsxs("nav",{className:`flex items-center ${m("xs","gap")}`,"aria-label":"Pagination",children:[n.jsxs(Z,{variant:"ghost",size:"sm",onClick:h,disabled:e===1,"aria-label":"First page",children:[n.jsx(Bt,{className:"h-4 w-4"}),n.jsx(Bt,{className:"h-4 w-4 -ml-2"})]}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:w,disabled:e===1,"aria-label":"Previous page",children:n.jsx(Bt,{className:"h-4 w-4"})}),n.jsx("div",{className:`flex items-center ${m("xs","gap")}`,children:Array.from({length:Math.min(5,b)},($,v)=>{let S;return b<=5||e<=3?S=v+1:e>=b-2?S=b-4+v:S=e-2+v,n.jsx(Z,{variant:e===S?"primary":"ghost",size:"sm",onClick:()=>s(S),className:"min-w-10","aria-label":`Page ${S}`,"aria-current":e===S?"page":void 0,children:S},S)})}),n.jsx(Z,{variant:"ghost",size:"sm",onClick:y,disabled:e>=b,"aria-label":"Next page",children:n.jsx(xt,{className:"h-4 w-4"})}),n.jsxs(Z,{variant:"ghost",size:"sm",onClick:k,disabled:e>=b,"aria-label":"Last page",children:[n.jsx(xt,{className:"h-4 w-4"}),n.jsx(xt,{className:"h-4 w-4 -ml-2"})]})]})]})]})]}))}function Ks(o){var i=o,{showPageSizeSelector:e=!0,showPageInfo:t=!0,pageSizeOptions:r,className:s=""}=i,a=W(i,["showPageSizeSelector","showPageInfo","pageSizeOptions","className"]);const{paginationState:c,setPage:u,setPageSize:d,paginationMode:f}=ze();return f==="client"&&c.totalPages<=1?null:n.jsx(Bd,A({page:c.page,pageSize:c.pageSize,total:c.total,onPageChange:u,onPageSizeChange:d,pageSizeOptions:r,showPageSizeSelector:e,showPageInfo:t,className:s},a))}function Ce(e){const c=e,{className:t="","aria-label":r,"aria-labelledby":s}=c,a=W(c,["className","aria-label","aria-labelledby"]),o="children"in e&&e.children!==void 0,i=o?a:Ud(a);return o?n.jsx("div",{className:`bg-surface-base shadow ${U("lg")} overflow-hidden ${t}`,children:n.jsx(us,P(A({},i),{children:e.children}))}):n.jsx("div",{className:`bg-surface-base shadow ${U("lg")} overflow-hidden ${t}`,children:n.jsxs(us,P(A({},i),{children:[i.filters&&i.filters.length>0&&n.jsx(Gs,{}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"min-w-full divide-y divide-line-default",role:"table","aria-label":r,"aria-labelledby":s,"aria-rowcount":i.total||i.data.length,"aria-colcount":i.columns.length+(i.selectable?1:0)+(i.actions?1:0),children:[n.jsx(Vs,{}),n.jsx(Us,{})]})}),n.jsx(Ks,{})]}))})}function Ud(e){const{columns:t,data:r,loading:s,onSort:a,sortColumn:o,sortDirection:i,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:p,pagination:b,filters:g,selectable:x,selectedRows:w,onSelectionChange:y,rowId:h,actions:k,onRowClick:$,paginationMode:v,defaultPageSize:S,resizable:N,columnWidths:I,onColumnResize:C,virtualScrolling:T,virtualScrollingOptions:L}=e;let F=v||"auto";return F==="auto"&&(F=b&&b.total!==void 0?"server":"client"),{columns:t,data:r,loading:s,paginationMode:F,page:b==null?void 0:b.page,pageSize:b==null?void 0:b.pageSize,total:b==null?void 0:b.total,onPageChange:b==null?void 0:b.onPageChange,onPageSizeChange:b==null?void 0:b.onPageSizeChange,defaultPageSize:S||(b==null?void 0:b.pageSize)||10,pageSizeOptions:b==null?void 0:b.pageSizeOptions,sortColumn:o,sortDirection:i,onSort:a,filters:g==null?void 0:g.config,filterValues:g==null?void 0:g.initialValues,onFilter:g==null?void 0:g.onFilter,initialFilterValues:g==null?void 0:g.initialValues,selectable:x,selectedRows:w,onSelectionChange:y,rowId:h,actions:k,onRowClick:$,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:p,resizable:N,columnWidths:I,onColumnResize:C,virtualScrolling:T,virtualScrollingOptions:L,children:n.jsx(n.Fragment,{})}}Ce.Header=Vs;Ce.HeaderRow=Os;Ce.HeaderCell=zs;Ce.Body=Us;Ce.Row=pr;Ce.Cell=Ws;Ce.Filters=Gs;Ce.Pagination=Ks;Ce.EmptyState=Bs;Ce.Actions=Hs;function Gd(e={}){const{defaultWidths:t={},minWidth:r=50,maxWidth:s,resizable:a=!0}=e,[o,i]=l.useState(t),[c,u]=l.useState(!1),[d,f]=l.useState(null),p=l.useRef(null),b=l.useCallback(($,v)=>{const S=Math.max(r,s?Math.min(v,s):v);i(N=>P(A({},N),{[$]:S}))},[r,s]),g=l.useCallback(()=>{i(t)},[t]),x=l.useCallback(($,v,S)=>{a&&(u(!0),f($),p.current={startX:v,startWidth:S})},[a]),w=l.useCallback($=>{if(!c||!d||!p.current)return;const v=$-p.current.startX,S=p.current.startWidth+v;b(d,S)},[c,d,b]),y=l.useCallback(()=>{u(!1),f(null),p.current=null},[]),h=l.useRef(void 0),k=l.useRef(void 0);return typeof window!="undefined"&&(h.current=$=>{c&&w($.clientX)},k.current=()=>{c&&y()},c?(document.addEventListener("mousemove",h.current),document.addEventListener("mouseup",k.current)):(h.current&&document.removeEventListener("mousemove",h.current),k.current&&document.removeEventListener("mouseup",k.current))),{columnWidths:o,setColumnWidth:b,resetColumnWidths:g,isResizing:c,resizingColumn:d,startResize:x,handleResize:w,endResize:y}}const Fr=l.createContext(null);function Kd(){return l.useContext(Fr)}function qe(){const e=l.useContext(Fr);if(!e)throw new Error("useSideNavbarThemeRequired must be used within SideNavbarThemeProvider");return e}const Tt={variant:"default",navigationWidth:"56px",contentWidth:"320px",animationDuration:300,animationEasing:"ease-in-out"};function Ys({children:e,variant:t=Tt.variant,navigationWidth:r=Tt.navigationWidth,contentWidth:s=Tt.contentWidth,animationDuration:a=Tt.animationDuration,animationEasing:o=Tt.animationEasing}){const i=l.useMemo(()=>({variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o}),[t,r,s,a,o]);return n.jsx(Fr.Provider,{value:i,children:e})}const Lr=l.createContext(null);function Yd(){return l.useContext(Lr)}function kt(){const e=l.useContext(Lr);if(!e)throw new Error("useSideNavbarConfigRequired must be used within SideNavbarConfigProvider");return e}const Ne={mode:"full",resizable:!1,minWidth:void 0,maxWidth:void 0,snapPoints:void 0,responsive:!1,mobileBreakpoint:768,mobileVariant:"collapse",overlayBackdrop:!0,persistState:!0,persistWidth:!1,storageKey:void 0,keyboardShortcut:"Ctrl+B",enableKeyboardShortcut:!0};function qs({children:e,mode:t=Ne.mode,resizable:r=Ne.resizable,minWidth:s=Ne.minWidth,maxWidth:a=Ne.maxWidth,snapPoints:o=Ne.snapPoints,responsive:i=Ne.responsive,mobileBreakpoint:c=Ne.mobileBreakpoint,mobileVariant:u=Ne.mobileVariant,overlayBackdrop:d=Ne.overlayBackdrop,persistState:f=Ne.persistState,persistWidth:p=Ne.persistWidth,storageKey:b=Ne.storageKey,keyboardShortcut:g=Ne.keyboardShortcut,enableKeyboardShortcut:x=Ne.enableKeyboardShortcut}){const w=l.useMemo(()=>({mode:t,resizable:r,minWidth:s,maxWidth:a,snapPoints:o,responsive:i,mobileBreakpoint:c,mobileVariant:u,overlayBackdrop:d,persistState:f,persistWidth:p,storageKey:b,keyboardShortcut:g,enableKeyboardShortcut:x}),[t,r,s,a,o,i,c,u,d,f,p,b,g,x]);return n.jsx(Lr.Provider,{value:w,children:e})}const _r=l.createContext(null);function qd(){return l.useContext(_r)}function Xe(){const e=l.useContext(_r);if(!e)throw new Error("useSideNavbarStateRequired must be used within SideNavbarStateProvider");return e}function br(e){if(typeof e=="number")return e;const t=parseFloat(e);return isNaN(t)?0:e.endsWith("rem")||e.endsWith("em")?t*16:(e.endsWith("px"),t)}function Xd(e,t){return e===void 0||t===void 0?!0:e<t}function ir(e,t,r){let s=e;return t!==void 0&&(s=Math.max(s,t)),r!==void 0&&(s=Math.min(s,r)),s}const Jd=["ctrl","cmd","control","shift","alt","meta","option"];function mo(e){const t={key:"",ctrl:!1,shift:!1,alt:!1,meta:!1,isValid:!1};if(!e||typeof e!="string")return t;const r=e.trim();if(!r)return t;const s=r.split("+").map(u=>u.trim().toLowerCase()).filter(u=>u.length>0);if(s.length===0)return t;const a=new Set;let o="";for(let u=0;u<s.length;u++){const d=s[u];if(Jd.includes(d))a.add(d);else if(u===s.length-1)o=d;else return t}if(!o)return t;const i=a.has("ctrl")||a.has("cmd")||a.has("control"),c=a.has("alt")||a.has("option");return{key:o,ctrl:i,shift:a.has("shift"),alt:c,meta:a.has("meta"),isValid:!0}}function Qd(e,t="windows"){if(!e.isValid)return"";const r=[];return t==="mac"?(e.ctrl&&r.push("⌘"),e.shift&&r.push("⇧"),e.alt&&r.push("⌥"),e.meta&&r.push("⌃"),r.push(e.key.toUpperCase()),r.join("")):(e.ctrl&&r.push("Ctrl"),e.shift&&r.push("Shift"),e.alt&&r.push("Alt"),e.meta&&r.push("Meta"),r.push(e.key.toUpperCase()),r.join("+"))}function po({initialWidth:e,minWidth:t,maxWidth:r,snapPoints:s,snapThreshold:a=20,onWidthChange:o,enabled:i=!0}){const c=ir(e,t,r),[u,d]=l.useState(c),[f,p]=l.useState(!1),b=l.useRef(0),g=l.useRef(c),x=l.useCallback(k=>{let $=ir(k,t,r);if(s&&s.length>0){const v=s.reduce((S,N)=>{const I=Math.abs($-N),C=Math.abs($-S);return I<C?N:S},s[0]);Math.abs($-v)<=a&&($=v)}d($),o==null||o($)},[t,r,s,a,o]),w=l.useCallback(k=>{if(!i||!f)return;const $=k.clientX-b.current,v=g.current+$;x(v)},[i,f,x]),y=l.useCallback(()=>{i&&(p(!1),b.current=0,g.current=u)},[i,u]),h=l.useCallback(k=>{i&&(k.preventDefault(),k.stopPropagation(),p(!0),b.current=k.clientX,g.current=u)},[i,u]);return l.useEffect(()=>{if(f)return document.addEventListener("mousemove",w),document.addEventListener("mouseup",y),document.body.style.userSelect="none",document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",y),document.body.style.userSelect="",document.body.style.cursor=""}},[f,w,y]),l.useEffect(()=>{f||d(ir(e,t,r))},[e,t,r,f]),{width:u,isResizing:f,startResize:h,setWidth:x}}function bo({mobileBreakpoint:e=768,onMobileChange:t,enabled:r=!0}={}){const[s,a]=l.useState(typeof window!="undefined"?window.innerWidth:1024),[o,i]=l.useState(typeof window!="undefined"?window.innerWidth<e:!1),c=l.useCallback(()=>{if(!r||typeof window=="undefined")return;const u=window.innerWidth,d=u<e;a(u),d!==o&&(i(d),t==null||t(d))},[r,e,o,t]);return l.useEffect(()=>{if(!r||typeof window=="undefined")return;const u=window.innerWidth,d=u<e;a(u),i(d),window.addEventListener("resize",c);let f=null;return window.ResizeObserver&&(f=new ResizeObserver(()=>{c()}),f.observe(document.body)),()=>{window.removeEventListener("resize",c),f==null||f.disconnect()}},[r,e,c]),{isMobile:o,viewportWidth:s}}function ho({isActive:e,containerRef:t,restoreFocus:r=!0,initialFocusRef:s}){const a=l.useRef(null);l.useEffect(()=>{if(e){if(a.current=document.activeElement,s!=null&&s.current)s.current.focus();else if(t.current){const i=t.current.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');i==null||i.focus()}}else r&&a.current&&(a.current.focus(),a.current=null)},[e,t,s,r]);const o=l.useCallback(i=>{if(!(!e||!t.current)&&i.key==="Tab"){const c=t.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),u=c[0],d=c[c.length-1];i.shiftKey?document.activeElement===u&&(i.preventDefault(),d==null||d.focus()):document.activeElement===d&&(i.preventDefault(),u==null||u.focus())}},[e,t]);l.useEffect(()=>{if(e)return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}},[e,o])}function go({key:e,ctrl:t=!1,shift:r=!1,alt:s=!1,meta:a=!1,onTrigger:o,enabled:i=!0,preventDefault:c=!0}){const u=l.useCallback(d=>{if(!i)return;const f=d.target;if((f.tagName==="INPUT"||f.tagName==="TEXTAREA"||f.isContentEditable)&&!t&&!a)return;const b=e.length===1?d.key.toLowerCase()===e.toLowerCase():d.key===e,g=t?d.ctrlKey||d.metaKey:!d.ctrlKey&&!d.metaKey,x=r?d.shiftKey:!d.shiftKey,w=s?d.altKey:!d.altKey,y=a?d.metaKey:!d.metaKey,h=t?(d.ctrlKey||d.metaKey)&&!a:g&&y;b&&h&&x&&w&&(c&&(d.preventDefault(),d.stopPropagation()),o())},[i,e,t,r,s,a,o,c]);l.useEffect(()=>{if(i)return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[i,u])}function Xs({children:e,defaultCollapsed:t=!1,collapsed:r,onCollapseChange:s,onWidthChange:a,onMobileChange:o,exclusiveGroups:i=!1}){const c=qe(),u=kt(),d=l.useRef(null),f=r!==void 0,p=()=>{if(f)return r;if(u.storageKey&&u.persistState&&typeof window!="undefined"){const D=localStorage.getItem(`${u.storageKey}-collapsed`);if(D!==null)return D==="true"}return t},b=()=>{if(u.storageKey&&u.persistWidth&&typeof window!="undefined"){const D=localStorage.getItem(`${u.storageKey}-width`);if(D!==null){const O=parseInt(D,10);if(!isNaN(O))return O}}return br(c.contentWidth)},[g,x]=l.useState(p),[w,y]=l.useState({}),{isMobile:h}=bo({mobileBreakpoint:u.mobileBreakpoint,onMobileChange:D=>{o==null||o(D),D&&u.mobileVariant==="collapse"&&!f&&x(!0)},enabled:u.responsive}),{width:k,isResizing:$,startResize:v,setWidth:S}=po({initialWidth:b(),minWidth:u.minWidth,maxWidth:u.maxWidth,snapPoints:u.snapPoints,onWidthChange:D=>{a==null||a(D),u.storageKey&&u.persistWidth&&typeof window!="undefined"&&localStorage.setItem(`${u.storageKey}-width`,String(D))},enabled:u.resizable&&!h});ho({isActive:h&&u.mobileVariant==="overlay"&&!g,containerRef:d,restoreFocus:!0});const N=f?r:g,I=l.useCallback(D=>{f||x(D),s==null||s(D)},[f,s]),C=l.useCallback(()=>{I(!N)},[N,I]),T=mo(u.keyboardShortcut);go({key:T.key,ctrl:T.ctrl,shift:T.shift,alt:T.alt,meta:T.meta,onTrigger:C,enabled:u.enableKeyboardShortcut});const L=l.useCallback(D=>{S(D)},[S]),F=l.useCallback(D=>{y(i?O=>{const X=O[D]===!1,Q={},oe=new Set([...Object.keys(O),D]);return X?oe.forEach(H=>{Q[H]=!0}):oe.forEach(H=>{Q[H]=H!==D}),Q}:O=>P(A({},O),{[D]:!O[D]}))},[i]),M=l.useCallback((D,O)=>{y(B=>P(A({},B),{[D]:O}))},[]);l.useEffect(()=>{f&&r!==g&&x(r)},[f,r,g]),l.useEffect(()=>{u.storageKey&&u.persistState&&typeof window!="undefined"&&!f&&localStorage.setItem(`${u.storageKey}-collapsed`,String(g))},[u.storageKey,u.persistState,g,f]);const R=l.useMemo(()=>({collapsed:N,toggle:C,setCollapsed:I,currentWidth:k,setWidth:L,isMobile:h,isResizing:$,startResize:v,groupStates:w,toggleGroup:F,setGroupCollapsed:M,sidebarRef:d}),[N,C,I,k,L,h,$,v,w,F,M]);return n.jsx(_r.Provider,{value:R,children:e})}function Js({children:e,variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:p,mobileBreakpoint:b,mobileVariant:g,overlayBackdrop:x,persistState:w,persistWidth:y,storageKey:h,keyboardShortcut:k,enableKeyboardShortcut:$,defaultCollapsed:v,collapsed:S,onCollapseChange:N,onWidthChange:I,onMobileChange:C,exclusiveGroups:T}){return n.jsx(Ys,{variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,children:n.jsx(qs,{mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:p,mobileBreakpoint:b,mobileVariant:g,overlayBackdrop:x,persistState:w,persistWidth:y,storageKey:h,keyboardShortcut:k,enableKeyboardShortcut:$,children:n.jsx(Xs,{defaultCollapsed:v,collapsed:S,onCollapseChange:N,onWidthChange:I,onMobileChange:C,exclusiveGroups:T,children:e})})})}const Pr=l.createContext(null);function Qs(){return l.useContext(Pr)}function Zs(){const e=l.useContext(Pr);if(!e)throw new Error("useSidebarSlotRequired must be used within SidebarSlotProvider");return e}function xo({children:e,defaultSlot:t=null}){const[r,s]=l.useState(t),a=l.useRef(new Map),o=l.useCallback((u,d)=>{a.current.set(u,d)},[]),i=l.useCallback(u=>{a.current.delete(u)},[]),c=l.useMemo(()=>({activeSlot:r,setActiveSlot:s,slots:a.current,registerSlot:o,unregisterSlot:i}),[r,o,i]);return n.jsx(Pr.Provider,{value:c,children:e})}const zr=l.createContext(null);function Zd(){return l.useContext(zr)}function vo(){const e=l.useContext(zr);return e||{showMainToggle:!0,mainTogglePosition:"floating"}}function en(r){var s=r,{className:e=""}=s,t=W(s,["className"]);const{currentWidth:a,setWidth:o,isResizing:i,startResize:c}=Xe(),{resizable:u}=kt();return u?n.jsxs("div",P(A({className:`
389
218
  group
390
219
  absolute
391
220
  top-0
@@ -403,16 +232,16 @@ React keys must be passed directly to JSX without using spread:
403
232
  justify-center
404
233
  ${i?"bg-surface-brand-emphasis":""}
405
234
  ${e}
406
- `,onMouseDown:u,role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar","aria-valuenow":a,tabIndex:0,onKeyDown:c=>{if(c.key==="ArrowLeft"||c.key==="ArrowRight"){c.preventDefault();const f=c.key==="ArrowLeft"?-10:10;o(a+f)}}},t),{children:[n.jsx("div",{className:`
235
+ `,onMouseDown:c,role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar","aria-valuenow":a,tabIndex:0,onKeyDown:d=>{if(d.key==="ArrowLeft"||d.key==="ArrowRight"){d.preventDefault();const f=d.key==="ArrowLeft"?-10:10;o(a+f)}}},t),{children:[n.jsx("div",{className:`
407
236
  w-0.5
408
237
  h-8
409
238
  bg-line-strong
410
- rounded-full
239
+ ${U("full")}
411
240
  opacity-0
412
241
  group-hover:opacity-100
413
242
  transition-opacity
414
243
  ${i?"opacity-100":""}
415
- `}),n.jsx(ec,{className:`
244
+ `}),n.jsx(fc,{className:`
416
245
  h-4
417
246
  w-4
418
247
  text-fg-tertiary
@@ -421,25 +250,25 @@ React keys must be passed directly to JSX without using spread:
421
250
  transition-opacity
422
251
  absolute
423
252
  ${i?"opacity-100":""}
424
- `,"aria-hidden":"true"})]})):null}function Js(o){var i=o,{visible:e,onBackdropClick:t,className:r="",style:s}=i,a=O(i,["visible","onBackdropClick","className","style"]);const{collapsed:u,setCollapsed:d,isMobile:c}=ct(),{animationDuration:f}=lt(),{mobileVariant:p,overlayBackdrop:m}=vt(),h=c&&p==="overlay",x=e!=null?e:h&&m&&!u,v=()=>{t?t():d(!0)};return x?n.jsx("div",T({className:`
253
+ `,"aria-hidden":"true"})]})):null}function tn(o){var i=o,{visible:e,onBackdropClick:t,className:r="",style:s}=i,a=W(i,["visible","onBackdropClick","className","style"]);const{collapsed:c,setCollapsed:u,isMobile:d}=Xe(),{animationDuration:f}=qe(),{mobileVariant:p,overlayBackdrop:b}=kt(),g=d&&p==="overlay",x=e!=null?e:g&&b&&!c,w=()=>{t?t():u(!0)};return x?n.jsx("div",A({className:`
425
254
  fixed inset-0
426
255
  bg-scrim
427
- ${ue("modal-backdrop")}
256
+ ${be("modal-backdrop")}
428
257
  ${r}
429
- `,style:T({animation:`fadeIn ${f}ms ease-in-out`},s),onClick:v,"aria-hidden":"true","data-testid":"side-navbar-backdrop"},a)):null}const Dd={xs:"w-5 h-5",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10"},Fd={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},Ld={floating:`absolute ${ue("fixed")}`,top:"absolute top-2 right-2 z-10",bottom:"absolute bottom-2 right-2 z-10",inside:"relative z-10","navigation-top":"relative mt-2 mx-auto z-10","navigation-bottom":"relative mt-auto mb-2 mx-auto z-10"},_d={default:"bg-surface-raised border border-line-default shadow-sm hover:bg-surface-hover hover:shadow",ghost:"bg-transparent hover:bg-surface-hover border-0",outline:"bg-transparent border border-line-default hover:bg-surface-hover"},Pd={floating:"right",top:"bottom",bottom:"top",inside:"right","navigation-top":"right","navigation-bottom":"right"};function Qs(v){var y=v,{position:e="floating",offset:t,icon:r,expandIcon:s,collapseIcon:a,size:o="sm",variant:i="default",showTooltip:u=!0,tooltipPosition:d,keyboardShortcut:c,enableKeyboardShortcut:f,className:p="",style:m,"aria-label":h}=y,x=O(y,["position","offset","icon","expandIcon","collapseIcon","size","variant","showTooltip","tooltipPosition","keyboardShortcut","enableKeyboardShortcut","className","style","aria-label"]);var U,oe;const{collapsed:b,toggle:w}=ct(),{animationDuration:C,animationEasing:g,navigationWidth:j,contentWidth:N,minWidth:L}=lt(),S=vt(),D=c!=null?c:S.keyboardShortcut,A=f!=null?f:S.enableKeyboardShortcut,M=()=>{if(typeof r=="function")return r(b);if(r)return r;if(b&&s)return s;if(!b&&a)return a;const ne=b?cc:ic;return n.jsx(ne,{className:Fd[o],style:{transition:"none",transform:"none",willChange:"auto"}})},F=b?"Expand sidebar":"Collapse sidebar",I=d!=null?d:Pd[e],R=u?`${b?"Expand":"Collapse"} sidebar${A?` (${D})`:""}`:void 0,W=t?{transform:`translate(${(U=t.x)!=null?U:0}px, ${(oe=t.y)!=null?oe:0}px)`}:{},K=e==="floating"?T({right:"-12px",top:"1rem",transform:"translateY(-50%)",transition:`right ${C}ms ${g}`},W):W,H=n.jsx("button",z(T({type:"button",onClick:w,className:`
430
- ${Dd[o]}
431
- ${_d[i]}
432
- rounded-full
258
+ `,style:A({animation:`fadeIn ${f}ms ease-in-out`},s),onClick:w,"aria-hidden":"true","data-testid":"side-navbar-backdrop"},a)):null}const eu={xs:"w-5 h-5",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10"},tu={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},ru={floating:`absolute ${be("fixed")}`,top:"absolute top-2 right-2 z-10",bottom:"absolute bottom-2 right-2 z-10",inside:"relative z-10","navigation-top":`relative ${m("sm","mt")} mx-auto z-10`,"navigation-bottom":`relative mt-auto ${m("sm","mb")} mx-auto z-10`},su={default:`bg-surface-raised border border-line-default ${ue("sm")} hover:bg-surface-hover hover:shadow`,ghost:"bg-transparent hover:bg-surface-hover border-0",outline:"bg-transparent border border-line-default hover:bg-surface-hover"},nu={floating:"right",top:"bottom",bottom:"top",inside:"right","navigation-top":"right","navigation-bottom":"right"};function rn(w){var y=w,{position:e="floating",offset:t,icon:r,expandIcon:s,collapseIcon:a,size:o="sm",variant:i="default",showTooltip:c=!0,tooltipPosition:u,keyboardShortcut:d,enableKeyboardShortcut:f,className:p="",style:b,"aria-label":g}=y,x=W(y,["position","offset","icon","expandIcon","collapseIcon","size","variant","showTooltip","tooltipPosition","keyboardShortcut","enableKeyboardShortcut","className","style","aria-label"]);var O,B;const{collapsed:h,toggle:k}=Xe(),{animationDuration:$,animationEasing:v}=qe(),S=kt(),N=d!=null?d:S.keyboardShortcut,I=f!=null?f:S.enableKeyboardShortcut,C=()=>{if(typeof r=="function")return r(h);if(r)return r;if(h&&s)return s;if(!h&&a)return a;const X=h?wc:vc;return n.jsx(X,{className:tu[o],style:{transition:"none",transform:"none",willChange:"auto"}})},T=h?"Expand sidebar":"Collapse sidebar",L=u!=null?u:nu[e],F=c?`${h?"Expand":"Collapse"} sidebar${I?` (${N})`:""}`:void 0,M=t?{transform:`translate(${(O=t.x)!=null?O:0}px, ${(B=t.y)!=null?B:0}px)`}:{},R=e==="floating"?A({right:"-12px",top:"1rem",transform:"translateY(-50%)",transition:`right ${$}ms ${v}`},M):M,D=n.jsx("button",P(A({type:"button",onClick:k,className:`
259
+ ${eu[o]}
260
+ ${su[i]}
261
+ ${U("full")}
433
262
  flex items-center justify-center
434
263
  text-fg-secondary hover:text-fg-primary
435
264
  focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-1
436
- ${e==="floating"?"":Ld[e]}
265
+ ${e==="floating"?"":ru[e]}
437
266
  ${p}
438
- `,style:T(T(T(T({},e==="floating"?{position:"absolute",right:"-11px",left:"auto"}:{}),e!=="floating"?K:{}),e==="floating"?{zIndex:kn.fixed.value}:{}),m),"aria-label":h||F,"aria-expanded":!b,"aria-controls":"side-navbar-sidebar","data-position":e},x),{children:M()}));if(e==="floating"){const ne=u&&R?n.jsx(Bt,{content:R,position:I,preservePositioning:!0,children:H}):H;return n.jsx("div",{style:{position:"absolute",right:"0",top:"1rem",transform:"translateY(-50%)",zIndex:kn.fixed.value},children:ne})}return u&&R?n.jsx(Bt,{content:R,position:I,children:H}):H}const zd={default:"",compact:"text-sm",elevated:"shadow-lg",minimal:"border-0",bordered:"border-2"};function uo(o){var i=o,{children:e,className:t="",style:r,"aria-label":s}=i,a=O(i,["children","className","style","aria-label"]);const u=ct(),d=lt(),c=vt(),f=Ys(),{collapsed:p,setCollapsed:m,currentWidth:h,isResizing:x,sidebarRef:v,isMobile:y}=u,{variant:b,navigationWidth:w,contentWidth:C,animationDuration:g,animationEasing:j}=d,{mode:N,resizable:L,mobileVariant:S,overlayBackdrop:D}=c,A=typeof w=="number"?`${w}px`:w,M=typeof C=="number"?`${C}px`:C,I=N==="navigation"||p?A:L?`${h}px`:M,[R,W]=l.useState(!1);l.useEffect(()=>{W(!0)},[]);const K=y&&S==="overlay",H=R&&K,U=H?`fixed left-0 top-0 ${ue("fixed")}`:"relative";return n.jsxs(n.Fragment,{children:[R&&K&&D&&!p&&n.jsx(Js,{}),n.jsxs("aside",z(T({ref:v,id:"side-navbar-sidebar",className:k(U,"flex","h-full","overflow-visible",zd[b],H&&p?"-translate-x-full":"translate-x-0",t),style:T({position:H?"fixed":"relative",backgroundColor:"var(--color-surface-subtle)",borderRight:"1px solid var(--color-line-default)",width:I,minWidth:I,transitionProperty:x?"none":"width, min-width, transform",transitionDuration:`${g}ms`,transitionTimingFunction:j},r),role:"complementary","aria-label":s||"Sidebar navigation","aria-expanded":N!=="navigation"?!p:void 0,"data-mode":N,"data-collapsed":p},a),{children:[L&&N!=="navigation"&&!p&&n.jsx(Xs,{}),f.showMainToggle&&N!=="navigation"&&n.jsx(Qs,{position:f.mainTogglePosition}),n.jsx("div",{className:"flex h-full w-full overflow-visible",children:e})]}))]})}const Pr=l.createContext(null);function Od(){return l.useContext(Pr)}function zr(){const e=l.useContext(Pr);if(!e)throw new Error("useNavbarRequired must be used within a SideNavbar.Navbar component");return e}function gr(o){var i=o,{icon:e,size:t="sm",variant:r="ghost",className:s=""}=i,a=O(i,["icon","size","variant","className"]);const{collapsed:u,toggle:d}=zr(),c=()=>{if(e)return typeof e=="function"?e(u):e;const h=u?bt:Ut;return n.jsx(h,{className:p[t],style:{transition:"none",transform:"none",willChange:"auto"}})},f={xs:"w-6 h-6",sm:"w-8 h-8",md:"w-10 h-10"},p={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5"},m={default:"bg-surface-base border border-line-default shadow-sm hover:bg-surface-hover",ghost:"hover:bg-surface-active",outline:"border border-line-emphasis hover:bg-surface-hover"};return n.jsx(Bt,{content:u?"Expand sidebar":"Collapse sidebar",position:"right",children:n.jsx("button",z(T({type:"button",onClick:d,className:`
267
+ `,style:A(A(A(A({},e==="floating"?{position:"absolute",right:"-11px",left:"auto"}:{}),e!=="floating"?R:{}),e==="floating"?{zIndex:Cn.fixed.value}:{}),b),"aria-label":g||T,"aria-expanded":!h,"aria-controls":"side-navbar-sidebar","data-position":e},x),{children:C()}));if(e==="floating"){const X=c&&F?n.jsx(It,{content:F,position:L,preservePositioning:!0,children:D}):D;return n.jsx("div",{style:{position:"absolute",right:"0",top:"1rem",transform:"translateY(-50%)",zIndex:Cn.fixed.value},children:X})}return c&&F?n.jsx(It,{content:F,position:L,children:D}):D}function zn(e){return!l.isValidElement(e)||typeof e.type=="string"?!1:e.type.__SIDENAVBAR_KIND__==="navbar"}function au(e){let t,r,s=0,a=!1;for(const o of l.Children.toArray(e)){if(zn(o)){const{showMainToggle:c,mainTogglePosition:u}=o.props;if(!(c!==void 0||u!==void 0))continue;s++,s===1&&(t=c,r=u);continue}if(!l.isValidElement(o))continue;const i=o.props;if(i.children!==void 0)for(const c of l.Children.toArray(i.children)){if(!zn(c))continue;const{showMainToggle:u,mainTogglePosition:d}=c.props;if(u!==void 0||d!==void 0){a=!0;break}}}return{show:t,position:r,overrideCount:s,wrappedNavbarWithOverride:a}}const ou={default:"",compact:"text-sm",elevated:ue("lg"),minimal:"border-0",bordered:"border-2"};function yo(o){var i=o,{children:e,className:t="",style:r,"aria-label":s}=i,a=W(i,["children","className","style","aria-label"]);var Y,ee;const c=Xe(),u=qe(),d=kt(),f=vo(),p=au(e),b=(Y=p.show)!=null?Y:f.showMainToggle,g=(ee=p.position)!=null?ee:f.mainTogglePosition,{collapsed:x,setCollapsed:w,currentWidth:y,isResizing:h,sidebarRef:k,isMobile:$}=c,{variant:v,navigationWidth:S,contentWidth:N,animationDuration:I,animationEasing:C}=u,{mode:T,resizable:L,mobileVariant:F,overlayBackdrop:M}=d,R=typeof S=="number"?`${S}px`:S,D=typeof N=="number"?`${N}px`:N,B=T==="navigation"||x?R:L?`${y}px`:D,[X,Q]=l.useState(!1);l.useEffect(()=>{Q(!0)},[]);const oe=$&&F==="overlay",H=X&&oe,_=H?`fixed left-0 top-0 ${be("fixed")}`:"relative";return n.jsxs(n.Fragment,{children:[X&&oe&&M&&!x&&n.jsx(tn,{}),n.jsxs("aside",P(A({ref:k,id:"side-navbar-sidebar",className:j(_,"flex","h-full","overflow-visible",ou[v],H&&x?"-translate-x-full":"translate-x-0",t),style:A({position:H?"fixed":"relative",backgroundColor:"var(--color-surface-subtle)",borderRight:"1px solid var(--color-line-default)",width:B,minWidth:B,transitionProperty:h?"none":"width, min-width, transform",transitionDuration:`${I}ms`,transitionTimingFunction:C},r),role:"complementary","aria-label":s||"Sidebar navigation","aria-expanded":T!=="navigation"?!x:void 0,"data-mode":T,"data-collapsed":x},a),{children:[L&&T!=="navigation"&&!x&&n.jsx(en,{}),b&&T!=="navigation"&&n.jsx(rn,{position:g}),n.jsx("div",{className:"flex h-full w-full overflow-visible",children:e})]}))]})}const Or=l.createContext(null);function iu(){return l.useContext(Or)}function Vr(){const e=l.useContext(Or);if(!e)throw new Error("useNavbarRequired must be used within a SideNavbar.Navbar component");return e}function hr(o){var i=o,{icon:e,size:t="sm",variant:r="ghost",className:s=""}=i,a=W(i,["icon","size","variant","className"]);const{collapsed:c,toggle:u}=Vr(),d=()=>{if(e)return typeof e=="function"?e(c):e;const g=c?xt:Bt;return n.jsx(g,{className:p[t],style:{transition:"none",transform:"none",willChange:"auto"}})},f={xs:"w-6 h-6",sm:"w-8 h-8",md:"w-10 h-10"},p={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5"},b={default:`bg-surface-base border border-line-default ${ue("sm")} hover:bg-surface-hover`,ghost:"hover:bg-surface-active",outline:"border border-line-emphasis hover:bg-surface-hover"};return n.jsx(It,{content:c?"Expand sidebar":"Collapse sidebar",position:"right",children:n.jsx("button",P(A({type:"button",onClick:u,className:`
439
268
  flex
440
269
  items-center
441
270
  justify-center
442
- rounded-md
271
+ ${U("md")}
443
272
  text-fg-secondary
444
273
  hover:text-fg-primary
445
274
  focus:outline-none
@@ -447,245 +276,245 @@ React keys must be passed directly to JSX without using spread:
447
276
  focus:ring-line-focus
448
277
  focus:ring-offset-1
449
278
  ${f[t]}
450
- ${m[r]}
279
+ ${b[r]}
451
280
  [&:hover]:!transform-none
452
281
  ${s}
453
- `,style:{willChange:"auto",transform:"none",transition:"none"},"aria-label":u?"Expand sidebar":"Collapse sidebar","aria-expanded":!u},a),{children:c()}))})}const Vd={sm:{container:"w-8 h-8",icon:"w-4 h-4",badge:"min-w-3.5 h-3.5 text-2xs"},md:{container:"w-10 h-10",icon:"w-5 h-5",badge:"min-w-5 h-5 text-xs"},lg:{container:"w-12 h-12",icon:"w-6 h-6",badge:"min-w-5 h-5 text-xs"}},Wd={default:"bg-error",success:"bg-success",warning:"bg-warning",danger:"bg-error-dark"},Hd={tooltip:"",inline:`flex-row ${E("sm","gap")} w-full ${E("md","px")}`,below:`flex-col ${E("1.5","gap")}`};function fo(b){var w=b,{id:e,icon:t,label:r,labelMode:s,showLabel:a=!0,active:o=!1,showTooltip:i=!0,badge:u,badgeVariant:d="default",variant:c="default",size:f="md",href:p,target:m,onClick:h,disabled:x=!1,className:v=""}=w,y=O(w,["id","icon","label","labelMode","showLabel","active","showTooltip","badge","badgeVariant","variant","size","href","target","onClick","disabled","className"]);var K;const{activeItem:C,setActiveItem:g,labelMode:j}=zr(),N=(K=s!=null?s:j)!=null?K:"tooltip",L=o||e&&C===e,S=Vd[f],D=H=>{if(x){H.preventDefault();return}e&&g(e),h==null||h()},A=N!=="tooltip"&&a&&r&&n.jsx("span",{className:k("text-xs","flex-shrink-0","relative z-10",N==="below"&&"text-center",N==="inline"&&"truncate"),style:{willChange:"auto",transform:"none",zIndex:10},children:r}),M=k("relative","flex","items-center",N==="inline"?"justify-start":"justify-center",N==="below"&&"flex-col","rounded-lg","box-border","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-1","w-full","flex-shrink-0","min-w-0","[&>*]:!transition-none","[&>*]:!transform-none",N==="tooltip"?S.container:k(E("sm","px"),E("1.5","py")),N!=="tooltip"&&Hd[N],x?"opacity-50 cursor-not-allowed":"cursor-pointer",v),F={default:L?"bg-surface-brand-muted text-fg-brand-emphasis":x?"text-fg-disabled":"text-fg-secondary hover:bg-surface-active hover:text-fg-primary [&:hover]:!transform-none",ghost:L?"text-fg-brand-emphasis":x?"text-fg-disabled":"text-fg-secondary hover:text-fg-primary [&:hover]:!transform-none",subtle:L?"bg-surface-active text-fg-primary":x?"text-fg-disabled":"text-fg-tertiary hover:bg-surface-hover hover:text-fg-primary [&:hover]:!transform-none"},I=n.jsxs(n.Fragment,{children:[n.jsx("span",{className:k("flex-shrink-0",S.icon,"[&>svg]:transition-none","[&>svg]:!transform-none","[&>svg]:!will-change-auto","box-border","flex items-center justify-center",`relative ${ue("base")}`),style:{minWidth:S.icon==="w-4 h-4"?"1rem":S.icon==="w-5 h-5"?"1.25rem":"1.5rem",minHeight:S.icon==="w-4 h-4"?"1rem":S.icon==="w-5 h-5"?"1.25rem":"1.5rem",willChange:"auto",transform:"none",transition:"none",zIndex:N!=="tooltip"?0:"auto"},children:t}),A,u!=null&&n.jsx("span",{className:k("absolute","-top-1","-right-1","flex","items-center","justify-center","px-1","font-medium","text-fg-inverse","rounded-full",S.badge,Wd[d]),children:u})]}),R={willChange:"auto",transform:"none",transition:"none"},W=p?n.jsx("a",{href:p,target:m,rel:m==="_blank"?"noopener noreferrer":void 0,onClick:D,className:k(M,F[c]),style:R,"aria-label":r,"aria-current":L?"page":void 0,"aria-disabled":x,children:I}):n.jsx("button",z(T({type:"button",onClick:D,disabled:x,className:k(M,F[c]),style:R,"aria-label":r,"aria-current":L?"page":void 0},y),{children:I}));return N==="tooltip"&&i&&r&&!x?n.jsx(Bt,{content:r,position:"right",children:W}):W}function mo(s){var a=s,{orientation:e="horizontal",className:t=""}=a,r=O(a,["orientation","className"]);return e==="vertical"?n.jsx("div",T({className:k("w-px","h-6","bg-line-default","mx-auto",t),role:"separator","aria-orientation":"vertical"},r)):n.jsx("div",T({className:k("w-full","h-px","bg-line-default","my-2","flex-shrink-0",t),role:"separator","aria-orientation":"horizontal",style:{willChange:"auto",transform:"none"}},r))}function po(u){var d=u,{id:e,label:t,collapsible:r=!1,defaultCollapsed:s=!1,children:a,className:o}=d,i=O(d,["id","label","collapsible","defaultCollapsed","children","className"]);const[c,f]=l.useState(s);return n.jsxs("div",z(T({id:e,className:k("flex flex-col",o)},i),{children:[t&&n.jsx("div",{className:k(E("sm","px"),E("1.5","py"),"text-xs text-fg-tertiary uppercase tracking-wider",r&&"cursor-pointer hover:text-fg-secondary"),onClick:r?()=>f(!c):void 0,children:n.jsxs("div",{className:k("flex items-center",E("1.5","gap")),children:[" ",r&&n.jsx("span",{className:"shrink-0",children:c?n.jsx(bt,{className:"w-3 h-3",style:{transition:"none",transform:"none"}}):n.jsx(hs,{className:"w-3 h-3",style:{transition:"none",transform:"none"}})}),n.jsx("span",{children:t})]})}),!c&&n.jsxs("div",{className:"flex flex-col gap-2",children:[" ",a]})]}))}function yt(f){var p=f,{children:e,showMainToggle:t,mainTogglePosition:r,showToggle:s=!1,togglePosition:a="bottom",labelMode:o="tooltip",expandedWidth:i=200,className:u="",style:d}=p,c=O(p,["children","showMainToggle","mainTogglePosition","showToggle","togglePosition","labelMode","expandedWidth","className","style"]);const m=ct(),h=lt(),x=vt(),v=Ys(),y=l.useRef(null),[b,w]=l.useState(null),[C,g]=l.useState(!1),j=t!=null?t:v.showMainToggle;r!=null||v.mainTogglePosition;const N=o==="inline"&&!m.collapsed,L=N?typeof i=="number"?`${i}px`:i:h.navigationWidth,S=l.useMemo(()=>({collapsed:m.collapsed,toggle:m.toggle,navbarRef:y,activeItem:b,setActiveItem:w,isHovered:C,showInternalToggle:s,togglePosition:a,labelMode:o}),[m.collapsed,m.toggle,b,C,s,a,o]);return j&&x.mode,n.jsx(Pr.Provider,{value:S,children:n.jsxs("nav",z(T({ref:y,className:k("relative","flex-shrink-0","flex","flex-col","h-full",N?"items-stretch":"items-center",u),style:T({position:"relative",backgroundColor:"var(--color-surface-raised)",borderRight:"1px solid var(--color-line-default)",width:L,transitionProperty:"width",transitionDuration:`${h.animationDuration}ms`,transitionTimingFunction:h.animationEasing},d),onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),"aria-label":"Side navigation"},c),{children:[s&&a==="top"&&n.jsx("div",{className:"flex-shrink-0 p-2",style:{borderBottom:"1px solid var(--color-line-default)"},children:n.jsx(gr,{})}),n.jsx("div",{className:k("relative","flex-1","flex","flex-col","overflow-y-auto","overflow-x-hidden","p-2","gap-2","w-full","min-w-0",N?"items-stretch":"items-center","justify-start"),style:{zIndex:1},children:e}),s&&a==="bottom"&&n.jsx("div",{className:"flex-shrink-0 p-2",style:{borderTop:"1px solid var(--color-line-default)"},children:n.jsx(gr,{})})]}))})}yt.Toggle=gr;yt.Item=fo;yt.Separator=mo;yt.Group=po;yt.displayName="Navbar";const Or=l.createContext(null);function ho(){return l.useContext(Or)}function Yt(){const e=l.useContext(Or);if(!e)throw new Error("useSidebarRequired must be used within a SideNavbar.Sidebar component");return e}function bo(u){var d=u,{title:e,subtitle:t,showBorder:r=!0,children:s,className:a="",style:o}=d,i=O(d,["title","subtitle","showBorder","children","className","style"]);const{collapsed:c,registerHeader:f,unregisterHeader:p}=Yt();return l.useEffect(()=>(f(),()=>p()),[f,p]),c?null:n.jsx("div",z(T({className:`
282
+ `,style:{willChange:"auto",transform:"none",transition:"none"},"aria-label":c?"Expand sidebar":"Collapse sidebar","aria-expanded":!c},a),{children:d()}))})}const lu={sm:{container:"w-8 h-8",icon:"w-4 h-4",badge:"min-w-3.5 h-3.5 text-2xs"},md:{container:"w-10 h-10",icon:"w-5 h-5",badge:"min-w-5 h-5 text-xs"},lg:{container:"w-12 h-12",icon:"w-6 h-6",badge:"min-w-5 h-5 text-xs"}},cu={default:"bg-error",success:"bg-success",warning:"bg-warning",danger:"bg-error-dark"},du={tooltip:"",inline:`flex-row ${m("sm","gap")} w-full ${m("md","px")}`,below:`flex-col ${m("1.5","gap")}`};function wo(h){var k=h,{id:e,icon:t,label:r,labelMode:s,showLabel:a=!0,active:o=!1,showTooltip:i=!0,badge:c,badgeVariant:u="default",variant:d="default",size:f="md",href:p,target:b,onClick:g,disabled:x=!1,className:w=""}=k,y=W(k,["id","icon","label","labelMode","showLabel","active","showTooltip","badge","badgeVariant","variant","size","href","target","onClick","disabled","className"]);var B;const{activeItem:$,setActiveItem:v,labelMode:S}=Vr(),N=(B=s!=null?s:S)!=null?B:"tooltip",I=o||e&&$===e,C=lu[f],T=X=>{if(x){X.preventDefault();return}e&&v(e),g==null||g()},L=N!=="tooltip"&&a&&r&&n.jsx("span",{className:j("text-xs","flex-shrink-0","relative z-10",N==="below"&&"text-center",N==="inline"&&"truncate"),style:{willChange:"auto",transform:"none"},children:r}),F=j("relative","flex","items-center",N==="inline"?"justify-start":"justify-center",N==="below"&&"flex-col",U("lg"),"box-border","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-1","w-full","flex-shrink-0","min-w-0","[&>*]:!transition-none","[&>*]:!transform-none",N==="tooltip"?C.container:j(m("sm","px"),m("1.5","py")),N!=="tooltip"&&du[N],x?"opacity-50 cursor-not-allowed":"cursor-pointer",w),M={default:I?"bg-surface-brand-muted text-fg-brand-emphasis":x?"text-fg-disabled":"text-fg-secondary hover:bg-surface-active hover:text-fg-primary [&:hover]:!transform-none",ghost:I?"text-fg-brand-emphasis":x?"text-fg-disabled":"text-fg-secondary hover:text-fg-primary [&:hover]:!transform-none",subtle:I?"bg-surface-active text-fg-primary":x?"text-fg-disabled":"text-fg-tertiary hover:bg-surface-hover hover:text-fg-primary [&:hover]:!transform-none"},R=n.jsxs(n.Fragment,{children:[n.jsx("span",{className:j("flex-shrink-0",C.icon,"[&>svg]:transition-none","[&>svg]:!transform-none","[&>svg]:!will-change-auto","box-border","flex items-center justify-center",`relative ${be("base")}`),style:{minWidth:C.icon==="w-4 h-4"?"1rem":C.icon==="w-5 h-5"?"1.25rem":"1.5rem",minHeight:C.icon==="w-4 h-4"?"1rem":C.icon==="w-5 h-5"?"1.25rem":"1.5rem",willChange:"auto",transform:"none",transition:"none",zIndex:N!=="tooltip"?0:"auto"},children:t}),L,c!=null&&n.jsx("span",{className:j("absolute","-top-1","-right-1","flex","items-center","justify-center",m("xs","px"),"font-medium","text-fg-inverse",U("full"),C.badge,cu[u]),children:c})]}),D={willChange:"auto",transform:"none",transition:"none"},O=p?n.jsx("a",{href:p,target:b,rel:b==="_blank"?"noopener noreferrer":void 0,onClick:T,className:j(F,M[d]),style:D,"aria-label":r,"aria-current":I?"page":void 0,"aria-disabled":x,children:R}):n.jsx("button",P(A({type:"button",onClick:T,disabled:x,className:j(F,M[d]),style:D,"aria-label":r,"aria-current":I?"page":void 0},y),{children:R}));return N==="tooltip"&&i&&r&&!x?n.jsx(It,{content:r,position:"right",children:O}):O}function ko(s){var a=s,{orientation:e="horizontal",className:t=""}=a,r=W(a,["orientation","className"]);return e==="vertical"?n.jsx("div",A({className:j("w-px","h-6","bg-line-default","mx-auto",t),role:"separator","aria-orientation":"vertical"},r)):n.jsx("div",A({className:j("w-full","h-px","bg-line-default",m("sm","my"),"flex-shrink-0",t),role:"separator","aria-orientation":"horizontal",style:{willChange:"auto",transform:"none"}},r))}function jo(c){var u=c,{id:e,label:t,collapsible:r=!1,defaultCollapsed:s=!1,children:a,className:o}=u,i=W(u,["id","label","collapsible","defaultCollapsed","children","className"]);const[d,f]=l.useState(s);return n.jsxs("div",P(A({id:e,className:j("flex flex-col",o)},i),{children:[t&&n.jsx("div",{className:j(m("sm","px"),m("1.5","py"),"text-xs text-fg-tertiary uppercase tracking-wider",r&&"cursor-pointer hover:text-fg-secondary"),onClick:r?()=>f(!d):void 0,children:n.jsxs("div",{className:j("flex items-center",m("1.5","gap")),children:[" ",r&&n.jsx("span",{className:"shrink-0",children:d?n.jsx(xt,{className:"w-3 h-3",style:{transition:"none",transform:"none"}}):n.jsx(jr,{className:"w-3 h-3",style:{transition:"none",transform:"none"}})}),n.jsx("span",{children:t})]})}),!d&&n.jsx("div",{className:`flex flex-col ${m("sm","gap")}`,children:a})]}))}function ft(f){var p=f,{children:e,showMainToggle:t,mainTogglePosition:r,showToggle:s=!1,togglePosition:a="bottom",labelMode:o="tooltip",expandedWidth:i=200,className:c="",style:u}=p,d=W(p,["children","showMainToggle","mainTogglePosition","showToggle","togglePosition","labelMode","expandedWidth","className","style"]);const b=Xe(),g=qe(),x=l.useRef(null),[w,y]=l.useState(null),[h,k]=l.useState(!1),$=o==="inline"&&!b.collapsed,v=$?typeof i=="number"?`${i}px`:i:g.navigationWidth,S=l.useMemo(()=>({collapsed:b.collapsed,toggle:b.toggle,navbarRef:x,activeItem:w,setActiveItem:y,isHovered:h,showInternalToggle:s,togglePosition:a,labelMode:o}),[b.collapsed,b.toggle,w,h,s,a,o]);return n.jsx(Or.Provider,{value:S,children:n.jsxs("nav",P(A({ref:x,className:j("relative","flex-shrink-0","flex","flex-col","h-full",$?"items-stretch":"items-center",c),style:A({position:"relative",backgroundColor:"var(--color-surface-raised)",borderRight:"1px solid var(--color-line-default)",width:v,transitionProperty:"width",transitionDuration:`${g.animationDuration}ms`,transitionTimingFunction:g.animationEasing},u),onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),"aria-label":"Side navigation"},d),{children:[s&&a==="top"&&n.jsx("div",{className:`flex-shrink-0 ${m("sm","p")}`,style:{borderBottom:"1px solid var(--color-line-default)"},children:n.jsx(hr,{})}),n.jsx("div",{className:j("relative","flex-1","flex","flex-col","overflow-y-auto","overflow-x-hidden",m("sm","p"),m("sm","gap"),"w-full","min-w-0",$?"items-stretch":"items-center","justify-start"),style:{zIndex:1},children:e}),s&&a==="bottom"&&n.jsx("div",{className:`flex-shrink-0 ${m("sm","p")}`,style:{borderTop:"1px solid var(--color-line-default)"},children:n.jsx(hr,{})})]}))})}ft.Toggle=hr;ft.Item=wo;ft.Separator=ko;ft.Group=jo;ft.displayName="Navbar";ft.__SIDENAVBAR_KIND__="navbar";const Wr=l.createContext(null);function No(){return l.useContext(Wr)}function Yt(){const e=l.useContext(Wr);if(!e)throw new Error("useSidebarRequired must be used within a SideNavbar.Sidebar component");return e}function So(c){var u=c,{title:e,subtitle:t,showBorder:r=!0,children:s,className:a="",style:o}=u,i=W(u,["title","subtitle","showBorder","children","className","style"]);const{collapsed:d,registerHeader:f,unregisterHeader:p}=Yt();return l.useEffect(()=>(f(),()=>p()),[f,p]),d?null:n.jsx("div",P(A({className:`
454
283
  flex-shrink-0
455
- ${E("md","px")}
456
- ${E("sm","py")}
284
+ ${m("md","px")}
285
+ ${m("sm","py")}
457
286
  ${r?"border-b border-line-default":""}
458
287
  bg-surface-subtle
459
288
  ${a}
460
289
  `,style:o},i),{children:s||n.jsxs(n.Fragment,{children:[e&&n.jsx("h2",{className:`
461
- ${ce("h4")}
290
+ ${de("h4")}
462
291
  text-fg-primary
463
- m-0
292
+ ${m("none","m")}
464
293
  font-semibold
465
294
  `,children:e}),t&&n.jsx("p",{className:`
466
- ${ce("bodySmall")}
295
+ ${de("bodySmall")}
467
296
  text-fg-secondary
468
- m-0
469
- mt-1
470
- `,children:t})]})}))}function go(i){var u=i,{scrollable:e=!0,padding:t="md",children:r,className:s="",style:a}=u,o=O(u,["scrollable","padding","children","className","style"]);const{collapsed:d,setScrollPosition:c}=Yt();if(d)return null;const f=t!=="none"?E(t,"p"):"",p=e?"overflow-y-auto overflow-x-hidden":"overflow-hidden",m=e?{scrollbarWidth:Qe.content.scrollbar.width,scrollbarColor:`${Qe.content.scrollbar.color.thumb} ${Qe.content.scrollbar.color.track}`}:{},h=x=>{e&&c(x.currentTarget.scrollTop)};return n.jsx("div",z(T({className:`
297
+ ${m("none","m")}
298
+ ${m("xs","mt")}
299
+ `,children:t})]})}))}function $o(i){var c=i,{scrollable:e=!0,padding:t="md",children:r,className:s="",style:a}=c,o=W(c,["scrollable","padding","children","className","style"]);const{collapsed:u,setScrollPosition:d}=Yt();if(u)return null;const f=t!=="none"?m(t,"p"):"",p=e?"overflow-y-auto overflow-x-hidden":"overflow-hidden",b=e?{scrollbarWidth:tt.content.scrollbar.width,scrollbarColor:`${tt.content.scrollbar.color.thumb} ${tt.content.scrollbar.color.track}`}:{},g=x=>{e&&d(x.currentTarget.scrollTop)};return n.jsx("div",P(A({className:`
471
300
  flex-1
472
301
  min-h-0
473
302
  ${p}
474
303
  ${f}
475
304
  ${s}
476
- `,style:T(T({},m),a),onScroll:h,tabIndex:e?0:void 0},o),{children:r}))}function xo(i){var u=i,{padding:e="md",showBorder:t=!0,children:r,className:s="",style:a}=u,o=O(u,["padding","showBorder","children","className","style"]);const{collapsed:d,registerFooter:c,unregisterFooter:f}=Yt();if(l.useEffect(()=>(c(),()=>f()),[c,f]),d)return null;const p=e!=="none"?E(e,"p"):"";return n.jsx("div",z(T({className:`
305
+ `,style:A(A({},b),a),onScroll:g,tabIndex:e?0:void 0},o),{children:r}))}function Co(i){var c=i,{padding:e="md",showBorder:t=!0,children:r,className:s="",style:a}=c,o=W(c,["padding","showBorder","children","className","style"]);const{collapsed:u,registerFooter:d,unregisterFooter:f}=Yt();if(l.useEffect(()=>(d(),()=>f()),[d,f]),u)return null;const p=e!=="none"?m(e,"p"):"";return n.jsx("div",P(A({className:`
477
306
  flex-shrink-0
478
307
  ${p}
479
308
  ${t?"border-t border-line-default":""}
480
309
  bg-surface-subtle
481
310
  ${s}
482
- `,style:a},o),{children:r}))}function vo(c){var f=c,{id:e,title:t,icon:r,actions:s,collapsible:a=!0,defaultCollapsed:o=!1,children:i,className:u=""}=f,d=O(f,["id","title","icon","actions","collapsible","defaultCollapsed","children","className"]);var N;const{collapsed:p,activeGroup:m,setActiveGroup:h}=Yt(),{groupStates:x,toggleGroup:v,setGroupCollapsed:y}=ct(),{animationDuration:b}=lt(),w=l.useRef(!1);if(l.useEffect(()=>{!w.current&&x[e]===void 0&&(w.current=!0,y(e,o))},[e,o,x,y]),p)return null;const C=(N=x[e])!=null?N:o,g=m===e,j=()=>{h(e),a&&v(e)};return n.jsxs("div",z(T({className:`
311
+ `,style:a},o),{children:r}))}function Eo(d){var f=d,{id:e,title:t,icon:r,actions:s,collapsible:a=!0,defaultCollapsed:o=!1,children:i,className:c=""}=f,u=W(f,["id","title","icon","actions","collapsible","defaultCollapsed","children","className"]);var N;const{collapsed:p,activeGroup:b,setActiveGroup:g}=Yt(),{groupStates:x,toggleGroup:w,setGroupCollapsed:y}=Xe(),{animationDuration:h}=qe(),k=l.useRef(!1);if(l.useEffect(()=>{!k.current&&x[e]===void 0&&(k.current=!0,y(e,o))},[e,o,x,y]),p)return null;const $=(N=x[e])!=null?N:o,v=b===e,S=()=>{g(e),a&&w(e)};return n.jsxs("div",P(A({className:`
483
312
  border-b
484
313
  border-line-default
485
314
  last:border-b-0
486
- ${u}
487
- `},d),{children:[t&&n.jsxs("button",{type:"button",onClick:j,className:`
315
+ ${c}
316
+ `},u),{children:[t&&n.jsxs("button",{type:"button",onClick:S,className:`
488
317
  flex
489
318
  items-center
490
319
  justify-between
491
320
  w-full
492
- ${E("md","px")}
493
- ${E("2.5","py")}
321
+ ${m("md","px")}
322
+ ${m("2.5","py")}
494
323
  text-left
495
324
  transition-colors
496
325
  duration-150
497
- ${g?"bg-surface-active":"hover:bg-surface-active"}
326
+ ${v?"bg-surface-active":"hover:bg-surface-active"}
498
327
  ${a?"cursor-pointer":"cursor-default"}
499
- `,"aria-expanded":a?!C:void 0,"aria-controls":a?`sidebar-group-${e}`:void 0,children:[n.jsxs("div",{className:"flex items-center gap-2",children:[r&&n.jsx("span",{className:"w-4 h-4 text-fg-tertiary",children:r}),n.jsx("span",{className:"text-sm font-medium text-fg-secondary",children:t})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[s,a&&n.jsx(ChevronDown,{className:`
328
+ `,"aria-expanded":a?!$:void 0,"aria-controls":a?`sidebar-group-${e}`:void 0,children:[n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[r&&n.jsx("span",{className:"w-4 h-4 text-fg-tertiary",children:r}),n.jsx("span",{className:"text-sm font-medium text-fg-secondary",children:t})]}),n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[s,a&&n.jsx(jr,{className:`
500
329
  w-4
501
330
  h-4
502
331
  text-fg-tertiary
503
332
  transition-transform
504
- ${C?"-rotate-90":"rotate-0"}
505
- `,style:{transitionDuration:`${b}ms`},"aria-hidden":"true"})]})]}),a?n.jsx(xa,{open:!C,duration:b,children:n.jsx("div",{id:`sidebar-group-${e}`,className:"px-3 py-2",children:i})}):n.jsx("div",{className:"px-3 py-2",children:i})]}))}function yo({id:e,children:t}){const{activeSlot:r,registerSlot:s,unregisterSlot:a}=Ks();return l.useEffect(()=>(s(e,t),()=>a(e)),[e,t,s,a]),r!==e?null:n.jsx(n.Fragment,{children:t})}function wo({fallback:e=null}){const{activeSlot:t,slots:r}=Ks();return!t||!r.has(t)?n.jsx(n.Fragment,{children:e}):n.jsx(n.Fragment,{children:r.get(t)})}function dt(a){var o=a,{children:e,className:t="",style:r}=o,s=O(o,["children","className","style"]);const i=ct(),u=lt(),d=l.useRef(null),[c,f]=l.useState(0),[p,m]=l.useState(!1),[h,x]=l.useState(!1),[v,y]=l.useState(null),b=l.useCallback(()=>m(!0),[]),w=l.useCallback(()=>m(!1),[]),C=l.useCallback(()=>x(!0),[]),g=l.useCallback(()=>x(!1),[]),j=l.useMemo(()=>({collapsed:i.collapsed,currentWidth:i.currentWidth,isMobile:i.isMobile,sidebarRef:d,scrollPosition:c,setScrollPosition:f,hasHeader:p,hasFooter:h,registerHeader:b,unregisterHeader:w,registerFooter:C,unregisterFooter:g,activeGroup:v,setActiveGroup:y}),[i.collapsed,i.currentWidth,i.isMobile,c,p,h,b,w,C,g,v]),N=br(u.contentWidth),L=br(u.navigationWidth),S=N-L;return n.jsx(Or.Provider,{value:j,children:n.jsx("div",z(T({ref:d,className:k("flex","flex-col","h-full","bg-surface-subtle","border-r","border-line-default","overflow-hidden",t),style:T({width:i.collapsed?0:S,opacity:i.collapsed?0:1,visibility:i.collapsed?"hidden":"visible",transitionProperty:"width, opacity, visibility",transitionDuration:`${u.animationDuration}ms`,transitionTimingFunction:u.animationEasing},r),"aria-hidden":i.collapsed},s),{children:e}))})}dt.Header=bo;dt.Content=go;dt.Footer=xo;dt.Group=vo;dt.Slot=yo;dt.SlotContent=wo;function Ee(D){var A=D,{mode:e="full",variant:t="default",navigationWidth:r="56px",width:s="320px",animationDuration:a=300,resizable:o=!1,minWidth:i,maxWidth:u,snapPoints:d,responsive:c=!1,mobileBreakpoint:f=768,mobileVariant:p="collapse",overlayBackdrop:m=!0,storageKey:h,persistWidth:x=!1,defaultCollapsed:v=!1,collapsed:y,onCollapseChange:b,onWidthChange:w,onMobileChange:C,exclusiveGroups:g=!1,showToggle:j=!0,togglePosition:N="floating",children:L}=A,S=O(A,["mode","variant","navigationWidth","width","animationDuration","resizable","minWidth","maxWidth","snapPoints","responsive","mobileBreakpoint","mobileVariant","overlayBackdrop","storageKey","persistWidth","defaultCollapsed","collapsed","onCollapseChange","onWidthChange","onMobileChange","exclusiveGroups","showToggle","togglePosition","children"]);const M=l.useMemo(()=>({showMainToggle:j,mainTogglePosition:N}),[j,N]);return n.jsx(_r.Provider,{value:M,children:n.jsx(qs,{variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,mode:e,resizable:o,minWidth:i,maxWidth:u,snapPoints:d,responsive:c,mobileBreakpoint:f,mobileVariant:p,overlayBackdrop:m,storageKey:h,persistWidth:x,defaultCollapsed:v,collapsed:y,onCollapseChange:b,onWidthChange:w,onMobileChange:C,exclusiveGroups:g,children:n.jsx(uo,z(T({},S),{children:L}))})})}Ee.Navbar=yt;Ee.Sidebar=dt;Ee.Toggle=Qs;Ee.ResizeHandle=Xs;Ee.Backdrop=Js;Ee.Provider=qs;Ee.ThemeProvider=Hs;Ee.ConfigProvider=Us;Ee.StateProvider=Bs;Ee.SlotProvider=co;function Ud({defaultStates:e={},persist:t=!1,storageKey:r}={}){const s=()=>{if(t&&r&&typeof window!="undefined"){const c=localStorage.getItem(`${r}-groups`);if(c)try{const f=JSON.parse(c);return T(T({},e),f)}catch(f){}}return e},[a,o]=l.useState(s);l.useEffect(()=>{t&&r&&typeof window!="undefined"&&localStorage.setItem(`${r}-groups`,JSON.stringify(a))},[t,r,a]);const i=l.useCallback(c=>{o(f=>z(T({},f),{[c]:!f[c]}))},[]),u=l.useCallback((c,f)=>{o(p=>z(T({},p),{[c]:f}))},[]),d=l.useCallback(()=>{o(e)},[e]);return{groupStates:a,toggleGroup:i,setGroupCollapsed:u,resetGroups:d}}function Bd(){const{activeItem:e,setActiveItem:t}=zr(),r=Gs(),s=l.useCallback((a,o)=>{t(a),o&&(r!=null&&r.setActiveSlot)&&r.setActiveSlot(o)},[t,r]);return{activeItem:e,setActiveItem:t,navigate:s}}function qd(){var r,s,a,o;const e=Gs(),t=ho();return{activeSlot:(r=e==null?void 0:e.activeSlot)!=null?r:null,setActiveSlot:(s=e==null?void 0:e.setActiveSlot)!=null?s:(()=>{}),scrollPosition:(a=t==null?void 0:t.scrollPosition)!=null?a:0,setScrollPosition:(o=t==null?void 0:t.setScrollPosition)!=null?o:(()=>{})}}function Gd(){const e=useSideNavbarThemeRequired(),t=useSideNavbarConfigRequired(),r=useSideNavbarStateRequired();return{theme:e,config:t,state:r}}function ko({children:e,asChild:t=!1}){const{onOpenChange:r}=Ft();return t&&l.isValidElement(e)?l.cloneElement(e,{onClick:s=>{r(!0),e.props.onClick&&e.props.onClick(s)}}):n.jsx("button",{type:"button",onClick:()=>r(!0),"aria-haspopup":"dialog",children:e})}function Zs(i){var u=i,{children:e,size:t="md",closeOnOverlayClick:r=!0,closeOnEscape:s=!0,className:a=""}=u,o=O(u,["children","size","closeOnOverlayClick","closeOnEscape","className"]);const{isOpen:d,onClose:c,titleId:f,descriptionId:p}=Ft(),m=l.useRef(null),h=l.useRef(null);if(l.useEffect(()=>{if(!d)return;const b=setTimeout(()=>{var N;const g=(N=m.current)==null?void 0:N.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),j=g==null?void 0:g[0];j==null||j.focus()},0),w=g=>{s&&g.key==="Escape"&&c()},C=g=>{if(g.key!=="Tab"||!m.current)return;const j=Array.from(m.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(S=>!S.disabled&&S.offsetParent!==null);if(j.length===0){g.preventDefault();return}const N=j[0],L=j[j.length-1];g.shiftKey?document.activeElement===N&&(g.preventDefault(),L.focus()):document.activeElement===L&&(g.preventDefault(),N.focus())};return document.addEventListener("keydown",w),document.addEventListener("keydown",C),()=>{clearTimeout(b),document.removeEventListener("keydown",w),document.removeEventListener("keydown",C)}},[d,c,s]),!d)return null;const x={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-2xl",fullscreen:"max-w-full h-full m-0 rounded-none"},v=b=>{r&&b.target===h.current&&c()},y=n.jsxs("div",{className:`fixed inset-0 ${ue("modal")} overflow-y-auto`,onClick:v,children:[n.jsx("div",{ref:h,className:"fixed inset-0 bg-scrim transition-opacity","aria-hidden":"true"}),n.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:n.jsx("div",z(T({ref:m,role:"dialog","aria-modal":"true","aria-labelledby":f,"aria-describedby":p,className:`
506
- relative ${ue("modal")} w-full
333
+ ${$?"-rotate-90":"rotate-0"}
334
+ `,style:{transitionDuration:`${h}ms`},"aria-hidden":"true"})]})]}),a?n.jsx(ys,{open:!$,duration:h,children:n.jsx("div",{id:`sidebar-group-${e}`,className:`${m("md","px")} ${m("sm","py")}`,children:i})}):n.jsx("div",{className:`${m("md","px")} ${m("sm","py")}`,children:i})]}))}function Mo({id:e,children:t}){const{activeSlot:r,registerSlot:s,unregisterSlot:a}=Zs();return l.useEffect(()=>(s(e,t),()=>a(e)),[e,t,s,a]),r!==e?null:n.jsx(n.Fragment,{children:t})}function To({fallback:e=null}){const{activeSlot:t,slots:r}=Zs();return!t||!r.has(t)?n.jsx(n.Fragment,{children:e}):n.jsx(n.Fragment,{children:r.get(t)})}function mt(a){var o=a,{children:e,className:t="",style:r}=o,s=W(o,["children","className","style"]);const i=Xe(),c=qe(),u=l.useRef(null),[d,f]=l.useState(0),[p,b]=l.useState(!1),[g,x]=l.useState(!1),[w,y]=l.useState(null),h=l.useCallback(()=>b(!0),[]),k=l.useCallback(()=>b(!1),[]),$=l.useCallback(()=>x(!0),[]),v=l.useCallback(()=>x(!1),[]),S=l.useMemo(()=>({collapsed:i.collapsed,currentWidth:i.currentWidth,isMobile:i.isMobile,sidebarRef:u,scrollPosition:d,setScrollPosition:f,hasHeader:p,hasFooter:g,registerHeader:h,unregisterHeader:k,registerFooter:$,unregisterFooter:v,activeGroup:w,setActiveGroup:y}),[i.collapsed,i.currentWidth,i.isMobile,d,p,g,h,k,$,v,w]),N=br(c.contentWidth),I=br(c.navigationWidth),C=N-I;return n.jsx(Wr.Provider,{value:S,children:n.jsx("div",P(A({ref:u,className:j("flex","flex-col","h-full","bg-surface-subtle","border-r","border-line-default","overflow-hidden",t),style:A({width:i.collapsed?0:C,opacity:i.collapsed?0:1,visibility:i.collapsed?"hidden":"visible",transitionProperty:"width, opacity, visibility",transitionDuration:`${c.animationDuration}ms`,transitionTimingFunction:c.animationEasing},r),"aria-hidden":i.collapsed},s),{children:e}))})}mt.Header=So;mt.Content=$o;mt.Footer=Co;mt.Group=Eo;mt.Slot=Mo;mt.SlotContent=To;function Ee(T){var L=T,{mode:e="full",variant:t="default",navigationWidth:r="56px",width:s="320px",animationDuration:a=300,resizable:o=!1,minWidth:i,maxWidth:c,snapPoints:u,responsive:d=!1,mobileBreakpoint:f=768,mobileVariant:p="collapse",overlayBackdrop:b=!0,storageKey:g,persistWidth:x=!1,defaultCollapsed:w=!1,collapsed:y,onCollapseChange:h,onWidthChange:k,onMobileChange:$,exclusiveGroups:v=!1,showToggle:S=!0,togglePosition:N="floating",children:I}=L,C=W(L,["mode","variant","navigationWidth","width","animationDuration","resizable","minWidth","maxWidth","snapPoints","responsive","mobileBreakpoint","mobileVariant","overlayBackdrop","storageKey","persistWidth","defaultCollapsed","collapsed","onCollapseChange","onWidthChange","onMobileChange","exclusiveGroups","showToggle","togglePosition","children"]);const F=l.useMemo(()=>({showMainToggle:S,mainTogglePosition:N}),[S,N]);return n.jsx(zr.Provider,{value:F,children:n.jsx(Js,{variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,mode:e,resizable:o,minWidth:i,maxWidth:c,snapPoints:u,responsive:d,mobileBreakpoint:f,mobileVariant:p,overlayBackdrop:b,storageKey:g,persistWidth:x,defaultCollapsed:w,collapsed:y,onCollapseChange:h,onWidthChange:k,onMobileChange:$,exclusiveGroups:v,children:n.jsx(yo,P(A({},C),{children:I}))})})}Ee.Navbar=ft;Ee.Sidebar=mt;Ee.Toggle=rn;Ee.ResizeHandle=en;Ee.Backdrop=tn;Ee.Provider=Js;Ee.ThemeProvider=Ys;Ee.ConfigProvider=qs;Ee.StateProvider=Xs;Ee.SlotProvider=xo;function uu({defaultStates:e={},persist:t=!1,storageKey:r}={}){const s=()=>{if(t&&r&&typeof window!="undefined"){const d=localStorage.getItem(`${r}-groups`);if(d)try{const f=JSON.parse(d);return A(A({},e),f)}catch(f){}}return e},[a,o]=l.useState(s);l.useEffect(()=>{t&&r&&typeof window!="undefined"&&localStorage.setItem(`${r}-groups`,JSON.stringify(a))},[t,r,a]);const i=l.useCallback(d=>{o(f=>P(A({},f),{[d]:!f[d]}))},[]),c=l.useCallback((d,f)=>{o(p=>P(A({},p),{[d]:f}))},[]),u=l.useCallback(()=>{o(e)},[e]);return{groupStates:a,toggleGroup:i,setGroupCollapsed:c,resetGroups:u}}function fu(){const{activeItem:e,setActiveItem:t}=Vr(),r=Qs(),s=l.useCallback((a,o)=>{t(a),o&&(r!=null&&r.setActiveSlot)&&r.setActiveSlot(o)},[t,r]);return{activeItem:e,setActiveItem:t,navigate:s}}function mu(){var r,s,a,o;const e=Qs(),t=No();return{activeSlot:(r=e==null?void 0:e.activeSlot)!=null?r:null,setActiveSlot:(s=e==null?void 0:e.setActiveSlot)!=null?s:(()=>{}),scrollPosition:(a=t==null?void 0:t.scrollPosition)!=null?a:0,setScrollPosition:(o=t==null?void 0:t.setScrollPosition)!=null?o:(()=>{})}}function pu(){const e=qe(),t=kt(),r=Xe();return{theme:e,config:t,state:r}}function Ao({children:e,asChild:t=!1}){const{onOpenChange:r}=Lt();return t&&l.isValidElement(e)?l.cloneElement(e,{onClick:s=>{var a,o;r(!0),(o=(a=e.props).onClick)==null||o.call(a,s)}}):n.jsx("button",{type:"button",onClick:()=>r(!0),"aria-haspopup":"dialog",children:e})}function sn(i){var c=i,{children:e,size:t="md",closeOnOverlayClick:r=!0,closeOnEscape:s=!0,className:a=""}=c,o=W(c,["children","size","closeOnOverlayClick","closeOnEscape","className"]);const{isOpen:u,onClose:d,titleId:f,descriptionId:p}=Lt(),b=l.useRef(null),g=l.useRef(null);if(Rs(b,u),Is(b,u),l.useEffect(()=>{if(!u||!s)return;const h=k=>{k.key==="Escape"&&d()};return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h)}},[u,d,s]),!u)return null;const x={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-2xl",fullscreen:`max-w-full h-full ${m("none","m")} ${U("none")}`},w=h=>{r&&h.target===g.current&&d()},y=n.jsxs("div",{className:`fixed inset-0 ${be("modal")} overflow-y-auto`,onClick:w,children:[n.jsx("div",{ref:g,className:"fixed inset-0 bg-scrim transition-opacity","aria-hidden":"true"}),n.jsx("div",{className:`flex min-h-full items-center justify-center ${m("base","p")}`,children:n.jsx("div",P(A({ref:b,role:"dialog","aria-modal":"true","aria-labelledby":f,"aria-describedby":p,className:`
335
+ relative w-full
507
336
  ${x[t]}
508
337
  bg-surface-overlay
509
- ${J("lg")}
510
- ${$e("xl")}
338
+ ${U("lg")}
339
+ ${ue("xl")}
511
340
  ${a}
512
- `,tabIndex:-1},o),{children:e}))})]});return typeof window!="undefined"?qe.createPortal(y,document.body):y}function en(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);return n.jsx("div",z(T({className:`flex flex-col space-y-1.5 p-6 pb-4 ${t}`},r),{children:e}))}function jo(o){var i=o,{as:e="h2",children:t,className:r="",id:s}=i,a=O(i,["as","children","className","id"]);const u=Ft(),d=l.useId(),c=s||u.titleId||d;return n.jsx(e,z(T({id:c,className:`${ce("h3")} font-semibold leading-none tracking-tight ${r}`},a),{children:t}))}function No(a){var o=a,{children:e,className:t="",id:r}=o,s=O(o,["children","className","id"]);const i=Ft(),u=l.useId(),d=r||i.descriptionId||u;return n.jsx("p",z(T({id:d,className:`${ce("bodySmall")} text-fg-secondary ${t}`},s),{children:e}))}function tn(s){var a=s,{children:e,className:t=""}=a,r=O(a,["children","className"]);return n.jsx("div",z(T({className:`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 p-6 pt-4 ${t}`},r),{children:e}))}function So({"aria-label":e="Close dialog",className:t="",asChild:r=!1,children:s}){const{onClose:a}=Ft();return r&&l.isValidElement(s)?l.cloneElement(s,{onClick:o=>{a(),s.props.onClick&&s.props.onClick(o)}}):n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:a,className:`absolute right-4 top-4 ${t}`,"aria-label":e,children:n.jsx(Ne,{className:"h-4 w-4"})})}function Re({children:e,open:t,defaultOpen:r,onOpenChange:s}){const a=l.useId(),o=l.useId();return n.jsx(ps,{open:t,defaultOpen:r,onOpenChange:s,titleId:a,descriptionId:o,children:e})}Re.Trigger=ko;Re.Content=Zs;Re.Header=en;Re.Title=jo;Re.Description=No;Re.Footer=tn;Re.Close=So;function Kd({open:e,defaultOpen:t,onOpenChange:r,title:s,description:a,confirmLabel:o="Confirm",cancelLabel:i="Cancel",variant:u="default",onConfirm:d,onCancel:c,children:f}){const p=()=>{d==null||d(),r==null||r(!1)},m=()=>{c==null||c(),r==null||r(!1)};return n.jsx(Re,{open:e,defaultOpen:t,onOpenChange:r,children:n.jsx(Zs,{size:"sm",closeOnOverlayClick:!1,children:f||n.jsxs(n.Fragment,{children:[n.jsxs(en,{children:[n.jsx(Re.Title,{children:s}),a&&n.jsx(Re.Description,{children:a})]}),n.jsxs(tn,{children:[n.jsx(Z,{variant:"outline",onClick:m,children:i}),n.jsx(Z,{variant:u==="destructive"?"error":"primary",onClick:p,children:o})]})]})})})}const Yd={success:dr,error:bs,warning:mc,info:rc},Xd={success:"border-success",error:"border-error",warning:"border-warning",info:"border-info"},Jd={success:"text-fg-success",error:"text-fg-error",warning:"text-fg-warning",info:"text-fg-info"};function Co(i){var u=i,{toast:e,onDismiss:t,position:r="top-right",className:s="",style:a}=u,o=O(u,["toast","onDismiss","position","className","style"]);const[d,c]=l.useState(!1),[f,p]=l.useState(!1),m=Yd[e.variant];l.useEffect(()=>{if(e.duration===void 0)return;c(!0);const v=setTimeout(()=>{p(!0),setTimeout(()=>{t(e.id)},300)},e.duration);return()=>clearTimeout(v)},[e.duration,e.id,t]),l.useEffect(()=>{const v=setTimeout(()=>c(!0),10);return()=>clearTimeout(v)},[]);const h={"top-right":"top-4 right-4","top-left":"top-4 left-4","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-center":"top-4 left-1/2 -translate-x-1/2","bottom-center":"bottom-4 left-1/2 -translate-x-1/2"},x=()=>{p(!0),setTimeout(()=>{t(e.id)},300)};return n.jsx("div",z(T({className:`
513
- fixed ${h[r]} ${ue("toast")}
341
+ `,tabIndex:-1},o),{children:e}))})]});return typeof window!="undefined"?Ke.createPortal(y,document.body):y}function nn(s){var a=s,{children:e,className:t=""}=a,r=W(a,["children","className"]);return n.jsx("div",P(A({className:`flex flex-col ${m("1.5","space-y")} ${m("lg","p")} ${m("base","pb")} ${t}`},r),{children:e}))}function Ro(o){var i=o,{as:e="h2",children:t,className:r="",id:s}=i,a=W(i,["as","children","className","id"]);const c=Lt(),u=l.useId(),d=s||c.titleId||u;return n.jsx(e,P(A({id:d,className:`${de("h3")} font-semibold leading-none tracking-tight ${r}`},a),{children:t}))}function Io(a){var o=a,{children:e,className:t="",id:r}=o,s=W(o,["children","className","id"]);const i=Lt(),c=l.useId(),u=r||i.descriptionId||c;return n.jsx("p",P(A({id:u,className:`${de("bodySmall")} text-fg-secondary ${t}`},s),{children:e}))}function an(s){var a=s,{children:e,className:t=""}=a,r=W(a,["children","className"]);return n.jsx("div",P(A({className:`flex flex-col-reverse sm:flex-row sm:justify-end sm:${m("sm","space-x")} ${m("lg","p")} ${m("base","pt")} ${t}`},r),{children:e}))}function Do({"aria-label":e="Close dialog",className:t="",asChild:r=!1,children:s}){const{onClose:a}=Lt();return r&&l.isValidElement(s)?l.cloneElement(s,{onClick:o=>{var i,c;a(),(c=(i=s.props).onClick)==null||c.call(i,o)}}):n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:a,className:`absolute right-4 top-4 ${t}`,"aria-label":e,children:n.jsx(Se,{className:"h-4 w-4"})})}function Re({children:e,open:t,defaultOpen:r,onOpenChange:s}){const a=l.useId(),o=l.useId();return n.jsx(gs,{open:t,defaultOpen:r,onOpenChange:s,titleId:a,descriptionId:o,children:e})}Re.Trigger=Ao;Re.Content=sn;Re.Header=nn;Re.Title=Ro;Re.Description=Io;Re.Footer=an;Re.Close=Do;function bu({open:e,defaultOpen:t,onOpenChange:r,title:s,description:a,confirmLabel:o="Confirm",cancelLabel:i="Cancel",variant:c="default",onConfirm:u,onCancel:d,children:f}){const p=()=>{u==null||u(),r==null||r(!1)},b=()=>{d==null||d(),r==null||r(!1)};return n.jsx(Re,{open:e,defaultOpen:t,onOpenChange:r,children:n.jsx(sn,{size:"sm",closeOnOverlayClick:!1,children:f||n.jsxs(n.Fragment,{children:[n.jsxs(nn,{children:[n.jsx(Re.Title,{children:s}),a&&n.jsx(Re.Description,{children:a})]}),n.jsxs(an,{children:[n.jsx(Z,{variant:"outline",onClick:b,children:i}),n.jsx(Z,{variant:c==="destructive"?"error":"primary",onClick:p,children:o})]})]})})})}const hu={success:cr,error:xs,warning:Sc,info:pc},gu={success:"border-success",error:"border-error",warning:"border-warning",info:"border-info"},xu={success:"text-fg-success",error:"text-fg-error",warning:"text-fg-warning",info:"text-fg-info"};function Fo(i){var c=i,{toast:e,onDismiss:t,position:r="top-right",className:s="",style:a}=c,o=W(c,["toast","onDismiss","position","className","style"]);const[u,d]=l.useState(!1),[f,p]=l.useState(!1),b=hu[e.variant];l.useEffect(()=>{if(e.duration===void 0)return;d(!0);const w=setTimeout(()=>{p(!0),setTimeout(()=>{t(e.id)},300)},e.duration);return()=>clearTimeout(w)},[e.duration,e.id,t]),l.useEffect(()=>{const w=setTimeout(()=>d(!0),10);return()=>clearTimeout(w)},[]);const g={"top-right":"top-4 right-4","top-left":"top-4 left-4","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-center":"top-4 left-1/2 -translate-x-1/2","bottom-center":"bottom-4 left-1/2 -translate-x-1/2"},x=()=>{p(!0),setTimeout(()=>{t(e.id)},300)};return n.jsx("div",P(A({className:`
342
+ fixed ${g[r]} ${be("toast")}
514
343
  w-full max-w-sm
515
344
  transition-all duration-300 ease-in-out
516
- ${d&&!f?"opacity-100 translate-y-0":"opacity-0 -translate-y-2"}
345
+ ${u&&!f?"opacity-100 translate-y-0":"opacity-0 -translate-y-2"}
517
346
  ${f?"opacity-0 translate-y-2":""}
518
347
  ${s}
519
348
  `,style:a,role:"alert","aria-live":e.variant==="error"?"assertive":"polite","aria-atomic":"true"},o),{children:n.jsxs("div",{className:`
520
- flex items-start gap-3
521
- p-4
349
+ flex items-start ${m("md","gap")}
350
+ ${m("base","p")}
522
351
  bg-surface-overlay
523
- ${J("lg")}
524
- ${$e("lg")}
352
+ ${U("lg")}
353
+ ${ue("lg")}
525
354
  border
526
- ${Xd[e.variant]}
527
- `,children:[n.jsx("div",{className:`flex-shrink-0 ${Jd[e.variant]}`,children:n.jsx(m,{className:"h-5 w-5","aria-hidden":"true"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"font-medium text-fg-primary",children:e.title}),e.description&&n.jsx("div",{className:"mt-1 text-sm text-fg-secondary",children:e.description}),e.action&&n.jsx("div",{className:"mt-3",children:n.jsx(Z,{variant:"outline",size:"sm",onClick:()=>{var v;(v=e.action)==null||v.onClick(),x()},children:e.action.label})})]}),n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:x,className:"flex-shrink-0","aria-label":"Dismiss notification",children:n.jsx(Ne,{className:"h-4 w-4"})})]})}))}function Qd({position:e="top-right",maxToasts:t}){const{toasts:r,removeToast:s}=ms(),a=t?r.slice(0,t):r;if(a.length===0)return null;const o=n.jsx("div",{className:`fixed inset-0 pointer-events-none ${ue("toast")}`,"aria-live":"polite","aria-label":"Notifications",children:a.map((i,u)=>{const d=e.includes("top"),c=1+u*5;return n.jsx(Co,{toast:i,onDismiss:s,position:e,style:{[d?"top":"bottom"]:`${c}rem`}},i.id)})});return typeof window!="undefined"?qe.createPortal(o,document.body):o}function Zd(){const{addToast:e,removeToast:t,clearAll:r}=ms(),s=l.useCallback(c=>e({title:c.title,description:c.description,variant:c.variant||"info",duration:c.duration,action:c.action}),[e]),a=l.useCallback((c,f,p)=>s(T({title:c,description:f,variant:"success"},p)),[s]),o=l.useCallback((c,f,p)=>s(T({title:c,description:f,variant:"error"},p)),[s]),i=l.useCallback((c,f,p)=>s(T({title:c,description:f,variant:"warning"},p)),[s]),u=l.useCallback((c,f,p)=>s(T({title:c,description:f,variant:"info"},p)),[s]),d=l.useCallback((c,f,p,m="info",h)=>s({title:c,description:f,variant:m,duration:h,action:{label:"Undo",onClick:p}}),[s]);return{show:s,success:a,error:o,warning:i,info:u,withUndo:d,dismiss:t,clearAll:r}}function $o({steps:e,currentStep:t,defaultCurrentStep:r=0,onStepChange:s,onComplete:a,allowNavigation:o=!0,showStepNumbers:i=!0,orientation:u="horizontal",className:d=""}){const[c,f]=l.useState(r),p=t!==void 0,m=p?t:c,h=g=>g<m?"completed":g===m?"active":"pending",x=()=>{if(m<e.length-1){const g=m+1;p||f(g),s==null||s(g)}else a==null||a()},v=()=>{if(m>0){const g=m-1;p||f(g),s==null||s(g)}},y=g=>{o&&(e[g].disabled||(p||f(g),s==null||s(g)))},b=e[m],w=m===0,C=m===e.length-1;return u==="vertical"?n.jsxs("div",{className:`flex gap-4 ${d}`,children:[n.jsx("div",{className:"flex flex-col",children:e.map((g,j)=>{const N=g.status||h(j),L=j===m;return n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("button",z(T({type:"button",onClick:()=>y(j),disabled:!o||g.disabled,"aria-label":g.title?`Step ${j+1}: ${g.title}`:`Step ${j+1}`},N==="pending"?{"data-marker":"pending"}:{}),{className:`
355
+ ${gu[e.variant]}
356
+ `,children:[n.jsx("div",{className:`flex-shrink-0 ${xu[e.variant]}`,children:n.jsx(b,{className:"h-5 w-5","aria-hidden":"true"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"font-medium text-fg-primary",children:e.title}),e.description&&n.jsx("div",{className:`${m("xs","mt")} text-sm text-fg-secondary`,children:e.description}),e.action&&n.jsx("div",{className:m("md","mt"),children:n.jsx(Z,{variant:"outline",size:"sm",onClick:()=>{var w;(w=e.action)==null||w.onClick(),x()},children:e.action.label})})]}),n.jsx(Z,{variant:"iconOnly",size:"sm",onClick:x,className:"flex-shrink-0","aria-label":"Dismiss notification",children:n.jsx(Se,{className:"h-4 w-4"})})]})}))}function vu({position:e="top-right",maxToasts:t}){const{toasts:r,removeToast:s}=hs(),a=t?r.slice(0,t):r;if(a.length===0)return null;const o=n.jsx("div",{className:`fixed inset-0 pointer-events-none ${be("toast")}`,"aria-live":"polite","aria-label":"Notifications",children:a.map((i,c)=>{const u=e.includes("top"),d=1+c*5;return n.jsx(Fo,{toast:i,onDismiss:s,position:e,style:{[u?"top":"bottom"]:`${d}rem`}},i.id)})});return typeof window!="undefined"?Ke.createPortal(o,document.body):o}function yu(){const{addToast:e,removeToast:t,clearAll:r}=hs(),s=l.useCallback(d=>e({title:d.title,description:d.description,variant:d.variant||"info",duration:d.duration,action:d.action}),[e]),a=l.useCallback((d,f,p)=>s(A({title:d,description:f,variant:"success"},p)),[s]),o=l.useCallback((d,f,p)=>s(A({title:d,description:f,variant:"error"},p)),[s]),i=l.useCallback((d,f,p)=>s(A({title:d,description:f,variant:"warning"},p)),[s]),c=l.useCallback((d,f,p)=>s(A({title:d,description:f,variant:"info"},p)),[s]),u=l.useCallback((d,f,p,b="info",g)=>s({title:d,description:f,variant:b,duration:g,action:{label:"Undo",onClick:p}}),[s]);return{show:s,success:a,error:o,warning:i,info:c,withUndo:u,dismiss:t,clearAll:r}}function Lo({steps:e,currentStep:t,defaultCurrentStep:r=0,onStepChange:s,onComplete:a,allowNavigation:o=!0,showStepNumbers:i=!0,orientation:c="horizontal",className:u=""}){const[d,f]=l.useState(r),p=t!==void 0,b=p?t:d,g=v=>v<b?"completed":v===b?"active":"pending",x=()=>{if(b<e.length-1){const v=b+1;p||f(v),s==null||s(v)}else a==null||a()},w=()=>{if(b>0){const v=b-1;p||f(v),s==null||s(v)}},y=v=>{o&&(e[v].disabled||(p||f(v),s==null||s(v)))},h=e[b],k=b===0,$=b===e.length-1;return c==="vertical"?n.jsxs("div",{className:`flex ${m("base","gap")} ${u}`,children:[n.jsx("div",{className:"flex flex-col",children:e.map((v,S)=>{const N=v.status||g(S),I=S===b;return n.jsxs("div",{className:`flex items-start ${m("md","gap")}`,children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("button",P(A({type:"button",onClick:()=>y(S),disabled:!o||v.disabled,"aria-label":v.title?`Step ${S+1}: ${v.title}`:`Step ${S+1}`},N==="pending"?{"data-marker":"pending"}:{}),{className:`
528
357
  flex
529
358
  items-center
530
359
  justify-center
531
360
  w-10
532
361
  h-10
533
- ${J("full")}
362
+ ${U("full")}
534
363
  border-2
535
- ${be("base")}
364
+ ${xe("base")}
536
365
  ${N==="completed"?"bg-success border-success text-fg-inverse":N==="active"?"bg-surface-brand-strong border-line-brand text-fg-inverse":N==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
537
- ${!o||g.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
538
- `,children:N==="completed"?n.jsx(ns,{className:"h-5 w-5"}):i?j+1:null})),j<e.length-1&&n.jsx("div",{className:`
366
+ ${!o||v.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
367
+ `,children:N==="completed"?n.jsx(os,{className:"h-5 w-5"}):i?S+1:null})),S<e.length-1&&n.jsx("div",{className:`
539
368
  w-0.5
540
369
  h-12
541
- mt-2
370
+ ${m("sm","mt")}
542
371
  ${N==="completed"?"bg-success":"bg-line-emphasis"}
543
- `})]}),n.jsxs("div",{className:"flex-1 pb-8",children:[n.jsx("button",{type:"button",onClick:()=>y(j),disabled:!o||g.disabled,className:`
372
+ `})]}),n.jsxs("div",{className:`flex-1 ${m("xl","pb")}`,children:[n.jsx("button",{type:"button",onClick:()=>y(S),disabled:!o||v.disabled,className:`
544
373
  text-left
545
- ${L?"font-semibold":"font-medium"}
374
+ ${I?"font-semibold":"font-medium"}
546
375
  ${N==="active"?"text-fg-brand-emphasis":"text-fg-secondary"}
547
- ${!o||g.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
548
- `,children:g.title}),g.description&&n.jsx("p",{className:"text-sm text-fg-tertiary mt-1",children:g.description})]})]},g.id)})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("div",{className:`
549
- ${E("lg","p")}
376
+ ${!o||v.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
377
+ `,children:v.title}),v.description&&n.jsx("p",{className:`text-sm text-fg-tertiary ${m("xs","mt")}`,children:v.description})]})]},v.id)})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("div",{className:`
378
+ ${m("lg","p")}
550
379
  border
551
380
  border-line-default
552
- ${J("lg")}
381
+ ${U("lg")}
553
382
  bg-surface-base
554
- `,children:b.content}),n.jsxs("div",{className:`flex justify-between mt-4 ${E("base","gap")}`,children:[n.jsx(Z,{variant:"outline",onClick:v,disabled:w,children:"Previous"}),n.jsx(Z,{variant:"primary",onClick:x,children:C?"Complete":"Next"})]})]})]}):n.jsxs("div",{className:`space-y-6 ${d}`,children:[n.jsx("div",{className:"flex items-center",children:e.map((g,j)=>{const N=g.status||h(j),L=j===m;return n.jsxs("div",{className:"flex items-center flex-1",children:[n.jsxs("div",{className:"flex flex-col items-center flex-1",children:[n.jsx("button",z(T({type:"button",onClick:()=>y(j),disabled:!o||g.disabled,"aria-label":g.title?`Step ${j+1}: ${g.title}`:`Step ${j+1}`},N==="pending"?{"data-marker":"pending"}:{}),{className:`
383
+ `,children:h.content}),n.jsxs("div",{className:`flex justify-between ${m("base","mt")} ${m("base","gap")}`,children:[n.jsx(Z,{variant:"outline",onClick:w,disabled:k,children:"Previous"}),n.jsx(Z,{variant:"primary",onClick:x,children:$?"Complete":"Next"})]})]})]}):n.jsxs("div",{className:`${m("lg","space-y")} ${u}`,children:[n.jsx("div",{className:"flex items-center",children:e.map((v,S)=>{const N=v.status||g(S),I=S===b;return n.jsxs("div",{className:"flex items-center flex-1",children:[n.jsxs("div",{className:"flex flex-col items-center flex-1",children:[n.jsx("button",P(A({type:"button",onClick:()=>y(S),disabled:!o||v.disabled,"aria-label":v.title?`Step ${S+1}: ${v.title}`:`Step ${S+1}`},N==="pending"?{"data-marker":"pending"}:{}),{className:`
555
384
  flex
556
385
  items-center
557
386
  justify-center
558
387
  w-10
559
388
  h-10
560
- ${J("full")}
389
+ ${U("full")}
561
390
  border-2
562
- ${be("base")}
391
+ ${xe("base")}
563
392
  ${N==="completed"?"bg-success border-success text-fg-inverse":N==="active"?"bg-surface-brand-strong border-line-brand text-fg-inverse":N==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
564
- ${!o||g.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
565
- `,children:N==="completed"?n.jsx(ns,{className:"h-5 w-5"}):i?j+1:null})),n.jsxs("div",{className:`mt-2 text-center ${E("sm","px")}`,children:[n.jsx("p",{className:`
393
+ ${!o||v.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
394
+ `,children:N==="completed"?n.jsx(os,{className:"h-5 w-5"}):i?S+1:null})),n.jsxs("div",{className:`${m("sm","mt")} text-center ${m("sm","px")}`,children:[n.jsx("p",{className:`
566
395
  text-sm
567
396
  font-medium
568
- ${L?"text-fg-brand-emphasis":"text-fg-secondary"}
569
- `,children:g.title}),g.description&&n.jsx("p",{className:"text-xs text-fg-tertiary mt-1",children:g.description})]})]}),j<e.length-1&&n.jsx("div",{className:`flex-1 mx-2 ${E("base","mx")}`,children:n.jsx(ys,{className:`
397
+ ${I?"text-fg-brand-emphasis":"text-fg-secondary"}
398
+ `,children:v.title}),v.description&&n.jsx("p",{className:`text-xs text-fg-tertiary ${m("xs","mt")}`,children:v.description})]})]}),S<e.length-1&&n.jsx("div",{className:`flex-1 ${m("base","mx")}`,children:n.jsx(ks,{className:`
570
399
  ${N==="completed"?"border-success":"border-line-emphasis"}
571
- `})})]},g.id)})}),n.jsx("div",{className:`
572
- ${E("lg","p")}
400
+ `})})]},v.id)})}),n.jsx("div",{className:`
401
+ ${m("lg","p")}
573
402
  border
574
403
  border-line-default
575
- ${J("lg")}
404
+ ${U("lg")}
576
405
  bg-surface-base
577
- `,children:b.content}),n.jsxs("div",{className:`flex justify-between ${E("base","gap")}`,children:[n.jsx(Z,{variant:"outline",onClick:v,disabled:w,children:"Previous"}),n.jsx(Z,{variant:"primary",onClick:x,children:C?"Complete":"Next"})]})]})}function eu({items:e,orientation:t="vertical",className:r=""}){return t==="horizontal"?n.jsx("div",{className:`flex items-start ${r}`,children:e.map((s,a)=>{const o=s.status||(a===0?"active":a<e.findIndex(u=>u.status==="active")?"completed":"default"),i=a===e.length-1;return n.jsx("div",{className:"flex items-start flex-1",children:n.jsxs("div",{className:"flex flex-col items-center flex-1",children:[n.jsx("div",z(T({},o==="default"?{"data-marker":"pending"}:{}),{className:`
406
+ `,children:h.content}),n.jsxs("div",{className:`flex justify-between ${m("base","gap")}`,children:[n.jsx(Z,{variant:"outline",onClick:w,disabled:k,children:"Previous"}),n.jsx(Z,{variant:"primary",onClick:x,children:$?"Complete":"Next"})]})]})}function wu({items:e,orientation:t="vertical",className:r=""}){return t==="horizontal"?n.jsx("div",{className:`flex items-start ${r}`,children:e.map((s,a)=>{const o=s.status||(a===0?"active":a<e.findIndex(c=>c.status==="active")?"completed":"default"),i=a===e.length-1;return n.jsx("div",{className:"flex items-start flex-1",children:n.jsxs("div",{className:"flex flex-col items-center flex-1",children:[n.jsx("div",P(A({},o==="default"?{"data-marker":"pending"}:{}),{className:`
578
407
  flex
579
408
  items-center
580
409
  justify-center
581
410
  w-10
582
411
  h-10
583
- ${J("full")}
412
+ ${U("full")}
584
413
  border-2
585
414
  ${o==="completed"?"bg-success border-success text-fg-inverse":o==="active"?"bg-surface-brand-strong border-line-brand text-fg-inverse":o==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
586
- `,children:s.icon||(o==="completed"?n.jsx(dr,{className:"h-4 w-4"}):a+1)})),!i&&n.jsx("div",{className:`
415
+ `,children:s.icon||(o==="completed"?n.jsx(cr,{className:"h-4 w-4"}):a+1)})),!i&&n.jsx("div",{className:`
587
416
  w-full
588
417
  h-0.5
589
- mt-2
418
+ ${m("sm","mt")}
590
419
  ${o==="completed"?"bg-success":"bg-line-emphasis"}
591
- `}),n.jsxs("div",{className:`mt-4 text-center ${E("base","px")}`,children:[s.timestamp&&n.jsx("p",{className:"text-xs text-fg-tertiary mb-1",children:s.timestamp}),n.jsx("h3",{className:"text-sm font-semibold text-fg-primary",children:s.title}),s.description&&n.jsx("p",{className:"text-xs text-fg-secondary mt-1",children:s.description}),s.content&&n.jsx("div",{className:"mt-2",children:s.content})]})]})},s.id)})}):n.jsx("div",{className:`space-y-0 ${r}`,children:e.map((s,a)=>{const o=s.status||(a===0?"active":a<e.findIndex(u=>u.status==="active")?"completed":"default"),i=a===e.length-1;return n.jsxs("div",{className:"flex items-start gap-4",children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("div",z(T({},o==="default"?{"data-marker":"pending"}:{}),{className:`
420
+ `}),n.jsxs("div",{className:`${m("base","mt")} text-center ${m("base","px")}`,children:[s.timestamp&&n.jsx("p",{className:`text-xs text-fg-tertiary ${m("xs","mb")}`,children:s.timestamp}),n.jsx("h3",{className:"text-sm font-semibold text-fg-primary",children:s.title}),s.description&&n.jsx("p",{className:`text-xs text-fg-secondary ${m("xs","mt")}`,children:s.description}),s.content&&n.jsx("div",{className:m("sm","mt"),children:s.content})]})]})},s.id)})}):n.jsx("div",{className:`${m("none","space-y")} ${r}`,children:e.map((s,a)=>{const o=s.status||(a===0?"active":a<e.findIndex(c=>c.status==="active")?"completed":"default"),i=a===e.length-1;return n.jsxs("div",{className:`flex items-start ${m("base","gap")}`,children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("div",P(A({},o==="default"?{"data-marker":"pending"}:{}),{className:`
592
421
  flex
593
422
  items-center
594
423
  justify-center
595
424
  w-10
596
425
  h-10
597
- ${J("full")}
426
+ ${U("full")}
598
427
  border-2
599
428
  ${o==="completed"?"bg-success border-success text-fg-inverse":o==="active"?"bg-surface-brand-strong border-line-brand text-fg-inverse":o==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
600
- `,children:s.icon||(o==="completed"?n.jsx(dr,{className:"h-4 w-4"}):a+1)})),!i&&n.jsx("div",{className:`
429
+ `,children:s.icon||(o==="completed"?n.jsx(cr,{className:"h-4 w-4"}):a+1)})),!i&&n.jsx("div",{className:`
601
430
  w-0.5
602
431
  flex-1
603
432
  min-h-16
604
- mt-2
433
+ ${m("sm","mt")}
605
434
  ${o==="completed"?"bg-success":"bg-line-emphasis"}
606
- `})]}),n.jsxs("div",{className:"flex-1 pb-8",children:[s.timestamp&&n.jsx("p",{className:"text-xs text-fg-tertiary mb-1",children:s.timestamp}),n.jsx("h3",{className:`
435
+ `})]}),n.jsxs("div",{className:`flex-1 ${m("xl","pb")}`,children:[s.timestamp&&n.jsx("p",{className:`text-xs text-fg-tertiary ${m("xs","mb")}`,children:s.timestamp}),n.jsx("h3",{className:`
607
436
  text-base
608
437
  font-semibold
609
438
  ${o==="active"?"text-fg-brand-emphasis":"text-fg-primary"}
610
- `,children:s.title}),s.description&&n.jsx("p",{className:"text-sm text-fg-secondary mt-1",children:s.description}),s.content&&n.jsx("div",{className:"mt-3",children:s.content})]})]},s.id)})})}function tu({items:e,open:t,defaultOpen:r=!1,onOpenChange:s,trigger:a,placeholder:o="Type a command or search...",emptyMessage:i="No commands found",className:u=""}){const[d,c]=l.useState(r),[f,p]=l.useState(""),[m,h]=l.useState(0),x=l.useRef(null),v=l.useRef(null),y=t!==void 0,b=y?t:d,w=e.filter(S=>{var I,R;if(!f)return!0;const D=f.toLowerCase(),A=S.label.toLowerCase().includes(D),M=(I=S.description)==null?void 0:I.toLowerCase().includes(D),F=(R=S.keywords)==null?void 0:R.some(W=>W.toLowerCase().includes(D));return A||M||F}),C=w.reduce((S,D)=>{const A=D.group||"Other";return S[A]||(S[A]=[]),S[A].push(D),S},{}),g=l.useCallback(S=>{y||c(S),s==null||s(S),S&&(p(""),h(0),setTimeout(()=>{var D;return(D=x.current)==null?void 0:D.focus()},0))},[y,s]),j=S=>{S.action(),g(!1)},N=S=>{if(S.key==="Escape"){g(!1);return}if(S.key==="ArrowDown"){S.preventDefault(),h(D=>Math.min(D+1,w.length-1));return}if(S.key==="ArrowUp"){S.preventDefault(),h(D=>Math.max(D-1,0));return}if(S.key==="Enter"){S.preventDefault(),w[m]&&j(w[m]);return}};l.useEffect(()=>{if(v.current&&m>=0){const S=v.current.querySelector(`[data-index="${m}"]`);S&&typeof S.scrollIntoView=="function"&&S.scrollIntoView({block:"nearest",behavior:"smooth"})}},[m]),l.useEffect(()=>{h(0)},[f]),l.useEffect(()=>{const S=D=>{(D.metaKey||D.ctrlKey)&&D.key==="k"&&(D.preventDefault(),g(!b))};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[b,g]);const L=b?n.jsx("div",{className:`
439
+ `,children:s.title}),s.description&&n.jsx("p",{className:`text-sm text-fg-secondary ${m("xs","mt")}`,children:s.description}),s.content&&n.jsx("div",{className:m("md","mt"),children:s.content})]})]},s.id)})})}function ku({items:e,open:t,defaultOpen:r=!1,onOpenChange:s,trigger:a,placeholder:o="Type a command or search...",emptyMessage:i="No commands found",className:c=""}){const[u,d]=l.useState(r),[f,p]=l.useState(""),[b,g]=l.useState(0),x=l.useRef(null),w=l.useRef(null),y=t!==void 0,h=y?t:u,k=e.filter(C=>{var R,D;if(!f)return!0;const T=f.toLowerCase(),L=C.label.toLowerCase().includes(T),F=(R=C.description)==null?void 0:R.toLowerCase().includes(T),M=(D=C.keywords)==null?void 0:D.some(O=>O.toLowerCase().includes(T));return L||F||M}),$=k.reduce((C,T)=>{const L=T.group||"Other";return C[L]||(C[L]=[]),C[L].push(T),C},{}),v=l.useCallback(C=>{y||d(C),s==null||s(C),C&&(p(""),g(0),setTimeout(()=>{var T;return(T=x.current)==null?void 0:T.focus()},0))},[y,s]),S=C=>{C.action(),v(!1)},N=C=>{if(C.key==="Escape"){v(!1);return}if(C.key==="ArrowDown"){C.preventDefault(),g(T=>Math.min(T+1,k.length-1));return}if(C.key==="ArrowUp"){C.preventDefault(),g(T=>Math.max(T-1,0));return}if(C.key==="Enter"){C.preventDefault(),k[b]&&S(k[b]);return}};l.useEffect(()=>{if(w.current&&b>=0){const C=w.current.querySelector(`[data-index="${b}"]`);C&&typeof C.scrollIntoView=="function"&&C.scrollIntoView({block:"nearest",behavior:"smooth"})}},[b]),l.useEffect(()=>{g(0)},[f]),l.useEffect(()=>{const C=T=>{(T.metaKey||T.ctrlKey)&&T.key==="k"&&(T.preventDefault(),v(!h))};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[h,v]);const I=h?n.jsx("div",{className:`
611
440
  fixed
612
441
  inset-0
613
- ${ue("modal-backdrop")}
442
+ ${be("modal-backdrop")}
614
443
  bg-scrim
615
444
  flex
616
445
  items-start
617
446
  justify-center
618
447
  pt-[20vh]
619
- ${be("base")}
620
- `,onClick:()=>g(!1),children:n.jsxs("div",{className:`
448
+ ${xe("base")}
449
+ `,onClick:()=>v(!1),children:n.jsxs("div",{className:`
621
450
  w-full
622
451
  max-w-2xl
623
- ${E("base","mx")}
452
+ ${m("base","mx")}
624
453
  bg-surface-overlay
625
- ${J("lg")}
626
- ${$e("xl")}
627
- ${ue("modal")}
628
- ${be("base")}
629
- ${u}
630
- `,onClick:S=>S.stopPropagation(),children:[n.jsxs("div",{className:`
454
+ ${U("lg")}
455
+ ${ue("xl")}
456
+ ${be("modal")}
457
+ ${xe("base")}
458
+ ${c}
459
+ `,onClick:C=>C.stopPropagation(),children:[n.jsxs("div",{className:`
631
460
  flex
632
461
  items-center
633
- gap-3
634
- ${E("base","p")}
462
+ ${m("md","gap")}
463
+ ${m("base","p")}
635
464
  border-b
636
465
  border-line-default
637
- `,children:[n.jsx(as,{className:"h-5 w-5 text-fg-secondary"}),n.jsx(Se,{ref:x,value:f,onChange:S=>p(S.target.value),onKeyDown:N,placeholder:o,className:"flex-1 border-0 focus:ring-0",autoFocus:!0}),n.jsxs("div",{className:`
466
+ `,children:[n.jsx(is,{className:"h-5 w-5 text-fg-secondary"}),n.jsx($e,{ref:x,value:f,onChange:C=>p(C.target.value),onKeyDown:N,placeholder:o,className:"flex-1 border-0 focus:ring-0",autoFocus:!0}),n.jsxs("div",{className:`
638
467
  flex
639
468
  items-center
640
- gap-1
641
- ${E("sm","px")}
642
- ${E("xs","py")}
643
- ${J("sm")}
469
+ ${m("xs","gap")}
470
+ ${m("sm","px")}
471
+ ${m("xs","py")}
472
+ ${U("sm")}
644
473
  bg-surface-muted
645
474
  text-xs
646
475
  text-fg-tertiary
647
- `,children:[n.jsx(Ol,{className:"h-3 w-3"}),n.jsx("span",{children:"K"})]})]}),n.jsx("div",{ref:v,className:`
476
+ `,children:[n.jsx(Ql,{className:"h-3 w-3"}),n.jsx("span",{children:"K"})]})]}),n.jsx("div",{ref:w,className:`
648
477
  max-h-96
649
478
  overflow-y-auto
650
- ${E("sm","py")}
651
- `,children:Object.keys(C).length===0?n.jsx("div",{className:`
652
- ${E("lg","p")}
479
+ ${m("sm","py")}
480
+ `,children:Object.keys($).length===0?n.jsx("div",{className:`
481
+ ${m("lg","p")}
653
482
  text-center
654
483
  text-sm
655
484
  text-fg-secondary
656
- `,children:i}):Object.entries(C).map(([S,D])=>n.jsxs("div",{children:[S!=="Other"&&n.jsx("div",{className:`
657
- ${E("sm","px")}
658
- ${E("xs","py")}
485
+ `,children:i}):Object.entries($).map(([C,T])=>n.jsxs("div",{children:[C!=="Other"&&n.jsx("div",{className:`
486
+ ${m("sm","px")}
487
+ ${m("xs","py")}
659
488
  text-xs
660
489
  font-semibold
661
490
  text-fg-tertiary
662
491
  uppercase
663
492
  tracking-wider
664
- `,children:S}),D.map((A,M)=>{const F=w.indexOf(A),I=F===m;return n.jsxs("button",{type:"button","data-index":F,onClick:()=>j(A),className:`
493
+ `,children:C}),T.map((L,F)=>{const M=k.indexOf(L),R=M===b;return n.jsxs("button",{type:"button","data-index":M,onClick:()=>S(L),className:`
665
494
  w-full
666
495
  flex
667
496
  items-center
668
- gap-3
669
- ${E("base","px")}
670
- ${E("md","py")}
497
+ ${m("md","gap")}
498
+ ${m("base","px")}
499
+ ${m("md","py")}
671
500
  text-left
672
- ${be("base")}
673
- ${I?"bg-surface-brand-muted":"hover:bg-surface-hover"}
674
- `,children:[A.icon&&n.jsx("div",{className:`
675
- ${I?"text-fg-brand-emphasis":"text-fg-secondary"}
676
- `,children:A.icon}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:`
501
+ ${xe("base")}
502
+ ${R?"bg-surface-brand-muted":"hover:bg-surface-hover"}
503
+ `,children:[L.icon&&n.jsx("div",{className:`
504
+ ${R?"text-fg-brand-emphasis":"text-fg-secondary"}
505
+ `,children:L.icon}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:`
677
506
  text-sm
678
507
  font-medium
679
- ${I?"text-fg-brand-emphasis":"text-fg-primary"}
680
- `,children:A.label}),A.description&&n.jsx("div",{className:`text-xs ${I?"text-fg-secondary":"text-fg-tertiary"} ${E("0.5","mt")}`,children:A.description})]})]},A.id)})]},S))})]})}):null;return n.jsxs(n.Fragment,{children:[a?n.jsx("div",{onClick:()=>g(!0),children:a}):null,typeof window!="undefined"&&qe.createPortal(L,document.body)]})}function ru({columns:e,data:t,loading:r=!1,onSort:s,sortColumn:a,sortDirection:o,multiSort:i=!1,groups:u=[],onGroupChange:d,groupable:c=!1,resizable:f=!0,reorderable:p=!1,onColumnReorder:m,columnWidths:h,onColumnResize:x,selectable:v=!1,selectedRows:y,onSelectionChange:b,rowId:w,exportable:C=!1,onExport:g,exportFormats:j=["csv","xlsx","json"],pagination:N,filters:L,actions:S,toolbarActions:D,virtualScrolling:A=!1,virtualScrollingOptions:M,emptyMessage:F,emptyStateTitle:I,emptyStateMessage:R,emptyStateIllustration:W,emptyStateAction:K,className:H=""}){const[U,oe]=l.useState(u),[ne,P]=l.useState(h||{}),G=l.useMemo(()=>e.map(se=>z(T({},se),{width:ne[se.key]||se.defaultWidth})),[e,ne]),Y=se=>{g?g(se):se==="csv"?Q(t,e):se==="json"&&le(t)},Q=(se,_)=>{const V=_.filter(Ie=>Ie.exportable!==!1).map(Ie=>Ie.label||Ie.key),X=se.map(Ie=>_.filter(Lt=>Lt.exportable!==!1).map(Lt=>{const Me=Ie[Lt.key];return typeof Me=="string"&&Me.includes(",")?`"${Me}"`:Me})),ae=[V.join(","),...X.map(Ie=>Ie.join(","))].join(`
681
- `),fe=new Blob([ae],{type:"text/csv"}),ke=URL.createObjectURL(fe),je=document.createElement("a");je.href=ke,je.download=`export-${Date.now()}.csv`,je.click(),URL.revokeObjectURL(ke)},le=se=>{const _=JSON.stringify(se,null,2),V=new Blob([_],{type:"application/json"}),X=URL.createObjectURL(V),ae=document.createElement("a");ae.href=X,ae.download=`export-${Date.now()}.json`,ae.click(),URL.revokeObjectURL(X)};return n.jsxs("div",{className:`space-y-4 ${H}`,children:[(C||c||D)&&n.jsxs("div",{className:`
508
+ ${R?"text-fg-brand-emphasis":"text-fg-primary"}
509
+ `,children:L.label}),L.description&&n.jsx("div",{className:`text-xs ${R?"text-fg-secondary":"text-fg-tertiary"} ${m("0.5","mt")}`,children:L.description})]})]},L.id)})]},C))})]})}):null;return n.jsxs(n.Fragment,{children:[a?n.jsx("div",{onClick:()=>v(!0),children:a}):null,typeof window!="undefined"&&Ke.createPortal(I,document.body)]})}function ju({columns:e,data:t,loading:r=!1,onSort:s,sortColumn:a,sortDirection:o,multiSort:i=!1,groups:c,onGroupChange:u,groupable:d=!1,resizable:f=!0,reorderable:p=!1,onColumnReorder:b,columnWidths:g,onColumnResize:x,selectable:w=!1,selectedRows:y,onSelectionChange:h,rowId:k,exportable:$=!1,onExport:v,exportFormats:S=["csv","xlsx","json"],pagination:N,filters:I,actions:C,toolbarActions:T,virtualScrolling:L=!1,virtualScrollingOptions:F,emptyMessage:M,emptyStateTitle:R,emptyStateMessage:D,emptyStateIllustration:O,emptyStateAction:B,className:X=""}){const[Q,oe]=l.useState(g||{}),H=l.useMemo(()=>e.map(J=>P(A({},J),{width:Q[J.key]||J.defaultWidth})),[e,Q]),_=J=>{v?v(J):J==="csv"?Y(t,e):J==="json"&&ee(t)},Y=(J,te)=>{const ae=te.filter(me=>me.exportable!==!1).map(me=>me.label||me.key),z=J.map(me=>te.filter(ve=>ve.exportable!==!1).map(ve=>{const Me=me[ve.key];return typeof Me=="string"&&Me.includes(",")?`"${Me}"`:Me})),V=[ae.join(","),...z.map(me=>me.join(","))].join(`
510
+ `),q=new Blob([V],{type:"text/csv"}),ce=URL.createObjectURL(q),ie=document.createElement("a");ie.href=ce,ie.download=`export-${Date.now()}.csv`,ie.click(),URL.revokeObjectURL(ce)},ee=J=>{const te=JSON.stringify(J,null,2),ae=new Blob([te],{type:"application/json"}),z=URL.createObjectURL(ae),V=document.createElement("a");V.href=z,V.download=`export-${Date.now()}.json`,V.click(),URL.revokeObjectURL(z)};return n.jsxs("div",{className:`${m("base","space-y")} ${X}`,children:[($||T)&&n.jsxs("div",{className:`
682
511
  flex
683
512
  items-center
684
513
  justify-between
685
- ${E("base","p")}
514
+ ${m("base","p")}
686
515
  bg-surface-base
687
516
  border
688
517
  border-line-default
689
- rounded-lg
690
- `,children:[n.jsx("div",{className:"flex items-center gap-2",children:c&&n.jsx(Z,{variant:"outline",size:"sm",leftIcon:n.jsx(El,{className:"h-4 w-4"}),children:"Group"})}),n.jsxs("div",{className:"flex items-center gap-2",children:[D,C&&n.jsx("div",{className:"flex items-center gap-1",children:j.map(se=>n.jsx(Z,{variant:"outline",size:"sm",leftIcon:n.jsx(Wl,{className:"h-4 w-4"}),onClick:()=>Y(se),children:se.toUpperCase()},se))})]})]}),n.jsx(Ce,{columns:G,data:t,loading:r,onSort:s,sortColumn:a,sortDirection:o,pagination:N,filters:L,selectable:v,selectedRows:y,onSelectionChange:b,rowId:w,actions:S,resizable:f,columnWidths:ne,onColumnResize:(se,_)=>{P(V=>z(T({},V),{[se]:_})),x==null||x(se,_)},virtualScrolling:A,virtualScrollingOptions:M,emptyMessage:F,emptyStateTitle:I,emptyStateMessage:R,emptyStateIllustration:W,emptyStateAction:K})]})}function su({columns:e,data:t,searchPlaceholder:r="Search...",enableSearch:s=!0,itemsPerPage:a=10,enablePagination:o=!0,actions:i,onRowClick:u,loading:d=!1,emptyMessage:c="No data available"}){const[f,p]=l.useState(""),[m,h]=l.useState(1),x=l.useMemo(()=>e.map(g=>{if(g.accessor||g.header){const j=g.key||(typeof g.accessor=="string"?g.accessor:String(g.accessor)),N=g.label||g.header||"";return z(T({},g),{key:j,label:N})}return g}),[e]),v=l.useMemo(()=>{if(!f.trim())return t;const g=f.toLowerCase();return t.filter(j=>x.some(N=>{const L=j[String(N.key)];return String(L).toLowerCase().includes(g)}))},[t,f,x]),y=l.useMemo(()=>{if(!o)return v;const g=(m-1)*a,j=g+a;return v.slice(g,j)},[v,m,a,o]),b=o?Math.ceil(v.length/a):1,w=g=>{h(g)},C=g=>{p(g),h(1)};return n.jsx(it,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(At,{spacing:"md",children:[n.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s&&n.jsx("div",{className:"flex-1 max-w-md",children:n.jsx(Tr,{placeholder:r,value:f,onSearch:C})}),i&&n.jsx("div",{className:"flex gap-2",children:i})]}),n.jsx(Ce,{columns:x,data:y,loading:d,emptyMessage:c,onRowClick:u?g=>{const j=v.findIndex(N=>N===g);u(g,j>=0?j:y.findIndex(N=>N===g))}:void 0}),o&&b>1&&n.jsx("div",{className:"flex justify-center",children:n.jsx(Ta,{currentPage:m,totalPages:b,onPageChange:w})}),s&&n.jsxs("div",{className:"text-sm text-fg-secondary text-center",children:["Showing ",y.length," of ",v.length," results"]})]})})}function nu({steps:e,onComplete:t,allowBackNavigation:r=!0,showStepNumbers:s=!0}){const[a,o]=l.useState(0),[i,u]=l.useState({}),[d,c]=l.useState({}),f=()=>rr(null,null,function*(){const y=e[a];if(y.validate&&!(yield y.validate())){c(z(T({},d),{[a]:!0}));return}c(z(T({},d),{[a]:!1})),y.onSubmit&&(yield y.onSubmit(i)),a<e.length-1?o(a+1):t&&t(i)}),p=()=>{a>0&&r&&(o(a-1),c(z(T({},d),{[a-1]:!1})))},m=y=>{r&&y<a&&o(y)},h=e[a],x=a===e.length-1,v=d[a]===!0;return n.jsx(it,{maxWidth:"lg",paddingX:"base",paddingY:"lg",children:n.jsxs(At,{spacing:"lg",children:[n.jsx($o,{steps:e.map((y,b)=>({id:y.id,title:y.title,content:y.content,description:y.description,status:b<a?"completed":b===a?v?"error":"active":"pending"})),currentStep:a,onStepChange:m,allowNavigation:r}),n.jsx("div",{className:"bg-surface-base rounded-lg border p-6",children:n.jsxs(At,{spacing:"md",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-semibold",children:h.title}),h.description&&n.jsx("p",{className:"text-fg-secondary mt-1",children:h.description})]}),v&&n.jsx("div",{className:"bg-error-bg border border-error-border rounded p-3",children:n.jsx("p",{className:"text-sm text-fg-error",children:"Please fix the errors before proceeding."})}),n.jsx("div",{className:"min-h-48",children:h.fields}),n.jsxs("div",{className:"flex justify-between pt-4 border-t",children:[n.jsx(Z,{variant:"outline",onClick:p,disabled:a===0,children:"Back"}),n.jsx(Z,{variant:"primary",onClick:f,children:x?"Complete":"Next"})]})]})})]})})}function au({items:e,searchFn:t,filterFn:r,renderItem:s,filters:a=[],searchPlaceholder:o="Search...",emptyMessage:i="No results found",showResultsCount:u=!0}){const[d,c]=l.useState(""),[f,p]=l.useState({}),m=l.useMemo(()=>{let y=e;if(d.trim()&&t){const b=d.toLowerCase();y=y.filter(w=>t(b,w))}return r&&Object.keys(f).length>0&&(y=y.filter(b=>r(f,b))),y},[e,d,f,t,r]),h=(y,b)=>{p(w=>z(T({},w),{[y]:b}))},x=()=>{p({}),c("")},v=d.trim().length>0||Object.keys(f).length>0;return n.jsx(it,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(At,{spacing:"md",children:[n.jsx(fr,{padding:"medium",children:n.jsxs(At,{spacing:"md",children:[n.jsx("div",{children:n.jsx(Tr,{placeholder:o,value:d,onSearch:c})}),a.length>0&&n.jsx("div",{className:"flex flex-wrap gap-2",children:a.map(y=>{var b;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs(Be,{className:"text-fg-secondary text-sm",children:[y.label,":"]}),n.jsxs("select",{className:"px-3 py-1 border rounded text-sm","aria-label":y.label,value:String(f[y.id]||""),onChange:w=>h(y.id,w.target.value||void 0),children:[n.jsx("option",{value:"",children:"All"}),(b=y.options)==null?void 0:b.map(w=>n.jsx("option",{value:String(w.value||""),children:w.label},w.id))]})]},y.id)})}),v&&n.jsx("div",{children:n.jsx(Z,{variant:"outline",size:"sm",onClick:x,children:"Clear Filters"})})]})}),u&&n.jsxs("div",{className:"text-sm text-fg-secondary",children:["Showing ",m.length," of ",e.length," results",v&&" (filtered)"]}),m.length===0?n.jsx(fr,{padding:"large",children:n.jsx("div",{className:"text-center text-fg-secondary",children:n.jsx(Be,{children:i})})}):n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:m.map((y,b)=>n.jsx("div",{children:s(y,b)},b))})]})})}function ou({sidebar:e,children:t,header:r,footer:s,defaultCollapsed:a=!1,sidebarProps:o}){return n.jsxs("div",{className:"flex h-screen overflow-hidden",children:[e&&n.jsx(Ee,z(T({defaultCollapsed:a},o),{children:e})),n.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[r&&n.jsx("header",{className:"border-b bg-surface-base",children:n.jsx(it,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:r})}),n.jsx("main",{className:"flex-1 overflow-y-auto",children:n.jsx(it,{maxWidth:"xl",paddingX:"base",paddingY:"base",children:t})}),s&&n.jsx("footer",{className:"border-t bg-surface-base",children:n.jsx(it,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:s})})]})]})}exports.AMBER=nt;exports.Accordion=hd;exports.AlertDialog=Kd;exports.AppProvider=bl;exports.Autocomplete=Oa;exports.AutocompleteList=Ar;exports.AutocompleteOption=$s;exports.Avatar=ur;exports.AvatarGroup=Mc;exports.BLUE=zn;exports.BRAND_COLORS=li;exports.BREAKPOINT_TOKENS=yr;exports.Badge=pa;exports.Breadcrumb=Ma;exports.BreakpointTokenFactory=Ct;exports.Button=Z;exports.COLOR_SCALES=Bo;exports.CYAN=tt;exports.Card=fr;exports.Checkbox=Nr;exports.Chip=ws;exports.Collapsible=xa;exports.ColorPicker=dd;exports.CommandPalette=tu;exports.ConfigProvider=ca;exports.DashboardLayout=ou;exports.DataGrid=ru;exports.DataTablePattern=su;exports.DatePicker=nd;exports.DatePickerCalendar=Cs;exports.DatePickerInput=Ss;exports.DatePickerProvider=is;exports.Dialog=Re;exports.DialogClose=So;exports.DialogContent=Zs;exports.DialogContext=kr;exports.DialogDescription=No;exports.DialogFooter=tn;exports.DialogHeader=en;exports.DialogProvider=ps;exports.DialogTitle=jo;exports.DialogTrigger=ko;exports.Drawer=Gt;exports.DrawerContent=Ms;exports.DrawerFooter=Ua;exports.DrawerHeader=Ha;exports.Dropdown=Ra;exports.EMERALD=st;exports.EmptyState=Aa;exports.ErrorMessage=ba;exports.FONT_FAMILY_TOKENS=Vo;exports.FONT_WEIGHT_TOKENS=Wo;exports.FUCHSIA=On;exports.FileUpload=ld;exports.Form=Ac;exports.FormContext=Sr;exports.FormField=Rc;exports.FormProvider=ka;exports.FormWizardPattern=nu;exports.GRAY=Dn;exports.GREEN=Fn;exports.Header=xt;exports.HeaderActions=Ja;exports.HeaderComponent=xt;exports.HeaderHamburger=Qa;exports.HeaderLogo=Ya;exports.HeaderMobileMenu=Za;exports.HeaderNavigation=Xa;exports.HeaderProvider=ls;exports.INDIGO=Ze;exports.Info=vl;exports.Input=Se;exports.LIME=Un;exports.Label=Tt;exports.LoginBox=yd;exports.Menu=Kt;exports.MenuContent=qa;exports.MenuItem=Rs;exports.MenuSeparator=Ga;exports.MenuTrigger=As;exports.Modal=wd;exports.MultiSelect=Va;exports.NavLink=xs;exports.Navbar=yt;exports.NavbarContext=Pr;exports.NavbarGroup=po;exports.NavbarItem=fo;exports.NavbarSeparator=mo;exports.NavbarToggle=gr;exports.Navigation=eo;exports.NavigationComponent=eo;exports.ORANGE=_n;exports.PINK=Vn;exports.PRIMITIVE_COLORS=ds;exports.PURPLE=Wn;exports.PageHeader=to;exports.PageHeaderComponent=to;exports.Pagination=Ta;exports.Popover=Es;exports.Progress=vs;exports.RED=Pn;exports.ROSE=at;exports.Radio=va;exports.Rating=id;exports.SEMANTIC_COLORS=Yo;exports.SEMANTIC_COLORS_DARK=vr;exports.SEMANTIC_COLORS_LIGHT=qt;exports.SIDEBAR_TOKENS=Qe;exports.SKY=ot;exports.SLATE=rt;exports.SPACING_TOKENS=xr;exports.SearchAndFilterPattern=au;exports.SearchInput=Tr;exports.Select=jr;exports.Separator=ys;exports.SideNavbar=Ee;exports.SideNavbarBackdrop=Js;exports.SideNavbarConfigContext=Dr;exports.SideNavbarConfigProvider=Us;exports.SideNavbarProvider=qs;exports.SideNavbarResizeHandle=Xs;exports.SideNavbarRoot=uo;exports.SideNavbarStateContext=Fr;exports.SideNavbarStateProvider=Bs;exports.SideNavbarThemeContext=Ir;exports.SideNavbarThemeProvider=Hs;exports.SideNavbarToggle=Qs;exports.SideNavbarToggleContext=_r;exports.Sidebar=dt;exports.SidebarContent=go;exports.SidebarContext=Or;exports.SidebarFooter=xo;exports.SidebarGroup=vo;exports.SidebarHeader=bo;exports.SidebarSlot=yo;exports.SidebarSlotContent=wo;exports.SidebarSlotContext=Lr;exports.SidebarSlotProvider=co;exports.Skeleton=ga;exports.Slider=wa;exports.SpacingTokenFactory=he;exports.Spinner=gs;exports.Stepper=$o;exports.Switch=ya;exports.TEAL=Hn;exports.TYPOGRAPHY_TOKENS=gt;exports.Table=Ce;exports.TableActions=Ps;exports.TableBody=Os;exports.TableCell=_s;exports.TableContext=Rr;exports.TableEmptyState=zs;exports.TableFilters=Vs;exports.TableHeader=Ls;exports.TableHeaderCell=Ds;exports.TableHeaderRow=Fs;exports.TablePagination=Ws;exports.TableProvider=cs;exports.TableRow=hr;exports.Tabs=od;exports.TabsContent=za;exports.TabsContext=$r;exports.TabsList=_a;exports.TabsProvider=La;exports.TabsTrigger=Pa;exports.Text=Be;exports.Textarea=ha;exports.ThemeProvider=ia;exports.TimePicker=cd;exports.Timeline=eu;exports.Toast=Co;exports.ToastContainer=Qd;exports.ToastContext=wr;exports.ToastProvider=da;exports.Tooltip=Bt;exports.TypographyTokenFactory=me;exports.VIOLET=et;exports.YELLOW=Ln;exports.blendColors=us;exports.clampWidth=lr;exports.cn=k;exports.darken=ii;exports.defaultConfigValues=we;exports.defaultThemeValues=Et;exports.formatKeyboardShortcut=Rd;exports.getAnimation=tl;exports.getAnimationClass=be;exports.getBreakpoint=ci;exports.getColor=Jo;exports.getColorClass=Zo;exports.getContrastColor=ai;exports.getFocusColorClass=ri;exports.getFocusRingClass=si;exports.getHoverColorClass=ti;exports.getMediaQuery=di;exports.getNestedIndentClass=zo;exports.getOpacity=nl;exports.getOpacityClass=al;exports.getPrimitiveColor=Rt;exports.getPrimitiveColorPalette=Ko;exports.getSemanticColor=Ht;exports.getSemanticColorClass=ei;exports.getSemanticColorRole=Xo;exports.getSemanticColorValue=Qo;exports.getSpacing=Oo;exports.getSpacingClass=E;exports.getTransitionClass=rl;exports.getTypography=Ho;exports.getTypographyClasses=ce;exports.getTypographyLineHeight=Uo;exports.getTypographySize=re;exports.getTypographySizeFromFontSize=ye;exports.getTypographyWeight=Pe;exports.getTypographyWeightFromFontWeight=Mt;exports.getZIndex=sl;exports.getZIndexClass=ue;exports.isLightColor=Bn;exports.lighten=oi;exports.parseKeyboardShortcut=no;exports.parseWidthToPixels=br;exports.useApp=gl;exports.useColumnResizing=$d;exports.useConfig=ul;exports.useDialogContext=Ft;exports.useDialogContextOptional=ml;exports.useFocusManagement=io;exports.useFormContext=ks;exports.useFormContextOptional=Tc;exports.useFormFieldArray=Qc;exports.useGroupState=Ud;exports.useHeaderContext=Is;exports.useKeyboardShortcut=lo;exports.useNavLink=ma;exports.useNavbar=Od;exports.useNavbarRequired=zr;exports.useResize=ao;exports.useResponsiveSidebar=oo;exports.useSideNavbarCombined=Gd;exports.useSideNavbarConfig=Md;exports.useSideNavbarConfigRequired=vt;exports.useSideNavbarContent=qd;exports.useSideNavbarNavigation=Bd;exports.useSideNavbarState=Td;exports.useSideNavbarStateRequired=ct;exports.useSideNavbarTheme=Ed;exports.useSideNavbarThemeRequired=lt;exports.useSideNavbarToggleContext=Id;exports.useSideNavbarToggleContextRequired=Ys;exports.useSidebar=ho;exports.useSidebarRequired=Yt;exports.useSidebarSlot=Gs;exports.useSidebarSlotRequired=Ks;exports.useTableContext=Oe;exports.useTableContextOptional=kd;exports.useTabsContext=Er;exports.useTabsContextOptional=ad;exports.useTheme=cl;exports.useToast=Zd;exports.useToastContext=ms;exports.useToastContextOptional=fl;exports.useVirtualScrolling=ro;exports.validateWidthBounds=so;exports.withOpacity=ni;
518
+ ${U("lg")}
519
+ `,children:[n.jsx("div",{className:`flex items-center ${m("sm","gap")}`}),n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[T,$&&n.jsx("div",{className:`flex items-center ${m("xs","gap")}`,children:S.map(J=>n.jsx(Z,{variant:"outline",size:"sm",leftIcon:n.jsx(ec,{className:"h-4 w-4"}),onClick:()=>_(J),children:J.toUpperCase()},J))})]})]}),n.jsx(Ce,{columns:H,data:t,loading:r,onSort:s,sortColumn:a,sortDirection:o,pagination:N,filters:I,selectable:w,selectedRows:y,onSelectionChange:h,rowId:k,actions:C,resizable:f,columnWidths:Q,onColumnResize:(J,te)=>{oe(ae=>P(A({},ae),{[J]:te})),x==null||x(J,te)},virtualScrolling:L,virtualScrollingOptions:F,emptyMessage:M,emptyStateTitle:R,emptyStateMessage:D,emptyStateIllustration:O,emptyStateAction:B})]})}function Nu({columns:e,data:t,searchPlaceholder:r="Search...",enableSearch:s=!0,itemsPerPage:a=10,enablePagination:o=!0,actions:i,onRowClick:c,loading:u=!1,emptyMessage:d="No data available"}){const[f,p]=l.useState(""),[b,g]=l.useState(1),x=l.useMemo(()=>e.map(v=>{if(v.accessor||v.header){const S=v.key||(typeof v.accessor=="string"?v.accessor:String(v.accessor)),N=v.label||v.header||"";return P(A({},v),{key:S,label:N})}return v}),[e]),w=l.useMemo(()=>{if(!f.trim())return t;const v=f.toLowerCase();return t.filter(S=>x.some(N=>{const I=S[String(N.key)];return String(I).toLowerCase().includes(v)}))},[t,f,x]),y=l.useMemo(()=>{if(!o)return w;const v=(b-1)*a,S=v+a;return w.slice(v,S)},[w,b,a,o]),h=o?Math.ceil(w.length/a):1,k=v=>{g(v)},$=v=>{p(v),g(1)};return n.jsx(dt,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(Dt,{spacing:"md",children:[n.jsxs("div",{className:`flex items-center justify-between ${m("base","gap")}`,children:[s&&n.jsx("div",{className:"flex-1 max-w-md",children:n.jsx(Rr,{placeholder:r,value:f,onSearch:$})}),i&&n.jsx("div",{className:`flex ${m("sm","gap")}`,children:i})]}),n.jsx(Ce,{columns:x,data:y,loading:u,emptyMessage:d,onRowClick:c?v=>{const S=w.findIndex(N=>N===v);c(v,S>=0?S:y.findIndex(N=>N===v))}:void 0}),o&&h>1&&n.jsx("div",{className:"flex justify-center",children:n.jsx(Pa,{currentPage:b,totalPages:h,onPageChange:k})}),s&&n.jsxs("div",{className:"text-sm text-fg-secondary text-center",children:["Showing ",y.length," of ",w.length," results"]})]})})}function Su({steps:e,onComplete:t,allowBackNavigation:r=!0,showStepNumbers:s=!0}){const[a,o]=l.useState(0),[i,c]=l.useState({}),[u,d]=l.useState({}),f=()=>tr(null,null,function*(){const y=e[a];if(y.validate&&!(yield y.validate())){d(P(A({},u),{[a]:!0}));return}d(P(A({},u),{[a]:!1})),y.onSubmit&&(yield y.onSubmit(i)),a<e.length-1?o(a+1):t&&t(i)}),p=()=>{a>0&&r&&(o(a-1),d(P(A({},u),{[a-1]:!1})))},b=y=>{r&&y<a&&o(y)},g=e[a],x=a===e.length-1,w=u[a]===!0;return n.jsx(dt,{maxWidth:"lg",paddingX:"base",paddingY:"lg",children:n.jsxs(Dt,{spacing:"lg",children:[n.jsx(Lo,{steps:e.map((y,h)=>({id:y.id,title:y.title,content:y.content,description:y.description,status:h<a?"completed":h===a?w?"error":"active":"pending"})),currentStep:a,onStepChange:b,allowNavigation:r}),n.jsx("div",{className:`bg-surface-base ${U("lg")} border ${m("lg","p")}`,children:n.jsxs(Dt,{spacing:"md",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-semibold",children:g.title}),g.description&&n.jsx("p",{className:`text-fg-secondary ${m("xs","mt")}`,children:g.description})]}),w&&n.jsx("div",{className:`bg-error-bg border border-error-border rounded ${m("md","p")}`,children:n.jsx("p",{className:"text-sm text-fg-error",children:"Please fix the errors before proceeding."})}),n.jsx("div",{className:"min-h-48",children:g.fields}),n.jsxs("div",{className:`flex justify-between ${m("base","pt")} border-t`,children:[n.jsx(Z,{variant:"outline",onClick:p,disabled:a===0,children:"Back"}),n.jsx(Z,{variant:"primary",onClick:f,children:x?"Complete":"Next"})]})]})})]})})}function $u({items:e,searchFn:t,filterFn:r,renderItem:s,filters:a=[],searchPlaceholder:o="Search...",emptyMessage:i="No results found",showResultsCount:c=!0}){const[u,d]=l.useState(""),[f,p]=l.useState({}),b=l.useMemo(()=>{let y=e;if(u.trim()&&t){const h=u.toLowerCase();y=y.filter(k=>t(h,k))}return r&&Object.keys(f).length>0&&(y=y.filter(h=>r(f,h))),y},[e,u,f,t,r]),g=(y,h)=>{p(k=>P(A({},k),{[y]:h}))},x=()=>{p({}),d("")},w=u.trim().length>0||Object.keys(f).length>0;return n.jsx(dt,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(Dt,{spacing:"md",children:[n.jsx(ur,{padding:"medium",children:n.jsxs(Dt,{spacing:"md",children:[n.jsx("div",{children:n.jsx(Rr,{placeholder:o,value:u,onSearch:d})}),a.length>0&&n.jsx("div",{className:`flex flex-wrap ${m("sm","gap")}`,children:a.map(y=>{var h;return n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[n.jsxs(Ue,{className:"text-fg-secondary text-sm",children:[y.label,":"]}),n.jsxs("select",{className:`${m("md","px")} ${m("xs","py")} border rounded text-sm`,"aria-label":y.label,value:String(f[y.id]||""),onChange:k=>g(y.id,k.target.value||void 0),children:[n.jsx("option",{value:"",children:"All"}),(h=y.options)==null?void 0:h.map(k=>n.jsx("option",{value:String(k.value||""),children:k.label},k.id))]})]},y.id)})}),w&&n.jsx("div",{children:n.jsx(Z,{variant:"outline",size:"sm",onClick:x,children:"Clear Filters"})})]})}),c&&n.jsxs("div",{className:"text-sm text-fg-secondary",children:["Showing ",b.length," of ",e.length," results",w&&" (filtered)"]}),b.length===0?n.jsx(ur,{padding:"large",children:n.jsx("div",{className:"text-center text-fg-secondary",children:n.jsx(Ue,{children:i})})}):n.jsx("div",{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 ${m("base","gap")}`,children:b.map((y,h)=>n.jsx("div",{children:s(y,h)},h))})]})})}function Cu({sidebar:e,children:t,header:r,footer:s,defaultCollapsed:a=!1,sidebarProps:o}){return n.jsxs("div",{className:"flex h-screen overflow-hidden",children:[e&&n.jsx(Ee,P(A({defaultCollapsed:a},o),{children:e})),n.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[r&&n.jsx("header",{className:"border-b bg-surface-base",children:n.jsx(dt,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:r})}),n.jsx("main",{className:"flex-1 overflow-y-auto",children:n.jsx(dt,{maxWidth:"xl",paddingX:"base",paddingY:"base",children:t})}),s&&n.jsx("footer",{className:"border-t bg-surface-base",children:n.jsx(dt,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:s})})]})]})}exports.AMBER=it;exports.Accordion=Rd;exports.AlertDialog=bu;exports.AppProvider=Ml;exports.Autocomplete=Ya;exports.AutocompleteList=Ir;exports.AutocompleteOption=Ts;exports.Avatar=dr;exports.AvatarGroup=Vc;exports.BLUE=Un;exports.BRAND_COLORS=xi;exports.BREAKPOINT_TOKENS=vr;exports.Badge=ja;exports.Breadcrumb=_a;exports.BreakpointTokenFactory=Et;exports.Button=Z;exports.COLOR_SCALES=ti;exports.CYAN=nt;exports.Card=ur;exports.Checkbox=$r;exports.Chip=js;exports.Collapsible=ys;exports.ColorPicker=$d;exports.CommandPalette=ku;exports.ConfigProvider=xa;exports.DashboardLayout=Cu;exports.DataGrid=ju;exports.DataTablePattern=Nu;exports.DatePicker=yd;exports.DatePickerCalendar=Ms;exports.DatePickerInput=Es;exports.DatePickerProvider=cs;exports.Dialog=Re;exports.DialogClose=Do;exports.DialogContent=sn;exports.DialogContext=wr;exports.DialogDescription=Io;exports.DialogFooter=an;exports.DialogHeader=nn;exports.DialogProvider=gs;exports.DialogTitle=Ro;exports.DialogTrigger=Ao;exports.Drawer=Gt;exports.DrawerContent=Ds;exports.DrawerFooter=Za;exports.DrawerHeader=Qa;exports.Dropdown=Oa;exports.EMERALD=ot;exports.EmptyState=za;exports.ErrorMessage=Sa;exports.FONT_FAMILY_TOKENS=Jo;exports.FONT_WEIGHT_TOKENS=Qo;exports.FUCHSIA=Gn;exports.FileUpload=Nd;exports.Form=Uc;exports.FormContext=Wc;exports.FormField=Gc;exports.FormProvider=Aa;exports.FormWizardPattern=Su;exports.GRAY=On;exports.GREEN=Vn;exports.Header=wt;exports.HeaderActions=oo;exports.HeaderComponent=wt;exports.HeaderHamburger=io;exports.HeaderLogo=no;exports.HeaderMobileMenu=lo;exports.HeaderNavigation=ao;exports.HeaderProvider=ds;exports.INDIGO=rt;exports.Info=Rl;exports.Input=$e;exports.LIME=Xn;exports.Label=Rt;exports.LoginBox=_d;exports.Menu=Kt;exports.MenuContent=to;exports.MenuItem=_s;exports.MenuSeparator=ro;exports.MenuTrigger=Ls;exports.Modal=Pd;exports.MultiSelect=qa;exports.NavLink=Nr;exports.Navbar=ft;exports.NavbarContext=Or;exports.NavbarGroup=jo;exports.NavbarItem=wo;exports.NavbarSeparator=ko;exports.NavbarToggle=hr;exports.Navigation=co;exports.NavigationComponent=co;exports.ORANGE=Hn;exports.PINK=Kn;exports.PRIMITIVE_COLORS=fs;exports.PURPLE=Yn;exports.PageHeader=uo;exports.PageHeaderComponent=uo;exports.Pagination=Pa;exports.Popover=As;exports.Progress=ws;exports.RED=Bn;exports.ROSE=lt;exports.Radio=Ca;exports.Rating=jd;exports.SEMANTIC_COLORS=ai;exports.SEMANTIC_COLORS_DARK=xr;exports.SEMANTIC_COLORS_LIGHT=Ut;exports.SIDEBAR_TOKENS=tt;exports.SKY=ct;exports.SLATE=at;exports.SPACING_TOKENS=gr;exports.SearchAndFilterPattern=$u;exports.SearchInput=Rr;exports.Select=Sr;exports.Separator=ks;exports.SideNavbar=Ee;exports.SideNavbarBackdrop=tn;exports.SideNavbarConfigContext=Lr;exports.SideNavbarConfigProvider=qs;exports.SideNavbarProvider=Js;exports.SideNavbarResizeHandle=en;exports.SideNavbarRoot=yo;exports.SideNavbarStateContext=_r;exports.SideNavbarStateProvider=Xs;exports.SideNavbarThemeContext=Fr;exports.SideNavbarThemeProvider=Ys;exports.SideNavbarToggle=rn;exports.SideNavbarToggleContext=zr;exports.Sidebar=mt;exports.SidebarContent=$o;exports.SidebarContext=Wr;exports.SidebarFooter=Co;exports.SidebarGroup=Eo;exports.SidebarHeader=So;exports.SidebarSlot=Mo;exports.SidebarSlotContent=To;exports.SidebarSlotContext=Pr;exports.SidebarSlotProvider=xo;exports.Skeleton=$a;exports.Slider=Ma;exports.SpacingTokenFactory=ge;exports.Spinner=vs;exports.Stepper=Lo;exports.Switch=Ea;exports.TEAL=qn;exports.TYPOGRAPHY_TOKENS=vt;exports.Table=Ce;exports.TableActions=Hs;exports.TableBody=Us;exports.TableCell=Ws;exports.TableContext=zd;exports.TableEmptyState=Bs;exports.TableFilters=Gs;exports.TableHeader=Vs;exports.TableHeaderCell=zs;exports.TableHeaderRow=Os;exports.TablePagination=Ks;exports.TableProvider=us;exports.TableRow=pr;exports.Tabs=kd;exports.TabsContent=Ka;exports.TabsContext=Mr;exports.TabsList=Ua;exports.TabsProvider=Ba;exports.TabsTrigger=Ga;exports.Text=Ue;exports.Textarea=Na;exports.ThemeProvider=ha;exports.TimePicker=Sd;exports.Timeline=wu;exports.Toast=Fo;exports.ToastContainer=vu;exports.ToastContext=yr;exports.ToastProvider=va;exports.Tooltip=It;exports.TypographyTokenFactory=pe;exports.VIOLET=st;exports.YELLOW=Wn;exports.blendColors=ms;exports.clampWidth=ir;exports.cn=j;exports.darken=gi;exports.defaultConfigValues=Ne;exports.defaultThemeValues=Tt;exports.formatKeyboardShortcut=Qd;exports.getAnimation=pl;exports.getAnimationClass=xe;exports.getBreakpoint=vi;exports.getColor=ii;exports.getColorClass=ci;exports.getContrastColor=bi;exports.getFocusColorClass=fi;exports.getFocusRingClass=mi;exports.getHoverColorClass=ui;exports.getMediaQuery=yi;exports.getNestedIndentClass=qo;exports.getOpacity=gl;exports.getOpacityClass=xl;exports.getPrimitiveColor=Ft;exports.getPrimitiveColorPalette=ni;exports.getSemanticColor=Ht;exports.getSemanticColorClass=di;exports.getSemanticColorRole=oi;exports.getSemanticColorValue=li;exports.getSpacing=Xo;exports.getSpacingClass=m;exports.getTransitionClass=bl;exports.getTypography=Zo;exports.getTypographyClasses=de;exports.getTypographyLineHeight=ei;exports.getTypographySize=se;exports.getTypographySizeFromFontSize=je;exports.getTypographyWeight=Pe;exports.getTypographyWeightFromFontWeight=At;exports.getZIndex=hl;exports.getZIndexClass=be;exports.isLightColor=Jn;exports.lighten=hi;exports.parseKeyboardShortcut=mo;exports.parseWidthToPixels=br;exports.useApp=Tl;exports.useColumnResizing=Gd;exports.useConfig=Nl;exports.useDialogContext=Lt;exports.useDialogContextOptional=$l;exports.useFocusManagement=ho;exports.useFormContext=Ns;exports.useFormContextOptional=Bc;exports.useFormFieldArray=pd;exports.useGroupState=uu;exports.useHeaderContext=Ps;exports.useKeyboardShortcut=go;exports.useNavLink=ka;exports.useNavbar=iu;exports.useNavbarRequired=Vr;exports.useResize=po;exports.useResponsiveSidebar=bo;exports.useSideNavbarCombined=pu;exports.useSideNavbarConfig=Yd;exports.useSideNavbarConfigRequired=kt;exports.useSideNavbarContent=mu;exports.useSideNavbarNavigation=fu;exports.useSideNavbarState=qd;exports.useSideNavbarStateRequired=Xe;exports.useSideNavbarTheme=Kd;exports.useSideNavbarThemeRequired=qe;exports.useSideNavbarToggleContext=Zd;exports.useSideNavbarToggleContextRequired=vo;exports.useSidebar=No;exports.useSidebarRequired=Yt;exports.useSidebarSlot=Qs;exports.useSidebarSlotRequired=Zs;exports.useTableContext=ze;exports.useTableContextOptional=Vd;exports.useTabsContext=Tr;exports.useTabsContextOptional=wd;exports.useTheme=kl;exports.useToast=yu;exports.useToastContext=hs;exports.useToastContextOptional=Sl;exports.useVirtualScrolling=fo;exports.validateWidthBounds=Xd;exports.withOpacity=pi;
691
520
  //# sourceMappingURL=index.cjs.map