@exsto/ds 0.0.0-stage → 0.0.1-rc.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +165 -2
  3. package/dist/chunks/date-range-picker-CWVcHgy2.js +204 -0
  4. package/dist/chunks/date-range-picker-CWVcHgy2.js.map +1 -0
  5. package/dist/chunks/input-syWxjY2U.js +172 -0
  6. package/dist/chunks/input-syWxjY2U.js.map +1 -0
  7. package/dist/chunks/toggle-CVnIkJVC.js +484 -0
  8. package/dist/chunks/toggle-CVnIkJVC.js.map +1 -0
  9. package/dist/date-picker.js +345 -0
  10. package/dist/date-picker.js.map +1 -0
  11. package/dist/ds/src/date-picker.d.ts +9 -0
  12. package/dist/ds/src/index.d.ts +7 -0
  13. package/dist/ds/src/rich-text-editor.d.ts +8 -0
  14. package/dist/index.js +4512 -0
  15. package/dist/index.js.map +1 -0
  16. package/dist/rich-text-editor.js +905 -0
  17. package/dist/rich-text-editor.js.map +1 -0
  18. package/dist/styles.css +8167 -0
  19. package/dist/styles.css.d.ts +2 -0
  20. package/dist/theme/src/index.d.ts +4 -0
  21. package/dist/theme.css +308 -0
  22. package/dist/theme.css.d.ts +2 -0
  23. package/dist/ui/src/components/edyn/animated-number/animated-number.d.ts +30 -0
  24. package/dist/ui/src/components/edyn/animated-number/animated-number.test.d.ts +9 -0
  25. package/dist/ui/src/components/edyn/animated-number/index.d.ts +1 -0
  26. package/dist/ui/src/components/edyn/audio-player/audio-player.d.ts +30 -0
  27. package/dist/ui/src/components/edyn/audio-player/index.d.ts +1 -0
  28. package/dist/ui/src/components/edyn/date-picker/date-picker.d.ts +76 -0
  29. package/dist/ui/src/components/edyn/date-picker/date-picker.state.test.d.ts +9 -0
  30. package/dist/ui/src/components/edyn/date-picker/date-text.d.ts +40 -0
  31. package/dist/ui/src/components/edyn/date-picker/date-text.test.d.ts +1 -0
  32. package/dist/ui/src/components/edyn/date-picker/index.d.ts +2 -0
  33. package/dist/ui/src/components/edyn/date-range-picker/date-range-picker.d.ts +28 -0
  34. package/dist/ui/src/components/edyn/date-range-picker/date-range-picker.test.d.ts +9 -0
  35. package/dist/ui/src/components/edyn/date-range-picker/index.d.ts +1 -0
  36. package/dist/ui/src/components/edyn/initials-avatar/index.d.ts +1 -0
  37. package/dist/ui/src/components/edyn/initials-avatar/initials-avatar.d.ts +54 -0
  38. package/dist/ui/src/components/edyn/initials-avatar/initials-avatar.test.d.ts +10 -0
  39. package/dist/ui/src/components/edyn/multi-select/index.d.ts +1 -0
  40. package/dist/ui/src/components/edyn/multi-select/multi-select.d.ts +106 -0
  41. package/dist/ui/src/components/edyn/multi-select/multi-select.test.d.ts +9 -0
  42. package/dist/ui/src/components/edyn/progress-line/index.d.ts +1 -0
  43. package/dist/ui/src/components/edyn/progress-line/progress-line.d.ts +23 -0
  44. package/dist/ui/src/components/edyn/progress-line/progress-line.test.d.ts +9 -0
  45. package/dist/ui/src/components/edyn/rich-text-content/allow-list.d.ts +11 -0
  46. package/dist/ui/src/components/edyn/rich-text-content/index.d.ts +2 -0
  47. package/dist/ui/src/components/edyn/rich-text-content/rich-text-content.d.ts +22 -0
  48. package/dist/ui/src/components/edyn/rich-text-content/rich-text-content.test.d.ts +8 -0
  49. package/dist/ui/src/components/edyn/rich-text-editor/extensions.d.ts +18 -0
  50. package/dist/ui/src/components/edyn/rich-text-editor/index.d.ts +3 -0
  51. package/dist/ui/src/components/edyn/rich-text-editor/mention-list.d.ts +17 -0
  52. package/dist/ui/src/components/edyn/rich-text-editor/rich-text-editor.d.ts +53 -0
  53. package/dist/ui/src/components/edyn/rich-text-editor/rich-text-editor.test.d.ts +6 -0
  54. package/dist/ui/src/components/edyn/rich-text-editor/serialize.d.ts +13 -0
  55. package/dist/ui/src/components/edyn/rich-text-editor/sync.d.ts +19 -0
  56. package/dist/ui/src/components/edyn/rich-text-editor/sync.test.d.ts +11 -0
  57. package/dist/ui/src/components/edyn/rich-text-editor/toolbar.d.ts +20 -0
  58. package/dist/ui/src/components/edyn/rich-text-editor/types.d.ts +68 -0
  59. package/dist/ui/src/components/edyn/video-player/index.d.ts +1 -0
  60. package/dist/ui/src/components/edyn/video-player/video-player.d.ts +55 -0
  61. package/dist/ui/src/components/forwarded-props.test.d.ts +8 -0
  62. package/dist/ui/src/components/ui/accordion/accordion.behavior.test.d.ts +13 -0
  63. package/dist/ui/src/components/ui/accordion/accordion.d.ts +28 -0
  64. package/dist/ui/src/components/ui/accordion/index.d.ts +1 -0
  65. package/dist/ui/src/components/ui/alert/alert.d.ts +10 -0
  66. package/dist/ui/src/components/ui/alert/index.d.ts +1 -0
  67. package/dist/ui/src/components/ui/alert-dialog/alert-dialog.d.ts +17 -0
  68. package/dist/ui/src/components/ui/alert-dialog/index.d.ts +1 -0
  69. package/dist/ui/src/components/ui/aspect-ratio/aspect-ratio.d.ts +3 -0
  70. package/dist/ui/src/components/ui/aspect-ratio/index.d.ts +1 -0
  71. package/dist/ui/src/components/ui/attachment/attachment.d.ts +23 -0
  72. package/dist/ui/src/components/ui/attachment/index.d.ts +1 -0
  73. package/dist/ui/src/components/ui/avatar/avatar.d.ts +10 -0
  74. package/dist/ui/src/components/ui/avatar/index.d.ts +1 -0
  75. package/dist/ui/src/components/ui/badge/badge.d.ts +7 -0
  76. package/dist/ui/src/components/ui/badge/index.d.ts +1 -0
  77. package/dist/ui/src/components/ui/breadcrumb/breadcrumb.d.ts +9 -0
  78. package/dist/ui/src/components/ui/breadcrumb/index.d.ts +1 -0
  79. package/dist/ui/src/components/ui/bubble/bubble.d.ts +16 -0
  80. package/dist/ui/src/components/ui/bubble/index.d.ts +1 -0
  81. package/dist/ui/src/components/ui/button/button.behavior.test.d.ts +8 -0
  82. package/dist/ui/src/components/ui/button/button.d.ts +7 -0
  83. package/dist/ui/src/components/ui/button/index.d.ts +1 -0
  84. package/dist/ui/src/components/ui/button-group/button-group.d.ts +12 -0
  85. package/dist/ui/src/components/ui/button-group/index.d.ts +1 -0
  86. package/dist/ui/src/components/ui/calendar/calendar.d.ts +9 -0
  87. package/dist/ui/src/components/ui/calendar/index.d.ts +1 -0
  88. package/dist/ui/src/components/ui/card/card.d.ts +10 -0
  89. package/dist/ui/src/components/ui/card/index.d.ts +1 -0
  90. package/dist/ui/src/components/ui/carousel/carousel.d.ts +28 -0
  91. package/dist/ui/src/components/ui/carousel/index.d.ts +3 -0
  92. package/dist/ui/src/components/ui/chart/chart.d.ts +44 -0
  93. package/dist/ui/src/components/ui/chart/index.d.ts +3 -0
  94. package/dist/ui/src/components/ui/checkbox/checkbox.d.ts +2 -0
  95. package/dist/ui/src/components/ui/checkbox/index.d.ts +1 -0
  96. package/dist/ui/src/components/ui/collapsible/collapsible.d.ts +4 -0
  97. package/dist/ui/src/components/ui/collapsible/index.d.ts +1 -0
  98. package/dist/ui/src/components/ui/combobox/combobox.d.ts +15 -0
  99. package/dist/ui/src/components/ui/combobox/index.d.ts +1 -0
  100. package/dist/ui/src/components/ui/command/command.d.ts +34 -0
  101. package/dist/ui/src/components/ui/command/index.d.ts +1 -0
  102. package/dist/ui/src/components/ui/context-menu/context-menu.d.ts +28 -0
  103. package/dist/ui/src/components/ui/context-menu/index.d.ts +1 -0
  104. package/dist/ui/src/components/ui/dialog/dialog.d.ts +16 -0
  105. package/dist/ui/src/components/ui/dialog/index.d.ts +1 -0
  106. package/dist/ui/src/components/ui/direction/direction.d.ts +1 -0
  107. package/dist/ui/src/components/ui/direction/index.d.ts +1 -0
  108. package/dist/ui/src/components/ui/drawer/drawer.d.ts +15 -0
  109. package/dist/ui/src/components/ui/drawer/index.d.ts +1 -0
  110. package/dist/ui/src/components/ui/dropdown-menu/dropdown-menu.d.ts +39 -0
  111. package/dist/ui/src/components/ui/dropdown-menu/index.d.ts +1 -0
  112. package/dist/ui/src/components/ui/empty/empty.d.ts +11 -0
  113. package/dist/ui/src/components/ui/empty/index.d.ts +1 -0
  114. package/dist/ui/src/components/ui/field/field.d.ts +5 -0
  115. package/dist/ui/src/components/ui/field/index.d.ts +1 -0
  116. package/dist/ui/src/components/ui/hover-card/hover-card.d.ts +4 -0
  117. package/dist/ui/src/components/ui/hover-card/index.d.ts +1 -0
  118. package/dist/ui/src/components/ui/indicator/index.d.ts +1 -0
  119. package/dist/ui/src/components/ui/indicator/indicator.d.ts +10 -0
  120. package/dist/ui/src/components/ui/input/index.d.ts +1 -0
  121. package/dist/ui/src/components/ui/input/input.d.ts +2 -0
  122. package/dist/ui/src/components/ui/input-group/index.d.ts +1 -0
  123. package/dist/ui/src/components/ui/input-group/input-group.d.ts +26 -0
  124. package/dist/ui/src/components/ui/input-otp/index.d.ts +1 -0
  125. package/dist/ui/src/components/ui/input-otp/input-otp.d.ts +10 -0
  126. package/dist/ui/src/components/ui/item/index.d.ts +1 -0
  127. package/dist/ui/src/components/ui/item/item.d.ts +22 -0
  128. package/dist/ui/src/components/ui/kbd/index.d.ts +1 -0
  129. package/dist/ui/src/components/ui/kbd/kbd.d.ts +2 -0
  130. package/dist/ui/src/components/ui/label/index.d.ts +1 -0
  131. package/dist/ui/src/components/ui/label/label.d.ts +2 -0
  132. package/dist/ui/src/components/ui/marker/index.d.ts +1 -0
  133. package/dist/ui/src/components/ui/marker/marker.d.ts +9 -0
  134. package/dist/ui/src/components/ui/menubar/index.d.ts +1 -0
  135. package/dist/ui/src/components/ui/menubar/menubar.d.ts +28 -0
  136. package/dist/ui/src/components/ui/message/index.d.ts +1 -0
  137. package/dist/ui/src/components/ui/message/message.d.ts +9 -0
  138. package/dist/ui/src/components/ui/message-scroller/index.d.ts +1 -0
  139. package/dist/ui/src/components/ui/message-scroller/message-scroller.d.ts +10 -0
  140. package/dist/ui/src/components/ui/native-select/index.d.ts +1 -0
  141. package/dist/ui/src/components/ui/native-select/native-select.d.ts +8 -0
  142. package/dist/ui/src/components/ui/navigation-menu/index.d.ts +1 -0
  143. package/dist/ui/src/components/ui/navigation-menu/navigation-menu.d.ts +10 -0
  144. package/dist/ui/src/components/ui/pagination/index.d.ts +1 -0
  145. package/dist/ui/src/components/ui/pagination/pagination.behavior.test.d.ts +1 -0
  146. package/dist/ui/src/components/ui/pagination/pagination.d.ts +18 -0
  147. package/dist/ui/src/components/ui/pagination/pagination.test.d.ts +1 -0
  148. package/dist/ui/src/components/ui/popover/index.d.ts +1 -0
  149. package/dist/ui/src/components/ui/popover/popover.d.ts +8 -0
  150. package/dist/ui/src/components/ui/progress/index.d.ts +1 -0
  151. package/dist/ui/src/components/ui/progress/progress.behavior.test.d.ts +8 -0
  152. package/dist/ui/src/components/ui/progress/progress.d.ts +47 -0
  153. package/dist/ui/src/components/ui/questionnaire/index.d.ts +1 -0
  154. package/dist/ui/src/components/ui/questionnaire/questionnaire.d.ts +18 -0
  155. package/dist/ui/src/components/ui/radio-group/index.d.ts +1 -0
  156. package/dist/ui/src/components/ui/radio-group/radio-group.d.ts +10 -0
  157. package/dist/ui/src/components/ui/resizable/index.d.ts +1 -0
  158. package/dist/ui/src/components/ui/resizable/resizable.d.ts +6 -0
  159. package/dist/ui/src/components/ui/scroll-area/index.d.ts +1 -0
  160. package/dist/ui/src/components/ui/scroll-area/scroll-area.behavior.test.d.ts +12 -0
  161. package/dist/ui/src/components/ui/scroll-area/scroll-area.d.ts +85 -0
  162. package/dist/ui/src/components/ui/select/index.d.ts +1 -0
  163. package/dist/ui/src/components/ui/select/select.d.ts +17 -0
  164. package/dist/ui/src/components/ui/separator/index.d.ts +1 -0
  165. package/dist/ui/src/components/ui/separator/separator.behavior.test.d.ts +14 -0
  166. package/dist/ui/src/components/ui/separator/separator.d.ts +16 -0
  167. package/dist/ui/src/components/ui/sheet/index.d.ts +1 -0
  168. package/dist/ui/src/components/ui/sheet/sheet.d.ts +13 -0
  169. package/dist/ui/src/components/ui/sidebar/index.d.ts +1 -0
  170. package/dist/ui/src/components/ui/sidebar/sidebar.d.ts +63 -0
  171. package/dist/ui/src/components/ui/skeleton/index.d.ts +1 -0
  172. package/dist/ui/src/components/ui/skeleton/skeleton.d.ts +1 -0
  173. package/dist/ui/src/components/ui/slider/index.d.ts +1 -0
  174. package/dist/ui/src/components/ui/slider/slider.d.ts +17 -0
  175. package/dist/ui/src/components/ui/spinner/index.d.ts +1 -0
  176. package/dist/ui/src/components/ui/spinner/spinner.d.ts +5 -0
  177. package/dist/ui/src/components/ui/switch/index.d.ts +1 -0
  178. package/dist/ui/src/components/ui/switch/switch.d.ts +4 -0
  179. package/dist/ui/src/components/ui/table/index.d.ts +1 -0
  180. package/dist/ui/src/components/ui/table/table.behavior.test.d.ts +9 -0
  181. package/dist/ui/src/components/ui/table/table.d.ts +9 -0
  182. package/dist/ui/src/components/ui/tabs/index.d.ts +1 -0
  183. package/dist/ui/src/components/ui/tabs/tabs.behavior.test.d.ts +21 -0
  184. package/dist/ui/src/components/ui/tabs/tabs.d.ts +36 -0
  185. package/dist/ui/src/components/ui/textarea/index.d.ts +1 -0
  186. package/dist/ui/src/components/ui/textarea/textarea.d.ts +2 -0
  187. package/dist/ui/src/components/ui/toast/index.d.ts +1 -0
  188. package/dist/ui/src/components/ui/toast/toast.d.ts +15 -0
  189. package/dist/ui/src/components/ui/toggle/index.d.ts +1 -0
  190. package/dist/ui/src/components/ui/toggle/toggle.d.ts +8 -0
  191. package/dist/ui/src/components/ui/toggle-group/index.d.ts +1 -0
  192. package/dist/ui/src/components/ui/toggle-group/toggle-group.d.ts +7 -0
  193. package/dist/ui/src/components/ui/tooltip/index.d.ts +1 -0
  194. package/dist/ui/src/components/ui/tooltip/tooltip.d.ts +5 -0
  195. package/dist/ui/src/hooks/use-media-player.d.ts +29 -0
  196. package/dist/ui/src/hooks/use-merged-refs.d.ts +4 -0
  197. package/dist/ui/src/hooks/use-mobile.d.ts +1 -0
  198. package/dist/ui/src/index.d.ts +74 -0
  199. package/dist/ui/src/lib/first-weekday.d.ts +6 -0
  200. package/dist/ui/src/lib/first-weekday.test.d.ts +1 -0
  201. package/dist/ui/src/lib/focus-ring.test.d.ts +8 -0
  202. package/dist/ui/src/lib/popup-list.d.ts +47 -0
  203. package/dist/ui/src/lib/popup-list.test.d.ts +10 -0
  204. package/dist/ui/src/lib/utils.d.ts +13 -0
  205. package/package.json +95 -4
