@sonamu-kit/react-components 0.4.4 → 0.4.6

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 (219) hide show
  1. package/dist/.storybook/main.d.ts +3 -0
  2. package/dist/.storybook/preview.d.ts +3 -0
  3. package/dist/_virtual/~icons/lucide/arrow-left.js +21 -0
  4. package/dist/_virtual/~icons/lucide/arrow-left.js.map +1 -0
  5. package/dist/_virtual/~icons/lucide/arrow-right.js +21 -0
  6. package/dist/_virtual/~icons/lucide/arrow-right.js.map +1 -0
  7. package/dist/_virtual/~icons/lucide/calendar.js +31 -0
  8. package/dist/_virtual/~icons/lucide/calendar.js.map +1 -0
  9. package/dist/_virtual/~icons/lucide/check.js +21 -0
  10. package/dist/_virtual/~icons/lucide/check.js.map +1 -0
  11. package/dist/_virtual/~icons/lucide/chevron-down.js +21 -0
  12. package/dist/_virtual/~icons/lucide/chevron-down.js.map +1 -0
  13. package/dist/_virtual/~icons/lucide/chevron-left.js +21 -0
  14. package/dist/_virtual/~icons/lucide/chevron-left.js.map +1 -0
  15. package/dist/_virtual/~icons/lucide/chevron-right.js +21 -0
  16. package/dist/_virtual/~icons/lucide/chevron-right.js.map +1 -0
  17. package/dist/_virtual/~icons/lucide/chevrons-up-down.js +21 -0
  18. package/dist/_virtual/~icons/lucide/chevrons-up-down.js.map +1 -0
  19. package/dist/_virtual/~icons/lucide/circle.js +23 -0
  20. package/dist/_virtual/~icons/lucide/circle.js.map +1 -0
  21. package/dist/_virtual/~icons/lucide/dot.js +23 -0
  22. package/dist/_virtual/~icons/lucide/dot.js.map +1 -0
  23. package/dist/_virtual/~icons/lucide/grip-vertical.js +52 -0
  24. package/dist/_virtual/~icons/lucide/grip-vertical.js.map +1 -0
  25. package/dist/_virtual/~icons/lucide/image.js +36 -0
  26. package/dist/_virtual/~icons/lucide/image.js.map +1 -0
  27. package/dist/_virtual/~icons/lucide/loader-2.js +21 -0
  28. package/dist/_virtual/~icons/lucide/loader-2.js.map +1 -0
  29. package/dist/_virtual/~icons/lucide/loader2.js +21 -0
  30. package/dist/_virtual/~icons/lucide/loader2.js.map +1 -0
  31. package/dist/_virtual/~icons/lucide/more-horizontal.js +37 -0
  32. package/dist/_virtual/~icons/lucide/more-horizontal.js.map +1 -0
  33. package/dist/_virtual/~icons/lucide/panel-left.js +27 -0
  34. package/dist/_virtual/~icons/lucide/panel-left.js.map +1 -0
  35. package/dist/_virtual/~icons/lucide/plus.js +21 -0
  36. package/dist/_virtual/~icons/lucide/plus.js.map +1 -0
  37. package/dist/_virtual/~icons/lucide/search.js +25 -0
  38. package/dist/_virtual/~icons/lucide/search.js.map +1 -0
  39. package/dist/_virtual/~icons/lucide/trash-2.js +21 -0
  40. package/dist/_virtual/~icons/lucide/trash-2.js.map +1 -0
  41. package/dist/_virtual/~icons/lucide/upload.js +21 -0
  42. package/dist/_virtual/~icons/lucide/upload.js.map +1 -0
  43. package/dist/_virtual/~icons/lucide/x-circle.js +25 -0
  44. package/dist/_virtual/~icons/lucide/x-circle.js.map +1 -0
  45. package/dist/_virtual/~icons/lucide/x.js +21 -0
  46. package/dist/_virtual/~icons/lucide/x.js.map +1 -0
  47. package/dist/components/index.js +61 -0
  48. package/dist/components/ui/accordion.js +37 -0
  49. package/dist/components/ui/accordion.js.map +1 -0
  50. package/dist/components/ui/alert-dialog.js +56 -0
  51. package/dist/components/ui/alert-dialog.js.map +1 -0
  52. package/dist/components/ui/alert.js +33 -0
  53. package/dist/components/ui/alert.js.map +1 -0
  54. package/dist/components/ui/aspect-ratio.js +7 -0
  55. package/dist/components/ui/aspect-ratio.js.map +1 -0
  56. package/dist/components/ui/avatar.js +27 -0
  57. package/dist/components/ui/avatar.js.map +1 -0
  58. package/dist/components/ui/badge.js +24 -0
  59. package/dist/components/ui/badge.js.map +1 -0
  60. package/dist/components/ui/breadcrumb.js +63 -0
  61. package/dist/components/ui/breadcrumb.js.map +1 -0
  62. package/dist/components/ui/button.js +59 -0
  63. package/dist/components/ui/button.js.map +1 -0
  64. package/dist/components/ui/calendar.js +49 -0
  65. package/dist/components/ui/calendar.js.map +1 -0
  66. package/dist/components/ui/card.js +56 -0
  67. package/dist/components/ui/card.js.map +1 -0
  68. package/dist/components/ui/carousel.js +119 -0
  69. package/dist/components/ui/carousel.js.map +1 -0
  70. package/dist/components/ui/checkbox.js +56 -0
  71. package/dist/components/ui/checkbox.js.map +1 -0
  72. package/dist/components/ui/collapsible.js +7 -0
  73. package/dist/components/ui/collapsible.js.map +1 -0
  74. package/dist/components/ui/combobox.js +68 -0
  75. package/dist/components/ui/combobox.js.map +1 -0
  76. package/dist/components/ui/command.js +76 -0
  77. package/dist/components/ui/command.js.map +1 -0
  78. package/dist/components/ui/common-modal.js +64 -0
  79. package/dist/components/ui/common-modal.js.map +1 -0
  80. package/dist/components/ui/context-menu.js +75 -0
  81. package/dist/components/ui/context-menu.js.map +1 -0
  82. package/dist/components/ui/date-input.js +15 -0
  83. package/dist/components/ui/date-input.js.map +1 -0
  84. package/dist/components/ui/date-picker.js +105 -0
  85. package/dist/components/ui/date-picker.js.map +1 -0
  86. package/dist/components/ui/dialog.js +52 -0
  87. package/dist/components/ui/dialog.js.map +1 -0
  88. package/dist/components/ui/drawer.js +50 -0
  89. package/dist/components/ui/drawer.js.map +1 -0
  90. package/dist/components/ui/dropdown-menu.js +77 -0
  91. package/dist/components/ui/dropdown-menu.js.map +1 -0
  92. package/dist/components/ui/file-input.js +268 -0
  93. package/dist/components/ui/file-input.js.map +1 -0
  94. package/dist/components/ui/form.js +81 -0
  95. package/dist/components/ui/form.js.map +1 -0
  96. package/dist/components/ui/hover-card.js +17 -0
  97. package/dist/components/ui/hover-card.js.map +1 -0
  98. package/dist/components/ui/input-otp.js +43 -0
  99. package/dist/components/ui/input-otp.js.map +1 -0
  100. package/dist/components/ui/input.d.ts +5 -0
  101. package/dist/components/ui/input.js +39 -0
  102. package/dist/components/ui/input.js.map +1 -0
  103. package/dist/components/ui/label.js +16 -0
  104. package/dist/components/ui/label.js.map +1 -0
  105. package/dist/components/ui/menubar.js +108 -0
  106. package/dist/components/ui/menubar.js.map +1 -0
  107. package/dist/components/ui/month-picker-multiple.js +236 -0
  108. package/dist/components/ui/month-picker-multiple.js.map +1 -0
  109. package/dist/components/ui/navigation-menu.js +60 -0
  110. package/dist/components/ui/navigation-menu.js.map +1 -0
  111. package/dist/components/ui/pagination.js +55 -0
  112. package/dist/components/ui/pagination.js.map +1 -0
  113. package/dist/components/ui/popover.js +36 -0
  114. package/dist/components/ui/popover.js.map +1 -0
  115. package/dist/components/ui/progress.js +20 -0
  116. package/dist/components/ui/progress.js.map +1 -0
  117. package/dist/components/ui/radio-group.js +26 -0
  118. package/dist/components/ui/radio-group.js.map +1 -0
  119. package/dist/components/ui/range-number-input.js +41 -0
  120. package/dist/components/ui/range-number-input.js.map +1 -0
  121. package/dist/components/ui/resizable.js +21 -0
  122. package/dist/components/ui/resizable.js.map +1 -0
  123. package/dist/components/ui/scroll-area.js +32 -0
  124. package/dist/components/ui/scroll-area.js.map +1 -0
  125. package/dist/components/ui/select/enum-select.js +43 -0
  126. package/dist/components/ui/select/enum-select.js.map +1 -0
  127. package/dist/components/ui/select/id-async-select.js +160 -0
  128. package/dist/components/ui/select/id-async-select.js.map +1 -0
  129. package/dist/components/ui/select/select.js +337 -0
  130. package/dist/components/ui/select/select.js.map +1 -0
  131. package/dist/components/ui/separator.js +17 -0
  132. package/dist/components/ui/separator.js.map +1 -0
  133. package/dist/components/ui/sheet.js +60 -0
  134. package/dist/components/ui/sheet.js.map +1 -0
  135. package/dist/components/ui/sidebar.js +347 -0
  136. package/dist/components/ui/sidebar.js.map +1 -0
  137. package/dist/components/ui/skeleton.js +13 -0
  138. package/dist/components/ui/skeleton.js.map +1 -0
  139. package/dist/components/ui/slider.js +37 -0
  140. package/dist/components/ui/slider.js.map +1 -0
  141. package/dist/components/ui/sonamu-filter/constants.js +31 -0
  142. package/dist/components/ui/sonamu-filter/constants.js.map +1 -0
  143. package/dist/components/ui/sonamu-filter/rule-row-input.js +76 -0
  144. package/dist/components/ui/sonamu-filter/rule-row-input.js.map +1 -0
  145. package/dist/components/ui/sonamu-filter/sonamu-filter-modal.js +112 -0
  146. package/dist/components/ui/sonamu-filter/sonamu-filter-modal.js.map +1 -0
  147. package/dist/components/ui/sonamu-filter/sonamu-filter-popover.js +60 -0
  148. package/dist/components/ui/sonamu-filter/sonamu-filter-popover.js.map +1 -0
  149. package/dist/components/ui/sonamu-filter/utils.js +40 -0
  150. package/dist/components/ui/sonamu-filter/utils.js.map +1 -0
  151. package/dist/components/ui/sonamu-filter/value-input.js +101 -0
  152. package/dist/components/ui/sonamu-filter/value-input.js.map +1 -0
  153. package/dist/components/ui/switch.js +33 -0
  154. package/dist/components/ui/switch.js.map +1 -0
  155. package/dist/components/ui/table.js +70 -0
  156. package/dist/components/ui/table.js.map +1 -0
  157. package/dist/components/ui/tabs.js +27 -0
  158. package/dist/components/ui/tabs.js.map +1 -0
  159. package/dist/components/ui/tag-input.js +57 -0
  160. package/dist/components/ui/tag-input.js.map +1 -0
  161. package/dist/components/ui/textarea.js +20 -0
  162. package/dist/components/ui/textarea.js.map +1 -0
  163. package/dist/components/ui/toast.js +55 -0
  164. package/dist/components/ui/toast.js.map +1 -0
  165. package/dist/components/ui/toaster.js +22 -0
  166. package/dist/components/ui/toaster.js.map +1 -0
  167. package/dist/components/ui/toggle-group.js +39 -0
  168. package/dist/components/ui/toggle-group.js.map +1 -0
  169. package/dist/components/ui/toggle.js +42 -0
  170. package/dist/components/ui/toggle.js.map +1 -0
  171. package/dist/components/ui/tooltip.js +16 -0
  172. package/dist/components/ui/tooltip.js.map +1 -0
  173. package/dist/contexts/index.js +2 -0
  174. package/dist/contexts/sonamu-context.js +28 -0
  175. package/dist/contexts/sonamu-context.js.map +1 -0
  176. package/dist/demo/App.d.ts +2 -0
  177. package/dist/demo/Layout.d.ts +2 -0
  178. package/dist/demo/components/FormDebugPanel.d.ts +11 -0
  179. package/dist/demo/main.d.ts +0 -0
  180. package/dist/demo/routeTree.gen.d.ts +102 -0
  181. package/dist/demo/routes/__root.d.ts +1 -0
  182. package/dist/demo/routes/data-display.d.ts +1 -0
  183. package/dist/demo/routes/dialogs-alerts.d.ts +1 -0
  184. package/dist/demo/routes/form.d.ts +1 -0
  185. package/dist/demo/routes/index.d.ts +1 -0
  186. package/dist/demo/routes/layout.d.ts +1 -0
  187. package/dist/demo/routes/navigation.d.ts +1 -0
  188. package/dist/demo/schemas/data-display-demo.schema.d.ts +20 -0
  189. package/dist/demo/schemas/dialogs-alerts-demo.schema.d.ts +32 -0
  190. package/dist/demo/schemas/form-demo.schema.d.ts +33 -0
  191. package/dist/hooks/index.js +2 -0
  192. package/dist/hooks/use-toast.js +112 -0
  193. package/dist/hooks/use-toast.js.map +1 -0
  194. package/dist/i18n/rc-keys.js +75 -0
  195. package/dist/i18n/rc-keys.js.map +1 -0
  196. package/dist/index.js +70 -0
  197. package/dist/lib/base-helpers.js +43 -0
  198. package/dist/lib/base-helpers.js.map +1 -0
  199. package/dist/lib/caster.js +27 -0
  200. package/dist/lib/caster.js.map +1 -0
  201. package/dist/lib/form-helpers.js +74 -0
  202. package/dist/lib/form-helpers.js.map +1 -0
  203. package/dist/lib/index.js +9 -0
  204. package/dist/lib/list-helpers.js +70 -0
  205. package/dist/lib/list-helpers.js.map +1 -0
  206. package/dist/lib/modal-helpers.js +30 -0
  207. package/dist/lib/modal-helpers.js.map +1 -0
  208. package/dist/lib/types.js +86 -0
  209. package/dist/lib/types.js.map +1 -0
  210. package/dist/lib/use-mobile.js +16 -0
  211. package/dist/lib/use-mobile.js.map +1 -0
  212. package/dist/lib/utils.js +23 -0
  213. package/dist/lib/utils.js.map +1 -0
  214. package/dist/router/index.d.ts +1 -0
  215. package/dist/router/index.js +1 -0
  216. package/dist/styles/globals.css +1 -1
  217. package/package.json +16 -12
  218. package/dist/react-components.es.js +0 -4500
  219. package/dist/react-components.es.js.map +0 -1
