shadcn-zod-formkit 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs ADDED
@@ -0,0 +1,3769 @@
1
+ 'use strict';
2
+
3
+ var lucideReact = require('lucide-react');
4
+ var reactIcons = require('@radix-ui/react-icons');
5
+ var classVarianceAuthority = require('class-variance-authority');
6
+ var tailwindMerge = require('tailwind-merge');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+ var React3 = require('react');
9
+ var reactHookForm = require('react-hook-form');
10
+ var AccordionPrimitive = require('@radix-ui/react-accordion');
11
+ var reactSlot = require('@radix-ui/react-slot');
12
+ var reactDayPicker = require('react-day-picker');
13
+ var CheckboxPrimitive = require('@radix-ui/react-checkbox');
14
+ var reactColorPalette = require('react-color-palette');
15
+ var PopoverPrimitive = require('@radix-ui/react-popover');
16
+ require('react-color-palette/css');
17
+ var DialogPrimitive = require('@radix-ui/react-dialog');
18
+ var LabelPrimitive = require('@radix-ui/react-label');
19
+ var inputOtp = require('input-otp');
20
+ var ResizablePrimitive = require('react-resizable-panels');
21
+ var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
22
+ var SelectPrimitive = require('@radix-ui/react-select');
23
+ var SeparatorPrimitive = require('@radix-ui/react-separator');
24
+ var nextThemes = require('next-themes');
25
+ var sonner = require('sonner');
26
+ var SwitchPrimitive = require('@radix-ui/react-switch');
27
+ var TooltipPrimitive = require('@radix-ui/react-tooltip');
28
+ var z2 = require('zod');
29
+ var zod = require('@hookform/resolvers/zod');
30
+
31
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
32
+
33
+ function _interopNamespace(e) {
34
+ if (e && e.__esModule) return e;
35
+ var n = Object.create(null);
36
+ if (e) {
37
+ Object.keys(e).forEach(function (k) {
38
+ if (k !== 'default') {
39
+ var d = Object.getOwnPropertyDescriptor(e, k);
40
+ Object.defineProperty(n, k, d.get ? d : {
41
+ enumerable: true,
42
+ get: function () { return e[k]; }
43
+ });
44
+ }
45
+ });
46
+ }
47
+ n.default = e;
48
+ return Object.freeze(n);
49
+ }
50
+
51
+ var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
52
+ var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
53
+ var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
54
+ var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
55
+ var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
56
+ var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
57
+ var ResizablePrimitive__namespace = /*#__PURE__*/_interopNamespace(ResizablePrimitive);
58
+ var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
59
+ var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
60
+ var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
61
+ var SwitchPrimitive__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitive);
62
+ var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
63
+ var z2__default = /*#__PURE__*/_interopDefault(z2);
64
+
65
+ // node_modules/clsx/dist/clsx.mjs
66
+ function r(e) {
67
+ var t, f, n = "";
68
+ if ("string" == typeof e || "number" == typeof e) n += e;
69
+ else if ("object" == typeof e) if (Array.isArray(e)) {
70
+ var o = e.length;
71
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
72
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
73
+ return n;
74
+ }
75
+ function clsx() {
76
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
77
+ return n;
78
+ }
79
+ function cn(...inputs) {
80
+ return tailwindMerge.twMerge(clsx(inputs));
81
+ }
82
+ var alertVariants = classVarianceAuthority.cva(
83
+ "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
84
+ {
85
+ variants: {
86
+ variant: {
87
+ default: "bg-card text-card-foreground",
88
+ destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"
89
+ }
90
+ },
91
+ defaultVariants: {
92
+ variant: "default"
93
+ }
94
+ }
95
+ );
96
+ function Alert({
97
+ className,
98
+ variant,
99
+ ...props
100
+ }) {
101
+ return /* @__PURE__ */ jsxRuntime.jsx(
102
+ "div",
103
+ {
104
+ "data-slot": "alert",
105
+ role: "alert",
106
+ className: cn(alertVariants({ variant }), className),
107
+ ...props
108
+ }
109
+ );
110
+ }
111
+ function AlertTitle({ className, ...props }) {
112
+ return /* @__PURE__ */ jsxRuntime.jsx(
113
+ "div",
114
+ {
115
+ "data-slot": "alert-title",
116
+ className: cn(
117
+ "col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
118
+ className
119
+ ),
120
+ ...props
121
+ }
122
+ );
123
+ }
124
+ function AlertDescription({
125
+ className,
126
+ ...props
127
+ }) {
128
+ return /* @__PURE__ */ jsxRuntime.jsx(
129
+ "div",
130
+ {
131
+ "data-slot": "alert-description",
132
+ className: cn(
133
+ "text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
134
+ className
135
+ ),
136
+ ...props
137
+ }
138
+ );
139
+ }
140
+ var CustomAlert = ({
141
+ title,
142
+ description,
143
+ className = "",
144
+ variant = "info"
145
+ }) => {
146
+ const variantClasses = {
147
+ info: "bg-blue-500/25",
148
+ warning: "bg-yellow-500/25",
149
+ error: "bg-red-500/25",
150
+ success: "bg-green-500/25"
151
+ };
152
+ const variantIcons = {
153
+ info: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageCircleWarning, { size: 32, className: "text-blue-400" }),
154
+ warning: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageCircleWarning, { size: 32, className: "text-yellow-400" }),
155
+ error: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageCircleWarning, { size: 32, className: "text-red-400" }),
156
+ success: /* @__PURE__ */ jsxRuntime.jsx(reactIcons.InfoCircledIcon, { className: "w-8 h-8 text-green-400" })
157
+ };
158
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(
159
+ Alert,
160
+ {
161
+ className: `mb-4 flex items-start gap-3 ${variantClasses[variant]} ${className}`,
162
+ children: [
163
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: variantIcons[variant] }),
164
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
165
+ /* @__PURE__ */ jsxRuntime.jsx(AlertTitle, { className: "font-semibold text-xl", children: title }),
166
+ /* @__PURE__ */ jsxRuntime.jsx(AlertDescription, { className: "text-sm text-muted-foreground", children: description })
167
+ ] })
168
+ ]
169
+ }
170
+ ) });
171
+ };
172
+
173
+ // src/components/custom/form/input-errors.ts
174
+ var validationMessages = {
175
+ required: "Este campo es obligatorio",
176
+ email: "El correo electr\xF3nico no es v\xE1lido",
177
+ invalidFormat: "Formato inv\xE1lido",
178
+ onlyPositive: "Solo n\xFAmeros positivos",
179
+ minLength: (length) => `Debe tener al menos ${length} caracteres`,
180
+ maxLength: (length) => `No puede tener m\xE1s de ${length} caracteres`,
181
+ passwordMismatch: "Las contrase\xF1as no coinciden",
182
+ invalidPhone: "El n\xFAmero de tel\xE9fono no es v\xE1lido"
183
+ };
184
+
185
+ // src/components/custom/form/inputs/base/base-input.ts
186
+ var BaseInput = class {
187
+ constructor(input, form) {
188
+ this.input = input;
189
+ this.form = form;
190
+ }
191
+ };
192
+
193
+ // src/components/custom/form/inputs/base/definitions.ts
194
+ var TextInputType = /* @__PURE__ */ ((TextInputType2) => {
195
+ TextInputType2["DEFAULT"] = "default";
196
+ TextInputType2["NUMBER"] = "number";
197
+ TextInputType2["EMAIL"] = "email";
198
+ TextInputType2["PHONE"] = "phone";
199
+ TextInputType2["PASSWORD"] = "password";
200
+ return TextInputType2;
201
+ })(TextInputType || {});
202
+
203
+ // src/components/custom/form/inputs/base/input-types.ts
204
+ var InputTypes = /* @__PURE__ */ ((InputTypes2) => {
205
+ InputTypes2["HIDDEN"] = "hidden";
206
+ InputTypes2["TEXT"] = "text";
207
+ InputTypes2["NUMBER"] = "number";
208
+ InputTypes2["SWITCH"] = "switch";
209
+ InputTypes2["SELECT"] = "select";
210
+ InputTypes2["CHECK_LIST"] = "checklist";
211
+ InputTypes2["GROUPED_SWITCH_LIST"] = "grouped_switchlist";
212
+ InputTypes2["DATE"] = "date";
213
+ InputTypes2["TEXTAREA"] = "textarea";
214
+ InputTypes2["FILE"] = "file";
215
+ InputTypes2["OTP"] = "otp";
216
+ InputTypes2["FORM"] = "form";
217
+ InputTypes2["COLOR"] = "color";
218
+ return InputTypes2;
219
+ })(InputTypes || {});
220
+ var inputFieldComp = [
221
+ "grouped_switchlist" /* GROUPED_SWITCH_LIST */,
222
+ "text" /* TEXT */,
223
+ "switch" /* SWITCH */,
224
+ "color" /* COLOR */,
225
+ "otp" /* OTP */,
226
+ "select" /* SELECT */,
227
+ "date" /* DATE */,
228
+ "file" /* FILE */,
229
+ "form" /* FORM */,
230
+ "number" /* NUMBER */,
231
+ "textarea" /* TEXTAREA */,
232
+ // InputTypes.SWITCH_LIST,
233
+ "hidden" /* HIDDEN */
234
+ ];
235
+ function Accordion({
236
+ ...props
237
+ }) {
238
+ return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Root, { "data-slot": "accordion", ...props });
239
+ }
240
+ function AccordionItem({
241
+ className,
242
+ ...props
243
+ }) {
244
+ return /* @__PURE__ */ jsxRuntime.jsx(
245
+ AccordionPrimitive__namespace.Item,
246
+ {
247
+ "data-slot": "accordion-item",
248
+ className: cn("border-b last:border-b-0", className),
249
+ ...props
250
+ }
251
+ );
252
+ }
253
+ function AccordionTrigger({
254
+ className,
255
+ children,
256
+ ...props
257
+ }) {
258
+ return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
259
+ AccordionPrimitive__namespace.Trigger,
260
+ {
261
+ "data-slot": "accordion-trigger",
262
+ className: cn(
263
+ "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
264
+ className
265
+ ),
266
+ ...props,
267
+ children: [
268
+ children,
269
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
270
+ ]
271
+ }
272
+ ) });
273
+ }
274
+ function AccordionContent({
275
+ className,
276
+ children,
277
+ ...props
278
+ }) {
279
+ return /* @__PURE__ */ jsxRuntime.jsx(
280
+ AccordionPrimitive__namespace.Content,
281
+ {
282
+ "data-slot": "accordion-content",
283
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
284
+ ...props,
285
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("pt-0 pb-4", className), children })
286
+ }
287
+ );
288
+ }
289
+ var badgeVariants = classVarianceAuthority.cva(
290
+ "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",
291
+ {
292
+ variants: {
293
+ variant: {
294
+ default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
295
+ secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
296
+ 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",
297
+ outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
298
+ }
299
+ },
300
+ defaultVariants: {
301
+ variant: "default"
302
+ }
303
+ }
304
+ );
305
+ function Badge({
306
+ className,
307
+ variant,
308
+ asChild = false,
309
+ ...props
310
+ }) {
311
+ const Comp = asChild ? reactSlot.Slot : "span";
312
+ return /* @__PURE__ */ jsxRuntime.jsx(
313
+ Comp,
314
+ {
315
+ "data-slot": "badge",
316
+ className: cn(badgeVariants({ variant }), className),
317
+ ...props
318
+ }
319
+ );
320
+ }
321
+ var buttonVariants = classVarianceAuthority.cva(
322
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 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",
323
+ {
324
+ variants: {
325
+ variant: {
326
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
327
+ destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
328
+ outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
329
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
330
+ ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
331
+ link: "text-primary underline-offset-4 hover:underline"
332
+ },
333
+ size: {
334
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
335
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
336
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
337
+ icon: "size-9"
338
+ }
339
+ },
340
+ defaultVariants: {
341
+ variant: "default",
342
+ size: "default"
343
+ }
344
+ }
345
+ );
346
+ function Button({
347
+ className,
348
+ variant,
349
+ size,
350
+ asChild = false,
351
+ ...props
352
+ }) {
353
+ const Comp = asChild ? reactSlot.Slot : "button";
354
+ return /* @__PURE__ */ jsxRuntime.jsx(
355
+ Comp,
356
+ {
357
+ "data-slot": "button",
358
+ className: cn(buttonVariants({ variant, size, className })),
359
+ ...props
360
+ }
361
+ );
362
+ }
363
+ function Calendar({
364
+ className,
365
+ classNames,
366
+ showOutsideDays = true,
367
+ captionLayout = "label",
368
+ buttonVariant = "ghost",
369
+ formatters: formatters2,
370
+ components,
371
+ ...props
372
+ }) {
373
+ const defaultClassNames = reactDayPicker.getDefaultClassNames();
374
+ return /* @__PURE__ */ jsxRuntime.jsx(
375
+ reactDayPicker.DayPicker,
376
+ {
377
+ showOutsideDays,
378
+ className: cn(
379
+ "bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
380
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
381
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
382
+ className
383
+ ),
384
+ captionLayout,
385
+ formatters: {
386
+ formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
387
+ ...formatters2
388
+ },
389
+ classNames: {
390
+ root: cn("w-fit", defaultClassNames.root),
391
+ months: cn(
392
+ "flex gap-4 flex-col md:flex-row relative",
393
+ defaultClassNames.months
394
+ ),
395
+ month: cn("flex flex-col w-full gap-4", defaultClassNames.month),
396
+ nav: cn(
397
+ "flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",
398
+ defaultClassNames.nav
399
+ ),
400
+ button_previous: cn(
401
+ buttonVariants({ variant: buttonVariant }),
402
+ "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
403
+ defaultClassNames.button_previous
404
+ ),
405
+ button_next: cn(
406
+ buttonVariants({ variant: buttonVariant }),
407
+ "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
408
+ defaultClassNames.button_next
409
+ ),
410
+ month_caption: cn(
411
+ "flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",
412
+ defaultClassNames.month_caption
413
+ ),
414
+ dropdowns: cn(
415
+ "w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",
416
+ defaultClassNames.dropdowns
417
+ ),
418
+ dropdown_root: cn(
419
+ "relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
420
+ defaultClassNames.dropdown_root
421
+ ),
422
+ dropdown: cn(
423
+ "absolute bg-popover inset-0 opacity-0",
424
+ defaultClassNames.dropdown
425
+ ),
426
+ caption_label: cn(
427
+ "select-none font-medium",
428
+ captionLayout === "label" ? "text-sm" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
429
+ defaultClassNames.caption_label
430
+ ),
431
+ table: "w-full border-collapse",
432
+ weekdays: cn("flex", defaultClassNames.weekdays),
433
+ weekday: cn(
434
+ "text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",
435
+ defaultClassNames.weekday
436
+ ),
437
+ week: cn("flex w-full mt-2", defaultClassNames.week),
438
+ week_number_header: cn(
439
+ "select-none w-(--cell-size)",
440
+ defaultClassNames.week_number_header
441
+ ),
442
+ week_number: cn(
443
+ "text-[0.8rem] select-none text-muted-foreground",
444
+ defaultClassNames.week_number
445
+ ),
446
+ day: cn(
447
+ "relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",
448
+ defaultClassNames.day
449
+ ),
450
+ range_start: cn(
451
+ "rounded-l-md bg-accent",
452
+ defaultClassNames.range_start
453
+ ),
454
+ range_middle: cn("rounded-none", defaultClassNames.range_middle),
455
+ range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
456
+ today: cn(
457
+ "bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
458
+ defaultClassNames.today
459
+ ),
460
+ outside: cn(
461
+ "text-muted-foreground aria-selected:text-muted-foreground",
462
+ defaultClassNames.outside
463
+ ),
464
+ disabled: cn(
465
+ "text-muted-foreground opacity-50",
466
+ defaultClassNames.disabled
467
+ ),
468
+ hidden: cn("invisible", defaultClassNames.hidden),
469
+ ...classNames
470
+ },
471
+ components: {
472
+ Root: ({ className: className2, rootRef, ...props2 }) => {
473
+ return /* @__PURE__ */ jsxRuntime.jsx(
474
+ "div",
475
+ {
476
+ "data-slot": "calendar",
477
+ ref: rootRef,
478
+ className: cn(className2),
479
+ ...props2
480
+ }
481
+ );
482
+ },
483
+ Chevron: ({ className: className2, orientation, ...props2 }) => {
484
+ if (orientation === "left") {
485
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
486
+ }
487
+ if (orientation === "right") {
488
+ return /* @__PURE__ */ jsxRuntime.jsx(
489
+ lucideReact.ChevronRightIcon,
490
+ {
491
+ className: cn("size-4", className2),
492
+ ...props2
493
+ }
494
+ );
495
+ }
496
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: cn("size-4", className2), ...props2 });
497
+ },
498
+ DayButton: CalendarDayButton,
499
+ WeekNumber: ({ children, ...props2 }) => {
500
+ return /* @__PURE__ */ jsxRuntime.jsx("td", { ...props2, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
501
+ },
502
+ ...components
503
+ },
504
+ ...props
505
+ }
506
+ );
507
+ }
508
+ function CalendarDayButton({
509
+ className,
510
+ day,
511
+ modifiers,
512
+ ...props
513
+ }) {
514
+ const defaultClassNames = reactDayPicker.getDefaultClassNames();
515
+ const ref = React3__namespace.useRef(null);
516
+ React3__namespace.useEffect(() => {
517
+ if (modifiers.focused) ref.current?.focus();
518
+ }, [modifiers.focused]);
519
+ return /* @__PURE__ */ jsxRuntime.jsx(
520
+ Button,
521
+ {
522
+ ref,
523
+ variant: "ghost",
524
+ size: "icon",
525
+ "data-day": day.date.toLocaleDateString(),
526
+ "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
527
+ "data-range-start": modifiers.range_start,
528
+ "data-range-end": modifiers.range_end,
529
+ "data-range-middle": modifiers.range_middle,
530
+ className: cn(
531
+ "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
532
+ defaultClassNames.day,
533
+ className
534
+ ),
535
+ ...props
536
+ }
537
+ );
538
+ }
539
+ function Card({ className, ...props }) {
540
+ return /* @__PURE__ */ jsxRuntime.jsx(
541
+ "div",
542
+ {
543
+ "data-slot": "card",
544
+ className: cn(
545
+ "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
546
+ className
547
+ ),
548
+ ...props
549
+ }
550
+ );
551
+ }
552
+ function CardHeader({ className, ...props }) {
553
+ return /* @__PURE__ */ jsxRuntime.jsx(
554
+ "div",
555
+ {
556
+ "data-slot": "card-header",
557
+ className: cn(
558
+ "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
559
+ className
560
+ ),
561
+ ...props
562
+ }
563
+ );
564
+ }
565
+ function CardTitle({ className, ...props }) {
566
+ return /* @__PURE__ */ jsxRuntime.jsx(
567
+ "div",
568
+ {
569
+ "data-slot": "card-title",
570
+ className: cn("leading-none font-semibold", className),
571
+ ...props
572
+ }
573
+ );
574
+ }
575
+ function CardDescription({ className, ...props }) {
576
+ return /* @__PURE__ */ jsxRuntime.jsx(
577
+ "div",
578
+ {
579
+ "data-slot": "card-description",
580
+ className: cn("text-muted-foreground text-sm", className),
581
+ ...props
582
+ }
583
+ );
584
+ }
585
+ function CardAction({ className, ...props }) {
586
+ return /* @__PURE__ */ jsxRuntime.jsx(
587
+ "div",
588
+ {
589
+ "data-slot": "card-action",
590
+ className: cn(
591
+ "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
592
+ className
593
+ ),
594
+ ...props
595
+ }
596
+ );
597
+ }
598
+ function CardContent({ className, ...props }) {
599
+ return /* @__PURE__ */ jsxRuntime.jsx(
600
+ "div",
601
+ {
602
+ "data-slot": "card-content",
603
+ className: cn("px-6", className),
604
+ ...props
605
+ }
606
+ );
607
+ }
608
+ function CardFooter({ className, ...props }) {
609
+ return /* @__PURE__ */ jsxRuntime.jsx(
610
+ "div",
611
+ {
612
+ "data-slot": "card-footer",
613
+ className: cn("flex items-center px-6 [.border-t]:pt-6", className),
614
+ ...props
615
+ }
616
+ );
617
+ }
618
+ function Checkbox({
619
+ className,
620
+ ...props
621
+ }) {
622
+ return /* @__PURE__ */ jsxRuntime.jsx(
623
+ CheckboxPrimitive__namespace.Root,
624
+ {
625
+ "data-slot": "checkbox",
626
+ className: cn(
627
+ "peer border-input 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] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
628
+ className
629
+ ),
630
+ ...props,
631
+ children: /* @__PURE__ */ jsxRuntime.jsx(
632
+ CheckboxPrimitive__namespace.Indicator,
633
+ {
634
+ "data-slot": "checkbox-indicator",
635
+ className: "flex items-center justify-center text-current transition-none",
636
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "size-3.5" })
637
+ }
638
+ )
639
+ }
640
+ );
641
+ }
642
+ function Popover({
643
+ ...props
644
+ }) {
645
+ return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Root, { "data-slot": "popover", ...props });
646
+ }
647
+ function PopoverTrigger({
648
+ ...props
649
+ }) {
650
+ return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { "data-slot": "popover-trigger", ...props });
651
+ }
652
+ function PopoverContent({
653
+ className,
654
+ align = "center",
655
+ sideOffset = 4,
656
+ ...props
657
+ }) {
658
+ return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
659
+ PopoverPrimitive__namespace.Content,
660
+ {
661
+ "data-slot": "popover-content",
662
+ align,
663
+ sideOffset,
664
+ className: cn(
665
+ "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",
666
+ className
667
+ ),
668
+ ...props
669
+ }
670
+ ) });
671
+ }
672
+ function PopoverAnchor({
673
+ ...props
674
+ }) {
675
+ return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Anchor, { "data-slot": "popover-anchor", ...props });
676
+ }
677
+ var ColorCnInput = React3__namespace.forwardRef(
678
+ ({ value = "#000000", onChange, onBlur, disabled, className }, ref) => {
679
+ const [color, setColor] = reactColorPalette.useColor(value);
680
+ const [open, setOpen] = React3__namespace.useState(false);
681
+ React3__namespace.useEffect(() => {
682
+ if (value !== color.hex) {
683
+ setColor({ ...color, hex: value });
684
+ }
685
+ }, [color, setColor, value]);
686
+ const handleColorChange = (newColor) => {
687
+ setColor(newColor);
688
+ onChange?.(newColor.hex);
689
+ };
690
+ const handleOpenChange = (newOpen) => {
691
+ setOpen(newOpen);
692
+ if (!newOpen) {
693
+ onBlur?.();
694
+ }
695
+ };
696
+ return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: handleOpenChange, children: [
697
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
698
+ Button,
699
+ {
700
+ ref,
701
+ variant: "outline",
702
+ disabled,
703
+ className: cn("w-full justify-start text-left font-normal", !value && "text-muted-foreground", className),
704
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
705
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4 rounded border border-border", style: { backgroundColor: color.hex } }),
706
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: color.hex })
707
+ ] })
708
+ }
709
+ ) }),
710
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-3", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx(reactColorPalette.ColorPicker, { color, onChange: handleColorChange, hideInput: ["rgb", "hsv"] }) })
711
+ ] });
712
+ }
713
+ );
714
+ ColorCnInput.displayName = "ColorCnInput";
715
+ function Dialog({
716
+ ...props
717
+ }) {
718
+ return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { "data-slot": "dialog", ...props });
719
+ }
720
+ function DialogTrigger({
721
+ ...props
722
+ }) {
723
+ return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Trigger, { "data-slot": "dialog-trigger", ...props });
724
+ }
725
+ function DialogPortal({
726
+ ...props
727
+ }) {
728
+ return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Portal, { "data-slot": "dialog-portal", ...props });
729
+ }
730
+ function DialogClose({
731
+ ...props
732
+ }) {
733
+ return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Close, { "data-slot": "dialog-close", ...props });
734
+ }
735
+ function DialogOverlay({
736
+ className,
737
+ ...props
738
+ }) {
739
+ return /* @__PURE__ */ jsxRuntime.jsx(
740
+ DialogPrimitive__namespace.Overlay,
741
+ {
742
+ "data-slot": "dialog-overlay",
743
+ className: cn(
744
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
745
+ className
746
+ ),
747
+ ...props
748
+ }
749
+ );
750
+ }
751
+ function DialogContent({
752
+ className,
753
+ children,
754
+ showCloseButton = true,
755
+ ...props
756
+ }) {
757
+ return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
758
+ /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
759
+ /* @__PURE__ */ jsxRuntime.jsxs(
760
+ DialogPrimitive__namespace.Content,
761
+ {
762
+ "data-slot": "dialog-content",
763
+ className: cn(
764
+ "bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
765
+ className
766
+ ),
767
+ ...props,
768
+ children: [
769
+ children,
770
+ showCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(
771
+ DialogPrimitive__namespace.Close,
772
+ {
773
+ "data-slot": "dialog-close",
774
+ className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
775
+ children: [
776
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, {}),
777
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
778
+ ]
779
+ }
780
+ )
781
+ ]
782
+ }
783
+ )
784
+ ] });
785
+ }
786
+ function DialogHeader({ className, ...props }) {
787
+ return /* @__PURE__ */ jsxRuntime.jsx(
788
+ "div",
789
+ {
790
+ "data-slot": "dialog-header",
791
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
792
+ ...props
793
+ }
794
+ );
795
+ }
796
+ function DialogFooter({ className, ...props }) {
797
+ return /* @__PURE__ */ jsxRuntime.jsx(
798
+ "div",
799
+ {
800
+ "data-slot": "dialog-footer",
801
+ className: cn(
802
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
803
+ className
804
+ ),
805
+ ...props
806
+ }
807
+ );
808
+ }
809
+ function DialogTitle({
810
+ className,
811
+ ...props
812
+ }) {
813
+ return /* @__PURE__ */ jsxRuntime.jsx(
814
+ DialogPrimitive__namespace.Title,
815
+ {
816
+ "data-slot": "dialog-title",
817
+ className: cn("text-lg leading-none font-semibold", className),
818
+ ...props
819
+ }
820
+ );
821
+ }
822
+ function DialogDescription({
823
+ className,
824
+ ...props
825
+ }) {
826
+ return /* @__PURE__ */ jsxRuntime.jsx(
827
+ DialogPrimitive__namespace.Description,
828
+ {
829
+ "data-slot": "dialog-description",
830
+ className: cn("text-muted-foreground text-sm", className),
831
+ ...props
832
+ }
833
+ );
834
+ }
835
+ function Label({
836
+ className,
837
+ ...props
838
+ }) {
839
+ return /* @__PURE__ */ jsxRuntime.jsx(
840
+ LabelPrimitive__namespace.Root,
841
+ {
842
+ "data-slot": "label",
843
+ className: cn(
844
+ "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
845
+ className
846
+ ),
847
+ ...props
848
+ }
849
+ );
850
+ }
851
+ var Form = reactHookForm.FormProvider;
852
+ var FormFieldContext = React3__namespace.createContext(
853
+ {}
854
+ );
855
+ var FormField = ({
856
+ ...props
857
+ }) => {
858
+ return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsxRuntime.jsx(reactHookForm.Controller, { ...props }) });
859
+ };
860
+ var useFormField = () => {
861
+ const fieldContext = React3__namespace.useContext(FormFieldContext);
862
+ const itemContext = React3__namespace.useContext(FormItemContext);
863
+ const { getFieldState } = reactHookForm.useFormContext();
864
+ const formState = reactHookForm.useFormState({ name: fieldContext.name });
865
+ const fieldState = getFieldState(fieldContext.name, formState);
866
+ if (!fieldContext) {
867
+ throw new Error("useFormField should be used within <FormField>");
868
+ }
869
+ const { id } = itemContext;
870
+ return {
871
+ id,
872
+ name: fieldContext.name,
873
+ formItemId: `${id}-form-item`,
874
+ formDescriptionId: `${id}-form-item-description`,
875
+ formMessageId: `${id}-form-item-message`,
876
+ ...fieldState
877
+ };
878
+ };
879
+ var FormItemContext = React3__namespace.createContext(
880
+ {}
881
+ );
882
+ function FormItem({ className, ...props }) {
883
+ const id = React3__namespace.useId();
884
+ return /* @__PURE__ */ jsxRuntime.jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsxRuntime.jsx(
885
+ "div",
886
+ {
887
+ "data-slot": "form-item",
888
+ className: cn("grid gap-2", className),
889
+ ...props
890
+ }
891
+ ) });
892
+ }
893
+ function FormLabel({
894
+ className,
895
+ ...props
896
+ }) {
897
+ const { error, formItemId } = useFormField();
898
+ return /* @__PURE__ */ jsxRuntime.jsx(
899
+ Label,
900
+ {
901
+ "data-slot": "form-label",
902
+ "data-error": !!error,
903
+ className: cn("data-[error=true]:text-destructive", className),
904
+ htmlFor: formItemId,
905
+ ...props
906
+ }
907
+ );
908
+ }
909
+ function FormControl({ ...props }) {
910
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
911
+ return /* @__PURE__ */ jsxRuntime.jsx(
912
+ reactSlot.Slot,
913
+ {
914
+ "data-slot": "form-control",
915
+ id: formItemId,
916
+ "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
917
+ "aria-invalid": !!error,
918
+ ...props
919
+ }
920
+ );
921
+ }
922
+ function FormDescription({ className, ...props }) {
923
+ const { formDescriptionId } = useFormField();
924
+ return /* @__PURE__ */ jsxRuntime.jsx(
925
+ "p",
926
+ {
927
+ "data-slot": "form-description",
928
+ id: formDescriptionId,
929
+ className: cn("text-muted-foreground text-sm", className),
930
+ ...props
931
+ }
932
+ );
933
+ }
934
+ function FormMessage({ className, ...props }) {
935
+ const { error, formMessageId } = useFormField();
936
+ const body = error ? String(error?.message ?? "") : props.children;
937
+ if (!body) {
938
+ return null;
939
+ }
940
+ return /* @__PURE__ */ jsxRuntime.jsx(
941
+ "p",
942
+ {
943
+ "data-slot": "form-message",
944
+ id: formMessageId,
945
+ className: cn("text-destructive text-sm", className),
946
+ ...props,
947
+ children: body
948
+ }
949
+ );
950
+ }
951
+ function InputOTP({
952
+ className,
953
+ containerClassName,
954
+ ...props
955
+ }) {
956
+ return /* @__PURE__ */ jsxRuntime.jsx(
957
+ inputOtp.OTPInput,
958
+ {
959
+ "data-slot": "input-otp",
960
+ containerClassName: cn(
961
+ "flex items-center gap-2 has-disabled:opacity-50",
962
+ containerClassName
963
+ ),
964
+ className: cn("disabled:cursor-not-allowed", className),
965
+ ...props
966
+ }
967
+ );
968
+ }
969
+ function InputOTPGroup({ className, ...props }) {
970
+ return /* @__PURE__ */ jsxRuntime.jsx(
971
+ "div",
972
+ {
973
+ "data-slot": "input-otp-group",
974
+ className: cn("flex items-center", className),
975
+ ...props
976
+ }
977
+ );
978
+ }
979
+ function InputOTPSlot({
980
+ index,
981
+ className,
982
+ ...props
983
+ }) {
984
+ const inputOTPContext = React3__namespace.useContext(inputOtp.OTPInputContext);
985
+ const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
986
+ return /* @__PURE__ */ jsxRuntime.jsxs(
987
+ "div",
988
+ {
989
+ "data-slot": "input-otp-slot",
990
+ "data-active": isActive,
991
+ className: cn(
992
+ "data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",
993
+ className
994
+ ),
995
+ ...props,
996
+ children: [
997
+ char,
998
+ hasFakeCaret && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) })
999
+ ]
1000
+ }
1001
+ );
1002
+ }
1003
+ function InputOTPSeparator({ ...props }) {
1004
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MinusIcon, {}) });
1005
+ }
1006
+ function Input({ className, type, ...props }) {
1007
+ return /* @__PURE__ */ jsxRuntime.jsx(
1008
+ "input",
1009
+ {
1010
+ type,
1011
+ "data-slot": "input",
1012
+ className: cn(
1013
+ "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs 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",
1014
+ "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
1015
+ "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
1016
+ className
1017
+ ),
1018
+ ...props
1019
+ }
1020
+ );
1021
+ }
1022
+ function ResizablePanelGroup({
1023
+ className,
1024
+ ...props
1025
+ }) {
1026
+ return /* @__PURE__ */ jsxRuntime.jsx(
1027
+ ResizablePrimitive__namespace.PanelGroup,
1028
+ {
1029
+ "data-slot": "resizable-panel-group",
1030
+ className: cn(
1031
+ "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
1032
+ className
1033
+ ),
1034
+ ...props
1035
+ }
1036
+ );
1037
+ }
1038
+ function ResizablePanel({
1039
+ ...props
1040
+ }) {
1041
+ return /* @__PURE__ */ jsxRuntime.jsx(ResizablePrimitive__namespace.Panel, { "data-slot": "resizable-panel", ...props });
1042
+ }
1043
+ function ResizableHandle({
1044
+ withHandle,
1045
+ className,
1046
+ ...props
1047
+ }) {
1048
+ return /* @__PURE__ */ jsxRuntime.jsx(
1049
+ ResizablePrimitive__namespace.PanelResizeHandle,
1050
+ {
1051
+ "data-slot": "resizable-handle",
1052
+ className: cn(
1053
+ "bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden 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-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
1054
+ className
1055
+ ),
1056
+ ...props,
1057
+ children: withHandle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.GripVerticalIcon, { className: "size-2.5" }) })
1058
+ }
1059
+ );
1060
+ }
1061
+ function ScrollArea({
1062
+ className,
1063
+ children,
1064
+ ...props
1065
+ }) {
1066
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1067
+ ScrollAreaPrimitive__namespace.Root,
1068
+ {
1069
+ "data-slot": "scroll-area",
1070
+ className: cn("relative", className),
1071
+ ...props,
1072
+ children: [
1073
+ /* @__PURE__ */ jsxRuntime.jsx(
1074
+ ScrollAreaPrimitive__namespace.Viewport,
1075
+ {
1076
+ "data-slot": "scroll-area-viewport",
1077
+ className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
1078
+ children
1079
+ }
1080
+ ),
1081
+ /* @__PURE__ */ jsxRuntime.jsx(ScrollBar, {}),
1082
+ /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Corner, {})
1083
+ ]
1084
+ }
1085
+ );
1086
+ }
1087
+ function ScrollBar({
1088
+ className,
1089
+ orientation = "vertical",
1090
+ ...props
1091
+ }) {
1092
+ return /* @__PURE__ */ jsxRuntime.jsx(
1093
+ ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
1094
+ {
1095
+ "data-slot": "scroll-area-scrollbar",
1096
+ orientation,
1097
+ className: cn(
1098
+ "flex touch-none p-px transition-colors select-none",
1099
+ orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
1100
+ orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
1101
+ className
1102
+ ),
1103
+ ...props,
1104
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1105
+ ScrollAreaPrimitive__namespace.ScrollAreaThumb,
1106
+ {
1107
+ "data-slot": "scroll-area-thumb",
1108
+ className: "bg-border relative flex-1 rounded-full"
1109
+ }
1110
+ )
1111
+ }
1112
+ );
1113
+ }
1114
+ function Select({
1115
+ ...props
1116
+ }) {
1117
+ return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Root, { "data-slot": "select", ...props });
1118
+ }
1119
+ function SelectGroup({
1120
+ ...props
1121
+ }) {
1122
+ return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Group, { "data-slot": "select-group", ...props });
1123
+ }
1124
+ function SelectValue({
1125
+ ...props
1126
+ }) {
1127
+ return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Value, { "data-slot": "select-value", ...props });
1128
+ }
1129
+ function SelectTrigger({
1130
+ className,
1131
+ size = "default",
1132
+ children,
1133
+ ...props
1134
+ }) {
1135
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1136
+ SelectPrimitive__namespace.Trigger,
1137
+ {
1138
+ "data-slot": "select-trigger",
1139
+ "data-size": size,
1140
+ className: cn(
1141
+ "border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1142
+ className
1143
+ ),
1144
+ ...props,
1145
+ children: [
1146
+ children,
1147
+ /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4 opacity-50" }) })
1148
+ ]
1149
+ }
1150
+ );
1151
+ }
1152
+ function SelectContent({
1153
+ className,
1154
+ children,
1155
+ position = "popper",
1156
+ ...props
1157
+ }) {
1158
+ return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
1159
+ SelectPrimitive__namespace.Content,
1160
+ {
1161
+ "data-slot": "select-content",
1162
+ className: cn(
1163
+ "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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
1164
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
1165
+ className
1166
+ ),
1167
+ position,
1168
+ ...props,
1169
+ children: [
1170
+ /* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
1171
+ /* @__PURE__ */ jsxRuntime.jsx(
1172
+ SelectPrimitive__namespace.Viewport,
1173
+ {
1174
+ className: cn(
1175
+ "p-1",
1176
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
1177
+ ),
1178
+ children
1179
+ }
1180
+ ),
1181
+ /* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
1182
+ ]
1183
+ }
1184
+ ) });
1185
+ }
1186
+ function SelectLabel({
1187
+ className,
1188
+ ...props
1189
+ }) {
1190
+ return /* @__PURE__ */ jsxRuntime.jsx(
1191
+ SelectPrimitive__namespace.Label,
1192
+ {
1193
+ "data-slot": "select-label",
1194
+ className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
1195
+ ...props
1196
+ }
1197
+ );
1198
+ }
1199
+ function SelectItem({
1200
+ className,
1201
+ children,
1202
+ ...props
1203
+ }) {
1204
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1205
+ SelectPrimitive__namespace.Item,
1206
+ {
1207
+ "data-slot": "select-item",
1208
+ className: cn(
1209
+ "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
1210
+ className
1211
+ ),
1212
+ ...props,
1213
+ children: [
1214
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "size-4" }) }) }),
1215
+ /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children })
1216
+ ]
1217
+ }
1218
+ );
1219
+ }
1220
+ function SelectSeparator({
1221
+ className,
1222
+ ...props
1223
+ }) {
1224
+ return /* @__PURE__ */ jsxRuntime.jsx(
1225
+ SelectPrimitive__namespace.Separator,
1226
+ {
1227
+ "data-slot": "select-separator",
1228
+ className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
1229
+ ...props
1230
+ }
1231
+ );
1232
+ }
1233
+ function SelectScrollUpButton({
1234
+ className,
1235
+ ...props
1236
+ }) {
1237
+ return /* @__PURE__ */ jsxRuntime.jsx(
1238
+ SelectPrimitive__namespace.ScrollUpButton,
1239
+ {
1240
+ "data-slot": "select-scroll-up-button",
1241
+ className: cn(
1242
+ "flex cursor-default items-center justify-center py-1",
1243
+ className
1244
+ ),
1245
+ ...props,
1246
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUpIcon, { className: "size-4" })
1247
+ }
1248
+ );
1249
+ }
1250
+ function SelectScrollDownButton({
1251
+ className,
1252
+ ...props
1253
+ }) {
1254
+ return /* @__PURE__ */ jsxRuntime.jsx(
1255
+ SelectPrimitive__namespace.ScrollDownButton,
1256
+ {
1257
+ "data-slot": "select-scroll-down-button",
1258
+ className: cn(
1259
+ "flex cursor-default items-center justify-center py-1",
1260
+ className
1261
+ ),
1262
+ ...props,
1263
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4" })
1264
+ }
1265
+ );
1266
+ }
1267
+ function Separator2({
1268
+ className,
1269
+ orientation = "horizontal",
1270
+ decorative = true,
1271
+ ...props
1272
+ }) {
1273
+ return /* @__PURE__ */ jsxRuntime.jsx(
1274
+ SeparatorPrimitive__namespace.Root,
1275
+ {
1276
+ "data-slot": "separator",
1277
+ decorative,
1278
+ orientation,
1279
+ className: cn(
1280
+ "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
1281
+ className
1282
+ ),
1283
+ ...props
1284
+ }
1285
+ );
1286
+ }
1287
+ var Toaster = ({ ...props }) => {
1288
+ const { theme = "system" } = nextThemes.useTheme();
1289
+ return /* @__PURE__ */ jsxRuntime.jsx(
1290
+ sonner.Toaster,
1291
+ {
1292
+ theme,
1293
+ className: "toaster group",
1294
+ style: {
1295
+ "--normal-bg": "var(--popover)",
1296
+ "--normal-text": "var(--popover-foreground)",
1297
+ "--normal-border": "var(--border)"
1298
+ },
1299
+ ...props
1300
+ }
1301
+ );
1302
+ };
1303
+ function Switch({
1304
+ className,
1305
+ ...props
1306
+ }) {
1307
+ return /* @__PURE__ */ jsxRuntime.jsx(
1308
+ SwitchPrimitive__namespace.Root,
1309
+ {
1310
+ "data-slot": "switch",
1311
+ className: cn(
1312
+ "peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
1313
+ className
1314
+ ),
1315
+ ...props,
1316
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1317
+ SwitchPrimitive__namespace.Thumb,
1318
+ {
1319
+ "data-slot": "switch-thumb",
1320
+ className: cn(
1321
+ "bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
1322
+ )
1323
+ }
1324
+ )
1325
+ }
1326
+ );
1327
+ }
1328
+ function Textarea({ className, ...props }) {
1329
+ return /* @__PURE__ */ jsxRuntime.jsx(
1330
+ "textarea",
1331
+ {
1332
+ "data-slot": "textarea",
1333
+ className: cn(
1334
+ "border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
1335
+ className
1336
+ ),
1337
+ ...props
1338
+ }
1339
+ );
1340
+ }
1341
+ function TooltipProvider({
1342
+ delayDuration = 0,
1343
+ ...props
1344
+ }) {
1345
+ return /* @__PURE__ */ jsxRuntime.jsx(
1346
+ TooltipPrimitive__namespace.Provider,
1347
+ {
1348
+ "data-slot": "tooltip-provider",
1349
+ delayDuration,
1350
+ ...props
1351
+ }
1352
+ );
1353
+ }
1354
+ function Tooltip({
1355
+ ...props
1356
+ }) {
1357
+ return /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Root, { "data-slot": "tooltip", ...props }) });
1358
+ }
1359
+ function TooltipTrigger({
1360
+ ...props
1361
+ }) {
1362
+ return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { "data-slot": "tooltip-trigger", ...props });
1363
+ }
1364
+ function TooltipContent({
1365
+ className,
1366
+ sideOffset = 0,
1367
+ children,
1368
+ ...props
1369
+ }) {
1370
+ return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
1371
+ TooltipPrimitive__namespace.Content,
1372
+ {
1373
+ "data-slot": "tooltip-content",
1374
+ sideOffset,
1375
+ className: cn(
1376
+ "bg-foreground text-background 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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
1377
+ className
1378
+ ),
1379
+ ...props,
1380
+ children: [
1381
+ children,
1382
+ /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
1383
+ ]
1384
+ }
1385
+ ) });
1386
+ }
1387
+ var CheckListInput = class extends BaseInput {
1388
+ render() {
1389
+ const { input } = this;
1390
+ const listConfig = input?.listConfig;
1391
+ let lista = listConfig?.list ?? [];
1392
+ if (lista == void 0) lista = [];
1393
+ const title = "title";
1394
+ const value = input.value;
1395
+ const label = listConfig?.optionLabel ?? "name";
1396
+ const optionValue = listConfig?.optionValue ?? "id";
1397
+ const description = listConfig?.optionDescription ?? "description";
1398
+ return /* @__PURE__ */ jsxRuntime.jsxs(Card, { children: [
1399
+ /* @__PURE__ */ jsxRuntime.jsx(CardHeader, { className: "pb-3", children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "text-base", children: title }) }),
1400
+ /* @__PURE__ */ jsxRuntime.jsx(CardContent, { className: "space-y-3", children: lista.map(
1401
+ (item) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center space-x-2", children: [
1402
+ /* @__PURE__ */ jsxRuntime.jsx(
1403
+ Checkbox,
1404
+ {
1405
+ id: String(item[optionValue]),
1406
+ checked: value.includes(item[optionValue]),
1407
+ onCheckedChange: () => {
1408
+ }
1409
+ }
1410
+ ),
1411
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-1.5 leading-none", children: [
1412
+ /* @__PURE__ */ jsxRuntime.jsx(
1413
+ Label,
1414
+ {
1415
+ htmlFor: String(item[optionValue]),
1416
+ className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
1417
+ children: item[label]
1418
+ }
1419
+ ),
1420
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: item[description] })
1421
+ ] })
1422
+ ] }, item[optionValue])
1423
+ ) })
1424
+ ] }, title);
1425
+ }
1426
+ };
1427
+ var ColorInput = class extends BaseInput {
1428
+ render() {
1429
+ const { input, form } = this;
1430
+ return /* @__PURE__ */ jsxRuntime.jsx(FieldColor, { input, form });
1431
+ }
1432
+ };
1433
+ var FieldColor = ({ form, input }) => {
1434
+ const [ColorCmp, _setColorCmp] = React3.useState(ColorComp);
1435
+ return /* @__PURE__ */ jsxRuntime.jsx(
1436
+ FormField,
1437
+ {
1438
+ control: form.control,
1439
+ name: input.name,
1440
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(FormItem, { children: [
1441
+ /* @__PURE__ */ jsxRuntime.jsx(FormLabel, { children: /* @__PURE__ */ jsxRuntime.jsx("b", { children: input.label }) }),
1442
+ /* @__PURE__ */ jsxRuntime.jsx(FormControl, { children: ColorCmp ? /* @__PURE__ */ jsxRuntime.jsx(
1443
+ ColorCmp,
1444
+ {
1445
+ value: field.value,
1446
+ onChange: field.onChange,
1447
+ onBlur: field.onBlur,
1448
+ disabled: input.disabled,
1449
+ placeholder: input.placeHolder
1450
+ }
1451
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1452
+ "input",
1453
+ {
1454
+ type: "color",
1455
+ value: field.value || "#000000",
1456
+ onChange: (e) => field.onChange(e.target.value),
1457
+ onBlur: () => field.onBlur(),
1458
+ disabled: input.disabled,
1459
+ placeholder: input.placeHolder,
1460
+ style: { width: 48, height: 28 }
1461
+ }
1462
+ ) }),
1463
+ /* @__PURE__ */ jsxRuntime.jsx(FormDescription, { children: input.description }),
1464
+ /* @__PURE__ */ jsxRuntime.jsx(FormMessage, {})
1465
+ ] })
1466
+ }
1467
+ );
1468
+ };
1469
+ var ColorComp = React3__namespace.default.forwardRef(
1470
+ ({ value = "#000000", onChange, onBlur, disabled, className }, ref) => {
1471
+ const [color, setColor] = reactColorPalette.useColor(value);
1472
+ const [open, setOpen] = React3__namespace.default.useState(false);
1473
+ React3__namespace.default.useEffect(() => {
1474
+ if (value !== color.hex) {
1475
+ setColor({ ...color, hex: value });
1476
+ }
1477
+ }, [color, setColor, value]);
1478
+ const handleColorChange = (newColor) => {
1479
+ setColor(newColor);
1480
+ onChange?.(newColor.hex);
1481
+ };
1482
+ const handleOpenChange = (newOpen) => {
1483
+ setOpen(newOpen);
1484
+ if (!newOpen) {
1485
+ onBlur?.();
1486
+ }
1487
+ };
1488
+ return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: handleOpenChange, children: [
1489
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1490
+ Button,
1491
+ {
1492
+ ref,
1493
+ variant: "outline",
1494
+ disabled,
1495
+ className: cn("w-full justify-start text-left font-normal", !value && "text-muted-foreground", className),
1496
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
1497
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-4 rounded border border-border", style: { backgroundColor: color.hex } }),
1498
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: color.hex })
1499
+ ] })
1500
+ }
1501
+ ) }),
1502
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-3", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx(reactColorPalette.ColorPicker, { color, onChange: handleColorChange, hideInput: ["rgb", "hsv"] }) })
1503
+ ] });
1504
+ }
1505
+ );
1506
+ var millisecondsInWeek = 6048e5;
1507
+ var millisecondsInDay = 864e5;
1508
+ var constructFromSymbol = Symbol.for("constructDateFrom");
1509
+
1510
+ // node_modules/date-fns/constructFrom.js
1511
+ function constructFrom(date, value) {
1512
+ if (typeof date === "function") return date(value);
1513
+ if (date && typeof date === "object" && constructFromSymbol in date)
1514
+ return date[constructFromSymbol](value);
1515
+ if (date instanceof Date) return new date.constructor(value);
1516
+ return new Date(value);
1517
+ }
1518
+
1519
+ // node_modules/date-fns/toDate.js
1520
+ function toDate(argument, context) {
1521
+ return constructFrom(context || argument, argument);
1522
+ }
1523
+
1524
+ // node_modules/date-fns/_lib/defaultOptions.js
1525
+ var defaultOptions = {};
1526
+ function getDefaultOptions() {
1527
+ return defaultOptions;
1528
+ }
1529
+
1530
+ // node_modules/date-fns/startOfWeek.js
1531
+ function startOfWeek(date, options) {
1532
+ const defaultOptions2 = getDefaultOptions();
1533
+ const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
1534
+ const _date = toDate(date, options?.in);
1535
+ const day = _date.getDay();
1536
+ const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
1537
+ _date.setDate(_date.getDate() - diff);
1538
+ _date.setHours(0, 0, 0, 0);
1539
+ return _date;
1540
+ }
1541
+
1542
+ // node_modules/date-fns/startOfISOWeek.js
1543
+ function startOfISOWeek(date, options) {
1544
+ return startOfWeek(date, { ...options, weekStartsOn: 1 });
1545
+ }
1546
+
1547
+ // node_modules/date-fns/getISOWeekYear.js
1548
+ function getISOWeekYear(date, options) {
1549
+ const _date = toDate(date, options?.in);
1550
+ const year = _date.getFullYear();
1551
+ const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);
1552
+ fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
1553
+ fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
1554
+ const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
1555
+ const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);
1556
+ fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
1557
+ fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
1558
+ const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
1559
+ if (_date.getTime() >= startOfNextYear.getTime()) {
1560
+ return year + 1;
1561
+ } else if (_date.getTime() >= startOfThisYear.getTime()) {
1562
+ return year;
1563
+ } else {
1564
+ return year - 1;
1565
+ }
1566
+ }
1567
+
1568
+ // node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
1569
+ function getTimezoneOffsetInMilliseconds(date) {
1570
+ const _date = toDate(date);
1571
+ const utcDate = new Date(
1572
+ Date.UTC(
1573
+ _date.getFullYear(),
1574
+ _date.getMonth(),
1575
+ _date.getDate(),
1576
+ _date.getHours(),
1577
+ _date.getMinutes(),
1578
+ _date.getSeconds(),
1579
+ _date.getMilliseconds()
1580
+ )
1581
+ );
1582
+ utcDate.setUTCFullYear(_date.getFullYear());
1583
+ return +date - +utcDate;
1584
+ }
1585
+
1586
+ // node_modules/date-fns/_lib/normalizeDates.js
1587
+ function normalizeDates(context, ...dates) {
1588
+ const normalize = constructFrom.bind(
1589
+ null,
1590
+ dates.find((date) => typeof date === "object")
1591
+ );
1592
+ return dates.map(normalize);
1593
+ }
1594
+
1595
+ // node_modules/date-fns/startOfDay.js
1596
+ function startOfDay(date, options) {
1597
+ const _date = toDate(date, options?.in);
1598
+ _date.setHours(0, 0, 0, 0);
1599
+ return _date;
1600
+ }
1601
+
1602
+ // node_modules/date-fns/differenceInCalendarDays.js
1603
+ function differenceInCalendarDays(laterDate, earlierDate, options) {
1604
+ const [laterDate_, earlierDate_] = normalizeDates(
1605
+ options?.in,
1606
+ laterDate,
1607
+ earlierDate
1608
+ );
1609
+ const laterStartOfDay = startOfDay(laterDate_);
1610
+ const earlierStartOfDay = startOfDay(earlierDate_);
1611
+ const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
1612
+ const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
1613
+ return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
1614
+ }
1615
+
1616
+ // node_modules/date-fns/startOfISOWeekYear.js
1617
+ function startOfISOWeekYear(date, options) {
1618
+ const year = getISOWeekYear(date, options);
1619
+ const fourthOfJanuary = constructFrom(date, 0);
1620
+ fourthOfJanuary.setFullYear(year, 0, 4);
1621
+ fourthOfJanuary.setHours(0, 0, 0, 0);
1622
+ return startOfISOWeek(fourthOfJanuary);
1623
+ }
1624
+
1625
+ // node_modules/date-fns/isDate.js
1626
+ function isDate(value) {
1627
+ return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
1628
+ }
1629
+
1630
+ // node_modules/date-fns/isValid.js
1631
+ function isValid(date) {
1632
+ return !(!isDate(date) && typeof date !== "number" || isNaN(+toDate(date)));
1633
+ }
1634
+
1635
+ // node_modules/date-fns/startOfYear.js
1636
+ function startOfYear(date, options) {
1637
+ const date_ = toDate(date, options?.in);
1638
+ date_.setFullYear(date_.getFullYear(), 0, 1);
1639
+ date_.setHours(0, 0, 0, 0);
1640
+ return date_;
1641
+ }
1642
+
1643
+ // node_modules/date-fns/locale/en-US/_lib/formatDistance.js
1644
+ var formatDistanceLocale = {
1645
+ lessThanXSeconds: {
1646
+ one: "less than a second",
1647
+ other: "less than {{count}} seconds"
1648
+ },
1649
+ xSeconds: {
1650
+ one: "1 second",
1651
+ other: "{{count}} seconds"
1652
+ },
1653
+ halfAMinute: "half a minute",
1654
+ lessThanXMinutes: {
1655
+ one: "less than a minute",
1656
+ other: "less than {{count}} minutes"
1657
+ },
1658
+ xMinutes: {
1659
+ one: "1 minute",
1660
+ other: "{{count}} minutes"
1661
+ },
1662
+ aboutXHours: {
1663
+ one: "about 1 hour",
1664
+ other: "about {{count}} hours"
1665
+ },
1666
+ xHours: {
1667
+ one: "1 hour",
1668
+ other: "{{count}} hours"
1669
+ },
1670
+ xDays: {
1671
+ one: "1 day",
1672
+ other: "{{count}} days"
1673
+ },
1674
+ aboutXWeeks: {
1675
+ one: "about 1 week",
1676
+ other: "about {{count}} weeks"
1677
+ },
1678
+ xWeeks: {
1679
+ one: "1 week",
1680
+ other: "{{count}} weeks"
1681
+ },
1682
+ aboutXMonths: {
1683
+ one: "about 1 month",
1684
+ other: "about {{count}} months"
1685
+ },
1686
+ xMonths: {
1687
+ one: "1 month",
1688
+ other: "{{count}} months"
1689
+ },
1690
+ aboutXYears: {
1691
+ one: "about 1 year",
1692
+ other: "about {{count}} years"
1693
+ },
1694
+ xYears: {
1695
+ one: "1 year",
1696
+ other: "{{count}} years"
1697
+ },
1698
+ overXYears: {
1699
+ one: "over 1 year",
1700
+ other: "over {{count}} years"
1701
+ },
1702
+ almostXYears: {
1703
+ one: "almost 1 year",
1704
+ other: "almost {{count}} years"
1705
+ }
1706
+ };
1707
+ var formatDistance = (token, count, options) => {
1708
+ let result;
1709
+ const tokenValue = formatDistanceLocale[token];
1710
+ if (typeof tokenValue === "string") {
1711
+ result = tokenValue;
1712
+ } else if (count === 1) {
1713
+ result = tokenValue.one;
1714
+ } else {
1715
+ result = tokenValue.other.replace("{{count}}", count.toString());
1716
+ }
1717
+ if (options?.addSuffix) {
1718
+ if (options.comparison && options.comparison > 0) {
1719
+ return "in " + result;
1720
+ } else {
1721
+ return result + " ago";
1722
+ }
1723
+ }
1724
+ return result;
1725
+ };
1726
+
1727
+ // node_modules/date-fns/locale/_lib/buildFormatLongFn.js
1728
+ function buildFormatLongFn(args) {
1729
+ return (options = {}) => {
1730
+ const width = options.width ? String(options.width) : args.defaultWidth;
1731
+ const format2 = args.formats[width] || args.formats[args.defaultWidth];
1732
+ return format2;
1733
+ };
1734
+ }
1735
+
1736
+ // node_modules/date-fns/locale/en-US/_lib/formatLong.js
1737
+ var dateFormats = {
1738
+ full: "EEEE, MMMM do, y",
1739
+ long: "MMMM do, y",
1740
+ medium: "MMM d, y",
1741
+ short: "MM/dd/yyyy"
1742
+ };
1743
+ var timeFormats = {
1744
+ full: "h:mm:ss a zzzz",
1745
+ long: "h:mm:ss a z",
1746
+ medium: "h:mm:ss a",
1747
+ short: "h:mm a"
1748
+ };
1749
+ var dateTimeFormats = {
1750
+ full: "{{date}} 'at' {{time}}",
1751
+ long: "{{date}} 'at' {{time}}",
1752
+ medium: "{{date}}, {{time}}",
1753
+ short: "{{date}}, {{time}}"
1754
+ };
1755
+ var formatLong = {
1756
+ date: buildFormatLongFn({
1757
+ formats: dateFormats,
1758
+ defaultWidth: "full"
1759
+ }),
1760
+ time: buildFormatLongFn({
1761
+ formats: timeFormats,
1762
+ defaultWidth: "full"
1763
+ }),
1764
+ dateTime: buildFormatLongFn({
1765
+ formats: dateTimeFormats,
1766
+ defaultWidth: "full"
1767
+ })
1768
+ };
1769
+
1770
+ // node_modules/date-fns/locale/en-US/_lib/formatRelative.js
1771
+ var formatRelativeLocale = {
1772
+ lastWeek: "'last' eeee 'at' p",
1773
+ yesterday: "'yesterday at' p",
1774
+ today: "'today at' p",
1775
+ tomorrow: "'tomorrow at' p",
1776
+ nextWeek: "eeee 'at' p",
1777
+ other: "P"
1778
+ };
1779
+ var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];
1780
+
1781
+ // node_modules/date-fns/locale/_lib/buildLocalizeFn.js
1782
+ function buildLocalizeFn(args) {
1783
+ return (value, options) => {
1784
+ const context = options?.context ? String(options.context) : "standalone";
1785
+ let valuesArray;
1786
+ if (context === "formatting" && args.formattingValues) {
1787
+ const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
1788
+ const width = options?.width ? String(options.width) : defaultWidth;
1789
+ valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
1790
+ } else {
1791
+ const defaultWidth = args.defaultWidth;
1792
+ const width = options?.width ? String(options.width) : args.defaultWidth;
1793
+ valuesArray = args.values[width] || args.values[defaultWidth];
1794
+ }
1795
+ const index = args.argumentCallback ? args.argumentCallback(value) : value;
1796
+ return valuesArray[index];
1797
+ };
1798
+ }
1799
+
1800
+ // node_modules/date-fns/locale/en-US/_lib/localize.js
1801
+ var eraValues = {
1802
+ narrow: ["B", "A"],
1803
+ abbreviated: ["BC", "AD"],
1804
+ wide: ["Before Christ", "Anno Domini"]
1805
+ };
1806
+ var quarterValues = {
1807
+ narrow: ["1", "2", "3", "4"],
1808
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
1809
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
1810
+ };
1811
+ var monthValues = {
1812
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
1813
+ abbreviated: [
1814
+ "Jan",
1815
+ "Feb",
1816
+ "Mar",
1817
+ "Apr",
1818
+ "May",
1819
+ "Jun",
1820
+ "Jul",
1821
+ "Aug",
1822
+ "Sep",
1823
+ "Oct",
1824
+ "Nov",
1825
+ "Dec"
1826
+ ],
1827
+ wide: [
1828
+ "January",
1829
+ "February",
1830
+ "March",
1831
+ "April",
1832
+ "May",
1833
+ "June",
1834
+ "July",
1835
+ "August",
1836
+ "September",
1837
+ "October",
1838
+ "November",
1839
+ "December"
1840
+ ]
1841
+ };
1842
+ var dayValues = {
1843
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
1844
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
1845
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
1846
+ wide: [
1847
+ "Sunday",
1848
+ "Monday",
1849
+ "Tuesday",
1850
+ "Wednesday",
1851
+ "Thursday",
1852
+ "Friday",
1853
+ "Saturday"
1854
+ ]
1855
+ };
1856
+ var dayPeriodValues = {
1857
+ narrow: {
1858
+ am: "a",
1859
+ pm: "p",
1860
+ midnight: "mi",
1861
+ noon: "n",
1862
+ morning: "morning",
1863
+ afternoon: "afternoon",
1864
+ evening: "evening",
1865
+ night: "night"
1866
+ },
1867
+ abbreviated: {
1868
+ am: "AM",
1869
+ pm: "PM",
1870
+ midnight: "midnight",
1871
+ noon: "noon",
1872
+ morning: "morning",
1873
+ afternoon: "afternoon",
1874
+ evening: "evening",
1875
+ night: "night"
1876
+ },
1877
+ wide: {
1878
+ am: "a.m.",
1879
+ pm: "p.m.",
1880
+ midnight: "midnight",
1881
+ noon: "noon",
1882
+ morning: "morning",
1883
+ afternoon: "afternoon",
1884
+ evening: "evening",
1885
+ night: "night"
1886
+ }
1887
+ };
1888
+ var formattingDayPeriodValues = {
1889
+ narrow: {
1890
+ am: "a",
1891
+ pm: "p",
1892
+ midnight: "mi",
1893
+ noon: "n",
1894
+ morning: "in the morning",
1895
+ afternoon: "in the afternoon",
1896
+ evening: "in the evening",
1897
+ night: "at night"
1898
+ },
1899
+ abbreviated: {
1900
+ am: "AM",
1901
+ pm: "PM",
1902
+ midnight: "midnight",
1903
+ noon: "noon",
1904
+ morning: "in the morning",
1905
+ afternoon: "in the afternoon",
1906
+ evening: "in the evening",
1907
+ night: "at night"
1908
+ },
1909
+ wide: {
1910
+ am: "a.m.",
1911
+ pm: "p.m.",
1912
+ midnight: "midnight",
1913
+ noon: "noon",
1914
+ morning: "in the morning",
1915
+ afternoon: "in the afternoon",
1916
+ evening: "in the evening",
1917
+ night: "at night"
1918
+ }
1919
+ };
1920
+ var ordinalNumber = (dirtyNumber, _options) => {
1921
+ const number = Number(dirtyNumber);
1922
+ const rem100 = number % 100;
1923
+ if (rem100 > 20 || rem100 < 10) {
1924
+ switch (rem100 % 10) {
1925
+ case 1:
1926
+ return number + "st";
1927
+ case 2:
1928
+ return number + "nd";
1929
+ case 3:
1930
+ return number + "rd";
1931
+ }
1932
+ }
1933
+ return number + "th";
1934
+ };
1935
+ var localize = {
1936
+ ordinalNumber,
1937
+ era: buildLocalizeFn({
1938
+ values: eraValues,
1939
+ defaultWidth: "wide"
1940
+ }),
1941
+ quarter: buildLocalizeFn({
1942
+ values: quarterValues,
1943
+ defaultWidth: "wide",
1944
+ argumentCallback: (quarter) => quarter - 1
1945
+ }),
1946
+ month: buildLocalizeFn({
1947
+ values: monthValues,
1948
+ defaultWidth: "wide"
1949
+ }),
1950
+ day: buildLocalizeFn({
1951
+ values: dayValues,
1952
+ defaultWidth: "wide"
1953
+ }),
1954
+ dayPeriod: buildLocalizeFn({
1955
+ values: dayPeriodValues,
1956
+ defaultWidth: "wide",
1957
+ formattingValues: formattingDayPeriodValues,
1958
+ defaultFormattingWidth: "wide"
1959
+ })
1960
+ };
1961
+
1962
+ // node_modules/date-fns/locale/_lib/buildMatchFn.js
1963
+ function buildMatchFn(args) {
1964
+ return (string, options = {}) => {
1965
+ const width = options.width;
1966
+ const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
1967
+ const matchResult = string.match(matchPattern);
1968
+ if (!matchResult) {
1969
+ return null;
1970
+ }
1971
+ const matchedString = matchResult[0];
1972
+ const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
1973
+ const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
1974
+ // [TODO] -- I challenge you to fix the type
1975
+ findKey(parsePatterns, (pattern) => pattern.test(matchedString))
1976
+ );
1977
+ let value;
1978
+ value = args.valueCallback ? args.valueCallback(key) : key;
1979
+ value = options.valueCallback ? (
1980
+ // [TODO] -- I challenge you to fix the type
1981
+ options.valueCallback(value)
1982
+ ) : value;
1983
+ const rest = string.slice(matchedString.length);
1984
+ return { value, rest };
1985
+ };
1986
+ }
1987
+ function findKey(object, predicate) {
1988
+ for (const key in object) {
1989
+ if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
1990
+ return key;
1991
+ }
1992
+ }
1993
+ return void 0;
1994
+ }
1995
+ function findIndex(array, predicate) {
1996
+ for (let key = 0; key < array.length; key++) {
1997
+ if (predicate(array[key])) {
1998
+ return key;
1999
+ }
2000
+ }
2001
+ return void 0;
2002
+ }
2003
+
2004
+ // node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
2005
+ function buildMatchPatternFn(args) {
2006
+ return (string, options = {}) => {
2007
+ const matchResult = string.match(args.matchPattern);
2008
+ if (!matchResult) return null;
2009
+ const matchedString = matchResult[0];
2010
+ const parseResult = string.match(args.parsePattern);
2011
+ if (!parseResult) return null;
2012
+ let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
2013
+ value = options.valueCallback ? options.valueCallback(value) : value;
2014
+ const rest = string.slice(matchedString.length);
2015
+ return { value, rest };
2016
+ };
2017
+ }
2018
+
2019
+ // node_modules/date-fns/locale/en-US/_lib/match.js
2020
+ var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
2021
+ var parseOrdinalNumberPattern = /\d+/i;
2022
+ var matchEraPatterns = {
2023
+ narrow: /^(b|a)/i,
2024
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
2025
+ wide: /^(before christ|before common era|anno domini|common era)/i
2026
+ };
2027
+ var parseEraPatterns = {
2028
+ any: [/^b/i, /^(a|c)/i]
2029
+ };
2030
+ var matchQuarterPatterns = {
2031
+ narrow: /^[1234]/i,
2032
+ abbreviated: /^q[1234]/i,
2033
+ wide: /^[1234](th|st|nd|rd)? quarter/i
2034
+ };
2035
+ var parseQuarterPatterns = {
2036
+ any: [/1/i, /2/i, /3/i, /4/i]
2037
+ };
2038
+ var matchMonthPatterns = {
2039
+ narrow: /^[jfmasond]/i,
2040
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
2041
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
2042
+ };
2043
+ var parseMonthPatterns = {
2044
+ narrow: [
2045
+ /^j/i,
2046
+ /^f/i,
2047
+ /^m/i,
2048
+ /^a/i,
2049
+ /^m/i,
2050
+ /^j/i,
2051
+ /^j/i,
2052
+ /^a/i,
2053
+ /^s/i,
2054
+ /^o/i,
2055
+ /^n/i,
2056
+ /^d/i
2057
+ ],
2058
+ any: [
2059
+ /^ja/i,
2060
+ /^f/i,
2061
+ /^mar/i,
2062
+ /^ap/i,
2063
+ /^may/i,
2064
+ /^jun/i,
2065
+ /^jul/i,
2066
+ /^au/i,
2067
+ /^s/i,
2068
+ /^o/i,
2069
+ /^n/i,
2070
+ /^d/i
2071
+ ]
2072
+ };
2073
+ var matchDayPatterns = {
2074
+ narrow: /^[smtwf]/i,
2075
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
2076
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
2077
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
2078
+ };
2079
+ var parseDayPatterns = {
2080
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
2081
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
2082
+ };
2083
+ var matchDayPeriodPatterns = {
2084
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
2085
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
2086
+ };
2087
+ var parseDayPeriodPatterns = {
2088
+ any: {
2089
+ am: /^a/i,
2090
+ pm: /^p/i,
2091
+ midnight: /^mi/i,
2092
+ noon: /^no/i,
2093
+ morning: /morning/i,
2094
+ afternoon: /afternoon/i,
2095
+ evening: /evening/i,
2096
+ night: /night/i
2097
+ }
2098
+ };
2099
+ var match = {
2100
+ ordinalNumber: buildMatchPatternFn({
2101
+ matchPattern: matchOrdinalNumberPattern,
2102
+ parsePattern: parseOrdinalNumberPattern,
2103
+ valueCallback: (value) => parseInt(value, 10)
2104
+ }),
2105
+ era: buildMatchFn({
2106
+ matchPatterns: matchEraPatterns,
2107
+ defaultMatchWidth: "wide",
2108
+ parsePatterns: parseEraPatterns,
2109
+ defaultParseWidth: "any"
2110
+ }),
2111
+ quarter: buildMatchFn({
2112
+ matchPatterns: matchQuarterPatterns,
2113
+ defaultMatchWidth: "wide",
2114
+ parsePatterns: parseQuarterPatterns,
2115
+ defaultParseWidth: "any",
2116
+ valueCallback: (index) => index + 1
2117
+ }),
2118
+ month: buildMatchFn({
2119
+ matchPatterns: matchMonthPatterns,
2120
+ defaultMatchWidth: "wide",
2121
+ parsePatterns: parseMonthPatterns,
2122
+ defaultParseWidth: "any"
2123
+ }),
2124
+ day: buildMatchFn({
2125
+ matchPatterns: matchDayPatterns,
2126
+ defaultMatchWidth: "wide",
2127
+ parsePatterns: parseDayPatterns,
2128
+ defaultParseWidth: "any"
2129
+ }),
2130
+ dayPeriod: buildMatchFn({
2131
+ matchPatterns: matchDayPeriodPatterns,
2132
+ defaultMatchWidth: "any",
2133
+ parsePatterns: parseDayPeriodPatterns,
2134
+ defaultParseWidth: "any"
2135
+ })
2136
+ };
2137
+
2138
+ // node_modules/date-fns/locale/en-US.js
2139
+ var enUS = {
2140
+ code: "en-US",
2141
+ formatDistance,
2142
+ formatLong,
2143
+ formatRelative,
2144
+ localize,
2145
+ match,
2146
+ options: {
2147
+ weekStartsOn: 0,
2148
+ firstWeekContainsDate: 1
2149
+ }
2150
+ };
2151
+
2152
+ // node_modules/date-fns/getDayOfYear.js
2153
+ function getDayOfYear(date, options) {
2154
+ const _date = toDate(date, options?.in);
2155
+ const diff = differenceInCalendarDays(_date, startOfYear(_date));
2156
+ const dayOfYear = diff + 1;
2157
+ return dayOfYear;
2158
+ }
2159
+
2160
+ // node_modules/date-fns/getISOWeek.js
2161
+ function getISOWeek(date, options) {
2162
+ const _date = toDate(date, options?.in);
2163
+ const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
2164
+ return Math.round(diff / millisecondsInWeek) + 1;
2165
+ }
2166
+
2167
+ // node_modules/date-fns/getWeekYear.js
2168
+ function getWeekYear(date, options) {
2169
+ const _date = toDate(date, options?.in);
2170
+ const year = _date.getFullYear();
2171
+ const defaultOptions2 = getDefaultOptions();
2172
+ const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
2173
+ const firstWeekOfNextYear = constructFrom(options?.in || date, 0);
2174
+ firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
2175
+ firstWeekOfNextYear.setHours(0, 0, 0, 0);
2176
+ const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
2177
+ const firstWeekOfThisYear = constructFrom(options?.in || date, 0);
2178
+ firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
2179
+ firstWeekOfThisYear.setHours(0, 0, 0, 0);
2180
+ const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
2181
+ if (+_date >= +startOfNextYear) {
2182
+ return year + 1;
2183
+ } else if (+_date >= +startOfThisYear) {
2184
+ return year;
2185
+ } else {
2186
+ return year - 1;
2187
+ }
2188
+ }
2189
+
2190
+ // node_modules/date-fns/startOfWeekYear.js
2191
+ function startOfWeekYear(date, options) {
2192
+ const defaultOptions2 = getDefaultOptions();
2193
+ const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
2194
+ const year = getWeekYear(date, options);
2195
+ const firstWeek = constructFrom(options?.in || date, 0);
2196
+ firstWeek.setFullYear(year, 0, firstWeekContainsDate);
2197
+ firstWeek.setHours(0, 0, 0, 0);
2198
+ const _date = startOfWeek(firstWeek, options);
2199
+ return _date;
2200
+ }
2201
+
2202
+ // node_modules/date-fns/getWeek.js
2203
+ function getWeek(date, options) {
2204
+ const _date = toDate(date, options?.in);
2205
+ const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
2206
+ return Math.round(diff / millisecondsInWeek) + 1;
2207
+ }
2208
+
2209
+ // node_modules/date-fns/_lib/addLeadingZeros.js
2210
+ function addLeadingZeros(number, targetLength) {
2211
+ const sign = number < 0 ? "-" : "";
2212
+ const output = Math.abs(number).toString().padStart(targetLength, "0");
2213
+ return sign + output;
2214
+ }
2215
+
2216
+ // node_modules/date-fns/_lib/format/lightFormatters.js
2217
+ var lightFormatters = {
2218
+ // Year
2219
+ y(date, token) {
2220
+ const signedYear = date.getFullYear();
2221
+ const year = signedYear > 0 ? signedYear : 1 - signedYear;
2222
+ return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
2223
+ },
2224
+ // Month
2225
+ M(date, token) {
2226
+ const month = date.getMonth();
2227
+ return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
2228
+ },
2229
+ // Day of the month
2230
+ d(date, token) {
2231
+ return addLeadingZeros(date.getDate(), token.length);
2232
+ },
2233
+ // AM or PM
2234
+ a(date, token) {
2235
+ const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
2236
+ switch (token) {
2237
+ case "a":
2238
+ case "aa":
2239
+ return dayPeriodEnumValue.toUpperCase();
2240
+ case "aaa":
2241
+ return dayPeriodEnumValue;
2242
+ case "aaaaa":
2243
+ return dayPeriodEnumValue[0];
2244
+ case "aaaa":
2245
+ default:
2246
+ return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
2247
+ }
2248
+ },
2249
+ // Hour [1-12]
2250
+ h(date, token) {
2251
+ return addLeadingZeros(date.getHours() % 12 || 12, token.length);
2252
+ },
2253
+ // Hour [0-23]
2254
+ H(date, token) {
2255
+ return addLeadingZeros(date.getHours(), token.length);
2256
+ },
2257
+ // Minute
2258
+ m(date, token) {
2259
+ return addLeadingZeros(date.getMinutes(), token.length);
2260
+ },
2261
+ // Second
2262
+ s(date, token) {
2263
+ return addLeadingZeros(date.getSeconds(), token.length);
2264
+ },
2265
+ // Fraction of second
2266
+ S(date, token) {
2267
+ const numberOfDigits = token.length;
2268
+ const milliseconds = date.getMilliseconds();
2269
+ const fractionalSeconds = Math.trunc(
2270
+ milliseconds * Math.pow(10, numberOfDigits - 3)
2271
+ );
2272
+ return addLeadingZeros(fractionalSeconds, token.length);
2273
+ }
2274
+ };
2275
+
2276
+ // node_modules/date-fns/_lib/format/formatters.js
2277
+ var dayPeriodEnum = {
2278
+ midnight: "midnight",
2279
+ noon: "noon",
2280
+ morning: "morning",
2281
+ afternoon: "afternoon",
2282
+ evening: "evening",
2283
+ night: "night"
2284
+ };
2285
+ var formatters = {
2286
+ // Era
2287
+ G: function(date, token, localize2) {
2288
+ const era = date.getFullYear() > 0 ? 1 : 0;
2289
+ switch (token) {
2290
+ // AD, BC
2291
+ case "G":
2292
+ case "GG":
2293
+ case "GGG":
2294
+ return localize2.era(era, { width: "abbreviated" });
2295
+ // A, B
2296
+ case "GGGGG":
2297
+ return localize2.era(era, { width: "narrow" });
2298
+ // Anno Domini, Before Christ
2299
+ case "GGGG":
2300
+ default:
2301
+ return localize2.era(era, { width: "wide" });
2302
+ }
2303
+ },
2304
+ // Year
2305
+ y: function(date, token, localize2) {
2306
+ if (token === "yo") {
2307
+ const signedYear = date.getFullYear();
2308
+ const year = signedYear > 0 ? signedYear : 1 - signedYear;
2309
+ return localize2.ordinalNumber(year, { unit: "year" });
2310
+ }
2311
+ return lightFormatters.y(date, token);
2312
+ },
2313
+ // Local week-numbering year
2314
+ Y: function(date, token, localize2, options) {
2315
+ const signedWeekYear = getWeekYear(date, options);
2316
+ const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
2317
+ if (token === "YY") {
2318
+ const twoDigitYear = weekYear % 100;
2319
+ return addLeadingZeros(twoDigitYear, 2);
2320
+ }
2321
+ if (token === "Yo") {
2322
+ return localize2.ordinalNumber(weekYear, { unit: "year" });
2323
+ }
2324
+ return addLeadingZeros(weekYear, token.length);
2325
+ },
2326
+ // ISO week-numbering year
2327
+ R: function(date, token) {
2328
+ const isoWeekYear = getISOWeekYear(date);
2329
+ return addLeadingZeros(isoWeekYear, token.length);
2330
+ },
2331
+ // Extended year. This is a single number designating the year of this calendar system.
2332
+ // The main difference between `y` and `u` localizers are B.C. years:
2333
+ // | Year | `y` | `u` |
2334
+ // |------|-----|-----|
2335
+ // | AC 1 | 1 | 1 |
2336
+ // | BC 1 | 1 | 0 |
2337
+ // | BC 2 | 2 | -1 |
2338
+ // Also `yy` always returns the last two digits of a year,
2339
+ // while `uu` pads single digit years to 2 characters and returns other years unchanged.
2340
+ u: function(date, token) {
2341
+ const year = date.getFullYear();
2342
+ return addLeadingZeros(year, token.length);
2343
+ },
2344
+ // Quarter
2345
+ Q: function(date, token, localize2) {
2346
+ const quarter = Math.ceil((date.getMonth() + 1) / 3);
2347
+ switch (token) {
2348
+ // 1, 2, 3, 4
2349
+ case "Q":
2350
+ return String(quarter);
2351
+ // 01, 02, 03, 04
2352
+ case "QQ":
2353
+ return addLeadingZeros(quarter, 2);
2354
+ // 1st, 2nd, 3rd, 4th
2355
+ case "Qo":
2356
+ return localize2.ordinalNumber(quarter, { unit: "quarter" });
2357
+ // Q1, Q2, Q3, Q4
2358
+ case "QQQ":
2359
+ return localize2.quarter(quarter, {
2360
+ width: "abbreviated",
2361
+ context: "formatting"
2362
+ });
2363
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
2364
+ case "QQQQQ":
2365
+ return localize2.quarter(quarter, {
2366
+ width: "narrow",
2367
+ context: "formatting"
2368
+ });
2369
+ // 1st quarter, 2nd quarter, ...
2370
+ case "QQQQ":
2371
+ default:
2372
+ return localize2.quarter(quarter, {
2373
+ width: "wide",
2374
+ context: "formatting"
2375
+ });
2376
+ }
2377
+ },
2378
+ // Stand-alone quarter
2379
+ q: function(date, token, localize2) {
2380
+ const quarter = Math.ceil((date.getMonth() + 1) / 3);
2381
+ switch (token) {
2382
+ // 1, 2, 3, 4
2383
+ case "q":
2384
+ return String(quarter);
2385
+ // 01, 02, 03, 04
2386
+ case "qq":
2387
+ return addLeadingZeros(quarter, 2);
2388
+ // 1st, 2nd, 3rd, 4th
2389
+ case "qo":
2390
+ return localize2.ordinalNumber(quarter, { unit: "quarter" });
2391
+ // Q1, Q2, Q3, Q4
2392
+ case "qqq":
2393
+ return localize2.quarter(quarter, {
2394
+ width: "abbreviated",
2395
+ context: "standalone"
2396
+ });
2397
+ // 1, 2, 3, 4 (narrow quarter; could be not numerical)
2398
+ case "qqqqq":
2399
+ return localize2.quarter(quarter, {
2400
+ width: "narrow",
2401
+ context: "standalone"
2402
+ });
2403
+ // 1st quarter, 2nd quarter, ...
2404
+ case "qqqq":
2405
+ default:
2406
+ return localize2.quarter(quarter, {
2407
+ width: "wide",
2408
+ context: "standalone"
2409
+ });
2410
+ }
2411
+ },
2412
+ // Month
2413
+ M: function(date, token, localize2) {
2414
+ const month = date.getMonth();
2415
+ switch (token) {
2416
+ case "M":
2417
+ case "MM":
2418
+ return lightFormatters.M(date, token);
2419
+ // 1st, 2nd, ..., 12th
2420
+ case "Mo":
2421
+ return localize2.ordinalNumber(month + 1, { unit: "month" });
2422
+ // Jan, Feb, ..., Dec
2423
+ case "MMM":
2424
+ return localize2.month(month, {
2425
+ width: "abbreviated",
2426
+ context: "formatting"
2427
+ });
2428
+ // J, F, ..., D
2429
+ case "MMMMM":
2430
+ return localize2.month(month, {
2431
+ width: "narrow",
2432
+ context: "formatting"
2433
+ });
2434
+ // January, February, ..., December
2435
+ case "MMMM":
2436
+ default:
2437
+ return localize2.month(month, { width: "wide", context: "formatting" });
2438
+ }
2439
+ },
2440
+ // Stand-alone month
2441
+ L: function(date, token, localize2) {
2442
+ const month = date.getMonth();
2443
+ switch (token) {
2444
+ // 1, 2, ..., 12
2445
+ case "L":
2446
+ return String(month + 1);
2447
+ // 01, 02, ..., 12
2448
+ case "LL":
2449
+ return addLeadingZeros(month + 1, 2);
2450
+ // 1st, 2nd, ..., 12th
2451
+ case "Lo":
2452
+ return localize2.ordinalNumber(month + 1, { unit: "month" });
2453
+ // Jan, Feb, ..., Dec
2454
+ case "LLL":
2455
+ return localize2.month(month, {
2456
+ width: "abbreviated",
2457
+ context: "standalone"
2458
+ });
2459
+ // J, F, ..., D
2460
+ case "LLLLL":
2461
+ return localize2.month(month, {
2462
+ width: "narrow",
2463
+ context: "standalone"
2464
+ });
2465
+ // January, February, ..., December
2466
+ case "LLLL":
2467
+ default:
2468
+ return localize2.month(month, { width: "wide", context: "standalone" });
2469
+ }
2470
+ },
2471
+ // Local week of year
2472
+ w: function(date, token, localize2, options) {
2473
+ const week = getWeek(date, options);
2474
+ if (token === "wo") {
2475
+ return localize2.ordinalNumber(week, { unit: "week" });
2476
+ }
2477
+ return addLeadingZeros(week, token.length);
2478
+ },
2479
+ // ISO week of year
2480
+ I: function(date, token, localize2) {
2481
+ const isoWeek = getISOWeek(date);
2482
+ if (token === "Io") {
2483
+ return localize2.ordinalNumber(isoWeek, { unit: "week" });
2484
+ }
2485
+ return addLeadingZeros(isoWeek, token.length);
2486
+ },
2487
+ // Day of the month
2488
+ d: function(date, token, localize2) {
2489
+ if (token === "do") {
2490
+ return localize2.ordinalNumber(date.getDate(), { unit: "date" });
2491
+ }
2492
+ return lightFormatters.d(date, token);
2493
+ },
2494
+ // Day of year
2495
+ D: function(date, token, localize2) {
2496
+ const dayOfYear = getDayOfYear(date);
2497
+ if (token === "Do") {
2498
+ return localize2.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
2499
+ }
2500
+ return addLeadingZeros(dayOfYear, token.length);
2501
+ },
2502
+ // Day of week
2503
+ E: function(date, token, localize2) {
2504
+ const dayOfWeek = date.getDay();
2505
+ switch (token) {
2506
+ // Tue
2507
+ case "E":
2508
+ case "EE":
2509
+ case "EEE":
2510
+ return localize2.day(dayOfWeek, {
2511
+ width: "abbreviated",
2512
+ context: "formatting"
2513
+ });
2514
+ // T
2515
+ case "EEEEE":
2516
+ return localize2.day(dayOfWeek, {
2517
+ width: "narrow",
2518
+ context: "formatting"
2519
+ });
2520
+ // Tu
2521
+ case "EEEEEE":
2522
+ return localize2.day(dayOfWeek, {
2523
+ width: "short",
2524
+ context: "formatting"
2525
+ });
2526
+ // Tuesday
2527
+ case "EEEE":
2528
+ default:
2529
+ return localize2.day(dayOfWeek, {
2530
+ width: "wide",
2531
+ context: "formatting"
2532
+ });
2533
+ }
2534
+ },
2535
+ // Local day of week
2536
+ e: function(date, token, localize2, options) {
2537
+ const dayOfWeek = date.getDay();
2538
+ const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
2539
+ switch (token) {
2540
+ // Numerical value (Nth day of week with current locale or weekStartsOn)
2541
+ case "e":
2542
+ return String(localDayOfWeek);
2543
+ // Padded numerical value
2544
+ case "ee":
2545
+ return addLeadingZeros(localDayOfWeek, 2);
2546
+ // 1st, 2nd, ..., 7th
2547
+ case "eo":
2548
+ return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
2549
+ case "eee":
2550
+ return localize2.day(dayOfWeek, {
2551
+ width: "abbreviated",
2552
+ context: "formatting"
2553
+ });
2554
+ // T
2555
+ case "eeeee":
2556
+ return localize2.day(dayOfWeek, {
2557
+ width: "narrow",
2558
+ context: "formatting"
2559
+ });
2560
+ // Tu
2561
+ case "eeeeee":
2562
+ return localize2.day(dayOfWeek, {
2563
+ width: "short",
2564
+ context: "formatting"
2565
+ });
2566
+ // Tuesday
2567
+ case "eeee":
2568
+ default:
2569
+ return localize2.day(dayOfWeek, {
2570
+ width: "wide",
2571
+ context: "formatting"
2572
+ });
2573
+ }
2574
+ },
2575
+ // Stand-alone local day of week
2576
+ c: function(date, token, localize2, options) {
2577
+ const dayOfWeek = date.getDay();
2578
+ const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
2579
+ switch (token) {
2580
+ // Numerical value (same as in `e`)
2581
+ case "c":
2582
+ return String(localDayOfWeek);
2583
+ // Padded numerical value
2584
+ case "cc":
2585
+ return addLeadingZeros(localDayOfWeek, token.length);
2586
+ // 1st, 2nd, ..., 7th
2587
+ case "co":
2588
+ return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
2589
+ case "ccc":
2590
+ return localize2.day(dayOfWeek, {
2591
+ width: "abbreviated",
2592
+ context: "standalone"
2593
+ });
2594
+ // T
2595
+ case "ccccc":
2596
+ return localize2.day(dayOfWeek, {
2597
+ width: "narrow",
2598
+ context: "standalone"
2599
+ });
2600
+ // Tu
2601
+ case "cccccc":
2602
+ return localize2.day(dayOfWeek, {
2603
+ width: "short",
2604
+ context: "standalone"
2605
+ });
2606
+ // Tuesday
2607
+ case "cccc":
2608
+ default:
2609
+ return localize2.day(dayOfWeek, {
2610
+ width: "wide",
2611
+ context: "standalone"
2612
+ });
2613
+ }
2614
+ },
2615
+ // ISO day of week
2616
+ i: function(date, token, localize2) {
2617
+ const dayOfWeek = date.getDay();
2618
+ const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
2619
+ switch (token) {
2620
+ // 2
2621
+ case "i":
2622
+ return String(isoDayOfWeek);
2623
+ // 02
2624
+ case "ii":
2625
+ return addLeadingZeros(isoDayOfWeek, token.length);
2626
+ // 2nd
2627
+ case "io":
2628
+ return localize2.ordinalNumber(isoDayOfWeek, { unit: "day" });
2629
+ // Tue
2630
+ case "iii":
2631
+ return localize2.day(dayOfWeek, {
2632
+ width: "abbreviated",
2633
+ context: "formatting"
2634
+ });
2635
+ // T
2636
+ case "iiiii":
2637
+ return localize2.day(dayOfWeek, {
2638
+ width: "narrow",
2639
+ context: "formatting"
2640
+ });
2641
+ // Tu
2642
+ case "iiiiii":
2643
+ return localize2.day(dayOfWeek, {
2644
+ width: "short",
2645
+ context: "formatting"
2646
+ });
2647
+ // Tuesday
2648
+ case "iiii":
2649
+ default:
2650
+ return localize2.day(dayOfWeek, {
2651
+ width: "wide",
2652
+ context: "formatting"
2653
+ });
2654
+ }
2655
+ },
2656
+ // AM or PM
2657
+ a: function(date, token, localize2) {
2658
+ const hours = date.getHours();
2659
+ const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
2660
+ switch (token) {
2661
+ case "a":
2662
+ case "aa":
2663
+ return localize2.dayPeriod(dayPeriodEnumValue, {
2664
+ width: "abbreviated",
2665
+ context: "formatting"
2666
+ });
2667
+ case "aaa":
2668
+ return localize2.dayPeriod(dayPeriodEnumValue, {
2669
+ width: "abbreviated",
2670
+ context: "formatting"
2671
+ }).toLowerCase();
2672
+ case "aaaaa":
2673
+ return localize2.dayPeriod(dayPeriodEnumValue, {
2674
+ width: "narrow",
2675
+ context: "formatting"
2676
+ });
2677
+ case "aaaa":
2678
+ default:
2679
+ return localize2.dayPeriod(dayPeriodEnumValue, {
2680
+ width: "wide",
2681
+ context: "formatting"
2682
+ });
2683
+ }
2684
+ },
2685
+ // AM, PM, midnight, noon
2686
+ b: function(date, token, localize2) {
2687
+ const hours = date.getHours();
2688
+ let dayPeriodEnumValue;
2689
+ if (hours === 12) {
2690
+ dayPeriodEnumValue = dayPeriodEnum.noon;
2691
+ } else if (hours === 0) {
2692
+ dayPeriodEnumValue = dayPeriodEnum.midnight;
2693
+ } else {
2694
+ dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
2695
+ }
2696
+ switch (token) {
2697
+ case "b":
2698
+ case "bb":
2699
+ return localize2.dayPeriod(dayPeriodEnumValue, {
2700
+ width: "abbreviated",
2701
+ context: "formatting"
2702
+ });
2703
+ case "bbb":
2704
+ return localize2.dayPeriod(dayPeriodEnumValue, {
2705
+ width: "abbreviated",
2706
+ context: "formatting"
2707
+ }).toLowerCase();
2708
+ case "bbbbb":
2709
+ return localize2.dayPeriod(dayPeriodEnumValue, {
2710
+ width: "narrow",
2711
+ context: "formatting"
2712
+ });
2713
+ case "bbbb":
2714
+ default:
2715
+ return localize2.dayPeriod(dayPeriodEnumValue, {
2716
+ width: "wide",
2717
+ context: "formatting"
2718
+ });
2719
+ }
2720
+ },
2721
+ // in the morning, in the afternoon, in the evening, at night
2722
+ B: function(date, token, localize2) {
2723
+ const hours = date.getHours();
2724
+ let dayPeriodEnumValue;
2725
+ if (hours >= 17) {
2726
+ dayPeriodEnumValue = dayPeriodEnum.evening;
2727
+ } else if (hours >= 12) {
2728
+ dayPeriodEnumValue = dayPeriodEnum.afternoon;
2729
+ } else if (hours >= 4) {
2730
+ dayPeriodEnumValue = dayPeriodEnum.morning;
2731
+ } else {
2732
+ dayPeriodEnumValue = dayPeriodEnum.night;
2733
+ }
2734
+ switch (token) {
2735
+ case "B":
2736
+ case "BB":
2737
+ case "BBB":
2738
+ return localize2.dayPeriod(dayPeriodEnumValue, {
2739
+ width: "abbreviated",
2740
+ context: "formatting"
2741
+ });
2742
+ case "BBBBB":
2743
+ return localize2.dayPeriod(dayPeriodEnumValue, {
2744
+ width: "narrow",
2745
+ context: "formatting"
2746
+ });
2747
+ case "BBBB":
2748
+ default:
2749
+ return localize2.dayPeriod(dayPeriodEnumValue, {
2750
+ width: "wide",
2751
+ context: "formatting"
2752
+ });
2753
+ }
2754
+ },
2755
+ // Hour [1-12]
2756
+ h: function(date, token, localize2) {
2757
+ if (token === "ho") {
2758
+ let hours = date.getHours() % 12;
2759
+ if (hours === 0) hours = 12;
2760
+ return localize2.ordinalNumber(hours, { unit: "hour" });
2761
+ }
2762
+ return lightFormatters.h(date, token);
2763
+ },
2764
+ // Hour [0-23]
2765
+ H: function(date, token, localize2) {
2766
+ if (token === "Ho") {
2767
+ return localize2.ordinalNumber(date.getHours(), { unit: "hour" });
2768
+ }
2769
+ return lightFormatters.H(date, token);
2770
+ },
2771
+ // Hour [0-11]
2772
+ K: function(date, token, localize2) {
2773
+ const hours = date.getHours() % 12;
2774
+ if (token === "Ko") {
2775
+ return localize2.ordinalNumber(hours, { unit: "hour" });
2776
+ }
2777
+ return addLeadingZeros(hours, token.length);
2778
+ },
2779
+ // Hour [1-24]
2780
+ k: function(date, token, localize2) {
2781
+ let hours = date.getHours();
2782
+ if (hours === 0) hours = 24;
2783
+ if (token === "ko") {
2784
+ return localize2.ordinalNumber(hours, { unit: "hour" });
2785
+ }
2786
+ return addLeadingZeros(hours, token.length);
2787
+ },
2788
+ // Minute
2789
+ m: function(date, token, localize2) {
2790
+ if (token === "mo") {
2791
+ return localize2.ordinalNumber(date.getMinutes(), { unit: "minute" });
2792
+ }
2793
+ return lightFormatters.m(date, token);
2794
+ },
2795
+ // Second
2796
+ s: function(date, token, localize2) {
2797
+ if (token === "so") {
2798
+ return localize2.ordinalNumber(date.getSeconds(), { unit: "second" });
2799
+ }
2800
+ return lightFormatters.s(date, token);
2801
+ },
2802
+ // Fraction of second
2803
+ S: function(date, token) {
2804
+ return lightFormatters.S(date, token);
2805
+ },
2806
+ // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
2807
+ X: function(date, token, _localize) {
2808
+ const timezoneOffset = date.getTimezoneOffset();
2809
+ if (timezoneOffset === 0) {
2810
+ return "Z";
2811
+ }
2812
+ switch (token) {
2813
+ // Hours and optional minutes
2814
+ case "X":
2815
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
2816
+ // Hours, minutes and optional seconds without `:` delimiter
2817
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
2818
+ // so this token always has the same output as `XX`
2819
+ case "XXXX":
2820
+ case "XX":
2821
+ return formatTimezone(timezoneOffset);
2822
+ // Hours, minutes and optional seconds with `:` delimiter
2823
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
2824
+ // so this token always has the same output as `XXX`
2825
+ case "XXXXX":
2826
+ case "XXX":
2827
+ // Hours and minutes with `:` delimiter
2828
+ default:
2829
+ return formatTimezone(timezoneOffset, ":");
2830
+ }
2831
+ },
2832
+ // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
2833
+ x: function(date, token, _localize) {
2834
+ const timezoneOffset = date.getTimezoneOffset();
2835
+ switch (token) {
2836
+ // Hours and optional minutes
2837
+ case "x":
2838
+ return formatTimezoneWithOptionalMinutes(timezoneOffset);
2839
+ // Hours, minutes and optional seconds without `:` delimiter
2840
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
2841
+ // so this token always has the same output as `xx`
2842
+ case "xxxx":
2843
+ case "xx":
2844
+ return formatTimezone(timezoneOffset);
2845
+ // Hours, minutes and optional seconds with `:` delimiter
2846
+ // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
2847
+ // so this token always has the same output as `xxx`
2848
+ case "xxxxx":
2849
+ case "xxx":
2850
+ // Hours and minutes with `:` delimiter
2851
+ default:
2852
+ return formatTimezone(timezoneOffset, ":");
2853
+ }
2854
+ },
2855
+ // Timezone (GMT)
2856
+ O: function(date, token, _localize) {
2857
+ const timezoneOffset = date.getTimezoneOffset();
2858
+ switch (token) {
2859
+ // Short
2860
+ case "O":
2861
+ case "OO":
2862
+ case "OOO":
2863
+ return "GMT" + formatTimezoneShort(timezoneOffset, ":");
2864
+ // Long
2865
+ case "OOOO":
2866
+ default:
2867
+ return "GMT" + formatTimezone(timezoneOffset, ":");
2868
+ }
2869
+ },
2870
+ // Timezone (specific non-location)
2871
+ z: function(date, token, _localize) {
2872
+ const timezoneOffset = date.getTimezoneOffset();
2873
+ switch (token) {
2874
+ // Short
2875
+ case "z":
2876
+ case "zz":
2877
+ case "zzz":
2878
+ return "GMT" + formatTimezoneShort(timezoneOffset, ":");
2879
+ // Long
2880
+ case "zzzz":
2881
+ default:
2882
+ return "GMT" + formatTimezone(timezoneOffset, ":");
2883
+ }
2884
+ },
2885
+ // Seconds timestamp
2886
+ t: function(date, token, _localize) {
2887
+ const timestamp = Math.trunc(+date / 1e3);
2888
+ return addLeadingZeros(timestamp, token.length);
2889
+ },
2890
+ // Milliseconds timestamp
2891
+ T: function(date, token, _localize) {
2892
+ return addLeadingZeros(+date, token.length);
2893
+ }
2894
+ };
2895
+ function formatTimezoneShort(offset, delimiter = "") {
2896
+ const sign = offset > 0 ? "-" : "+";
2897
+ const absOffset = Math.abs(offset);
2898
+ const hours = Math.trunc(absOffset / 60);
2899
+ const minutes = absOffset % 60;
2900
+ if (minutes === 0) {
2901
+ return sign + String(hours);
2902
+ }
2903
+ return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
2904
+ }
2905
+ function formatTimezoneWithOptionalMinutes(offset, delimiter) {
2906
+ if (offset % 60 === 0) {
2907
+ const sign = offset > 0 ? "-" : "+";
2908
+ return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
2909
+ }
2910
+ return formatTimezone(offset, delimiter);
2911
+ }
2912
+ function formatTimezone(offset, delimiter = "") {
2913
+ const sign = offset > 0 ? "-" : "+";
2914
+ const absOffset = Math.abs(offset);
2915
+ const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
2916
+ const minutes = addLeadingZeros(absOffset % 60, 2);
2917
+ return sign + hours + delimiter + minutes;
2918
+ }
2919
+
2920
+ // node_modules/date-fns/_lib/format/longFormatters.js
2921
+ var dateLongFormatter = (pattern, formatLong2) => {
2922
+ switch (pattern) {
2923
+ case "P":
2924
+ return formatLong2.date({ width: "short" });
2925
+ case "PP":
2926
+ return formatLong2.date({ width: "medium" });
2927
+ case "PPP":
2928
+ return formatLong2.date({ width: "long" });
2929
+ case "PPPP":
2930
+ default:
2931
+ return formatLong2.date({ width: "full" });
2932
+ }
2933
+ };
2934
+ var timeLongFormatter = (pattern, formatLong2) => {
2935
+ switch (pattern) {
2936
+ case "p":
2937
+ return formatLong2.time({ width: "short" });
2938
+ case "pp":
2939
+ return formatLong2.time({ width: "medium" });
2940
+ case "ppp":
2941
+ return formatLong2.time({ width: "long" });
2942
+ case "pppp":
2943
+ default:
2944
+ return formatLong2.time({ width: "full" });
2945
+ }
2946
+ };
2947
+ var dateTimeLongFormatter = (pattern, formatLong2) => {
2948
+ const matchResult = pattern.match(/(P+)(p+)?/) || [];
2949
+ const datePattern = matchResult[1];
2950
+ const timePattern = matchResult[2];
2951
+ if (!timePattern) {
2952
+ return dateLongFormatter(pattern, formatLong2);
2953
+ }
2954
+ let dateTimeFormat;
2955
+ switch (datePattern) {
2956
+ case "P":
2957
+ dateTimeFormat = formatLong2.dateTime({ width: "short" });
2958
+ break;
2959
+ case "PP":
2960
+ dateTimeFormat = formatLong2.dateTime({ width: "medium" });
2961
+ break;
2962
+ case "PPP":
2963
+ dateTimeFormat = formatLong2.dateTime({ width: "long" });
2964
+ break;
2965
+ case "PPPP":
2966
+ default:
2967
+ dateTimeFormat = formatLong2.dateTime({ width: "full" });
2968
+ break;
2969
+ }
2970
+ return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
2971
+ };
2972
+ var longFormatters = {
2973
+ p: timeLongFormatter,
2974
+ P: dateTimeLongFormatter
2975
+ };
2976
+
2977
+ // node_modules/date-fns/_lib/protectedTokens.js
2978
+ var dayOfYearTokenRE = /^D+$/;
2979
+ var weekYearTokenRE = /^Y+$/;
2980
+ var throwTokens = ["D", "DD", "YY", "YYYY"];
2981
+ function isProtectedDayOfYearToken(token) {
2982
+ return dayOfYearTokenRE.test(token);
2983
+ }
2984
+ function isProtectedWeekYearToken(token) {
2985
+ return weekYearTokenRE.test(token);
2986
+ }
2987
+ function warnOrThrowProtectedError(token, format2, input) {
2988
+ const _message = message(token, format2, input);
2989
+ console.warn(_message);
2990
+ if (throwTokens.includes(token)) throw new RangeError(_message);
2991
+ }
2992
+ function message(token, format2, input) {
2993
+ const subject = token[0] === "Y" ? "years" : "days of the month";
2994
+ return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format2}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
2995
+ }
2996
+
2997
+ // node_modules/date-fns/format.js
2998
+ var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
2999
+ var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
3000
+ var escapedStringRegExp = /^'([^]*?)'?$/;
3001
+ var doubleQuoteRegExp = /''/g;
3002
+ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
3003
+ function format(date, formatStr, options) {
3004
+ const defaultOptions2 = getDefaultOptions();
3005
+ const locale = defaultOptions2.locale ?? enUS;
3006
+ const firstWeekContainsDate = defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
3007
+ const weekStartsOn = defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
3008
+ const originalDate = toDate(date, options?.in);
3009
+ if (!isValid(originalDate)) {
3010
+ throw new RangeError("Invalid time value");
3011
+ }
3012
+ let parts = formatStr.match(longFormattingTokensRegExp).map((substring) => {
3013
+ const firstCharacter = substring[0];
3014
+ if (firstCharacter === "p" || firstCharacter === "P") {
3015
+ const longFormatter = longFormatters[firstCharacter];
3016
+ return longFormatter(substring, locale.formatLong);
3017
+ }
3018
+ return substring;
3019
+ }).join("").match(formattingTokensRegExp).map((substring) => {
3020
+ if (substring === "''") {
3021
+ return { isToken: false, value: "'" };
3022
+ }
3023
+ const firstCharacter = substring[0];
3024
+ if (firstCharacter === "'") {
3025
+ return { isToken: false, value: cleanEscapedString(substring) };
3026
+ }
3027
+ if (formatters[firstCharacter]) {
3028
+ return { isToken: true, value: substring };
3029
+ }
3030
+ if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
3031
+ throw new RangeError(
3032
+ "Format string contains an unescaped latin alphabet character `" + firstCharacter + "`"
3033
+ );
3034
+ }
3035
+ return { isToken: false, value: substring };
3036
+ });
3037
+ if (locale.localize.preprocessor) {
3038
+ parts = locale.localize.preprocessor(originalDate, parts);
3039
+ }
3040
+ const formatterOptions = {
3041
+ firstWeekContainsDate,
3042
+ weekStartsOn,
3043
+ locale
3044
+ };
3045
+ return parts.map((part) => {
3046
+ if (!part.isToken) return part.value;
3047
+ const token = part.value;
3048
+ if (isProtectedWeekYearToken(token) || isProtectedDayOfYearToken(token)) {
3049
+ warnOrThrowProtectedError(token, formatStr, String(date));
3050
+ }
3051
+ const formatter = formatters[token[0]];
3052
+ return formatter(originalDate, token, locale.localize, formatterOptions);
3053
+ }).join("");
3054
+ }
3055
+ function cleanEscapedString(input) {
3056
+ const matched = input.match(escapedStringRegExp);
3057
+ if (!matched) {
3058
+ return input;
3059
+ }
3060
+ return matched[1].replace(doubleQuoteRegExp, "'");
3061
+ }
3062
+ var DateInput = class extends BaseInput {
3063
+ render() {
3064
+ const { input, form } = this;
3065
+ return /* @__PURE__ */ jsxRuntime.jsx(
3066
+ FormField,
3067
+ {
3068
+ control: form.control,
3069
+ name: input.name,
3070
+ render: ({ field }) => {
3071
+ const [date, setDate] = React3__namespace.useState(
3072
+ field.value ? new Date(field.value) : void 0
3073
+ );
3074
+ React3__namespace.useEffect(() => {
3075
+ if (field.value && !date) {
3076
+ setDate(new Date(field.value));
3077
+ }
3078
+ }, [field.value]);
3079
+ const handleSelect = (selectedDate) => {
3080
+ setDate(selectedDate);
3081
+ field.onChange(selectedDate);
3082
+ };
3083
+ return /* @__PURE__ */ jsxRuntime.jsxs(FormItem, { children: [
3084
+ /* @__PURE__ */ jsxRuntime.jsx(FormLabel, { children: /* @__PURE__ */ jsxRuntime.jsx("b", { children: input.label }) }),
3085
+ /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
3086
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(FormControl, { children: /* @__PURE__ */ jsxRuntime.jsxs(
3087
+ Button,
3088
+ {
3089
+ variant: "outline",
3090
+ className: cn(
3091
+ "w-full justify-start text-left font-normal",
3092
+ !date && "text-muted-foreground"
3093
+ ),
3094
+ children: [
3095
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, {}),
3096
+ date ? format(date, "PPP") : /* @__PURE__ */ jsxRuntime.jsx("span", { children: input.placeHolder ?? "Fecha" })
3097
+ ]
3098
+ }
3099
+ ) }) }),
3100
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0", children: /* @__PURE__ */ jsxRuntime.jsx(
3101
+ Calendar,
3102
+ {
3103
+ mode: "single",
3104
+ selected: date,
3105
+ onSelect: handleSelect,
3106
+ initialFocus: true
3107
+ }
3108
+ ) })
3109
+ ] }),
3110
+ /* @__PURE__ */ jsxRuntime.jsx(FormDescription, { children: input.description }),
3111
+ /* @__PURE__ */ jsxRuntime.jsx(FormMessage, {})
3112
+ ] });
3113
+ }
3114
+ },
3115
+ input.name
3116
+ );
3117
+ }
3118
+ };
3119
+ var GroupedSwitchInput = class extends BaseInput {
3120
+ render() {
3121
+ const { input } = this;
3122
+ return /* @__PURE__ */ jsxRuntime.jsx(GroupedSwitches, { options: [], input });
3123
+ }
3124
+ };
3125
+ var GroupedSwitches = ({ options, onChange, input }) => {
3126
+ const mockInputOptions = [
3127
+ { id: 1, name: "MOCK OPTION - PERMISO 1", checked: false },
3128
+ { id: 2, name: "MOCK OPTION - PERMISO 2", checked: true },
3129
+ { id: 3, name: "MOCK OPTION - PERMISO 3", checked: false },
3130
+ { id: 4, name: "MOCK OPTION - PERMISO 4", checked: false }
3131
+ ];
3132
+ const [switches, setSwitches] = React3.useState(options.length == 0 ? mockInputOptions : options);
3133
+ const [allChecked, setAllChecked] = React3.useState(false);
3134
+ const handleMainToggle = (checked) => {
3135
+ const updated = switches.map((opt) => ({ ...opt, checked }));
3136
+ setSwitches(updated);
3137
+ setAllChecked(checked);
3138
+ onChange?.(updated.filter((opt) => opt.checked));
3139
+ };
3140
+ const handleChildToggle = (option, checked) => {
3141
+ const updated = switches.map(
3142
+ (opt) => opt.id === option.id ? { ...opt, checked } : opt
3143
+ );
3144
+ setSwitches(updated);
3145
+ setAllChecked(updated.every((opt) => opt.checked));
3146
+ onChange?.(updated.filter((opt) => opt.checked));
3147
+ };
3148
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `space-y-4 p-4 border-2 rounded-xl ${allChecked ? "bg-green-500/5 border-green-400/10" : "bg-black/5"}`, children: [
3149
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between border-b pb-2", children: [
3150
+ /* @__PURE__ */ jsxRuntime.jsx("div", { children: input.name }),
3151
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-2", children: [
3152
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "main", children: "Seleccionar todo" }),
3153
+ /* @__PURE__ */ jsxRuntime.jsx(Switch, { id: "main", checked: allChecked, onCheckedChange: handleMainToggle })
3154
+ ] })
3155
+ ] }),
3156
+ switches.map((opt, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `p-2 rounded-lg flex flex-row w-full items-center justify-between ${!(index % 2) ? "bg-black/5" : "bg-white/5"}`, children: [
3157
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: opt.id.toString(), children: opt.label || opt.name }),
3158
+ /* @__PURE__ */ jsxRuntime.jsx(
3159
+ Switch,
3160
+ {
3161
+ id: opt.id.toString(),
3162
+ checked: opt.checked || false,
3163
+ onCheckedChange: (checked) => handleChildToggle(opt, checked)
3164
+ }
3165
+ )
3166
+ ] }, opt.id))
3167
+ ] });
3168
+ };
3169
+ var NumberInput = class extends BaseInput {
3170
+ render() {
3171
+ const { input, form } = this;
3172
+ return /* @__PURE__ */ jsxRuntime.jsx(
3173
+ FormField,
3174
+ {
3175
+ control: form.control,
3176
+ name: input.name,
3177
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(FormItem, { children: [
3178
+ /* @__PURE__ */ jsxRuntime.jsx(FormLabel, { children: /* @__PURE__ */ jsxRuntime.jsx("b", { children: input.label }) }),
3179
+ /* @__PURE__ */ jsxRuntime.jsx(FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(Input, { className: "min-w-[180px] bg-white", placeholder: input.placeHolder, ...field, type: "number", disabled: input.disabled }) }),
3180
+ /* @__PURE__ */ jsxRuntime.jsx(FormDescription, { children: input.description }),
3181
+ /* @__PURE__ */ jsxRuntime.jsx(FormMessage, {})
3182
+ ] })
3183
+ },
3184
+ input.name
3185
+ );
3186
+ }
3187
+ };
3188
+ var OTPInput2 = class extends BaseInput {
3189
+ render() {
3190
+ const { input, form } = this;
3191
+ const totalPositions = Array.from({ length: input.min ?? 6 }, (_, i) => i);
3192
+ return /* @__PURE__ */ jsxRuntime.jsx(
3193
+ FormField,
3194
+ {
3195
+ control: form.control,
3196
+ name: input.name,
3197
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(FormItem, { children: [
3198
+ /* @__PURE__ */ jsxRuntime.jsx(FormLabel, { children: /* @__PURE__ */ jsxRuntime.jsx("b", { children: input.label }) }),
3199
+ /* @__PURE__ */ jsxRuntime.jsx(FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(InputOTP, { maxLength: totalPositions.length, ...field, children: /* @__PURE__ */ jsxRuntime.jsx(InputOTPGroup, { children: totalPositions.map((position) => /* @__PURE__ */ jsxRuntime.jsx(InputOTPSlot, { index: position }, position)) }) }) }),
3200
+ /* @__PURE__ */ jsxRuntime.jsx(FormDescription, { children: input.description }),
3201
+ /* @__PURE__ */ jsxRuntime.jsx(FormMessage, {})
3202
+ ] })
3203
+ },
3204
+ input.name
3205
+ );
3206
+ }
3207
+ };
3208
+ var SelectInput = class extends BaseInput {
3209
+ render() {
3210
+ const { input, form } = this;
3211
+ return /* @__PURE__ */ jsxRuntime.jsx(FieldSelect, { input, form });
3212
+ }
3213
+ };
3214
+ var FieldSelect = ({ form, input }) => {
3215
+ const mockInputOptions = [
3216
+ { id: 1, name: "MOCK OPTION - PERMISO 1", checked: false },
3217
+ { id: 2, name: "MOCK OPTION - PERMISO 2", checked: true },
3218
+ { id: 3, name: "MOCK OPTION - PERMISO 3", checked: false },
3219
+ { id: 4, name: "MOCK OPTION - PERMISO 4", checked: false }
3220
+ ];
3221
+ let lista = input?.listConfig?.list ?? mockInputOptions;
3222
+ if (lista == void 0) lista = [];
3223
+ const value = input.value ?? "";
3224
+ const optionValue = input?.listConfig?.optionValue ?? input.optionValue ?? "id";
3225
+ const getValue = (item) => {
3226
+ if (optionValue == "name") return item[optionValue];
3227
+ return item.value ?? item.id;
3228
+ };
3229
+ return /* @__PURE__ */ jsxRuntime.jsx(
3230
+ FormField,
3231
+ {
3232
+ control: form.control,
3233
+ name: input.name,
3234
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(FormItem, { className: "flex flex-row items-center justify-between rounded-lg border p-3 shadow-lg bg-blue-100/20", children: [
3235
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-0.5 pr-5", children: [
3236
+ /* @__PURE__ */ jsxRuntime.jsx(FormLabel, { children: /* @__PURE__ */ jsxRuntime.jsx("b", { children: input.label }) }),
3237
+ input.description && /* @__PURE__ */ jsxRuntime.jsx(FormDescription, { children: input.description }),
3238
+ /* @__PURE__ */ jsxRuntime.jsx(FormMessage, {})
3239
+ ] }),
3240
+ /* @__PURE__ */ jsxRuntime.jsx(FormControl, { children: /* @__PURE__ */ jsxRuntime.jsxs(Select, { onValueChange: field.onChange, defaultValue: value.toString(), value: field.value?.toString() ?? value.toString(), children: [
3241
+ /* @__PURE__ */ jsxRuntime.jsx(FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "w-[60%] bg-black/10 dark:bg-white/25", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: input.placeHolder }) }) }),
3242
+ /* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: lista.filter((item) => item.name !== void 0).map((item) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: getValue(item).toString(), children: item.name }, item.id)) })
3243
+ ] }) })
3244
+ ] })
3245
+ },
3246
+ input.name
3247
+ );
3248
+ };
3249
+ var SwitchInput = class extends BaseInput {
3250
+ render() {
3251
+ const { input, form } = this;
3252
+ const className = input.className;
3253
+ return /* @__PURE__ */ jsxRuntime.jsx(
3254
+ FormField,
3255
+ {
3256
+ control: form.control,
3257
+ name: input.name,
3258
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx(Card, { className: `${className ? className : "p-3 shadow-lg bg-blue-100/20"}`, children: /* @__PURE__ */ jsxRuntime.jsxs(FormItem, { className: "flex flex-row items-center justify-between rounded-lg", children: [
3259
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-0.5", children: [
3260
+ /* @__PURE__ */ jsxRuntime.jsx(FormLabel, { children: /* @__PURE__ */ jsxRuntime.jsx("b", { children: input.label }) }),
3261
+ /* @__PURE__ */ jsxRuntime.jsx(FormDescription, { children: input.placeHolder ?? input.description }),
3262
+ /* @__PURE__ */ jsxRuntime.jsx(FormMessage, {})
3263
+ ] }),
3264
+ /* @__PURE__ */ jsxRuntime.jsx(FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(Switch, { checked: field.value, onCheckedChange: field.onChange, "aria-disabled": true, disabled: input.disabled }) })
3265
+ ] }) })
3266
+ },
3267
+ input.name
3268
+ );
3269
+ }
3270
+ };
3271
+ var TextAreaInput = class extends BaseInput {
3272
+ render() {
3273
+ const { input, form } = this;
3274
+ return /* @__PURE__ */ jsxRuntime.jsx(
3275
+ FormField,
3276
+ {
3277
+ control: form.control,
3278
+ name: input.name,
3279
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(FormItem, { className: "shadow-lg", children: [
3280
+ /* @__PURE__ */ jsxRuntime.jsx(FormLabel, { children: /* @__PURE__ */ jsxRuntime.jsx("b", { children: input.label }) }),
3281
+ /* @__PURE__ */ jsxRuntime.jsx(FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(Textarea, { className: "min-w-[260px] bg-white", placeholder: input.placeHolder, ...field, disabled: input.disabled }) }),
3282
+ input.description && /* @__PURE__ */ jsxRuntime.jsx(FormDescription, { children: input.description }),
3283
+ /* @__PURE__ */ jsxRuntime.jsx(FormMessage, {})
3284
+ ] })
3285
+ },
3286
+ input.name
3287
+ );
3288
+ }
3289
+ };
3290
+ var TextInput = class extends BaseInput {
3291
+ render() {
3292
+ const { input, form } = this;
3293
+ return /* @__PURE__ */ jsxRuntime.jsx(
3294
+ FormField,
3295
+ {
3296
+ control: form.control,
3297
+ name: input.name,
3298
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(FormItem, { className: input.className, children: [
3299
+ /* @__PURE__ */ jsxRuntime.jsx(FormLabel, { children: /* @__PURE__ */ jsxRuntime.jsx("b", { children: input.label }) }),
3300
+ /* @__PURE__ */ jsxRuntime.jsx(FormControl, { className: "shadow-lg", children: /* @__PURE__ */ jsxRuntime.jsx(
3301
+ Input,
3302
+ {
3303
+ className: "min-w-[180px]",
3304
+ placeholder: input.placeHolder,
3305
+ ...field,
3306
+ type: input.keyboardType,
3307
+ disabled: input.disabled
3308
+ }
3309
+ ) }),
3310
+ input.description && /* @__PURE__ */ jsxRuntime.jsxs(FormDescription, { children: [
3311
+ " ",
3312
+ input.description,
3313
+ " "
3314
+ ] }),
3315
+ /* @__PURE__ */ jsxRuntime.jsx(FormMessage, {})
3316
+ ] })
3317
+ },
3318
+ input.name
3319
+ );
3320
+ }
3321
+ };
3322
+ var FileInput = class extends BaseInput {
3323
+ render() {
3324
+ const { input, form } = this;
3325
+ return /* @__PURE__ */ jsxRuntime.jsx(FieldFile, { input, form });
3326
+ }
3327
+ };
3328
+ var FieldFile = ({ form, input }) => {
3329
+ const [preview, setPreview] = React3.useState(form.getValues(input.name) ?? null);
3330
+ const [showPreview, setShowPreview] = React3.useState(input.fileConfig?.showPreview ?? false);
3331
+ const accept = input.fileConfig?.accept || "*/*";
3332
+ const multiple = input.fileConfig?.multiple || false;
3333
+ React3.useEffect(() => {
3334
+ setPreview(form.getValues(input.name) || null);
3335
+ }, [input]);
3336
+ const handleFileChange = (e) => {
3337
+ const file = e.target.files?.[0];
3338
+ if (file) {
3339
+ const objectUrl = URL.createObjectURL(file);
3340
+ setPreview(objectUrl);
3341
+ console.log("\u{1F680} ~ handleFileChange ~ objectUrl:", objectUrl);
3342
+ } else {
3343
+ setPreview(null);
3344
+ }
3345
+ };
3346
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
3347
+ FormField,
3348
+ {
3349
+ control: form.control,
3350
+ name: input.name,
3351
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(FormItem, { children: [
3352
+ /* @__PURE__ */ jsxRuntime.jsx(FormLabel, { children: /* @__PURE__ */ jsxRuntime.jsx("b", { children: input.label }) }),
3353
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-1", children: [
3354
+ /* @__PURE__ */ jsxRuntime.jsx(FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(
3355
+ Input,
3356
+ {
3357
+ type: "file",
3358
+ accept,
3359
+ multiple,
3360
+ placeholder: input.placeHolder,
3361
+ name: field.name,
3362
+ disabled: input.disabled,
3363
+ onChange: (e) => {
3364
+ field.onChange(e.target.files?.[0]);
3365
+ handleFileChange(e);
3366
+ }
3367
+ }
3368
+ ) }),
3369
+ preview && /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", onClick: () => {
3370
+ setShowPreview(!showPreview);
3371
+ }, children: showPreview ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.EyeOff, {}) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, {}) }),
3372
+ /* @__PURE__ */ jsxRuntime.jsx(FormDescription, { children: input.description })
3373
+ ] }),
3374
+ /* @__PURE__ */ jsxRuntime.jsx(FormMessage, {}),
3375
+ preview && showPreview && /* @__PURE__ */ jsxRuntime.jsx(Card, {})
3376
+ ] })
3377
+ },
3378
+ input.name
3379
+ ) });
3380
+ };
3381
+ var inputMap = {
3382
+ ["text" /* TEXT */]: TextInput,
3383
+ ["switch" /* SWITCH */]: SwitchInput,
3384
+ ["color" /* COLOR */]: ColorInput,
3385
+ ["date" /* DATE */]: DateInput,
3386
+ ["number" /* NUMBER */]: NumberInput,
3387
+ ["select" /* SELECT */]: SelectInput,
3388
+ ["grouped_switchlist" /* GROUPED_SWITCH_LIST */]: GroupedSwitchInput,
3389
+ ["otp" /* OTP */]: OTPInput2,
3390
+ ["file" /* FILE */]: FileInput,
3391
+ ["hidden" /* HIDDEN */]: TextInput,
3392
+ //ToDo: // puedes asignar algo genérico
3393
+ ["checklist" /* CHECK_LIST */]: TextInput,
3394
+ //ToDo:
3395
+ // [InputTypes.SWITCH_LIST]: SwitchListInput, //ToDo:
3396
+ ["textarea" /* TEXTAREA */]: TextAreaInput,
3397
+ ["form" /* FORM */]: TextInput
3398
+ //ToDo:
3399
+ };
3400
+ var InputFactory = class {
3401
+ static create(input, form) {
3402
+ const inputType = input.inputType ?? "text" /* TEXT */;
3403
+ const InputClass = inputMap[inputType] ?? TextInput;
3404
+ const instance = new InputClass(input, form);
3405
+ return instance.render();
3406
+ }
3407
+ };
3408
+ function getDefaultValues(entity) {
3409
+ const defaults = {};
3410
+ for (const key in entity) {
3411
+ const value = entity[key];
3412
+ if (value === null || value === void 0) {
3413
+ defaults[key] = "";
3414
+ continue;
3415
+ }
3416
+ switch (typeof value) {
3417
+ case "string":
3418
+ defaults[key] = value ?? "";
3419
+ break;
3420
+ case "number":
3421
+ defaults[key] = value ?? 0;
3422
+ break;
3423
+ case "boolean":
3424
+ defaults[key] = value ?? false;
3425
+ break;
3426
+ case "object":
3427
+ if (Array.isArray(value)) {
3428
+ defaults[key] = [...value];
3429
+ } else {
3430
+ defaults[key] = { ...value };
3431
+ }
3432
+ break;
3433
+ default:
3434
+ defaults[key] = value;
3435
+ }
3436
+ }
3437
+ return defaults;
3438
+ }
3439
+ var getDynamicSchema = (fields) => {
3440
+ const flatFields = fields.flatMap((f) => Array.isArray(f) ? f : [f]);
3441
+ const shape = {};
3442
+ flatFields.forEach((f) => {
3443
+ shape[f.name] = f.zodTypeAny ?? z2__default.default.any();
3444
+ });
3445
+ return z2__default.default.object(shape);
3446
+ };
3447
+ var FormErrors = ({ formState, fields }) => {
3448
+ const flatFields = fields.flatMap((f) => Array.isArray(f) ? f : [f]);
3449
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: Object.entries(formState.errors).length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
3450
+ CustomAlert,
3451
+ {
3452
+ title: "Revisar los siguientes criterios",
3453
+ description: /* @__PURE__ */ jsxRuntime.jsx("ul", { children: Object.entries(formState?.errors).map(([key, value]) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
3454
+ /* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
3455
+ getFieldLabel(key, flatFields),
3456
+ ":"
3457
+ ] }),
3458
+ " ",
3459
+ value?.message?.toString() ?? ""
3460
+ ] }, key)) }),
3461
+ className: "mb-4",
3462
+ variant: "error"
3463
+ }
3464
+ ) });
3465
+ };
3466
+ var getFieldLabel = (fieldErrorKey, fields) => {
3467
+ const findedField = fields.find((field) => field.name == fieldErrorKey);
3468
+ return findedField?.label ?? fieldErrorKey;
3469
+ };
3470
+ var DynamicForm = ({ fields, record = {}, onSubmit }) => {
3471
+ const schema = React3.useMemo(() => getDynamicSchema(fields), [fields]);
3472
+ const defaultValues = React3.useMemo(() => getDefaultValues(record), [record]);
3473
+ const form = reactHookForm.useForm({
3474
+ resolver: zod.zodResolver(schema),
3475
+ defaultValues
3476
+ });
3477
+ React3.useEffect(() => {
3478
+ form.reset(defaultValues);
3479
+ }, [defaultValues, fields]);
3480
+ const handleSubmit = (data) => {
3481
+ console.log("\u2705 Datos enviados:", data);
3482
+ React3.startTransition(async () => {
3483
+ onSubmit?.(data);
3484
+ });
3485
+ };
3486
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
3487
+ /* @__PURE__ */ jsxRuntime.jsx(FormErrors, { formState: form.formState, fields }),
3488
+ /* @__PURE__ */ jsxRuntime.jsx(Form, { ...form, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(handleSubmit), className: "flex flex-col gap-2", children: [
3489
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full grid grid-cols-1", children: fields.map(
3490
+ (input, idx) => Array.isArray(input) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-full flex flex-row justify-between py-3", children: input.map((field, subIdx) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full px-2", children: InputFactory.create(field, form) }, subIdx)) }, `field-group-${idx}`) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex flex-col justify-between py-3 w-full px-2", children: InputFactory.create(input, form) }, `field-group-${idx}`)
3491
+ ) }),
3492
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "submit", children: "Enviar" }) })
3493
+ ] }) })
3494
+ ] });
3495
+ };
3496
+ var DynamicFormExample = () => {
3497
+ const record = {
3498
+ username: "John Doe ",
3499
+ email: "johndoe@example.com",
3500
+ isActive: true,
3501
+ favoriteColor: void 0,
3502
+ age: 25,
3503
+ role: "editor"
3504
+ };
3505
+ return /* @__PURE__ */ jsxRuntime.jsx(
3506
+ DynamicForm,
3507
+ {
3508
+ fields: mockFields,
3509
+ record,
3510
+ onSubmit: (data) => console.log("\u{1F4E4} Resultado final:", data)
3511
+ }
3512
+ );
3513
+ };
3514
+ var mockFields = [
3515
+ // 🧍‍♂️ Campo requerido simple
3516
+ {
3517
+ name: "username",
3518
+ label: "Nombre de usuario",
3519
+ inputType: "text" /* TEXT */,
3520
+ required: true,
3521
+ zodTypeAny: z2__default.default.string().min(3, "El nombre debe tener al menos 3 caracteres").max(20, "El nombre no puede tener m\xE1s de 20 caracteres")
3522
+ },
3523
+ // 📧 Campo de correo con validación personalizada (ZodTypeAny)
3524
+ {
3525
+ name: "email",
3526
+ label: "Correo electr\xF3nico",
3527
+ inputType: "text" /* TEXT */,
3528
+ required: false,
3529
+ zodTypeAny: z2__default.default.string().email("Correo inv\xE1lido").toLowerCase().refine((val) => !val.endsWith("@spam.com"), {
3530
+ message: "No se permiten correos de spam.com"
3531
+ })
3532
+ },
3533
+ // 🔒 Campo opcional (no requerido)
3534
+ {
3535
+ name: "password",
3536
+ label: "Contrase\xF1a",
3537
+ inputType: "text" /* TEXT */,
3538
+ required: false,
3539
+ keyboardType: "password" /* PASSWORD */,
3540
+ zodTypeAny: z2__default.default.string().min(6, "Debe tener al menos 6 caracteres").max(20, "No m\xE1s de 20 caracteres").optional()
3541
+ },
3542
+ // 🟢 Campo tipo switch (boolean)
3543
+ {
3544
+ name: "isActive",
3545
+ label: "Usuario activo",
3546
+ inputType: "switch" /* SWITCH */,
3547
+ required: false,
3548
+ zodTypeAny: z2__default.default.boolean().default(true)
3549
+ },
3550
+ // 🎨 Color con validación personalizada
3551
+ [
3552
+ {
3553
+ name: "favoriteColor",
3554
+ label: "Color favorito",
3555
+ inputType: "color" /* COLOR */,
3556
+ required: false,
3557
+ zodTypeAny: z2__default.default.string().regex(/^#([0-9A-Fa-f]{6})$/, "Debe ser un color hexadecimal v\xE1lido")
3558
+ },
3559
+ // 🔢 Número con rango
3560
+ {
3561
+ name: "age",
3562
+ label: "Edad",
3563
+ inputType: "number" /* NUMBER */,
3564
+ required: true,
3565
+ zodTypeAny: z2__default.default.coerce.number().min(18, "Debe ser mayor de 18").max(99, "Debe ser menor de 99")
3566
+ }
3567
+ ],
3568
+ // 📅 Fecha
3569
+ {
3570
+ name: "birthDate",
3571
+ label: "Fecha de nacimiento",
3572
+ inputType: "date" /* DATE */,
3573
+ required: true,
3574
+ zodTypeAny: z2__default.default.coerce.date().refine((d) => d < /* @__PURE__ */ new Date(), {
3575
+ message: "La fecha no puede ser futura"
3576
+ })
3577
+ },
3578
+ // 🎓 Select con validación personalizada
3579
+ {
3580
+ name: "role",
3581
+ label: "Rol de usuario",
3582
+ inputType: "select" /* SELECT */,
3583
+ required: true,
3584
+ listConfig: {
3585
+ onOptionChange: () => {
3586
+ },
3587
+ list: [
3588
+ { id: 1, name: "Administrador", value: "admin" },
3589
+ { id: 2, name: "Editor", value: "editor" },
3590
+ { id: 3, name: "Lector", value: "reader" }
3591
+ ]
3592
+ },
3593
+ zodTypeAny: z2__default.default.enum(["admin", "editor", "reader"])
3594
+ },
3595
+ // 🧾 Campo tipo archivo (file)
3596
+ {
3597
+ name: "profileImage",
3598
+ label: "Imagen de perfil",
3599
+ inputType: "file" /* FILE */,
3600
+ required: false,
3601
+ zodTypeAny: z2__default.default.any().refine(
3602
+ (file) => {
3603
+ if (!file) return true;
3604
+ return file.size <= 10 * 1024 * 1024 && ["image/jpeg", "image/png"].includes(file.type);
3605
+ },
3606
+ { message: "Solo se permiten im\xE1genes JPG o PNG de menos de 10MB" }
3607
+ ).optional()
3608
+ },
3609
+ // 🔢 OTP (código)
3610
+ {
3611
+ name: "otpCode",
3612
+ label: "C\xF3digo OTP",
3613
+ inputType: "otp" /* OTP */,
3614
+ required: true,
3615
+ zodTypeAny: z2__default.default.string().min(4, "Debe tener al menos 4 d\xEDgitos").max(6, "Debe tener m\xE1ximo 6 d\xEDgitos")
3616
+ }
3617
+ ];
3618
+ var InputList = ({ handleAddInput, inputsTypes }) => {
3619
+ const [inputSetups, setInputSetups] = React3.useState(
3620
+ () => Object.fromEntries(
3621
+ inputsTypes.map((type) => [type, { required: false, disabled: false }])
3622
+ )
3623
+ );
3624
+ const toggleConfig = (type, key) => {
3625
+ setInputSetups((prev) => ({
3626
+ ...prev,
3627
+ [type]: { ...prev[type], [key]: !prev[type][key] }
3628
+ }));
3629
+ };
3630
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-1", children: inputsTypes.map((type) => {
3631
+ const setup = inputSetups[type];
3632
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3633
+ "div",
3634
+ {
3635
+ className: "border rounded-lg p-2 flex flex-col-2 gap-1 shadow-sm",
3636
+ children: [
3637
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "icon", onClick: () => handleAddInput(type, setup), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, {}) }),
3638
+ /* @__PURE__ */ jsxRuntime.jsx(Accordion, { type: "single", collapsible: true, className: "w-full", children: /* @__PURE__ */ jsxRuntime.jsxs(AccordionItem, { value: "item-1", children: [
3639
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row justify-center w-full content-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-xl", children: type }) }) }),
3640
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
3641
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2", children: [
3642
+ /* @__PURE__ */ jsxRuntime.jsx(
3643
+ Switch,
3644
+ {
3645
+ checked: setup.required,
3646
+ onCheckedChange: () => toggleConfig(type, "required")
3647
+ }
3648
+ ),
3649
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Required" })
3650
+ ] }),
3651
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2", children: [
3652
+ /* @__PURE__ */ jsxRuntime.jsx(
3653
+ Switch,
3654
+ {
3655
+ checked: setup.disabled,
3656
+ onCheckedChange: () => toggleConfig(type, "disabled")
3657
+ }
3658
+ ),
3659
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Disabled" })
3660
+ ] })
3661
+ ] }) })
3662
+ ] }) })
3663
+ ]
3664
+ },
3665
+ type
3666
+ );
3667
+ }) });
3668
+ };
3669
+
3670
+ exports.Accordion = Accordion;
3671
+ exports.AccordionContent = AccordionContent;
3672
+ exports.AccordionItem = AccordionItem;
3673
+ exports.AccordionTrigger = AccordionTrigger;
3674
+ exports.Alert = Alert;
3675
+ exports.AlertDescription = AlertDescription;
3676
+ exports.AlertTitle = AlertTitle;
3677
+ exports.Badge = Badge;
3678
+ exports.BaseInput = BaseInput;
3679
+ exports.Button = Button;
3680
+ exports.Calendar = Calendar;
3681
+ exports.CalendarDayButton = CalendarDayButton;
3682
+ exports.Card = Card;
3683
+ exports.CardAction = CardAction;
3684
+ exports.CardContent = CardContent;
3685
+ exports.CardDescription = CardDescription;
3686
+ exports.CardFooter = CardFooter;
3687
+ exports.CardHeader = CardHeader;
3688
+ exports.CardTitle = CardTitle;
3689
+ exports.CheckListInput = CheckListInput;
3690
+ exports.Checkbox = Checkbox;
3691
+ exports.ColorCnInput = ColorCnInput;
3692
+ exports.ColorInput = ColorInput;
3693
+ exports.CustomAlert = CustomAlert;
3694
+ exports.DateInput = DateInput;
3695
+ exports.Dialog = Dialog;
3696
+ exports.DialogClose = DialogClose;
3697
+ exports.DialogContent = DialogContent;
3698
+ exports.DialogDescription = DialogDescription;
3699
+ exports.DialogFooter = DialogFooter;
3700
+ exports.DialogHeader = DialogHeader;
3701
+ exports.DialogOverlay = DialogOverlay;
3702
+ exports.DialogPortal = DialogPortal;
3703
+ exports.DialogTitle = DialogTitle;
3704
+ exports.DialogTrigger = DialogTrigger;
3705
+ exports.DynamicForm = DynamicForm;
3706
+ exports.DynamicFormExample = DynamicFormExample;
3707
+ exports.FileInput = FileInput;
3708
+ exports.Form = Form;
3709
+ exports.FormControl = FormControl;
3710
+ exports.FormDescription = FormDescription;
3711
+ exports.FormErrors = FormErrors;
3712
+ exports.FormField = FormField;
3713
+ exports.FormItem = FormItem;
3714
+ exports.FormLabel = FormLabel;
3715
+ exports.FormMessage = FormMessage;
3716
+ exports.GroupedSwitchInput = GroupedSwitchInput;
3717
+ exports.Input = Input;
3718
+ exports.InputFactory = InputFactory;
3719
+ exports.InputList = InputList;
3720
+ exports.InputOTP = InputOTP;
3721
+ exports.InputOTPGroup = InputOTPGroup;
3722
+ exports.InputOTPSeparator = InputOTPSeparator;
3723
+ exports.InputOTPSlot = InputOTPSlot;
3724
+ exports.InputTypes = InputTypes;
3725
+ exports.Label = Label;
3726
+ exports.NumberInput = NumberInput;
3727
+ exports.OTPInput = OTPInput2;
3728
+ exports.Popover = Popover;
3729
+ exports.PopoverAnchor = PopoverAnchor;
3730
+ exports.PopoverContent = PopoverContent;
3731
+ exports.PopoverTrigger = PopoverTrigger;
3732
+ exports.ResizableHandle = ResizableHandle;
3733
+ exports.ResizablePanel = ResizablePanel;
3734
+ exports.ResizablePanelGroup = ResizablePanelGroup;
3735
+ exports.ScrollArea = ScrollArea;
3736
+ exports.ScrollBar = ScrollBar;
3737
+ exports.Select = Select;
3738
+ exports.SelectContent = SelectContent;
3739
+ exports.SelectGroup = SelectGroup;
3740
+ exports.SelectInput = SelectInput;
3741
+ exports.SelectItem = SelectItem;
3742
+ exports.SelectLabel = SelectLabel;
3743
+ exports.SelectScrollDownButton = SelectScrollDownButton;
3744
+ exports.SelectScrollUpButton = SelectScrollUpButton;
3745
+ exports.SelectSeparator = SelectSeparator;
3746
+ exports.SelectTrigger = SelectTrigger;
3747
+ exports.SelectValue = SelectValue;
3748
+ exports.Separator = Separator2;
3749
+ exports.Switch = Switch;
3750
+ exports.SwitchInput = SwitchInput;
3751
+ exports.TextAreaInput = TextAreaInput;
3752
+ exports.TextInput = TextInput;
3753
+ exports.TextInputType = TextInputType;
3754
+ exports.Textarea = Textarea;
3755
+ exports.Toaster = Toaster;
3756
+ exports.Tooltip = Tooltip;
3757
+ exports.TooltipContent = TooltipContent;
3758
+ exports.TooltipProvider = TooltipProvider;
3759
+ exports.TooltipTrigger = TooltipTrigger;
3760
+ exports.badgeVariants = badgeVariants;
3761
+ exports.buttonVariants = buttonVariants;
3762
+ exports.getDefaultValues = getDefaultValues;
3763
+ exports.getDynamicSchema = getDynamicSchema;
3764
+ exports.inputFieldComp = inputFieldComp;
3765
+ exports.mockFields = mockFields;
3766
+ exports.useFormField = useFormField;
3767
+ exports.validationMessages = validationMessages;
3768
+ //# sourceMappingURL=index.cjs.map
3769
+ //# sourceMappingURL=index.cjs.map