package/dist/index.js ADDED
@@ -0,0 +1,4512 @@
1
+ import { a as PopoverHeader, c as Button, d as cssLength, i as PopoverDescription, l as buttonVariants, n as Popover, o as PopoverTitle, r as PopoverContent, s as PopoverTrigger, t as Input, u as cn } from "./chunks/input-syWxjY2U.js";
2
+ import { a as useIsMobile, n as dateToDay, o as Calendar, r as dayToDate, s as CalendarDayButton, t as DateRangePicker } from "./chunks/date-range-picker-CWVcHgy2.js";
3
+ import { A as useMergedRefs, C as RICH_TEXT_ELEMENTS, D as popupItemClass, E as POPUP_ITEM_INDICATOR_CLASS, O as ScrollArea, S as RICH_TEXT_ATTRIBUTES, T as isAllowedRichTextHref, _ as DropdownMenuTrigger, a as DropdownMenuContent, b as RichTextContent, c as DropdownMenuLabel, d as DropdownMenuRadioItem, f as DropdownMenuSeparator, g as DropdownMenuSubTrigger, h as DropdownMenuSubContent, i as DropdownMenuCheckboxItem, k as ScrollBar, l as DropdownMenuPortal, m as DropdownMenuSub, n as toggleVariants, o as DropdownMenuGroup, p as DropdownMenuShortcut, r as DropdownMenu, s as DropdownMenuItem, t as Toggle, u as DropdownMenuRadioGroup, v as RICH_TEXT_BODY_CLASS, w as RICH_TEXT_LINK_PROTOCOLS, x as richTextToNodes, y as RICH_TEXT_MENTION_CLASS } from "./chunks/toggle-CVnIkJVC.js";
4
+ import * as React from "react";
5
+ import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
6
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
+ import { cva } from "class-variance-authority";
8
+ import { Slider as Slider$1 } from "@base-ui/react/slider";
9
+ import { IconAlertOctagon, IconAlertTriangle, IconArrowDown, IconCheck, IconChevronDown, IconChevronLeft, IconChevronRight, IconCircleCheck, IconDots, IconInfoCircle, IconLayoutSidebar, IconLoader, IconMaximize, IconMinus, IconPlayerPauseFilled, IconPlayerPlayFilled, IconSearch, IconSelector, IconVolume, IconVolumeOff, IconX } from "@tabler/icons-react";
10
+ import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
11
+ import { Combobox as Combobox$1 } from "@base-ui/react/combobox";
12
+ import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
13
+ import { useVirtualizer } from "@tanstack/react-virtual";
14
+ import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
15
+ import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
16
+ import { mergeProps } from "@base-ui/react/merge-props";
17
+ import { useRender } from "@base-ui/react/use-render";
18
+ import useEmblaCarousel from "embla-carousel-react";
19
+ import * as RechartsPrimitive from "recharts";
20
+ import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
21
+ import { Collapsible as Collapsible$1 } from "@base-ui/react/collapsible";
22
+ import { Command as Command$1 } from "cmdk";
23
+ import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
24
+ import { ContextMenu as ContextMenu$1 } from "@base-ui/react/context-menu";
25
+ import { DirectionProvider, useDirection } from "@base-ui/react/direction-provider";
26
+ import { Menu } from "@base-ui/react/menu";
27
+ import { Field as Field$1 } from "@base-ui/react/field";
28
+ import { PreviewCard } from "@base-ui/react/preview-card";
29
+ import { OTPInput, OTPInputContext } from "input-otp";
30
+ import { Separator as Separator$1 } from "@base-ui/react/separator";
31
+ import { Menubar as Menubar$1 } from "@base-ui/react/menubar";
32
+ import { MessageScroller as MessageScroller$1, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
33
+ import { NavigationMenu as NavigationMenu$1 } from "@base-ui/react/navigation-menu";
34
+ import { Progress as Progress$1 } from "@base-ui/react/progress";
35
+ import { Questionnaire as Questionnaire$1 } from "@shadcn/react/questionnaire";
36
+ import { Radio } from "@base-ui/react/radio";
37
+ import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
38
+ import * as ResizablePrimitive from "react-resizable-panels";
39
+ import { Select as Select$1 } from "@base-ui/react/select";
40
+ import { Switch as Switch$1 } from "@base-ui/react/switch";
41
+ import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
42
+ import { Toast as Toast$1 } from "@base-ui/react/toast";
43
+ import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
44
+ import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
45
+ //#region ../ui/src/components/edyn/animated-number/animated-number.tsx
46
+ var DURATION = 800;
47
+ var easeInOutCubic = (t) => t < .5 ? 4 * t ** 3 : 1 - (-2 * t + 2) ** 3 / 2;
48
+ var reducedMotion$1 = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches;
49
+ var NUMBER = new Intl.NumberFormat("en-GB");
50
+ /** Thousands separated, rounded to a whole number: the default way a count reads. */
51
+ var formatCount = (value) => NUMBER.format(Math.round(value) || 0);
52
+ var useSeen = (element) => {
53
+ const [seen, setSeen] = useState(() => typeof IntersectionObserver === "undefined");
54
+ useEffect(() => {
55
+ const target = element.current;
56
+ if (seen || target === null) return;
57
+ const observer = new IntersectionObserver((entries) => {
58
+ if (entries.some((entry) => entry.isIntersecting)) {
59
+ setSeen(true);
60
+ observer.disconnect();
61
+ }
62
+ });
63
+ observer.observe(target);
64
+ return () => observer.disconnect();
65
+ }, [element, seen]);
66
+ return seen;
67
+ };
68
+ /**
69
+ * The values to show for `targets` this frame, all on one clock and one curve, so a
70
+ * count and its bar move together. They start from 0 and move once `element` has
71
+ * been on screen.
72
+ */
73
+ var useAnimatedValues = (targets, element) => {
74
+ const seen = useSeen(element);
75
+ const [shown, setShown] = useState(() => targets.map(() => 0));
76
+ const refCurrent = useRef(shown);
77
+ const key = targets.join(",");
78
+ useEffect(() => {
79
+ if (!seen) return;
80
+ const goal = key.split(",").map(Number);
81
+ const from = goal.map((_, index) => refCurrent.current[index] ?? 0);
82
+ if (from.every((value, index) => value === goal[index])) return;
83
+ if (reducedMotion$1()) {
84
+ refCurrent.current = goal;
85
+ setShown(goal);
86
+ return;
87
+ }
88
+ const start = performance.now();
89
+ let frame = 0;
90
+ const tick = (now) => {
91
+ const progress = Math.min(1, (now - start) / DURATION);
92
+ const eased = easeInOutCubic(progress);
93
+ const next = progress === 1 ? goal : goal.map((value, index) => (from[index] ?? 0) + (value - (from[index] ?? 0)) * eased);
94
+ refCurrent.current = next;
95
+ setShown(next);
96
+ if (progress < 1) frame = requestAnimationFrame(tick);
97
+ };
98
+ frame = requestAnimationFrame(tick);
99
+ return () => cancelAnimationFrame(frame);
100
+ }, [key, seen]);
101
+ return shown;
102
+ };
103
+ /**
104
+ * A number that moves to its new value. Its width holds the widest of where it starts
105
+ * and where it lands, in tabular figures, so nothing beside it moves while the digits
106
+ * change. Assistive technology reads only the final value.
107
+ */
108
+ var AnimatedNumber = ({ value, format = formatCount, className, ...props }) => {
109
+ const refElement = useRef(null);
110
+ const [shown = 0] = useAnimatedValues([value], refElement);
111
+ return /* @__PURE__ */ jsx(NumberText, {
112
+ element: refElement,
113
+ shown,
114
+ value,
115
+ format,
116
+ className,
117
+ ...props
118
+ });
119
+ };
120
+ /** The text of a moving number: what it shows now, held at its widest, with the final value for assistive technology. */
121
+ var NumberText = ({ element, shown, value, format = formatCount, className, ...props }) => {
122
+ const now = format(shown);
123
+ const final = format(value);
124
+ const widest = now.length > final.length ? now : final;
125
+ return /* @__PURE__ */ jsxs("span", {
126
+ "data-slot": "animated-number",
127
+ ...props,
128
+ ref: element,
129
+ className,
130
+ children: [/* @__PURE__ */ jsxs("span", {
131
+ "aria-hidden": "true",
132
+ className: "inline-grid tabular-nums",
133
+ children: [/* @__PURE__ */ jsx("span", {
134
+ "data-ghost": widest,
135
+ className: "invisible col-start-1 row-start-1 ghost-text"
136
+ }), /* @__PURE__ */ jsx("span", {
137
+ "data-slot": "animated-number-value",
138
+ className: "col-start-1 row-start-1",
139
+ children: now
140
+ })]
141
+ }), /* @__PURE__ */ jsx("span", {
142
+ className: "sr-only",
143
+ children: final
144
+ })]
145
+ });
146
+ };
147
+ //#endregion
148
+ //#region ../ui/src/components/ui/slider/slider.tsx
149
+ var Slider = ({ className, value, defaultValue, min, max, step, disabled, onValueChange, onValueCommitted, name, minStepsBetweenValues, "aria-label": ariaLabel, ...props }) => {
150
+ const thumbValues = Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [value ?? defaultValue ?? min ?? 0];
151
+ const thumbs = Array.from({ length: thumbValues.length }, (_, index) => ({
152
+ id: `thumb-${index}`,
153
+ index
154
+ }));
155
+ return /* @__PURE__ */ jsx(Slider$1.Root, {
156
+ "data-slot": "slider",
157
+ className: cn("relative flex w-full touch-none items-center", className),
158
+ value,
159
+ defaultValue,
160
+ min,
161
+ max,
162
+ step,
163
+ disabled,
164
+ onValueChange,
165
+ onValueCommitted,
166
+ name,
167
+ minStepsBetweenValues,
168
+ thumbAlignment: "edge",
169
+ "aria-label": ariaLabel,
170
+ ...props,
171
+ children: /* @__PURE__ */ jsxs(Slider$1.Control, {
172
+ "data-slot": "slider-control",
173
+ className: "relative flex w-full cursor-pointer touch-none items-center py-3 data-disabled:cursor-not-allowed data-disabled:opacity-50",
174
+ children: [/* @__PURE__ */ jsx(Slider$1.Track, {
175
+ "data-slot": "slider-track",
176
+ className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-muted",
177
+ children: /* @__PURE__ */ jsx(Slider$1.Indicator, {
178
+ "data-slot": "slider-indicator",
179
+ className: "absolute h-full bg-primary"
180
+ })
181
+ }), thumbs.map((thumb) => /* @__PURE__ */ jsx(Slider$1.Thumb, {
182
+ index: thumb.index,
183
+ getAriaLabel: ariaLabel ? () => thumbValues.length > 1 ? `${ariaLabel} ${thumb.index + 1}` : ariaLabel : void 0,
184
+ "data-slot": "slider-thumb",
185
+ className: "relative block size-4 shrink-0 rounded-full border border-primary/50 bg-background shadow-sm outline-none transition-colors after:absolute after:-inset-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 data-disabled:pointer-events-none data-disabled:opacity-50"
186
+ }, thumb.id))]
187
+ })
188
+ });
189
+ };
190
+ //#endregion
191
+ //#region ../ui/src/hooks/use-media-player.ts
192
+ /** `0:00` for anything that is not a finite, non-negative number, so a loading or errored source still renders. */
193
+ var formatMediaTime = (seconds) => {
194
+ if (!Number.isFinite(seconds) || seconds < 0) return "0:00";
195
+ const whole = Math.floor(seconds);
196
+ const hours = Math.floor(whole / 3600);
197
+ const minutes = Math.floor(whole % 3600 / 60);
198
+ const rest = whole % 60;
199
+ const padded = `${String(rest).padStart(2, "0")}`;
200
+ if (hours > 0) return `${hours}:${String(minutes).padStart(2, "0")}:${padded}`;
201
+ return `${minutes}:${padded}`;
202
+ };
203
+ /**
204
+ * Shared playback engine for the Audio and Video players. Both wrap the same
205
+ * HTMLMediaElement API, so the state machine lives here once and each component
206
+ * owns only its own layout and controls.
207
+ */
208
+ var useMediaPlayer = (options = {}) => {
209
+ const { onPlay, onPause, onEnded, onTimeUpdate } = options;
210
+ const refMedia = React.useRef(null);
211
+ const [state, setState] = React.useState({
212
+ playing: false,
213
+ currentTime: 0,
214
+ duration: 0,
215
+ volume: 1,
216
+ muted: false
217
+ });
218
+ React.useEffect(() => {
219
+ const media = refMedia.current;
220
+ if (!media) return;
221
+ const syncMeta = () => {
222
+ setState((previous) => ({
223
+ ...previous,
224
+ duration: Number.isFinite(media.duration) ? media.duration : 0,
225
+ volume: media.volume,
226
+ muted: media.muted
227
+ }));
228
+ };
229
+ const handlePlay = () => {
230
+ setState((previous) => ({
231
+ ...previous,
232
+ playing: true
233
+ }));
234
+ onPlay?.();
235
+ };
236
+ const handlePause = () => {
237
+ setState((previous) => ({
238
+ ...previous,
239
+ playing: false
240
+ }));
241
+ onPause?.();
242
+ };
243
+ const handleEnded = () => {
244
+ setState((previous) => ({
245
+ ...previous,
246
+ playing: false
247
+ }));
248
+ onEnded?.();
249
+ };
250
+ const handleTimeUpdate = () => {
251
+ setState((previous) => ({
252
+ ...previous,
253
+ currentTime: media.currentTime
254
+ }));
255
+ onTimeUpdate?.(media.currentTime, Number.isFinite(media.duration) ? media.duration : 0);
256
+ };
257
+ const handleVolumeChange = () => {
258
+ setState((previous) => ({
259
+ ...previous,
260
+ volume: media.volume,
261
+ muted: media.muted
262
+ }));
263
+ };
264
+ syncMeta();
265
+ media.addEventListener("loadedmetadata", syncMeta);
266
+ media.addEventListener("durationchange", syncMeta);
267
+ media.addEventListener("play", handlePlay);
268
+ media.addEventListener("pause", handlePause);
269
+ media.addEventListener("ended", handleEnded);
270
+ media.addEventListener("timeupdate", handleTimeUpdate);
271
+ media.addEventListener("volumechange", handleVolumeChange);
272
+ return () => {
273
+ media.removeEventListener("loadedmetadata", syncMeta);
274
+ media.removeEventListener("durationchange", syncMeta);
275
+ media.removeEventListener("play", handlePlay);
276
+ media.removeEventListener("pause", handlePause);
277
+ media.removeEventListener("ended", handleEnded);
278
+ media.removeEventListener("timeupdate", handleTimeUpdate);
279
+ media.removeEventListener("volumechange", handleVolumeChange);
280
+ };
281
+ }, [
282
+ onPlay,
283
+ onPause,
284
+ onEnded,
285
+ onTimeUpdate
286
+ ]);
287
+ const toggle = React.useCallback(() => {
288
+ const media = refMedia.current;
289
+ if (!media) return;
290
+ if (media.paused) {
291
+ media.play().catch(() => void 0);
292
+ return;
293
+ }
294
+ media.pause();
295
+ }, []);
296
+ const seek = React.useCallback((seconds) => {
297
+ const media = refMedia.current;
298
+ if (!media || !Number.isFinite(seconds)) return;
299
+ media.currentTime = seconds;
300
+ setState((previous) => ({
301
+ ...previous,
302
+ currentTime: seconds
303
+ }));
304
+ }, []);
305
+ const changeVolume = React.useCallback((volume) => {
306
+ const media = refMedia.current;
307
+ if (!media || !Number.isFinite(volume)) return;
308
+ const next = Math.min(1, Math.max(0, volume));
309
+ media.volume = next;
310
+ media.muted = next === 0;
311
+ }, []);
312
+ const toggleMute = React.useCallback(() => {
313
+ const media = refMedia.current;
314
+ if (!media) return;
315
+ media.muted = !media.muted;
316
+ }, []);
317
+ return {
318
+ ...state,
319
+ refMedia,
320
+ toggle,
321
+ seek,
322
+ changeVolume,
323
+ toggleMute
324
+ };
325
+ };
326
+ //#endregion
327
+ //#region ../ui/src/components/edyn/audio-player/audio-player.tsx
328
+ /**
329
+ * Compact inline media control for audio content: play/pause, elapsed and total
330
+ * time, a seekable timeline, and volume. Four elements in one rounded row, per
331
+ * the design-system anatomy.
332
+ */
333
+ var AudioPlayer = ({ src, muted = false, loop = false, disabled = false, width, className, "aria-label": ariaLabel = "Audio player", style, onPlay, onPause, onEnded, onTimeUpdate, ...props }) => {
334
+ const { refMedia, playing, currentTime, duration, muted: isMuted, toggle, seek, toggleMute } = useMediaPlayer({
335
+ onPlay,
336
+ onPause,
337
+ onEnded,
338
+ onTimeUpdate
339
+ });
340
+ const PlaybackIcon = playing ? IconPlayerPauseFilled : IconPlayerPlayFilled;
341
+ const VolumeIcon = isMuted ? IconVolumeOff : IconVolume;
342
+ return /* @__PURE__ */ jsxs("div", {
343
+ "data-slot": "audio-player",
344
+ "data-playing": playing || void 0,
345
+ role: "group",
346
+ ...props,
347
+ "aria-label": ariaLabel,
348
+ style: {
349
+ width: cssLength(width),
350
+ ...style
351
+ },
352
+ className: cn("flex h-12 w-full items-center gap-2 rounded-lg bg-muted px-3 py-1.5", className),
353
+ children: [
354
+ /* @__PURE__ */ jsx(Button, {
355
+ type: "button",
356
+ variant: "ghost",
357
+ size: "icon",
358
+ disabled,
359
+ "aria-label": playing ? "Pause" : "Play",
360
+ onClick: toggle,
361
+ children: /* @__PURE__ */ jsx(PlaybackIcon, {})
362
+ }),
363
+ /* @__PURE__ */ jsxs("span", {
364
+ "data-slot": "audio-player-time",
365
+ className: "shrink-0 text-xs tabular-nums text-foreground/70",
366
+ children: [
367
+ formatMediaTime(currentTime),
368
+ " / ",
369
+ formatMediaTime(duration)
370
+ ]
371
+ }),
372
+ /* @__PURE__ */ jsx(Slider, {
373
+ className: "flex-1 [&_[data-slot=slider-control]]:py-1.5 [&_[data-slot=slider-thumb]]:size-3 [&_[data-slot=slider-track]]:h-1 [&_[data-slot=slider-track]]:bg-foreground/15",
374
+ value: Math.min(currentTime, duration || 0),
375
+ min: 0,
376
+ max: duration || 0,
377
+ step: 1,
378
+ disabled: disabled || duration === 0,
379
+ "aria-label": "Seek",
380
+ onValueChange: (next) => {
381
+ seek(next);
382
+ }
383
+ }),
384
+ /* @__PURE__ */ jsx(Button, {
385
+ type: "button",
386
+ variant: "ghost",
387
+ size: "icon",
388
+ disabled,
389
+ "aria-label": isMuted ? "Unmute" : "Mute",
390
+ onClick: toggleMute,
391
+ children: /* @__PURE__ */ jsx(VolumeIcon, {})
392
+ }),
393
+ /* @__PURE__ */ jsx("audio", {
394
+ ref: refMedia,
395
+ src,
396
+ muted,
397
+ loop,
398
+ preload: "metadata"
399
+ })
400
+ ]
401
+ });
402
+ };
403
+ //#endregion
404
+ //#region ../ui/src/components/ui/avatar/avatar.tsx
405
+ var Avatar = ({ className, size = "default", ...props }) => {
406
+ return /* @__PURE__ */ jsx(Avatar$1.Root, {
407
+ "data-slot": "avatar",
408
+ "data-size": size,
409
+ className: cn("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten", className),
410
+ ...props
411
+ });
412
+ };
413
+ var AvatarImage = ({ className, ...props }) => {
414
+ return /* @__PURE__ */ jsx(Avatar$1.Image, {
415
+ "data-slot": "avatar-image",
416
+ className: cn("aspect-square size-full rounded-full object-cover", className),
417
+ ...props
418
+ });
419
+ };
420
+ var AvatarFallback = ({ className, ...props }) => {
421
+ return /* @__PURE__ */ jsx(Avatar$1.Fallback, {
422
+ "data-slot": "avatar-fallback",
423
+ className: cn("flex size-full items-center justify-center rounded-full bg-muted text-sm text-foreground/70 group-data-[size=sm]/avatar:text-xs", className),
424
+ ...props
425
+ });
426
+ };
427
+ var AvatarBadge = ({ className, ...props }) => {
428
+ return /* @__PURE__ */ jsx("span", {
429
+ "data-slot": "avatar-badge",
430
+ className: cn("absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", className),
431
+ ...props
432
+ });
433
+ };
434
+ var AvatarGroup = ({ className, ...props }) => {
435
+ return /* @__PURE__ */ jsx("div", {
436
+ "data-slot": "avatar-group",
437
+ className: cn("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background", className),
438
+ ...props
439
+ });
440
+ };
441
+ var AvatarGroupCount = ({ className, ...props }) => {
442
+ return /* @__PURE__ */ jsx("div", {
443
+ "data-slot": "avatar-group-count",
444
+ className: cn("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-foreground/70 ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3", className),
445
+ ...props
446
+ });
447
+ };
448
+ //#endregion
449
+ //#region ../ui/src/components/edyn/initials-avatar/initials-avatar.tsx
450
+ /** How many colour pairs the theme defines (--avatar-1-bg, --avatar-1-fg ... in @edyn/theme tokens.css). */
451
+ var AVATAR_TONES = 12;
452
+ /**
453
+ * The palette entry the text gets, from 1: the same text always gets the same one.
454
+ * FNV-1a, because a plain multiply-and-add hash puts two letters on a few entries
455
+ * only (it reduces to 7 x first + second, modulo 12).
456
+ */
457
+ var avatarTone = (text) => {
458
+ let hash = 2166136261;
459
+ for (const character of text) {
460
+ hash ^= character.codePointAt(0) ?? 0;
461
+ hash = Math.imul(hash, 16777619);
462
+ }
463
+ hash ^= hash >>> 16;
464
+ hash = Math.imul(hash, 2246822507);
465
+ hash ^= hash >>> 13;
466
+ hash = Math.imul(hash, 3266489909);
467
+ hash ^= hash >>> 16;
468
+ return (hash >>> 0) % 12 + 1;
469
+ };
470
+ /** Up to two initials, upper-cased: the first letter of the first two words. */
471
+ var initialsOf = (name) => name.split(/\s+/).filter((part) => part !== "").slice(0, 2).map((part) => Array.from(part)[0]?.toUpperCase() ?? "").join("");
472
+ /**
473
+ * The circle and its letters together, so the initials always fit. The font size
474
+ * is inline rather than a class on purpose: 9px and 15px are not on Tailwind's
475
+ * type scale, a custom `text-*` token would be read by tailwind-merge as a colour
476
+ * and could drop the wrong class, and an inline size cannot be fought by the
477
+ * fallback's own `text-sm`.
478
+ */
479
+ var SIZES = {
480
+ xs: {
481
+ box: "size-5",
482
+ fontSize: 9
483
+ },
484
+ sm: {
485
+ box: "size-6",
486
+ fontSize: 10
487
+ },
488
+ md: {
489
+ box: "size-8",
490
+ fontSize: 12
491
+ },
492
+ lg: {
493
+ box: "size-10",
494
+ fontSize: 15
495
+ }
496
+ };
497
+ /** A person's photo, or their initials on a circle in the palette colour they pick; both themes switch by themselves. */
498
+ var InitialsAvatar = ({ name, photoUrl, size = "md", className, autoColor = true, label, "aria-label": ariaLabel, ...props }) => {
499
+ const initials = initialsOf(name);
500
+ const tone = avatarTone(initials);
501
+ const { box, fontSize } = SIZES[size];
502
+ const style = autoColor ? {
503
+ fontSize,
504
+ backgroundColor: `var(--avatar-${tone}-bg)`,
505
+ color: `var(--avatar-${tone}-fg)`
506
+ } : { fontSize };
507
+ const accessibleName = label ?? ariaLabel;
508
+ const a11y = accessibleName === void 0 ? { "aria-hidden": true } : {
509
+ role: "img",
510
+ "aria-label": accessibleName
511
+ };
512
+ return /* @__PURE__ */ jsxs(Avatar, {
513
+ "data-slot": "initials-avatar",
514
+ ...props,
515
+ "data-tone": autoColor ? tone : void 0,
516
+ className: cn(box, className),
517
+ ...a11y,
518
+ children: [photoUrl != null && /* @__PURE__ */ jsx(AvatarImage, {
519
+ src: photoUrl,
520
+ alt: ""
521
+ }), /* @__PURE__ */ jsx(AvatarFallback, {
522
+ style,
523
+ className: "leading-none font-semibold tracking-tight",
524
+ children: initials
525
+ })]
526
+ });
527
+ };
528
+ //#endregion
529
+ //#region ../ui/src/components/ui/tooltip/tooltip.tsx
530
+ var TooltipProvider = ({ delay = 0, ...props }) => {
531
+ return /* @__PURE__ */ jsx(Tooltip$1.Provider, {
532
+ "data-slot": "tooltip-provider",
533
+ delay,
534
+ ...props
535
+ });
536
+ };
537
+ var Tooltip = ({ ...props }) => {
538
+ return /* @__PURE__ */ jsx(Tooltip$1.Root, {
539
+ "data-slot": "tooltip",
540
+ ...props
541
+ });
542
+ };
543
+ var TooltipTrigger = ({ ...props }) => {
544
+ return /* @__PURE__ */ jsx(Tooltip$1.Trigger, {
545
+ "data-slot": "tooltip-trigger",
546
+ ...props
547
+ });
548
+ };
549
+ var TooltipContent = ({ className, side = "top", sideOffset = 4, align = "center", alignOffset = 0, children, ...props }) => {
550
+ return /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
551
+ align,
552
+ alignOffset,
553
+ side,
554
+ sideOffset,
555
+ className: "isolate z-50",
556
+ children: /* @__PURE__ */ jsxs(Tooltip$1.Popup, {
557
+ "data-slot": "tooltip-content",
558
+ className: cn("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", "motion-reduce:animate-none", className),
559
+ ...props,
560
+ children: [children, /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })]
561
+ })
562
+ }) });
563
+ };
564
+ //#endregion
565
+ //#region ../ui/src/components/edyn/multi-select/multi-select.tsx
566
+ var DEFAULT_MULTI_SELECT_LABELS = {
567
+ noMatches: "No matches.",
568
+ loading: "Loading…",
569
+ error: "Could not load the options.",
570
+ retry: "Try again",
571
+ loadMore: "Load more",
572
+ loadingMore: "Loading…",
573
+ clear: "Clear",
574
+ selectedCount: (count) => `${count} selected`
575
+ };
576
+ /** Above this many options a list draws only the rows on screen. */
577
+ var VIRTUALIZE_FROM = 100;
578
+ var ITEM_HEIGHT = 32;
579
+ /**
580
+ * The options behind the chosen values, in the order they were chosen. A value with no
581
+ * known option is kept and shown as itself rather than dropped: a selection must never
582
+ * change just because a list did.
583
+ */
584
+ var resolveChosen = (value, options, selectedOptions = []) => {
585
+ const known = /* @__PURE__ */ new Map();
586
+ for (const option of [...selectedOptions, ...options]) known.set(option.value, option);
587
+ return value.map((entry) => known.get(entry) ?? {
588
+ value: entry,
589
+ label: entry
590
+ });
591
+ };
592
+ /** What the trigger says: the placeholder, the one picked, or a count. */
593
+ var summarize = (chosen, placeholder, labels, summary = "selection") => {
594
+ if (chosen.length === 0) return placeholder;
595
+ if (summary === "label") return labels.selectedCount(chosen.length);
596
+ return chosen.length === 1 ? chosen[0]?.label ?? "" : labels.selectedCount(chosen.length);
597
+ };
598
+ /** Every chosen name, for a tooltip on a trigger whose text is cut. With `label` the names are not shown, so it is the text itself. */
599
+ var fullSelection = (chosen, placeholder, labels, summary = "selection") => summary === "selection" && chosen.length > 0 ? chosen.map((option) => option.label).join(", ") : summarize(chosen, placeholder, labels, summary);
600
+ var POPUP = "flex max-h-(--available-height) w-(--anchor-width) min-w-64 max-w-sm origin-(--transform-origin) flex-col overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-md outline-none duration-100 motion-reduce:animate-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95";
601
+ var TRIGGER = "flex h-8 w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-lg border border-input bg-transparent px-2.5 text-sm text-foreground transition-colors outline-none focus-visible:border-ring disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive data-popup-open:border-ring dark:bg-input/30";
602
+ var Option = ({ option, index, style, measure, highlighted }) => {
603
+ const [cut, setCut] = useState(false);
604
+ const measureLabel = useCallback((element) => {
605
+ if (!element) return;
606
+ const measureCut = () => setCut(element.scrollWidth > element.clientWidth);
607
+ measureCut();
608
+ if (typeof ResizeObserver === "undefined") return;
609
+ const observer = new ResizeObserver(measureCut);
610
+ observer.observe(element);
611
+ return () => observer.disconnect();
612
+ }, []);
613
+ return /* @__PURE__ */ jsxs(Combobox$1.Item, {
614
+ value: option,
615
+ index,
616
+ ref: measure,
617
+ "data-index": index,
618
+ style,
619
+ "data-slot": "multi-select-item",
620
+ className: cn(popupItemClass("base-ui"), "group"),
621
+ children: [
622
+ /* @__PURE__ */ jsx("span", {
623
+ "data-slot": "multi-select-item-indicator",
624
+ "aria-hidden": "true",
625
+ className: "flex size-4 shrink-0 items-center justify-center rounded-sm border border-input text-primary-foreground transition-colors group-data-[selected]:border-primary group-data-[selected]:bg-primary",
626
+ children: /* @__PURE__ */ jsx(IconCheck, {
627
+ className: "size-3 opacity-0 group-data-[selected]:opacity-100",
628
+ stroke: 3
629
+ })
630
+ }),
631
+ option.leading,
632
+ /* @__PURE__ */ jsxs(Tooltip, {
633
+ open: highlighted && cut,
634
+ children: [/* @__PURE__ */ jsx(TooltipTrigger, {
635
+ "data-slot": "multi-select-item-label",
636
+ "data-overflowing": cut ? "" : void 0,
637
+ render: /* @__PURE__ */ jsx("span", {
638
+ ref: measureLabel,
639
+ className: "min-w-0 flex-1 truncate"
640
+ }),
641
+ children: option.label
642
+ }, option.label), /* @__PURE__ */ jsx(TooltipContent, {
643
+ side: "right",
644
+ children: option.label
645
+ })]
646
+ }),
647
+ option.count !== void 0 && /* @__PURE__ */ jsx("span", {
648
+ className: "text-xs text-muted-foreground tabular-nums",
649
+ children: option.count
650
+ })
651
+ ]
652
+ });
653
+ };
654
+ var Options = ({ scroller, scrollTo, busy, highlightedValue }) => {
655
+ const items = Combobox$1.useFilteredItems();
656
+ const virtual = items.length > 100;
657
+ const [mounted, setMounted] = useState(false);
658
+ useEffect(() => setMounted(true), []);
659
+ const virtualizer = useVirtualizer({
660
+ count: items.length,
661
+ getScrollElement: () => scroller.current,
662
+ estimateSize: () => ITEM_HEIGHT,
663
+ overscan: 12,
664
+ enabled: virtual && mounted
665
+ });
666
+ useEffect(() => {
667
+ scrollTo.current = virtual ? (index) => virtualizer.scrollToIndex(index, { align: "auto" }) : () => void 0;
668
+ }, [
669
+ scrollTo,
670
+ virtual,
671
+ virtualizer
672
+ ]);
673
+ if (!virtual) return /* @__PURE__ */ jsx(Combobox$1.List, {
674
+ "aria-busy": busy || void 0,
675
+ className: "p-1 outline-none",
676
+ children: items.map((option, index) => /* @__PURE__ */ jsx(Option, {
677
+ option,
678
+ index,
679
+ highlighted: highlightedValue === option.value
680
+ }, option.value))
681
+ });
682
+ return /* @__PURE__ */ jsx(Combobox$1.List, {
683
+ "data-virtualized": "",
684
+ "aria-busy": busy || void 0,
685
+ className: "relative m-1 outline-none",
686
+ style: { height: virtualizer.getTotalSize() },
687
+ children: virtualizer.getVirtualItems().map((row) => {
688
+ const option = items[row.index];
689
+ return option === void 0 ? null : /* @__PURE__ */ jsx(Option, {
690
+ option,
691
+ index: row.index,
692
+ highlighted: highlightedValue === option.value,
693
+ measure: virtualizer.measureElement,
694
+ style: {
695
+ position: "absolute",
696
+ top: 0,
697
+ left: 0,
698
+ right: 0,
699
+ transform: `translateY(${row.start}px)`
700
+ }
701
+ }, option.value);
702
+ })
703
+ });
704
+ };
705
+ /**
706
+ * A choice of several from a list: a trigger shaped like a Select that says what is picked
707
+ * (the placeholder, the one picked, or a count), and a popup with a search field and checkbox
708
+ * options, with the shared popup list style, the ScrollArea's bar and fades, and virtualization
709
+ * past VIRTUALIZE_FROM options. Nothing chosen means no filter.
710
+ *
711
+ * For a short fixed list pass `options` and nothing else: the component filters them as the
712
+ * user types. For a list that grows, pass `onSearchChange` and it becomes a window onto a
713
+ * server: the caller fetches the options for the typed text, and says when they are loading,
714
+ * failed, or have another page.
715
+ */
716
+ var MultiSelect = ({ placeholder, searchPlaceholder, options, value, onValueChange, id, disabled = false, className, onSearchChange, searchDelay = 250, selectedOptions, loading = false, error = false, onRetry, hasMore = false, onLoadMore, loadingMore = false, labels: labelOverrides, summary = "selection", ...rest }) => {
717
+ const labels = useMemo(() => ({
718
+ ...DEFAULT_MULTI_SELECT_LABELS,
719
+ ...labelOverrides
720
+ }), [labelOverrides]);
721
+ const isAsync = onSearchChange !== void 0;
722
+ const chosen = useMemo(() => resolveChosen(value, options, selectedOptions), [
723
+ value,
724
+ options,
725
+ selectedOptions
726
+ ]);
727
+ const items = useMemo(() => {
728
+ const offered = new Set(options.map((option) => option.value));
729
+ return [...chosen.filter((option) => !offered.has(option.value)), ...options];
730
+ }, [chosen, options]);
731
+ const refScroller = useRef(null);
732
+ const refScrollTo = useRef(() => void 0);
733
+ const refTimer = useRef(void 0);
734
+ const refTriggerText = useRef(null);
735
+ const refSearch = useRef(null);
736
+ const [popupOpen, setPopupOpen] = useState(false);
737
+ const [highlightedValue, setHighlightedValue] = useState(null);
738
+ const refReported = useRef(void 0);
739
+ const refOpen = useRef(false);
740
+ const errorMessage = typeof error === "string" ? error : labels.error;
741
+ const failed = error !== false;
742
+ useEffect(() => () => window.clearTimeout(refTimer.current), []);
743
+ const closeFromTrigger = (event) => {
744
+ if (event.key !== "Escape" || !popupOpen || refSearch.current === null) return;
745
+ event.stopPropagation();
746
+ event.preventDefault();
747
+ refSearch.current.dispatchEvent(new KeyboardEvent("keydown", {
748
+ key: "Escape",
749
+ bubbles: true,
750
+ cancelable: true
751
+ }));
752
+ };
753
+ return /* @__PURE__ */ jsxs(Combobox$1.Root, {
754
+ multiple: true,
755
+ disabled,
756
+ items,
757
+ filter: isAsync ? null : void 0,
758
+ value: chosen,
759
+ onValueChange: (next) => onValueChange(next.map((option) => option.value)),
760
+ onInputValueChange: (text) => {
761
+ if (onSearchChange === void 0 || !refOpen.current) return;
762
+ window.clearTimeout(refTimer.current);
763
+ if (text === refReported.current) return;
764
+ refTimer.current = window.setTimeout(() => {
765
+ refReported.current = text;
766
+ onSearchChange(text);
767
+ }, searchDelay);
768
+ },
769
+ onOpenChange: (open) => {
770
+ window.clearTimeout(refTimer.current);
771
+ setPopupOpen(open);
772
+ if (!open) setHighlightedValue(null);
773
+ refOpen.current = open;
774
+ refReported.current = open ? "" : void 0;
775
+ if (open && onSearchChange !== void 0) onSearchChange("");
776
+ },
777
+ itemToStringLabel: (option) => option.label,
778
+ isItemEqualToValue: (a, b) => a.value === b.value,
779
+ virtualized: items.length > 100,
780
+ onItemHighlighted: (item, details) => {
781
+ setHighlightedValue(item?.value ?? null);
782
+ if (details.reason === "keyboard" && details.index >= 0) refScrollTo.current(details.index);
783
+ },
784
+ children: [/* @__PURE__ */ jsxs(Tooltip, {
785
+ disabled: popupOpen,
786
+ onOpenChange: (open, details) => {
787
+ const element = refTriggerText.current;
788
+ if (open && !(element && element.scrollWidth > element.clientWidth)) details.cancel();
789
+ },
790
+ children: [/* @__PURE__ */ jsxs(TooltipTrigger, {
791
+ "data-slot": "multi-select-trigger",
792
+ render: /* @__PURE__ */ jsx(Combobox$1.Trigger, {
793
+ ...rest,
794
+ id,
795
+ "data-set": chosen.length > 0 ? "" : void 0,
796
+ onKeyDown: closeFromTrigger,
797
+ className: cn(TRIGGER, className)
798
+ }),
799
+ children: [/* @__PURE__ */ jsx("span", {
800
+ ref: refTriggerText,
801
+ className: cn("min-w-0 flex-1 truncate text-left", chosen.length === 0 && "text-muted-foreground"),
802
+ children: summarize(chosen, placeholder, labels, summary)
803
+ }), /* @__PURE__ */ jsx(IconChevronDown, {
804
+ "aria-hidden": "true",
805
+ className: "size-4 shrink-0 text-muted-foreground"
806
+ })]
807
+ }), /* @__PURE__ */ jsx(TooltipContent, { children: fullSelection(chosen, placeholder, labels, summary) })]
808
+ }), /* @__PURE__ */ jsx(Combobox$1.Portal, { children: /* @__PURE__ */ jsx(Combobox$1.Positioner, {
809
+ sideOffset: 4,
810
+ align: "start",
811
+ className: "z-50",
812
+ children: /* @__PURE__ */ jsxs(Combobox$1.Popup, {
813
+ "data-slot": "multi-select-content",
814
+ className: POPUP,
815
+ children: [
816
+ /* @__PURE__ */ jsxs("div", {
817
+ className: "flex shrink-0 items-center gap-2 border-b border-border px-3",
818
+ children: [/* @__PURE__ */ jsx(IconSearch, {
819
+ "aria-hidden": "true",
820
+ className: "size-4 shrink-0 text-muted-foreground"
821
+ }), /* @__PURE__ */ jsx(Combobox$1.Input, {
822
+ ref: refSearch,
823
+ placeholder: searchPlaceholder,
824
+ "aria-label": searchPlaceholder.replace(/…$/, ""),
825
+ className: "h-10 w-full min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground"
826
+ })]
827
+ }),
828
+ /* @__PURE__ */ jsx(Combobox$1.Status, {
829
+ "data-slot": "multi-select-status",
830
+ className: "px-3 py-2 text-sm text-muted-foreground empty:p-0",
831
+ children: failed ? /* @__PURE__ */ jsxs("span", {
832
+ className: "flex items-center justify-between gap-2 text-destructive",
833
+ children: [errorMessage, onRetry !== void 0 && /* @__PURE__ */ jsx("button", {
834
+ type: "button",
835
+ onClick: onRetry,
836
+ className: "rounded-md px-2 py-1 font-medium text-foreground hover:bg-foreground/6",
837
+ children: labels.retry
838
+ })]
839
+ }) : loading ? labels.loading : null
840
+ }),
841
+ /* @__PURE__ */ jsx(Combobox$1.Empty, {
842
+ className: "px-3 py-6 text-center text-sm text-muted-foreground empty:p-0",
843
+ children: loading || failed ? null : labels.noMatches
844
+ }),
845
+ /* @__PURE__ */ jsx(ScrollArea, {
846
+ type: "always",
847
+ fade: true,
848
+ viewportRef: refScroller,
849
+ className: "max-h-72 min-h-0",
850
+ children: /* @__PURE__ */ jsx(Options, {
851
+ scroller: refScroller,
852
+ scrollTo: refScrollTo,
853
+ busy: loading,
854
+ highlightedValue
855
+ })
856
+ }),
857
+ hasMore && onLoadMore !== void 0 && /* @__PURE__ */ jsx("div", {
858
+ className: "shrink-0 border-t border-border p-1",
859
+ children: /* @__PURE__ */ jsx("button", {
860
+ type: "button",
861
+ disabled: loadingMore,
862
+ onClick: onLoadMore,
863
+ className: "h-8 w-full rounded-md px-2 text-sm font-medium text-foreground hover:bg-foreground/6 disabled:pointer-events-none disabled:opacity-50",
864
+ children: loadingMore ? labels.loadingMore : labels.loadMore
865
+ })
866
+ }),
867
+ chosen.length > 0 && /* @__PURE__ */ jsxs("div", {
868
+ className: "flex shrink-0 items-center justify-between gap-2 border-t border-border py-1 pr-1 pl-3 text-xs text-muted-foreground",
869
+ children: [/* @__PURE__ */ jsx("span", {
870
+ className: "tabular-nums",
871
+ children: labels.selectedCount(chosen.length)
872
+ }), /* @__PURE__ */ jsx("button", {
873
+ type: "button",
874
+ onClick: () => onValueChange([]),
875
+ className: "rounded-md px-2 py-1 font-medium text-foreground hover:bg-foreground/6",
876
+ children: labels.clear
877
+ })]
878
+ })
879
+ ]
880
+ })
881
+ }) })]
882
+ });
883
+ };
884
+ //#endregion
885
+ //#region ../ui/src/components/edyn/progress-line/progress-line.tsx
886
+ /** Work quicker than this shows no line at all. */
887
+ var START_DELAY = 150;
888
+ var FINISH = 150;
889
+ var FADE = 200;
890
+ /** How far an ordinary run eases towards the end without reaching it. */
891
+ var RUN_TARGET = .85;
892
+ /**
893
+ * The line's colour: an app sets --progress-line (on :root, or on any element above the
894
+ * line) to match its accent. The fallback is read where the line is, so it follows the
895
+ * theme, which a default declared once on :root would not.
896
+ */
897
+ var PROGRESS_LINE_COLOR = "var(--progress-line, var(--primary))";
898
+ var reducedMotion = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches;
899
+ var scaleOf = (line) => {
900
+ const transform = line === null ? "none" : getComputedStyle(line).transform;
901
+ return transform === "none" ? 0 : new DOMMatrixReadOnly(transform).a;
902
+ };
903
+ /**
904
+ * A thin line in the accent (--progress-line, by default --primary) that runs along the top of what is loading (a table's rows
905
+ * under its header, a page under the top bar). It waits a moment before it shows, so
906
+ * quick work never flashes it; it eases towards the end without reaching it while the
907
+ * work runs; when the work is done it runs to the end and only then fades. More work
908
+ * before it has gone carries on from where it is. With reduced motion it is a
909
+ * full-width line that fades.
910
+ */
911
+ var ProgressLine = ({ active, label = "Loading", className, style, ...props }) => {
912
+ const [phase, setPhase] = useState("idle");
913
+ const [target, setTarget] = useState(RUN_TARGET);
914
+ const refPhase = useRef("idle");
915
+ const refLine = useRef(null);
916
+ useEffect(() => {
917
+ let timer;
918
+ const go = (next) => {
919
+ refPhase.current = next;
920
+ setPhase(next);
921
+ };
922
+ const later = (milliseconds, run) => {
923
+ timer = window.setTimeout(run, milliseconds);
924
+ };
925
+ const fade = () => {
926
+ go("fading");
927
+ later(FADE, () => go("idle"));
928
+ };
929
+ const phaseNow = refPhase.current;
930
+ if (active) {
931
+ if (phaseNow === "idle" || phaseNow === "waiting") {
932
+ go("waiting");
933
+ later(START_DELAY, () => {
934
+ setTarget(RUN_TARGET);
935
+ go("running");
936
+ });
937
+ } else if (phaseNow === "finishing" || phaseNow === "fading") {
938
+ const reached = scaleOf(refLine.current);
939
+ setTarget(reached > .8 ? Math.min(.97, reached + .04) : RUN_TARGET);
940
+ go("running");
941
+ }
942
+ } else if (phaseNow === "waiting") go("idle");
943
+ else if (phaseNow === "running" || phaseNow === "finishing") {
944
+ if (reducedMotion()) fade();
945
+ else {
946
+ go("finishing");
947
+ later(FINISH, fade);
948
+ }
949
+ } else if (phaseNow === "fading") later(FADE, () => go("idle"));
950
+ return () => window.clearTimeout(timer);
951
+ }, [active]);
952
+ const reduced = phase !== "idle" && reducedMotion();
953
+ const scale = phase === "idle" || phase === "waiting" ? 0 : phase === "running" && !reduced ? target : 1;
954
+ const transition = phase === "running" && !reduced ? "transform 8s cubic-bezier(0.1, 0.7, 0.15, 1), opacity 120ms ease-out" : phase === "finishing" ? `transform ${FINISH}ms ease-out` : phase === "fading" ? `opacity ${FADE}ms ease-out` : "none";
955
+ const shown = phase === "running" || phase === "finishing" || phase === "fading";
956
+ return /* @__PURE__ */ jsx("div", {
957
+ "data-slot": "progress-line",
958
+ role: "progressbar",
959
+ "aria-label": label,
960
+ ...props,
961
+ "aria-hidden": shown && phase !== "fading" ? void 0 : true,
962
+ "data-phase": phase,
963
+ className: cn("pointer-events-none h-0.5 overflow-hidden", className),
964
+ style,
965
+ children: /* @__PURE__ */ jsx("div", {
966
+ ref: refLine,
967
+ "data-slot": "progress-line-bar",
968
+ className: "h-full origin-left",
969
+ style: {
970
+ backgroundColor: PROGRESS_LINE_COLOR,
971
+ transform: `scaleX(${scale})`,
972
+ opacity: phase === "fading" || !shown ? 0 : 1,
973
+ transition
974
+ }
975
+ })
976
+ });
977
+ };
978
+ //#endregion
979
+ //#region ../ui/src/components/edyn/video-player/video-player.tsx
980
+ /**
981
+ * Media surface with an overlaid control bar: title and description, elapsed and
982
+ * total time, a seekable scrubber, play/pause, volume, and fullscreen.
983
+ *
984
+ * The root carries the `dark` class so its tokens resolve to the dark palette in
985
+ * both themes. Video is dark, so the letterbox and controls must stay dark and
986
+ * light-on-dark; this re-scopes existing tokens rather than hardcoding a colour.
987
+ */
988
+ var VideoPlayer = ({ src, poster, title, description, muted = false, loop = false, disabled = false, width, height, ratio = "auto", className, "aria-label": ariaLabel = "Video player", style, onPlay, onPause, onEnded, onTimeUpdate, ...props }) => {
989
+ const { refMedia, playing, currentTime, duration, muted: isMuted, toggle, seek, toggleMute } = useMediaPlayer({
990
+ onPlay,
991
+ onPause,
992
+ onEnded,
993
+ onTimeUpdate
994
+ });
995
+ const refContainer = React.useRef(null);
996
+ const PlaybackIcon = playing ? IconPlayerPauseFilled : IconPlayerPlayFilled;
997
+ const VolumeIcon = isMuted ? IconVolumeOff : IconVolume;
998
+ const isSizedBox = height != null || ratio !== "auto";
999
+ const requestFullscreen = () => {
1000
+ const container = refContainer.current;
1001
+ if (!container) return;
1002
+ if (document.fullscreenElement) {
1003
+ document.exitFullscreen().catch(() => void 0);
1004
+ return;
1005
+ }
1006
+ container.requestFullscreen?.().catch(() => void 0);
1007
+ };
1008
+ return /* @__PURE__ */ jsxs("div", {
1009
+ ref: refContainer,
1010
+ "data-slot": "video-player",
1011
+ ...props,
1012
+ "data-playing": playing || void 0,
1013
+ style: {
1014
+ width: cssLength(width),
1015
+ height: cssLength(height),
1016
+ aspectRatio: height == null && ratio !== "auto" ? ratio : void 0,
1017
+ ...style
1018
+ },
1019
+ className: cn("dark relative isolate w-full overflow-hidden rounded-lg bg-background", className),
1020
+ children: [/* @__PURE__ */ jsx("video", {
1021
+ ref: refMedia,
1022
+ src,
1023
+ poster,
1024
+ muted,
1025
+ loop,
1026
+ playsInline: true,
1027
+ preload: "metadata",
1028
+ "aria-label": ariaLabel,
1029
+ className: cn("w-full bg-background", isSizedBox ? "h-full object-contain" : "h-auto")
1030
+ }), /* @__PURE__ */ jsxs("div", {
1031
+ className: "pointer-events-none absolute inset-x-0 bottom-0 flex flex-col gap-0.5 bg-gradient-to-t from-background via-background/75 to-transparent px-3 pt-12 pb-2 text-foreground",
1032
+ children: [
1033
+ /* @__PURE__ */ jsxs("div", {
1034
+ className: "pointer-events-auto flex items-end justify-between gap-4",
1035
+ children: [/* @__PURE__ */ jsxs("div", {
1036
+ className: "min-w-0",
1037
+ children: [title ? /* @__PURE__ */ jsx("p", {
1038
+ className: "truncate text-sm font-medium text-foreground",
1039
+ children: title
1040
+ }) : null, description ? /* @__PURE__ */ jsx("p", {
1041
+ className: "truncate text-xs text-foreground/70",
1042
+ children: description
1043
+ }) : null]
1044
+ }), /* @__PURE__ */ jsxs("span", {
1045
+ className: "shrink-0 text-xs tabular-nums text-foreground/70",
1046
+ children: [
1047
+ formatMediaTime(currentTime),
1048
+ " / ",
1049
+ formatMediaTime(duration)
1050
+ ]
1051
+ })]
1052
+ }),
1053
+ /* @__PURE__ */ jsx(Slider, {
1054
+ className: "pointer-events-auto [&_[data-slot=slider-control]]:py-1.5 [&_[data-slot=slider-thumb]]:size-3 [&_[data-slot=slider-track]]:h-1",
1055
+ value: Math.min(currentTime, duration || 0),
1056
+ min: 0,
1057
+ max: duration || 0,
1058
+ step: 1,
1059
+ disabled: disabled || duration === 0,
1060
+ "aria-label": "Seek",
1061
+ onValueChange: (next) => {
1062
+ seek(next);
1063
+ }
1064
+ }),
1065
+ /* @__PURE__ */ jsxs("div", {
1066
+ className: "pointer-events-auto flex items-center justify-between",
1067
+ children: [/* @__PURE__ */ jsxs("div", {
1068
+ className: "flex items-center gap-1",
1069
+ children: [/* @__PURE__ */ jsx(Button, {
1070
+ type: "button",
1071
+ variant: "ghost",
1072
+ size: "icon",
1073
+ disabled,
1074
+ "aria-label": playing ? "Pause" : "Play",
1075
+ onClick: toggle,
1076
+ children: /* @__PURE__ */ jsx(PlaybackIcon, {})
1077
+ }), /* @__PURE__ */ jsx(Button, {
1078
+ type: "button",
1079
+ variant: "ghost",
1080
+ size: "icon",
1081
+ disabled,
1082
+ "aria-label": isMuted ? "Unmute" : "Mute",
1083
+ onClick: toggleMute,
1084
+ children: /* @__PURE__ */ jsx(VolumeIcon, {})
1085
+ })]
1086
+ }), /* @__PURE__ */ jsx(Button, {
1087
+ type: "button",
1088
+ variant: "ghost",
1089
+ size: "icon",
1090
+ disabled,
1091
+ "aria-label": "Fullscreen",
1092
+ onClick: requestFullscreen,
1093
+ children: /* @__PURE__ */ jsx(IconMaximize, {})
1094
+ })]
1095
+ })
1096
+ ]
1097
+ })]
1098
+ });
1099
+ };
1100
+ //#endregion
1101
+ //#region ../ui/src/components/ui/accordion/accordion.tsx
1102
+ var Accordion = ({ value, defaultValue, onValueChange, multiple = false, className, children, ...props }) => /* @__PURE__ */ jsx(Accordion$1.Root, {
1103
+ "data-slot": "accordion",
1104
+ ...props,
1105
+ value,
1106
+ defaultValue,
1107
+ onValueChange: (next) => {
1108
+ onValueChange?.(next);
1109
+ },
1110
+ multiple,
1111
+ className: cn("w-full", className),
1112
+ children
1113
+ });
1114
+ var AccordionItem = ({ value, disabled, className, children, ...props }) => /* @__PURE__ */ jsx(Accordion$1.Item, {
1115
+ "data-slot": "accordion-item",
1116
+ ...props,
1117
+ value,
1118
+ disabled,
1119
+ className: cn("border-b border-border", className),
1120
+ children
1121
+ });
1122
+ var focusSiblingTrigger = (event) => {
1123
+ if (![
1124
+ "ArrowDown",
1125
+ "ArrowUp",
1126
+ "Home",
1127
+ "End"
1128
+ ].includes(event.key)) return;
1129
+ const root = event.currentTarget.closest("[data-slot=\"accordion\"]");
1130
+ const triggers = Array.from(root?.querySelectorAll("[data-slot=\"accordion-trigger\"]:not(:disabled)") ?? []);
1131
+ const currentIndex = triggers.indexOf(event.currentTarget);
1132
+ if (currentIndex < 0 || triggers.length === 0) return;
1133
+ event.preventDefault();
1134
+ let nextIndex = currentIndex;
1135
+ if (event.key === "Home") nextIndex = 0;
1136
+ else if (event.key === "End") nextIndex = triggers.length - 1;
1137
+ else if (event.key === "ArrowDown") nextIndex = (currentIndex + 1) % triggers.length;
1138
+ else if (event.key === "ArrowUp") nextIndex = (currentIndex - 1 + triggers.length) % triggers.length;
1139
+ triggers[nextIndex]?.focus();
1140
+ };
1141
+ var AccordionTrigger = ({ className, children, ...props }) => /* @__PURE__ */ jsx(Accordion$1.Header, {
1142
+ "data-slot": "accordion-header",
1143
+ className: "flex",
1144
+ children: /* @__PURE__ */ jsxs(Accordion$1.Trigger, {
1145
+ "data-slot": "accordion-trigger",
1146
+ ...props,
1147
+ onKeyDown: focusSiblingTrigger,
1148
+ className: cn("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline", className),
1149
+ children: [children, /* @__PURE__ */ jsx("svg", {
1150
+ xmlns: "http://www.w3.org/2000/svg",
1151
+ width: "24",
1152
+ height: "24",
1153
+ viewBox: "0 0 24 24",
1154
+ fill: "none",
1155
+ stroke: "currentColor",
1156
+ strokeWidth: "2",
1157
+ strokeLinecap: "round",
1158
+ strokeLinejoin: "round",
1159
+ className: "size-4 shrink-0 text-muted-foreground",
1160
+ "data-expand-chevron": "flip",
1161
+ "aria-hidden": "true",
1162
+ children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
1163
+ })]
1164
+ })
1165
+ });
1166
+ var AccordionContent = ({ className, children, ...props }) => /* @__PURE__ */ jsx(Accordion$1.Panel, {
1167
+ keepMounted: true,
1168
+ "data-slot": "accordion-content",
1169
+ ...props,
1170
+ "data-focus": "inset",
1171
+ className: cn("text-sm", className),
1172
+ children: /* @__PURE__ */ jsx("div", {
1173
+ className: "pb-4 pt-0",
1174
+ children
1175
+ })
1176
+ });
1177
+ //#endregion
1178
+ //#region ../ui/src/components/ui/alert/alert.tsx
1179
+ var alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
1180
+ variants: { variant: {
1181
+ default: "bg-card text-card-foreground",
1182
+ destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive *:[svg]:text-current",
1183
+ success: "bg-card text-success *:data-[slot=alert-description]:text-success *:[svg]:text-current",
1184
+ warning: "bg-card text-warning *:data-[slot=alert-description]:text-warning *:[svg]:text-current",
1185
+ info: "bg-card text-info *:data-[slot=alert-description]:text-info *:[svg]:text-current"
1186
+ } },
1187
+ defaultVariants: { variant: "default" }
1188
+ });
1189
+ var Alert = ({ className, variant, ...props }) => {
1190
+ return /* @__PURE__ */ jsx("div", {
1191
+ "data-slot": "alert",
1192
+ role: "alert",
1193
+ className: cn(alertVariants({ variant }), className),
1194
+ ...props
1195
+ });
1196
+ };
1197
+ var AlertTitle = ({ className, ...props }) => {
1198
+ return /* @__PURE__ */ jsx("div", {
1199
+ "data-slot": "alert-title",
1200
+ className: cn("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", className),
1201
+ ...props
1202
+ });
1203
+ };
1204
+ var AlertDescription = ({ className, ...props }) => {
1205
+ return /* @__PURE__ */ jsx("div", {
1206
+ "data-slot": "alert-description",
1207
+ className: cn("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className),
1208
+ ...props
1209
+ });
1210
+ };
1211
+ var AlertAction = ({ className, ...props }) => {
1212
+ return /* @__PURE__ */ jsx("div", {
1213
+ "data-slot": "alert-action",
1214
+ className: cn("absolute top-2.5 right-2", className),
1215
+ ...props
1216
+ });
1217
+ };
1218
+ //#endregion
1219
+ //#region ../ui/src/components/ui/alert-dialog/alert-dialog.tsx
1220
+ var AlertDialog = ({ ...props }) => {
1221
+ return /* @__PURE__ */ jsx(AlertDialog$1.Root, {
1222
+ "data-slot": "alert-dialog",
1223
+ ...props
1224
+ });
1225
+ };
1226
+ var AlertDialogTrigger = ({ ...props }) => {
1227
+ return /* @__PURE__ */ jsx(AlertDialog$1.Trigger, {
1228
+ "data-slot": "alert-dialog-trigger",
1229
+ ...props
1230
+ });
1231
+ };
1232
+ var AlertDialogPortal = ({ ...props }) => {
1233
+ return /* @__PURE__ */ jsx(AlertDialog$1.Portal, {
1234
+ "data-slot": "alert-dialog-portal",
1235
+ ...props
1236
+ });
1237
+ };
1238
+ var AlertDialogOverlay = ({ className, ...props }) => {
1239
+ return /* @__PURE__ */ jsx(AlertDialog$1.Backdrop, {
1240
+ "data-slot": "alert-dialog-overlay",
1241
+ className: cn("fixed inset-0 isolate z-50 bg-overlay duration-100 motion-reduce:animate-none supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
1242
+ ...props
1243
+ });
1244
+ };
1245
+ var AlertDialogContent = ({ className, size = "default", ...props }) => {
1246
+ return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog$1.Popup, {
1247
+ "data-slot": "alert-dialog-content",
1248
+ "data-size": size,
1249
+ className: cn("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 motion-reduce:animate-none outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
1250
+ ...props
1251
+ })] });
1252
+ };
1253
+ var AlertDialogHeader = ({ className, ...props }) => {
1254
+ return /* @__PURE__ */ jsx("div", {
1255
+ "data-slot": "alert-dialog-header",
1256
+ className: cn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className),
1257
+ ...props
1258
+ });
1259
+ };
1260
+ var AlertDialogFooter = ({ className, ...props }) => {
1261
+ return /* @__PURE__ */ jsx("div", {
1262
+ "data-slot": "alert-dialog-footer",
1263
+ className: cn("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className),
1264
+ ...props
1265
+ });
1266
+ };
1267
+ var AlertDialogMedia = ({ className, ...props }) => {
1268
+ return /* @__PURE__ */ jsx("div", {
1269
+ "data-slot": "alert-dialog-media",
1270
+ className: cn("mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6", className),
1271
+ ...props
1272
+ });
1273
+ };
1274
+ var AlertDialogTitle = ({ className, ...props }) => {
1275
+ return /* @__PURE__ */ jsx(AlertDialog$1.Title, {
1276
+ "data-slot": "alert-dialog-title",
1277
+ className: cn("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className),
1278
+ ...props
1279
+ });
1280
+ };
1281
+ var AlertDialogDescription = ({ className, ...props }) => {
1282
+ return /* @__PURE__ */ jsx(AlertDialog$1.Description, {
1283
+ "data-slot": "alert-dialog-description",
1284
+ className: cn("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
1285
+ ...props
1286
+ });
1287
+ };
1288
+ var AlertDialogAction = ({ className, ...props }) => {
1289
+ return /* @__PURE__ */ jsx(Button, {
1290
+ "data-slot": "alert-dialog-action",
1291
+ className: cn(className),
1292
+ ...props
1293
+ });
1294
+ };
1295
+ var AlertDialogCancel = ({ className, variant = "outline", size = "default", ...props }) => {
1296
+ return /* @__PURE__ */ jsx(AlertDialog$1.Close, {
1297
+ "data-slot": "alert-dialog-cancel",
1298
+ className: cn(className),
1299
+ render: /* @__PURE__ */ jsx(Button, {
1300
+ variant,
1301
+ size
1302
+ }),
1303
+ ...props
1304
+ });
1305
+ };
1306
+ //#endregion
1307
+ //#region ../ui/src/components/ui/aspect-ratio/aspect-ratio.tsx
1308
+ var AspectRatio = ({ ratio, className, ...props }) => {
1309
+ return /* @__PURE__ */ jsx("div", {
1310
+ "data-slot": "aspect-ratio",
1311
+ style: { "--ratio": ratio },
1312
+ className: cn("relative aspect-(--ratio)", className),
1313
+ ...props
1314
+ });
1315
+ };
1316
+ //#endregion
1317
+ //#region ../ui/src/components/ui/attachment/attachment.tsx
1318
+ var attachmentVariants = cva("group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed", { variants: {
1319
+ size: {
1320
+ default: "gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2",
1321
+ sm: "gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5",
1322
+ xs: "gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1"
1323
+ },
1324
+ orientation: {
1325
+ horizontal: "min-w-40 items-center",
1326
+ vertical: "w-24 flex-col has-data-[slot=attachment-content]:w-30"
1327
+ }
1328
+ } });
1329
+ var Attachment = ({ className, state = "done", size = "default", orientation = "horizontal", ...props }) => {
1330
+ return /* @__PURE__ */ jsx("div", {
1331
+ "data-slot": "attachment",
1332
+ "data-state": state,
1333
+ "data-size": size,
1334
+ "data-orientation": orientation,
1335
+ className: cn(attachmentVariants({
1336
+ size,
1337
+ orientation
1338
+ }), className),
1339
+ ...props
1340
+ });
1341
+ };
1342
+ var attachmentMediaVariants = cva("relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5", {
1343
+ variants: { variant: {
1344
+ icon: "",
1345
+ image: "opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover"
1346
+ } },
1347
+ defaultVariants: { variant: "icon" }
1348
+ });
1349
+ var AttachmentMedia = ({ className, variant = "icon", ...props }) => {
1350
+ return /* @__PURE__ */ jsx("div", {
1351
+ "data-slot": "attachment-media",
1352
+ "data-variant": variant,
1353
+ className: cn(attachmentMediaVariants({ variant }), className),
1354
+ ...props
1355
+ });
1356
+ };
1357
+ var AttachmentContent = ({ className, ...props }) => {
1358
+ return /* @__PURE__ */ jsx("div", {
1359
+ "data-slot": "attachment-content",
1360
+ className: cn("max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1", className),
1361
+ ...props
1362
+ });
1363
+ };
1364
+ var AttachmentTitle = ({ className, ...props }) => {
1365
+ return /* @__PURE__ */ jsx("span", {
1366
+ "data-slot": "attachment-title",
1367
+ className: cn("block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer", className),
1368
+ ...props
1369
+ });
1370
+ };
1371
+ var AttachmentDescription = ({ className, ...props }) => {
1372
+ return /* @__PURE__ */ jsx("span", {
1373
+ "data-slot": "attachment-description",
1374
+ className: cn("mt-0.5 block min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive", "max-w-full", className),
1375
+ ...props
1376
+ });
1377
+ };
1378
+ var AttachmentActions = ({ className, ...props }) => {
1379
+ return /* @__PURE__ */ jsx("div", {
1380
+ "data-slot": "attachment-actions",
1381
+ className: cn("relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1", className),
1382
+ ...props
1383
+ });
1384
+ };
1385
+ var AttachmentAction = ({ className, variant, size = "icon-xs", ...props }) => {
1386
+ return /* @__PURE__ */ jsx(Button, {
1387
+ "data-slot": "attachment-action",
1388
+ variant: variant ?? "ghost",
1389
+ size,
1390
+ className: cn(className),
1391
+ ...props
1392
+ });
1393
+ };
1394
+ var AttachmentTrigger = ({ className, render, type, ...props }) => {
1395
+ return useRender({
1396
+ defaultTagName: "button",
1397
+ props: mergeProps({
1398
+ type: render ? type : type ?? "button",
1399
+ className: cn("absolute inset-0 z-10 outline-none", className)
1400
+ }, props),
1401
+ render,
1402
+ state: { slot: "attachment-trigger" }
1403
+ });
1404
+ };
1405
+ var AttachmentGroup = ({ className, ...props }) => {
1406
+ return /* @__PURE__ */ jsx("div", {
1407
+ "data-slot": "attachment-group",
1408
+ className: cn("flex min-w-0 scroll-fade-x snap-x snap-mandatory scroll-px-1 scrollbar-none gap-3 overflow-x-auto overscroll-x-contain py-1 *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start", className),
1409
+ ...props
1410
+ });
1411
+ };
1412
+ //#endregion
1413
+ //#region ../ui/src/components/ui/badge/badge.tsx
1414
+ var badgeVariants = cva("group/badge inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden border border-transparent text-xs font-medium whitespace-nowrap transition-all motion-reduce:transition-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
1415
+ variants: {
1416
+ variant: {
1417
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
1418
+ secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
1419
+ destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
1420
+ success: "bg-success-ring/40 text-success focus-visible:ring-success/20 [a]:hover:bg-success-ring/60 dark:bg-success-ring/30",
1421
+ warning: "bg-warning-ring/40 text-warning focus-visible:ring-warning/20 [a]:hover:bg-warning-ring/60 dark:bg-warning-ring/30",
1422
+ info: "bg-info-ring/40 text-info focus-visible:ring-info/20 [a]:hover:bg-info-ring/60 dark:bg-info-ring/30",
1423
+ outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
1424
+ ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
1425
+ link: "text-primary underline-offset-4 hover:underline"
1426
+ },
1427
+ size: {
1428
+ default: "h-5 rounded-4xl px-2 py-0.5",
1429
+ lg: "h-7 rounded-md px-2 py-1"
1430
+ }
1431
+ },
1432
+ defaultVariants: {
1433
+ variant: "default",
1434
+ size: "default"
1435
+ }
1436
+ });
1437
+ var Badge = ({ className, variant = "default", size = "default", render, ...props }) => {
1438
+ return useRender({
1439
+ defaultTagName: "span",
1440
+ props: mergeProps({ className: cn(badgeVariants({
1441
+ variant,
1442
+ size
1443
+ }), className) }, props),
1444
+ render,
1445
+ state: {
1446
+ slot: "badge",
1447
+ variant,
1448
+ size
1449
+ }
1450
+ });
1451
+ };
1452
+ //#endregion
1453
+ //#region ../ui/src/components/ui/breadcrumb/breadcrumb.tsx
1454
+ var Breadcrumb = ({ className, ...props }) => {
1455
+ return /* @__PURE__ */ jsx("nav", {
1456
+ "aria-label": "breadcrumb",
1457
+ "data-slot": "breadcrumb",
1458
+ className: cn(className),
1459
+ ...props
1460
+ });
1461
+ };
1462
+ var BreadcrumbList = ({ className, ...props }) => {
1463
+ return /* @__PURE__ */ jsx("ol", {
1464
+ "data-slot": "breadcrumb-list",
1465
+ className: cn("flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground", className),
1466
+ ...props
1467
+ });
1468
+ };
1469
+ var BreadcrumbItem = ({ className, ...props }) => {
1470
+ return /* @__PURE__ */ jsx("li", {
1471
+ "data-slot": "breadcrumb-item",
1472
+ className: cn("inline-flex items-center gap-1", className),
1473
+ ...props
1474
+ });
1475
+ };
1476
+ var BreadcrumbLink = ({ className, render, ...props }) => {
1477
+ return useRender({
1478
+ defaultTagName: "a",
1479
+ props: mergeProps({ className: cn("transition-colors hover:text-foreground", className) }, props),
1480
+ render,
1481
+ state: { slot: "breadcrumb-link" }
1482
+ });
1483
+ };
1484
+ var BreadcrumbPage = ({ className, ...props }) => {
1485
+ return /* @__PURE__ */ jsx("span", {
1486
+ "data-slot": "breadcrumb-page",
1487
+ role: "link",
1488
+ "aria-disabled": "true",
1489
+ "aria-current": "page",
1490
+ className: cn("font-normal text-foreground", className),
1491
+ ...props
1492
+ });
1493
+ };
1494
+ var BreadcrumbSeparator = ({ children, className, ...props }) => {
1495
+ return /* @__PURE__ */ jsx("li", {
1496
+ "data-slot": "breadcrumb-separator",
1497
+ role: "presentation",
1498
+ "aria-hidden": "true",
1499
+ className: cn("[&>svg]:size-3.5", className),
1500
+ ...props,
1501
+ children: children ?? /* @__PURE__ */ jsx(IconChevronRight, {})
1502
+ });
1503
+ };
1504
+ var BreadcrumbEllipsis = ({ className, ...props }) => {
1505
+ return /* @__PURE__ */ jsxs("span", {
1506
+ "data-slot": "breadcrumb-ellipsis",
1507
+ role: "presentation",
1508
+ "aria-hidden": "true",
1509
+ className: cn("flex size-5 items-center justify-center [&>svg]:size-4", className),
1510
+ ...props,
1511
+ children: [/* @__PURE__ */ jsx(IconDots, {}), /* @__PURE__ */ jsx("span", {
1512
+ className: "sr-only",
1513
+ children: "More"
1514
+ })]
1515
+ });
1516
+ };
1517
+ //#endregion
1518
+ //#region ../ui/src/components/ui/bubble/bubble.tsx
1519
+ var BubbleGroup = ({ className, ...props }) => {
1520
+ return /* @__PURE__ */ jsx("div", {
1521
+ "data-slot": "bubble-group",
1522
+ className: cn("flex min-w-0 flex-col gap-2", className),
1523
+ ...props
1524
+ });
1525
+ };
1526
+ var bubbleVariants = cva("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full", {
1527
+ variants: { variant: {
1528
+ default: "*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
1529
+ secondary: "*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",
1530
+ muted: "*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
1531
+ tinted: "*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",
1532
+ outline: "*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",
1533
+ ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",
1534
+ destructive: "*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30"
1535
+ } },
1536
+ defaultVariants: { variant: "default" }
1537
+ });
1538
+ var Bubble = ({ variant = "default", align = "start", className, ...props }) => {
1539
+ return /* @__PURE__ */ jsx("div", {
1540
+ "data-slot": "bubble",
1541
+ "data-variant": variant,
1542
+ "data-align": align,
1543
+ className: cn(bubbleVariants({ variant }), className),
1544
+ ...props
1545
+ });
1546
+ };
1547
+ var BubbleContent = ({ className, render, ...props }) => {
1548
+ return useRender({
1549
+ defaultTagName: "div",
1550
+ props: mergeProps({ className: cn("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50", className) }, props),
1551
+ render,
1552
+ state: { slot: "bubble-content" }
1553
+ });
1554
+ };
1555
+ var bubbleReactionsVariants = cva("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0", {
1556
+ variants: {
1557
+ side: {
1558
+ top: "top-0 -translate-y-3/4",
1559
+ bottom: "bottom-0 translate-y-3/4"
1560
+ },
1561
+ align: {
1562
+ start: "left-3",
1563
+ end: "right-3"
1564
+ }
1565
+ },
1566
+ defaultVariants: {
1567
+ side: "bottom",
1568
+ align: "end"
1569
+ }
1570
+ });
1571
+ var BubbleReactions = ({ side = "bottom", align = "end", className, ...props }) => {
1572
+ return /* @__PURE__ */ jsx("div", {
1573
+ "data-slot": "bubble-reactions",
1574
+ "data-align": align,
1575
+ "data-side": side,
1576
+ className: cn(bubbleReactionsVariants({
1577
+ side,
1578
+ align
1579
+ }), className),
1580
+ ...props
1581
+ });
1582
+ };
1583
+ //#endregion
1584
+ //#region ../ui/src/components/ui/button-group/button-group.tsx
1585
+ var ButtonGroupContext = React.createContext("horizontal");
1586
+ var ButtonGroup = ({ className, orientation = "horizontal", ...props }) => {
1587
+ return /* @__PURE__ */ jsx(ButtonGroupContext.Provider, {
1588
+ value: orientation,
1589
+ children: /* @__PURE__ */ jsx("div", {
1590
+ "data-slot": "button-group",
1591
+ "data-orientation": orientation,
1592
+ className: cn("inline-flex items-center", "[&>*:not(:first-child):not(:last-child)]:rounded-none", "data-[orientation=horizontal]:[&>*:first-child]:rounded-r-none", "data-[orientation=horizontal]:[&>*:last-child]:rounded-l-none", "data-[orientation=horizontal]:[&>*:not(:first-child)]:-ml-px", "data-[orientation=vertical]:flex-col", "data-[orientation=vertical]:[&>*:first-child]:rounded-b-none", "data-[orientation=vertical]:[&>*:last-child]:rounded-t-none", "data-[orientation=vertical]:[&>*:not(:first-child)]:-mt-px", "[&>*]:relative [&>*]:z-0 [&>*:focus-visible]:z-10 [&>*:hover]:z-10", className),
1593
+ ...props
1594
+ })
1595
+ });
1596
+ };
1597
+ var ButtonGroupSeparator = ({ className, ...props }) => {
1598
+ const orientation = React.useContext(ButtonGroupContext);
1599
+ return /* @__PURE__ */ jsx("span", {
1600
+ "data-slot": "button-group-separator",
1601
+ role: "separator",
1602
+ "aria-orientation": orientation === "horizontal" ? "vertical" : "horizontal",
1603
+ className: cn("inline-flex shrink-0 self-stretch bg-border", "in-data-[orientation=horizontal]:w-px", "in-data-[orientation=vertical]:h-px in-data-[orientation=vertical]:self-auto in-data-[orientation=vertical]:w-full", className),
1604
+ ...props
1605
+ });
1606
+ };
1607
+ var ButtonGroupText = ({ className, ...props }) => {
1608
+ return /* @__PURE__ */ jsx("span", {
1609
+ "data-slot": "button-group-text",
1610
+ className: cn("inline-flex shrink-0 items-center justify-center rounded-none border border-border bg-muted px-2.5 text-sm text-muted-foreground select-none", className),
1611
+ ...props
1612
+ });
1613
+ };
1614
+ //#endregion
1615
+ //#region ../ui/src/components/ui/card/card.tsx
1616
+ var Card = ({ className, size = "default", ...props }) => {
1617
+ return /* @__PURE__ */ jsx("div", {
1618
+ "data-slot": "card",
1619
+ "data-size": size,
1620
+ className: cn("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", className),
1621
+ ...props
1622
+ });
1623
+ };
1624
+ var CardHeader = ({ className, ...props }) => {
1625
+ return /* @__PURE__ */ jsx("div", {
1626
+ "data-slot": "card-header",
1627
+ className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3", className),
1628
+ ...props
1629
+ });
1630
+ };
1631
+ var CardTitle = ({ className, ...props }) => {
1632
+ return /* @__PURE__ */ jsx("div", {
1633
+ "data-slot": "card-title",
1634
+ className: cn("text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", className),
1635
+ ...props
1636
+ });
1637
+ };
1638
+ var CardDescription = ({ className, ...props }) => {
1639
+ return /* @__PURE__ */ jsx("div", {
1640
+ "data-slot": "card-description",
1641
+ className: cn("text-sm text-muted-foreground", className),
1642
+ ...props
1643
+ });
1644
+ };
1645
+ var CardAction = ({ className, ...props }) => {
1646
+ return /* @__PURE__ */ jsx("div", {
1647
+ "data-slot": "card-action",
1648
+ className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
1649
+ ...props
1650
+ });
1651
+ };
1652
+ var CardContent = ({ className, ...props }) => {
1653
+ return /* @__PURE__ */ jsx("div", {
1654
+ "data-slot": "card-content",
1655
+ className: cn("px-4 group-data-[size=sm]/card:px-3", className),
1656
+ ...props
1657
+ });
1658
+ };
1659
+ var CardFooter = ({ className, ...props }) => {
1660
+ return /* @__PURE__ */ jsx("div", {
1661
+ "data-slot": "card-footer",
1662
+ className: cn("flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3", className),
1663
+ ...props
1664
+ });
1665
+ };
1666
+ //#endregion
1667
+ //#region ../ui/src/components/ui/carousel/carousel.tsx
1668
+ var CarouselContext = React.createContext(null);
1669
+ var useCarousel = () => {
1670
+ const context = React.useContext(CarouselContext);
1671
+ if (!context) throw new Error("useCarousel must be used within a <Carousel />");
1672
+ return context;
1673
+ };
1674
+ var Carousel = ({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }) => {
1675
+ const [carouselRef, api] = useEmblaCarousel({
1676
+ ...opts,
1677
+ axis: orientation === "horizontal" ? "x" : "y"
1678
+ }, plugins);
1679
+ const [canScrollPrev, setCanScrollPrev] = React.useState(false);
1680
+ const [canScrollNext, setCanScrollNext] = React.useState(false);
1681
+ const onSelect = React.useCallback((api) => {
1682
+ if (!api) return;
1683
+ setCanScrollPrev(api.canScrollPrev());
1684
+ setCanScrollNext(api.canScrollNext());
1685
+ }, []);
1686
+ const scrollPrev = React.useCallback(() => {
1687
+ api?.scrollPrev();
1688
+ }, [api]);
1689
+ const scrollNext = React.useCallback(() => {
1690
+ api?.scrollNext();
1691
+ }, [api]);
1692
+ const handleKeyDown = React.useCallback((event) => {
1693
+ if (event.key === "ArrowLeft") {
1694
+ event.preventDefault();
1695
+ scrollPrev();
1696
+ } else if (event.key === "ArrowRight") {
1697
+ event.preventDefault();
1698
+ scrollNext();
1699
+ }
1700
+ }, [scrollPrev, scrollNext]);
1701
+ React.useEffect(() => {
1702
+ if (!api || !setApi) return;
1703
+ setApi(api);
1704
+ }, [api, setApi]);
1705
+ React.useEffect(() => {
1706
+ if (!api) return;
1707
+ onSelect(api);
1708
+ api.on("reInit", onSelect);
1709
+ api.on("select", onSelect);
1710
+ return () => {
1711
+ api.off("reInit", onSelect);
1712
+ api.off("select", onSelect);
1713
+ };
1714
+ }, [api, onSelect]);
1715
+ return /* @__PURE__ */ jsx(CarouselContext.Provider, {
1716
+ value: {
1717
+ carouselRef,
1718
+ api,
1719
+ opts,
1720
+ orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
1721
+ scrollPrev,
1722
+ scrollNext,
1723
+ canScrollPrev,
1724
+ canScrollNext
1725
+ },
1726
+ children: /* @__PURE__ */ jsx("div", {
1727
+ onKeyDownCapture: handleKeyDown,
1728
+ className: cn("relative", className),
1729
+ role: "region",
1730
+ "aria-roledescription": "carousel",
1731
+ "data-slot": "carousel",
1732
+ ...props,
1733
+ children
1734
+ })
1735
+ });
1736
+ };
1737
+ var CarouselContent = ({ className, ...props }) => {
1738
+ const { carouselRef, orientation } = useCarousel();
1739
+ return /* @__PURE__ */ jsx("div", {
1740
+ ref: carouselRef,
1741
+ className: "overflow-hidden",
1742
+ "data-slot": "carousel-content",
1743
+ "data-focus": "inset",
1744
+ children: /* @__PURE__ */ jsx("div", {
1745
+ className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
1746
+ ...props
1747
+ })
1748
+ });
1749
+ };
1750
+ var CarouselItem = ({ className, ...props }) => {
1751
+ const { orientation } = useCarousel();
1752
+ return /* @__PURE__ */ jsx("div", {
1753
+ role: "group",
1754
+ "aria-roledescription": "slide",
1755
+ "data-slot": "carousel-item",
1756
+ className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className),
1757
+ ...props
1758
+ });
1759
+ };
1760
+ var CarouselPrevious = ({ className, variant = "outline", size = "icon-sm", ...props }) => {
1761
+ const { orientation, scrollPrev, canScrollPrev } = useCarousel();
1762
+ return /* @__PURE__ */ jsxs(Button, {
1763
+ "data-slot": "carousel-previous",
1764
+ variant,
1765
+ size,
1766
+ className: cn("absolute touch-manipulation rounded-full", orientation === "horizontal" ? "inset-y-0 -left-12 my-auto" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className),
1767
+ disabled: !canScrollPrev,
1768
+ onClick: scrollPrev,
1769
+ ...props,
1770
+ children: [/* @__PURE__ */ jsx(IconChevronLeft, {}), /* @__PURE__ */ jsx("span", {
1771
+ className: "sr-only",
1772
+ children: "Previous slide"
1773
+ })]
1774
+ });
1775
+ };
1776
+ var CarouselNext = ({ className, variant = "outline", size = "icon-sm", ...props }) => {
1777
+ const { orientation, scrollNext, canScrollNext } = useCarousel();
1778
+ return /* @__PURE__ */ jsxs(Button, {
1779
+ "data-slot": "carousel-next",
1780
+ variant,
1781
+ size,
1782
+ className: cn("absolute touch-manipulation rounded-full", orientation === "horizontal" ? "inset-y-0 -right-12 my-auto" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className),
1783
+ disabled: !canScrollNext,
1784
+ onClick: scrollNext,
1785
+ ...props,
1786
+ children: [/* @__PURE__ */ jsx(IconChevronRight, {}), /* @__PURE__ */ jsx("span", {
1787
+ className: "sr-only",
1788
+ children: "Next slide"
1789
+ })]
1790
+ });
1791
+ };
1792
+ //#endregion
1793
+ //#region ../ui/src/components/ui/chart/chart.tsx
1794
+ var THEMES = {
1795
+ light: "",
1796
+ dark: ".dark"
1797
+ };
1798
+ var INITIAL_DIMENSION = {
1799
+ width: 320,
1800
+ height: 200
1801
+ };
1802
+ var ChartContext = React.createContext(null);
1803
+ var useChart = () => {
1804
+ const context = React.useContext(ChartContext);
1805
+ if (!context) throw new Error("useChart must be used within a <ChartContainer />");
1806
+ return context;
1807
+ };
1808
+ var ChartContainer = ({ id, className, children, config, initialDimension = INITIAL_DIMENSION, ...props }) => {
1809
+ const uniqueId = React.useId();
1810
+ const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`;
1811
+ const refContainer = React.useRef(null);
1812
+ const [hasSize, setHasSize] = React.useState(false);
1813
+ React.useLayoutEffect(() => {
1814
+ const element = refContainer.current;
1815
+ if (!element) return;
1816
+ const update = () => {
1817
+ const { width, height } = element.getBoundingClientRect();
1818
+ setHasSize(width > 0 && height > 0);
1819
+ };
1820
+ update();
1821
+ const observer = new ResizeObserver(update);
1822
+ observer.observe(element);
1823
+ return () => observer.disconnect();
1824
+ }, []);
1825
+ return /* @__PURE__ */ jsx(ChartContext.Provider, {
1826
+ value: { config },
1827
+ children: /* @__PURE__ */ jsxs("div", {
1828
+ ref: refContainer,
1829
+ "data-slot": "chart",
1830
+ id,
1831
+ "data-chart": chartId,
1832
+ className: cn("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className),
1833
+ ...props,
1834
+ children: [/* @__PURE__ */ jsx(ChartStyle, {
1835
+ id: chartId,
1836
+ config
1837
+ }), hasSize && /* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, {
1838
+ initialDimension,
1839
+ children
1840
+ })]
1841
+ })
1842
+ });
1843
+ };
1844
+ var ChartStyle = ({ id, config }) => {
1845
+ const colorConfig = Object.entries(config).filter(([, config]) => config.theme ?? config.color);
1846
+ if (!colorConfig.length) return null;
1847
+ const css = Object.entries(THEMES).map(([theme, prefix]) => `
1848
+ ${prefix} [data-chart=${id}] {
1849
+ ${colorConfig.map(([key, itemConfig]) => {
1850
+ const color = itemConfig.theme?.[theme] ?? itemConfig.color;
1851
+ return color ? ` --color-${key}: ${color};` : null;
1852
+ }).join("\n")}
1853
+ }
1854
+ `).join("\n");
1855
+ return /* @__PURE__ */ jsx("style", { children: css });
1856
+ };
1857
+ var ChartTooltip = RechartsPrimitive.Tooltip;
1858
+ var ChartTooltipContent = ({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey }) => {
1859
+ const { config } = useChart();
1860
+ const tooltipLabel = React.useMemo(() => {
1861
+ if (hideLabel || !payload?.length) return null;
1862
+ const [item] = payload;
1863
+ const key = `${labelKey ?? item?.dataKey ?? item?.name ?? "value"}`;
1864
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
1865
+ const value = !labelKey && typeof label === "string" ? config[label]?.label ?? label : itemConfig?.label;
1866
+ if (labelFormatter) return /* @__PURE__ */ jsx("div", {
1867
+ className: cn("font-medium", labelClassName),
1868
+ children: labelFormatter(value, payload)
1869
+ });
1870
+ if (!value) return null;
1871
+ return /* @__PURE__ */ jsx("div", {
1872
+ className: cn("font-medium", labelClassName),
1873
+ children: value
1874
+ });
1875
+ }, [
1876
+ label,
1877
+ labelFormatter,
1878
+ payload,
1879
+ hideLabel,
1880
+ labelClassName,
1881
+ config,
1882
+ labelKey
1883
+ ]);
1884
+ if (!active || !payload?.length) return null;
1885
+ const nestLabel = payload.length === 1 && indicator !== "dot";
1886
+ return /* @__PURE__ */ jsxs("div", {
1887
+ className: cn("grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", className),
1888
+ children: [!nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("div", {
1889
+ className: "grid gap-1.5",
1890
+ children: payload.filter((item) => item.type !== "none").map((item, index) => {
1891
+ const key = `${nameKey ?? item.name ?? item.dataKey ?? "value"}`;
1892
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
1893
+ const indicatorColor = color ?? item.payload?.fill ?? item.color;
1894
+ return /* @__PURE__ */ jsx("div", {
1895
+ className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", indicator === "dot" && "items-center"),
1896
+ children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [itemConfig?.icon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx("div", {
1897
+ className: cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
1898
+ "h-2.5 w-2.5": indicator === "dot",
1899
+ "w-1": indicator === "line",
1900
+ "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
1901
+ "my-0.5": nestLabel && indicator === "dashed"
1902
+ }),
1903
+ style: {
1904
+ "--color-bg": indicatorColor,
1905
+ "--color-border": indicatorColor
1906
+ }
1907
+ }), /* @__PURE__ */ jsxs("div", {
1908
+ className: cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center"),
1909
+ children: [/* @__PURE__ */ jsxs("div", {
1910
+ className: "grid gap-1.5",
1911
+ children: [nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("span", {
1912
+ className: "text-muted-foreground",
1913
+ children: itemConfig?.label ?? item.name
1914
+ })]
1915
+ }), item.value != null && /* @__PURE__ */ jsx("span", {
1916
+ className: "font-mono font-medium text-foreground tabular-nums",
1917
+ children: typeof item.value === "number" ? item.value.toLocaleString() : String(item.value)
1918
+ })]
1919
+ })] })
1920
+ }, `${key}-${String(item.value ?? "")}`);
1921
+ })
1922
+ })]
1923
+ });
1924
+ };
1925
+ var ChartLegend = RechartsPrimitive.Legend;
1926
+ var ChartLegendContent = ({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }) => {
1927
+ const { config } = useChart();
1928
+ if (!payload?.length) return null;
1929
+ return /* @__PURE__ */ jsx("div", {
1930
+ className: cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className),
1931
+ children: payload.filter((item) => item.type !== "none").map((item) => {
1932
+ const key = `${nameKey ?? item.dataKey ?? "value"}`;
1933
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
1934
+ return /* @__PURE__ */ jsxs("div", {
1935
+ className: cn("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),
1936
+ children: [itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx("div", {
1937
+ className: "h-2 w-2 shrink-0 rounded-[2px]",
1938
+ style: { backgroundColor: item.color }
1939
+ }), itemConfig?.label]
1940
+ }, `${key}-${String(item.value ?? "")}`);
1941
+ })
1942
+ });
1943
+ };
1944
+ var getPayloadConfigFromPayload = (config, payload, key) => {
1945
+ if (typeof payload !== "object" || payload === null) return;
1946
+ const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
1947
+ let configLabelKey = key;
1948
+ if (key in payload && typeof payload[key] === "string") configLabelKey = payload[key];
1949
+ else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") configLabelKey = payloadPayload[key];
1950
+ return configLabelKey in config ? config[configLabelKey] : config[key];
1951
+ };
1952
+ //#endregion
1953
+ //#region ../ui/src/components/ui/checkbox/checkbox.tsx
1954
+ var Checkbox = ({ className, ...props }) => {
1955
+ return /* @__PURE__ */ jsx(Checkbox$1.Root, {
1956
+ "data-slot": "checkbox",
1957
+ className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 data-disabled:cursor-not-allowed data-disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary", className),
1958
+ ...props,
1959
+ children: /* @__PURE__ */ jsxs(Checkbox$1.Indicator, {
1960
+ "data-slot": "checkbox-indicator",
1961
+ className: "group/checkbox-indicator grid place-content-center text-current transition-none [&>svg]:size-3.5",
1962
+ children: [/* @__PURE__ */ jsx(IconCheck, { className: "group-data-indeterminate/checkbox-indicator:hidden" }), /* @__PURE__ */ jsx(IconMinus, { className: "hidden group-data-indeterminate/checkbox-indicator:block" })]
1963
+ })
1964
+ });
1965
+ };
1966
+ //#endregion
1967
+ //#region ../ui/src/components/ui/collapsible/collapsible.tsx
1968
+ var Collapsible = ({ ...props }) => {
1969
+ return /* @__PURE__ */ jsx(Collapsible$1.Root, {
1970
+ "data-slot": "collapsible",
1971
+ ...props
1972
+ });
1973
+ };
1974
+ var CollapsibleTrigger = ({ ...props }) => {
1975
+ return /* @__PURE__ */ jsx(Collapsible$1.Trigger, {
1976
+ "data-slot": "collapsible-trigger",
1977
+ ...props
1978
+ });
1979
+ };
1980
+ var CollapsibleContent = ({ ...props }) => {
1981
+ return /* @__PURE__ */ jsx(Collapsible$1.Panel, {
1982
+ "data-slot": "collapsible-content",
1983
+ "data-focus": "inset",
1984
+ ...props
1985
+ });
1986
+ };
1987
+ //#endregion
1988
+ //#region ../ui/src/components/ui/combobox/combobox.tsx
1989
+ var Combobox = ({ ...props }) => {
1990
+ return /* @__PURE__ */ jsx(Combobox$1.Root, {
1991
+ "data-slot": "combobox",
1992
+ ...props
1993
+ });
1994
+ };
1995
+ var ComboboxInput = ({ className, ...props }) => {
1996
+ return /* @__PURE__ */ jsxs(Combobox$1.InputGroup, {
1997
+ "data-slot": "combobox-input-group",
1998
+ className: "relative flex w-full items-center",
1999
+ children: [/* @__PURE__ */ jsx(Combobox$1.Input, {
2000
+ "data-slot": "combobox-input",
2001
+ className: cn("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 pr-8 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
2002
+ ...props
2003
+ }), /* @__PURE__ */ jsx(Combobox$1.Trigger, {
2004
+ "data-slot": "combobox-trigger",
2005
+ className: "absolute right-2 flex items-center text-muted-foreground disabled:pointer-events-none disabled:opacity-50",
2006
+ tabIndex: -1,
2007
+ "aria-hidden": true,
2008
+ children: /* @__PURE__ */ jsx(IconChevronDown, { className: "size-4" })
2009
+ })]
2010
+ });
2011
+ };
2012
+ var ComboboxContent = ({ className, children, empty, portalContainer, ...props }) => {
2013
+ return /* @__PURE__ */ jsx(Combobox$1.Portal, {
2014
+ "data-slot": "combobox-portal",
2015
+ container: portalContainer,
2016
+ children: /* @__PURE__ */ jsx(Combobox$1.Positioner, {
2017
+ "data-slot": "combobox-positioner",
2018
+ sideOffset: 4,
2019
+ className: "z-50",
2020
+ children: /* @__PURE__ */ jsxs(Combobox$1.Popup, {
2021
+ "data-slot": "combobox-content",
2022
+ className: cn("min-w-[var(--anchor-width)] overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-md outline-none motion-reduce:animate-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
2023
+ ...props,
2024
+ children: [/* @__PURE__ */ jsx(ComboboxEmpty, { children: empty }), /* @__PURE__ */ jsx(ScrollArea, {
2025
+ type: "always",
2026
+ fade: true,
2027
+ fadeFrom: "popover",
2028
+ className: "max-h-60",
2029
+ children: /* @__PURE__ */ jsx(Combobox$1.List, {
2030
+ "data-slot": "combobox-list",
2031
+ className: "p-1",
2032
+ children
2033
+ })
2034
+ })]
2035
+ })
2036
+ })
2037
+ });
2038
+ };
2039
+ var ComboboxItem = ({ className, children, ...props }) => {
2040
+ return /* @__PURE__ */ jsxs(Combobox$1.Item, {
2041
+ "data-slot": "combobox-item",
2042
+ className: cn(popupItemClass("base-ui", true), className),
2043
+ ...props,
2044
+ children: [/* @__PURE__ */ jsx("span", {
2045
+ className: "flex-1",
2046
+ children
2047
+ }), /* @__PURE__ */ jsx(Combobox$1.ItemIndicator, {
2048
+ "data-slot": "combobox-item-indicator",
2049
+ className: POPUP_ITEM_INDICATOR_CLASS,
2050
+ children: /* @__PURE__ */ jsx(IconCheck, { className: "size-3.5" })
2051
+ })]
2052
+ });
2053
+ };
2054
+ var ComboboxEmpty = ({ className, children, ...props }) => {
2055
+ return /* @__PURE__ */ jsx(Combobox$1.Empty, {
2056
+ "data-slot": "combobox-empty",
2057
+ className: cn("py-4 text-center text-sm text-muted-foreground empty:py-0", className),
2058
+ ...props,
2059
+ children: children ?? "No results found."
2060
+ });
2061
+ };
2062
+ //#endregion
2063
+ //#region ../ui/src/components/ui/dialog/dialog.tsx
2064
+ var Dialog = ({ ...props }) => {
2065
+ return /* @__PURE__ */ jsx(Dialog$1.Root, {
2066
+ "data-slot": "dialog",
2067
+ ...props
2068
+ });
2069
+ };
2070
+ var DialogTrigger = ({ ...props }) => {
2071
+ return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
2072
+ "data-slot": "dialog-trigger",
2073
+ ...props
2074
+ });
2075
+ };
2076
+ var DialogPortal = ({ ...props }) => {
2077
+ return /* @__PURE__ */ jsx(Dialog$1.Portal, {
2078
+ "data-slot": "dialog-portal",
2079
+ ...props
2080
+ });
2081
+ };
2082
+ var DialogClose = ({ ...props }) => {
2083
+ return /* @__PURE__ */ jsx(Dialog$1.Close, {
2084
+ "data-slot": "dialog-close",
2085
+ ...props
2086
+ });
2087
+ };
2088
+ var DialogOverlay = ({ className, ...props }) => {
2089
+ return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
2090
+ "data-slot": "dialog-overlay",
2091
+ className: cn("fixed inset-0 isolate z-50 bg-overlay duration-100 motion-reduce:animate-none supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
2092
+ ...props
2093
+ });
2094
+ };
2095
+ var DialogContent = ({ className, children, showCloseButton = true, ...props }) => {
2096
+ return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
2097
+ "data-slot": "dialog-content",
2098
+ className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 motion-reduce:animate-none outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
2099
+ ...props,
2100
+ children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog$1.Close, {
2101
+ "data-slot": "dialog-close",
2102
+ render: /* @__PURE__ */ jsx(Button, {
2103
+ variant: "ghost",
2104
+ className: "absolute top-2 right-2",
2105
+ size: "icon-sm"
2106
+ }),
2107
+ children: [/* @__PURE__ */ jsx(IconX, {}), /* @__PURE__ */ jsx("span", {
2108
+ className: "sr-only",
2109
+ children: "Close"
2110
+ })]
2111
+ })]
2112
+ })] });
2113
+ };
2114
+ var DialogHeader = ({ className, ...props }) => {
2115
+ return /* @__PURE__ */ jsx("div", {
2116
+ "data-slot": "dialog-header",
2117
+ className: cn("flex flex-col gap-2", className),
2118
+ ...props
2119
+ });
2120
+ };
2121
+ var DialogFooter = ({ className, showCloseButton = false, children, ...props }) => {
2122
+ return /* @__PURE__ */ jsxs("div", {
2123
+ "data-slot": "dialog-footer",
2124
+ className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
2125
+ ...props,
2126
+ children: [children, showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, {
2127
+ render: /* @__PURE__ */ jsx(Button, { variant: "outline" }),
2128
+ children: "Close"
2129
+ })]
2130
+ });
2131
+ };
2132
+ var DialogTitle = ({ className, ...props }) => {
2133
+ return /* @__PURE__ */ jsx(Dialog$1.Title, {
2134
+ "data-slot": "dialog-title",
2135
+ className: cn("text-base leading-none font-medium", className),
2136
+ ...props
2137
+ });
2138
+ };
2139
+ var DialogDescription = ({ className, ...props }) => {
2140
+ return /* @__PURE__ */ jsx(Dialog$1.Description, {
2141
+ "data-slot": "dialog-description",
2142
+ className: cn("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
2143
+ ...props
2144
+ });
2145
+ };
2146
+ //#endregion
2147
+ //#region ../ui/src/components/ui/textarea/textarea.tsx
2148
+ var Textarea = ({ className, ...props }) => {
2149
+ return /* @__PURE__ */ jsx("textarea", {
2150
+ "data-slot": "textarea",
2151
+ className: cn("block min-h-16 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1.5 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 field-sizing-content resize-y md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
2152
+ ...props
2153
+ });
2154
+ };
2155
+ //#endregion
2156
+ //#region ../ui/src/components/ui/input-group/input-group.tsx
2157
+ var InputGroup = ({ className, ...props }) => {
2158
+ return /* @__PURE__ */ jsx("div", {
2159
+ "data-slot": "input-group",
2160
+ className: cn("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none", "has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50", "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto", "has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", className),
2161
+ ...props
2162
+ });
2163
+ };
2164
+ var inputGroupAddonVariants = cva("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-foreground/70 select-none [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
2165
+ variants: { align: {
2166
+ "inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
2167
+ "inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
2168
+ "block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
2169
+ "block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
2170
+ } },
2171
+ defaultVariants: { align: "inline-start" }
2172
+ });
2173
+ var InputGroupAddon = ({ className, align = "inline-start", ...props }) => {
2174
+ return /* @__PURE__ */ jsx("div", {
2175
+ "data-slot": "input-group-addon",
2176
+ "data-align": align,
2177
+ className: cn(inputGroupAddonVariants({ align }), className),
2178
+ onPointerDown: (event) => {
2179
+ if (event.target.closest("button")) return;
2180
+ event.currentTarget.parentElement?.querySelector("input")?.focus();
2181
+ },
2182
+ ...props
2183
+ });
2184
+ };
2185
+ var inputGroupButtonVariants = cva("flex items-center gap-2 text-sm shadow-none", {
2186
+ variants: { size: {
2187
+ xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
2188
+ sm: "",
2189
+ "icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
2190
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0"
2191
+ } },
2192
+ defaultVariants: { size: "xs" }
2193
+ });
2194
+ var InputGroupButton = ({ className, type = "button", variant = "ghost", size = "xs", ...props }) => {
2195
+ return /* @__PURE__ */ jsx(Button, {
2196
+ type,
2197
+ "data-size": size,
2198
+ variant,
2199
+ className: cn(inputGroupButtonVariants({ size }), className),
2200
+ ...props
2201
+ });
2202
+ };
2203
+ var InputGroupText = ({ className, ...props }) => {
2204
+ return /* @__PURE__ */ jsx("span", {
2205
+ className: cn("flex items-center gap-2 text-sm text-foreground/70 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
2206
+ ...props
2207
+ });
2208
+ };
2209
+ var InputGroupInput = ({ className, ...props }) => {
2210
+ return /* @__PURE__ */ jsx(Input, {
2211
+ "data-slot": "input-group-control",
2212
+ className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", className),
2213
+ ...props
2214
+ });
2215
+ };
2216
+ var InputGroupTextarea = ({ className, ...props }) => {
2217
+ return /* @__PURE__ */ jsx(Textarea, {
2218
+ "data-slot": "input-group-control",
2219
+ className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", className),
2220
+ ...props
2221
+ });
2222
+ };
2223
+ //#endregion
2224
+ //#region ../ui/src/components/ui/command/command.tsx
2225
+ var Command = ({ className, ...props }) => {
2226
+ return /* @__PURE__ */ jsx(Command$1, {
2227
+ "data-slot": "command",
2228
+ className: cn("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground", className),
2229
+ ...props
2230
+ });
2231
+ };
2232
+ var CommandDialog = ({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = false, ...props }) => {
2233
+ return /* @__PURE__ */ jsxs(Dialog, {
2234
+ ...props,
2235
+ children: [/* @__PURE__ */ jsxs(DialogHeader, {
2236
+ className: "sr-only",
2237
+ children: [/* @__PURE__ */ jsx(DialogTitle, { children: title }), /* @__PURE__ */ jsx(DialogDescription, { children: description })]
2238
+ }), /* @__PURE__ */ jsx(DialogContent, {
2239
+ className: cn("top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0", className),
2240
+ showCloseButton,
2241
+ children
2242
+ })]
2243
+ });
2244
+ };
2245
+ var CommandInput = ({ className, ...props }) => {
2246
+ return /* @__PURE__ */ jsx("div", {
2247
+ "data-slot": "command-input-wrapper",
2248
+ className: "border-b border-border p-1",
2249
+ children: /* @__PURE__ */ jsxs(InputGroup, {
2250
+ className: "h-8 border-transparent bg-transparent shadow-none *:data-[slot=input-group-addon]:pl-2 dark:bg-transparent",
2251
+ children: [/* @__PURE__ */ jsx(Command$1.Input, {
2252
+ "data-slot": "command-input",
2253
+ className: cn("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className),
2254
+ ...props
2255
+ }), /* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(IconSearch, { className: "size-4 shrink-0 opacity-50" }) })]
2256
+ })
2257
+ });
2258
+ };
2259
+ /**
2260
+ * The palette's results list. The scroll container is the DS ScrollArea rather
2261
+ * than the primitive's own `overflow-y-auto`, because a list of results that
2262
+ * continues past the fold with no bar and no fade reads as a complete list. The
2263
+ * cap stays overridable: `cn` lets a caller's own `max-h-*` replace the default.
2264
+ *
2265
+ * The ScrollArea wraps the list from OUTSIDE rather than lining it: cmdk's list
2266
+ * carries `role="listbox"`, and a listbox may not contain presentation wrappers
2267
+ * (axe flags that as a critical aria-required-children violation). The options
2268
+ * have to stay direct children of the element that holds the role.
2269
+ *
2270
+ * cmdk keeps the active item in view with `scrollIntoView({ block: 'nearest' })`
2271
+ * on the item, which acts on the nearest scrollable ancestor, so that keeps
2272
+ * working now that the viewport is the one that scrolls. `scroll-py-1` goes on
2273
+ * the viewport for the same reason: it is what pads that scroll.
2274
+ */
2275
+ var CommandList = ({ className, children, ...props }) => {
2276
+ return /* @__PURE__ */ jsx(ScrollArea, {
2277
+ type: "always",
2278
+ fade: true,
2279
+ fadeFrom: "popover",
2280
+ className: cn("max-h-72", className),
2281
+ viewPortClassName: "scroll-py-1",
2282
+ children: /* @__PURE__ */ jsx(Command$1.List, {
2283
+ "data-slot": "command-list",
2284
+ className: "outline-none",
2285
+ ...props,
2286
+ children
2287
+ })
2288
+ });
2289
+ };
2290
+ var CommandEmpty = ({ className, ...props }) => {
2291
+ return /* @__PURE__ */ jsx(Command$1.Empty, {
2292
+ "data-slot": "command-empty",
2293
+ className: cn("py-6 text-center text-sm", className),
2294
+ ...props
2295
+ });
2296
+ };
2297
+ var CommandGroup = ({ className, ...props }) => {
2298
+ return /* @__PURE__ */ jsx(Command$1.Group, {
2299
+ "data-slot": "command-group",
2300
+ className: cn("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground", className),
2301
+ ...props
2302
+ });
2303
+ };
2304
+ var CommandSeparator = ({ className, ...props }) => {
2305
+ return /* @__PURE__ */ jsx(Command$1.Separator, {
2306
+ "data-slot": "command-separator",
2307
+ className: cn("-mx-1 h-px bg-border", className),
2308
+ ...props
2309
+ });
2310
+ };
2311
+ var CommandItem = ({ className, children, ...props }) => {
2312
+ return /* @__PURE__ */ jsxs(Command$1.Item, {
2313
+ "data-slot": "command-item",
2314
+ className: cn("group/command-item", popupItemClass("cmdk"), className),
2315
+ ...props,
2316
+ children: [children, /* @__PURE__ */ jsx(IconCheck, {
2317
+ "data-slot": "command-item-indicator",
2318
+ className: "ml-auto size-4 shrink-0 opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"
2319
+ })]
2320
+ });
2321
+ };
2322
+ var CommandShortcut = ({ className, ...props }) => {
2323
+ return /* @__PURE__ */ jsx("span", {
2324
+ "data-slot": "command-shortcut",
2325
+ className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground", className),
2326
+ ...props
2327
+ });
2328
+ };
2329
+ //#endregion
2330
+ //#region ../ui/src/components/ui/context-menu/context-menu.tsx
2331
+ var ContextMenu = ({ ...props }) => {
2332
+ return /* @__PURE__ */ jsx(ContextMenu$1.Root, {
2333
+ "data-slot": "context-menu",
2334
+ ...props
2335
+ });
2336
+ };
2337
+ var ContextMenuPortal = ({ ...props }) => {
2338
+ return /* @__PURE__ */ jsx(ContextMenu$1.Portal, {
2339
+ "data-slot": "context-menu-portal",
2340
+ ...props
2341
+ });
2342
+ };
2343
+ var ContextMenuTrigger = ({ className, ...props }) => {
2344
+ return /* @__PURE__ */ jsx(ContextMenu$1.Trigger, {
2345
+ "data-slot": "context-menu-trigger",
2346
+ className: cn("select-none", className),
2347
+ ...props
2348
+ });
2349
+ };
2350
+ var ContextMenuContent = ({ className, align = "start", alignOffset = 4, side = "right", sideOffset = 0, ...props }) => {
2351
+ return /* @__PURE__ */ jsx(ContextMenu$1.Portal, { children: /* @__PURE__ */ jsx(ContextMenu$1.Positioner, {
2352
+ className: "isolate z-50 outline-none",
2353
+ align,
2354
+ alignOffset,
2355
+ side,
2356
+ sideOffset,
2357
+ children: /* @__PURE__ */ jsx(ContextMenu$1.Popup, {
2358
+ "data-slot": "context-menu-content",
2359
+ className: cn("z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", "motion-reduce:animate-none", className),
2360
+ ...props
2361
+ })
2362
+ }) });
2363
+ };
2364
+ var ContextMenuGroup = ({ ...props }) => {
2365
+ return /* @__PURE__ */ jsx(ContextMenu$1.Group, {
2366
+ "data-slot": "context-menu-group",
2367
+ ...props
2368
+ });
2369
+ };
2370
+ var ContextMenuLabel = ({ className, inset, ...props }) => {
2371
+ return /* @__PURE__ */ jsx(ContextMenu$1.GroupLabel, {
2372
+ "data-slot": "context-menu-label",
2373
+ "data-inset": inset,
2374
+ className: cn("px-1.5 py-1 text-xs font-medium text-muted-foreground data-[inset=true]:pl-7", className),
2375
+ ...props
2376
+ });
2377
+ };
2378
+ var ContextMenuItem = ({ className, inset, variant = "default", ...props }) => {
2379
+ return /* @__PURE__ */ jsx(ContextMenu$1.Item, {
2380
+ "data-slot": "context-menu-item",
2381
+ "data-inset": inset,
2382
+ "data-variant": variant,
2383
+ className: cn("group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset=true]:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive", className),
2384
+ ...props
2385
+ });
2386
+ };
2387
+ var ContextMenuSub = ({ ...props }) => {
2388
+ return /* @__PURE__ */ jsx(ContextMenu$1.SubmenuRoot, {
2389
+ "data-slot": "context-menu-sub",
2390
+ ...props
2391
+ });
2392
+ };
2393
+ var ContextMenuSubTrigger = ({ className, inset, children, ...props }) => {
2394
+ return /* @__PURE__ */ jsxs(ContextMenu$1.SubmenuTrigger, {
2395
+ "data-slot": "context-menu-sub-trigger",
2396
+ "data-inset": inset,
2397
+ className: cn("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset=true]:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2398
+ ...props,
2399
+ children: [children, /* @__PURE__ */ jsx(IconChevronRight, { className: "ml-auto" })]
2400
+ });
2401
+ };
2402
+ var ContextMenuSubContent = ({ ...props }) => {
2403
+ return /* @__PURE__ */ jsx(ContextMenuContent, {
2404
+ "data-slot": "context-menu-sub-content",
2405
+ className: "shadow-lg",
2406
+ side: "right",
2407
+ ...props
2408
+ });
2409
+ };
2410
+ var ContextMenuCheckboxItem = ({ className, children, checked, inset, ...props }) => {
2411
+ return /* @__PURE__ */ jsxs(ContextMenu$1.CheckboxItem, {
2412
+ "data-slot": "context-menu-checkbox-item",
2413
+ "data-inset": inset,
2414
+ className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset=true]:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2415
+ checked,
2416
+ ...props,
2417
+ children: [/* @__PURE__ */ jsx("span", {
2418
+ className: "pointer-events-none absolute right-2",
2419
+ children: /* @__PURE__ */ jsx(ContextMenu$1.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(IconCheck, {}) })
2420
+ }), children]
2421
+ });
2422
+ };
2423
+ var ContextMenuRadioGroup = ({ ...props }) => {
2424
+ return /* @__PURE__ */ jsx(ContextMenu$1.RadioGroup, {
2425
+ "data-slot": "context-menu-radio-group",
2426
+ ...props
2427
+ });
2428
+ };
2429
+ var ContextMenuRadioItem = ({ className, children, inset, ...props }) => {
2430
+ return /* @__PURE__ */ jsxs(ContextMenu$1.RadioItem, {
2431
+ "data-slot": "context-menu-radio-item",
2432
+ "data-inset": inset,
2433
+ className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset=true]:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2434
+ ...props,
2435
+ children: [/* @__PURE__ */ jsx("span", {
2436
+ className: "pointer-events-none absolute right-2",
2437
+ children: /* @__PURE__ */ jsx(ContextMenu$1.RadioItemIndicator, { children: /* @__PURE__ */ jsx(IconCheck, {}) })
2438
+ }), children]
2439
+ });
2440
+ };
2441
+ var ContextMenuSeparator = ({ className, ...props }) => {
2442
+ return /* @__PURE__ */ jsx(ContextMenu$1.Separator, {
2443
+ "data-slot": "context-menu-separator",
2444
+ className: cn("-mx-1 my-1 h-px bg-border", className),
2445
+ ...props
2446
+ });
2447
+ };
2448
+ var ContextMenuShortcut = ({ className, ...props }) => {
2449
+ return /* @__PURE__ */ jsx("span", {
2450
+ "data-slot": "context-menu-shortcut",
2451
+ className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground", className),
2452
+ ...props
2453
+ });
2454
+ };
2455
+ //#endregion
2456
+ //#region ../ui/src/components/ui/drawer/drawer.tsx
2457
+ var Drawer = ({ ...props }) => {
2458
+ return /* @__PURE__ */ jsx(Dialog$1.Root, {
2459
+ "data-slot": "drawer",
2460
+ ...props
2461
+ });
2462
+ };
2463
+ var DrawerTrigger = ({ ...props }) => {
2464
+ return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
2465
+ "data-slot": "drawer-trigger",
2466
+ ...props
2467
+ });
2468
+ };
2469
+ var DrawerClose = ({ ...props }) => {
2470
+ return /* @__PURE__ */ jsx(Dialog$1.Close, {
2471
+ "data-slot": "drawer-close",
2472
+ ...props
2473
+ });
2474
+ };
2475
+ var DrawerOverlay = ({ className, ...props }) => {
2476
+ return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
2477
+ "data-slot": "drawer-overlay",
2478
+ className: cn("fixed inset-0 isolate z-50 bg-overlay duration-100 motion-reduce:animate-none supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
2479
+ ...props
2480
+ });
2481
+ };
2482
+ var DrawerContent = ({ className, children, side = "right", showCloseButton = true, ...props }) => {
2483
+ return /* @__PURE__ */ jsxs(Dialog$1.Portal, {
2484
+ "data-slot": "drawer-portal",
2485
+ children: [/* @__PURE__ */ jsx(DrawerOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
2486
+ "data-slot": "drawer-content",
2487
+ "data-side": side,
2488
+ className: cn("fixed z-50 flex flex-col gap-4 border-border bg-popover p-4 text-sm text-popover-foreground shadow-lg outline-none duration-100 motion-reduce:animate-none data-open:animate-in data-closed:animate-out", side === "right" && "inset-y-0 right-0 h-full w-3/4 max-w-sm border-l data-open:slide-in-from-right data-closed:slide-out-to-right", side === "left" && "inset-y-0 left-0 h-full w-3/4 max-w-sm border-r data-open:slide-in-from-left data-closed:slide-out-to-left", side === "top" && "inset-x-0 top-0 h-auto border-b data-open:slide-in-from-top data-closed:slide-out-to-top", side === "bottom" && "inset-x-0 bottom-0 h-auto border-t data-open:slide-in-from-bottom data-closed:slide-out-to-bottom", className),
2489
+ ...props,
2490
+ children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog$1.Close, {
2491
+ "data-slot": "drawer-close",
2492
+ render: /* @__PURE__ */ jsx(Button, {
2493
+ variant: "ghost",
2494
+ className: "absolute top-2 right-2",
2495
+ size: "icon-sm"
2496
+ }),
2497
+ children: [/* @__PURE__ */ jsx(IconX, {}), /* @__PURE__ */ jsx("span", {
2498
+ className: "sr-only",
2499
+ children: "Close"
2500
+ })]
2501
+ })]
2502
+ })]
2503
+ });
2504
+ };
2505
+ var DrawerHeader = ({ className, ...props }) => {
2506
+ return /* @__PURE__ */ jsx("div", {
2507
+ "data-slot": "drawer-header",
2508
+ className: cn("flex flex-col gap-2", className),
2509
+ ...props
2510
+ });
2511
+ };
2512
+ var DrawerFooter = ({ className, ...props }) => {
2513
+ return /* @__PURE__ */ jsx("div", {
2514
+ "data-slot": "drawer-footer",
2515
+ className: cn("mt-auto flex flex-col gap-2", className),
2516
+ ...props
2517
+ });
2518
+ };
2519
+ var DrawerTitle = ({ className, ...props }) => {
2520
+ return /* @__PURE__ */ jsx(Dialog$1.Title, {
2521
+ "data-slot": "drawer-title",
2522
+ className: cn("text-base leading-none font-medium", className),
2523
+ ...props
2524
+ });
2525
+ };
2526
+ var DrawerDescription = ({ className, ...props }) => {
2527
+ return /* @__PURE__ */ jsx(Dialog$1.Description, {
2528
+ "data-slot": "drawer-description",
2529
+ className: cn("text-sm text-muted-foreground", className),
2530
+ ...props
2531
+ });
2532
+ };
2533
+ //#endregion
2534
+ //#region ../ui/src/components/ui/empty/empty.tsx
2535
+ var Empty = ({ className, ...props }) => {
2536
+ return /* @__PURE__ */ jsx("div", {
2537
+ "data-slot": "empty",
2538
+ className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance", className),
2539
+ ...props
2540
+ });
2541
+ };
2542
+ var EmptyHeader = ({ className, ...props }) => {
2543
+ return /* @__PURE__ */ jsx("div", {
2544
+ "data-slot": "empty-header",
2545
+ className: cn("flex max-w-sm flex-col items-center gap-2", className),
2546
+ ...props
2547
+ });
2548
+ };
2549
+ var emptyMediaVariants = cva("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
2550
+ variants: { variant: {
2551
+ default: "bg-transparent",
2552
+ icon: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"
2553
+ } },
2554
+ defaultVariants: { variant: "default" }
2555
+ });
2556
+ var EmptyMedia = ({ className, variant = "default", ...props }) => {
2557
+ return /* @__PURE__ */ jsx("div", {
2558
+ "data-slot": "empty-icon",
2559
+ "data-variant": variant,
2560
+ className: cn(emptyMediaVariants({
2561
+ variant,
2562
+ className
2563
+ })),
2564
+ ...props
2565
+ });
2566
+ };
2567
+ var EmptyTitle = ({ className, ...props }) => {
2568
+ return /* @__PURE__ */ jsx("div", {
2569
+ "data-slot": "empty-title",
2570
+ className: cn("font-heading text-sm font-medium tracking-tight", className),
2571
+ ...props
2572
+ });
2573
+ };
2574
+ var EmptyDescription = ({ className, ...props }) => {
2575
+ return /* @__PURE__ */ jsx("div", {
2576
+ "data-slot": "empty-description",
2577
+ className: cn("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
2578
+ ...props
2579
+ });
2580
+ };
2581
+ var EmptyContent = ({ className, ...props }) => {
2582
+ return /* @__PURE__ */ jsx("div", {
2583
+ "data-slot": "empty-content",
2584
+ className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance", className),
2585
+ ...props
2586
+ });
2587
+ };
2588
+ //#endregion
2589
+ //#region ../ui/src/components/ui/field/field.tsx
2590
+ var Field = ({ className, ...props }) => {
2591
+ return /* @__PURE__ */ jsx(Field$1.Root, {
2592
+ "data-slot": "field",
2593
+ className: cn("group/field flex flex-col gap-1.5", className),
2594
+ ...props
2595
+ });
2596
+ };
2597
+ var FieldLabel = ({ className, ...props }) => {
2598
+ return /* @__PURE__ */ jsx(Field$1.Label, {
2599
+ "data-slot": "field-label",
2600
+ className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-has-disabled/field:pointer-events-none group-has-disabled/field:opacity-50", className),
2601
+ ...props
2602
+ });
2603
+ };
2604
+ var FieldDescription = ({ className, ...props }) => {
2605
+ return /* @__PURE__ */ jsx(Field$1.Description, {
2606
+ "data-slot": "field-description",
2607
+ className: cn("text-sm text-muted-foreground", className),
2608
+ ...props
2609
+ });
2610
+ };
2611
+ var FieldError = ({ className, ...props }) => {
2612
+ return /* @__PURE__ */ jsx(Field$1.Error, {
2613
+ "data-slot": "field-error",
2614
+ className: cn("text-sm text-destructive", className),
2615
+ ...props
2616
+ });
2617
+ };
2618
+ //#endregion
2619
+ //#region ../ui/src/components/ui/hover-card/hover-card.tsx
2620
+ var HoverCard = ({ ...props }) => {
2621
+ return /* @__PURE__ */ jsx(PreviewCard.Root, {
2622
+ "data-slot": "hover-card",
2623
+ ...props
2624
+ });
2625
+ };
2626
+ var HoverCardTrigger = ({ ...props }) => {
2627
+ return /* @__PURE__ */ jsx(PreviewCard.Trigger, {
2628
+ "data-slot": "hover-card-trigger",
2629
+ ...props
2630
+ });
2631
+ };
2632
+ var HoverCardContent = ({ className, side = "bottom", sideOffset = 4, align = "center", alignOffset = 4, ...props }) => {
2633
+ return /* @__PURE__ */ jsx(PreviewCard.Portal, {
2634
+ "data-slot": "hover-card-portal",
2635
+ children: /* @__PURE__ */ jsx(PreviewCard.Positioner, {
2636
+ align,
2637
+ alignOffset,
2638
+ side,
2639
+ sideOffset,
2640
+ className: "isolate z-50",
2641
+ children: /* @__PURE__ */ jsx(PreviewCard.Popup, {
2642
+ "data-slot": "hover-card-content",
2643
+ className: cn("z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 motion-reduce:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
2644
+ ...props
2645
+ })
2646
+ })
2647
+ });
2648
+ };
2649
+ //#endregion
2650
+ //#region ../ui/src/components/ui/indicator/indicator.tsx
2651
+ /**
2652
+ * Indicator: notification count-bubble or status-dot that attaches to a corner
2653
+ * of another element (the Material/Angular "badge" concept; our Badge is the
2654
+ * label chip). The parent element must be position-relative (e.g. `relative`).
2655
+ *
2656
+ * Legacy mapping: `edynBadge` directive -> `Indicator` default/destructive;
2657
+ * `edyn-dot` -> `Indicator` dot variant.
2658
+ * Positioning uses Radix vocabulary: side (top|bottom) + align (start|end).
2659
+ */
2660
+ var indicatorVariants = cva("absolute z-10 inline-flex shrink-0 items-center justify-center font-medium leading-none ring-2 ring-background", {
2661
+ variants: {
2662
+ variant: {
2663
+ /** Count bubble: primary colors, shows children as the count/text. */
2664
+ default: "h-4 min-w-4 rounded-full bg-primary px-1 text-xs tabular-nums text-primary-foreground",
2665
+ /** Status dot: solid circle, no children rendered. */
2666
+ dot: "size-2 rounded-full bg-primary",
2667
+ /** Count bubble in destructive (error/alert) colors. */
2668
+ destructive: "h-4 min-w-4 rounded-full bg-destructive px-1 text-xs text-destructive-foreground tabular-nums dark:text-background"
2669
+ },
2670
+ side: {
2671
+ top: "top-0",
2672
+ bottom: "bottom-0"
2673
+ },
2674
+ align: {
2675
+ start: "left-0",
2676
+ end: "right-0"
2677
+ }
2678
+ },
2679
+ compoundVariants: [
2680
+ {
2681
+ side: "top",
2682
+ align: "start",
2683
+ class: "-translate-x-1/2 -translate-y-1/2"
2684
+ },
2685
+ {
2686
+ side: "top",
2687
+ align: "end",
2688
+ class: "translate-x-1/2 -translate-y-1/2"
2689
+ },
2690
+ {
2691
+ side: "bottom",
2692
+ align: "start",
2693
+ class: "-translate-x-1/2 translate-y-1/2"
2694
+ },
2695
+ {
2696
+ side: "bottom",
2697
+ align: "end",
2698
+ class: "translate-x-1/2 translate-y-1/2"
2699
+ }
2700
+ ],
2701
+ defaultVariants: {
2702
+ variant: "default",
2703
+ side: "top",
2704
+ align: "end"
2705
+ }
2706
+ });
2707
+ var Indicator = ({ className, variant = "default", side = "top", align = "end", children, ...props }) => {
2708
+ return /* @__PURE__ */ jsx("span", {
2709
+ "data-slot": "indicator",
2710
+ "data-variant": variant,
2711
+ "data-side": side,
2712
+ "data-align": align,
2713
+ className: cn(indicatorVariants({
2714
+ variant,
2715
+ side,
2716
+ align
2717
+ }), className),
2718
+ ...props,
2719
+ children: variant !== "dot" ? children : null
2720
+ });
2721
+ };
2722
+ //#endregion
2723
+ //#region ../ui/src/components/ui/input-otp/input-otp.tsx
2724
+ var InputOTP = ({ className, containerClassName, ...props }) => {
2725
+ return /* @__PURE__ */ jsx(OTPInput, {
2726
+ "data-slot": "input-otp",
2727
+ containerClassName: cn("cn-input-otp flex items-center has-disabled:opacity-50", containerClassName),
2728
+ spellCheck: false,
2729
+ className: cn("disabled:cursor-not-allowed", className),
2730
+ ...props
2731
+ });
2732
+ };
2733
+ var InputOTPGroup = ({ className, ...props }) => {
2734
+ return /* @__PURE__ */ jsx("div", {
2735
+ "data-slot": "input-otp-group",
2736
+ className: cn("flex items-center rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40", className),
2737
+ ...props
2738
+ });
2739
+ };
2740
+ var InputOTPSlot = ({ index, className, ...props }) => {
2741
+ const { char, hasFakeCaret, isActive } = React.useContext(OTPInputContext)?.slots[index] ?? {};
2742
+ return /* @__PURE__ */ jsxs("div", {
2743
+ "data-slot": "input-otp-slot",
2744
+ "data-active": isActive,
2745
+ className: cn("relative flex size-8 items-center justify-center border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40", className),
2746
+ ...props,
2747
+ children: [char, hasFakeCaret && /* @__PURE__ */ jsx("div", {
2748
+ className: "pointer-events-none absolute inset-0 flex items-center justify-center",
2749
+ children: /* @__PURE__ */ jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000 motion-reduce:animate-none" })
2750
+ })]
2751
+ });
2752
+ };
2753
+ var InputOTPSeparator = ({ ...props }) => {
2754
+ return /* @__PURE__ */ jsx("div", {
2755
+ "data-slot": "input-otp-separator",
2756
+ className: "flex items-center [&_svg:not([class*='size-'])]:size-4",
2757
+ "aria-hidden": "true",
2758
+ ...props,
2759
+ children: /* @__PURE__ */ jsx(IconMinus, {})
2760
+ });
2761
+ };
2762
+ //#endregion
2763
+ //#region ../ui/src/components/ui/separator/separator.tsx
2764
+ /**
2765
+ * Hairline rule between content, announced as `role="separator"`.
2766
+ *
2767
+ * The orientation styles are branched in TS rather than written as
2768
+ * `data-[orientation=*]:` variants on purpose. A variant carries two
2769
+ * selectors' worth of specificity, so it would outrank a plain class passed in
2770
+ * by the caller: the sidebar's own `w-auto` lost to `w-full` that way. Branching
2771
+ * emits one plain class per axis, which `cn` can dedupe and a caller can
2772
+ * override.
2773
+ *
2774
+ * Vertical uses `self-stretch` instead of `h-full`: a percentage height needs a
2775
+ * definite parent, and the usual host is an `items-center` row whose height
2776
+ * comes from its content.
2777
+ */
2778
+ var Separator = ({ className, orientation = "horizontal", ...props }) => {
2779
+ return /* @__PURE__ */ jsx(Separator$1, {
2780
+ "data-slot": "separator",
2781
+ orientation,
2782
+ className: cn("shrink-0 bg-border", orientation === "horizontal" ? "h-px w-full" : "w-px self-stretch", className),
2783
+ ...props
2784
+ });
2785
+ };
2786
+ //#endregion
2787
+ //#region ../ui/src/components/ui/item/item.tsx
2788
+ var ItemGroup = ({ className, ...props }) => {
2789
+ return /* @__PURE__ */ jsx("div", {
2790
+ role: "list",
2791
+ "data-slot": "item-group",
2792
+ className: cn("group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2", className),
2793
+ ...props
2794
+ });
2795
+ };
2796
+ var ItemSeparator = ({ className, ...props }) => {
2797
+ return /* @__PURE__ */ jsx(Separator, {
2798
+ "data-slot": "item-separator",
2799
+ orientation: "horizontal",
2800
+ className: cn("my-2", className),
2801
+ ...props
2802
+ });
2803
+ };
2804
+ var itemVariants = cva("group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted", {
2805
+ variants: {
2806
+ variant: {
2807
+ default: "border-transparent",
2808
+ outline: "border-border",
2809
+ muted: "border-transparent bg-muted/50"
2810
+ },
2811
+ size: {
2812
+ default: "gap-2.5 px-3 py-2.5",
2813
+ sm: "gap-2.5 px-3 py-2.5",
2814
+ xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
2815
+ }
2816
+ },
2817
+ defaultVariants: {
2818
+ variant: "default",
2819
+ size: "default"
2820
+ }
2821
+ });
2822
+ var Item = ({ className, variant = "default", size = "default", render, ...props }) => {
2823
+ return useRender({
2824
+ defaultTagName: "div",
2825
+ props: mergeProps({ className: cn(itemVariants({
2826
+ variant,
2827
+ size,
2828
+ className
2829
+ })) }, props),
2830
+ render,
2831
+ state: {
2832
+ slot: "item",
2833
+ variant,
2834
+ size
2835
+ }
2836
+ });
2837
+ };
2838
+ var itemMediaVariants = cva("flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none", {
2839
+ variants: { variant: {
2840
+ default: "bg-transparent",
2841
+ icon: "[&_svg:not([class*='size-'])]:size-4",
2842
+ image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
2843
+ } },
2844
+ defaultVariants: { variant: "default" }
2845
+ });
2846
+ var ItemMedia = ({ className, variant = "default", ...props }) => {
2847
+ return /* @__PURE__ */ jsx("div", {
2848
+ "data-slot": "item-media",
2849
+ "data-variant": variant,
2850
+ className: cn(itemMediaVariants({
2851
+ variant,
2852
+ className
2853
+ })),
2854
+ ...props
2855
+ });
2856
+ };
2857
+ var ItemContent = ({ className, ...props }) => {
2858
+ return /* @__PURE__ */ jsx("div", {
2859
+ "data-slot": "item-content",
2860
+ className: cn("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
2861
+ ...props
2862
+ });
2863
+ };
2864
+ var ItemTitle = ({ className, ...props }) => {
2865
+ return /* @__PURE__ */ jsx("div", {
2866
+ "data-slot": "item-title",
2867
+ className: cn("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", className),
2868
+ ...props
2869
+ });
2870
+ };
2871
+ var ItemDescription = ({ className, ...props }) => {
2872
+ return /* @__PURE__ */ jsx("p", {
2873
+ "data-slot": "item-description",
2874
+ className: cn("line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
2875
+ ...props
2876
+ });
2877
+ };
2878
+ var ItemActions = ({ className, ...props }) => {
2879
+ return /* @__PURE__ */ jsx("div", {
2880
+ "data-slot": "item-actions",
2881
+ className: cn("flex items-center gap-2", className),
2882
+ ...props
2883
+ });
2884
+ };
2885
+ var ItemHeader = ({ className, ...props }) => {
2886
+ return /* @__PURE__ */ jsx("div", {
2887
+ "data-slot": "item-header",
2888
+ className: cn("flex basis-full items-center justify-between gap-2", className),
2889
+ ...props
2890
+ });
2891
+ };
2892
+ var ItemFooter = ({ className, ...props }) => {
2893
+ return /* @__PURE__ */ jsx("div", {
2894
+ "data-slot": "item-footer",
2895
+ className: cn("flex basis-full items-center justify-between gap-2", className),
2896
+ ...props
2897
+ });
2898
+ };
2899
+ //#endregion
2900
+ //#region ../ui/src/components/ui/kbd/kbd.tsx
2901
+ var Kbd = ({ className, ...props }) => {
2902
+ return /* @__PURE__ */ jsx("kbd", {
2903
+ "data-slot": "kbd",
2904
+ className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3", className),
2905
+ ...props
2906
+ });
2907
+ };
2908
+ var KbdGroup = ({ className, ...props }) => {
2909
+ return /* @__PURE__ */ jsx("kbd", {
2910
+ "data-slot": "kbd-group",
2911
+ className: cn("inline-flex items-center gap-1", className),
2912
+ ...props
2913
+ });
2914
+ };
2915
+ //#endregion
2916
+ //#region ../ui/src/components/ui/label/label.tsx
2917
+ var Label = ({ className, ...props }) => {
2918
+ return /* @__PURE__ */ jsx("label", {
2919
+ "data-slot": "label",
2920
+ className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
2921
+ ...props
2922
+ });
2923
+ };
2924
+ //#endregion
2925
+ //#region ../ui/src/components/ui/marker/marker.tsx
2926
+ var markerVariants = cva("group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground", { variants: { variant: {
2927
+ default: "",
2928
+ separator: "before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border",
2929
+ border: "border-b border-border pb-2"
2930
+ } } });
2931
+ var Marker = ({ className, variant = "default", render, ...props }) => {
2932
+ return useRender({
2933
+ defaultTagName: "div",
2934
+ props: mergeProps({ className: cn(markerVariants({
2935
+ variant,
2936
+ className
2937
+ })) }, props),
2938
+ render,
2939
+ state: {
2940
+ slot: "marker",
2941
+ variant
2942
+ }
2943
+ });
2944
+ };
2945
+ var MarkerIcon = ({ className, ...props }) => {
2946
+ return /* @__PURE__ */ jsx("span", {
2947
+ "data-slot": "marker-icon",
2948
+ "aria-hidden": "true",
2949
+ className: cn("size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
2950
+ ...props
2951
+ });
2952
+ };
2953
+ var MarkerContent = ({ className, ...props }) => {
2954
+ return /* @__PURE__ */ jsx("span", {
2955
+ "data-slot": "marker-content",
2956
+ className: cn("min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
2957
+ ...props
2958
+ });
2959
+ };
2960
+ //#endregion
2961
+ //#region ../ui/src/components/ui/menubar/menubar.tsx
2962
+ var Menubar = ({ className, ...props }) => {
2963
+ return /* @__PURE__ */ jsx(Menubar$1, {
2964
+ "data-slot": "menubar",
2965
+ className: cn("flex h-8 items-center gap-0.5 rounded-lg border p-[3px]", className),
2966
+ ...props
2967
+ });
2968
+ };
2969
+ var MenubarMenu = ({ ...props }) => {
2970
+ return /* @__PURE__ */ jsx(DropdownMenu, {
2971
+ "data-slot": "menubar-menu",
2972
+ ...props
2973
+ });
2974
+ };
2975
+ var MenubarGroup = ({ ...props }) => {
2976
+ return /* @__PURE__ */ jsx(DropdownMenuGroup, {
2977
+ "data-slot": "menubar-group",
2978
+ ...props
2979
+ });
2980
+ };
2981
+ var MenubarPortal = ({ ...props }) => {
2982
+ return /* @__PURE__ */ jsx(DropdownMenuPortal, {
2983
+ "data-slot": "menubar-portal",
2984
+ ...props
2985
+ });
2986
+ };
2987
+ var MenubarTrigger = ({ className, ...props }) => {
2988
+ return /* @__PURE__ */ jsx(DropdownMenuTrigger, {
2989
+ "data-slot": "menubar-trigger",
2990
+ className: cn("flex items-center rounded-sm px-1.5 py-[2px] text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted", className),
2991
+ ...props
2992
+ });
2993
+ };
2994
+ var MenubarContent = ({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }) => {
2995
+ return /* @__PURE__ */ jsx(DropdownMenuContent, {
2996
+ "data-slot": "menubar-content",
2997
+ align,
2998
+ alignOffset,
2999
+ sideOffset,
3000
+ className: cn("min-w-36 rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", "motion-reduce:animate-none", className),
3001
+ ...props
3002
+ });
3003
+ };
3004
+ var MenubarItem = ({ className, inset, variant = "default", ...props }) => {
3005
+ return /* @__PURE__ */ jsx(DropdownMenuItem, {
3006
+ "data-slot": "menubar-item",
3007
+ "data-inset": inset,
3008
+ "data-variant": variant,
3009
+ className: cn("group/menubar-item gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-[inset=true]:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!", className),
3010
+ ...props
3011
+ });
3012
+ };
3013
+ var MenubarCheckboxItem = ({ className, children, checked, inset, ...props }) => {
3014
+ return /* @__PURE__ */ jsxs(Menu.CheckboxItem, {
3015
+ "data-slot": "menubar-checkbox-item",
3016
+ "data-inset": inset,
3017
+ className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-[inset=true]:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
3018
+ checked,
3019
+ ...props,
3020
+ children: [/* @__PURE__ */ jsx("span", {
3021
+ className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
3022
+ children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(IconCheck, {}) })
3023
+ }), children]
3024
+ });
3025
+ };
3026
+ var MenubarRadioGroup = ({ ...props }) => {
3027
+ return /* @__PURE__ */ jsx(DropdownMenuRadioGroup, {
3028
+ "data-slot": "menubar-radio-group",
3029
+ ...props
3030
+ });
3031
+ };
3032
+ var MenubarRadioItem = ({ className, children, inset, ...props }) => {
3033
+ return /* @__PURE__ */ jsxs(Menu.RadioItem, {
3034
+ "data-slot": "menubar-radio-item",
3035
+ "data-inset": inset,
3036
+ className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-[inset=true]:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
3037
+ ...props,
3038
+ children: [/* @__PURE__ */ jsx("span", {
3039
+ className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
3040
+ children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(IconCheck, {}) })
3041
+ }), children]
3042
+ });
3043
+ };
3044
+ var MenubarLabel = ({ className, inset, ...props }) => {
3045
+ return /* @__PURE__ */ jsx(DropdownMenuLabel, {
3046
+ "data-slot": "menubar-label",
3047
+ "data-inset": inset,
3048
+ className: cn("px-1.5 py-1 text-sm font-medium data-[inset=true]:pl-7", className),
3049
+ ...props
3050
+ });
3051
+ };
3052
+ var MenubarSeparator = ({ className, ...props }) => {
3053
+ return /* @__PURE__ */ jsx(DropdownMenuSeparator, {
3054
+ "data-slot": "menubar-separator",
3055
+ className: cn("-mx-1 my-1 h-px bg-border", className),
3056
+ ...props
3057
+ });
3058
+ };
3059
+ var MenubarShortcut = ({ className, ...props }) => {
3060
+ return /* @__PURE__ */ jsx(DropdownMenuShortcut, {
3061
+ "data-slot": "menubar-shortcut",
3062
+ className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground", className),
3063
+ ...props
3064
+ });
3065
+ };
3066
+ var MenubarSub = ({ ...props }) => {
3067
+ return /* @__PURE__ */ jsx(DropdownMenuSub, {
3068
+ "data-slot": "menubar-sub",
3069
+ ...props
3070
+ });
3071
+ };
3072
+ var MenubarSubTrigger = ({ className, inset, ...props }) => {
3073
+ return /* @__PURE__ */ jsx(DropdownMenuSubTrigger, {
3074
+ "data-slot": "menubar-sub-trigger",
3075
+ "data-inset": inset,
3076
+ className: cn("gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground data-[inset=true]:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4", className),
3077
+ ...props
3078
+ });
3079
+ };
3080
+ var MenubarSubContent = ({ className, ...props }) => {
3081
+ return /* @__PURE__ */ jsx(DropdownMenuSubContent, {
3082
+ "data-slot": "menubar-sub-content",
3083
+ className: cn("min-w-32 rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", "motion-reduce:animate-none", className),
3084
+ ...props
3085
+ });
3086
+ };
3087
+ //#endregion
3088
+ //#region ../ui/src/components/ui/message/message.tsx
3089
+ var MessageGroup = ({ className, ...props }) => {
3090
+ return /* @__PURE__ */ jsx("div", {
3091
+ "data-slot": "message-group",
3092
+ className: cn("flex min-w-0 flex-col gap-2", className),
3093
+ ...props
3094
+ });
3095
+ };
3096
+ var Message = ({ className, align = "start", ...props }) => {
3097
+ return /* @__PURE__ */ jsx("div", {
3098
+ "data-slot": "message",
3099
+ "data-align": align,
3100
+ className: cn("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", className),
3101
+ ...props
3102
+ });
3103
+ };
3104
+ var MessageAvatar = ({ className, ...props }) => {
3105
+ return /* @__PURE__ */ jsx("div", {
3106
+ "data-slot": "message-avatar",
3107
+ className: cn("flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8", className),
3108
+ ...props
3109
+ });
3110
+ };
3111
+ var MessageContent = ({ className, ...props }) => {
3112
+ return /* @__PURE__ */ jsx("div", {
3113
+ "data-slot": "message-content",
3114
+ className: cn("flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end", className),
3115
+ ...props
3116
+ });
3117
+ };
3118
+ var MessageHeader = ({ className, ...props }) => {
3119
+ return /* @__PURE__ */ jsx("div", {
3120
+ "data-slot": "message-header",
3121
+ className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0", className),
3122
+ ...props
3123
+ });
3124
+ };
3125
+ var MessageFooter = ({ className, ...props }) => {
3126
+ return /* @__PURE__ */ jsx("div", {
3127
+ "data-slot": "message-footer",
3128
+ className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end", className),
3129
+ ...props
3130
+ });
3131
+ };
3132
+ //#endregion
3133
+ //#region ../ui/src/components/ui/message-scroller/message-scroller.tsx
3134
+ var MessageScrollerProvider = (props) => {
3135
+ return /* @__PURE__ */ jsx(MessageScroller$1.Provider, { ...props });
3136
+ };
3137
+ var MessageScroller = ({ className, ...props }) => {
3138
+ return /* @__PURE__ */ jsx(MessageScroller$1.Root, {
3139
+ "data-slot": "message-scroller",
3140
+ className: cn("group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden", className),
3141
+ ...props
3142
+ });
3143
+ };
3144
+ var MessageScrollerViewport = ({ className, ...props }) => {
3145
+ return /* @__PURE__ */ jsx(MessageScroller$1.Viewport, {
3146
+ "data-slot": "message-scroller-viewport",
3147
+ className: cn("size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent data-pending-scroll:invisible", className),
3148
+ ...props
3149
+ });
3150
+ };
3151
+ var MessageScrollerContent = ({ className, ...props }) => {
3152
+ return /* @__PURE__ */ jsx(MessageScroller$1.Content, {
3153
+ "data-slot": "message-scroller-content",
3154
+ className: cn("flex h-max min-h-full flex-col gap-6", className),
3155
+ ...props
3156
+ });
3157
+ };
3158
+ var MessageScrollerItem = ({ className, scrollAnchor = false, ...props }) => {
3159
+ return /* @__PURE__ */ jsx(MessageScroller$1.Item, {
3160
+ "data-slot": "message-scroller-item",
3161
+ scrollAnchor,
3162
+ className: cn("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className),
3163
+ ...props
3164
+ });
3165
+ };
3166
+ var MessageScrollerButton = ({ direction = "end", className, children, render, variant = "secondary", size = "icon-sm", ...props }) => {
3167
+ return /* @__PURE__ */ jsx(MessageScroller$1.Button, {
3168
+ "data-slot": "message-scroller-button",
3169
+ "data-direction": direction,
3170
+ "data-variant": variant,
3171
+ "data-size": size,
3172
+ direction,
3173
+ className: cn("absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 motion-reduce:transition-none hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180", className),
3174
+ render: render ?? /* @__PURE__ */ jsx(Button, {
3175
+ variant,
3176
+ size
3177
+ }),
3178
+ ...props,
3179
+ children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(IconArrowDown, {}), /* @__PURE__ */ jsx("span", {
3180
+ className: "sr-only",
3181
+ children: direction === "end" ? "Scroll to end" : "Scroll to start"
3182
+ })] })
3183
+ });
3184
+ };
3185
+ //#endregion
3186
+ //#region ../ui/src/components/ui/native-select/native-select.tsx
3187
+ var NativeSelect = ({ className, size = "default", ...props }) => {
3188
+ return /* @__PURE__ */ jsxs("div", {
3189
+ className: cn("group/native-select relative w-fit has-[select:disabled]:opacity-50", className),
3190
+ "data-slot": "native-select-wrapper",
3191
+ "data-size": size,
3192
+ children: [/* @__PURE__ */ jsx("select", {
3193
+ "data-slot": "native-select",
3194
+ "data-size": size,
3195
+ className: "h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
3196
+ ...props
3197
+ }), /* @__PURE__ */ jsx(IconSelector, {
3198
+ className: "pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none",
3199
+ "aria-hidden": "true",
3200
+ "data-slot": "native-select-icon"
3201
+ })]
3202
+ });
3203
+ };
3204
+ var NativeSelectOption = ({ className, ...props }) => {
3205
+ return /* @__PURE__ */ jsx("option", {
3206
+ "data-slot": "native-select-option",
3207
+ className: cn("bg-[Canvas] text-[CanvasText]", className),
3208
+ ...props
3209
+ });
3210
+ };
3211
+ var NativeSelectOptGroup = ({ className, ...props }) => {
3212
+ return /* @__PURE__ */ jsx("optgroup", {
3213
+ "data-slot": "native-select-optgroup",
3214
+ className: cn("bg-[Canvas] text-[CanvasText]", className),
3215
+ ...props
3216
+ });
3217
+ };
3218
+ //#endregion
3219
+ //#region ../ui/src/components/ui/navigation-menu/navigation-menu.tsx
3220
+ var NavigationMenu = ({ align = "start", className, children, ...props }) => {
3221
+ return /* @__PURE__ */ jsxs(NavigationMenu$1.Root, {
3222
+ "data-slot": "navigation-menu",
3223
+ className: cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className),
3224
+ ...props,
3225
+ children: [children, /* @__PURE__ */ jsx(NavigationMenuPositioner, { align })]
3226
+ });
3227
+ };
3228
+ var NavigationMenuList = ({ className, ...props }) => {
3229
+ return /* @__PURE__ */ jsx(NavigationMenu$1.List, {
3230
+ "data-slot": "navigation-menu-list",
3231
+ className: cn("group flex flex-1 list-none items-center justify-center gap-0", className),
3232
+ ...props
3233
+ });
3234
+ };
3235
+ var NavigationMenuItem = ({ className, ...props }) => {
3236
+ return /* @__PURE__ */ jsx(NavigationMenu$1.Item, {
3237
+ "data-slot": "navigation-menu-item",
3238
+ className: cn("relative", className),
3239
+ ...props
3240
+ });
3241
+ };
3242
+ var navigationMenuTriggerStyle = cva("group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none motion-reduce:transition-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted");
3243
+ var NavigationMenuTrigger = ({ className, children, ...props }) => {
3244
+ return /* @__PURE__ */ jsxs(NavigationMenu$1.Trigger, {
3245
+ "data-slot": "navigation-menu-trigger",
3246
+ className: cn(navigationMenuTriggerStyle(), "group", className),
3247
+ ...props,
3248
+ children: [
3249
+ children,
3250
+ " ",
3251
+ /* @__PURE__ */ jsx(IconChevronDown, {
3252
+ className: "relative top-px ml-1 size-3 transition duration-300 motion-reduce:transition-none group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180",
3253
+ "aria-hidden": "true"
3254
+ })
3255
+ ]
3256
+ });
3257
+ };
3258
+ var NavigationMenuContent = ({ className, ...props }) => {
3259
+ return /* @__PURE__ */ jsx(NavigationMenu$1.Content, {
3260
+ "data-slot": "navigation-menu-content",
3261
+ className: cn("motion-reduce:animate-none motion-reduce:transition-none", "data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%] h-full w-auto p-1 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95", className),
3262
+ ...props
3263
+ });
3264
+ };
3265
+ var NavigationMenuPositioner = ({ className, side = "bottom", sideOffset = 8, align = "start", alignOffset = 0, ...props }) => {
3266
+ return /* @__PURE__ */ jsx(NavigationMenu$1.Portal, { children: /* @__PURE__ */ jsx(NavigationMenu$1.Positioner, {
3267
+ side,
3268
+ sideOffset,
3269
+ align,
3270
+ alignOffset,
3271
+ className: cn("isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0", className),
3272
+ ...props,
3273
+ children: /* @__PURE__ */ jsx(NavigationMenu$1.Popup, {
3274
+ className: "data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none motion-reduce:transition-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0",
3275
+ children: /* @__PURE__ */ jsx(NavigationMenu$1.Viewport, { className: "relative size-full overflow-hidden" })
3276
+ })
3277
+ }) });
3278
+ };
3279
+ var NavigationMenuLink = ({ className, ...props }) => {
3280
+ return /* @__PURE__ */ jsx(NavigationMenu$1.Link, {
3281
+ "data-slot": "navigation-menu-link",
3282
+ className: cn("flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none motion-reduce:transition-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4", className),
3283
+ ...props
3284
+ });
3285
+ };
3286
+ var NavigationMenuIndicator = ({ className, ...props }) => {
3287
+ return /* @__PURE__ */ jsx(NavigationMenu$1.Icon, {
3288
+ "data-slot": "navigation-menu-indicator",
3289
+ className: cn("motion-reduce:animate-none", "top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in", className),
3290
+ ...props,
3291
+ children: /* @__PURE__ */ jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
3292
+ });
3293
+ };
3294
+ //#endregion
3295
+ //#region ../ui/src/components/ui/pagination/pagination.tsx
3296
+ /**
3297
+ * Compute the ordered list of page numbers and ellipsis markers to render.
3298
+ * First and last pages are always included. `siblingCount` controls how many
3299
+ * page numbers appear on each side of the current page.
3300
+ */
3301
+ var getPaginationRange = (page, count, siblingCount = 1) => {
3302
+ if (count <= 0) return [];
3303
+ const currentPage = Math.min(Math.max(page, 1), count);
3304
+ if (count <= 2 * siblingCount + 5) return Array.from({ length: count }, (_, i) => i + 1);
3305
+ const leftSiblingStart = Math.max(currentPage - siblingCount, 2);
3306
+ const rightSiblingEnd = Math.min(currentPage + siblingCount, count - 1);
3307
+ const showLeftEllipsis = leftSiblingStart > 2;
3308
+ const showRightEllipsis = rightSiblingEnd < count - 1;
3309
+ const range = [1];
3310
+ if (showLeftEllipsis) range.push("ellipsis");
3311
+ else for (let i = 2; i < leftSiblingStart; i++) range.push(i);
3312
+ for (let i = leftSiblingStart; i <= rightSiblingEnd; i++) range.push(i);
3313
+ if (showRightEllipsis) range.push("ellipsis");
3314
+ else for (let i = rightSiblingEnd + 1; i < count; i++) range.push(i);
3315
+ range.push(count);
3316
+ return range;
3317
+ };
3318
+ /** Clamp a page number to the valid [1, count] range (count <= 0 yields 1). */
3319
+ var clampPage = (page, count) => Math.min(Math.max(page, 1), Math.max(count, 1));
3320
+ var Pagination = ({ page, count, onPageChange, siblingCount = 1, className, ...props }) => {
3321
+ const currentPage = clampPage(page, count);
3322
+ const range = getPaginationRange(currentPage, count, siblingCount);
3323
+ let ellipsisCount = 0;
3324
+ const handlePrev = () => {
3325
+ if (currentPage > 1) onPageChange(currentPage - 1);
3326
+ };
3327
+ const handleNext = () => {
3328
+ if (currentPage < count) onPageChange(currentPage + 1);
3329
+ };
3330
+ return /* @__PURE__ */ jsx("nav", {
3331
+ "aria-label": "pagination",
3332
+ ...props,
3333
+ className: cn("mx-auto flex w-full justify-center", className),
3334
+ children: /* @__PURE__ */ jsxs("ul", {
3335
+ className: "flex flex-row items-center gap-1",
3336
+ children: [
3337
+ /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("button", {
3338
+ type: "button",
3339
+ "aria-label": "Go to previous page",
3340
+ disabled: currentPage <= 1,
3341
+ onClick: handlePrev,
3342
+ className: cn(buttonVariants({
3343
+ variant: "ghost",
3344
+ size: "icon"
3345
+ }), "size-8"),
3346
+ children: /* @__PURE__ */ jsx(IconChevronLeft, { size: 16 })
3347
+ }) }),
3348
+ range.map((item) => {
3349
+ if (item === "ellipsis") {
3350
+ ellipsisCount += 1;
3351
+ const ellipsisKey = `ellipsis-${ellipsisCount}`;
3352
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("span", {
3353
+ "aria-hidden": "true",
3354
+ className: cn(buttonVariants({
3355
+ variant: "ghost",
3356
+ size: "icon"
3357
+ }), "size-8 cursor-default pointer-events-none"),
3358
+ children: /* @__PURE__ */ jsx(IconDots, { size: 16 })
3359
+ }) }, ellipsisKey);
3360
+ }
3361
+ const isActive = item === currentPage;
3362
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("button", {
3363
+ type: "button",
3364
+ "aria-label": `Go to page ${item}`,
3365
+ "aria-current": isActive ? "page" : void 0,
3366
+ onClick: () => {
3367
+ if (!isActive) onPageChange(item);
3368
+ },
3369
+ className: cn(buttonVariants({
3370
+ variant: isActive ? "outline" : "ghost",
3371
+ size: "icon"
3372
+ }), "size-8", isActive && "pointer-events-none font-semibold"),
3373
+ children: item
3374
+ }) }, item);
3375
+ }),
3376
+ /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("button", {
3377
+ type: "button",
3378
+ "aria-label": "Go to next page",
3379
+ disabled: currentPage >= count,
3380
+ onClick: handleNext,
3381
+ className: cn(buttonVariants({
3382
+ variant: "ghost",
3383
+ size: "icon"
3384
+ }), "size-8"),
3385
+ children: /* @__PURE__ */ jsx(IconChevronRight, { size: 16 })
3386
+ }) })
3387
+ ]
3388
+ })
3389
+ });
3390
+ };
3391
+ //#endregion
3392
+ //#region ../ui/src/components/ui/progress/progress.tsx
3393
+ /**
3394
+ * The tones: a closed set of semantic colours rather than a class string, so a bar cannot carry a
3395
+ * colour the theme does not define and dark mode and a re-theme keep working. Each is the theme token
3396
+ * the fill uses; the track is a 20% tint of the same token.
3397
+ */
3398
+ var TONE_TOKEN = {
3399
+ default: "var(--primary)",
3400
+ info: "var(--info)",
3401
+ success: "var(--success)",
3402
+ warning: "var(--warning)",
3403
+ destructive: "var(--destructive)"
3404
+ };
3405
+ /**
3406
+ * Colours an app can set without a class string. --progress-color replaces the fill (any colour, such as an
3407
+ * app's own status tokens); --progress-track replaces the track, which does not follow the fill: an app
3408
+ * that wants a neutral track sets it to var(--muted). Both are read where the bar is, so they follow the
3409
+ * theme and can be set on :root or on any ancestor.
3410
+ */
3411
+ var progressFill = (tone) => `var(--progress-color, ${TONE_TOKEN[tone]})`;
3412
+ var progressTrack = (tone) => `var(--progress-track, color-mix(in oklab, ${TONE_TOKEN[tone]} 20%, transparent))`;
3413
+ /**
3414
+ * How the fill eases its width. The defaults are the 300ms ease-in-out it always had; an app retunes them
3415
+ * with --progress-duration and --progress-ease, or turns the easing off with `animated={false}` when the
3416
+ * number it shows is itself animated and the bar is driven from the same clock.
3417
+ */
3418
+ var PROGRESS_DURATION = "var(--progress-duration, 300ms)";
3419
+ var PROGRESS_EASE = "var(--progress-ease, cubic-bezier(0.4, 0, 0.2, 1))";
3420
+ var progressTrackVariants = cva("relative w-full overflow-hidden rounded-full", {
3421
+ variants: { size: {
3422
+ sm: "h-1",
3423
+ default: "h-2"
3424
+ } },
3425
+ defaultVariants: { size: "default" }
3426
+ });
3427
+ var Progress = ({ value = null, tone = "default", size, animated = true, className, ...props }) => {
3428
+ const fillStyle = {
3429
+ backgroundColor: progressFill(tone),
3430
+ ...value != null ? { width: `${value}%` } : null,
3431
+ ...animated ? {
3432
+ transitionDuration: PROGRESS_DURATION,
3433
+ transitionTimingFunction: PROGRESS_EASE
3434
+ } : null
3435
+ };
3436
+ return /* @__PURE__ */ jsx(Progress$1.Root, {
3437
+ "data-slot": "progress",
3438
+ value: value ?? null,
3439
+ className: cn("w-full", className),
3440
+ ...props,
3441
+ children: /* @__PURE__ */ jsx(Progress$1.Track, {
3442
+ "data-slot": "progress-track",
3443
+ className: progressTrackVariants({ size }),
3444
+ style: { backgroundColor: progressTrack(tone) },
3445
+ children: /* @__PURE__ */ jsx(Progress$1.Indicator, {
3446
+ "data-slot": "progress-indicator",
3447
+ "data-tone": tone,
3448
+ className: cn("h-full rounded-full motion-reduce:transition-none motion-reduce:animate-none data-indeterminate:w-1/3 data-indeterminate:animate-[progress-indeterminate_1.5s_ease-in-out_infinite]", animated ? "transition-[width] duration-300 ease-in-out" : "transition-none"),
3449
+ style: fillStyle
3450
+ })
3451
+ })
3452
+ });
3453
+ };
3454
+ //#endregion
3455
+ //#region ../ui/src/components/ui/questionnaire/questionnaire.tsx
3456
+ var Questionnaire = ({ className, ...props }) => {
3457
+ return /* @__PURE__ */ jsx(Questionnaire$1.Root, {
3458
+ "data-slot": "questionnaire",
3459
+ className: cn("flex w-full min-w-0 flex-col gap-4", className),
3460
+ ...props
3461
+ });
3462
+ };
3463
+ var QuestionnaireProgress = ({ className, ...props }) => {
3464
+ return /* @__PURE__ */ jsx(Questionnaire$1.Progress, {
3465
+ "data-slot": "questionnaire-progress",
3466
+ className: cn("min-h-[1lh] w-fit min-w-[14ch] text-xs font-medium text-muted-foreground tabular-nums", className),
3467
+ ...props
3468
+ });
3469
+ };
3470
+ var QuestionnaireItem = ({ className, ...props }) => {
3471
+ return /* @__PURE__ */ jsx(Questionnaire$1.Item, {
3472
+ "data-slot": "questionnaire-item",
3473
+ className: cn("flex min-w-0 flex-col gap-4 border-0 p-0 outline-none", className),
3474
+ ...props
3475
+ });
3476
+ };
3477
+ var QuestionnaireTitle = ({ className, ...props }) => {
3478
+ return /* @__PURE__ */ jsx(Questionnaire$1.Title, {
3479
+ "data-slot": "questionnaire-title",
3480
+ className: cn("font-heading text-base leading-snug font-medium text-pretty [&:not(:has(~[data-slot=questionnaire-description]))]:mb-4", className),
3481
+ ...props
3482
+ });
3483
+ };
3484
+ var QuestionnaireDescription = ({ className, ...props }) => {
3485
+ return /* @__PURE__ */ jsx(Questionnaire$1.Description, {
3486
+ "data-slot": "questionnaire-description",
3487
+ className: cn("text-sm text-pretty text-muted-foreground", className),
3488
+ ...props
3489
+ });
3490
+ };
3491
+ var QuestionnaireChoices = ({ className, ...props }) => {
3492
+ return /* @__PURE__ */ jsx(Questionnaire$1.Choices, {
3493
+ "data-slot": "questionnaire-choices",
3494
+ className: cn("group/questionnaire-choices grid min-w-0 gap-2", className),
3495
+ ...props
3496
+ });
3497
+ };
3498
+ var QuestionnaireChoice = ({ children, className, ...props }) => {
3499
+ return /* @__PURE__ */ jsxs(Questionnaire$1.Choice, {
3500
+ "data-slot": "questionnaire-choice",
3501
+ className: cn("group/questionnaire-choice relative flex min-h-11 cursor-pointer items-start gap-2.5 rounded-lg border border-input bg-transparent px-3 py-2.5 text-start text-sm transition-colors outline-none select-none hover:bg-muted/50 has-[>input:focus-visible]:border-ring has-[>input:focus-visible]:ring-3 has-[>input:focus-visible]:ring-ring/50 data-invalid:border-destructive dark:bg-input/20 data-checked:border-primary/40 data-checked:bg-muted dark:data-checked:bg-muted", "data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
3502
+ ...props,
3503
+ children: [
3504
+ /* @__PURE__ */ jsx(Questionnaire$1.ChoiceInput, {
3505
+ "data-slot": "questionnaire-choice-input",
3506
+ className: "absolute inset-0 z-10 size-full cursor-pointer opacity-0"
3507
+ }),
3508
+ /* @__PURE__ */ jsxs("span", {
3509
+ "aria-hidden": "true",
3510
+ "data-slot": "questionnaire-choice-indicator",
3511
+ className: "pointer-events-none relative flex size-4 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-[4px] border border-input group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[type=radio]/questionnaire-choice:rounded-full group-data-checked/questionnaire-choice:border-primary group-data-checked/questionnaire-choice:bg-primary group-data-checked/questionnaire-choice:text-primary-foreground dark:bg-input/30 dark:group-data-checked/questionnaire-choice:bg-primary",
3512
+ children: [/* @__PURE__ */ jsx("span", {
3513
+ "data-slot": "questionnaire-choice-indicator-dot",
3514
+ className: "hidden size-2 rounded-full bg-primary-foreground group-data-[type=checkbox]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
3515
+ }), /* @__PURE__ */ jsx(IconCheck, {
3516
+ "data-slot": "questionnaire-choice-indicator-check",
3517
+ className: "hidden size-3.5 group-data-[type=radio]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
3518
+ })]
3519
+ }),
3520
+ /* @__PURE__ */ jsx(Questionnaire$1.ChoiceLabel, {
3521
+ "data-slot": "questionnaire-choice-label",
3522
+ className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-snug",
3523
+ children
3524
+ }),
3525
+ /* @__PURE__ */ jsx(Questionnaire$1.ChoiceShortcut, {
3526
+ "data-slot": "questionnaire-choice-shortcut",
3527
+ className: "pointer-events-none ms-auto hidden size-5 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-md border border-input bg-background font-mono text-[0.625rem] leading-none font-medium text-muted-foreground group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[shortcut]/questionnaire-choice:inline-flex"
3528
+ })
3529
+ ]
3530
+ });
3531
+ };
3532
+ var QuestionnaireChoiceDescription = ({ className, ...props }) => {
3533
+ return /* @__PURE__ */ jsx("span", {
3534
+ "data-slot": "questionnaire-choice-description",
3535
+ className: cn("text-muted-foreground", className),
3536
+ ...props
3537
+ });
3538
+ };
3539
+ var QuestionnaireInput = ({ className, ...props }) => {
3540
+ return /* @__PURE__ */ jsx("div", {
3541
+ "data-slot": "questionnaire-input-wrapper",
3542
+ className: "group/questionnaire-input relative w-full min-w-0",
3543
+ children: /* @__PURE__ */ jsx(Questionnaire$1.Input, {
3544
+ "data-slot": "questionnaire-input",
3545
+ className: cn("h-8 min-h-11 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-[color,box-shadow,background-color] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 sm:min-h-0 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", "selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground", className),
3546
+ ...props
3547
+ })
3548
+ });
3549
+ };
3550
+ var QuestionnaireError = ({ className, ...props }) => {
3551
+ return /* @__PURE__ */ jsx(Questionnaire$1.Error, {
3552
+ "data-slot": "questionnaire-error",
3553
+ className: cn("mt-2 text-sm text-destructive", className),
3554
+ ...props
3555
+ });
3556
+ };
3557
+ var QuestionnaireActions = ({ className, ...props }) => {
3558
+ return /* @__PURE__ */ jsx("div", {
3559
+ "data-slot": "questionnaire-actions",
3560
+ className: cn("grid min-h-11 w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 sm:min-h-8", className),
3561
+ ...props
3562
+ });
3563
+ };
3564
+ var QuestionnairePrevious = ({ children, className, size = "default", variant = "outline", ...props }) => {
3565
+ return /* @__PURE__ */ jsx(Questionnaire$1.Previous, {
3566
+ "data-slot": "questionnaire-previous",
3567
+ "data-size": size,
3568
+ "data-variant": variant,
3569
+ className: cn(buttonVariants({
3570
+ size,
3571
+ variant
3572
+ }), "col-start-1 row-start-1 min-h-11 justify-self-start sm:min-h-0", className),
3573
+ ...props,
3574
+ children: children ?? "Previous"
3575
+ });
3576
+ };
3577
+ var QuestionnaireSkip = ({ children, className, size = "default", variant = "outline", ...props }) => {
3578
+ return /* @__PURE__ */ jsx(Questionnaire$1.Skip, {
3579
+ "data-slot": "questionnaire-skip",
3580
+ "data-size": size,
3581
+ "data-variant": variant,
3582
+ className: cn(buttonVariants({
3583
+ size,
3584
+ variant
3585
+ }), "col-start-2 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
3586
+ ...props,
3587
+ children: children ?? "Skip"
3588
+ });
3589
+ };
3590
+ var QuestionnaireNext = ({ children, className, size = "default", variant = "default", ...props }) => {
3591
+ return /* @__PURE__ */ jsx(Questionnaire$1.Next, {
3592
+ "data-slot": "questionnaire-next",
3593
+ "data-size": size,
3594
+ "data-variant": variant,
3595
+ className: cn(buttonVariants({
3596
+ size,
3597
+ variant
3598
+ }), "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
3599
+ ...props,
3600
+ children: children ?? "Next"
3601
+ });
3602
+ };
3603
+ var QuestionnaireSubmit = ({ children, className, size = "default", variant = "default", ...props }) => {
3604
+ return /* @__PURE__ */ jsx(Questionnaire$1.Submit, {
3605
+ "data-slot": "questionnaire-submit",
3606
+ "data-size": size,
3607
+ "data-variant": variant,
3608
+ className: cn(buttonVariants({
3609
+ size,
3610
+ variant
3611
+ }), "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0", className),
3612
+ ...props,
3613
+ children: children ?? "Submit"
3614
+ });
3615
+ };
3616
+ //#endregion
3617
+ //#region ../ui/src/components/ui/radio-group/radio-group.tsx
3618
+ var RadioGroup = ({ className, orientation = "vertical", ...props }) => {
3619
+ return /* @__PURE__ */ jsx(RadioGroup$1, {
3620
+ "data-slot": "radio-group",
3621
+ "data-orientation": orientation,
3622
+ "aria-orientation": orientation,
3623
+ className: cn("grid w-full gap-2 data-[orientation=horizontal]:flex data-[orientation=horizontal]:items-center", className),
3624
+ ...props
3625
+ });
3626
+ };
3627
+ var RadioGroupItem = ({ className, ...props }) => {
3628
+ return /* @__PURE__ */ jsx(Radio.Root, {
3629
+ "data-slot": "radio-group-item",
3630
+ className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-full border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40", className),
3631
+ ...props,
3632
+ children: /* @__PURE__ */ jsx(Radio.Indicator, {
3633
+ "data-slot": "radio-group-item-indicator",
3634
+ className: "flex size-2 shrink-0 rounded-full bg-primary transition-none"
3635
+ })
3636
+ });
3637
+ };
3638
+ //#endregion
3639
+ //#region ../ui/src/components/ui/resizable/resizable.tsx
3640
+ var ResizablePanelGroup = ({ className, ...props }) => {
3641
+ return /* @__PURE__ */ jsx(ResizablePrimitive.Group, {
3642
+ "data-slot": "resizable-panel-group",
3643
+ className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className),
3644
+ ...props
3645
+ });
3646
+ };
3647
+ var ResizablePanel = ({ ...props }) => {
3648
+ return /* @__PURE__ */ jsx(ResizablePrimitive.Panel, {
3649
+ "data-slot": "resizable-panel",
3650
+ ...props
3651
+ });
3652
+ };
3653
+ var ResizableHandle = ({ withHandle, className, ...props }) => {
3654
+ return /* @__PURE__ */ jsx(ResizablePrimitive.Separator, {
3655
+ "data-slot": "resizable-handle",
3656
+ className: cn("relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90", className),
3657
+ ...props,
3658
+ children: withHandle && /* @__PURE__ */ jsx("div", { className: "z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border" })
3659
+ });
3660
+ };
3661
+ //#endregion
3662
+ //#region ../ui/src/components/ui/select/select.tsx
3663
+ var Select = ({ ...props }) => {
3664
+ return /* @__PURE__ */ jsx(Select$1.Root, {
3665
+ "data-slot": "select",
3666
+ ...props
3667
+ });
3668
+ };
3669
+ var SelectTrigger = ({ className, size = "default", children, ...props }) => {
3670
+ return /* @__PURE__ */ jsxs(Select$1.Trigger, {
3671
+ "data-slot": "select-trigger",
3672
+ className: cn("flex w-full cursor-pointer items-center justify-between gap-2 rounded-lg border border-input bg-transparent text-sm text-foreground transition-colors outline-none", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50", "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", "aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20", "data-popup-open:border-ring data-popup-open:ring-3 data-popup-open:ring-ring/50", "dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", size === "sm" ? "h-7 px-2.5 text-[0.8rem]" : "h-8 px-2.5", className),
3673
+ ...props,
3674
+ children: [children, /* @__PURE__ */ jsx(Select$1.Icon, {
3675
+ "data-slot": "select-icon",
3676
+ className: "shrink-0 text-muted-foreground",
3677
+ children: /* @__PURE__ */ jsx(IconChevronDown, { className: "size-4" })
3678
+ })]
3679
+ });
3680
+ };
3681
+ var SelectValue = ({ className, ...props }) => {
3682
+ return /* @__PURE__ */ jsx(Select$1.Value, {
3683
+ "data-slot": "select-value",
3684
+ className: cn("truncate data-placeholder:text-muted-foreground", className),
3685
+ ...props
3686
+ });
3687
+ };
3688
+ var SelectContent = ({ className, children, portalContainer, ...props }) => {
3689
+ return /* @__PURE__ */ jsx(Select$1.Portal, {
3690
+ container: portalContainer,
3691
+ children: /* @__PURE__ */ jsx(Select$1.Positioner, {
3692
+ "data-slot": "select-positioner",
3693
+ sideOffset: 4,
3694
+ alignItemWithTrigger: false,
3695
+ children: /* @__PURE__ */ jsx(Select$1.Popup, {
3696
+ "data-slot": "select-content",
3697
+ className: cn("z-50 min-w-[var(--anchor-width)] overflow-hidden rounded-xl border border-border bg-popover p-1 text-popover-foreground shadow-md outline-none", "origin-[var(--transform-origin)]", "transition-[transform,scale,opacity] motion-reduce:animate-none motion-reduce:transition-none data-open:scale-100 data-open:opacity-100 data-closed:scale-95 data-closed:opacity-0 data-open:animate-in data-closed:animate-out data-open:fade-in-0 data-closed:fade-out-0", className),
3698
+ ...props,
3699
+ children: /* @__PURE__ */ jsx(ScrollArea, {
3700
+ type: "always",
3701
+ fade: true,
3702
+ fadeFrom: "popover",
3703
+ className: "max-h-(--available-height)",
3704
+ children: /* @__PURE__ */ jsx(Select$1.List, {
3705
+ "data-slot": "select-list",
3706
+ children
3707
+ })
3708
+ })
3709
+ })
3710
+ })
3711
+ });
3712
+ };
3713
+ var SelectGroup = ({ className, ...props }) => {
3714
+ return /* @__PURE__ */ jsx(Select$1.Group, {
3715
+ "data-slot": "select-group",
3716
+ className: cn("flex flex-col gap-0.5", className),
3717
+ ...props
3718
+ });
3719
+ };
3720
+ var SelectLabel = ({ className, ...props }) => {
3721
+ return /* @__PURE__ */ jsx(Select$1.GroupLabel, {
3722
+ "data-slot": "select-label",
3723
+ className: cn("px-2 py-1 text-xs font-semibold text-muted-foreground", className),
3724
+ ...props
3725
+ });
3726
+ };
3727
+ var SelectItem = ({ className, children, ...props }) => {
3728
+ return /* @__PURE__ */ jsxs(Select$1.Item, {
3729
+ "data-slot": "select-item",
3730
+ className: cn(popupItemClass("base-ui", true), className),
3731
+ ...props,
3732
+ children: [/* @__PURE__ */ jsx(Select$1.ItemText, {
3733
+ "data-slot": "select-item-text",
3734
+ children
3735
+ }), /* @__PURE__ */ jsx(Select$1.ItemIndicator, {
3736
+ "data-slot": "select-item-indicator",
3737
+ className: POPUP_ITEM_INDICATOR_CLASS,
3738
+ children: /* @__PURE__ */ jsx(IconCheck, { className: "size-3.5" })
3739
+ })]
3740
+ });
3741
+ };
3742
+ var SelectSeparator = ({ className, ...props }) => {
3743
+ return /* @__PURE__ */ jsx("div", {
3744
+ "data-slot": "select-separator",
3745
+ className: cn("-mx-1 my-1 h-px bg-border", className),
3746
+ "aria-hidden": "true",
3747
+ ...props
3748
+ });
3749
+ };
3750
+ //#endregion
3751
+ //#region ../ui/src/components/ui/sheet/sheet.tsx
3752
+ var Sheet = ({ ...props }) => {
3753
+ return /* @__PURE__ */ jsx(Dialog$1.Root, {
3754
+ "data-slot": "sheet",
3755
+ ...props
3756
+ });
3757
+ };
3758
+ var SheetTrigger = ({ ...props }) => {
3759
+ return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
3760
+ "data-slot": "sheet-trigger",
3761
+ ...props
3762
+ });
3763
+ };
3764
+ var SheetClose = ({ ...props }) => {
3765
+ return /* @__PURE__ */ jsx(Dialog$1.Close, {
3766
+ "data-slot": "sheet-close",
3767
+ ...props
3768
+ });
3769
+ };
3770
+ var SheetPortal = ({ ...props }) => {
3771
+ return /* @__PURE__ */ jsx(Dialog$1.Portal, {
3772
+ "data-slot": "sheet-portal",
3773
+ ...props
3774
+ });
3775
+ };
3776
+ var SheetOverlay = ({ className, ...props }) => {
3777
+ return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
3778
+ "data-slot": "sheet-overlay",
3779
+ className: cn("fixed inset-0 z-50 bg-overlay transition-opacity duration-150 motion-reduce:transition-none data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs", className),
3780
+ ...props
3781
+ });
3782
+ };
3783
+ var SheetContent = ({ className, children, side = "right", showCloseButton = true, ...props }) => {
3784
+ return /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
3785
+ "data-slot": "sheet-content",
3786
+ "data-side": side,
3787
+ className: cn("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 motion-reduce:transition-none ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className),
3788
+ ...props,
3789
+ children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog$1.Close, {
3790
+ "data-slot": "sheet-close",
3791
+ render: /* @__PURE__ */ jsx(Button, {
3792
+ variant: "ghost",
3793
+ className: "absolute top-3 right-3",
3794
+ size: "icon-sm"
3795
+ }),
3796
+ children: [/* @__PURE__ */ jsx(IconX, {}), /* @__PURE__ */ jsx("span", {
3797
+ className: "sr-only",
3798
+ children: "Close"
3799
+ })]
3800
+ })]
3801
+ })] });
3802
+ };
3803
+ var SheetHeader = ({ className, ...props }) => {
3804
+ return /* @__PURE__ */ jsx("div", {
3805
+ "data-slot": "sheet-header",
3806
+ className: cn("flex flex-col gap-0.5 p-4", className),
3807
+ ...props
3808
+ });
3809
+ };
3810
+ var SheetFooter = ({ className, ...props }) => {
3811
+ return /* @__PURE__ */ jsx("div", {
3812
+ "data-slot": "sheet-footer",
3813
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
3814
+ ...props
3815
+ });
3816
+ };
3817
+ var SheetTitle = ({ className, ...props }) => {
3818
+ return /* @__PURE__ */ jsx(Dialog$1.Title, {
3819
+ "data-slot": "sheet-title",
3820
+ className: cn("font-heading text-base font-medium text-foreground", className),
3821
+ ...props
3822
+ });
3823
+ };
3824
+ var SheetDescription = ({ className, ...props }) => {
3825
+ return /* @__PURE__ */ jsx(Dialog$1.Description, {
3826
+ "data-slot": "sheet-description",
3827
+ className: cn("text-sm text-muted-foreground", className),
3828
+ ...props
3829
+ });
3830
+ };
3831
+ //#endregion
3832
+ //#region ../ui/src/components/ui/skeleton/skeleton.tsx
3833
+ var Skeleton = ({ className, ...props }) => {
3834
+ return /* @__PURE__ */ jsx("div", {
3835
+ "data-slot": "skeleton",
3836
+ className: cn("animate-pulse rounded-md bg-muted motion-reduce:animate-none", className),
3837
+ ...props
3838
+ });
3839
+ };
3840
+ //#endregion
3841
+ //#region ../ui/src/components/ui/sidebar/sidebar.tsx
3842
+ var SIDEBAR_COOKIE_NAME = "sidebar_state";
3843
+ var SIDEBAR_COOKIE_MAX_AGE = 604800;
3844
+ var SIDEBAR_WIDTH = "16rem";
3845
+ var SIDEBAR_WIDTH_MOBILE = "18rem";
3846
+ var SIDEBAR_WIDTH_ICON = "3rem";
3847
+ var SIDEBAR_KEYBOARD_SHORTCUT = "b";
3848
+ var SidebarContext = React.createContext(null);
3849
+ var useSidebar = () => {
3850
+ const context = React.useContext(SidebarContext);
3851
+ if (!context) throw new Error("useSidebar must be used within a SidebarProvider.");
3852
+ return context;
3853
+ };
3854
+ var SidebarProvider = ({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }) => {
3855
+ const isMobile = useIsMobile();
3856
+ const [openMobile, setOpenMobile] = React.useState(false);
3857
+ const [_open, _setOpen] = React.useState(defaultOpen);
3858
+ const open = openProp ?? _open;
3859
+ const setOpen = React.useCallback((value) => {
3860
+ const openState = typeof value === "function" ? value(open) : value;
3861
+ if (setOpenProp) setOpenProp(openState);
3862
+ else _setOpen(openState);
3863
+ document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
3864
+ }, [setOpenProp, open]);
3865
+ const toggleSidebar = React.useCallback(() => {
3866
+ return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
3867
+ }, [isMobile, setOpen]);
3868
+ React.useEffect(() => {
3869
+ const handleKeyDown = (event) => {
3870
+ if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
3871
+ event.preventDefault();
3872
+ toggleSidebar();
3873
+ }
3874
+ };
3875
+ window.addEventListener("keydown", handleKeyDown);
3876
+ return () => window.removeEventListener("keydown", handleKeyDown);
3877
+ }, [toggleSidebar]);
3878
+ const state = open ? "expanded" : "collapsed";
3879
+ const contextValue = React.useMemo(() => ({
3880
+ state,
3881
+ open,
3882
+ setOpen,
3883
+ isMobile,
3884
+ openMobile,
3885
+ setOpenMobile,
3886
+ toggleSidebar
3887
+ }), [
3888
+ state,
3889
+ open,
3890
+ setOpen,
3891
+ isMobile,
3892
+ openMobile,
3893
+ toggleSidebar
3894
+ ]);
3895
+ return /* @__PURE__ */ jsx(SidebarContext.Provider, {
3896
+ value: contextValue,
3897
+ children: /* @__PURE__ */ jsx("div", {
3898
+ "data-slot": "sidebar-wrapper",
3899
+ style: {
3900
+ "--sidebar-width": SIDEBAR_WIDTH,
3901
+ "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
3902
+ ...style
3903
+ },
3904
+ className: cn("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar", className),
3905
+ ...props,
3906
+ children
3907
+ })
3908
+ });
3909
+ };
3910
+ var Sidebar = ({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, dir, ...props }) => {
3911
+ const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
3912
+ if (collapsible === "none") return /* @__PURE__ */ jsx("div", {
3913
+ "data-slot": "sidebar",
3914
+ className: cn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", className),
3915
+ ...props,
3916
+ children
3917
+ });
3918
+ if (isMobile) return /* @__PURE__ */ jsx(Sheet, {
3919
+ open: openMobile,
3920
+ onOpenChange: setOpenMobile,
3921
+ ...props,
3922
+ children: /* @__PURE__ */ jsxs(SheetContent, {
3923
+ dir,
3924
+ "data-sidebar": "sidebar",
3925
+ "data-slot": "sidebar",
3926
+ "data-mobile": "true",
3927
+ className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
3928
+ style: { "--sidebar-width": SIDEBAR_WIDTH_MOBILE },
3929
+ side,
3930
+ children: [/* @__PURE__ */ jsxs(SheetHeader, {
3931
+ className: "sr-only",
3932
+ children: [/* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }), /* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })]
3933
+ }), /* @__PURE__ */ jsx("div", {
3934
+ className: "flex h-full w-full flex-col",
3935
+ children
3936
+ })]
3937
+ })
3938
+ });
3939
+ return /* @__PURE__ */ jsxs("div", {
3940
+ className: "group peer hidden text-sidebar-foreground md:block",
3941
+ "data-state": state,
3942
+ "data-collapsible": state === "collapsed" ? collapsible : "",
3943
+ "data-variant": variant,
3944
+ "data-side": side,
3945
+ "data-slot": "sidebar",
3946
+ children: [/* @__PURE__ */ jsx("div", {
3947
+ "data-slot": "sidebar-gap",
3948
+ className: cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 motion-reduce:transition-none ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
3949
+ }), /* @__PURE__ */ jsx("div", {
3950
+ "data-slot": "sidebar-container",
3951
+ "data-side": side,
3952
+ className: cn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 motion-reduce:transition-none ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex", variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className),
3953
+ ...props,
3954
+ children: /* @__PURE__ */ jsx("div", {
3955
+ "data-sidebar": "sidebar",
3956
+ "data-slot": "sidebar-inner",
3957
+ className: "flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",
3958
+ children
3959
+ })
3960
+ })]
3961
+ });
3962
+ };
3963
+ var SidebarTrigger = ({ className, onClick, ...props }) => {
3964
+ const { toggleSidebar } = useSidebar();
3965
+ return /* @__PURE__ */ jsxs(Button, {
3966
+ "data-sidebar": "trigger",
3967
+ "data-slot": "sidebar-trigger",
3968
+ variant: "ghost",
3969
+ size: "icon-sm",
3970
+ className: cn(className),
3971
+ onClick: (event) => {
3972
+ onClick?.(event);
3973
+ toggleSidebar();
3974
+ },
3975
+ ...props,
3976
+ children: [/* @__PURE__ */ jsx(IconLayoutSidebar, {}), /* @__PURE__ */ jsx("span", {
3977
+ className: "sr-only",
3978
+ children: "Toggle Sidebar"
3979
+ })]
3980
+ });
3981
+ };
3982
+ var SidebarRail = ({ className, ...props }) => {
3983
+ const { toggleSidebar } = useSidebar();
3984
+ return /* @__PURE__ */ jsx("button", {
3985
+ "data-sidebar": "rail",
3986
+ "data-slot": "sidebar-rail",
3987
+ "aria-label": "Toggle Sidebar",
3988
+ tabIndex: -1,
3989
+ onClick: toggleSidebar,
3990
+ title: "Toggle Sidebar",
3991
+ className: cn("absolute inset-y-0 z-20 hidden w-4 transition-all motion-reduce:transition-none ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", className),
3992
+ ...props
3993
+ });
3994
+ };
3995
+ var SidebarInset = ({ className, ...props }) => {
3996
+ return /* @__PURE__ */ jsx("main", {
3997
+ "data-slot": "sidebar-inset",
3998
+ className: cn("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className),
3999
+ ...props
4000
+ });
4001
+ };
4002
+ var SidebarInput = ({ className, ...props }) => {
4003
+ return /* @__PURE__ */ jsx(Input, {
4004
+ "data-slot": "sidebar-input",
4005
+ "data-sidebar": "input",
4006
+ className: cn("h-8 w-full bg-background shadow-none", className),
4007
+ ...props
4008
+ });
4009
+ };
4010
+ var SidebarHeader = ({ className, ...props }) => {
4011
+ return /* @__PURE__ */ jsx("div", {
4012
+ "data-slot": "sidebar-header",
4013
+ "data-sidebar": "header",
4014
+ className: cn("flex flex-col gap-2 p-2", className),
4015
+ ...props
4016
+ });
4017
+ };
4018
+ var SidebarFooter = ({ className, ...props }) => {
4019
+ return /* @__PURE__ */ jsx("div", {
4020
+ "data-slot": "sidebar-footer",
4021
+ "data-sidebar": "footer",
4022
+ className: cn("flex flex-col gap-2 p-2", className),
4023
+ ...props
4024
+ });
4025
+ };
4026
+ var SidebarSeparator = ({ className, ...props }) => {
4027
+ return /* @__PURE__ */ jsx(Separator, {
4028
+ "data-slot": "sidebar-separator",
4029
+ "data-sidebar": "separator",
4030
+ className: cn("mx-2 w-auto bg-sidebar-border", className),
4031
+ ...props
4032
+ });
4033
+ };
4034
+ var SidebarContent = ({ className, ...props }) => {
4035
+ return /* @__PURE__ */ jsx("div", {
4036
+ "data-slot": "sidebar-content",
4037
+ "data-sidebar": "content",
4038
+ "data-focus": "inset",
4039
+ className: cn("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
4040
+ ...props
4041
+ });
4042
+ };
4043
+ var SidebarGroup = ({ className, ...props }) => {
4044
+ return /* @__PURE__ */ jsx("div", {
4045
+ "data-slot": "sidebar-group",
4046
+ "data-sidebar": "group",
4047
+ className: cn("relative flex w-full min-w-0 flex-col p-2", className),
4048
+ ...props
4049
+ });
4050
+ };
4051
+ var SidebarGroupLabel = ({ className, render, ...props }) => {
4052
+ return useRender({
4053
+ defaultTagName: "div",
4054
+ props: mergeProps({ className: cn("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 motion-reduce:transition-none ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", className) }, props),
4055
+ render,
4056
+ state: {
4057
+ slot: "sidebar-group-label",
4058
+ sidebar: "group-label"
4059
+ }
4060
+ });
4061
+ };
4062
+ var SidebarGroupAction = ({ className, render, ...props }) => {
4063
+ return useRender({
4064
+ defaultTagName: "button",
4065
+ props: mergeProps({ className: cn("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform motion-reduce:transition-none group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", className) }, props),
4066
+ render,
4067
+ state: {
4068
+ slot: "sidebar-group-action",
4069
+ sidebar: "group-action"
4070
+ }
4071
+ });
4072
+ };
4073
+ var SidebarGroupContent = ({ className, ...props }) => {
4074
+ return /* @__PURE__ */ jsx("div", {
4075
+ "data-slot": "sidebar-group-content",
4076
+ "data-sidebar": "group-content",
4077
+ className: cn("w-full text-sm", className),
4078
+ ...props
4079
+ });
4080
+ };
4081
+ var SidebarMenu = ({ className, ...props }) => {
4082
+ return /* @__PURE__ */ jsx("ul", {
4083
+ "data-slot": "sidebar-menu",
4084
+ "data-sidebar": "menu",
4085
+ className: cn("flex w-full min-w-0 flex-col gap-0", className),
4086
+ ...props
4087
+ });
4088
+ };
4089
+ var SidebarMenuItem = ({ className, ...props }) => {
4090
+ return /* @__PURE__ */ jsx("li", {
4091
+ "data-slot": "sidebar-menu-item",
4092
+ "data-sidebar": "menu-item",
4093
+ className: cn("group/menu-item relative", className),
4094
+ ...props
4095
+ });
4096
+ };
4097
+ var sidebarMenuButtonVariants = cva("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] motion-reduce:transition-none group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate", {
4098
+ variants: {
4099
+ variant: {
4100
+ default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
4101
+ outline: "bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"
4102
+ },
4103
+ size: {
4104
+ default: "h-8 text-sm",
4105
+ sm: "h-7 text-xs",
4106
+ lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
4107
+ }
4108
+ },
4109
+ defaultVariants: {
4110
+ variant: "default",
4111
+ size: "default"
4112
+ }
4113
+ });
4114
+ var SidebarMenuButton = ({ render, isActive = false, variant = "default", size = "default", tooltip, className, ...props }) => {
4115
+ const { isMobile, state } = useSidebar();
4116
+ const comp = useRender({
4117
+ defaultTagName: "button",
4118
+ props: mergeProps({ className: cn(sidebarMenuButtonVariants({
4119
+ variant,
4120
+ size
4121
+ }), className) }, props),
4122
+ render: !tooltip ? render : /* @__PURE__ */ jsx(TooltipTrigger, { render }),
4123
+ state: {
4124
+ slot: "sidebar-menu-button",
4125
+ sidebar: "menu-button",
4126
+ size,
4127
+ active: isActive
4128
+ }
4129
+ });
4130
+ if (!tooltip) return comp;
4131
+ if (typeof tooltip === "string") tooltip = { children: tooltip };
4132
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [comp, /* @__PURE__ */ jsx(TooltipContent, {
4133
+ side: "right",
4134
+ align: "center",
4135
+ hidden: state !== "collapsed" || isMobile,
4136
+ ...tooltip
4137
+ })] });
4138
+ };
4139
+ var SidebarMenuAction = ({ className, render, showOnHover = false, ...props }) => {
4140
+ return useRender({
4141
+ defaultTagName: "button",
4142
+ props: mergeProps({ className: cn("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform motion-reduce:transition-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0", className) }, props),
4143
+ render,
4144
+ state: {
4145
+ slot: "sidebar-menu-action",
4146
+ sidebar: "menu-action"
4147
+ }
4148
+ });
4149
+ };
4150
+ var SidebarMenuBadge = ({ className, ...props }) => {
4151
+ return /* @__PURE__ */ jsx("div", {
4152
+ "data-slot": "sidebar-menu-badge",
4153
+ "data-sidebar": "menu-badge",
4154
+ className: cn("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground", className),
4155
+ ...props
4156
+ });
4157
+ };
4158
+ var SidebarMenuSkeleton = ({ className, showIcon = false, ...props }) => {
4159
+ const [width] = React.useState(() => {
4160
+ return `${Math.floor(Math.random() * 40) + 50}%`;
4161
+ });
4162
+ return /* @__PURE__ */ jsxs("div", {
4163
+ "data-slot": "sidebar-menu-skeleton",
4164
+ "data-sidebar": "menu-skeleton",
4165
+ className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
4166
+ ...props,
4167
+ children: [showIcon && /* @__PURE__ */ jsx(Skeleton, {
4168
+ className: "size-4 rounded-md",
4169
+ "data-sidebar": "menu-skeleton-icon"
4170
+ }), /* @__PURE__ */ jsx(Skeleton, {
4171
+ className: "h-4 max-w-(--skeleton-width) flex-1",
4172
+ "data-sidebar": "menu-skeleton-text",
4173
+ style: { "--skeleton-width": width }
4174
+ })]
4175
+ });
4176
+ };
4177
+ var SidebarMenuSub = ({ className, ...props }) => {
4178
+ return /* @__PURE__ */ jsx("ul", {
4179
+ "data-slot": "sidebar-menu-sub",
4180
+ "data-sidebar": "menu-sub",
4181
+ className: cn("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden", className),
4182
+ ...props
4183
+ });
4184
+ };
4185
+ var SidebarMenuSubItem = ({ className, ...props }) => {
4186
+ return /* @__PURE__ */ jsx("li", {
4187
+ "data-slot": "sidebar-menu-sub-item",
4188
+ "data-sidebar": "menu-sub-item",
4189
+ className: cn("group/menu-sub-item relative", className),
4190
+ ...props
4191
+ });
4192
+ };
4193
+ var SidebarMenuSubButton = ({ render, size = "md", isActive = false, className, ...props }) => {
4194
+ return useRender({
4195
+ defaultTagName: "a",
4196
+ props: mergeProps({ className: cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", className) }, props),
4197
+ render,
4198
+ state: {
4199
+ slot: "sidebar-menu-sub-button",
4200
+ sidebar: "menu-sub-button",
4201
+ size,
4202
+ active: isActive
4203
+ }
4204
+ });
4205
+ };
4206
+ //#endregion
4207
+ //#region ../ui/src/components/ui/spinner/spinner.tsx
4208
+ var spinnerVariants = cva("animate-spin motion-reduce:animate-none", {
4209
+ variants: { size: {
4210
+ xs: "size-3",
4211
+ sm: "size-4",
4212
+ default: "size-5",
4213
+ lg: "size-6",
4214
+ xl: "size-8"
4215
+ } },
4216
+ defaultVariants: { size: "default" }
4217
+ });
4218
+ var Spinner = ({ className, size = "default", ...props }) => {
4219
+ return /* @__PURE__ */ jsx(IconLoader, {
4220
+ "data-slot": "spinner",
4221
+ role: "status",
4222
+ "aria-label": "Loading",
4223
+ className: cn(spinnerVariants({ size }), className),
4224
+ ...props
4225
+ });
4226
+ };
4227
+ //#endregion
4228
+ //#region ../ui/src/components/ui/switch/switch.tsx
4229
+ var Switch = ({ className, size = "default", ...props }) => {
4230
+ return /* @__PURE__ */ jsx(Switch$1.Root, {
4231
+ "data-slot": "switch",
4232
+ "data-size": size,
4233
+ className: cn("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all motion-reduce:transition-none outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-4.5 data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
4234
+ ...props,
4235
+ children: /* @__PURE__ */ jsx(Switch$1.Thumb, {
4236
+ "data-slot": "switch-thumb",
4237
+ className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform motion-reduce:transition-none group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
4238
+ })
4239
+ });
4240
+ };
4241
+ //#endregion
4242
+ //#region ../ui/src/components/ui/table/table.tsx
4243
+ var Table = ({ className, ...props }) => {
4244
+ return /* @__PURE__ */ jsx("div", {
4245
+ "data-slot": "table-container",
4246
+ "data-focus": "inset",
4247
+ className: "relative w-full overflow-x-auto",
4248
+ children: /* @__PURE__ */ jsx("table", {
4249
+ "data-slot": "table",
4250
+ className: cn("w-full caption-bottom text-sm", className),
4251
+ ...props
4252
+ })
4253
+ });
4254
+ };
4255
+ var TableHeader = ({ className, ...props }) => {
4256
+ return /* @__PURE__ */ jsx("thead", {
4257
+ "data-slot": "table-header",
4258
+ className: cn("[&_tr]:border-b", className),
4259
+ ...props
4260
+ });
4261
+ };
4262
+ var TableBody = ({ className, ...props }) => {
4263
+ return /* @__PURE__ */ jsx("tbody", {
4264
+ "data-slot": "table-body",
4265
+ className: cn("[&_tr:last-child]:border-0", className),
4266
+ ...props
4267
+ });
4268
+ };
4269
+ var TableFooter = ({ className, ...props }) => {
4270
+ return /* @__PURE__ */ jsx("tfoot", {
4271
+ "data-slot": "table-footer",
4272
+ className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
4273
+ ...props
4274
+ });
4275
+ };
4276
+ var TableRow = ({ className, ...props }) => {
4277
+ return /* @__PURE__ */ jsx("tr", {
4278
+ "data-slot": "table-row",
4279
+ className: cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className),
4280
+ ...props
4281
+ });
4282
+ };
4283
+ var TableHead = ({ className, ...props }) => {
4284
+ return /* @__PURE__ */ jsx("th", {
4285
+ "data-slot": "table-head",
4286
+ className: cn("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
4287
+ ...props
4288
+ });
4289
+ };
4290
+ var TableCell = ({ className, ...props }) => {
4291
+ return /* @__PURE__ */ jsx("td", {
4292
+ "data-slot": "table-cell",
4293
+ className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
4294
+ ...props
4295
+ });
4296
+ };
4297
+ var TableCaption = ({ className, ...props }) => {
4298
+ return /* @__PURE__ */ jsx("caption", {
4299
+ "data-slot": "table-caption",
4300
+ className: cn("mt-4 text-sm text-muted-foreground", className),
4301
+ ...props
4302
+ });
4303
+ };
4304
+ //#endregion
4305
+ //#region ../ui/src/components/ui/tabs/tabs.tsx
4306
+ var Tabs = ({ value, defaultValue, onValueChange, className, orientation = "horizontal", children, ...props }) => /* @__PURE__ */ jsx(Tabs$1.Root, {
4307
+ "data-slot": "tabs",
4308
+ ...props,
4309
+ "data-orientation": orientation,
4310
+ value,
4311
+ defaultValue,
4312
+ orientation,
4313
+ onValueChange: (next) => {
4314
+ onValueChange?.(String(next));
4315
+ },
4316
+ className: cn("group/tabs flex w-full gap-2 data-[orientation=horizontal]:flex-col", className),
4317
+ children
4318
+ });
4319
+ var tabsListVariants = cva("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-8 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none", {
4320
+ variants: { variant: {
4321
+ default: "bg-muted",
4322
+ line: "gap-1 bg-transparent"
4323
+ } },
4324
+ defaultVariants: { variant: "default" }
4325
+ });
4326
+ var TabsList = ({ className, variant = "default", children, ...props }) => /* @__PURE__ */ jsx(Tabs$1.List, {
4327
+ "data-slot": "tabs-list",
4328
+ ...props,
4329
+ "data-variant": variant,
4330
+ className: cn(tabsListVariants({ variant }), className),
4331
+ children
4332
+ });
4333
+ var TabsTrigger = ({ value, disabled, className, children, ...props }) => /* @__PURE__ */ jsx(Tabs$1.Tab, {
4334
+ ...props,
4335
+ value,
4336
+ disabled,
4337
+ className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\"size-\"])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className),
4338
+ children
4339
+ });
4340
+ var TabsContent = ({ value, keepMounted = false, className, children, ...props }) => /* @__PURE__ */ jsx(Tabs$1.Panel, {
4341
+ ...props,
4342
+ value,
4343
+ keepMounted,
4344
+ className: cn("flex-1 text-sm outline-none", className),
4345
+ children
4346
+ });
4347
+ //#endregion
4348
+ //#region ../ui/src/components/ui/toast/toast.tsx
4349
+ var toast = Toast$1.createToastManager();
4350
+ var ToastProvider = ({ ...props }) => {
4351
+ return /* @__PURE__ */ jsx(Toast$1.Provider, { ...props });
4352
+ };
4353
+ var ToastPortal = ({ ...props }) => {
4354
+ return /* @__PURE__ */ jsx(Toast$1.Portal, {
4355
+ "data-slot": "toast-portal",
4356
+ ...props
4357
+ });
4358
+ };
4359
+ var ToastViewport = ({ className, ...props }) => {
4360
+ return /* @__PURE__ */ jsx(Toast$1.Viewport, {
4361
+ "data-slot": "toast-viewport",
4362
+ className: cn("pointer-events-none fixed inset-x-4 bottom-4 z-50 mx-auto w-auto max-w-sm outline-none sm:right-4 sm:left-auto sm:mx-0 sm:w-full", className),
4363
+ ...props
4364
+ });
4365
+ };
4366
+ var Toast = ({ className, ...props }) => {
4367
+ return /* @__PURE__ */ jsx(Toast$1.Root, {
4368
+ "data-slot": "toast",
4369
+ className: cn("group/toast pointer-events-auto absolute right-0 bottom-0 z-[calc(1000-var(--toast-index))] w-full origin-bottom rounded-2xl border bg-popover text-popover-foreground shadow-lg will-change-transform outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50", "[--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]", "h-(--height) [transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))] [transition:transform_500ms_cubic-bezier(0.22,1,0.36,1),opacity_500ms,height_150ms] motion-reduce:transition-none", "after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']", "data-expanded:h-(--toast-height) data-expanded:[transform:translateX(var(--toast-swipe-movement-x))_translateY(var(--offset-y))]", "data-limited:opacity-0 data-starting-style:[transform:translateY(150%)]", "[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(150%)]", "data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]", "data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]", "data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]", "data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]", "data-expanded:data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]", "data-expanded:data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]", "data-expanded:data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]", "data-expanded:data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]", className),
4370
+ ...props
4371
+ });
4372
+ };
4373
+ var ToastContent = ({ className, ...props }) => {
4374
+ return /* @__PURE__ */ jsx(Toast$1.Content, {
4375
+ "data-slot": "toast-content",
4376
+ className: cn("flex h-full items-center gap-3 overflow-hidden p-4 transition-opacity duration-250 ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none data-behind:opacity-0 data-expanded:opacity-100", className),
4377
+ ...props
4378
+ });
4379
+ };
4380
+ var ToastTitle = ({ className, ...props }) => {
4381
+ return /* @__PURE__ */ jsx(Toast$1.Title, {
4382
+ "data-slot": "toast-title",
4383
+ className: cn("text-sm font-medium", className),
4384
+ ...props
4385
+ });
4386
+ };
4387
+ var ToastDescription = ({ className, ...props }) => {
4388
+ return /* @__PURE__ */ jsx(Toast$1.Description, {
4389
+ "data-slot": "toast-description",
4390
+ className: cn("text-sm text-muted-foreground", className),
4391
+ ...props
4392
+ });
4393
+ };
4394
+ var ToastAction = ({ className, render = /* @__PURE__ */ jsx(Button, {
4395
+ variant: "outline",
4396
+ size: "sm"
4397
+ }), ...props }) => {
4398
+ return /* @__PURE__ */ jsx(Toast$1.Action, {
4399
+ "data-slot": "toast-action",
4400
+ render,
4401
+ className: cn("shrink-0", className),
4402
+ ...props
4403
+ });
4404
+ };
4405
+ var ToastClose = ({ className, children, render = /* @__PURE__ */ jsx(Button, {
4406
+ variant: "ghost",
4407
+ size: "icon-sm"
4408
+ }), ...props }) => {
4409
+ return /* @__PURE__ */ jsx(Toast$1.Close, {
4410
+ "data-slot": "toast-close",
4411
+ "aria-label": "Close toast",
4412
+ render,
4413
+ className: cn("relative shrink-0 text-muted-foreground after:absolute after:-inset-2 after:content-[''] hover:text-foreground", className),
4414
+ ...props,
4415
+ children: children ?? /* @__PURE__ */ jsx(IconX, { "aria-hidden": "true" })
4416
+ });
4417
+ };
4418
+ var ToastIcon = ({ type }) => {
4419
+ let icon = null;
4420
+ if (type === "success") icon = /* @__PURE__ */ jsx(IconCircleCheck, { "aria-hidden": "true" });
4421
+ if (type === "info") icon = /* @__PURE__ */ jsx(IconInfoCircle, { "aria-hidden": "true" });
4422
+ if (type === "warning") icon = /* @__PURE__ */ jsx(IconAlertTriangle, { "aria-hidden": "true" });
4423
+ if (type === "error") icon = /* @__PURE__ */ jsx(IconAlertOctagon, {
4424
+ className: "text-destructive",
4425
+ "aria-hidden": "true"
4426
+ });
4427
+ if (type === "loading") icon = /* @__PURE__ */ jsx(IconLoader, {
4428
+ className: "animate-spin motion-reduce:animate-none",
4429
+ "aria-hidden": "true"
4430
+ });
4431
+ if (!icon) return null;
4432
+ return /* @__PURE__ */ jsx("span", {
4433
+ "data-slot": "toast-icon",
4434
+ className: "shrink-0 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
4435
+ children: icon
4436
+ });
4437
+ };
4438
+ var ToastList = () => {
4439
+ const { toasts } = Toast$1.useToastManager();
4440
+ return toasts.map((toastItem) => /* @__PURE__ */ jsx(Toast, {
4441
+ toast: toastItem,
4442
+ children: /* @__PURE__ */ jsxs(ToastContent, { children: [
4443
+ /* @__PURE__ */ jsx(ToastIcon, { type: toastItem.type }),
4444
+ /* @__PURE__ */ jsxs("div", {
4445
+ className: "flex min-w-0 flex-1 flex-col gap-1",
4446
+ children: [/* @__PURE__ */ jsx(ToastTitle, {}), /* @__PURE__ */ jsx(ToastDescription, {})]
4447
+ }),
4448
+ /* @__PURE__ */ jsx(ToastAction, {}),
4449
+ /* @__PURE__ */ jsx(ToastClose, {})
4450
+ ] })
4451
+ }, toastItem.id));
4452
+ };
4453
+ var Toaster = ({ children, toastManager = toast, ...props }) => {
4454
+ return /* @__PURE__ */ jsxs(ToastProvider, {
4455
+ toastManager,
4456
+ ...props,
4457
+ children: [children, /* @__PURE__ */ jsx(ToastPortal, { children: /* @__PURE__ */ jsx(ToastViewport, { children: /* @__PURE__ */ jsx(ToastList, {}) }) })]
4458
+ });
4459
+ };
4460
+ var createToastManager = Toast$1.createToastManager;
4461
+ var useToastManager = Toast$1.useToastManager;
4462
+ //#endregion
4463
+ //#region ../ui/src/components/ui/toggle-group/toggle-group.tsx
4464
+ var ToggleGroupContext = createContext({
4465
+ variant: "default",
4466
+ size: "default",
4467
+ spacing: 2,
4468
+ orientation: "horizontal"
4469
+ });
4470
+ var ToggleGroup = ({ className, variant = "default", size = "default", spacing = 2, orientation = "horizontal", children, ...props }) => {
4471
+ return /* @__PURE__ */ jsx(ToggleGroupContext.Provider, {
4472
+ value: {
4473
+ variant,
4474
+ size,
4475
+ spacing,
4476
+ orientation
4477
+ },
4478
+ children: /* @__PURE__ */ jsx(ToggleGroup$1, {
4479
+ "data-slot": "toggle-group",
4480
+ "data-variant": variant,
4481
+ "data-size": size,
4482
+ "data-spacing": spacing,
4483
+ "data-orientation": orientation,
4484
+ orientation,
4485
+ "aria-orientation": void 0,
4486
+ style: { gap: `calc(var(--spacing) * ${spacing})` },
4487
+ className: cn("group/toggle-group flex w-fit flex-row items-center rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch", className),
4488
+ ...props,
4489
+ children
4490
+ })
4491
+ });
4492
+ };
4493
+ var ToggleGroupItem = ({ className, variant, size, ...props }) => {
4494
+ const ctx = useContext(ToggleGroupContext);
4495
+ const resolvedVariant = variant ?? ctx.variant ?? "default";
4496
+ const resolvedSize = size ?? ctx.size ?? "default";
4497
+ return /* @__PURE__ */ jsx(Toggle$1, {
4498
+ "data-slot": "toggle-group-item",
4499
+ "data-variant": resolvedVariant,
4500
+ "data-size": resolvedSize,
4501
+ "data-spacing": ctx.spacing,
4502
+ className: cn("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t", toggleVariants({
4503
+ variant: resolvedVariant,
4504
+ size: resolvedSize
4505
+ }), className),
4506
+ ...props
4507
+ });
4508
+ };
4509
+ //#endregion
4510
+ export { AVATAR_TONES, Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnimatedNumber, AspectRatio, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, AudioPlayer, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DEFAULT_MULTI_SELECT_LABELS, DateRangePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectionProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldDescription, FieldError, FieldLabel, HoverCard, HoverCardContent, HoverCardTrigger, Indicator, InitialsAvatar, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, Marker, MarkerContent, MarkerIcon, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MultiSelect, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, NumberText, PROGRESS_DURATION, PROGRESS_EASE, PROGRESS_LINE_COLOR, Pagination, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressLine, Questionnaire, QuestionnaireActions, QuestionnaireChoice, QuestionnaireChoiceDescription, QuestionnaireChoices, QuestionnaireDescription, QuestionnaireError, QuestionnaireInput, QuestionnaireItem, QuestionnaireNext, QuestionnairePrevious, QuestionnaireProgress, QuestionnaireSkip, QuestionnaireSubmit, QuestionnaireTitle, RICH_TEXT_ATTRIBUTES, RICH_TEXT_BODY_CLASS, RICH_TEXT_ELEMENTS, RICH_TEXT_LINK_PROTOCOLS, RICH_TEXT_MENTION_CLASS, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, RichTextContent, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VIRTUALIZE_FROM, VideoPlayer, avatarTone, badgeVariants, buttonVariants, clampPage, cn, createToastManager, dateToDay, dayToDate, formatCount, formatMediaTime, fullSelection, getPaginationRange, indicatorVariants, initialsOf, isAllowedRichTextHref, markerVariants, navigationMenuTriggerStyle, progressFill, progressTrack, resolveChosen, richTextToNodes, spinnerVariants, summarize, tabsListVariants, toast, toggleVariants, useAnimatedValues, useCarousel, useDirection, useIsMobile, useMediaPlayer, useMergedRefs, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, useSidebar, useToastManager };
4511
+
4512
+ //# sourceMappingURL=index.js.map