@@ -1,4500 +0,0 @@
1
- import * as e from "react";
2
- import t, { createContext as n, useCallback as r, useContext as i, useEffect as a, useImperativeHandle as o, useMemo as s, useRef as c, useState as l } from "react";
3
- import * as u from "@radix-ui/react-accordion";
4
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
5
- import { clsx as m } from "clsx";
6
- import { twMerge as h } from "tailwind-merge";
7
- import { cva as g } from "class-variance-authority";
8
- import * as _ from "@radix-ui/react-alert-dialog";
9
- import { Slot as v } from "@radix-ui/react-slot";
10
- import * as y from "@radix-ui/react-aspect-ratio";
11
- import * as b from "@radix-ui/react-avatar";
12
- import { DayPicker as x } from "react-day-picker";
13
- import S from "embla-carousel-react";
14
- import * as C from "@radix-ui/react-checkbox";
15
- import * as w from "@radix-ui/react-collapsible";
16
- import { createAuthClient as T } from "better-auth/react";
17
- import { Command as E } from "cmdk";
18
- import * as D from "@radix-ui/react-dialog";
19
- import * as O from "@radix-ui/react-popover";
20
- import { atom as k, useAtom as A } from "jotai";
21
- import * as j from "@radix-ui/react-context-menu";
22
- import { format as M } from "date-fns";
23
- import { Drawer as N } from "vaul";
24
- import * as P from "@radix-ui/react-dropdown-menu";
25
- import { FileIcon as F, defaultStyles as ee } from "react-file-icon";
26
- import { Controller as te, FormProvider as I, useFormContext as ne } from "react-hook-form";
27
- import * as re from "@radix-ui/react-label";
28
- import * as ie from "@radix-ui/react-hover-card";
29
- import { OTPInput as ae, OTPInputContext as oe } from "input-otp";
30
- import * as L from "@radix-ui/react-menubar";
31
- import * as se from "@radix-ui/react-separator";
32
- import * as R from "@radix-ui/react-navigation-menu";
33
- import * as ce from "@radix-ui/react-progress";
34
- import * as z from "@radix-ui/react-radio-group";
35
- import * as le from "react-resizable-panels";
36
- import * as B from "@radix-ui/react-scroll-area";
37
- import { useQueryClient as ue } from "@tanstack/react-query";
38
- import * as V from "@radix-ui/react-tooltip";
39
- import * as de from "@radix-ui/react-slider";
40
- import fe from "qs";
41
- import { get as pe, isObject as me, set as he, unique as ge } from "radashi";
42
- import { z as H } from "zod";
43
- import { useNavigate as _e, useSearch as ve } from "@tanstack/react-router";
44
- import ye from "fast-deep-equal";
45
- import * as be from "@radix-ui/react-switch";
46
- import * as U from "@radix-ui/react-tabs";
47
- import * as W from "@radix-ui/react-toast";
48
- import * as xe from "@radix-ui/react-toggle";
49
- import * as Se from "@radix-ui/react-toggle-group";
50
- //#region src/hooks/use-toast.ts
51
- var Ce = 1, we = 1e6, Te = 0;
52
- function Ee() {
53
- return Te = (Te + 1) % (2 ** 53 - 1), Te.toString();
54
- }
55
- var De = /* @__PURE__ */ new Map(), Oe = (e) => {
56
- if (De.has(e)) return;
57
- let t = setTimeout(() => {
58
- De.delete(e), Me({
59
- type: "REMOVE_TOAST",
60
- toastId: e
61
- });
62
- }, we);
63
- De.set(e, t);
64
- }, ke = (e, t) => {
65
- switch (t.type) {
66
- case "ADD_TOAST": {
67
- let n = [t.toast, ...e.toasts].slice(0, Ce), r = new Set(n.map((e) => e.id));
68
- for (let t of e.toasts) if (!r.has(t.id)) {
69
- let e = De.get(t.id);
70
- e && (clearTimeout(e), De.delete(t.id));
71
- }
72
- return {
73
- ...e,
74
- toasts: n
75
- };
76
- }
77
- case "UPDATE_TOAST": return {
78
- ...e,
79
- toasts: e.toasts.map((e) => e.id === t.toast.id ? {
80
- ...e,
81
- ...t.toast
82
- } : e)
83
- };
84
- case "DISMISS_TOAST": {
85
- let { toastId: n } = t;
86
- return n ? Oe(n) : e.toasts.forEach((e) => {
87
- Oe(e.id);
88
- }), {
89
- ...e,
90
- toasts: e.toasts.map((e) => e.id === n || n === void 0 ? {
91
- ...e,
92
- open: !1
93
- } : e)
94
- };
95
- }
96
- case "REMOVE_TOAST":
97
- if (t.toastId === void 0) {
98
- for (let [e, t] of De) clearTimeout(t), De.delete(e);
99
- return {
100
- ...e,
101
- toasts: []
102
- };
103
- }
104
- return {
105
- ...e,
106
- toasts: e.toasts.filter((e) => e.id !== t.toastId)
107
- };
108
- }
109
- }, Ae = [], je = { toasts: [] };
110
- function Me(e) {
111
- je = ke(je, e), Ae.forEach((e) => {
112
- e(je);
113
- });
114
- }
115
- function Ne({ ...e }) {
116
- let t = Ee(), n = (e) => Me({
117
- type: "UPDATE_TOAST",
118
- toast: {
119
- ...e,
120
- id: t
121
- }
122
- }), r = () => Me({
123
- type: "DISMISS_TOAST",
124
- toastId: t
125
- });
126
- return Me({
127
- type: "ADD_TOAST",
128
- toast: {
129
- ...e,
130
- id: t,
131
- open: !0,
132
- onOpenChange: (e) => {
133
- e || r();
134
- }
135
- }
136
- }), {
137
- id: t,
138
- dismiss: r,
139
- update: n
140
- };
141
- }
142
- function Pe() {
143
- let [t, n] = e.useState(je);
144
- return e.useEffect(() => (Ae.push(n), () => {
145
- let e = Ae.indexOf(n);
146
- e > -1 && Ae.splice(e, 1);
147
- }), []), {
148
- ...t,
149
- toast: Ne,
150
- dismiss: (e) => Me({
151
- type: "DISMISS_TOAST",
152
- toastId: e
153
- })
154
- };
155
- }
156
- //#endregion
157
- //#region ~icons/lucide/chevron-down.jsx
158
- var Fe = (e) => /* @__PURE__ */ f("svg", {
159
- viewBox: "0 0 24 24",
160
- width: "1.2em",
161
- height: "1.2em",
162
- ...e,
163
- children: /* @__PURE__ */ f("path", {
164
- fill: "none",
165
- stroke: "currentColor",
166
- strokeLinecap: "round",
167
- strokeLinejoin: "round",
168
- strokeWidth: 2,
169
- d: "m6 9l6 6l6-6"
170
- })
171
- });
172
- //#endregion
173
- //#region src/lib/utils.ts
174
- function G(...e) {
175
- return h(m(e));
176
- }
177
- function Ie(e) {
178
- return e === void 0 ? void 0 : Array.isArray(e) ? e : [e];
179
- }
180
- function Le(e) {
181
- let [t, n] = l([]);
182
- return a(() => {
183
- let t = e.map((e) => URL.createObjectURL(e));
184
- return n(t), () => {
185
- for (let e of t) URL.revokeObjectURL(e);
186
- };
187
- }, [s(() => e.map((e) => `${e.name}:${e.size}:${e.lastModified}`).join("|"), [e])]), t;
188
- }
189
- //#endregion
190
- //#region src/components/ui/accordion.tsx
191
- var Re = u.Root, ze = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(u.Item, {
192
- ref: n,
193
- className: G("border-b", e),
194
- ...t
195
- }));
196
- ze.displayName = "AccordionItem";
197
- var Be = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ f(u.Header, {
198
- className: "flex",
199
- children: /* @__PURE__ */ p(u.Trigger, {
200
- ref: r,
201
- className: G("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", e),
202
- ...n,
203
- children: [t, /* @__PURE__ */ f(Fe, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })]
204
- })
205
- }));
206
- Be.displayName = u.Trigger.displayName;
207
- var Ve = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ f(u.Content, {
208
- ref: r,
209
- className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
210
- ...n,
211
- children: /* @__PURE__ */ f("div", {
212
- className: G("pb-4 pt-0", e),
213
- children: t
214
- })
215
- }));
216
- Ve.displayName = u.Content.displayName;
217
- var He = g("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground", {
218
- variants: { variant: {
219
- default: "bg-background text-foreground",
220
- destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
221
- } },
222
- defaultVariants: { variant: "default" }
223
- }), Ue = e.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ f("div", {
224
- ref: r,
225
- role: "alert",
226
- className: G(He({ variant: t }), e),
227
- ...n
228
- }));
229
- Ue.displayName = "Alert";
230
- var We = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("h5", {
231
- ref: n,
232
- className: G("mb-1 font-medium leading-none tracking-tight", e),
233
- ...t
234
- }));
235
- We.displayName = "AlertTitle";
236
- var Ge = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("div", {
237
- ref: n,
238
- className: G("text-sm [&_p]:leading-relaxed", e),
239
- ...t
240
- }));
241
- Ge.displayName = "AlertDescription";
242
- //#endregion
243
- //#region ~icons/lucide/loader-2.jsx
244
- var Ke = (e) => /* @__PURE__ */ f("svg", {
245
- viewBox: "0 0 24 24",
246
- width: "1.2em",
247
- height: "1.2em",
248
- ...e,
249
- children: /* @__PURE__ */ f("path", {
250
- fill: "none",
251
- stroke: "currentColor",
252
- strokeLinecap: "round",
253
- strokeLinejoin: "round",
254
- strokeWidth: 2,
255
- d: "M21 12a9 9 0 1 1-6.219-8.56"
256
- })
257
- }), qe = g("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-button text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer", {
258
- variants: {
259
- variant: {
260
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
261
- destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
262
- outline: "border bg-background text-foreground hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
263
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
264
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
265
- link: "text-primary underline-offset-4 hover:underline",
266
- red: "bg-red-500 text-white hover:bg-red-600",
267
- yellow: "bg-yellow-500 text-white hover:bg-yellow-600",
268
- green: "bg-green-500 text-white hover:bg-green-600",
269
- blue: "bg-blue-500 text-white hover:bg-blue-600",
270
- cyan: "bg-cyan-500 text-white hover:bg-cyan-600",
271
- purple: "bg-purple-500 text-white hover:bg-purple-600",
272
- pink: "bg-pink-500 text-white hover:bg-pink-600",
273
- orange: "bg-orange-500 text-white hover:bg-orange-600"
274
- },
275
- size: {
276
- xs: "h-6 px-2 py-1 text-xs [&_svg]:size-3 has-[>svg]:px-1.5 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square",
277
- sm: "h-7 px-3 py-1.5 text-xs [&_svg]:size-3.5 has-[>svg]:px-2 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square",
278
- default: "h-9 px-4 py-2 [&_svg]:size-4 has-[>svg]:px-3 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square",
279
- lg: "h-11 px-6 py-3 text-base [&_svg]:size-5 has-[>svg]:px-4 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square",
280
- xl: "h-13 px-8 py-4 text-lg [&_svg]:size-6 has-[>svg]:px-6 has-[>svg:only-child]:px-0 has-[>svg:only-child]:aspect-square"
281
- }
282
- },
283
- defaultVariants: {
284
- variant: "default",
285
- size: "default"
286
- }
287
- }), K = e.forwardRef(({ className: t, variant: n, size: r, icon: i, children: a, loading: o, disabled: s, asChild: c = !1, ...l }, u) => {
288
- let d = c ? v : "button", m = e.Children.count(a) === 0, h = o ? /* @__PURE__ */ f(Ke, { className: "animate-spin" }) : i;
289
- return /* @__PURE__ */ f(d, {
290
- "data-slot": "button",
291
- className: G(qe({
292
- variant: n,
293
- size: r,
294
- className: t
295
- })),
296
- ref: u,
297
- disabled: s || o,
298
- ...l,
299
- children: m ? h : h ? /* @__PURE__ */ p("span", {
300
- className: "contents",
301
- children: [h, a]
302
- }) : a
303
- });
304
- });
305
- K.displayName = "Button";
306
- //#endregion
307
- //#region src/components/ui/alert-dialog.tsx
308
- var Je = _.Root, Ye = _.Trigger, Xe = _.Portal, Ze = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(_.Overlay, {
309
- className: G("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", e),
310
- ...t,
311
- ref: n
312
- }));
313
- Ze.displayName = _.Overlay.displayName;
314
- var Qe = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p(Xe, { children: [/* @__PURE__ */ f(Ze, {}), /* @__PURE__ */ f(_.Content, {
315
- ref: n,
316
- className: G("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", e),
317
- ...t
318
- })] }));
319
- Qe.displayName = _.Content.displayName;
320
- var $e = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
321
- className: G("flex flex-col space-y-2 text-center sm:text-left", e),
322
- ...t
323
- });
324
- $e.displayName = "AlertDialogHeader";
325
- var et = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
326
- className: G("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e),
327
- ...t
328
- });
329
- et.displayName = "AlertDialogFooter";
330
- var tt = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(_.Title, {
331
- ref: n,
332
- className: G("text-lg font-semibold", e),
333
- ...t
334
- }));
335
- tt.displayName = _.Title.displayName;
336
- var nt = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(_.Description, {
337
- ref: n,
338
- className: G("text-sm text-muted-foreground", e),
339
- ...t
340
- }));
341
- nt.displayName = _.Description.displayName;
342
- var rt = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(_.Action, {
343
- ref: n,
344
- className: G(qe(), e),
345
- ...t
346
- }));
347
- rt.displayName = _.Action.displayName;
348
- var it = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(_.Cancel, {
349
- ref: n,
350
- className: G(qe({ variant: "outline" }), "mt-2 sm:mt-0", e),
351
- ...t
352
- }));
353
- it.displayName = _.Cancel.displayName;
354
- //#endregion
355
- //#region src/components/ui/aspect-ratio.tsx
356
- var at = y.Root, ot = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(b.Root, {
357
- ref: n,
358
- className: G("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", e),
359
- ...t
360
- }));
361
- ot.displayName = b.Root.displayName;
362
- var st = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(b.Image, {
363
- ref: n,
364
- className: G("aspect-square h-full w-full", e),
365
- ...t
366
- }));
367
- st.displayName = b.Image.displayName;
368
- var ct = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(b.Fallback, {
369
- ref: n,
370
- className: G("flex h-full w-full items-center justify-center rounded-full bg-muted", e),
371
- ...t
372
- }));
373
- ct.displayName = b.Fallback.displayName;
374
- var lt = g("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
375
- variants: { variant: {
376
- default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
377
- secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
378
- destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
379
- outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
380
- } },
381
- defaultVariants: { variant: "default" }
382
- });
383
- function ut({ className: e, variant: t, asChild: n = !1, ...r }) {
384
- return /* @__PURE__ */ f(n ? v : "span", {
385
- "data-slot": "badge",
386
- className: G(lt({ variant: t }), e),
387
- ...r
388
- });
389
- }
390
- //#endregion
391
- //#region ~icons/lucide/chevron-right.jsx
392
- var dt = (e) => /* @__PURE__ */ f("svg", {
393
- viewBox: "0 0 24 24",
394
- width: "1.2em",
395
- height: "1.2em",
396
- ...e,
397
- children: /* @__PURE__ */ f("path", {
398
- fill: "none",
399
- stroke: "currentColor",
400
- strokeLinecap: "round",
401
- strokeLinejoin: "round",
402
- strokeWidth: 2,
403
- d: "m9 18l6-6l-6-6"
404
- })
405
- }), ft = (e) => /* @__PURE__ */ f("svg", {
406
- viewBox: "0 0 24 24",
407
- width: "1.2em",
408
- height: "1.2em",
409
- ...e,
410
- children: /* @__PURE__ */ p("g", {
411
- fill: "none",
412
- stroke: "currentColor",
413
- strokeLinecap: "round",
414
- strokeLinejoin: "round",
415
- strokeWidth: 2,
416
- children: [
417
- /* @__PURE__ */ f("circle", {
418
- cx: 12,
419
- cy: 12,
420
- r: 1
421
- }),
422
- /* @__PURE__ */ f("circle", {
423
- cx: 19,
424
- cy: 12,
425
- r: 1
426
- }),
427
- /* @__PURE__ */ f("circle", {
428
- cx: 5,
429
- cy: 12,
430
- r: 1
431
- })
432
- ]
433
- })
434
- }), pt = e.forwardRef(({ ...e }, t) => /* @__PURE__ */ f("nav", {
435
- ref: t,
436
- "aria-label": "breadcrumb",
437
- ...e
438
- }));
439
- pt.displayName = "Breadcrumb";
440
- var mt = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("ol", {
441
- ref: n,
442
- className: G("flex flex-wrap items-center gap-1.5 overflow-wrap-anywhere text-sm text-muted-foreground sm:gap-2.5", e),
443
- ...t
444
- }));
445
- mt.displayName = "BreadcrumbList";
446
- var ht = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("li", {
447
- ref: n,
448
- className: G("inline-flex items-center gap-1.5", e),
449
- ...t
450
- }));
451
- ht.displayName = "BreadcrumbItem";
452
- var gt = e.forwardRef(({ asChild: e, className: t, ...n }, r) => /* @__PURE__ */ f(e ? v : "a", {
453
- ref: r,
454
- className: G("transition-colors hover:text-foreground", t),
455
- ...n
456
- }));
457
- gt.displayName = "BreadcrumbLink";
458
- var _t = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("span", {
459
- ref: n,
460
- role: "link",
461
- "aria-disabled": "true",
462
- "aria-current": "page",
463
- className: G("font-normal text-foreground", e),
464
- ...t
465
- }));
466
- _t.displayName = "BreadcrumbPage";
467
- var vt = ({ children: e, className: t, ...n }) => /* @__PURE__ */ f("li", {
468
- role: "presentation",
469
- "aria-hidden": "true",
470
- className: G("[&>svg]:w-3.5 [&>svg]:h-3.5", t),
471
- ...n,
472
- children: e ?? /* @__PURE__ */ f(dt, {})
473
- });
474
- vt.displayName = "BreadcrumbSeparator";
475
- var yt = ({ className: e, ...t }) => /* @__PURE__ */ p("span", {
476
- role: "presentation",
477
- "aria-hidden": "true",
478
- className: G("flex h-9 w-9 items-center justify-center", e),
479
- ...t,
480
- children: [/* @__PURE__ */ f(ft, { className: "h-4 w-4" }), /* @__PURE__ */ f("span", {
481
- className: "sr-only",
482
- children: "More"
483
- })]
484
- });
485
- yt.displayName = "BreadcrumbElipssis";
486
- //#endregion
487
- //#region ~icons/lucide/chevron-left.jsx
488
- var bt = (e) => /* @__PURE__ */ f("svg", {
489
- viewBox: "0 0 24 24",
490
- width: "1.2em",
491
- height: "1.2em",
492
- ...e,
493
- children: /* @__PURE__ */ f("path", {
494
- fill: "none",
495
- stroke: "currentColor",
496
- strokeLinecap: "round",
497
- strokeLinejoin: "round",
498
- strokeWidth: 2,
499
- d: "m15 18l-6-6l6-6"
500
- })
501
- });
502
- //#endregion
503
- //#region src/components/ui/calendar.tsx
504
- function xt({ className: e, classNames: t, showOutsideDays: n = !0, ...r }) {
505
- return /* @__PURE__ */ f(x, {
506
- showOutsideDays: n,
507
- className: G("p-3", e),
508
- classNames: {
509
- months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
510
- month: "space-y-4",
511
- caption: "flex justify-center pt-1 relative items-center w-full",
512
- caption_label: "text-sm font-medium",
513
- nav: "space-x-1 flex items-center",
514
- nav_button: G(qe({ variant: "outline" }), "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),
515
- nav_button_previous: "absolute left-1",
516
- nav_button_next: "absolute right-1",
517
- table: "w-full border-collapse space-y-1",
518
- head_row: "flex",
519
- head_cell: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
520
- row: "flex w-full mt-2",
521
- cell: G("h-9 w-9 text-center text-sm p-0 relative focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent/10", r.mode === "range" ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" : "[&:has([aria-selected])]:rounded-md"),
522
- day: G(qe({ variant: "ghost" }), "h-9 w-9 p-0 font-normal aria-selected:opacity-100"),
523
- day_range_start: "day-range-start",
524
- day_range_end: "day-range-end",
525
- day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
526
- day_today: "bg-accent/10 text-foreground",
527
- day_outside: "day-outside text-muted-foreground opacity-50 aria-selected:bg-transparent aria-selected:opacity-100 aria-selected:text-foreground",
528
- day_disabled: "text-muted-foreground opacity-50",
529
- day_range_middle: "aria-selected:bg-transparent aria-selected:text-foreground",
530
- day_hidden: "invisible",
531
- ...t
532
- },
533
- components: {
534
- IconLeft: () => /* @__PURE__ */ f(bt, { className: "h-4 w-4" }),
535
- IconRight: () => /* @__PURE__ */ f(dt, { className: "h-4 w-4" })
536
- },
537
- ...r
538
- });
539
- }
540
- //#endregion
541
- //#region src/components/ui/card.tsx
542
- function St({ className: e, ...t }) {
543
- return /* @__PURE__ */ f("div", {
544
- "data-slot": "card",
545
- className: G("bg-card text-card-foreground flex flex-col gap-6 rounded-card border", e),
546
- ...t
547
- });
548
- }
549
- function Ct({ className: e, ...t }) {
550
- return /* @__PURE__ */ f("div", {
551
- "data-slot": "card-header",
552
- className: G("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 pt-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", e),
553
- ...t
554
- });
555
- }
556
- function wt({ className: e, ...t }) {
557
- return /* @__PURE__ */ f("h4", {
558
- "data-slot": "card-title",
559
- className: G("leading-none", e),
560
- ...t
561
- });
562
- }
563
- function Tt({ className: e, ...t }) {
564
- return /* @__PURE__ */ f("p", {
565
- "data-slot": "card-description",
566
- className: G("text-muted-foreground", e),
567
- ...t
568
- });
569
- }
570
- function Et({ className: e, ...t }) {
571
- return /* @__PURE__ */ f("div", {
572
- "data-slot": "card-action",
573
- className: G("col-start-2 row-span-2 row-start-1 self-start justify-self-end", e),
574
- ...t
575
- });
576
- }
577
- function Dt({ className: e, ...t }) {
578
- return /* @__PURE__ */ f("div", {
579
- "data-slot": "card-content",
580
- className: G("px-6 last:pb-6", e),
581
- ...t
582
- });
583
- }
584
- function Ot({ className: e, ...t }) {
585
- return /* @__PURE__ */ f("div", {
586
- "data-slot": "card-footer",
587
- className: G("flex items-center px-6 pb-6 [.border-t]:pt-6", e),
588
- ...t
589
- });
590
- }
591
- //#endregion
592
- //#region ~icons/lucide/arrow-left.jsx
593
- var kt = (e) => /* @__PURE__ */ f("svg", {
594
- viewBox: "0 0 24 24",
595
- width: "1.2em",
596
- height: "1.2em",
597
- ...e,
598
- children: /* @__PURE__ */ f("path", {
599
- fill: "none",
600
- stroke: "currentColor",
601
- strokeLinecap: "round",
602
- strokeLinejoin: "round",
603
- strokeWidth: 2,
604
- d: "m12 19l-7-7l7-7m7 7H5"
605
- })
606
- }), At = (e) => /* @__PURE__ */ f("svg", {
607
- viewBox: "0 0 24 24",
608
- width: "1.2em",
609
- height: "1.2em",
610
- ...e,
611
- children: /* @__PURE__ */ f("path", {
612
- fill: "none",
613
- stroke: "currentColor",
614
- strokeLinecap: "round",
615
- strokeLinejoin: "round",
616
- strokeWidth: 2,
617
- d: "M5 12h14m-7-7l7 7l-7 7"
618
- })
619
- }), jt = e.createContext(null);
620
- function Mt() {
621
- let t = e.useContext(jt);
622
- if (!t) throw Error("useCarousel must be used within a <Carousel />");
623
- return t;
624
- }
625
- var Nt = e.forwardRef(({ orientation: t = "horizontal", opts: n, setApi: r, plugins: i, className: a, children: o, ...s }, c) => {
626
- let [l, u] = S({
627
- ...n,
628
- axis: t === "horizontal" ? "x" : "y"
629
- }, i), [d, p] = e.useState(!1), [m, h] = e.useState(!1), g = e.useCallback((e) => {
630
- e && (p(e.canScrollPrev()), h(e.canScrollNext()));
631
- }, []), _ = e.useCallback(() => {
632
- u?.scrollPrev();
633
- }, [u]), v = e.useCallback(() => {
634
- u?.scrollNext();
635
- }, [u]), y = e.useCallback((e) => {
636
- e.key === "ArrowLeft" ? (e.preventDefault(), _()) : e.key === "ArrowRight" && (e.preventDefault(), v());
637
- }, [_, v]);
638
- return e.useEffect(() => {
639
- !u || !r || r(u);
640
- }, [u, r]), e.useEffect(() => {
641
- if (u) return g(u), u.on("reInit", g), u.on("select", g), () => {
642
- u?.off("reInit", g), u?.off("select", g);
643
- };
644
- }, [u, g]), /* @__PURE__ */ f(jt.Provider, {
645
- value: {
646
- carouselRef: l,
647
- api: u,
648
- opts: n,
649
- orientation: t || (n?.axis === "y" ? "vertical" : "horizontal"),
650
- scrollPrev: _,
651
- scrollNext: v,
652
- canScrollPrev: d,
653
- canScrollNext: m
654
- },
655
- children: /* @__PURE__ */ f("div", {
656
- ref: c,
657
- onKeyDownCapture: y,
658
- className: G("relative", a),
659
- role: "region",
660
- "aria-roledescription": "carousel",
661
- ...s,
662
- children: o
663
- })
664
- });
665
- });
666
- Nt.displayName = "Carousel";
667
- var Pt = e.forwardRef(({ className: e, ...t }, n) => {
668
- let { carouselRef: r, orientation: i } = Mt();
669
- return /* @__PURE__ */ f("div", {
670
- ref: r,
671
- className: "overflow-hidden",
672
- children: /* @__PURE__ */ f("div", {
673
- ref: n,
674
- className: G("flex", i === "horizontal" ? "-ml-4" : "-mt-4 flex-col", e),
675
- ...t
676
- })
677
- });
678
- });
679
- Pt.displayName = "CarouselContent";
680
- var Ft = e.forwardRef(({ className: e, ...t }, n) => {
681
- let { orientation: r } = Mt();
682
- return /* @__PURE__ */ f("div", {
683
- ref: n,
684
- role: "group",
685
- "aria-roledescription": "slide",
686
- className: G("min-w-0 shrink-0 grow-0 basis-full", r === "horizontal" ? "pl-4" : "pt-4", e),
687
- ...t
688
- });
689
- });
690
- Ft.displayName = "CarouselItem";
691
- var It = e.forwardRef(({ className: e, variant: t = "outline", size: n = "default", ...r }, i) => {
692
- let { orientation: a, scrollPrev: o, canScrollPrev: s } = Mt();
693
- return /* @__PURE__ */ p(K, {
694
- ref: i,
695
- variant: t,
696
- size: n,
697
- className: G("absolute h-8 w-8 rounded-full", a === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", e),
698
- disabled: !s,
699
- onClick: o,
700
- ...r,
701
- children: [/* @__PURE__ */ f(kt, { className: "h-4 w-4" }), /* @__PURE__ */ f("span", {
702
- className: "sr-only",
703
- children: "Previous slide"
704
- })]
705
- });
706
- });
707
- It.displayName = "CarouselPrevious";
708
- var Lt = e.forwardRef(({ className: e, variant: t = "outline", size: n = "default", ...r }, i) => {
709
- let { orientation: a, scrollNext: o, canScrollNext: s } = Mt();
710
- return /* @__PURE__ */ p(K, {
711
- ref: i,
712
- variant: t,
713
- size: n,
714
- className: G("absolute h-8 w-8 rounded-full", a === "horizontal" ? "-right-12 top-1/2 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", e),
715
- disabled: !s,
716
- onClick: o,
717
- ...r,
718
- children: [/* @__PURE__ */ f(At, { className: "h-4 w-4" }), /* @__PURE__ */ f("span", {
719
- className: "sr-only",
720
- children: "Next slide"
721
- })]
722
- });
723
- });
724
- Lt.displayName = "CarouselNext";
725
- //#endregion
726
- //#region ~icons/lucide/check.jsx
727
- var q = (e) => /* @__PURE__ */ f("svg", {
728
- viewBox: "0 0 24 24",
729
- width: "1.2em",
730
- height: "1.2em",
731
- ...e,
732
- children: /* @__PURE__ */ f("path", {
733
- fill: "none",
734
- stroke: "currentColor",
735
- strokeLinecap: "round",
736
- strokeLinejoin: "round",
737
- strokeWidth: 2,
738
- d: "M20 6L9 17l-5-5"
739
- })
740
- }), Rt = e.forwardRef(({ className: t, name: n, checked: r, value: i, defaultChecked: a, onValueChange: o, onBlur: s, label: c, labelClassName: l, disabled: u, ...m }, h) => {
741
- let g = i === void 0 ? r : i, _ = e.useRef(null), v = e.useRef(null), y = e.useId();
742
- e.useImperativeHandle(h, () => _.current);
743
- let b = (e) => {
744
- o?.(e === "indeterminate" ? !1 : e);
745
- }, x = (e) => {
746
- e.preventDefault(), !u && v.current?.click();
747
- }, S = /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("input", {
748
- type: "checkbox",
749
- ref: _,
750
- name: n,
751
- defaultChecked: a === !0,
752
- onBlur: s,
753
- className: "sr-only",
754
- tabIndex: -1,
755
- "aria-hidden": "true"
756
- }), /* @__PURE__ */ f(C.Root, {
757
- ref: v,
758
- "data-slot": "checkbox",
759
- checked: g,
760
- defaultChecked: a,
761
- onCheckedChange: b,
762
- disabled: u,
763
- "aria-labelledby": c ? y : void 0,
764
- className: G("peer border border-muted-foreground/30 bg-input-background dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", t),
765
- ...m,
766
- children: /* @__PURE__ */ f(C.Indicator, {
767
- "data-slot": "checkbox-indicator",
768
- className: "flex items-center justify-center text-current transition-none",
769
- children: /* @__PURE__ */ f(q, { className: "size-3.5" })
770
- })
771
- })] });
772
- return c ? /* @__PURE__ */ p("div", {
773
- className: "flex items-center gap-2",
774
- children: [S, /* @__PURE__ */ f("label", {
775
- id: y,
776
- className: G("text-sm cursor-pointer select-none", u && "cursor-not-allowed opacity-50", l),
777
- onClick: x,
778
- children: c
779
- })]
780
- }) : S;
781
- });
782
- Rt.displayName = "Checkbox";
783
- //#endregion
784
- //#region src/components/ui/collapsible.tsx
785
- var zt = w.Root, Bt = w.CollapsibleTrigger, Vt = w.CollapsibleContent, Ht = (e) => /* @__PURE__ */ f("svg", {
786
- viewBox: "0 0 24 24",
787
- width: "1.2em",
788
- height: "1.2em",
789
- ...e,
790
- children: /* @__PURE__ */ f("path", {
791
- fill: "none",
792
- stroke: "currentColor",
793
- strokeLinecap: "round",
794
- strokeLinejoin: "round",
795
- strokeWidth: 2,
796
- d: "m7 15l5 5l5-5M7 9l5-5l5 5"
797
- })
798
- }), Ut = (e) => /* @__PURE__ */ f("svg", {
799
- viewBox: "0 0 24 24",
800
- width: "1.2em",
801
- height: "1.2em",
802
- ...e,
803
- children: /* @__PURE__ */ p("g", {
804
- fill: "none",
805
- stroke: "currentColor",
806
- strokeLinecap: "round",
807
- strokeLinejoin: "round",
808
- strokeWidth: 2,
809
- children: [/* @__PURE__ */ f("circle", {
810
- cx: 12,
811
- cy: 12,
812
- r: 10
813
- }), /* @__PURE__ */ f("path", { d: "m15 9l-6 6m0-6l6 6" })]
814
- })
815
- }), Wt = {
816
- "rc.asyncSelect.loading": "Loading...",
817
- "rc.asyncSelect.noOptions": "No options",
818
- "rc.asyncSelect.noResults": "No results",
819
- "rc.asyncSelect.selectPlaceholder": "Select...",
820
- "rc.combobox.noResults": "No results",
821
- "rc.combobox.selectPlaceholder": "Select...",
822
- "rc.datePicker.pickDate": "Pick date",
823
- "rc.datePicker.placeholder": "Pick date",
824
- "rc.datePicker.selectDate": "Select date",
825
- "rc.dateSelectorMultiple.addDate": "Add date",
826
- "rc.dateSelectorMultiple.dateRange": "Range",
827
- "rc.dateSelectorMultiple.placeholder": "Pick date",
828
- "rc.dateSelectorMultiple.singleDate": "Single",
829
- "rc.fileInput.browseFiles": "Browse files",
830
- "rc.fileInput.dropZone": "Drag files here or click to upload",
831
- "rc.fileInput.filePlaceholder": "File",
832
- "rc.fileInput.imagePlaceholder": "Image",
833
- "rc.fileInput.maxFilesExceeded": (e) => `Maximum ${e} files allowed`,
834
- "rc.fileInput.pending": "Pending",
835
- "rc.fileInput.remove": "Remove",
836
- "rc.fileInput.uploadFailed": "Upload failed",
837
- "rc.fileInput.uploading": "Uploading...",
838
- "rc.monthPickerMultiple.addMonth": "Add month",
839
- "rc.monthPickerMultiple.dateRange": "Range",
840
- "rc.monthPickerMultiple.endDate": "End date",
841
- "rc.monthPickerMultiple.placeholder": "Pick month",
842
- "rc.monthPickerMultiple.singleDate": "Single",
843
- "rc.monthPickerMultiple.startDate": "Start date",
844
- "rc.multiSelect.clear": "Clear all",
845
- "rc.multiSelect.close": "Close",
846
- "rc.multiSelect.moreItems": (e) => `+${e} more`,
847
- "rc.multiSelect.noOptions": "No options",
848
- "rc.multiSelect.noOptionsSelected": "No options selected",
849
- "rc.multiSelect.noResults": "No results",
850
- "rc.multiSelect.optionsCount": (e) => `${e} options`,
851
- "rc.multiSelect.selectAll": "Select all",
852
- "rc.multiSelect.selectPlaceholder": "Select...",
853
- "rc.pagination.next": "Next",
854
- "rc.pagination.previous": "Previous",
855
- "rc.pagination.showing": (e, t, n) => `Showing ${e}-${t} of ${n}`,
856
- "rc.calendar.month.0": "January",
857
- "rc.calendar.month.1": "February",
858
- "rc.calendar.month.2": "March",
859
- "rc.calendar.month.3": "April",
860
- "rc.calendar.month.4": "May",
861
- "rc.calendar.month.5": "June",
862
- "rc.calendar.month.6": "July",
863
- "rc.calendar.month.7": "August",
864
- "rc.calendar.month.8": "September",
865
- "rc.calendar.month.9": "October",
866
- "rc.calendar.month.10": "November",
867
- "rc.calendar.month.11": "December",
868
- "rc.sonamuFilter.title": "Sonamu Filter",
869
- "rc.sonamuFilter.apply": "Apply",
870
- "rc.sonamuFilter.reset": "Reset",
871
- "rc.sonamuFilter.addRule": "Add Rule",
872
- "rc.sonamuFilter.noRulesYet": "No rules yet. Click \"+ Add Rule\" to start.",
873
- "rc.sonamuFilter.selectField": "Select field",
874
- "rc.sonamuFilter.selectOperator": "Operator",
875
- "rc.sonamuFilter.selectOperatorFirst": "Select operator first",
876
- "rc.sonamuFilter.enterValue": "Enter value",
877
- "rc.sonamuFilter.enterNumber": "Enter number",
878
- "rc.sonamuFilter.notSupported": "Not supported",
879
- "rc.sonamuFilter.startDate": "Start date",
880
- "rc.sonamuFilter.endDate": "End date",
881
- "rc.sonamuFilter.appliedFilters": "🌲 Applied SonamuFilters",
882
- "rc.common.cancel": "Cancel",
883
- "rc.common.save": "Save"
884
- }, Gt = (e) => `[SonamuProvider] ${e} is not configured. Please provide ${e} configuration to SonamuProvider.`, Kt = () => () => {
885
- throw Error(Gt("uploader"));
886
- }, qt = () => (e) => Wt[e], Jt = n({});
887
- function Yt({ children: e, authOptions: t, ...n }) {
888
- let r = c(void 0);
889
- t && !r.current && (r.current = T(t));
890
- let i = {
891
- uploader: n.uploader ?? Kt(),
892
- auth: n.auth ?? r.current,
893
- SD: n.SD ?? qt()
894
- };
895
- return /* @__PURE__ */ f(Jt.Provider, {
896
- value: i,
897
- children: e
898
- });
899
- }
900
- function J() {
901
- return i(Jt);
902
- }
903
- //#endregion
904
- //#region ~icons/lucide/search.jsx
905
- var Xt = (e) => /* @__PURE__ */ f("svg", {
906
- viewBox: "0 0 24 24",
907
- width: "1.2em",
908
- height: "1.2em",
909
- ...e,
910
- children: /* @__PURE__ */ p("g", {
911
- fill: "none",
912
- stroke: "currentColor",
913
- strokeLinecap: "round",
914
- strokeLinejoin: "round",
915
- strokeWidth: 2,
916
- children: [/* @__PURE__ */ f("path", { d: "m21 21l-4.34-4.34" }), /* @__PURE__ */ f("circle", {
917
- cx: 11,
918
- cy: 11,
919
- r: 8
920
- })]
921
- })
922
- }), Zt = (e) => /* @__PURE__ */ f("svg", {
923
- viewBox: "0 0 24 24",
924
- width: "1.2em",
925
- height: "1.2em",
926
- ...e,
927
- children: /* @__PURE__ */ f("path", {
928
- fill: "none",
929
- stroke: "currentColor",
930
- strokeLinecap: "round",
931
- strokeLinejoin: "round",
932
- strokeWidth: 2,
933
- d: "M18 6L6 18M6 6l12 12"
934
- })
935
- }), Qt = D.Root, $t = D.Trigger, en = D.Portal, tn = D.Close, nn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(D.Overlay, {
936
- ref: n,
937
- className: G("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", e),
938
- ...t
939
- }));
940
- nn.displayName = D.Overlay.displayName;
941
- var rn = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(en, { children: [/* @__PURE__ */ f(nn, {}), /* @__PURE__ */ p(D.Content, {
942
- ref: r,
943
- className: G("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", e),
944
- ...n,
945
- children: [t, /* @__PURE__ */ p(D.Close, {
946
- className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
947
- children: [/* @__PURE__ */ f(Zt, { className: "h-4 w-4" }), /* @__PURE__ */ f("span", {
948
- className: "sr-only",
949
- children: "Close"
950
- })]
951
- })]
952
- })] }));
953
- rn.displayName = D.Content.displayName;
954
- var an = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
955
- className: G("flex flex-col space-y-1.5 text-center sm:text-left", e),
956
- ...t
957
- });
958
- an.displayName = "DialogHeader";
959
- var on = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
960
- className: G("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e),
961
- ...t
962
- });
963
- on.displayName = "DialogFooter";
964
- var sn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(D.Title, {
965
- ref: n,
966
- className: G("text-lg font-semibold leading-none tracking-tight", e),
967
- ...t
968
- }));
969
- sn.displayName = D.Title.displayName;
970
- var cn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(D.Description, {
971
- ref: n,
972
- className: G("text-sm text-muted-foreground", e),
973
- ...t
974
- }));
975
- cn.displayName = D.Description.displayName;
976
- //#endregion
977
- //#region src/components/ui/command.tsx
978
- var ln = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(E, {
979
- ref: n,
980
- className: G("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", e),
981
- ...t
982
- }));
983
- ln.displayName = E.displayName;
984
- var un = ({ children: e, commandProps: t, ...n }) => {
985
- let { className: r, ...i } = t ?? {};
986
- return /* @__PURE__ */ f(Qt, {
987
- ...n,
988
- children: /* @__PURE__ */ f(rn, {
989
- className: "overflow-hidden p-0 shadow-lg",
990
- children: /* @__PURE__ */ f(ln, {
991
- className: G("**:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 **:[[cmdk-group]]:px-2 **:[[cmdk-input-wrapper]_svg]:size-5 **:[[cmdk-input]]:h-12 **:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3 **:[[cmdk-item]_svg]:size-5", r),
992
- ...i,
993
- children: e
994
- })
995
- })
996
- });
997
- }, dn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ p("div", {
998
- className: "flex items-center border-b px-3",
999
- "cmdk-input-wrapper": "",
1000
- children: [/* @__PURE__ */ f(Xt, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), /* @__PURE__ */ f(E.Input, {
1001
- ref: n,
1002
- className: G("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", e),
1003
- ...t
1004
- })]
1005
- }));
1006
- dn.displayName = E.Input.displayName;
1007
- var fn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(E.List, {
1008
- ref: n,
1009
- className: G("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
1010
- ...t
1011
- }));
1012
- fn.displayName = E.List.displayName;
1013
- var pn = e.forwardRef((e, t) => /* @__PURE__ */ f(E.Empty, {
1014
- ref: t,
1015
- className: "py-6 text-center text-sm",
1016
- ...e
1017
- }));
1018
- pn.displayName = E.Empty.displayName;
1019
- var mn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(E.Group, {
1020
- ref: n,
1021
- className: G("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground", e),
1022
- ...t
1023
- }));
1024
- mn.displayName = E.Group.displayName;
1025
- var hn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(E.Separator, {
1026
- ref: n,
1027
- className: G("-mx-1 h-px bg-border", e),
1028
- ...t
1029
- }));
1030
- hn.displayName = E.Separator.displayName;
1031
- var gn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(E.Item, {
1032
- ref: n,
1033
- className: G("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 **:[svg]:pointer-events-none **:[svg]:size-4 **:[svg]:shrink-0", e),
1034
- ...t
1035
- }));
1036
- gn.displayName = E.Item.displayName;
1037
- var _n = ({ className: e, ...t }) => /* @__PURE__ */ f("span", {
1038
- className: G("ml-auto text-xs tracking-widest text-muted-foreground", e),
1039
- ...t
1040
- });
1041
- _n.displayName = "CommandShortcut";
1042
- //#endregion
1043
- //#region src/components/ui/popover.tsx
1044
- function Y({ ...e }) {
1045
- return /* @__PURE__ */ f(O.Root, {
1046
- "data-slot": "popover",
1047
- ...e
1048
- });
1049
- }
1050
- function X({ ...e }) {
1051
- return /* @__PURE__ */ f(O.Trigger, {
1052
- "data-slot": "popover-trigger",
1053
- ...e
1054
- });
1055
- }
1056
- function Z({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
1057
- return /* @__PURE__ */ f(O.Portal, { children: /* @__PURE__ */ f(O.Content, {
1058
- "data-slot": "popover-content",
1059
- align: t,
1060
- sideOffset: n,
1061
- className: G("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", e),
1062
- ...r
1063
- }) });
1064
- }
1065
- function vn({ ...e }) {
1066
- return /* @__PURE__ */ f(O.Anchor, {
1067
- "data-slot": "popover-anchor",
1068
- ...e
1069
- });
1070
- }
1071
- //#endregion
1072
- //#region src/components/ui/combobox.tsx
1073
- var yn = e.forwardRef(({ options: t, name: n, value: r, onValueChange: i, onBlur: a, placeholder: o, searchPlaceholder: s, emptyText: c, disabled: l = !1, className: u, clearable: m = !1 }, h) => {
1074
- let { SD: g } = J(), [_, v] = e.useState(!1), y = e.useRef(null), b = o ?? g("rc.combobox.selectPlaceholder"), x = s ?? g("common.searchPlaceholder"), S = c ?? g("rc.combobox.noResults");
1075
- e.useImperativeHandle(h, () => y.current);
1076
- let C = (e) => {
1077
- i?.((e === r ? "" : e) || void 0), v(!1);
1078
- }, w = (e) => {
1079
- e.preventDefault(), e.stopPropagation(), i?.(void 0), v(!1);
1080
- }, T = !!r;
1081
- return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("input", {
1082
- type: "hidden",
1083
- ref: y,
1084
- name: n,
1085
- value: r || "",
1086
- onBlur: a
1087
- }), /* @__PURE__ */ p(Y, {
1088
- open: _,
1089
- onOpenChange: v,
1090
- children: [/* @__PURE__ */ f(X, {
1091
- asChild: !0,
1092
- children: /* @__PURE__ */ p(K, {
1093
- variant: "outline",
1094
- role: "combobox",
1095
- "aria-expanded": _,
1096
- disabled: l,
1097
- className: G("w-full justify-between", u),
1098
- children: [/* @__PURE__ */ f("span", {
1099
- className: "flex-1 truncate text-left",
1100
- children: r ? t.find((e) => e.value === r)?.label : b
1101
- }), /* @__PURE__ */ p("div", {
1102
- className: "flex items-center gap-1 shrink-0 pl-2",
1103
- children: [m && T && /* @__PURE__ */ f("span", {
1104
- className: "flex items-center justify-center",
1105
- onMouseDown: (e) => e.stopPropagation(),
1106
- onClick: w,
1107
- children: /* @__PURE__ */ f(Ut, { className: "h-4 w-4 cursor-pointer opacity-50 hover:opacity-100 transition-opacity" })
1108
- }), /* @__PURE__ */ f(Ht, { className: "h-4 w-4 opacity-50" })]
1109
- })]
1110
- })
1111
- }), /* @__PURE__ */ f(Z, {
1112
- className: "w-full p-0",
1113
- children: /* @__PURE__ */ p(ln, { children: [/* @__PURE__ */ f(dn, {
1114
- placeholder: x,
1115
- className: "h-9"
1116
- }), /* @__PURE__ */ p(fn, { children: [/* @__PURE__ */ f(pn, { children: S }), /* @__PURE__ */ f(mn, { children: t.map((e) => /* @__PURE__ */ p(gn, {
1117
- value: e.value,
1118
- onSelect: C,
1119
- children: [e.label, /* @__PURE__ */ f(q, { className: G("ml-auto", r === e.value ? "opacity-100" : "opacity-0") })]
1120
- }, e.value)) })] })] })
1121
- })]
1122
- })] });
1123
- });
1124
- yn.displayName = "Combobox";
1125
- //#endregion
1126
- //#region src/components/ui/common-modal.tsx
1127
- var bn = k({
1128
- open: !1,
1129
- reactNode: null
1130
- });
1131
- function xn({ className: e }) {
1132
- let [t, n] = A(bn), { open: r, reactNode: i, title: o, description: s, className: c, onControlledOpen: l, onControlledClose: u } = t, d = () => {
1133
- u && u(), n({
1134
- open: !1,
1135
- reactNode: null
1136
- });
1137
- };
1138
- return a(() => {
1139
- r && l && l();
1140
- }, [r]), /* @__PURE__ */ f(Qt, {
1141
- open: r,
1142
- onOpenChange: (e) => {
1143
- e || d();
1144
- },
1145
- children: /* @__PURE__ */ p(rn, {
1146
- className: G("max-w-4xl", c, e),
1147
- children: [/* @__PURE__ */ p(an, { children: [/* @__PURE__ */ f(sn, {
1148
- className: o ? void 0 : "sr-only",
1149
- children: o || "Modal"
1150
- }), /* @__PURE__ */ f(cn, {
1151
- className: s ? void 0 : "sr-only",
1152
- children: s || "Modal content"
1153
- })] }), i]
1154
- })
1155
- });
1156
- }
1157
- function Sn() {
1158
- let [e, t] = A(bn), { open: n, reactNode: r, onCompleted: i } = e, a = (e, n) => {
1159
- t({
1160
- open: !0,
1161
- reactNode: e,
1162
- ...n
1163
- });
1164
- }, o = () => {
1165
- t({
1166
- open: !1,
1167
- reactNode: null
1168
- });
1169
- };
1170
- return {
1171
- open: n,
1172
- reactNode: r,
1173
- openModal: a,
1174
- closeModal: o,
1175
- doneModal: (e) => {
1176
- o(), i && i(e);
1177
- }
1178
- };
1179
- }
1180
- //#endregion
1181
- //#region ~icons/lucide/circle.jsx
1182
- var Cn = (e) => /* @__PURE__ */ f("svg", {
1183
- viewBox: "0 0 24 24",
1184
- width: "1.2em",
1185
- height: "1.2em",
1186
- ...e,
1187
- children: /* @__PURE__ */ f("circle", {
1188
- cx: 12,
1189
- cy: 12,
1190
- r: 10,
1191
- fill: "none",
1192
- stroke: "currentColor",
1193
- strokeLinecap: "round",
1194
- strokeLinejoin: "round",
1195
- strokeWidth: 2
1196
- })
1197
- }), wn = j.Root, Tn = j.Trigger, En = j.Group, Dn = j.Portal, On = j.Sub, kn = j.RadioGroup, An = e.forwardRef(({ className: e, inset: t, children: n, ...r }, i) => /* @__PURE__ */ p(j.SubTrigger, {
1198
- ref: i,
1199
- className: G("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", t && "pl-8", e),
1200
- ...r,
1201
- children: [n, /* @__PURE__ */ f(dt, { className: "ml-auto h-4 w-4" })]
1202
- }));
1203
- An.displayName = j.SubTrigger.displayName;
1204
- var jn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(j.SubContent, {
1205
- ref: n,
1206
- className: G("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[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 origin-[--radix-context-menu-content-transform-origin]", e),
1207
- ...t
1208
- }));
1209
- jn.displayName = j.SubContent.displayName;
1210
- var Mn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(j.Portal, { children: /* @__PURE__ */ f(j.Content, {
1211
- ref: n,
1212
- className: G("z-50 max-h-[--radix-context-menu-content-available-height] min-w-32 overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[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 origin-[--radix-context-menu-content-transform-origin]", e),
1213
- ...t
1214
- }) }));
1215
- Mn.displayName = j.Content.displayName;
1216
- var Nn = e.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ f(j.Item, {
1217
- ref: r,
1218
- className: G("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", t && "pl-8", e),
1219
- ...n
1220
- }));
1221
- Nn.displayName = j.Item.displayName;
1222
- var Pn = e.forwardRef(({ className: e, children: t, checked: n, ...r }, i) => /* @__PURE__ */ p(j.CheckboxItem, {
1223
- ref: i,
1224
- className: G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
1225
- checked: n,
1226
- ...r,
1227
- children: [/* @__PURE__ */ f("span", {
1228
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
1229
- children: /* @__PURE__ */ f(j.ItemIndicator, { children: /* @__PURE__ */ f(q, { className: "h-4 w-4" }) })
1230
- }), t]
1231
- }));
1232
- Pn.displayName = j.CheckboxItem.displayName;
1233
- var Fn = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(j.RadioItem, {
1234
- ref: r,
1235
- className: G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
1236
- ...n,
1237
- children: [/* @__PURE__ */ f("span", {
1238
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
1239
- children: /* @__PURE__ */ f(j.ItemIndicator, { children: /* @__PURE__ */ f(Cn, { className: "h-2 w-2 fill-current" }) })
1240
- }), t]
1241
- }));
1242
- Fn.displayName = j.RadioItem.displayName;
1243
- var In = e.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ f(j.Label, {
1244
- ref: r,
1245
- className: G("px-2 py-1.5 text-sm font-semibold text-foreground", t && "pl-8", e),
1246
- ...n
1247
- }));
1248
- In.displayName = j.Label.displayName;
1249
- var Ln = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(j.Separator, {
1250
- ref: n,
1251
- className: G("-mx-1 my-1 h-px bg-border", e),
1252
- ...t
1253
- }));
1254
- Ln.displayName = j.Separator.displayName;
1255
- var Rn = ({ className: e, ...t }) => /* @__PURE__ */ f("span", {
1256
- className: G("ml-auto text-xs tracking-widest text-muted-foreground", e),
1257
- ...t
1258
- });
1259
- Rn.displayName = "ContextMenuShortcut";
1260
- //#endregion
1261
- //#region src/components/ui/input.tsx
1262
- var Q = e.forwardRef(({ className: e, type: t, onValueChange: n, onChange: r, ...i }, a) => {
1263
- let o = (e) => {
1264
- n?.(e.target.value), r?.(e);
1265
- };
1266
- return /* @__PURE__ */ f("input", {
1267
- type: t,
1268
- "data-slot": "input",
1269
- className: G("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base bg-input-background transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", e),
1270
- ref: a,
1271
- ...i,
1272
- onChange: o
1273
- });
1274
- });
1275
- Q.displayName = "Input";
1276
- //#endregion
1277
- //#region src/components/ui/date-input.tsx
1278
- function zn({ value: e, onValueChange: t, ...n }) {
1279
- return /* @__PURE__ */ f(Q, {
1280
- type: "datetime-local",
1281
- value: e ? e instanceof Date ? e.toISOString().slice(0, 16) : new Date(e).toISOString().slice(0, 16) : "",
1282
- onChange: (e) => t(e.target.value ? new Date(e.target.value) : null),
1283
- ...n
1284
- });
1285
- }
1286
- //#endregion
1287
- //#region ~icons/lucide/calendar.jsx
1288
- var Bn = (e) => /* @__PURE__ */ f("svg", {
1289
- viewBox: "0 0 24 24",
1290
- width: "1.2em",
1291
- height: "1.2em",
1292
- ...e,
1293
- children: /* @__PURE__ */ p("g", {
1294
- fill: "none",
1295
- stroke: "currentColor",
1296
- strokeLinecap: "round",
1297
- strokeLinejoin: "round",
1298
- strokeWidth: 2,
1299
- children: [
1300
- /* @__PURE__ */ f("path", { d: "M8 2v4m8-4v4" }),
1301
- /* @__PURE__ */ f("rect", {
1302
- width: 18,
1303
- height: 18,
1304
- x: 3,
1305
- y: 4,
1306
- rx: 2
1307
- }),
1308
- /* @__PURE__ */ f("path", { d: "M3 10h18" })
1309
- ]
1310
- })
1311
- });
1312
- //#endregion
1313
- //#region src/components/ui/date-picker.tsx
1314
- function Vn({ value: e, onValueChange: t, placeholder: n, disabled: r = !1, className: i }) {
1315
- let { SD: a } = J(), o = n ?? a("rc.datePicker.pickDate");
1316
- return /* @__PURE__ */ p(Y, { children: [/* @__PURE__ */ f(X, {
1317
- asChild: !0,
1318
- children: /* @__PURE__ */ p(K, {
1319
- variant: "outline",
1320
- disabled: r,
1321
- "data-empty": !e,
1322
- className: G("w-full justify-start text-left font-normal", "data-[empty=true]:text-muted-foreground", i),
1323
- children: [/* @__PURE__ */ f(Bn, {}), e ? M(e, "PPP") : /* @__PURE__ */ f("span", { children: o })]
1324
- })
1325
- }), /* @__PURE__ */ f(Z, {
1326
- className: "w-auto p-0",
1327
- align: "start",
1328
- children: /* @__PURE__ */ f(xt, {
1329
- mode: "single",
1330
- selected: e,
1331
- onSelect: (e) => {
1332
- t?.(e);
1333
- },
1334
- initialFocus: !0
1335
- })
1336
- })] });
1337
- }
1338
- function Hn({ value: t, onValueChange: n, placeholder: r, disabled: i = !1, className: a }) {
1339
- let { SD: o } = J(), s = r ?? o("rc.datePicker.selectDate"), [c, l] = e.useState(!1);
1340
- return /* @__PURE__ */ p(Y, {
1341
- open: c,
1342
- onOpenChange: l,
1343
- children: [/* @__PURE__ */ f(X, {
1344
- asChild: !0,
1345
- children: /* @__PURE__ */ p(K, {
1346
- variant: "outline",
1347
- disabled: i,
1348
- className: G("w-full justify-between font-normal", !t && "text-muted-foreground", a),
1349
- children: [t ? t.toLocaleDateString() : s, /* @__PURE__ */ f(Bn, {})]
1350
- })
1351
- }), /* @__PURE__ */ f(Z, {
1352
- className: "w-auto overflow-hidden p-0",
1353
- align: "start",
1354
- children: /* @__PURE__ */ f(xt, {
1355
- mode: "single",
1356
- selected: t,
1357
- captionLayout: "dropdown",
1358
- onSelect: (e) => {
1359
- n?.(e), l(!1);
1360
- }
1361
- })
1362
- })]
1363
- });
1364
- }
1365
- function Un({ CalendarIcon: t, value: n, onValueChange: r, placeholder: i = "Pick a date", dateFormat: a = "yyyy/MM/dd", className: o = "", numberOfMonths: s = 2, maxDate: c, minDate: l }) {
1366
- let [u, d] = e.useState(!1), m = e.useMemo(() => {
1367
- if (!n?.from && !n?.to) return i;
1368
- let e = n?.from ? M(n.from, a) : "", t = n?.to ? M(n.to, a) : "";
1369
- return e && t ? `${e} - ${t}` : t ? `- ${t}` : `${e} -`;
1370
- }, [
1371
- n,
1372
- a,
1373
- i
1374
- ]), h = e.useMemo(() => {
1375
- if (!(!c && !l)) return (e) => !!(c && e > c || l && e < l);
1376
- }, [c, l]);
1377
- return /* @__PURE__ */ p(Y, {
1378
- open: u,
1379
- onOpenChange: d,
1380
- children: [/* @__PURE__ */ f(X, {
1381
- asChild: !0,
1382
- children: /* @__PURE__ */ p(K, {
1383
- variant: "outline",
1384
- className: `justify-start gap-2 h-8 px-3 text-xs font-normal ${o}`,
1385
- children: [/* @__PURE__ */ f(t, { className: "h-4 w-4 shrink-0" }), /* @__PURE__ */ f("span", {
1386
- className: "truncate",
1387
- children: m
1388
- })]
1389
- })
1390
- }), /* @__PURE__ */ f(Z, {
1391
- className: "w-auto p-0",
1392
- align: "start",
1393
- children: /* @__PURE__ */ f(xt, {
1394
- mode: "range",
1395
- defaultMonth: n?.from ?? (n?.to ? new Date(n.to.getFullYear(), n.to.getMonth() - 1, 1) : void 0),
1396
- selected: n,
1397
- onSelect: r,
1398
- numberOfMonths: s,
1399
- disabled: h
1400
- })
1401
- })]
1402
- });
1403
- }
1404
- //#endregion
1405
- //#region src/components/ui/drawer.tsx
1406
- var Wn = ({ shouldScaleBackground: e = !0, ...t }) => /* @__PURE__ */ f(N.Root, {
1407
- shouldScaleBackground: e,
1408
- ...t
1409
- });
1410
- Wn.displayName = "Drawer";
1411
- var Gn = N.Trigger, Kn = N.Portal, qn = N.Close, Jn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(N.Overlay, {
1412
- ref: n,
1413
- className: G("fixed inset-0 z-50 bg-black/80", e),
1414
- ...t
1415
- }));
1416
- Jn.displayName = N.Overlay.displayName;
1417
- var Yn = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(Kn, { children: [/* @__PURE__ */ f(Jn, {}), /* @__PURE__ */ p(N.Content, {
1418
- ref: r,
1419
- className: G("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background", e),
1420
- ...n,
1421
- children: [/* @__PURE__ */ f("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }), t]
1422
- })] }));
1423
- Yn.displayName = "DrawerContent";
1424
- var Xn = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
1425
- className: G("grid gap-1.5 p-4 text-center sm:text-left", e),
1426
- ...t
1427
- });
1428
- Xn.displayName = "DrawerHeader";
1429
- var Zn = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
1430
- className: G("mt-auto flex flex-col gap-2 p-4", e),
1431
- ...t
1432
- });
1433
- Zn.displayName = "DrawerFooter";
1434
- var Qn = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(N.Title, {
1435
- ref: n,
1436
- className: G("text-lg font-semibold leading-none tracking-tight", e),
1437
- ...t
1438
- }));
1439
- Qn.displayName = N.Title.displayName;
1440
- var $n = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(N.Description, {
1441
- ref: n,
1442
- className: G("text-sm text-muted-foreground", e),
1443
- ...t
1444
- }));
1445
- $n.displayName = N.Description.displayName;
1446
- //#endregion
1447
- //#region src/components/ui/dropdown-menu.tsx
1448
- var er = P.Root, tr = P.Trigger, nr = P.Group, rr = P.Portal, ir = P.Sub, ar = P.RadioGroup, or = e.forwardRef(({ className: e, inset: t, children: n, ...r }, i) => /* @__PURE__ */ p(P.SubTrigger, {
1449
- ref: i,
1450
- className: G("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", t && "pl-8", e),
1451
- ...r,
1452
- children: [n, /* @__PURE__ */ f(dt, { className: "ml-auto" })]
1453
- }));
1454
- or.displayName = P.SubTrigger.displayName;
1455
- var sr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(P.SubContent, {
1456
- ref: n,
1457
- className: G("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[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 origin-[--radix-dropdown-menu-content-transform-origin]", e),
1458
- ...t
1459
- }));
1460
- sr.displayName = P.SubContent.displayName;
1461
- var cr = e.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ f(P.Portal, { children: /* @__PURE__ */ f(P.Content, {
1462
- ref: r,
1463
- sideOffset: t,
1464
- className: G("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-32 overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[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 origin-[--radix-dropdown-menu-content-transform-origin]", e),
1465
- ...n
1466
- }) }));
1467
- cr.displayName = P.Content.displayName;
1468
- var lr = e.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ f(P.Item, {
1469
- ref: r,
1470
- className: G("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", t && "pl-8", e),
1471
- ...n
1472
- }));
1473
- lr.displayName = P.Item.displayName;
1474
- var ur = e.forwardRef(({ className: e, children: t, checked: n, ...r }, i) => /* @__PURE__ */ p(P.CheckboxItem, {
1475
- ref: i,
1476
- className: G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
1477
- checked: n,
1478
- ...r,
1479
- children: [/* @__PURE__ */ f("span", {
1480
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
1481
- children: /* @__PURE__ */ f(P.ItemIndicator, { children: /* @__PURE__ */ f(q, { className: "h-4 w-4" }) })
1482
- }), t]
1483
- }));
1484
- ur.displayName = P.CheckboxItem.displayName;
1485
- var dr = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(P.RadioItem, {
1486
- ref: r,
1487
- className: G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
1488
- ...n,
1489
- children: [/* @__PURE__ */ f("span", {
1490
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
1491
- children: /* @__PURE__ */ f(P.ItemIndicator, { children: /* @__PURE__ */ f(Cn, { className: "h-2 w-2 fill-current" }) })
1492
- }), t]
1493
- }));
1494
- dr.displayName = P.RadioItem.displayName;
1495
- var fr = e.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ f(P.Label, {
1496
- ref: r,
1497
- className: G("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
1498
- ...n
1499
- }));
1500
- fr.displayName = P.Label.displayName;
1501
- var pr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(P.Separator, {
1502
- ref: n,
1503
- className: G("-mx-1 my-1 h-px bg-muted", e),
1504
- ...t
1505
- }));
1506
- pr.displayName = P.Separator.displayName;
1507
- var mr = ({ className: e, ...t }) => /* @__PURE__ */ f("span", {
1508
- className: G("ml-auto text-xs tracking-widest opacity-60", e),
1509
- ...t
1510
- });
1511
- mr.displayName = "DropdownMenuShortcut";
1512
- //#endregion
1513
- //#region ~icons/lucide/image.jsx
1514
- var hr = (e) => /* @__PURE__ */ f("svg", {
1515
- viewBox: "0 0 24 24",
1516
- width: "1.2em",
1517
- height: "1.2em",
1518
- ...e,
1519
- children: /* @__PURE__ */ p("g", {
1520
- fill: "none",
1521
- stroke: "currentColor",
1522
- strokeLinecap: "round",
1523
- strokeLinejoin: "round",
1524
- strokeWidth: 2,
1525
- children: [
1526
- /* @__PURE__ */ f("rect", {
1527
- width: 18,
1528
- height: 18,
1529
- x: 3,
1530
- y: 3,
1531
- rx: 2,
1532
- ry: 2
1533
- }),
1534
- /* @__PURE__ */ f("circle", {
1535
- cx: 9,
1536
- cy: 9,
1537
- r: 2
1538
- }),
1539
- /* @__PURE__ */ f("path", { d: "m21 15l-3.086-3.086a2 2 0 0 0-2.828 0L6 21" })
1540
- ]
1541
- })
1542
- }), gr = (e) => /* @__PURE__ */ f("svg", {
1543
- viewBox: "0 0 24 24",
1544
- width: "1.2em",
1545
- height: "1.2em",
1546
- ...e,
1547
- children: /* @__PURE__ */ f("path", {
1548
- fill: "none",
1549
- stroke: "currentColor",
1550
- strokeLinecap: "round",
1551
- strokeLinejoin: "round",
1552
- strokeWidth: 2,
1553
- d: "M21 12a9 9 0 1 1-6.219-8.56"
1554
- })
1555
- }), _r = (e) => /* @__PURE__ */ f("svg", {
1556
- viewBox: "0 0 24 24",
1557
- width: "1.2em",
1558
- height: "1.2em",
1559
- ...e,
1560
- children: /* @__PURE__ */ f("path", {
1561
- fill: "none",
1562
- stroke: "currentColor",
1563
- strokeLinecap: "round",
1564
- strokeLinejoin: "round",
1565
- strokeWidth: 2,
1566
- d: "M12 3v12m5-7l-5-5l-5 5m14 7v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
1567
- })
1568
- });
1569
- //#endregion
1570
- //#region src/components/ui/file-input.tsx
1571
- function vr(e) {
1572
- let t = e.split(".");
1573
- return t.length < 2 ? "" : t[t.length - 1].toLowerCase();
1574
- }
1575
- var yr = {
1576
- sm: 14,
1577
- md: 18,
1578
- lg: 22,
1579
- xl: 26
1580
- };
1581
- function br({ filename: e, size: t = "md" }) {
1582
- let n = vr(e), r = n && n in ee ? ee[n] : {};
1583
- return /* @__PURE__ */ f("div", {
1584
- className: "shrink-0 self-center",
1585
- style: {
1586
- width: yr[t],
1587
- marginTop: -2
1588
- },
1589
- children: /* @__PURE__ */ f(F, {
1590
- extension: n || void 0,
1591
- ...r
1592
- })
1593
- });
1594
- }
1595
- var xr = {
1596
- sm: "w-20 h-20",
1597
- md: "w-32 h-32",
1598
- lg: "w-40 h-40",
1599
- xl: "w-48 h-48"
1600
- }, Sr = {
1601
- sm: "w-48 h-12",
1602
- md: "w-80 h-16",
1603
- lg: "w-96 h-20",
1604
- xl: "w-[28rem] h-24"
1605
- };
1606
- function Cr(e) {
1607
- let { placeholder: t, disabled: n = !1, className: i, previewSize: a = "md", uploadMode: o, viewMode: s, uploadParams: u, onBlur: m } = e, { uploader: h, SD: g } = J(), _ = e.multiple ?? !1, v = s === "image", y = e.accept ?? (v ? "image/*" : "*/*"), b = c(null), [x, S] = l(!1), [C, w] = l(!1), T = t ?? `${g(v ? "rc.fileInput.imagePlaceholder" : "rc.fileInput.filePlaceholder")} URL${_ ? "S" : ""}`, E = (() => {
1608
- if (!_) {
1609
- let t = e.value;
1610
- return t ? [t] : [];
1611
- }
1612
- return e.value || [];
1613
- })(), D = E.filter((e) => e instanceof File), O = Le(D), k = E.map((e) => e instanceof File ? {
1614
- url: O[D.indexOf(e)],
1615
- name: e.name,
1616
- isPending: !0
1617
- } : {
1618
- url: e.url,
1619
- name: e.name,
1620
- isPending: !1
1621
- }), A = _ ? e.maxFiles ?? 10 : 1, j = E.length, M = j < A, N = r(async (t) => {
1622
- if (t.length === 0 || n) return;
1623
- let r = A - j;
1624
- if (r <= 0) {
1625
- alert(g("rc.fileInput.maxFilesExceeded")(A));
1626
- return;
1627
- }
1628
- let i = t.slice(0, r);
1629
- if (o === "eager") {
1630
- S(!0);
1631
- try {
1632
- let t = await h(i, u);
1633
- if (_) {
1634
- let n = [...E, ...t];
1635
- e.onValueChange?.(n);
1636
- } else e.onValueChange?.(t[0]);
1637
- } catch (e) {
1638
- console.error("Upload failed:", e), alert(g("rc.fileInput.uploadFailed"));
1639
- } finally {
1640
- S(!1);
1641
- }
1642
- } else if (_) {
1643
- let t = [...E, ...i];
1644
- e.onValueChange?.(t);
1645
- } else e.onValueChange?.(i[0]);
1646
- }, [
1647
- n,
1648
- j,
1649
- A,
1650
- _,
1651
- o,
1652
- u,
1653
- E,
1654
- e,
1655
- h
1656
- ]), P = r((e) => {
1657
- N(Array.from(e.target.files || [])), b.current && (b.current.value = "");
1658
- }, [N]), F = r((e) => {
1659
- e.preventDefault(), w(!1), !(n || x) && N(Array.from(e.dataTransfer.files));
1660
- }, [
1661
- N,
1662
- n,
1663
- x
1664
- ]), ee = r((t) => (n) => {
1665
- if (n.stopPropagation(), !_) e.onValueChange?.(null);
1666
- else {
1667
- let n = E.filter((e, n) => n !== t);
1668
- e.onValueChange?.(n);
1669
- }
1670
- }, [
1671
- E,
1672
- _,
1673
- e.onValueChange
1674
- ]), te = () => {
1675
- !n && !x && b.current?.click();
1676
- }, I = v ? xr : Sr;
1677
- if (!_ && k.length > 0) {
1678
- let e = k[0];
1679
- return /* @__PURE__ */ p("div", {
1680
- className: G("relative inline-block", i),
1681
- children: [/* @__PURE__ */ f("input", {
1682
- ref: b,
1683
- type: "file",
1684
- accept: y,
1685
- onChange: P,
1686
- onBlur: m,
1687
- disabled: n || x,
1688
- className: "sr-only"
1689
- }), /* @__PURE__ */ f("div", {
1690
- onClick: te,
1691
- onDrop: F,
1692
- onDragOver: (e) => {
1693
- e.preventDefault(), !n && !x && w(!0);
1694
- },
1695
- onDragLeave: (e) => {
1696
- e.preventDefault(), w(!1);
1697
- },
1698
- className: G("relative flex items-center justify-center rounded-lg border-2 cursor-pointer transition-all", I[a], v ? "border-transparent" : "border-dashed border-muted-foreground/25 hover:border-muted-foreground/50", C && "border-primary bg-primary/5", n && "opacity-50 cursor-not-allowed", x && "cursor-wait"),
1699
- children: x ? /* @__PURE__ */ p("div", {
1700
- className: "flex flex-col items-center gap-2 text-muted-foreground",
1701
- children: [/* @__PURE__ */ f(gr, { className: "h-6 w-6 animate-spin" }), /* @__PURE__ */ f("span", {
1702
- className: "text-xs",
1703
- children: g("rc.fileInput.uploading")
1704
- })]
1705
- }) : /* @__PURE__ */ p(d, { children: [
1706
- v ? /* @__PURE__ */ f("img", {
1707
- src: e.url,
1708
- alt: "Preview",
1709
- className: "h-full w-full object-cover rounded-lg overflow-hidden"
1710
- }) : /* @__PURE__ */ p("div", {
1711
- className: "flex items-center gap-2 px-3 h-full w-full min-w-0 overflow-hidden",
1712
- children: [
1713
- /* @__PURE__ */ f(br, {
1714
- filename: e.name,
1715
- size: a
1716
- }),
1717
- /* @__PURE__ */ f("span", {
1718
- className: G("text-xs truncate min-w-0", e.isPending ? "w-[140px] shrink-0" : "flex-1"),
1719
- children: e.name
1720
- }),
1721
- e.isPending && /* @__PURE__ */ f("span", {
1722
- className: "px-2 py-0.5 bg-yellow-500/90 text-white text-xs rounded whitespace-nowrap shrink-0",
1723
- children: g("rc.fileInput.pending")
1724
- })
1725
- ]
1726
- }),
1727
- !n && /* @__PURE__ */ f(K, {
1728
- type: "button",
1729
- variant: "destructive",
1730
- size: "xs",
1731
- className: "absolute -top-2 -right-2 h-6 w-6 rounded-full p-0",
1732
- onClick: ee(0),
1733
- icon: /* @__PURE__ */ f(Zt, {})
1734
- }),
1735
- v && e.isPending && /* @__PURE__ */ f("div", {
1736
- className: "absolute bottom-2 left-2 right-2 mx-auto max-w-[calc(100%-1rem)] px-2 py-1 bg-yellow-500/90 text-white text-xs rounded text-center truncate",
1737
- children: g("rc.fileInput.pending")
1738
- })
1739
- ] })
1740
- })]
1741
- });
1742
- }
1743
- return /* @__PURE__ */ p("div", {
1744
- className: G("flex flex-wrap gap-3", i),
1745
- children: [
1746
- /* @__PURE__ */ f("input", {
1747
- ref: b,
1748
- type: "file",
1749
- accept: y,
1750
- multiple: _,
1751
- onChange: P,
1752
- onBlur: m,
1753
- disabled: n || x,
1754
- className: "sr-only"
1755
- }),
1756
- k.map((e, t) => /* @__PURE__ */ p("div", {
1757
- className: G("relative", I[a]),
1758
- children: [
1759
- v ? /* @__PURE__ */ f("div", {
1760
- className: "h-full w-full rounded-lg border overflow-hidden",
1761
- children: /* @__PURE__ */ f("img", {
1762
- src: e.url,
1763
- alt: `Uploaded ${t + 1}`,
1764
- className: "h-full w-full object-cover"
1765
- })
1766
- }) : /* @__PURE__ */ p("div", {
1767
- className: G("relative flex items-center gap-2 px-3 rounded-lg border-2 min-w-0 overflow-hidden", "border-dashed border-muted-foreground/25", "h-full w-full"),
1768
- children: [
1769
- /* @__PURE__ */ f(br, {
1770
- filename: e.name,
1771
- size: a
1772
- }),
1773
- /* @__PURE__ */ f("span", {
1774
- className: G("text-xs truncate min-w-0", e.isPending ? "w-[140px] shrink-0" : "flex-1"),
1775
- children: e.name
1776
- }),
1777
- e.isPending && /* @__PURE__ */ f("span", {
1778
- className: "px-2 py-0.5 bg-yellow-500/90 text-white text-xs rounded whitespace-nowrap shrink-0",
1779
- children: g("rc.fileInput.pending")
1780
- })
1781
- ]
1782
- }),
1783
- !n && /* @__PURE__ */ f(K, {
1784
- type: "button",
1785
- variant: "destructive",
1786
- size: "xs",
1787
- className: "absolute -top-2 -right-2 h-6 w-6 rounded-full p-0",
1788
- onClick: ee(t),
1789
- icon: /* @__PURE__ */ f(Zt, {})
1790
- }),
1791
- v && e.isPending && /* @__PURE__ */ f("div", {
1792
- className: "absolute bottom-2 left-2 right-2 mx-auto max-w-[calc(100%-1rem)] px-2 py-1 bg-yellow-500/90 text-white text-xs rounded text-center truncate",
1793
- children: g("rc.fileInput.pending")
1794
- })
1795
- ]
1796
- }, `${e.url}-${t}`)),
1797
- M && /* @__PURE__ */ f("div", {
1798
- onClick: te,
1799
- onDrop: F,
1800
- onDragOver: (e) => {
1801
- e.preventDefault(), !n && !x && w(!0);
1802
- },
1803
- onDragLeave: (e) => {
1804
- e.preventDefault(), w(!1);
1805
- },
1806
- className: G("flex items-center justify-center rounded-lg border-2 border-dashed cursor-pointer transition-all", I[a], C ? "border-primary bg-primary/5" : "border-muted-foreground/25 hover:border-muted-foreground/50", n && "opacity-50 cursor-not-allowed", x && "cursor-wait"),
1807
- children: x ? /* @__PURE__ */ p("div", {
1808
- className: "flex flex-col items-center gap-2 text-muted-foreground",
1809
- children: [/* @__PURE__ */ f(gr, { className: "h-6 w-6 animate-spin" }), /* @__PURE__ */ f("span", {
1810
- className: "text-xs",
1811
- children: g("rc.fileInput.uploading")
1812
- })]
1813
- }) : /* @__PURE__ */ p("div", {
1814
- className: "flex flex-col items-center gap-2 text-muted-foreground p-2",
1815
- children: [f(v ? hr : _r, { className: "h-6 w-6" }), /* @__PURE__ */ f("span", {
1816
- className: "text-xs text-center",
1817
- children: T
1818
- })]
1819
- })
1820
- })
1821
- ]
1822
- });
1823
- }
1824
- //#endregion
1825
- //#region src/components/ui/label.tsx
1826
- var wr = g("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"), Tr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(re.Root, {
1827
- ref: n,
1828
- className: G(wr(), e),
1829
- ...t
1830
- }));
1831
- Tr.displayName = re.Root.displayName;
1832
- //#endregion
1833
- //#region src/components/ui/form.tsx
1834
- var Er = I, Dr = e.createContext(null), Or = ({ ...e }) => /* @__PURE__ */ f(Dr.Provider, {
1835
- value: { name: e.name },
1836
- children: /* @__PURE__ */ f(te, { ...e })
1837
- }), kr = () => {
1838
- let t = e.useContext(Dr), n = e.useContext(Ar), { getFieldState: r, formState: i } = ne();
1839
- if (!t) throw Error("useFormField should be used within <FormField>");
1840
- if (!n) throw Error("useFormField should be used within <FormItem>");
1841
- let a = r(t.name, i), { id: o } = n;
1842
- return {
1843
- id: o,
1844
- name: t.name,
1845
- formItemId: `${o}-form-item`,
1846
- formDescriptionId: `${o}-form-item-description`,
1847
- formMessageId: `${o}-form-item-message`,
1848
- ...a
1849
- };
1850
- }, Ar = e.createContext(null), jr = e.forwardRef(({ className: t, ...n }, r) => {
1851
- let i = e.useId();
1852
- return /* @__PURE__ */ f(Ar.Provider, {
1853
- value: { id: i },
1854
- children: /* @__PURE__ */ f("div", {
1855
- ref: r,
1856
- className: G("space-y-2", t),
1857
- ...n
1858
- })
1859
- });
1860
- });
1861
- jr.displayName = "FormItem";
1862
- var Mr = e.forwardRef(({ className: e, ...t }, n) => {
1863
- let { error: r, formItemId: i } = kr();
1864
- return /* @__PURE__ */ f(Tr, {
1865
- ref: n,
1866
- className: G(r && "text-destructive", e),
1867
- htmlFor: i,
1868
- ...t
1869
- });
1870
- });
1871
- Mr.displayName = "FormLabel";
1872
- var Nr = e.forwardRef(({ ...e }, t) => {
1873
- let { error: n, formItemId: r, formDescriptionId: i, formMessageId: a } = kr();
1874
- return /* @__PURE__ */ f(v, {
1875
- ref: t,
1876
- id: r,
1877
- "aria-describedby": n ? `${i} ${a}` : `${i}`,
1878
- "aria-invalid": !!n,
1879
- ...e
1880
- });
1881
- });
1882
- Nr.displayName = "FormControl";
1883
- var Pr = e.forwardRef(({ className: e, ...t }, n) => {
1884
- let { formDescriptionId: r } = kr();
1885
- return /* @__PURE__ */ f("p", {
1886
- ref: n,
1887
- id: r,
1888
- className: G("text-sm text-muted-foreground", e),
1889
- ...t
1890
- });
1891
- });
1892
- Pr.displayName = "FormDescription";
1893
- var Fr = e.forwardRef(({ className: e, children: t, ...n }, r) => {
1894
- let { error: i, formMessageId: a } = kr(), o = i ? String(i?.message ?? "") : t;
1895
- return o ? /* @__PURE__ */ f("p", {
1896
- ref: r,
1897
- id: a,
1898
- className: G("text-sm font-medium text-destructive", e),
1899
- ...n,
1900
- children: o
1901
- }) : null;
1902
- });
1903
- Fr.displayName = "FormMessage";
1904
- //#endregion
1905
- //#region src/components/ui/hover-card.tsx
1906
- var Ir = ie.Root, Lr = ie.Trigger, Rr = e.forwardRef(({ className: e, align: t = "center", sideOffset: n = 4, ...r }, i) => /* @__PURE__ */ f(ie.Content, {
1907
- ref: i,
1908
- align: t,
1909
- sideOffset: n,
1910
- className: G("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[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 origin-[--radix-hover-card-content-transform-origin]", e),
1911
- ...r
1912
- }));
1913
- Rr.displayName = ie.Content.displayName;
1914
- //#endregion
1915
- //#region ~icons/lucide/dot.jsx
1916
- var zr = (e) => /* @__PURE__ */ f("svg", {
1917
- viewBox: "0 0 24 24",
1918
- width: "1.2em",
1919
- height: "1.2em",
1920
- ...e,
1921
- children: /* @__PURE__ */ f("circle", {
1922
- cx: 12.1,
1923
- cy: 12.1,
1924
- r: 1,
1925
- fill: "none",
1926
- stroke: "currentColor",
1927
- strokeLinecap: "round",
1928
- strokeLinejoin: "round",
1929
- strokeWidth: 2
1930
- })
1931
- }), Br = e.forwardRef(({ className: e, containerClassName: t, ...n }, r) => /* @__PURE__ */ f(ae, {
1932
- ref: r,
1933
- containerClassName: G("flex items-center gap-2 has-[:disabled]:opacity-50", t),
1934
- className: G("disabled:cursor-not-allowed", e),
1935
- ...n
1936
- }));
1937
- Br.displayName = "InputOTP";
1938
- var Vr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("div", {
1939
- ref: n,
1940
- className: G("flex items-center", e),
1941
- ...t
1942
- }));
1943
- Vr.displayName = "InputOTPGroup";
1944
- var Hr = e.forwardRef(({ index: t, className: n, ...r }, i) => {
1945
- let { char: a, hasFakeCaret: o, isActive: s } = e.useContext(oe).slots[t];
1946
- return /* @__PURE__ */ p("div", {
1947
- ref: i,
1948
- className: G("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md", s && "z-10 ring-2 ring-ring ring-offset-background", n),
1949
- ...r,
1950
- children: [a, o && /* @__PURE__ */ f("div", {
1951
- className: "pointer-events-none absolute inset-0 flex items-center justify-center",
1952
- children: /* @__PURE__ */ f("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" })
1953
- })]
1954
- });
1955
- });
1956
- Hr.displayName = "InputOTPSlot";
1957
- var Ur = e.forwardRef(({ ...e }, t) => /* @__PURE__ */ f("div", {
1958
- ref: t,
1959
- role: "separator",
1960
- ...e,
1961
- children: /* @__PURE__ */ f(zr, {})
1962
- }));
1963
- Ur.displayName = "InputOTPSeparator";
1964
- //#endregion
1965
- //#region src/components/ui/menubar.tsx
1966
- function Wr({ ...e }) {
1967
- return /* @__PURE__ */ f(L.Menu, { ...e });
1968
- }
1969
- function Gr({ ...e }) {
1970
- return /* @__PURE__ */ f(L.Group, { ...e });
1971
- }
1972
- function Kr({ ...e }) {
1973
- return /* @__PURE__ */ f(L.Portal, { ...e });
1974
- }
1975
- function qr({ ...e }) {
1976
- return /* @__PURE__ */ f(L.RadioGroup, { ...e });
1977
- }
1978
- function Jr({ ...e }) {
1979
- return /* @__PURE__ */ f(L.Sub, {
1980
- "data-slot": "menubar-sub",
1981
- ...e
1982
- });
1983
- }
1984
- var Yr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(L.Root, {
1985
- ref: n,
1986
- className: G("flex h-10 items-center space-x-1 rounded-md border bg-background p-1", e),
1987
- ...t
1988
- }));
1989
- Yr.displayName = L.Root.displayName;
1990
- var Xr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(L.Trigger, {
1991
- ref: n,
1992
- className: G("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", e),
1993
- ...t
1994
- }));
1995
- Xr.displayName = L.Trigger.displayName;
1996
- var Zr = e.forwardRef(({ className: e, inset: t, children: n, ...r }, i) => /* @__PURE__ */ p(L.SubTrigger, {
1997
- ref: i,
1998
- className: G("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", t && "pl-8", e),
1999
- ...r,
2000
- children: [n, /* @__PURE__ */ f(dt, { className: "ml-auto h-4 w-4" })]
2001
- }));
2002
- Zr.displayName = L.SubTrigger.displayName;
2003
- var Qr = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(L.SubContent, {
2004
- ref: n,
2005
- className: G("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[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 origin-[--radix-menubar-content-transform-origin]", e),
2006
- ...t
2007
- }));
2008
- Qr.displayName = L.SubContent.displayName;
2009
- var $r = e.forwardRef(({ className: e, align: t = "start", alignOffset: n = -4, sideOffset: r = 8, ...i }, a) => /* @__PURE__ */ f(L.Portal, { children: /* @__PURE__ */ f(L.Content, {
2010
- ref: a,
2011
- align: t,
2012
- alignOffset: n,
2013
- sideOffset: r,
2014
- className: G("z-50 min-w-48 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[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 origin-[--radix-menubar-content-transform-origin]", e),
2015
- ...i
2016
- }) }));
2017
- $r.displayName = L.Content.displayName;
2018
- var ei = e.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ f(L.Item, {
2019
- ref: r,
2020
- className: G("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", t && "pl-8", e),
2021
- ...n
2022
- }));
2023
- ei.displayName = L.Item.displayName;
2024
- var ti = e.forwardRef(({ className: e, children: t, checked: n, ...r }, i) => /* @__PURE__ */ p(L.CheckboxItem, {
2025
- ref: i,
2026
- className: G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
2027
- checked: n,
2028
- ...r,
2029
- children: [/* @__PURE__ */ f("span", {
2030
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
2031
- children: /* @__PURE__ */ f(L.ItemIndicator, { children: /* @__PURE__ */ f(q, { className: "h-4 w-4" }) })
2032
- }), t]
2033
- }));
2034
- ti.displayName = L.CheckboxItem.displayName;
2035
- var ni = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(L.RadioItem, {
2036
- ref: r,
2037
- className: G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", e),
2038
- ...n,
2039
- children: [/* @__PURE__ */ f("span", {
2040
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
2041
- children: /* @__PURE__ */ f(L.ItemIndicator, { children: /* @__PURE__ */ f(Cn, { className: "h-2 w-2 fill-current" }) })
2042
- }), t]
2043
- }));
2044
- ni.displayName = L.RadioItem.displayName;
2045
- var ri = e.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ f(L.Label, {
2046
- ref: r,
2047
- className: G("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
2048
- ...n
2049
- }));
2050
- ri.displayName = L.Label.displayName;
2051
- var ii = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(L.Separator, {
2052
- ref: n,
2053
- className: G("-mx-1 my-1 h-px bg-muted", e),
2054
- ...t
2055
- }));
2056
- ii.displayName = L.Separator.displayName;
2057
- var ai = ({ className: e, ...t }) => /* @__PURE__ */ f("span", {
2058
- className: G("ml-auto text-xs tracking-widest text-muted-foreground", e),
2059
- ...t
2060
- });
2061
- ai.displayname = "MenubarShortcut";
2062
- //#endregion
2063
- //#region src/components/ui/separator.tsx
2064
- var oi = e.forwardRef(({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }, i) => /* @__PURE__ */ f(se.Root, {
2065
- ref: i,
2066
- decorative: n,
2067
- orientation: t,
2068
- className: G("shrink-0 bg-border", t === "horizontal" ? "h-px w-full" : "h-full w-px", e),
2069
- ...r
2070
- }));
2071
- oi.displayName = se.Root.displayName;
2072
- //#endregion
2073
- //#region src/components/ui/select/select.tsx
2074
- function si(e) {
2075
- return typeof e == "object" && !!e && "value" in e;
2076
- }
2077
- function ci(e, t) {
2078
- let n = e.multiple === !0, i = e.async === !0, u = c(null);
2079
- o(t, () => u.current);
2080
- let [d, f] = l(!1), [p, m] = l(""), [h, g] = l(/* @__PURE__ */ new Map()), _ = i && "onOpenChange" in e ? e.onOpenChange : void 0, v = c(d);
2081
- a(() => {
2082
- v.current !== d && (_ && _(d), v.current = d);
2083
- }, [d, _]);
2084
- let y = r((t) => t == null ? "" : e.valueKey ? e.valueKey(t) : String(t), [e.valueKey]), b = s(() => e.items.map((e) => si(e) ? e : { value: e }), [e.items]), x = s(() => {
2085
- let e = /* @__PURE__ */ new Map();
2086
- for (let t of b) e.set(y(t.value), t.value);
2087
- return e;
2088
- }, [b, y]), S = r((t) => {
2089
- if (e.renderItem) return e.renderItem(t);
2090
- let n = b.find((e) => e.value === t);
2091
- if (n?.label !== void 0) return n.label;
2092
- if (i) {
2093
- let e = h.get(y(t));
2094
- if (e?.label !== void 0) return e.label;
2095
- }
2096
- return String(t);
2097
- }, [
2098
- e.renderItem,
2099
- b,
2100
- i,
2101
- h,
2102
- y
2103
- ]);
2104
- a(() => {
2105
- if (!i) return;
2106
- let t = n ? e.value : [e.value].filter(Boolean), r = /* @__PURE__ */ new Map();
2107
- for (let e of t) {
2108
- let t = y(e), n = b.find((t) => t.value === e);
2109
- n && r.set(t, n);
2110
- }
2111
- g(r);
2112
- }, [
2113
- i,
2114
- n,
2115
- e,
2116
- b,
2117
- y
2118
- ]);
2119
- let C = r((e) => {
2120
- m(e);
2121
- }, []), w = i && "onSearch" in e ? e.onSearch : void 0, T = i && "searchDebounce" in e && e.searchDebounce !== void 0 ? e.searchDebounce : 300;
2122
- a(() => {
2123
- if (!w) return;
2124
- let e = setTimeout(() => {
2125
- w(p);
2126
- }, p === "" ? 0 : T);
2127
- return () => clearTimeout(e);
2128
- }, [
2129
- p,
2130
- w,
2131
- T
2132
- ]);
2133
- let E = s(() => {
2134
- if (i) {
2135
- let e = /* @__PURE__ */ new Map();
2136
- for (let [t, n] of h) e.set(t, n);
2137
- for (let t of b) e.set(y(t.value), t);
2138
- return Array.from(e.values());
2139
- } else return p ? b.filter((e) => {
2140
- let t = S(e.value);
2141
- return String(t).toLowerCase().includes(p.toLowerCase());
2142
- }) : b;
2143
- }, [
2144
- i,
2145
- b,
2146
- h,
2147
- p,
2148
- y,
2149
- S
2150
- ]);
2151
- return a(() => {
2152
- d || m("");
2153
- }, [d]), {
2154
- isMultiple: n,
2155
- isAsync: i,
2156
- selectRef: u,
2157
- isPopoverOpen: d,
2158
- setIsPopoverOpen: f,
2159
- searchValue: p,
2160
- handleSearchChange: C,
2161
- filteredOptions: E,
2162
- normalizedItems: b,
2163
- getKeyForValue: y,
2164
- valueByKey: x,
2165
- getItemLabel: S
2166
- };
2167
- }
2168
- function li(e, t) {
2169
- if (!t || typeof e != "string") return e;
2170
- let n = e.toLowerCase(), r = t.toLowerCase(), i = n.indexOf(r);
2171
- if (i === -1) return e;
2172
- let a = e.slice(0, i), o = e.slice(i, i + t.length), s = e.slice(i + t.length);
2173
- return /* @__PURE__ */ p(d, { children: [
2174
- a,
2175
- /* @__PURE__ */ f("strong", {
2176
- className: "font-bold",
2177
- children: o
2178
- }),
2179
- s
2180
- ] });
2181
- }
2182
- function ui({ props: e, isMultiple: t, isAsync: n, isPopoverOpen: i, setIsPopoverOpen: o, searchValue: s, handleSearchChange: c, filteredOptions: u, getKeyForValue: m, getItemLabel: h }) {
2183
- let { SD: g } = J(), [_, v] = l(null), y = r((e) => {
2184
- v(e);
2185
- }, []), [b, x] = l(null), S = r((e) => {
2186
- x(e);
2187
- }, []), C = n && "onLoadMore" in e ? e.onLoadMore : void 0, w = n && "hasMore" in e ? e.hasMore ?? !1 : !1, T = n && "isLoadingMore" in e ? e.isLoadingMore ?? !1 : !1, E = n && C !== void 0;
2188
- a(() => {
2189
- if (!C || !w || T || !b || !_) return;
2190
- let e = new IntersectionObserver((e) => {
2191
- for (let t of e) t.isIntersecting && C();
2192
- }, {
2193
- root: _,
2194
- threshold: 0
2195
- });
2196
- return e.observe(b), () => e.disconnect();
2197
- }, [
2198
- b,
2199
- _,
2200
- C,
2201
- w,
2202
- T
2203
- ]);
2204
- let D = e.searchable ?? n, O = r((e) => {
2205
- let t = _;
2206
- if (!t) return;
2207
- let n = t.scrollTop < t.scrollHeight - t.clientHeight, r = t.scrollTop > 0;
2208
- (e.deltaY > 0 && n || e.deltaY < 0 && r) && e.stopPropagation();
2209
- }, [_]), k = r((n) => {
2210
- if (!e.disabled) if (t) {
2211
- let t = e.value, r = t.includes(n) ? t.filter((e) => e !== n) : [...t, n];
2212
- e.onValueChange(r);
2213
- } else e.onValueChange?.(n), o(!1);
2214
- }, [
2215
- t,
2216
- e,
2217
- o
2218
- ]), A = r(() => {
2219
- if (!t || e.disabled) return;
2220
- let n = u.filter((e) => !e.disabled);
2221
- if (e.value.length === n.length) e.onValueChange([]);
2222
- else {
2223
- let t = n.map((e) => e.value);
2224
- e.onValueChange(t);
2225
- }
2226
- }, [
2227
- t,
2228
- e,
2229
- u
2230
- ]), j = r(() => {
2231
- e.disabled || (t ? e.onValueChange([]) : e.onValueChange?.(void 0));
2232
- }, [t, e]), M = r((n) => t ? e.value.includes(n) : e.value === n, [t, e]), N = n && "loading" in e ? e.loading : !1, P = n && "error" in e ? e.error : void 0, F = t ? e.value.length > 0 : e.value !== void 0 && e.value !== null && e.value !== "", ee = () => {
2233
- if (!t) return null;
2234
- let n = e.value;
2235
- return /* @__PURE__ */ f(d, { children: n.map((e) => {
2236
- let t = m(e);
2237
- return /* @__PURE__ */ p(ut, {
2238
- variant: "outline",
2239
- className: "m-1 transition-all duration-300 ease-in-out",
2240
- children: [h(e), /* @__PURE__ */ f(Ut, {
2241
- className: "ml-2 h-3 w-3 cursor-pointer !pointer-events-auto",
2242
- onPointerDownCapture: (e) => {
2243
- e.stopPropagation();
2244
- },
2245
- onMouseDownCapture: (e) => {
2246
- e.stopPropagation();
2247
- },
2248
- onClick: (t) => {
2249
- t.stopPropagation(), k(e);
2250
- }
2251
- })]
2252
- }, t);
2253
- }) });
2254
- };
2255
- return /* @__PURE__ */ p(Y, {
2256
- open: i,
2257
- onOpenChange: o,
2258
- children: [/* @__PURE__ */ f(X, {
2259
- asChild: !0,
2260
- children: /* @__PURE__ */ f(K, {
2261
- variant: "outline",
2262
- role: "combobox",
2263
- "aria-expanded": i,
2264
- disabled: e.disabled || N,
2265
- className: G("flex p-1 rounded-md border border-input min-h-10 h-auto items-center justify-between bg-white hover:bg-white hover:text-inherit [&_svg]:pointer-events-auto w-full", e.className),
2266
- children: t && F ? /* @__PURE__ */ p("div", {
2267
- className: "flex justify-between items-center w-full",
2268
- children: [/* @__PURE__ */ f("div", {
2269
- className: "flex items-center gap-1 flex-wrap",
2270
- children: ee()
2271
- }), /* @__PURE__ */ p("div", {
2272
- className: "flex items-center justify-between",
2273
- children: [
2274
- e.clearable && /* @__PURE__ */ f("div", {
2275
- role: "button",
2276
- tabIndex: 0,
2277
- onPointerDownCapture: (e) => {
2278
- e.stopPropagation();
2279
- },
2280
- onMouseDownCapture: (e) => {
2281
- e.stopPropagation();
2282
- },
2283
- onClick: (e) => {
2284
- e.stopPropagation(), j();
2285
- },
2286
- className: "flex items-center justify-center h-4 w-4 mx-2 cursor-pointer text-muted-foreground hover:text-foreground",
2287
- children: /* @__PURE__ */ f(Zt, { className: "h-4 w-4" })
2288
- }),
2289
- /* @__PURE__ */ f(oi, {
2290
- orientation: "vertical",
2291
- className: "flex min-h-6 h-full"
2292
- }),
2293
- /* @__PURE__ */ f(Fe, { className: "h-4 mx-2 cursor-pointer text-muted-foreground" })
2294
- ]
2295
- })]
2296
- }) : !t && F ? /* @__PURE__ */ p("div", {
2297
- className: "flex justify-between items-center w-full px-2 py-1",
2298
- children: [(() => {
2299
- let t = e.value;
2300
- return t == null ? null : /* @__PURE__ */ f("span", {
2301
- className: "flex-1 truncate text-left text-sm",
2302
- children: h(t)
2303
- });
2304
- })(), /* @__PURE__ */ p("div", {
2305
- className: "flex items-center gap-1 shrink-0",
2306
- children: [e.clearable && F && /* @__PURE__ */ f(Ut, {
2307
- className: "h-4 w-4 cursor-pointer opacity-50 hover:opacity-100 transition-opacity",
2308
- onPointerDownCapture: j,
2309
- onMouseDownCapture: j
2310
- }), /* @__PURE__ */ f(Fe, { className: "h-4 w-4 opacity-50" })]
2311
- })]
2312
- }) : /* @__PURE__ */ p("div", {
2313
- className: "flex items-center justify-between w-full px-2 py-1",
2314
- children: [/* @__PURE__ */ f("span", {
2315
- className: "text-sm text-muted-foreground flex-1 truncate text-left",
2316
- children: e.placeholder
2317
- }), /* @__PURE__ */ f(Fe, { className: "h-4 cursor-pointer text-muted-foreground" })]
2318
- })
2319
- })
2320
- }), /* @__PURE__ */ f(Z, {
2321
- className: "min-w-40 p-0",
2322
- align: "start",
2323
- style: { width: "var(--radix-popover-trigger-width)" },
2324
- children: /* @__PURE__ */ p(ln, {
2325
- shouldFilter: !1,
2326
- children: [D && /* @__PURE__ */ f(dn, {
2327
- placeholder: g("common.searchPlaceholder"),
2328
- value: s,
2329
- onValueChange: c
2330
- }), /* @__PURE__ */ f(fn, {
2331
- ref: y,
2332
- onWheel: O,
2333
- children: N ? /* @__PURE__ */ f(pn, { children: /* @__PURE__ */ f("div", {
2334
- className: "flex items-center justify-center",
2335
- children: /* @__PURE__ */ f(gr, { className: "h-4 w-4 animate-spin mr-2" })
2336
- }) }) : P ? /* @__PURE__ */ p(pn, { children: ["Error: ", P.message] }) : u.length === 0 ? /* @__PURE__ */ f(pn, { children: g("rc.multiSelect.noResults") }) : /* @__PURE__ */ p(d, { children: [
2337
- t && !("hideSelectAll" in e && e.hideSelectAll) && /* @__PURE__ */ f(mn, { children: /* @__PURE__ */ p(gn, {
2338
- onSelect: A,
2339
- className: "cursor-pointer",
2340
- children: [/* @__PURE__ */ f("div", {
2341
- className: G("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary", e.value.length === u.filter((e) => !e.disabled).length ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"),
2342
- children: /* @__PURE__ */ f(q, { className: "h-4 w-4" })
2343
- }), /* @__PURE__ */ p("span", { children: [
2344
- "(",
2345
- g("rc.multiSelect.selectAll"),
2346
- ")"
2347
- ] })]
2348
- }) }),
2349
- /* @__PURE__ */ f(mn, { children: u.map((e) => {
2350
- let n = m(e.value), r = M(e.value);
2351
- return /* @__PURE__ */ p(gn, {
2352
- onSelect: () => k(e.value),
2353
- disabled: e.disabled,
2354
- className: G("cursor-pointer", e.disabled && "opacity-50 cursor-not-allowed"),
2355
- children: [
2356
- t && /* @__PURE__ */ f("div", {
2357
- className: G("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary", r ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"),
2358
- children: /* @__PURE__ */ f(q, { className: "h-4 w-4" })
2359
- }),
2360
- !t && /* @__PURE__ */ f(q, { className: G("mr-2 h-4 w-4", r ? "opacity-100" : "opacity-0") }),
2361
- /* @__PURE__ */ f("span", { children: li(h(e.value), s) })
2362
- ]
2363
- }, n);
2364
- }) }),
2365
- E && /* @__PURE__ */ f("div", {
2366
- ref: S,
2367
- className: "flex items-center justify-center py-2 text-xs text-muted-foreground",
2368
- children: T ? /* @__PURE__ */ f(gr, { className: "h-3 w-3 animate-spin" }) : null
2369
- })
2370
- ] })
2371
- })]
2372
- })
2373
- })]
2374
- });
2375
- }
2376
- var $ = e.forwardRef(function(e, t) {
2377
- let n = ci(e, t);
2378
- return /* @__PURE__ */ f(ui, {
2379
- props: e,
2380
- isMultiple: n.isMultiple,
2381
- isAsync: n.isAsync,
2382
- isPopoverOpen: n.isPopoverOpen,
2383
- setIsPopoverOpen: n.setIsPopoverOpen,
2384
- searchValue: n.searchValue,
2385
- handleSearchChange: n.handleSearchChange,
2386
- filteredOptions: n.filteredOptions,
2387
- getKeyForValue: n.getKeyForValue,
2388
- getItemLabel: n.getItemLabel
2389
- });
2390
- }), di = [
2391
- "Jan",
2392
- "Feb",
2393
- "Mar",
2394
- "Apr",
2395
- "May",
2396
- "Jun",
2397
- "Jul",
2398
- "Aug",
2399
- "Sep",
2400
- "Oct",
2401
- "Nov",
2402
- "Dec"
2403
- ];
2404
- function fi({ CalendarIcon: t, ChevronDownIcon: n, value: r, onValueChange: i, placeholder: a, dateFormat: o = "MMM/yyyy", className: s = "", yearRange: c = {
2405
- start: 2020,
2406
- end: 2030
2407
- }, defaultRangeMode: l = !1 }) {
2408
- let { SD: u } = J(), [d, m] = e.useState(!1), [h, g] = e.useState(l), [_, v] = e.useState(), [y, b] = e.useState(), [x, S] = e.useState((/* @__PURE__ */ new Date()).getFullYear()), [C, w] = e.useState((/* @__PURE__ */ new Date()).getFullYear()), [T, E] = e.useState((/* @__PURE__ */ new Date()).getFullYear()), D = e.useMemo(() => Array.from({ length: c.end - c.start + 1 }, (e, t) => c.start + t), [c.start, c.end]);
2409
- e.useEffect(() => {
2410
- d && (r?.type === "range" ? (g(!0), b({
2411
- from: r.from,
2412
- to: r.to
2413
- }), v(void 0), w(r.from.getFullYear()), E(r.to.getFullYear())) : r?.type === "single" ? (g(!1), v(r.date), b(void 0), S(r.date.getFullYear())) : (g(l), v(void 0), b(void 0), S((/* @__PURE__ */ new Date()).getFullYear()), w((/* @__PURE__ */ new Date()).getFullYear()), E((/* @__PURE__ */ new Date()).getFullYear())));
2414
- }, [
2415
- d,
2416
- r,
2417
- l
2418
- ]);
2419
- let O = () => r ? r.type === "single" ? M(r.date, o) : `${M(r.from, o)} - ${M(r.to, o)}` : a ?? `- ${M(/* @__PURE__ */ new Date(), o)}`, k = (e) => {
2420
- g(e), e ? v(void 0) : b(void 0);
2421
- };
2422
- return /* @__PURE__ */ f("div", {
2423
- className: "flex items-center gap-4",
2424
- children: /* @__PURE__ */ p(Y, {
2425
- open: d,
2426
- onOpenChange: m,
2427
- children: [/* @__PURE__ */ f(X, {
2428
- asChild: !0,
2429
- children: /* @__PURE__ */ p(K, {
2430
- variant: "outline",
2431
- className: `gap-2 h-8 text-xs ${s}`,
2432
- children: [
2433
- /* @__PURE__ */ f(t, { className: "h-4 w-4" }),
2434
- O(),
2435
- /* @__PURE__ */ f(n, { className: "h-4 w-4" })
2436
- ]
2437
- })
2438
- }), /* @__PURE__ */ p(Z, {
2439
- className: "w-auto p-0",
2440
- align: "start",
2441
- children: [
2442
- /* @__PURE__ */ f("div", {
2443
- className: "p-3 border-b space-y-2",
2444
- children: /* @__PURE__ */ p("div", {
2445
- className: "flex gap-2",
2446
- children: [/* @__PURE__ */ f(K, {
2447
- variant: h ? "outline" : "default",
2448
- size: "sm",
2449
- onClick: () => k(!1),
2450
- className: "flex-1 h-7 text-xs",
2451
- children: u("rc.monthPickerMultiple.singleDate")
2452
- }), /* @__PURE__ */ f(K, {
2453
- variant: h ? "default" : "outline",
2454
- size: "sm",
2455
- onClick: () => k(!0),
2456
- className: "flex-1 h-7 text-xs",
2457
- children: u("rc.monthPickerMultiple.dateRange")
2458
- })]
2459
- })
2460
- }),
2461
- h ? /* @__PURE__ */ p("div", {
2462
- className: "flex",
2463
- children: [
2464
- /* @__PURE__ */ p("div", {
2465
- className: "p-4 space-y-2",
2466
- children: [
2467
- /* @__PURE__ */ f("div", {
2468
- className: "text-xs text-muted-foreground",
2469
- children: u("rc.monthPickerMultiple.startDate")
2470
- }),
2471
- /* @__PURE__ */ f($, {
2472
- value: C,
2473
- onValueChange: (e) => {
2474
- e !== void 0 && w(e);
2475
- },
2476
- items: D.map((e) => ({
2477
- value: e,
2478
- label: String(e),
2479
- disabled: y?.to ? e > y.to.getFullYear() : !1
2480
- })),
2481
- className: "h-8 text-xs"
2482
- }),
2483
- /* @__PURE__ */ f("div", {
2484
- className: "grid grid-cols-3 gap-2",
2485
- children: di.map((e, t) => {
2486
- let n = y?.to ? C > y.to.getFullYear() || C === y.to.getFullYear() && t > y.to.getMonth() : !1;
2487
- return /* @__PURE__ */ f(K, {
2488
- variant: y?.from?.getMonth() === t && y?.from?.getFullYear() === C ? "default" : "outline",
2489
- size: "sm",
2490
- onClick: () => {
2491
- let e = new Date(C, t, 1);
2492
- y?.from?.getMonth() === t && y?.from?.getFullYear() === C ? b({
2493
- from: void 0,
2494
- to: y?.to
2495
- }) : b({
2496
- from: e,
2497
- to: y?.to
2498
- });
2499
- },
2500
- disabled: n,
2501
- className: "h-8 text-xs",
2502
- children: e
2503
- }, e);
2504
- })
2505
- })
2506
- ]
2507
- }),
2508
- /* @__PURE__ */ f("div", { className: "border-r" }),
2509
- /* @__PURE__ */ p("div", {
2510
- className: "p-4 space-y-2",
2511
- children: [
2512
- /* @__PURE__ */ f("div", {
2513
- className: "text-xs text-muted-foreground",
2514
- children: u("rc.monthPickerMultiple.endDate")
2515
- }),
2516
- /* @__PURE__ */ f($, {
2517
- value: T,
2518
- onValueChange: (e) => {
2519
- e !== void 0 && E(e);
2520
- },
2521
- items: D.map((e) => ({
2522
- value: e,
2523
- label: String(e),
2524
- disabled: y?.from ? e < y.from.getFullYear() : !1
2525
- })),
2526
- className: "h-8 text-xs"
2527
- }),
2528
- /* @__PURE__ */ f("div", {
2529
- className: "grid grid-cols-3 gap-2",
2530
- children: di.map((e, t) => {
2531
- let n = y?.from ? T < y.from.getFullYear() || T === y.from.getFullYear() && t < y.from.getMonth() : !1;
2532
- return /* @__PURE__ */ f(K, {
2533
- variant: y?.to?.getMonth() === t && y?.to?.getFullYear() === T ? "default" : "outline",
2534
- size: "sm",
2535
- onClick: () => {
2536
- let e = new Date(T, t, 1);
2537
- y?.to?.getMonth() === t && y?.to?.getFullYear() === T ? b({
2538
- from: y?.from,
2539
- to: void 0
2540
- }) : b({
2541
- from: y?.from,
2542
- to: e
2543
- });
2544
- },
2545
- disabled: n,
2546
- className: "h-8 text-xs",
2547
- children: e
2548
- }, e);
2549
- })
2550
- })
2551
- ]
2552
- })
2553
- ]
2554
- }) : /* @__PURE__ */ p("div", {
2555
- className: "p-4 space-y-2",
2556
- children: [/* @__PURE__ */ f($, {
2557
- value: x,
2558
- onValueChange: (e) => {
2559
- e !== void 0 && S(e);
2560
- },
2561
- items: D.map((e) => ({
2562
- value: e,
2563
- label: String(e)
2564
- })),
2565
- className: "h-8 text-xs"
2566
- }), /* @__PURE__ */ f("div", {
2567
- className: "grid grid-cols-3 gap-2",
2568
- children: di.map((e, t) => /* @__PURE__ */ f(K, {
2569
- variant: _?.getMonth() === t && _?.getFullYear() === x ? "default" : "outline",
2570
- size: "sm",
2571
- onClick: () => {
2572
- let e = new Date(x, t, 1);
2573
- _?.getMonth() === t && _?.getFullYear() === x ? v(void 0) : v(e);
2574
- },
2575
- className: "h-8 text-xs",
2576
- children: e
2577
- }, e))
2578
- })]
2579
- }),
2580
- /* @__PURE__ */ p("div", {
2581
- className: "p-3 border-t flex justify-end gap-2",
2582
- children: [/* @__PURE__ */ f(K, {
2583
- variant: "outline",
2584
- size: "sm",
2585
- onClick: () => {
2586
- m(!1);
2587
- },
2588
- className: "h-8 text-xs",
2589
- children: u("rc.common.cancel")
2590
- }), /* @__PURE__ */ f(K, {
2591
- variant: "default",
2592
- size: "sm",
2593
- onClick: () => {
2594
- let e;
2595
- h && y?.from && y?.to ? e = {
2596
- type: "range",
2597
- from: y.from,
2598
- to: y.to
2599
- } : !h && _ && (e = {
2600
- type: "single",
2601
- date: _
2602
- }), i?.(e), m(!1);
2603
- },
2604
- className: "h-8 text-xs",
2605
- children: u("rc.common.save")
2606
- })]
2607
- })
2608
- ]
2609
- })]
2610
- })
2611
- });
2612
- }
2613
- //#endregion
2614
- //#region src/components/ui/navigation-menu.tsx
2615
- var pi = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(R.Root, {
2616
- ref: r,
2617
- className: G("relative z-10 flex max-w-max flex-1 items-center justify-center", e),
2618
- ...n,
2619
- children: [t, /* @__PURE__ */ f(bi, {})]
2620
- }));
2621
- pi.displayName = R.Root.displayName;
2622
- var mi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(R.List, {
2623
- ref: n,
2624
- className: G("group flex flex-1 list-none items-center justify-center space-x-1", e),
2625
- ...t
2626
- }));
2627
- mi.displayName = R.List.displayName;
2628
- var hi = R.Item, gi = g("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent"), _i = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(R.Trigger, {
2629
- ref: r,
2630
- className: G(gi(), "group", e),
2631
- ...n,
2632
- children: [
2633
- t,
2634
- " ",
2635
- /* @__PURE__ */ f(Fe, {
2636
- className: "relative top-px ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180",
2637
- "aria-hidden": "true"
2638
- })
2639
- ]
2640
- }));
2641
- _i.displayName = R.Trigger.displayName;
2642
- var vi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(R.Content, {
2643
- ref: n,
2644
- className: G("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out 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 md:absolute md:w-auto ", e),
2645
- ...t
2646
- }));
2647
- vi.displayName = R.Content.displayName;
2648
- var yi = R.Link, bi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f("div", {
2649
- className: G("absolute left-0 top-full flex justify-center"),
2650
- children: /* @__PURE__ */ f(R.Viewport, {
2651
- className: G("origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-(--radix-navigation-menu-viewport-width)", e),
2652
- ref: n,
2653
- ...t
2654
- })
2655
- }));
2656
- bi.displayName = R.Viewport.displayName;
2657
- var xi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(R.Indicator, {
2658
- ref: n,
2659
- className: G("top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in", e),
2660
- ...t,
2661
- children: /* @__PURE__ */ f("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
2662
- }));
2663
- xi.displayName = R.Indicator.displayName;
2664
- //#endregion
2665
- //#region src/components/ui/pagination.tsx
2666
- var Si = e.forwardRef(({ value: e, onValueChange: t, total: n, itemsPerPage: r, className: i, maxVisible: a = 6 }, o) => {
2667
- let { SD: s } = J(), c = Math.ceil(n / r), l = e, u = (l - 1) * r + 1, d = Math.min(l * r, n);
2668
- return /* @__PURE__ */ p("div", {
2669
- ref: o,
2670
- className: G("flex items-center justify-between pt-6", i),
2671
- children: [/* @__PURE__ */ f("div", {
2672
- className: "text-xs text-muted-foreground",
2673
- children: s("rc.pagination.showing")(u, d, n)
2674
- }), /* @__PURE__ */ p("div", {
2675
- className: "flex items-center gap-2",
2676
- children: [
2677
- /* @__PURE__ */ f(K, {
2678
- variant: "outline",
2679
- size: "sm",
2680
- className: "h-8 px-3 text-xs",
2681
- disabled: l === 1,
2682
- onClick: () => t(l - 1),
2683
- children: s("rc.pagination.previous")
2684
- }),
2685
- /* @__PURE__ */ f("div", {
2686
- className: "flex items-center gap-1",
2687
- children: (() => {
2688
- let e = Math.max(1, l - Math.floor(a / 2)), n = Math.min(c, e + a - 1);
2689
- return n - e + 1 < a && (e = Math.max(1, n - a + 1)), Array.from({ length: n - e + 1 }, (t, n) => e + n).map((e) => /* @__PURE__ */ f(K, {
2690
- variant: "outline",
2691
- size: "sm",
2692
- className: `h-8 w-8 text-xs ${e === l ? "bg-primary text-primary-foreground" : ""}`,
2693
- onClick: () => t(e),
2694
- children: e
2695
- }, e));
2696
- })()
2697
- }),
2698
- /* @__PURE__ */ f(K, {
2699
- variant: "outline",
2700
- size: "sm",
2701
- className: "h-8 px-3 text-xs",
2702
- disabled: l === c,
2703
- onClick: () => t(l + 1),
2704
- children: s("rc.pagination.next")
2705
- })
2706
- ]
2707
- })]
2708
- });
2709
- });
2710
- Si.displayName = "Pagination";
2711
- //#endregion
2712
- //#region src/components/ui/progress.tsx
2713
- var Ci = e.forwardRef(({ className: e, value: t, ...n }, r) => /* @__PURE__ */ f(ce.Root, {
2714
- ref: r,
2715
- className: G("relative h-4 w-full overflow-hidden rounded-full bg-secondary", e),
2716
- ...n,
2717
- children: /* @__PURE__ */ f(ce.Indicator, {
2718
- className: "h-full w-full flex-1 bg-primary transition-all",
2719
- style: { transform: `translateX(-${100 - (t || 0)}%)` }
2720
- })
2721
- }));
2722
- Ci.displayName = ce.Root.displayName;
2723
- //#endregion
2724
- //#region src/components/ui/radio-group.tsx
2725
- var wi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(z.Root, {
2726
- className: G("grid gap-2", e),
2727
- ...t,
2728
- ref: n
2729
- }));
2730
- wi.displayName = z.Root.displayName;
2731
- var Ti = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(z.Item, {
2732
- ref: n,
2733
- className: G("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", e),
2734
- ...t,
2735
- children: /* @__PURE__ */ f(z.Indicator, {
2736
- className: "flex items-center justify-center",
2737
- children: /* @__PURE__ */ f("div", { className: "h-2 w-2 rounded-full bg-current" })
2738
- })
2739
- }));
2740
- Ti.displayName = z.Item.displayName;
2741
- //#endregion
2742
- //#region src/components/ui/range-number-input.tsx
2743
- function Ei({ value: e = [void 0, void 0], onChange: t, placeholder: n = ["최소값", "최대값"], disabled: r, className: i }) {
2744
- let [a, o] = e;
2745
- return /* @__PURE__ */ p("div", {
2746
- className: `flex items-center gap-2 ${i}`,
2747
- children: [
2748
- /* @__PURE__ */ f(Q, {
2749
- type: "number",
2750
- value: a === void 0 ? "" : String(a),
2751
- onValueChange: (e) => {
2752
- let n = e === "" ? void 0 : Number(e);
2753
- t?.([n, o]);
2754
- },
2755
- placeholder: n[0],
2756
- disabled: r,
2757
- className: "flex-1"
2758
- }),
2759
- /* @__PURE__ */ f("span", {
2760
- className: "text-muted-foreground",
2761
- children: "~"
2762
- }),
2763
- /* @__PURE__ */ f(Q, {
2764
- type: "number",
2765
- value: o === void 0 ? "" : String(o),
2766
- onValueChange: (e) => {
2767
- let n = e === "" ? void 0 : Number(e);
2768
- t?.([a, n]);
2769
- },
2770
- placeholder: n[1],
2771
- disabled: r,
2772
- className: "flex-1"
2773
- })
2774
- ]
2775
- });
2776
- }
2777
- //#endregion
2778
- //#region ~icons/lucide/grip-vertical.jsx
2779
- var Di = (e) => /* @__PURE__ */ f("svg", {
2780
- viewBox: "0 0 24 24",
2781
- width: "1.2em",
2782
- height: "1.2em",
2783
- ...e,
2784
- children: /* @__PURE__ */ p("g", {
2785
- fill: "none",
2786
- stroke: "currentColor",
2787
- strokeLinecap: "round",
2788
- strokeLinejoin: "round",
2789
- strokeWidth: 2,
2790
- children: [
2791
- /* @__PURE__ */ f("circle", {
2792
- cx: 9,
2793
- cy: 12,
2794
- r: 1
2795
- }),
2796
- /* @__PURE__ */ f("circle", {
2797
- cx: 9,
2798
- cy: 5,
2799
- r: 1
2800
- }),
2801
- /* @__PURE__ */ f("circle", {
2802
- cx: 9,
2803
- cy: 19,
2804
- r: 1
2805
- }),
2806
- /* @__PURE__ */ f("circle", {
2807
- cx: 15,
2808
- cy: 12,
2809
- r: 1
2810
- }),
2811
- /* @__PURE__ */ f("circle", {
2812
- cx: 15,
2813
- cy: 5,
2814
- r: 1
2815
- }),
2816
- /* @__PURE__ */ f("circle", {
2817
- cx: 15,
2818
- cy: 19,
2819
- r: 1
2820
- })
2821
- ]
2822
- })
2823
- }), Oi = ({ className: e, ...t }) => /* @__PURE__ */ f(le.PanelGroup, {
2824
- className: G("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", e),
2825
- ...t
2826
- }), ki = le.Panel, Ai = ({ withHandle: e, className: t, ...n }) => /* @__PURE__ */ f(le.PanelResizeHandle, {
2827
- className: G("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90", t),
2828
- ...n,
2829
- children: e && /* @__PURE__ */ f("div", {
2830
- className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",
2831
- children: /* @__PURE__ */ f(Di, { className: "h-2.5 w-2.5" })
2832
- })
2833
- }), ji = e.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ p(B.Root, {
2834
- ref: r,
2835
- className: G("relative overflow-hidden", e),
2836
- ...n,
2837
- children: [
2838
- /* @__PURE__ */ f(B.Viewport, {
2839
- className: "h-full w-full rounded-[inherit]",
2840
- children: t
2841
- }),
2842
- /* @__PURE__ */ f(Mi, {}),
2843
- /* @__PURE__ */ f(B.Corner, {})
2844
- ]
2845
- }));
2846
- ji.displayName = B.Root.displayName;
2847
- var Mi = e.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ f(B.ScrollAreaScrollbar, {
2848
- ref: r,
2849
- orientation: t,
2850
- className: G("flex touch-none select-none transition-colors", t === "vertical" && "h-full w-2.5 border-l border-l-transparent p-px", t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-px", e),
2851
- ...n,
2852
- children: /* @__PURE__ */ f(B.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
2853
- }));
2854
- Mi.displayName = B.ScrollAreaScrollbar.displayName;
2855
- //#endregion
2856
- //#region src/components/ui/select/enum-select.tsx
2857
- function Ni({ enum: t, labels: n, value: r, onValueChange: i, placeholder: a, textPrefix: o = "", clearable: s = !1, disabled: c = !1, className: l, multiple: u = !1 }) {
2858
- let d = e.useMemo(() => t.options.filter((e) => e !== ""), [t]), p = e.useMemo(() => d.map((e) => ({
2859
- value: e,
2860
- label: o + n[e]
2861
- })), [
2862
- d,
2863
- n,
2864
- o
2865
- ]);
2866
- return u ? /* @__PURE__ */ f($, {
2867
- items: p,
2868
- value: r ?? [],
2869
- onValueChange: (e) => {
2870
- i?.(e);
2871
- },
2872
- placeholder: a,
2873
- clearable: s,
2874
- disabled: c,
2875
- className: l,
2876
- multiple: !0,
2877
- async: !1
2878
- }) : /* @__PURE__ */ f($, {
2879
- items: p,
2880
- value: r ?? "",
2881
- onValueChange: (e) => {
2882
- i?.(e);
2883
- },
2884
- placeholder: a,
2885
- clearable: s,
2886
- disabled: c,
2887
- className: l,
2888
- multiple: !1,
2889
- async: !1
2890
- });
2891
- }
2892
- //#endregion
2893
- //#region src/components/ui/select/id-async-select.tsx
2894
- var Pi = [
2895
- "name",
2896
- "title",
2897
- "label",
2898
- "display_name",
2899
- "username"
2900
- ];
2901
- function Fi(e) {
2902
- for (let t of Pi) if (Object.keys(e).includes(t)) return t;
2903
- for (let [t, n] of Object.entries(e)) if (t !== "id" && typeof n == "string") return t;
2904
- return "id";
2905
- }
2906
- function Ii({ config: e, subset: t, baseListParams: n, displayField: i, valueField: o = "id", placeholder: u, clearable: d, disabled: p, className: m, multiple: h = !1, preload: g = !1, searchable: _, value: v, onValueChange: y, onRowChange: b }) {
2907
- let { SD: x } = J(), S = ue(), C = typeof i == "function", w = r((e) => {
2908
- if (C) return i(e);
2909
- let t = typeof i == "string" ? i : Fi(e);
2910
- return String(e[t] ?? "");
2911
- }, [i, C]), [T, E] = l(void 0), D = r((e) => {
2912
- E(e || void 0);
2913
- }, []), O = (e) => e == null || e === "" ? !1 : typeof e == "number" ? e !== 0 && !Number.isNaN(e) : !0, k = new Set([
2914
- "search",
2915
- "orderBy",
2916
- "queryMode",
2917
- "num",
2918
- "page",
2919
- "keyword"
2920
- ]), A = n && Object.entries(n).some(([e, t]) => !k.has(e) && O(t)), j = g || A, M = {
2921
- ...n,
2922
- ...T ? { keyword: T } : {}
2923
- }, N = j || typeof T == "string" && T.length > 0 || h && Array.isArray(v) && v.length > 0, P = e.useListInfinite(t, M, { enabled: N }), F = P.data?.rows ?? [], ee = P.isLoading, te = P.error ?? void 0, I = !h && O(v) ? v : null, ne = s(() => F.find((e) => e[o] === I), [
2924
- F,
2925
- I,
2926
- o
2927
- ]), re = I !== null && !ne, ie = e.useList(t, {
2928
- id: I,
2929
- num: 1,
2930
- page: 1
2931
- }, { enabled: re }), ae = ie.data?.rows?.[0] || ne, oe = h && Array.isArray(v) ? v : [], L = s(() => oe.map((e) => F.find((t) => t[o] === e)).filter(Boolean), [
2932
- F,
2933
- oe,
2934
- o
2935
- ]), se = s(() => {
2936
- let e = new Set(L.map((e) => e?.[o]));
2937
- return oe.filter((t) => !e.has(t));
2938
- }, [
2939
- oe,
2940
- L,
2941
- o
2942
- ]), R = se.length > 0, ce = e.useList(t, {
2943
- id: se,
2944
- num: se.length,
2945
- page: 1
2946
- }, { enabled: R }), z = s(() => {
2947
- let e = ce.data?.rows ?? [];
2948
- return [...L, ...e];
2949
- }, [L, ce.data]), le = ee || re && ie.isLoading || R && ce.isLoading, B = r(() => {
2950
- S.resetQueries({ predicate: (e) => {
2951
- let n = e.queryKey;
2952
- return Array.isArray(n) && n[2] === "infinite" && n[3] === t;
2953
- } });
2954
- }, [S, t]), V = r((e) => {
2955
- S.removeQueries({ predicate: (n) => {
2956
- let r = n.queryKey;
2957
- return !Array.isArray(r) || r[2] !== "infinite" || r[3] !== t ? !1 : r[4]?.keyword === e;
2958
- } });
2959
- }, [S, t]), de = c(void 0);
2960
- a(() => {
2961
- let e = de.current;
2962
- e !== T && V(e), de.current = T;
2963
- }, [T, V]);
2964
- let fe = r((e) => {
2965
- e || B();
2966
- }, [B]), pe = r(() => {
2967
- P.hasNextPage && !P.isFetchingNextPage && P.fetchNextPage();
2968
- }, [P]), { items: me, rowMap: he } = s(() => {
2969
- let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
2970
- if (!h && ae && I !== null && (e.set(I, ae), t.set(I, {
2971
- value: I,
2972
- label: w(ae)
2973
- })), h && z.length > 0) for (let n of z) {
2974
- let r = n[o];
2975
- e.set(r, n), t.set(r, {
2976
- value: r,
2977
- label: w(n)
2978
- });
2979
- }
2980
- for (let n of F) {
2981
- let r = n[o];
2982
- e.set(r, n), t.set(r, {
2983
- value: r,
2984
- label: w(n)
2985
- });
2986
- }
2987
- return {
2988
- items: Array.from(t.values()),
2989
- rowMap: e
2990
- };
2991
- }, [
2992
- F,
2993
- ae,
2994
- I,
2995
- z,
2996
- h,
2997
- w,
2998
- o
2999
- ]), ge = (e) => String(e), H = !!P.hasNextPage, _e = !!P.isFetchingNextPage, ve = _ ?? !j;
3000
- return h ? /* @__PURE__ */ f($, {
3001
- items: me,
3002
- valueKey: ge,
3003
- value: v ?? [],
3004
- onValueChange: (e) => {
3005
- y?.(e), b?.(e.map((e) => he.get(e)).filter(Boolean));
3006
- },
3007
- placeholder: u ?? x(e.placeholderKey),
3008
- clearable: d,
3009
- disabled: p,
3010
- className: m,
3011
- multiple: !0,
3012
- async: !0,
3013
- searchable: ve,
3014
- loading: le,
3015
- error: te,
3016
- onSearch: D,
3017
- onOpenChange: fe,
3018
- onLoadMore: pe,
3019
- hasMore: H,
3020
- isLoadingMore: _e
3021
- }) : /* @__PURE__ */ f($, {
3022
- items: me,
3023
- valueKey: ge,
3024
- value: I ?? void 0,
3025
- onValueChange: (e) => {
3026
- y?.(e), b?.(e ? he.get(e) : void 0);
3027
- },
3028
- placeholder: u ?? x(e.placeholderKey),
3029
- clearable: d,
3030
- disabled: p,
3031
- className: m,
3032
- multiple: !1,
3033
- async: !0,
3034
- searchable: ve,
3035
- loading: le,
3036
- error: te,
3037
- onSearch: D,
3038
- onOpenChange: fe,
3039
- onLoadMore: pe,
3040
- hasMore: H,
3041
- isLoadingMore: _e
3042
- });
3043
- }
3044
- //#endregion
3045
- //#region src/components/ui/sheet.tsx
3046
- var Li = D.Root, Ri = D.Trigger, zi = D.Close, Bi = D.Portal, Vi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(D.Overlay, {
3047
- className: G("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", e),
3048
- ...t,
3049
- ref: n
3050
- }));
3051
- Vi.displayName = D.Overlay.displayName;
3052
- var Hi = g("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500", {
3053
- variants: { side: {
3054
- top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
3055
- bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
3056
- left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
3057
- right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
3058
- } },
3059
- defaultVariants: { side: "right" }
3060
- }), Ui = e.forwardRef(({ side: e = "right", className: t, children: n, ...r }, i) => /* @__PURE__ */ p(Bi, { children: [/* @__PURE__ */ f(Vi, {}), /* @__PURE__ */ p(D.Content, {
3061
- ref: i,
3062
- className: G(Hi({ side: e }), t),
3063
- ...r,
3064
- children: [n, /* @__PURE__ */ p(D.Close, {
3065
- className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",
3066
- children: [/* @__PURE__ */ f(Zt, { className: "h-4 w-4" }), /* @__PURE__ */ f("span", {
3067
- className: "sr-only",
3068
- children: "Close"
3069
- })]
3070
- })]
3071
- })] }));
3072
- Ui.displayName = D.Content.displayName;
3073
- var Wi = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
3074
- className: G("flex flex-col space-y-2 text-center sm:text-left", e),
3075
- ...t
3076
- });
3077
- Wi.displayName = "SheetHeader";
3078
- var Gi = ({ className: e, ...t }) => /* @__PURE__ */ f("div", {
3079
- className: G("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e),
3080
- ...t
3081
- });
3082
- Gi.displayName = "SheetFooter";
3083
- var Ki = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(D.Title, {
3084
- ref: n,
3085
- className: G("text-lg font-semibold text-foreground", e),
3086
- ...t
3087
- }));
3088
- Ki.displayName = D.Title.displayName;
3089
- var qi = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(D.Description, {
3090
- ref: n,
3091
- className: G("text-sm text-muted-foreground", e),
3092
- ...t
3093
- }));
3094
- qi.displayName = D.Description.displayName;
3095
- //#endregion
3096
- //#region ~icons/lucide/panel-left.jsx
3097
- var Ji = (e) => /* @__PURE__ */ f("svg", {
3098
- viewBox: "0 0 24 24",
3099
- width: "1.2em",
3100
- height: "1.2em",
3101
- ...e,
3102
- children: /* @__PURE__ */ p("g", {
3103
- fill: "none",
3104
- stroke: "currentColor",
3105
- strokeLinecap: "round",
3106
- strokeLinejoin: "round",
3107
- strokeWidth: 2,
3108
- children: [/* @__PURE__ */ f("rect", {
3109
- width: 18,
3110
- height: 18,
3111
- x: 3,
3112
- y: 3,
3113
- rx: 2
3114
- }), /* @__PURE__ */ f("path", { d: "M9 3v18" })]
3115
- })
3116
- }), Yi = 768;
3117
- function Xi() {
3118
- let [t, n] = e.useState(void 0);
3119
- return e.useEffect(() => {
3120
- let e = window.matchMedia(`(max-width: ${Yi - 1}px)`), t = () => {
3121
- n(window.innerWidth < Yi);
3122
- };
3123
- return e.addEventListener("change", t), n(window.innerWidth < Yi), () => e.removeEventListener("change", t);
3124
- }, []), !!t;
3125
- }
3126
- //#endregion
3127
- //#region src/components/ui/skeleton.tsx
3128
- function Zi({ className: e, ...t }) {
3129
- return /* @__PURE__ */ f("div", {
3130
- className: G("animate-pulse rounded-md bg-muted", e),
3131
- ...t
3132
- });
3133
- }
3134
- //#endregion
3135
- //#region src/components/ui/tooltip.tsx
3136
- var Qi = V.Provider, $i = V.Root, ea = V.Trigger, ta = e.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ f(V.Content, {
3137
- ref: r,
3138
- sideOffset: t,
3139
- className: G("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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 origin-[--radix-tooltip-content-transform-origin]", e),
3140
- ...n
3141
- }));
3142
- ta.displayName = V.Content.displayName;
3143
- //#endregion
3144
- //#region src/components/ui/sidebar.tsx
3145
- var na = "16rem", ra = "18rem", ia = "3rem", aa = "b", oa = e.createContext(null);
3146
- function sa() {
3147
- let t = e.useContext(oa);
3148
- if (!t) throw Error("useSidebar must be used within a SidebarProvider.");
3149
- return t;
3150
- }
3151
- function ca({ defaultOpen: t = !0, open: n, onOpenChange: r, className: i, style: a, children: o, ...s }) {
3152
- let c = Xi(), [l, u] = e.useState(!1), [d, p] = e.useState(t), m = n ?? d, h = e.useCallback((e) => {
3153
- let t = typeof e == "function" ? e(m) : e;
3154
- r ? r(t) : p(t);
3155
- }, [r, m]), g = e.useCallback(() => c ? u((e) => !e) : h((e) => !e), [
3156
- c,
3157
- h,
3158
- u
3159
- ]);
3160
- e.useEffect(() => {
3161
- let e = (e) => {
3162
- e.key === aa && (e.metaKey || e.ctrlKey) && (e.preventDefault(), g());
3163
- };
3164
- return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
3165
- }, [g]);
3166
- let _ = m ? "expanded" : "collapsed", v = e.useMemo(() => ({
3167
- state: _,
3168
- open: m,
3169
- setOpen: h,
3170
- isMobile: c,
3171
- openMobile: l,
3172
- setOpenMobile: u,
3173
- toggleSidebar: g
3174
- }), [
3175
- _,
3176
- m,
3177
- h,
3178
- c,
3179
- l,
3180
- u,
3181
- g
3182
- ]);
3183
- return /* @__PURE__ */ f(oa.Provider, {
3184
- value: v,
3185
- children: /* @__PURE__ */ f(Qi, {
3186
- delayDuration: 0,
3187
- children: /* @__PURE__ */ f("div", {
3188
- "data-slot": "sidebar-wrapper",
3189
- style: {
3190
- "--sidebar-width": na,
3191
- "--sidebar-width-icon": ia,
3192
- ...a
3193
- },
3194
- className: G("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", i),
3195
- ...s,
3196
- children: o
3197
- })
3198
- })
3199
- });
3200
- }
3201
- function la({ side: e = "left", variant: t = "sidebar", collapsible: n = "offcanvas", className: r, children: i, ...a }) {
3202
- let { isMobile: o, state: s, openMobile: c, setOpenMobile: l } = sa();
3203
- return n === "none" ? /* @__PURE__ */ f("div", {
3204
- "data-slot": "sidebar",
3205
- className: G("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", r),
3206
- ...a,
3207
- children: i
3208
- }) : o ? /* @__PURE__ */ f(Li, {
3209
- open: c,
3210
- onOpenChange: l,
3211
- ...a,
3212
- children: /* @__PURE__ */ p(Ui, {
3213
- "data-sidebar": "sidebar",
3214
- "data-slot": "sidebar",
3215
- "data-mobile": "true",
3216
- className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
3217
- style: { "--sidebar-width": ra },
3218
- side: e,
3219
- children: [/* @__PURE__ */ p(Wi, {
3220
- className: "sr-only",
3221
- children: [/* @__PURE__ */ f(Ki, { children: "Sidebar" }), /* @__PURE__ */ f(qi, { children: "Displays the mobile sidebar." })]
3222
- }), /* @__PURE__ */ f("div", {
3223
- className: "flex h-full w-full flex-col",
3224
- children: i
3225
- })]
3226
- })
3227
- }) : /* @__PURE__ */ p("div", {
3228
- className: "group peer text-sidebar-foreground hidden md:block",
3229
- "data-state": s,
3230
- "data-collapsible": s === "collapsed" ? n : "",
3231
- "data-variant": t,
3232
- "data-side": e,
3233
- "data-slot": "sidebar",
3234
- children: [/* @__PURE__ */ f("div", {
3235
- "data-slot": "sidebar-gap",
3236
- className: G("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", t === "floating" || t === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
3237
- }), /* @__PURE__ */ f("div", {
3238
- "data-slot": "sidebar-container",
3239
- className: G("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex", e === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]", t === "floating" || t === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", r),
3240
- ...a,
3241
- children: /* @__PURE__ */ f("div", {
3242
- "data-sidebar": "sidebar",
3243
- "data-slot": "sidebar-inner",
3244
- className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",
3245
- children: i
3246
- })
3247
- })]
3248
- });
3249
- }
3250
- function ua({ className: e, onClick: t, ...n }) {
3251
- let { toggleSidebar: r } = sa();
3252
- return /* @__PURE__ */ p(K, {
3253
- "data-sidebar": "trigger",
3254
- "data-slot": "sidebar-trigger",
3255
- variant: "ghost",
3256
- className: G("size-7", e),
3257
- onClick: (e) => {
3258
- t?.(e), r();
3259
- },
3260
- ...n,
3261
- children: [/* @__PURE__ */ f(Ji, {}), /* @__PURE__ */ f("span", {
3262
- className: "sr-only",
3263
- children: "Toggle Sidebar"
3264
- })]
3265
- });
3266
- }
3267
- function da({ className: e, ...t }) {
3268
- let { toggleSidebar: n } = sa();
3269
- return /* @__PURE__ */ f("button", {
3270
- "data-sidebar": "rail",
3271
- "data-slot": "sidebar-rail",
3272
- "aria-label": "Toggle Sidebar",
3273
- tabIndex: -1,
3274
- onClick: n,
3275
- title: "Toggle Sidebar",
3276
- className: G("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", e),
3277
- ...t
3278
- });
3279
- }
3280
- function fa({ className: e, ...t }) {
3281
- return /* @__PURE__ */ f("main", {
3282
- "data-slot": "sidebar-inset",
3283
- className: G("bg-background relative flex w-full flex-1 flex-col", "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", e),
3284
- ...t
3285
- });
3286
- }
3287
- function pa({ className: e, ...t }) {
3288
- return /* @__PURE__ */ f(Q, {
3289
- "data-slot": "sidebar-input",
3290
- "data-sidebar": "input",
3291
- className: G("bg-background h-8 w-full shadow-none", e),
3292
- ...t
3293
- });
3294
- }
3295
- function ma({ className: e, ...t }) {
3296
- return /* @__PURE__ */ f("div", {
3297
- "data-slot": "sidebar-header",
3298
- "data-sidebar": "header",
3299
- className: G("flex shrink-0 flex-col gap-2 p-2", e),
3300
- ...t
3301
- });
3302
- }
3303
- function ha({ className: e, ...t }) {
3304
- return /* @__PURE__ */ f("div", {
3305
- "data-slot": "sidebar-footer",
3306
- "data-sidebar": "footer",
3307
- className: G("flex shrink-0 flex-col gap-2 p-2", e),
3308
- ...t
3309
- });
3310
- }
3311
- function ga({ className: e, ...t }) {
3312
- return /* @__PURE__ */ f(oi, {
3313
- "data-slot": "sidebar-separator",
3314
- "data-sidebar": "separator",
3315
- className: G("bg-sidebar-border mx-2 w-auto", e),
3316
- ...t
3317
- });
3318
- }
3319
- function _a({ className: e, ...t }) {
3320
- return /* @__PURE__ */ f("div", {
3321
- "data-slot": "sidebar-content",
3322
- "data-sidebar": "content",
3323
- className: G("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", e),
3324
- ...t
3325
- });
3326
- }
3327
- function va({ className: e, ...t }) {
3328
- return /* @__PURE__ */ f("div", {
3329
- "data-slot": "sidebar-group",
3330
- "data-sidebar": "group",
3331
- className: G("relative flex w-full min-w-0 flex-col p-2", e),
3332
- ...t
3333
- });
3334
- }
3335
- function ya({ className: e, asChild: t = !1, ...n }) {
3336
- return /* @__PURE__ */ f(t ? v : "div", {
3337
- "data-slot": "sidebar-group-label",
3338
- "data-sidebar": "group-label",
3339
- className: G("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-none transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", e),
3340
- ...n
3341
- });
3342
- }
3343
- function ba({ className: e, asChild: t = !1, ...n }) {
3344
- return /* @__PURE__ */ f(t ? v : "button", {
3345
- "data-slot": "sidebar-group-action",
3346
- "data-sidebar": "group-action",
3347
- className: G("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-none transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 md:after:hidden", "group-data-[collapsible=icon]:hidden", e),
3348
- ...n
3349
- });
3350
- }
3351
- function xa({ className: e, ...t }) {
3352
- return /* @__PURE__ */ f("div", {
3353
- "data-slot": "sidebar-group-content",
3354
- "data-sidebar": "group-content",
3355
- className: G("w-full text-sm", e),
3356
- ...t
3357
- });
3358
- }
3359
- function Sa({ className: e, ...t }) {
3360
- return /* @__PURE__ */ f("ul", {
3361
- "data-slot": "sidebar-menu",
3362
- "data-sidebar": "menu",
3363
- className: G("flex w-full min-w-0 flex-col gap-1", e),
3364
- ...t
3365
- });
3366
- }
3367
- function Ca({ className: e, ...t }) {
3368
- return /* @__PURE__ */ f("li", {
3369
- "data-slot": "sidebar-menu-item",
3370
- "data-sidebar": "menu-item",
3371
- className: G("group/menu-item relative", e),
3372
- ...t
3373
- });
3374
- }
3375
- var wa = g("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] 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 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", {
3376
- variants: {
3377
- variant: {
3378
- default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
3379
- outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
3380
- },
3381
- size: {
3382
- default: "h-8 text-sm",
3383
- sm: "h-7 text-xs",
3384
- lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0"
3385
- }
3386
- },
3387
- defaultVariants: {
3388
- variant: "default",
3389
- size: "default"
3390
- }
3391
- });
3392
- function Ta({ asChild: e = !1, isActive: t = !1, variant: n = "default", size: r = "default", tooltip: i, className: a, ...o }) {
3393
- let s = e ? v : "button", { isMobile: c, state: l } = sa(), u = /* @__PURE__ */ f(s, {
3394
- "data-slot": "sidebar-menu-button",
3395
- "data-sidebar": "menu-button",
3396
- "data-size": r,
3397
- "data-active": t,
3398
- className: G(wa({
3399
- variant: n,
3400
- size: r
3401
- }), a),
3402
- ...o
3403
- });
3404
- return i ? (typeof i == "string" && (i = { children: i }), /* @__PURE__ */ p($i, { children: [/* @__PURE__ */ f(ea, {
3405
- asChild: !0,
3406
- children: u
3407
- }), /* @__PURE__ */ f(ta, {
3408
- side: "right",
3409
- align: "center",
3410
- hidden: l !== "collapsed" || c,
3411
- ...i
3412
- })] })) : u;
3413
- }
3414
- function Ea({ className: e, asChild: t = !1, showOnHover: n = !1, ...r }) {
3415
- return /* @__PURE__ */ f(t ? v : "button", {
3416
- "data-slot": "sidebar-menu-action",
3417
- "data-sidebar": "menu-action",
3418
- className: G("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-none transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "after:absolute after:-inset-2 md:after:hidden", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", n && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0", e),
3419
- ...r
3420
- });
3421
- }
3422
- function Da({ className: e, ...t }) {
3423
- return /* @__PURE__ */ f("div", {
3424
- "data-slot": "sidebar-menu-badge",
3425
- "data-sidebar": "menu-badge",
3426
- className: G("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none", "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", e),
3427
- ...t
3428
- });
3429
- }
3430
- function Oa({ className: t, showIcon: n = !1, ...r }) {
3431
- let i = e.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
3432
- return /* @__PURE__ */ p("div", {
3433
- "data-slot": "sidebar-menu-skeleton",
3434
- "data-sidebar": "menu-skeleton",
3435
- className: G("flex h-8 items-center gap-2 rounded-md px-2", t),
3436
- ...r,
3437
- children: [n && /* @__PURE__ */ f(Zi, {
3438
- className: "size-4 rounded-md",
3439
- "data-sidebar": "menu-skeleton-icon"
3440
- }), /* @__PURE__ */ f(Zi, {
3441
- className: "h-4 max-w-(--skeleton-width) flex-1",
3442
- "data-sidebar": "menu-skeleton-text",
3443
- style: { "--skeleton-width": i }
3444
- })]
3445
- });
3446
- }
3447
- function ka({ className: e, ...t }) {
3448
- return /* @__PURE__ */ f("ul", {
3449
- "data-slot": "sidebar-menu-sub",
3450
- "data-sidebar": "menu-sub",
3451
- className: G("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5", "group-data-[collapsible=icon]:hidden", e),
3452
- ...t
3453
- });
3454
- }
3455
- function Aa({ className: e, ...t }) {
3456
- return /* @__PURE__ */ f("li", {
3457
- "data-slot": "sidebar-menu-sub-item",
3458
- "data-sidebar": "menu-sub-item",
3459
- className: G("group/menu-sub-item relative", e),
3460
- ...t
3461
- });
3462
- }
3463
- function ja({ asChild: e = !1, size: t = "md", isActive: n = !1, className: r, ...i }) {
3464
- return /* @__PURE__ */ f(e ? v : "a", {
3465
- "data-slot": "sidebar-menu-sub-button",
3466
- "data-sidebar": "menu-sub-button",
3467
- "data-size": t,
3468
- "data-active": n,
3469
- className: G("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0", "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground", t === "sm" && "text-xs", t === "md" && "text-sm", "group-data-[collapsible=icon]:hidden", r),
3470
- ...i
3471
- });
3472
- }
3473
- //#endregion
3474
- //#region src/components/ui/slider.tsx
3475
- var Ma = e.forwardRef(({ className: t, name: n, value: r, defaultValue: i, onValueChange: a, onBlur: o, ...s }, c) => {
3476
- let l = e.useRef(null);
3477
- e.useImperativeHandle(c, () => l.current);
3478
- let u = (e) => {
3479
- a?.(e[0]);
3480
- }, m = Ie(r), h = Ie(i);
3481
- return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("input", {
3482
- type: "range",
3483
- ref: l,
3484
- name: n,
3485
- defaultValue: h?.[0],
3486
- onBlur: o,
3487
- className: "sr-only",
3488
- tabIndex: -1,
3489
- "aria-hidden": "true"
3490
- }), /* @__PURE__ */ p(de.Root, {
3491
- value: m,
3492
- defaultValue: h,
3493
- onValueChange: u,
3494
- className: G("relative flex w-full touch-none select-none items-center", t),
3495
- ...s,
3496
- children: [/* @__PURE__ */ f(de.Track, {
3497
- className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",
3498
- children: /* @__PURE__ */ f(de.Range, { className: "absolute h-full bg-primary" })
3499
- }), /* @__PURE__ */ f(de.Thumb, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })]
3500
- })] });
3501
- });
3502
- Ma.displayName = "Slider";
3503
- //#endregion
3504
- //#region ~icons/lucide/plus.jsx
3505
- var Na = (e) => /* @__PURE__ */ f("svg", {
3506
- viewBox: "0 0 24 24",
3507
- width: "1.2em",
3508
- height: "1.2em",
3509
- ...e,
3510
- children: /* @__PURE__ */ f("path", {
3511
- fill: "none",
3512
- stroke: "currentColor",
3513
- strokeLinecap: "round",
3514
- strokeLinejoin: "round",
3515
- strokeWidth: 2,
3516
- d: "M5 12h14m-7-7v14"
3517
- })
3518
- }), Pa = (e) => /* @__PURE__ */ f("svg", {
3519
- viewBox: "0 0 24 24",
3520
- width: "1.2em",
3521
- height: "1.2em",
3522
- ...e,
3523
- children: /* @__PURE__ */ f("path", {
3524
- fill: "none",
3525
- stroke: "currentColor",
3526
- strokeLinecap: "round",
3527
- strokeLinejoin: "round",
3528
- strokeWidth: 2,
3529
- d: "M10 11v6m4-6v6m5-11v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"
3530
- })
3531
- }), Fa = {
3532
- string: [
3533
- "eq",
3534
- "ne",
3535
- "contains",
3536
- "startsWith",
3537
- "endsWith",
3538
- "in",
3539
- "notIn",
3540
- "isNull",
3541
- "isNotNull"
3542
- ],
3543
- integer: [
3544
- "eq",
3545
- "ne",
3546
- "gt",
3547
- "gte",
3548
- "lt",
3549
- "lte",
3550
- "in",
3551
- "notIn",
3552
- "between",
3553
- "isNull",
3554
- "isNotNull"
3555
- ],
3556
- numeric: [
3557
- "eq",
3558
- "ne",
3559
- "gt",
3560
- "gte",
3561
- "lt",
3562
- "lte",
3563
- "in",
3564
- "notIn",
3565
- "between",
3566
- "isNull",
3567
- "isNotNull"
3568
- ],
3569
- boolean: [
3570
- "eq",
3571
- "ne",
3572
- "isNull",
3573
- "isNotNull"
3574
- ],
3575
- date: [
3576
- "eq",
3577
- "ne",
3578
- "before",
3579
- "after",
3580
- "between",
3581
- "isNull",
3582
- "isNotNull"
3583
- ],
3584
- datetime: [
3585
- "eq",
3586
- "ne",
3587
- "before",
3588
- "after",
3589
- "between",
3590
- "isNull",
3591
- "isNotNull"
3592
- ],
3593
- enum: [
3594
- "eq",
3595
- "ne",
3596
- "in",
3597
- "notIn",
3598
- "isNull",
3599
- "isNotNull"
3600
- ],
3601
- json: ["isNull", "isNotNull"]
3602
- }, Ia = {
3603
- string: "contains",
3604
- integer: "eq",
3605
- numeric: "eq",
3606
- boolean: "eq",
3607
- date: "eq",
3608
- datetime: "eq",
3609
- enum: "eq",
3610
- json: "isNull"
3611
- }, La = {
3612
- eq: "=",
3613
- ne: "≠",
3614
- gt: ">",
3615
- gte: "≥",
3616
- lt: "<",
3617
- lte: "≤",
3618
- contains: "contains",
3619
- startsWith: "starts with",
3620
- endsWith: "ends with",
3621
- in: "in",
3622
- notIn: "not in",
3623
- between: "between",
3624
- before: "before",
3625
- after: "after",
3626
- isNull: "null",
3627
- isNotNull: "not null"
3628
- }, Ra = {
3629
- string: "string",
3630
- number: "integer",
3631
- boolean: "boolean",
3632
- date: "datetime",
3633
- enum: "enum",
3634
- array: "json",
3635
- object: "json"
3636
- };
3637
- //#endregion
3638
- //#region src/components/ui/tag-input.tsx
3639
- function za({ value: e = [], onChange: t, type: n = "text", placeholder: r, disabled: i, className: a }) {
3640
- let [o, s] = l(""), c = (r) => {
3641
- let i = r.trim();
3642
- if (i && !(n === "number" && !/^-?\d+(\.\d+)?$/.test(i))) {
3643
- if (e.includes(i)) {
3644
- s("");
3645
- return;
3646
- }
3647
- t?.([...e, i]), s("");
3648
- }
3649
- }, u = (n) => {
3650
- t?.(e.filter((e, t) => t !== n));
3651
- };
3652
- return /* @__PURE__ */ p("div", {
3653
- className: `flex flex-wrap gap-1 items-center border rounded-md p-2 min-h-[40px] ${i ? "bg-gray-100 cursor-not-allowed" : "bg-white"} ${a}`,
3654
- children: [e.map((e, t) => /* @__PURE__ */ p(ut, {
3655
- variant: "secondary",
3656
- className: "flex items-center gap-1 px-2 py-1",
3657
- children: [/* @__PURE__ */ f("span", { children: e }), !i && /* @__PURE__ */ f("button", {
3658
- type: "button",
3659
- onClick: () => u(t),
3660
- className: "hover:bg-gray-300 rounded-full p-0.5",
3661
- children: /* @__PURE__ */ f(Zt, {})
3662
- })]
3663
- }, t)), !i && /* @__PURE__ */ f("input", {
3664
- type: "text",
3665
- value: o,
3666
- onChange: (e) => {
3667
- let t = e.target.value;
3668
- if (t.includes(",")) {
3669
- let e = t.split(",");
3670
- e.slice(0, -1).map((e) => c(e)), s(e[e.length - 1]);
3671
- return;
3672
- }
3673
- s(t);
3674
- },
3675
- onKeyDown: (t) => {
3676
- t.key === "Enter" ? (t.preventDefault(), c(o)) : t.key === "Backspace" && !o && e.length > 0 && u(e.length - 1);
3677
- },
3678
- onBlur: () => {
3679
- o.trim() && c(o);
3680
- },
3681
- placeholder: e.length === 0 ? r ?? "Enter 또는 콤마로 구분..." : "",
3682
- className: "flex-1 min-w-[120px] outline-none bg-transparent text-sm",
3683
- disabled: i
3684
- })]
3685
- });
3686
- }
3687
- //#endregion
3688
- //#region src/components/ui/sonamu-filter/value-input.tsx
3689
- var Ba = {
3690
- options: ["true", "false"],
3691
- labels: {
3692
- true: "True",
3693
- false: "False"
3694
- }
3695
- };
3696
- function Va({ propType: e, operator: t, value: n, onChange: r, fieldMeta: i }) {
3697
- let { SD: a } = J();
3698
- if (t === "isNull" || t === "isNotNull") return /* @__PURE__ */ f(Ni, {
3699
- enum: { options: Ba.options },
3700
- labels: Ba.labels,
3701
- value: n === void 0 ? "" : String(n),
3702
- onValueChange: (e) => e && r(e === "true"),
3703
- className: "w-full"
3704
- });
3705
- if (t === "in" || t === "notIn") return e === "enum" && i?.enumData ? /* @__PURE__ */ f(Ni, {
3706
- enum: { options: i.enumData.options },
3707
- labels: i.enumData.labels,
3708
- value: n ?? [],
3709
- onValueChange: r,
3710
- multiple: !0
3711
- }) : /* @__PURE__ */ f(za, {
3712
- value: n ?? [],
3713
- onChange: r,
3714
- type: e === "integer" || e === "numeric" ? "number" : "text"
3715
- });
3716
- if (t === "between") {
3717
- if (e === "integer" || e === "numeric") return /* @__PURE__ */ f(Ei, {
3718
- value: n ?? [void 0, void 0],
3719
- onChange: r
3720
- });
3721
- if (e === "date" || e === "datetime") {
3722
- let [e, t] = n ?? [void 0, void 0];
3723
- return /* @__PURE__ */ p("div", {
3724
- className: "flex items-center gap-2",
3725
- children: [
3726
- /* @__PURE__ */ f(zn, {
3727
- value: e ?? null,
3728
- onValueChange: (e) => r([e ?? void 0, t]),
3729
- placeholder: a("rc.sonamuFilter.startDate"),
3730
- className: "flex-1"
3731
- }),
3732
- /* @__PURE__ */ f("span", {
3733
- className: "text-muted-foreground",
3734
- children: "~"
3735
- }),
3736
- /* @__PURE__ */ f(zn, {
3737
- value: t ?? null,
3738
- onValueChange: (t) => r([e, t ?? void 0]),
3739
- placeholder: a("rc.sonamuFilter.endDate"),
3740
- className: "flex-1"
3741
- })
3742
- ]
3743
- });
3744
- }
3745
- }
3746
- return e === "enum" && i?.enumData ? /* @__PURE__ */ f(Ni, {
3747
- enum: { options: i.enumData.options },
3748
- labels: i.enumData.labels,
3749
- value: n ?? "",
3750
- onValueChange: r
3751
- }) : e === "date" || e === "datetime" ? /* @__PURE__ */ f(Vn, {
3752
- value: n ?? void 0,
3753
- onValueChange: r
3754
- }) : e === "string" ? /* @__PURE__ */ f(Q, {
3755
- type: "text",
3756
- value: n ?? "",
3757
- onValueChange: r,
3758
- placeholder: a("rc.sonamuFilter.enterValue")
3759
- }) : e === "integer" || e === "numeric" ? /* @__PURE__ */ f(Q, {
3760
- type: "number",
3761
- value: n === void 0 ? "" : String(n),
3762
- onValueChange: (e) => r(e === "" ? void 0 : Number(e)),
3763
- placeholder: a("rc.sonamuFilter.enterNumber")
3764
- }) : e === "boolean" ? /* @__PURE__ */ f(Ni, {
3765
- enum: { options: Ba.options },
3766
- labels: Ba.labels,
3767
- value: n === void 0 ? "" : String(n),
3768
- onValueChange: (e) => e && r(e === "true"),
3769
- className: "w-full"
3770
- }) : /* @__PURE__ */ f(Q, {
3771
- type: "text",
3772
- value: "",
3773
- placeholder: a("rc.sonamuFilter.notSupported"),
3774
- disabled: !0
3775
- });
3776
- }
3777
- //#endregion
3778
- //#region src/components/ui/sonamu-filter/rule-row-input.tsx
3779
- function Ha({ rule: e, fieldMeta: t, onUpdate: n, onRemove: r }) {
3780
- let { SD: i } = J(), a = Object.keys(t), o = e.field ? t[e.field] : null, s = o ? Fa[o.propType] : [];
3781
- return /* @__PURE__ */ p("div", {
3782
- className: "flex items-start gap-2 p-3 border rounded-lg bg-gray-50",
3783
- children: [
3784
- /* @__PURE__ */ f("div", {
3785
- className: "flex-1 min-w-[150px]",
3786
- children: /* @__PURE__ */ f($, {
3787
- items: a,
3788
- value: e.field ?? "",
3789
- onValueChange: (e) => {
3790
- n({
3791
- field: e ?? null,
3792
- operator: null,
3793
- value: void 0
3794
- });
3795
- },
3796
- placeholder: i("rc.sonamuFilter.selectField")
3797
- })
3798
- }),
3799
- /* @__PURE__ */ f("div", {
3800
- className: "flex-1 min-w-[120px]",
3801
- children: /* @__PURE__ */ f($, {
3802
- items: s.map((e) => ({
3803
- value: e,
3804
- label: La[e]
3805
- })),
3806
- value: e.operator ?? void 0,
3807
- onValueChange: (e) => {
3808
- n({
3809
- operator: e ?? null,
3810
- value: void 0
3811
- });
3812
- },
3813
- disabled: !e.field,
3814
- placeholder: i("rc.sonamuFilter.selectOperator")
3815
- })
3816
- }),
3817
- /* @__PURE__ */ f("div", {
3818
- className: "flex-1 min-w-[150px]",
3819
- children: e.operator && o ? /* @__PURE__ */ f(Va, {
3820
- propType: o.propType,
3821
- operator: e.operator,
3822
- value: e.value,
3823
- onChange: (e) => n({ value: e }),
3824
- fieldMeta: o
3825
- }) : /* @__PURE__ */ f(Q, {
3826
- type: "text",
3827
- disabled: !0,
3828
- placeholder: i("rc.sonamuFilter.selectOperatorFirst")
3829
- })
3830
- }),
3831
- /* @__PURE__ */ f(K, {
3832
- variant: "ghost",
3833
- size: "sm",
3834
- onClick: r,
3835
- className: "shrink-0 h-10 px-3",
3836
- children: /* @__PURE__ */ f(Pa, {})
3837
- })
3838
- ]
3839
- });
3840
- }
3841
- //#endregion
3842
- //#region src/components/ui/sonamu-filter/utils.ts
3843
- function Ua(e) {
3844
- let t = e, n = !1;
3845
- for (; t._def.type === "nullable" || t._def.type === "optional";) t._def.type === "nullable" && (n = !0), t = t._def.innerType;
3846
- return {
3847
- innerType: t,
3848
- nullable: n
3849
- };
3850
- }
3851
- function Wa(e) {
3852
- return Ra[e] ?? "string";
3853
- }
3854
- function Ga(e, t) {
3855
- let n = e.options ? Array.from(e.options) : void 0;
3856
- if (!n) return;
3857
- let r = e._def?.description || e.description, i = {};
3858
- if (r) for (let e of n) i[e] = t(`enum.${r}.${e}`);
3859
- return {
3860
- options: n,
3861
- labels: i
3862
- };
3863
- }
3864
- function Ka(e, t) {
3865
- let n = e.shape, r = {};
3866
- for (let [e, i] of Object.entries(n)) {
3867
- if (e.startsWith("virtual") || e.startsWith("textsearchable")) continue;
3868
- let { innerType: n, nullable: a } = Ua(i), o = i.meta?.()?.SonamuPropType === "numeric" ? "numeric" : Wa(n._def.type);
3869
- r[e] = {
3870
- propType: o,
3871
- nullable: a,
3872
- enumData: o === "enum" ? Ga(n, t) : void 0
3873
- };
3874
- }
3875
- return r;
3876
- }
3877
- //#endregion
3878
- //#region src/components/ui/sonamu-filter/sonamu-filter-modal.tsx
3879
- function qa({ baseSchema: e, open: t, onOpenChange: n, initialRules: r = [], onApply: i }) {
3880
- let { SD: o } = J(), [s, c] = l(r), [u, d] = l([]);
3881
- a(() => {
3882
- c(r);
3883
- }, [r]), a(() => {
3884
- t && d(s.map((e) => ({ ...e })));
3885
- }, [t, s]);
3886
- let m = Ka(e, o), h = () => {
3887
- d([...u, {
3888
- id: crypto.randomUUID(),
3889
- field: null,
3890
- operator: null,
3891
- value: void 0
3892
- }]);
3893
- }, g = (e) => {
3894
- d(u.filter((t) => t.id !== e));
3895
- }, _ = (e, t) => {
3896
- d(u.map((n) => n.id === e ? {
3897
- ...n,
3898
- ...t
3899
- } : n));
3900
- }, v = () => {
3901
- let e = {};
3902
- for (let t of u) !t.field || !t.operator || (t.operator === "isNull" || t.operator, e[t.field] = { [t.operator]: t.value });
3903
- return e;
3904
- };
3905
- return /* @__PURE__ */ f(Qt, {
3906
- open: t,
3907
- onOpenChange: n,
3908
- children: /* @__PURE__ */ p(rn, {
3909
- className: "max-w-4xl max-h-[90vh] overflow-hidden flex flex-col",
3910
- children: [
3911
- /* @__PURE__ */ f(an, { children: /* @__PURE__ */ f(sn, { children: o("rc.sonamuFilter.title") }) }),
3912
- /* @__PURE__ */ p("div", {
3913
- className: "flex-1 overflow-auto space-y-4 py-4",
3914
- children: [
3915
- u.length === 0 ? /* @__PURE__ */ f("div", {
3916
- className: "text-center py-8 text-muted-foreground",
3917
- children: /* @__PURE__ */ f("p", {
3918
- className: "text-sm",
3919
- children: o("rc.sonamuFilter.noRulesYet")
3920
- })
3921
- }) : /* @__PURE__ */ f("div", {
3922
- className: "space-y-2",
3923
- children: u.map((e) => /* @__PURE__ */ f(Ha, {
3924
- rule: e,
3925
- fieldMeta: m,
3926
- onUpdate: (t) => _(e.id, t),
3927
- onRemove: () => g(e.id)
3928
- }, e.id))
3929
- }),
3930
- /* @__PURE__ */ p("div", {
3931
- className: "flex gap-2",
3932
- children: [/* @__PURE__ */ p(K, {
3933
- variant: "outline",
3934
- onClick: h,
3935
- className: "flex-1",
3936
- children: [/* @__PURE__ */ f(Na, {}), o("rc.sonamuFilter.addRule")]
3937
- }), u.length > 0 && /* @__PURE__ */ f(K, {
3938
- variant: "outline",
3939
- onClick: () => {
3940
- d([]);
3941
- },
3942
- className: "flex-1",
3943
- children: o("rc.sonamuFilter.reset")
3944
- })]
3945
- }),
3946
- u.length > 0 && /* @__PURE__ */ p("div", {
3947
- className: "border rounded-lg p-4 bg-muted/50",
3948
- children: [/* @__PURE__ */ f("h4", {
3949
- className: "text-sm font-semibold mb-2",
3950
- children: "Preview (JSON)"
3951
- }), /* @__PURE__ */ f("pre", {
3952
- className: "text-xs overflow-auto max-h-[200px] bg-background p-3 rounded border",
3953
- children: JSON.stringify(v(), null, 2)
3954
- })]
3955
- })
3956
- ]
3957
- }),
3958
- /* @__PURE__ */ p("div", {
3959
- className: "flex justify-end gap-2 pt-4 border-t",
3960
- children: [/* @__PURE__ */ f(K, {
3961
- variant: "outline",
3962
- onClick: () => {
3963
- d(s.map((e) => ({ ...e }))), n(!1);
3964
- },
3965
- children: o("rc.common.cancel")
3966
- }), /* @__PURE__ */ f(K, {
3967
- onClick: () => {
3968
- let e = v(), t = u.map((e) => ({ ...e }));
3969
- c(t), i?.(e, t), n(!1);
3970
- },
3971
- children: o("rc.sonamuFilter.apply")
3972
- })]
3973
- })
3974
- ]
3975
- })
3976
- });
3977
- }
3978
- //#endregion
3979
- //#region src/lib/caster.ts
3980
- function Ja(e) {
3981
- return e instanceof H.ZodNumber || e instanceof H.ZodNullable && e._def.innerType instanceof H.ZodNumber || e instanceof H.ZodOptional && e._def.innerType instanceof H.ZodNumber ? !0 : e instanceof H.ZodOptional && e._def.innerType instanceof H.ZodOptional && e._def.innerType._def.innerType instanceof H.ZodNumber;
3982
- }
3983
- function Ya(e, t) {
3984
- if (Ja(e) && typeof t == "string") return Number(t);
3985
- if (e instanceof H.ZodUnion) {
3986
- let n = e.options;
3987
- if (n.some((e) => Ja(e))) if (Array.isArray(t)) {
3988
- let e = n.find((e) => e instanceof H.ZodNumber);
3989
- if (!e) throw Error("Expected to find a number type in union");
3990
- return t.map((t) => Ya(e, t));
3991
- } else return Number(t);
3992
- } else if (e instanceof H.ZodBoolean && (t === "true" || t === "false")) return t === "true";
3993
- else if (e instanceof H.ZodArray) return t.map((t) => Ya(e.element, t));
3994
- else if (e instanceof H.ZodObject && typeof t == "object") return Object.keys(t).reduce((n, r) => (n[r] = Ya(e.shape[r], t[r]), n), {});
3995
- else if (e instanceof H.ZodOptional) return Ya(e._def.innerType, t);
3996
- return t;
3997
- }
3998
- function Xa(e) {
3999
- return H.preprocess((t) => Ya(e, t), e);
4000
- }
4001
- //#endregion
4002
- //#region src/lib/base-helpers.ts
4003
- function Za(e) {
4004
- return e === !0 ? "hidden" : "";
4005
- }
4006
- function Qa(e, t) {
4007
- return Ya(t, fe.parse(e.toString()));
4008
- }
4009
- function $a(e) {
4010
- return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0).map(([e, t]) => Array.isArray(t) ? [[`${e}[]`, t]] : me(t) ? Object.keys(t).map((n) => [`${e}[${n}]`, String(t[n])]) : [[e, String(t)]]).flat());
4011
- }
4012
- function eo(e) {
4013
- return e === null ? null : e.slice(0, 10);
4014
- }
4015
- function to(e) {
4016
- return e && new Intl.NumberFormat().format(e);
4017
- }
4018
- function no(e) {
4019
- return e == null ? null : e instanceof Date ? e.toISOString().slice(0, 10) : e.slice(0, 10);
4020
- }
4021
- function ro(e) {
4022
- return e == null ? null : e instanceof Date ? e.toISOString().slice(0, 19).replace("T", " ") : e.slice(0, 19);
4023
- }
4024
- function io(e) {
4025
- return e ? Array.isArray(e) ? e : [e] : [];
4026
- }
4027
- function ao() {
4028
- let e = null;
4029
- return {
4030
- set: (t) => {
4031
- e = t;
4032
- },
4033
- call: ((...t) => {
4034
- e && e.call(t);
4035
- })
4036
- };
4037
- }
4038
- //#endregion
4039
- //#region src/lib/form-helpers.ts
4040
- async function oo(e, t) {
4041
- if (e instanceof File) {
4042
- let [n] = await t([e]);
4043
- return n;
4044
- }
4045
- if (Array.isArray(e)) return e.length > 0 && e.every((e) => e instanceof File) ? await t(e) : await Promise.all(e.map((e) => oo(e, t)));
4046
- if (typeof e == "object" && e && Object.prototype.toString.call(e) === "[object Object]") {
4047
- let n = {};
4048
- for (let [r, i] of Object.entries(e)) n[r] = await oo(i, t);
4049
- return n;
4050
- }
4051
- return e;
4052
- }
4053
- function so(e, t) {
4054
- let [n, r] = l(t), [i, a] = l(/* @__PURE__ */ new Map()), { uploader: o } = J();
4055
- function s(e, t) {
4056
- let n = t.replace(/\./g, ".shape.").replace(/\[[^\]]+\]/g, ".element").replace(/^\.element/, "element"), r;
4057
- return e instanceof H.ZodObject ? r = pe(e.shape, n) : e instanceof H.ZodArray && (r = pe(e, n)), r === void 0 ? "normal" : r instanceof H.ZodOptional ? "optional" : r instanceof H.ZodNullable ? "nullable" : "normal";
4058
- }
4059
- return {
4060
- form: n,
4061
- setForm: r,
4062
- register: (t, o) => {
4063
- let c = o ?? s(e, t), l = pe(n, t), u = i.get(t), d = {
4064
- value: l ?? "",
4065
- onValueChange: (e) => {
4066
- u !== void 0 && a((e) => {
4067
- let n = new Map(e);
4068
- return n.delete(t), n;
4069
- });
4070
- let i = e;
4071
- c === "nullable" ? i = e === "" ? null : e : c === "optional" && (i = e === "" ? void 0 : e);
4072
- let o = t.indexOf(".") === -1 && t.indexOf("[") === -1;
4073
- r(i === void 0 && o ? {
4074
- ...n,
4075
- [t]: void 0
4076
- } : he(n, t, i));
4077
- }
4078
- };
4079
- return u && (d.error = u), d;
4080
- },
4081
- submit: (e) => async () => {
4082
- let t = await oo(n, o);
4083
- return r(t), await e(t);
4084
- },
4085
- addError: (e, t) => {
4086
- a((n) => {
4087
- let r = new Map(n);
4088
- return r.set(e, typeof t == "string" ? { content: t } : t), r;
4089
- });
4090
- },
4091
- removeError: (e) => {
4092
- a((t) => {
4093
- let n = new Map(t);
4094
- return n.delete(e), n;
4095
- });
4096
- },
4097
- clearError: () => {
4098
- a(/* @__PURE__ */ new Map());
4099
- },
4100
- reset: () => {
4101
- r(t);
4102
- }
4103
- };
4104
- }
4105
- //#endregion
4106
- //#region src/lib/list-helpers.ts
4107
- function co(e, t) {
4108
- return e.filter((e) => t.includes(e));
4109
- }
4110
- function lo(e, t, n) {
4111
- let r = ve({ strict: !1 }), i = _e(), a = (() => {
4112
- if (n?.disableSearchParams) return t;
4113
- let i = e.safeParse(r);
4114
- return i.success ? {
4115
- ...t,
4116
- ...i.data
4117
- } : t;
4118
- })(), o = (e) => {
4119
- ye(a, e) || i({ search: e });
4120
- };
4121
- function s(e) {
4122
- let n = a[e], r = t[e];
4123
- return {
4124
- value: n ?? r ?? (e === "page" ? 1 : ""),
4125
- onValueChange: (t) => {
4126
- o(e === "page" ? {
4127
- ...a,
4128
- page: t
4129
- } : {
4130
- ...a,
4131
- page: 1,
4132
- [e]: t === "" ? void 0 : t
4133
- });
4134
- }
4135
- };
4136
- }
4137
- return {
4138
- listParams: a,
4139
- setListParams: o,
4140
- register: s
4141
- };
4142
- }
4143
- function uo(e, t = []) {
4144
- let [n, r] = l(new Map(e.map((e) => [e, t.includes(e)]))), [i, o] = l(0);
4145
- a(() => {
4146
- let t = Array.from(n.keys());
4147
- co(e, t).length !== t.length && r(new Map(Array.from(n).filter(([t, n]) => e.includes(t))));
4148
- }, [e, n]);
4149
- let s = Array.from(n).filter(([t, n]) => e.includes(t) && n).map(([e]) => e);
4150
- return {
4151
- getSelected: (e) => n.get(e) ?? !1,
4152
- toggle: (e) => {
4153
- r((t) => new Map([...t, [e, !(t.get(e) ?? !1)]]));
4154
- },
4155
- selectedKeys: s,
4156
- deselectAll: () => r(new Map(e.map((e) => [e, !1]))),
4157
- selectAll: () => r(new Map(e.map((e) => [e, !0]))),
4158
- isAllSelected: s.length === e.length,
4159
- handleCheckboxClick: (t, n) => {
4160
- let a = t.currentTarget.getElementsByTagName("input");
4161
- if (t.shiftKey && !a[0]?.checked) {
4162
- let [t, a] = i < n ? [i, n] : [n + 1, i];
4163
- r(new Map(ge([...s, ...e.slice(t, a)]).map((e) => [e, !0])));
4164
- } else o(n);
4165
- }
4166
- };
4167
- }
4168
- //#endregion
4169
- //#region src/lib/modal-helpers.ts
4170
- function fo(e, n) {
4171
- let [r, i] = l({
4172
- ...n,
4173
- open: !1
4174
- }), a = () => {
4175
- i({
4176
- ...r,
4177
- open: !1
4178
- });
4179
- };
4180
- return {
4181
- open: (e) => {
4182
- i({
4183
- ...e,
4184
- open: !0,
4185
- close: a
4186
- });
4187
- },
4188
- modal: t.createElement(e, {
4189
- ...r,
4190
- close: a
4191
- })
4192
- };
4193
- }
4194
- //#endregion
4195
- //#region src/components/ui/sonamu-filter/sonamu-filter-popover.tsx
4196
- function po({ rules: e, fieldMeta: t, children: n, side: r = "bottom", align: i = "start" }) {
4197
- let { SD: a } = J(), o = (e) => e ? La[e] : "", s = (e) => {
4198
- let { value: n, field: r, operator: i } = e;
4199
- if (i === "isNull" || i === "isNotNull" || !r || n == null) return "";
4200
- let a = t[r];
4201
- return a ? a.propType === "enum" && a.enumData ? Array.isArray(n) ? n.map((e) => a.enumData?.labels[e] || e).join(", ") : a.enumData.labels[n] || String(n) : a.propType === "date" || a.propType === "datetime" ? Array.isArray(n) ? n.map((e) => ro(e) ?? "").join(" ~ ") : ro(n) ?? "" : a.propType === "integer" || a.propType === "numeric" ? Array.isArray(n) ? n.map((e) => String(to(e) ?? "")).join(" ~ ") : String(to(n) ?? "") : Array.isArray(n) ? n.join(", ") : String(n) : String(n);
4202
- };
4203
- return e.length === 0 ? /* @__PURE__ */ f(d, { children: n }) : /* @__PURE__ */ p(Y, {
4204
- open: !0,
4205
- children: [/* @__PURE__ */ f(X, {
4206
- asChild: !0,
4207
- children: n
4208
- }), /* @__PURE__ */ f(Z, {
4209
- side: r,
4210
- align: i,
4211
- sideOffset: 5,
4212
- className: "p-3",
4213
- style: { width: "var(--radix-popover-trigger-width)" },
4214
- children: /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("div", {
4215
- className: "text-xs font-semibold mb-2",
4216
- children: a("rc.sonamuFilter.appliedFilters")
4217
- }), /* @__PURE__ */ f("ul", {
4218
- className: "space-y-1.5 text-xs",
4219
- children: e.map((e) => {
4220
- if (!e.field || !e.operator) return null;
4221
- let t = o(e.operator), n = s(e);
4222
- return /* @__PURE__ */ p("li", {
4223
- className: "flex items-start gap-1",
4224
- children: [/* @__PURE__ */ f("span", {
4225
- className: "text-muted-foreground",
4226
- children: "•"
4227
- }), /* @__PURE__ */ p("div", { children: [
4228
- /* @__PURE__ */ f("span", {
4229
- className: "font-medium",
4230
- children: e.field
4231
- }),
4232
- " ",
4233
- /* @__PURE__ */ f("span", {
4234
- className: "text-muted-foreground",
4235
- children: t
4236
- }),
4237
- " ",
4238
- n && /* @__PURE__ */ f("span", { children: n })
4239
- ] })]
4240
- }, e.id);
4241
- })
4242
- })] })
4243
- })]
4244
- });
4245
- }
4246
- //#endregion
4247
- //#region src/components/ui/switch.tsx
4248
- var mo = e.forwardRef(({ className: t, name: n, checked: r, value: i, defaultChecked: a, onValueChange: o, onBlur: s, ...c }, l) => {
4249
- let u = i === void 0 ? r : i, m = e.useRef(null);
4250
- e.useImperativeHandle(l, () => m.current);
4251
- let h = (e) => {
4252
- o?.(e);
4253
- };
4254
- return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("input", {
4255
- type: "checkbox",
4256
- ref: m,
4257
- name: n,
4258
- defaultChecked: a,
4259
- onBlur: s,
4260
- className: "sr-only",
4261
- tabIndex: -1,
4262
- "aria-hidden": "true"
4263
- }), /* @__PURE__ */ f(be.Root, {
4264
- checked: u,
4265
- defaultChecked: a,
4266
- onCheckedChange: h,
4267
- className: G("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", t),
4268
- ...c,
4269
- children: /* @__PURE__ */ f(be.Thumb, { className: G("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0") })
4270
- })] });
4271
- });
4272
- mo.displayName = "Switch";
4273
- //#endregion
4274
- //#region src/components/ui/table.tsx
4275
- function ho({ className: e, containerClassName: t, ...n }) {
4276
- return /* @__PURE__ */ f("div", {
4277
- "data-slot": "table-container",
4278
- className: G("relative w-full overflow-x-auto", t),
4279
- children: /* @__PURE__ */ f("table", {
4280
- "data-slot": "table",
4281
- className: G("w-full caption-bottom text-sm", e),
4282
- ...n
4283
- })
4284
- });
4285
- }
4286
- function go({ className: e, ...t }) {
4287
- return /* @__PURE__ */ f("thead", {
4288
- "data-slot": "table-header",
4289
- className: G("[&_tr]:border-b", e),
4290
- ...t
4291
- });
4292
- }
4293
- function _o({ className: e, ...t }) {
4294
- return /* @__PURE__ */ f("tbody", {
4295
- "data-slot": "table-body",
4296
- className: G("[&_tr:last-child]:border-0", e),
4297
- ...t
4298
- });
4299
- }
4300
- function vo({ className: e, ...t }) {
4301
- return /* @__PURE__ */ f("tfoot", {
4302
- "data-slot": "table-footer",
4303
- className: G("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", e),
4304
- ...t
4305
- });
4306
- }
4307
- function yo({ className: e, ...t }) {
4308
- return /* @__PURE__ */ f("tr", {
4309
- "data-slot": "table-row",
4310
- className: G("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", e),
4311
- ...t
4312
- });
4313
- }
4314
- function bo({ className: e, fit: t, align: n, ...r }) {
4315
- return /* @__PURE__ */ f("th", {
4316
- "data-slot": "table-head",
4317
- className: G("text-foreground h-10 px-2 text-left font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-[2px]", t && "w-px", n === "center" && "text-center", n === "right" && "text-right", e),
4318
- style: { verticalAlign: "middle" },
4319
- ...r
4320
- });
4321
- }
4322
- function xo({ className: e, fit: t, align: n, ...r }) {
4323
- return /* @__PURE__ */ f("td", {
4324
- "data-slot": "table-cell",
4325
- className: G("p-2 whitespace-nowrap [&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-[2px]", t && "w-px", n === "center" && "text-center", n === "right" && "text-right", e),
4326
- style: { verticalAlign: "middle" },
4327
- ...r
4328
- });
4329
- }
4330
- function So({ className: e, ...t }) {
4331
- return /* @__PURE__ */ f("caption", {
4332
- "data-slot": "table-caption",
4333
- className: G("text-muted-foreground mt-4 text-sm", e),
4334
- ...t
4335
- });
4336
- }
4337
- //#endregion
4338
- //#region src/components/ui/tabs.tsx
4339
- var Co = U.Root, wo = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(U.List, {
4340
- ref: n,
4341
- className: G("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", e),
4342
- ...t
4343
- }));
4344
- wo.displayName = U.List.displayName;
4345
- var To = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(U.Trigger, {
4346
- ref: n,
4347
- className: G("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm", e),
4348
- ...t
4349
- }));
4350
- To.displayName = U.Trigger.displayName;
4351
- var Eo = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(U.Content, {
4352
- ref: n,
4353
- className: G("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", e),
4354
- ...t
4355
- }));
4356
- Eo.displayName = U.Content.displayName;
4357
- //#endregion
4358
- //#region src/components/ui/textarea.tsx
4359
- var Do = e.forwardRef(({ className: e, onValueChange: t, onChange: n, ...r }, i) => {
4360
- let a = (e) => {
4361
- t?.(e.target.value), n?.(e);
4362
- };
4363
- return /* @__PURE__ */ f("textarea", {
4364
- className: G("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", e),
4365
- ref: i,
4366
- ...r,
4367
- onChange: a
4368
- });
4369
- });
4370
- Do.displayName = "Textarea";
4371
- //#endregion
4372
- //#region src/components/ui/toast.tsx
4373
- var Oo = W.Provider, ko = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(W.Viewport, {
4374
- ref: n,
4375
- className: G("fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]", e),
4376
- ...t
4377
- }));
4378
- ko.displayName = W.Viewport.displayName;
4379
- var Ao = g("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full", {
4380
- variants: { variant: {
4381
- default: "border bg-background text-foreground",
4382
- destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
4383
- } },
4384
- defaultVariants: { variant: "default" }
4385
- }), jo = e.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ f(W.Root, {
4386
- ref: r,
4387
- className: G(Ao({ variant: t }), e),
4388
- ...n
4389
- }));
4390
- jo.displayName = W.Root.displayName;
4391
- var Mo = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(W.Action, {
4392
- ref: n,
4393
- className: G("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive", e),
4394
- ...t
4395
- }));
4396
- Mo.displayName = W.Action.displayName;
4397
- var No = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(W.Close, {
4398
- ref: n,
4399
- className: G("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", e),
4400
- "toast-close": "",
4401
- ...t,
4402
- children: /* @__PURE__ */ f(Zt, { className: "h-4 w-4" })
4403
- }));
4404
- No.displayName = W.Close.displayName;
4405
- var Po = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(W.Title, {
4406
- ref: n,
4407
- className: G("text-sm font-semibold", e),
4408
- ...t
4409
- }));
4410
- Po.displayName = W.Title.displayName;
4411
- var Fo = e.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(W.Description, {
4412
- ref: n,
4413
- className: G("text-sm opacity-90", e),
4414
- ...t
4415
- }));
4416
- Fo.displayName = W.Description.displayName;
4417
- //#endregion
4418
- //#region src/components/ui/toaster.tsx
4419
- function Io() {
4420
- let { toasts: e } = Pe();
4421
- return /* @__PURE__ */ p(Oo, { children: [e.map(({ id: e, title: t, description: n, action: r, ...i }) => /* @__PURE__ */ p(jo, {
4422
- ...i,
4423
- children: [
4424
- /* @__PURE__ */ p("div", {
4425
- className: "grid gap-1",
4426
- children: [t && /* @__PURE__ */ f(Po, { children: t }), n && /* @__PURE__ */ f(Fo, { children: n })]
4427
- }),
4428
- r,
4429
- /* @__PURE__ */ f(No, {})
4430
- ]
4431
- }, e)), /* @__PURE__ */ f(ko, {})] });
4432
- }
4433
- var Lo = g("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2", {
4434
- variants: {
4435
- variant: {
4436
- default: "bg-transparent",
4437
- outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
4438
- },
4439
- size: {
4440
- default: "h-10 px-3 min-w-10",
4441
- sm: "h-9 px-2.5 min-w-9",
4442
- lg: "h-11 px-5 min-w-11"
4443
- }
4444
- },
4445
- defaultVariants: {
4446
- variant: "default",
4447
- size: "default"
4448
- }
4449
- }), Ro = e.forwardRef(({ className: e, variant: t, size: n, value: r, pressed: i, onValueChange: a, onPressedChange: o, ...s }, c) => {
4450
- let l = r === void 0 ? i : r;
4451
- return /* @__PURE__ */ f(xe.Root, {
4452
- ref: c,
4453
- pressed: l,
4454
- onPressedChange: (e) => {
4455
- a?.(e), o?.(e);
4456
- },
4457
- className: G(Lo({
4458
- variant: t,
4459
- size: n,
4460
- className: e
4461
- })),
4462
- ...s
4463
- });
4464
- });
4465
- Ro.displayName = xe.Root.displayName;
4466
- //#endregion
4467
- //#region src/components/ui/toggle-group.tsx
4468
- var zo = e.createContext({
4469
- size: "default",
4470
- variant: "default"
4471
- }), Bo = e.forwardRef(({ className: e, variant: t, size: n, children: r, ...i }, a) => /* @__PURE__ */ f(Se.Root, {
4472
- ref: a,
4473
- className: G("flex items-center justify-center gap-1", e),
4474
- ...i,
4475
- children: /* @__PURE__ */ f(zo.Provider, {
4476
- value: {
4477
- variant: t,
4478
- size: n
4479
- },
4480
- children: r
4481
- })
4482
- }));
4483
- Bo.displayName = Se.Root.displayName;
4484
- var Vo = e.forwardRef(({ className: t, children: n, variant: r, size: i, ...a }, o) => {
4485
- let s = e.useContext(zo);
4486
- return /* @__PURE__ */ f(Se.Item, {
4487
- ref: o,
4488
- className: G(Lo({
4489
- variant: s.variant || r,
4490
- size: s.size || i
4491
- }), t),
4492
- ...a,
4493
- children: n
4494
- });
4495
- });
4496
- Vo.displayName = Se.Item.displayName;
4497
- //#endregion
4498
- export { Re as Accordion, Ve as AccordionContent, ze as AccordionItem, Be as AccordionTrigger, Ue as Alert, Ge as AlertDescription, Je as AlertDialog, rt as AlertDialogAction, it as AlertDialogCancel, Qe as AlertDialogContent, nt as AlertDialogDescription, et as AlertDialogFooter, $e as AlertDialogHeader, Ze as AlertDialogOverlay, Xe as AlertDialogPortal, tt as AlertDialogTitle, Ye as AlertDialogTrigger, We as AlertTitle, at as AspectRatio, ot as Avatar, ct as AvatarFallback, st as AvatarImage, ut as Badge, pt as Breadcrumb, yt as BreadcrumbEllipsis, ht as BreadcrumbItem, gt as BreadcrumbLink, mt as BreadcrumbList, _t as BreadcrumbPage, vt as BreadcrumbSeparator, K as Button, xt as Calendar, St as Card, Et as CardAction, Dt as CardContent, Tt as CardDescription, Ot as CardFooter, Ct as CardHeader, wt as CardTitle, Nt as Carousel, Pt as CarouselContent, Ft as CarouselItem, Lt as CarouselNext, It as CarouselPrevious, Rt as Checkbox, zt as Collapsible, Vt as CollapsibleContent, Bt as CollapsibleTrigger, yn as Combobox, ln as Command, un as CommandDialog, pn as CommandEmpty, mn as CommandGroup, dn as CommandInput, gn as CommandItem, fn as CommandList, hn as CommandSeparator, _n as CommandShortcut, xn as CommonModal, wn as ContextMenu, Pn as ContextMenuCheckboxItem, Mn as ContextMenuContent, En as ContextMenuGroup, Nn as ContextMenuItem, In as ContextMenuLabel, Dn as ContextMenuPortal, kn as ContextMenuRadioGroup, Fn as ContextMenuRadioItem, Ln as ContextMenuSeparator, Rn as ContextMenuShortcut, On as ContextMenuSub, jn as ContextMenuSubContent, An as ContextMenuSubTrigger, Tn as ContextMenuTrigger, zn as DateInput, Vn as DatePicker, Hn as DatePickerWithDropdown, Un as DatePickerWithRange, Qt as Dialog, tn as DialogClose, rn as DialogContent, cn as DialogDescription, on as DialogFooter, an as DialogHeader, nn as DialogOverlay, en as DialogPortal, sn as DialogTitle, $t as DialogTrigger, Wn as Drawer, qn as DrawerClose, Yn as DrawerContent, $n as DrawerDescription, Zn as DrawerFooter, Xn as DrawerHeader, Jn as DrawerOverlay, Kn as DrawerPortal, Qn as DrawerTitle, Gn as DrawerTrigger, er as DropdownMenu, ur as DropdownMenuCheckboxItem, cr as DropdownMenuContent, nr as DropdownMenuGroup, lr as DropdownMenuItem, fr as DropdownMenuLabel, rr as DropdownMenuPortal, ar as DropdownMenuRadioGroup, dr as DropdownMenuRadioItem, pr as DropdownMenuSeparator, mr as DropdownMenuShortcut, ir as DropdownMenuSub, sr as DropdownMenuSubContent, or as DropdownMenuSubTrigger, tr as DropdownMenuTrigger, Ni as EnumSelect, Cr as FileInput, Er as Form, Nr as FormControl, Pr as FormDescription, Or as FormField, jr as FormItem, Mr as FormLabel, Fr as FormMessage, Ir as HoverCard, Rr as HoverCardContent, Lr as HoverCardTrigger, Ii as IdAsyncSelect, Q as Input, Br as InputOTP, Vr as InputOTPGroup, Ur as InputOTPSeparator, Hr as InputOTPSlot, Tr as Label, Yr as Menubar, ti as MenubarCheckboxItem, $r as MenubarContent, Gr as MenubarGroup, ei as MenubarItem, ri as MenubarLabel, Wr as MenubarMenu, Kr as MenubarPortal, qr as MenubarRadioGroup, ni as MenubarRadioItem, ii as MenubarSeparator, ai as MenubarShortcut, Jr as MenubarSub, Qr as MenubarSubContent, Zr as MenubarSubTrigger, Xr as MenubarTrigger, fi as MonthPickerMultiple, pi as NavigationMenu, vi as NavigationMenuContent, xi as NavigationMenuIndicator, hi as NavigationMenuItem, yi as NavigationMenuLink, mi as NavigationMenuList, _i as NavigationMenuTrigger, bi as NavigationMenuViewport, Si as Pagination, Y as Popover, vn as PopoverAnchor, Z as PopoverContent, X as PopoverTrigger, Ci as Progress, wi as RadioGroup, Ti as RadioGroupItem, Ei as RangeNumberInput, Ai as ResizableHandle, ki as ResizablePanel, Oi as ResizablePanelGroup, ji as ScrollArea, Mi as ScrollBar, $ as Select, oi as Separator, Li as Sheet, zi as SheetClose, Ui as SheetContent, qi as SheetDescription, Gi as SheetFooter, Wi as SheetHeader, Vi as SheetOverlay, Bi as SheetPortal, Ki as SheetTitle, Ri as SheetTrigger, la as Sidebar, _a as SidebarContent, ha as SidebarFooter, va as SidebarGroup, ba as SidebarGroupAction, xa as SidebarGroupContent, ya as SidebarGroupLabel, ma as SidebarHeader, pa as SidebarInput, fa as SidebarInset, Sa as SidebarMenu, Ea as SidebarMenuAction, Da as SidebarMenuBadge, Ta as SidebarMenuButton, Ca as SidebarMenuItem, Oa as SidebarMenuSkeleton, ka as SidebarMenuSub, ja as SidebarMenuSubButton, Aa as SidebarMenuSubItem, ca as SidebarProvider, da as SidebarRail, ga as SidebarSeparator, ua as SidebarTrigger, Zi as Skeleton, Ma as Slider, qa as SonamuFilterModal, po as SonamuFilterPopover, po as SonamuFilterTooltip, Yt as SonamuProvider, mo as Switch, ho as Table, _o as TableBody, So as TableCaption, xo as TableCell, vo as TableFooter, bo as TableHead, go as TableHeader, yo as TableRow, Co as Tabs, Eo as TabsContent, wo as TabsList, To as TabsTrigger, za as TagInput, Do as Textarea, jo as Toast, Mo as ToastAction, No as ToastClose, Fo as ToastDescription, Oo as ToastProvider, Po as ToastTitle, ko as ToastViewport, Io as Toaster, Ro as Toggle, Bo as ToggleGroup, Vo as ToggleGroupItem, $i as Tooltip, ta as TooltipContent, Qi as TooltipProvider, ea as TooltipTrigger, io as arrayableToArray, lt as badgeVariants, qe as buttonVariants, ao as caller, Ya as caster, G as cn, bn as commonModalAtom, no as dateF, ro as datetimeF, Ia as defaultOperatorByPropType, Ka as extractFieldMetaFromSchema, Xa as fastifyCaster, Za as hidden, gi as navigationMenuTriggerStyle, to as numF, Fa as operatorsByPropType, $a as paramsToSearchParams, Qa as searchParamsToParams, eo as sqlDateToDateString, Ne as toast, Lo as toggleVariants, Sn as useCommonModal, kr as useFormField, Xi as useIsMobile, lo as useListParams, fo as useModal, uo as useSelection, sa as useSidebar, J as useSonamuBaseContext, Pe as useToast, so as useTypeForm };
4499
-
4500
- //# sourceMappingURL=react-components.es.js.map